月球大数据地理空间分析展示平台-【前端】-月球2期前端
surprise
2023-10-23 538d7313f98da3c304365f1c2b22c3e23d91db35
public/WebSDK/index.js
@@ -1,17 +1,17 @@
/**
 *
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 3.2.4-6
 * Version 3.2.4-7
 *
 **/
var T_t=Object.create;var qAe=Object.defineProperty;var M_t=Object.getOwnPropertyDescriptor;var P_t=Object.getOwnPropertyNames;var R_t=Object.getPrototypeOf,L_t=Object.prototype.hasOwnProperty;var l1=(o=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(o,{get:(A,f)=>(typeof require<"u"?require:A)[f]}):o)(function(o){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+o+'" is not supported')});var F_t=(o,A)=>()=>(A||o((A={exports:{}}).exports,A),A.exports),f5e=(o,A)=>{for(var f in A)qAe(o,f,{get:A[f],enumerable:!0})},N_t=(o,A,f,m)=>{if(A&&typeof A=="object"||typeof A=="function")for(let C of P_t(A))!L_t.call(o,C)&&C!==f&&qAe(o,C,{get:()=>A[C],enumerable:!(m=M_t(A,C))||m.enumerable});return o};var k_t=(o,A,f)=>(f=o!=null?T_t(R_t(o)):{},N_t(A||!o||!o.__esModule?qAe(f,"default",{value:o,enumerable:!0}):f,o));var Cct=F_t((mct,$ae)=>{(function(o,A,f){typeof $ae<"u"&&$ae.exports?$ae.exports=f():typeof define=="function"&&define.amd?define(f):A[o]=f()})("h337",mct,function(){var o={defaultRadius:40,defaultRenderer:"canvas2d",defaultGradient:{.25:"rgb(0,0,255)",.55:"rgb(0,255,0)",.85:"yellow",1:"rgb(255,0,0)"},defaultMaxOpacity:1,defaultMinOpacity:0,defaultBlur:.85,defaultXField:"x",defaultYField:"y",defaultValueField:"value",plugins:{}},A=function(){var E=function(Q){this._coordinator={},this._data=[],this._radi=[],this._min=10,this._max=1,this._xField=Q.xField||Q.defaultXField,this._yField=Q.yField||Q.defaultYField,this._valueField=Q.valueField||Q.defaultValueField,Q.radius&&(this._cfgRadius=Q.radius)},I=o.defaultRadius;return E.prototype={_organiseData:function(w,Q){var M=w[this._xField],B=w[this._yField],T=this._radi,D=this._data,F=this._max,L=this._min,R=w[this._valueField]||1,k=w.radius||this._cfgRadius||I;D[M]||(D[M]=[],T[M]=[]),D[M][B]?D[M][B]+=R:(D[M][B]=R,T[M][B]=k);var U=D[M][B];return U>F?(Q?this.setDataMax(U):this._max=U,!1):U<L?(Q?this.setDataMin(U):this._min=U,!1):{x:M,y:B,value:R,radius:k,min:L,max:F}},_unOrganizeData:function(){var w=[],Q=this._data,M=this._radi;for(var B in Q)for(var T in Q[B])w.push({x:B,y:T,radius:M[B][T],value:Q[B][T]});return{min:this._min,max:this._max,data:w}},_onExtremaChange:function(){this._coordinator.emit("extremachange",{min:this._min,max:this._max})},addData:function(){if(arguments[0].length>0)for(var w=arguments[0],Q=w.length;Q--;)this.addData.call(this,w[Q]);else{var M=this._organiseData(arguments[0],!0);M&&(this._data.length===0&&(this._min=this._max=M.value),this._coordinator.emit("renderpartial",{min:this._min,max:this._max,data:[M]}))}return this},setData:function(w){var Q=w.data,M=Q.length;this._data=[],this._radi=[];for(var B=0;B<M;B++)this._organiseData(Q[B],!1);return this._max=w.max,this._min=w.min||0,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},removeData:function(){},setDataMax:function(w){return this._max=w,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},setDataMin:function(w){return this._min=w,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},setCoordinator:function(w){this._coordinator=w},_getInternalData:function(){return{max:this._max,min:this._min,data:this._data,radi:this._radi}},getData:function(){return this._unOrganizeData()}},E}(),f=function(){var E=function(M){var B=M.gradient||M.defaultGradient,T=document.createElement("canvas"),D=T.getContext("2d");T.width=256,T.height=1;var F=D.createLinearGradient(0,0,256,1);for(var L in B)F.addColorStop(L,B[L]);return D.fillStyle=F,D.fillRect(0,0,256,1),D.getImageData(0,0,256,1).data},I=function(M,B){var T=document.createElement("canvas"),D=T.getContext("2d"),F=M,L=M;if(T.width=T.height=M*2,B==1)D.beginPath(),D.arc(F,L,M,0,2*Math.PI,!1),D.fillStyle="rgba(0,0,0,1)",D.fill();else{var R=D.createRadialGradient(F,L,M*B,F,L,M);R.addColorStop(0,"rgba(0,0,0,1)"),R.addColorStop(1,"rgba(0,0,0,0)"),D.fillStyle=R,D.fillRect(0,0,2*M,2*M)}return T},w=function(L){for(var B=[],T=L.min,D=L.max,F=L.radi,L=L.data,R=Object.keys(L),k=R.length;k--;)for(var U=R[k],V=Object.keys(L[U]),H=V.length;H--;){var q=V[H],ie=L[U][q],Z=F[U][q];B.push({x:U,y:q,value:ie,radius:Z})}return{min:T,max:D,data:B}};function Q(M){var B=M.container,T=this.shadowCanvas=document.createElement("canvas"),D=this.canvas=M.canvas||document.createElement("canvas"),F=this._renderBoundaries=[1e4,1e4,0,0],L=getComputedStyle(M.container)||{};D.className="heatmap-canvas",this._width=D.width=T.width=M.width||+L.width.replace(/px/,""),this._height=D.height=T.height=M.height||+L.height.replace(/px/,""),this.shadowCtx=T.getContext("2d"),this.ctx=D.getContext("2d"),D.style.cssText=T.style.cssText="position:absolute;left:0;top:0;",B.style.position="relative",B.appendChild(D),this._palette=E(M),this._templates={},this._setStyles(M)}return Q.prototype={renderPartial:function(M){M.data.length>0&&(this._drawAlpha(M),this._colorize())},renderAll:function(M){this._clear(),M.data.length>0&&(this._drawAlpha(w(M)),this._colorize())},_updateGradient:function(M){this._palette=E(M)},updateConfig:function(M){M.gradient&&this._updateGradient(M),this._setStyles(M)},setDimensions:function(M,B){this._width=M,this._height=B,this.canvas.width=this.shadowCanvas.width=M,this.canvas.height=this.shadowCanvas.height=B},_clear:function(){this.shadowCtx.clearRect(0,0,this._width,this._height),this.ctx.clearRect(0,0,this._width,this._height)},_setStyles:function(M){this._blur=M.blur==0?0:M.blur||M.defaultBlur,M.backgroundColor&&(this.canvas.style.backgroundColor=M.backgroundColor),this._width=this.canvas.width=this.shadowCanvas.width=M.width||this._width,this._height=this.canvas.height=this.shadowCanvas.height=M.height||this._height,this._opacity=(M.opacity||0)*255,this._maxOpacity=(M.maxOpacity||M.defaultMaxOpacity)*255,this._minOpacity=(M.minOpacity||M.defaultMinOpacity)*255,this._useGradientOpacity=!!M.useGradientOpacity},_drawAlpha:function(D){for(var B=this._min=D.min,T=this._max=D.max,D=D.data||[],F=D.length,L=1-this._blur;F--;){var R=D[F],k=R.x,U=R.y,V=R.radius,H=Math.min(R.value,T),q=k-V,ie=U-V,Z=this.shadowCtx,oe;this._templates[V]?oe=this._templates[V]:this._templates[V]=oe=I(V,L);var ne=(H-B)/(T-B);Z.globalAlpha=ne<.01?.01:ne,Z.drawImage(oe,q,ie),q<this._renderBoundaries[0]&&(this._renderBoundaries[0]=q),ie<this._renderBoundaries[1]&&(this._renderBoundaries[1]=ie),q+2*V>this._renderBoundaries[2]&&(this._renderBoundaries[2]=q+2*V),ie+2*V>this._renderBoundaries[3]&&(this._renderBoundaries[3]=ie+2*V)}},_colorize:function(){var M=this._renderBoundaries[0],B=this._renderBoundaries[1],T=this._renderBoundaries[2]-M,D=this._renderBoundaries[3]-B,F=this._width,L=this._height,R=this._opacity,k=this._maxOpacity,U=this._minOpacity,V=this._useGradientOpacity;M<0&&(M=0),B<0&&(B=0),M+T>F&&(T=F-M),B+D>L&&(D=L-B);for(var H=this.shadowCtx.getImageData(M,B,T,D),q=H.data,ie=q.length,Z=this._palette,oe=3;oe<ie;oe+=4){var ne=q[oe],se=ne*4;if(!!se){var ce;R>0?ce=R:ne<k?ne<U?ce=U:ce=ne:ce=k,q[oe-3]=Z[se],q[oe-2]=Z[se+1],q[oe-1]=Z[se+2],q[oe]=V?Z[se+3]:ce}}H.data=q,this.ctx.putImageData(H,M,B),this._renderBoundaries=[1e3,1e3,0,0]},getValueAt:function(M){var B,T=this.shadowCtx,D=T.getImageData(M.x,M.y,1,1),F=D.data[3],L=this._max,R=this._min;return B=Math.abs(L-R)*(F/255)>>0,B},getDataURL:function(){return this.canvas.toDataURL()}},Q}(),m=function(){var E=!1;return o.defaultRenderer==="canvas2d"&&(E=f),E}(),C={merge:function(){for(var v={},E=arguments.length,I=0;I<E;I++){var w=arguments[I];for(var Q in w)v[Q]=w[Q]}return v}},y=function(){var E=function(){function M(){this.cStore={}}return M.prototype={on:function(B,T,D){var F=this.cStore;F[B]||(F[B]=[]),F[B].push(function(L){return T.call(D,L)})},emit:function(B,T){var D=this.cStore;if(D[B])for(var F=D[B].length,L=0;L<F;L++){var R=D[B][L];R(T)}}},M}(),I=function(Q){var M=Q._renderer,B=Q._coordinator,T=Q._store;B.on("renderpartial",M.renderPartial,M),B.on("renderall",M.renderAll,M),B.on("extremachange",function(D){Q._config.onExtremaChange&&Q._config.onExtremaChange({min:D.min,max:D.max,gradient:Q._config.gradient||Q._config.defaultGradient})}),T.setCoordinator(B)};function w(){var Q=this._config=C.merge(o,arguments[0]||{});if(this._coordinator=new E,Q.plugin){var M=Q.plugin;if(o.plugins[M]){var B=o.plugins[M];this._renderer=new B.renderer(Q),this._store=new B.store(Q)}else throw new Error("Plugin '"+M+"' not found. Maybe it was not registered.")}else this._renderer=new m(Q),this._store=new A(Q);I(this)}return w.prototype={addData:function(){return this._store.addData.apply(this._store,arguments),this},removeData:function(){return this._store.removeData&&this._store.removeData.apply(this._store,arguments),this},setData:function(){return this._store.setData.apply(this._store,arguments),this},setDataMax:function(){return this._store.setDataMax.apply(this._store,arguments),this},setDataMin:function(){return this._store.setDataMin.apply(this._store,arguments),this},configure:function(Q){return this._config=C.merge(this._config,Q),this._renderer.updateConfig(this._config),this._coordinator.emit("renderall",this._store._getInternalData()),this},repaint:function(){return this._coordinator.emit("renderall",this._store._getInternalData()),this},getData:function(){return this._store.getData()},getDataURL:function(){return this._renderer.getDataURL()},getValueAt:function(Q){return this._store.getValueAt?this._store.getValueAt(Q):this._renderer.getValueAt?this._renderer.getValueAt(Q):null}},w}(),x={create:function(v){return new y(v)},register:function(v,E){o.plugins[v]=E}};return x})});var g5e="WebSDK v3.2.4-6",p5e="Cesium v1.99",m5e="2023.10.11",O_t="SmartEarth",U_t={VERSION:g5e,CesiumVERSION:p5e,CompileTime:m5e},G_t=typeof window<"u"?window:typeof self<"u"?self:{};G_t.logSmartEarth=()=>{let o=`
var T_t=Object.create;var qAe=Object.defineProperty;var M_t=Object.getOwnPropertyDescriptor;var P_t=Object.getOwnPropertyNames;var R_t=Object.getPrototypeOf,L_t=Object.prototype.hasOwnProperty;var l1=(o=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(o,{get:(A,f)=>(typeof require<"u"?require:A)[f]}):o)(function(o){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+o+'" is not supported')});var F_t=(o,A)=>()=>(A||o((A={exports:{}}).exports,A),A.exports),f5e=(o,A)=>{for(var f in A)qAe(o,f,{get:A[f],enumerable:!0})},N_t=(o,A,f,m)=>{if(A&&typeof A=="object"||typeof A=="function")for(let C of P_t(A))!L_t.call(o,C)&&C!==f&&qAe(o,C,{get:()=>A[C],enumerable:!(m=M_t(A,C))||m.enumerable});return o};var k_t=(o,A,f)=>(f=o!=null?T_t(R_t(o)):{},N_t(A||!o||!o.__esModule?qAe(f,"default",{value:o,enumerable:!0}):f,o));var Cct=F_t((mct,$ae)=>{(function(o,A,f){typeof $ae<"u"&&$ae.exports?$ae.exports=f():typeof define=="function"&&define.amd?define(f):A[o]=f()})("h337",mct,function(){var o={defaultRadius:40,defaultRenderer:"canvas2d",defaultGradient:{.25:"rgb(0,0,255)",.55:"rgb(0,255,0)",.85:"yellow",1:"rgb(255,0,0)"},defaultMaxOpacity:1,defaultMinOpacity:0,defaultBlur:.85,defaultXField:"x",defaultYField:"y",defaultValueField:"value",plugins:{}},A=function(){var E=function(Q){this._coordinator={},this._data=[],this._radi=[],this._min=10,this._max=1,this._xField=Q.xField||Q.defaultXField,this._yField=Q.yField||Q.defaultYField,this._valueField=Q.valueField||Q.defaultValueField,Q.radius&&(this._cfgRadius=Q.radius)},I=o.defaultRadius;return E.prototype={_organiseData:function(w,Q){var M=w[this._xField],B=w[this._yField],T=this._radi,D=this._data,F=this._max,L=this._min,R=w[this._valueField]||1,k=w.radius||this._cfgRadius||I;D[M]||(D[M]=[],T[M]=[]),D[M][B]?D[M][B]+=R:(D[M][B]=R,T[M][B]=k);var U=D[M][B];return U>F?(Q?this.setDataMax(U):this._max=U,!1):U<L?(Q?this.setDataMin(U):this._min=U,!1):{x:M,y:B,value:R,radius:k,min:L,max:F}},_unOrganizeData:function(){var w=[],Q=this._data,M=this._radi;for(var B in Q)for(var T in Q[B])w.push({x:B,y:T,radius:M[B][T],value:Q[B][T]});return{min:this._min,max:this._max,data:w}},_onExtremaChange:function(){this._coordinator.emit("extremachange",{min:this._min,max:this._max})},addData:function(){if(arguments[0].length>0)for(var w=arguments[0],Q=w.length;Q--;)this.addData.call(this,w[Q]);else{var M=this._organiseData(arguments[0],!0);M&&(this._data.length===0&&(this._min=this._max=M.value),this._coordinator.emit("renderpartial",{min:this._min,max:this._max,data:[M]}))}return this},setData:function(w){var Q=w.data,M=Q.length;this._data=[],this._radi=[];for(var B=0;B<M;B++)this._organiseData(Q[B],!1);return this._max=w.max,this._min=w.min||0,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},removeData:function(){},setDataMax:function(w){return this._max=w,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},setDataMin:function(w){return this._min=w,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},setCoordinator:function(w){this._coordinator=w},_getInternalData:function(){return{max:this._max,min:this._min,data:this._data,radi:this._radi}},getData:function(){return this._unOrganizeData()}},E}(),f=function(){var E=function(M){var B=M.gradient||M.defaultGradient,T=document.createElement("canvas"),D=T.getContext("2d");T.width=256,T.height=1;var F=D.createLinearGradient(0,0,256,1);for(var L in B)F.addColorStop(L,B[L]);return D.fillStyle=F,D.fillRect(0,0,256,1),D.getImageData(0,0,256,1).data},I=function(M,B){var T=document.createElement("canvas"),D=T.getContext("2d"),F=M,L=M;if(T.width=T.height=M*2,B==1)D.beginPath(),D.arc(F,L,M,0,2*Math.PI,!1),D.fillStyle="rgba(0,0,0,1)",D.fill();else{var R=D.createRadialGradient(F,L,M*B,F,L,M);R.addColorStop(0,"rgba(0,0,0,1)"),R.addColorStop(1,"rgba(0,0,0,0)"),D.fillStyle=R,D.fillRect(0,0,2*M,2*M)}return T},w=function(L){for(var B=[],T=L.min,D=L.max,F=L.radi,L=L.data,R=Object.keys(L),k=R.length;k--;)for(var U=R[k],V=Object.keys(L[U]),H=V.length;H--;){var q=V[H],ie=L[U][q],Z=F[U][q];B.push({x:U,y:q,value:ie,radius:Z})}return{min:T,max:D,data:B}};function Q(M){var B=M.container,T=this.shadowCanvas=document.createElement("canvas"),D=this.canvas=M.canvas||document.createElement("canvas"),F=this._renderBoundaries=[1e4,1e4,0,0],L=getComputedStyle(M.container)||{};D.className="heatmap-canvas",this._width=D.width=T.width=M.width||+L.width.replace(/px/,""),this._height=D.height=T.height=M.height||+L.height.replace(/px/,""),this.shadowCtx=T.getContext("2d"),this.ctx=D.getContext("2d"),D.style.cssText=T.style.cssText="position:absolute;left:0;top:0;",B.style.position="relative",B.appendChild(D),this._palette=E(M),this._templates={},this._setStyles(M)}return Q.prototype={renderPartial:function(M){M.data.length>0&&(this._drawAlpha(M),this._colorize())},renderAll:function(M){this._clear(),M.data.length>0&&(this._drawAlpha(w(M)),this._colorize())},_updateGradient:function(M){this._palette=E(M)},updateConfig:function(M){M.gradient&&this._updateGradient(M),this._setStyles(M)},setDimensions:function(M,B){this._width=M,this._height=B,this.canvas.width=this.shadowCanvas.width=M,this.canvas.height=this.shadowCanvas.height=B},_clear:function(){this.shadowCtx.clearRect(0,0,this._width,this._height),this.ctx.clearRect(0,0,this._width,this._height)},_setStyles:function(M){this._blur=M.blur==0?0:M.blur||M.defaultBlur,M.backgroundColor&&(this.canvas.style.backgroundColor=M.backgroundColor),this._width=this.canvas.width=this.shadowCanvas.width=M.width||this._width,this._height=this.canvas.height=this.shadowCanvas.height=M.height||this._height,this._opacity=(M.opacity||0)*255,this._maxOpacity=(M.maxOpacity||M.defaultMaxOpacity)*255,this._minOpacity=(M.minOpacity||M.defaultMinOpacity)*255,this._useGradientOpacity=!!M.useGradientOpacity},_drawAlpha:function(D){for(var B=this._min=D.min,T=this._max=D.max,D=D.data||[],F=D.length,L=1-this._blur;F--;){var R=D[F],k=R.x,U=R.y,V=R.radius,H=Math.min(R.value,T),q=k-V,ie=U-V,Z=this.shadowCtx,oe;this._templates[V]?oe=this._templates[V]:this._templates[V]=oe=I(V,L);var ne=(H-B)/(T-B);Z.globalAlpha=ne<.01?.01:ne,Z.drawImage(oe,q,ie),q<this._renderBoundaries[0]&&(this._renderBoundaries[0]=q),ie<this._renderBoundaries[1]&&(this._renderBoundaries[1]=ie),q+2*V>this._renderBoundaries[2]&&(this._renderBoundaries[2]=q+2*V),ie+2*V>this._renderBoundaries[3]&&(this._renderBoundaries[3]=ie+2*V)}},_colorize:function(){var M=this._renderBoundaries[0],B=this._renderBoundaries[1],T=this._renderBoundaries[2]-M,D=this._renderBoundaries[3]-B,F=this._width,L=this._height,R=this._opacity,k=this._maxOpacity,U=this._minOpacity,V=this._useGradientOpacity;M<0&&(M=0),B<0&&(B=0),M+T>F&&(T=F-M),B+D>L&&(D=L-B);for(var H=this.shadowCtx.getImageData(M,B,T,D),q=H.data,ie=q.length,Z=this._palette,oe=3;oe<ie;oe+=4){var ne=q[oe],se=ne*4;if(!!se){var ce;R>0?ce=R:ne<k?ne<U?ce=U:ce=ne:ce=k,q[oe-3]=Z[se],q[oe-2]=Z[se+1],q[oe-1]=Z[se+2],q[oe]=V?Z[se+3]:ce}}H.data=q,this.ctx.putImageData(H,M,B),this._renderBoundaries=[1e3,1e3,0,0]},getValueAt:function(M){var B,T=this.shadowCtx,D=T.getImageData(M.x,M.y,1,1),F=D.data[3],L=this._max,R=this._min;return B=Math.abs(L-R)*(F/255)>>0,B},getDataURL:function(){return this.canvas.toDataURL()}},Q}(),m=function(){var E=!1;return o.defaultRenderer==="canvas2d"&&(E=f),E}(),C={merge:function(){for(var v={},E=arguments.length,I=0;I<E;I++){var w=arguments[I];for(var Q in w)v[Q]=w[Q]}return v}},y=function(){var E=function(){function M(){this.cStore={}}return M.prototype={on:function(B,T,D){var F=this.cStore;F[B]||(F[B]=[]),F[B].push(function(L){return T.call(D,L)})},emit:function(B,T){var D=this.cStore;if(D[B])for(var F=D[B].length,L=0;L<F;L++){var R=D[B][L];R(T)}}},M}(),I=function(Q){var M=Q._renderer,B=Q._coordinator,T=Q._store;B.on("renderpartial",M.renderPartial,M),B.on("renderall",M.renderAll,M),B.on("extremachange",function(D){Q._config.onExtremaChange&&Q._config.onExtremaChange({min:D.min,max:D.max,gradient:Q._config.gradient||Q._config.defaultGradient})}),T.setCoordinator(B)};function w(){var Q=this._config=C.merge(o,arguments[0]||{});if(this._coordinator=new E,Q.plugin){var M=Q.plugin;if(o.plugins[M]){var B=o.plugins[M];this._renderer=new B.renderer(Q),this._store=new B.store(Q)}else throw new Error("Plugin '"+M+"' not found. Maybe it was not registered.")}else this._renderer=new m(Q),this._store=new A(Q);I(this)}return w.prototype={addData:function(){return this._store.addData.apply(this._store,arguments),this},removeData:function(){return this._store.removeData&&this._store.removeData.apply(this._store,arguments),this},setData:function(){return this._store.setData.apply(this._store,arguments),this},setDataMax:function(){return this._store.setDataMax.apply(this._store,arguments),this},setDataMin:function(){return this._store.setDataMin.apply(this._store,arguments),this},configure:function(Q){return this._config=C.merge(this._config,Q),this._renderer.updateConfig(this._config),this._coordinator.emit("renderall",this._store._getInternalData()),this},repaint:function(){return this._coordinator.emit("renderall",this._store._getInternalData()),this},getData:function(){return this._store.getData()},getDataURL:function(){return this._renderer.getDataURL()},getValueAt:function(Q){return this._store.getValueAt?this._store.getValueAt(Q):this._renderer.getValueAt?this._renderer.getValueAt(Q):null}},w}(),x={create:function(v){return new y(v)},register:function(v,E){o.plugins[v]=E}};return x})});var g5e="WebSDK v3.2.4-7",p5e="Cesium v1.99",m5e="2023.10.20",O_t="SmartEarth",U_t={VERSION:g5e,CesiumVERSION:p5e,CompileTime:m5e},G_t=typeof window<"u"?window:typeof self<"u"?self:{};G_t.logSmartEarth=()=>{let o=`
%c${O_t}
%c
\u7248 \u672C \u53F7\uFF1A${g5e}    ${p5e}
\u7F16\u8BD1\u65F6\u95F4\uFF1A${m5e}
    `;setTimeout(console.log.bind(console,o,"color:#018aff;font-size:30px;font-wight:bold;font-family:\u5FAE\u8F6F\u96C5\u9ED1","color:#018aff;font-size:13px;font-family:\u5FAE\u8F6F\u96C5\u9ED1"),0)};var H_t=U_t;var Elt={};f5e(Elt,{AlphaMode:()=>w8,AlphaPipelineStage:()=>hBe,Animation:()=>dwe,AnimationViewModel:()=>fwe,Appearance:()=>Sd,ApproximateTerrainHeights:()=>ZA,ArcGISTiledElevationTerrainProvider:()=>_at,ArcGisMapServerImageryProvider:()=>Xb,ArcType:()=>Pa,ArticulationStageType:()=>b_,AssociativeArray:()=>Vo,AttributeCompression:()=>Mu,AttributeType:()=>Is,AutoExposure:()=>Hbe,AutomaticUniforms:()=>_G,Axis:()=>vp,AxisAlignedBoundingBox:()=>CY,B3dmLoader:()=>v_e,B3dmParser:()=>y_e,Base64Encoder:()=>Lee,BaseLayerPicker:()=>pwe,BaseLayerPickerViewModel:()=>gwe,BatchTable:()=>ure,BatchTableHierarchy:()=>Bne,BatchTexture:()=>Q1,BatchTexturePipelineStage:()=>dBe,Billboard:()=>Zh,BillboardCollection:()=>iI,BillboardGraphics:()=>eP,BillboardVisualizer:()=>eIe,BingMapsApi:()=>Bat,BingMapsGeocoderService:()=>bat,BingMapsImageryProvider:()=>vwe,BingMapsStyle:()=>xwe,BlendEquation:()=>sx,BlendFunction:()=>RA,BlendOption:()=>tf,BlendTexture:()=>q8,BlendingState:()=>Bu,BoundingRectangle:()=>Kr,BoundingSphere:()=>wi,BoundingSphereState:()=>ro,BoxEmitter:()=>_st,BoxGeometry:()=>LM,BoxGeometryUpdater:()=>tIe,BoxGraphics:()=>hre,BoxOutlineGeometry:()=>r2,BrdfLutGenerator:()=>Xwe,Buffer:()=>vo,BufferLoader:()=>qY,BufferUsage:()=>ln,CPUStylingPipelineStage:()=>mBe,CallbackProperty:()=>Bn,Camera:()=>Ml,CameraEventAggregator:()=>$be,CameraEventType:()=>Bc,CameraFlightPath:()=>DEe,Cartesian2:()=>Bt,Cartesian3:()=>ee,Cartesian4:()=>ai,Cartographic:()=>Kt,CartographicGeocoderService:()=>bQe,CatmullRomSpline:()=>Qat,Cesium3DContentGroup:()=>Lne,Cesium3DTile:()=>Ov,Cesium3DTileBatchTable:()=>fJ,Cesium3DTileColorBlendMode:()=>bD,Cesium3DTileContent:()=>Bst,Cesium3DTileContentFactory:()=>Une,Cesium3DTileContentState:()=>FA,Cesium3DTileContentType:()=>Bv,Cesium3DTileFeature:()=>Ds,Cesium3DTileFeatureTable:()=>M6,Cesium3DTileOptimizationHint:()=>ZL,Cesium3DTileOptimizations:()=>Y1e,Cesium3DTilePass:()=>Ep,Cesium3DTilePassState:()=>wP,Cesium3DTilePointFeature:()=>Rk,Cesium3DTileRefine:()=>Ay,Cesium3DTileStyle:()=>gY,Cesium3DTileStyleEngine:()=>j1e,Cesium3DTilesInspector:()=>wDe,Cesium3DTilesInspectorViewModel:()=>BDe,Cesium3DTileset:()=>Fx,Cesium3DTilesetCache:()=>J1e,Cesium3DTilesetGraphics:()=>mre,Cesium3DTilesetHeatmap:()=>W1e,Cesium3DTilesetMetadata:()=>K1e,Cesium3DTilesetMostDetailedTraversal:()=>Gne,Cesium3DTilesetStatistics:()=>Wk,Cesium3DTilesetTraversal:()=>fN,Cesium3DTilesetVisualizer:()=>Z1e,CesiumInspector:()=>QDe,CesiumInspectorViewModel:()=>bDe,CesiumNavigation:()=>PSe,CesiumRenderPass:()=>RSe,CesiumTerrainProvider:()=>MJ,CesiumWidget:()=>JJ,Check:()=>of,CheckerboardMaterialProperty:()=>oie,CircleEmitter:()=>cDe,CircleGeometry:()=>Sat,CircleOutlineGeometry:()=>Dat,CircleWaveMaterialProperty:()=>X8,ClassificationModelDrawCommand:()=>U_e,ClassificationPipelineStage:()=>fBe,ClassificationPrimitive:()=>a6,ClassificationType:()=>Gu,ClearCommand:()=>eA,ClippingPlane:()=>kM,ClippingPlaneCollection:()=>rB,Clock:()=>z5,ClockRange:()=>aC,ClockStep:()=>Jh,ClockViewModel:()=>_Qe,CloudCollection:()=>Mst,CloudType:()=>_ie,CollectionSource:()=>rJe,Color:()=>At,ColorBlendMode:()=>HD,ColorGeometryInstanceAttribute:()=>Yo,ColorMaterialProperty:()=>Fa,Command:()=>gat,ComponentDatatype:()=>ei,Composite3DTileContent:()=>g1e,CompositeEntityCollection:()=>Vot,CompositeMaterialProperty:()=>sie,CompositePositionProperty:()=>U_,CompositeProperty:()=>P1,CompressedTextureBuffer:()=>rY,ComputeCommand:()=>B5,ComputeEngine:()=>Hwe,ConditionsExpression:()=>mve,ConeEmitter:()=>EH,ConicArcSensor:()=>Sie,ConicArcSensorCollection:()=>plt,ConicArcSensorGeometry:()=>Tie,ConicArcSensorGraphics:()=>Qie,ConicArcSensorOutlineGeometry:()=>Mie,ConstantPositionProperty:()=>_D,ConstantProperty:()=>bc,ConstantSpline:()=>b_e,ConstructionWorker:()=>oJe,ContentMetadata:()=>F1e,ContentState:()=>yD,Context:()=>jwe,ContextLimits:()=>Co,CoplanarPolygonGeometry:()=>mIe,CoplanarPolygonGeometryLibrary:()=>OG,CoplanarPolygonOutlineGeometry:()=>eM,CornerType:()=>qA,CorridorGeometry:()=>OY,CorridorGeometryLibrary:()=>Uc,CorridorGeometryUpdater:()=>nIe,CorridorGraphics:()=>dre,CorridorOutlineGeometry:()=>rIe,Credit:()=>tl,CreditDisplay:()=>Zwe,CubeMap:()=>uQ,CubeMapFace:()=>TL,CubicRealPolynomial:()=>mY,CullFace:()=>mA,CullingVolume:()=>AC,CumulusCloud:()=>MQ,CustomDataSource:()=>xre,CustomHeightmapTerrainProvider:()=>Tat,CustomMercatorProjection:()=>e6,CustomShader:()=>ZM,CustomShaderManagerEx:()=>nre,CustomShaderMode:()=>dY,CustomShaderPipelineStage:()=>_Be,CustomShaderTranslucencyMode:()=>wF,CustomTilingScheme:()=>UJe,CylinderGeometry:()=>oIe,CylinderGeometryLibrary:()=>$re,CylinderGeometryUpdater:()=>sIe,CylinderGraphics:()=>fre,CylinderOutlineGeometry:()=>aIe,CzmlDataSource:()=>eW,DDSTexture:()=>JSe,DataSource:()=>cy,DataSourceClock:()=>A5,DataSourceCollection:()=>ZEe,DataSourceDisplay:()=>EJ,DebugAppearance:()=>Nst,DebugCameraPrimitive:()=>_g,DebugInspector:()=>uQe,DebugModelMatrixPrimitive:()=>fDe,DefaultProxy:()=>HEe,DepthFunction:()=>nI,DepthPlane:()=>tbe,DequantizationPipelineStage:()=>BBe,DerivedCommand:()=>fx,DeveloperError:()=>Ui,DeviceOrientationCameraController:()=>ibe,DirectionalLight:()=>Cae,DiscardEmptyTileImagePolicy:()=>noe,DiscardMissingTileImagePolicy:()=>Cwe,DistanceDisplayCondition:()=>$o,DistanceDisplayConditionGeometryInstanceAttribute:()=>xA,DistanceLegendViewModel:()=>_Se,DoubleEndedPriorityQueue:()=>Rat,DoublyLinkedList:()=>Jne,DracoLoader:()=>XY,DrawCommand:()=>On,DynamicGeometryBatch:()=>ene,DynamicGeometryUpdater:()=>vA,ECharts:()=>HJe,EarthOrientationParameters:()=>xCe,EarthOrientationParametersSample:()=>oY,EasingFunction:()=>Ix,EllipseGeometry:()=>W1,EllipseGeometryLibrary:()=>iB,EllipseGeometryUpdater:()=>lIe,EllipseGraphics:()=>gre,EllipseOutlineGeometry:()=>UD,Ellipsoid:()=>Ti,EllipsoidGeodesic:()=>l0,EllipsoidGeometry:()=>gC,EllipsoidGeometryUpdater:()=>hIe,EllipsoidGraphics:()=>l6,EllipsoidOutlineGeometry:()=>J1,EllipsoidPrimitive:()=>Gwe,EllipsoidRhumbLine:()=>k1,EllipsoidSurfaceAppearance:()=>DY,EllipsoidTangentPlane:()=>tQ,EllipsoidTerrainProvider:()=>IP,EllipsoidalOccluder:()=>L5,Empty3DTileContent:()=>PK,EncodedCartesian3:()=>Pu,Entity:()=>kA,EntityCluster:()=>tN,EntityCollection:()=>iw,EntityView:()=>qne,Event:()=>br,EventHelper:()=>Mx,ExpandBySmartEarth:()=>UE,ExpandByTerra:()=>VJe,Expression:()=>bF,ExpressionNodeType:()=>jn,ExternalParameter:()=>px,ExtrapolationType:()=>mD,FeatureDataProvider:()=>Rre,FeatureDetection:()=>Mo,FeatureIdPipelineStage:()=>AJ,FeatureJsonData:()=>p6,FisheyeProjectionMap:()=>LY,FisheyeProjectionMapShader:()=>p7,FlattenVS:()=>Y_e,FlowEcharts:()=>cae,Fog:()=>rbe,ForEach:()=>Vr,FrameRateMonitor:()=>gDe,FrameState:()=>nbe,Framebuffer:()=>Bp,FramebufferManager:()=>Wh,FrustumCommands:()=>ube,FrustumGeometry:()=>m6,FrustumOutlineGeometry:()=>RY,Fullscreen:()=>yp,FullscreenButton:()=>wQe,FullscreenButtonViewModel:()=>BQe,GWBaiduImageryProvider:()=>Hre,GeoJsonDataSource:()=>gK,GeoJsonLoader:()=>__e,GeocodeType:()=>jJ,Geocoder:()=>MQe,GeocoderService:()=>Fat,GeocoderViewModel:()=>TQe,GeographicProjection:()=>Dg,GeographicTilingScheme:()=>af,Geometry:()=>Zo,Geometry3DTileContent:()=>p1e,GeometryAttribute:()=>Yr,GeometryAttributes:()=>yc,GeometryFactory:()=>kat,GeometryInstance:()=>co,GeometryInstanceAttribute:()=>k_,GeometryOffsetAttribute:()=>Cl,GeometryPipeline:()=>rc,GeometryPipelineStage:()=>QBe,GeometryType:()=>HL,GeometryUpdater:()=>th,GeometryVisualizer:()=>PIe,GetFeatureInfoFormat:()=>S7,GifImageProperty:()=>rXe,Globe:()=>Coe,GlobeDepth:()=>cbe,GlobeSurfaceShaderSet:()=>Mwe,GlobeSurfaceTile:()=>zM,GlobeSurfaceTileProvider:()=>Lwe,GlobeTranslucency:()=>PJ,GlobeTranslucencyFramebuffer:()=>Abe,GlobeTranslucencyState:()=>abe,GltfBufferViewLoader:()=>une,GltfDracoLoader:()=>cne,GltfImageLoader:()=>hne,GltfIndexBufferLoader:()=>dne,GltfJsonLoader:()=>pne,GltfLoader:()=>nJ,GltfLoaderUtil:()=>OM,GltfStructuralMetadataLoader:()=>c_e,GltfTextureLoader:()=>mne,GltfVertexBufferLoader:()=>Cne,GoogleEarthEnterpriseImageryProvider:()=>kst,GoogleEarthEnterpriseMapsProvider:()=>Iwe,GoogleEarthEnterpriseMetadata:()=>IN,GoogleEarthEnterpriseTerrainData:()=>yie,GoogleEarthEnterpriseTerrainProvider:()=>zat,GoogleEarthEnterpriseTileInformation:()=>GSe,GpxDataSource:()=>fSe,Graticules:()=>oXe,GraticulesImageryProvider:()=>m5,GregorianDate:()=>Z8,GridImageryProvider:()=>Ost,GridMaterialProperty:()=>lie,GroundGeometryUpdater:()=>Xl,GroundPolylineGeometry:()=>are,GroundPolylinePrimitive:()=>o6,GroundPrimitive:()=>oN,GroupMetadata:()=>Fte,GwBufferAnalysis:()=>Vre,HeadingPitchRange:()=>Ex,HeadingPitchRoll:()=>dC,Heap:()=>Fme,HeightReference:()=>xn,HeightmapEncoding:()=>VF,HeightmapTerrainData:()=>bQ,HeightmapTessellator:()=>toe,HermitePolynomialApproximation:()=>eSe,HermiteSpline:()=>QK,HilbertOrder:()=>Tte,HomeButton:()=>RQe,HomeButtonViewModel:()=>PQe,HorizontalOrigin:()=>tA,HugeAdapter:()=>k6,I3SDataProvider:()=>Ust,I3SFeature:()=>CDe,I3SField:()=>yDe,I3SGeometry:()=>Bie,I3SLayer:()=>bie,I3SNode:()=>wie,I3dmLoader:()=>w_e,I3dmParser:()=>B_e,Iau2000Orientation:()=>kwe,Iau2006XysData:()=>ECe,Iau2006XysSample:()=>Jie,IauOrientationAxes:()=>Owe,IauOrientationParameters:()=>Nwe,ImageBasedLighting:()=>_ne,ImageBasedLightingPipelineStage:()=>q_e,ImageCombine:()=>tre,ImageMaterialProperty:()=>V0,Imagery:()=>Xne,ImageryLayer:()=>dD,ImageryLayerCollection:()=>Fwe,ImageryLayerFeatureInfo:()=>pN,ImageryProvider:()=>a2,ImageryState:()=>sc,Implicit3DTileContent:()=>Lte,ImplicitAvailabilityBitstream:()=>Pte,ImplicitMetadataView:()=>Nne,ImplicitSubdivisionScheme:()=>uC,ImplicitSubtree:()=>v1e,ImplicitSubtreeMetadata:()=>x1e,ImplicitTileCoordinates:()=>X1e,ImplicitTileset:()=>q1e,IndexDatatype:()=>Nn,InfoBox:()=>NQe,InfoBoxViewModel:()=>FQe,InspectorShared:()=>z8,InstanceAttributeSemantic:()=>nC,InstancingPipelineStage:()=>sBe,InterpolationAlgorithm:()=>Kat,InterpolationType:()=>oF,Intersect:()=>La,IntersectionTests:()=>Xh,Intersections2D:()=>Z6,Interval:()=>fD,InvertClassification:()=>_oe,Ion:()=>xF,IonGeocoderService:()=>DQe,IonImageryProvider:()=>JG,IonResource:()=>jk,IonWorldImageryStyle:()=>WG,Iso8601:()=>Cn,JobScheduler:()=>sbe,JobType:()=>KE,JsonMetadataTable:()=>KY,JulianDate:()=>fi,KTX2Transcoder:()=>Ome,KeyboardEventModifier:()=>eI,KmlCamera:()=>Xve,KmlDataSource:()=>Pre,KmlLookAt:()=>Zve,KmlTour:()=>$ve,KmlTourFlyTo:()=>eEe,KmlTourWait:()=>iEe,Label:()=>V7,LabelCollection:()=>qM,LabelGraphics:()=>u6,LabelStyle:()=>pA,LabelVisualizer:()=>RIe,LagrangePolynomialApproximation:()=>iSe,LeapSecond:()=>$c,Light:()=>Hst,LightingModel:()=>rI,LightingPipelineStage:()=>DBe,LinearApproximation:()=>Qre,LinearSampler:()=>s2,LinearSpline:()=>cJ,MVTImageryProvider:()=>dXe,ManagedArray:()=>GM,MapMode2D:()=>nQ,MapProjection:()=>jat,MapWidget:()=>clt,MapboxApi:()=>Wat,MapboxImageryProvider:()=>bJ,MapboxStyleImageryProvider:()=>zst,Material:()=>as,MaterialAppearance:()=>Ig,MaterialPass:()=>jSe,MaterialPipelineStage:()=>MBe,MaterialProperty:()=>sC,Math:()=>je,Matrix2:()=>n0,Matrix3:()=>ci,Matrix4:()=>Xe,MetadataClass:()=>Q6,MetadataClassProperty:()=>WY,MetadataComponentType:()=>$s,MetadataEntity:()=>su,MetadataEnum:()=>s_e,MetadataEnumValue:()=>a_e,MetadataPipelineStage:()=>IM,MetadataSchema:()=>rO,MetadataSchemaLoader:()=>yne,MetadataSemantic:()=>E1e,MetadataTable:()=>tO,MetadataTableProperty:()=>GIe,MetadataType:()=>Zs,MipmapHint:()=>j8,Model:()=>cI,Model3DTileContent:()=>NL,ModelAlphaOptions:()=>qBe,ModelAnimation:()=>P_e,ModelAnimationChannel:()=>T_e,ModelAnimationCollection:()=>R_e,ModelAnimationLoop:()=>Gb,ModelAnimationState:()=>UL,ModelArticulation:()=>$_e,ModelArticulationStage:()=>Z_e,ModelClippingPlanesPipelineStage:()=>iBe,ModelColorPipelineStage:()=>SK,ModelComponents:()=>ta,ModelDrawCommand:()=>G_e,ModelFeature:()=>L_e,ModelFeatureTable:()=>F_e,ModelGraphics:()=>xY,ModelLightingOptions:()=>u1e,ModelMatrixUpdateStage:()=>uBe,ModelNode:()=>rBe,ModelRenderResources:()=>i1e,ModelRuntimeNode:()=>ABe,ModelRuntimePrimitive:()=>JBe,ModelSceneGraph:()=>A1e,ModelSilhouettePipelineStage:()=>o1e,ModelSkin:()=>jBe,ModelSplitterPipelineStage:()=>s1e,ModelStatistics:()=>h1e,ModelType:()=>z0,ModelUtility:()=>au,ModelVisualizer:()=>f1e,Moon:()=>xoe,MorphTargetsPipelineStage:()=>RBe,MorphWeightSpline:()=>qat,MortonOrder:()=>S8,MultiResourceImageryProvider:()=>zre,MultiResourceTerrainProvider:()=>Kre,Multiple3DTileContent:()=>G1e,MultisampleFramebuffer:()=>m_e,NavigationControl:()=>AH,NavigationHelpButton:()=>OQe,NavigationHelpButtonViewModel:()=>kQe,NavigationUtils:()=>hH,NavigationViewModel:()=>R7,NearFarScalar:()=>To,NeverTileDiscardPolicy:()=>Kst,NodeRenderResources:()=>l1e,NodeStatisticsPipelineStage:()=>cBe,NodeTransformationProperty:()=>pre,OIT:()=>gbe,Occluder:()=>Gre,OctahedralProjectedCubeMap:()=>b5,OffsetGeometryInstanceAttribute:()=>a0,OlMVTImageryProvider:()=>Jre,OpenCageGeocoderService:()=>Xat,OpenStreetMapImageryProvider:()=>D7,OrderedGroundPrimitiveCollection:()=>$Ee,OrientedBoundingBox:()=>Hf,OrthographicFrustum:()=>Ss,OrthographicOffCenterFrustum:()=>K0,Packable:()=>Zat,PackableForInterpolation:()=>$at,Particle:()=>yae,ParticleBurst:()=>BH,ParticleEmitter:()=>Wst,ParticleSystem:()=>_2,Pass:()=>hr,PassState:()=>cm,PathGraphics:()=>vY,PathVisualizer:()=>$1e,PeliasGeocoderService:()=>SQe,PerInstanceColorAppearance:()=>Va,PerformanceDisplay:()=>OJ,PerformanceWatchdog:()=>MDe,PerformanceWatchdogViewModel:()=>TDe,PerspectiveFrustum:()=>Yu,PerspectiveOffCenterFrustum:()=>n2,PerspectiveProjectionMap:()=>FY,PerspectiveProjectionMapShader:()=>m7,PerspectiveProjectionMapWithDepth:()=>NY,PerspectiveProjectionMapWithDepthShader:()=>nF,PickDepth:()=>lbe,PickDepthFramebuffer:()=>pbe,PickFramebuffer:()=>mbe,PickGlobeSlope:()=>Bot,Picking:()=>Ibe,PickingPipelineStage:()=>LBe,PinBuilder:()=>BY,PixelDatatype:()=>Qn,PixelFormat:()=>Gn,Plane:()=>Ja,PlaneGeometry:()=>dIe,PlaneGeometryUpdater:()=>pIe,PlaneGraphics:()=>Ove,PlaneOutlineGeometry:()=>fIe,PntsLoader:()=>d1e,PntsParser:()=>Rne,PointCloud:()=>uwe,PointCloudEyeDomeLighting:()=>aJ,PointCloudShading:()=>T6,PointCloudStylingPipelineStage:()=>NBe,PointGraphics:()=>Cre,PointPrimitive:()=>Tx,PointPrimitiveCollection:()=>sY,PointVisualizer:()=>ewe,PolygonDepth:()=>b8,PolygonDepthFS:()=>Sne,PolygonDepthVS:()=>Dne,PolygonGeometry:()=>eh,PolygonGeometryLibrary:()=>ql,PolygonGeometryUpdater:()=>yIe,PolygonGraphics:()=>yl,PolygonHierarchy:()=>Un,PolygonOutlineGeometry:()=>CIe,PolygonPipeline:()=>yA,Polyline:()=>t2,PolylineArrowMaterialProperty:()=>vK,PolylineCollection:()=>Y5,PolylineColorAppearance:()=>ly,PolylineDashMaterialProperty:()=>Vl,PolylineGeometry:()=>Vk,PolylineGeometryUpdater:()=>twe,PolylineGlowMaterialProperty:()=>uie,PolylineGraphics:()=>FD,PolylineMaterialAppearance:()=>L_,PolylineOutlineMaterialProperty:()=>JM,PolylinePipeline:()=>jA,PolylineTrailLinkMaterialProperty:()=>wot,PolylineVisualizer:()=>rwe,PolylineVolumeGeometry:()=>xIe,PolylineVolumeGeometryLibrary:()=>C5,PolylineVolumeGeometryUpdater:()=>EIe,PolylineVolumeGraphics:()=>yre,PolylineVolumeOutlineGeometry:()=>vIe,PositionProperty:()=>yY,PositionPropertyArray:()=>d8,PostProcessStage:()=>va,PostProcessStageCollection:()=>jbe,PostProcessStageComposite:()=>CC,PostProcessStageLibrary:()=>bv,PostProcessStageSampleMode:()=>Dv,PostProcessStageTextureCache:()=>Toe,Primitive:()=>Xa,PrimitiveCollection:()=>MD,PrimitiveLoadPlan:()=>rJ,PrimitiveOutlineGenerator:()=>Ene,PrimitiveOutlinePipelineStage:()=>UBe,PrimitivePipeline:()=>s5,PrimitiveRenderResources:()=>c1e,PrimitiveState:()=>i0,PrimitiveStatisticsPipelineStage:()=>GBe,PrimitiveType:()=>yn,ProjectionPicker:()=>GQe,ProjectionPickerViewModel:()=>UQe,Property:()=>Nt,PropertyArray:()=>oae,PropertyAttribute:()=>lne,PropertyAttributeProperty:()=>kIe,PropertyBag:()=>LD,PropertyTable:()=>AN,PropertyTexture:()=>sne,PropertyTextureProperty:()=>FIe,ProviderViewModel:()=>fp,Proxy:()=>ist,QuadraticRealPolynomial:()=>zb,QuadtreeOccluders:()=>foe,QuadtreePrimitive:()=>BP,QuadtreePrimitivezh:()=>Sot,QuadtreeTile:()=>goe,QuadtreeTileLoadState:()=>mC,QuadtreeTileProvider:()=>jst,QuantizedMeshTerrainData:()=>coe,QuarticRealPolynomial:()=>Eve,Quaternion:()=>jr,QuaternionSpline:()=>S_e,Queue:()=>d5,RasterizeHtml:()=>sH,Ray:()=>ss,Rectangle:()=>Si,RectangleCollisionChecker:()=>nne,RectangleGeometry:()=>GY,RectangleGeometryLibrary:()=>uy,RectangleGeometryUpdater:()=>QIe,RectangleGraphics:()=>c6,RectangleOutlineGeometry:()=>ine,RectangularSensor:()=>jK,RectangularSensorFS:()=>xie,RectangularSensorGraphics:()=>mlt,RectangularSensorPrimitive:()=>KSe,RectangularSensorScanPlaneFS:()=>zSe,RectangularSensorVS:()=>gae,RectangularSensorVisualizer:()=>YSe,ReferenceFrame:()=>s0,ReferenceProperty:()=>QY,RenderEntity:()=>aW,RenderObjectFactory:()=>Vc,RenderState:()=>fn,Renderbuffer:()=>G_,RenderbufferFormat:()=>qE,Request:()=>cC,RequestErrorEvent:()=>r5,RequestScheduler:()=>V1,RequestState:()=>CA,RequestType:()=>oB,ResetViewNavigationControl:()=>bSe,Resource:()=>An,ResourceCache:()=>sf,ResourceCacheKey:()=>nw,ResourceCacheStatistics:()=>u_e,ResourceLoader:()=>fy,ResourceLoaderState:()=>ha,Rotation:()=>YD,RuntimeError:()=>nr,S2Cell:()=>zG,S3MCacheFileRenderEntity:()=>Iie,S3MCompressType:()=>Clt,S3MContentFactory:()=>iDe,S3MContentParser:()=>rDe,S3MCreateIndexJob:()=>tDe,S3MCreateVertexJob:()=>$Se,S3MDataSource:()=>Pot,S3MLayerCache:()=>nDe,S3MLayerScheduler:()=>oDe,S3MPixelFormat:()=>ylt,S3MTile:()=>sDe,S3MTilesFS:()=>XSe,S3MTilesLayer:()=>pae,S3MTilesVS:()=>qSe,S3ModelParser:()=>aDe,SDFSettings:()=>Qv,SampledPositionProperty:()=>R1,SampledProperty:()=>uM,Sampler:()=>Hs,ScaledPositionProperty:()=>f6,Scene:()=>Loe,SceneFramebuffer:()=>woe,SceneMode:()=>xi,SceneMode2DPipelineStage:()=>HBe,SceneModePicker:()=>VQe,SceneModePickerViewModel:()=>HQe,SceneTransforms:()=>Qs,SceneTransitioner:()=>Zbe,ScreenSpaceCameraController:()=>oQe,ScreenSpaceEventHandler:()=>Ur,ScreenSpaceEventType:()=>Ki,SelectedFeatureIdPipelineStage:()=>DK,SelectionIndicator:()=>KQe,SelectionIndicatorViewModel:()=>zQe,Sensor:()=>hst,ShaderBuilder:()=>t1e,ShaderCache:()=>zwe,ShaderDestination:()=>Sr,ShaderFunction:()=>e1e,ShaderProgram:()=>_s,ShaderSource:()=>Fr,ShaderStruct:()=>ZBe,ShadowMap:()=>vQ,ShadowMapShader:()=>pF,ShadowMode:()=>Al,ShadowVolumeAppearance:()=>gM,ShowGeometryInstanceAttribute:()=>wu,Simon1994PlanetaryPositions:()=>kK,SimplePolylineGeometry:()=>rst,SingleTileImageryProvider:()=>QQ,SkinningPipelineStage:()=>zBe,SkyAtmosphere:()=>aH,SkyBox:()=>CN,SphereEmitter:()=>wH,SphereGeometry:()=>nst,SphereOutlineGeometry:()=>tP,Spherical:()=>rSe,Spline:()=>uf,SplitDirection:()=>uI,Splitter:()=>eoe,SpotLight:()=>Lot,StaticGeometryColorBatch:()=>AM,StaticGeometryPerMaterialBatch:()=>hM,StaticGroundGeometryColorBatch:()=>Ete,StaticGroundGeometryPerMaterialBatch:()=>SIe,StaticGroundPolylinePerMaterialBatch:()=>iwe,StaticOutlineGeometryBatch:()=>Ite,StencilConstants:()=>ca,StencilFunction:()=>Ku,StencilOperation:()=>lo,SteppedSpline:()=>Q_e,StripeMaterialProperty:()=>cie,StripeOrientation:()=>qF,StructuralMetadata:()=>nP,StyleCommandsNeeded:()=>Q5,StyleExpression:()=>qst,Sun:()=>Noe,SunLight:()=>tH,SunPostProcess:()=>lQe,SupportedImageFormats:()=>A_e,SvgPathBindingHandler:()=>hwe,TaskProcessor:()=>Vf,TerrainData:()=>AO,TerrainEncoding:()=>HM,TerrainExaggeration:()=>ID,TerrainFillMesh:()=>hoe,TerrainFlatten:()=>vN,TerrainFlattenPolygonTexture:()=>vSe,TerrainMesh:()=>hO,TerrainOffsetProperty:()=>Zre,TerrainProvider:()=>Cx,TerrainQuantization:()=>Pv,TerrainState:()=>mh,Texture:()=>yo,TextureAtlas:()=>H7,TextureCache:()=>Kwe,TextureMagnificationFilter:()=>Ch,TextureManager:()=>gve,TextureMinificationFilter:()=>fs,TextureUniform:()=>dve,TextureWrap:()=>Za,TileAvailability:()=>$L,TileBoundingRegion:()=>S5,TileBoundingS2Cell:()=>H1e,TileBoundingSphere:()=>yP,TileBoundingVolume:()=>Xst,TileCoordinatesImageryProvider:()=>IDe,TileDiscardPolicy:()=>Zst,TileEdge:()=>Ga,TileImagery:()=>Zne,TileMapServiceImageryProvider:()=>_P,TileMetadata:()=>k1e,TileOrientedBoundingBox:()=>kF,TileProviderError:()=>wc,TileReplacementQueue:()=>moe,TileSelectionResult:()=>sa,TileState:()=>$st,Tileset3DTileContent:()=>_1e,TilesetMetadata:()=>z1e,TilesetPipelineStage:()=>W_e,TilingScheme:()=>ost,TimeConstants:()=>Uu,TimeDynamicImagery:()=>loe,TimeDynamicPointCloud:()=>K6,TimeInterval:()=>el,TimeIntervalCollection:()=>mx,TimeIntervalCollectionPositionProperty:()=>D8,TimeIntervalCollectionProperty:()=>f8,TimeStandard:()=>nu,Timeline:()=>WQe,TimelineHighlightRange:()=>YQe,TimelineTrack:()=>JQe,Tipsify:()=>Mve,ToggleButtonViewModel:()=>xG,Tonemapper:()=>XG,Transforms:()=>zn,TranslationRotationScale:()=>aB,TranslucentTileClassification:()=>ybe,TridiagonalSystemSolver:()=>wne,TrustedServers:()=>Uie,TweenCollection:()=>Poe,UniformState:()=>Ywe,UniformType:()=>pa,UrlTemplateGeojsonProvider:()=>kot,UrlTemplateImageryProvider:()=>sw,UserInterfaceControl:()=>hae,Utils:()=>fQ,VERSION:()=>vlt,VRButton:()=>qQe,VRButtonViewModel:()=>jQe,VRTheWorldTerrainProvider:()=>lst,VaryingType:()=>xx,Vector3DTileBatch:()=>Q8,Vector3DTileClampedPolylines:()=>D1e,Vector3DTileContent:()=>P1e,Vector3DTileGeometry:()=>Bk,Vector3DTilePoints:()=>B1e,Vector3DTilePolygons:()=>w1e,Vector3DTilePolylines:()=>One,Vector3DTilePrimitive:()=>Fne,VelocityOrientationProperty:()=>nSe,VelocityVectorProperty:()=>aae,VertexArray:()=>Hc,VertexArrayFacade:()=>aY,VertexAttributeSemantic:()=>Fo,VertexCompressOption:()=>_1,VertexFormat:()=>Wr,VerticalOrigin:()=>wn,VideoSynchronizer:()=>ast,View:()=>Qoe,ViewShed:()=>Het,ViewShedMap:()=>nH,ViewShedMapShader:()=>EF,Viewer:()=>XJ,ViewportQuad:()=>elt,Visibility:()=>vg,Visualizer:()=>lat,VulkanConstants:()=>ust,WallGeometry:()=>DIe,WallGeometryLibrary:()=>one,WallGeometryUpdater:()=>MIe,WallGraphics:()=>EY,WallOutlineGeometry:()=>TIe,WaterFS:()=>TY,WaterMaterialProperty:()=>Oot,WebGLConstants:()=>Ii,WebMapServiceImageryProvider:()=>DJ,WebMapTileServiceImageryProvider:()=>X6,WebMercatorProjection:()=>NA,WebMercatorTilingScheme:()=>Am,WindingOrder:()=>Z_,WireframeIndexGenerator:()=>Mne,WireframePipelineStage:()=>YBe,ZoomNavigationControl:()=>fie,_shadersAcesTonemappingStage:()=>_be,_shadersAdditiveBlend:()=>aQe,_shadersAdjustTranslucentFS:()=>Wte,_shadersAllMaterialAppearanceFS:()=>mEe,_shadersAllMaterialAppearanceVS:()=>CEe,_shadersAmbientOcclusionGenerate:()=>Bbe,_shadersAmbientOcclusionModulate:()=>wbe,_shadersAspectRampMaterial:()=>Gme,_shadersAtmosphereCommon:()=>R8,_shadersBasicMaterialAppearanceFS:()=>yEe,_shadersBasicMaterialAppearanceVS:()=>xEe,_shadersBillboardCollectionFS:()=>Xxe,_shadersBillboardCollectionVS:()=>Zxe,_shadersBlackAndWhite:()=>bbe,_shadersBloomComposite:()=>Qbe,_shadersBrdfLutGeneratorFS:()=>qwe,_shadersBrightPass:()=>sQe,_shadersBrightness:()=>Sbe,_shadersBumpMapMaterial:()=>Hme,_shadersCPUStylingStageFS:()=>pBe,_shadersCPUStylingStageVS:()=>gBe,_shadersCheckFloatTexturePrecisionFS:()=>dat,_shadersCheckerboardMaterial:()=>Vme,_shadersCloudCollectionFS:()=>gSe,_shadersCloudCollectionVS:()=>pSe,_shadersCloudNoiseFS:()=>mSe,_shadersCloudNoiseVS:()=>CSe,_shadersCompareAndPackTranslucentDepth:()=>Cbe,_shadersCompositeOITFS:()=>hbe,_shadersCompositeTranslucentClassification:()=>T7,_shadersContrastBias:()=>Dbe,_shadersCustomShaderStageFS:()=>yBe,_shadersCustomShaderStageVS:()=>CBe,_shadersCzmBuiltins:()=>a7,_shadersDepthOfField:()=>Tbe,_shadersDepthPlaneFS:()=>$we,_shadersDepthPlaneVS:()=>ebe,_shadersDepthView:()=>Mbe,_shadersDepthViewPacked:()=>rlt,_shadersDotMaterial:()=>zme,_shadersEdgeDetection:()=>Pbe,_shadersElevationBandMaterial:()=>Kme,_shadersElevationContourMaterial:()=>Yme,_shadersElevationRampMaterial:()=>Jme,_shadersEllipsoidFS:()=>Yte,_shadersEllipsoidSurfaceAppearanceFS:()=>IEe,_shadersEllipsoidSurfaceAppearanceVS:()=>_Ee,_shadersEllipsoidVS:()=>Jte,_shadersFXAA:()=>Lbe,_shadersFXAA3_11:()=>Gbe,_shadersFadeMaterial:()=>Wme,_shadersFeatureIdStageFS:()=>xBe,_shadersFeatureIdStageVS:()=>vBe,_shadersFilmicTonemapping:()=>Rbe,_shadersGaussianBlur1D:()=>GK,_shadersGaussianBlur1DSun:()=>zbe,_shadersGeometryStageFS:()=>wBe,_shadersGeometryStageVS:()=>bBe,_shadersGlobeFS:()=>Swe,_shadersGlobeVS:()=>Dwe,_shadersGridMaterial:()=>jme,_shadersGroundAtmosphere:()=>Vte,_shadersHSBToRGB:()=>qye,_shadersHSLToRGB:()=>Xye,_shadersImageBasedLightingStageFS:()=>j_e,_shadersInstancingStageCommon:()=>nBe,_shadersInstancingStageVS:()=>oBe,_shadersLegacyInstancingStageVS:()=>aBe,_shadersLensFlare:()=>Fbe,_shadersLightingStageFS:()=>SBe,_shadersMaterialStageFS:()=>TBe,_shadersMetadataStageFS:()=>EBe,_shadersMetadataStageVS:()=>IBe,_shadersModelClippingPlanesStageFS:()=>tBe,_shadersModelColorStageFS:()=>eBe,_shadersModelFS:()=>N_e,_shadersModelSilhouetteStageFS:()=>r1e,_shadersModelSilhouetteStageVS:()=>n1e,_shadersModelSplitterStageFS:()=>a1e,_shadersModelVS:()=>k_e,_shadersModifiedReinhardTonemapping:()=>Nbe,_shadersMorphTargetsStageVS:()=>PBe,_shadersNightVision:()=>kbe,_shadersNormalMapMaterial:()=>qme,_shadersOctahedralProjectionAtlasFS:()=>d_e,_shadersOctahedralProjectionFS:()=>f_e,_shadersOctahedralProjectionVS:()=>g_e,_shadersPassThrough:()=>KM,_shadersPassThroughDepth:()=>UK,_shadersPerInstanceColorAppearanceFS:()=>Fve,_shadersPerInstanceColorAppearanceVS:()=>Nve,_shadersPerInstanceFlatColorAppearanceFS:()=>sre,_shadersPerInstanceFlatColorAppearanceVS:()=>kve,_shadersPointCloudEyeDomeLighting:()=>C_e,_shadersPointCloudStylingStageVS:()=>FBe,_shadersPointPrimitiveCollectionFS:()=>uG,_shadersPointPrimitiveCollectionVS:()=>tve,_shadersPolylineArrowMaterial:()=>Xme,_shadersPolylineColorAppearanceVS:()=>Qve,_shadersPolylineCommon:()=>U5,_shadersPolylineDashMaterial:()=>Zme,_shadersPolylineFS:()=>lre,_shadersPolylineGlowMaterial:()=>$me,_shadersPolylineMaterialAppearanceVS:()=>Sve,_shadersPolylineOutlineMaterial:()=>eCe,_shadersPolylineShadowVolumeFS:()=>_ve,_shadersPolylineShadowVolumeMorphFS:()=>Bve,_shadersPolylineShadowVolumeMorphVS:()=>wve,_shadersPolylineShadowVolumeVS:()=>bve,_shadersPolylineVS:()=>BEe,_shadersPostProcessRain:()=>nlt,_shadersPostProcessSnow:()=>olt,_shadersPrimitiveOutlineStageFS:()=>OBe,_shadersPrimitiveOutlineStageVS:()=>kBe,_shadersRGBToHSB:()=>Ixe,_shadersRGBToHSL:()=>_xe,_shadersRGBToXYZ:()=>Bxe,_shadersReinhardTonemapping:()=>Obe,_shadersReprojectWebMercatorFS:()=>owe,_shadersReprojectWebMercatorVS:()=>awe,_shadersRimLightingMaterial:()=>tCe,_shadersSelectedFeatureIdStageCommon:()=>Qte,_shadersShadowVolumeAppearanceFS:()=>Are,_shadersShadowVolumeAppearanceVS:()=>Lve,_shadersShadowVolumeFS:()=>q7,_shadersSilhouette:()=>Ube,_shadersSkinningStageVS:()=>VBe,_shadersSkyAtmosphereCommon:()=>$te,_shadersSkyAtmosphereFS:()=>pQe,_shadersSkyAtmosphereVS:()=>mQe,_shadersSkyBoxFS:()=>yQe,_shadersSkyBoxVS:()=>xQe,_shadersSlopeRampMaterial:()=>iCe,_shadersStripeMaterial:()=>rCe,_shadersSunFS:()=>vQe,_shadersSunShaft:()=>alt,_shadersSunShaftHdr:()=>slt,_shadersSunShaftModulate:()=>Vbe,_shadersSunTextureFS:()=>fat,_shadersSunTextureFS_v2:()=>IQe,_shadersSunVS:()=>EQe,_shadersSunVisibleFS:()=>Kbe,_shadersSunVisibleShaft:()=>Ybe,_shadersSunVisibleVS:()=>K_e,_shadersTexturedMaterialAppearanceFS:()=>vEe,_shadersTexturedMaterialAppearanceVS:()=>EEe,_shadersVector3DTileClampedPolylinesFS:()=>S1e,_shadersVector3DTileClampedPolylinesVS:()=>Q1e,_shadersVector3DTilePolylinesVS:()=>b1e,_shadersVectorTileVS:()=>Dte,_shadersViewportQuadFS:()=>ySe,_shadersViewportQuadVS:()=>voe,_shadersWater:()=>nCe,_shadersXYZToRGB:()=>Wxe,_shadersacesTonemapping:()=>xye,_shadersalphaWeight:()=>vye,_shadersantialias:()=>Eye,_shadersapproximateSphericalCoordinates:()=>Iye,_shadersbackFacing:()=>_ye,_shadersbranchFreeTernary:()=>Bye,_shaderscascadeColor:()=>wye,_shaderscascadeDistance:()=>bye,_shaderscascadeMatrix:()=>Qye,_shaderscascadeWeights:()=>Sye,_shaderscolumbusViewMorph:()=>Dye,_shaderscomputePosition:()=>Tye,_shaderscosineAndSine:()=>Mye,_shadersdecompressTextureCoordinates:()=>Pye,_shadersdefaultPbrMaterial:()=>Rye,_shadersdegreesPerRadian:()=>QCe,_shadersdepthClamp:()=>Lye,_shadersdepthRange:()=>SCe,_shadersdepthRangeStruct:()=>Aye,_shaderseastNorthUpToEyeCoordinates:()=>Fye,_shadersellipsoidContainsPoint:()=>Nye,_shadersellipsoidWgs84TextureCoordinates:()=>kye,_shadersepsilon1:()=>DCe,_shadersepsilon2:()=>TCe,_shadersepsilon3:()=>MCe,_shadersepsilon4:()=>PCe,_shadersepsilon5:()=>RCe,_shadersepsilon6:()=>LCe,_shadersepsilon7:()=>FCe,_shadersequalsEpsilon:()=>Oye,_shaderseyeOffset:()=>Uye,_shaderseyeToWindowCoordinates:()=>Gye,_shadersfastApproximateAtan:()=>Hye,_shadersfog:()=>Vye,_shadersgammaCorrect:()=>zye,_shadersgeodeticSurfaceNormal:()=>Kye,_shadersgetDefaultMaterial:()=>Yye,_shadersgetLambertDiffuse:()=>Jye,_shadersgetSpecular:()=>Wye,_shadersgetWaterNoise:()=>jye,_shadershue:()=>Zye,_shadersinfinity:()=>NCe,_shadersinverseGamma:()=>$ye,_shadersisEmpty:()=>exe,_shadersisFull:()=>txe,_shaderslatitudeToWebMercatorFraction:()=>ixe,_shaderslineDistance:()=>nxe,_shaderslinearToSrgb:()=>rxe,_shadersluminance:()=>oxe,_shadersmaterial:()=>hye,_shadersmaterialInput:()=>dye,_shadersmetersPerPixel:()=>axe,_shadersmodelMaterial:()=>fye,_shadersmodelToWindowCoordinates:()=>sxe,_shadersmodelVertexOutput:()=>gye,_shadersmultiplyWithColorBalance:()=>lxe,_shadersnearFarScalar:()=>uxe,_shadersoctDecode:()=>cxe,_shadersoneOverPi:()=>kCe,_shadersoneOverTwoPi:()=>OCe,_shaderspackDepth:()=>Axe,_shaderspassCesium3DTile:()=>UCe,_shaderspassCesium3DTileClassification:()=>GCe,_shaderspassCesium3DTileClassificationIgnoreShow:()=>HCe,_shaderspassClassification:()=>VCe,_shaderspassCompute:()=>zCe,_shaderspassEnvironment:()=>KCe,_shaderspassGlobe:()=>YCe,_shaderspassOpaque:()=>JCe,_shaderspassOverlay:()=>WCe,_shaderspassTerrainClassification:()=>jCe,_shaderspassTranslucent:()=>qCe,_shaderspbrLighting:()=>hxe,_shaderspbrMetallicRoughnessMaterial:()=>dxe,_shaderspbrParameters:()=>pye,_shaderspbrSpecularGlossinessMaterial:()=>fxe,_shadersphong:()=>gxe,_shaderspi:()=>XCe,_shaderspiOverFour:()=>ZCe,_shaderspiOverSix:()=>$Ce,_shaderspiOverThree:()=>eye,_shaderspiOverTwo:()=>tye,_shadersplaneDistance:()=>pxe,_shaderspointAlongRay:()=>mxe,_shadersradiansPerDegree:()=>iye,_shadersray:()=>mye,_shadersrayEllipsoidIntersectionInterval:()=>Cxe,_shadersraySegment:()=>Cye,_shadersraySphereIntersectionInterval:()=>yxe,_shadersreadDepth:()=>xxe,_shadersreadNonPerspective:()=>vxe,_shadersreverseLogDepth:()=>Exe,_shadersround:()=>wxe,_shaderssampleOctahedralProjection:()=>bxe,_shaderssaturation:()=>Qxe,_shaderssceneMode2D:()=>rye,_shaderssceneMode3D:()=>nye,_shaderssceneModeColumbusView:()=>oye,_shaderssceneModeMorphing:()=>aye,_shadersshadowDepthCompare:()=>Sxe,_shadersshadowParameters:()=>yye,_shadersshadowVisibility:()=>Dxe,_shaderssignNotZero:()=>Txe,_shaderssolarRadius:()=>sye,_shaderssphericalHarmonics:()=>Mxe,_shaderssrgbToLinear:()=>Pxe,_shaderstangentToEyeSpaceMatrix:()=>Rxe,_shadersthreePiOver2:()=>lye,_shaderstransformPlane:()=>Lxe,_shaderstranslateRelativeToEye:()=>Fxe,_shaderstranslucentPhong:()=>Nxe,_shaderstranspose:()=>kxe,_shaderstwoPi:()=>uye,_shadersunpackDepth:()=>Oxe,_shadersunpackFloat:()=>Uxe,_shadersunpackUint:()=>Gxe,_shadersvalueTransform:()=>Hxe,_shadersvertexLogDepth:()=>Vxe,_shaderswebMercatorMaxLatitude:()=>cye,_shaderswindowToEyeCoordinates:()=>zxe,_shaderswriteDepthClamp:()=>Kxe,_shaderswriteLogDepth:()=>Yxe,_shaderswriteNonPerspective:()=>Jxe,addBuffer:()=>$Ie,addDefaults:()=>KIe,addExtensionsRequired:()=>qIe,addExtensionsUsed:()=>iO,addPipelineExtras:()=>ZY,addToArray:()=>H_,appendForwardSlash:()=>Tme,arrayRemoveDuplicates:()=>fC,barycentricCoordinates:()=>cre,binarySearch:()=>hC,buildDrawCommand:()=>J_e,buildModuleUrl:()=>xs,clone:()=>xo,combine:()=>ia,computeFlyToLocationForRectangle:()=>IJ,createBillboardPointCallback:()=>kne,createBlurStage:()=>pie,createCommand:()=>Hl,createDefaultImageryProviderViewModels:()=>Bwe,createDefaultTerrainProviderViewModels:()=>Qwe,createEdgeStage:()=>dH,createElevationBandMaterial:()=>Rst,createFragmentFromTemplate:()=>ISe,createGuid:()=>Vu,createMaterialPropertyDescriptor:()=>hy,createOsmBuildings:()=>Lst,createPropertyDescriptor:()=>Bi,createRawPropertyDescriptor:()=>M_,createTangentSpaceDebugPrimitive:()=>Fst,createTaskProcessorWorker:()=>xlt,createUniform:()=>_Ce,createUniformArray:()=>wCe,createWorldImagery:()=>Xk,createWorldTerrain:()=>bwe,crypto_js:()=>oD,decodeGoogleEarthEnterpriseData:()=>OSe,decodeVectorPolylinePositions:()=>T1e,defaultValue:()=>Ae,defer:()=>rA,defined:()=>O,deprecationWarning:()=>$D,destroyObject:()=>Qr,echarts:()=>kb,exportKml:()=>iat,findAccessorMinMax:()=>$Y,findContentMetadata:()=>zne,findGroupMetadata:()=>Kne,findTileMetadata:()=>U1e,forEachTextureInMaterial:()=>gne,formatError:()=>D5,fragment:()=>Get,freezeRenderState:()=>IKe,getAbsoluteUri:()=>eY,getAccessorByteStride:()=>cN,getBaseUri:()=>Pme,getBinaryAccessor:()=>vM,getClipAndStyleCode:()=>lwe,getClippingFunction:()=>$ne,getComponentReader:()=>VY,getElement:()=>iA,getExtensionFromUri:()=>Rie,getFilenameFromUri:()=>_Y,getImageFromTypedArray:()=>fve,getImagePixels:()=>i5,getJsonFromTypedArray:()=>Bx,getMagic:()=>b6,getStringFromTypedArray:()=>d2,getTimestamp:()=>OA,hasExtension:()=>Qg,heightReferenceOnEntityPropertyChanged:()=>kY,isBitSet:()=>q_,isBlobUri:()=>Lie,isCrossOriginUrl:()=>Fie,isDataUri:()=>tY,isLeapYear:()=>r8,jsencrypt:()=>ESe,knockout:()=>gr,knockout_3_5_1:()=>EP,knockout_es5:()=>Awe,libgif:()=>NEe,licensechack:()=>mat,loadAndExecuteScript:()=>Nie,loadCRN:()=>Yat,loadCubeMap:()=>CQe,loadDDS:()=>Gie,loadImageFromTypedArray:()=>Ane,loadKTX2:()=>ZF,loadView:()=>Aae,mapbox_gl:()=>VEe,mergeSort:()=>LJ,modernizeShader:()=>bCe,moveTechniqueRenderStates:()=>jIe,moveTechniquesToExtension:()=>XIe,numberOfComponentsForType:()=>eO,objectToQuery:()=>kie,oneTimeWarning:()=>ua,packer:()=>Cve,parseBatchTable:()=>uJ,parseBoundingVolumeSemantics:()=>I1e,parseDefines:()=>LSe,parseFeatureMetadataLegacy:()=>VIe,parseGlb:()=>JIe,parseResponseHeaders:()=>Rme,parseStructuralMetadata:()=>HIe,pointInsideTriangle:()=>est,preprocess3DTileContent:()=>Yne,purify:()=>hat,queryToObject:()=>xD,rasterizeHTML_allinone:()=>XQe,readAccessorPacked:()=>e_e,removeExtension:()=>bK,removeExtensionsRequired:()=>YIe,removeExtensionsUsed:()=>fne,removePipelineExtras:()=>WIe,removeUnusedElements:()=>ZIe,remove_primitive:()=>WK,resizeImageToNextPowerOfTwo:()=>W7,sampleTerrain:()=>dJ,sampleTerrainMostDetailed:()=>EQ,scaleToGeodeticSurface:()=>Vie,subdivideArray:()=>Dve,subscribeAndEvaluate:()=>WE,svgCompassGyro:()=>SSe,svgCompassOuterRing:()=>QSe,svgCompassRotationMarker:()=>DSe,svgReset:()=>BSe,turf:()=>Zl,updateAccessorComponentTypes:()=>t_e,updateVersion:()=>i_e,usesExtension:()=>_p,vertex:()=>Uet,viewerCesium3DTilesInspectorMixin:()=>Alt,viewerCesiumInspectorMixin:()=>hlt,viewerCesiumNavigationMixin:()=>Eat,viewerDragDropMixin:()=>dlt,viewerPerformanceWatchdogMixin:()=>flt,webGLConstantToGlslType:()=>cst,wrapFunction:()=>VSe,writeTextToCanvas:()=>N5});var V_t=Object.create,x7e=Object.defineProperty,z_t=Object.getOwnPropertyDescriptor,K_t=Object.getOwnPropertyNames,Y_t=Object.getPrototypeOf,J_t=Object.prototype.hasOwnProperty,sM=(o=>typeof l1<"u"?l1:typeof Proxy<"u"?new Proxy(o,{get:(A,f)=>(typeof l1<"u"?l1:A)[f]}):o)(function(o){if(typeof l1<"u")return l1.apply(this,arguments);throw new Error('Dynamic require of "'+o+'" is not supported')}),yh=(o,A)=>()=>(A||o((A={exports:{}}).exports,A),A.exports),W_t=(o,A,f,m)=>{if(A&&typeof A=="object"||typeof A=="function")for(let C of K_t(A))!J_t.call(o,C)&&C!==f&&x7e(o,C,{get:()=>A[C],enumerable:!(m=z_t(A,C))||m.enumerable});return o},xh=(o,A,f)=>(f=o!=null?V_t(Y_t(o)):{},W_t(A||!o||!o.__esModule?x7e(f,"default",{value:o,enumerable:!0}):f,o)),bme=yh((o,A)=>{var f=function(m){m==null&&(m=new Date().getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,m.constructor==Array?this.init_by_array(m,m.length):this.init_seed(m)};f.prototype.init_seed=function(m){for(this.mt[0]=m>>>0,this.mti=1;this.mti<this.N;this.mti++){var m=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30;this.mt[this.mti]=(((m&4294901760)>>>16)*1812433253<<16)+(m&65535)*1812433253+this.mti,this.mt[this.mti]>>>=0}},f.prototype.init_by_array=function(m,C){var y,x,v;for(this.init_seed(19650218),y=1,x=0,v=this.N>C?this.N:C;v;v--){var E=this.mt[y-1]^this.mt[y-1]>>>30;this.mt[y]=(this.mt[y]^(((E&4294901760)>>>16)*1664525<<16)+(E&65535)*1664525)+m[x]+x,this.mt[y]>>>=0,y++,x++,y>=this.N&&(this.mt[0]=this.mt[this.N-1],y=1),x>=C&&(x=0)}for(v=this.N-1;v;v--){var E=this.mt[y-1]^this.mt[y-1]>>>30;this.mt[y]=(this.mt[y]^(((E&4294901760)>>>16)*1566083941<<16)+(E&65535)*1566083941)-y,this.mt[y]>>>=0,y++,y>=this.N&&(this.mt[0]=this.mt[this.N-1],y=1)}this.mt[0]=2147483648},f.prototype.random_int=function(){var m,C=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var y;for(this.mti==this.N+1&&this.init_seed(5489),y=0;y<this.N-this.M;y++)m=this.mt[y]&this.UPPER_MASK|this.mt[y+1]&this.LOWER_MASK,this.mt[y]=this.mt[y+this.M]^m>>>1^C[m&1];for(;y<this.N-1;y++)m=this.mt[y]&this.UPPER_MASK|this.mt[y+1]&this.LOWER_MASK,this.mt[y]=this.mt[y+(this.M-this.N)]^m>>>1^C[m&1];m=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^m>>>1^C[m&1],this.mti=0}return m=this.mt[this.mti++],m^=m>>>11,m^=m<<7&2636928640,m^=m<<15&4022730752,m^=m>>>18,m>>>0},f.prototype.random_int31=function(){return this.random_int()>>>1},f.prototype.random_incl=function(){return this.random_int()*(1/4294967295)},f.prototype.random=function(){return this.random_int()*(1/4294967296)},f.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)},f.prototype.random_long=function(){var m=this.random_int()>>>5,C=this.random_int()>>>6;return(m*67108864+C)*(1/9007199254740992)},A.exports=f}),j_t=yh((o,A)=>{/*! https://mths.be/punycode v1.4.0 by @mathias */(function(f){var m=typeof o=="object"&&o&&!o.nodeType&&o,C=typeof A=="object"&&A&&!A.nodeType&&A,y=typeof global=="object"&&global;(y.global===y||y.window===y||y.self===y)&&(f=y);var x,v=2147483647,E=36,I=1,w=26,Q=38,M=700,B=72,T=128,D="-",F=/^xn--/,L=/[^\x20-\x7E]/,R=/[\x2E\u3002\uFF0E\uFF61]/g,k={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},U=E-I,V=Math.floor,H=String.fromCharCode,q;function ie(Ie){throw new RangeError(k[Ie])}function Z(Ie,ve){for(var K=Ie.length,W=[];K--;)W[K]=ve(Ie[K]);return W}function oe(Ie,ve){var K=Ie.split("@"),W="";K.length>1&&(W=K[0]+"@",Ie=K[1]),Ie=Ie.replace(R,".");var te=Ie.split("."),Y=Z(te,ve).join(".");return W+Y}function ne(Ie){for(var ve=[],K=0,W=Ie.length,te,Y;K<W;)te=Ie.charCodeAt(K++),te>=55296&&te<=56319&&K<W?(Y=Ie.charCodeAt(K++),(Y&64512)==56320?ve.push(((te&1023)<<10)+(Y&1023)+65536):(ve.push(te),K--)):ve.push(te);return ve}function se(Ie){return Z(Ie,function(ve){var K="";return ve>65535&&(ve-=65536,K+=H(ve>>>10&1023|55296),ve=56320|ve&1023),K+=H(ve),K}).join("")}function ce(Ie){return Ie-48<10?Ie-22:Ie-65<26?Ie-65:Ie-97<26?Ie-97:E}function j(Ie,ve){return Ie+22+75*(Ie<26)-((ve!=0)<<5)}function de(Ie,ve,K){var W=0;for(Ie=K?V(Ie/M):Ie>>1,Ie+=V(Ie/ve);Ie>U*w>>1;W+=E)Ie=V(Ie/U);return V(W+(U+1)*Ie/(Ie+Q))}function me(Ie){var ve=[],K=Ie.length,W,te=0,Y=T,he=B,fe,Ce,Ee,be,Re,Ne,Je,ot,nt;for(fe=Ie.lastIndexOf(D),fe<0&&(fe=0),Ce=0;Ce<fe;++Ce)Ie.charCodeAt(Ce)>=128&&ie("not-basic"),ve.push(Ie.charCodeAt(Ce));for(Ee=fe>0?fe+1:0;Ee<K;){for(be=te,Re=1,Ne=E;Ee>=K&&ie("invalid-input"),Je=ce(Ie.charCodeAt(Ee++)),(Je>=E||Je>V((v-te)/Re))&&ie("overflow"),te+=Je*Re,ot=Ne<=he?I:Ne>=he+w?w:Ne-he,!(Je<ot);Ne+=E)nt=E-ot,Re>V(v/nt)&&ie("overflow"),Re*=nt;W=ve.length+1,he=de(te-be,W,be==0),V(te/W)>v-Y&&ie("overflow"),Y+=V(te/W),te%=W,ve.splice(te++,0,Y)}return se(ve)}function _e(Ie){var ve,K,W,te,Y,he,fe,Ce,Ee,be,Re,Ne=[],Je,ot,nt,$e;for(Ie=ne(Ie),Je=Ie.length,ve=T,K=0,Y=B,he=0;he<Je;++he)Re=Ie[he],Re<128&&Ne.push(H(Re));for(W=te=Ne.length,te&&Ne.push(D);W<Je;){for(fe=v,he=0;he<Je;++he)Re=Ie[he],Re>=ve&&Re<fe&&(fe=Re);for(ot=W+1,fe-ve>V((v-K)/ot)&&ie("overflow"),K+=(fe-ve)*ot,ve=fe,he=0;he<Je;++he)if(Re=Ie[he],Re<ve&&++K>v&&ie("overflow"),Re==ve){for(Ce=K,Ee=E;be=Ee<=Y?I:Ee>=Y+w?w:Ee-Y,!(Ce<be);Ee+=E)$e=Ce-be,nt=E-be,Ne.push(H(j(be+$e%nt,0))),Ce=V($e/nt);Ne.push(H(j(Ce,0))),Y=de(K,ot,W==te),K=0,++W}++K,++ve}return Ne.join("")}function Be(Ie){return oe(Ie,function(ve){return F.test(ve)?me(ve.slice(4).toLowerCase()):ve})}function Qe(Ie){return oe(Ie,function(ve){return L.test(ve)?"xn--"+_e(ve):ve})}if(x={version:"1.3.2",ucs2:{decode:ne,encode:se},decode:me,encode:_e,toASCII:Qe,toUnicode:Be},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return x});else if(m&&C)if(A.exports==m)C.exports=x;else for(q in x)x.hasOwnProperty(q)&&(m[q]=x[q]);else f.punycode=x})(o)}),q_t=yh((o,A)=>{/*!
    `;setTimeout(console.log.bind(console,o,"color:#018aff;font-size:30px;font-wight:bold;font-family:\u5FAE\u8F6F\u96C5\u9ED1","color:#018aff;font-size:13px;font-family:\u5FAE\u8F6F\u96C5\u9ED1"),0)};var H_t=U_t;var Elt={};f5e(Elt,{AlphaMode:()=>w8,AlphaPipelineStage:()=>hBe,Animation:()=>dwe,AnimationViewModel:()=>fwe,Appearance:()=>Sd,ApproximateTerrainHeights:()=>ZA,ArcGISTiledElevationTerrainProvider:()=>yat,ArcGisMapServerImageryProvider:()=>Xb,ArcType:()=>Pa,ArticulationStageType:()=>b_,AssociativeArray:()=>Vo,AttributeCompression:()=>Mu,AttributeType:()=>Is,AutoExposure:()=>Hbe,AutomaticUniforms:()=>_G,Axis:()=>vp,AxisAlignedBoundingBox:()=>CY,B3dmLoader:()=>v_e,B3dmParser:()=>y_e,Base64Encoder:()=>Lee,BaseLayerPicker:()=>pwe,BaseLayerPickerViewModel:()=>gwe,BatchTable:()=>ure,BatchTableHierarchy:()=>Bne,BatchTexture:()=>Q1,BatchTexturePipelineStage:()=>dBe,Billboard:()=>Zh,BillboardCollection:()=>iI,BillboardGraphics:()=>eP,BillboardVisualizer:()=>eIe,BingMapsApi:()=>xat,BingMapsGeocoderService:()=>Eat,BingMapsImageryProvider:()=>vwe,BingMapsStyle:()=>xwe,BlendEquation:()=>sx,BlendFunction:()=>RA,BlendOption:()=>tf,BlendTexture:()=>q8,BlendingState:()=>Bu,BoundingRectangle:()=>Kr,BoundingSphere:()=>wi,BoundingSphereState:()=>ro,BoxEmitter:()=>_st,BoxGeometry:()=>LM,BoxGeometryUpdater:()=>tIe,BoxGraphics:()=>hre,BoxOutlineGeometry:()=>r2,BrdfLutGenerator:()=>Xwe,Buffer:()=>vo,BufferLoader:()=>qY,BufferUsage:()=>ln,CPUStylingPipelineStage:()=>mBe,CallbackProperty:()=>Bn,Camera:()=>Ml,CameraEventAggregator:()=>$be,CameraEventType:()=>Bc,CameraFlightPath:()=>DEe,Cartesian2:()=>Bt,Cartesian3:()=>ee,Cartesian4:()=>ai,Cartographic:()=>Kt,CartographicGeocoderService:()=>bQe,CatmullRomSpline:()=>Iat,Cesium3DContentGroup:()=>Lne,Cesium3DTile:()=>Ov,Cesium3DTileBatchTable:()=>fJ,Cesium3DTileColorBlendMode:()=>bD,Cesium3DTileContent:()=>Bst,Cesium3DTileContentFactory:()=>Une,Cesium3DTileContentState:()=>FA,Cesium3DTileContentType:()=>Bv,Cesium3DTileFeature:()=>Ds,Cesium3DTileFeatureTable:()=>M6,Cesium3DTileOptimizationHint:()=>ZL,Cesium3DTileOptimizations:()=>Y1e,Cesium3DTilePass:()=>Ep,Cesium3DTilePassState:()=>wP,Cesium3DTilePointFeature:()=>Rk,Cesium3DTileRefine:()=>Ay,Cesium3DTileStyle:()=>gY,Cesium3DTileStyleEngine:()=>j1e,Cesium3DTilesInspector:()=>wDe,Cesium3DTilesInspectorViewModel:()=>BDe,Cesium3DTileset:()=>Fx,Cesium3DTilesetCache:()=>J1e,Cesium3DTilesetGraphics:()=>mre,Cesium3DTilesetHeatmap:()=>W1e,Cesium3DTilesetMetadata:()=>K1e,Cesium3DTilesetMostDetailedTraversal:()=>Gne,Cesium3DTilesetStatistics:()=>Wk,Cesium3DTilesetTraversal:()=>fN,Cesium3DTilesetVisualizer:()=>Z1e,CesiumInspector:()=>QDe,CesiumInspectorViewModel:()=>bDe,CesiumNavigation:()=>GSe,CesiumRenderPass:()=>HSe,CesiumTerrainProvider:()=>MJ,CesiumWidget:()=>JJ,Check:()=>of,CheckerboardMaterialProperty:()=>oie,CircleEmitter:()=>cDe,CircleGeometry:()=>_at,CircleOutlineGeometry:()=>Bat,CircleWaveMaterialProperty:()=>X8,ClassificationModelDrawCommand:()=>U_e,ClassificationPipelineStage:()=>fBe,ClassificationPrimitive:()=>a6,ClassificationType:()=>Gu,ClearCommand:()=>eA,ClippingPlane:()=>kM,ClippingPlaneCollection:()=>rB,Clock:()=>z5,ClockRange:()=>aC,ClockStep:()=>Jh,ClockViewModel:()=>_Qe,CloudCollection:()=>Mst,CloudType:()=>_ie,CollectionSource:()=>rJe,Color:()=>At,ColorBlendMode:()=>HD,ColorGeometryInstanceAttribute:()=>Yo,ColorMaterialProperty:()=>Fa,Command:()=>gat,ComponentDatatype:()=>ei,Composite3DTileContent:()=>g1e,CompositeEntityCollection:()=>Kot,CompositeMaterialProperty:()=>sie,CompositePositionProperty:()=>U_,CompositeProperty:()=>P1,CompressedTextureBuffer:()=>rY,ComputeCommand:()=>B5,ComputeEngine:()=>Hwe,ConditionsExpression:()=>mve,ConeEmitter:()=>EH,ConicArcSensor:()=>Sie,ConicArcSensorCollection:()=>plt,ConicArcSensorGeometry:()=>Tie,ConicArcSensorGraphics:()=>Qie,ConicArcSensorOutlineGeometry:()=>Mie,ConstantPositionProperty:()=>_D,ConstantProperty:()=>bc,ConstantSpline:()=>b_e,ConstructionWorker:()=>oJe,ContentMetadata:()=>F1e,ContentState:()=>yD,Context:()=>jwe,ContextLimits:()=>Co,CoplanarPolygonGeometry:()=>mIe,CoplanarPolygonGeometryLibrary:()=>OG,CoplanarPolygonOutlineGeometry:()=>eM,CornerType:()=>qA,CorridorGeometry:()=>OY,CorridorGeometryLibrary:()=>Uc,CorridorGeometryUpdater:()=>nIe,CorridorGraphics:()=>dre,CorridorOutlineGeometry:()=>rIe,Credit:()=>tl,CreditDisplay:()=>Zwe,CubeMap:()=>uQ,CubeMapFace:()=>TL,CubicRealPolynomial:()=>mY,CullFace:()=>mA,CullingVolume:()=>AC,CumulusCloud:()=>MQ,CustomDataSource:()=>xre,CustomHeightmapTerrainProvider:()=>wat,CustomMercatorProjection:()=>e6,CustomShader:()=>ZM,CustomShaderManagerEx:()=>nre,CustomShaderMode:()=>dY,CustomShaderPipelineStage:()=>_Be,CustomShaderTranslucencyMode:()=>wF,CustomTilingScheme:()=>UJe,CylinderGeometry:()=>oIe,CylinderGeometryLibrary:()=>$re,CylinderGeometryUpdater:()=>sIe,CylinderGraphics:()=>fre,CylinderOutlineGeometry:()=>aIe,CzmlDataSource:()=>eW,DDSTexture:()=>JSe,DataSource:()=>cy,DataSourceClock:()=>A5,DataSourceCollection:()=>ZEe,DataSourceDisplay:()=>EJ,DebugAppearance:()=>Nst,DebugCameraPrimitive:()=>_g,DebugInspector:()=>uQe,DebugModelMatrixPrimitive:()=>fDe,DefaultProxy:()=>HEe,DepthFunction:()=>nI,DepthPlane:()=>tbe,DequantizationPipelineStage:()=>BBe,DerivedCommand:()=>fx,DeveloperError:()=>Ui,DeviceOrientationCameraController:()=>ibe,DirectionalLight:()=>Cae,DiscardEmptyTileImagePolicy:()=>noe,DiscardMissingTileImagePolicy:()=>Cwe,DistanceDisplayCondition:()=>$o,DistanceDisplayConditionGeometryInstanceAttribute:()=>xA,DistanceLegendViewModel:()=>MSe,DoubleEndedPriorityQueue:()=>Sat,DoublyLinkedList:()=>Jne,DracoLoader:()=>XY,DrawCommand:()=>On,DynamicGeometryBatch:()=>ene,DynamicGeometryUpdater:()=>vA,ECharts:()=>HJe,EarthOrientationParameters:()=>xCe,EarthOrientationParametersSample:()=>oY,EasingFunction:()=>Ix,EllipseGeometry:()=>W1,EllipseGeometryLibrary:()=>iB,EllipseGeometryUpdater:()=>lIe,EllipseGraphics:()=>gre,EllipseOutlineGeometry:()=>UD,Ellipsoid:()=>Ti,EllipsoidGeodesic:()=>l0,EllipsoidGeometry:()=>gC,EllipsoidGeometryUpdater:()=>hIe,EllipsoidGraphics:()=>l6,EllipsoidOutlineGeometry:()=>J1,EllipsoidPrimitive:()=>Gwe,EllipsoidRhumbLine:()=>k1,EllipsoidSurfaceAppearance:()=>DY,EllipsoidTangentPlane:()=>tQ,EllipsoidTerrainProvider:()=>IP,EllipsoidalOccluder:()=>L5,Empty3DTileContent:()=>PK,EncodedCartesian3:()=>Pu,Entity:()=>kA,EntityCluster:()=>tN,EntityCollection:()=>iw,EntityView:()=>qne,Event:()=>br,EventHelper:()=>Mx,ExpandBySmartEarth:()=>UE,ExpandByTerra:()=>VJe,Expression:()=>bF,ExpressionNodeType:()=>jn,ExternalParameter:()=>px,ExtrapolationType:()=>mD,FeatureDataProvider:()=>Rre,FeatureDetection:()=>Mo,FeatureIdPipelineStage:()=>AJ,FeatureJsonData:()=>p6,FisheyeProjectionMap:()=>LY,FisheyeProjectionMapShader:()=>p7,FlattenVS:()=>Y_e,FlowEcharts:()=>cae,Fog:()=>rbe,ForEach:()=>Vr,FrameRateMonitor:()=>gDe,FrameState:()=>nbe,Framebuffer:()=>Bp,FramebufferManager:()=>Wh,FrustumCommands:()=>ube,FrustumGeometry:()=>m6,FrustumOutlineGeometry:()=>RY,Fullscreen:()=>yp,FullscreenButton:()=>wQe,FullscreenButtonViewModel:()=>BQe,GWBaiduImageryProvider:()=>Hre,GeoJsonDataSource:()=>gK,GeoJsonLoader:()=>__e,GeocodeType:()=>jJ,Geocoder:()=>MQe,GeocoderService:()=>Tat,GeocoderViewModel:()=>TQe,GeographicProjection:()=>Dg,GeographicTilingScheme:()=>af,Geometry:()=>Zo,Geometry3DTileContent:()=>p1e,GeometryAttribute:()=>Yr,GeometryAttributes:()=>yc,GeometryFactory:()=>Pat,GeometryInstance:()=>co,GeometryInstanceAttribute:()=>k_,GeometryOffsetAttribute:()=>Cl,GeometryPipeline:()=>rc,GeometryPipelineStage:()=>QBe,GeometryType:()=>HL,GeometryUpdater:()=>th,GeometryVisualizer:()=>PIe,GetFeatureInfoFormat:()=>S7,GifImageProperty:()=>rXe,Globe:()=>Coe,GlobeDepth:()=>cbe,GlobeSurfaceShaderSet:()=>Mwe,GlobeSurfaceTile:()=>zM,GlobeSurfaceTileProvider:()=>Lwe,GlobeTranslucency:()=>PJ,GlobeTranslucencyFramebuffer:()=>Abe,GlobeTranslucencyState:()=>abe,GltfBufferViewLoader:()=>une,GltfDracoLoader:()=>cne,GltfImageLoader:()=>hne,GltfIndexBufferLoader:()=>dne,GltfJsonLoader:()=>pne,GltfLoader:()=>nJ,GltfLoaderUtil:()=>OM,GltfStructuralMetadataLoader:()=>c_e,GltfTextureLoader:()=>mne,GltfVertexBufferLoader:()=>Cne,GoogleEarthEnterpriseImageryProvider:()=>kst,GoogleEarthEnterpriseMapsProvider:()=>Iwe,GoogleEarthEnterpriseMetadata:()=>IN,GoogleEarthEnterpriseTerrainData:()=>pie,GoogleEarthEnterpriseTerrainProvider:()=>Oat,GoogleEarthEnterpriseTileInformation:()=>QSe,GpxDataSource:()=>ySe,Graticules:()=>oXe,GraticulesImageryProvider:()=>m5,GregorianDate:()=>Z8,GridImageryProvider:()=>Ost,GridMaterialProperty:()=>lie,GroundGeometryUpdater:()=>Xl,GroundPolylineGeometry:()=>are,GroundPolylinePrimitive:()=>o6,GroundPrimitive:()=>oN,GroupMetadata:()=>Fte,GwBufferAnalysis:()=>Vre,HeadingPitchRange:()=>Ex,HeadingPitchRoll:()=>dC,Heap:()=>Fme,HeightReference:()=>xn,HeightmapEncoding:()=>VF,HeightmapTerrainData:()=>bQ,HeightmapTessellator:()=>toe,HermitePolynomialApproximation:()=>oSe,HermiteSpline:()=>QK,HilbertOrder:()=>Tte,HomeButton:()=>RQe,HomeButtonViewModel:()=>PQe,HorizontalOrigin:()=>tA,HugeAdapter:()=>k6,I3SDataProvider:()=>Ust,I3SFeature:()=>CDe,I3SField:()=>yDe,I3SGeometry:()=>Bie,I3SLayer:()=>bie,I3SNode:()=>wie,I3dmLoader:()=>w_e,I3dmParser:()=>B_e,Iau2000Orientation:()=>kwe,Iau2006XysData:()=>ECe,Iau2006XysSample:()=>Jie,IauOrientationAxes:()=>Owe,IauOrientationParameters:()=>Nwe,ImageBasedLighting:()=>_ne,ImageBasedLightingPipelineStage:()=>q_e,ImageCombine:()=>tre,ImageMaterialProperty:()=>V0,Imagery:()=>Xne,ImageryLayer:()=>dD,ImageryLayerCollection:()=>Fwe,ImageryLayerFeatureInfo:()=>pN,ImageryProvider:()=>a2,ImageryState:()=>sc,Implicit3DTileContent:()=>Lte,ImplicitAvailabilityBitstream:()=>Pte,ImplicitMetadataView:()=>Nne,ImplicitSubdivisionScheme:()=>uC,ImplicitSubtree:()=>v1e,ImplicitSubtreeMetadata:()=>x1e,ImplicitTileCoordinates:()=>X1e,ImplicitTileset:()=>q1e,IndexDatatype:()=>Nn,InfoBox:()=>NQe,InfoBoxViewModel:()=>FQe,InspectorShared:()=>z8,InstanceAttributeSemantic:()=>nC,InstancingPipelineStage:()=>sBe,InterpolationAlgorithm:()=>Uat,InterpolationType:()=>oF,Intersect:()=>La,IntersectionTests:()=>Xh,Intersections2D:()=>Z6,Interval:()=>fD,InvertClassification:()=>_oe,Ion:()=>xF,IonGeocoderService:()=>DQe,IonImageryProvider:()=>JG,IonResource:()=>jk,IonWorldImageryStyle:()=>WG,Iso8601:()=>Cn,JobScheduler:()=>sbe,JobType:()=>KE,JsonMetadataTable:()=>KY,JulianDate:()=>fi,KTX2Transcoder:()=>Ome,KeyboardEventModifier:()=>eI,KmlCamera:()=>Xve,KmlDataSource:()=>Pre,KmlLookAt:()=>Zve,KmlTour:()=>$ve,KmlTourFlyTo:()=>eEe,KmlTourWait:()=>iEe,Label:()=>V7,LabelCollection:()=>qM,LabelGraphics:()=>u6,LabelStyle:()=>pA,LabelVisualizer:()=>RIe,LagrangePolynomialApproximation:()=>sSe,LeapSecond:()=>$c,Light:()=>Hst,LightingModel:()=>rI,LightingPipelineStage:()=>DBe,LinearApproximation:()=>Qre,LinearSampler:()=>s2,LinearSpline:()=>cJ,MVTImageryProvider:()=>dXe,ManagedArray:()=>GM,MapMode2D:()=>nQ,MapProjection:()=>zat,MapWidget:()=>clt,MapboxApi:()=>Vat,MapboxImageryProvider:()=>bJ,MapboxStyleImageryProvider:()=>zst,Material:()=>as,MaterialAppearance:()=>Ig,MaterialPass:()=>jSe,MaterialPipelineStage:()=>MBe,MaterialProperty:()=>sC,Math:()=>je,Matrix2:()=>n0,Matrix3:()=>ci,Matrix4:()=>Xe,MetadataClass:()=>Q6,MetadataClassProperty:()=>WY,MetadataComponentType:()=>$s,MetadataEntity:()=>su,MetadataEnum:()=>s_e,MetadataEnumValue:()=>a_e,MetadataPipelineStage:()=>IM,MetadataSchema:()=>rO,MetadataSchemaLoader:()=>yne,MetadataSemantic:()=>E1e,MetadataTable:()=>tO,MetadataTableProperty:()=>GIe,MetadataType:()=>Zs,MipmapHint:()=>j8,Model:()=>cI,Model3DTileContent:()=>NL,ModelAlphaOptions:()=>qBe,ModelAnimation:()=>P_e,ModelAnimationChannel:()=>T_e,ModelAnimationCollection:()=>R_e,ModelAnimationLoop:()=>Gb,ModelAnimationState:()=>UL,ModelArticulation:()=>$_e,ModelArticulationStage:()=>Z_e,ModelClippingPlanesPipelineStage:()=>iBe,ModelColorPipelineStage:()=>SK,ModelComponents:()=>ta,ModelDrawCommand:()=>G_e,ModelFeature:()=>L_e,ModelFeatureTable:()=>F_e,ModelGraphics:()=>xY,ModelLightingOptions:()=>u1e,ModelMatrixUpdateStage:()=>uBe,ModelNode:()=>rBe,ModelRenderResources:()=>i1e,ModelRuntimeNode:()=>ABe,ModelRuntimePrimitive:()=>JBe,ModelSceneGraph:()=>A1e,ModelSilhouettePipelineStage:()=>o1e,ModelSkin:()=>jBe,ModelSplitterPipelineStage:()=>s1e,ModelStatistics:()=>h1e,ModelType:()=>z0,ModelUtility:()=>au,ModelVisualizer:()=>f1e,Moon:()=>xoe,MorphTargetsPipelineStage:()=>RBe,MorphWeightSpline:()=>Kat,MortonOrder:()=>S8,MultiResourceImageryProvider:()=>zre,MultiResourceTerrainProvider:()=>Kre,Multiple3DTileContent:()=>G1e,MultisampleFramebuffer:()=>m_e,NavigationControl:()=>pH,NavigationHelpButton:()=>OQe,NavigationHelpButtonViewModel:()=>kQe,NavigationUtils:()=>mH,NavigationViewModel:()=>L7,NearFarScalar:()=>To,NeverTileDiscardPolicy:()=>Kst,NodeRenderResources:()=>l1e,NodeStatisticsPipelineStage:()=>cBe,NodeTransformationProperty:()=>pre,OIT:()=>gbe,Occluder:()=>Gre,OctahedralProjectedCubeMap:()=>b5,OffsetGeometryInstanceAttribute:()=>a0,OlMVTImageryProvider:()=>Jre,OpenCageGeocoderService:()=>Yat,OpenStreetMapImageryProvider:()=>D7,OrderedGroundPrimitiveCollection:()=>$Ee,OrientedBoundingBox:()=>Hf,OrthographicFrustum:()=>Ss,OrthographicOffCenterFrustum:()=>K0,Packable:()=>Jat,PackableForInterpolation:()=>Wat,Particle:()=>yae,ParticleBurst:()=>BH,ParticleEmitter:()=>Wst,ParticleSystem:()=>_2,Pass:()=>hr,PassState:()=>cm,PathGraphics:()=>vY,PathVisualizer:()=>$1e,PeliasGeocoderService:()=>SQe,PerInstanceColorAppearance:()=>Va,PerformanceDisplay:()=>OJ,PerformanceWatchdog:()=>MDe,PerformanceWatchdogViewModel:()=>TDe,PerspectiveFrustum:()=>Yu,PerspectiveOffCenterFrustum:()=>n2,PerspectiveProjectionMap:()=>FY,PerspectiveProjectionMapShader:()=>m7,PerspectiveProjectionMapWithDepth:()=>NY,PerspectiveProjectionMapWithDepthShader:()=>nF,PickDepth:()=>lbe,PickDepthFramebuffer:()=>pbe,PickFramebuffer:()=>mbe,PickGlobeSlope:()=>Bot,Picking:()=>Ibe,PickingPipelineStage:()=>LBe,PinBuilder:()=>BY,PixelDatatype:()=>Qn,PixelFormat:()=>Gn,Plane:()=>Ja,PlaneGeometry:()=>dIe,PlaneGeometryUpdater:()=>pIe,PlaneGraphics:()=>Ove,PlaneOutlineGeometry:()=>fIe,PntsLoader:()=>d1e,PntsParser:()=>Rne,PointCloud:()=>uwe,PointCloudEyeDomeLighting:()=>aJ,PointCloudShading:()=>T6,PointCloudStylingPipelineStage:()=>NBe,PointGraphics:()=>Cre,PointPrimitive:()=>Tx,PointPrimitiveCollection:()=>sY,PointVisualizer:()=>ewe,PolygonDepth:()=>b8,PolygonDepthFS:()=>Sne,PolygonDepthVS:()=>Dne,PolygonGeometry:()=>eh,PolygonGeometryLibrary:()=>ql,PolygonGeometryUpdater:()=>yIe,PolygonGraphics:()=>yl,PolygonHierarchy:()=>Un,PolygonOutlineGeometry:()=>CIe,PolygonPipeline:()=>yA,Polyline:()=>t2,PolylineArrowMaterialProperty:()=>vK,PolylineCollection:()=>Y5,PolylineColorAppearance:()=>ly,PolylineDashMaterialProperty:()=>Vl,PolylineGeometry:()=>Vk,PolylineGeometryUpdater:()=>twe,PolylineGlowMaterialProperty:()=>uie,PolylineGraphics:()=>FD,PolylineMaterialAppearance:()=>L_,PolylineOutlineMaterialProperty:()=>JM,PolylinePipeline:()=>jA,PolylineTrailLinkMaterialProperty:()=>wot,PolylineVisualizer:()=>rwe,PolylineVolumeGeometry:()=>xIe,PolylineVolumeGeometryLibrary:()=>C5,PolylineVolumeGeometryUpdater:()=>EIe,PolylineVolumeGraphics:()=>yre,PolylineVolumeOutlineGeometry:()=>vIe,PositionProperty:()=>yY,PositionPropertyArray:()=>d8,PostProcessStage:()=>va,PostProcessStageCollection:()=>jbe,PostProcessStageComposite:()=>CC,PostProcessStageLibrary:()=>bv,PostProcessStageSampleMode:()=>Dv,PostProcessStageTextureCache:()=>Toe,Primitive:()=>Xa,PrimitiveCollection:()=>MD,PrimitiveLoadPlan:()=>rJ,PrimitiveOutlineGenerator:()=>Ene,PrimitiveOutlinePipelineStage:()=>UBe,PrimitivePipeline:()=>s5,PrimitiveRenderResources:()=>c1e,PrimitiveState:()=>i0,PrimitiveStatisticsPipelineStage:()=>GBe,PrimitiveType:()=>yn,ProjectionPicker:()=>GQe,ProjectionPickerViewModel:()=>UQe,Property:()=>Nt,PropertyArray:()=>oae,PropertyAttribute:()=>lne,PropertyAttributeProperty:()=>kIe,PropertyBag:()=>LD,PropertyTable:()=>AN,PropertyTexture:()=>sne,PropertyTextureProperty:()=>FIe,ProviderViewModel:()=>fp,Proxy:()=>Xat,QuadraticRealPolynomial:()=>zb,QuadtreeOccluders:()=>foe,QuadtreePrimitive:()=>BP,QuadtreePrimitivezh:()=>Sot,QuadtreeTile:()=>goe,QuadtreeTileLoadState:()=>mC,QuadtreeTileProvider:()=>jst,QuantizedMeshTerrainData:()=>coe,QuarticRealPolynomial:()=>Eve,Quaternion:()=>jr,QuaternionSpline:()=>S_e,Queue:()=>d5,RasterizeHtml:()=>sH,Ray:()=>ss,Rectangle:()=>Si,RectangleCollisionChecker:()=>nne,RectangleGeometry:()=>GY,RectangleGeometryLibrary:()=>uy,RectangleGeometryUpdater:()=>QIe,RectangleGraphics:()=>c6,RectangleOutlineGeometry:()=>ine,RectangularSensor:()=>jK,RectangularSensorFS:()=>xie,RectangularSensorGraphics:()=>mlt,RectangularSensorPrimitive:()=>KSe,RectangularSensorScanPlaneFS:()=>zSe,RectangularSensorVS:()=>gae,RectangularSensorVisualizer:()=>YSe,ReferenceFrame:()=>s0,ReferenceProperty:()=>QY,RenderEntity:()=>aW,RenderObjectFactory:()=>Vc,RenderState:()=>fn,Renderbuffer:()=>G_,RenderbufferFormat:()=>qE,Request:()=>cC,RequestErrorEvent:()=>r5,RequestScheduler:()=>V1,RequestState:()=>CA,RequestType:()=>oB,ResetViewNavigationControl:()=>LSe,Resource:()=>An,ResourceCache:()=>sf,ResourceCacheKey:()=>nw,ResourceCacheStatistics:()=>u_e,ResourceLoader:()=>fy,ResourceLoaderState:()=>ha,Rotation:()=>YD,RuntimeError:()=>nr,S2Cell:()=>zG,S3MCacheFileRenderEntity:()=>Iie,S3MCompressType:()=>Clt,S3MContentFactory:()=>iDe,S3MContentParser:()=>rDe,S3MCreateIndexJob:()=>tDe,S3MCreateVertexJob:()=>$Se,S3MDataSource:()=>Pot,S3MLayerCache:()=>nDe,S3MLayerScheduler:()=>oDe,S3MPixelFormat:()=>ylt,S3MTile:()=>sDe,S3MTilesFS:()=>XSe,S3MTilesLayer:()=>pae,S3MTilesVS:()=>qSe,S3ModelParser:()=>aDe,SDFSettings:()=>Qv,SampledPositionProperty:()=>R1,SampledProperty:()=>uM,Sampler:()=>Hs,ScaledPositionProperty:()=>f6,Scene:()=>Loe,SceneFramebuffer:()=>woe,SceneMode:()=>xi,SceneMode2DPipelineStage:()=>HBe,SceneModePicker:()=>VQe,SceneModePickerViewModel:()=>HQe,SceneTransforms:()=>Qs,SceneTransitioner:()=>Zbe,ScreenSpaceCameraController:()=>oQe,ScreenSpaceEventHandler:()=>Ur,ScreenSpaceEventType:()=>Ki,SelectedFeatureIdPipelineStage:()=>DK,SelectionIndicator:()=>KQe,SelectionIndicatorViewModel:()=>zQe,Sensor:()=>hst,ShaderBuilder:()=>t1e,ShaderCache:()=>zwe,ShaderDestination:()=>Sr,ShaderFunction:()=>e1e,ShaderProgram:()=>_s,ShaderSource:()=>Fr,ShaderStruct:()=>ZBe,ShadowMap:()=>vQ,ShadowMapShader:()=>pF,ShadowMode:()=>Al,ShadowVolumeAppearance:()=>gM,ShowGeometryInstanceAttribute:()=>wu,Simon1994PlanetaryPositions:()=>kK,SimplePolylineGeometry:()=>Zat,SingleTileImageryProvider:()=>QQ,SkinningPipelineStage:()=>zBe,SkyAtmosphere:()=>aH,SkyBox:()=>CN,SphereEmitter:()=>wH,SphereGeometry:()=>$at,SphereOutlineGeometry:()=>tP,Spherical:()=>lSe,Spline:()=>uf,SplitDirection:()=>uI,Splitter:()=>eoe,SpotLight:()=>Lot,StaticGeometryColorBatch:()=>AM,StaticGeometryPerMaterialBatch:()=>hM,StaticGroundGeometryColorBatch:()=>Ete,StaticGroundGeometryPerMaterialBatch:()=>SIe,StaticGroundPolylinePerMaterialBatch:()=>iwe,StaticOutlineGeometryBatch:()=>Ite,StencilConstants:()=>ca,StencilFunction:()=>Ku,StencilOperation:()=>lo,SteppedSpline:()=>Q_e,StripeMaterialProperty:()=>cie,StripeOrientation:()=>qF,StructuralMetadata:()=>nP,StyleCommandsNeeded:()=>Q5,StyleExpression:()=>qst,Sun:()=>Noe,SunLight:()=>tH,SunPostProcess:()=>lQe,SupportedImageFormats:()=>A_e,SvgPathBindingHandler:()=>hwe,TaskProcessor:()=>Vf,TerrainData:()=>AO,TerrainEncoding:()=>HM,TerrainExaggeration:()=>ID,TerrainFillMesh:()=>hoe,TerrainFlatten:()=>vN,TerrainFlattenPolygonTexture:()=>vSe,TerrainMesh:()=>hO,TerrainOffsetProperty:()=>Zre,TerrainProvider:()=>Cx,TerrainQuantization:()=>Pv,TerrainState:()=>mh,Texture:()=>yo,TextureAtlas:()=>H7,TextureCache:()=>Kwe,TextureMagnificationFilter:()=>Ch,TextureManager:()=>gve,TextureMinificationFilter:()=>fs,TextureUniform:()=>dve,TextureWrap:()=>Za,TileAvailability:()=>$L,TileBoundingRegion:()=>S5,TileBoundingS2Cell:()=>H1e,TileBoundingSphere:()=>yP,TileBoundingVolume:()=>Xst,TileCoordinatesImageryProvider:()=>IDe,TileDiscardPolicy:()=>Zst,TileEdge:()=>Ga,TileImagery:()=>Zne,TileMapServiceImageryProvider:()=>_P,TileMetadata:()=>k1e,TileOrientedBoundingBox:()=>kF,TileProviderError:()=>wc,TileReplacementQueue:()=>moe,TileSelectionResult:()=>sa,TileState:()=>$st,Tileset3DTileContent:()=>_1e,TilesetMetadata:()=>z1e,TilesetPipelineStage:()=>W_e,TilingScheme:()=>est,TimeConstants:()=>Uu,TimeDynamicImagery:()=>loe,TimeDynamicPointCloud:()=>K6,TimeInterval:()=>el,TimeIntervalCollection:()=>mx,TimeIntervalCollectionPositionProperty:()=>D8,TimeIntervalCollectionProperty:()=>f8,TimeStandard:()=>nu,Timeline:()=>WQe,TimelineHighlightRange:()=>YQe,TimelineTrack:()=>JQe,Tipsify:()=>Mve,ToggleButtonViewModel:()=>xG,Tonemapper:()=>XG,Transforms:()=>zn,TranslationRotationScale:()=>aB,TranslucentTileClassification:()=>ybe,TridiagonalSystemSolver:()=>wne,TrustedServers:()=>Uie,TweenCollection:()=>Poe,UniformState:()=>Ywe,UniformType:()=>pa,UrlTemplateGeojsonProvider:()=>kot,UrlTemplateImageryProvider:()=>sw,UserInterfaceControl:()=>fae,Utils:()=>fQ,VERSION:()=>vlt,VRButton:()=>qQe,VRButtonViewModel:()=>jQe,VRTheWorldTerrainProvider:()=>rst,VaryingType:()=>xx,Vector3DTileBatch:()=>Q8,Vector3DTileClampedPolylines:()=>D1e,Vector3DTileContent:()=>P1e,Vector3DTileGeometry:()=>Bk,Vector3DTilePoints:()=>B1e,Vector3DTilePolygons:()=>w1e,Vector3DTilePolylines:()=>One,Vector3DTilePrimitive:()=>Fne,VelocityOrientationProperty:()=>uSe,VelocityVectorProperty:()=>aae,VertexArray:()=>Hc,VertexArrayFacade:()=>aY,VertexAttributeSemantic:()=>Fo,VertexCompressOption:()=>_1,VertexFormat:()=>Wr,VerticalOrigin:()=>wn,VideoSynchronizer:()=>tst,View:()=>Qoe,ViewShed:()=>Het,ViewShedMap:()=>nH,ViewShedMapShader:()=>EF,Viewer:()=>XJ,ViewportQuad:()=>elt,Visibility:()=>vg,Visualizer:()=>cat,VulkanConstants:()=>nst,WallGeometry:()=>DIe,WallGeometryLibrary:()=>one,WallGeometryUpdater:()=>MIe,WallGraphics:()=>EY,WallOutlineGeometry:()=>TIe,WaterFS:()=>TY,WaterMaterialProperty:()=>Oot,WebGLConstants:()=>Ii,WebMapServiceImageryProvider:()=>DJ,WebMapTileServiceImageryProvider:()=>X6,WebMercatorProjection:()=>NA,WebMercatorTilingScheme:()=>Am,WindingOrder:()=>Z_,WireframeIndexGenerator:()=>Mne,WireframePipelineStage:()=>YBe,ZoomNavigationControl:()=>mie,_shadersAcesTonemappingStage:()=>_be,_shadersAdditiveBlend:()=>aQe,_shadersAdjustTranslucentFS:()=>Wte,_shadersAllMaterialAppearanceFS:()=>mEe,_shadersAllMaterialAppearanceVS:()=>CEe,_shadersAmbientOcclusionGenerate:()=>Bbe,_shadersAmbientOcclusionModulate:()=>wbe,_shadersAspectRampMaterial:()=>Gme,_shadersAtmosphereCommon:()=>R8,_shadersBasicMaterialAppearanceFS:()=>yEe,_shadersBasicMaterialAppearanceVS:()=>xEe,_shadersBillboardCollectionFS:()=>Xxe,_shadersBillboardCollectionVS:()=>Zxe,_shadersBlackAndWhite:()=>bbe,_shadersBloomComposite:()=>Qbe,_shadersBrdfLutGeneratorFS:()=>qwe,_shadersBrightPass:()=>sQe,_shadersBrightness:()=>Sbe,_shadersBumpMapMaterial:()=>Hme,_shadersCPUStylingStageFS:()=>pBe,_shadersCPUStylingStageVS:()=>gBe,_shadersCheckFloatTexturePrecisionFS:()=>Uot,_shadersCheckerboardMaterial:()=>Vme,_shadersCloudCollectionFS:()=>$Qe,_shadersCloudCollectionVS:()=>eSe,_shadersCloudNoiseFS:()=>tSe,_shadersCloudNoiseVS:()=>iSe,_shadersCompareAndPackTranslucentDepth:()=>Cbe,_shadersCompositeOITFS:()=>hbe,_shadersCompositeTranslucentClassification:()=>T7,_shadersContrastBias:()=>Dbe,_shadersCustomShaderStageFS:()=>yBe,_shadersCustomShaderStageVS:()=>CBe,_shadersCzmBuiltins:()=>a7,_shadersDepthOfField:()=>Tbe,_shadersDepthPlaneFS:()=>$we,_shadersDepthPlaneVS:()=>ebe,_shadersDepthView:()=>Mbe,_shadersDepthViewPacked:()=>tlt,_shadersDotMaterial:()=>zme,_shadersEdgeDetection:()=>Pbe,_shadersElevationBandMaterial:()=>Kme,_shadersElevationContourMaterial:()=>Yme,_shadersElevationRampMaterial:()=>Jme,_shadersEllipsoidFS:()=>Yte,_shadersEllipsoidSurfaceAppearanceFS:()=>IEe,_shadersEllipsoidSurfaceAppearanceVS:()=>_Ee,_shadersEllipsoidVS:()=>Jte,_shadersFXAA:()=>Lbe,_shadersFXAA3_11:()=>Gbe,_shadersFadeMaterial:()=>Wme,_shadersFeatureIdStageFS:()=>xBe,_shadersFeatureIdStageVS:()=>vBe,_shadersFilmicTonemapping:()=>Rbe,_shadersGaussianBlur1D:()=>GK,_shadersGaussianBlur1DSun:()=>zbe,_shadersGeometryStageFS:()=>wBe,_shadersGeometryStageVS:()=>bBe,_shadersGlobeFS:()=>Swe,_shadersGlobeVS:()=>Dwe,_shadersGridMaterial:()=>jme,_shadersGroundAtmosphere:()=>Vte,_shadersHSBToRGB:()=>qye,_shadersHSLToRGB:()=>Xye,_shadersImageBasedLightingStageFS:()=>j_e,_shadersInstancingStageCommon:()=>nBe,_shadersInstancingStageVS:()=>oBe,_shadersLegacyInstancingStageVS:()=>aBe,_shadersLensFlare:()=>Fbe,_shadersLightingStageFS:()=>SBe,_shadersMaterialStageFS:()=>TBe,_shadersMetadataStageFS:()=>EBe,_shadersMetadataStageVS:()=>IBe,_shadersModelClippingPlanesStageFS:()=>tBe,_shadersModelColorStageFS:()=>eBe,_shadersModelFS:()=>N_e,_shadersModelSilhouetteStageFS:()=>r1e,_shadersModelSilhouetteStageVS:()=>n1e,_shadersModelSplitterStageFS:()=>a1e,_shadersModelVS:()=>k_e,_shadersModifiedReinhardTonemapping:()=>Nbe,_shadersMorphTargetsStageVS:()=>PBe,_shadersNightVision:()=>kbe,_shadersNormalMapMaterial:()=>qme,_shadersOctahedralProjectionAtlasFS:()=>d_e,_shadersOctahedralProjectionFS:()=>f_e,_shadersOctahedralProjectionVS:()=>g_e,_shadersPassThrough:()=>KM,_shadersPassThroughDepth:()=>UK,_shadersPerInstanceColorAppearanceFS:()=>Fve,_shadersPerInstanceColorAppearanceVS:()=>Nve,_shadersPerInstanceFlatColorAppearanceFS:()=>sre,_shadersPerInstanceFlatColorAppearanceVS:()=>kve,_shadersPointCloudEyeDomeLighting:()=>C_e,_shadersPointCloudStylingStageVS:()=>FBe,_shadersPointPrimitiveCollectionFS:()=>uG,_shadersPointPrimitiveCollectionVS:()=>tve,_shadersPolylineArrowMaterial:()=>Xme,_shadersPolylineColorAppearanceVS:()=>Qve,_shadersPolylineCommon:()=>U5,_shadersPolylineDashMaterial:()=>Zme,_shadersPolylineFS:()=>lre,_shadersPolylineGlowMaterial:()=>$me,_shadersPolylineMaterialAppearanceVS:()=>Sve,_shadersPolylineOutlineMaterial:()=>eCe,_shadersPolylineShadowVolumeFS:()=>_ve,_shadersPolylineShadowVolumeMorphFS:()=>Bve,_shadersPolylineShadowVolumeMorphVS:()=>wve,_shadersPolylineShadowVolumeVS:()=>bve,_shadersPolylineVS:()=>BEe,_shadersPostProcessRain:()=>ilt,_shadersPostProcessSnow:()=>rlt,_shadersPrimitiveOutlineStageFS:()=>OBe,_shadersPrimitiveOutlineStageVS:()=>kBe,_shadersRGBToHSB:()=>Ixe,_shadersRGBToHSL:()=>_xe,_shadersRGBToXYZ:()=>Bxe,_shadersReinhardTonemapping:()=>Obe,_shadersReprojectWebMercatorFS:()=>owe,_shadersReprojectWebMercatorVS:()=>awe,_shadersRimLightingMaterial:()=>tCe,_shadersSelectedFeatureIdStageCommon:()=>Qte,_shadersShadowVolumeAppearanceFS:()=>Are,_shadersShadowVolumeAppearanceVS:()=>Lve,_shadersShadowVolumeFS:()=>q7,_shadersSilhouette:()=>Ube,_shadersSkinningStageVS:()=>VBe,_shadersSkyAtmosphereCommon:()=>$te,_shadersSkyAtmosphereFS:()=>pQe,_shadersSkyAtmosphereVS:()=>mQe,_shadersSkyBoxFS:()=>yQe,_shadersSkyBoxVS:()=>xQe,_shadersSlopeRampMaterial:()=>iCe,_shadersStripeMaterial:()=>rCe,_shadersSunFS:()=>vQe,_shadersSunShaft:()=>nlt,_shadersSunShaftHdr:()=>olt,_shadersSunShaftModulate:()=>Vbe,_shadersSunTextureFS:()=>Got,_shadersSunTextureFS_v2:()=>IQe,_shadersSunVS:()=>EQe,_shadersSunVisibleFS:()=>Kbe,_shadersSunVisibleShaft:()=>Ybe,_shadersSunVisibleVS:()=>K_e,_shadersTexturedMaterialAppearanceFS:()=>vEe,_shadersTexturedMaterialAppearanceVS:()=>EEe,_shadersVector3DTileClampedPolylinesFS:()=>S1e,_shadersVector3DTileClampedPolylinesVS:()=>Q1e,_shadersVector3DTilePolylinesVS:()=>b1e,_shadersVectorTileVS:()=>Dte,_shadersViewportQuadFS:()=>rSe,_shadersViewportQuadVS:()=>voe,_shadersWater:()=>nCe,_shadersXYZToRGB:()=>Wxe,_shadersacesTonemapping:()=>xye,_shadersalphaWeight:()=>vye,_shadersantialias:()=>Eye,_shadersapproximateSphericalCoordinates:()=>Iye,_shadersbackFacing:()=>_ye,_shadersbranchFreeTernary:()=>Bye,_shaderscascadeColor:()=>wye,_shaderscascadeDistance:()=>bye,_shaderscascadeMatrix:()=>Qye,_shaderscascadeWeights:()=>Sye,_shaderscolumbusViewMorph:()=>Dye,_shaderscomputePosition:()=>Tye,_shaderscosineAndSine:()=>Mye,_shadersdecompressTextureCoordinates:()=>Pye,_shadersdefaultPbrMaterial:()=>Rye,_shadersdegreesPerRadian:()=>QCe,_shadersdepthClamp:()=>Lye,_shadersdepthRange:()=>SCe,_shadersdepthRangeStruct:()=>Aye,_shaderseastNorthUpToEyeCoordinates:()=>Fye,_shadersellipsoidContainsPoint:()=>Nye,_shadersellipsoidWgs84TextureCoordinates:()=>kye,_shadersepsilon1:()=>DCe,_shadersepsilon2:()=>TCe,_shadersepsilon3:()=>MCe,_shadersepsilon4:()=>PCe,_shadersepsilon5:()=>RCe,_shadersepsilon6:()=>LCe,_shadersepsilon7:()=>FCe,_shadersequalsEpsilon:()=>Oye,_shaderseyeOffset:()=>Uye,_shaderseyeToWindowCoordinates:()=>Gye,_shadersfastApproximateAtan:()=>Hye,_shadersfog:()=>Vye,_shadersgammaCorrect:()=>zye,_shadersgeodeticSurfaceNormal:()=>Kye,_shadersgetDefaultMaterial:()=>Yye,_shadersgetLambertDiffuse:()=>Jye,_shadersgetSpecular:()=>Wye,_shadersgetWaterNoise:()=>jye,_shadershue:()=>Zye,_shadersinfinity:()=>NCe,_shadersinverseGamma:()=>$ye,_shadersisEmpty:()=>exe,_shadersisFull:()=>txe,_shaderslatitudeToWebMercatorFraction:()=>ixe,_shaderslineDistance:()=>nxe,_shaderslinearToSrgb:()=>rxe,_shadersluminance:()=>oxe,_shadersmaterial:()=>hye,_shadersmaterialInput:()=>dye,_shadersmetersPerPixel:()=>axe,_shadersmodelMaterial:()=>fye,_shadersmodelToWindowCoordinates:()=>sxe,_shadersmodelVertexOutput:()=>gye,_shadersmultiplyWithColorBalance:()=>lxe,_shadersnearFarScalar:()=>uxe,_shadersoctDecode:()=>cxe,_shadersoneOverPi:()=>kCe,_shadersoneOverTwoPi:()=>OCe,_shaderspackDepth:()=>Axe,_shaderspassCesium3DTile:()=>UCe,_shaderspassCesium3DTileClassification:()=>GCe,_shaderspassCesium3DTileClassificationIgnoreShow:()=>HCe,_shaderspassClassification:()=>VCe,_shaderspassCompute:()=>zCe,_shaderspassEnvironment:()=>KCe,_shaderspassGlobe:()=>YCe,_shaderspassOpaque:()=>JCe,_shaderspassOverlay:()=>WCe,_shaderspassTerrainClassification:()=>jCe,_shaderspassTranslucent:()=>qCe,_shaderspbrLighting:()=>hxe,_shaderspbrMetallicRoughnessMaterial:()=>dxe,_shaderspbrParameters:()=>pye,_shaderspbrSpecularGlossinessMaterial:()=>fxe,_shadersphong:()=>gxe,_shaderspi:()=>XCe,_shaderspiOverFour:()=>ZCe,_shaderspiOverSix:()=>$Ce,_shaderspiOverThree:()=>eye,_shaderspiOverTwo:()=>tye,_shadersplaneDistance:()=>pxe,_shaderspointAlongRay:()=>mxe,_shadersradiansPerDegree:()=>iye,_shadersray:()=>mye,_shadersrayEllipsoidIntersectionInterval:()=>Cxe,_shadersraySegment:()=>Cye,_shadersraySphereIntersectionInterval:()=>yxe,_shadersreadDepth:()=>xxe,_shadersreadNonPerspective:()=>vxe,_shadersreverseLogDepth:()=>Exe,_shadersround:()=>wxe,_shaderssampleOctahedralProjection:()=>bxe,_shaderssaturation:()=>Qxe,_shaderssceneMode2D:()=>rye,_shaderssceneMode3D:()=>nye,_shaderssceneModeColumbusView:()=>oye,_shaderssceneModeMorphing:()=>aye,_shadersshadowDepthCompare:()=>Sxe,_shadersshadowParameters:()=>yye,_shadersshadowVisibility:()=>Dxe,_shaderssignNotZero:()=>Txe,_shaderssolarRadius:()=>sye,_shaderssphericalHarmonics:()=>Mxe,_shaderssrgbToLinear:()=>Pxe,_shaderstangentToEyeSpaceMatrix:()=>Rxe,_shadersthreePiOver2:()=>lye,_shaderstransformPlane:()=>Lxe,_shaderstranslateRelativeToEye:()=>Fxe,_shaderstranslucentPhong:()=>Nxe,_shaderstranspose:()=>kxe,_shaderstwoPi:()=>uye,_shadersunpackDepth:()=>Oxe,_shadersunpackFloat:()=>Uxe,_shadersunpackUint:()=>Gxe,_shadersvalueTransform:()=>Hxe,_shadersvertexLogDepth:()=>Vxe,_shaderswebMercatorMaxLatitude:()=>cye,_shaderswindowToEyeCoordinates:()=>zxe,_shaderswriteDepthClamp:()=>Kxe,_shaderswriteLogDepth:()=>Yxe,_shaderswriteNonPerspective:()=>Jxe,addBuffer:()=>$Ie,addDefaults:()=>KIe,addExtensionsRequired:()=>qIe,addExtensionsUsed:()=>iO,addPipelineExtras:()=>ZY,addToArray:()=>H_,appendForwardSlash:()=>Tme,arrayRemoveDuplicates:()=>fC,barycentricCoordinates:()=>cre,binarySearch:()=>hC,buildDrawCommand:()=>J_e,buildModuleUrl:()=>xs,clone:()=>xo,combine:()=>ia,computeFlyToLocationForRectangle:()=>IJ,createBillboardPointCallback:()=>kne,createBlurStage:()=>yie,createCommand:()=>Hl,createDefaultImageryProviderViewModels:()=>Bwe,createDefaultTerrainProviderViewModels:()=>Qwe,createEdgeStage:()=>CH,createElevationBandMaterial:()=>Rst,createFragmentFromTemplate:()=>TSe,createGuid:()=>Vu,createMaterialPropertyDescriptor:()=>hy,createOsmBuildings:()=>Lst,createPropertyDescriptor:()=>Bi,createRawPropertyDescriptor:()=>M_,createTangentSpaceDebugPrimitive:()=>Fst,createTaskProcessorWorker:()=>xlt,createUniform:()=>_Ce,createUniformArray:()=>wCe,createWorldImagery:()=>Xk,createWorldTerrain:()=>bwe,crypto_js:()=>oD,decodeGoogleEarthEnterpriseData:()=>wSe,decodeVectorPolylinePositions:()=>T1e,defaultValue:()=>Ae,defer:()=>rA,defined:()=>O,deprecationWarning:()=>$D,destroyObject:()=>Qr,echarts:()=>kb,exportKml:()=>nat,findAccessorMinMax:()=>$Y,findContentMetadata:()=>zne,findGroupMetadata:()=>Kne,findTileMetadata:()=>U1e,forEachTextureInMaterial:()=>gne,formatError:()=>D5,fragment:()=>Get,freezeRenderState:()=>IKe,getAbsoluteUri:()=>eY,getAccessorByteStride:()=>cN,getBaseUri:()=>Pme,getBinaryAccessor:()=>vM,getClipAndStyleCode:()=>lwe,getClippingFunction:()=>$ne,getComponentReader:()=>VY,getElement:()=>iA,getExtensionFromUri:()=>Rie,getFilenameFromUri:()=>_Y,getImageFromTypedArray:()=>fve,getImagePixels:()=>i5,getJsonFromTypedArray:()=>Bx,getMagic:()=>b6,getStringFromTypedArray:()=>d2,getTimestamp:()=>OA,hasExtension:()=>Qg,heightReferenceOnEntityPropertyChanged:()=>kY,isBitSet:()=>q_,isBlobUri:()=>Lie,isCrossOriginUrl:()=>Fie,isDataUri:()=>tY,isLeapYear:()=>r8,jsencrypt:()=>ESe,knockout:()=>gr,knockout_3_5_1:()=>EP,knockout_es5:()=>Awe,libgif:()=>NEe,licensechack:()=>mat,loadAndExecuteScript:()=>Nie,loadCRN:()=>Gat,loadCubeMap:()=>CQe,loadDDS:()=>Gie,loadImageFromTypedArray:()=>Ane,loadKTX2:()=>ZF,loadView:()=>dae,mapbox_gl:()=>VEe,mergeSort:()=>LJ,modernizeShader:()=>bCe,moveTechniqueRenderStates:()=>jIe,moveTechniquesToExtension:()=>XIe,numberOfComponentsForType:()=>eO,objectToQuery:()=>kie,oneTimeWarning:()=>ua,packer:()=>Cve,parseBatchTable:()=>uJ,parseBoundingVolumeSemantics:()=>I1e,parseDefines:()=>VSe,parseFeatureMetadataLegacy:()=>VIe,parseGlb:()=>JIe,parseResponseHeaders:()=>Rme,parseStructuralMetadata:()=>HIe,pointInsideTriangle:()=>jat,preprocess3DTileContent:()=>Yne,purify:()=>fat,queryToObject:()=>xD,rasterizeHTML_allinone:()=>XQe,readAccessorPacked:()=>e_e,removeExtension:()=>bK,removeExtensionsRequired:()=>YIe,removeExtensionsUsed:()=>fne,removePipelineExtras:()=>WIe,removeUnusedElements:()=>ZIe,remove_primitive:()=>WK,resizeImageToNextPowerOfTwo:()=>W7,sampleTerrain:()=>dJ,sampleTerrainMostDetailed:()=>EQ,scaleToGeodeticSurface:()=>Vie,subdivideArray:()=>Dve,subscribeAndEvaluate:()=>WE,svgCompassGyro:()=>NSe,svgCompassOuterRing:()=>FSe,svgCompassRotationMarker:()=>kSe,svgReset:()=>PSe,turf:()=>Zl,updateAccessorComponentTypes:()=>t_e,updateVersion:()=>i_e,usesExtension:()=>_p,vertex:()=>Uet,viewerCesium3DTilesInspectorMixin:()=>Alt,viewerCesiumInspectorMixin:()=>hlt,viewerCesiumNavigationMixin:()=>cst,viewerDragDropMixin:()=>dlt,viewerPerformanceWatchdogMixin:()=>flt,webGLConstantToGlslType:()=>ost,wrapFunction:()=>DSe,writeTextToCanvas:()=>N5});var V_t=Object.create,x7e=Object.defineProperty,z_t=Object.getOwnPropertyDescriptor,K_t=Object.getOwnPropertyNames,Y_t=Object.getPrototypeOf,J_t=Object.prototype.hasOwnProperty,sM=(o=>typeof l1<"u"?l1:typeof Proxy<"u"?new Proxy(o,{get:(A,f)=>(typeof l1<"u"?l1:A)[f]}):o)(function(o){if(typeof l1<"u")return l1.apply(this,arguments);throw new Error('Dynamic require of "'+o+'" is not supported')}),yh=(o,A)=>()=>(A||o((A={exports:{}}).exports,A),A.exports),W_t=(o,A,f,m)=>{if(A&&typeof A=="object"||typeof A=="function")for(let C of K_t(A))!J_t.call(o,C)&&C!==f&&x7e(o,C,{get:()=>A[C],enumerable:!(m=z_t(A,C))||m.enumerable});return o},xh=(o,A,f)=>(f=o!=null?V_t(Y_t(o)):{},W_t(A||!o||!o.__esModule?x7e(f,"default",{value:o,enumerable:!0}):f,o)),bme=yh((o,A)=>{var f=function(m){m==null&&(m=new Date().getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,m.constructor==Array?this.init_by_array(m,m.length):this.init_seed(m)};f.prototype.init_seed=function(m){for(this.mt[0]=m>>>0,this.mti=1;this.mti<this.N;this.mti++){var m=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30;this.mt[this.mti]=(((m&4294901760)>>>16)*1812433253<<16)+(m&65535)*1812433253+this.mti,this.mt[this.mti]>>>=0}},f.prototype.init_by_array=function(m,C){var y,x,v;for(this.init_seed(19650218),y=1,x=0,v=this.N>C?this.N:C;v;v--){var E=this.mt[y-1]^this.mt[y-1]>>>30;this.mt[y]=(this.mt[y]^(((E&4294901760)>>>16)*1664525<<16)+(E&65535)*1664525)+m[x]+x,this.mt[y]>>>=0,y++,x++,y>=this.N&&(this.mt[0]=this.mt[this.N-1],y=1),x>=C&&(x=0)}for(v=this.N-1;v;v--){var E=this.mt[y-1]^this.mt[y-1]>>>30;this.mt[y]=(this.mt[y]^(((E&4294901760)>>>16)*1566083941<<16)+(E&65535)*1566083941)-y,this.mt[y]>>>=0,y++,y>=this.N&&(this.mt[0]=this.mt[this.N-1],y=1)}this.mt[0]=2147483648},f.prototype.random_int=function(){var m,C=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var y;for(this.mti==this.N+1&&this.init_seed(5489),y=0;y<this.N-this.M;y++)m=this.mt[y]&this.UPPER_MASK|this.mt[y+1]&this.LOWER_MASK,this.mt[y]=this.mt[y+this.M]^m>>>1^C[m&1];for(;y<this.N-1;y++)m=this.mt[y]&this.UPPER_MASK|this.mt[y+1]&this.LOWER_MASK,this.mt[y]=this.mt[y+(this.M-this.N)]^m>>>1^C[m&1];m=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^m>>>1^C[m&1],this.mti=0}return m=this.mt[this.mti++],m^=m>>>11,m^=m<<7&2636928640,m^=m<<15&4022730752,m^=m>>>18,m>>>0},f.prototype.random_int31=function(){return this.random_int()>>>1},f.prototype.random_incl=function(){return this.random_int()*(1/4294967295)},f.prototype.random=function(){return this.random_int()*(1/4294967296)},f.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)},f.prototype.random_long=function(){var m=this.random_int()>>>5,C=this.random_int()>>>6;return(m*67108864+C)*(1/9007199254740992)},A.exports=f}),j_t=yh((o,A)=>{/*! https://mths.be/punycode v1.4.0 by @mathias */(function(f){var m=typeof o=="object"&&o&&!o.nodeType&&o,C=typeof A=="object"&&A&&!A.nodeType&&A,y=typeof global=="object"&&global;(y.global===y||y.window===y||y.self===y)&&(f=y);var x,v=2147483647,E=36,I=1,w=26,Q=38,M=700,B=72,T=128,D="-",F=/^xn--/,L=/[^\x20-\x7E]/,R=/[\x2E\u3002\uFF0E\uFF61]/g,k={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},U=E-I,V=Math.floor,H=String.fromCharCode,q;function ie(Ie){throw new RangeError(k[Ie])}function Z(Ie,ve){for(var K=Ie.length,W=[];K--;)W[K]=ve(Ie[K]);return W}function oe(Ie,ve){var K=Ie.split("@"),W="";K.length>1&&(W=K[0]+"@",Ie=K[1]),Ie=Ie.replace(R,".");var te=Ie.split("."),Y=Z(te,ve).join(".");return W+Y}function ne(Ie){for(var ve=[],K=0,W=Ie.length,te,Y;K<W;)te=Ie.charCodeAt(K++),te>=55296&&te<=56319&&K<W?(Y=Ie.charCodeAt(K++),(Y&64512)==56320?ve.push(((te&1023)<<10)+(Y&1023)+65536):(ve.push(te),K--)):ve.push(te);return ve}function se(Ie){return Z(Ie,function(ve){var K="";return ve>65535&&(ve-=65536,K+=H(ve>>>10&1023|55296),ve=56320|ve&1023),K+=H(ve),K}).join("")}function ce(Ie){return Ie-48<10?Ie-22:Ie-65<26?Ie-65:Ie-97<26?Ie-97:E}function j(Ie,ve){return Ie+22+75*(Ie<26)-((ve!=0)<<5)}function de(Ie,ve,K){var W=0;for(Ie=K?V(Ie/M):Ie>>1,Ie+=V(Ie/ve);Ie>U*w>>1;W+=E)Ie=V(Ie/U);return V(W+(U+1)*Ie/(Ie+Q))}function me(Ie){var ve=[],K=Ie.length,W,te=0,Y=T,he=B,fe,Ce,Ee,be,Re,Ne,Je,ot,nt;for(fe=Ie.lastIndexOf(D),fe<0&&(fe=0),Ce=0;Ce<fe;++Ce)Ie.charCodeAt(Ce)>=128&&ie("not-basic"),ve.push(Ie.charCodeAt(Ce));for(Ee=fe>0?fe+1:0;Ee<K;){for(be=te,Re=1,Ne=E;Ee>=K&&ie("invalid-input"),Je=ce(Ie.charCodeAt(Ee++)),(Je>=E||Je>V((v-te)/Re))&&ie("overflow"),te+=Je*Re,ot=Ne<=he?I:Ne>=he+w?w:Ne-he,!(Je<ot);Ne+=E)nt=E-ot,Re>V(v/nt)&&ie("overflow"),Re*=nt;W=ve.length+1,he=de(te-be,W,be==0),V(te/W)>v-Y&&ie("overflow"),Y+=V(te/W),te%=W,ve.splice(te++,0,Y)}return se(ve)}function _e(Ie){var ve,K,W,te,Y,he,fe,Ce,Ee,be,Re,Ne=[],Je,ot,nt,$e;for(Ie=ne(Ie),Je=Ie.length,ve=T,K=0,Y=B,he=0;he<Je;++he)Re=Ie[he],Re<128&&Ne.push(H(Re));for(W=te=Ne.length,te&&Ne.push(D);W<Je;){for(fe=v,he=0;he<Je;++he)Re=Ie[he],Re>=ve&&Re<fe&&(fe=Re);for(ot=W+1,fe-ve>V((v-K)/ot)&&ie("overflow"),K+=(fe-ve)*ot,ve=fe,he=0;he<Je;++he)if(Re=Ie[he],Re<ve&&++K>v&&ie("overflow"),Re==ve){for(Ce=K,Ee=E;be=Ee<=Y?I:Ee>=Y+w?w:Ee-Y,!(Ce<be);Ee+=E)$e=Ce-be,nt=E-be,Ne.push(H(j(be+$e%nt,0))),Ce=V($e/nt);Ne.push(H(j(Ce,0))),Y=de(K,ot,W==te),K=0,++W}++K,++ve}return Ne.join("")}function Be(Ie){return oe(Ie,function(ve){return F.test(ve)?me(ve.slice(4).toLowerCase()):ve})}function Qe(Ie){return oe(Ie,function(ve){return L.test(ve)?"xn--"+_e(ve):ve})}if(x={version:"1.3.2",ucs2:{decode:ne,encode:se},decode:me,encode:_e,toASCII:Qe,toUnicode:Be},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return x});else if(m&&C)if(A.exports==m)C.exports=x;else for(q in x)x.hasOwnProperty(q)&&(m[q]=x[q]);else f.punycode=x})(o)}),q_t=yh((o,A)=>{/*!
* URI.js - Mutating URLs
* IPv6 Support
*
@@ -7375,7 +7375,7 @@
       gl_FragColor.rgba = vec4(gl_FragColor.rgb * 0.85 + 0.15 * mix(vec3(1.0, 0.0, 0.0), vec3(0.0, 1.0, 0.0), 1.-step(visibility,0.5)),1.); 
    } else {        gl_FragColor.rgba = vec4(gl_FragColor.rgb * 0.6 + 0.4 * mix(shadowMap_viewshed_Back, shadowMap_viewshed_Fore, 1.-step(visibility,0.5)),1.);    }
`,R.push(U),new Fr({defines:L,sources:R})};var pF=oO;function p2(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.context;this._enabled=Ae(o.enabled,!0),this._softShadows=Ae(o.softShadows,!1),this._normalOffset=Ae(o.normalOffset,!0),this.dirty=!0,this.fromLightSource=Ae(o.fromLightSource,!0),this.darkness=Ae(o.darkness,.3),this._darkness=this.darkness,this.fadingEnabled=Ae(o.fadingEnabled,!0),this.maximumDistance=Ae(o.maximumDistance,5e3),this._outOfView=!1,this._outOfViewPrevious=!1,this._needsUpdate=!0;let f=!0;(Mo.isInternetExplorer()||Mo.isEdge()||(Mo.isChrome()||Mo.isFirefox())&&Mo.isWindows()&&!A.depthTexture)&&(f=!1),this._polygonOffsetSupported=f,this._terrainBias={polygonOffset:f,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:.5,normalShading:!0,normalShadingSmooth:.3,depthBias:1e-4},this._primitiveBias={polygonOffset:f,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:.1,normalShading:!0,normalShadingSmooth:.05,depthBias:2e-5},this._pointBias={polygonOffset:!1,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:0,normalShading:!0,normalShadingSmooth:.1,depthBias:5e-4},this._depthAttachment=void 0,this._colorAttachment=void 0,this._shadowMapMatrix=new Xe,this._shadowMapTexture=void 0,this._lightDirectionEC=new ee,this._lightPositionEC=new ai,this._distance=0,this._lightCamera=o.lightCamera,this._shadowMapCamera=new Qne,this._shadowMapCullingVolume=void 0,this._sceneCamera=void 0,this._boundingSphere=new wi,this._isPointLight=Ae(o.isPointLight,!1),this._pointLightRadius=Ae(o.pointLightRadius,100),this._cascadesEnabled=this._isPointLight?!1:Ae(o.cascadesEnabled,!0),this._numberOfCascades=this._cascadesEnabled?Ae(o.numberOfCascades,4):0,this._fitNearFar=!0,this._maximumCascadeDistances=[25,150,700,Number.MAX_VALUE],this._textureSize=new Bt,this._isSpotLight=!1,this._cascadesEnabled?this._shadowMapCamera.frustum=new K0:O(this._lightCamera.frustum.fov)&&(this._isSpotLight=!0),this._cascadeSplits=[new ai,new ai],this._cascadeMatrices=[new Xe,new Xe,new Xe,new Xe],this._cascadeDistances=new ai;let m;this._isPointLight?m=6:this._cascadesEnabled?m=this._numberOfCascades:m=1,this._passes=new Array(m);for(let C=0;C<m;++C)this._passes[C]=new Sti(A);this.debugShow=!1,this.debugFreezeFrame=!1,this._debugFreezeFrame=!1,this._debugCascadeColors=!1,this._debugLightFrustum=void 0,this._debugCameraFrustum=void 0,this._debugCascadeFrustums=new Array(this._numberOfCascades),this._debugShadowViewCommand=void 0,this._usesDepthTexture=A.depthTexture,this._isPointLight&&(this._usesDepthTexture=!1),this._primitiveRenderState=void 0,this._terrainRenderState=void 0,this._pointRenderState=void 0,H_e(this),this._clearCommand=new eA({depth:1,color:new At}),this._clearPassState=new cm(A),this._size=Ae(o.size,2048),this.size=this._size}p2.MAXIMUM_DISTANCE=2e4;function Sti(o){this.camera=new Qne,this.passState=new cm(o),this.framebuffer=void 0,this.textureOffsets=void 0,this.commandList=[],this.cullingVolume=void 0}function vfe(o,A){return fn.fromCache({cull:{enabled:!0,face:mA.BACK},depthTest:{enabled:!0},colorMask:{red:o,green:o,blue:o,alpha:o},depthMask:!0,polygonOffset:{enabled:A.polygonOffset,factor:A.polygonOffsetFactor,units:A.polygonOffsetUnits}})}function H_e(o){let A=!o._usesDepthTexture;o._primitiveRenderState=vfe(A,o._primitiveBias),o._terrainRenderState=vfe(A,o._terrainBias),o._pointRenderState=vfe(A,o._pointBias)}p2.prototype.debugCreateRenderStates=function(){H_e(this)};Object.defineProperties(p2.prototype,{enabled:{get:function(){return this._enabled},set:function(o){this.dirty=this._enabled!==o,this._enabled=o}},normalOffset:{get:function(){return this._normalOffset},set:function(o){this.dirty=this._normalOffset!==o,this._normalOffset=o,this._terrainBias.normalOffset=o,this._primitiveBias.normalOffset=o,this._pointBias.normalOffset=o}},softShadows:{get:function(){return this._softShadows},set:function(o){this.dirty=this._softShadows!==o,this._softShadows=o}},size:{get:function(){return this._size},set:function(o){Lti(this,o)}},outOfView:{get:function(){return this._outOfView}},shadowMapCullingVolume:{get:function(){return this._shadowMapCullingVolume}},passes:{get:function(){return this._passes}},isPointLight:{get:function(){return this._isPointLight}},debugCascadeColors:{get:function(){return this._debugCascadeColors},set:function(o){this.dirty=this._debugCascadeColors!==o,this._debugCascadeColors=o}}});function V_e(o){let A=o._passes.length;for(let f=0;f<A;++f){let m=o._passes[f],C=m.framebuffer;O(C)&&!C.isDestroyed()&&C.destroy(),m.framebuffer=void 0}o._depthAttachment=o._depthAttachment&&o._depthAttachment.destroy(),o._colorAttachment=o._colorAttachment&&o._colorAttachment.destroy()}function Qet(){return new Hs({wrapS:Za.CLAMP_TO_EDGE,wrapT:Za.CLAMP_TO_EDGE,minificationFilter:fs.NEAREST,magnificationFilter:Ch.NEAREST})}function Dti(o,A){let f=new G_({context:A,width:o._textureSize.x,height:o._textureSize.y,format:qE.DEPTH_COMPONENT16}),m=new yo({context:A,width:o._textureSize.x,height:o._textureSize.y,pixelFormat:Gn.RGBA,pixelDatatype:Qn.UNSIGNED_BYTE,sampler:Qet()}),C=new Bp({context:A,depthRenderbuffer:f,colorTextures:[m],destroyAttachments:!1}),y=o._passes.length;for(let x=0;x<y;++x){let v=o._passes[x];v.framebuffer=C,v.passState.framebuffer=C}o._shadowMapTexture=m,o._depthAttachment=f,o._colorAttachment=m}function Tti(o,A){let f=new yo({context:A,width:o._textureSize.x,height:o._textureSize.y,pixelFormat:Gn.DEPTH_STENCIL,pixelDatatype:Qn.UNSIGNED_INT_24_8,sampler:Qet()}),m=new Bp({context:A,depthStencilTexture:f,destroyAttachments:!1}),C=o._passes.length;for(let y=0;y<C;++y){let x=o._passes[y];x.framebuffer=m,x.passState.framebuffer=m}o._shadowMapTexture=f,o._depthAttachment=f}function Mti(o,A){let f=new G_({context:A,width:o._textureSize.x,height:o._textureSize.y,format:qE.DEPTH_COMPONENT16}),m=new uQ({context:A,width:o._textureSize.x,height:o._textureSize.y,pixelFormat:Gn.RGBA,pixelDatatype:Qn.UNSIGNED_BYTE,sampler:Hs.NEAREST}),C=[m.negativeX,m.negativeY,m.negativeZ,m.positiveX,m.positiveY,m.positiveZ];for(let y=0;y<6;++y){let x=new Bp({context:A,depthRenderbuffer:f,colorTextures:[C[y]],destroyAttachments:!1}),v=o._passes[y];v.framebuffer=x,v.passState.framebuffer=x}o._shadowMapTexture=m,o._depthAttachment=f,o._colorAttachment=m}function Det(o,A){o._isPointLight?Mti(o,A):o._usesDepthTexture?Tti(o,A):Dti(o,A)}function Pti(o,A){o._usesDepthTexture&&o._passes[0].framebuffer.status!==Ii.FRAMEBUFFER_COMPLETE&&(o._usesDepthTexture=!1,H_e(o),V_e(o),Det(o,A))}function Rti(o,A){(!O(o._passes[0].framebuffer)||o._shadowMapTexture.width!==o._textureSize.x)&&(V_e(o),Det(o,A),Pti(o,A),Tet(o,A))}function Tet(o,A,f){f=Ae(f,0),(o._isPointLight||f===0)&&(o._clearCommand.framebuffer=o._passes[f].framebuffer,o._clearCommand.execute(A,o._clearPassState))}function Lti(o,A){o._size=A;let f=o._passes,m=f.length,C=o._textureSize;if(o._isPointLight){A=Co.maximumCubeMapSize>=A?A:Co.maximumCubeMapSize,C.x=A,C.y=A;let y=new Kr(0,0,A,A);f[0].passState.viewport=y,f[1].passState.viewport=y,f[2].passState.viewport=y,f[3].passState.viewport=y,f[4].passState.viewport=y,f[5].passState.viewport=y}else m===1?(A=Co.maximumTextureSize>=A?A:Co.maximumTextureSize,C.x=A,C.y=A,f[0].passState.viewport=new Kr(0,0,A,A)):m===4&&(A=Co.maximumTextureSize>=A*2?A:Co.maximumTextureSize/2,C.x=A*2,C.y=A*2,f[0].passState.viewport=new Kr(0,0,A,A),f[1].passState.viewport=new Kr(A,0,A,A),f[2].passState.viewport=new Kr(0,A,A,A),f[3].passState.viewport=new Kr(A,A,A,A));o._clearPassState.viewport=new Kr(0,0,C.x,C.y);for(let y=0;y<m;++y){let x=f[y],v=x.passState.viewport,E=v.x/C.x,I=v.y/C.y,w=v.width/C.x,Q=v.height/C.y;x.textureOffsets=new Xe(w,0,0,E,0,Q,0,I,0,0,1,0,0,0,0,1)}}var Fti=new Kr;function Nti(o,A){let f;o._isPointLight?f=`uniform samplerCube shadowMap_textureCube;
`,R.push(U),new Fr({defines:L,sources:R})};var pF=oO;function p2(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.context;this._enabled=Ae(o.enabled,!0),this._softShadows=Ae(o.softShadows,!1),this._normalOffset=Ae(o.normalOffset,!0),this.dirty=!0,this.fromLightSource=Ae(o.fromLightSource,!0),this.darkness=Ae(o.darkness,.3),this._darkness=this.darkness,this.fadingEnabled=Ae(o.fadingEnabled,!0),this.maximumDistance=Ae(o.maximumDistance,5e3),this._outOfView=!1,this._outOfViewPrevious=!1,this._needsUpdate=!0;let f=!0;(Mo.isInternetExplorer()||Mo.isEdge()||(Mo.isChrome()||Mo.isFirefox())&&Mo.isWindows()&&!A.depthTexture)&&(f=!1),this._polygonOffsetSupported=f,this._terrainBias={polygonOffset:f,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:.5,normalShading:!0,normalShadingSmooth:.3,depthBias:1e-4},this._primitiveBias={polygonOffset:f,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:.1,normalShading:!0,normalShadingSmooth:.05,depthBias:2e-5},this._pointBias={polygonOffset:!1,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:0,normalShading:!0,normalShadingSmooth:.1,depthBias:5e-4},this._depthAttachment=void 0,this._colorAttachment=void 0,this._shadowMapMatrix=new Xe,this._shadowMapTexture=void 0,this._lightDirectionEC=new ee,this._lightPositionEC=new ai,this._distance=0,this._lightCamera=o.lightCamera,this._shadowMapCamera=new Qne,this._shadowMapCullingVolume=void 0,this._sceneCamera=void 0,this._boundingSphere=new wi,this._isPointLight=Ae(o.isPointLight,!1),this._pointLightRadius=Ae(o.pointLightRadius,100),this._cascadesEnabled=this._isPointLight?!1:Ae(o.cascadesEnabled,!0),this._numberOfCascades=this._cascadesEnabled?Ae(o.numberOfCascades,4):0,this._fitNearFar=!0,this._maximumCascadeDistances=[25,150,700,Number.MAX_VALUE],this._textureSize=new Bt,this._isSpotLight=!1,this._cascadesEnabled?this._shadowMapCamera.frustum=new K0:O(this._lightCamera.frustum.fov)&&(this._isSpotLight=!0),this._cascadeSplits=[new ai,new ai],this._cascadeMatrices=[new Xe,new Xe,new Xe,new Xe],this._cascadeDistances=new ai;let m;this._isPointLight?m=6:this._cascadesEnabled?m=this._numberOfCascades:m=1,this._passes=new Array(m);for(let C=0;C<m;++C)this._passes[C]=new Sti(A);this.debugShow=!1,this.debugFreezeFrame=!1,this._debugFreezeFrame=!1,this._debugCascadeColors=!1,this._debugLightFrustum=void 0,this._debugCameraFrustum=void 0,this._debugCascadeFrustums=new Array(this._numberOfCascades),this._debugShadowViewCommand=void 0,this._usesDepthTexture=A.depthTexture,this._isPointLight&&(this._usesDepthTexture=!1),this._primitiveRenderState=void 0,this._terrainRenderState=void 0,this._pointRenderState=void 0,H_e(this),this._clearCommand=new eA({depth:1,color:new At}),this._clearPassState=new cm(A),this._size=Ae(o.size,2048),this.size=this._size,this._shadowBackCull=o.shadowBackCull}p2.MAXIMUM_DISTANCE=2e4;function Sti(o){this.camera=new Qne,this.passState=new cm(o),this.framebuffer=void 0,this.textureOffsets=void 0,this.commandList=[],this.cullingVolume=void 0}function vfe(o,A){return fn.fromCache({cull:{enabled:!0,face:mA.BACK},depthTest:{enabled:!0},colorMask:{red:o,green:o,blue:o,alpha:o},depthMask:!0,polygonOffset:{enabled:A.polygonOffset,factor:A.polygonOffsetFactor,units:A.polygonOffsetUnits}})}function H_e(o){let A=!o._usesDepthTexture;o._primitiveRenderState=vfe(A,o._primitiveBias),o._terrainRenderState=vfe(A,o._terrainBias),o._pointRenderState=vfe(A,o._pointBias)}p2.prototype.debugCreateRenderStates=function(){H_e(this)};Object.defineProperties(p2.prototype,{enabled:{get:function(){return this._enabled},set:function(o){this.dirty=this._enabled!==o,this._enabled=o}},normalOffset:{get:function(){return this._normalOffset},set:function(o){this.dirty=this._normalOffset!==o,this._normalOffset=o,this._terrainBias.normalOffset=o,this._primitiveBias.normalOffset=o,this._pointBias.normalOffset=o}},softShadows:{get:function(){return this._softShadows},set:function(o){this.dirty=this._softShadows!==o,this._softShadows=o}},size:{get:function(){return this._size},set:function(o){Lti(this,o)}},outOfView:{get:function(){return this._outOfView}},shadowMapCullingVolume:{get:function(){return this._shadowMapCullingVolume}},passes:{get:function(){return this._passes}},isPointLight:{get:function(){return this._isPointLight}},debugCascadeColors:{get:function(){return this._debugCascadeColors},set:function(o){this.dirty=this._debugCascadeColors!==o,this._debugCascadeColors=o}}});function V_e(o){let A=o._passes.length;for(let f=0;f<A;++f){let m=o._passes[f],C=m.framebuffer;O(C)&&!C.isDestroyed()&&C.destroy(),m.framebuffer=void 0}o._depthAttachment=o._depthAttachment&&o._depthAttachment.destroy(),o._colorAttachment=o._colorAttachment&&o._colorAttachment.destroy()}function Qet(){return new Hs({wrapS:Za.CLAMP_TO_EDGE,wrapT:Za.CLAMP_TO_EDGE,minificationFilter:fs.NEAREST,magnificationFilter:Ch.NEAREST})}function Dti(o,A){let f=new G_({context:A,width:o._textureSize.x,height:o._textureSize.y,format:qE.DEPTH_COMPONENT16}),m=new yo({context:A,width:o._textureSize.x,height:o._textureSize.y,pixelFormat:Gn.RGBA,pixelDatatype:Qn.UNSIGNED_BYTE,sampler:Qet()}),C=new Bp({context:A,depthRenderbuffer:f,colorTextures:[m],destroyAttachments:!1}),y=o._passes.length;for(let x=0;x<y;++x){let v=o._passes[x];v.framebuffer=C,v.passState.framebuffer=C}o._shadowMapTexture=m,o._depthAttachment=f,o._colorAttachment=m}function Tti(o,A){let f=new yo({context:A,width:o._textureSize.x,height:o._textureSize.y,pixelFormat:Gn.DEPTH_STENCIL,pixelDatatype:Qn.UNSIGNED_INT_24_8,sampler:Qet()}),m=new Bp({context:A,depthStencilTexture:f,destroyAttachments:!1}),C=o._passes.length;for(let y=0;y<C;++y){let x=o._passes[y];x.framebuffer=m,x.passState.framebuffer=m}o._shadowMapTexture=f,o._depthAttachment=f}function Mti(o,A){let f=new G_({context:A,width:o._textureSize.x,height:o._textureSize.y,format:qE.DEPTH_COMPONENT16}),m=new uQ({context:A,width:o._textureSize.x,height:o._textureSize.y,pixelFormat:Gn.RGBA,pixelDatatype:Qn.UNSIGNED_BYTE,sampler:Hs.NEAREST}),C=[m.negativeX,m.negativeY,m.negativeZ,m.positiveX,m.positiveY,m.positiveZ];for(let y=0;y<6;++y){let x=new Bp({context:A,depthRenderbuffer:f,colorTextures:[C[y]],destroyAttachments:!1}),v=o._passes[y];v.framebuffer=x,v.passState.framebuffer=x}o._shadowMapTexture=m,o._depthAttachment=f,o._colorAttachment=m}function Det(o,A){o._isPointLight?Mti(o,A):o._usesDepthTexture?Tti(o,A):Dti(o,A)}function Pti(o,A){o._usesDepthTexture&&o._passes[0].framebuffer.status!==Ii.FRAMEBUFFER_COMPLETE&&(o._usesDepthTexture=!1,H_e(o),V_e(o),Det(o,A))}function Rti(o,A){(!O(o._passes[0].framebuffer)||o._shadowMapTexture.width!==o._textureSize.x)&&(V_e(o),Det(o,A),Pti(o,A),Tet(o,A))}function Tet(o,A,f){f=Ae(f,0),(o._isPointLight||f===0)&&(o._clearCommand.framebuffer=o._passes[f].framebuffer,o._clearCommand.execute(A,o._clearPassState))}function Lti(o,A){o._size=A;let f=o._passes,m=f.length,C=o._textureSize;if(o._isPointLight){A=Co.maximumCubeMapSize>=A?A:Co.maximumCubeMapSize,C.x=A,C.y=A;let y=new Kr(0,0,A,A);f[0].passState.viewport=y,f[1].passState.viewport=y,f[2].passState.viewport=y,f[3].passState.viewport=y,f[4].passState.viewport=y,f[5].passState.viewport=y}else m===1?(A=Co.maximumTextureSize>=A?A:Co.maximumTextureSize,C.x=A,C.y=A,f[0].passState.viewport=new Kr(0,0,A,A)):m===4&&(A=Co.maximumTextureSize>=A*2?A:Co.maximumTextureSize/2,C.x=A*2,C.y=A*2,f[0].passState.viewport=new Kr(0,0,A,A),f[1].passState.viewport=new Kr(A,0,A,A),f[2].passState.viewport=new Kr(0,A,A,A),f[3].passState.viewport=new Kr(A,A,A,A));o._clearPassState.viewport=new Kr(0,0,C.x,C.y);for(let y=0;y<m;++y){let x=f[y],v=x.passState.viewport,E=v.x/C.x,I=v.y/C.y,w=v.width/C.x,Q=v.height/C.y;x.textureOffsets=new Xe(w,0,0,E,0,Q,0,I,0,0,1,0,0,0,0,1)}}var Fti=new Kr;function Nti(o,A){let f;o._isPointLight?f=`uniform samplerCube shadowMap_textureCube;
varying vec2 v_textureCoordinates; 
void main() 
@@ -11975,7 +11975,7 @@
`:`    float shadow = czm_unpackDepth(texture2D(shadowMap_texture, v_textureCoordinates)); 
`}    gl_FragColor = vec4(vec3(shadow), 1.0); 
`;let m=A.createViewportQuadCommand(f,{uniformMap:{shadowMap_texture:function(){return o._shadowMapTexture},shadowMap_textureCube:function(){return o._shadowMapTexture}}});return m.pass=hr.OVERLAY,m}function dIi(o,A){let f=A.context,m=A.context.drawingBufferWidth,C=A.context.drawingBufferHeight,y=Math.min(m,C)*.3,x=AIi;x.x=m-y,x.y=0,x.width=y,x.height=y;let v=o._debugShadowViewCommand;O(v)||(v=hIi(o,f),o._debugShadowViewCommand=v),(!O(v.renderState)||!Kr.equals(v.renderState.viewport,x))&&(v.renderState=fn.fromCache({viewport:Kr.clone(x)})),A.commandList.push(o._debugShadowViewCommand)}var I2=new Array(8);I2[0]=new ai(-1,-1,-1,1);I2[1]=new ai(1,-1,-1,1);I2[2]=new ai(1,1,-1,1);I2[3]=new ai(-1,1,-1,1);I2[4]=new ai(-1,-1,1,1);I2[5]=new ai(1,-1,1,1);I2[6]=new ai(1,1,1,1);I2[7]=new ai(-1,1,1,1);var eF=new Xe,hQe=new Array(8);for(let o=0;o<8;++o)hQe[o]=new ai;function fIi(o,A){let f=new co({geometry:new r2({minimum:new ee(-.5,-.5,-.5),maximum:new ee(.5,.5,.5)}),attributes:{color:Yo.fromColor(A)}}),m=new co({geometry:new tP({radius:.5}),attributes:{color:Yo.fromColor(A)}});return new Xa({geometryInstances:[f,m],appearance:new Va({translucent:!1,flat:!0}),asynchronous:!1,modelMatrix:o})}var gIi=[At.RED,At.GREEN,At.BLUE,At.MAGENTA],pIi=new ee;function mIi(o,A){dIi(o,A);let f=o.debugFreezeFrame&&!o._debugFreezeFrame;if(o._debugFreezeFrame=o.debugFreezeFrame,o.debugFreezeFrame&&(f&&(o._debugCameraFrustum=o._debugCameraFrustum&&o._debugCameraFrustum.destroy(),o._debugCameraFrustum=new _g({camera:o._sceneCamera,color:At.CYAN,updateOnChange:!1})),o._debugCameraFrustum.update(A)),o._cascadesEnabled){if(o.debugFreezeFrame){f&&(o._debugLightFrustum=o._debugLightFrustum&&o._debugLightFrustum.destroy(),o._debugLightFrustum=new _g({camera:o._shadowMapCamera,color:At.YELLOW,updateOnChange:!1})),o._debugLightFrustum.update(A);for(let m=0;m<o._numberOfCascades;++m)f&&(o._debugCascadeFrustums[m]=o._debugCascadeFrustums[m]&&o._debugCascadeFrustums[m].destroy(),o._debugCascadeFrustums[m]=new _g({camera:o._passes[m].camera,color:gIi[m],updateOnChange:!1})),o._debugCascadeFrustums[m].update(A)}}else if(o._isPointLight){if(!O(o._debugLightFrustum)||o._needsUpdate){let m=o._shadowMapCamera.positionWC,C=jr.IDENTITY,y=o._pointLightRadius*2,x=ee.fromElements(y,y,y,pIi),v=Xe.fromTranslationQuaternionRotationScale(m,C,x,eF);o._debugLightFrustum=o._debugLightFrustum&&o._debugLightFrustum.destroy(),o._debugLightFrustum=fIi(v,At.YELLOW)}o._debugLightFrustum.update(A)}else(!O(o._debugLightFrustum)||o._needsUpdate)&&(o._debugLightFrustum=new _g({camera:o._shadowMapCamera,color:At.YELLOW,updateOnChange:!1})),o._debugLightFrustum.update(A)}function Roe(){this.viewMatrix=new Xe,this.inverseViewMatrix=new Xe,this.frustum=void 0,this.positionCartographic=new Kt,this.positionWC=new ee,this.directionWC=ee.clone(ee.UNIT_Z),this.upWC=ee.clone(ee.UNIT_Y),this.rightWC=ee.clone(ee.UNIT_X),this.viewProjectionMatrix=new Xe}Roe.prototype.clone=function(o){Xe.clone(o.viewMatrix,this.viewMatrix),Xe.clone(o.inverseViewMatrix,this.inverseViewMatrix),this.frustum=o.frustum.clone(this.frustum),Kt.clone(o.positionCartographic,this.positionCartographic),ee.clone(o.positionWC,this.positionWC),ee.clone(o.directionWC,this.directionWC),ee.clone(o.upWC,this.upWC),ee.clone(o.rightWC,this.rightWC)};var CIi=new Xe(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1);Roe.prototype.getViewProjection=function(){let o=this.viewMatrix,A=this.frustum.projectionMatrix;return Xe.multiply(A,o,this.viewProjectionMatrix),Xe.multiply(CIi,this.viewProjectionMatrix,this.viewProjectionMatrix),this.viewProjectionMatrix};var yIi=new Array(5),xIi=new Yu,vIi=new Array(4),Wnt=new ee,jnt=new ee;function EIi(o,A){let f=o._shadowMapCamera,m=o._sceneCamera,C=m.frustum.near,y=m.frustum.far,x=o._numberOfCascades,v,E=y-C,I=y/C,w=.9,Q=!1;A.viewShedState.closestObjectSize<200&&(Q=!0,w=.9);let M=vIi,B=yIi;for(B[0]=C,B[x]=y,v=0;v<x;++v){let oe=(v+1)/x,ne=C*Math.pow(I,oe),se=C+E*oe,ce=je.lerp(se,ne,w);B[v+1]=ce,M[v]=ce-B[v]}if(Q){for(v=0;v<x;++v)M[v]=Math.min(M[v],o._maximumCascadeDistances[v]);let oe=B[0];for(v=0;v<x-1;++v)oe+=M[v],B[v+1]=oe}ai.unpack(B,0,o._cascadeSplits[0]),ai.unpack(B,1,o._cascadeSplits[1]),ai.unpack(M,0,o._cascadeDistances);let T=f.frustum,D=T.left,F=T.right,L=T.bottom,R=T.top,k=T.near,U=T.far,V=f.positionWC,H=f.directionWC,q=f.upWC,ie=m.frustum.clone(xIi),Z=f.getViewProjection();for(v=0;v<x;++v){ie.near=B[v],ie.far=B[v+1];let oe=Xe.multiply(ie.projectionMatrix,m.viewMatrix,eF),ne=Xe.inverse(oe,eF),se=Xe.multiply(Z,ne,eF),ce=ee.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,Wnt),j=ee.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,jnt);for(let Qe=0;Qe<8;++Qe){let Ie=ai.clone(I2[Qe],hQe[Qe]);Xe.multiplyByVector(se,Ie,Ie),ee.divideByScalar(Ie,Ie.w,Ie),ee.minimumByComponent(Ie,ce,ce),ee.maximumByComponent(Ie,j,j)}ce.x=Math.max(ce.x,0),ce.y=Math.max(ce.y,0),ce.z=0,j.x=Math.min(j.x,1),j.y=Math.min(j.y,1),j.z=Math.min(j.z,1);let de=o._passes[v],me=de.camera;me.clone(f);let _e=me.frustum;_e.left=D+ce.x*(F-D),_e.right=D+j.x*(F-D),_e.bottom=L+ce.y*(R-L),_e.top=L+j.y*(R-L),_e.near=k+ce.z*(U-k),_e.far=k+j.z*(U-k),de.cullingVolume=me.frustum.computeCullingVolume(V,H,q);let Be=o._cascadeMatrices[v];Xe.multiply(me.getViewProjection(),m.inverseViewMatrix,Be),Xe.multiply(de.textureOffsets,Be,Be)}}var IIi=new Xe,_Ii=new ee,BIi=new ee,V9e=new ee;function wIi(o,A){let f=o._shadowMapCamera,m=o._sceneCamera,C=Xe.multiply(m.frustum.projectionMatrix,m.viewMatrix,eF),y=Xe.inverse(C,eF),x=f.directionWC,v=m.directionWC;ee.equalsEpsilon(x,v,je.EPSILON10)&&(v=m.upWC);let E=ee.cross(x,v,_Ii);v=ee.cross(E,x,BIi),ee.normalize(v,v),ee.normalize(E,E);let I=ee.fromElements(0,0,0,V9e),w=Xe.computeView(I,x,v,E,IIi),Q=Xe.multiply(w,y,eF),M=ee.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,Wnt),B=ee.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,jnt);for(let U=0;U<8;++U){let V=ai.clone(I2[U],hQe[U]);Xe.multiplyByVector(Q,V,V),ee.divideByScalar(V,V.w,V),ee.minimumByComponent(V,M,M),ee.maximumByComponent(V,B,B)}B.z+=1e3,M.z-=10;let T=V9e;T.x=-(.5*(M.x+B.x)),T.y=-(.5*(M.y+B.y)),T.z=-B.z;let D=Xe.fromTranslation(T,eF);w=Xe.multiply(D,w,w);let F=.5*(B.x-M.x),L=.5*(B.y-M.y),R=B.z-M.z,k=f.frustum;k.left=-F,k.right=F,k.bottom=-L,k.top=L,k.near=.01,k.far=R,Xe.clone(w,f.viewMatrix),Xe.inverse(w,f.inverseViewMatrix),Xe.getTranslation(f.inverseViewMatrix,f.positionWC),A.mapProjection.ellipsoid.cartesianToCartographic(f.positionWC,f.positionCartographic),ee.clone(x,f.directionWC),ee.clone(v,f.upWC),ee.clone(E,f.rightWC)}var bIi=[new ee(-1,0,0),new ee(0,-1,0),new ee(0,0,-1),new ee(1,0,0),new ee(0,1,0),new ee(0,0,1)],QIi=[new ee(0,-1,0),new ee(0,0,-1),new ee(0,-1,0),new ee(0,-1,0),new ee(0,0,1),new ee(0,-1,0)],SIi=[new ee(0,0,1),new ee(1,0,0),new ee(-1,0,0),new ee(0,0,-1),new ee(1,0,0),new ee(1,0,0)];function DIi(o,A){let f=new Yu;f.fov=je.PI_OVER_TWO,f.near=1,f.far=o._pointLightRadius,f.aspectRatio=1;for(let m=0;m<6;++m){let C=o._passes[m].camera;C.positionWC=o._shadowMapCamera.positionWC,C.positionCartographic=A.mapProjection.ellipsoid.cartesianToCartographic(C.positionWC,C.positionCartographic),C.directionWC=bIi[m],C.upWC=QIi[m],C.rightWC=SIi[m],Xe.computeView(C.positionWC,C.directionWC,C.upWC,C.rightWC,C.viewMatrix),Xe.inverse(C.viewMatrix,C.inverseViewMatrix),C.frustum=f}}var TIi=new ee,MIi=new ee,qnt=new wi,z9e=qnt.center;function PIi(o,A){let f=o._sceneCamera,m=o._shadowMapCamera,C=qnt;if(o._cascadesEnabled){if(f.frustum.near>=o.maximumDistance){o._outOfView=!0,o._needsUpdate=!1;return}let y=A.mapProjection.ellipsoid.geodeticSurfaceNormal(f.positionWC,TIi),x=ee.negate(m.directionWC,MIi),v=ee.dot(y,x),E=je.clamp(v/.1,0,1);if(o._darkness=je.lerp(1,o.darkness,E),v<0){o._outOfView=!0,o._needsUpdate=!1;return}o._needsUpdate=!0,o._outOfView=!1}else if(o._isPointLight)C.center=m.positionWC,C.radius=o._pointLightRadius,o._outOfView=A.cullingVolume.computeVisibility(C)===La.OUTSIDE,o._needsUpdate=!o._outOfView&&!o._boundingSphere.equals(C),wi.clone(C,o._boundingSphere);else{let y=m.frustum.far/2,x=ee.add(m.positionWC,ee.multiplyByScalar(m.directionWC,y,z9e),z9e);C.center=x,C.radius=y,o._outOfView=A.cullingVolume.computeVisibility(C)===La.OUTSIDE,o._needsUpdate=!o._outOfView&&!o._boundingSphere.equals(C),wi.clone(C,o._boundingSphere)}}function RIi(o,A){let f=A.camera,m=o._lightCamera,C=o._sceneCamera,y=o._shadowMapCamera;o._cascadesEnabled?ee.clone(m.directionWC,y.directionWC):o._isPointLight?ee.clone(m.positionWC,y.positionWC):y.clone(m);let x=o._lightDirectionEC;Xe.multiplyByPointAsVector(f.viewMatrix,y.directionWC,x),ee.normalize(x,x),ee.negate(x,x),Xe.multiplyByPoint(f.viewMatrix,y.positionWC,o._lightPositionEC),o._lightPositionEC.w=o._pointLightRadius;let v,E;o._fitNearFar?(v=Math.min(A.viewShedState.nearPlane,o.maximumDistance),E=Math.min(A.viewShedState.farPlane,o.maximumDistance+1)):(v=f.frustum.near,E=o.maximumDistance),o._sceneCamera=Ml.clone(f,C),f.frustum.clone(o._sceneCamera.frustum),o._sceneCamera.frustum.near=v,o._sceneCamera.frustum.far=E,o._distance=E-v,PIi(o,A),!o._outOfViewPrevious&&o._outOfView&&(o._needsUpdate=!0),o._outOfViewPrevious=o._outOfView}E2.prototype.update=function(o){if(RIi(this,o),this._needsUpdate)if(uIi(this,o.context),this._isPointLight&&DIi(this,o),this._cascadesEnabled&&(wIi(this,o),this._numberOfCascades>1&&EIi(this,o)),this._isPointLight)this._shadowMapCullingVolume=AC.fromBoundingSphere(this._boundingSphere);else{let A=this._shadowMapCamera,f=A.positionWC,m=A.directionWC,C=A.upWC;this._shadowMapCullingVolume=A.frustum.computeCullingVolume(f,m,C),this._passes.length===1&&this._passes[0].camera.clone(A)}if(this._passes.length===1){let A=this._sceneCamera.inverseViewMatrix;Xe.multiply(this._shadowMapCamera.getViewProjection(),A,this._shadowMapMatrix)}this.debugShow&&mIi(this,o)};E2.prototype.updatePass=function(o,A){Jnt(this,o,A)};var LIi=new Bt;function Xnt(o,A,f){let m=o._isPointLight?o._pointBias:f?o._terrainBias:o._primitiveBias,C={shadowMap_texture:function(){return o._shadowMapTexture},shadowMap_textureCube:function(){return o._shadowMapTexture},shadowMap_matrix:function(){return o._shadowMapMatrix},shadowMap_cascadeSplits:function(){return o._cascadeSplits},shadowMap_cascadeMatrices:function(){return o._cascadeMatrices},shadowMap_lightDirectionEC:function(){return o._lightDirectionEC},shadowMap_lightPositionEC:function(){return o._lightPositionEC},shadowMap_cascadeDistances:function(){return o._cascadeDistances},shadowMap_texelSizeDepthBiasAndNormalShadingSmooth:function(){let y=LIi;return y.x=1/o._textureSize.x,y.y=1/o._textureSize.y,ai.fromElements(y.x,y.y,m.depthBias,m.normalShadingSmooth,this.combinedUniforms1)},shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness:function(){return ai.fromElements(m.normalOffsetScale,o._distance,o.maximumDistance,o._darkness,this.combinedUniforms2)},camera_projection_matrix:function(){return o._lightCamera.frustum.projectionMatrix},camera_view_matrix:function(){return o._lightCamera.viewMatrix},far:function(){return o._pointLightRadius},u_visibleColor:function(){return o.visibleColor},u_invisibleColor:function(){return o.invisibleColor},combinedUniforms1:new ai,combinedUniforms2:new ai};return ia(A,C,!1)}function FIi(o,A,f,m,C,y){let x,v,E;if(O(y)&&(x=y.shaderProgram,v=y.renderState,E=y.uniformMap),y=On.shallowClone(f,y),y.castShadows=!0,y.receiveShadows=!1,!O(x)||C!==f.shaderProgram.id||A){let I=f.shaderProgram,w=f.pass===hr.GLOBE,Q=f.pass!==hr.TRANSLUCENT,M=o._isPointLight,B=o._usesDepthTexture,T=EF.getShadowCastShaderKeyword(M,w,B,Q);if(x=m.shaderCache.getDerivedShaderProgram(I,T),!O(x)){let D=I.vertexShaderSource,F=I.fragmentShaderSource,L=EF.createShadowCastVertexShader(D,M,w),R=EF.createShadowCastFragmentShader(F,M,B,Q);x=m.shaderCache.createDerivedShaderProgram(I,T,{vertexShaderSource:L,fragmentShaderSource:R,attributeLocations:I._attributeLocations})}v=o._primitiveRenderState,M?v=o._pointRenderState:w&&(v=o._terrainRenderState),f.renderState.cull.enabled||(v=xo(v,!1),v.cull=xo(v.cull,!1),v.cull.enabled=!1,v=fn.fromCache(v)),E=Xnt(o,f.uniformMap,w)}return y.shaderProgram=x,y.renderState=v,y.uniformMap=E,y}E2.createReceiveDerivedCommand=function(o,A,f,m,C){O(C)||(C={});let y=o.length>0,x=A.shaderProgram,v=x.vertexShaderSource,E=x.fragmentShaderSource,I=A.pass===hr.GLOBE,w=!1;if(I&&(w=A.owner.data.renderedMesh.encoding.hasVertexNormals),A.receiveShadows&&y){let Q,M;O(C.receiveCommand)&&(Q=C.receiveCommand.shaderProgram,M=C.receiveCommand.uniformMap),C.receiveCommand=On.shallowClone(A,C.receiveCommand),C.castShadows=!1,C.receiveShadows=!0;let B=C.receiveShaderCastShadows!==A.castShadows,T=C.receiveShaderProgramId!==A.shaderProgram.id;if(!O(Q)||T||f||B){let D=EF.getShadowReceiveShaderKeyword(o[0],A.castShadows,I,w);if(Q=m.shaderCache.getDerivedShaderProgram(x,D),!O(Q)){let F=EF.createShadowReceiveVertexShader(v,I,w),L=EF.createShadowReceiveFragmentShader(E,o[0],A.castShadows,I,w);Q=m.shaderCache.createDerivedShaderProgram(x,D,{vertexShaderSource:F,fragmentShaderSource:L,attributeLocations:x._attributeLocations})}M=Xnt(o[0],A.uniformMap,I)}C.receiveCommand.shaderProgram=Q,C.receiveCommand.uniformMap=M,C.receiveShaderProgramId=A.shaderProgram.id,C.receiveShaderCastShadows=A.castShadows}return C};E2.createCastDerivedCommand=function(o,A,f,m,C){if(O(C)||(C={}),A.castShadows){let y=C.castCommands;O(y)||(y=C.castCommands=[]);let x=C.castShaderProgramId,v=o.length;y.length=v;for(let E=0;E<v;++E)y[E]=FIi(o[E],f,A,m,x,y[E]);C.castShaderProgramId=A.shaderProgram.id}return C};E2.prototype.isDestroyed=function(){return!1};E2.prototype.destroy=function(){AQe(this),this._debugLightFrustum=this._debugLightFrustum&&this._debugLightFrustum.destroy(),this._debugCameraFrustum=this._debugCameraFrustum&&this._debugCameraFrustum.destroy(),this._debugShadowViewCommand=this._debugShadowViewCommand&&this._debugShadowViewCommand.shaderProgram&&this._debugShadowViewCommand.shaderProgram.destroy();for(let o=0;o<this._numberOfCascades;++o)this._debugCascadeFrustums[o]=this._debugCascadeFrustums[o]&&this._debugCascadeFrustums[o].destroy();return Qr(this)};var nH=E2,Xte=function(o){return function(){o.frameState.afterRender.push(function(){o.requestRender()})}};function Ju(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.canvas,f=o.creditContainer,m=o.creditViewport,C=xo(o.contextOptions);O(C)||(C={}),O(C.webgl)||(C.webgl={}),C.webgl.powerPreference=Ae(C.webgl.powerPreference,"high-performance");let y=O(f),x=new jwe(A,C);y||(f=document.createElement("div"),f.style.position="absolute",f.style.bottom="0",f.style["text-shadow"]="0 0 2px #000000",f.style.color="#ffffff",f.style["font-size"]="10px",f.style["padding-right"]="5px",A.parentNode.appendChild(f)),O(m)||(m=A.parentNode),this._id=Vu(),this._jobScheduler=new sbe,this._frameState=new nbe(x,new Zwe(f," \u2022 ",m),this._jobScheduler),this._frameState.scene3DOnly=Ae(o.scene3DOnly,!1),this._removeCreditContainer=!y,this._creditContainer=f,this._canvas=A,this._context=x,this._computeEngine=new Hwe(x),this._globe=void 0,this._globeTranslucencyState=new abe,this._primitives=new MD,this._primitivesQuadTrees=[],this._groundPrimitives=new MD,this._globeHeight=void 0,this._cameraUnderground=!1,this._logDepthBuffer=x.fragmentDepth,this._logDepthBufferDirty=!0,this._tweens=new Poe,this._shaderFrameCount=0,this._sunPostProcess=void 0,this._computeCommandList=[],this._overlayCommandList=[],this._useOIT=Ae(o.orderIndependentTranslucency,!0),this._executeOITFunction=void 0,this._depthPlane=new tbe(o.depthPlaneEllipsoidOffset),this._clearColorCommand=new eA({color:new At,stencil:0,owner:this}),this._depthClearCommand=new eA({depth:1,owner:this}),this._stencilClearCommand=new eA({stencil:0}),this._classificationStencilClearCommand=new eA({stencil:0,renderState:fn.fromCache({stencilMask:ca.CLASSIFICATION_MASK})}),this._depthOnlyRenderStateCache={},this._transitioner=new Zbe(this),this._preUpdate=new br,this._postUpdate=new br,this._renderError=new br,this._preRender=new br,this._postRender=new br,this._minimumDisableDepthTestDistance=0,this._debugInspector=new uQe,this._sunShaftEnabled=!1,this._msaaSamples=Ae(o.msaaSamples,1),this.rethrowRenderErrors=!1,this.completeMorphOnUserInput=!0,this.morphStart=new br,this.morphComplete=new br,this.skyBox=void 0,this.skyAtmosphere=void 0,this.sun=void 0,this.sunBloom=!0,this._sunBloom=void 0,this.moon=void 0,this.backgroundColor=At.clone(At.BLACK),this._mode=xi.SCENE3D,this._mapProjection=O(o.mapProjection)?o.mapProjection:new Dg,this.morphTime=1,this.farToNearRatio=1e3,this.logarithmicDepthFarToNearRatio=1e9,this.nearToFarDistance2D=175e4,this.debugCommandFilter=void 0,this.debugShowCommands=!1,this.debugShowFrustums=!1,this.debugShowFramesPerSecond=!1,this.debugShowDepthFrustum=1,this.debugShowFrustumPlanes=!1,this._debugShowFrustumPlanes=!1,this._debugFrustumPlanes=void 0,this.useDepthPicking=!0,this.pickTranslucentDepth=!1,this.cameraEventWaitTime=500,this.fog=new rbe,this._shadowMapCamera=new Ml(this),this.shadowMap=new vQ({context:x,lightCamera:this._shadowMapCamera,enabled:Ae(o.shadows,!1)}),this.textureProjectionMapList=new Array,this.viewShedMapList=[],this.invertClassification=!1,this.invertClassificationColor=At.clone(At.WHITE),this._actualInvertClassificationColor=At.clone(this._invertClassificationColor),this._invertClassification=new _oe,this.focalLength=void 0,this.eyeSeparation=void 0,this.postProcessStages=new jbe,this._brdfLutGenerator=new Xwe,this._performanceDisplay=void 0,this._debugVolume=void 0,this._screenSpaceCameraController=new oQe(this),this._cameraUnderground=!1,this._mapMode2D=Ae(o.mapMode2D,nQ.INFINITE_SCROLL),this._environmentState={skyBoxCommand:void 0,skyAtmosphereCommand:void 0,sunDrawCommand:void 0,sunComputeCommand:void 0,moonCommand:void 0,isSunVisible:!1,isMoonVisible:!1,isReadyForAtmosphere:!1,isSkyAtmosphereVisible:!1,clearGlobeDepth:!1,useDepthPlane:!1,renderTranslucentDepthForPick:!1,originalFramebuffer:void 0,useGlobeDepthFramebuffer:!1,useOIT:!1,useInvertClassification:!1,usePostProcess:!1,usePostProcessSelected:!1,useWebVR:!1},this._useWebVR=!1,this._cameraVR=void 0,this._aspectRatioVR=void 0,this.requestRenderMode=Ae(o.requestRenderMode,!1),this._renderRequested=!0,this.maximumRenderTimeChange=Ae(o.maximumRenderTimeChange,0),this._lastRenderTime=void 0,this._frameRateMonitor=void 0,this._removeRequestListenerCallback=V1.requestCompletedEvent.addEventListener(Xte(this)),this._removeTaskProcessorListenerCallback=Vf.taskCompletedEvent.addEventListener(Xte(this)),this._removeGlobeCallbacks=[];let v=new Kr(0,0,x.drawingBufferWidth,x.drawingBufferHeight),E=new Ml(this);this._logDepthBuffer&&(E.frustum.near=.1,E.frustum.far=1e10),this.preloadFlightCamera=new Ml(this),this.preloadFlightCullingVolume=void 0,this._picking=new Ibe(this),this._defaultView=new Qoe(this,E,v),this._view=this._defaultView,this._hdr=void 0,this._hdrDirty=void 0,this.highDynamicRange=!1,this.gamma=2.2,this._sunColor=new ee(2.3,2.35,2.5),this.sphericalHarmonicCoefficients=void 0,this.specularEnvironmentMaps=void 0,this._specularEnvironmentMapAtlas=void 0,this.light=new tH,this._loadPrimitiveFirst=!1,this._maxProjectionCount=4,Znt(this,0,fi.now()),this.updateFrameState(),this.initializeFrame()}function NIi(o,A){for(let m=0;m<o._removeGlobeCallbacks.length;++m)o._removeGlobeCallbacks[m]();o._removeGlobeCallbacks.length=0;let f=[];O(A)&&(f.push(A.imageryLayersUpdatedEvent.addEventListener(Xte(o))),f.push(A.terrainProviderChanged.addEventListener(Xte(o)))),o._removeGlobeCallbacks=f}Object.defineProperties(Ju.prototype,{canvas:{get:function(){return this._canvas}},drawingBufferHeight:{get:function(){return this._context.drawingBufferHeight}},drawingBufferWidth:{get:function(){return this._context.drawingBufferWidth}},maximumAliasedLineWidth:{get:function(){return Co.maximumAliasedLineWidth}},maximumCubeMapSize:{get:function(){return Co.maximumCubeMapSize}},pickPositionSupported:{get:function(){return this._context.depthTexture}},sampleHeightSupported:{get:function(){return this._context.depthTexture}},clampToHeightSupported:{get:function(){return this._context.depthTexture}},invertClassificationSupported:{get:function(){return this._context.depthTexture}},specularEnvironmentMapsSupported:{get:function(){return b5.isSupported(this._context)}},globe:{get:function(){return this._globe},set:function(o){this._globe=this._globe&&this._globe.destroy(),this._globe=o,NIi(this,o)}},primitives:{get:function(){return this._primitives}},primitivesQuadTrees:{get:function(){return this._primitivesQuadTrees}},groundPrimitives:{get:function(){return this._groundPrimitives}},camera:{get:function(){return this._view.camera},set:function(o){this._view.camera=o}},view:{get:function(){return this._view},set:function(o){this._view=o}},defaultView:{get:function(){return this._defaultView}},picking:{get:function(){return this._picking}},screenSpaceCameraController:{get:function(){return this._screenSpaceCameraController}},mapProjection:{get:function(){return this._mapProjection}},jobScheduler:{get:function(){return this._jobScheduler}},frameState:{get:function(){return this._frameState}},environmentState:{get:function(){return this._environmentState}},tweens:{get:function(){return this._tweens}},imageryLayers:{get:function(){if(O(this.globe))return this.globe.imageryLayers}},terrainProvider:{get:function(){if(O(this.globe))return this.globe.terrainProvider},set:function(o){O(this.globe)&&(this.globe.terrainProvider=o)}},terrainProviderChanged:{get:function(){if(O(this.globe))return this.globe.terrainProviderChanged}},preUpdate:{get:function(){return this._preUpdate}},postUpdate:{get:function(){return this._postUpdate}},renderError:{get:function(){return this._renderError}},preRender:{get:function(){return this._preRender}},postRender:{get:function(){return this._postRender}},lastRenderTime:{get:function(){return this._lastRenderTime}},context:{get:function(){return this._context}},debugFrustumStatistics:{get:function(){return this._view.debugFrustumStatistics}},scene3DOnly:{get:function(){return this._frameState.scene3DOnly}},orderIndependentTranslucency:{get:function(){return this._useOIT}},id:{get:function(){return this._id}},mode:{get:function(){return this._mode},set:function(o){o===xi.SCENE2D?this.morphTo2D(0):o===xi.SCENE3D?this.morphTo3D(0):o===xi.COLUMBUS_VIEW&&this.morphToColumbusView(0),this._mode=o}},frustumCommandsList:{get:function(){return this._view.frustumCommandsList}},numberOfFrustums:{get:function(){return this._view.frustumCommandsList.length}},useWebVR:{get:function(){return this._useWebVR},set:function(o){this._useWebVR=o,this._useWebVR?(this._frameState.creditDisplay.container.style.visibility="hidden",this._cameraVR=new Ml(this),O(this._deviceOrientationCameraController)||(this._deviceOrientationCameraController=new ibe(this)),this._aspectRatioVR=this.camera.frustum.aspectRatio):(this._frameState.creditDisplay.container.style.visibility="visible",this._cameraVR=void 0,this._deviceOrientationCameraController=this._deviceOrientationCameraController&&!this._deviceOrientationCameraController.isDestroyed()&&this._deviceOrientationCameraController.destroy(),this.camera.frustum.aspectRatio=this._aspectRatioVR,this.camera.frustum.xOffset=0)}},mapMode2D:{get:function(){return this._mapMode2D}},splitPosition:{get:function(){return this._frameState.splitPosition},set:function(o){this._frameState.splitPosition=o}},minimumDisableDepthTestDistance:{get:function(){return this._minimumDisableDepthTestDistance},set:function(o){this._minimumDisableDepthTestDistance=o}},logarithmicDepthBuffer:{get:function(){return this._logDepthBuffer},set:function(o){o=this._context.fragmentDepth&&o,this._logDepthBuffer!==o&&(this._logDepthBuffer=o,this._logDepthBufferDirty=!0)}},gamma:{get:function(){return this._context.uniformState.gamma},set:function(o){this._context.uniformState.gamma=o}},highDynamicRange:{get:function(){return this._hdr},set:function(o){let A=this._context,f=o&&A.depthTexture&&(A.colorBufferFloat||A.colorBufferHalfFloat);this._hdrDirty=f!==this._hdr,this._hdr=f}},highDynamicRangeSupported:{get:function(){let o=this._context;return o.depthTexture&&(o.colorBufferFloat||o.colorBufferHalfFloat)}},cameraUnderground:{get:function(){return this._cameraUnderground}},msaaSamples:{get:function(){return this._msaaSamples},set:function(o){o=Math.min(o,Co.maximumSamples),this._msaaSamples=o}},msaaSupported:{get:function(){return this._context.msaa}},pixelRatio:{get:function(){return this._frameState.pixelRatio},set:function(o){this._frameState.pixelRatio=o}},opaqueFrustumNearOffset:{get:function(){return .9999}},sunShaftEnabled:{get:function(){return this._sunShaftEnabled},set:function(o){this._sunShaftEnabled=o}},loadPrimitiveFirst:{get:function(){return this._loadPrimitiveFirst},set:function(o){this._loadPrimitiveFirst=o}},globeHeight:{get:function(){return this._globeHeight}},maxProjectionCount:{get:function(){return this._maxProjectionCount},set:function(o){o<=1?o=1:o>100&&(o=100),this._maxProjectionCount=o}}});Ju.prototype.getCompressedTextureFormatSupported=function(o){let A=this.context;return(o==="WEBGL_compressed_texture_s3tc"||o==="s3tc")&&A.s3tc||(o==="WEBGL_compressed_texture_pvrtc"||o==="pvrtc")&&A.pvrtc||(o==="WEBGL_compressed_texture_etc"||o==="etc")&&A.etc||(o==="WEBGL_compressed_texture_etc1"||o==="etc1")&&A.etc1||(o==="WEBGL_compressed_texture_astc"||o==="astc")&&A.astc||(o==="EXT_texture_compression_bptc"||o==="bc7")&&A.bc7};function K9e(o,A,f,m,C,y,x,v,E,I){A?o.perspectivesWithDepth=NY.createDerivedCommands(f,A,m,C,y,x,v,E,o.perspectivesWithDepth):(o.perspectives=FY.createDerivedCommands(f,m,C,y,x,v,E,o.perspectives),o.fisheyes=LY.createDerivedCommands(f,m,C,y,x,E,o.fisheyes))}function Y9e(o,A,f,m,C,y){let x=o._frameState,v=o._context,E=o._view.oit,I=x.shadowState.lightShadowMaps,w=x.shadowState.lightShadowsEnabled,Q=A.derivedCommands;O(A.pickId)&&(Q.picking=fx.createPickDerivedCommand(o,A,v,Q.picking)),A.pickOnly||(Q.depth=fx.createDepthOnlyDerivedCommand(o,A,v,Q.depth)),Q.originalCommand=A,o._hdr&&(Q.hdr=fx.createHdrCommand(A,v,Q.hdr),A=Q.hdr.command,Q=A.derivedCommands),w&&A.receiveShadows&&(Q.shadows=vQ.createReceiveDerivedCommand(I,A,f,v,Q.shadows)),A.pass===hr.TRANSLUCENT&&O(E)&&E.isSupported()&&(w&&A.receiveShadows?(Q.oit=O(Q.oit)?Q.oit:{},Q.perspectivesWithDepth&&(Q.oit.shadows=E.createDerivedCommands(Q.perspectivesWithDepth.receiveCommand,v,Q.oit.shadows))):Q.oit=E.createDerivedCommands(A,v,Q.oit))}function J9e(o,A,f){let m=o._frameState,C=o._context,y=o._view.oit,x=m.viewShedState.lightShadowMaps,v=m.viewShedState.lightShadowsEnabled,E=A.derivedCommands;O(A.pickId)&&(E.picking=fx.createPickDerivedCommand(o,A,C,E.picking)),A.pickOnly||(E.depth=fx.createDepthOnlyDerivedCommand(o,A,C,E.depth)),E.originalCommand=A,o._hdr&&(E.hdr=fx.createHdrCommand(A,C,E.hdr),A=E.hdr.command,E=A.derivedCommands),v&&A.receiveShadows&&(E.viewShedMaps=nH.createReceiveDerivedCommand(x,A,f,C,E.viewShedMaps)),A.pass===hr.TRANSLUCENT&&O(y)&&y.isSupported()&&(v&&A.receiveShadows?E.oit=O(E.oit)?E.oit:{}:E.oit=y.createDerivedCommands(A,C,E.oit))}function W9e(o,A,f){let m=o._frameState,C=o._context,y=o._view.oit,x=m.shadowState.lightShadowMaps,v=m.shadowState.lightShadowsEnabled,E=A.derivedCommands;O(A.pickId)&&(E.picking=fx.createPickDerivedCommand(o,A,C,E.picking)),A.pickOnly||(E.depth=fx.createDepthOnlyDerivedCommand(o,A,C,E.depth)),E.originalCommand=A,o._hdr&&(E.hdr=fx.createHdrCommand(A,C,E.hdr),A=E.hdr.command,E=A.derivedCommands),v&&A.receiveShadows&&(E.shadows=vQ.createReceiveDerivedCommand(x,A,f,C,E.shadows)),A.pass===hr.TRANSLUCENT&&O(y)&&y.isSupported()&&(v&&A.receiveShadows?(E.oit=O(E.oit)?E.oit:{},E.oit.shadows=y.createDerivedCommands(E.shadows.receiveCommand,C,E.oit.shadows)):E.oit=y.createDerivedCommands(A,C,E.oit))}Ju.prototype.updateDerivedCommands=function(o){if(!O(o.derivedCommands))return;let A=this._frameState,f=this._context,m=o.derivedCommands,C=!1,y=A.shadowState.lastDirtyTime;o.lastDirtyTime!==y&&(o.lastDirtyTime=y,o.dirty=!0,C=!0);let x=A.useLogDepth,v=O(m.logDepth),E=x&&!v,I=A.textureProjecitonHints.shadowsEnabled,w=A.textureProjecitonHints.shadowMaps,Q=A.textureProjecitonHints.lightShadowMaps;if(I&&O(m)){let k=[],U=[];for(let H in w){let q=w[H];q._useDepth?U.push(q):k.push(q)}let V=!1;if(k.length>0&&O(o.receiveTextureProjectionList)&&o.receiveTextureProjectionList.length>0&&((v||E)&&(m.logDepth=fx.createLogDepthCommand(o,f,m.logDepth),K9e(m.logDepth.command.derivedCommands,!1,k,Q,m.logDepth.command,C,f,this._camera,this.maxProjectionCount),Y9e(this,m.logDepth.command,C,!1,k,Q)),V=!0),U.length>0&&((v||E)&&(m.logDepth=fx.createLogDepthCommand(o,f,m.logDepth),K9e(m.logDepth.command.derivedCommands,!0,U,Q,o,C,f,this._camera,this.maxProjectionCount),o.castShadows&&(m.perspectivesWithDepth=m.logDepth.command.derivedCommands.perspectivesWithDepth),Y9e(this,m.logDepth.command,C,!0,U,Q)),V=!0),V)return}let M=!1,B=A.viewShedState.lastDirtyTime;o.lastDirtyTime!==B&&(o.lastDirtyTime=B,o.dirty=!0,M=!0);let T=this._hdr,D=O(m.hdr),F=O(m.originalCommand),L=T&&!D,R=(!x||!T)&&!F;if(o.dirty=o.dirty||E||L||R,o.dirty){o.dirty=!1;let k=A.viewShedState.shadowMaps;A.viewShedState.shadowsEnabled&&o.castShadows&&(m.viewShedMaps=nH.createCastDerivedCommand(k,o,M,f,m.viewShedMaps)),(v||E)&&(m.logDepth=fx.createLogDepthCommand(o,f,m.logDepth),J9e(this,m.logDepth.command,M)),(F||R)&&J9e(this,o,M)}if(C=!1,o.lastDirtyTime!==y&&(o.lastDirtyTime=y,o.dirty=!0,C=!0),o.dirty=o.dirty||E||L||R,o.dirty){o.dirty=!1;let k=A.shadowState.shadowMaps;A.shadowState.shadowsEnabled&&o.castShadows&&(m.shadows=vQ.createCastDerivedCommand(k,o,C,f,m.shadows)),(v||E)&&(m.logDepth=fx.createLogDepthCommand(o,f,m.logDepth),W9e(this,m.logDepth.command,C)),(F||R)&&W9e(this,o,C)}};var kIi=new wP({pass:Ep.RENDER}),Lge=new wP({pass:Ep.PRELOAD}),Fge=new wP({pass:Ep.PRELOAD_FLIGHT}),OIi=new wP({pass:Ep.REQUEST_RENDER_MODE_DEFER_CHECK}),j9e=new wi,Nge;function UIi(o){let A=o.globe;if(o._mode===xi.SCENE3D&&O(A)&&A.show&&!o._cameraUnderground&&!o._globeTranslucencyState.translucent){let f=A.ellipsoid,m=o.frameState.minimumTerrainHeight;return j9e.radius=f.minimumRadius+m,Nge=Gre.fromBoundingSphere(j9e,o.camera.positionWC,Nge),Nge}}Ju.prototype.clearPasses=function(o){o.render=!1,o.pick=!1,o.depth=!1,o.postProcess=!1,o.offscreen=!1};function Znt(o,A,f){let m=o._frameState;m.frameNumber=A,m.time=fi.clone(f,m.time)}Ju.prototype.updateFrameState=function(){let o=this.camera,A=this._frameState;A.commandList.length=0,A.shadowMaps.length=0,A.textureProjectionMaps.length=0,A.viewShedMaps.length=0,A.brdfLutGenerator=this._brdfLutGenerator,A.environmentMap=this.skyBox&&this.skyBox._cubeMap,A.mode=this._mode,A.morphTime=this.morphTime,A.mapProjection=this.mapProjection,A.camera=o,A.cullingVolume=o.frustum.computeCullingVolume(o.positionWC,o.directionWC,o.upWC),O(o.frustum.computeCullingVolumeForTileset)&&(A.cullingVolumeForTileset=o.frustum.computeCullingVolumeForTileset(o.positionWC,o.directionWC,o.upWC)),A.occluder=UIi(this),A.minimumTerrainHeight=0,A.minimumDisableDepthTestDistance=this._minimumDisableDepthTestDistance,A.invertClassification=this.invertClassification,A.sunColor=this._sunColor,A.light=this.light,A.useLogDepth=this._logDepthBuffer&&!(this.camera.frustum instanceof Ss||this.camera.frustum instanceof K0),A.light=this.light,A.cameraUnderground=this._cameraUnderground,A.globeTranslucencyState=this._globeTranslucencyState,O(this.globe)&&(A.terrainExaggeration=this.globe.terrainExaggeration,A.terrainExaggerationRelativeHeight=this.globe.terrainExaggerationRelativeHeight),O(this._specularEnvironmentMapAtlas)&&this._specularEnvironmentMapAtlas.ready?(A.specularEnvironmentMaps=this._specularEnvironmentMapAtlas.texture,A.specularEnvironmentMapsMaximumLOD=this._specularEnvironmentMapAtlas.maximumMipmapLevel):(A.specularEnvironmentMaps=void 0,A.specularEnvironmentMapsMaximumLOD=void 0),A.sphericalHarmonicCoefficients=this.sphericalHarmonicCoefficients,this._actualInvertClassificationColor=At.clone(this.invertClassificationColor,this._actualInvertClassificationColor),_oe.isTranslucencySupported(this._context)||(this._actualInvertClassificationColor.alpha=1),A.invertClassificationColor=this._actualInvertClassificationColor,O(this.globe)?A.maximumScreenSpaceError=this.globe.maximumScreenSpaceError:A.maximumScreenSpaceError=2,this.clearPasses(A.passes),A.tilesetPassState=void 0};Ju.prototype.isVisible=function(o,A,f){return O(o)&&(!O(o.boundingVolume)||!o.cull||A.computeVisibility(o.boundingVolume)!==La.OUTSIDE&&(!O(f)||!o.occlude||!o.boundingVolume.isOccluded(f)))};var Tee=new Xe(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);Tee=Xe.inverseTransformation(Tee,Tee);function GIi(o,A,f,m){let C=A._frameState,y=C.context,x=o.boundingVolume;O(A._debugVolume)&&A._debugVolume.destroy();let v,E=ee.clone(x.center);if(C.mode!==xi.SCENE3D){E=Xe.multiplyByPoint(Tee,E,E);let M=C.mapProjection,B=M.unproject(E);E=M.ellipsoid.cartographicToCartesian(B)}if(O(x.radius)){let M=x.radius;v=rc.toWireframe(gC.createGeometry(new gC({radii:new ee(M,M,M),vertexFormat:Va.FLAT_VERTEX_FORMAT}))),A._debugVolume=new Xa({geometryInstances:new co({geometry:v,modelMatrix:Xe.fromTranslation(E),attributes:{color:new Yo(1,0,0,1)}}),appearance:new Va({flat:!0,translucent:!1}),asynchronous:!1})}else{let M=x.halfAxes;v=rc.toWireframe(LM.createGeometry(LM.fromDimensions({dimensions:new ee(2,2,2),vertexFormat:Va.FLAT_VERTEX_FORMAT}))),A._debugVolume=new Xa({geometryInstances:new co({geometry:v,modelMatrix:Xe.fromRotationTranslation(M,E,new Xe),attributes:{color:new Yo(1,0,0,1)}}),appearance:new Va({flat:!0,translucent:!1}),asynchronous:!1})}let I=C.commandList,w=C.commandList=[];A._debugVolume.update(C),o=w[0],C.useLogDepth&&(o=fx.createLogDepthCommand(o,y).command);let Q;O(m)&&(Q=f.framebuffer,f.framebuffer=m),o.execute(y,f),O(Q)&&(f.framebuffer=Q),C.commandList=I}function Zm(o,A,f,m,C){let y=A._frameState;if(O(A.debugCommandFilter)&&!A.debugCommandFilter(o))return;if(o instanceof eA){o.execute(f,m);return}o.debugShowBoundingVolume&&O(o.boundingVolume)&&GIi(o,A,m,C),y.useLogDepth&&O(o.derivedCommands.logDepth)&&(o=o.derivedCommands.logDepth.command);let x=y.passes;if(!x.pick&&!x.depth&&A._hdr&&O(o.derivedCommands)&&O(o.derivedCommands.hdr)&&(o=o.derivedCommands.hdr.command),x.pick||x.depth){if(x.pick&&!x.depth&&O(o.derivedCommands.picking)){o=o.derivedCommands.picking.pickCommand,o.execute(f,m);return}else if(O(o.derivedCommands.depth)){o=o.derivedCommands.depth.depthOnlyCommand,o.execute(f,m);return}}if(A.debugShowCommands||A.debugShowFrustums){A._debugInspector.executeDebugShowFrustumsCommand(A,o,m);return}let v=A.frameState.textureProjecitonHints.shadowsEnabled&&A.frameState.textureProjecitonHints.lightShadowMaps.length>0,E=O(o.derivedCommands.fisheyes),I=O(o.derivedCommands.perspectives),w=O(o.derivedCommands.perspectivesWithDepth);v&&(E||I||w)?(I&&o.derivedCommands.perspectives.receiveCommand.execute(f,m),w&&o.derivedCommands.perspectivesWithDepth.receiveCommand.execute(f,m),E&&o.derivedCommands.fisheyes.receiveCommand.execute(f,m)):y.viewShedState.lightShadowsEnabled&&O(o.derivedCommands.viewShedMaps)?o.derivedCommands.viewShedMaps.receiveCommand.execute(f,m):y.shadowState.lightShadowsEnabled&&o.receiveShadows&&O(o.derivedCommands.shadows)?o.derivedCommands.shadows.receiveCommand.execute(f,m):o.execute(f,m)}function wz(o,A,f,m){let C=A._frameState,y=o.derivedCommands;!O(y)||(C.useLogDepth&&O(y.logDepth)&&(o=y.logDepth.command),y=o.derivedCommands,O(y.picking)?(o=y.picking.pickCommand,o.execute(f,m)):O(y.depth)&&(o=y.depth.depthOnlyCommand,o.execute(f,m)))}function HIi(o,A,f){return A.boundingVolume.distanceSquaredTo(f)-o.boundingVolume.distanceSquaredTo(f)}function VIi(o,A,f){return o.boundingVolume.distanceSquaredTo(f)-A.boundingVolume.distanceSquaredTo(f)+je.EPSILON12}function zIi(o,A,f,m,C){let y=o.context;LJ(m,HIi,o.camera.positionWC),O(C)&&A(C.unclassifiedCommand,o,y,f);let x=m.length;for(let v=0;v<x;++v)A(m[v],o,y,f)}function KIi(o,A,f,m,C){let y=o.context;LJ(m,VIi,o.camera.positionWC),O(C)&&A(C.unclassifiedCommand,o,y,f);let x=m.length;for(let v=0;v<x;++v)A(m[v],o,y,f)}var $nt=new Yu,eot=new n2,tot=new Ss,iot=new K0;function Zte(o,A){let f=o.camera,m=o.context,C=o.frameState,y=m.uniformState;y.updateCamera(f);let x;O(f.frustum.fov)?x=f.frustum.clone($nt):O(f.frustum.infiniteProjectionMatrix)?x=f.frustum.clone(eot):O(f.frustum.width)?x=f.frustum.clone(tot):x=f.frustum.clone(iot),x.near=f.frustum.near,x.far=f.frustum.far,y.updateFrustum(x),y.updatePass(hr.ENVIRONMENT);let v=C.passes,E=v.pick,I=o._environmentState,w=o._view,Q=I.renderTranslucentDepthForPick,M=I.useWebVR;if(!E){let se=I.skyBoxCommand;if(O(se)&&Zm(se,o,m,A),I.isSkyAtmosphereVisible&&Zm(I.skyAtmosphereCommand,o,m,A),I.isSunVisible&&(I.sunDrawCommand.execute(m,A),o.sunBloom&&!M)){let ce;I.useGlobeDepthFramebuffer?ce=w.globeDepth.framebuffer:I.usePostProcess?ce=w.sceneFramebuffer.framebuffer:ce=I.originalFramebuffer,o._sunPostProcess.execute(m),o._sunPostProcess.copy(m,ce),A.framebuffer=ce}I.isMoonVisible&&I.moonCommand.execute(m,A)}let B;I.useOIT?(O(o._executeOITFunction)||(o._executeOITFunction=function(se,ce,j,de,me){w.globeDepth.prepareColorTextures(m),w.oit.executeCommands(se,ce,j,de,me)}),B=o._executeOITFunction):v.render?B=zIi:B=KIi;let T=w.frustumCommandsList,D=T.length,F=I.clearGlobeDepth,L=I.useDepthPlane,R=o._globeTranslucencyState,k=R.translucent,U=o._view.globeTranslucencyFramebuffer,V=o._depthClearCommand,H=o._stencilClearCommand,q=o._classificationStencilClearCommand,ie=o._depthPlane,Z=I.usePostProcessSelected,oe=f.position.z,ne;for(let se=0;se<D;++se){let ce=D-se-1,j=T[ce];o.mode===xi.SCENE2D?(f.position.z=oe-j.near+1,x.far=Math.max(1,j.far-j.near),x.near=1,y.update(C),y.updateFrustum(x)):(x.near=ce!==0?j.near*o.opaqueFrustumNearOffset:j.near,x.far=j.far,y.updateFrustum(x)),V.execute(m,A),m.stencilBuffer&&H.execute(m,A),y.updatePass(hr.GLOBE);let de=j.commands[hr.GLOBE],me=j.indices[hr.GLOBE];if(k)R.executeGlobeCommands(j,Zm,U,o,A);else for(ne=0;ne<me;++ne)Zm(de[ne],o,m,A);let _e=w.globeDepth;if(O(_e)&&I.useGlobeDepthFramebuffer&&_e.executeCopyDepth(m,A),!I.renderTranslucentDepthForPick)if(y.updatePass(hr.TERRAIN_CLASSIFICATION),de=j.commands[hr.TERRAIN_CLASSIFICATION],me=j.indices[hr.TERRAIN_CLASSIFICATION],k)R.executeGlobeClassificationCommands(j,Zm,U,o,A);else for(ne=0;ne<me;++ne)Zm(de[ne],o,m,A);if(F&&(V.execute(m,A),L&&ie.execute(m,A)),!I.useInvertClassification||E||I.renderTranslucentDepthForPick){for(y.updatePass(hr.CESIUM_3D_TILE),de=j.commands[hr.CESIUM_3D_TILE],me=j.indices[hr.CESIUM_3D_TILE],ne=0;ne<me;++ne)Zm(de[ne],o,m,A);if(me>0&&(O(_e)&&I.useGlobeDepthFramebuffer&&(_e.prepareColorTextures(m,F),_e.executeUpdateDepth(m,A,F,_e.depthStencilTexture)),!I.renderTranslucentDepthForPick))for(y.updatePass(hr.CESIUM_3D_TILE_CLASSIFICATION),de=j.commands[hr.CESIUM_3D_TILE_CLASSIFICATION],me=j.indices[hr.CESIUM_3D_TILE_CLASSIFICATION],ne=0;ne<me;++ne)Zm(de[ne],o,m,A)}else{o._invertClassification.clear(m,A);let Ie=A.framebuffer;for(A.framebuffer=o._invertClassification._fbo.framebuffer,y.updatePass(hr.CESIUM_3D_TILE),de=j.commands[hr.CESIUM_3D_TILE],me=j.indices[hr.CESIUM_3D_TILE],ne=0;ne<me;++ne)Zm(de[ne],o,m,A);for(O(_e)&&I.useGlobeDepthFramebuffer&&(o._invertClassification.prepareTextures(m),_e.executeUpdateDepth(m,A,F,o._invertClassification._fbo.getDepthStencilTexture())),y.updatePass(hr.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW),de=j.commands[hr.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW],me=j.indices[hr.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW],ne=0;ne<me;++ne)Zm(de[ne],o,m,A);for(A.framebuffer=Ie,o._invertClassification.executeClassified(m,A),C.invertClassificationColor.alpha===1&&o._invertClassification.executeUnclassified(m,A),me>0&&m.stencilBuffer&&q.execute(m,A),y.updatePass(hr.CESIUM_3D_TILE_CLASSIFICATION),de=j.commands[hr.CESIUM_3D_TILE_CLASSIFICATION],me=j.indices[hr.CESIUM_3D_TILE_CLASSIFICATION],ne=0;ne<me;++ne)Zm(de[ne],o,m,A)}for(me>0&&m.stencilBuffer&&H.execute(m,A),y.updatePass(hr.OPAQUE),de=j.commands[hr.OPAQUE],me=j.indices[hr.OPAQUE],ne=0;ne<me;++ne)Zm(de[ne],o,m,A);ce!==0&&o.mode!==xi.SCENE2D&&(x.near=j.near,y.updateFrustum(x));let Be;if(!E&&I.useInvertClassification&&C.invertClassificationColor.alpha<1&&(Be=o._invertClassification),y.updatePass(hr.TRANSLUCENT),de=j.commands[hr.TRANSLUCENT],de.length=j.indices[hr.TRANSLUCENT],B(o,Zm,A,de,Be),j.indices[hr.CESIUM_3D_TILE_CLASSIFICATION]>0&&w.translucentTileClassification.isSupported()&&(w.translucentTileClassification.executeTranslucentCommands(o,Zm,A,de,_e.depthStencilTexture),w.translucentTileClassification.executeClassificationCommands(o,Zm,A,j)),m.depthTexture&&o.useDepthPicking&&(I.useGlobeDepthFramebuffer||Q)){let Ie=_e.depthStencilTexture,ve=o._picking.getPickDepth(o,ce);ve.update(m,Ie),ve.executeCopyDepth(m,A)}if(E||!Z)continue;let Qe=A.framebuffer;if(A.framebuffer=w.sceneFramebuffer.getIdFramebuffer(),x.near=ce!==0?j.near*o.opaqueFrustumNearOffset:j.near,x.far=j.far,y.updateFrustum(x),y.updatePass(hr.GLOBE),de=j.commands[hr.GLOBE],me=j.indices[hr.GLOBE],k)R.executeGlobeCommands(j,wz,U,o,A);else for(ne=0;ne<me;++ne)wz(de[ne],o,m,A);for(F&&(V.framebuffer=A.framebuffer,V.execute(m,A),V.framebuffer=void 0),F&&L&&ie.execute(m,A),y.updatePass(hr.CESIUM_3D_TILE),de=j.commands[hr.CESIUM_3D_TILE],me=j.indices[hr.CESIUM_3D_TILE],ne=0;ne<me;++ne)wz(de[ne],o,m,A);for(y.updatePass(hr.OPAQUE),de=j.commands[hr.OPAQUE],me=j.indices[hr.OPAQUE],ne=0;ne<me;++ne)wz(de[ne],o,m,A);for(y.updatePass(hr.TRANSLUCENT),de=j.commands[hr.TRANSLUCENT],me=j.indices[hr.TRANSLUCENT],ne=0;ne<me;++ne)wz(de[ne],o,m,A);A.framebuffer=Qe}}function dQe(o){o.context.uniformState.updatePass(hr.COMPUTE);let A=o._environmentState.sunComputeCommand;O(A)&&A.execute(o._computeEngine);let f=o._computeCommandList,m=f.length;for(let C=0;C<m;++C)f[C].execute(o._computeEngine)}function YIi(o,A){o.context.uniformState.updatePass(hr.OVERLAY);let f=o.context,m=o._overlayCommandList,C=m.length;for(let y=0;y<C;++y)m[y].execute(f,A)}function fQe(o,A,f,m){m=Ae(m,!0);let C=f.shadowMapCullingVolume,y=f.isPointLight,x=f.passes,v=x.length,E=A.length;for(let I=0;I<E;++I){let w=A[I];if(m&&o.updateDerivedCommands(w),w.castShadows&&(w.pass===hr.GLOBE||w.pass===hr.CESIUM_3D_TILE||w.pass===hr.OPAQUE||w.pass===hr.TRANSLUCENT)&&o.isVisible(w,C))if(y)for(let Q=0;Q<v;++Q)x[Q].commandList.push(w);else if(v===1)x[0].commandList.push(w);else{let Q=!1;for(let M=v-1;M>=0;--M){let B=x[M].cullingVolume;if(o.isVisible(w,B))x[M].commandList.push(w),Q=!0;else if(Q)break}}}}function gQe(o){let A=o.frameState,f=A.shadowState.shadowMaps,m=f.length;if(!A.shadowState.shadowsEnabled)return;let C=o.context,y=C.uniformState;for(let x=0;x<m;++x){let v=f[x];if(v.outOfView)continue;let E=v.passes,I=E.length;for(let Q=0;Q<I;++Q)E[Q].commandList.length=0;let w=o.frameState.commandList;fQe(o,w,v);for(let Q=0;Q<I;++Q){let M=v.passes[Q];y.updateCamera(M.camera),v.updatePass(C,Q);let B=M.commandList.length;for(let T=0;T<B;++T){let D=M.commandList[T];y.updatePass(D.pass),Zm(D.derivedCommands.shadows.castCommands[x],o,C,M.passState)}}}}function rot(o){let A=o.frameState,f=[];for(let x in A.viewShedState.shadowMaps){let v=A.viewShedState.shadowMaps[x];f.push(v)}let m=f.length;if(!A.viewShedState.shadowsEnabled)return;let C=o.context,y=C.uniformState;for(let x=0;x<m;++x){let v=f[x];if(v.outOfView)continue;let E,I=v.passes,w=I.length;for(E=0;E<w;++E)I[E].commandList.length=0;let Q=o.frameState.commandList;for(fQe(o,Q,v),E=0;E<w;++E){let M=v.passes[E];y.updateCamera(M.camera),v.updatePass(C,E);let B=M.commandList.length;for(let T=0;T<B;++T){let D=M.commandList[T];!O(D.derivedCommands.viewShedMaps)||D.derivedCommands.viewShedMaps.castCommands.length<m||(y.updatePass(D.pass),Zm(D.derivedCommands.viewShedMaps.castCommands[x],o,C,M.passState))}}}}function not(o){let A=o.frameState;if(!A.textureProjecitonHints.shadowsEnabled)return;let f=[];for(let x in A.textureProjecitonHints.shadowMaps){let v=A.textureProjecitonHints.shadowMaps[x];v._useDepth&&!v.outOfView&&f.push(v)}let m=f.length,C=o.context,y=C.uniformState;for(let x=0;x<m;++x){let v=f[x],E,I=v.passes,w=I.length;for(E=0;E<w;++E)I[E].commandList.length=0;let Q=o.frameState.commandList;for(fQe(o,Q,v,!1),E=0;E<w;++E){let M=v.passes[E];y.updateCamera(M.camera),v.updatePass(C,E);let B=M.commandList.length;for(let T=0;T<B;++T){let D=M.commandList[T];!O(D.derivedCommands.perspectivesWithDepth)||D.derivedCommands.perspectivesWithDepth.castCommands.length<m||(y.updatePass(D.pass),Zm(D.derivedCommands.perspectivesWithDepth.castCommands[x],o,C,M.passState))}}}}var JIi=new ee;Ju.prototype.updateAndExecuteCommands=function(o,A){let f=this._frameState.mode;this._environmentState.useWebVR?oot(this,o,A):f!==xi.SCENE2D||this._mapMode2D===nQ.ROTATE?DL(!0,this,o,A):(KJ(this,o,A),aot(this,o))};Ju.prototype.updateAndExecuteCommandszh=function(o,A){let f=this._frameState.mode;this._environmentState.useWebVR?oot(this,o,A):f!==xi.SCENE2D||this._mapMode2D===nQ.ROTATE?i_i(!0,this,o,A):(KJ(this,o,A),aot(this,o))};function oot(o,A,f){let m=o._view,C=m.camera,y=o._environmentState.renderTranslucentDepthForPick;KJ(o,A,f),uot(o),m.createPotentiallyVisibleSet(o),dQe(o),y||(gQe(o),not(o),rot(o));let x=A.viewport;x.x=0,x.y=0,x.width=x.width*.5;let v=Ml.clone(C,o._cameraVR);v.frustum=C.frustum;let E=C.frustum.near,I=E*Ae(o.focalLength,5),w=Ae(o.eyeSeparation,I/30),Q=ee.multiplyByScalar(v.right,w*.5,JIi);C.frustum.aspectRatio=x.width/x.height;let M=.5*w*E/I;ee.add(v.position,Q,C.position),C.frustum.xOffset=M,Zte(o,A),x.x=x.width,ee.subtract(v.position,Q,C.position),C.frustum.xOffset=-M,Zte(o,A),Ml.clone(v,C)}var WIi=new Kt(Math.PI,je.PI_OVER_TWO),jIi=new ee,qIi=new ee,XIi=new Xe,ZIi=new Xe,$Ii=new ee,e_i=new ee,t_i=new Kr;function aot(o,A){let f=o.context,m=o.frameState,C=o.camera,y=A.viewport,x=Kr.clone(y,t_i);A.viewport=x;let v=WIi,E=jIi;o.mapProjection.project(v,E);let I=ee.clone(C.position,qIi),w=Xe.clone(C.transform,ZIi),Q=C.frustum.clone();C._setTransform(Xe.IDENTITY);let M=Xe.computeViewportTransformation(x,0,1,XIi),B=C.frustum.projectionMatrix,T=C.positionWC.y,D=ee.fromElements(je.sign(T)*E.x-T,0,-C.positionWC.x,$Ii),F=zn.pointToGLWindowCoordinates(B,M,D,e_i);F.x=Math.floor(F.x);let L=x.x,R=x.width;if(T===0||F.x<=L||F.x>=L+R)DL(!0,o,A);else if(Math.abs(L+R*.5-F.x)<1)x.width=F.x-x.x,C.position.x*=je.sign(C.position.x),C.frustum.right=0,m.cullingVolume=C.frustum.computeCullingVolume(C.positionWC,C.directionWC,C.upWC),f.uniformState.update(m),DL(!0,o,A),x.x=F.x,C.position.x=-C.position.x,C.frustum.right=-C.frustum.left,C.frustum.left=0,m.cullingVolume=C.frustum.computeCullingVolume(C.positionWC,C.directionWC,C.upWC),f.uniformState.update(m),DL(!1,o,A);else if(F.x>L+R*.5){x.width=F.x-L;let k=C.frustum.right;C.frustum.right=E.x-T,m.cullingVolume=C.frustum.computeCullingVolume(C.positionWC,C.directionWC,C.upWC),f.uniformState.update(m),DL(!0,o,A),x.x=F.x,x.width=L+R-F.x,C.position.x=-C.position.x,C.frustum.left=-C.frustum.right,C.frustum.right=k-C.frustum.right*2,m.cullingVolume=C.frustum.computeCullingVolume(C.positionWC,C.directionWC,C.upWC),f.uniformState.update(m),DL(!1,o,A)}else{x.x=F.x,x.width=L+R-F.x;let k=C.frustum.left;C.frustum.left=-E.x-T,m.cullingVolume=C.frustum.computeCullingVolume(C.positionWC,C.directionWC,C.upWC),f.uniformState.update(m),DL(!0,o,A),x.x=L,x.width=F.x-L,C.position.x=-C.position.x,C.frustum.right=-C.frustum.left,C.frustum.left=k-C.frustum.left*2,m.cullingVolume=C.frustum.computeCullingVolume(C.positionWC,C.directionWC,C.upWC),f.uniformState.update(m),DL(!1,o,A)}C._setTransform(w),ee.clone(I,C.position),C.frustum=Q.clone(),A.viewport=y}function DL(o,A,f,m){let C=A._environmentState,y=A._view,x=C.renderTranslucentDepthForPick;o||(A.frameState.commandList.length=0),uot(A),y.createPotentiallyVisibleSet(A),o&&(O(m)&&KJ(A,f,m),dQe(A),x||(gQe(A),not(A),rot(A))),Zte(A,f)}function i_i(o,A,f,m){let C=A._environmentState,y=A._view,x=C.renderTranslucentDepthForPick;!o&&!x&&(A.frameState.commandList.length=0),x||o_i(A),y.createPotentiallyVisibleSet(A),o&&(O(m)&&KJ(A,f,m),x||(dQe(A),gQe(A))),Zte(A,f)}var q9e=new AC;Ju.prototype.updateEnvironment=function(){let o=this._frameState,A=this._view,f=this._environmentState,m=o.passes.render,C=o.passes.offscreen,y=this.skyAtmosphere,x=this.globe,v=this._globeTranslucencyState;if(!m||this._mode!==xi.SCENE2D&&A.camera.frustum instanceof Ss||!v.environmentVisible)f.skyAtmosphereCommand=void 0,f.skyBoxCommand=void 0,f.sunDrawCommand=void 0,f.sunComputeCommand=void 0,f.moonCommand=void 0;else{O(y)?(O(x)&&(y.setDynamicAtmosphereColor(x.enableLighting&&x.dynamicAtmosphereLighting,x.dynamicAtmosphereLightingFromSun),f.isReadyForAtmosphere=f.isReadyForAtmosphere||x._surface._tilesToRender.length>0),f.skyAtmosphereCommand=y.update(o,x)):f.skyAtmosphereCommand=void 0,f.skyBoxCommand=O(this.skyBox)?this.skyBox.update(o,this._hdr):void 0;let T=O(this.sun)?this.sun.update(o,A.passState,this._hdr):void 0;f.sunDrawCommand=O(T)?T.drawCommand:void 0,f.sunComputeCommand=O(T)?T.computeCommand:void 0,f.moonCommand=O(this.moon)?this.moon.update(o):void 0}let E=f.clearGlobeDepth=O(x)&&x.show&&(!x.depthTestAgainstTerrain||this.mode===xi.SCENE2D);(f.useDepthPlane=E&&this.mode===xi.SCENE3D&&v.useDepthPlane)&&this._depthPlane.update(o),f.renderTranslucentDepthForPick=!1,f.useWebVR=this._useWebVR&&this.mode!==xi.SCENE2D&&!C;let I=o.mode===xi.SCENE3D&&!v.sunVisibleThroughGlobe?o.occluder:void 0,w=o.cullingVolume,Q=q9e.planes;for(let T=0;T<5;++T)Q[T]=w.planes[T];w=q9e,f.isSkyAtmosphereVisible=O(f.skyAtmosphereCommand)&&f.isReadyForAtmosphere,f.isSunVisible=this.isVisible(f.sunDrawCommand,w,I),f.isMoonVisible=this.isVisible(f.moonCommand,w,I);let M=this.specularEnvironmentMaps,B=this._specularEnvironmentMapAtlas;O(M)&&(!O(B)||B.url!==M)?(B=B&&B.destroy(),this._specularEnvironmentMapAtlas=new b5(M)):!O(M)&&O(B)&&(B.destroy(),this._specularEnvironmentMapAtlas=void 0),O(this._specularEnvironmentMapAtlas)&&this._specularEnvironmentMapAtlas.update(o)};function sot(o){let A=o._frameState;o.debugShowFrustumPlanes!==o._debugShowFrustumPlanes&&(o.debugShowFrustumPlanes?o._debugFrustumPlanes=new _g({camera:o.camera,updateOnChange:!1,frustumSplits:A.frustumSplits}):o._debugFrustumPlanes=o._debugFrustumPlanes&&o._debugFrustumPlanes.destroy(),o._debugShowFrustumPlanes=o.debugShowFrustumPlanes),O(o._debugFrustumPlanes)&&o._debugFrustumPlanes.update(A)}function lot(o){let A=o._frameState,f=A.shadowMaps,m=f.length,C=m>0&&!A.passes.pick&&o.mode===xi.SCENE3D;if(C!==A.shadowState.shadowsEnabled&&(++A.shadowState.lastDirtyTime,A.shadowState.shadowsEnabled=C),A.shadowState.lightShadowsEnabled=!1,!!C){for(let y=0;y<m;++y)if(f[y]!==A.shadowState.shadowMaps[y]){++A.shadowState.lastDirtyTime;break}A.shadowState.shadowMaps.length=0,A.shadowState.lightShadowMaps.length=0;for(let y=0;y<m;++y){let x=f[y];x.update(A),A.shadowState.shadowMaps.push(x),x.fromLightSource&&(A.shadowState.lightShadowMaps.push(x),A.shadowState.lightShadowsEnabled=!0),x.dirty&&(++A.shadowState.lastDirtyTime,x.dirty=!1)}}}function r_i(o){let A=o._frameState,f=A.textureProjectionMaps,m=f.length,C=m>0&&!A.passes.pick&&o.mode===xi.SCENE3D;if(C!==A.textureProjecitonHints.shadowsEnabled&&(++A.textureProjecitonHints.lastDirtyTime,A.textureProjecitonHints.shadowsEnabled=C),!!C){for(let y=0;y<m;++y)if(f[y]!==A.textureProjecitonHints.shadowMaps[y]){++A.textureProjecitonHints.lastDirtyTime;break}A.textureProjecitonHints.shadowMaps.length=0,A.textureProjecitonHints.lightShadowMaps.length=0;for(let y=0;y<m;++y){let x=f[y];x.update(A),A.textureProjecitonHints.shadowMaps.push(x),x.fromLightSource&&A.textureProjecitonHints.lightShadowMaps.push(x),x.dirty&&(++A.textureProjecitonHints.lastDirtyTime,x.dirty=!1)}}}function n_i(o){let A=o._frameState,f=A.viewShedMaps,m=f.length,C=m>0&&!A.passes.pick&&o.mode===xi.SCENE3D;if(C!==A.viewShedState.shadowsEnabled&&(++A.viewShedState.lastDirtyTime,A.viewShedState.shadowsEnabled=C),A.viewShedState.lightShadowsEnabled=!1,!!C){for(let y=0;y<m;++y)if(f[y]!==A.viewShedState.shadowMaps[y]){++A.viewShedState.lastDirtyTime;break}A.viewShedState.shadowMaps.length=0,A.viewShedState.lightShadowMaps.length=0;for(let y=0;y<m;++y){let x=f[y];x.update(A),A.viewShedState.shadowMaps.push(x),A.viewShedState.lightShadowMaps.push(x),A.viewShedState.lightShadowsEnabled=!0,x.dirty&&(++A.viewShedState.lastDirtyTime,x.dirty=!1)}}}function uot(o){let A=o._frameState;o.loadPrimitiveFirst?(o._primitives.update(A),o._groundPrimitives.update(A)):(o._groundPrimitives.update(A),o._primitives.update(A)),sot(o),lot(o),r_i(o),n_i(o),o._globe&&o._globe.render(A)}function o_i(o){let A=o._frameState;o._groundPrimitives.update(A),o._primitives.update(A),o.UpdateQuad(A),sot(o),lot(o),o._globe&&o._globe.render(A)}function KJ(o,A,f){let m=o._context,C=o._frameState,y=o._environmentState,x=o._view,v=o._frameState.passes.pick;O(x.globeDepth)&&(x.globeDepth.picking=v);let E=y.useWebVR;y.originalFramebuffer=A.framebuffer,O(o.sun)&&o.sunBloom!==o._sunBloom?(o.sunBloom&&!E?o._sunPostProcess=new lQe:O(o._sunPostProcess)&&(o._sunPostProcess=o._sunPostProcess.destroy()),o._sunBloom=o.sunBloom):!O(o.sun)&&O(o._sunPostProcess)&&(o._sunPostProcess=o._sunPostProcess.destroy(),o._sunBloom=!1);let I=o._clearColorCommand;At.clone(f,I.color),I.execute(m,A);let w=y.useGlobeDepthFramebuffer=O(x.globeDepth);w&&(x.globeDepth.update(m,A,x.viewport,o.msaaSamples,o._hdr,y.clearGlobeDepth),x.globeDepth.clear(m,A,f));let Q=x.oit,M=y.useOIT=!v&&O(Q)&&Q.isSupported();M&&(Q.update(m,A,x.globeDepth.colorFramebufferManager,o._hdr,o.msaaSamples),Q.clear(m,A,f),y.useOIT=Q.isSupported());let B=o.postProcessStages;o._sunShaftEnabled&&y.isSunVisible?B.sunShaft.enabled=!0:B.sunShaft.enabled=!1;let T=y.usePostProcess=!v&&(o._hdr||B.length>0||B.ambientOcclusion.enabled||B.fxaa.enabled||B.bloom.enabled);if(y.usePostProcessSelected=!1,T){if(x.sceneFramebuffer.update(m,x.viewport,o._hdr,o.msaaSamples),x.sceneFramebuffer.clear(m,A,f),B.sunShaft.enabled){B.sunShaft.uniforms.u_size=o.sun._size;let D=C.mode;D===xi.SCENE3D?wi.clone(o.sun._boundingVolume,B.sunShaft._sunBoundingVolume):D===xi.COLUMBUS_VIEW&&wi.clone(o.sun._boundingVolume2D,B.sunShaft._sunBoundingVolume)}B.update(m,C.useLogDepth,o._hdr),B.clear(m),T=y.usePostProcess=B.ready,y.usePostProcessSelected=T&&B.hasSelected}if(y.isSunVisible&&o.sunBloom&&!E?(A.framebuffer=o._sunPostProcess.update(A),o._sunPostProcess.clear(m,A,f)):w?A.framebuffer=x.globeDepth.framebuffer:T&&(A.framebuffer=x.sceneFramebuffer.framebuffer),O(A.framebuffer)&&I.execute(m,A),y.useInvertClassification=!v&&O(A.framebuffer)&&o.invertClassification){let D;if(o.frameState.invertClassificationColor.alpha===1&&y.useGlobeDepthFramebuffer&&(D=x.globeDepth.framebuffer),O(D)||m.depthTexture){if(o._invertClassification.previousFramebuffer=D,o._invertClassification.update(m,o.msaaSamples,x.globeDepth.colorFramebufferManager),o._invertClassification.clear(m,A),o.frameState.invertClassificationColor.alpha<1&&M){let F=o._invertClassification.unclassifiedCommand,L=F.derivedCommands;L.oit=Q.createDerivedCommands(F,m,L.oit)}}else y.useInvertClassification=!1}o._globeTranslucencyState.translucent&&x.globeTranslucencyFramebuffer.updateAndClear(o._hdr,x.viewport,m,A)}Ju.prototype.resolveFramebuffers=function(o){let A=this._context,f=this._environmentState,m=this._view,C=m.globeDepth;O(C)&&C.prepareColorTextures(A);let y=f.useOIT,x=f.useGlobeDepthFramebuffer,v=f.usePostProcess,E=f.originalFramebuffer,I=x?C.colorFramebufferManager:void 0,w=m.sceneFramebuffer._colorFramebuffer,Q=m.sceneFramebuffer.idFramebuffer;if(y&&(o.framebuffer=v?w.framebuffer:E,m.oit.execute(A,o)),f.isSunVisible){let B=this.camera,T=A.uniformState;T.updateCamera(B);let D;O(B.frustum.fov)?D=B.frustum.clone($nt):O(B.frustum.infiniteProjectionMatrix)?D=B.frustum.clone(eot):O(B.frustum.width)?D=B.frustum.clone(tot):D=B.frustum.clone(iot),D.near=B.frustum.near,D.far=B.frustum.far,T.updateFrustum(D)}let M=m.translucentTileClassification;if(M.hasTranslucentDepth&&M.isSupported()&&M.execute(this,o),v){m.sceneFramebuffer.prepareColorTextures(A);let B=w;x&&!y&&(B=I);let T=this.postProcessStages,D=B.getColorTexture(0),F=Q.getColorTexture(0),L=Ae(I,w).getDepthStencilTexture();T.execute(A,D,L,F),T.copy(A,E)}!y&&!v&&x&&(o.framebuffer=E,C.executeCopyColor(A,o))};function a_i(o){let A=o._frameState.afterRender;for(let f=0,m=A.length;f<m;++f)A[f]()&&o.requestRender();A.length=0}function s_i(o){let A=o._globe,f=o.camera.positionCartographic;if(O(A)&&A.show&&O(f))return A.getHeight(f)}function l_i(o){let A=o.camera,f=o._mode,m=o.globe,C=o._screenSpaceCameraController,y=A.positionCartographic;if(!O(y))return!1;if(!C.onMap()&&y.height<0)return!0;if(!O(m)||!m.show||f===xi.SCENE2D||f===xi.MORPHING)return!1;let x=o._globeHeight;return O(x)&&y.height<x}Ju.prototype.initializeFrame=function(){this._shaderFrameCount++===120&&(this._shaderFrameCount=0,this._context.shaderCache.destroyReleasedShaderPrograms(),this._context.textureCache.destroyReleasedTextures()),this._tweens.update(),this._globeHeight=s_i(this),this._cameraUnderground=l_i(this),this._globeTranslucencyState.update(this),this._screenSpaceCameraController.update(),O(this._deviceOrientationCameraController)&&this._deviceOrientationCameraController.update(),this.camera.update(this._mode),this.camera._updateCameraChanged()};function u_i(o,A){if(o.debugShowFramesPerSecond){if(!O(o._performanceDisplay)){let f=document.createElement("div");f.className="map-performanceDisplay-defaultContainer",o._canvas.parentNode.appendChild(f);let m=new OJ({container:f});o._performanceDisplay=m,o._performanceContainer=f}o._performanceDisplay.throttled=o.requestRenderMode,o._performanceDisplay.update(A)}else O(o._performanceDisplay)&&(o._performanceDisplay=o._performanceDisplay&&o._performanceDisplay.destroy(),o._performanceContainer.parentNode.removeChild(o._performanceContainer))}function c_i(o){o._jobScheduler.resetBudgets();let A=o._frameState;o.primitives.prePassesUpdate(A),O(o.globe)&&o.globe.update(A),o._picking.update(),A.creditDisplay.update()}function A_i(o){let A=o._frameState;o.primitives.postPassesUpdate(A),V1.update()}var h_i=new At;function d_i(o){let A=o._frameState,f=o.context,m=f.uniformState,C=o._defaultView;o._view=C,o.updateFrameState(),A.passes.render=!0,A.passes.postProcess=o.postProcessStages.hasSelected,A.tilesetPassState=kIi;let y=Ae(o.backgroundColor,At.BLACK);o._hdr&&(y=At.clone(y,h_i),y.red=Math.pow(y.red,o.gamma),y.green=Math.pow(y.green,o.gamma),y.blue=Math.pow(y.blue,o.gamma)),A.backgroundColor=y,o.fog.update(A),m.update(A);let x=o.shadowMap;O(x)&&x.enabled&&(!O(o.light)||o.light instanceof tH?ee.negate(m.sunDirectionWC,o._shadowMapCamera.direction):ee.clone(o.light.direction,o._shadowMapCamera.direction),A.shadowMaps.push(x));let v=o.textureProjectionMapList;if(v.length>0)for(let Q=0;Q<v.length;Q++){let M=v[Q];M.enabled&&A.textureProjectionMaps.push(M)}let E=o.viewShedMapList;for(let Q=0;Q<E.length;Q++){let M=E[Q];M.enabled&&A.viewShedMaps.push(M)}o._computeCommandList.length=0,o._overlayCommandList.length=0;let I=C.viewport;I.x=0,I.y=0,I.width=f.drawingBufferWidth,I.height=f.drawingBufferHeight;let w=C.passState;w.framebuffer=void 0,w.blendingEnabled=void 0,w.scissorTest=void 0,w.viewport=Kr.clone(I,w.viewport),O(o.globe)&&o.globe.beginFrame(A),o.updateEnvironment(),o.updateAndExecuteCommands(w,y),o.resolveFramebuffers(w),w.framebuffer=void 0,YIi(o,w),O(o.globe)&&(o.globe.endFrame(A),o.globe.tilesLoaded||(o._renderRequested=!0)),f.endFrame()}function pk(o,A){try{A(o)}catch(f){if(o._renderError.raiseEvent(o,f),o.rethrowRenderErrors)throw f}}function f_i(o){return o._picking.updateMostDetailedRayPicks(o)}Ju.prototype.render=function(o){this._preUpdate.raiseEvent(this,o);let A=this._frameState;A.newFrame=!1,O(o)||(o=fi.now());let f=this._view.checkForCameraUpdates(this),m=!this.requestRenderMode||this._renderRequested||f||this._logDepthBufferDirty||this._hdrDirty||this.mode===xi.MORPHING;if(!m&&O(this.maximumRenderTimeChange)&&O(this._lastRenderTime)){let C=Math.abs(fi.secondsDifference(this._lastRenderTime,o));m=m||C>this.maximumRenderTimeChange}if(m){this._lastRenderTime=fi.clone(o,this._lastRenderTime),this._renderRequested=!1,this._logDepthBufferDirty=!1,this._hdrDirty=!1;let C=je.incrementWrap(A.frameNumber,15e6,1);Znt(this,C,o),A.newFrame=!0}pk(this,c_i),this.primitives.show&&(pk(this,f_i),pk(this,g_i),pk(this,p_i),m||pk(this,m_i)),this._postUpdate.raiseEvent(this,o),m&&(this._preRender.raiseEvent(this,o),pk(this,d_i)),u_i(this,m),pk(this,A_i),a_i(this),m&&this._postRender.raiseEvent(this,o)};Ju.prototype.forceRender=function(o){this._renderRequested=!0,this.render(o)};Ju.prototype.requestRender=function(){this._renderRequested=!0};Ju.prototype.clampLineWidth=function(o){return Math.max(Co.minimumAliasedLineWidth,Math.min(o,Co.maximumAliasedLineWidth))};Ju.prototype.pick=function(o,A,f){return this._picking.pick(this,o,A,f)};Ju.prototype.UpdateQuad=function(o){for(let A=0,f=this._primitivesQuadTrees.length;A<f;A++){let m=this._primitivesQuadTrees[A]._tilesToRender;if(m)for(let C=0,y=m.length;C<y;C++){let x=m[C];x.data&&x.data.geometryPrimitive&&x.data.geometryPrimitive.update(o)}}};Ju.prototype.pickPositionWorldCoordinates=function(o,A){return this._picking.pickPositionWorldCoordinates(this,o,A)};Ju.prototype.pickPosition=function(o,A){return this._picking.pickPosition(this,o,A)};Ju.prototype.drillPick=function(o,A,f,m){return this._picking.drillPick(this,o,A,f,m)};function g_i(o){let A=o._frameState;Lge.camera=A.camera,Lge.cullingVolume=A.cullingVolume,o.primitives.updateForPass(A,Lge)}function p_i(o){let A=o._frameState;!A.camera.canPreloadFlight()||(Fge.camera=o.preloadFlightCamera,Fge.cullingVolume=o.preloadFlightCullingVolume,o.primitives.updateForPass(A,Fge))}function m_i(o){o.primitives.updateForPass(o._frameState,OIi)}Ju.prototype.pickFromRay=function(o,A,f){return this._picking.pickFromRay(this,o,A,f)};Ju.prototype.drillPickFromRay=function(o,A,f,m){return this._picking.drillPickFromRay(this,o,A,f,m)};Ju.prototype.pickFromRayMostDetailed=function(o,A,f){return this._picking.pickFromRayMostDetailed(this,o,A,f)};Ju.prototype.drillPickFromRayMostDetailed=function(o,A,f,m){return this._picking.drillPickFromRayMostDetailed(this,o,A,f,m)};Ju.prototype.sampleHeight=function(o,A,f){return this._picking.sampleHeight(this,o,A,f)};Ju.prototype.clampToHeight=function(o,A,f,m){return this._picking.clampToHeight(this,o,A,f,m)};Ju.prototype.sampleHeightMostDetailed=function(o,A,f){return this._picking.sampleHeightMostDetailed(this,o,A,f)};Ju.prototype.clampToHeightMostDetailed=function(o,A,f){return this._picking.clampToHeightMostDetailed(this,o,A,f)};Ju.prototype.cartesianToCanvasCoordinates=function(o,A){return Qs.wgs84ToWindowCoordinates(this,o,A)};Ju.prototype.completeMorph=function(){this._transitioner.completeMorph()};Ju.prototype.morphTo2D=function(o){let A,f=this.globe;O(f)?A=f.ellipsoid:A=this.mapProjection.ellipsoid,o=Ae(o,2),this._transitioner.morphTo2D(o,A)};Ju.prototype.morphToColumbusView=function(o){let A,f=this.globe;O(f)?A=f.ellipsoid:A=this.mapProjection.ellipsoid,o=Ae(o,2),this._transitioner.morphToColumbusView(o,A)};Ju.prototype.morphTo3D=function(o){let A,f=this.globe;O(f)?A=f.ellipsoid:A=this.mapProjection.ellipsoid,o=Ae(o,2),this._transitioner.morphTo3D(o,A)};Ju.prototype.isDestroyed=function(){return!1};Ju.prototype.destroy=function(){this._tweens.removeAll(),this._computeEngine=this._computeEngine&&this._computeEngine.destroy(),this._screenSpaceCameraController=this._screenSpaceCameraController&&this._screenSpaceCameraController.destroy(),this._deviceOrientationCameraController=this._deviceOrientationCameraController&&!this._deviceOrientationCameraController.isDestroyed()&&this._deviceOrientationCameraController.destroy(),this._primitives=this._primitives&&this._primitives.destroy(),this._groundPrimitives=this._groundPrimitives&&this._groundPrimitives.destroy(),this._globe=this._globe&&this._globe.destroy(),this.skyBox=this.skyBox&&this.skyBox.destroy(),this.skyAtmosphere=this.skyAtmosphere&&this.skyAtmosphere.destroy(),this._debugSphere=this._debugSphere&&this._debugSphere.destroy(),this.sun=this.sun&&this.sun.destroy(),this._sunPostProcess=this._sunPostProcess&&this._sunPostProcess.destroy(),this._depthPlane=this._depthPlane&&this._depthPlane.destroy(),this._transitioner=this._transitioner&&this._transitioner.destroy(),this._debugFrustumPlanes=this._debugFrustumPlanes&&this._debugFrustumPlanes.destroy(),this._brdfLutGenerator=this._brdfLutGenerator&&this._brdfLutGenerator.destroy(),this._picking=this._picking&&this._picking.destroy(),this._defaultView=this._defaultView&&this._defaultView.destroy(),this._view=void 0,this._removeCreditContainer&&this._canvas.parentNode.removeChild(this._creditContainer),this.postProcessStages=this.postProcessStages&&this.postProcessStages.destroy(),this._context=this._context&&this._context.destroy(),this._frameState.creditDisplay=this._frameState.creditDisplay&&this._frameState.creditDisplay.destroy(),O(this._performanceDisplay)&&(this._performanceDisplay=this._performanceDisplay&&this._performanceDisplay.destroy(),this._performanceContainer.parentNode.removeChild(this._performanceContainer)),this._removeRequestListenerCallback(),this._removeTaskProcessorListenerCallback();for(let o=0;o<this._removeGlobeCallbacks.length;++o)this._removeGlobeCallbacks[o]();return this._removeGlobeCallbacks.length=0,Qr(this)};Ju.prototype.clickVideoProjection=function(o){if(O(o)){let A=this.textureProjectionMapList,f=A.length;for(let m=0;m<f;m++){let C=A[m];if(O(C._id)&&C._id===o){A[m]=A[f-1],A[f-1]=C;break}}}};var Loe=Ju,$te=`float interpolateByDistance(vec4 nearFarScalar, float distance)
`;let m=A.createViewportQuadCommand(f,{uniformMap:{shadowMap_texture:function(){return o._shadowMapTexture},shadowMap_textureCube:function(){return o._shadowMapTexture}}});return m.pass=hr.OVERLAY,m}function dIi(o,A){let f=A.context,m=A.context.drawingBufferWidth,C=A.context.drawingBufferHeight,y=Math.min(m,C)*.3,x=AIi;x.x=m-y,x.y=0,x.width=y,x.height=y;let v=o._debugShadowViewCommand;O(v)||(v=hIi(o,f),o._debugShadowViewCommand=v),(!O(v.renderState)||!Kr.equals(v.renderState.viewport,x))&&(v.renderState=fn.fromCache({viewport:Kr.clone(x)})),A.commandList.push(o._debugShadowViewCommand)}var I2=new Array(8);I2[0]=new ai(-1,-1,-1,1);I2[1]=new ai(1,-1,-1,1);I2[2]=new ai(1,1,-1,1);I2[3]=new ai(-1,1,-1,1);I2[4]=new ai(-1,-1,1,1);I2[5]=new ai(1,-1,1,1);I2[6]=new ai(1,1,1,1);I2[7]=new ai(-1,1,1,1);var eF=new Xe,hQe=new Array(8);for(let o=0;o<8;++o)hQe[o]=new ai;function fIi(o,A){let f=new co({geometry:new r2({minimum:new ee(-.5,-.5,-.5),maximum:new ee(.5,.5,.5)}),attributes:{color:Yo.fromColor(A)}}),m=new co({geometry:new tP({radius:.5}),attributes:{color:Yo.fromColor(A)}});return new Xa({geometryInstances:[f,m],appearance:new Va({translucent:!1,flat:!0}),asynchronous:!1,modelMatrix:o})}var gIi=[At.RED,At.GREEN,At.BLUE,At.MAGENTA],pIi=new ee;function mIi(o,A){dIi(o,A);let f=o.debugFreezeFrame&&!o._debugFreezeFrame;if(o._debugFreezeFrame=o.debugFreezeFrame,o.debugFreezeFrame&&(f&&(o._debugCameraFrustum=o._debugCameraFrustum&&o._debugCameraFrustum.destroy(),o._debugCameraFrustum=new _g({camera:o._sceneCamera,color:At.CYAN,updateOnChange:!1})),o._debugCameraFrustum.update(A)),o._cascadesEnabled){if(o.debugFreezeFrame){f&&(o._debugLightFrustum=o._debugLightFrustum&&o._debugLightFrustum.destroy(),o._debugLightFrustum=new _g({camera:o._shadowMapCamera,color:At.YELLOW,updateOnChange:!1})),o._debugLightFrustum.update(A);for(let m=0;m<o._numberOfCascades;++m)f&&(o._debugCascadeFrustums[m]=o._debugCascadeFrustums[m]&&o._debugCascadeFrustums[m].destroy(),o._debugCascadeFrustums[m]=new _g({camera:o._passes[m].camera,color:gIi[m],updateOnChange:!1})),o._debugCascadeFrustums[m].update(A)}}else if(o._isPointLight){if(!O(o._debugLightFrustum)||o._needsUpdate){let m=o._shadowMapCamera.positionWC,C=jr.IDENTITY,y=o._pointLightRadius*2,x=ee.fromElements(y,y,y,pIi),v=Xe.fromTranslationQuaternionRotationScale(m,C,x,eF);o._debugLightFrustum=o._debugLightFrustum&&o._debugLightFrustum.destroy(),o._debugLightFrustum=fIi(v,At.YELLOW)}o._debugLightFrustum.update(A)}else(!O(o._debugLightFrustum)||o._needsUpdate)&&(o._debugLightFrustum=new _g({camera:o._shadowMapCamera,color:At.YELLOW,updateOnChange:!1})),o._debugLightFrustum.update(A)}function Roe(){this.viewMatrix=new Xe,this.inverseViewMatrix=new Xe,this.frustum=void 0,this.positionCartographic=new Kt,this.positionWC=new ee,this.directionWC=ee.clone(ee.UNIT_Z),this.upWC=ee.clone(ee.UNIT_Y),this.rightWC=ee.clone(ee.UNIT_X),this.viewProjectionMatrix=new Xe}Roe.prototype.clone=function(o){Xe.clone(o.viewMatrix,this.viewMatrix),Xe.clone(o.inverseViewMatrix,this.inverseViewMatrix),this.frustum=o.frustum.clone(this.frustum),Kt.clone(o.positionCartographic,this.positionCartographic),ee.clone(o.positionWC,this.positionWC),ee.clone(o.directionWC,this.directionWC),ee.clone(o.upWC,this.upWC),ee.clone(o.rightWC,this.rightWC)};var CIi=new Xe(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1);Roe.prototype.getViewProjection=function(){let o=this.viewMatrix,A=this.frustum.projectionMatrix;return Xe.multiply(A,o,this.viewProjectionMatrix),Xe.multiply(CIi,this.viewProjectionMatrix,this.viewProjectionMatrix),this.viewProjectionMatrix};var yIi=new Array(5),xIi=new Yu,vIi=new Array(4),Wnt=new ee,jnt=new ee;function EIi(o,A){let f=o._shadowMapCamera,m=o._sceneCamera,C=m.frustum.near,y=m.frustum.far,x=o._numberOfCascades,v,E=y-C,I=y/C,w=.9,Q=!1;A.viewShedState.closestObjectSize<200&&(Q=!0,w=.9);let M=vIi,B=yIi;for(B[0]=C,B[x]=y,v=0;v<x;++v){let oe=(v+1)/x,ne=C*Math.pow(I,oe),se=C+E*oe,ce=je.lerp(se,ne,w);B[v+1]=ce,M[v]=ce-B[v]}if(Q){for(v=0;v<x;++v)M[v]=Math.min(M[v],o._maximumCascadeDistances[v]);let oe=B[0];for(v=0;v<x-1;++v)oe+=M[v],B[v+1]=oe}ai.unpack(B,0,o._cascadeSplits[0]),ai.unpack(B,1,o._cascadeSplits[1]),ai.unpack(M,0,o._cascadeDistances);let T=f.frustum,D=T.left,F=T.right,L=T.bottom,R=T.top,k=T.near,U=T.far,V=f.positionWC,H=f.directionWC,q=f.upWC,ie=m.frustum.clone(xIi),Z=f.getViewProjection();for(v=0;v<x;++v){ie.near=B[v],ie.far=B[v+1];let oe=Xe.multiply(ie.projectionMatrix,m.viewMatrix,eF),ne=Xe.inverse(oe,eF),se=Xe.multiply(Z,ne,eF),ce=ee.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,Wnt),j=ee.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,jnt);for(let Qe=0;Qe<8;++Qe){let Ie=ai.clone(I2[Qe],hQe[Qe]);Xe.multiplyByVector(se,Ie,Ie),ee.divideByScalar(Ie,Ie.w,Ie),ee.minimumByComponent(Ie,ce,ce),ee.maximumByComponent(Ie,j,j)}ce.x=Math.max(ce.x,0),ce.y=Math.max(ce.y,0),ce.z=0,j.x=Math.min(j.x,1),j.y=Math.min(j.y,1),j.z=Math.min(j.z,1);let de=o._passes[v],me=de.camera;me.clone(f);let _e=me.frustum;_e.left=D+ce.x*(F-D),_e.right=D+j.x*(F-D),_e.bottom=L+ce.y*(R-L),_e.top=L+j.y*(R-L),_e.near=k+ce.z*(U-k),_e.far=k+j.z*(U-k),de.cullingVolume=me.frustum.computeCullingVolume(V,H,q);let Be=o._cascadeMatrices[v];Xe.multiply(me.getViewProjection(),m.inverseViewMatrix,Be),Xe.multiply(de.textureOffsets,Be,Be)}}var IIi=new Xe,_Ii=new ee,BIi=new ee,V9e=new ee;function wIi(o,A){let f=o._shadowMapCamera,m=o._sceneCamera,C=Xe.multiply(m.frustum.projectionMatrix,m.viewMatrix,eF),y=Xe.inverse(C,eF),x=f.directionWC,v=m.directionWC;ee.equalsEpsilon(x,v,je.EPSILON10)&&(v=m.upWC);let E=ee.cross(x,v,_Ii);v=ee.cross(E,x,BIi),ee.normalize(v,v),ee.normalize(E,E);let I=ee.fromElements(0,0,0,V9e),w=Xe.computeView(I,x,v,E,IIi),Q=Xe.multiply(w,y,eF),M=ee.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,Wnt),B=ee.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,jnt);for(let U=0;U<8;++U){let V=ai.clone(I2[U],hQe[U]);Xe.multiplyByVector(Q,V,V),ee.divideByScalar(V,V.w,V),ee.minimumByComponent(V,M,M),ee.maximumByComponent(V,B,B)}B.z+=1e3,M.z-=10;let T=V9e;T.x=-(.5*(M.x+B.x)),T.y=-(.5*(M.y+B.y)),T.z=-B.z;let D=Xe.fromTranslation(T,eF);w=Xe.multiply(D,w,w);let F=.5*(B.x-M.x),L=.5*(B.y-M.y),R=B.z-M.z,k=f.frustum;k.left=-F,k.right=F,k.bottom=-L,k.top=L,k.near=.01,k.far=R,Xe.clone(w,f.viewMatrix),Xe.inverse(w,f.inverseViewMatrix),Xe.getTranslation(f.inverseViewMatrix,f.positionWC),A.mapProjection.ellipsoid.cartesianToCartographic(f.positionWC,f.positionCartographic),ee.clone(x,f.directionWC),ee.clone(v,f.upWC),ee.clone(E,f.rightWC)}var bIi=[new ee(-1,0,0),new ee(0,-1,0),new ee(0,0,-1),new ee(1,0,0),new ee(0,1,0),new ee(0,0,1)],QIi=[new ee(0,-1,0),new ee(0,0,-1),new ee(0,-1,0),new ee(0,-1,0),new ee(0,0,1),new ee(0,-1,0)],SIi=[new ee(0,0,1),new ee(1,0,0),new ee(-1,0,0),new ee(0,0,-1),new ee(1,0,0),new ee(1,0,0)];function DIi(o,A){let f=new Yu;f.fov=je.PI_OVER_TWO,f.near=1,f.far=o._pointLightRadius,f.aspectRatio=1;for(let m=0;m<6;++m){let C=o._passes[m].camera;C.positionWC=o._shadowMapCamera.positionWC,C.positionCartographic=A.mapProjection.ellipsoid.cartesianToCartographic(C.positionWC,C.positionCartographic),C.directionWC=bIi[m],C.upWC=QIi[m],C.rightWC=SIi[m],Xe.computeView(C.positionWC,C.directionWC,C.upWC,C.rightWC,C.viewMatrix),Xe.inverse(C.viewMatrix,C.inverseViewMatrix),C.frustum=f}}var TIi=new ee,MIi=new ee,qnt=new wi,z9e=qnt.center;function PIi(o,A){let f=o._sceneCamera,m=o._shadowMapCamera,C=qnt;if(o._cascadesEnabled){if(f.frustum.near>=o.maximumDistance){o._outOfView=!0,o._needsUpdate=!1;return}let y=A.mapProjection.ellipsoid.geodeticSurfaceNormal(f.positionWC,TIi),x=ee.negate(m.directionWC,MIi),v=ee.dot(y,x),E=je.clamp(v/.1,0,1);if(o._darkness=je.lerp(1,o.darkness,E),v<0){o._outOfView=!0,o._needsUpdate=!1;return}o._needsUpdate=!0,o._outOfView=!1}else if(o._isPointLight)C.center=m.positionWC,C.radius=o._pointLightRadius,o._outOfView=A.cullingVolume.computeVisibility(C)===La.OUTSIDE,o._needsUpdate=!o._outOfView&&!o._boundingSphere.equals(C),wi.clone(C,o._boundingSphere);else{let y=m.frustum.far/2,x=ee.add(m.positionWC,ee.multiplyByScalar(m.directionWC,y,z9e),z9e);C.center=x,C.radius=y,o._outOfView=A.cullingVolume.computeVisibility(C)===La.OUTSIDE,o._needsUpdate=!o._outOfView&&!o._boundingSphere.equals(C),wi.clone(C,o._boundingSphere)}}function RIi(o,A){let f=A.camera,m=o._lightCamera,C=o._sceneCamera,y=o._shadowMapCamera;o._cascadesEnabled?ee.clone(m.directionWC,y.directionWC):o._isPointLight?ee.clone(m.positionWC,y.positionWC):y.clone(m);let x=o._lightDirectionEC;Xe.multiplyByPointAsVector(f.viewMatrix,y.directionWC,x),ee.normalize(x,x),ee.negate(x,x),Xe.multiplyByPoint(f.viewMatrix,y.positionWC,o._lightPositionEC),o._lightPositionEC.w=o._pointLightRadius;let v,E;o._fitNearFar?(v=Math.min(A.viewShedState.nearPlane,o.maximumDistance),E=Math.min(A.viewShedState.farPlane,o.maximumDistance+1)):(v=f.frustum.near,E=o.maximumDistance),o._sceneCamera=Ml.clone(f,C),f.frustum.clone(o._sceneCamera.frustum),o._sceneCamera.frustum.near=v,o._sceneCamera.frustum.far=E,o._distance=E-v,PIi(o,A),!o._outOfViewPrevious&&o._outOfView&&(o._needsUpdate=!0),o._outOfViewPrevious=o._outOfView}E2.prototype.update=function(o){if(RIi(this,o),this._needsUpdate)if(uIi(this,o.context),this._isPointLight&&DIi(this,o),this._cascadesEnabled&&(wIi(this,o),this._numberOfCascades>1&&EIi(this,o)),this._isPointLight)this._shadowMapCullingVolume=AC.fromBoundingSphere(this._boundingSphere);else{let A=this._shadowMapCamera,f=A.positionWC,m=A.directionWC,C=A.upWC;this._shadowMapCullingVolume=A.frustum.computeCullingVolume(f,m,C),this._passes.length===1&&this._passes[0].camera.clone(A)}if(this._passes.length===1){let A=this._sceneCamera.inverseViewMatrix;Xe.multiply(this._shadowMapCamera.getViewProjection(),A,this._shadowMapMatrix)}this.debugShow&&mIi(this,o)};E2.prototype.updatePass=function(o,A){Jnt(this,o,A)};var LIi=new Bt;function Xnt(o,A,f){let m=o._isPointLight?o._pointBias:f?o._terrainBias:o._primitiveBias,C={shadowMap_texture:function(){return o._shadowMapTexture},shadowMap_textureCube:function(){return o._shadowMapTexture},shadowMap_matrix:function(){return o._shadowMapMatrix},shadowMap_cascadeSplits:function(){return o._cascadeSplits},shadowMap_cascadeMatrices:function(){return o._cascadeMatrices},shadowMap_lightDirectionEC:function(){return o._lightDirectionEC},shadowMap_lightPositionEC:function(){return o._lightPositionEC},shadowMap_cascadeDistances:function(){return o._cascadeDistances},shadowMap_texelSizeDepthBiasAndNormalShadingSmooth:function(){let y=LIi;return y.x=1/o._textureSize.x,y.y=1/o._textureSize.y,ai.fromElements(y.x,y.y,m.depthBias,m.normalShadingSmooth,this.combinedUniforms1)},shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness:function(){return ai.fromElements(m.normalOffsetScale,o._distance,o.maximumDistance,o._darkness,this.combinedUniforms2)},camera_projection_matrix:function(){return o._lightCamera.frustum.projectionMatrix},camera_view_matrix:function(){return o._lightCamera.viewMatrix},far:function(){return o._pointLightRadius},u_visibleColor:function(){return o.visibleColor},u_invisibleColor:function(){return o.invisibleColor},combinedUniforms1:new ai,combinedUniforms2:new ai};return ia(A,C,!1)}function FIi(o,A,f,m,C,y){let x,v,E;if(O(y)&&(x=y.shaderProgram,v=y.renderState,E=y.uniformMap),y=On.shallowClone(f,y),y.castShadows=!0,y.receiveShadows=!1,!O(x)||C!==f.shaderProgram.id||A){let I=f.shaderProgram,w=f.pass===hr.GLOBE,Q=f.pass!==hr.TRANSLUCENT,M=o._isPointLight,B=o._usesDepthTexture,T=EF.getShadowCastShaderKeyword(M,w,B,Q);if(x=m.shaderCache.getDerivedShaderProgram(I,T),!O(x)){let D=I.vertexShaderSource,F=I.fragmentShaderSource,L=EF.createShadowCastVertexShader(D,M,w),R=EF.createShadowCastFragmentShader(F,M,B,Q);x=m.shaderCache.createDerivedShaderProgram(I,T,{vertexShaderSource:L,fragmentShaderSource:R,attributeLocations:I._attributeLocations})}v=o._primitiveRenderState,M?v=o._pointRenderState:w&&(v=o._terrainRenderState),f.renderState.cull.enabled||(v=xo(v,!1),v.cull=xo(v.cull,!1),v.cull.enabled=!1,v=fn.fromCache(v)),E=Xnt(o,f.uniformMap,w)}return y.shaderProgram=x,y.renderState=v,y.uniformMap=E,y}E2.createReceiveDerivedCommand=function(o,A,f,m,C){O(C)||(C={});let y=o.length>0,x=A.shaderProgram,v=x.vertexShaderSource,E=x.fragmentShaderSource,I=A.pass===hr.GLOBE,w=!1;if(I&&(w=A.owner.data.renderedMesh.encoding.hasVertexNormals),A.receiveShadows&&y){let Q,M;O(C.receiveCommand)&&(Q=C.receiveCommand.shaderProgram,M=C.receiveCommand.uniformMap),C.receiveCommand=On.shallowClone(A,C.receiveCommand),C.castShadows=!1,C.receiveShadows=!0;let B=C.receiveShaderCastShadows!==A.castShadows,T=C.receiveShaderProgramId!==A.shaderProgram.id;if(!O(Q)||T||f||B){let D=EF.getShadowReceiveShaderKeyword(o[0],A.castShadows,I,w);if(Q=m.shaderCache.getDerivedShaderProgram(x,D),!O(Q)){let F=EF.createShadowReceiveVertexShader(v,I,w),L=EF.createShadowReceiveFragmentShader(E,o[0],A.castShadows,I,w);Q=m.shaderCache.createDerivedShaderProgram(x,D,{vertexShaderSource:F,fragmentShaderSource:L,attributeLocations:x._attributeLocations})}M=Xnt(o[0],A.uniformMap,I)}C.receiveCommand.shaderProgram=Q,C.receiveCommand.uniformMap=M,C.receiveShaderProgramId=A.shaderProgram.id,C.receiveShaderCastShadows=A.castShadows}return C};E2.createCastDerivedCommand=function(o,A,f,m,C){if(O(C)||(C={}),A.castShadows){let y=C.castCommands;O(y)||(y=C.castCommands=[]);let x=C.castShaderProgramId,v=o.length;y.length=v;for(let E=0;E<v;++E)y[E]=FIi(o[E],f,A,m,x,y[E]);C.castShaderProgramId=A.shaderProgram.id}return C};E2.prototype.isDestroyed=function(){return!1};E2.prototype.destroy=function(){AQe(this),this._debugLightFrustum=this._debugLightFrustum&&this._debugLightFrustum.destroy(),this._debugCameraFrustum=this._debugCameraFrustum&&this._debugCameraFrustum.destroy(),this._debugShadowViewCommand=this._debugShadowViewCommand&&this._debugShadowViewCommand.shaderProgram&&this._debugShadowViewCommand.shaderProgram.destroy();for(let o=0;o<this._numberOfCascades;++o)this._debugCascadeFrustums[o]=this._debugCascadeFrustums[o]&&this._debugCascadeFrustums[o].destroy();return Qr(this)};var nH=E2,Xte=function(o){return function(){o.frameState.afterRender.push(function(){o.requestRender()})}};function Ju(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.canvas,f=o.creditContainer,m=o.creditViewport,C=xo(o.contextOptions);O(C)||(C={}),O(C.webgl)||(C.webgl={}),C.webgl.powerPreference=Ae(C.webgl.powerPreference,"high-performance");let y=O(f),x=new jwe(A,C);y||(f=document.createElement("div"),f.style.position="absolute",f.style.bottom="0",f.style["text-shadow"]="0 0 2px #000000",f.style.color="#ffffff",f.style["font-size"]="10px",f.style["padding-right"]="5px",A.parentNode.appendChild(f)),O(m)||(m=A.parentNode),this._id=Vu(),this._jobScheduler=new sbe,this._frameState=new nbe(x,new Zwe(f," \u2022 ",m),this._jobScheduler),this._frameState.scene3DOnly=Ae(o.scene3DOnly,!1),this._removeCreditContainer=!y,this._creditContainer=f,this._canvas=A,this._context=x,this._computeEngine=new Hwe(x),this._globe=void 0,this._globeTranslucencyState=new abe,this._primitives=new MD,this._primitivesQuadTrees=[],this._groundPrimitives=new MD,this._globeHeight=void 0,this._cameraUnderground=!1,this._logDepthBuffer=x.fragmentDepth,this._logDepthBufferDirty=!0,this._tweens=new Poe,this._shaderFrameCount=0,this._sunPostProcess=void 0,this._computeCommandList=[],this._overlayCommandList=[],this._useOIT=Ae(o.orderIndependentTranslucency,!0),this._executeOITFunction=void 0,this._depthPlane=new tbe(o.depthPlaneEllipsoidOffset),this._clearColorCommand=new eA({color:new At,stencil:0,owner:this}),this._depthClearCommand=new eA({depth:1,owner:this}),this._stencilClearCommand=new eA({stencil:0}),this._classificationStencilClearCommand=new eA({stencil:0,renderState:fn.fromCache({stencilMask:ca.CLASSIFICATION_MASK})}),this._depthOnlyRenderStateCache={},this._transitioner=new Zbe(this),this._preUpdate=new br,this._postUpdate=new br,this._renderError=new br,this._preRender=new br,this._postRender=new br,this._minimumDisableDepthTestDistance=0,this._debugInspector=new uQe,this._sunShaftEnabled=!1,this._msaaSamples=Ae(o.msaaSamples,1),this.rethrowRenderErrors=!1,this.completeMorphOnUserInput=!0,this.morphStart=new br,this.morphComplete=new br,this.skyBox=void 0,this.skyAtmosphere=void 0,this.sun=void 0,this.sunBloom=!0,this._sunBloom=void 0,this.moon=void 0,this.backgroundColor=At.clone(At.BLACK),this._mode=xi.SCENE3D,this._mapProjection=O(o.mapProjection)?o.mapProjection:new Dg,this.morphTime=1,this.farToNearRatio=1e3,this.logarithmicDepthFarToNearRatio=1e9,this.nearToFarDistance2D=175e4,this.debugCommandFilter=void 0,this.debugShowCommands=!1,this.debugShowFrustums=!1,this.debugShowFramesPerSecond=!1,this.debugShowDepthFrustum=1,this.debugShowFrustumPlanes=!1,this._debugShowFrustumPlanes=!1,this._debugFrustumPlanes=void 0,this.useDepthPicking=!0,this.pickTranslucentDepth=!1,this.cameraEventWaitTime=500,this.fog=new rbe,this._shadowMapCamera=new Ml(this),this.shadowMap=new vQ({context:x,lightCamera:this._shadowMapCamera,enabled:Ae(o.shadows,!1),shadowBackCull:Ae(o.shadowBackCull,!0)}),this.textureProjectionMapList=new Array,this.viewShedMapList=[],this.invertClassification=!1,this.invertClassificationColor=At.clone(At.WHITE),this._actualInvertClassificationColor=At.clone(this._invertClassificationColor),this._invertClassification=new _oe,this.focalLength=void 0,this.eyeSeparation=void 0,this.postProcessStages=new jbe,this._brdfLutGenerator=new Xwe,this._performanceDisplay=void 0,this._debugVolume=void 0,this._screenSpaceCameraController=new oQe(this),this._cameraUnderground=!1,this._mapMode2D=Ae(o.mapMode2D,nQ.INFINITE_SCROLL),this._environmentState={skyBoxCommand:void 0,skyAtmosphereCommand:void 0,sunDrawCommand:void 0,sunComputeCommand:void 0,moonCommand:void 0,isSunVisible:!1,isMoonVisible:!1,isReadyForAtmosphere:!1,isSkyAtmosphereVisible:!1,clearGlobeDepth:!1,useDepthPlane:!1,renderTranslucentDepthForPick:!1,originalFramebuffer:void 0,useGlobeDepthFramebuffer:!1,useOIT:!1,useInvertClassification:!1,usePostProcess:!1,usePostProcessSelected:!1,useWebVR:!1},this._useWebVR=!1,this._cameraVR=void 0,this._aspectRatioVR=void 0,this.requestRenderMode=Ae(o.requestRenderMode,!1),this._renderRequested=!0,this.maximumRenderTimeChange=Ae(o.maximumRenderTimeChange,0),this._lastRenderTime=void 0,this._frameRateMonitor=void 0,this._removeRequestListenerCallback=V1.requestCompletedEvent.addEventListener(Xte(this)),this._removeTaskProcessorListenerCallback=Vf.taskCompletedEvent.addEventListener(Xte(this)),this._removeGlobeCallbacks=[];let v=new Kr(0,0,x.drawingBufferWidth,x.drawingBufferHeight),E=new Ml(this);this._logDepthBuffer&&(E.frustum.near=.1,E.frustum.far=1e10),this.preloadFlightCamera=new Ml(this),this.preloadFlightCullingVolume=void 0,this._picking=new Ibe(this),this._defaultView=new Qoe(this,E,v),this._view=this._defaultView,this._hdr=void 0,this._hdrDirty=void 0,this.highDynamicRange=!1,this.gamma=2.2,this._sunColor=new ee(2.3,2.35,2.5),this.sphericalHarmonicCoefficients=void 0,this.specularEnvironmentMaps=void 0,this._specularEnvironmentMapAtlas=void 0,this.light=new tH,this._loadPrimitiveFirst=!1,this._maxProjectionCount=4,Znt(this,0,fi.now()),this.updateFrameState(),this.initializeFrame()}function NIi(o,A){for(let m=0;m<o._removeGlobeCallbacks.length;++m)o._removeGlobeCallbacks[m]();o._removeGlobeCallbacks.length=0;let f=[];O(A)&&(f.push(A.imageryLayersUpdatedEvent.addEventListener(Xte(o))),f.push(A.terrainProviderChanged.addEventListener(Xte(o)))),o._removeGlobeCallbacks=f}Object.defineProperties(Ju.prototype,{canvas:{get:function(){return this._canvas}},drawingBufferHeight:{get:function(){return this._context.drawingBufferHeight}},drawingBufferWidth:{get:function(){return this._context.drawingBufferWidth}},maximumAliasedLineWidth:{get:function(){return Co.maximumAliasedLineWidth}},maximumCubeMapSize:{get:function(){return Co.maximumCubeMapSize}},pickPositionSupported:{get:function(){return this._context.depthTexture}},sampleHeightSupported:{get:function(){return this._context.depthTexture}},clampToHeightSupported:{get:function(){return this._context.depthTexture}},invertClassificationSupported:{get:function(){return this._context.depthTexture}},specularEnvironmentMapsSupported:{get:function(){return b5.isSupported(this._context)}},globe:{get:function(){return this._globe},set:function(o){this._globe=this._globe&&this._globe.destroy(),this._globe=o,NIi(this,o)}},primitives:{get:function(){return this._primitives}},primitivesQuadTrees:{get:function(){return this._primitivesQuadTrees}},groundPrimitives:{get:function(){return this._groundPrimitives}},camera:{get:function(){return this._view.camera},set:function(o){this._view.camera=o}},view:{get:function(){return this._view},set:function(o){this._view=o}},defaultView:{get:function(){return this._defaultView}},picking:{get:function(){return this._picking}},screenSpaceCameraController:{get:function(){return this._screenSpaceCameraController}},mapProjection:{get:function(){return this._mapProjection}},jobScheduler:{get:function(){return this._jobScheduler}},frameState:{get:function(){return this._frameState}},environmentState:{get:function(){return this._environmentState}},tweens:{get:function(){return this._tweens}},imageryLayers:{get:function(){if(O(this.globe))return this.globe.imageryLayers}},terrainProvider:{get:function(){if(O(this.globe))return this.globe.terrainProvider},set:function(o){O(this.globe)&&(this.globe.terrainProvider=o)}},terrainProviderChanged:{get:function(){if(O(this.globe))return this.globe.terrainProviderChanged}},preUpdate:{get:function(){return this._preUpdate}},postUpdate:{get:function(){return this._postUpdate}},renderError:{get:function(){return this._renderError}},preRender:{get:function(){return this._preRender}},postRender:{get:function(){return this._postRender}},lastRenderTime:{get:function(){return this._lastRenderTime}},context:{get:function(){return this._context}},debugFrustumStatistics:{get:function(){return this._view.debugFrustumStatistics}},scene3DOnly:{get:function(){return this._frameState.scene3DOnly}},orderIndependentTranslucency:{get:function(){return this._useOIT}},id:{get:function(){return this._id}},mode:{get:function(){return this._mode},set:function(o){o===xi.SCENE2D?this.morphTo2D(0):o===xi.SCENE3D?this.morphTo3D(0):o===xi.COLUMBUS_VIEW&&this.morphToColumbusView(0),this._mode=o}},frustumCommandsList:{get:function(){return this._view.frustumCommandsList}},numberOfFrustums:{get:function(){return this._view.frustumCommandsList.length}},useWebVR:{get:function(){return this._useWebVR},set:function(o){this._useWebVR=o,this._useWebVR?(this._frameState.creditDisplay.container.style.visibility="hidden",this._cameraVR=new Ml(this),O(this._deviceOrientationCameraController)||(this._deviceOrientationCameraController=new ibe(this)),this._aspectRatioVR=this.camera.frustum.aspectRatio):(this._frameState.creditDisplay.container.style.visibility="visible",this._cameraVR=void 0,this._deviceOrientationCameraController=this._deviceOrientationCameraController&&!this._deviceOrientationCameraController.isDestroyed()&&this._deviceOrientationCameraController.destroy(),this.camera.frustum.aspectRatio=this._aspectRatioVR,this.camera.frustum.xOffset=0)}},mapMode2D:{get:function(){return this._mapMode2D}},splitPosition:{get:function(){return this._frameState.splitPosition},set:function(o){this._frameState.splitPosition=o}},minimumDisableDepthTestDistance:{get:function(){return this._minimumDisableDepthTestDistance},set:function(o){this._minimumDisableDepthTestDistance=o}},logarithmicDepthBuffer:{get:function(){return this._logDepthBuffer},set:function(o){o=this._context.fragmentDepth&&o,this._logDepthBuffer!==o&&(this._logDepthBuffer=o,this._logDepthBufferDirty=!0)}},gamma:{get:function(){return this._context.uniformState.gamma},set:function(o){this._context.uniformState.gamma=o}},highDynamicRange:{get:function(){return this._hdr},set:function(o){let A=this._context,f=o&&A.depthTexture&&(A.colorBufferFloat||A.colorBufferHalfFloat);this._hdrDirty=f!==this._hdr,this._hdr=f}},highDynamicRangeSupported:{get:function(){let o=this._context;return o.depthTexture&&(o.colorBufferFloat||o.colorBufferHalfFloat)}},cameraUnderground:{get:function(){return this._cameraUnderground}},msaaSamples:{get:function(){return this._msaaSamples},set:function(o){o=Math.min(o,Co.maximumSamples),this._msaaSamples=o}},msaaSupported:{get:function(){return this._context.msaa}},pixelRatio:{get:function(){return this._frameState.pixelRatio},set:function(o){this._frameState.pixelRatio=o}},opaqueFrustumNearOffset:{get:function(){return .9999}},sunShaftEnabled:{get:function(){return this._sunShaftEnabled},set:function(o){this._sunShaftEnabled=o}},loadPrimitiveFirst:{get:function(){return this._loadPrimitiveFirst},set:function(o){this._loadPrimitiveFirst=o}},globeHeight:{get:function(){return this._globeHeight}},maxProjectionCount:{get:function(){return this._maxProjectionCount},set:function(o){o<=1?o=1:o>100&&(o=100),this._maxProjectionCount=o}}});Ju.prototype.getCompressedTextureFormatSupported=function(o){let A=this.context;return(o==="WEBGL_compressed_texture_s3tc"||o==="s3tc")&&A.s3tc||(o==="WEBGL_compressed_texture_pvrtc"||o==="pvrtc")&&A.pvrtc||(o==="WEBGL_compressed_texture_etc"||o==="etc")&&A.etc||(o==="WEBGL_compressed_texture_etc1"||o==="etc1")&&A.etc1||(o==="WEBGL_compressed_texture_astc"||o==="astc")&&A.astc||(o==="EXT_texture_compression_bptc"||o==="bc7")&&A.bc7};function K9e(o,A,f,m,C,y,x,v,E,I){A?o.perspectivesWithDepth=NY.createDerivedCommands(f,A,m,C,y,x,v,E,o.perspectivesWithDepth):(o.perspectives=FY.createDerivedCommands(f,m,C,y,x,v,E,o.perspectives),o.fisheyes=LY.createDerivedCommands(f,m,C,y,x,E,o.fisheyes))}function Y9e(o,A,f,m,C,y){let x=o._frameState,v=o._context,E=o._view.oit,I=x.shadowState.lightShadowMaps,w=x.shadowState.lightShadowsEnabled,Q=A.derivedCommands;O(A.pickId)&&(Q.picking=fx.createPickDerivedCommand(o,A,v,Q.picking)),A.pickOnly||(Q.depth=fx.createDepthOnlyDerivedCommand(o,A,v,Q.depth)),Q.originalCommand=A,o._hdr&&(Q.hdr=fx.createHdrCommand(A,v,Q.hdr),A=Q.hdr.command,Q=A.derivedCommands),w&&A.receiveShadows&&(Q.shadows=vQ.createReceiveDerivedCommand(I,A,f,v,Q.shadows)),A.pass===hr.TRANSLUCENT&&O(E)&&E.isSupported()&&(w&&A.receiveShadows?(Q.oit=O(Q.oit)?Q.oit:{},Q.perspectivesWithDepth&&(Q.oit.shadows=E.createDerivedCommands(Q.perspectivesWithDepth.receiveCommand,v,Q.oit.shadows))):Q.oit=E.createDerivedCommands(A,v,Q.oit))}function J9e(o,A,f){let m=o._frameState,C=o._context,y=o._view.oit,x=m.viewShedState.lightShadowMaps,v=m.viewShedState.lightShadowsEnabled,E=A.derivedCommands;O(A.pickId)&&(E.picking=fx.createPickDerivedCommand(o,A,C,E.picking)),A.pickOnly||(E.depth=fx.createDepthOnlyDerivedCommand(o,A,C,E.depth)),E.originalCommand=A,o._hdr&&(E.hdr=fx.createHdrCommand(A,C,E.hdr),A=E.hdr.command,E=A.derivedCommands),v&&A.receiveShadows&&(E.viewShedMaps=nH.createReceiveDerivedCommand(x,A,f,C,E.viewShedMaps)),A.pass===hr.TRANSLUCENT&&O(y)&&y.isSupported()&&(v&&A.receiveShadows?E.oit=O(E.oit)?E.oit:{}:E.oit=y.createDerivedCommands(A,C,E.oit))}function W9e(o,A,f){let m=o._frameState,C=o._context,y=o._view.oit,x=m.shadowState.lightShadowMaps,v=m.shadowState.lightShadowsEnabled,E=A.derivedCommands;O(A.pickId)&&(E.picking=fx.createPickDerivedCommand(o,A,C,E.picking)),A.pickOnly||(E.depth=fx.createDepthOnlyDerivedCommand(o,A,C,E.depth)),E.originalCommand=A,o._hdr&&(E.hdr=fx.createHdrCommand(A,C,E.hdr),A=E.hdr.command,E=A.derivedCommands),v&&A.receiveShadows&&(E.shadows=vQ.createReceiveDerivedCommand(x,A,f,C,E.shadows)),A.pass===hr.TRANSLUCENT&&O(y)&&y.isSupported()&&(v&&A.receiveShadows?(E.oit=O(E.oit)?E.oit:{},E.oit.shadows=y.createDerivedCommands(E.shadows.receiveCommand,C,E.oit.shadows)):E.oit=y.createDerivedCommands(A,C,E.oit))}Ju.prototype.updateDerivedCommands=function(o){if(!O(o.derivedCommands))return;let A=this._frameState,f=this._context,m=o.derivedCommands,C=!1,y=A.shadowState.lastDirtyTime;o.lastDirtyTime!==y&&(o.lastDirtyTime=y,o.dirty=!0,C=!0);let x=A.useLogDepth,v=O(m.logDepth),E=x&&!v,I=A.textureProjecitonHints.shadowsEnabled,w=A.textureProjecitonHints.shadowMaps,Q=A.textureProjecitonHints.lightShadowMaps;if(I&&O(m)){let k=[],U=[];for(let H in w){let q=w[H];q._useDepth?U.push(q):k.push(q)}let V=!1;if(k.length>0&&O(o.receiveTextureProjectionList)&&o.receiveTextureProjectionList.length>0&&((v||E)&&(m.logDepth=fx.createLogDepthCommand(o,f,m.logDepth),K9e(m.logDepth.command.derivedCommands,!1,k,Q,m.logDepth.command,C,f,this._camera,this.maxProjectionCount),Y9e(this,m.logDepth.command,C,!1,k,Q)),V=!0),U.length>0&&((v||E)&&(m.logDepth=fx.createLogDepthCommand(o,f,m.logDepth),K9e(m.logDepth.command.derivedCommands,!0,U,Q,o,C,f,this._camera,this.maxProjectionCount),o.castShadows&&(m.perspectivesWithDepth=m.logDepth.command.derivedCommands.perspectivesWithDepth),Y9e(this,m.logDepth.command,C,!0,U,Q)),V=!0),V)return}let M=!1,B=A.viewShedState.lastDirtyTime;o.lastDirtyTime!==B&&(o.lastDirtyTime=B,o.dirty=!0,M=!0);let T=this._hdr,D=O(m.hdr),F=O(m.originalCommand),L=T&&!D,R=(!x||!T)&&!F;if(o.dirty=o.dirty||E||L||R,o.dirty){o.dirty=!1;let k=A.viewShedState.shadowMaps;A.viewShedState.shadowsEnabled&&o.castShadows&&(m.viewShedMaps=nH.createCastDerivedCommand(k,o,M,f,m.viewShedMaps)),(v||E)&&(m.logDepth=fx.createLogDepthCommand(o,f,m.logDepth),J9e(this,m.logDepth.command,M)),(F||R)&&J9e(this,o,M)}if(C=!1,o.lastDirtyTime!==y&&(o.lastDirtyTime=y,o.dirty=!0,C=!0),o.dirty=o.dirty||E||L||R,o.dirty){o.dirty=!1;let k=A.shadowState.shadowMaps;A.shadowState.shadowsEnabled&&o.castShadows&&(m.shadows=vQ.createCastDerivedCommand(k,o,C,f,m.shadows)),(v||E)&&(m.logDepth=fx.createLogDepthCommand(o,f,m.logDepth),W9e(this,m.logDepth.command,C)),(F||R)&&W9e(this,o,C)}};var kIi=new wP({pass:Ep.RENDER}),Lge=new wP({pass:Ep.PRELOAD}),Fge=new wP({pass:Ep.PRELOAD_FLIGHT}),OIi=new wP({pass:Ep.REQUEST_RENDER_MODE_DEFER_CHECK}),j9e=new wi,Nge;function UIi(o){let A=o.globe;if(o._mode===xi.SCENE3D&&O(A)&&A.show&&!o._cameraUnderground&&!o._globeTranslucencyState.translucent){let f=A.ellipsoid,m=o.frameState.minimumTerrainHeight;return j9e.radius=f.minimumRadius+m,Nge=Gre.fromBoundingSphere(j9e,o.camera.positionWC,Nge),Nge}}Ju.prototype.clearPasses=function(o){o.render=!1,o.pick=!1,o.depth=!1,o.postProcess=!1,o.offscreen=!1};function Znt(o,A,f){let m=o._frameState;m.frameNumber=A,m.time=fi.clone(f,m.time)}Ju.prototype.updateFrameState=function(){let o=this.camera,A=this._frameState;A.commandList.length=0,A.shadowMaps.length=0,A.textureProjectionMaps.length=0,A.viewShedMaps.length=0,A.brdfLutGenerator=this._brdfLutGenerator,A.environmentMap=this.skyBox&&this.skyBox._cubeMap,A.mode=this._mode,A.morphTime=this.morphTime,A.mapProjection=this.mapProjection,A.camera=o,A.cullingVolume=o.frustum.computeCullingVolume(o.positionWC,o.directionWC,o.upWC),O(o.frustum.computeCullingVolumeForTileset)&&(A.cullingVolumeForTileset=o.frustum.computeCullingVolumeForTileset(o.positionWC,o.directionWC,o.upWC)),A.occluder=UIi(this),A.minimumTerrainHeight=0,A.minimumDisableDepthTestDistance=this._minimumDisableDepthTestDistance,A.invertClassification=this.invertClassification,A.sunColor=this._sunColor,A.light=this.light,A.useLogDepth=this._logDepthBuffer&&!(this.camera.frustum instanceof Ss||this.camera.frustum instanceof K0),A.light=this.light,A.cameraUnderground=this._cameraUnderground,A.globeTranslucencyState=this._globeTranslucencyState,O(this.globe)&&(A.terrainExaggeration=this.globe.terrainExaggeration,A.terrainExaggerationRelativeHeight=this.globe.terrainExaggerationRelativeHeight),O(this._specularEnvironmentMapAtlas)&&this._specularEnvironmentMapAtlas.ready?(A.specularEnvironmentMaps=this._specularEnvironmentMapAtlas.texture,A.specularEnvironmentMapsMaximumLOD=this._specularEnvironmentMapAtlas.maximumMipmapLevel):(A.specularEnvironmentMaps=void 0,A.specularEnvironmentMapsMaximumLOD=void 0),A.sphericalHarmonicCoefficients=this.sphericalHarmonicCoefficients,this._actualInvertClassificationColor=At.clone(this.invertClassificationColor,this._actualInvertClassificationColor),_oe.isTranslucencySupported(this._context)||(this._actualInvertClassificationColor.alpha=1),A.invertClassificationColor=this._actualInvertClassificationColor,O(this.globe)?A.maximumScreenSpaceError=this.globe.maximumScreenSpaceError:A.maximumScreenSpaceError=2,this.clearPasses(A.passes),A.tilesetPassState=void 0};Ju.prototype.isVisible=function(o,A,f){return O(o)&&(!O(o.boundingVolume)||!o.cull||A.computeVisibility(o.boundingVolume)!==La.OUTSIDE&&(!O(f)||!o.occlude||!o.boundingVolume.isOccluded(f)))};var Tee=new Xe(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);Tee=Xe.inverseTransformation(Tee,Tee);function GIi(o,A,f,m){let C=A._frameState,y=C.context,x=o.boundingVolume;O(A._debugVolume)&&A._debugVolume.destroy();let v,E=ee.clone(x.center);if(C.mode!==xi.SCENE3D){E=Xe.multiplyByPoint(Tee,E,E);let M=C.mapProjection,B=M.unproject(E);E=M.ellipsoid.cartographicToCartesian(B)}if(O(x.radius)){let M=x.radius;v=rc.toWireframe(gC.createGeometry(new gC({radii:new ee(M,M,M),vertexFormat:Va.FLAT_VERTEX_FORMAT}))),A._debugVolume=new Xa({geometryInstances:new co({geometry:v,modelMatrix:Xe.fromTranslation(E),attributes:{color:new Yo(1,0,0,1)}}),appearance:new Va({flat:!0,translucent:!1}),asynchronous:!1})}else{let M=x.halfAxes;v=rc.toWireframe(LM.createGeometry(LM.fromDimensions({dimensions:new ee(2,2,2),vertexFormat:Va.FLAT_VERTEX_FORMAT}))),A._debugVolume=new Xa({geometryInstances:new co({geometry:v,modelMatrix:Xe.fromRotationTranslation(M,E,new Xe),attributes:{color:new Yo(1,0,0,1)}}),appearance:new Va({flat:!0,translucent:!1}),asynchronous:!1})}let I=C.commandList,w=C.commandList=[];A._debugVolume.update(C),o=w[0],C.useLogDepth&&(o=fx.createLogDepthCommand(o,y).command);let Q;O(m)&&(Q=f.framebuffer,f.framebuffer=m),o.execute(y,f),O(Q)&&(f.framebuffer=Q),C.commandList=I}function Zm(o,A,f,m,C){let y=A._frameState;if(O(A.debugCommandFilter)&&!A.debugCommandFilter(o))return;if(o instanceof eA){o.execute(f,m);return}o.debugShowBoundingVolume&&O(o.boundingVolume)&&GIi(o,A,m,C),y.useLogDepth&&O(o.derivedCommands.logDepth)&&(o=o.derivedCommands.logDepth.command);let x=y.passes;if(!x.pick&&!x.depth&&A._hdr&&O(o.derivedCommands)&&O(o.derivedCommands.hdr)&&(o=o.derivedCommands.hdr.command),x.pick||x.depth){if(x.pick&&!x.depth&&O(o.derivedCommands.picking)){o=o.derivedCommands.picking.pickCommand,o.execute(f,m);return}else if(O(o.derivedCommands.depth)){o=o.derivedCommands.depth.depthOnlyCommand,o.execute(f,m);return}}if(A.debugShowCommands||A.debugShowFrustums){A._debugInspector.executeDebugShowFrustumsCommand(A,o,m);return}let v=A.frameState.textureProjecitonHints.shadowsEnabled&&A.frameState.textureProjecitonHints.lightShadowMaps.length>0,E=O(o.derivedCommands.fisheyes),I=O(o.derivedCommands.perspectives),w=O(o.derivedCommands.perspectivesWithDepth);v&&(E||I||w)?(I&&o.derivedCommands.perspectives.receiveCommand.execute(f,m),w&&o.derivedCommands.perspectivesWithDepth.receiveCommand.execute(f,m),E&&o.derivedCommands.fisheyes.receiveCommand.execute(f,m)):y.viewShedState.lightShadowsEnabled&&O(o.derivedCommands.viewShedMaps)?o.derivedCommands.viewShedMaps.receiveCommand.execute(f,m):y.shadowState.lightShadowsEnabled&&o.receiveShadows&&O(o.derivedCommands.shadows)?o.derivedCommands.shadows.receiveCommand.execute(f,m):o.execute(f,m)}function wz(o,A,f,m){let C=A._frameState,y=o.derivedCommands;!O(y)||(C.useLogDepth&&O(y.logDepth)&&(o=y.logDepth.command),y=o.derivedCommands,O(y.picking)?(o=y.picking.pickCommand,o.execute(f,m)):O(y.depth)&&(o=y.depth.depthOnlyCommand,o.execute(f,m)))}function HIi(o,A,f){return A.boundingVolume.distanceSquaredTo(f)-o.boundingVolume.distanceSquaredTo(f)}function VIi(o,A,f){return o.boundingVolume.distanceSquaredTo(f)-A.boundingVolume.distanceSquaredTo(f)+je.EPSILON12}function zIi(o,A,f,m,C){let y=o.context;LJ(m,HIi,o.camera.positionWC),O(C)&&A(C.unclassifiedCommand,o,y,f);let x=m.length;for(let v=0;v<x;++v)A(m[v],o,y,f)}function KIi(o,A,f,m,C){let y=o.context;LJ(m,VIi,o.camera.positionWC),O(C)&&A(C.unclassifiedCommand,o,y,f);let x=m.length;for(let v=0;v<x;++v)A(m[v],o,y,f)}var $nt=new Yu,eot=new n2,tot=new Ss,iot=new K0;function Zte(o,A){let f=o.camera,m=o.context,C=o.frameState,y=m.uniformState;y.updateCamera(f);let x;O(f.frustum.fov)?x=f.frustum.clone($nt):O(f.frustum.infiniteProjectionMatrix)?x=f.frustum.clone(eot):O(f.frustum.width)?x=f.frustum.clone(tot):x=f.frustum.clone(iot),x.near=f.frustum.near,x.far=f.frustum.far,y.updateFrustum(x),y.updatePass(hr.ENVIRONMENT);let v=C.passes,E=v.pick,I=o._environmentState,w=o._view,Q=I.renderTranslucentDepthForPick,M=I.useWebVR;if(!E){let se=I.skyBoxCommand;if(O(se)&&Zm(se,o,m,A),I.isSkyAtmosphereVisible&&Zm(I.skyAtmosphereCommand,o,m,A),I.isSunVisible&&(I.sunDrawCommand.execute(m,A),o.sunBloom&&!M)){let ce;I.useGlobeDepthFramebuffer?ce=w.globeDepth.framebuffer:I.usePostProcess?ce=w.sceneFramebuffer.framebuffer:ce=I.originalFramebuffer,o._sunPostProcess.execute(m),o._sunPostProcess.copy(m,ce),A.framebuffer=ce}I.isMoonVisible&&I.moonCommand.execute(m,A)}let B;I.useOIT?(O(o._executeOITFunction)||(o._executeOITFunction=function(se,ce,j,de,me){w.globeDepth.prepareColorTextures(m),w.oit.executeCommands(se,ce,j,de,me)}),B=o._executeOITFunction):v.render?B=zIi:B=KIi;let T=w.frustumCommandsList,D=T.length,F=I.clearGlobeDepth,L=I.useDepthPlane,R=o._globeTranslucencyState,k=R.translucent,U=o._view.globeTranslucencyFramebuffer,V=o._depthClearCommand,H=o._stencilClearCommand,q=o._classificationStencilClearCommand,ie=o._depthPlane,Z=I.usePostProcessSelected,oe=f.position.z,ne;for(let se=0;se<D;++se){let ce=D-se-1,j=T[ce];o.mode===xi.SCENE2D?(f.position.z=oe-j.near+1,x.far=Math.max(1,j.far-j.near),x.near=1,y.update(C),y.updateFrustum(x)):(x.near=ce!==0?j.near*o.opaqueFrustumNearOffset:j.near,x.far=j.far,y.updateFrustum(x)),V.execute(m,A),m.stencilBuffer&&H.execute(m,A),y.updatePass(hr.GLOBE);let de=j.commands[hr.GLOBE],me=j.indices[hr.GLOBE];if(k)R.executeGlobeCommands(j,Zm,U,o,A);else for(ne=0;ne<me;++ne)Zm(de[ne],o,m,A);let _e=w.globeDepth;if(O(_e)&&I.useGlobeDepthFramebuffer&&_e.executeCopyDepth(m,A),!I.renderTranslucentDepthForPick)if(y.updatePass(hr.TERRAIN_CLASSIFICATION),de=j.commands[hr.TERRAIN_CLASSIFICATION],me=j.indices[hr.TERRAIN_CLASSIFICATION],k)R.executeGlobeClassificationCommands(j,Zm,U,o,A);else for(ne=0;ne<me;++ne)Zm(de[ne],o,m,A);if(F&&(V.execute(m,A),L&&ie.execute(m,A)),!I.useInvertClassification||E||I.renderTranslucentDepthForPick){for(y.updatePass(hr.CESIUM_3D_TILE),de=j.commands[hr.CESIUM_3D_TILE],me=j.indices[hr.CESIUM_3D_TILE],ne=0;ne<me;++ne)Zm(de[ne],o,m,A);if(me>0&&(O(_e)&&I.useGlobeDepthFramebuffer&&(_e.prepareColorTextures(m,F),_e.executeUpdateDepth(m,A,F,_e.depthStencilTexture)),!I.renderTranslucentDepthForPick))for(y.updatePass(hr.CESIUM_3D_TILE_CLASSIFICATION),de=j.commands[hr.CESIUM_3D_TILE_CLASSIFICATION],me=j.indices[hr.CESIUM_3D_TILE_CLASSIFICATION],ne=0;ne<me;++ne)Zm(de[ne],o,m,A)}else{o._invertClassification.clear(m,A);let Ie=A.framebuffer;for(A.framebuffer=o._invertClassification._fbo.framebuffer,y.updatePass(hr.CESIUM_3D_TILE),de=j.commands[hr.CESIUM_3D_TILE],me=j.indices[hr.CESIUM_3D_TILE],ne=0;ne<me;++ne)Zm(de[ne],o,m,A);for(O(_e)&&I.useGlobeDepthFramebuffer&&(o._invertClassification.prepareTextures(m),_e.executeUpdateDepth(m,A,F,o._invertClassification._fbo.getDepthStencilTexture())),y.updatePass(hr.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW),de=j.commands[hr.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW],me=j.indices[hr.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW],ne=0;ne<me;++ne)Zm(de[ne],o,m,A);for(A.framebuffer=Ie,o._invertClassification.executeClassified(m,A),C.invertClassificationColor.alpha===1&&o._invertClassification.executeUnclassified(m,A),me>0&&m.stencilBuffer&&q.execute(m,A),y.updatePass(hr.CESIUM_3D_TILE_CLASSIFICATION),de=j.commands[hr.CESIUM_3D_TILE_CLASSIFICATION],me=j.indices[hr.CESIUM_3D_TILE_CLASSIFICATION],ne=0;ne<me;++ne)Zm(de[ne],o,m,A)}for(me>0&&m.stencilBuffer&&H.execute(m,A),y.updatePass(hr.OPAQUE),de=j.commands[hr.OPAQUE],me=j.indices[hr.OPAQUE],ne=0;ne<me;++ne)Zm(de[ne],o,m,A);ce!==0&&o.mode!==xi.SCENE2D&&(x.near=j.near,y.updateFrustum(x));let Be;if(!E&&I.useInvertClassification&&C.invertClassificationColor.alpha<1&&(Be=o._invertClassification),y.updatePass(hr.TRANSLUCENT),de=j.commands[hr.TRANSLUCENT],de.length=j.indices[hr.TRANSLUCENT],B(o,Zm,A,de,Be),j.indices[hr.CESIUM_3D_TILE_CLASSIFICATION]>0&&w.translucentTileClassification.isSupported()&&(w.translucentTileClassification.executeTranslucentCommands(o,Zm,A,de,_e.depthStencilTexture),w.translucentTileClassification.executeClassificationCommands(o,Zm,A,j)),m.depthTexture&&o.useDepthPicking&&(I.useGlobeDepthFramebuffer||Q)){let Ie=_e.depthStencilTexture,ve=o._picking.getPickDepth(o,ce);ve.update(m,Ie),ve.executeCopyDepth(m,A)}if(E||!Z)continue;let Qe=A.framebuffer;if(A.framebuffer=w.sceneFramebuffer.getIdFramebuffer(),x.near=ce!==0?j.near*o.opaqueFrustumNearOffset:j.near,x.far=j.far,y.updateFrustum(x),y.updatePass(hr.GLOBE),de=j.commands[hr.GLOBE],me=j.indices[hr.GLOBE],k)R.executeGlobeCommands(j,wz,U,o,A);else for(ne=0;ne<me;++ne)wz(de[ne],o,m,A);for(F&&(V.framebuffer=A.framebuffer,V.execute(m,A),V.framebuffer=void 0),F&&L&&ie.execute(m,A),y.updatePass(hr.CESIUM_3D_TILE),de=j.commands[hr.CESIUM_3D_TILE],me=j.indices[hr.CESIUM_3D_TILE],ne=0;ne<me;++ne)wz(de[ne],o,m,A);for(y.updatePass(hr.OPAQUE),de=j.commands[hr.OPAQUE],me=j.indices[hr.OPAQUE],ne=0;ne<me;++ne)wz(de[ne],o,m,A);for(y.updatePass(hr.TRANSLUCENT),de=j.commands[hr.TRANSLUCENT],me=j.indices[hr.TRANSLUCENT],ne=0;ne<me;++ne)wz(de[ne],o,m,A);A.framebuffer=Qe}}function dQe(o){o.context.uniformState.updatePass(hr.COMPUTE);let A=o._environmentState.sunComputeCommand;O(A)&&A.execute(o._computeEngine);let f=o._computeCommandList,m=f.length;for(let C=0;C<m;++C)f[C].execute(o._computeEngine)}function YIi(o,A){o.context.uniformState.updatePass(hr.OVERLAY);let f=o.context,m=o._overlayCommandList,C=m.length;for(let y=0;y<C;++y)m[y].execute(f,A)}function fQe(o,A,f,m){m=Ae(m,!0);let C=f.shadowMapCullingVolume,y=f.isPointLight,x=f.passes,v=x.length,E=A.length;for(let I=0;I<E;++I){let w=A[I];if(m&&o.updateDerivedCommands(w),w.castShadows&&(w.pass===hr.GLOBE||w.pass===hr.CESIUM_3D_TILE||w.pass===hr.OPAQUE||w.pass===hr.TRANSLUCENT)&&o.isVisible(w,C))if(y)for(let Q=0;Q<v;++Q)x[Q].commandList.push(w);else if(v===1)x[0].commandList.push(w);else{let Q=!1;for(let M=v-1;M>=0;--M){let B=x[M].cullingVolume;if(o.isVisible(w,B))x[M].commandList.push(w),Q=!0;else if(Q)break}}}}function gQe(o){let A=o.frameState,f=A.shadowState.shadowMaps,m=f.length;if(!A.shadowState.shadowsEnabled)return;let C=o.context,y=C.uniformState;for(let x=0;x<m;++x){let v=f[x];if(v.outOfView)continue;let E=v.passes,I=E.length;for(let Q=0;Q<I;++Q)E[Q].commandList.length=0;let w=o.frameState.commandList;fQe(o,w,v);for(let Q=0;Q<I;++Q){let M=v.passes[Q];y.updateCamera(M.camera),v.updatePass(C,Q);let B=M.commandList.length;for(let T=0;T<B;++T){let D=M.commandList[T];y.updatePass(D.pass),Zm(D.derivedCommands.shadows.castCommands[x],o,C,M.passState)}}}}function rot(o){let A=o.frameState,f=[];for(let x in A.viewShedState.shadowMaps){let v=A.viewShedState.shadowMaps[x];f.push(v)}let m=f.length;if(!A.viewShedState.shadowsEnabled)return;let C=o.context,y=C.uniformState;for(let x=0;x<m;++x){let v=f[x];if(v.outOfView)continue;let E,I=v.passes,w=I.length;for(E=0;E<w;++E)I[E].commandList.length=0;let Q=o.frameState.commandList;for(fQe(o,Q,v),E=0;E<w;++E){let M=v.passes[E];y.updateCamera(M.camera),v.updatePass(C,E);let B=M.commandList.length;for(let T=0;T<B;++T){let D=M.commandList[T];!O(D.derivedCommands.viewShedMaps)||D.derivedCommands.viewShedMaps.castCommands.length<m||(y.updatePass(D.pass),Zm(D.derivedCommands.viewShedMaps.castCommands[x],o,C,M.passState))}}}}function not(o){let A=o.frameState;if(!A.textureProjecitonHints.shadowsEnabled)return;let f=[];for(let x in A.textureProjecitonHints.shadowMaps){let v=A.textureProjecitonHints.shadowMaps[x];v._useDepth&&!v.outOfView&&f.push(v)}let m=f.length,C=o.context,y=C.uniformState;for(let x=0;x<m;++x){let v=f[x],E,I=v.passes,w=I.length;for(E=0;E<w;++E)I[E].commandList.length=0;let Q=o.frameState.commandList;for(fQe(o,Q,v,!1),E=0;E<w;++E){let M=v.passes[E];y.updateCamera(M.camera),v.updatePass(C,E);let B=M.commandList.length;for(let T=0;T<B;++T){let D=M.commandList[T];!O(D.derivedCommands.perspectivesWithDepth)||D.derivedCommands.perspectivesWithDepth.castCommands.length<m||(y.updatePass(D.pass),Zm(D.derivedCommands.perspectivesWithDepth.castCommands[x],o,C,M.passState))}}}}var JIi=new ee;Ju.prototype.updateAndExecuteCommands=function(o,A){let f=this._frameState.mode;this._environmentState.useWebVR?oot(this,o,A):f!==xi.SCENE2D||this._mapMode2D===nQ.ROTATE?DL(!0,this,o,A):(KJ(this,o,A),aot(this,o))};Ju.prototype.updateAndExecuteCommandszh=function(o,A){let f=this._frameState.mode;this._environmentState.useWebVR?oot(this,o,A):f!==xi.SCENE2D||this._mapMode2D===nQ.ROTATE?i_i(!0,this,o,A):(KJ(this,o,A),aot(this,o))};function oot(o,A,f){let m=o._view,C=m.camera,y=o._environmentState.renderTranslucentDepthForPick;KJ(o,A,f),uot(o),m.createPotentiallyVisibleSet(o),dQe(o),y||(gQe(o),not(o),rot(o));let x=A.viewport;x.x=0,x.y=0,x.width=x.width*.5;let v=Ml.clone(C,o._cameraVR);v.frustum=C.frustum;let E=C.frustum.near,I=E*Ae(o.focalLength,5),w=Ae(o.eyeSeparation,I/30),Q=ee.multiplyByScalar(v.right,w*.5,JIi);C.frustum.aspectRatio=x.width/x.height;let M=.5*w*E/I;ee.add(v.position,Q,C.position),C.frustum.xOffset=M,Zte(o,A),x.x=x.width,ee.subtract(v.position,Q,C.position),C.frustum.xOffset=-M,Zte(o,A),Ml.clone(v,C)}var WIi=new Kt(Math.PI,je.PI_OVER_TWO),jIi=new ee,qIi=new ee,XIi=new Xe,ZIi=new Xe,$Ii=new ee,e_i=new ee,t_i=new Kr;function aot(o,A){let f=o.context,m=o.frameState,C=o.camera,y=A.viewport,x=Kr.clone(y,t_i);A.viewport=x;let v=WIi,E=jIi;o.mapProjection.project(v,E);let I=ee.clone(C.position,qIi),w=Xe.clone(C.transform,ZIi),Q=C.frustum.clone();C._setTransform(Xe.IDENTITY);let M=Xe.computeViewportTransformation(x,0,1,XIi),B=C.frustum.projectionMatrix,T=C.positionWC.y,D=ee.fromElements(je.sign(T)*E.x-T,0,-C.positionWC.x,$Ii),F=zn.pointToGLWindowCoordinates(B,M,D,e_i);F.x=Math.floor(F.x);let L=x.x,R=x.width;if(T===0||F.x<=L||F.x>=L+R)DL(!0,o,A);else if(Math.abs(L+R*.5-F.x)<1)x.width=F.x-x.x,C.position.x*=je.sign(C.position.x),C.frustum.right=0,m.cullingVolume=C.frustum.computeCullingVolume(C.positionWC,C.directionWC,C.upWC),f.uniformState.update(m),DL(!0,o,A),x.x=F.x,C.position.x=-C.position.x,C.frustum.right=-C.frustum.left,C.frustum.left=0,m.cullingVolume=C.frustum.computeCullingVolume(C.positionWC,C.directionWC,C.upWC),f.uniformState.update(m),DL(!1,o,A);else if(F.x>L+R*.5){x.width=F.x-L;let k=C.frustum.right;C.frustum.right=E.x-T,m.cullingVolume=C.frustum.computeCullingVolume(C.positionWC,C.directionWC,C.upWC),f.uniformState.update(m),DL(!0,o,A),x.x=F.x,x.width=L+R-F.x,C.position.x=-C.position.x,C.frustum.left=-C.frustum.right,C.frustum.right=k-C.frustum.right*2,m.cullingVolume=C.frustum.computeCullingVolume(C.positionWC,C.directionWC,C.upWC),f.uniformState.update(m),DL(!1,o,A)}else{x.x=F.x,x.width=L+R-F.x;let k=C.frustum.left;C.frustum.left=-E.x-T,m.cullingVolume=C.frustum.computeCullingVolume(C.positionWC,C.directionWC,C.upWC),f.uniformState.update(m),DL(!0,o,A),x.x=L,x.width=F.x-L,C.position.x=-C.position.x,C.frustum.right=-C.frustum.left,C.frustum.left=k-C.frustum.left*2,m.cullingVolume=C.frustum.computeCullingVolume(C.positionWC,C.directionWC,C.upWC),f.uniformState.update(m),DL(!1,o,A)}C._setTransform(w),ee.clone(I,C.position),C.frustum=Q.clone(),A.viewport=y}function DL(o,A,f,m){let C=A._environmentState,y=A._view,x=C.renderTranslucentDepthForPick;o||(A.frameState.commandList.length=0),uot(A),y.createPotentiallyVisibleSet(A),o&&(O(m)&&KJ(A,f,m),dQe(A),x||(gQe(A),not(A),rot(A))),Zte(A,f)}function i_i(o,A,f,m){let C=A._environmentState,y=A._view,x=C.renderTranslucentDepthForPick;!o&&!x&&(A.frameState.commandList.length=0),x||o_i(A),y.createPotentiallyVisibleSet(A),o&&(O(m)&&KJ(A,f,m),x||(dQe(A),gQe(A))),Zte(A,f)}var q9e=new AC;Ju.prototype.updateEnvironment=function(){let o=this._frameState,A=this._view,f=this._environmentState,m=o.passes.render,C=o.passes.offscreen,y=this.skyAtmosphere,x=this.globe,v=this._globeTranslucencyState;if(!m||this._mode!==xi.SCENE2D&&A.camera.frustum instanceof Ss||!v.environmentVisible)f.skyAtmosphereCommand=void 0,f.skyBoxCommand=void 0,f.sunDrawCommand=void 0,f.sunComputeCommand=void 0,f.moonCommand=void 0;else{O(y)?(O(x)&&(y.setDynamicAtmosphereColor(x.enableLighting&&x.dynamicAtmosphereLighting,x.dynamicAtmosphereLightingFromSun),f.isReadyForAtmosphere=f.isReadyForAtmosphere||x._surface._tilesToRender.length>0),f.skyAtmosphereCommand=y.update(o,x)):f.skyAtmosphereCommand=void 0,f.skyBoxCommand=O(this.skyBox)?this.skyBox.update(o,this._hdr):void 0;let T=O(this.sun)?this.sun.update(o,A.passState,this._hdr):void 0;f.sunDrawCommand=O(T)?T.drawCommand:void 0,f.sunComputeCommand=O(T)?T.computeCommand:void 0,f.moonCommand=O(this.moon)?this.moon.update(o):void 0}let E=f.clearGlobeDepth=O(x)&&x.show&&(!x.depthTestAgainstTerrain||this.mode===xi.SCENE2D);(f.useDepthPlane=E&&this.mode===xi.SCENE3D&&v.useDepthPlane)&&this._depthPlane.update(o),f.renderTranslucentDepthForPick=!1,f.useWebVR=this._useWebVR&&this.mode!==xi.SCENE2D&&!C;let I=o.mode===xi.SCENE3D&&!v.sunVisibleThroughGlobe?o.occluder:void 0,w=o.cullingVolume,Q=q9e.planes;for(let T=0;T<5;++T)Q[T]=w.planes[T];w=q9e,f.isSkyAtmosphereVisible=O(f.skyAtmosphereCommand)&&f.isReadyForAtmosphere,f.isSunVisible=this.isVisible(f.sunDrawCommand,w,I),f.isMoonVisible=this.isVisible(f.moonCommand,w,I);let M=this.specularEnvironmentMaps,B=this._specularEnvironmentMapAtlas;O(M)&&(!O(B)||B.url!==M)?(B=B&&B.destroy(),this._specularEnvironmentMapAtlas=new b5(M)):!O(M)&&O(B)&&(B.destroy(),this._specularEnvironmentMapAtlas=void 0),O(this._specularEnvironmentMapAtlas)&&this._specularEnvironmentMapAtlas.update(o)};function sot(o){let A=o._frameState;o.debugShowFrustumPlanes!==o._debugShowFrustumPlanes&&(o.debugShowFrustumPlanes?o._debugFrustumPlanes=new _g({camera:o.camera,updateOnChange:!1,frustumSplits:A.frustumSplits}):o._debugFrustumPlanes=o._debugFrustumPlanes&&o._debugFrustumPlanes.destroy(),o._debugShowFrustumPlanes=o.debugShowFrustumPlanes),O(o._debugFrustumPlanes)&&o._debugFrustumPlanes.update(A)}function lot(o){let A=o._frameState,f=A.shadowMaps,m=f.length,C=m>0&&!A.passes.pick&&o.mode===xi.SCENE3D;if(C!==A.shadowState.shadowsEnabled&&(++A.shadowState.lastDirtyTime,A.shadowState.shadowsEnabled=C),A.shadowState.lightShadowsEnabled=!1,!!C){for(let y=0;y<m;++y)if(f[y]!==A.shadowState.shadowMaps[y]){++A.shadowState.lastDirtyTime;break}A.shadowState.shadowMaps.length=0,A.shadowState.lightShadowMaps.length=0;for(let y=0;y<m;++y){let x=f[y];x.update(A),A.shadowState.shadowMaps.push(x),x.fromLightSource&&(A.shadowState.lightShadowMaps.push(x),A.shadowState.lightShadowsEnabled=!0),x.dirty&&(++A.shadowState.lastDirtyTime,x.dirty=!1)}}}function r_i(o){let A=o._frameState,f=A.textureProjectionMaps,m=f.length,C=m>0&&!A.passes.pick&&o.mode===xi.SCENE3D;if(C!==A.textureProjecitonHints.shadowsEnabled&&(++A.textureProjecitonHints.lastDirtyTime,A.textureProjecitonHints.shadowsEnabled=C),!!C){for(let y=0;y<m;++y)if(f[y]!==A.textureProjecitonHints.shadowMaps[y]){++A.textureProjecitonHints.lastDirtyTime;break}A.textureProjecitonHints.shadowMaps.length=0,A.textureProjecitonHints.lightShadowMaps.length=0;for(let y=0;y<m;++y){let x=f[y];x.update(A),A.textureProjecitonHints.shadowMaps.push(x),x.fromLightSource&&A.textureProjecitonHints.lightShadowMaps.push(x),x.dirty&&(++A.textureProjecitonHints.lastDirtyTime,x.dirty=!1)}}}function n_i(o){let A=o._frameState,f=A.viewShedMaps,m=f.length,C=m>0&&!A.passes.pick&&o.mode===xi.SCENE3D;if(C!==A.viewShedState.shadowsEnabled&&(++A.viewShedState.lastDirtyTime,A.viewShedState.shadowsEnabled=C),A.viewShedState.lightShadowsEnabled=!1,!!C){for(let y=0;y<m;++y)if(f[y]!==A.viewShedState.shadowMaps[y]){++A.viewShedState.lastDirtyTime;break}A.viewShedState.shadowMaps.length=0,A.viewShedState.lightShadowMaps.length=0;for(let y=0;y<m;++y){let x=f[y];x.update(A),A.viewShedState.shadowMaps.push(x),A.viewShedState.lightShadowMaps.push(x),A.viewShedState.lightShadowsEnabled=!0,x.dirty&&(++A.viewShedState.lastDirtyTime,x.dirty=!1)}}}function uot(o){let A=o._frameState;o.loadPrimitiveFirst?(o._primitives.update(A),o._groundPrimitives.update(A)):(o._groundPrimitives.update(A),o._primitives.update(A)),sot(o),lot(o),r_i(o),n_i(o),o._globe&&o._globe.render(A)}function o_i(o){let A=o._frameState;o._groundPrimitives.update(A),o._primitives.update(A),o.UpdateQuad(A),sot(o),lot(o),o._globe&&o._globe.render(A)}function KJ(o,A,f){let m=o._context,C=o._frameState,y=o._environmentState,x=o._view,v=o._frameState.passes.pick;O(x.globeDepth)&&(x.globeDepth.picking=v);let E=y.useWebVR;y.originalFramebuffer=A.framebuffer,O(o.sun)&&o.sunBloom!==o._sunBloom?(o.sunBloom&&!E?o._sunPostProcess=new lQe:O(o._sunPostProcess)&&(o._sunPostProcess=o._sunPostProcess.destroy()),o._sunBloom=o.sunBloom):!O(o.sun)&&O(o._sunPostProcess)&&(o._sunPostProcess=o._sunPostProcess.destroy(),o._sunBloom=!1);let I=o._clearColorCommand;At.clone(f,I.color),I.execute(m,A);let w=y.useGlobeDepthFramebuffer=O(x.globeDepth);w&&(x.globeDepth.update(m,A,x.viewport,o.msaaSamples,o._hdr,y.clearGlobeDepth),x.globeDepth.clear(m,A,f));let Q=x.oit,M=y.useOIT=!v&&O(Q)&&Q.isSupported();M&&(Q.update(m,A,x.globeDepth.colorFramebufferManager,o._hdr,o.msaaSamples),Q.clear(m,A,f),y.useOIT=Q.isSupported());let B=o.postProcessStages;o._sunShaftEnabled&&y.isSunVisible?B.sunShaft.enabled=!0:B.sunShaft.enabled=!1;let T=y.usePostProcess=!v&&(o._hdr||B.length>0||B.ambientOcclusion.enabled||B.fxaa.enabled||B.bloom.enabled);if(y.usePostProcessSelected=!1,T){if(x.sceneFramebuffer.update(m,x.viewport,o._hdr,o.msaaSamples),x.sceneFramebuffer.clear(m,A,f),B.sunShaft.enabled){B.sunShaft.uniforms.u_size=o.sun._size;let D=C.mode;D===xi.SCENE3D?wi.clone(o.sun._boundingVolume,B.sunShaft._sunBoundingVolume):D===xi.COLUMBUS_VIEW&&wi.clone(o.sun._boundingVolume2D,B.sunShaft._sunBoundingVolume)}B.update(m,C.useLogDepth,o._hdr),B.clear(m),T=y.usePostProcess=B.ready,y.usePostProcessSelected=T&&B.hasSelected}if(y.isSunVisible&&o.sunBloom&&!E?(A.framebuffer=o._sunPostProcess.update(A),o._sunPostProcess.clear(m,A,f)):w?A.framebuffer=x.globeDepth.framebuffer:T&&(A.framebuffer=x.sceneFramebuffer.framebuffer),O(A.framebuffer)&&I.execute(m,A),y.useInvertClassification=!v&&O(A.framebuffer)&&o.invertClassification){let D;if(o.frameState.invertClassificationColor.alpha===1&&y.useGlobeDepthFramebuffer&&(D=x.globeDepth.framebuffer),O(D)||m.depthTexture){if(o._invertClassification.previousFramebuffer=D,o._invertClassification.update(m,o.msaaSamples,x.globeDepth.colorFramebufferManager),o._invertClassification.clear(m,A),o.frameState.invertClassificationColor.alpha<1&&M){let F=o._invertClassification.unclassifiedCommand,L=F.derivedCommands;L.oit=Q.createDerivedCommands(F,m,L.oit)}}else y.useInvertClassification=!1}o._globeTranslucencyState.translucent&&x.globeTranslucencyFramebuffer.updateAndClear(o._hdr,x.viewport,m,A)}Ju.prototype.resolveFramebuffers=function(o){let A=this._context,f=this._environmentState,m=this._view,C=m.globeDepth;O(C)&&C.prepareColorTextures(A);let y=f.useOIT,x=f.useGlobeDepthFramebuffer,v=f.usePostProcess,E=f.originalFramebuffer,I=x?C.colorFramebufferManager:void 0,w=m.sceneFramebuffer._colorFramebuffer,Q=m.sceneFramebuffer.idFramebuffer;if(y&&(o.framebuffer=v?w.framebuffer:E,m.oit.execute(A,o)),f.isSunVisible){let B=this.camera,T=A.uniformState;T.updateCamera(B);let D;O(B.frustum.fov)?D=B.frustum.clone($nt):O(B.frustum.infiniteProjectionMatrix)?D=B.frustum.clone(eot):O(B.frustum.width)?D=B.frustum.clone(tot):D=B.frustum.clone(iot),D.near=B.frustum.near,D.far=B.frustum.far,T.updateFrustum(D)}let M=m.translucentTileClassification;if(M.hasTranslucentDepth&&M.isSupported()&&M.execute(this,o),v){m.sceneFramebuffer.prepareColorTextures(A);let B=w;x&&!y&&(B=I);let T=this.postProcessStages,D=B.getColorTexture(0),F=Q.getColorTexture(0),L=Ae(I,w).getDepthStencilTexture();T.execute(A,D,L,F),T.copy(A,E)}!y&&!v&&x&&(o.framebuffer=E,C.executeCopyColor(A,o))};function a_i(o){let A=o._frameState.afterRender;for(let f=0,m=A.length;f<m;++f)A[f]()&&o.requestRender();A.length=0}function s_i(o){let A=o._globe,f=o.camera.positionCartographic;if(O(A)&&A.show&&O(f))return A.getHeight(f)}function l_i(o){let A=o.camera,f=o._mode,m=o.globe,C=o._screenSpaceCameraController,y=A.positionCartographic;if(!O(y))return!1;if(!C.onMap()&&y.height<0)return!0;if(!O(m)||!m.show||f===xi.SCENE2D||f===xi.MORPHING)return!1;let x=o._globeHeight;return O(x)&&y.height<x}Ju.prototype.initializeFrame=function(){this._shaderFrameCount++===120&&(this._shaderFrameCount=0,this._context.shaderCache.destroyReleasedShaderPrograms(),this._context.textureCache.destroyReleasedTextures()),this._tweens.update(),this._globeHeight=s_i(this),this._cameraUnderground=l_i(this),this._globeTranslucencyState.update(this),this._screenSpaceCameraController.update(),O(this._deviceOrientationCameraController)&&this._deviceOrientationCameraController.update(),this.camera.update(this._mode),this.camera._updateCameraChanged()};function u_i(o,A){if(o.debugShowFramesPerSecond){if(!O(o._performanceDisplay)){let f=document.createElement("div");f.className="map-performanceDisplay-defaultContainer",o._canvas.parentNode.appendChild(f);let m=new OJ({container:f});o._performanceDisplay=m,o._performanceContainer=f}o._performanceDisplay.throttled=o.requestRenderMode,o._performanceDisplay.update(A)}else O(o._performanceDisplay)&&(o._performanceDisplay=o._performanceDisplay&&o._performanceDisplay.destroy(),o._performanceContainer.parentNode.removeChild(o._performanceContainer))}function c_i(o){o._jobScheduler.resetBudgets();let A=o._frameState;o.primitives.prePassesUpdate(A),O(o.globe)&&o.globe.update(A),o._picking.update(),A.creditDisplay.update()}function A_i(o){let A=o._frameState;o.primitives.postPassesUpdate(A),V1.update()}var h_i=new At;function d_i(o){let A=o._frameState,f=o.context,m=f.uniformState,C=o._defaultView;o._view=C,o.updateFrameState(),A.passes.render=!0,A.passes.postProcess=o.postProcessStages.hasSelected,A.tilesetPassState=kIi;let y=Ae(o.backgroundColor,At.BLACK);o._hdr&&(y=At.clone(y,h_i),y.red=Math.pow(y.red,o.gamma),y.green=Math.pow(y.green,o.gamma),y.blue=Math.pow(y.blue,o.gamma)),A.backgroundColor=y,o.fog.update(A),m.update(A);let x=o.shadowMap;O(x)&&x.enabled&&(!O(o.light)||o.light instanceof tH?ee.negate(m.sunDirectionWC,o._shadowMapCamera.direction):ee.clone(o.light.direction,o._shadowMapCamera.direction),A.shadowMaps.push(x));let v=o.textureProjectionMapList;if(v.length>0)for(let Q=0;Q<v.length;Q++){let M=v[Q];M.enabled&&A.textureProjectionMaps.push(M)}let E=o.viewShedMapList;for(let Q=0;Q<E.length;Q++){let M=E[Q];M.enabled&&A.viewShedMaps.push(M)}o._computeCommandList.length=0,o._overlayCommandList.length=0;let I=C.viewport;I.x=0,I.y=0,I.width=f.drawingBufferWidth,I.height=f.drawingBufferHeight;let w=C.passState;w.framebuffer=void 0,w.blendingEnabled=void 0,w.scissorTest=void 0,w.viewport=Kr.clone(I,w.viewport),O(o.globe)&&o.globe.beginFrame(A),o.updateEnvironment(),o.updateAndExecuteCommands(w,y),o.resolveFramebuffers(w),w.framebuffer=void 0,YIi(o,w),O(o.globe)&&(o.globe.endFrame(A),o.globe.tilesLoaded||(o._renderRequested=!0)),f.endFrame()}function pk(o,A){try{A(o)}catch(f){if(o._renderError.raiseEvent(o,f),o.rethrowRenderErrors)throw f}}function f_i(o){return o._picking.updateMostDetailedRayPicks(o)}Ju.prototype.render=function(o){this._preUpdate.raiseEvent(this,o);let A=this._frameState;A.newFrame=!1,O(o)||(o=fi.now());let f=this._view.checkForCameraUpdates(this),m=!this.requestRenderMode||this._renderRequested||f||this._logDepthBufferDirty||this._hdrDirty||this.mode===xi.MORPHING;if(!m&&O(this.maximumRenderTimeChange)&&O(this._lastRenderTime)){let C=Math.abs(fi.secondsDifference(this._lastRenderTime,o));m=m||C>this.maximumRenderTimeChange}if(m){this._lastRenderTime=fi.clone(o,this._lastRenderTime),this._renderRequested=!1,this._logDepthBufferDirty=!1,this._hdrDirty=!1;let C=je.incrementWrap(A.frameNumber,15e6,1);Znt(this,C,o),A.newFrame=!0}pk(this,c_i),this.primitives.show&&(pk(this,f_i),pk(this,g_i),pk(this,p_i),m||pk(this,m_i)),this._postUpdate.raiseEvent(this,o),m&&(this._preRender.raiseEvent(this,o),pk(this,d_i)),u_i(this,m),pk(this,A_i),a_i(this),m&&this._postRender.raiseEvent(this,o)};Ju.prototype.forceRender=function(o){this._renderRequested=!0,this.render(o)};Ju.prototype.requestRender=function(){this._renderRequested=!0};Ju.prototype.clampLineWidth=function(o){return Math.max(Co.minimumAliasedLineWidth,Math.min(o,Co.maximumAliasedLineWidth))};Ju.prototype.pick=function(o,A,f){return this._picking.pick(this,o,A,f)};Ju.prototype.UpdateQuad=function(o){for(let A=0,f=this._primitivesQuadTrees.length;A<f;A++){let m=this._primitivesQuadTrees[A]._tilesToRender;if(m)for(let C=0,y=m.length;C<y;C++){let x=m[C];x.data&&x.data.geometryPrimitive&&x.data.geometryPrimitive.update(o)}}};Ju.prototype.pickPositionWorldCoordinates=function(o,A){return this._picking.pickPositionWorldCoordinates(this,o,A)};Ju.prototype.pickPosition=function(o,A){return this._picking.pickPosition(this,o,A)};Ju.prototype.drillPick=function(o,A,f,m){return this._picking.drillPick(this,o,A,f,m)};function g_i(o){let A=o._frameState;Lge.camera=A.camera,Lge.cullingVolume=A.cullingVolume,o.primitives.updateForPass(A,Lge)}function p_i(o){let A=o._frameState;!A.camera.canPreloadFlight()||(Fge.camera=o.preloadFlightCamera,Fge.cullingVolume=o.preloadFlightCullingVolume,o.primitives.updateForPass(A,Fge))}function m_i(o){o.primitives.updateForPass(o._frameState,OIi)}Ju.prototype.pickFromRay=function(o,A,f){return this._picking.pickFromRay(this,o,A,f)};Ju.prototype.drillPickFromRay=function(o,A,f,m){return this._picking.drillPickFromRay(this,o,A,f,m)};Ju.prototype.pickFromRayMostDetailed=function(o,A,f){return this._picking.pickFromRayMostDetailed(this,o,A,f)};Ju.prototype.drillPickFromRayMostDetailed=function(o,A,f,m){return this._picking.drillPickFromRayMostDetailed(this,o,A,f,m)};Ju.prototype.sampleHeight=function(o,A,f){return this._picking.sampleHeight(this,o,A,f)};Ju.prototype.clampToHeight=function(o,A,f,m){return this._picking.clampToHeight(this,o,A,f,m)};Ju.prototype.sampleHeightMostDetailed=function(o,A,f){return this._picking.sampleHeightMostDetailed(this,o,A,f)};Ju.prototype.clampToHeightMostDetailed=function(o,A,f){return this._picking.clampToHeightMostDetailed(this,o,A,f)};Ju.prototype.cartesianToCanvasCoordinates=function(o,A){return Qs.wgs84ToWindowCoordinates(this,o,A)};Ju.prototype.completeMorph=function(){this._transitioner.completeMorph()};Ju.prototype.morphTo2D=function(o){let A,f=this.globe;O(f)?A=f.ellipsoid:A=this.mapProjection.ellipsoid,o=Ae(o,2),this._transitioner.morphTo2D(o,A)};Ju.prototype.morphToColumbusView=function(o){let A,f=this.globe;O(f)?A=f.ellipsoid:A=this.mapProjection.ellipsoid,o=Ae(o,2),this._transitioner.morphToColumbusView(o,A)};Ju.prototype.morphTo3D=function(o){let A,f=this.globe;O(f)?A=f.ellipsoid:A=this.mapProjection.ellipsoid,o=Ae(o,2),this._transitioner.morphTo3D(o,A)};Ju.prototype.isDestroyed=function(){return!1};Ju.prototype.destroy=function(){this._tweens.removeAll(),this._computeEngine=this._computeEngine&&this._computeEngine.destroy(),this._screenSpaceCameraController=this._screenSpaceCameraController&&this._screenSpaceCameraController.destroy(),this._deviceOrientationCameraController=this._deviceOrientationCameraController&&!this._deviceOrientationCameraController.isDestroyed()&&this._deviceOrientationCameraController.destroy(),this._primitives=this._primitives&&this._primitives.destroy(),this._groundPrimitives=this._groundPrimitives&&this._groundPrimitives.destroy(),this._globe=this._globe&&this._globe.destroy(),this.skyBox=this.skyBox&&this.skyBox.destroy(),this.skyAtmosphere=this.skyAtmosphere&&this.skyAtmosphere.destroy(),this._debugSphere=this._debugSphere&&this._debugSphere.destroy(),this.sun=this.sun&&this.sun.destroy(),this._sunPostProcess=this._sunPostProcess&&this._sunPostProcess.destroy(),this._depthPlane=this._depthPlane&&this._depthPlane.destroy(),this._transitioner=this._transitioner&&this._transitioner.destroy(),this._debugFrustumPlanes=this._debugFrustumPlanes&&this._debugFrustumPlanes.destroy(),this._brdfLutGenerator=this._brdfLutGenerator&&this._brdfLutGenerator.destroy(),this._picking=this._picking&&this._picking.destroy(),this._defaultView=this._defaultView&&this._defaultView.destroy(),this._view=void 0,this._removeCreditContainer&&this._canvas.parentNode.removeChild(this._creditContainer),this.postProcessStages=this.postProcessStages&&this.postProcessStages.destroy(),this._context=this._context&&this._context.destroy(),this._frameState.creditDisplay=this._frameState.creditDisplay&&this._frameState.creditDisplay.destroy(),O(this._performanceDisplay)&&(this._performanceDisplay=this._performanceDisplay&&this._performanceDisplay.destroy(),this._performanceContainer.parentNode.removeChild(this._performanceContainer)),this._removeRequestListenerCallback(),this._removeTaskProcessorListenerCallback();for(let o=0;o<this._removeGlobeCallbacks.length;++o)this._removeGlobeCallbacks[o]();return this._removeGlobeCallbacks.length=0,Qr(this)};Ju.prototype.clickVideoProjection=function(o){if(O(o)){let A=this.textureProjectionMapList,f=A.length;for(let m=0;m<f;m++){let C=A[m];if(O(C._id)&&C._id===o){A[m]=A[f-1],A[f-1]=C;break}}}};var Loe=Ju,$te=`float interpolateByDistance(vec4 nearFarScalar, float distance)
{
float startDistance = nearFarScalar.x;
float startValue = nearFarScalar.y;
@@ -12174,9 +12174,9 @@
vec2 texcoord = v_textureCoordinates;
gl_FragColor = getColor(texcoord);
}
`;function YJ(){this.show=!0,this._drawCommand=new On({primitiveType:yn.TRIANGLES,boundingVolume:new wi,owner:this}),this._commands={drawCommand:this._drawCommand,computeCommand:void 0},this._boundingVolume=new wi,this._boundingVolume2D=new wi,this._texture=void 0,this._drawingBufferWidth=void 0,this._drawingBufferHeight=void 0,this._radiusTS=void 0,this._size=void 0,this.glowFactor=1,this._glowFactorDirty=!1,this._useHdr=void 0;let o=this;this._uniformMap={u_texture:function(){return o._texture},u_size:function(){return o._size}}}Object.defineProperties(YJ.prototype,{glowFactor:{get:function(){return this._glowFactor},set:function(o){o=Math.max(o,0),this._glowFactor=o,this._glowFactorDirty=!0}}});var x_i=new Bt,v_i=new Bt,E_i=new ai,bz=new ai;YJ.prototype.update=function(o,A,f){if(!this.show)return;let m=o.mode;if(m===xi.SCENE2D||m===xi.MORPHING||!o.passes.render)return;let C=o.context,y=A.viewport.width,x=A.viewport.height;if(!O(this._texture)||y!==this._drawingBufferWidth||x!==this._drawingBufferHeight||this._glowFactorDirty||f!==this._useHdr){this._texture=this._texture&&this._texture.destroy(),this._drawingBufferWidth=y,this._drawingBufferHeight=x,this._glowFactorDirty=!1,this._useHdr=f;let U=Math.max(y,x);U=Math.pow(2,Math.ceil(Math.log(U)/Math.log(2))-2),U=Math.max(1,U);let V=f?C.halfFloatingPointTexture?Qn.HALF_FLOAT:Qn.FLOAT:Qn.UNSIGNED_BYTE;this._texture=new yo({context:C,width:U,height:U,pixelFormat:Gn.RGBA,pixelDatatype:V}),this._glowLengthTS=this._glowFactor*5,this._radiusTS=1/(1+2*this._glowLengthTS)*.5;let H=this,q={u_radiusTS:function(){return H._radiusTS}};this._commands.computeCommand=new B5({fragmentShaderSource:IQe,outputTexture:this._texture,uniformMap:q,persists:!1,owner:this,postExecute:function(){H._commands.computeCommand=void 0}})}let v=this._drawCommand;if(!O(v.vertexArray)){let U={direction:0},V=new Uint8Array(4*2);V[0]=0,V[1]=0,V[2]=255,V[3]=0,V[4]=255,V[5]=255,V[6]=0,V[7]=255;let H=vo.createVertexBuffer({context:C,typedArray:V,usage:ln.STATIC_DRAW}),q=[{index:U.direction,vertexBuffer:H,componentsPerAttribute:2,normalize:!0,componentDatatype:ei.UNSIGNED_BYTE}],ie=vo.createIndexBuffer({context:C,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:ln.STATIC_DRAW,indexDatatype:Nn.UNSIGNED_SHORT});v.vertexArray=new Hc({context:C,attributes:q,indexBuffer:ie}),v.shaderProgram=_s.fromCache({context:C,vertexShaderSource:EQe,fragmentShaderSource:vQe,attributeLocations:U}),v.renderState=fn.fromCache({blending:Bu.ALPHA_BLEND}),v.uniformMap=this._uniformMap}let E=C.uniformState.sunPositionWC,I=C.uniformState.sunPositionColumbusView,w=this._boundingVolume,Q=this._boundingVolume2D;ee.clone(E,w.center),Q.center.x=I.z,Q.center.y=I.x,Q.center.z=I.y,w.radius=je.SOLAR_RADIUS+je.SOLAR_RADIUS*this._glowLengthTS,Q.radius=w.radius,m===xi.SCENE3D?wi.clone(w,v.boundingVolume):m===xi.COLUMBUS_VIEW&&wi.clone(Q,v.boundingVolume);let M=Qs.computeActualWgs84Position(o,E,bz),B=ee.magnitude(ee.subtract(M,o.camera.position,bz)),T=C.uniformState.projection,D=E_i;D.x=0,D.y=0,D.z=-B,D.w=1;let F=Xe.multiplyByVector(T,D,bz),L=Qs.clipToGLWindowCoordinates(A.viewport,F,x_i);D.x=je.SOLAR_RADIUS;let R=Xe.multiplyByVector(T,D,bz),k=Qs.clipToGLWindowCoordinates(A.viewport,R,v_i);return this._size=Bt.magnitude(Bt.subtract(k,L,bz)),this._size=2*this._size*(1+2*this._glowLengthTS),this._size=Math.ceil(this._size),this._commands};YJ.prototype.isDestroyed=function(){return!1};YJ.prototype.destroy=function(){let o=this._drawCommand;return o.vertexArray=o.vertexArray&&o.vertexArray.destroy(),o.shaderProgram=o.shaderProgram&&o.shaderProgram.destroy(),this._texture=this._texture&&this._texture.destroy(),Qr(this)};var Noe=YJ;function VU(o){return xs(`Assets/Textures/SkyBox/skyBox_${o}.jpg`)}function I_i(o){o._renderLoopRunning=!0;let A=0;function f(m){if(!o.isDestroyed())if(o._useDefaultRenderLoop)try{let C=o._targetFrameRate;if(!O(C))o.resize(),o.render(),requestAnimationFrame(f);else{let y=1e3/C,x=m-A;x>y&&(o.resize(),o.render(),A=m-x%y),requestAnimationFrame(f)}}catch(C){if(o._useDefaultRenderLoop=!1,o._renderLoopRunning=!1,o._showRenderLoopErrors){let y="An error occurred while rendering.  Rendering has stopped.";o.showErrorPanel(y,void 0,C)}}else o._renderLoopRunning=!1}requestAnimationFrame(f)}function cot(o){let A=o._useBrowserRecommendedResolution?1:window.devicePixelRatio;return A*=o._resolutionScale,O(o._scene)&&(o._scene.pixelRatio=A),A}function Aot(o){let A=o._canvas,f=A.clientWidth,m=A.clientHeight,C=cot(o);o._canvasClientWidth=f,o._canvasClientHeight=m,f*=C,m*=C,A.width=f,A.height=m,o._canRender=f!==0&&m!==0,o._lastDevicePixelRatio=window.devicePixelRatio}function hot(o){let A=o._canvas,f=A.width,m=A.height;if(f!==0&&m!==0){let C=o._scene.camera.frustum;O(C.aspectRatio)?C.aspectRatio=f/m:(C.top=C.right*(m/f),C.bottom=-C.top)}}function EO(o,A){o=iA(o),A=Ae(A,Ae.EMPTY_OBJECT);let f=document.createElement("div");f.className="map-widget",o.appendChild(f);let m=document.createElement("canvas");m.setAttribute("id","mapRenderCanvas");let C=Mo.supportsImageRenderingPixelated();this._supportsImageRenderingPixelated=C,C&&(m.style.imageRendering=Mo.imageRenderingValue()),m.oncontextmenu=function(){return!1},m.onselectstart=function(){return!1};function y(){m!==m.ownerDocument.activeElement&&m.ownerDocument.activeElement.blur()}Ae(A.blurActiveElementOnCanvasFocus,!0)&&(m.addEventListener("mousedown",y),m.addEventListener("pointerdown",y)),f.appendChild(m);let x=document.createElement("div");x.className="map-widget-credits";let v=O(A.creditContainer)?iA(A.creditContainer):f;v.appendChild(x);let E=O(A.creditViewport)?iA(A.creditViewport):f,I=Ae(A.showRenderLoopErrors,!0),w=Ae(A.useBrowserRecommendedResolution,!0);this._element=f,this._container=o,this._canvas=m,this._canvasClientWidth=0,this._canvasClientHeight=0,this._lastDevicePixelRatio=0,this._creditViewport=E,this._creditContainer=v,this._innerCreditContainer=x,this._canRender=!1,this._renderLoopRunning=!1,this._showRenderLoopErrors=I,this._resolutionScale=1,this._useBrowserRecommendedResolution=w,this._forceResize=!1,this._clock=O(A.clock)?A.clock:new z5,Aot(this);try{let Q=new Loe({canvas:m,contextOptions:A.contextOptions,creditContainer:x,creditViewport:E,mapProjection:A.mapProjection,orderIndependentTranslucency:A.orderIndependentTranslucency,scene3DOnly:Ae(A.scene3DOnly,!1),shadows:A.shadows,mapMode2D:A.mapMode2D,requestRenderMode:A.requestRenderMode,maximumRenderTimeChange:A.maximumRenderTimeChange,depthPlaneEllipsoidOffset:A.depthPlaneEllipsoidOffset,msaaSamples:A.msaaSamples});this._scene=Q,Q.camera.constrainedAxis=ee.UNIT_Z,cot(this),hot(this);let M=null;A.contextOptions.ellipsoidCoordinates==="CGCS2000"?M=Ti.CGCS2000:A.contextOptions.ellipsoidCoordinates==="MOON"||A.contextOptions.ellipsoidCoordinates==="MOON2000"?M=Ti.MOON2000:M=Ae(Q.mapProjection.ellipsoid,Ti.WGS84),px.ellipsoidCoordinates=A.contextOptions.ellipsoidCoordinates;let B=A.globe;O(B)||(B=new Coe(M)),B!==!1&&(Q.globe=B,Q.globe.shadows=Ae(A.terrainShadows,Al.RECEIVE_ONLY));let T=A.skyBox;O(T)||(T=new CN({sources:{positiveX:VU("px"),negativeX:VU("mx"),positiveY:VU("py"),negativeY:VU("my"),positiveZ:VU("pz"),negativeZ:VU("mz")}})),T!==!1&&(Q.skyBox=T,Q.sun=new Noe,Q.moon=new xoe);let D=A.skyAtmosphere;O(D)||(D=new aH(M)),D!==!1&&(Q.skyAtmosphere=D);let F=A.globe===!1?!1:A.imageryProvider;O(F)||(F=Xk()),F!==!1&&Q.imageryLayers.addImageryProvider(F),O(A.terrainProvider)&&A.globe!==!1&&(Q.terrainProvider=A.terrainProvider),this._screenSpaceEventHandler=new Ur(m),O(A.sceneMode)&&(A.sceneMode===xi.SCENE2D&&this._scene.morphTo2D(0),A.sceneMode===xi.COLUMBUS_VIEW&&this._scene.morphToColumbusView(0)),this._useDefaultRenderLoop=void 0,this.useDefaultRenderLoop=Ae(A.useDefaultRenderLoop,!0),this._targetFrameRate=void 0,this.targetFrameRate=A.targetFrameRate;let L=this;this._onRenderError=function(R,k){if(L._useDefaultRenderLoop=!1,L._renderLoopRunning=!1,L._showRenderLoopErrors){let U="An error occurred while rendering.  Rendering has stopped.";L.showErrorPanel(U,void 0,k)}},Q.renderError.addEventListener(this._onRenderError)}catch(Q){if(I){let M="Error constructing CesiumWidget.",B='Visit <a href="http://get.webgl.org">http://get.webgl.org</a> to verify that your web browser and hardware support WebGL.  Consider trying a different web browser or updating your video drivers.  Detailed error information is below:';this.showErrorPanel(M,B,Q)}throw Q}}Object.defineProperties(EO.prototype,{container:{get:function(){return this._container}},canvas:{get:function(){return this._canvas}},creditContainer:{get:function(){return this._creditContainer}},creditViewport:{get:function(){return this._creditViewport}},scene:{get:function(){return this._scene}},imageryLayers:{get:function(){return this._scene.imageryLayers}},terrainProvider:{get:function(){return this._scene.terrainProvider},set:function(o){this._scene.terrainProvider=o}},camera:{get:function(){return this._scene.camera}},clock:{get:function(){return this._clock}},screenSpaceEventHandler:{get:function(){return this._screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._targetFrameRate},set:function(o){this._targetFrameRate=o}},useDefaultRenderLoop:{get:function(){return this._useDefaultRenderLoop},set:function(o){this._useDefaultRenderLoop!==o&&(this._useDefaultRenderLoop=o,o&&!this._renderLoopRunning&&I_i(this))}},resolutionScale:{get:function(){return this._resolutionScale},set:function(o){this._resolutionScale!==o&&(this._resolutionScale=o,this._forceResize=!0)}},useBrowserRecommendedResolution:{get:function(){return this._useBrowserRecommendedResolution},set:function(o){this._useBrowserRecommendedResolution!==o&&(this._useBrowserRecommendedResolution=o,this._forceResize=!0)}}});EO.prototype.showErrorPanel=function(o,A,f){let m=this._element,C=document.createElement("div");C.className="map-widget-errorPanel";let y=document.createElement("div");y.className="map-widget-errorPanel-content",C.appendChild(y);let x=document.createElement("div");x.className="map-widget-errorPanel-header",x.appendChild(document.createTextNode(o)),y.appendChild(x);let v=document.createElement("div");v.className="map-widget-errorPanel-scroll",y.appendChild(v);function E(){v.style.maxHeight=`${Math.max(Math.round(m.clientHeight*.9-100),30)}px`}E(),O(window.addEventListener)&&window.addEventListener("resize",E,!1);let I=O(A),w=O(f);if(I||w){let B=document.createElement("div");if(B.className="map-widget-errorPanel-message",v.appendChild(B),w){let T=D5(f);I||(typeof f=="string"&&(f=new Error(f)),A=D5({name:f.name,message:f.message}),T=f.stack),typeof console<"u"&&console.error(`${o}
`;function YJ(){this.show=!0,this._drawCommand=new On({primitiveType:yn.TRIANGLES,boundingVolume:new wi,owner:this}),this._commands={drawCommand:this._drawCommand,computeCommand:void 0},this._boundingVolume=new wi,this._boundingVolume2D=new wi,this._texture=void 0,this._drawingBufferWidth=void 0,this._drawingBufferHeight=void 0,this._radiusTS=void 0,this._size=void 0,this.glowFactor=1,this._glowFactorDirty=!1,this._useHdr=void 0;let o=this;this._uniformMap={u_texture:function(){return o._texture},u_size:function(){return o._size}}}Object.defineProperties(YJ.prototype,{glowFactor:{get:function(){return this._glowFactor},set:function(o){o=Math.max(o,0),this._glowFactor=o,this._glowFactorDirty=!0}}});var x_i=new Bt,v_i=new Bt,E_i=new ai,bz=new ai;YJ.prototype.update=function(o,A,f){if(!this.show)return;let m=o.mode;if(m===xi.SCENE2D||m===xi.MORPHING||!o.passes.render)return;let C=o.context,y=A.viewport.width,x=A.viewport.height;if(!O(this._texture)||y!==this._drawingBufferWidth||x!==this._drawingBufferHeight||this._glowFactorDirty||f!==this._useHdr){this._texture=this._texture&&this._texture.destroy(),this._drawingBufferWidth=y,this._drawingBufferHeight=x,this._glowFactorDirty=!1,this._useHdr=f;let U=Math.max(y,x);U=Math.pow(2,Math.ceil(Math.log(U)/Math.log(2))-2),U=Math.max(1,U);let V=f?C.halfFloatingPointTexture?Qn.HALF_FLOAT:Qn.FLOAT:Qn.UNSIGNED_BYTE;this._texture=new yo({context:C,width:U,height:U,pixelFormat:Gn.RGBA,pixelDatatype:V}),this._glowLengthTS=this._glowFactor*5,this._radiusTS=1/(1+2*this._glowLengthTS)*.5;let H=this,q={u_radiusTS:function(){return H._radiusTS}};this._commands.computeCommand=new B5({fragmentShaderSource:IQe,outputTexture:this._texture,uniformMap:q,persists:!1,owner:this,postExecute:function(){H._commands.computeCommand=void 0}})}let v=this._drawCommand;if(!O(v.vertexArray)){let U={direction:0},V=new Uint8Array(4*2);V[0]=0,V[1]=0,V[2]=255,V[3]=0,V[4]=255,V[5]=255,V[6]=0,V[7]=255;let H=vo.createVertexBuffer({context:C,typedArray:V,usage:ln.STATIC_DRAW}),q=[{index:U.direction,vertexBuffer:H,componentsPerAttribute:2,normalize:!0,componentDatatype:ei.UNSIGNED_BYTE}],ie=vo.createIndexBuffer({context:C,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:ln.STATIC_DRAW,indexDatatype:Nn.UNSIGNED_SHORT});v.vertexArray=new Hc({context:C,attributes:q,indexBuffer:ie}),v.shaderProgram=_s.fromCache({context:C,vertexShaderSource:EQe,fragmentShaderSource:vQe,attributeLocations:U}),v.renderState=fn.fromCache({blending:Bu.ALPHA_BLEND}),v.uniformMap=this._uniformMap}let E=C.uniformState.sunPositionWC,I=C.uniformState.sunPositionColumbusView,w=this._boundingVolume,Q=this._boundingVolume2D;ee.clone(E,w.center),Q.center.x=I.z,Q.center.y=I.x,Q.center.z=I.y,w.radius=je.SOLAR_RADIUS+je.SOLAR_RADIUS*this._glowLengthTS,Q.radius=w.radius,m===xi.SCENE3D?wi.clone(w,v.boundingVolume):m===xi.COLUMBUS_VIEW&&wi.clone(Q,v.boundingVolume);let M=Qs.computeActualWgs84Position(o,E,bz),B=ee.magnitude(ee.subtract(M,o.camera.position,bz)),T=C.uniformState.projection,D=E_i;D.x=0,D.y=0,D.z=-B,D.w=1;let F=Xe.multiplyByVector(T,D,bz),L=Qs.clipToGLWindowCoordinates(A.viewport,F,x_i);D.x=je.SOLAR_RADIUS;let R=Xe.multiplyByVector(T,D,bz),k=Qs.clipToGLWindowCoordinates(A.viewport,R,v_i);return this._size=Bt.magnitude(Bt.subtract(k,L,bz)),this._size=2*this._size*(1+2*this._glowLengthTS),this._size=Math.ceil(this._size),this._commands};YJ.prototype.isDestroyed=function(){return!1};YJ.prototype.destroy=function(){let o=this._drawCommand;return o.vertexArray=o.vertexArray&&o.vertexArray.destroy(),o.shaderProgram=o.shaderProgram&&o.shaderProgram.destroy(),this._texture=this._texture&&this._texture.destroy(),Qr(this)};var Noe=YJ;function VU(o){return xs(`Assets/Textures/SkyBox/skyBox_${o}.jpg`)}function I_i(o){o._renderLoopRunning=!0;let A=0;function f(m){if(!o.isDestroyed())if(o._useDefaultRenderLoop)try{let C=o._targetFrameRate;if(!O(C))o.resize(),o.render(),requestAnimationFrame(f);else{let y=1e3/C,x=m-A;x>y&&(o.resize(),o.render(),A=m-x%y),requestAnimationFrame(f)}}catch(C){if(o._useDefaultRenderLoop=!1,o._renderLoopRunning=!1,o._showRenderLoopErrors){let y="An error occurred while rendering.  Rendering has stopped.";o.showErrorPanel(y,void 0,C)}}else o._renderLoopRunning=!1}requestAnimationFrame(f)}function cot(o){let A=o._useBrowserRecommendedResolution?1:window.devicePixelRatio;return A*=o._resolutionScale,O(o._scene)&&(o._scene.pixelRatio=A),A}function Aot(o){let A=o._canvas,f=A.clientWidth,m=A.clientHeight,C=cot(o);o._canvasClientWidth=f,o._canvasClientHeight=m,f*=C,m*=C,A.width=f,A.height=m,o._canRender=f!==0&&m!==0,o._lastDevicePixelRatio=window.devicePixelRatio}function hot(o){let A=o._canvas,f=A.width,m=A.height;if(f!==0&&m!==0){let C=o._scene.camera.frustum;O(C.aspectRatio)?C.aspectRatio=f/m:(C.top=C.right*(m/f),C.bottom=-C.top)}}function EO(o,A){o=iA(o),A=Ae(A,Ae.EMPTY_OBJECT);let f=document.createElement("div");f.className="map-widget",o.appendChild(f);let m=document.createElement("canvas");m.setAttribute("id","mapRenderCanvas");let C=Mo.supportsImageRenderingPixelated();this._supportsImageRenderingPixelated=C,C&&(m.style.imageRendering=Mo.imageRenderingValue()),m.oncontextmenu=function(){return!1},m.onselectstart=function(){return!1};function y(){m!==m.ownerDocument.activeElement&&m.ownerDocument.activeElement.blur()}Ae(A.blurActiveElementOnCanvasFocus,!0)&&(m.addEventListener("mousedown",y),m.addEventListener("pointerdown",y)),f.appendChild(m);let x=document.createElement("div");x.className="map-widget-credits";let v=O(A.creditContainer)?iA(A.creditContainer):f;v.appendChild(x);let E=O(A.creditViewport)?iA(A.creditViewport):f,I=Ae(A.showRenderLoopErrors,!0),w=Ae(A.useBrowserRecommendedResolution,!0);this._element=f,this._container=o,this._canvas=m,this._canvasClientWidth=0,this._canvasClientHeight=0,this._lastDevicePixelRatio=0,this._creditViewport=E,this._creditContainer=v,this._innerCreditContainer=x,this._canRender=!1,this._renderLoopRunning=!1,this._showRenderLoopErrors=I,this._resolutionScale=1,this._useBrowserRecommendedResolution=w,this._forceResize=!1,this._clock=O(A.clock)?A.clock:new z5,Aot(this);try{let Q=new Loe({canvas:m,contextOptions:A.contextOptions,creditContainer:x,creditViewport:E,mapProjection:A.mapProjection,orderIndependentTranslucency:A.orderIndependentTranslucency,scene3DOnly:Ae(A.scene3DOnly,!1),shadows:A.shadows,mapMode2D:A.mapMode2D,requestRenderMode:A.requestRenderMode,maximumRenderTimeChange:A.maximumRenderTimeChange,depthPlaneEllipsoidOffset:A.depthPlaneEllipsoidOffset,msaaSamples:A.msaaSamples,shadowBackCull:A.shadowBackCull});this._scene=Q,Q.camera.constrainedAxis=ee.UNIT_Z,cot(this),hot(this);let M=null;A.contextOptions.ellipsoidCoordinates==="CGCS2000"?M=Ti.CGCS2000:A.contextOptions.ellipsoidCoordinates==="MOON"||A.contextOptions.ellipsoidCoordinates==="MOON2000"?M=Ti.MOON2000:M=Ae(Q.mapProjection.ellipsoid,Ti.WGS84),px.ellipsoidCoordinates=A.contextOptions.ellipsoidCoordinates;let B=A.globe;O(B)||(B=new Coe(M)),B!==!1&&(Q.globe=B,Q.globe.shadows=Ae(A.terrainShadows,Al.RECEIVE_ONLY));let T=A.skyBox;O(T)||(T=new CN({sources:{positiveX:VU("px"),negativeX:VU("mx"),positiveY:VU("py"),negativeY:VU("my"),positiveZ:VU("pz"),negativeZ:VU("mz")}})),T!==!1&&(Q.skyBox=T,Q.sun=new Noe,Q.moon=new xoe);let D=A.skyAtmosphere;O(D)||(D=new aH(M)),D!==!1&&(Q.skyAtmosphere=D);let F=A.globe===!1?!1:A.imageryProvider;O(F)||(F=Xk()),F!==!1&&Q.imageryLayers.addImageryProvider(F),O(A.terrainProvider)&&A.globe!==!1&&(Q.terrainProvider=A.terrainProvider),this._screenSpaceEventHandler=new Ur(m),O(A.sceneMode)&&(A.sceneMode===xi.SCENE2D&&this._scene.morphTo2D(0),A.sceneMode===xi.COLUMBUS_VIEW&&this._scene.morphToColumbusView(0)),this._useDefaultRenderLoop=void 0,this.useDefaultRenderLoop=Ae(A.useDefaultRenderLoop,!0),this._targetFrameRate=void 0,this.targetFrameRate=A.targetFrameRate;let L=this;this._onRenderError=function(R,k){if(L._useDefaultRenderLoop=!1,L._renderLoopRunning=!1,L._showRenderLoopErrors){let U="An error occurred while rendering.  Rendering has stopped.";L.showErrorPanel(U,void 0,k)}},Q.renderError.addEventListener(this._onRenderError)}catch(Q){if(I){let M="Error constructing CesiumWidget.",B='Visit <a href="http://get.webgl.org">http://get.webgl.org</a> to verify that your web browser and hardware support WebGL.  Consider trying a different web browser or updating your video drivers.  Detailed error information is below:';this.showErrorPanel(M,B,Q)}throw Q}}Object.defineProperties(EO.prototype,{container:{get:function(){return this._container}},canvas:{get:function(){return this._canvas}},creditContainer:{get:function(){return this._creditContainer}},creditViewport:{get:function(){return this._creditViewport}},scene:{get:function(){return this._scene}},imageryLayers:{get:function(){return this._scene.imageryLayers}},terrainProvider:{get:function(){return this._scene.terrainProvider},set:function(o){this._scene.terrainProvider=o}},camera:{get:function(){return this._scene.camera}},clock:{get:function(){return this._clock}},screenSpaceEventHandler:{get:function(){return this._screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._targetFrameRate},set:function(o){this._targetFrameRate=o}},useDefaultRenderLoop:{get:function(){return this._useDefaultRenderLoop},set:function(o){this._useDefaultRenderLoop!==o&&(this._useDefaultRenderLoop=o,o&&!this._renderLoopRunning&&I_i(this))}},resolutionScale:{get:function(){return this._resolutionScale},set:function(o){this._resolutionScale!==o&&(this._resolutionScale=o,this._forceResize=!0)}},useBrowserRecommendedResolution:{get:function(){return this._useBrowserRecommendedResolution},set:function(o){this._useBrowserRecommendedResolution!==o&&(this._useBrowserRecommendedResolution=o,this._forceResize=!0)}}});EO.prototype.showErrorPanel=function(o,A,f){let m=this._element,C=document.createElement("div");C.className="map-widget-errorPanel";let y=document.createElement("div");y.className="map-widget-errorPanel-content",C.appendChild(y);let x=document.createElement("div");x.className="map-widget-errorPanel-header",x.appendChild(document.createTextNode(o)),y.appendChild(x);let v=document.createElement("div");v.className="map-widget-errorPanel-scroll",y.appendChild(v);function E(){v.style.maxHeight=`${Math.max(Math.round(m.clientHeight*.9-100),30)}px`}E(),O(window.addEventListener)&&window.addEventListener("resize",E,!1);let I=O(A),w=O(f);if(I||w){let B=document.createElement("div");if(B.className="map-widget-errorPanel-message",v.appendChild(B),w){let T=D5(f);I||(typeof f=="string"&&(f=new Error(f)),A=D5({name:f.name,message:f.message}),T=f.stack),typeof console<"u"&&console.error(`${o}
${A}
${T}`);let D=document.createElement("div");D.className="map-widget-errorPanel-message-details collapsed";let F=document.createElement("span");F.className="map-widget-errorPanel-more-details",F.appendChild(document.createTextNode("See more...")),D.appendChild(F),D.onclick=function(L){D.removeChild(F),D.appendChild(document.createTextNode(T)),D.className="map-widget-errorPanel-message-details",y.className="map-widget-errorPanel-content expanded",D.onclick=void 0},v.appendChild(D)}B.innerHTML=`<p>${A}</p>`}let Q=document.createElement("div");Q.className="map-widget-errorPanel-buttonPanel",y.appendChild(Q);let M=document.createElement("button");M.setAttribute("type","button"),M.className="map-button",M.appendChild(document.createTextNode("OK")),M.onclick=function(){O(E)&&O(window.removeEventListener)&&window.removeEventListener("resize",E,!1),m.removeChild(C)},Q.appendChild(M),m.appendChild(C)};EO.prototype.isDestroyed=function(){return!1};EO.prototype.destroy=function(){O(this._scene)&&(this._scene.renderError.removeEventListener(this._onRenderError),this._scene=this._scene.destroy()),this._container.removeChild(this._element),this._creditContainer.removeChild(this._innerCreditContainer),Qr(this)};EO.prototype.resize=function(){let o=this._canvas;!this._forceResize&&this._canvasClientWidth===o.clientWidth&&this._canvasClientHeight===o.clientHeight&&this._lastDevicePixelRatio===window.devicePixelRatio||(this._forceResize=!1,Aot(this),hot(this),this._scene.requestRender())};EO.prototype.render=function(){if(this._scene._frameState||console.log("\u6388\u6743\u9A8C\u8BC1\u9519\u8BEF\uFF01"),this._canRender){this._scene.initializeFrame();let o=this._clock.tick();this._scene.render(o)}else this._clock.tick()};var JJ=EO;function WJ(o){O(o)||(o=new z5),this._clock=o,this._eventHelper=new Mx,this._eventHelper.add(o.onTick,this.synchronize,this),this.systemTime=gr.observable(fi.now()),this.systemTime.equalityComparer=fi.equals,this.startTime=gr.observable(o.startTime),this.startTime.equalityComparer=fi.equals,this.startTime.subscribe(function(A){o.startTime=A,this.synchronize()},this),this.stopTime=gr.observable(o.stopTime),this.stopTime.equalityComparer=fi.equals,this.stopTime.subscribe(function(A){o.stopTime=A,this.synchronize()},this),this.currentTime=gr.observable(o.currentTime),this.currentTime.equalityComparer=fi.equals,this.currentTime.subscribe(function(A){o.currentTime=A,this.synchronize()},this),this.multiplier=gr.observable(o.multiplier),this.multiplier.subscribe(function(A){o.multiplier=A,this.synchronize()},this),this.clockStep=gr.observable(o.clockStep),this.clockStep.subscribe(function(A){o.clockStep=A,this.synchronize()},this),this.clockRange=gr.observable(o.clockRange),this.clockRange.subscribe(function(A){o.clockRange=A,this.synchronize()},this),this.canAnimate=gr.observable(o.canAnimate),this.canAnimate.subscribe(function(A){o.canAnimate=A,this.synchronize()},this),this.shouldAnimate=gr.observable(o.shouldAnimate),this.shouldAnimate.subscribe(function(A){o.shouldAnimate=A,this.synchronize()},this),gr.track(this,["systemTime","startTime","stopTime","currentTime","multiplier","clockStep","clockRange","canAnimate","shouldAnimate"])}Object.defineProperties(WJ.prototype,{clock:{get:function(){return this._clock}}});WJ.prototype.synchronize=function(){let o=this._clock;this.systemTime=fi.now(),this.startTime=o.startTime,this.stopTime=o.stopTime,this.currentTime=o.currentTime,this.multiplier=o.multiplier,this.clockStep=o.clockStep,this.clockRange=o.clockRange,this.canAnimate=o.canAnimate,this.shouldAnimate=o.shouldAnimate};WJ.prototype.isDestroyed=function(){return!1};WJ.prototype.destroy=function(){this._eventHelper.removeAll(),Qr(this)};var _Qe=WJ;function koe(o,A){O(A)||(A=document.body),A=iA(A);let f=this,m=gr.observable(yp.fullscreen),C=gr.observable(yp.enabled),y=A.ownerDocument;this.isFullscreen=void 0,gr.defineProperty(this,"isFullscreen",{get:function(){return m()}}),this.isFullscreenEnabled=void 0,gr.defineProperty(this,"isFullscreenEnabled",{get:function(){return C()},set:function(x){C(x&&yp.enabled)}}),this.tooltip=void 0,gr.defineProperty(this,"tooltip",function(){return this.isFullscreenEnabled?m()?"Exit full screen":"Full screen":"Full screen unavailable"}),this._command=Hl(function(){yp.fullscreen?yp.exitFullscreen():yp.requestFullscreen(f._fullscreenElement)},gr.getObservable(this,"isFullscreenEnabled")),this._fullscreenElement=Ae(iA(o),y.body),this._callback=function(){m(yp.fullscreen)},y.addEventListener(yp.changeEventName,this._callback)}Object.defineProperties(koe.prototype,{fullscreenElement:{get:function(){return this._fullscreenElement},set:function(o){this._fullscreenElement=o}},command:{get:function(){return this._command}}});koe.prototype.isDestroyed=function(){return!1};koe.prototype.destroy=function(){document.removeEventListener(yp.changeEventName,this._callback),Qr(this)};var BQe=koe,__i="M 83.96875 17.5625 L 83.96875 17.59375 L 76.65625 24.875 L 97.09375 24.96875 L 76.09375 45.96875 L 81.9375 51.8125 L 102.78125 30.9375 L 102.875 51.15625 L 110.15625 43.875 L 110.1875 17.59375 L 83.96875 17.5625 z M 44.125 17.59375 L 17.90625 17.625 L 17.9375 43.90625 L 25.21875 51.1875 L 25.3125 30.96875 L 46.15625 51.8125 L 52 45.96875 L 31 25 L 51.4375 24.90625 L 44.125 17.59375 z M 46.0625 76.03125 L 25.1875 96.875 L 25.09375 76.65625 L 17.8125 83.9375 L 17.8125 110.21875 L 44 110.25 L 51.3125 102.9375 L 30.90625 102.84375 L 51.875 81.875 L 46.0625 76.03125 z M 82 76.15625 L 76.15625 82 L 97.15625 103 L 76.71875 103.0625 L 84.03125 110.375 L 110.25 110.34375 L 110.21875 84.0625 L 102.9375 76.8125 L 102.84375 97 L 82 76.15625 z",B_i="M 104.34375 17.5625 L 83.5 38.4375 L 83.40625 18.21875 L 76.125 25.5 L 76.09375 51.78125 L 102.3125 51.8125 L 102.3125 51.78125 L 109.625 44.5 L 89.1875 44.40625 L 110.1875 23.40625 L 104.34375 17.5625 z M 23.75 17.59375 L 17.90625 23.4375 L 38.90625 44.4375 L 18.5 44.53125 L 25.78125 51.8125 L 52 51.78125 L 51.96875 25.53125 L 44.6875 18.25 L 44.625 38.46875 L 23.75 17.59375 z M 25.6875 76.03125 L 18.375 83.3125 L 38.78125 83.40625 L 17.8125 104.40625 L 23.625 110.25 L 44.5 89.375 L 44.59375 109.59375 L 51.875 102.3125 L 51.875 76.0625 L 25.6875 76.03125 z M 102.375 76.15625 L 76.15625 76.1875 L 76.1875 102.4375 L 83.46875 109.71875 L 83.5625 89.53125 L 104.40625 110.375 L 110.25 104.53125 L 89.25 83.53125 L 109.6875 83.46875 L 102.375 76.15625 z";function Ooe(o,A){o=iA(o);let f=new BQe(A,o);f._exitFullScreenPath=B_i,f._enterFullScreenPath=__i;let m=document.createElement("button");m.type="button",m.className="cesium-button cesium-fullscreenButton",m.setAttribute("data-bind","attr: { title: tooltip },click: command,enable: isFullscreenEnabled,cesiumSvgPath: { path: isFullscreen ? _exitFullScreenPath : _enterFullScreenPath, width: 128, height: 128 }"),o.appendChild(m),gr.applyBindings(f,m),this._container=o,this._viewModel=f,this._element=m}Object.defineProperties(Ooe.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Ooe.prototype.isDestroyed=function(){return!1};Ooe.prototype.destroy=function(){return this._viewModel.destroy(),gr.cleanNode(this._element),this._container.removeChild(this._element),Qr(this)};var wQe=Ooe;function dot(){}dot.prototype.geocode=function(o){let A=o.match(/[^\s,\n]+/g);if(A.length===2||A.length===3){let f=+A[0],m=+A[1],C=A.length===3?+A[2]:300;if(isNaN(f)&&isNaN(m)){let y=/^(\d+.?\d*)([nsew])/i;for(let x=0;x<A.length;++x){let v=A[x].match(y);y.test(A[x])&&v.length===3&&(/^[ns]/i.test(v[2])?m=/^[n]/i.test(v[2])?+v[1]:-v[1]:/^[ew]/i.test(v[2])&&(f=/^[e]/i.test(v[2])?+v[1]:-v[1]))}}if(!isNaN(f)&&!isNaN(m)&&!isNaN(C)){let y={displayName:o,destination:ee.fromDegrees(f,m,C)};return Promise.resolve([y])}}return Promise.resolve([])};var bQe=dot,w_i={SEARCH:0,AUTOCOMPLETE:1},jJ=Object.freeze(w_i);function QQe(o){this._url=An.createIfNeeded(o),this._url.appendForwardSlash()}Object.defineProperties(QQe.prototype,{url:{get:function(){return this._url}}});QQe.prototype.geocode=function(o,A){return this._url.getDerivedResource({url:A===jJ.AUTOCOMPLETE?"autocomplete":"search",queryParameters:{text:o}}).fetchJson().then(function(f){return f.features.map(function(m){let C,y=m.bbox;if(O(y))C=Si.fromDegrees(y[0],y[1],y[2],y[3]);else{let x=m.geometry.coordinates[0],v=m.geometry.coordinates[1];C=ee.fromDegrees(x,v)}return{displayName:m.properties.label,destination:C}})})};var SQe=QQe;function fot(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=Ae(o.accessToken,xF.defaultAccessToken),f=An.createIfNeeded(Ae(o.server,xF.defaultServer));f.appendForwardSlash();let m=xF.getDefaultTokenCredit(A);O(m)&&o.scene.frameState.creditDisplay.addDefaultCredit(tl.clone(m));let C=f.getDerivedResource({url:"v1/geocode"});O(A)&&C.appendQueryParameters({access_token:A}),this._accessToken=A,this._server=f,this._pelias=new SQe(C)}fot.prototype.geocode=function(o,A){return this._pelias.geocode(o,A)};var DQe=fot,X9e=1e3;function KD(o){O(o.geocoderServices)?this._geocoderServices=o.geocoderServices:this._geocoderServices=[new bQe,new DQe({scene:o.scene})],this._viewContainer=o.container,this._scene=o.scene,this._flightDuration=o.flightDuration,this._searchText="",this._isSearchInProgress=!1,this._geocodePromise=void 0,this._complete=new br,this._suggestions=[],this._selectedSuggestion=void 0,this._showSuggestions=!0,this._handleArrowDown=$9e,this._handleArrowUp=Z9e;let A=this;this._suggestionsVisible=gr.pureComputed(function(){let m=gr.getObservable(A,"_suggestions")().length>0,C=gr.getObservable(A,"_showSuggestions")();return m&&C}),this._searchCommand=Hl(function(m){if(m=Ae(m,jJ.SEARCH),A._focusTextbox=!1,O(A._selectedSuggestion))return A.activateSuggestion(A._selectedSuggestion),!1;A.hideSuggestions(),A.isSearchInProgress?M_i(A):D_i(A,A._geocoderServices,m)}),this.deselectSuggestion=function(){A._selectedSuggestion=void 0},this.handleKeyDown=function(m,C){let y=C.key==="ArrowDown"||C.key==="Down"||C.keyCode===40,x=C.key==="ArrowUp"||C.key==="Up"||C.keyCode===38;return(y||x)&&C.preventDefault(),!0},this.handleKeyUp=function(m,C){let y=C.key==="ArrowDown"||C.key==="Down"||C.keyCode===40,x=C.key==="ArrowUp"||C.key==="Up"||C.keyCode===38,v=C.key==="Enter"||C.keyCode===13;return x?Z9e(A):y?$9e(A):v&&A._searchCommand(),!0},this.activateSuggestion=function(m){A.hideSuggestions(),A._searchText=m.displayName;let C=m.destination;pot(A),A.destinationFound(A,C)},this.hideSuggestions=function(){A._showSuggestions=!1,A._selectedSuggestion=void 0},this.showSuggestions=function(){A._showSuggestions=!0},this.handleMouseover=function(m,C){m!==A._selectedSuggestion&&(A._selectedSuggestion=m)},this.keepExpanded=!1,this.autoComplete=Ae(o.autocomplete,!0),this.destinationFound=Ae(o.destinationFound,KD.flyToDestination),this._focusTextbox=!1,gr.track(this,["_searchText","_isSearchInProgress","keepExpanded","_suggestions","_selectedSuggestion","_showSuggestions","_focusTextbox"]);let f=gr.getObservable(this,"_searchText");f.extend({rateLimit:{timeout:500}}),this._suggestionSubscription=f.subscribe(function(){KD._updateSearchSuggestions(A)}),this.isSearchInProgress=void 0,gr.defineProperty(this,"isSearchInProgress",{get:function(){return this._isSearchInProgress}}),this.searchText=void 0,gr.defineProperty(this,"searchText",{get:function(){return this.isSearchInProgress?"Searching...":this._searchText},set:function(m){this._searchText=m}}),this.flightDuration=void 0,gr.defineProperty(this,"flightDuration",{get:function(){return this._flightDuration},set:function(m){this._flightDuration=m}})}Object.defineProperties(KD.prototype,{complete:{get:function(){return this._complete}},scene:{get:function(){return this._scene}},search:{get:function(){return this._searchCommand}},selectedSuggestion:{get:function(){return this._selectedSuggestion}},suggestions:{get:function(){return this._suggestions}}});KD.prototype.destroy=function(){this._suggestionSubscription.dispose()};function Z9e(o){if(o._suggestions.length===0)return;let A=o._suggestions.indexOf(o._selectedSuggestion);if(A===-1||A===0){o._selectedSuggestion=void 0;return}let f=A-1;o._selectedSuggestion=o._suggestions[f],KD._adjustSuggestionsScroll(o,f)}function $9e(o){if(o._suggestions.length===0)return;let A=o._suggestions.length,f=(o._suggestions.indexOf(o._selectedSuggestion)+1)%A;o._selectedSuggestion=o._suggestions[f],KD._adjustSuggestionsScroll(o,f)}function b_i(o,A){let f=O(A)?A.availability:void 0;return O(f)?EQ(A,[o]).then(function(m){return o=m[0],o.height+=X9e,o}):(o.height+=X9e,Promise.resolve(o))}function Q_i(o,A){let f=o._scene,m=f.mapProjection.ellipsoid,C=f.camera,y=f.terrainProvider,x=A,v;return A instanceof Si?je.equalsEpsilon(A.south,A.north,je.EPSILON7)&&je.equalsEpsilon(A.east,A.west,je.EPSILON7)?A=Si.center(A):v=IJ(A,f):A=m.cartesianToCartographic(A),O(v)||(v=b_i(A,y)),v.then(function(E){x=m.cartographicToCartesian(E)}).finally(function(){C.flyTo({destination:x,complete:function(){o._complete.raiseEvent()},duration:o._flightDuration,endTransform:Xe.IDENTITY})})}function S_i(o,A,f,m){return o.then(function(C){return O(C)&&C.state==="fulfilled"&&C.value.length>0?C:A.geocode(f,m).then(function(y){return{state:"fulfilled",value:y}}).catch(function(y){return{state:"rejected",reason:y}})})}function D_i(o,A,f){let m=o._searchText;if(got(m)){o.showSuggestions();return}o._isSearchInProgress=!0;let C=Promise.resolve();for(let y=0;y<A.length;y++)C=S_i(C,A[y],m,f);o._geocodePromise=C,C.then(function(y){if(C.cancel)return;o._isSearchInProgress=!1;let x=y.value;if(y.state==="fulfilled"&&O(x)&&x.length>0){o._searchText=x[0].displayName,o.destinationFound(o,x[0].destination);return}o._searchText=`${m} (not found)`})}function T_i(o,A){let f=iA(o._viewContainer),m=f.getElementsByClassName("search-results")[0],C=f.getElementsByTagName("li")[A];if(A===0){m.scrollTop=0;return}let y=C.offsetTop;y+C.clientHeight>m.clientHeight?m.scrollTop=y+C.clientHeight:y<m.scrollTop&&(m.scrollTop=y)}function M_i(o){o._isSearchInProgress=!1,O(o._geocodePromise)&&(o._geocodePromise.cancel=!0,o._geocodePromise=void 0)}function got(o){return/^\s*$/.test(o)}function pot(o){gr.getObservable(o,"_suggestions").removeAll()}function P_i(o){if(!o.autoComplete)return;let A=o._searchText;if(pot(o),got(A))return;let f=Promise.resolve([]);return o._geocoderServices.forEach(function(m){f=f.then(function(C){return C.length>=5?C:m.geocode(A,jJ.AUTOCOMPLETE).then(function(y){return C=C.concat(y),C})})}),f.then(function(m){let C=o._suggestions;for(let y=0;y<m.length;y++)C.push(m[y])})}KD.flyToDestination=Q_i;KD._updateSearchSuggestions=P_i;KD._adjustSuggestionsScroll=T_i;var TQe=KD,R_i="M29.772,26.433l-7.126-7.126c0.96-1.583,1.523-3.435,1.524-5.421C24.169,8.093,19.478,3.401,13.688,3.399C7.897,3.401,3.204,8.093,3.204,13.885c0,5.789,4.693,10.481,10.484,10.481c1.987,0,3.839-0.563,5.422-1.523l7.128,7.127L29.772,26.433zM7.203,13.885c0.006-3.582,2.903-6.478,6.484-6.486c3.579,0.008,6.478,2.904,6.484,6.486c-0.007,3.58-2.905,6.476-6.484,6.484C10.106,20.361,7.209,17.465,7.203,13.885z",L_i="M24.778,21.419 19.276,15.917 24.777,10.415 21.949,7.585 16.447,13.087 10.945,7.585 8.117,10.415 13.618,15.917 8.116,21.419 10.946,24.248 16.447,18.746 21.948,24.248z";function Uoe(o){let A=iA(o.container),f=new TQe(o);f._startSearchPath=R_i,f._stopSearchPath=L_i;let m=document.createElement("form");m.setAttribute("data-bind","submit: search");let C=document.createElement("input");C.type="search",C.className="cesium-geocoder-input",C.setAttribute("placeholder","Enter an address or landmark..."),C.setAttribute("data-bind",'textInput: searchText,disable: isSearchInProgress,event: { keyup: handleKeyUp, keydown: handleKeyDown, mouseover: deselectSuggestion },css: { "cesium-geocoder-input-wide" : keepExpanded || searchText.length > 0 },hasFocus: _focusTextbox'),this._onTextBoxFocus=function(){setTimeout(function(){C.select()},0)},C.addEventListener("focus",this._onTextBoxFocus,!1),m.appendChild(C),this._textBox=C;let y=document.createElement("span");y.className="cesium-geocoder-searchButton",y.setAttribute("data-bind","click: search,cesiumSvgPath: { path: isSearchInProgress ? _stopSearchPath : _startSearchPath, width: 32, height: 32 }"),m.appendChild(y),A.appendChild(m);let x=document.createElement("div");x.className="search-results",x.setAttribute("data-bind","visible: _suggestionsVisible");let v=document.createElement("ul");v.setAttribute("data-bind","foreach: _suggestions");let E=document.createElement("li");v.appendChild(E),E.setAttribute("data-bind","text: $data.displayName, click: $parent.activateSuggestion, event: { mouseover: $parent.handleMouseover}, css: { active: $data === $parent._selectedSuggestion }"),x.appendChild(v),A.appendChild(x),gr.applyBindings(f,m),gr.applyBindings(f,x),this._container=A,this._searchSuggestionsContainer=x,this._viewModel=f,this._form=m,this._onInputBegin=function(I){let w=I.target;typeof I.composedPath=="function"&&(w=I.composedPath()[0]),A.contains(w)||(f._focusTextbox=!1,f.hideSuggestions())},this._onInputEnd=function(I){f._focusTextbox=!0,f.showSuggestions()},Mo.supportsPointerEvents()?(document.addEventListener("pointerdown",this._onInputBegin,!0),A.addEventListener("pointerup",this._onInputEnd,!0),A.addEventListener("pointercancel",this._onInputEnd,!0)):(document.addEventListener("mousedown",this._onInputBegin,!0),A.addEventListener("mouseup",this._onInputEnd,!0),document.addEventListener("touchstart",this._onInputBegin,!0),A.addEventListener("touchend",this._onInputEnd,!0),A.addEventListener("touchcancel",this._onInputEnd,!0))}Object.defineProperties(Uoe.prototype,{container:{get:function(){return this._container}},searchSuggestionsContainer:{get:function(){return this._searchSuggestionsContainer}},viewModel:{get:function(){return this._viewModel}}});Uoe.prototype.isDestroyed=function(){return!1};Uoe.prototype.destroy=function(){let o=this._container;return Mo.supportsPointerEvents()?(document.removeEventListener("pointerdown",this._onInputBegin,!0),o.removeEventListener("pointerup",this._onInputEnd,!0)):(document.removeEventListener("mousedown",this._onInputBegin,!0),o.removeEventListener("mouseup",this._onInputEnd,!0),document.removeEventListener("touchstart",this._onInputBegin,!0),o.removeEventListener("touchend",this._onInputEnd,!0)),this._viewModel.destroy(),gr.cleanNode(this._form),gr.cleanNode(this._searchSuggestionsContainer),o.removeChild(this._form),o.removeChild(this._searchSuggestionsContainer),this._textBox.removeEventListener("focus",this._onTextBoxFocus,!1),Qr(this)};var MQe=Uoe;function mot(o,A){this._scene=o,this._duration=A;let f=this;this._command=Hl(function(){f._scene.camera.flyHome(f._duration)}),this.tooltip="View Home",gr.track(this,["tooltip"])}Object.defineProperties(mot.prototype,{scene:{get:function(){return this._scene}},command:{get:function(){return this._command}},duration:{get:function(){return this._duration},set:function(o){this._duration=o}}});var PQe=mot;function Goe(o,A,f){o=iA(o);let m=new PQe(A,f);m._svgPath="M14,4l-10,8.75h20l-4.25-3.7188v-4.6562h-2.812v2.1875l-2.938-2.5625zm-7.0938,9.906v10.094h14.094v-10.094h-14.094zm2.1876,2.313h3.3122v4.25h-3.3122v-4.25zm5.8442,1.281h3.406v6.438h-3.406v-6.438z";let C=document.createElement("button");C.type="button",C.className="cesium-button cesium-toolbar-button cesium-home-button",C.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 28, height: 28 }"),o.appendChild(C),gr.applyBindings(m,C),this._container=o,this._viewModel=m,this._element=C}Object.defineProperties(Goe.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Goe.prototype.isDestroyed=function(){return!1};Goe.prototype.destroy=function(){return gr.cleanNode(this._element),this._container.removeChild(this._element),Qr(this)};var RQe=Goe,F_i="M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4853444 22.104033 11.423165 24.0625 13.84375 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 8.975298 28.305952 7.03125 25.875 7.03125 L 13.84375 7.03125 z",N_i="M 27.34375 1.65625 L 5.28125 27.9375 L 8.09375 30.3125 L 30.15625 4.03125 L 27.34375 1.65625 z M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4724893 20.232036 9.5676108 20.7379 9.75 21.21875 L 21.65625 7.03125 L 13.84375 7.03125 z M 28.21875 7.71875 L 14.53125 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 9.8371439 29.456025 8.4902779 28.21875 7.71875 z";function LQe(){this._cameraClicked=new br,this._closeClicked=new br,this.maxHeight=500,this.enableCamera=!1,this.isCameraTracking=!1,this.showInfo=!1,this.titleText="",this.description="",gr.track(this,["showInfo","titleText","description","maxHeight","enableCamera","isCameraTracking"]),this._loadingIndicatorHtml='<div class="cesium-infoBox-loadingContainer"><span class="cesium-infoBox-loading"></span></div>',this.cameraIconPath=void 0,gr.defineProperty(this,"cameraIconPath",{get:function(){return!this.enableCamera||this.isCameraTracking?N_i:F_i}}),gr.defineProperty(this,"_bodyless",{get:function(){return!O(this.description)||this.description.length===0}})}LQe.prototype.maxHeightOffset=function(o){return`${this.maxHeight-o}px`};Object.defineProperties(LQe.prototype,{cameraClicked:{get:function(){return this._cameraClicked}},closeClicked:{get:function(){return this._closeClicked}}});var FQe=LQe;function Hoe(o){o=iA(o);let A=document.createElement("div");A.className="cesium-infoBox",A.setAttribute("data-bind",'css: { "cesium-infoBox-visible" : showInfo, "cesium-infoBox-bodyless" : _bodyless }'),o.appendChild(A);let f=document.createElement("div");f.className="cesium-infoBox-title",f.setAttribute("data-bind","text: titleText"),A.appendChild(f);let m=document.createElement("button");m.type="button",m.className="cesium-button cesium-infoBox-camera",m.setAttribute("data-bind",'attr: { title: "Focus camera on object" },click: function () { cameraClicked.raiseEvent(this); },enable: enableCamera,cesiumSvgPath: { path: cameraIconPath, width: 32, height: 32 }'),A.appendChild(m);let C=document.createElement("button");C.type="button",C.className="cesium-infoBox-close",C.setAttribute("data-bind","click: function () { closeClicked.raiseEvent(this); }"),C.innerHTML="&times;",A.appendChild(C);let y=document.createElement("iframe");y.className="cesium-infoBox-iframe",y.setAttribute("sandbox","allow-same-origin allow-popups allow-forms"),y.setAttribute("data-bind","style : { maxHeight : maxHeightOffset(40) }"),y.setAttribute("allowfullscreen",!0),A.appendChild(y);let x=new FQe;gr.applyBindings(x,A),this._container=o,this._element=A,this._frame=y,this._viewModel=x,this._descriptionSubscription=void 0;let v=this;y.addEventListener("load",function(){let E=y.contentDocument,I=E.createElement("link");I.href=xs("Widgets/InfoBox/InfoBoxDescription.css"),I.rel="stylesheet",I.type="text/css";let w=E.createElement("div");w.className="cesium-infoBox-description",E.head.appendChild(I),E.body.appendChild(w),v._descriptionSubscription=WE(x,"description",function(Q){y.style.height="5px",w.innerHTML=Q;let M=null,B=w.firstElementChild;if(B!==null&&w.childNodes.length===1){let D=window.getComputedStyle(B);if(D!==null){let F=D["background-color"],L=At.fromCssColorString(F);O(L)&&L.alpha!==0&&(M=D["background-color"])}}A.style["background-color"]=M;let T=w.getBoundingClientRect().height;y.style.height=`${T}px`})}),y.setAttribute("src","about:blank")}Object.defineProperties(Hoe.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}},frame:{get:function(){return this._frame}}});Hoe.prototype.isDestroyed=function(){return!1};Hoe.prototype.destroy=function(){let o=this._container;return gr.cleanNode(this._element),o.removeChild(this._element),O(this._descriptionSubscription)&&this._descriptionSubscription.dispose(),Qr(this)};var NQe=Hoe;function Cot(){this.showInstructions=!1;let o=this;this._command=Hl(function(){o.showInstructions=!o.showInstructions}),this._showClick=Hl(function(){o._touch=!1}),this._showTouch=Hl(function(){o._touch=!0}),this._touch=!1,this.tooltip="Navigation Instructions",gr.track(this,["tooltip","showInstructions","_touch"])}Object.defineProperties(Cot.prototype,{command:{get:function(){return this._command}},showClick:{get:function(){return this._showClick}},showTouch:{get:function(){return this._showTouch}}});var kQe=Cot;function Voe(o){let A=iA(o.container),f=new kQe,m=Ae(o.instructionsInitiallyVisible,!1);f.showInstructions=m,f._svgPath="M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466z M17.328,24.371h-2.707v-2.596h2.707V24.371zM17.328,19.003v0.858h-2.707v-1.057c0-3.19,3.63-3.696,3.63-5.963c0-1.034-0.924-1.826-2.134-1.826c-1.254,0-2.354,0.924-2.354,0.924l-1.541-1.915c0,0,1.519-1.584,4.137-1.584c2.487,0,4.796,1.54,4.796,4.136C21.156,16.208,17.328,16.627,17.328,19.003z";let C=document.createElement("span");C.className="cesium-navigationHelpButton-wrapper",A.appendChild(C);let y=document.createElement("button");y.type="button",y.className="cesium-button cesium-toolbar-button cesium-navigation-help-button",y.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }"),C.appendChild(y);let x=document.createElement("div");x.className="cesium-navigation-help",x.setAttribute("data-bind",'css: { "cesium-navigation-help-visible" : showInstructions}'),C.appendChild(x);let v=document.createElement("button");v.type="button",v.className="cesium-navigation-button cesium-navigation-button-left",v.setAttribute("data-bind",'click: showClick, css: {"cesium-navigation-button-selected": !_touch, "cesium-navigation-button-unselected": _touch}');let E=document.createElement("img");E.src=xs("Widgets/Images/NavigationHelp/Mouse.svg"),E.className="cesium-navigation-button-icon",E.style.width="25px",E.style.height="25px",v.appendChild(E),v.appendChild(document.createTextNode("Mouse"));let I=document.createElement("button");I.type="button",I.className="cesium-navigation-button cesium-navigation-button-right",I.setAttribute("data-bind",'click: showTouch, css: {"cesium-navigation-button-selected": _touch, "cesium-navigation-button-unselected": !_touch}');let w=document.createElement("img");w.src=xs("Widgets/Images/NavigationHelp/Touch.svg"),w.className="cesium-navigation-button-icon",w.style.width="25px",w.style.height="25px",I.appendChild(w),I.appendChild(document.createTextNode("Touch")),x.appendChild(v),x.appendChild(I);let Q=document.createElement("div");Q.className="cesium-click-navigation-help cesium-navigation-help-instructions",Q.setAttribute("data-bind",'css: { "cesium-click-navigation-help-visible" : !_touch}'),Q.innerHTML=`            <table>                <tr>                    <td><img src="${xs("Widgets/Images/NavigationHelp/MouseLeft.svg")}" width="48" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-pan">Pan view</div>                        <div class="cesium-navigation-help-details">Left click + drag</div>                    </td>                </tr>                <tr>                    <td><img src="${xs("Widgets/Images/NavigationHelp/MouseRight.svg")}" width="48" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-zoom">Zoom view</div>                        <div class="cesium-navigation-help-details">Right click + drag, or</div>                        <div class="cesium-navigation-help-details">Mouse wheel scroll</div>                    </td>                </tr>                <tr>                    <td><img src="${xs("Widgets/Images/NavigationHelp/MouseMiddle.svg")}" width="48" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-rotate">Rotate view</div>                        <div class="cesium-navigation-help-details">Middle click + drag, or</div>                        <div class="cesium-navigation-help-details">CTRL + Left/Right click + drag</div>                    </td>                </tr>            </table>`,x.appendChild(Q);let M=document.createElement("div");M.className="cesium-touch-navigation-help cesium-navigation-help-instructions",M.setAttribute("data-bind",'css: { "cesium-touch-navigation-help-visible" : _touch}'),M.innerHTML=`            <table>                <tr>                    <td><img src="${xs("Widgets/Images/NavigationHelp/TouchDrag.svg")}" width="70" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-pan">Pan view</div>                        <div class="cesium-navigation-help-details">One finger drag</div>                    </td>                </tr>                <tr>                    <td><img src="${xs("Widgets/Images/NavigationHelp/TouchZoom.svg")}" width="70" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-zoom">Zoom view</div>                        <div class="cesium-navigation-help-details">Two finger pinch</div>                    </td>                </tr>                <tr>                    <td><img src="${xs("Widgets/Images/NavigationHelp/TouchTilt.svg")}" width="70" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-rotate">Tilt view</div>                        <div class="cesium-navigation-help-details">Two finger drag, same direction</div>                    </td>                </tr>                <tr>                    <td><img src="${xs("Widgets/Images/NavigationHelp/TouchRotate.svg")}" width="70" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-tilt">Rotate view</div>                        <div class="cesium-navigation-help-details">Two finger drag, opposite direction</div>                    </td>                </tr>            </table>`,x.appendChild(M),gr.applyBindings(f,C),this._container=A,this._viewModel=f,this._wrapper=C,this._closeInstructions=function(B){C.contains(B.target)||(f.showInstructions=!1)},Mo.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeInstructions,!0):(document.addEventListener("mousedown",this._closeInstructions,!0),document.addEventListener("touchstart",this._closeInstructions,!0))}Object.defineProperties(Voe.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Voe.prototype.isDestroyed=function(){return!1};Voe.prototype.destroy=function(){return Mo.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeInstructions,!0):(document.removeEventListener("mousedown",this._closeInstructions,!0),document.removeEventListener("touchstart",this._closeInstructions,!0)),gr.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),Qr(this)};var OQe=Voe;function zoe(o){this._scene=o,this._orthographic=o.camera.frustum instanceof Ss,this._flightInProgress=!1,this.dropDownVisible=!1,this.tooltipPerspective="Perspective Projection",this.tooltipOrthographic="Orthographic Projection",this.selectedTooltip=void 0,this.sceneMode=o.mode,gr.track(this,["_orthographic","_flightInProgress","sceneMode","dropDownVisible","tooltipPerspective","tooltipOrthographic"]);let A=this;gr.defineProperty(this,"selectedTooltip",function(){return A._orthographic?A.tooltipOrthographic:A.tooltipPerspective}),this._toggleDropDown=Hl(function(){A.sceneMode===xi.SCENE2D||A._flightInProgress||(A.dropDownVisible=!A.dropDownVisible)}),this._eventHelper=new Mx,this._eventHelper.add(o.morphComplete,function(f,m,C,y){A.sceneMode=C,A._orthographic=C===xi.SCENE2D||A._scene.camera.frustum instanceof Ss}),this._eventHelper.add(o.preRender,function(){A._flightInProgress=O(o.camera._currentFlight)}),this._switchToPerspective=Hl(function(){A.sceneMode!==xi.SCENE2D&&(A._scene.camera.switchToPerspectiveFrustum(),A._orthographic=!1,A.dropDownVisible=!1)}),this._switchToOrthographic=Hl(function(){A.sceneMode!==xi.SCENE2D&&(A._scene.camera.switchToOrthographicFrustum(),A._orthographic=!0,A.dropDownVisible=!1)}),this._sceneMode=xi}Object.defineProperties(zoe.prototype,{scene:{get:function(){return this._scene}},toggleDropDown:{get:function(){return this._toggleDropDown}},switchToPerspective:{get:function(){return this._switchToPerspective}},switchToOrthographic:{get:function(){return this._switchToOrthographic}},isOrthographicProjection:{get:function(){return this._orthographic}}});zoe.prototype.isDestroyed=function(){return!1};zoe.prototype.destroy=function(){this._eventHelper.removeAll(),Qr(this)};var UQe=zoe,k_i="M 28.15625,10.4375 9.125,13.21875 13.75,43.25 41.75,55.09375 50.8125,37 54.5,11.9375 z m 0.125,3 19.976451,0.394265 L 43.03125,16.875 22.6875,14.28125 z M 50.971746,15.705477 47.90625,36.03125 42.53125,46 44.84375,19.3125 z M 12.625,16.03125 l 29.15625,3.6875 -2.65625,31 L 16.4375,41.125 z",O_i="m 31.560594,6.5254438 -20.75,12.4687502 0.1875,24.5625 22.28125,11.8125 19.5,-12 0.65625,-0.375 0,-0.75 0.0312,-23.21875 z m 0.0625,3.125 16.65625,9.5000002 -16.125,10.28125 -17.34375,-9.71875 z m 18.96875,11.1875002 0.15625,20.65625 -17.46875,10.59375 0.15625,-20.28125 z m -37.0625,1.25 17.21875,9.625 -0.15625,19.21875 -16.9375,-9 z";function Koe(o,A){o=iA(o);let f=new UQe(A);f._perspectivePath=k_i,f._orthographicPath=O_i;let m=document.createElement("span");m.className="cesium-projectionPicker-wrapper cesium-toolbar-button",o.appendChild(m);let C=document.createElement("button");C.type="button",C.className="cesium-button cesium-toolbar-button",C.setAttribute("data-bind",'css: { "cesium-projectionPicker-buttonPerspective": !_orthographic,       "cesium-projectionPicker-buttonOrthographic": _orthographic,       "cesium-button-disabled" : sceneMode === _sceneMode.SCENE2D || _flightInProgress,        "cesium-projectionPicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),C.innerHTML='<!-- ko cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64, css: "cesium-projectionPicker-iconPerspective" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64, css: "cesium-projectionPicker-iconOrthographic" } --><!-- /ko -->',m.appendChild(C);let y=document.createElement("button");y.type="button",y.className="cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon",y.setAttribute("data-bind",'css: { "cesium-projectionPicker-visible" : (dropDownVisible && _orthographic),       "cesium-projectionPicker-none" : !_orthographic,       "cesium-projectionPicker-hidden" : !dropDownVisible },attr: { title: tooltipPerspective },click: switchToPerspective,cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64 }'),m.appendChild(y);let x=document.createElement("button");x.type="button",x.className="cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon",x.setAttribute("data-bind",'css: { "cesium-projectionPicker-visible" : (dropDownVisible && !_orthographic),       "cesium-projectionPicker-none" : _orthographic,       "cesium-projectionPicker-hidden" : !dropDownVisible},attr: { title: tooltipOrthographic },click: switchToOrthographic,cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64 }'),m.appendChild(x),gr.applyBindings(f,m),this._viewModel=f,this._container=o,this._wrapper=m,this._closeDropDown=function(v){m.contains(v.target)||(f.dropDownVisible=!1)},Mo.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(Koe.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Koe.prototype.isDestroyed=function(){return!1};Koe.prototype.destroy=function(){return this._viewModel.destroy(),Mo.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),gr.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),Qr(this)};var GQe=Koe;function Yoe(o,A){this._scene=o;let f=this,m=function(C,y,x,v){f.sceneMode=x,f.dropDownVisible=!1};this._eventHelper=new Mx,this._eventHelper.add(o.morphStart,m),this._duration=Ae(A,2),this.sceneMode=o.mode,this.dropDownVisible=!1,this.tooltip2D="2D",this.tooltip3D="3D",this.tooltipColumbusView="Columbus View",gr.track(this,["sceneMode","dropDownVisible","tooltip2D","tooltip3D","tooltipColumbusView"]),this.selectedTooltip=void 0,gr.defineProperty(this,"selectedTooltip",function(){let C=f.sceneMode;return C===xi.SCENE2D?f.tooltip2D:C===xi.SCENE3D?f.tooltip3D:f.tooltipColumbusView}),this._toggleDropDown=Hl(function(){f.dropDownVisible=!f.dropDownVisible}),this._morphTo2D=Hl(function(){o.morphTo2D(f._duration)}),this._morphTo3D=Hl(function(){o.morphTo3D(f._duration)}),this._morphToColumbusView=Hl(function(){o.morphToColumbusView(f._duration)}),this._sceneMode=xi}Object.defineProperties(Yoe.prototype,{scene:{get:function(){return this._scene}},duration:{get:function(){return this._duration},set:function(o){this._duration=o}},toggleDropDown:{get:function(){return this._toggleDropDown}},morphTo2D:{get:function(){return this._morphTo2D}},morphTo3D:{get:function(){return this._morphTo3D}},morphToColumbusView:{get:function(){return this._morphToColumbusView}}});Yoe.prototype.isDestroyed=function(){return!1};Yoe.prototype.destroy=function(){this._eventHelper.removeAll(),Qr(this)};var HQe=Yoe,U_i="m 32.401392,4.9330437 c -7.087603,0 -14.096095,2.884602 -19.10793,7.8946843 -5.0118352,5.010083 -7.9296167,11.987468 -7.9296167,19.072999 0,7.085531 2.9177815,14.097848 7.9296167,19.107931 4.837653,4.835961 11.541408,7.631372 18.374354,7.82482 0.05712,0.01231 0.454119,0.139729 0.454119,0.139729 l 0.03493,-0.104797 c 0.08246,7.84e-4 0.162033,0.03493 0.244525,0.03493 0.08304,0 0.161515,-0.03414 0.244526,-0.03493 l 0.03493,0.104797 c 0,0 0.309474,-0.129487 0.349323,-0.139729 6.867765,-0.168094 13.582903,-2.965206 18.444218,-7.82482 2.558195,-2.5573 4.551081,-5.638134 5.903547,-8.977584 1.297191,-3.202966 2.02607,-6.661489 2.02607,-10.130347 0,-6.237309 -2.366261,-12.31219 -6.322734,-17.116794 -0.0034,-0.02316 0.0049,-0.04488 0,-0.06986 -0.01733,-0.08745 -0.104529,-0.278855 -0.104797,-0.279458 -5.31e-4,-0.0012 -0.522988,-0.628147 -0.523984,-0.62878         -3.47e-4,-2.2e-4 -0.133444,-0.03532 -0.244525,-0.06987 C 51.944299,13.447603 51.751076,13.104317 51.474391,12.827728 46.462556,7.8176457 39.488996,4.9330437 32.401392,4.9330437 z m -2.130866,3.5281554 0.104797,9.6762289 c -4.111695,-0.08361 -7.109829,-0.423664 -9.257041,-0.943171 1.198093,-2.269271 2.524531,-4.124404 3.91241,-5.414496 2.167498,-2.0147811 3.950145,-2.8540169 5.239834,-3.3185619 z m 2.794579,0 c 1.280302,0.4754953 3.022186,1.3285948 5.065173,3.2486979 1.424667,1.338973 2.788862,3.303645 3.982275,5.728886 -2.29082,0.403367 -5.381258,0.621049 -8.942651,0.698645 L 33.065105,8.4611991 z m 5.728886,0.2445256 c 4.004072,1.1230822 7.793098,3.1481363 10.724195,6.0782083 0.03468,0.03466 0.07033,0.06991 0.104797,0.104797 -0.45375,0.313891 -0.923054,0.663002 -1.956205,1.082899 -0.647388,0.263114 -1.906242,0.477396 -2.829511,0.733577 -1.382296,-2.988132         -3.027146,-5.368585 -4.785716,-7.0213781 -0.422866,-0.397432 -0.835818,-0.6453247 -1.25756,-0.9781032 z m -15.33525,0.7685092 c -0.106753,0.09503 -0.207753,0.145402 -0.31439,0.244526 -1.684973,1.5662541 -3.298068,3.8232211 -4.680919,6.5672591 -0.343797,-0.14942 -1.035052,-0.273198 -1.292493,-0.419186 -0.956528,-0.542427 -1.362964,-1.022024 -1.537018,-1.292493 -0.0241,-0.03745 -0.01868,-0.0401 -0.03493,-0.06986 2.250095,-2.163342 4.948824,-3.869984 7.859752,-5.0302421 z m -9.641296,7.0912431 c 0.464973,0.571618 0.937729,1.169056 1.956205,1.746612 0.349907,0.198425 1.107143,0.335404 1.537018,0.523983 -1.20166,3.172984 -1.998037,7.051901 -2.165798,11.772162 C 14.256557,30.361384 12.934823,30.161483 12.280427,29.90959 10.644437,29.279855 9.6888882,28.674891 9.1714586,28.267775 8.6540289,27.860658 8.6474751,27.778724 8.6474751,27.778724 l -0.069864,0.03493 C 9.3100294,23.691285         11.163248,19.798527 13.817445,16.565477 z m 37.552149,0.523984 c 2.548924,3.289983 4.265057,7.202594 4.890513,11.318043 -0.650428,0.410896 -1.756876,1.001936 -3.563088,1.606882 -1.171552,0.392383 -3.163859,0.759153 -4.960377,1.117832 -0.04367,-4.752703 -0.784809,-8.591423 -1.88634,-11.807094 0.917574,-0.263678 2.170552,-0.486495 2.864443,-0.76851 1.274693,-0.518066 2.003942,-1.001558 2.654849,-1.467153 z m -31.439008,2.619917 c 2.487341,0.672766 5.775813,1.137775 10.479669,1.222628 l 0.104797,10.689263 0,0.03493 0,0.733577 c -5.435005,-0.09059 -9.512219,-0.519044 -12.610536,-1.117831 0.106127,-4.776683 0.879334,-8.55791 2.02607,-11.562569 z m 23.264866,0.31439 c 1.073459,3.067541 1.833795,6.821314 1.816476,11.702298 -3.054474,0.423245 -7.062018,0.648559 -11.702298,0.698644 l 0,-0.838373 -0.104796,-10.654331 c 4.082416,-0.0864 7.404468,-0.403886 9.990618,-0.908238 z         M 8.2632205,30.922625 c 0.7558676,0.510548 1.5529563,1.013339 3.0041715,1.57195 0.937518,0.360875 2.612202,0.647642 3.91241,0.978102 0.112814,3.85566 0.703989,7.107756 1.606883,9.920754 -1.147172,-0.324262 -2.644553,-0.640648 -3.423359,-0.978102 -1.516688,-0.657177 -2.386627,-1.287332 -2.864443,-1.71168 -0.477816,-0.424347 -0.489051,-0.489051 -0.489051,-0.489051 L 9.8002387,40.319395 C 8.791691,37.621767 8.1584238,34.769583 8.1584238,31.900727 c 0,-0.330153 0.090589,-0.648169 0.1047967,-0.978102 z m 48.2763445,0.419186 c 0.0047,0.188973 0.06986,0.36991 0.06986,0.558916 0,2.938869 -0.620228,5.873558 -1.676747,8.628261 -0.07435,0.07583 -0.06552,0.07411 -0.454119,0.349323 -0.606965,0.429857 -1.631665,1.042044 -3.318562,1.676747 -1.208528,0.454713 -3.204964,0.850894 -5.135038,1.25756 0.84593,-2.765726 1.41808,-6.005357 1.606883,-9.815957 2.232369,-0.413371 4.483758,-0.840201         5.938479,-1.327425 1.410632,-0.472457 2.153108,-0.89469 2.96924,-1.327425 z m -38.530252,2.864443 c 3.208141,0.56697 7.372279,0.898588 12.575603,0.978103 l 0.174662,9.885821 c -4.392517,-0.06139 -8.106722,-0.320566 -10.863925,-0.803441 -1.051954,-2.664695 -1.692909,-6.043794 -1.88634,-10.060483 z m 26.793022,0.31439 c -0.246298,3.923551 -0.877762,7.263679 -1.816476,9.885822 -2.561957,0.361954 -5.766249,0.560708 -9.431703,0.62878 l -0.174661,-9.815957 c 4.491734,-0.04969 8.334769,-0.293032 11.42284,-0.698645 z M 12.035901,44.860585 c 0.09977,0.04523 0.105535,0.09465 0.209594,0.139729 1.337656,0.579602 3.441099,1.058072 5.589157,1.537018 1.545042,3.399208 3.548524,5.969402 5.589157,7.789888 -3.034411,-1.215537 -5.871615,-3.007978 -8.174142,-5.309699 -1.245911,-1.245475 -2.271794,-2.662961 -3.213766,-4.156936 z m 40.69605,0 c -0.941972,1.493975 -1.967855,2.911461         -3.213765,4.156936 -2.74253,2.741571 -6.244106,4.696717 -9.955686,5.868615 0.261347,-0.241079 0.507495,-0.394491 0.768509,-0.663713 1.674841,-1.727516 3.320792,-4.181056 4.645987,-7.265904 2.962447,-0.503021 5.408965,-1.122293 7.161107,-1.781544 0.284034,-0.106865 0.337297,-0.207323 0.593848,-0.31439 z m -31.404076,2.305527 c 2.645807,0.376448 5.701178,0.649995 9.466635,0.698645 l 0.139729,7.789888 c -1.38739,-0.480844 -3.316218,-1.29837 -5.659022,-3.388427 -1.388822,-1.238993 -2.743668,-3.0113 -3.947342,-5.100106 z m 20.365491,0.104797 c -1.04872,2.041937 -2.174337,3.779068 -3.353494,4.995309 -1.853177,1.911459 -3.425515,2.82679 -4.611055,3.353494 l -0.139729,-7.789887 c 3.13091,-0.05714 5.728238,-0.278725 8.104278,-0.558916 z",G_i="m 2.9825053,17.550598 0,1.368113 0,26.267766 0,1.368113 1.36811,0 54.9981397,0 1.36811,0 0,-1.368113 0,-26.267766 0,-1.368113 -1.36811,0 -54.9981397,0 -1.36811,0 z m 2.73623,2.736226 10.3292497,0 0,10.466063 -10.3292497,0 0,-10.466063 z m 13.0654697,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 10.32926,0 0,10.466063 -10.32926,0 0,-10.466063 z m -41.9326497,13.202288 10.3292497,0 0,10.329252 -10.3292497,0 0,-10.329252 z m 13.0654697,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 10.32926,0 0,10.329252 -10.32926,0 0,-10.329252 z",H_i="m 14.723969,17.675598 -0.340489,0.817175 -11.1680536,26.183638 -0.817175,1.872692 2.076986,0 54.7506996,0 2.07698,0 -0.81717,-1.872692 -11.16805,-26.183638 -0.34049,-0.817175 -0.91933,0 -32.414586,0 -0.919322,0 z m 1.838643,2.723916 6.196908,0 -2.928209,10.418977 -7.729111,0 4.460412,-10.418977 z m 9.02297,0 4.903049,0 0,10.418977 -7.831258,0 2.928209,-10.418977 z m 7.626964,0 5.584031,0 2.62176,10.418977 -8.205791,0 0,-10.418977 z m 8.410081,0 5.51593,0 4.46042,10.418977 -7.38863,0 -2.58772,-10.418977 z m -30.678091,13.142892 8.103649,0 -2.89416,10.282782 -9.6018026,0 4.3923136,-10.282782 z m 10.929711,0 8.614384,0 0,10.282782 -11.508544,0 2.89416,-10.282782 z m 11.338299,0 8.852721,0 2.58772,10.282782 -11.440441,0 0,-10.282782 z m 11.678781,0 7.86531,0 4.39231,10.282782 -9.6699,0 -2.58772,-10.282782 z";function Joe(o,A,f){o=iA(o);let m=new HQe(A,f);m._globePath=U_i,m._flatMapPath=G_i,m._columbusViewPath=H_i;let C=document.createElement("span");C.className="cesium-sceneModePicker-wrapper cesium-toolbar-button",o.appendChild(C);let y=document.createElement("button");y.type="button",y.className="cesium-button cesium-toolbar-button",y.setAttribute("data-bind",'css: { "cesium-sceneModePicker-button2D": sceneMode === _sceneMode.SCENE2D,       "cesium-sceneModePicker-button3D": sceneMode === _sceneMode.SCENE3D,       "cesium-sceneModePicker-buttonColumbusView": sceneMode === _sceneMode.COLUMBUS_VIEW,       "cesium-sceneModePicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),y.innerHTML='<!-- ko cesiumSvgPath: { path: _globePath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon3D" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon2D" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-iconColumbusView" } --><!-- /ko -->',C.appendChild(y);let x=document.createElement("button");x.type="button",x.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",x.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE3D)) || (!dropDownVisible && (sceneMode === _sceneMode.SCENE3D)),       "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE3D,       "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip3D },click: morphTo3D,cesiumSvgPath: { path: _globePath, width: 64, height: 64 }'),C.appendChild(x);let v=document.createElement("button");v.type="button",v.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",v.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE2D)),       "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE2D,       "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip2D },click: morphTo2D,cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64 }'),C.appendChild(v);let E=document.createElement("button");E.type="button",E.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",E.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.COLUMBUS_VIEW)) || (!dropDownVisible && (sceneMode === _sceneMode.COLUMBUS_VIEW)),       "cesium-sceneModePicker-none" : sceneMode === _sceneMode.COLUMBUS_VIEW,       "cesium-sceneModePicker-hidden" : !dropDownVisible},attr: { title: tooltipColumbusView },click: morphToColumbusView,cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64 }'),C.appendChild(E),gr.applyBindings(m,C),this._viewModel=m,this._container=o,this._wrapper=C,this._closeDropDown=function(I){C.contains(I.target)||(m.dropDownVisible=!1)},Mo.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(Joe.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Joe.prototype.isDestroyed=function(){return!1};Joe.prototype.destroy=function(){return this._viewModel.destroy(),Mo.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),gr.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),Qr(this)};var VQe=Joe,V_i=new Bt,eie="-1000px";function qJ(o,A,f){this._scene=o,this._screenPositionX=eie,this._screenPositionY=eie,this._tweens=o.tweens,this._container=Ae(f,document.body),this._selectionIndicatorElement=A,this._scale=1,this.position=void 0,this.showSelection=!1,gr.track(this,["position","_screenPositionX","_screenPositionY","_scale","showSelection"]),this.isVisible=void 0,gr.defineProperty(this,"isVisible",{get:function(){return this.showSelection&&O(this.position)}}),gr.defineProperty(this,"_transform",{get:function(){return`scale(${this._scale})`}}),this.computeScreenSpacePosition=function(m,C){return Qs.wgs84ToWindowCoordinates(o,m,C)}}qJ.prototype.update=function(){if(this.showSelection&&O(this.position)){let o=this.computeScreenSpacePosition(this.position,V_i);if(!O(o))this._screenPositionX=eie,this._screenPositionY=eie;else{let A=this._container,f=A.parentNode.clientWidth,m=A.parentNode.clientHeight,C=this._selectionIndicatorElement.clientWidth,y=C*.5;o.x=Math.min(Math.max(o.x,-C),f+C)-y,o.y=Math.min(Math.max(o.y,-C),m+C)-y,this._screenPositionX=`${Math.floor(o.x+.25)}px`,this._screenPositionY=`${Math.floor(o.y+.25)}px`}}};qJ.prototype.animateAppear=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:2,stopValue:1,duration:.8,easingFunction:Ix.EXPONENTIAL_OUT})};qJ.prototype.animateDepart=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:this._scale,stopValue:1.5,duration:.8,easingFunction:Ix.EXPONENTIAL_OUT})};Object.defineProperties(qJ.prototype,{container:{get:function(){return this._container}},selectionIndicatorElement:{get:function(){return this._selectionIndicatorElement}},scene:{get:function(){return this._scene}}});var zQe=qJ;function Woe(o,A){o=iA(o),this._container=o;let f=document.createElement("div");f.className="cesium-selection-wrapper",f.setAttribute("data-bind",'style: { "top" : _screenPositionY, "left" : _screenPositionX },css: { "cesium-selection-wrapper-visible" : isVisible }'),o.appendChild(f),this._element=f;let m="http://www.w3.org/2000/svg",C="M -34 -34 L -34 -11.25 L -30 -15.25 L -30 -30 L -15.25 -30 L -11.25 -34 L -34 -34 z M 11.25 -34 L 15.25 -30 L 30 -30 L 30 -15.25 L 34 -11.25 L 34 -34 L 11.25 -34 z M -34 11.25 L -34 34 L -11.25 34 L -15.25 30 L -30 30 L -30 15.25 L -34 11.25 z M 34 11.25 L 30 15.25 L 30 30 L 15.25 30 L 11.25 34 L 34 34 L 34 11.25 z",y=document.createElementNS(m,"svg:svg");y.setAttribute("width",160),y.setAttribute("height",160),y.setAttribute("viewBox","0 0 160 160");let x=document.createElementNS(m,"g");x.setAttribute("transform","translate(80,80)"),y.appendChild(x);let v=document.createElementNS(m,"path");v.setAttribute("data-bind","attr: { transform: _transform }"),v.setAttribute("d",C),x.appendChild(v),f.appendChild(y);let E=new zQe(A,this._element,this._container);this._viewModel=E,gr.applyBindings(this._viewModel,this._element)}Object.defineProperties(Woe.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Woe.prototype.isDestroyed=function(){return!1};Woe.prototype.destroy=function(){let o=this._container;return gr.cleanNode(this._element),o.removeChild(this._element),Qr(this)};var KQe=Woe;function IO(o,A,f){this._color=o,this._height=A,this._base=Ae(f,0)}IO.prototype.getHeight=function(){return this._height};IO.prototype.getBase=function(){return this._base};IO.prototype.getStartTime=function(){return this._start};IO.prototype.getStopTime=function(){return this._stop};IO.prototype.setRange=function(o,A){this._start=o,this._stop=A};IO.prototype.render=function(o){let A="";if(this._start&&this._stop&&this._color){let f=fi.secondsDifference(this._start,o.epochJulian),m=Math.round(o.timeBarWidth*o.getAlpha(f)),C=fi.secondsDifference(this._stop,o.epochJulian),y=Math.round(o.timeBarWidth*o.getAlpha(C))-m;m<0&&(y+=m,m=0),m+y>o.timeBarWidth&&(y=o.timeBarWidth-m),y>0&&(A=`<span class="cesium-timeline-highlight" style="left: ${m.toString()}px; width: ${y.toString()}px; bottom: ${this._base.toString()}px; height: ${this._height}px; background-color: ${this._color};"></span>`)}return A};var YQe=IO;function yot(o,A,f,m){this.interval=o,this.height=A,this.color=f||new At(.5,.5,.5,1),this.backgroundColor=m||new At(0,0,0,0)}yot.prototype.render=function(o,A){let f=this.interval.start,m=this.interval.stop,C=A.startJulian,y=fi.addSeconds(A.startJulian,A.duration,new fi);if(fi.lessThan(f,C)&&fi.greaterThan(m,y))o.fillStyle=this.color.toCssColorString(),o.fillRect(0,A.y,A.timeBarWidth,this.height);else if(fi.lessThanOrEquals(f,y)&&fi.greaterThanOrEquals(m,C)){let x,v,E;for(x=0;x<A.timeBarWidth;++x){let I=fi.addSeconds(A.startJulian,x/A.timeBarWidth*A.duration,new fi);!O(v)&&fi.greaterThanOrEquals(I,f)?v=x:!O(E)&&fi.greaterThanOrEquals(I,m)&&(E=x)}o.fillStyle=this.backgroundColor.toCssColorString(),o.fillRect(0,A.y,A.timeBarWidth,this.height),O(v)&&(O(E)||(E=A.timeBarWidth),o.fillStyle=this.color.toCssColorString(),o.fillRect(v,A.y,Math.max(E-v,1),this.height))}};var JQe=yot,Oge=1e12,F1={none:0,scrub:1,slide:2,zoom:3,touchOnly:4},_v={none:0,scrub:1,slideZoom:2,singleTap:3,ignore:4},IL=[.001,.002,.005,.01,.02,.05,.1,.25,.5,1,2,5,10,15,30,60,120,300,600,900,1800,3600,7200,14400,21600,43200,86400,172800,345600,604800,1296e3,2592e3,5184e3,7776e3,15552e3,31536e3,63072e3,126144e3,15768e4,31536e4,63072e4,126144e4,15768e5,31536e5,63072e5,126144e5,15768e6,31536e6];function Jv(o,A){o=iA(o);let f=o.ownerDocument;this.container=o;let m=f.createElement("div");m.className="cesium-timeline-main",o.appendChild(m),this._topDiv=m,this._endJulian=void 0,this._epochJulian=void 0,this._lastXPos=void 0,this._scrubElement=void 0,this._startJulian=void 0,this._timeBarSecondsSpan=void 0,this._clock=A,this._scrubJulian=A.currentTime,this._mainTicSpan=-1,this._mouseMode=F1.none,this._touchMode=_v.none,this._touchState={centerX:0,spanX:0},this._mouseX=0,this._timelineDrag=0,this._timelineDragLocation=void 0,this._lastHeight=void 0,this._lastWidth=void 0,this._topDiv.innerHTML='<div class="cesium-timeline-bar"></div><div class="cesium-timeline-trackContainer"><canvas class="cesium-timeline-tracks" width="10" height="1"></canvas></div><div class="cesium-timeline-needle"></div><span class="cesium-timeline-ruler"></span>',this._timeBarEle=this._topDiv.childNodes[0],this._trackContainer=this._topDiv.childNodes[1],this._trackListEle=this._topDiv.childNodes[1].childNodes[0],this._needleEle=this._topDiv.childNodes[2],this._rulerEle=this._topDiv.childNodes[3],this._context=this._trackListEle.getContext("2d"),this._trackList=[],this._highlightRanges=[],this.zoomTo(A.startTime,A.stopTime),this._onMouseDown=z_i(this),this._onMouseUp=K_i(this),this._onMouseMove=Y_i(this),this._onMouseWheel=J_i(this),this._onTouchStart=W_i(this),this._onTouchMove=q_i(this),this._onTouchEnd=j_i(this);let C=this._timeBarEle;f.addEventListener("mouseup",this._onMouseUp,!1),f.addEventListener("mousemove",this._onMouseMove,!1),C.addEventListener("mousedown",this._onMouseDown,!1),C.addEventListener("DOMMouseScroll",this._onMouseWheel,!1),C.addEventListener("mousewheel",this._onMouseWheel,!1),C.addEventListener("touchstart",this._onTouchStart,!1),C.addEventListener("touchmove",this._onTouchMove,!1),C.addEventListener("touchend",this._onTouchEnd,!1),C.addEventListener("touchcancel",this._onTouchEnd,!1),this._topDiv.oncontextmenu=function(){return!1},A.onTick.addEventListener(this.updateFromClock,this),this.updateFromClock()}Jv.prototype.addEventListener=function(o,A,f){this._topDiv.addEventListener(o,A,f)};Jv.prototype.removeEventListener=function(o,A,f){this._topDiv.removeEventListener(o,A,f)};Jv.prototype.isDestroyed=function(){return!1};Jv.prototype.destroy=function(){this._clock.onTick.removeEventListener(this.updateFromClock,this);let o=this.container.ownerDocument;o.removeEventListener("mouseup",this._onMouseUp,!1),o.removeEventListener("mousemove",this._onMouseMove,!1);let A=this._timeBarEle;A.removeEventListener("mousedown",this._onMouseDown,!1),A.removeEventListener("DOMMouseScroll",this._onMouseWheel,!1),A.removeEventListener("mousewheel",this._onMouseWheel,!1),A.removeEventListener("touchstart",this._onTouchStart,!1),A.removeEventListener("touchmove",this._onTouchMove,!1),A.removeEventListener("touchend",this._onTouchEnd,!1),A.removeEventListener("touchcancel",this._onTouchEnd,!1),this.container.removeChild(this._topDiv),Qr(this)};Jv.prototype.addHighlightRange=function(o,A,f){let m=new YQe(o,A,f);return this._highlightRanges.push(m),this.resize(),m};Jv.prototype.addTrack=function(o,A,f,m){let C=new JQe(o,A,f,m);return this._trackList.push(C),this._lastHeight=void 0,this.resize(),C};Jv.prototype.zoomTo=function(o,A){if(this._startJulian=o,this._endJulian=A,this._timeBarSecondsSpan=fi.secondsDifference(A,o),this._clock&&this._clock.clockRange!==aC.UNBOUNDED){let m=this._clock.startTime,C=this._clock.stopTime,y=fi.secondsDifference(C,m),x=fi.secondsDifference(m,this._startJulian),v=fi.secondsDifference(C,this._endJulian);this._timeBarSecondsSpan>=y?(this._timeBarSecondsSpan=y,this._startJulian=this._clock.startTime,this._endJulian=this._clock.stopTime):x>0?(this._endJulian=fi.addSeconds(this._endJulian,x,new fi),this._startJulian=m,this._timeBarSecondsSpan=fi.secondsDifference(this._endJulian,this._startJulian)):v<0&&(this._startJulian=fi.addSeconds(this._startJulian,v,new fi),this._endJulian=C,this._timeBarSecondsSpan=fi.secondsDifference(this._endJulian,this._startJulian))}this._makeTics();let f=document.createEvent("Event");f.initEvent("setzoom",!0,!0),f.startJulian=this._startJulian,f.endJulian=this._endJulian,f.epochJulian=this._epochJulian,f.totalSpan=this._timeBarSecondsSpan,f.mainTicSpan=this._mainTicSpan,this._topDiv.dispatchEvent(f)};Jv.prototype.zoomFrom=function(o){let A=fi.secondsDifference(this._scrubJulian,this._startJulian);o>1||A<0||A>this._timeBarSecondsSpan?A=this._timeBarSecondsSpan*.5:A+=A-this._timeBarSecondsSpan*.5;let f=this._timeBarSecondsSpan-A;this.zoomTo(fi.addSeconds(this._startJulian,A-A*o,new fi),fi.addSeconds(this._endJulian,f*o-f,new fi))};Jv.prototype.makeLabel=function(o){let A=new Date(o);return`${A.getFullYear()} ${A.getMonth()+1} ${A.getDate()-1} ${A.getHours()}:${A.getMinutes()}:${A.getSeconds()}`};Jv.prototype.smallestTicInPixels=7;Jv.prototype._makeTics=function(){let o=this._timeBarEle,A=fi.secondsDifference(this._scrubJulian,this._startJulian),f=Math.round(A*this._topDiv.clientWidth/this._timeBarSecondsSpan),m=f-8,C,y=this;this._needleEle.style.left=`${f.toString()}px`;let x="",v=.01,E=31536e6,I=1e-10,w=0,Q=this._timeBarSecondsSpan;Q<v?(Q=v,this._timeBarSecondsSpan=v,this._endJulian=fi.addSeconds(this._startJulian,v,new fi)):Q>E&&(Q=E,this._timeBarSecondsSpan=E,this._endJulian=fi.addSeconds(this._startJulian,E,new fi));let M=this._timeBarEle.clientWidth;M<10&&(M=10);let B=this._startJulian,T=Math.min(Q/M*1e-5,.4),D,F=fi.toGregorianDate(B);Q>31536e4?D=fi.fromDate(new Date(Date.UTC(Math.floor(F.year/100)*100,0))):Q>31536e3?D=fi.fromDate(new Date(Date.UTC(Math.floor(F.year/10)*10,0))):Q>86400?D=fi.fromDate(new Date(Date.UTC(F.year,0))):D=fi.fromDate(new Date(Date.UTC(F.year,F.month,F.day)));let L=fi.secondsDifference(this._startJulian,fi.addSeconds(D,T,new fi)),R=L+Q;this._epochJulian=D;function k(Ie){return Math.floor(L/Ie)*Ie}function U(Ie,ve){return Math.ceil(Ie/ve+.5)*ve}function V(Ie){return(Ie-L)/Q}function H(Ie,ve){return Ie-ve*Math.round(Ie/ve)}this._rulerEle.innerHTML=this.makeLabel(fi.addSeconds(this._endJulian,-v,new fi));let q=this._rulerEle.offsetWidth+20;q<30&&(q=180);let ie=w;w-=I;let Z={startTime:L,startJulian:B,epochJulian:D,duration:Q,timeBarWidth:M,getAlpha:V};this._highlightRanges.forEach(function(Ie){x+=Ie.render(Z)});let oe=0,ne=0,se=0,ce=q/M;ce>1&&(ce=1),ce*=this._timeBarSecondsSpan;let j=-1,de=-1,me=IL.length,_e;for(_e=0;_e<me;++_e){let Ie=IL[_e];if(++j,oe=Ie,Ie>ce&&Ie>w)break;de<0&&M*(Ie/this._timeBarSecondsSpan)>=this.smallestTicInPixels&&(de=j)}if(j>0){for(;j>0;)if(--j,Math.abs(H(oe,IL[j]))<1e-5){IL[j]>=w&&(ne=IL[j]);break}if(de>=0)for(;de<j;){if(Math.abs(H(ne,IL[de]))<1e-5&&IL[de]>=w){se=IL[de];break}++de}}w=ie,w>I&&se<1e-5&&Math.abs(w-oe)>I&&(se=w,w<=oe+I&&(ne=0));let Be=-999999,Qe;if(M*(se/this._timeBarSecondsSpan)>=3)for(C=k(se);C<=R;C=U(C,se))x+=`<span class="cesium-timeline-ticTiny" style="left: ${Math.round(M*V(C)).toString()}px;"></span>`;if(M*(ne/this._timeBarSecondsSpan)>=3)for(C=k(ne);C<=R;C=U(C,ne))x+=`<span class="cesium-timeline-ticSub" style="left: ${Math.round(M*V(C)).toString()}px;"></span>`;if(M*(oe/this._timeBarSecondsSpan)>=2){this._mainTicSpan=oe,R+=oe,C=k(oe);let Ie=fi.computeTaiMinusUtc(D);for(;C<=R;){let ve=fi.addSeconds(B,C-L,new fi);if(oe>2.1){let Y=fi.computeTaiMinusUtc(ve);Math.abs(Y-Ie)>.1&&(C+=Y-Ie,ve=fi.addSeconds(B,C-L,new fi))}let K=Math.round(M*V(C)),W=this.makeLabel(ve);this._rulerEle.innerHTML=W,Qe=this._rulerEle.offsetWidth,Qe<10&&(Qe=q);let te=K-(Qe/2-1);te>Be?(Be=te+Qe+5,x+=`<span class="cesium-timeline-ticMain" style="left: ${K.toString()}px;"></span><span class="cesium-timeline-ticLabel" style="left: ${te.toString()}px;">${W}</span>`):x+=`<span class="cesium-timeline-ticSub" style="left: ${K.toString()}px;"></span>`,C=U(C,oe)}}else this._mainTicSpan=-1;x+=`<span class="cesium-timeline-icon16" style="left:${m}px;bottom:0;background-position: 0 0;"></span>`,o.innerHTML=x,this._scrubElement=o.lastChild,this._context.clearRect(0,0,this._trackListEle.width,this._trackListEle.height),Z.y=0,this._trackList.forEach(function(Ie){Ie.render(y._context,Z),Z.y+=Ie.height})};Jv.prototype.updateFromClock=function(){this._scrubJulian=this._clock.currentTime;let o=this._scrubElement;if(O(this._scrubElement)){let A=fi.secondsDifference(this._scrubJulian,this._startJulian),f=Math.round(A*this._topDiv.clientWidth/this._timeBarSecondsSpan);this._lastXPos!==f&&(this._lastXPos=f,o.style.left=`${f-8}px`,this._needleEle.style.left=`${f}px`)}O(this._timelineDragLocation)&&(this._setTimeBarTime(this._timelineDragLocation,this._timelineDragLocation*this._timeBarSecondsSpan/this._topDiv.clientWidth),this.zoomTo(fi.addSeconds(this._startJulian,this._timelineDrag,new fi),fi.addSeconds(this._endJulian,this._timelineDrag,new fi)))};Jv.prototype._setTimeBarTime=function(o,A){if(o=Math.round(o),this._scrubJulian=fi.addSeconds(this._startJulian,A,new fi),this._scrubElement){let m=o-8;this._scrubElement.style.left=`${m.toString()}px`,this._needleEle.style.left=`${o.toString()}px`}let f=document.createEvent("Event");f.initEvent("settime",!0,!0),f.clientX=o,f.timeSeconds=A,f.timeJulian=this._scrubJulian,f.clock=this._clock,this._topDiv.dispatchEvent(f)};function z_i(o){return function(A){o._mouseMode!==F1.touchOnly&&(A.button===0?(o._mouseMode=F1.scrub,o._scrubElement&&(o._scrubElement.style.backgroundPosition="-16px 0"),o._onMouseMove(A)):(o._mouseX=A.clientX,A.button===2?o._mouseMode=F1.zoom:o._mouseMode=F1.slide)),A.preventDefault()}}function K_i(o){return function(A){o._mouseMode=F1.none,o._scrubElement&&(o._scrubElement.style.backgroundPosition="0 0"),o._timelineDrag=0,o._timelineDragLocation=void 0}}function Y_i(o){return function(A){let f;if(o._mouseMode===F1.scrub){A.preventDefault();let m=A.clientX-o._topDiv.getBoundingClientRect().left;m<0?(o._timelineDragLocation=0,o._timelineDrag=-.01*o._timeBarSecondsSpan):m>o._topDiv.clientWidth?(o._timelineDragLocation=o._topDiv.clientWidth,o._timelineDrag=.01*o._timeBarSecondsSpan):(o._timelineDragLocation=void 0,o._setTimeBarTime(m,m*o._timeBarSecondsSpan/o._topDiv.clientWidth))}else if(o._mouseMode===F1.slide){if(f=o._mouseX-A.clientX,o._mouseX=A.clientX,f!==0){let m=f*o._timeBarSecondsSpan/o._topDiv.clientWidth;o.zoomTo(fi.addSeconds(o._startJulian,m,new fi),fi.addSeconds(o._endJulian,m,new fi))}}else o._mouseMode===F1.zoom&&(f=o._mouseX-A.clientX,o._mouseX=A.clientX,f!==0&&o.zoomFrom(Math.pow(1.01,f)))}}function J_i(o){return function(A){let f=A.wheelDeltaY||A.wheelDelta||-A.detail;Oge=Math.max(Math.min(Math.abs(f),Oge),1),f/=Oge,o.zoomFrom(Math.pow(1.05,-f))}}function W_i(o){return function(A){let f=A.touches.length,m,C,y=o._topDiv.getBoundingClientRect().left;A.preventDefault(),o._mouseMode=F1.touchOnly,f===1?(m=fi.secondsDifference(o._scrubJulian,o._startJulian),C=Math.round(m*o._topDiv.clientWidth/o._timeBarSecondsSpan+y),Math.abs(A.touches[0].clientX-C)<50?(o._touchMode=_v.scrub,o._scrubElement&&(o._scrubElement.style.backgroundPosition=f===1?"-16px 0":"0 0")):(o._touchMode=_v.singleTap,o._touchState.centerX=A.touches[0].clientX-y)):f===2?(o._touchMode=_v.slideZoom,o._touchState.centerX=(A.touches[0].clientX+A.touches[1].clientX)*.5-y,o._touchState.spanX=Math.abs(A.touches[0].clientX-A.touches[1].clientX)):o._touchMode=_v.ignore}}function j_i(o){return function(A){let f=A.touches.length,m=o._topDiv.getBoundingClientRect().left;o._touchMode===_v.singleTap?(o._touchMode=_v.scrub,o._onTouchMove(A)):o._touchMode===_v.scrub&&o._onTouchMove(A),o._mouseMode=F1.touchOnly,f!==1?o._touchMode=f>0?_v.ignore:_v.none:o._touchMode===_v.slideZoom&&(o._touchState.centerX=A.touches[0].clientX-m),o._scrubElement&&(o._scrubElement.style.backgroundPosition="0 0")}}function q_i(o){return function(A){let f,m,C,y,x,v,E=1,I=o._topDiv.getBoundingClientRect().left;o._touchMode===_v.singleTap&&(o._touchMode=_v.slideZoom),o._mouseMode=F1.touchOnly,o._touchMode===_v.scrub?(A.preventDefault(),A.changedTouches.length===1&&(m=A.changedTouches[0].clientX-I,m>=0&&m<=o._topDiv.clientWidth&&o._setTimeBarTime(m,m*o._timeBarSecondsSpan/o._topDiv.clientWidth))):o._touchMode===_v.slideZoom&&(C=A.touches.length,C===2?(y=(A.touches[0].clientX+A.touches[1].clientX)*.5-I,x=Math.abs(A.touches[0].clientX-A.touches[1].clientX)):C===1&&(y=A.touches[0].clientX-I,x=0),O(y)&&(x>0&&o._touchState.spanX>0?(E=o._touchState.spanX/x,v=fi.addSeconds(o._startJulian,(o._touchState.centerX*o._timeBarSecondsSpan-y*o._timeBarSecondsSpan*E)/o._topDiv.clientWidth,new fi)):(f=o._touchState.centerX-y,v=fi.addSeconds(o._startJulian,f*o._timeBarSecondsSpan/o._topDiv.clientWidth,new fi)),o.zoomTo(v,fi.addSeconds(v,o._timeBarSecondsSpan*E,new fi)),o._touchState.centerX=y,o._touchState.spanX=x))}}Jv.prototype.resize=function(){let o=this.container.clientWidth,A=this.container.clientHeight;if(o===this._lastWidth&&A===this._lastHeight)return;this._trackContainer.style.height=`${A}px`;let f=1;this._trackList.forEach(function(m){f+=m.height}),this._trackListEle.style.height=`${f.toString()}px`,this._trackListEle.width=this._trackListEle.clientWidth,this._trackListEle.height=f,this._makeTics(),this._lastXPos=void 0,this._lastWidth=o,this._lastHeight=A};var WQe=Jv,X_i=xh(aBt(),1);function Z_i(o){let A=!1,f=window.screen;return O(f)&&(O(f.lockOrientation)?A=f.lockOrientation(o):O(f.mozLockOrientation)?A=f.mozLockOrientation(o):O(f.msLockOrientation)?A=f.msLockOrientation(o):O(f.orientation&&f.orientation.lock)&&(A=f.orientation.lock(o))),A}function xot(){let o=window.screen;O(o)&&(O(o.unlockOrientation)?o.unlockOrientation():O(o.mozUnlockOrientation)?o.mozUnlockOrientation():O(o.msUnlockOrientation)?o.msUnlockOrientation():O(o.orientation&&o.orientation.unlock)&&o.orientation.unlock())}function $_i(o,A,f,m){m()||(f()?(A.useWebVR=!1,o._locked&&(xot(),o._locked=!1),o._noSleep.disable(),yp.exitFullscreen(),f(!1)):(yp.fullscreen||yp.requestFullscreen(o._vrElement),o._noSleep.enable(),o._locked||(o._locked=Z_i("landscape")),A.useWebVR=!0,f(!0)))}function joe(o,A){let f=this,m=gr.observable(yp.enabled),C=gr.observable(!1);this.isVRMode=void 0,gr.defineProperty(this,"isVRMode",{get:function(){return C()}}),this.isVREnabled=void 0,gr.defineProperty(this,"isVREnabled",{get:function(){return m()},set:function(x){m(x&&yp.enabled)}}),this.tooltip=void 0,gr.defineProperty(this,"tooltip",function(){return m()?C()?"Exit VR mode":"Enter VR mode":"VR mode is unavailable"});let y=gr.observable(!1);this._isOrthographic=void 0,gr.defineProperty(this,"_isOrthographic",{get:function(){return y()}}),this._eventHelper=new Mx,this._eventHelper.add(o.preRender,function(){y(o.camera.frustum instanceof Ss)}),this._locked=!1,this._noSleep=new X_i.default,this._command=Hl(function(){$_i(f,o,C,y)},gr.getObservable(this,"isVREnabled")),this._vrElement=Ae(iA(A),document.body),this._callback=function(){!yp.fullscreen&&C()&&(o.useWebVR=!1,f._locked&&(xot(),f._locked=!1),f._noSleep.disable(),C(!1))},document.addEventListener(yp.changeEventName,this._callback)}Object.defineProperties(joe.prototype,{vrElement:{get:function(){return this._vrElement},set:function(o){this._vrElement=o}},command:{get:function(){return this._command}}});joe.prototype.isDestroyed=function(){return!1};joe.prototype.destroy=function(){this._eventHelper.removeAll(),document.removeEventListener(yp.changeEventName,this._callback),Qr(this)};var jQe=joe,eBi="M 5.3125 6.375 C 4.008126 6.375 2.96875 7.4141499 2.96875 8.71875 L 2.96875 19.5 C 2.96875 20.8043 4.008126 21.875 5.3125 21.875 L 13.65625 21.875 C 13.71832 20.0547 14.845166 18.59375 16.21875 18.59375 C 17.592088 18.59375 18.71881 20.0552 18.78125 21.875 L 27.09375 21.875 C 28.398125 21.875 29.4375 20.8043 29.4375 19.5 L 29.4375 8.71875 C 29.4375 7.4141499 28.398125 6.375 27.09375 6.375 L 5.3125 6.375 z M 9.625 10.4375 C 11.55989 10.4375 13.125 12.03385 13.125 13.96875 C 13.125 15.90365 11.55989 17.46875 9.625 17.46875 C 7.69011 17.46875 6.125 15.90365 6.125 13.96875 C 6.125 12.03385 7.69011 10.4375 9.625 10.4375 z M 22.46875 10.4375 C 24.40364 10.4375 25.96875 12.03385 25.96875 13.96875 C 25.96875 15.90365 24.40364 17.46875 22.46875 17.46875 C 20.53386 17.46875 18.96875 15.90365 18.96875 13.96875 C 18.96875 12.03385 20.53386 10.4375 22.46875 10.4375 z",tBi="M 25.770585,2.4552065 C 15.72282,13.962707 10.699956,19.704407 8.1768352,22.580207 c -1.261561,1.4379 -1.902282,2.1427 -2.21875,2.5 -0.141624,0.1599 -0.208984,0.2355 -0.25,0.2813 l 0.6875,0.75 c 10e-5,-10e-5 0.679191,0.727 0.6875,0.7187 0.01662,-0.016 0.02451,-0.024 0.03125,-0.031 0.01348,-0.014 0.04013,-0.038 0.0625,-0.062 0.04474,-0.05 0.120921,-0.1315 0.28125,-0.3126 0.320657,-0.3619 0.956139,-1.0921 2.2187499,-2.5312 2.5252219,-2.8781 7.5454589,-8.6169 17.5937499,-20.1250005 l -1.5,-1.3125 z m -20.5624998,3.9063 c -1.304375,0 -2.34375,1.0391 -2.34375,2.3437 l 0,10.8125005 c 0,1.3043 1.039375,2.375 2.34375,2.375 l 2.25,0 c 1.9518039,-2.2246 7.4710958,-8.5584 13.5624998,-15.5312005 l -15.8124998,0 z m 21.1249998,0 c -1.855467,2.1245 -2.114296,2.4005 -3.59375,4.0936995 1.767282,0.1815 3.15625,1.685301 3.15625,3.500001 0,1.9349 -1.56511,3.5 -3.5,3.5 -1.658043,0 -3.043426,-1.1411 -3.40625,-2.6875 -1.089617,1.2461 -2.647139,2.9988 -3.46875,3.9375 0.191501,-0.062 0.388502,-0.094 0.59375,-0.094 1.373338,0 2.50006,1.4614 2.5625,3.2812 l 8.3125,0 c 1.304375,0 2.34375,-1.0707 2.34375,-2.375 l 0,-10.8125005 c 0,-1.3046 -1.039375,-2.3437 -2.34375,-2.3437 l -0.65625,0 z M 9.5518351,10.423906 c 1.9348899,0 3.4999999,1.596401 3.4999999,3.531301 0,1.9349 -1.56511,3.5 -3.4999999,3.5 -1.9348899,0 -3.4999999,-1.5651 -3.4999999,-3.5 0,-1.9349 1.56511,-3.531301 3.4999999,-3.531301 z m 4.2187499,10.312601 c -0.206517,0.2356 -0.844218,0.9428 -1.03125,1.1562 l 0.8125,0 c 0.01392,-0.4081 0.107026,-0.7968 0.21875,-1.1562 z";function qoe(o,A,f){o=iA(o);let m=new jQe(A,f);m._exitVRPath=tBi,m._enterVRPath=eBi;let C=document.createElement("button");C.type="button",C.className="cesium-button cesium-vrButton",C.setAttribute("data-bind",'css: { "cesium-button-disabled" : _isOrthographic }, attr: { title: tooltip },click: command,enable: isVREnabled,cesiumSvgPath: { path: isVRMode ? _exitVRPath : _enterVRPath, width: 32, height: 32 }'),o.appendChild(C),gr.applyBindings(m,C),this._container=o,this._viewModel=m,this._element=C}Object.defineProperties(qoe.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});qoe.prototype.isDestroyed=function(){return!1};qoe.prototype.destroy=function(){return this._viewModel.destroy(),gr.cleanNode(this._element),this._container.removeChild(this._element),Qr(this)};var qQe=qoe,tF=new wi;function vot(o){let A=o.clock;A.currentTime=o.timeJulian,A.shouldAnimate=!1}function iBi(o){let A=o.getPropertyIds(),f="";return A.forEach(function(m){let C=o.getProperty(m);O(C)&&(f+=`<tr><th>${m}</th><td>${C}</td></tr>`)}),f.length>0&&(f=`<table class="cesium-infoBox-defaultTable"><tbody>${f}</tbody></table>`),f}function rBi(o){let A,f=[],m=o.getPropertyIds();for(A=0;A<m.length;A++){let y=m[A];/^name$/i.test(y)?f[0]=o.getProperty(y):/name/i.test(y)?f[1]=o.getProperty(y):/^title$/i.test(y)?f[2]=o.getProperty(y):/^(id|identifier)$/i.test(y)?f[3]=o.getProperty(y):/element/i.test(y)?f[4]=o.getProperty(y):/(id|identifier)$/i.test(y)&&(f[5]=o.getProperty(y))}let C=f.length;for(A=0;A<C;A++){let y=f[A];if(O(y)&&y!=="")return y}return"Unnamed Feature"}function eze(o,A){let f=o.scene.pick(A.position);if(O(f)){let m=Ae(f.id,f.primitive.id);if(m instanceof kA)return m;if(f instanceof Ds)return new kA({name:rBi(f),description:iBi(f),feature:f})}if(O(o.scene.globe))return aBi(o,A.position)}var nBi=new fi;function Eot(o,A,f){if(O(f)){let m=f.clock;if(O(m)&&(m.getValue(A),O(o))){let C=m.startTime,y=m.stopTime;fi.equals(C,y)&&(y=fi.addSeconds(C,je.EPSILON2,nBi)),o.updateFromClock(),o.zoomTo(C,y)}}}var oBi=new ee;function aBi(o,A){let f=o.scene,m=f.camera.getPickRay(A),C=f.imageryLayers.pickImageryLayerFeatures(m,f);if(!O(C))return;let y=new kA({id:"Loading...",description:"Loading feature information..."});return C.then(function(x){if(o.selectedEntity!==y)return;if(!O(x)||x.length===0){o.selectedEntity=tze();return}let v=x[0],E=new kA({id:v.name,description:v.description});if(O(v.position)){let I=o.scene.globe.ellipsoid.cartographicToCartesian(v.position,oBi);E.position=new _D(I)}o.selectedEntity=E},function(){o.selectedEntity===y&&(o.selectedEntity=tze())}),y}function tze(){return new kA({id:"None",description:"No features found."})}function sBi(o,A){let f=o._geocoder,m=o._homeButton,C=o._sceneModePicker,y=o._projectionPicker,x=o._baseLayerPicker,v=o._animation,E=o._timeline,I=o._fullscreenButton,w=o._infoBox,Q=o._selectionIndicator,M=A?"hidden":"visible";if(O(f)&&(f.container.style.visibility=M),O(m)&&(m.container.style.visibility=M),O(C)&&(C.container.style.visibility=M),O(y)&&(y.container.style.visibility=M),O(x)&&(x.container.style.visibility=M),O(v)&&(v.container.style.visibility=M),O(E)&&(E.container.style.visibility=M),O(I)&&I.viewModel.isFullscreenEnabled&&(I.container.style.visibility=M),O(w)&&(w.container.style.visibility=M),O(Q)&&(Q.container.style.visibility=M),o._container){let B=A||!O(I)?0:I.container.clientWidth;o._vrButton.container.style.right=`${B}px`,o.forceResize()}}function ku(o,A){o=iA(o),A=Ae(A,Ae.EMPTY_OBJECT);let f=(!O(A.globe)||A.globe!==!1)&&(!O(A.baseLayerPicker)||A.baseLayerPicker!==!1),m=this,C=document.createElement("div");C.className="cesium-viewer",o.appendChild(C);let y=document.createElement("div");y.className="cesium-viewer-cesiumWidgetContainer",C.appendChild(y);let x=document.createElement("div");x.className="cesium-viewer-bottom",C.appendChild(x);let v=Ae(A.scene3DOnly,!1),E,I,w=!1;O(A.clockViewModel)?(I=A.clockViewModel,E=I.clock):(E=new z5,I=new _Qe(E),w=!0),O(A.shouldAnimate)&&(E.shouldAnimate=A.shouldAnimate);let Q=new JJ(y,{imageryProvider:f||O(A.imageryProvider)?!1:void 0,clock:E,skyBox:A.skyBox,skyAtmosphere:A.skyAtmosphere,sceneMode:A.sceneMode,mapProjection:A.mapProjection,globe:A.globe,orderIndependentTranslucency:A.orderIndependentTranslucency,contextOptions:A.contextOptions,useDefaultRenderLoop:A.useDefaultRenderLoop,targetFrameRate:A.targetFrameRate,showRenderLoopErrors:A.showRenderLoopErrors,useBrowserRecommendedResolution:A.useBrowserRecommendedResolution,creditContainer:O(A.creditContainer)?A.creditContainer:x,creditViewport:A.creditViewport,scene3DOnly:v,shadows:A.shadows,terrainShadows:A.terrainShadows,mapMode2D:A.mapMode2D,blurActiveElementOnCanvasFocus:A.blurActiveElementOnCanvasFocus,requestRenderMode:A.requestRenderMode,maximumRenderTimeChange:A.maximumRenderTimeChange,depthPlaneEllipsoidOffset:A.depthPlaneEllipsoidOffset,msaaSamples:A.msaaSamples}),M=A.dataSources,B=!1;O(M)||(M=new ZEe,B=!0);let T=Q.scene,D=new EJ({scene:T,dataSourceCollection:M}),F=new Mx;F.add(E.onTick,ku.prototype._onTick,this),F.add(T.morphStart,ku.prototype._clearTrackedObject,this);let L;if(!O(A.selectionIndicator)||A.selectionIndicator!==!1){let K=document.createElement("div");K.className="cesium-viewer-selectionIndicatorContainer",C.appendChild(K),L=new KQe(K,T)}let R;if(!O(A.infoBox)||A.infoBox!==!1){let K=document.createElement("div");K.className="cesium-viewer-infoBoxContainer",C.appendChild(K),R=new NQe(K);let W=R.viewModel;F.add(W.cameraClicked,ku.prototype._onInfoBoxCameraClicked,this),F.add(W.closeClicked,ku.prototype._onInfoBoxClockClicked,this)}let k=document.createElement("div");k.className="cesium-viewer-toolbar",C.appendChild(k);let U;if(!O(A.geocoder)||A.geocoder!==!1){let K=document.createElement("div");K.className="cesium-viewer-geocoderContainer",k.appendChild(K);let W;O(A.geocoder)&&typeof A.geocoder!="boolean"&&(W=Array.isArray(A.geocoder)?A.geocoder:[A.geocoder]),U=new MQe({container:K,geocoderServices:W,scene:T}),F.add(U.viewModel.search.beforeExecute,ku.prototype._clearObjects,this)}let V;(!O(A.homeButton)||A.homeButton!==!1)&&(V=new RQe(k,T),O(U)&&F.add(V.viewModel.command.afterExecute,function(){let K=U.viewModel;K.searchText="",K.isSearchInProgress&&K.search()}),F.add(V.viewModel.command.beforeExecute,ku.prototype._clearTrackedObject,this));let H;!v&&(!O(A.sceneModePicker)||A.sceneModePicker!==!1)&&(H=new VQe(k,T));let q;A.projectionPicker&&(q=new GQe(k,T));let ie,Z;if(f){let K=Ae(A.imageryProviderViewModels,Bwe()),W=Ae(A.terrainProviderViewModels,Qwe());ie=new pwe(k,{globe:T.globe,imageryProviderViewModels:K,selectedImageryProviderViewModel:A.selectedImageryProviderViewModel,terrainProviderViewModels:W,selectedTerrainProviderViewModel:A.selectedTerrainProviderViewModel}),Z=k.getElementsByClassName("cesium-baseLayerPicker-dropDown")[0]}O(A.imageryProvider)&&A.imageryProvider!==!1&&(f&&(ie.viewModel.selectedImagery=void 0),T.imageryLayers.removeAll(),T.imageryLayers.addImageryProvider(A.imageryProvider)),O(A.terrainProvider)&&(f&&(ie.viewModel.selectedTerrain=void 0),T.terrainProvider=A.terrainProvider);let oe;if(!O(A.navigationHelpButton)||A.navigationHelpButton!==!1){let K=!0;try{if(O(window.localStorage)){let W=window.localStorage.getItem("cesium-hasSeenNavHelp");O(W)&&Boolean(W)?K=!1:window.localStorage.setItem("cesium-hasSeenNavHelp","true")}}catch{}oe=new OQe({container:k,instructionsInitiallyVisible:Ae(A.navigationInstructionsInitiallyVisible,K)})}let ne;if(!O(A.animation)||A.animation!==!1){let K=document.createElement("div");K.className="cesium-viewer-animationContainer",C.appendChild(K),ne=new dwe(K,new fwe(I))}let se;if(!O(A.timeline)||A.timeline!==!1){let K=document.createElement("div");K.className="cesium-viewer-timelineContainer",C.appendChild(K),se=new WQe(K,E),se.addEventListener("settime",vot,!1),se.zoomTo(E.startTime,E.stopTime)}let ce,j,de;(!O(A.fullscreenButton)||A.fullscreenButton!==!1)&&(de=document.createElement("div"),de.className="cesium-viewer-fullscreenContainer",C.appendChild(de),ce=new wQe(de,A.fullscreenElement),j=WE(ce.viewModel,"isFullscreenEnabled",function(K){de.style.display=K?"block":"none",O(se)&&(se.container.style.right=`${de.clientWidth}px`,se.resize())}));let me,_e,Be;if(A.vrButton){let K=document.createElement("div");K.className="cesium-viewer-vrContainer",C.appendChild(K),me=new qQe(K,T,A.fullScreenElement),_e=WE(me.viewModel,"isVREnabled",function(W){K.style.display=W?"block":"none",O(ce)&&(K.style.right=`${de.clientWidth}px`),O(se)&&(se.container.style.right=`${K.clientWidth}px`,se.resize())}),Be=WE(me.viewModel,"isVRMode",function(W){sBi(m,W)})}this._baseLayerPickerDropDown=Z,this._fullscreenSubscription=j,this._vrSubscription=_e,this._vrModeSubscription=Be,this._dataSourceChangedListeners={},this._automaticallyTrackDataSourceClocks=Ae(A.automaticallyTrackDataSourceClocks,!0),this._container=o,this._bottomContainer=x,this._element=C,this._cesiumWidget=Q,this._selectionIndicator=L,this._infoBox=R,this._dataSourceCollection=M,this._destroyDataSourceCollection=B,this._dataSourceDisplay=D,this._clockViewModel=I,this._destroyClockViewModel=w,this._toolbar=k,this._homeButton=V,this._sceneModePicker=H,this._projectionPicker=q,this._baseLayerPicker=ie,this._navigationHelpButton=oe,this._animation=ne,this._timeline=se,this._fullscreenButton=ce,this._vrButton=me,this._geocoder=U,this._eventHelper=F,this._lastWidth=0,this._lastHeight=0,this._allowDataSourcesToSuspendAnimation=!0,this._entityView=void 0,this._enableInfoOrSelection=O(R)||O(L),this._clockTrackedDataSource=void 0,this._trackedEntity=void 0,this._needTrackedEntityUpdate=!1,this._selectedEntity=void 0,this._zoomIsFlight=!1,this._zoomTarget=void 0,this._zoomPromise=void 0,this._zoomOptions=void 0,this._selectedEntityChanged=new br,this._trackedEntityChanged=new br,gr.track(this,["_trackedEntity","_selectedEntity","_clockTrackedDataSource"]),F.add(M.dataSourceAdded,ku.prototype._onDataSourceAdded,this),F.add(M.dataSourceRemoved,ku.prototype._onDataSourceRemoved,this),F.add(T.postUpdate,ku.prototype.resize,this),F.add(T.postRender,ku.prototype._postRender,this);let Qe=M.length;for(let K=0;K<Qe;K++)this._dataSourceAdded(M,M.get(K));this._dataSourceAdded(void 0,D.defaultDataSource),F.add(M.dataSourceAdded,ku.prototype._dataSourceAdded,this),F.add(M.dataSourceRemoved,ku.prototype._dataSourceRemoved,this);function Ie(K){let W=eze(m,K);O(W)?Nt.getValueOrUndefined(W.position,m.clock.currentTime)?m.trackedEntity=W:m.zoomTo(W):O(m.trackedEntity)&&(m.trackedEntity=void 0)}function ve(K){m.selectedEntity=eze(m,K)}Q.screenSpaceEventHandler.setInputAction(ve,Ki.LEFT_CLICK),Q.screenSpaceEventHandler.setInputAction(Ie,Ki.LEFT_DOUBLE_CLICK)}Object.defineProperties(ku.prototype,{container:{get:function(){return this._container}},bottomContainer:{get:function(){return this._bottomContainer}},cesiumWidget:{get:function(){return this._cesiumWidget}},selectionIndicator:{get:function(){return this._selectionIndicator}},infoBox:{get:function(){return this._infoBox}},geocoder:{get:function(){return this._geocoder}},homeButton:{get:function(){return this._homeButton}},sceneModePicker:{get:function(){return this._sceneModePicker}},projectionPicker:{get:function(){return this._projectionPicker}},baseLayerPicker:{get:function(){return this._baseLayerPicker}},navigationHelpButton:{get:function(){return this._navigationHelpButton}},animation:{get:function(){return this._animation}},timeline:{get:function(){return this._timeline}},fullscreenButton:{get:function(){return this._fullscreenButton}},vrButton:{get:function(){return this._vrButton}},dataSourceDisplay:{get:function(){return this._dataSourceDisplay}},entities:{get:function(){return this._dataSourceDisplay.defaultDataSource.entities}},dataSources:{get:function(){return this._dataSourceCollection}},canvas:{get:function(){return this._cesiumWidget.canvas}},scene:{get:function(){return this._cesiumWidget.scene}},shadows:{get:function(){return this.scene.shadowMap.enabled},set:function(o){this.scene.shadowMap.enabled=o}},terrainShadows:{get:function(){return this.scene.globe.shadows},set:function(o){this.scene.globe.shadows=o}},shadowMap:{get:function(){return this.scene.shadowMap}},imageryLayers:{get:function(){return this.scene.imageryLayers}},terrainProvider:{get:function(){return this.scene.terrainProvider},set:function(o){this.scene.terrainProvider=o}},camera:{get:function(){return this.scene.camera}},postProcessStages:{get:function(){return this.scene.postProcessStages}},clock:{get:function(){return this._clockViewModel.clock}},clockViewModel:{get:function(){return this._clockViewModel}},screenSpaceEventHandler:{get:function(){return this._cesiumWidget.screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._cesiumWidget.targetFrameRate},set:function(o){this._cesiumWidget.targetFrameRate=o}},useDefaultRenderLoop:{get:function(){return this._cesiumWidget.useDefaultRenderLoop},set:function(o){this._cesiumWidget.useDefaultRenderLoop=o}},resolutionScale:{get:function(){return this._cesiumWidget.resolutionScale},set:function(o){this._cesiumWidget.resolutionScale=o}},useBrowserRecommendedResolution:{get:function(){return this._cesiumWidget.useBrowserRecommendedResolution},set:function(o){this._cesiumWidget.useBrowserRecommendedResolution=o}},allowDataSourcesToSuspendAnimation:{get:function(){return this._allowDataSourcesToSuspendAnimation},set:function(o){this._allowDataSourcesToSuspendAnimation=o}},trackedEntity:{get:function(){return this._trackedEntity},set:function(o){if(this._trackedEntity!==o){this._trackedEntity=o,tie(this);let A=this.scene,f=A.mode;!O(o)||!O(o.position)?(this._needTrackedEntityUpdate=!1,(f===xi.COLUMBUS_VIEW||f===xi.SCENE2D)&&(A.screenSpaceCameraController.enableTranslate=!0),(f===xi.COLUMBUS_VIEW||f===xi.SCENE3D)&&(A.screenSpaceCameraController.enableTilt=!0),this._entityView=void 0,this.camera.lookAtTransform(Xe.IDENTITY)):this._needTrackedEntityUpdate=!0,this._trackedEntityChanged.raiseEvent(o),this.scene.requestRender()}}},selectedEntity:{get:function(){return this._selectedEntity},set:function(o){if(this._selectedEntity!==o){this._selectedEntity=o;let A=O(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;O(o)?O(A)&&A.animateAppear():O(A)&&A.animateDepart(),this._selectedEntityChanged.raiseEvent(o)}}},selectedEntityChanged:{get:function(){return this._selectedEntityChanged}},trackedEntityChanged:{get:function(){return this._trackedEntityChanged}},clockTrackedDataSource:{get:function(){return this._clockTrackedDataSource},set:function(o){this._clockTrackedDataSource!==o&&(this._clockTrackedDataSource=o,Eot(this._timeline,this.clock,o))}}});ku.prototype.extend=function(o,A){o(this,A)};ku.prototype.resize=function(){let o=this._cesiumWidget,A=this._container,f=A.clientWidth,m=A.clientHeight,C=O(this._animation),y=O(this._timeline);if(o.resize(),f===this._lastWidth&&m===this._lastHeight)return;let x=m-125,v=this._baseLayerPickerDropDown;if(O(v)&&(v.style.maxHeight=`${x}px`),O(this._geocoder)){let B=this._geocoder.searchSuggestionsContainer;B.style.maxHeight=`${x}px`}O(this._infoBox)&&(this._infoBox.viewModel.maxHeight=x);let E=this._timeline,I,w=0,Q=0,M=0;if(C&&window.getComputedStyle(this._animation.container).visibility!=="hidden"){let B=this._lastWidth;I=this._animation.container,f>900?(w=169,B<=900&&(I.style.width="169px",I.style.height="112px",this._animation.resize())):f>=600?(w=136,(B<600||B>900)&&(I.style.width="136px",I.style.height="90px",this._animation.resize())):(w=106,(B>600||B===0)&&(I.style.width="106px",I.style.height="70px",this._animation.resize())),Q=w+5}if(y&&window.getComputedStyle(this._timeline.container).visibility!=="hidden"){let B=this._fullscreenButton,T=this._vrButton,D=E.container,F=D.style;M=D.clientHeight+3,F.left=`${w}px`;let L=0;O(B)&&(L+=B.container.clientWidth),O(T)&&(L+=T.container.clientWidth),F.right=`${L}px`,E.resize()}this._bottomContainer.style.left=`${Q}px`,this._bottomContainer.style.bottom=`${M}px`,this._lastWidth=f,this._lastHeight=m};ku.prototype.forceResize=function(){this._lastWidth=0,this.resize()};ku.prototype.render=function(){this._cesiumWidget.render()};ku.prototype.isDestroyed=function(){return!1};ku.prototype.destroy=function(){let o;this.screenSpaceEventHandler.removeInputAction(Ki.LEFT_CLICK),this.screenSpaceEventHandler.removeInputAction(Ki.LEFT_DOUBLE_CLICK);let A=this.dataSources,f=A.length;for(o=0;o<f;o++)this._dataSourceRemoved(A,A.get(o));return this._dataSourceRemoved(void 0,this._dataSourceDisplay.defaultDataSource),this._container.removeChild(this._element),this._element.removeChild(this._toolbar),this._eventHelper.removeAll(),O(this._geocoder)&&(this._geocoder=this._geocoder.destroy()),O(this._homeButton)&&(this._homeButton=this._homeButton.destroy()),O(this._sceneModePicker)&&(this._sceneModePicker=this._sceneModePicker.destroy()),O(this._projectionPicker)&&(this._projectionPicker=this._projectionPicker.destroy()),O(this._baseLayerPicker)&&(this._baseLayerPicker=this._baseLayerPicker.destroy()),O(this._animation)&&(this._element.removeChild(this._animation.container),this._animation=this._animation.destroy()),O(this._timeline)&&(this._timeline.removeEventListener("settime",vot,!1),this._element.removeChild(this._timeline.container),this._timeline=this._timeline.destroy()),O(this._fullscreenButton)&&(this._fullscreenSubscription.dispose(),this._element.removeChild(this._fullscreenButton.container),this._fullscreenButton=this._fullscreenButton.destroy()),O(this._vrButton)&&(this._vrSubscription.dispose(),this._vrModeSubscription.dispose(),this._element.removeChild(this._vrButton.container),this._vrButton=this._vrButton.destroy()),O(this._infoBox)&&(this._element.removeChild(this._infoBox.container),this._infoBox=this._infoBox.destroy()),O(this._selectionIndicator)&&(this._element.removeChild(this._selectionIndicator.container),this._selectionIndicator=this._selectionIndicator.destroy()),this._destroyClockViewModel&&(this._clockViewModel=this._clockViewModel.destroy()),this._dataSourceDisplay=this._dataSourceDisplay.destroy(),this._cesiumWidget=this._cesiumWidget.destroy(),this._destroyDataSourceCollection&&(this._dataSourceCollection=this._dataSourceCollection.destroy()),Qr(this)};ku.prototype._dataSourceAdded=function(o,A){A.entities.collectionChanged.addEventListener(ku.prototype._onEntityCollectionChanged,this)};ku.prototype._dataSourceRemoved=function(o,A){let f=A.entities;f.collectionChanged.removeEventListener(ku.prototype._onEntityCollectionChanged,this),O(this.trackedEntity)&&f.getById(this.trackedEntity.id)===this.trackedEntity&&(this.trackedEntity=void 0),O(this.selectedEntity)&&f.getById(this.selectedEntity.id)===this.selectedEntity&&(this.selectedEntity=void 0)};ku.prototype._onTick=function(o){let A=o.currentTime,f=this._dataSourceDisplay.update(A);this._allowDataSourcesToSuspendAnimation&&(this._clockViewModel.canAnimate=f);let m=this._entityView;if(O(m)){let B=this._trackedEntity;this._dataSourceDisplay.getBoundingSphere(B,!1,tF)===ro.DONE&&m.update(A,tF)}let C,y=!1,x=this.selectedEntity,v=O(x)&&this._enableInfoOrSelection;v&&x.isShowing&&x.isAvailable(A)&&(this._dataSourceDisplay.getBoundingSphere(x,!0,tF)!==ro.FAILED?C=tF.center:O(x.position)&&(C=x.position.getValue(A,C)),y=O(C));let E=this.imageryLayers,I,w;for(w=0;w<E.length;w++)I=E.get(w),I&&I._availability&&(I.show=I.isAvailable(A));let Q=O(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;O(Q)&&(Q.position=ee.clone(C,Q.position),Q.showSelection=v&&y,Q.update());let M=O(this._infoBox)?this._infoBox.viewModel:void 0;O(M)&&(M.showInfo=v,M.enableCamera=y,M.isCameraTracking=this.trackedEntity===this.selectedEntity,v?(M.titleText=Ae(x.name,x.id),M.description=Nt.getValueOrDefault(x.description,A,"")):(M.titleText="",M.description=""))};ku.prototype._onEntityCollectionChanged=function(o,A,f){let m=f.length;for(let C=0;C<m;C++){let y=f[C];this.trackedEntity===y&&(this.trackedEntity=void 0),this.selectedEntity===y&&(this.selectedEntity=void 0)}};ku.prototype._onInfoBoxCameraClicked=function(o){if(o.isCameraTracking&&this.trackedEntity===this.selectedEntity)this.trackedEntity=void 0;else{let A=this.selectedEntity.position;O(A)?this.trackedEntity=this.selectedEntity:this.zoomTo(this.selectedEntity)}};ku.prototype._clearTrackedObject=function(){this.trackedEntity=void 0};ku.prototype._onInfoBoxClockClicked=function(o){this.selectedEntity=void 0};ku.prototype._clearObjects=function(){this.trackedEntity=void 0,this.selectedEntity=void 0};ku.prototype._onDataSourceChanged=function(o){this.clockTrackedDataSource===o&&Eot(this.timeline,this.clock,o)};ku.prototype._onDataSourceAdded=function(o,A){this._automaticallyTrackDataSourceClocks&&(this.clockTrackedDataSource=A);let f=A.entities.id,m=this._eventHelper.add(A.changedEvent,ku.prototype._onDataSourceChanged,this);this._dataSourceChangedListeners[f]=m};ku.prototype._onDataSourceRemoved=function(o,A){let f=this.clockTrackedDataSource===A,m=A.entities.id;if(this._dataSourceChangedListeners[m](),this._dataSourceChangedListeners[m]=void 0,f){let C=o.length;this._automaticallyTrackDataSourceClocks&&C>0?this.clockTrackedDataSource=o.get(C-1):this.clockTrackedDataSource=void 0}};ku.prototype.zoomTo=function(o,A){return Iot(this,o,{offset:A},!1)};ku.prototype.flyTo=function(o,A){return Iot(this,o,A,!0)};function Iot(o,A,f,m){tie(o);let C=new Promise(y=>{o._completeZoom=function(x){y(x)}});return o._zoomPromise=C,o._zoomIsFlight=m,o._zoomOptions=f,Promise.resolve(A).then(function(y){if(o._zoomPromise===C){if(y instanceof dD){y.getViewableRectangle().then(function(x){return IJ(x,o.scene)}).then(function(x){o._zoomPromise===C&&(o._zoomTarget=x)});return}if(y instanceof Fx){o._zoomTarget=y;return}if(y instanceof K6){o._zoomTarget=y;return}if(y.isLoading&&O(y.loadingEvent)){let x=y.loadingEvent.addEventListener(function(){x(),o._zoomPromise===C&&(o._zoomTarget=y.entities.values.slice(0))});return}if(Array.isArray(y)){o._zoomTarget=y.slice(0);return}y=Ae(y.values,y),O(y.entities)&&(y=y.entities.values),Array.isArray(y)?o._zoomTarget=y.slice(0):o._zoomTarget=[y]}}),o.scene.requestRender(),C}function aG(o){o._zoomPromise=void 0,o._zoomTarget=void 0,o._zoomOptions=void 0}function tie(o){let A=o._zoomPromise;O(A)&&(aG(o),o._completeZoom(!1))}ku.prototype._postRender=function(){lBi(this),uBi(this)};function lBi(o){let A=o._zoomTarget;if(!O(A)||o.scene.mode===xi.MORPHING)return;let f=o.scene,m=f.camera,C=Ae(o._zoomOptions,{}),y;if(A instanceof Fx)return A.readyPromise.then(function(){let I=A.boundingSphere;O(C.offset)||(C.offset=new Ex(0,-.5,I.radius)),y={offset:C.offset,duration:C.duration,maximumHeight:C.maximumHeight,complete:function(){o._completeZoom(!0)},cancel:function(){o._completeZoom(!1)}},o._zoomIsFlight?m.flyToBoundingSphere(A.boundingSphere,y):(m.viewBoundingSphere(I,C.offset),m.lookAtTransform(Xe.IDENTITY),o._completeZoom(!0)),aG(o)}).catch(()=>{tie(o)});if(A instanceof K6)return A.readyPromise.then(function(){let I=A.boundingSphere;O(C.offset)||(C.offset=new Ex(0,-.5,I.radius)),y={offset:C.offset,duration:C.duration,maximumHeight:C.maximumHeight,complete:function(){o._completeZoom(!0)},cancel:function(){o._completeZoom(!1)}},o._zoomIsFlight?m.flyToBoundingSphere(I,y):(m.viewBoundingSphere(I,C.offset),m.lookAtTransform(Xe.IDENTITY),o._completeZoom(!0)),aG(o)});if(A instanceof Kt){y={destination:f.mapProjection.ellipsoid.cartographicToCartesian(A),duration:C.duration,maximumHeight:C.maximumHeight,complete:function(){o._completeZoom(!0)},cancel:function(){o._completeZoom(!1)}},o._zoomIsFlight?m.flyTo(y):(m.setView(y),o._completeZoom(!0)),aG(o);return}let x=A,v=[];for(let I=0,w=x.length;I<w;I++){let Q=o._dataSourceDisplay.getBoundingSphere(x[I],!1,tF);if(Q===ro.PENDING)return;Q!==ro.FAILED&&v.push(wi.clone(tF))}if(v.length===0){tie(o);return}o.trackedEntity=void 0;let E=wi.fromBoundingSpheres(v);o._zoomIsFlight?(aG(o),m.flyToBoundingSphere(E,{duration:C.duration,maximumHeight:C.maximumHeight,complete:function(){o._completeZoom(!0)},cancel:function(){o._completeZoom(!1)},offset:C.offset})):(m.viewBoundingSphere(E,C.offset),m.lookAtTransform(Xe.IDENTITY),aG(o),o._completeZoom(!0))}function uBi(o){if(!o._needTrackedEntityUpdate)return;let A=o._trackedEntity,f=o.clock.currentTime,m=Nt.getValueOrUndefined(A.position,f);if(!O(m))return;let C=o.scene,y=o._dataSourceDisplay.getBoundingSphere(A,!1,tF);if(y===ro.PENDING)return;let x=C.mode;(x===xi.COLUMBUS_VIEW||x===xi.SCENE2D)&&(C.screenSpaceCameraController.enableTranslate=!1),(x===xi.COLUMBUS_VIEW||x===xi.SCENE3D)&&(C.screenSpaceCameraController.enableTilt=!1);let v=y!==ro.FAILED?tF:void 0;o._entityView=new qne(A,C,C.mapProjection.ellipsoid),o._entityView.update(f,v),o._needTrackedEntityUpdate=!1}var XJ=ku;function _ot(o,A){if(!O(o)||!(o instanceof XJ))throw new Ui("viewer is required.");this._camera=o.camera,this._scene=o.scene,this._globe=o.scene.globe,this._ellipsoid=o.scene.globe.ellipsoid}var ize=new ee,Q$=new ee,S$=new ee;_ot.prototype.pickSlope=function(o){if(!O(o)||!(o instanceof Bt))throw new Ui("windowCoordinates is required.");let A=this._camera,f=this._scene,m=this._globe,C=this._ellipsoid,y=A.getPickRay(o),x=m.pick(y,f),v=C.geodeticSurfaceNormal(x);if(x){let E=m.pickTriangle(y,f);ee.subtract(E[1],E[0],Q$),ee.subtract(E[2],E[0],S$),ee.normalize(Q$,Q$),ee.normalize(S$,S$),ee.cross(Q$,S$,ize);let I=ee.angleBetween(v,ize);return je.toDegrees(I)}};var Bot=_ot,cBi=[{value:0,color:"#ffffff"},{value:1,color:"#ffa500"}];function YM(o){this._definitionChanged=new br,this._color=void 0,this._colorSubscription=void 0,this.color=Ae(o.color,At.RED),this.duration=Ae(o.duration,3e3),this.image=Ae(o.image,void 0),this.ramp=Ae(o.ramp,cBi),this._translucnet=Ae(o.translucent,!0),this._repeat=Ae(o.repeat,1),this._time=new Date().getTime()}Object.defineProperties(YM.prototype,{isConstant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}},color:Bi("color")});YM.prototype.getType=function(o){return as.PolylineTrailLinkType};YM.prototype.getValue=function(o,A){return O(A)||(A={}),A.color=Nt.getValueOrClonedDefault(this.color,o,At.WHITE,A.color),A.image=this.getColorRamp(),A.repeat=this._repeat,A.time=(new Date().getTime()-this._time)%this.duration/this.duration,A};YM.prototype.update=function(){let o=fi.now();return this.getValue(o)};YM.prototype.isTranslucent=function(){return this._translucnet};YM.prototype.getColorRamp=function(){if(O(this.image))return this.image;let o=document.createElement("canvas");o.width=100,o.height=1;let A=o.getContext("2d"),f=A.createLinearGradient(0,0,100,0),m=this;for(let C=0;C<m.ramp.length;C++){let y=m.ramp[C].value,x=m.ramp[C].color;f.addColorStop(y,x)}return A.fillStyle=f,A.fillRect(0,0,100,1),o};YM.prototype.equals=function(o){return this===o||o instanceof YM&&Nt.equals(this._color,o._color)};var wot=YM;function Aw(o){this._tileProvider=o.tileProvider,this._tileProvider.quadtree=this,this._debug={enableDebugOutput:!1,maxDepth:0,maxDepthVisited:0,tilesVisited:0,tilesCulled:0,tilesRendered:0,tilesWaitingForChildren:0,lastMaxDepth:-1,lastMaxDepthVisited:-1,lastTilesVisited:-1,lastTilesCulled:-1,lastTilesRendered:-1,lastTilesWaitingForChildren:-1,suspendLodUpdate:!1};let A=this._tileProvider.tilingScheme.ellipsoid;this._tilesToRender=[],this._tileLoadQueueHigh=[],this._tileLoadQueueMedium=[],this._tileLoadQueueLow=[],this._tileReplacementQueue=new moe,this._levelZeroTiles=void 0,this._loadQueueTimeSlice=5,this._tilesInvalidated=!1,this._addHeightCallbacks=[],this._removeHeightCallbacks=[],this._tileToUpdateHeights=[],this._lastTileIndex=0,this._updateHeightsTimeSlice=2,this._cameraPositionCartographic=void 0,this._cameraReferenceFrameOriginCartographic=void 0,this.maximumScreenSpaceError=Ae(o.maximumScreenSpaceError,2),this.tileCacheSize=Ae(o.tileCacheSize,100),this.loadingDescendantLimit=20,this.preloadAncestors=!0,this.preloadSiblings=!1,this._occluders=new foe({ellipsoid:A}),this._tileLoadProgressEvent=new br,this._lastTileLoadQueueLength=0,this._lastSelectionFrameNumber=void 0}Object.defineProperties(Aw.prototype,{tileProvider:{get:function(){return this._tileProvider}},tileLoadProgressEvent:{get:function(){return this._tileLoadProgressEvent}},occluders:{get:function(){return this._occluders}}});Aw.prototype.invalidateAllTiles=function(){this._tilesInvalidated=!0};function ABi(o){let A=o._tileReplacementQueue;A.head=void 0,A.tail=void 0,A.count=0,bot(o);let f=o._levelZeroTiles;if(O(f))for(let m=0;m<f.length;++m){let C=f[m].customData,y=C.length;for(let x=0;x<y;++x){let v=C[x];v.level=0,o._addHeightCallbacks.push(v)}f[m].freeResources()}o._levelZeroTiles=void 0,o._tileProvider.cancelReprojections()}Aw.prototype.forEachLoadedTile=function(o){let A=this._tileReplacementQueue.head;for(;O(A);)A.state!==mC.START&&o(A),A=A.replacementNext};Aw.prototype.forEachRenderedTile=function(o){let A=this._tilesToRender;for(let f=0,m=A.length;f<m;++f)o(A[f])};Aw.prototype.updateHeight=function(o,A){let f=this,m={positionOnEllipsoidSurface:void 0,positionCartographic:o,level:-1,callback:A};return m.removeFunc=function(){let C=f._addHeightCallbacks,y=C.length;for(let x=0;x<y;++x)if(C[x]===m){C.splice(x,1);break}f._removeHeightCallbacks.push(m)},f._addHeightCallbacks.push(m),m.removeFunc};Aw.prototype.update=function(o){O(this._tileProvider.update)&&this._tileProvider.update(o)};function bot(o){let A=o._debug;A.maxDepth=0,A.maxDepthVisited=0,A.tilesVisited=0,A.tilesCulled=0,A.tilesRendered=0,A.tilesWaitingForChildren=0,o._tileLoadQueueHigh.length=0,o._tileLoadQueueMedium.length=0,o._tileLoadQueueLow.length=0}Aw.prototype.beginFrame=function(o){!o.passes.render||(this._tilesInvalidated&&(ABi(this),this._tilesInvalidated=!1),this._tileProvider.initialize(o),bot(this),!this._debug.suspendLodUpdate&&this._tileReplacementQueue.markStartOfRenderFrame())};Aw.prototype.render=function(o){let A=o.passes,f=this._tileProvider;if(A.render&&(f.beginUpdate(o),gBi(this,o),BBi(this,o),f.endUpdate(o)),A.pick&&this._tilesToRender.length>0)try{f.updateForPick(o)}catch(m){console.error(m)}};function hBi(o,A){let f=o._tileLoadQueueHigh.length+o._tileLoadQueueMedium.length+o._tileLoadQueueLow.length;(f!==o._lastTileLoadQueueLength||o._tilesInvalidated)&&(A.afterRender.push(br.prototype.raiseEvent.bind(o._tileLoadProgressEvent,f)),o._lastTileLoadQueueLength=f);let m=o._debug;m.enableDebugOutput&&!m.suspendLodUpdate&&(m.maxDepth=o._tilesToRender.reduce(function(C,y){return Math.max(C,y.level)},-1),m.tilesRendered=o._tilesToRender.length,(m.tilesVisited!==m.lastTilesVisited||m.tilesRendered!==m.lastTilesRendered||m.tilesCulled!==m.lastTilesCulled||m.maxDepth!==m.lastMaxDepth||m.tilesWaitingForChildren!==m.lastTilesWaitingForChildren||m.maxDepthVisited!==m.lastMaxDepthVisited)&&(console.log(`Visited ${m.tilesVisited}, Rendered: ${m.tilesRendered}, Culled: ${m.tilesCulled}, Max Depth Rendered: ${m.maxDepth}, Max Depth Visited: ${m.maxDepthVisited}, Waiting for children: ${m.tilesWaitingForChildren}`),m.lastTilesVisited=m.tilesVisited,m.lastTilesRendered=m.tilesRendered,m.lastTilesCulled=m.tilesCulled,m.lastMaxDepth=m.maxDepth,m.lastTilesWaitingForChildren=m.tilesWaitingForChildren,m.lastMaxDepthVisited=m.maxDepthVisited))}Aw.prototype.endFrame=function(o){!o.passes.render||o.mode===xi.MORPHING||(vBi(this,o),_Bi(this,o),hBi(this,o))};var e7,rze=new Kt;function dBi(o,A){let f=Si.center(o.rectangle,rze),m=f.longitude-e7.longitude,C=f.latitude-e7.latitude;f=Si.center(A.rectangle,rze);let y=f.longitude-e7.longitude,x=f.latitude-e7.latitude;return m*m+C*C-(y*y+x*x)}var fBi=new ee,Qz=[];function gBi(o,A){let f=o._debug;if(f.suspendLodUpdate)return;let m=o._tilesToRender;m.length=0;let C,y=o._tileProvider;if(!O(o._levelZeroTiles))if(y.ready){let D=y.tilingScheme;o._levelZeroTiles=goe.createLevelZeroTiles(D);let F=o._levelZeroTiles.length;if(Qz.length<F)for(Qz=new Array(F),C=0;C<F;++C)Qz[C]===void 0&&(Qz[C]=new t7)}else return;o._occluders.ellipsoid.cameraPosition=A.camera.positionWC;let x,v=o._levelZeroTiles,E=v.length>1?o._occluders:void 0;e7=A.camera.positionCartographic,v.sort(dBi);let I=o._addHeightCallbacks,w=o._removeHeightCallbacks,Q=A.frameNumber,M;if(I.length>0||w.length>0){for(C=0,M=v.length;C<M;++C)x=v[C],x._updateCustomData(Q,I,w);I.length=0,w.length=0}let B=A.camera;o._cameraPositionCartographic=B.positionCartographic;let T=Xe.getTranslation(B.transform,fBi);for(o._cameraReferenceFrameOriginCartographic=o.tileProvider.tilingScheme.ellipsoid.cartesianToCartographic(T,o._cameraReferenceFrameOriginCartographic),C=0,M=v.length;C<M;++C)x=v[C],o._tileReplacementQueue.markTileRendered(x),x.renderable?ty(o,x,y,A,E,!1,Qz[C]):(nM(o,o._tileLoadQueueHigh,x,A),++f.tilesWaitingForChildren);o._lastSelectionFrameNumber=Q}function nM(o,A,f,m){!f.needsLoading||(o.tileProvider.computeTileLoadPriority!==void 0&&(f._loadPriority=o.tileProvider.computeTileLoadPriority(f,m)),A.push(f))}function t7(){this.allAreRenderable=!0,this.anyWereRenderedLastFrame=!1,this.notYetRenderableCount=0}function Qot(){this.southwest=new t7,this.southeast=new t7,this.northwest=new t7,this.northeast=new t7}Qot.prototype.combine=function(o){let A=this.southwest,f=this.southeast,m=this.northwest,C=this.northeast;o.allAreRenderable=A.allAreRenderable&&f.allAreRenderable&&m.allAreRenderable&&C.allAreRenderable,o.anyWereRenderedLastFrame=A.anyWereRenderedLastFrame||f.anyWereRenderedLastFrame||m.anyWereRenderedLastFrame||C.anyWereRenderedLastFrame,o.notYetRenderableCount=A.notYetRenderableCount+f.notYetRenderableCount+m.notYetRenderableCount+C.notYetRenderableCount};var gme=new Array(31);for(let o=0;o<gme.length;++o)gme[o]=new Qot;function pBi(o,A,f,m,C){let y=o._debug;++y.tilesVisited,o._tileReplacementQueue.markTileRendered(f),f._updateCustomData(A.frameNumber),f.level>y.maxDepthVisited&&(y.maxDepthVisited=f.level);let x=yBi(o,A,f)<o.maximumScreenSpaceError,v=f.southwestChild,E=f.southeastChild,I=f.northwestChild,w=f.northeastChild,Q=o._lastSelectionFrameNumber,M=f._lastSelectionResultFrame===Q?f._lastSelectionResult:sa.NONE,B=o.tileProvider;if(x||m){let T=sa.originalResult(M)===sa.RENDERED,D=sa.originalResult(M)===sa.CULLED||M===sa.NONE,F=f.state===mC.DONE,L=T||D||F;if(L||O(B.canRenderWithoutLosingDetail)&&(L=B.canRenderWithoutLosingDetail(f)),L){x&&nM(o,o._tileLoadQueueMedium,f,A),D$(o,f),C.allAreRenderable=f.renderable,C.anyWereRenderedLastFrame=M===sa.RENDERED,C.notYetRenderableCount=f.renderable?0:1,f._lastSelectionResultFrame=A.frameNumber,f._lastSelectionResult=sa.RENDERED,C.anyWereRenderedLastFrame||o._tileToUpdateHeights.push(f);return}m=!0,x&&nM(o,o._tileLoadQueueHigh,f,A)}if(B.canRefine(f)){if(v.upsampledFromParent&&E.upsampledFromParent&&I.upsampledFromParent&&w.upsampledFromParent){D$(o,f),nM(o,o._tileLoadQueueMedium,f,A),o._tileReplacementQueue.markTileRendered(v),o._tileReplacementQueue.markTileRendered(E),o._tileReplacementQueue.markTileRendered(I),o._tileReplacementQueue.markTileRendered(w),C.allAreRenderable=f.renderable,C.anyWereRenderedLastFrame=M===sa.RENDERED,C.notYetRenderableCount=f.renderable?0:1,f._lastSelectionResultFrame=A.frameNumber,f._lastSelectionResult=sa.RENDERED,C.anyWereRenderedLastFrame||o._tileToUpdateHeights.push(f);return}f._lastSelectionResultFrame=A.frameNumber,f._lastSelectionResult=sa.REFINED;let T=o._tilesToRender.length,D=o._tileLoadQueueLow.length,F=o._tileLoadQueueMedium.length,L=o._tileLoadQueueHigh.length,R=o._tileToUpdateHeights.length;if(mBi(o,v,E,I,w,A,m,C),T!==o._tilesToRender.length){let k=C.allAreRenderable,U=C.anyWereRenderedLastFrame,V=C.notYetRenderableCount,H=!1;if(!k&&!U){let q=o._tilesToRender;for(let Z=T;Z<q.length;++Z){let oe=q[Z];for(;oe!==void 0&&oe._lastSelectionResult!==sa.KICKED&&oe!==f;)oe._lastSelectionResult=sa.kick(oe._lastSelectionResult),oe=oe.parent}o._tilesToRender.length=T,o._tileToUpdateHeights.length=R,D$(o,f),f._lastSelectionResult=sa.RENDERED;let ie=M===sa.RENDERED;!ie&&V>o.loadingDescendantLimit&&(o._tileLoadQueueLow.length=D,o._tileLoadQueueMedium.length=F,o._tileLoadQueueHigh.length=L,nM(o,o._tileLoadQueueMedium,f,A),C.notYetRenderableCount=f.renderable?0:1,H=!0),C.allAreRenderable=f.renderable,C.anyWereRenderedLastFrame=ie,ie||o._tileToUpdateHeights.push(f),++y.tilesWaitingForChildren}o.preloadAncestors&&!H&&nM(o,o._tileLoadQueueLow,f,A)}return}f._lastSelectionResultFrame=A.frameNumber,f._lastSelectionResult=sa.RENDERED,D$(o,f),nM(o,o._tileLoadQueueHigh,f,A),C.allAreRenderable=f.renderable,C.anyWereRenderedLastFrame=M===sa.RENDERED,C.notYetRenderableCount=f.renderable?0:1}function mBi(o,A,f,m,C,y,x,v){let E=y.camera.positionCartographic,I=o._tileProvider,w=o._occluders,Q=gme[A.level],M=Q.southwest,B=Q.southeast,T=Q.northwest,D=Q.northeast;E.longitude<A.rectangle.east?E.latitude<A.rectangle.north?(ty(o,A,I,y,w,x,M),ty(o,f,I,y,w,x,B),ty(o,m,I,y,w,x,T),ty(o,C,I,y,w,x,D)):(ty(o,m,I,y,w,x,T),ty(o,A,I,y,w,x,M),ty(o,C,I,y,w,x,D),ty(o,f,I,y,w,x,B)):E.latitude<A.rectangle.north?(ty(o,f,I,y,w,x,B),ty(o,A,I,y,w,x,M),ty(o,C,I,y,w,x,D),ty(o,m,I,y,w,x,T)):(ty(o,C,I,y,w,x,D),ty(o,m,I,y,w,x,T),ty(o,f,I,y,w,x,B),ty(o,A,I,y,w,x,M)),Q.combine(v)}function CBi(o,A){let f=A.rectangle;return O(o._cameraPositionCartographic)&&Si.contains(f,o._cameraPositionCartographic)||O(o._cameraReferenceFrameOriginCartographic)&&Si.contains(f,o._cameraReferenceFrameOriginCartographic)}function ty(o,A,f,m,C,y,x){if(f.computeTileVisibility(A,m,C)!==vg.NONE)return pBi(o,m,A,y,x);if(++o._debug.tilesCulled,o._tileReplacementQueue.markTileRendered(A),x.allAreRenderable=!0,x.anyWereRenderedLastFrame=!1,x.notYetRenderableCount=0,CBi(o,A)){(!O(A.data)||!O(A.data.vertexArray))&&nM(o,o._tileLoadQueueMedium,A,m);let v=o._lastSelectionFrameNumber,E=A._lastSelectionResultFrame===v?A._lastSelectionResult:sa.NONE;E!==sa.CULLED_BUT_NEEDED&&E!==sa.RENDERED&&o._tileToUpdateHeights.push(A),A._lastSelectionResult=sa.CULLED_BUT_NEEDED}else(o.preloadSiblings||A.level===0)&&nM(o,o._tileLoadQueueLow,A,m),A._lastSelectionResult=sa.CULLED;A._lastSelectionResultFrame=m.frameNumber}function yBi(o,A,f){if(A.mode===xi.SCENE2D||A.camera.frustum instanceof Ss||A.camera.frustum instanceof K0)return xBi(o,A,f);let m=o._tileProvider.getLevelMaximumGeometricError(f.level),C=f._distance,y=A.context.drawingBufferHeight,x=A.camera.frustum.sseDenominator,v=m*y/(C*x);return A.fog.enabled&&(v-=je.fog(C,A.fog.density)*A.fog.sse),v/=A.pixelRatio,v}function xBi(o,A,f){let m=A.camera.frustum;O(m._offCenterFrustum)&&(m=m._offCenterFrustum);let C=A.context,y=C.drawingBufferWidth,x=C.drawingBufferHeight,v=o._tileProvider.getLevelMaximumGeometricError(f.level),E=Math.max(m.top-m.bottom,m.right-m.left)/Math.max(y,x),I=v/E;return A.fog.enabled&&A.mode!==xi.SCENE2D&&(I-=je.fog(f._distance,A.fog.density)*A.fog.sse),I/=A.pixelRatio,I}function D$(o,A){o._tilesToRender.push(A)}function vBi(o,A){let f=o._tileLoadQueueHigh,m=o._tileLoadQueueMedium,C=o._tileLoadQueueLow;if(f.length===0&&m.length===0&&C.length===0)return;o._tileReplacementQueue.trimTiles(o.tileCacheSize);let y=OA()+o._loadQueueTimeSlice,x=o._tileProvider,v=Uge(o,A,x,y,f,!1);v=Uge(o,A,x,y,m,v),Uge(o,A,x,y,C,v)}function EBi(o,A){return o._loadPriority-A._loadPriority}function Uge(o,A,f,m,C,y){f.computeTileLoadPriority!==void 0&&C.sort(EBi);for(let x=0,v=C.length;x<v&&(OA()<m||!y);++x){let E=C[x];o._tileReplacementQueue.markTileRendered(E),f.loadTile(A,E),y=!0}return y}Aw.prototype.isDestroyed=function(){return!1};Aw.prototype.destroy=function(){this._tileProvider=this._tileProvider&&this._tileProvider.destroy()};var zU=new ss,Gge=new Kt,_L=new ee,IBi=[];function _Bi(o,A){if(!o.tileProvider.ready)return;let f=IBi;f.length=0;let m=o._tileToUpdateHeights,C=OA(),y=o._updateHeightsTimeSlice,x=C+y,v=A.mode,E=A.mapProjection,I=o.tileProvider.tilingScheme.ellipsoid,w;for(;m.length>0;){let Q=m[0];if(!O(Q.data)||!O(Q.data.mesh)){let D=Q._lastSelectionResultFrame===o._lastSelectionFrameNumber?Q._lastSelectionResult:sa.NONE;(D===sa.RENDERED||D===sa.CULLED_BUT_NEEDED)&&f.push(Q),m.shift(),o._lastTileIndex=0;continue}let M=Q.customData,B=M.length,T=!1;for(w=o._lastTileIndex;w<B;++w){let D=M[w],F=Q.data.terrainData,L=O(F)&&F.wasCreatedByUpsampling();if(Q.level>D.level&&!L){if(O(D.positionOnEllipsoidSurface)||(D.positionOnEllipsoidSurface=ee.fromRadians(D.positionCartographic.longitude,D.positionCartographic.latitude,0,I)),v===xi.SCENE3D){let k=I.geodeticSurfaceNormal(D.positionOnEllipsoidSurface,zU.direction),U=I.getSurfaceNormalIntersectionWithZAxis(D.positionOnEllipsoidSurface,11500,zU.origin);if(!O(U)){let V;O(Q.data.tileBoundingRegion)&&(V=Q.data.tileBoundingRegion.minimumHeight);let H=Math.min(Ae(V,0),-11500),q=ee.multiplyByScalar(k,Math.abs(H)+1,_L);ee.subtract(D.positionOnEllipsoidSurface,q,zU.origin)}}else Kt.clone(D.positionCartographic,Gge),Gge.height=-11500,E.project(Gge,_L),ee.fromElements(_L.z,_L.x,_L.y,_L),ee.clone(_L,zU.origin),ee.clone(ee.UNIT_X,zU.direction);let R=Q.data.pick(zU,v,E,!1,_L);O(R)&&(D.callback(R),D.level=Q.level)}if(OA()>=x){T=!0;break}}if(T){o._lastTileIndex=w;break}else o._lastTileIndex=0,m.shift()}for(w=0;w<f.length;w++)m.push(f[w])}function BBi(o,A){let f=o._tileProvider,m=o._tilesToRender;for(let C=0,y=m.length;C<y;++C){let x=m[C];f.showTileThisFrame(x,A)}}var Sot=Aw;/*! rasterizeHTML.js - v1.3.0 - 2018-03-18
${T}`);let D=document.createElement("div");D.className="map-widget-errorPanel-message-details collapsed";let F=document.createElement("span");F.className="map-widget-errorPanel-more-details",F.appendChild(document.createTextNode("See more...")),D.appendChild(F),D.onclick=function(L){D.removeChild(F),D.appendChild(document.createTextNode(T)),D.className="map-widget-errorPanel-message-details",y.className="map-widget-errorPanel-content expanded",D.onclick=void 0},v.appendChild(D)}B.innerHTML=`<p>${A}</p>`}let Q=document.createElement("div");Q.className="map-widget-errorPanel-buttonPanel",y.appendChild(Q);let M=document.createElement("button");M.setAttribute("type","button"),M.className="map-button",M.appendChild(document.createTextNode("OK")),M.onclick=function(){O(E)&&O(window.removeEventListener)&&window.removeEventListener("resize",E,!1),m.removeChild(C)},Q.appendChild(M),m.appendChild(C)};EO.prototype.isDestroyed=function(){return!1};EO.prototype.destroy=function(){O(this._scene)&&(this._scene.renderError.removeEventListener(this._onRenderError),this._scene=this._scene.destroy()),this._container.removeChild(this._element),this._creditContainer.removeChild(this._innerCreditContainer),Qr(this)};EO.prototype.resize=function(){let o=this._canvas;!this._forceResize&&this._canvasClientWidth===o.clientWidth&&this._canvasClientHeight===o.clientHeight&&this._lastDevicePixelRatio===window.devicePixelRatio||(this._forceResize=!1,Aot(this),hot(this),this._scene.requestRender())};EO.prototype.render=function(){if(this._scene._frameState||console.log("\u6388\u6743\u9A8C\u8BC1\u9519\u8BEF\uFF01"),this._canRender){this._scene.initializeFrame();let o=this._clock.tick();this._scene.render(o)}else this._clock.tick()};var JJ=EO;function WJ(o){O(o)||(o=new z5),this._clock=o,this._eventHelper=new Mx,this._eventHelper.add(o.onTick,this.synchronize,this),this.systemTime=gr.observable(fi.now()),this.systemTime.equalityComparer=fi.equals,this.startTime=gr.observable(o.startTime),this.startTime.equalityComparer=fi.equals,this.startTime.subscribe(function(A){o.startTime=A,this.synchronize()},this),this.stopTime=gr.observable(o.stopTime),this.stopTime.equalityComparer=fi.equals,this.stopTime.subscribe(function(A){o.stopTime=A,this.synchronize()},this),this.currentTime=gr.observable(o.currentTime),this.currentTime.equalityComparer=fi.equals,this.currentTime.subscribe(function(A){o.currentTime=A,this.synchronize()},this),this.multiplier=gr.observable(o.multiplier),this.multiplier.subscribe(function(A){o.multiplier=A,this.synchronize()},this),this.clockStep=gr.observable(o.clockStep),this.clockStep.subscribe(function(A){o.clockStep=A,this.synchronize()},this),this.clockRange=gr.observable(o.clockRange),this.clockRange.subscribe(function(A){o.clockRange=A,this.synchronize()},this),this.canAnimate=gr.observable(o.canAnimate),this.canAnimate.subscribe(function(A){o.canAnimate=A,this.synchronize()},this),this.shouldAnimate=gr.observable(o.shouldAnimate),this.shouldAnimate.subscribe(function(A){o.shouldAnimate=A,this.synchronize()},this),gr.track(this,["systemTime","startTime","stopTime","currentTime","multiplier","clockStep","clockRange","canAnimate","shouldAnimate"])}Object.defineProperties(WJ.prototype,{clock:{get:function(){return this._clock}}});WJ.prototype.synchronize=function(){let o=this._clock;this.systemTime=fi.now(),this.startTime=o.startTime,this.stopTime=o.stopTime,this.currentTime=o.currentTime,this.multiplier=o.multiplier,this.clockStep=o.clockStep,this.clockRange=o.clockRange,this.canAnimate=o.canAnimate,this.shouldAnimate=o.shouldAnimate};WJ.prototype.isDestroyed=function(){return!1};WJ.prototype.destroy=function(){this._eventHelper.removeAll(),Qr(this)};var _Qe=WJ;function koe(o,A){O(A)||(A=document.body),A=iA(A);let f=this,m=gr.observable(yp.fullscreen),C=gr.observable(yp.enabled),y=A.ownerDocument;this.isFullscreen=void 0,gr.defineProperty(this,"isFullscreen",{get:function(){return m()}}),this.isFullscreenEnabled=void 0,gr.defineProperty(this,"isFullscreenEnabled",{get:function(){return C()},set:function(x){C(x&&yp.enabled)}}),this.tooltip=void 0,gr.defineProperty(this,"tooltip",function(){return this.isFullscreenEnabled?m()?"Exit full screen":"Full screen":"Full screen unavailable"}),this._command=Hl(function(){yp.fullscreen?yp.exitFullscreen():yp.requestFullscreen(f._fullscreenElement)},gr.getObservable(this,"isFullscreenEnabled")),this._fullscreenElement=Ae(iA(o),y.body),this._callback=function(){m(yp.fullscreen)},y.addEventListener(yp.changeEventName,this._callback)}Object.defineProperties(koe.prototype,{fullscreenElement:{get:function(){return this._fullscreenElement},set:function(o){this._fullscreenElement=o}},command:{get:function(){return this._command}}});koe.prototype.isDestroyed=function(){return!1};koe.prototype.destroy=function(){document.removeEventListener(yp.changeEventName,this._callback),Qr(this)};var BQe=koe,__i="M 83.96875 17.5625 L 83.96875 17.59375 L 76.65625 24.875 L 97.09375 24.96875 L 76.09375 45.96875 L 81.9375 51.8125 L 102.78125 30.9375 L 102.875 51.15625 L 110.15625 43.875 L 110.1875 17.59375 L 83.96875 17.5625 z M 44.125 17.59375 L 17.90625 17.625 L 17.9375 43.90625 L 25.21875 51.1875 L 25.3125 30.96875 L 46.15625 51.8125 L 52 45.96875 L 31 25 L 51.4375 24.90625 L 44.125 17.59375 z M 46.0625 76.03125 L 25.1875 96.875 L 25.09375 76.65625 L 17.8125 83.9375 L 17.8125 110.21875 L 44 110.25 L 51.3125 102.9375 L 30.90625 102.84375 L 51.875 81.875 L 46.0625 76.03125 z M 82 76.15625 L 76.15625 82 L 97.15625 103 L 76.71875 103.0625 L 84.03125 110.375 L 110.25 110.34375 L 110.21875 84.0625 L 102.9375 76.8125 L 102.84375 97 L 82 76.15625 z",B_i="M 104.34375 17.5625 L 83.5 38.4375 L 83.40625 18.21875 L 76.125 25.5 L 76.09375 51.78125 L 102.3125 51.8125 L 102.3125 51.78125 L 109.625 44.5 L 89.1875 44.40625 L 110.1875 23.40625 L 104.34375 17.5625 z M 23.75 17.59375 L 17.90625 23.4375 L 38.90625 44.4375 L 18.5 44.53125 L 25.78125 51.8125 L 52 51.78125 L 51.96875 25.53125 L 44.6875 18.25 L 44.625 38.46875 L 23.75 17.59375 z M 25.6875 76.03125 L 18.375 83.3125 L 38.78125 83.40625 L 17.8125 104.40625 L 23.625 110.25 L 44.5 89.375 L 44.59375 109.59375 L 51.875 102.3125 L 51.875 76.0625 L 25.6875 76.03125 z M 102.375 76.15625 L 76.15625 76.1875 L 76.1875 102.4375 L 83.46875 109.71875 L 83.5625 89.53125 L 104.40625 110.375 L 110.25 104.53125 L 89.25 83.53125 L 109.6875 83.46875 L 102.375 76.15625 z";function Ooe(o,A){o=iA(o);let f=new BQe(A,o);f._exitFullScreenPath=B_i,f._enterFullScreenPath=__i;let m=document.createElement("button");m.type="button",m.className="cesium-button cesium-fullscreenButton",m.setAttribute("data-bind","attr: { title: tooltip },click: command,enable: isFullscreenEnabled,cesiumSvgPath: { path: isFullscreen ? _exitFullScreenPath : _enterFullScreenPath, width: 128, height: 128 }"),o.appendChild(m),gr.applyBindings(f,m),this._container=o,this._viewModel=f,this._element=m}Object.defineProperties(Ooe.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Ooe.prototype.isDestroyed=function(){return!1};Ooe.prototype.destroy=function(){return this._viewModel.destroy(),gr.cleanNode(this._element),this._container.removeChild(this._element),Qr(this)};var wQe=Ooe;function dot(){}dot.prototype.geocode=function(o){let A=o.match(/[^\s,\n]+/g);if(A.length===2||A.length===3){let f=+A[0],m=+A[1],C=A.length===3?+A[2]:300;if(isNaN(f)&&isNaN(m)){let y=/^(\d+.?\d*)([nsew])/i;for(let x=0;x<A.length;++x){let v=A[x].match(y);y.test(A[x])&&v.length===3&&(/^[ns]/i.test(v[2])?m=/^[n]/i.test(v[2])?+v[1]:-v[1]:/^[ew]/i.test(v[2])&&(f=/^[e]/i.test(v[2])?+v[1]:-v[1]))}}if(!isNaN(f)&&!isNaN(m)&&!isNaN(C)){let y={displayName:o,destination:ee.fromDegrees(f,m,C)};return Promise.resolve([y])}}return Promise.resolve([])};var bQe=dot,w_i={SEARCH:0,AUTOCOMPLETE:1},jJ=Object.freeze(w_i);function QQe(o){this._url=An.createIfNeeded(o),this._url.appendForwardSlash()}Object.defineProperties(QQe.prototype,{url:{get:function(){return this._url}}});QQe.prototype.geocode=function(o,A){return this._url.getDerivedResource({url:A===jJ.AUTOCOMPLETE?"autocomplete":"search",queryParameters:{text:o}}).fetchJson().then(function(f){return f.features.map(function(m){let C,y=m.bbox;if(O(y))C=Si.fromDegrees(y[0],y[1],y[2],y[3]);else{let x=m.geometry.coordinates[0],v=m.geometry.coordinates[1];C=ee.fromDegrees(x,v)}return{displayName:m.properties.label,destination:C}})})};var SQe=QQe;function fot(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=Ae(o.accessToken,xF.defaultAccessToken),f=An.createIfNeeded(Ae(o.server,xF.defaultServer));f.appendForwardSlash();let m=xF.getDefaultTokenCredit(A);O(m)&&o.scene.frameState.creditDisplay.addDefaultCredit(tl.clone(m));let C=f.getDerivedResource({url:"v1/geocode"});O(A)&&C.appendQueryParameters({access_token:A}),this._accessToken=A,this._server=f,this._pelias=new SQe(C)}fot.prototype.geocode=function(o,A){return this._pelias.geocode(o,A)};var DQe=fot,X9e=1e3;function KD(o){O(o.geocoderServices)?this._geocoderServices=o.geocoderServices:this._geocoderServices=[new bQe,new DQe({scene:o.scene})],this._viewContainer=o.container,this._scene=o.scene,this._flightDuration=o.flightDuration,this._searchText="",this._isSearchInProgress=!1,this._geocodePromise=void 0,this._complete=new br,this._suggestions=[],this._selectedSuggestion=void 0,this._showSuggestions=!0,this._handleArrowDown=$9e,this._handleArrowUp=Z9e;let A=this;this._suggestionsVisible=gr.pureComputed(function(){let m=gr.getObservable(A,"_suggestions")().length>0,C=gr.getObservable(A,"_showSuggestions")();return m&&C}),this._searchCommand=Hl(function(m){if(m=Ae(m,jJ.SEARCH),A._focusTextbox=!1,O(A._selectedSuggestion))return A.activateSuggestion(A._selectedSuggestion),!1;A.hideSuggestions(),A.isSearchInProgress?M_i(A):D_i(A,A._geocoderServices,m)}),this.deselectSuggestion=function(){A._selectedSuggestion=void 0},this.handleKeyDown=function(m,C){let y=C.key==="ArrowDown"||C.key==="Down"||C.keyCode===40,x=C.key==="ArrowUp"||C.key==="Up"||C.keyCode===38;return(y||x)&&C.preventDefault(),!0},this.handleKeyUp=function(m,C){let y=C.key==="ArrowDown"||C.key==="Down"||C.keyCode===40,x=C.key==="ArrowUp"||C.key==="Up"||C.keyCode===38,v=C.key==="Enter"||C.keyCode===13;return x?Z9e(A):y?$9e(A):v&&A._searchCommand(),!0},this.activateSuggestion=function(m){A.hideSuggestions(),A._searchText=m.displayName;let C=m.destination;pot(A),A.destinationFound(A,C)},this.hideSuggestions=function(){A._showSuggestions=!1,A._selectedSuggestion=void 0},this.showSuggestions=function(){A._showSuggestions=!0},this.handleMouseover=function(m,C){m!==A._selectedSuggestion&&(A._selectedSuggestion=m)},this.keepExpanded=!1,this.autoComplete=Ae(o.autocomplete,!0),this.destinationFound=Ae(o.destinationFound,KD.flyToDestination),this._focusTextbox=!1,gr.track(this,["_searchText","_isSearchInProgress","keepExpanded","_suggestions","_selectedSuggestion","_showSuggestions","_focusTextbox"]);let f=gr.getObservable(this,"_searchText");f.extend({rateLimit:{timeout:500}}),this._suggestionSubscription=f.subscribe(function(){KD._updateSearchSuggestions(A)}),this.isSearchInProgress=void 0,gr.defineProperty(this,"isSearchInProgress",{get:function(){return this._isSearchInProgress}}),this.searchText=void 0,gr.defineProperty(this,"searchText",{get:function(){return this.isSearchInProgress?"Searching...":this._searchText},set:function(m){this._searchText=m}}),this.flightDuration=void 0,gr.defineProperty(this,"flightDuration",{get:function(){return this._flightDuration},set:function(m){this._flightDuration=m}})}Object.defineProperties(KD.prototype,{complete:{get:function(){return this._complete}},scene:{get:function(){return this._scene}},search:{get:function(){return this._searchCommand}},selectedSuggestion:{get:function(){return this._selectedSuggestion}},suggestions:{get:function(){return this._suggestions}}});KD.prototype.destroy=function(){this._suggestionSubscription.dispose()};function Z9e(o){if(o._suggestions.length===0)return;let A=o._suggestions.indexOf(o._selectedSuggestion);if(A===-1||A===0){o._selectedSuggestion=void 0;return}let f=A-1;o._selectedSuggestion=o._suggestions[f],KD._adjustSuggestionsScroll(o,f)}function $9e(o){if(o._suggestions.length===0)return;let A=o._suggestions.length,f=(o._suggestions.indexOf(o._selectedSuggestion)+1)%A;o._selectedSuggestion=o._suggestions[f],KD._adjustSuggestionsScroll(o,f)}function b_i(o,A){let f=O(A)?A.availability:void 0;return O(f)?EQ(A,[o]).then(function(m){return o=m[0],o.height+=X9e,o}):(o.height+=X9e,Promise.resolve(o))}function Q_i(o,A){let f=o._scene,m=f.mapProjection.ellipsoid,C=f.camera,y=f.terrainProvider,x=A,v;return A instanceof Si?je.equalsEpsilon(A.south,A.north,je.EPSILON7)&&je.equalsEpsilon(A.east,A.west,je.EPSILON7)?A=Si.center(A):v=IJ(A,f):A=m.cartesianToCartographic(A),O(v)||(v=b_i(A,y)),v.then(function(E){x=m.cartographicToCartesian(E)}).finally(function(){C.flyTo({destination:x,complete:function(){o._complete.raiseEvent()},duration:o._flightDuration,endTransform:Xe.IDENTITY})})}function S_i(o,A,f,m){return o.then(function(C){return O(C)&&C.state==="fulfilled"&&C.value.length>0?C:A.geocode(f,m).then(function(y){return{state:"fulfilled",value:y}}).catch(function(y){return{state:"rejected",reason:y}})})}function D_i(o,A,f){let m=o._searchText;if(got(m)){o.showSuggestions();return}o._isSearchInProgress=!0;let C=Promise.resolve();for(let y=0;y<A.length;y++)C=S_i(C,A[y],m,f);o._geocodePromise=C,C.then(function(y){if(C.cancel)return;o._isSearchInProgress=!1;let x=y.value;if(y.state==="fulfilled"&&O(x)&&x.length>0){o._searchText=x[0].displayName,o.destinationFound(o,x[0].destination);return}o._searchText=`${m} (not found)`})}function T_i(o,A){let f=iA(o._viewContainer),m=f.getElementsByClassName("search-results")[0],C=f.getElementsByTagName("li")[A];if(A===0){m.scrollTop=0;return}let y=C.offsetTop;y+C.clientHeight>m.clientHeight?m.scrollTop=y+C.clientHeight:y<m.scrollTop&&(m.scrollTop=y)}function M_i(o){o._isSearchInProgress=!1,O(o._geocodePromise)&&(o._geocodePromise.cancel=!0,o._geocodePromise=void 0)}function got(o){return/^\s*$/.test(o)}function pot(o){gr.getObservable(o,"_suggestions").removeAll()}function P_i(o){if(!o.autoComplete)return;let A=o._searchText;if(pot(o),got(A))return;let f=Promise.resolve([]);return o._geocoderServices.forEach(function(m){f=f.then(function(C){return C.length>=5?C:m.geocode(A,jJ.AUTOCOMPLETE).then(function(y){return C=C.concat(y),C})})}),f.then(function(m){let C=o._suggestions;for(let y=0;y<m.length;y++)C.push(m[y])})}KD.flyToDestination=Q_i;KD._updateSearchSuggestions=P_i;KD._adjustSuggestionsScroll=T_i;var TQe=KD,R_i="M29.772,26.433l-7.126-7.126c0.96-1.583,1.523-3.435,1.524-5.421C24.169,8.093,19.478,3.401,13.688,3.399C7.897,3.401,3.204,8.093,3.204,13.885c0,5.789,4.693,10.481,10.484,10.481c1.987,0,3.839-0.563,5.422-1.523l7.128,7.127L29.772,26.433zM7.203,13.885c0.006-3.582,2.903-6.478,6.484-6.486c3.579,0.008,6.478,2.904,6.484,6.486c-0.007,3.58-2.905,6.476-6.484,6.484C10.106,20.361,7.209,17.465,7.203,13.885z",L_i="M24.778,21.419 19.276,15.917 24.777,10.415 21.949,7.585 16.447,13.087 10.945,7.585 8.117,10.415 13.618,15.917 8.116,21.419 10.946,24.248 16.447,18.746 21.948,24.248z";function Uoe(o){let A=iA(o.container),f=new TQe(o);f._startSearchPath=R_i,f._stopSearchPath=L_i;let m=document.createElement("form");m.setAttribute("data-bind","submit: search");let C=document.createElement("input");C.type="search",C.className="cesium-geocoder-input",C.setAttribute("placeholder","Enter an address or landmark..."),C.setAttribute("data-bind",'textInput: searchText,disable: isSearchInProgress,event: { keyup: handleKeyUp, keydown: handleKeyDown, mouseover: deselectSuggestion },css: { "cesium-geocoder-input-wide" : keepExpanded || searchText.length > 0 },hasFocus: _focusTextbox'),this._onTextBoxFocus=function(){setTimeout(function(){C.select()},0)},C.addEventListener("focus",this._onTextBoxFocus,!1),m.appendChild(C),this._textBox=C;let y=document.createElement("span");y.className="cesium-geocoder-searchButton",y.setAttribute("data-bind","click: search,cesiumSvgPath: { path: isSearchInProgress ? _stopSearchPath : _startSearchPath, width: 32, height: 32 }"),m.appendChild(y),A.appendChild(m);let x=document.createElement("div");x.className="search-results",x.setAttribute("data-bind","visible: _suggestionsVisible");let v=document.createElement("ul");v.setAttribute("data-bind","foreach: _suggestions");let E=document.createElement("li");v.appendChild(E),E.setAttribute("data-bind","text: $data.displayName, click: $parent.activateSuggestion, event: { mouseover: $parent.handleMouseover}, css: { active: $data === $parent._selectedSuggestion }"),x.appendChild(v),A.appendChild(x),gr.applyBindings(f,m),gr.applyBindings(f,x),this._container=A,this._searchSuggestionsContainer=x,this._viewModel=f,this._form=m,this._onInputBegin=function(I){let w=I.target;typeof I.composedPath=="function"&&(w=I.composedPath()[0]),A.contains(w)||(f._focusTextbox=!1,f.hideSuggestions())},this._onInputEnd=function(I){f._focusTextbox=!0,f.showSuggestions()},Mo.supportsPointerEvents()?(document.addEventListener("pointerdown",this._onInputBegin,!0),A.addEventListener("pointerup",this._onInputEnd,!0),A.addEventListener("pointercancel",this._onInputEnd,!0)):(document.addEventListener("mousedown",this._onInputBegin,!0),A.addEventListener("mouseup",this._onInputEnd,!0),document.addEventListener("touchstart",this._onInputBegin,!0),A.addEventListener("touchend",this._onInputEnd,!0),A.addEventListener("touchcancel",this._onInputEnd,!0))}Object.defineProperties(Uoe.prototype,{container:{get:function(){return this._container}},searchSuggestionsContainer:{get:function(){return this._searchSuggestionsContainer}},viewModel:{get:function(){return this._viewModel}}});Uoe.prototype.isDestroyed=function(){return!1};Uoe.prototype.destroy=function(){let o=this._container;return Mo.supportsPointerEvents()?(document.removeEventListener("pointerdown",this._onInputBegin,!0),o.removeEventListener("pointerup",this._onInputEnd,!0)):(document.removeEventListener("mousedown",this._onInputBegin,!0),o.removeEventListener("mouseup",this._onInputEnd,!0),document.removeEventListener("touchstart",this._onInputBegin,!0),o.removeEventListener("touchend",this._onInputEnd,!0)),this._viewModel.destroy(),gr.cleanNode(this._form),gr.cleanNode(this._searchSuggestionsContainer),o.removeChild(this._form),o.removeChild(this._searchSuggestionsContainer),this._textBox.removeEventListener("focus",this._onTextBoxFocus,!1),Qr(this)};var MQe=Uoe;function mot(o,A){this._scene=o,this._duration=A;let f=this;this._command=Hl(function(){f._scene.camera.flyHome(f._duration)}),this.tooltip="View Home",gr.track(this,["tooltip"])}Object.defineProperties(mot.prototype,{scene:{get:function(){return this._scene}},command:{get:function(){return this._command}},duration:{get:function(){return this._duration},set:function(o){this._duration=o}}});var PQe=mot;function Goe(o,A,f){o=iA(o);let m=new PQe(A,f);m._svgPath="M14,4l-10,8.75h20l-4.25-3.7188v-4.6562h-2.812v2.1875l-2.938-2.5625zm-7.0938,9.906v10.094h14.094v-10.094h-14.094zm2.1876,2.313h3.3122v4.25h-3.3122v-4.25zm5.8442,1.281h3.406v6.438h-3.406v-6.438z";let C=document.createElement("button");C.type="button",C.className="cesium-button cesium-toolbar-button cesium-home-button",C.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 28, height: 28 }"),o.appendChild(C),gr.applyBindings(m,C),this._container=o,this._viewModel=m,this._element=C}Object.defineProperties(Goe.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Goe.prototype.isDestroyed=function(){return!1};Goe.prototype.destroy=function(){return gr.cleanNode(this._element),this._container.removeChild(this._element),Qr(this)};var RQe=Goe,F_i="M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4853444 22.104033 11.423165 24.0625 13.84375 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 8.975298 28.305952 7.03125 25.875 7.03125 L 13.84375 7.03125 z",N_i="M 27.34375 1.65625 L 5.28125 27.9375 L 8.09375 30.3125 L 30.15625 4.03125 L 27.34375 1.65625 z M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4724893 20.232036 9.5676108 20.7379 9.75 21.21875 L 21.65625 7.03125 L 13.84375 7.03125 z M 28.21875 7.71875 L 14.53125 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 9.8371439 29.456025 8.4902779 28.21875 7.71875 z";function LQe(){this._cameraClicked=new br,this._closeClicked=new br,this.maxHeight=500,this.enableCamera=!1,this.isCameraTracking=!1,this.showInfo=!1,this.titleText="",this.description="",gr.track(this,["showInfo","titleText","description","maxHeight","enableCamera","isCameraTracking"]),this._loadingIndicatorHtml='<div class="cesium-infoBox-loadingContainer"><span class="cesium-infoBox-loading"></span></div>',this.cameraIconPath=void 0,gr.defineProperty(this,"cameraIconPath",{get:function(){return!this.enableCamera||this.isCameraTracking?N_i:F_i}}),gr.defineProperty(this,"_bodyless",{get:function(){return!O(this.description)||this.description.length===0}})}LQe.prototype.maxHeightOffset=function(o){return`${this.maxHeight-o}px`};Object.defineProperties(LQe.prototype,{cameraClicked:{get:function(){return this._cameraClicked}},closeClicked:{get:function(){return this._closeClicked}}});var FQe=LQe;function Hoe(o){o=iA(o);let A=document.createElement("div");A.className="cesium-infoBox",A.setAttribute("data-bind",'css: { "cesium-infoBox-visible" : showInfo, "cesium-infoBox-bodyless" : _bodyless }'),o.appendChild(A);let f=document.createElement("div");f.className="cesium-infoBox-title",f.setAttribute("data-bind","text: titleText"),A.appendChild(f);let m=document.createElement("button");m.type="button",m.className="cesium-button cesium-infoBox-camera",m.setAttribute("data-bind",'attr: { title: "Focus camera on object" },click: function () { cameraClicked.raiseEvent(this); },enable: enableCamera,cesiumSvgPath: { path: cameraIconPath, width: 32, height: 32 }'),A.appendChild(m);let C=document.createElement("button");C.type="button",C.className="cesium-infoBox-close",C.setAttribute("data-bind","click: function () { closeClicked.raiseEvent(this); }"),C.innerHTML="&times;",A.appendChild(C);let y=document.createElement("iframe");y.className="cesium-infoBox-iframe",y.setAttribute("sandbox","allow-same-origin allow-popups allow-forms"),y.setAttribute("data-bind","style : { maxHeight : maxHeightOffset(40) }"),y.setAttribute("allowfullscreen",!0),A.appendChild(y);let x=new FQe;gr.applyBindings(x,A),this._container=o,this._element=A,this._frame=y,this._viewModel=x,this._descriptionSubscription=void 0;let v=this;y.addEventListener("load",function(){let E=y.contentDocument,I=E.createElement("link");I.href=xs("Widgets/InfoBox/InfoBoxDescription.css"),I.rel="stylesheet",I.type="text/css";let w=E.createElement("div");w.className="cesium-infoBox-description",E.head.appendChild(I),E.body.appendChild(w),v._descriptionSubscription=WE(x,"description",function(Q){y.style.height="5px",w.innerHTML=Q;let M=null,B=w.firstElementChild;if(B!==null&&w.childNodes.length===1){let D=window.getComputedStyle(B);if(D!==null){let F=D["background-color"],L=At.fromCssColorString(F);O(L)&&L.alpha!==0&&(M=D["background-color"])}}A.style["background-color"]=M;let T=w.getBoundingClientRect().height;y.style.height=`${T}px`})}),y.setAttribute("src","about:blank")}Object.defineProperties(Hoe.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}},frame:{get:function(){return this._frame}}});Hoe.prototype.isDestroyed=function(){return!1};Hoe.prototype.destroy=function(){let o=this._container;return gr.cleanNode(this._element),o.removeChild(this._element),O(this._descriptionSubscription)&&this._descriptionSubscription.dispose(),Qr(this)};var NQe=Hoe;function Cot(){this.showInstructions=!1;let o=this;this._command=Hl(function(){o.showInstructions=!o.showInstructions}),this._showClick=Hl(function(){o._touch=!1}),this._showTouch=Hl(function(){o._touch=!0}),this._touch=!1,this.tooltip="Navigation Instructions",gr.track(this,["tooltip","showInstructions","_touch"])}Object.defineProperties(Cot.prototype,{command:{get:function(){return this._command}},showClick:{get:function(){return this._showClick}},showTouch:{get:function(){return this._showTouch}}});var kQe=Cot;function Voe(o){let A=iA(o.container),f=new kQe,m=Ae(o.instructionsInitiallyVisible,!1);f.showInstructions=m,f._svgPath="M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466z M17.328,24.371h-2.707v-2.596h2.707V24.371zM17.328,19.003v0.858h-2.707v-1.057c0-3.19,3.63-3.696,3.63-5.963c0-1.034-0.924-1.826-2.134-1.826c-1.254,0-2.354,0.924-2.354,0.924l-1.541-1.915c0,0,1.519-1.584,4.137-1.584c2.487,0,4.796,1.54,4.796,4.136C21.156,16.208,17.328,16.627,17.328,19.003z";let C=document.createElement("span");C.className="cesium-navigationHelpButton-wrapper",A.appendChild(C);let y=document.createElement("button");y.type="button",y.className="cesium-button cesium-toolbar-button cesium-navigation-help-button",y.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }"),C.appendChild(y);let x=document.createElement("div");x.className="cesium-navigation-help",x.setAttribute("data-bind",'css: { "cesium-navigation-help-visible" : showInstructions}'),C.appendChild(x);let v=document.createElement("button");v.type="button",v.className="cesium-navigation-button cesium-navigation-button-left",v.setAttribute("data-bind",'click: showClick, css: {"cesium-navigation-button-selected": !_touch, "cesium-navigation-button-unselected": _touch}');let E=document.createElement("img");E.src=xs("Widgets/Images/NavigationHelp/Mouse.svg"),E.className="cesium-navigation-button-icon",E.style.width="25px",E.style.height="25px",v.appendChild(E),v.appendChild(document.createTextNode("Mouse"));let I=document.createElement("button");I.type="button",I.className="cesium-navigation-button cesium-navigation-button-right",I.setAttribute("data-bind",'click: showTouch, css: {"cesium-navigation-button-selected": _touch, "cesium-navigation-button-unselected": !_touch}');let w=document.createElement("img");w.src=xs("Widgets/Images/NavigationHelp/Touch.svg"),w.className="cesium-navigation-button-icon",w.style.width="25px",w.style.height="25px",I.appendChild(w),I.appendChild(document.createTextNode("Touch")),x.appendChild(v),x.appendChild(I);let Q=document.createElement("div");Q.className="cesium-click-navigation-help cesium-navigation-help-instructions",Q.setAttribute("data-bind",'css: { "cesium-click-navigation-help-visible" : !_touch}'),Q.innerHTML=`            <table>                <tr>                    <td><img src="${xs("Widgets/Images/NavigationHelp/MouseLeft.svg")}" width="48" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-pan">Pan view</div>                        <div class="cesium-navigation-help-details">Left click + drag</div>                    </td>                </tr>                <tr>                    <td><img src="${xs("Widgets/Images/NavigationHelp/MouseRight.svg")}" width="48" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-zoom">Zoom view</div>                        <div class="cesium-navigation-help-details">Right click + drag, or</div>                        <div class="cesium-navigation-help-details">Mouse wheel scroll</div>                    </td>                </tr>                <tr>                    <td><img src="${xs("Widgets/Images/NavigationHelp/MouseMiddle.svg")}" width="48" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-rotate">Rotate view</div>                        <div class="cesium-navigation-help-details">Middle click + drag, or</div>                        <div class="cesium-navigation-help-details">CTRL + Left/Right click + drag</div>                    </td>                </tr>            </table>`,x.appendChild(Q);let M=document.createElement("div");M.className="cesium-touch-navigation-help cesium-navigation-help-instructions",M.setAttribute("data-bind",'css: { "cesium-touch-navigation-help-visible" : _touch}'),M.innerHTML=`            <table>                <tr>                    <td><img src="${xs("Widgets/Images/NavigationHelp/TouchDrag.svg")}" width="70" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-pan">Pan view</div>                        <div class="cesium-navigation-help-details">One finger drag</div>                    </td>                </tr>                <tr>                    <td><img src="${xs("Widgets/Images/NavigationHelp/TouchZoom.svg")}" width="70" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-zoom">Zoom view</div>                        <div class="cesium-navigation-help-details">Two finger pinch</div>                    </td>                </tr>                <tr>                    <td><img src="${xs("Widgets/Images/NavigationHelp/TouchTilt.svg")}" width="70" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-rotate">Tilt view</div>                        <div class="cesium-navigation-help-details">Two finger drag, same direction</div>                    </td>                </tr>                <tr>                    <td><img src="${xs("Widgets/Images/NavigationHelp/TouchRotate.svg")}" width="70" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-tilt">Rotate view</div>                        <div class="cesium-navigation-help-details">Two finger drag, opposite direction</div>                    </td>                </tr>            </table>`,x.appendChild(M),gr.applyBindings(f,C),this._container=A,this._viewModel=f,this._wrapper=C,this._closeInstructions=function(B){C.contains(B.target)||(f.showInstructions=!1)},Mo.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeInstructions,!0):(document.addEventListener("mousedown",this._closeInstructions,!0),document.addEventListener("touchstart",this._closeInstructions,!0))}Object.defineProperties(Voe.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Voe.prototype.isDestroyed=function(){return!1};Voe.prototype.destroy=function(){return Mo.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeInstructions,!0):(document.removeEventListener("mousedown",this._closeInstructions,!0),document.removeEventListener("touchstart",this._closeInstructions,!0)),gr.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),Qr(this)};var OQe=Voe;function zoe(o){this._scene=o,this._orthographic=o.camera.frustum instanceof Ss,this._flightInProgress=!1,this.dropDownVisible=!1,this.tooltipPerspective="Perspective Projection",this.tooltipOrthographic="Orthographic Projection",this.selectedTooltip=void 0,this.sceneMode=o.mode,gr.track(this,["_orthographic","_flightInProgress","sceneMode","dropDownVisible","tooltipPerspective","tooltipOrthographic"]);let A=this;gr.defineProperty(this,"selectedTooltip",function(){return A._orthographic?A.tooltipOrthographic:A.tooltipPerspective}),this._toggleDropDown=Hl(function(){A.sceneMode===xi.SCENE2D||A._flightInProgress||(A.dropDownVisible=!A.dropDownVisible)}),this._eventHelper=new Mx,this._eventHelper.add(o.morphComplete,function(f,m,C,y){A.sceneMode=C,A._orthographic=C===xi.SCENE2D||A._scene.camera.frustum instanceof Ss}),this._eventHelper.add(o.preRender,function(){A._flightInProgress=O(o.camera._currentFlight)}),this._switchToPerspective=Hl(function(){A.sceneMode!==xi.SCENE2D&&(A._scene.camera.switchToPerspectiveFrustum(),A._orthographic=!1,A.dropDownVisible=!1)}),this._switchToOrthographic=Hl(function(){A.sceneMode!==xi.SCENE2D&&(A._scene.camera.switchToOrthographicFrustum(),A._orthographic=!0,A.dropDownVisible=!1)}),this._sceneMode=xi}Object.defineProperties(zoe.prototype,{scene:{get:function(){return this._scene}},toggleDropDown:{get:function(){return this._toggleDropDown}},switchToPerspective:{get:function(){return this._switchToPerspective}},switchToOrthographic:{get:function(){return this._switchToOrthographic}},isOrthographicProjection:{get:function(){return this._orthographic}}});zoe.prototype.isDestroyed=function(){return!1};zoe.prototype.destroy=function(){this._eventHelper.removeAll(),Qr(this)};var UQe=zoe,k_i="M 28.15625,10.4375 9.125,13.21875 13.75,43.25 41.75,55.09375 50.8125,37 54.5,11.9375 z m 0.125,3 19.976451,0.394265 L 43.03125,16.875 22.6875,14.28125 z M 50.971746,15.705477 47.90625,36.03125 42.53125,46 44.84375,19.3125 z M 12.625,16.03125 l 29.15625,3.6875 -2.65625,31 L 16.4375,41.125 z",O_i="m 31.560594,6.5254438 -20.75,12.4687502 0.1875,24.5625 22.28125,11.8125 19.5,-12 0.65625,-0.375 0,-0.75 0.0312,-23.21875 z m 0.0625,3.125 16.65625,9.5000002 -16.125,10.28125 -17.34375,-9.71875 z m 18.96875,11.1875002 0.15625,20.65625 -17.46875,10.59375 0.15625,-20.28125 z m -37.0625,1.25 17.21875,9.625 -0.15625,19.21875 -16.9375,-9 z";function Koe(o,A){o=iA(o);let f=new UQe(A);f._perspectivePath=k_i,f._orthographicPath=O_i;let m=document.createElement("span");m.className="cesium-projectionPicker-wrapper cesium-toolbar-button",o.appendChild(m);let C=document.createElement("button");C.type="button",C.className="cesium-button cesium-toolbar-button",C.setAttribute("data-bind",'css: { "cesium-projectionPicker-buttonPerspective": !_orthographic,       "cesium-projectionPicker-buttonOrthographic": _orthographic,       "cesium-button-disabled" : sceneMode === _sceneMode.SCENE2D || _flightInProgress,        "cesium-projectionPicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),C.innerHTML='<!-- ko cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64, css: "cesium-projectionPicker-iconPerspective" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64, css: "cesium-projectionPicker-iconOrthographic" } --><!-- /ko -->',m.appendChild(C);let y=document.createElement("button");y.type="button",y.className="cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon",y.setAttribute("data-bind",'css: { "cesium-projectionPicker-visible" : (dropDownVisible && _orthographic),       "cesium-projectionPicker-none" : !_orthographic,       "cesium-projectionPicker-hidden" : !dropDownVisible },attr: { title: tooltipPerspective },click: switchToPerspective,cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64 }'),m.appendChild(y);let x=document.createElement("button");x.type="button",x.className="cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon",x.setAttribute("data-bind",'css: { "cesium-projectionPicker-visible" : (dropDownVisible && !_orthographic),       "cesium-projectionPicker-none" : _orthographic,       "cesium-projectionPicker-hidden" : !dropDownVisible},attr: { title: tooltipOrthographic },click: switchToOrthographic,cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64 }'),m.appendChild(x),gr.applyBindings(f,m),this._viewModel=f,this._container=o,this._wrapper=m,this._closeDropDown=function(v){m.contains(v.target)||(f.dropDownVisible=!1)},Mo.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(Koe.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Koe.prototype.isDestroyed=function(){return!1};Koe.prototype.destroy=function(){return this._viewModel.destroy(),Mo.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),gr.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),Qr(this)};var GQe=Koe;function Yoe(o,A){this._scene=o;let f=this,m=function(C,y,x,v){f.sceneMode=x,f.dropDownVisible=!1};this._eventHelper=new Mx,this._eventHelper.add(o.morphStart,m),this._duration=Ae(A,2),this.sceneMode=o.mode,this.dropDownVisible=!1,this.tooltip2D="2D",this.tooltip3D="3D",this.tooltipColumbusView="Columbus View",gr.track(this,["sceneMode","dropDownVisible","tooltip2D","tooltip3D","tooltipColumbusView"]),this.selectedTooltip=void 0,gr.defineProperty(this,"selectedTooltip",function(){let C=f.sceneMode;return C===xi.SCENE2D?f.tooltip2D:C===xi.SCENE3D?f.tooltip3D:f.tooltipColumbusView}),this._toggleDropDown=Hl(function(){f.dropDownVisible=!f.dropDownVisible}),this._morphTo2D=Hl(function(){o.morphTo2D(f._duration)}),this._morphTo3D=Hl(function(){o.morphTo3D(f._duration)}),this._morphToColumbusView=Hl(function(){o.morphToColumbusView(f._duration)}),this._sceneMode=xi}Object.defineProperties(Yoe.prototype,{scene:{get:function(){return this._scene}},duration:{get:function(){return this._duration},set:function(o){this._duration=o}},toggleDropDown:{get:function(){return this._toggleDropDown}},morphTo2D:{get:function(){return this._morphTo2D}},morphTo3D:{get:function(){return this._morphTo3D}},morphToColumbusView:{get:function(){return this._morphToColumbusView}}});Yoe.prototype.isDestroyed=function(){return!1};Yoe.prototype.destroy=function(){this._eventHelper.removeAll(),Qr(this)};var HQe=Yoe,U_i="m 32.401392,4.9330437 c -7.087603,0 -14.096095,2.884602 -19.10793,7.8946843 -5.0118352,5.010083 -7.9296167,11.987468 -7.9296167,19.072999 0,7.085531 2.9177815,14.097848 7.9296167,19.107931 4.837653,4.835961 11.541408,7.631372 18.374354,7.82482 0.05712,0.01231 0.454119,0.139729 0.454119,0.139729 l 0.03493,-0.104797 c 0.08246,7.84e-4 0.162033,0.03493 0.244525,0.03493 0.08304,0 0.161515,-0.03414 0.244526,-0.03493 l 0.03493,0.104797 c 0,0 0.309474,-0.129487 0.349323,-0.139729 6.867765,-0.168094 13.582903,-2.965206 18.444218,-7.82482 2.558195,-2.5573 4.551081,-5.638134 5.903547,-8.977584 1.297191,-3.202966 2.02607,-6.661489 2.02607,-10.130347 0,-6.237309 -2.366261,-12.31219 -6.322734,-17.116794 -0.0034,-0.02316 0.0049,-0.04488 0,-0.06986 -0.01733,-0.08745 -0.104529,-0.278855 -0.104797,-0.279458 -5.31e-4,-0.0012 -0.522988,-0.628147 -0.523984,-0.62878         -3.47e-4,-2.2e-4 -0.133444,-0.03532 -0.244525,-0.06987 C 51.944299,13.447603 51.751076,13.104317 51.474391,12.827728 46.462556,7.8176457 39.488996,4.9330437 32.401392,4.9330437 z m -2.130866,3.5281554 0.104797,9.6762289 c -4.111695,-0.08361 -7.109829,-0.423664 -9.257041,-0.943171 1.198093,-2.269271 2.524531,-4.124404 3.91241,-5.414496 2.167498,-2.0147811 3.950145,-2.8540169 5.239834,-3.3185619 z m 2.794579,0 c 1.280302,0.4754953 3.022186,1.3285948 5.065173,3.2486979 1.424667,1.338973 2.788862,3.303645 3.982275,5.728886 -2.29082,0.403367 -5.381258,0.621049 -8.942651,0.698645 L 33.065105,8.4611991 z m 5.728886,0.2445256 c 4.004072,1.1230822 7.793098,3.1481363 10.724195,6.0782083 0.03468,0.03466 0.07033,0.06991 0.104797,0.104797 -0.45375,0.313891 -0.923054,0.663002 -1.956205,1.082899 -0.647388,0.263114 -1.906242,0.477396 -2.829511,0.733577 -1.382296,-2.988132         -3.027146,-5.368585 -4.785716,-7.0213781 -0.422866,-0.397432 -0.835818,-0.6453247 -1.25756,-0.9781032 z m -15.33525,0.7685092 c -0.106753,0.09503 -0.207753,0.145402 -0.31439,0.244526 -1.684973,1.5662541 -3.298068,3.8232211 -4.680919,6.5672591 -0.343797,-0.14942 -1.035052,-0.273198 -1.292493,-0.419186 -0.956528,-0.542427 -1.362964,-1.022024 -1.537018,-1.292493 -0.0241,-0.03745 -0.01868,-0.0401 -0.03493,-0.06986 2.250095,-2.163342 4.948824,-3.869984 7.859752,-5.0302421 z m -9.641296,7.0912431 c 0.464973,0.571618 0.937729,1.169056 1.956205,1.746612 0.349907,0.198425 1.107143,0.335404 1.537018,0.523983 -1.20166,3.172984 -1.998037,7.051901 -2.165798,11.772162 C 14.256557,30.361384 12.934823,30.161483 12.280427,29.90959 10.644437,29.279855 9.6888882,28.674891 9.1714586,28.267775 8.6540289,27.860658 8.6474751,27.778724 8.6474751,27.778724 l -0.069864,0.03493 C 9.3100294,23.691285         11.163248,19.798527 13.817445,16.565477 z m 37.552149,0.523984 c 2.548924,3.289983 4.265057,7.202594 4.890513,11.318043 -0.650428,0.410896 -1.756876,1.001936 -3.563088,1.606882 -1.171552,0.392383 -3.163859,0.759153 -4.960377,1.117832 -0.04367,-4.752703 -0.784809,-8.591423 -1.88634,-11.807094 0.917574,-0.263678 2.170552,-0.486495 2.864443,-0.76851 1.274693,-0.518066 2.003942,-1.001558 2.654849,-1.467153 z m -31.439008,2.619917 c 2.487341,0.672766 5.775813,1.137775 10.479669,1.222628 l 0.104797,10.689263 0,0.03493 0,0.733577 c -5.435005,-0.09059 -9.512219,-0.519044 -12.610536,-1.117831 0.106127,-4.776683 0.879334,-8.55791 2.02607,-11.562569 z m 23.264866,0.31439 c 1.073459,3.067541 1.833795,6.821314 1.816476,11.702298 -3.054474,0.423245 -7.062018,0.648559 -11.702298,0.698644 l 0,-0.838373 -0.104796,-10.654331 c 4.082416,-0.0864 7.404468,-0.403886 9.990618,-0.908238 z         M 8.2632205,30.922625 c 0.7558676,0.510548 1.5529563,1.013339 3.0041715,1.57195 0.937518,0.360875 2.612202,0.647642 3.91241,0.978102 0.112814,3.85566 0.703989,7.107756 1.606883,9.920754 -1.147172,-0.324262 -2.644553,-0.640648 -3.423359,-0.978102 -1.516688,-0.657177 -2.386627,-1.287332 -2.864443,-1.71168 -0.477816,-0.424347 -0.489051,-0.489051 -0.489051,-0.489051 L 9.8002387,40.319395 C 8.791691,37.621767 8.1584238,34.769583 8.1584238,31.900727 c 0,-0.330153 0.090589,-0.648169 0.1047967,-0.978102 z m 48.2763445,0.419186 c 0.0047,0.188973 0.06986,0.36991 0.06986,0.558916 0,2.938869 -0.620228,5.873558 -1.676747,8.628261 -0.07435,0.07583 -0.06552,0.07411 -0.454119,0.349323 -0.606965,0.429857 -1.631665,1.042044 -3.318562,1.676747 -1.208528,0.454713 -3.204964,0.850894 -5.135038,1.25756 0.84593,-2.765726 1.41808,-6.005357 1.606883,-9.815957 2.232369,-0.413371 4.483758,-0.840201         5.938479,-1.327425 1.410632,-0.472457 2.153108,-0.89469 2.96924,-1.327425 z m -38.530252,2.864443 c 3.208141,0.56697 7.372279,0.898588 12.575603,0.978103 l 0.174662,9.885821 c -4.392517,-0.06139 -8.106722,-0.320566 -10.863925,-0.803441 -1.051954,-2.664695 -1.692909,-6.043794 -1.88634,-10.060483 z m 26.793022,0.31439 c -0.246298,3.923551 -0.877762,7.263679 -1.816476,9.885822 -2.561957,0.361954 -5.766249,0.560708 -9.431703,0.62878 l -0.174661,-9.815957 c 4.491734,-0.04969 8.334769,-0.293032 11.42284,-0.698645 z M 12.035901,44.860585 c 0.09977,0.04523 0.105535,0.09465 0.209594,0.139729 1.337656,0.579602 3.441099,1.058072 5.589157,1.537018 1.545042,3.399208 3.548524,5.969402 5.589157,7.789888 -3.034411,-1.215537 -5.871615,-3.007978 -8.174142,-5.309699 -1.245911,-1.245475 -2.271794,-2.662961 -3.213766,-4.156936 z m 40.69605,0 c -0.941972,1.493975 -1.967855,2.911461         -3.213765,4.156936 -2.74253,2.741571 -6.244106,4.696717 -9.955686,5.868615 0.261347,-0.241079 0.507495,-0.394491 0.768509,-0.663713 1.674841,-1.727516 3.320792,-4.181056 4.645987,-7.265904 2.962447,-0.503021 5.408965,-1.122293 7.161107,-1.781544 0.284034,-0.106865 0.337297,-0.207323 0.593848,-0.31439 z m -31.404076,2.305527 c 2.645807,0.376448 5.701178,0.649995 9.466635,0.698645 l 0.139729,7.789888 c -1.38739,-0.480844 -3.316218,-1.29837 -5.659022,-3.388427 -1.388822,-1.238993 -2.743668,-3.0113 -3.947342,-5.100106 z m 20.365491,0.104797 c -1.04872,2.041937 -2.174337,3.779068 -3.353494,4.995309 -1.853177,1.911459 -3.425515,2.82679 -4.611055,3.353494 l -0.139729,-7.789887 c 3.13091,-0.05714 5.728238,-0.278725 8.104278,-0.558916 z",G_i="m 2.9825053,17.550598 0,1.368113 0,26.267766 0,1.368113 1.36811,0 54.9981397,0 1.36811,0 0,-1.368113 0,-26.267766 0,-1.368113 -1.36811,0 -54.9981397,0 -1.36811,0 z m 2.73623,2.736226 10.3292497,0 0,10.466063 -10.3292497,0 0,-10.466063 z m 13.0654697,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 10.32926,0 0,10.466063 -10.32926,0 0,-10.466063 z m -41.9326497,13.202288 10.3292497,0 0,10.329252 -10.3292497,0 0,-10.329252 z m 13.0654697,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 10.32926,0 0,10.329252 -10.32926,0 0,-10.329252 z",H_i="m 14.723969,17.675598 -0.340489,0.817175 -11.1680536,26.183638 -0.817175,1.872692 2.076986,0 54.7506996,0 2.07698,0 -0.81717,-1.872692 -11.16805,-26.183638 -0.34049,-0.817175 -0.91933,0 -32.414586,0 -0.919322,0 z m 1.838643,2.723916 6.196908,0 -2.928209,10.418977 -7.729111,0 4.460412,-10.418977 z m 9.02297,0 4.903049,0 0,10.418977 -7.831258,0 2.928209,-10.418977 z m 7.626964,0 5.584031,0 2.62176,10.418977 -8.205791,0 0,-10.418977 z m 8.410081,0 5.51593,0 4.46042,10.418977 -7.38863,0 -2.58772,-10.418977 z m -30.678091,13.142892 8.103649,0 -2.89416,10.282782 -9.6018026,0 4.3923136,-10.282782 z m 10.929711,0 8.614384,0 0,10.282782 -11.508544,0 2.89416,-10.282782 z m 11.338299,0 8.852721,0 2.58772,10.282782 -11.440441,0 0,-10.282782 z m 11.678781,0 7.86531,0 4.39231,10.282782 -9.6699,0 -2.58772,-10.282782 z";function Joe(o,A,f){o=iA(o);let m=new HQe(A,f);m._globePath=U_i,m._flatMapPath=G_i,m._columbusViewPath=H_i;let C=document.createElement("span");C.className="cesium-sceneModePicker-wrapper cesium-toolbar-button",o.appendChild(C);let y=document.createElement("button");y.type="button",y.className="cesium-button cesium-toolbar-button",y.setAttribute("data-bind",'css: { "cesium-sceneModePicker-button2D": sceneMode === _sceneMode.SCENE2D,       "cesium-sceneModePicker-button3D": sceneMode === _sceneMode.SCENE3D,       "cesium-sceneModePicker-buttonColumbusView": sceneMode === _sceneMode.COLUMBUS_VIEW,       "cesium-sceneModePicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),y.innerHTML='<!-- ko cesiumSvgPath: { path: _globePath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon3D" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon2D" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-iconColumbusView" } --><!-- /ko -->',C.appendChild(y);let x=document.createElement("button");x.type="button",x.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",x.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE3D)) || (!dropDownVisible && (sceneMode === _sceneMode.SCENE3D)),       "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE3D,       "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip3D },click: morphTo3D,cesiumSvgPath: { path: _globePath, width: 64, height: 64 }'),C.appendChild(x);let v=document.createElement("button");v.type="button",v.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",v.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE2D)),       "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE2D,       "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip2D },click: morphTo2D,cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64 }'),C.appendChild(v);let E=document.createElement("button");E.type="button",E.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",E.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.COLUMBUS_VIEW)) || (!dropDownVisible && (sceneMode === _sceneMode.COLUMBUS_VIEW)),       "cesium-sceneModePicker-none" : sceneMode === _sceneMode.COLUMBUS_VIEW,       "cesium-sceneModePicker-hidden" : !dropDownVisible},attr: { title: tooltipColumbusView },click: morphToColumbusView,cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64 }'),C.appendChild(E),gr.applyBindings(m,C),this._viewModel=m,this._container=o,this._wrapper=C,this._closeDropDown=function(I){C.contains(I.target)||(m.dropDownVisible=!1)},Mo.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(Joe.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Joe.prototype.isDestroyed=function(){return!1};Joe.prototype.destroy=function(){return this._viewModel.destroy(),Mo.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),gr.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),Qr(this)};var VQe=Joe,V_i=new Bt,eie="-1000px";function qJ(o,A,f){this._scene=o,this._screenPositionX=eie,this._screenPositionY=eie,this._tweens=o.tweens,this._container=Ae(f,document.body),this._selectionIndicatorElement=A,this._scale=1,this.position=void 0,this.showSelection=!1,gr.track(this,["position","_screenPositionX","_screenPositionY","_scale","showSelection"]),this.isVisible=void 0,gr.defineProperty(this,"isVisible",{get:function(){return this.showSelection&&O(this.position)}}),gr.defineProperty(this,"_transform",{get:function(){return`scale(${this._scale})`}}),this.computeScreenSpacePosition=function(m,C){return Qs.wgs84ToWindowCoordinates(o,m,C)}}qJ.prototype.update=function(){if(this.showSelection&&O(this.position)){let o=this.computeScreenSpacePosition(this.position,V_i);if(!O(o))this._screenPositionX=eie,this._screenPositionY=eie;else{let A=this._container,f=A.parentNode.clientWidth,m=A.parentNode.clientHeight,C=this._selectionIndicatorElement.clientWidth,y=C*.5;o.x=Math.min(Math.max(o.x,-C),f+C)-y,o.y=Math.min(Math.max(o.y,-C),m+C)-y,this._screenPositionX=`${Math.floor(o.x+.25)}px`,this._screenPositionY=`${Math.floor(o.y+.25)}px`}}};qJ.prototype.animateAppear=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:2,stopValue:1,duration:.8,easingFunction:Ix.EXPONENTIAL_OUT})};qJ.prototype.animateDepart=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:this._scale,stopValue:1.5,duration:.8,easingFunction:Ix.EXPONENTIAL_OUT})};Object.defineProperties(qJ.prototype,{container:{get:function(){return this._container}},selectionIndicatorElement:{get:function(){return this._selectionIndicatorElement}},scene:{get:function(){return this._scene}}});var zQe=qJ;function Woe(o,A){o=iA(o),this._container=o;let f=document.createElement("div");f.className="cesium-selection-wrapper",f.setAttribute("data-bind",'style: { "top" : _screenPositionY, "left" : _screenPositionX },css: { "cesium-selection-wrapper-visible" : isVisible }'),o.appendChild(f),this._element=f;let m="http://www.w3.org/2000/svg",C="M -34 -34 L -34 -11.25 L -30 -15.25 L -30 -30 L -15.25 -30 L -11.25 -34 L -34 -34 z M 11.25 -34 L 15.25 -30 L 30 -30 L 30 -15.25 L 34 -11.25 L 34 -34 L 11.25 -34 z M -34 11.25 L -34 34 L -11.25 34 L -15.25 30 L -30 30 L -30 15.25 L -34 11.25 z M 34 11.25 L 30 15.25 L 30 30 L 15.25 30 L 11.25 34 L 34 34 L 34 11.25 z",y=document.createElementNS(m,"svg:svg");y.setAttribute("width",160),y.setAttribute("height",160),y.setAttribute("viewBox","0 0 160 160");let x=document.createElementNS(m,"g");x.setAttribute("transform","translate(80,80)"),y.appendChild(x);let v=document.createElementNS(m,"path");v.setAttribute("data-bind","attr: { transform: _transform }"),v.setAttribute("d",C),x.appendChild(v),f.appendChild(y);let E=new zQe(A,this._element,this._container);this._viewModel=E,gr.applyBindings(this._viewModel,this._element)}Object.defineProperties(Woe.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Woe.prototype.isDestroyed=function(){return!1};Woe.prototype.destroy=function(){let o=this._container;return gr.cleanNode(this._element),o.removeChild(this._element),Qr(this)};var KQe=Woe;function IO(o,A,f){this._color=o,this._height=A,this._base=Ae(f,0)}IO.prototype.getHeight=function(){return this._height};IO.prototype.getBase=function(){return this._base};IO.prototype.getStartTime=function(){return this._start};IO.prototype.getStopTime=function(){return this._stop};IO.prototype.setRange=function(o,A){this._start=o,this._stop=A};IO.prototype.render=function(o){let A="";if(this._start&&this._stop&&this._color){let f=fi.secondsDifference(this._start,o.epochJulian),m=Math.round(o.timeBarWidth*o.getAlpha(f)),C=fi.secondsDifference(this._stop,o.epochJulian),y=Math.round(o.timeBarWidth*o.getAlpha(C))-m;m<0&&(y+=m,m=0),m+y>o.timeBarWidth&&(y=o.timeBarWidth-m),y>0&&(A=`<span class="cesium-timeline-highlight" style="left: ${m.toString()}px; width: ${y.toString()}px; bottom: ${this._base.toString()}px; height: ${this._height}px; background-color: ${this._color};"></span>`)}return A};var YQe=IO;function yot(o,A,f,m){this.interval=o,this.height=A,this.color=f||new At(.5,.5,.5,1),this.backgroundColor=m||new At(0,0,0,0)}yot.prototype.render=function(o,A){let f=this.interval.start,m=this.interval.stop,C=A.startJulian,y=fi.addSeconds(A.startJulian,A.duration,new fi);if(fi.lessThan(f,C)&&fi.greaterThan(m,y))o.fillStyle=this.color.toCssColorString(),o.fillRect(0,A.y,A.timeBarWidth,this.height);else if(fi.lessThanOrEquals(f,y)&&fi.greaterThanOrEquals(m,C)){let x,v,E;for(x=0;x<A.timeBarWidth;++x){let I=fi.addSeconds(A.startJulian,x/A.timeBarWidth*A.duration,new fi);!O(v)&&fi.greaterThanOrEquals(I,f)?v=x:!O(E)&&fi.greaterThanOrEquals(I,m)&&(E=x)}o.fillStyle=this.backgroundColor.toCssColorString(),o.fillRect(0,A.y,A.timeBarWidth,this.height),O(v)&&(O(E)||(E=A.timeBarWidth),o.fillStyle=this.color.toCssColorString(),o.fillRect(v,A.y,Math.max(E-v,1),this.height))}};var JQe=yot,Oge=1e12,F1={none:0,scrub:1,slide:2,zoom:3,touchOnly:4},_v={none:0,scrub:1,slideZoom:2,singleTap:3,ignore:4},IL=[.001,.002,.005,.01,.02,.05,.1,.25,.5,1,2,5,10,15,30,60,120,300,600,900,1800,3600,7200,14400,21600,43200,86400,172800,345600,604800,1296e3,2592e3,5184e3,7776e3,15552e3,31536e3,63072e3,126144e3,15768e4,31536e4,63072e4,126144e4,15768e5,31536e5,63072e5,126144e5,15768e6,31536e6];function Jv(o,A){o=iA(o);let f=o.ownerDocument;this.container=o;let m=f.createElement("div");m.className="cesium-timeline-main",o.appendChild(m),this._topDiv=m,this._endJulian=void 0,this._epochJulian=void 0,this._lastXPos=void 0,this._scrubElement=void 0,this._startJulian=void 0,this._timeBarSecondsSpan=void 0,this._clock=A,this._scrubJulian=A.currentTime,this._mainTicSpan=-1,this._mouseMode=F1.none,this._touchMode=_v.none,this._touchState={centerX:0,spanX:0},this._mouseX=0,this._timelineDrag=0,this._timelineDragLocation=void 0,this._lastHeight=void 0,this._lastWidth=void 0,this._topDiv.innerHTML='<div class="cesium-timeline-bar"></div><div class="cesium-timeline-trackContainer"><canvas class="cesium-timeline-tracks" width="10" height="1"></canvas></div><div class="cesium-timeline-needle"></div><span class="cesium-timeline-ruler"></span>',this._timeBarEle=this._topDiv.childNodes[0],this._trackContainer=this._topDiv.childNodes[1],this._trackListEle=this._topDiv.childNodes[1].childNodes[0],this._needleEle=this._topDiv.childNodes[2],this._rulerEle=this._topDiv.childNodes[3],this._context=this._trackListEle.getContext("2d"),this._trackList=[],this._highlightRanges=[],this.zoomTo(A.startTime,A.stopTime),this._onMouseDown=z_i(this),this._onMouseUp=K_i(this),this._onMouseMove=Y_i(this),this._onMouseWheel=J_i(this),this._onTouchStart=W_i(this),this._onTouchMove=q_i(this),this._onTouchEnd=j_i(this);let C=this._timeBarEle;f.addEventListener("mouseup",this._onMouseUp,!1),f.addEventListener("mousemove",this._onMouseMove,!1),C.addEventListener("mousedown",this._onMouseDown,!1),C.addEventListener("DOMMouseScroll",this._onMouseWheel,!1),C.addEventListener("mousewheel",this._onMouseWheel,!1),C.addEventListener("touchstart",this._onTouchStart,!1),C.addEventListener("touchmove",this._onTouchMove,!1),C.addEventListener("touchend",this._onTouchEnd,!1),C.addEventListener("touchcancel",this._onTouchEnd,!1),this._topDiv.oncontextmenu=function(){return!1},A.onTick.addEventListener(this.updateFromClock,this),this.updateFromClock()}Jv.prototype.addEventListener=function(o,A,f){this._topDiv.addEventListener(o,A,f)};Jv.prototype.removeEventListener=function(o,A,f){this._topDiv.removeEventListener(o,A,f)};Jv.prototype.isDestroyed=function(){return!1};Jv.prototype.destroy=function(){this._clock.onTick.removeEventListener(this.updateFromClock,this);let o=this.container.ownerDocument;o.removeEventListener("mouseup",this._onMouseUp,!1),o.removeEventListener("mousemove",this._onMouseMove,!1);let A=this._timeBarEle;A.removeEventListener("mousedown",this._onMouseDown,!1),A.removeEventListener("DOMMouseScroll",this._onMouseWheel,!1),A.removeEventListener("mousewheel",this._onMouseWheel,!1),A.removeEventListener("touchstart",this._onTouchStart,!1),A.removeEventListener("touchmove",this._onTouchMove,!1),A.removeEventListener("touchend",this._onTouchEnd,!1),A.removeEventListener("touchcancel",this._onTouchEnd,!1),this.container.removeChild(this._topDiv),Qr(this)};Jv.prototype.addHighlightRange=function(o,A,f){let m=new YQe(o,A,f);return this._highlightRanges.push(m),this.resize(),m};Jv.prototype.addTrack=function(o,A,f,m){let C=new JQe(o,A,f,m);return this._trackList.push(C),this._lastHeight=void 0,this.resize(),C};Jv.prototype.zoomTo=function(o,A){if(this._startJulian=o,this._endJulian=A,this._timeBarSecondsSpan=fi.secondsDifference(A,o),this._clock&&this._clock.clockRange!==aC.UNBOUNDED){let m=this._clock.startTime,C=this._clock.stopTime,y=fi.secondsDifference(C,m),x=fi.secondsDifference(m,this._startJulian),v=fi.secondsDifference(C,this._endJulian);this._timeBarSecondsSpan>=y?(this._timeBarSecondsSpan=y,this._startJulian=this._clock.startTime,this._endJulian=this._clock.stopTime):x>0?(this._endJulian=fi.addSeconds(this._endJulian,x,new fi),this._startJulian=m,this._timeBarSecondsSpan=fi.secondsDifference(this._endJulian,this._startJulian)):v<0&&(this._startJulian=fi.addSeconds(this._startJulian,v,new fi),this._endJulian=C,this._timeBarSecondsSpan=fi.secondsDifference(this._endJulian,this._startJulian))}this._makeTics();let f=document.createEvent("Event");f.initEvent("setzoom",!0,!0),f.startJulian=this._startJulian,f.endJulian=this._endJulian,f.epochJulian=this._epochJulian,f.totalSpan=this._timeBarSecondsSpan,f.mainTicSpan=this._mainTicSpan,this._topDiv.dispatchEvent(f)};Jv.prototype.zoomFrom=function(o){let A=fi.secondsDifference(this._scrubJulian,this._startJulian);o>1||A<0||A>this._timeBarSecondsSpan?A=this._timeBarSecondsSpan*.5:A+=A-this._timeBarSecondsSpan*.5;let f=this._timeBarSecondsSpan-A;this.zoomTo(fi.addSeconds(this._startJulian,A-A*o,new fi),fi.addSeconds(this._endJulian,f*o-f,new fi))};Jv.prototype.makeLabel=function(o){let A=new Date(o);return`${A.getFullYear()} ${A.getMonth()+1} ${A.getDate()-1} ${A.getHours()}:${A.getMinutes()}:${A.getSeconds()}`};Jv.prototype.smallestTicInPixels=7;Jv.prototype._makeTics=function(){let o=this._timeBarEle,A=fi.secondsDifference(this._scrubJulian,this._startJulian),f=Math.round(A*this._topDiv.clientWidth/this._timeBarSecondsSpan),m=f-8,C,y=this;this._needleEle.style.left=`${f.toString()}px`;let x="",v=.01,E=31536e6,I=1e-10,w=0,Q=this._timeBarSecondsSpan;Q<v?(Q=v,this._timeBarSecondsSpan=v,this._endJulian=fi.addSeconds(this._startJulian,v,new fi)):Q>E&&(Q=E,this._timeBarSecondsSpan=E,this._endJulian=fi.addSeconds(this._startJulian,E,new fi));let M=this._timeBarEle.clientWidth;M<10&&(M=10);let B=this._startJulian,T=Math.min(Q/M*1e-5,.4),D,F=fi.toGregorianDate(B);Q>31536e4?D=fi.fromDate(new Date(Date.UTC(Math.floor(F.year/100)*100,0))):Q>31536e3?D=fi.fromDate(new Date(Date.UTC(Math.floor(F.year/10)*10,0))):Q>86400?D=fi.fromDate(new Date(Date.UTC(F.year,0))):D=fi.fromDate(new Date(Date.UTC(F.year,F.month,F.day)));let L=fi.secondsDifference(this._startJulian,fi.addSeconds(D,T,new fi)),R=L+Q;this._epochJulian=D;function k(Ie){return Math.floor(L/Ie)*Ie}function U(Ie,ve){return Math.ceil(Ie/ve+.5)*ve}function V(Ie){return(Ie-L)/Q}function H(Ie,ve){return Ie-ve*Math.round(Ie/ve)}this._rulerEle.innerHTML=this.makeLabel(fi.addSeconds(this._endJulian,-v,new fi));let q=this._rulerEle.offsetWidth+20;q<30&&(q=180);let ie=w;w-=I;let Z={startTime:L,startJulian:B,epochJulian:D,duration:Q,timeBarWidth:M,getAlpha:V};this._highlightRanges.forEach(function(Ie){x+=Ie.render(Z)});let oe=0,ne=0,se=0,ce=q/M;ce>1&&(ce=1),ce*=this._timeBarSecondsSpan;let j=-1,de=-1,me=IL.length,_e;for(_e=0;_e<me;++_e){let Ie=IL[_e];if(++j,oe=Ie,Ie>ce&&Ie>w)break;de<0&&M*(Ie/this._timeBarSecondsSpan)>=this.smallestTicInPixels&&(de=j)}if(j>0){for(;j>0;)if(--j,Math.abs(H(oe,IL[j]))<1e-5){IL[j]>=w&&(ne=IL[j]);break}if(de>=0)for(;de<j;){if(Math.abs(H(ne,IL[de]))<1e-5&&IL[de]>=w){se=IL[de];break}++de}}w=ie,w>I&&se<1e-5&&Math.abs(w-oe)>I&&(se=w,w<=oe+I&&(ne=0));let Be=-999999,Qe;if(M*(se/this._timeBarSecondsSpan)>=3)for(C=k(se);C<=R;C=U(C,se))x+=`<span class="cesium-timeline-ticTiny" style="left: ${Math.round(M*V(C)).toString()}px;"></span>`;if(M*(ne/this._timeBarSecondsSpan)>=3)for(C=k(ne);C<=R;C=U(C,ne))x+=`<span class="cesium-timeline-ticSub" style="left: ${Math.round(M*V(C)).toString()}px;"></span>`;if(M*(oe/this._timeBarSecondsSpan)>=2){this._mainTicSpan=oe,R+=oe,C=k(oe);let Ie=fi.computeTaiMinusUtc(D);for(;C<=R;){let ve=fi.addSeconds(B,C-L,new fi);if(oe>2.1){let Y=fi.computeTaiMinusUtc(ve);Math.abs(Y-Ie)>.1&&(C+=Y-Ie,ve=fi.addSeconds(B,C-L,new fi))}let K=Math.round(M*V(C)),W=this.makeLabel(ve);this._rulerEle.innerHTML=W,Qe=this._rulerEle.offsetWidth,Qe<10&&(Qe=q);let te=K-(Qe/2-1);te>Be?(Be=te+Qe+5,x+=`<span class="cesium-timeline-ticMain" style="left: ${K.toString()}px;"></span><span class="cesium-timeline-ticLabel" style="left: ${te.toString()}px;">${W}</span>`):x+=`<span class="cesium-timeline-ticSub" style="left: ${K.toString()}px;"></span>`,C=U(C,oe)}}else this._mainTicSpan=-1;x+=`<span class="cesium-timeline-icon16" style="left:${m}px;bottom:0;background-position: 0 0;"></span>`,o.innerHTML=x,this._scrubElement=o.lastChild,this._context.clearRect(0,0,this._trackListEle.width,this._trackListEle.height),Z.y=0,this._trackList.forEach(function(Ie){Ie.render(y._context,Z),Z.y+=Ie.height})};Jv.prototype.updateFromClock=function(){this._scrubJulian=this._clock.currentTime;let o=this._scrubElement;if(O(this._scrubElement)){let A=fi.secondsDifference(this._scrubJulian,this._startJulian),f=Math.round(A*this._topDiv.clientWidth/this._timeBarSecondsSpan);this._lastXPos!==f&&(this._lastXPos=f,o.style.left=`${f-8}px`,this._needleEle.style.left=`${f}px`)}O(this._timelineDragLocation)&&(this._setTimeBarTime(this._timelineDragLocation,this._timelineDragLocation*this._timeBarSecondsSpan/this._topDiv.clientWidth),this.zoomTo(fi.addSeconds(this._startJulian,this._timelineDrag,new fi),fi.addSeconds(this._endJulian,this._timelineDrag,new fi)))};Jv.prototype._setTimeBarTime=function(o,A){if(o=Math.round(o),this._scrubJulian=fi.addSeconds(this._startJulian,A,new fi),this._scrubElement){let m=o-8;this._scrubElement.style.left=`${m.toString()}px`,this._needleEle.style.left=`${o.toString()}px`}let f=document.createEvent("Event");f.initEvent("settime",!0,!0),f.clientX=o,f.timeSeconds=A,f.timeJulian=this._scrubJulian,f.clock=this._clock,this._topDiv.dispatchEvent(f)};function z_i(o){return function(A){o._mouseMode!==F1.touchOnly&&(A.button===0?(o._mouseMode=F1.scrub,o._scrubElement&&(o._scrubElement.style.backgroundPosition="-16px 0"),o._onMouseMove(A)):(o._mouseX=A.clientX,A.button===2?o._mouseMode=F1.zoom:o._mouseMode=F1.slide)),A.preventDefault()}}function K_i(o){return function(A){o._mouseMode=F1.none,o._scrubElement&&(o._scrubElement.style.backgroundPosition="0 0"),o._timelineDrag=0,o._timelineDragLocation=void 0}}function Y_i(o){return function(A){let f;if(o._mouseMode===F1.scrub){A.preventDefault();let m=A.clientX-o._topDiv.getBoundingClientRect().left;m<0?(o._timelineDragLocation=0,o._timelineDrag=-.01*o._timeBarSecondsSpan):m>o._topDiv.clientWidth?(o._timelineDragLocation=o._topDiv.clientWidth,o._timelineDrag=.01*o._timeBarSecondsSpan):(o._timelineDragLocation=void 0,o._setTimeBarTime(m,m*o._timeBarSecondsSpan/o._topDiv.clientWidth))}else if(o._mouseMode===F1.slide){if(f=o._mouseX-A.clientX,o._mouseX=A.clientX,f!==0){let m=f*o._timeBarSecondsSpan/o._topDiv.clientWidth;o.zoomTo(fi.addSeconds(o._startJulian,m,new fi),fi.addSeconds(o._endJulian,m,new fi))}}else o._mouseMode===F1.zoom&&(f=o._mouseX-A.clientX,o._mouseX=A.clientX,f!==0&&o.zoomFrom(Math.pow(1.01,f)))}}function J_i(o){return function(A){let f=A.wheelDeltaY||A.wheelDelta||-A.detail;Oge=Math.max(Math.min(Math.abs(f),Oge),1),f/=Oge,o.zoomFrom(Math.pow(1.05,-f))}}function W_i(o){return function(A){let f=A.touches.length,m,C,y=o._topDiv.getBoundingClientRect().left;A.preventDefault(),o._mouseMode=F1.touchOnly,f===1?(m=fi.secondsDifference(o._scrubJulian,o._startJulian),C=Math.round(m*o._topDiv.clientWidth/o._timeBarSecondsSpan+y),Math.abs(A.touches[0].clientX-C)<50?(o._touchMode=_v.scrub,o._scrubElement&&(o._scrubElement.style.backgroundPosition=f===1?"-16px 0":"0 0")):(o._touchMode=_v.singleTap,o._touchState.centerX=A.touches[0].clientX-y)):f===2?(o._touchMode=_v.slideZoom,o._touchState.centerX=(A.touches[0].clientX+A.touches[1].clientX)*.5-y,o._touchState.spanX=Math.abs(A.touches[0].clientX-A.touches[1].clientX)):o._touchMode=_v.ignore}}function j_i(o){return function(A){let f=A.touches.length,m=o._topDiv.getBoundingClientRect().left;o._touchMode===_v.singleTap?(o._touchMode=_v.scrub,o._onTouchMove(A)):o._touchMode===_v.scrub&&o._onTouchMove(A),o._mouseMode=F1.touchOnly,f!==1?o._touchMode=f>0?_v.ignore:_v.none:o._touchMode===_v.slideZoom&&(o._touchState.centerX=A.touches[0].clientX-m),o._scrubElement&&(o._scrubElement.style.backgroundPosition="0 0")}}function q_i(o){return function(A){let f,m,C,y,x,v,E=1,I=o._topDiv.getBoundingClientRect().left;o._touchMode===_v.singleTap&&(o._touchMode=_v.slideZoom),o._mouseMode=F1.touchOnly,o._touchMode===_v.scrub?(A.preventDefault(),A.changedTouches.length===1&&(m=A.changedTouches[0].clientX-I,m>=0&&m<=o._topDiv.clientWidth&&o._setTimeBarTime(m,m*o._timeBarSecondsSpan/o._topDiv.clientWidth))):o._touchMode===_v.slideZoom&&(C=A.touches.length,C===2?(y=(A.touches[0].clientX+A.touches[1].clientX)*.5-I,x=Math.abs(A.touches[0].clientX-A.touches[1].clientX)):C===1&&(y=A.touches[0].clientX-I,x=0),O(y)&&(x>0&&o._touchState.spanX>0?(E=o._touchState.spanX/x,v=fi.addSeconds(o._startJulian,(o._touchState.centerX*o._timeBarSecondsSpan-y*o._timeBarSecondsSpan*E)/o._topDiv.clientWidth,new fi)):(f=o._touchState.centerX-y,v=fi.addSeconds(o._startJulian,f*o._timeBarSecondsSpan/o._topDiv.clientWidth,new fi)),o.zoomTo(v,fi.addSeconds(v,o._timeBarSecondsSpan*E,new fi)),o._touchState.centerX=y,o._touchState.spanX=x))}}Jv.prototype.resize=function(){let o=this.container.clientWidth,A=this.container.clientHeight;if(o===this._lastWidth&&A===this._lastHeight)return;this._trackContainer.style.height=`${A}px`;let f=1;this._trackList.forEach(function(m){f+=m.height}),this._trackListEle.style.height=`${f.toString()}px`,this._trackListEle.width=this._trackListEle.clientWidth,this._trackListEle.height=f,this._makeTics(),this._lastXPos=void 0,this._lastWidth=o,this._lastHeight=A};var WQe=Jv,X_i=xh(aBt(),1);function Z_i(o){let A=!1,f=window.screen;return O(f)&&(O(f.lockOrientation)?A=f.lockOrientation(o):O(f.mozLockOrientation)?A=f.mozLockOrientation(o):O(f.msLockOrientation)?A=f.msLockOrientation(o):O(f.orientation&&f.orientation.lock)&&(A=f.orientation.lock(o))),A}function xot(){let o=window.screen;O(o)&&(O(o.unlockOrientation)?o.unlockOrientation():O(o.mozUnlockOrientation)?o.mozUnlockOrientation():O(o.msUnlockOrientation)?o.msUnlockOrientation():O(o.orientation&&o.orientation.unlock)&&o.orientation.unlock())}function $_i(o,A,f,m){m()||(f()?(A.useWebVR=!1,o._locked&&(xot(),o._locked=!1),o._noSleep.disable(),yp.exitFullscreen(),f(!1)):(yp.fullscreen||yp.requestFullscreen(o._vrElement),o._noSleep.enable(),o._locked||(o._locked=Z_i("landscape")),A.useWebVR=!0,f(!0)))}function joe(o,A){let f=this,m=gr.observable(yp.enabled),C=gr.observable(!1);this.isVRMode=void 0,gr.defineProperty(this,"isVRMode",{get:function(){return C()}}),this.isVREnabled=void 0,gr.defineProperty(this,"isVREnabled",{get:function(){return m()},set:function(x){m(x&&yp.enabled)}}),this.tooltip=void 0,gr.defineProperty(this,"tooltip",function(){return m()?C()?"Exit VR mode":"Enter VR mode":"VR mode is unavailable"});let y=gr.observable(!1);this._isOrthographic=void 0,gr.defineProperty(this,"_isOrthographic",{get:function(){return y()}}),this._eventHelper=new Mx,this._eventHelper.add(o.preRender,function(){y(o.camera.frustum instanceof Ss)}),this._locked=!1,this._noSleep=new X_i.default,this._command=Hl(function(){$_i(f,o,C,y)},gr.getObservable(this,"isVREnabled")),this._vrElement=Ae(iA(A),document.body),this._callback=function(){!yp.fullscreen&&C()&&(o.useWebVR=!1,f._locked&&(xot(),f._locked=!1),f._noSleep.disable(),C(!1))},document.addEventListener(yp.changeEventName,this._callback)}Object.defineProperties(joe.prototype,{vrElement:{get:function(){return this._vrElement},set:function(o){this._vrElement=o}},command:{get:function(){return this._command}}});joe.prototype.isDestroyed=function(){return!1};joe.prototype.destroy=function(){this._eventHelper.removeAll(),document.removeEventListener(yp.changeEventName,this._callback),Qr(this)};var jQe=joe,eBi="M 5.3125 6.375 C 4.008126 6.375 2.96875 7.4141499 2.96875 8.71875 L 2.96875 19.5 C 2.96875 20.8043 4.008126 21.875 5.3125 21.875 L 13.65625 21.875 C 13.71832 20.0547 14.845166 18.59375 16.21875 18.59375 C 17.592088 18.59375 18.71881 20.0552 18.78125 21.875 L 27.09375 21.875 C 28.398125 21.875 29.4375 20.8043 29.4375 19.5 L 29.4375 8.71875 C 29.4375 7.4141499 28.398125 6.375 27.09375 6.375 L 5.3125 6.375 z M 9.625 10.4375 C 11.55989 10.4375 13.125 12.03385 13.125 13.96875 C 13.125 15.90365 11.55989 17.46875 9.625 17.46875 C 7.69011 17.46875 6.125 15.90365 6.125 13.96875 C 6.125 12.03385 7.69011 10.4375 9.625 10.4375 z M 22.46875 10.4375 C 24.40364 10.4375 25.96875 12.03385 25.96875 13.96875 C 25.96875 15.90365 24.40364 17.46875 22.46875 17.46875 C 20.53386 17.46875 18.96875 15.90365 18.96875 13.96875 C 18.96875 12.03385 20.53386 10.4375 22.46875 10.4375 z",tBi="M 25.770585,2.4552065 C 15.72282,13.962707 10.699956,19.704407 8.1768352,22.580207 c -1.261561,1.4379 -1.902282,2.1427 -2.21875,2.5 -0.141624,0.1599 -0.208984,0.2355 -0.25,0.2813 l 0.6875,0.75 c 10e-5,-10e-5 0.679191,0.727 0.6875,0.7187 0.01662,-0.016 0.02451,-0.024 0.03125,-0.031 0.01348,-0.014 0.04013,-0.038 0.0625,-0.062 0.04474,-0.05 0.120921,-0.1315 0.28125,-0.3126 0.320657,-0.3619 0.956139,-1.0921 2.2187499,-2.5312 2.5252219,-2.8781 7.5454589,-8.6169 17.5937499,-20.1250005 l -1.5,-1.3125 z m -20.5624998,3.9063 c -1.304375,0 -2.34375,1.0391 -2.34375,2.3437 l 0,10.8125005 c 0,1.3043 1.039375,2.375 2.34375,2.375 l 2.25,0 c 1.9518039,-2.2246 7.4710958,-8.5584 13.5624998,-15.5312005 l -15.8124998,0 z m 21.1249998,0 c -1.855467,2.1245 -2.114296,2.4005 -3.59375,4.0936995 1.767282,0.1815 3.15625,1.685301 3.15625,3.500001 0,1.9349 -1.56511,3.5 -3.5,3.5 -1.658043,0 -3.043426,-1.1411 -3.40625,-2.6875 -1.089617,1.2461 -2.647139,2.9988 -3.46875,3.9375 0.191501,-0.062 0.388502,-0.094 0.59375,-0.094 1.373338,0 2.50006,1.4614 2.5625,3.2812 l 8.3125,0 c 1.304375,0 2.34375,-1.0707 2.34375,-2.375 l 0,-10.8125005 c 0,-1.3046 -1.039375,-2.3437 -2.34375,-2.3437 l -0.65625,0 z M 9.5518351,10.423906 c 1.9348899,0 3.4999999,1.596401 3.4999999,3.531301 0,1.9349 -1.56511,3.5 -3.4999999,3.5 -1.9348899,0 -3.4999999,-1.5651 -3.4999999,-3.5 0,-1.9349 1.56511,-3.531301 3.4999999,-3.531301 z m 4.2187499,10.312601 c -0.206517,0.2356 -0.844218,0.9428 -1.03125,1.1562 l 0.8125,0 c 0.01392,-0.4081 0.107026,-0.7968 0.21875,-1.1562 z";function qoe(o,A,f){o=iA(o);let m=new jQe(A,f);m._exitVRPath=tBi,m._enterVRPath=eBi;let C=document.createElement("button");C.type="button",C.className="cesium-button cesium-vrButton",C.setAttribute("data-bind",'css: { "cesium-button-disabled" : _isOrthographic }, attr: { title: tooltip },click: command,enable: isVREnabled,cesiumSvgPath: { path: isVRMode ? _exitVRPath : _enterVRPath, width: 32, height: 32 }'),o.appendChild(C),gr.applyBindings(m,C),this._container=o,this._viewModel=m,this._element=C}Object.defineProperties(qoe.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});qoe.prototype.isDestroyed=function(){return!1};qoe.prototype.destroy=function(){return this._viewModel.destroy(),gr.cleanNode(this._element),this._container.removeChild(this._element),Qr(this)};var qQe=qoe,tF=new wi;function vot(o){let A=o.clock;A.currentTime=o.timeJulian,A.shouldAnimate=!1}function iBi(o){let A=o.getPropertyIds(),f="";return A.forEach(function(m){let C=o.getProperty(m);O(C)&&(f+=`<tr><th>${m}</th><td>${C}</td></tr>`)}),f.length>0&&(f=`<table class="cesium-infoBox-defaultTable"><tbody>${f}</tbody></table>`),f}function rBi(o){let A,f=[],m=o.getPropertyIds();for(A=0;A<m.length;A++){let y=m[A];/^name$/i.test(y)?f[0]=o.getProperty(y):/name/i.test(y)?f[1]=o.getProperty(y):/^title$/i.test(y)?f[2]=o.getProperty(y):/^(id|identifier)$/i.test(y)?f[3]=o.getProperty(y):/element/i.test(y)?f[4]=o.getProperty(y):/(id|identifier)$/i.test(y)&&(f[5]=o.getProperty(y))}let C=f.length;for(A=0;A<C;A++){let y=f[A];if(O(y)&&y!=="")return y}return"Unnamed Feature"}function eze(o,A){let f=o.scene.pick(A.position);if(O(f)){let m=Ae(f.id,f.primitive.id);if(m instanceof kA)return m;if(f instanceof Ds)return new kA({name:rBi(f),description:iBi(f),feature:f})}if(O(o.scene.globe))return aBi(o,A.position)}var nBi=new fi;function Eot(o,A,f){if(O(f)){let m=f.clock;if(O(m)&&(m.getValue(A),O(o))){let C=m.startTime,y=m.stopTime;fi.equals(C,y)&&(y=fi.addSeconds(C,je.EPSILON2,nBi)),o.updateFromClock(),o.zoomTo(C,y)}}}var oBi=new ee;function aBi(o,A){let f=o.scene,m=f.camera.getPickRay(A),C=f.imageryLayers.pickImageryLayerFeatures(m,f);if(!O(C))return;let y=new kA({id:"Loading...",description:"Loading feature information..."});return C.then(function(x){if(o.selectedEntity!==y)return;if(!O(x)||x.length===0){o.selectedEntity=tze();return}let v=x[0],E=new kA({id:v.name,description:v.description});if(O(v.position)){let I=o.scene.globe.ellipsoid.cartographicToCartesian(v.position,oBi);E.position=new _D(I)}o.selectedEntity=E},function(){o.selectedEntity===y&&(o.selectedEntity=tze())}),y}function tze(){return new kA({id:"None",description:"No features found."})}function sBi(o,A){let f=o._geocoder,m=o._homeButton,C=o._sceneModePicker,y=o._projectionPicker,x=o._baseLayerPicker,v=o._animation,E=o._timeline,I=o._fullscreenButton,w=o._infoBox,Q=o._selectionIndicator,M=A?"hidden":"visible";if(O(f)&&(f.container.style.visibility=M),O(m)&&(m.container.style.visibility=M),O(C)&&(C.container.style.visibility=M),O(y)&&(y.container.style.visibility=M),O(x)&&(x.container.style.visibility=M),O(v)&&(v.container.style.visibility=M),O(E)&&(E.container.style.visibility=M),O(I)&&I.viewModel.isFullscreenEnabled&&(I.container.style.visibility=M),O(w)&&(w.container.style.visibility=M),O(Q)&&(Q.container.style.visibility=M),o._container){let B=A||!O(I)?0:I.container.clientWidth;o._vrButton.container.style.right=`${B}px`,o.forceResize()}}function ku(o,A){o=iA(o),A=Ae(A,Ae.EMPTY_OBJECT);let f=(!O(A.globe)||A.globe!==!1)&&(!O(A.baseLayerPicker)||A.baseLayerPicker!==!1),m=this,C=document.createElement("div");C.className="cesium-viewer",o.appendChild(C);let y=document.createElement("div");y.className="cesium-viewer-cesiumWidgetContainer",C.appendChild(y);let x=document.createElement("div");x.className="cesium-viewer-bottom",C.appendChild(x);let v=Ae(A.scene3DOnly,!1),E,I,w=!1;O(A.clockViewModel)?(I=A.clockViewModel,E=I.clock):(E=new z5,I=new _Qe(E),w=!0),O(A.shouldAnimate)&&(E.shouldAnimate=A.shouldAnimate);let Q=new JJ(y,{imageryProvider:f||O(A.imageryProvider)?!1:void 0,clock:E,skyBox:A.skyBox,skyAtmosphere:A.skyAtmosphere,sceneMode:A.sceneMode,mapProjection:A.mapProjection,globe:A.globe,orderIndependentTranslucency:A.orderIndependentTranslucency,contextOptions:A.contextOptions,useDefaultRenderLoop:A.useDefaultRenderLoop,targetFrameRate:A.targetFrameRate,showRenderLoopErrors:A.showRenderLoopErrors,useBrowserRecommendedResolution:A.useBrowserRecommendedResolution,creditContainer:O(A.creditContainer)?A.creditContainer:x,creditViewport:A.creditViewport,scene3DOnly:v,shadows:A.shadows,terrainShadows:A.terrainShadows,mapMode2D:A.mapMode2D,blurActiveElementOnCanvasFocus:A.blurActiveElementOnCanvasFocus,requestRenderMode:A.requestRenderMode,maximumRenderTimeChange:A.maximumRenderTimeChange,depthPlaneEllipsoidOffset:A.depthPlaneEllipsoidOffset,msaaSamples:A.msaaSamples,shadowBackCull:A.shadowBackCull}),M=A.dataSources,B=!1;O(M)||(M=new ZEe,B=!0);let T=Q.scene,D=new EJ({scene:T,dataSourceCollection:M}),F=new Mx;F.add(E.onTick,ku.prototype._onTick,this),F.add(T.morphStart,ku.prototype._clearTrackedObject,this);let L;if(!O(A.selectionIndicator)||A.selectionIndicator!==!1){let K=document.createElement("div");K.className="cesium-viewer-selectionIndicatorContainer",C.appendChild(K),L=new KQe(K,T)}let R;if(!O(A.infoBox)||A.infoBox!==!1){let K=document.createElement("div");K.className="cesium-viewer-infoBoxContainer",C.appendChild(K),R=new NQe(K);let W=R.viewModel;F.add(W.cameraClicked,ku.prototype._onInfoBoxCameraClicked,this),F.add(W.closeClicked,ku.prototype._onInfoBoxClockClicked,this)}let k=document.createElement("div");k.className="cesium-viewer-toolbar",C.appendChild(k);let U;if(!O(A.geocoder)||A.geocoder!==!1){let K=document.createElement("div");K.className="cesium-viewer-geocoderContainer",k.appendChild(K);let W;O(A.geocoder)&&typeof A.geocoder!="boolean"&&(W=Array.isArray(A.geocoder)?A.geocoder:[A.geocoder]),U=new MQe({container:K,geocoderServices:W,scene:T}),F.add(U.viewModel.search.beforeExecute,ku.prototype._clearObjects,this)}let V;(!O(A.homeButton)||A.homeButton!==!1)&&(V=new RQe(k,T),O(U)&&F.add(V.viewModel.command.afterExecute,function(){let K=U.viewModel;K.searchText="",K.isSearchInProgress&&K.search()}),F.add(V.viewModel.command.beforeExecute,ku.prototype._clearTrackedObject,this));let H;!v&&(!O(A.sceneModePicker)||A.sceneModePicker!==!1)&&(H=new VQe(k,T));let q;A.projectionPicker&&(q=new GQe(k,T));let ie,Z;if(f){let K=Ae(A.imageryProviderViewModels,Bwe()),W=Ae(A.terrainProviderViewModels,Qwe());ie=new pwe(k,{globe:T.globe,imageryProviderViewModels:K,selectedImageryProviderViewModel:A.selectedImageryProviderViewModel,terrainProviderViewModels:W,selectedTerrainProviderViewModel:A.selectedTerrainProviderViewModel}),Z=k.getElementsByClassName("cesium-baseLayerPicker-dropDown")[0]}O(A.imageryProvider)&&A.imageryProvider!==!1&&(f&&(ie.viewModel.selectedImagery=void 0),T.imageryLayers.removeAll(),T.imageryLayers.addImageryProvider(A.imageryProvider)),O(A.terrainProvider)&&(f&&(ie.viewModel.selectedTerrain=void 0),T.terrainProvider=A.terrainProvider);let oe;if(!O(A.navigationHelpButton)||A.navigationHelpButton!==!1){let K=!0;try{if(O(window.localStorage)){let W=window.localStorage.getItem("cesium-hasSeenNavHelp");O(W)&&Boolean(W)?K=!1:window.localStorage.setItem("cesium-hasSeenNavHelp","true")}}catch{}oe=new OQe({container:k,instructionsInitiallyVisible:Ae(A.navigationInstructionsInitiallyVisible,K)})}let ne;if(!O(A.animation)||A.animation!==!1){let K=document.createElement("div");K.className="cesium-viewer-animationContainer",C.appendChild(K),ne=new dwe(K,new fwe(I))}let se;if(!O(A.timeline)||A.timeline!==!1){let K=document.createElement("div");K.className="cesium-viewer-timelineContainer",C.appendChild(K),se=new WQe(K,E),se.addEventListener("settime",vot,!1),se.zoomTo(E.startTime,E.stopTime)}let ce,j,de;(!O(A.fullscreenButton)||A.fullscreenButton!==!1)&&(de=document.createElement("div"),de.className="cesium-viewer-fullscreenContainer",C.appendChild(de),ce=new wQe(de,A.fullscreenElement),j=WE(ce.viewModel,"isFullscreenEnabled",function(K){de.style.display=K?"block":"none",O(se)&&(se.container.style.right=`${de.clientWidth}px`,se.resize())}));let me,_e,Be;if(A.vrButton){let K=document.createElement("div");K.className="cesium-viewer-vrContainer",C.appendChild(K),me=new qQe(K,T,A.fullScreenElement),_e=WE(me.viewModel,"isVREnabled",function(W){K.style.display=W?"block":"none",O(ce)&&(K.style.right=`${de.clientWidth}px`),O(se)&&(se.container.style.right=`${K.clientWidth}px`,se.resize())}),Be=WE(me.viewModel,"isVRMode",function(W){sBi(m,W)})}this._baseLayerPickerDropDown=Z,this._fullscreenSubscription=j,this._vrSubscription=_e,this._vrModeSubscription=Be,this._dataSourceChangedListeners={},this._automaticallyTrackDataSourceClocks=Ae(A.automaticallyTrackDataSourceClocks,!0),this._container=o,this._bottomContainer=x,this._element=C,this._cesiumWidget=Q,this._selectionIndicator=L,this._infoBox=R,this._dataSourceCollection=M,this._destroyDataSourceCollection=B,this._dataSourceDisplay=D,this._clockViewModel=I,this._destroyClockViewModel=w,this._toolbar=k,this._homeButton=V,this._sceneModePicker=H,this._projectionPicker=q,this._baseLayerPicker=ie,this._navigationHelpButton=oe,this._animation=ne,this._timeline=se,this._fullscreenButton=ce,this._vrButton=me,this._geocoder=U,this._eventHelper=F,this._lastWidth=0,this._lastHeight=0,this._allowDataSourcesToSuspendAnimation=!0,this._entityView=void 0,this._enableInfoOrSelection=O(R)||O(L),this._clockTrackedDataSource=void 0,this._trackedEntity=void 0,this._needTrackedEntityUpdate=!1,this._selectedEntity=void 0,this._zoomIsFlight=!1,this._zoomTarget=void 0,this._zoomPromise=void 0,this._zoomOptions=void 0,this._selectedEntityChanged=new br,this._trackedEntityChanged=new br,gr.track(this,["_trackedEntity","_selectedEntity","_clockTrackedDataSource"]),F.add(M.dataSourceAdded,ku.prototype._onDataSourceAdded,this),F.add(M.dataSourceRemoved,ku.prototype._onDataSourceRemoved,this),F.add(T.postUpdate,ku.prototype.resize,this),F.add(T.postRender,ku.prototype._postRender,this);let Qe=M.length;for(let K=0;K<Qe;K++)this._dataSourceAdded(M,M.get(K));this._dataSourceAdded(void 0,D.defaultDataSource),F.add(M.dataSourceAdded,ku.prototype._dataSourceAdded,this),F.add(M.dataSourceRemoved,ku.prototype._dataSourceRemoved,this);function Ie(K){let W=eze(m,K);O(W)?Nt.getValueOrUndefined(W.position,m.clock.currentTime)?m.trackedEntity=W:m.zoomTo(W):O(m.trackedEntity)&&(m.trackedEntity=void 0)}function ve(K){m.selectedEntity=eze(m,K)}Q.screenSpaceEventHandler.setInputAction(ve,Ki.LEFT_CLICK),Q.screenSpaceEventHandler.setInputAction(Ie,Ki.LEFT_DOUBLE_CLICK)}Object.defineProperties(ku.prototype,{container:{get:function(){return this._container}},bottomContainer:{get:function(){return this._bottomContainer}},cesiumWidget:{get:function(){return this._cesiumWidget}},selectionIndicator:{get:function(){return this._selectionIndicator}},infoBox:{get:function(){return this._infoBox}},geocoder:{get:function(){return this._geocoder}},homeButton:{get:function(){return this._homeButton}},sceneModePicker:{get:function(){return this._sceneModePicker}},projectionPicker:{get:function(){return this._projectionPicker}},baseLayerPicker:{get:function(){return this._baseLayerPicker}},navigationHelpButton:{get:function(){return this._navigationHelpButton}},animation:{get:function(){return this._animation}},timeline:{get:function(){return this._timeline}},fullscreenButton:{get:function(){return this._fullscreenButton}},vrButton:{get:function(){return this._vrButton}},dataSourceDisplay:{get:function(){return this._dataSourceDisplay}},entities:{get:function(){return this._dataSourceDisplay.defaultDataSource.entities}},dataSources:{get:function(){return this._dataSourceCollection}},canvas:{get:function(){return this._cesiumWidget.canvas}},scene:{get:function(){return this._cesiumWidget.scene}},shadows:{get:function(){return this.scene.shadowMap.enabled},set:function(o){this.scene.shadowMap.enabled=o}},terrainShadows:{get:function(){return this.scene.globe.shadows},set:function(o){this.scene.globe.shadows=o}},shadowMap:{get:function(){return this.scene.shadowMap}},imageryLayers:{get:function(){return this.scene.imageryLayers}},terrainProvider:{get:function(){return this.scene.terrainProvider},set:function(o){this.scene.terrainProvider=o}},camera:{get:function(){return this.scene.camera}},postProcessStages:{get:function(){return this.scene.postProcessStages}},clock:{get:function(){return this._clockViewModel.clock}},clockViewModel:{get:function(){return this._clockViewModel}},screenSpaceEventHandler:{get:function(){return this._cesiumWidget.screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._cesiumWidget.targetFrameRate},set:function(o){this._cesiumWidget.targetFrameRate=o}},useDefaultRenderLoop:{get:function(){return this._cesiumWidget.useDefaultRenderLoop},set:function(o){this._cesiumWidget.useDefaultRenderLoop=o}},resolutionScale:{get:function(){return this._cesiumWidget.resolutionScale},set:function(o){this._cesiumWidget.resolutionScale=o}},useBrowserRecommendedResolution:{get:function(){return this._cesiumWidget.useBrowserRecommendedResolution},set:function(o){this._cesiumWidget.useBrowserRecommendedResolution=o}},allowDataSourcesToSuspendAnimation:{get:function(){return this._allowDataSourcesToSuspendAnimation},set:function(o){this._allowDataSourcesToSuspendAnimation=o}},trackedEntity:{get:function(){return this._trackedEntity},set:function(o){if(this._trackedEntity!==o){this._trackedEntity=o,tie(this);let A=this.scene,f=A.mode;!O(o)||!O(o.position)?(this._needTrackedEntityUpdate=!1,(f===xi.COLUMBUS_VIEW||f===xi.SCENE2D)&&(A.screenSpaceCameraController.enableTranslate=!0),(f===xi.COLUMBUS_VIEW||f===xi.SCENE3D)&&(A.screenSpaceCameraController.enableTilt=!0),this._entityView=void 0,this.camera.lookAtTransform(Xe.IDENTITY)):this._needTrackedEntityUpdate=!0,this._trackedEntityChanged.raiseEvent(o),this.scene.requestRender()}}},selectedEntity:{get:function(){return this._selectedEntity},set:function(o){if(this._selectedEntity!==o){this._selectedEntity=o;let A=O(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;O(o)?O(A)&&A.animateAppear():O(A)&&A.animateDepart(),this._selectedEntityChanged.raiseEvent(o)}}},selectedEntityChanged:{get:function(){return this._selectedEntityChanged}},trackedEntityChanged:{get:function(){return this._trackedEntityChanged}},clockTrackedDataSource:{get:function(){return this._clockTrackedDataSource},set:function(o){this._clockTrackedDataSource!==o&&(this._clockTrackedDataSource=o,Eot(this._timeline,this.clock,o))}}});ku.prototype.extend=function(o,A){o(this,A)};ku.prototype.resize=function(){let o=this._cesiumWidget,A=this._container,f=A.clientWidth,m=A.clientHeight,C=O(this._animation),y=O(this._timeline);if(o.resize(),f===this._lastWidth&&m===this._lastHeight)return;let x=m-125,v=this._baseLayerPickerDropDown;if(O(v)&&(v.style.maxHeight=`${x}px`),O(this._geocoder)){let B=this._geocoder.searchSuggestionsContainer;B.style.maxHeight=`${x}px`}O(this._infoBox)&&(this._infoBox.viewModel.maxHeight=x);let E=this._timeline,I,w=0,Q=0,M=0;if(C&&window.getComputedStyle(this._animation.container).visibility!=="hidden"){let B=this._lastWidth;I=this._animation.container,f>900?(w=169,B<=900&&(I.style.width="169px",I.style.height="112px",this._animation.resize())):f>=600?(w=136,(B<600||B>900)&&(I.style.width="136px",I.style.height="90px",this._animation.resize())):(w=106,(B>600||B===0)&&(I.style.width="106px",I.style.height="70px",this._animation.resize())),Q=w+5}if(y&&window.getComputedStyle(this._timeline.container).visibility!=="hidden"){let B=this._fullscreenButton,T=this._vrButton,D=E.container,F=D.style;M=D.clientHeight+3,F.left=`${w}px`;let L=0;O(B)&&(L+=B.container.clientWidth),O(T)&&(L+=T.container.clientWidth),F.right=`${L}px`,E.resize()}this._bottomContainer.style.left=`${Q}px`,this._bottomContainer.style.bottom=`${M}px`,this._lastWidth=f,this._lastHeight=m};ku.prototype.forceResize=function(){this._lastWidth=0,this.resize()};ku.prototype.render=function(){this._cesiumWidget.render()};ku.prototype.isDestroyed=function(){return!1};ku.prototype.destroy=function(){let o;this.screenSpaceEventHandler.removeInputAction(Ki.LEFT_CLICK),this.screenSpaceEventHandler.removeInputAction(Ki.LEFT_DOUBLE_CLICK);let A=this.dataSources,f=A.length;for(o=0;o<f;o++)this._dataSourceRemoved(A,A.get(o));return this._dataSourceRemoved(void 0,this._dataSourceDisplay.defaultDataSource),this._container.removeChild(this._element),this._element.removeChild(this._toolbar),this._eventHelper.removeAll(),O(this._geocoder)&&(this._geocoder=this._geocoder.destroy()),O(this._homeButton)&&(this._homeButton=this._homeButton.destroy()),O(this._sceneModePicker)&&(this._sceneModePicker=this._sceneModePicker.destroy()),O(this._projectionPicker)&&(this._projectionPicker=this._projectionPicker.destroy()),O(this._baseLayerPicker)&&(this._baseLayerPicker=this._baseLayerPicker.destroy()),O(this._animation)&&(this._element.removeChild(this._animation.container),this._animation=this._animation.destroy()),O(this._timeline)&&(this._timeline.removeEventListener("settime",vot,!1),this._element.removeChild(this._timeline.container),this._timeline=this._timeline.destroy()),O(this._fullscreenButton)&&(this._fullscreenSubscription.dispose(),this._element.removeChild(this._fullscreenButton.container),this._fullscreenButton=this._fullscreenButton.destroy()),O(this._vrButton)&&(this._vrSubscription.dispose(),this._vrModeSubscription.dispose(),this._element.removeChild(this._vrButton.container),this._vrButton=this._vrButton.destroy()),O(this._infoBox)&&(this._element.removeChild(this._infoBox.container),this._infoBox=this._infoBox.destroy()),O(this._selectionIndicator)&&(this._element.removeChild(this._selectionIndicator.container),this._selectionIndicator=this._selectionIndicator.destroy()),this._destroyClockViewModel&&(this._clockViewModel=this._clockViewModel.destroy()),this._dataSourceDisplay=this._dataSourceDisplay.destroy(),this._cesiumWidget=this._cesiumWidget.destroy(),this._destroyDataSourceCollection&&(this._dataSourceCollection=this._dataSourceCollection.destroy()),Qr(this)};ku.prototype._dataSourceAdded=function(o,A){A.entities.collectionChanged.addEventListener(ku.prototype._onEntityCollectionChanged,this)};ku.prototype._dataSourceRemoved=function(o,A){let f=A.entities;f.collectionChanged.removeEventListener(ku.prototype._onEntityCollectionChanged,this),O(this.trackedEntity)&&f.getById(this.trackedEntity.id)===this.trackedEntity&&(this.trackedEntity=void 0),O(this.selectedEntity)&&f.getById(this.selectedEntity.id)===this.selectedEntity&&(this.selectedEntity=void 0)};ku.prototype._onTick=function(o){let A=o.currentTime,f=this._dataSourceDisplay.update(A);this._allowDataSourcesToSuspendAnimation&&(this._clockViewModel.canAnimate=f);let m=this._entityView;if(O(m)){let B=this._trackedEntity;this._dataSourceDisplay.getBoundingSphere(B,!1,tF)===ro.DONE&&m.update(A,tF)}let C,y=!1,x=this.selectedEntity,v=O(x)&&this._enableInfoOrSelection;v&&x.isShowing&&x.isAvailable(A)&&(this._dataSourceDisplay.getBoundingSphere(x,!0,tF)!==ro.FAILED?C=tF.center:O(x.position)&&(C=x.position.getValue(A,C)),y=O(C));let E=this.imageryLayers,I,w;for(w=0;w<E.length;w++)I=E.get(w),I&&I._availability&&(I.show=I.isAvailable(A));let Q=O(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;O(Q)&&(Q.position=ee.clone(C,Q.position),Q.showSelection=v&&y,Q.update());let M=O(this._infoBox)?this._infoBox.viewModel:void 0;O(M)&&(M.showInfo=v,M.enableCamera=y,M.isCameraTracking=this.trackedEntity===this.selectedEntity,v?(M.titleText=Ae(x.name,x.id),M.description=Nt.getValueOrDefault(x.description,A,"")):(M.titleText="",M.description=""))};ku.prototype._onEntityCollectionChanged=function(o,A,f){let m=f.length;for(let C=0;C<m;C++){let y=f[C];this.trackedEntity===y&&(this.trackedEntity=void 0),this.selectedEntity===y&&(this.selectedEntity=void 0)}};ku.prototype._onInfoBoxCameraClicked=function(o){if(o.isCameraTracking&&this.trackedEntity===this.selectedEntity)this.trackedEntity=void 0;else{let A=this.selectedEntity.position;O(A)?this.trackedEntity=this.selectedEntity:this.zoomTo(this.selectedEntity)}};ku.prototype._clearTrackedObject=function(){this.trackedEntity=void 0};ku.prototype._onInfoBoxClockClicked=function(o){this.selectedEntity=void 0};ku.prototype._clearObjects=function(){this.trackedEntity=void 0,this.selectedEntity=void 0};ku.prototype._onDataSourceChanged=function(o){this.clockTrackedDataSource===o&&Eot(this.timeline,this.clock,o)};ku.prototype._onDataSourceAdded=function(o,A){this._automaticallyTrackDataSourceClocks&&(this.clockTrackedDataSource=A);let f=A.entities.id,m=this._eventHelper.add(A.changedEvent,ku.prototype._onDataSourceChanged,this);this._dataSourceChangedListeners[f]=m};ku.prototype._onDataSourceRemoved=function(o,A){let f=this.clockTrackedDataSource===A,m=A.entities.id;if(this._dataSourceChangedListeners[m](),this._dataSourceChangedListeners[m]=void 0,f){let C=o.length;this._automaticallyTrackDataSourceClocks&&C>0?this.clockTrackedDataSource=o.get(C-1):this.clockTrackedDataSource=void 0}};ku.prototype.zoomTo=function(o,A){return Iot(this,o,{offset:A},!1)};ku.prototype.flyTo=function(o,A){return Iot(this,o,A,!0)};function Iot(o,A,f,m){tie(o);let C=new Promise(y=>{o._completeZoom=function(x){y(x)}});return o._zoomPromise=C,o._zoomIsFlight=m,o._zoomOptions=f,Promise.resolve(A).then(function(y){if(o._zoomPromise===C){if(y instanceof dD){y.getViewableRectangle().then(function(x){return IJ(x,o.scene)}).then(function(x){o._zoomPromise===C&&(o._zoomTarget=x)});return}if(y instanceof Fx){o._zoomTarget=y;return}if(y instanceof K6){o._zoomTarget=y;return}if(y.isLoading&&O(y.loadingEvent)){let x=y.loadingEvent.addEventListener(function(){x(),o._zoomPromise===C&&(o._zoomTarget=y.entities.values.slice(0))});return}if(Array.isArray(y)){o._zoomTarget=y.slice(0);return}y=Ae(y.values,y),O(y.entities)&&(y=y.entities.values),Array.isArray(y)?o._zoomTarget=y.slice(0):o._zoomTarget=[y]}}),o.scene.requestRender(),C}function aG(o){o._zoomPromise=void 0,o._zoomTarget=void 0,o._zoomOptions=void 0}function tie(o){let A=o._zoomPromise;O(A)&&(aG(o),o._completeZoom(!1))}ku.prototype._postRender=function(){lBi(this),uBi(this)};function lBi(o){let A=o._zoomTarget;if(!O(A)||o.scene.mode===xi.MORPHING)return;let f=o.scene,m=f.camera,C=Ae(o._zoomOptions,{}),y;if(A instanceof Fx)return A.readyPromise.then(function(){let I=A.boundingSphere;O(C.offset)||(C.offset=new Ex(0,-.5,I.radius)),y={offset:C.offset,duration:C.duration,maximumHeight:C.maximumHeight,complete:function(){o._completeZoom(!0)},cancel:function(){o._completeZoom(!1)}},o._zoomIsFlight?m.flyToBoundingSphere(A.boundingSphere,y):(m.viewBoundingSphere(I,C.offset),m.lookAtTransform(Xe.IDENTITY),o._completeZoom(!0)),aG(o)}).catch(()=>{tie(o)});if(A instanceof K6)return A.readyPromise.then(function(){let I=A.boundingSphere;O(C.offset)||(C.offset=new Ex(0,-.5,I.radius)),y={offset:C.offset,duration:C.duration,maximumHeight:C.maximumHeight,complete:function(){o._completeZoom(!0)},cancel:function(){o._completeZoom(!1)}},o._zoomIsFlight?m.flyToBoundingSphere(I,y):(m.viewBoundingSphere(I,C.offset),m.lookAtTransform(Xe.IDENTITY),o._completeZoom(!0)),aG(o)});if(A instanceof Kt){y={destination:f.mapProjection.ellipsoid.cartographicToCartesian(A),duration:C.duration,maximumHeight:C.maximumHeight,complete:function(){o._completeZoom(!0)},cancel:function(){o._completeZoom(!1)}},o._zoomIsFlight?m.flyTo(y):(m.setView(y),o._completeZoom(!0)),aG(o);return}let x=A,v=[];for(let I=0,w=x.length;I<w;I++){let Q=o._dataSourceDisplay.getBoundingSphere(x[I],!1,tF);if(Q===ro.PENDING)return;Q!==ro.FAILED&&v.push(wi.clone(tF))}if(v.length===0){tie(o);return}o.trackedEntity=void 0;let E=wi.fromBoundingSpheres(v);o._zoomIsFlight?(aG(o),m.flyToBoundingSphere(E,{duration:C.duration,maximumHeight:C.maximumHeight,complete:function(){o._completeZoom(!0)},cancel:function(){o._completeZoom(!1)},offset:C.offset})):(m.viewBoundingSphere(E,C.offset),m.lookAtTransform(Xe.IDENTITY),aG(o),o._completeZoom(!0))}function uBi(o){if(!o._needTrackedEntityUpdate)return;let A=o._trackedEntity,f=o.clock.currentTime,m=Nt.getValueOrUndefined(A.position,f);if(!O(m))return;let C=o.scene,y=o._dataSourceDisplay.getBoundingSphere(A,!1,tF);if(y===ro.PENDING)return;let x=C.mode;(x===xi.COLUMBUS_VIEW||x===xi.SCENE2D)&&(C.screenSpaceCameraController.enableTranslate=!1),(x===xi.COLUMBUS_VIEW||x===xi.SCENE3D)&&(C.screenSpaceCameraController.enableTilt=!1);let v=y!==ro.FAILED?tF:void 0;o._entityView=new qne(A,C,C.mapProjection.ellipsoid),o._entityView.update(f,v),o._needTrackedEntityUpdate=!1}var XJ=ku;function _ot(o,A){if(!O(o)||!(o instanceof XJ))throw new Ui("viewer is required.");this._camera=o.camera,this._scene=o.scene,this._globe=o.scene.globe,this._ellipsoid=o.scene.globe.ellipsoid}var ize=new ee,Q$=new ee,S$=new ee;_ot.prototype.pickSlope=function(o){if(!O(o)||!(o instanceof Bt))throw new Ui("windowCoordinates is required.");let A=this._camera,f=this._scene,m=this._globe,C=this._ellipsoid,y=A.getPickRay(o),x=m.pick(y,f),v=C.geodeticSurfaceNormal(x);if(x){let E=m.pickTriangle(y,f);ee.subtract(E[1],E[0],Q$),ee.subtract(E[2],E[0],S$),ee.normalize(Q$,Q$),ee.normalize(S$,S$),ee.cross(Q$,S$,ize);let I=ee.angleBetween(v,ize);return je.toDegrees(I)}};var Bot=_ot,cBi=[{value:0,color:"#ffffff"},{value:1,color:"#ffa500"}];function YM(o){this._definitionChanged=new br,this._color=void 0,this._colorSubscription=void 0,this.color=Ae(o.color,At.RED),this.duration=Ae(o.duration,3e3),this.image=Ae(o.image,void 0),this.ramp=Ae(o.ramp,cBi),this._translucnet=Ae(o.translucent,!0),this._repeat=Ae(o.repeat,1),this._time=new Date().getTime()}Object.defineProperties(YM.prototype,{isConstant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}},color:Bi("color")});YM.prototype.getType=function(o){return as.PolylineTrailLinkType};YM.prototype.getValue=function(o,A){return O(A)||(A={}),A.color=Nt.getValueOrClonedDefault(this.color,o,At.WHITE,A.color),A.image=this.getColorRamp(),A.repeat=this._repeat,A.time=(new Date().getTime()-this._time)%this.duration/this.duration,A};YM.prototype.update=function(){let o=fi.now();return this.getValue(o)};YM.prototype.isTranslucent=function(){return this._translucnet};YM.prototype.getColorRamp=function(){if(O(this.image))return this.image;let o=document.createElement("canvas");o.width=100,o.height=1;let A=o.getContext("2d"),f=A.createLinearGradient(0,0,100,0),m=this;for(let C=0;C<m.ramp.length;C++){let y=m.ramp[C].value,x=m.ramp[C].color;f.addColorStop(y,x)}return A.fillStyle=f,A.fillRect(0,0,100,1),o};YM.prototype.equals=function(o){return this===o||o instanceof YM&&Nt.equals(this._color,o._color)};var wot=YM;function Aw(o){this._tileProvider=o.tileProvider,this._tileProvider.quadtree=this,this._debug={enableDebugOutput:!1,maxDepth:0,maxDepthVisited:0,tilesVisited:0,tilesCulled:0,tilesRendered:0,tilesWaitingForChildren:0,lastMaxDepth:-1,lastMaxDepthVisited:-1,lastTilesVisited:-1,lastTilesCulled:-1,lastTilesRendered:-1,lastTilesWaitingForChildren:-1,suspendLodUpdate:!1};let A=this._tileProvider.tilingScheme.ellipsoid;this._tilesToRender=[],this._tileLoadQueueHigh=[],this._tileLoadQueueMedium=[],this._tileLoadQueueLow=[],this._tileReplacementQueue=new moe,this._levelZeroTiles=void 0,this._loadQueueTimeSlice=5,this._tilesInvalidated=!1,this._addHeightCallbacks=[],this._removeHeightCallbacks=[],this._tileToUpdateHeights=[],this._lastTileIndex=0,this._updateHeightsTimeSlice=2,this._cameraPositionCartographic=void 0,this._cameraReferenceFrameOriginCartographic=void 0,this.maximumScreenSpaceError=Ae(o.maximumScreenSpaceError,2),this.tileCacheSize=Ae(o.tileCacheSize,100),this.loadingDescendantLimit=20,this.preloadAncestors=!0,this.preloadSiblings=!1,this._occluders=new foe({ellipsoid:A}),this._tileLoadProgressEvent=new br,this._lastTileLoadQueueLength=0,this._lastSelectionFrameNumber=void 0}Object.defineProperties(Aw.prototype,{tileProvider:{get:function(){return this._tileProvider}},tileLoadProgressEvent:{get:function(){return this._tileLoadProgressEvent}},occluders:{get:function(){return this._occluders}}});Aw.prototype.invalidateAllTiles=function(){this._tilesInvalidated=!0};function ABi(o){let A=o._tileReplacementQueue;A.head=void 0,A.tail=void 0,A.count=0,bot(o);let f=o._levelZeroTiles;if(O(f))for(let m=0;m<f.length;++m){let C=f[m].customData,y=C.length;for(let x=0;x<y;++x){let v=C[x];v.level=0,o._addHeightCallbacks.push(v)}f[m].freeResources()}o._levelZeroTiles=void 0,o._tileProvider.cancelReprojections()}Aw.prototype.forEachLoadedTile=function(o){let A=this._tileReplacementQueue.head;for(;O(A);)A.state!==mC.START&&o(A),A=A.replacementNext};Aw.prototype.forEachRenderedTile=function(o){let A=this._tilesToRender;for(let f=0,m=A.length;f<m;++f)o(A[f])};Aw.prototype.updateHeight=function(o,A){let f=this,m={positionOnEllipsoidSurface:void 0,positionCartographic:o,level:-1,callback:A};return m.removeFunc=function(){let C=f._addHeightCallbacks,y=C.length;for(let x=0;x<y;++x)if(C[x]===m){C.splice(x,1);break}f._removeHeightCallbacks.push(m)},f._addHeightCallbacks.push(m),m.removeFunc};Aw.prototype.update=function(o){O(this._tileProvider.update)&&this._tileProvider.update(o)};function bot(o){let A=o._debug;A.maxDepth=0,A.maxDepthVisited=0,A.tilesVisited=0,A.tilesCulled=0,A.tilesRendered=0,A.tilesWaitingForChildren=0,o._tileLoadQueueHigh.length=0,o._tileLoadQueueMedium.length=0,o._tileLoadQueueLow.length=0}Aw.prototype.beginFrame=function(o){!o.passes.render||(this._tilesInvalidated&&(ABi(this),this._tilesInvalidated=!1),this._tileProvider.initialize(o),bot(this),!this._debug.suspendLodUpdate&&this._tileReplacementQueue.markStartOfRenderFrame())};Aw.prototype.render=function(o){let A=o.passes,f=this._tileProvider;if(A.render&&(f.beginUpdate(o),gBi(this,o),BBi(this,o),f.endUpdate(o)),A.pick&&this._tilesToRender.length>0)try{f.updateForPick(o)}catch(m){console.error(m)}};function hBi(o,A){let f=o._tileLoadQueueHigh.length+o._tileLoadQueueMedium.length+o._tileLoadQueueLow.length;(f!==o._lastTileLoadQueueLength||o._tilesInvalidated)&&(A.afterRender.push(br.prototype.raiseEvent.bind(o._tileLoadProgressEvent,f)),o._lastTileLoadQueueLength=f);let m=o._debug;m.enableDebugOutput&&!m.suspendLodUpdate&&(m.maxDepth=o._tilesToRender.reduce(function(C,y){return Math.max(C,y.level)},-1),m.tilesRendered=o._tilesToRender.length,(m.tilesVisited!==m.lastTilesVisited||m.tilesRendered!==m.lastTilesRendered||m.tilesCulled!==m.lastTilesCulled||m.maxDepth!==m.lastMaxDepth||m.tilesWaitingForChildren!==m.lastTilesWaitingForChildren||m.maxDepthVisited!==m.lastMaxDepthVisited)&&(console.log(`Visited ${m.tilesVisited}, Rendered: ${m.tilesRendered}, Culled: ${m.tilesCulled}, Max Depth Rendered: ${m.maxDepth}, Max Depth Visited: ${m.maxDepthVisited}, Waiting for children: ${m.tilesWaitingForChildren}`),m.lastTilesVisited=m.tilesVisited,m.lastTilesRendered=m.tilesRendered,m.lastTilesCulled=m.tilesCulled,m.lastMaxDepth=m.maxDepth,m.lastTilesWaitingForChildren=m.tilesWaitingForChildren,m.lastMaxDepthVisited=m.maxDepthVisited))}Aw.prototype.endFrame=function(o){!o.passes.render||o.mode===xi.MORPHING||(vBi(this,o),_Bi(this,o),hBi(this,o))};var e7,rze=new Kt;function dBi(o,A){let f=Si.center(o.rectangle,rze),m=f.longitude-e7.longitude,C=f.latitude-e7.latitude;f=Si.center(A.rectangle,rze);let y=f.longitude-e7.longitude,x=f.latitude-e7.latitude;return m*m+C*C-(y*y+x*x)}var fBi=new ee,Qz=[];function gBi(o,A){let f=o._debug;if(f.suspendLodUpdate)return;let m=o._tilesToRender;m.length=0;let C,y=o._tileProvider;if(!O(o._levelZeroTiles))if(y.ready){let D=y.tilingScheme;o._levelZeroTiles=goe.createLevelZeroTiles(D);let F=o._levelZeroTiles.length;if(Qz.length<F)for(Qz=new Array(F),C=0;C<F;++C)Qz[C]===void 0&&(Qz[C]=new t7)}else return;o._occluders.ellipsoid.cameraPosition=A.camera.positionWC;let x,v=o._levelZeroTiles,E=v.length>1?o._occluders:void 0;e7=A.camera.positionCartographic,v.sort(dBi);let I=o._addHeightCallbacks,w=o._removeHeightCallbacks,Q=A.frameNumber,M;if(I.length>0||w.length>0){for(C=0,M=v.length;C<M;++C)x=v[C],x._updateCustomData(Q,I,w);I.length=0,w.length=0}let B=A.camera;o._cameraPositionCartographic=B.positionCartographic;let T=Xe.getTranslation(B.transform,fBi);for(o._cameraReferenceFrameOriginCartographic=o.tileProvider.tilingScheme.ellipsoid.cartesianToCartographic(T,o._cameraReferenceFrameOriginCartographic),C=0,M=v.length;C<M;++C)x=v[C],o._tileReplacementQueue.markTileRendered(x),x.renderable?ty(o,x,y,A,E,!1,Qz[C]):(nM(o,o._tileLoadQueueHigh,x,A),++f.tilesWaitingForChildren);o._lastSelectionFrameNumber=Q}function nM(o,A,f,m){!f.needsLoading||(o.tileProvider.computeTileLoadPriority!==void 0&&(f._loadPriority=o.tileProvider.computeTileLoadPriority(f,m)),A.push(f))}function t7(){this.allAreRenderable=!0,this.anyWereRenderedLastFrame=!1,this.notYetRenderableCount=0}function Qot(){this.southwest=new t7,this.southeast=new t7,this.northwest=new t7,this.northeast=new t7}Qot.prototype.combine=function(o){let A=this.southwest,f=this.southeast,m=this.northwest,C=this.northeast;o.allAreRenderable=A.allAreRenderable&&f.allAreRenderable&&m.allAreRenderable&&C.allAreRenderable,o.anyWereRenderedLastFrame=A.anyWereRenderedLastFrame||f.anyWereRenderedLastFrame||m.anyWereRenderedLastFrame||C.anyWereRenderedLastFrame,o.notYetRenderableCount=A.notYetRenderableCount+f.notYetRenderableCount+m.notYetRenderableCount+C.notYetRenderableCount};var gme=new Array(31);for(let o=0;o<gme.length;++o)gme[o]=new Qot;function pBi(o,A,f,m,C){let y=o._debug;++y.tilesVisited,o._tileReplacementQueue.markTileRendered(f),f._updateCustomData(A.frameNumber),f.level>y.maxDepthVisited&&(y.maxDepthVisited=f.level);let x=yBi(o,A,f)<o.maximumScreenSpaceError,v=f.southwestChild,E=f.southeastChild,I=f.northwestChild,w=f.northeastChild,Q=o._lastSelectionFrameNumber,M=f._lastSelectionResultFrame===Q?f._lastSelectionResult:sa.NONE,B=o.tileProvider;if(x||m){let T=sa.originalResult(M)===sa.RENDERED,D=sa.originalResult(M)===sa.CULLED||M===sa.NONE,F=f.state===mC.DONE,L=T||D||F;if(L||O(B.canRenderWithoutLosingDetail)&&(L=B.canRenderWithoutLosingDetail(f)),L){x&&nM(o,o._tileLoadQueueMedium,f,A),D$(o,f),C.allAreRenderable=f.renderable,C.anyWereRenderedLastFrame=M===sa.RENDERED,C.notYetRenderableCount=f.renderable?0:1,f._lastSelectionResultFrame=A.frameNumber,f._lastSelectionResult=sa.RENDERED,C.anyWereRenderedLastFrame||o._tileToUpdateHeights.push(f);return}m=!0,x&&nM(o,o._tileLoadQueueHigh,f,A)}if(B.canRefine(f)){if(v.upsampledFromParent&&E.upsampledFromParent&&I.upsampledFromParent&&w.upsampledFromParent){D$(o,f),nM(o,o._tileLoadQueueMedium,f,A),o._tileReplacementQueue.markTileRendered(v),o._tileReplacementQueue.markTileRendered(E),o._tileReplacementQueue.markTileRendered(I),o._tileReplacementQueue.markTileRendered(w),C.allAreRenderable=f.renderable,C.anyWereRenderedLastFrame=M===sa.RENDERED,C.notYetRenderableCount=f.renderable?0:1,f._lastSelectionResultFrame=A.frameNumber,f._lastSelectionResult=sa.RENDERED,C.anyWereRenderedLastFrame||o._tileToUpdateHeights.push(f);return}f._lastSelectionResultFrame=A.frameNumber,f._lastSelectionResult=sa.REFINED;let T=o._tilesToRender.length,D=o._tileLoadQueueLow.length,F=o._tileLoadQueueMedium.length,L=o._tileLoadQueueHigh.length,R=o._tileToUpdateHeights.length;if(mBi(o,v,E,I,w,A,m,C),T!==o._tilesToRender.length){let k=C.allAreRenderable,U=C.anyWereRenderedLastFrame,V=C.notYetRenderableCount,H=!1;if(!k&&!U){let q=o._tilesToRender;for(let Z=T;Z<q.length;++Z){let oe=q[Z];for(;oe!==void 0&&oe._lastSelectionResult!==sa.KICKED&&oe!==f;)oe._lastSelectionResult=sa.kick(oe._lastSelectionResult),oe=oe.parent}o._tilesToRender.length=T,o._tileToUpdateHeights.length=R,D$(o,f),f._lastSelectionResult=sa.RENDERED;let ie=M===sa.RENDERED;!ie&&V>o.loadingDescendantLimit&&(o._tileLoadQueueLow.length=D,o._tileLoadQueueMedium.length=F,o._tileLoadQueueHigh.length=L,nM(o,o._tileLoadQueueMedium,f,A),C.notYetRenderableCount=f.renderable?0:1,H=!0),C.allAreRenderable=f.renderable,C.anyWereRenderedLastFrame=ie,ie||o._tileToUpdateHeights.push(f),++y.tilesWaitingForChildren}o.preloadAncestors&&!H&&nM(o,o._tileLoadQueueLow,f,A)}return}f._lastSelectionResultFrame=A.frameNumber,f._lastSelectionResult=sa.RENDERED,D$(o,f),nM(o,o._tileLoadQueueHigh,f,A),C.allAreRenderable=f.renderable,C.anyWereRenderedLastFrame=M===sa.RENDERED,C.notYetRenderableCount=f.renderable?0:1}function mBi(o,A,f,m,C,y,x,v){let E=y.camera.positionCartographic,I=o._tileProvider,w=o._occluders,Q=gme[A.level],M=Q.southwest,B=Q.southeast,T=Q.northwest,D=Q.northeast;E.longitude<A.rectangle.east?E.latitude<A.rectangle.north?(ty(o,A,I,y,w,x,M),ty(o,f,I,y,w,x,B),ty(o,m,I,y,w,x,T),ty(o,C,I,y,w,x,D)):(ty(o,m,I,y,w,x,T),ty(o,A,I,y,w,x,M),ty(o,C,I,y,w,x,D),ty(o,f,I,y,w,x,B)):E.latitude<A.rectangle.north?(ty(o,f,I,y,w,x,B),ty(o,A,I,y,w,x,M),ty(o,C,I,y,w,x,D),ty(o,m,I,y,w,x,T)):(ty(o,C,I,y,w,x,D),ty(o,m,I,y,w,x,T),ty(o,f,I,y,w,x,B),ty(o,A,I,y,w,x,M)),Q.combine(v)}function CBi(o,A){let f=A.rectangle;return O(o._cameraPositionCartographic)&&Si.contains(f,o._cameraPositionCartographic)||O(o._cameraReferenceFrameOriginCartographic)&&Si.contains(f,o._cameraReferenceFrameOriginCartographic)}function ty(o,A,f,m,C,y,x){if(f.computeTileVisibility(A,m,C)!==vg.NONE)return pBi(o,m,A,y,x);if(++o._debug.tilesCulled,o._tileReplacementQueue.markTileRendered(A),x.allAreRenderable=!0,x.anyWereRenderedLastFrame=!1,x.notYetRenderableCount=0,CBi(o,A)){(!O(A.data)||!O(A.data.vertexArray))&&nM(o,o._tileLoadQueueMedium,A,m);let v=o._lastSelectionFrameNumber,E=A._lastSelectionResultFrame===v?A._lastSelectionResult:sa.NONE;E!==sa.CULLED_BUT_NEEDED&&E!==sa.RENDERED&&o._tileToUpdateHeights.push(A),A._lastSelectionResult=sa.CULLED_BUT_NEEDED}else(o.preloadSiblings||A.level===0)&&nM(o,o._tileLoadQueueLow,A,m),A._lastSelectionResult=sa.CULLED;A._lastSelectionResultFrame=m.frameNumber}function yBi(o,A,f){if(A.mode===xi.SCENE2D||A.camera.frustum instanceof Ss||A.camera.frustum instanceof K0)return xBi(o,A,f);let m=o._tileProvider.getLevelMaximumGeometricError(f.level),C=f._distance,y=A.context.drawingBufferHeight,x=A.camera.frustum.sseDenominator,v=m*y/(C*x);return A.fog.enabled&&(v-=je.fog(C,A.fog.density)*A.fog.sse),v/=A.pixelRatio,v}function xBi(o,A,f){let m=A.camera.frustum;O(m._offCenterFrustum)&&(m=m._offCenterFrustum);let C=A.context,y=C.drawingBufferWidth,x=C.drawingBufferHeight,v=o._tileProvider.getLevelMaximumGeometricError(f.level),E=Math.max(m.top-m.bottom,m.right-m.left)/Math.max(y,x),I=v/E;return A.fog.enabled&&A.mode!==xi.SCENE2D&&(I-=je.fog(f._distance,A.fog.density)*A.fog.sse),I/=A.pixelRatio,I}function D$(o,A){o._tilesToRender.push(A)}function vBi(o,A){let f=o._tileLoadQueueHigh,m=o._tileLoadQueueMedium,C=o._tileLoadQueueLow;if(f.length===0&&m.length===0&&C.length===0)return;o._tileReplacementQueue.trimTiles(o.tileCacheSize);let y=OA()+o._loadQueueTimeSlice,x=o._tileProvider,v=Uge(o,A,x,y,f,!1);v=Uge(o,A,x,y,m,v),Uge(o,A,x,y,C,v)}function EBi(o,A){return o._loadPriority-A._loadPriority}function Uge(o,A,f,m,C,y){f.computeTileLoadPriority!==void 0&&C.sort(EBi);for(let x=0,v=C.length;x<v&&(OA()<m||!y);++x){let E=C[x];o._tileReplacementQueue.markTileRendered(E),f.loadTile(A,E),y=!0}return y}Aw.prototype.isDestroyed=function(){return!1};Aw.prototype.destroy=function(){this._tileProvider=this._tileProvider&&this._tileProvider.destroy()};var zU=new ss,Gge=new Kt,_L=new ee,IBi=[];function _Bi(o,A){if(!o.tileProvider.ready)return;let f=IBi;f.length=0;let m=o._tileToUpdateHeights,C=OA(),y=o._updateHeightsTimeSlice,x=C+y,v=A.mode,E=A.mapProjection,I=o.tileProvider.tilingScheme.ellipsoid,w;for(;m.length>0;){let Q=m[0];if(!O(Q.data)||!O(Q.data.mesh)){let D=Q._lastSelectionResultFrame===o._lastSelectionFrameNumber?Q._lastSelectionResult:sa.NONE;(D===sa.RENDERED||D===sa.CULLED_BUT_NEEDED)&&f.push(Q),m.shift(),o._lastTileIndex=0;continue}let M=Q.customData,B=M.length,T=!1;for(w=o._lastTileIndex;w<B;++w){let D=M[w],F=Q.data.terrainData,L=O(F)&&F.wasCreatedByUpsampling();if(Q.level>D.level&&!L){if(O(D.positionOnEllipsoidSurface)||(D.positionOnEllipsoidSurface=ee.fromRadians(D.positionCartographic.longitude,D.positionCartographic.latitude,0,I)),v===xi.SCENE3D){let k=I.geodeticSurfaceNormal(D.positionOnEllipsoidSurface,zU.direction),U=I.getSurfaceNormalIntersectionWithZAxis(D.positionOnEllipsoidSurface,11500,zU.origin);if(!O(U)){let V;O(Q.data.tileBoundingRegion)&&(V=Q.data.tileBoundingRegion.minimumHeight);let H=Math.min(Ae(V,0),-11500),q=ee.multiplyByScalar(k,Math.abs(H)+1,_L);ee.subtract(D.positionOnEllipsoidSurface,q,zU.origin)}}else Kt.clone(D.positionCartographic,Gge),Gge.height=-11500,E.project(Gge,_L),ee.fromElements(_L.z,_L.x,_L.y,_L),ee.clone(_L,zU.origin),ee.clone(ee.UNIT_X,zU.direction);let R=Q.data.pick(zU,v,E,!1,_L);O(R)&&(D.callback(R),D.level=Q.level)}if(OA()>=x){T=!0;break}}if(T){o._lastTileIndex=w;break}else o._lastTileIndex=0,m.shift()}for(w=0;w<f.length;w++)m.push(f[w])}function BBi(o,A){let f=o._tileProvider,m=o._tilesToRender;for(let C=0,y=m.length;C<y;++C){let x=m[C];f.showTileThisFrame(x,A)}}var Sot=Aw;/*! rasterizeHTML.js - v1.3.0 - 2018-03-18
* http://www.github.com/cburgmer/rasterizeHTML.js
* Copyright (c) 2018 Christoph Burgmer; Licensed MIT */var Dot={};(function(o){Dot.rasterizeHTML=o()})(function(){return function o(A,f,m){function C(v,E){if(!f[v]){if(!A[v]){var I=typeof sM=="function"&&sM;if(!E&&I)return I(v,!0);if(y)return y(v,!0);var w=new Error("Cannot find module '"+v+"'");throw w.code="MODULE_NOT_FOUND",w}var Q=f[v]={exports:{}};A[v][0].call(Q.exports,function(M){var B=A[v][1][M];return C(B||M)},Q,Q.exports,o,A,f,m)}return f[v].exports}for(var y=typeof sM=="function"&&sM,x=0;x<m.length;x++)C(m[x]);return C}({1:[function(o,A,f){var m,C;C=function(y,x,v,E){var I=function(T){"use strict";var D={},F=[];return D.joinUrl=function(L,R){return L?T.resolve(L,R):R},D.getConstantUniqueIdFor=function(L){return F.indexOf(L)<0&&F.push(L),F.indexOf(L)},D.clone=function(L){var R,k={};for(R in L)L.hasOwnProperty(R)&&(k[R]=L[R]);return k},D.parseOptionalParameters=function(L){var R,k,U={canvas:null,options:{}};return L[0]==null||(R=L[0],typeof(k=R)=="object"&&k!==null&&Object.prototype.toString.apply(R).match(/\[object (Canvas|HTMLCanvasElement)\]/i))?(U.canvas=L[0]||null,U.options=D.clone(L[1])):U.options=D.clone(L[0]),U},D}(y),w=function(T){"use strict";var D={},F=function(L,R,k){var U=L[R];return L[R]=function(){var V=Array.prototype.slice.call(arguments);return k.apply(this,[V,U])},U};return D.baseUrlRespectingXhr=function(L,R){return function(){var k=new L;return F(k,"open",function(U,V){var H=U.shift(),q=U.shift(),ie=T.joinUrl(R,q);return V.apply(this,[H,ie].concat(U))}),k}},D.finishNotifyingXhr=function(L){var R,k=0,U=0,V=!1,H=new Promise(function(ie){R=function(){k-U<=0&&V&&ie({totalCount:k})}}),q=function(){var ie=new L;return F(ie,"send",function(Z,oe){return k+=1,oe.apply(this,arguments)}),ie.addEventListener("load",function(){U+=1,R()}),ie};return q.waitForRequestsToFinish=function(){return V=!0,R(),H},q},D}(I),Q=function(T){"use strict";var D={},F=function(R){return Array.prototype.slice.call(R)},L={active:!0,hover:!0,focus:!1,target:!1};return D.fakeUserAction=function(R,k,U){var V=R.querySelector(k),H=":"+U,q="rasterizehtml"+U;V&&(L[U]?T.addClassNameRecursively(V,q):T.addClassName(V,q),T.rewriteCssSelectorWith(R,H,"."+q))},D.persistInputValues=function(R){var k=R.querySelectorAll("input"),U=R.querySelectorAll("textarea"),V=function(H){return H.type==="checkbox"||H.type==="radio"};F(k).filter(V).forEach(function(H){H.checked?H.setAttribute("checked",""):H.removeAttribute("checked")}),F(k).filter(function(H){return!V(H)}).forEach(function(H){H.setAttribute("value",H.value)}),F(U).forEach(function(H){H.textContent=H.value})},D.rewriteTagNameSelectorsToLowerCase=function(R){T.lowercaseCssTypeSelectors(R,T.findHtmlOnlyNodeNames(R))},D}(function(){"use strict";var T={},D=function(k){return Array.prototype.slice.call(k)};T.addClassName=function(k,U){k.className+=" "+U},T.addClassNameRecursively=function(k,U){T.addClassName(k,U),k.parentNode!==k.ownerDocument&&T.addClassNameRecursively(k.parentNode,U)};var F=function(k,U){var V,H,q,ie,Z=k.cssText.replace(/^[^\{]+/,"");H=U+" "+Z,q=(V=k).parentStyleSheet,ie=D(q.cssRules).indexOf(V),q.insertRule(H,ie+1),q.deleteRule(ie)},L=function(k){var U;k.textContent=(U=k.sheet.cssRules,D(U).reduce(function(V,H){return V+H.cssText},""))},R=function(k,U,V){var H="((?:^|[^.#:\\w])|(?=\\W))("+U.join("|")+")(?=\\W|$)";D(k.querySelectorAll("style")).forEach(function(q){var ie,Z,oe;q.sheet===void 0&&(ie=q,Z=document.implementation.createHTMLDocument(""),(oe=document.createElement("style")).textContent=ie.textContent,Z.body.appendChild(oe),ie.sheet=oe.sheet);var ne=D(q.sheet.cssRules).filter(function(se){return se.selectorText&&new RegExp(H,"i").test(se.selectorText)});ne.length&&(ne.forEach(function(se){var ce=se.selectorText.replace(new RegExp(H,"gi"),function(j,de,me){return de+V(me)});ce!==se.selectorText&&F(se,ce)}),L(q))})};return T.rewriteCssSelectorWith=function(k,U,V){R(k,[U],function(){return V})},T.lowercaseCssTypeSelectors=function(k,U){R(k,U,function(V){return V.toLowerCase()})},T.findHtmlOnlyNodeNames=function(k){for(var U,V=k.ownerDocument.createTreeWalker(k,NodeFilter.SHOW_ELEMENT),H={},q={};U=V.currentNode.tagName.toLowerCase(),V.currentNode.namespaceURI==="http://www.w3.org/1999/xhtml"?H[U]=!0:q[U]=!0,V.nextNode(););return Object.keys(H).filter(function(ie){return!q[ie]})},T}()),M=function(T,D,F,L){"use strict";var R={};R.executeJavascript=function(q,ie){return new Promise(function(Z){var oe,ne,se,ce,j,de=(oe=L.document,ne="iframe",se=ie.width,ce=ie.height,(j=oe.createElement(ne)).style.visibility="hidden",j.style.width=se+"px",j.style.height=ce+"px",j.style.position="absolute",j.style.top=-1e4-ce+"px",j.style.left=-1e4-se+"px",oe.getElementsByTagName("body")[0].appendChild(j),j),me=q.outerHTML,_e=[],Be=ie.executeJsTimeout||0,Qe=function(){var W=de.contentDocument;L.document.getElementsByTagName("body")[0].removeChild(de),Z({document:W,errors:_e})},Ie=de.contentWindow.XMLHttpRequest,ve=D.finishNotifyingXhr(Ie),K=D.baseUrlRespectingXhr(ve,ie.baseUrl);de.onload=function(){var W;(W=Be,0<W?new Promise(function(te){setTimeout(te,W)}):Promise.resolve()).then(ve.waitForRequestsToFinish).then(Qe)},de.contentDocument.open(),de.contentWindow.XMLHttpRequest=K,de.contentWindow.onerror=function(W){_e.push({resourceType:"scriptExecution",msg:W})},de.contentDocument.write("<!DOCTYPE html>"),de.contentDocument.write(me),de.contentDocument.close()})};var k=function(q,ie,Z,oe,ne){var se,ce,j,de,me,_e,Be,Qe,Ie,ve,K,W=Math.max(q.scrollWidth,q.clientWidth),te=Math.max(q.scrollHeight,q.clientHeight);return ie?(se=(_e=function(Y,he){var fe=Y.querySelector(he);if(fe)return fe;if(Y.ownerDocument.querySelector(he)===Y)return Y;throw{message:"Clipping selector not found"}}(q,ie).getBoundingClientRect()).top,ce=_e.left,j=_e.width,de=_e.height):(ce=se=0,j=W,de=te),Qe={width:j,height:de},Ie=Z,ve=oe,K=ne,Be={width:Math.max(Qe.width*K,Ie),height:Math.max(Qe.height*K,ve)},me=L.getComputedStyle(q.ownerDocument.documentElement).fontSize,{left:ce,top:se,width:Be.width,height:Be.height,viewportWidth:W,viewportHeight:te,rootFontSize:me}};R.calculateDocumentContentSize=function(q,ie){return new Promise(function(Z,oe){var ne,se,ce,j,de,me,_e,Be,Qe,Ie,ve,K,W=ie.zoom||1;se=ie.width,ce=ie.height,j=W,Qe=Math.floor(se/j),Ie=Math.floor(ce/j),de=L.document,me=Qe,_e=Ie,(Be=de.createElement("iframe")).style.width=me+"px",Be.style.height=_e+"px",Be.style.visibility="hidden",Be.style.position="absolute",Be.style.top=-1e4-_e+"px",Be.style.left=-1e4-me+"px",Be.style.borderWidth=0,Be.sandbox="allow-same-origin",Be.scrolling="no",ne=Be,L.document.getElementsByTagName("body")[0].appendChild(ne),ne.onload=function(){var te,Y,he,fe=ne.contentDocument;try{te=k((Y=fe,he=q.tagName,Y.querySelector(he)),ie.clip,ie.width,ie.height,W),Z(te)}catch(Ce){oe(Ce)}finally{L.document.getElementsByTagName("body")[0].removeChild(ne)}},ne.contentDocument.open(),ne.contentDocument.write("<!DOCTYPE html>"),ne.contentDocument.write((K=(ve=q).tagName.toLowerCase())==="html"||K==="body"?ve.outerHTML:'<body style="margin: 0;">'+ve.outerHTML+"</body>"),ne.contentDocument.close()})},R.parseHtmlFragment=function(q){var ie=L.document.implementation.createHTMLDocument("");ie.documentElement.innerHTML=q;var Z=ie.querySelector("body").firstChild;if(!Z)throw"Invalid source";return Z},R.parseHTML=function(q){var ie=L.document.implementation.createHTMLDocument("");return ie.documentElement.innerHTML=q,function(Z,oe){var ne,se,ce,j,de=/<html((?:\s+[^>]*)?)>/im.exec(oe),me=L.document.implementation.createHTMLDocument("");if(de)for(ne="<div"+de[1]+"></div>",me.documentElement.innerHTML=ne,ce=me.querySelector("div"),se=0;se<ce.attributes.length;se++)j=ce.attributes[se],Z.documentElement.setAttribute(j.name,j.value)}(ie,q),ie};var U=function(q){try{return F.failOnParseError(q)}catch(ie){throw{message:"Invalid source",originalError:ie}}};R.validateXHTML=function(q){var ie=new DOMParser().parseFromString(q,"application/xml");U(ie)};var V=null,H=function(q,ie){return new Promise(function(Z,oe){var ne,se,ce=new window.XMLHttpRequest,j=T.joinUrl(ie.baseUrl,q),de=(ne=j,(se=ie.cache)==="none"||se==="repeated"?(V!==null&&se==="repeated"||(V=Date.now()),ne+"?_="+V):ne),me=function(_e){oe({message:"Unable to load page",originalError:_e})};ce.addEventListener("load",function(){ce.status===200||ce.status===0?Z(ce.responseXML):me(ce.statusText)},!1),ce.addEventListener("error",function(_e){me(_e)},!1);try{ce.open("GET",de,!0),ce.responseType="document",ce.send(null)}catch(_e){me(_e)}})};return R.loadDocument=function(q,ie){return H(q,ie).then(function(Z){return U(Z)})},R}(I,w,v,window),B=function(T){"use strict";var D,F={},L=function(q,ie){return ie?URL.createObjectURL(new Blob([q],{type:"image/svg+xml"})):"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(q)},R=function(q){q instanceof Blob&&URL.revokeObjectURL(q)},k='<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1"><foreignObject></foreignObject></svg>',U=function(q){return new Promise(function(ie,Z){var oe=document.createElement("canvas"),ne=new Image;ne.onload=function(){var se=oe.getContext("2d");try{se.drawImage(ne,0,0),oe.toDataURL("image/png"),ie(!0)}catch{ie(!1)}},ne.onerror=Z,ne.src=q})},V=function(){return new Promise(function(q,ie){var Z;(function(){if(T.Blob)try{return new Blob(["<b></b>"],{type:"text/xml"}),!0}catch{}return!1})()&&T.URL?(Z=L(k,!0),U(Z).then(function(oe){return R(Z),!oe&&U(L(k,!1)).then(function(ne){return ne})},function(){return!1})).then(function(oe){q(!oe)},function(){ie()}):q(!1)})},H=function(q){return(D===void 0&&(D=V()),D).then(function(ie){return L(q,ie)})};return F.renderSvg=function(q){return new Promise(function(ie,Z){var oe,ne,se=function(){oe&&R(oe)};(ne=new Image).onload=function(){ne.onload=null,ne.onerror=null,se(),ie(ne)},ne.onerror=function(){se(),Z()},H(q).then(function(ce){oe=ce,ne.src=oe},Z)})},F}(window);return function(T,D,F){"use strict";var L={};L.drawDocument=function(){var k,U,V,H,q,ie,Z,oe=arguments[0],ne=Array.prototype.slice.call(arguments,1),se=T.parseOptionalParameters(ne),ce=oe.documentElement?oe.documentElement:oe;return F.rasterize(ce,se.canvas,(V=(k=se).canvas,H=k.options,q=V?V.width:300,ie=V?V.height:200,Z={width:H.width!==void 0?H.width:q,height:H.height!==void 0?H.height:ie},(U=T.clone(k.options)).width=Z.width,U.height=Z.height,U))},L.drawHTML=function(){var k,U,V,H,q=arguments[0],ie=Array.prototype.slice.call(arguments,1),Z=T.parseOptionalParameters(ie);return k=q,U=Z.canvas,V=Z.options,H=D.parseHTML(k),L.drawDocument(H,U,V)};var R=function(k,U,V){return D.loadDocument(k,V).then(function(H){var q=function(ie,Z,oe){var ne=document.implementation.createHTMLDocument("");ne.replaceChild(ie.documentElement,ne.documentElement);var se=oe?T.clone(oe):{};return oe.baseUrl||(se.baseUrl=Z),{document:ne,options:se}}(H,k,V);return L.drawDocument(q.document,U,q.options)})};return L.drawURL=function(){var k=arguments[0],U=Array.prototype.slice.call(arguments,1),V=T.parseOptionalParameters(U);return R(k,V.canvas,V.options)},L}(I,M,function(T,D,F,L,R,k){"use strict";var U={},V=function(ie){return{message:"Error rendering page",originalError:ie}},H=function(ie){return R.renderSvg(ie).then(function(Z){return{image:Z,svg:ie}},function(Z){throw V(Z)})},q=function(ie,Z,oe){return L.drawDocumentAsSvg(ie,oe).then(H).then(function(ne){return Z&&function(se,ce){try{ce.getContext("2d").drawImage(se,0,0)}catch(j){throw V(j)}}(ne.image,Z),ne})};return U.rasterize=function(ie,Z,oe){var ne;return(ne=T.clone(oe)).inlineScripts=oe.executeJs===!0,k.inlineReferences(ie,ne).then(function(se){return oe.executeJs?(ce=ie,j=oe,D.executeJavascript(ce,j).then(function(de){var me=de.document;return F.persistInputValues(me),{document:me,errors:de.errors}})).then(function(de){return{element:de.document.documentElement,errors:se.concat(de.errors)}}):{element:ie,errors:se};var ce,j}).then(function(se){return q(se.element,Z,oe).then(function(ce){return{image:ce.image,svg:ce.svg,errors:se.errors}})})},U}(I,M,Q,function(T,D,F,L){"use strict";var R={},k=function(V){var H=Object.keys(V);return H.length?" "+H.map(function(q){return q+'="'+V[q]+'"'}).join(" "):""},U=function(V,H,q){var ie=L.serializeToString(V);D.validateXHTML(ie);var Z,oe,ne,se,ce,j,de,me,_e=(Z=H,oe=Math.round(Z.viewportWidth),ne=Math.round(Z.viewportHeight),{x:-Z.left,y:-Z.top,width:oe,height:ne});return ce=(se=_e).style||"",se.style=ce+"float: left;",_e.externalResourcesRequired=!0,'<svg xmlns="http://www.w3.org/2000/svg"'+k((de=q||1,me={width:(j=H).width,height:j.height,"font-size":j.rootFontSize},de!==1&&(me.style="transform:scale("+de+"); transform-origin: 0 0;"),me))+'><style scoped="">html::-webkit-scrollbar { display: none; }</style><foreignObject'+k(_e)+">"+ie+"</foreignObject></svg>"};return R.getSvgForDocument=function(V,H,q){return F.rewriteTagNameSelectorsToLowerCase(V),U(V,H,q)},R.drawDocumentAsSvg=function(V,H){return["hover","active","focus","target"].forEach(function(q){H[q]&&F.fakeUserAction(V,H[q],q)}),D.calculateDocumentContentSize(V,H).then(function(q){return R.getSvgForDocument(V,q,H.zoom)})},R}(0,M,Q,x),B,E))},(m=this)===void 0&&window!==void 0&&(m=window),typeof A=="object"&&A.exports?A.exports=C(o("url"),o("xmlserializer"),o("sane-domparser-error"),o("inlineresources")):m.rasterizeHTML=C(m.url,m.xmlserializer,m.sanedomparsererror,m.inlineresources)},{inlineresources:5,"sane-domparser-error":14,url:15,xmlserializer:17}],2:[function(o,A,f){(function(m){(function(C){typeof f=="object"&&A!==void 0?A.exports=C():(typeof window<"u"?window:m!==void 0?m:typeof self<"u"?self:this).cssFontFaceSrc=C()})(function(){return function C(y,x,v){function E(Q,M){if(!x[Q]){if(!y[Q]){var B=typeof o=="function"&&o;if(!M&&B)return B(Q,!0);if(I)return I(Q,!0);var T=new Error("Cannot find module '"+Q+"'");throw T.code="MODULE_NOT_FOUND",T}var D=x[Q]={exports:{}};y[Q][0].call(D.exports,function(F){var L=y[Q][1][F];return E(L||F)},D,D.exports,C,y,x,v)}return x[Q].exports}for(var I=typeof o=="function"&&o,w=0;w<v.length;w++)E(v[w]);return E}({1:[function(C,y,x){"use strict";function v(E,I,w,Q){this.message=E,this.expected=I,this.found=w,this.location=Q,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,v)}(function(E,I){function w(){this.constructor=E}w.prototype=I.prototype,E.prototype=new w})(v,Error),v.buildMessage=function(E,I){var w,Q={literal:function(D){return'"'+B(D.text)+'"'},class:function(D){var F,L="";for(F=0;F<D.parts.length;F++)L+=D.parts[F]instanceof Array?T(D.parts[F][0])+"-"+T(D.parts[F][1]):T(D.parts[F]);return"["+(D.inverted?"^":"")+L+"]"},any:function(D){return"any character"},end:function(D){return"end of input"},other:function(D){return D.description}};function M(D){return D.charCodeAt(0).toString(16).toUpperCase()}function B(D){return D.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(F){return"\\x0"+M(F)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(F){return"\\x"+M(F)})}function T(D){return D.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(F){return"\\x0"+M(F)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(F){return"\\x"+M(F)})}return"Expected "+function(D){var F,L,R,k=new Array(D.length);for(F=0;F<D.length;F++)k[F]=(R=D[F],Q[R.type](R));if(k.sort(),0<k.length){for(L=F=1;F<k.length;F++)k[F-1]!==k[F]&&(k[L]=k[F],L++);k.length=L}switch(k.length){case 1:return k[0];case 2:return k[0]+" or "+k[1];default:return k.slice(0,-1).join(", ")+", or "+k[k.length-1]}}(E)+" but "+((w=I)?'"'+B(w)+'"':"end of input")+" found."},y.exports={SyntaxError:v,parse:function(E,I){I=I!==void 0?I:{};var w,Q={},M={start:Ne},B=Ne,T="",D=function(){return[]},F=",",L=he(",",!1),R=function(ze,Ze){return[ze].concat(Ze)},k=function(ze){return[ze]},U=function(ze,Ze){return{url:ze,format:Ze}},V=function(ze){return{url:ze}},H="url(",q=he("url(",!1),ie=")",Z=he(")",!1),oe=function(ze){return ze},ne="format(",se=he("format(",!1),ce="local(",j=he("local(",!1),de=function(ze){return{local:ze}},me=/^[^)]/,_e=fe([")"],!0,!1),Be=function(ze){return ht.extractValue(ze.join(""))},Qe=/^[ \t\r\n\f]/,Ie=fe([" ","   ","\r",`
`,"\f"],!1,!1),ve=0,K=[{line:1,column:1}],W=0,te=[],Y=0;if("startRule"in I){if(!(I.startRule in M))throw new Error(`Can't start parsing from rule "`+I.startRule+'".');B=M[I.startRule]}function he(ze,Ze){return{type:"literal",text:ze,ignoreCase:Ze}}function fe(ze,Ze,ct){return{type:"class",parts:ze,inverted:Ze,ignoreCase:ct}}function Ce(ze){var Ze,ct=K[ze];if(ct)return ct;for(Ze=ze-1;!K[Ze];)Ze--;for(ct={line:(ct=K[Ze]).line,column:ct.column};Ze<ze;)E.charCodeAt(Ze)===10?(ct.line++,ct.column=1):ct.column++,Ze++;return K[ze]=ct}function Ee(ze,Ze){var ct=Ce(ze),We=Ce(Ze);return{start:{offset:ze,line:ct.line,column:ct.column},end:{offset:Ze,line:We.line,column:We.column}}}function be(ze){ve<W||(W<ve&&(W=ve,te=[]),te.push(ze))}function Re(ze,Ze,ct){return new v(v.buildMessage(ze,Ze),ze,Ze,ct)}function Ne(){var ze,Ze;return(ze=function ct(){var We,Oe,Ye,rt,gt,Et;if(We=ve,(Oe=Je())!==Q){for(Ye=[],rt=$e();rt!==Q;)Ye.push(rt),rt=$e();if(Ye!==Q)if(E.charCodeAt(ve)===44?(rt=F,ve++):(rt=Q,Y===0&&be(L)),rt!==Q){for(gt=[],Et=$e();Et!==Q;)gt.push(Et),Et=$e();gt!==Q&&(Et=ct())!==Q?(Oe=R(Oe,Et),We=Oe):(ve=We,We=Q)}else ve=We,We=Q;else ve=We,We=Q}else ve=We,We=Q;return We===Q&&(We=ve,(Oe=Je())!==Q&&(Oe=k(Oe)),We=Oe),We}())===Q&&(ze=ve,(Ze=T)!==Q&&(Ze=D()),ze=Ze),ze}function Je(){var ze,Ze,ct,We,Oe;return(ze=function(){var Ye,rt,gt,Et,yt,vt,Rt,qt;if(Ye=ve,(rt=ot())!==Q){if(gt=[],(Et=$e())!==Q)for(;Et!==Q;)gt.push(Et),Et=$e();else gt=Q;gt!==Q&&(yt=ve,E.substr(ve,7)===ne?(vt=ne,ve+=7):(vt=Q,Y===0&&be(se)),vt!==Q&&(Rt=nt())!==Q?(E.charCodeAt(ve)===41?(qt=ie,ve++):(qt=Q,Y===0&&be(Z)),qt!==Q?(vt=oe(Rt),yt=vt):(ve=yt,yt=Q)):(ve=yt,yt=Q),(Et=yt)!==Q)?(rt=U(rt,Et),Ye=rt):(ve=Ye,Ye=Q)}else ve=Ye,Ye=Q;return Ye===Q&&(Ye=ve,(rt=ot())!==Q&&(rt=V(rt)),Ye=rt),Ye}())===Q&&(Ze=ve,E.substr(ve,6)===ce?(ct=ce,ve+=6):(ct=Q,Y===0&&be(j)),ct!==Q&&(We=nt())!==Q?(E.charCodeAt(ve)===41?(Oe=ie,ve++):(Oe=Q,Y===0&&be(Z)),Oe!==Q?(ct=de(We),Ze=ct):(ve=Ze,Ze=Q)):(ve=Ze,Ze=Q),ze=Ze),ze}function ot(){var ze,Ze,ct,We;return ze=ve,E.substr(ve,4)===H?(Ze=H,ve+=4):(Ze=Q,Y===0&&be(q)),Ze!==Q&&(ct=nt())!==Q?(E.charCodeAt(ve)===41?(We=ie,ve++):(We=Q,Y===0&&be(Z)),We!==Q?ze=Ze=oe(ct):(ve=ze,ze=Q)):(ve=ze,ze=Q),ze}function nt(){var ze,Ze;if(ze=[],me.test(E.charAt(ve))?(Ze=E.charAt(ve),ve++):(Ze=Q,Y===0&&be(_e)),Ze!==Q)for(;Ze!==Q;)ze.push(Ze),me.test(E.charAt(ve))?(Ze=E.charAt(ve),ve++):(Ze=Q,Y===0&&be(_e));else ze=Q;return ze!==Q&&(ze=Be(ze)),ze}function $e(){var ze;return Qe.test(E.charAt(ve))?(ze=E.charAt(ve),ve++):(ze=Q,Y===0&&be(Ie)),ze}var ht=C("../util");if((w=B())!==Q&&ve===E.length)return w;throw w!==Q&&ve<E.length&&be({type:"end"}),Re(te,W<E.length?E.charAt(W):null,W<E.length?Ee(W,W+1):Ee(W,W))}}},{"../util":3}],2:[function(C,y,x){var v=C("./grammar");x.SyntaxError=function(E,I){this.message=E,this.offset=I},x.parse=function(E){try{return v.parse(E)}catch(I){throw new x.SyntaxError(I.message,I.offset)}},x.serialize=function(E){return E.map(function(I){var w;return I.url?(w='url("'+I.url+'")',I.format&&(w+=' format("'+I.format+'")')):w='local("'+I.local+'")',w}).join(", ")}},{"./grammar":1}],3:[function(C,y,x){x.extractValue=function(v){return E=v.replace(/^[\t\r\f\n ]*(.+?)[\t\r\f\n ]*$/,"$1"),w=/^'(.*)'$/,(I=/^"(.*)"$/).test(E)?E.replace(I,"$1"):w.test(E)?E.replace(w,"$1"):E;var E,I,w}},{}]},{},[2])(2)})}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],3:[function(o,A,f){"use strict";var m=o("./cssSupport");f.extractCssUrl=function(C){var y,x=/^url\(("[^"]+"|'[^']+'|[^\)]+)\)/;if(!x.test(C))throw new Error("Invalid url");return y=x.exec(C)[1],m.unquoteString(y.replace(/^[\t\r\f\n ]*(.+?)[\t\r\f\n ]*$/,"$1"))},f.parse=function(C){return function(y){var x,v=`(url\\(\\s*(?:"[^"]*"|'[^']*'|[^\\(]+)\\s*\\)|[^,\\s]+)`,E="(?:\\s*"+v+")+",I=new RegExp(E,"g"),w=[],Q=function(M){var B,T=new RegExp(v,"g"),D=[];for(B=T.exec(M);B;)D.push(B[1]),B=T.exec(M);return D};if(y.match(new RegExp(`^\\s*((?:\\s*(url\\(\\s*(?:"[^"]*"|'[^']*'|[^\\(]+)\\s*\\)|[^,\\s]+))+)(?:\\s*,\\s*((?:\\s*(url\\(\\s*(?:"[^"]*"|'[^']*'|[^\\(]+)\\s*\\)|[^,\\s]+))+))*\\s*$`))){for(x=I.exec(y);x;)w.push(Q(x[0])),x=I.exec(y);return w}return[]}(C).map(function(y){var x=function(v){var E;for(E=0;E<v.length;E++)try{return{url:f.extractCssUrl(v[E]),idx:E}}catch{}}(y);return x?{preUrl:y.slice(0,x.idx),url:x.url,postUrl:y.slice(x.idx+1)}:{preUrl:y}})},f.serialize=function(C){return C.map(function(y){var x=[].concat(y.preUrl);return y.url&&x.push('url("'+y.url+'")'),y.postUrl&&(x=x.concat(y.postUrl)),x.join(" ")}).join(", ")}},{"./cssSupport":4}],4:[function(o,A,f){"use strict";f.unquoteString=function(m){var C=/^"(.*)"$/,y=/^'(.*)'$/;return C.test(m)?m.replace(C,"$1"):y.test(m)?m.replace(y,"$1"):m},f.rulesForCssText=function(m){var C,y=document.implementation.createHTMLDocument(""),x=document.createElement("style");return x.textContent=m,y.body.appendChild(x),C=x.sheet.cssRules,Array.prototype.slice.call(C)},f.cssRulesToText=function(m){return m.reduce(function(C,y){return C+y.cssText},"")},f.exchangeRule=function(m,C,y){m[m.indexOf(C)]=f.rulesForCssText(y)[0]},f.changeFontFaceRuleSrc=function(m,C,y){var x="@font-face { font-family: "+C.style.getPropertyValue("font-family")+"; ";C.style.getPropertyValue("font-style")&&(x+="font-style: "+C.style.getPropertyValue("font-style")+"; "),C.style.getPropertyValue("font-weight")&&(x+="font-weight: "+C.style.getPropertyValue("font-weight")+"; "),x+="src: "+y+"}",f.exchangeRule(m,C,x)}},{}],5:[function(o,A,f){"use strict";var m=o("./util"),C=o("./inlineImage"),y=o("./inlineScript"),x=o("./inlineCss"),v=o("./cssSupport"),E=function(M){return M.map(function(B,T){var D;return T===M.length-1&&(B={baseUrl:(D=B.baseUrl,m.joinUrl(D,"."))}),JSON.stringify(B)})},I=function(M,B){return B.cache!==!1&&B.cache!=="none"&&B.cacheBucket?m.memoize(M,E,B.cacheBucket):M},w=function(M,B,T){var D=v.rulesForCssText(M);return x.loadCSSImportsForRules(D,B,T).then(function(F){return x.loadAndInlineCSSResourcesForRules(D,T).then(function(L){var R=F.errors.concat(L.errors),k=F.hasChanges||L.hasChanges;return k&&(M=v.cssRulesToText(D)),{hasChanges:k,content:M,errors:R}})})};f.loadAndInlineStyles=function(M,B){var T,D,F=(D=M.getElementsByTagName("style"),Array.prototype.filter.call(D,function(k){return!k.attributes.type||k.attributes.type.value==="text/css"})),L=[],R=[];return(T=m.clone(B)).baseUrl=T.baseUrl||m.getDocumentBaseUrl(M),Promise.all(F.map(function(k){return(U=k,V=T,H=R,q=U.textContent,I(w,V)(q,H,V).then(function(ie){return ie.hasChanges&&(U.childNodes[0].nodeValue=ie.content),m.cloneArray(ie.errors)})).then(function(ie){L=L.concat(ie)});var U,V,H,q})).then(function(){return L})};var Q=function(M,B){return m.ajax(M,B).then(function(T){return{content:T,cssRules:v.rulesForCssText(T)}}).then(function(T){var D=x.adjustPathsOfCssResources(M,T.cssRules);return{content:T.content,cssRules:T.cssRules,hasChanges:D}}).then(function(T){return x.loadCSSImportsForRules(T.cssRules,[],B).then(function(D){return{content:T.content,cssRules:T.cssRules,hasChanges:T.hasChanges||D.hasChanges,errors:D.errors}})}).then(function(T){return x.loadAndInlineCSSResourcesForRules(T.cssRules,B).then(function(D){return{content:T.content,cssRules:T.cssRules,hasChanges:T.hasChanges||D.hasChanges,errors:T.errors.concat(D.errors)}})}).then(function(T){var D=T.content;return T.hasChanges&&(D=v.cssRulesToText(T.cssRules)),{content:D,errors:T.errors}})};f.loadAndInlineCssLinks=function(M,B){var T,D=(T=M.getElementsByTagName("link"),Array.prototype.filter.call(T,function(L){return L.attributes.rel&&L.attributes.rel.value==="stylesheet"&&(!L.attributes.type||L.attributes.type.value==="text/css")})),F=[];return Promise.all(D.map(function(L){return(R=L,k=B,U=R.attributes.href.value,V=m.getDocumentBaseUrl(R.ownerDocument),H=m.clone(k),!H.baseUrl&&V&&(H.baseUrl=V),I(Q,k)(U,H).then(function(q){return{content:q.content,errors:m.cloneArray(q.errors)}})).then(function(q){var ie,Z,oe,ne;ie=L,Z=q.content+`
@@ -14062,27 +14062,14 @@
            material.diffuse = material.diffuse * u_backgroundBrightness + diffuse;
        }`})}function UBi(o,A,f,m,C,y,x){let v=kBi(A,f,y,x);o.spotMaterial=v,m.preUpdate.addEventListener(function(){let E=m.camera.viewMatrix,I=new Xe;Xe.multiply(E,C,I),Xe.toArray(I,iie),v&&(v.uniforms.u_spotmodelViewMatrix=iie)})}function GBi(o,A,f,m,C,y,x,v){let E=Rot(A,f,y,x,v);o.customShader=E,m.preUpdate.addEventListener(function(){let I=m.camera.viewMatrix,w=new Xe;Xe.multiply(I,C,w),E.setUniform("u_spotmodelViewMatrix",w)})}function HBi(o,A,f,m,C,y,x){let v=Rot(A,f,y,x);o.customShader=v,m.preUpdate.addEventListener(function(){let E=m.camera.viewMatrix,I=new Xe;Xe.multiply(E,C,I),v.setUniform("u_spotmodelViewMatrix",I)})}function Zoe(o,A={},f=[]){!O(o)||(this._viewer=o,this._texture=void 0,!(!O(A)&&!(O(A.globe)&&O(A.tileset)&&O(A.gltf)))&&this.initialize(o,A,f))}Zoe.prototype.reSet=function(o={},A=[]){this._texture&&(this._texture.destroy(),this._texture=void 0),this.initialize(this._viewer,o,A)};Zoe.prototype.destroy=function(o){!O(o)&&!(O(o.globe)&&O(o.tileset)&&O(o.gltf))||(O(o.globe)&&o.globe.spotMaterial&&(o.globe.spotMaterial=void 0),O(o.tileset)&&o.tileset.customShader&&(o.tileset.customShader=null),O(o.gltf)&&o.gltf.customShader&&(o.gltf.customShader=null),this._texture&&(this._texture.destroy(),this._texture=void 0))};Zoe.prototype.initialize=function(o,A,f){if(!O(A)&&!(O(A.globe)&&O(A.tileset)&&O(A.gltf)))return;let m=Ae(A.globeBrightness,.2),C=Ae(A.gltfBrightness,.2),y=Ae(A.tilesetBrightness,.2),x=Ae(A.gltfLightModel,rI.PBR),v=Ae(A.tilesetLightModel,rI.PBR);if(!Array.isArray(f)||f.length===0)return;let E=o.scene,I=zn.eastNorthUpToFixedFrame(f[0].position),w=new Xe;Xe.inverseTransformation(I,w);let Q=[],M=new ee;for(let D=0;D<f.length;D++){let F=f[D];Xe.multiplyByPoint(w,F.position,M),Q.push(M.x,M.y,M.z),Q.push(F.direction.x,F.direction.y,F.direction.z),Q.push(F.spotColor.red,F.spotColor.green,F.spotColor.blue),Q.push(F.distance,Math.cos(F.cutOff/180*3.1415),Math.cos(F.outerCutOff/180*3.1415))}let B=!1,T=NBi(Q,E.context,B);this._texture=T,A.globe&&UBi(A.globe,T,Q,E,I,B,m),A.tileset&&GBi(A.tileset,T,Q,E,I,B,y,v),A.gltf&&HBi(A.gltf,T,Q,E,I,B,C,x)};var Lot=Zoe,Fot=/{[^}]+}/g,Not={x:YBi,y:WBi,z:XBi,s:ZBi,reverseX:JBi,reverseY:jBi,reverseZ:qBi,westDegrees:$Bi,southDegrees:e1i,eastDegrees:t1i,northDegrees:i1i,westProjected:r1i,southProjected:n1i,eastProjected:o1i,northProjected:a1i,width:s1i,height:l1i},VBi=ia(Not,{i:u1i,j:c1i,reverseI:A1i,reverseJ:h1i,longitudeDegrees:f1i,latitudeDegrees:g1i,longitudeProjected:p1i,latitudeProjected:m1i,format:y1i});function _O(o){this._errorEvent=new Event,this._resource=void 0,this._urlSchemeZeroPadding=void 0,this._pickFeaturesResource=void 0,this._tileWidth=void 0,this._tileHeight=void 0,this._maximumLevel=void 0,this._minimumLevel=void 0,this._tilingScheme=void 0,this._rectangle=void 0,this._tileDiscardPolicy=void 0,this._credit=void 0,this._hasAlphaChannel=void 0,this._readyPromise=void 0,this._tags=void 0,this._pickFeaturesTags=void 0,this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0,this.enablePickFeatures=!0,this.reinitialize(o)}Object.defineProperties(_O.prototype,{url:{get:function(){return this._resource.url}},urlSchemeZeroPadding:{get:function(){return this._urlSchemeZeroPadding}},pickFeaturesUrl:{get:function(){return this._pickFeaturesResource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return this._minimumLevel}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return O(this._resource)}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return this._hasAlphaChannel}}});_O.prototype.reinitialize=function(o){let A=this;A._readyPromise=Promise.resolve(o).then(function(f){let m=f.customTags,C=ia(Not,m),y=ia(VBi,m),x=An.createIfNeeded(f.url),v=An.createIfNeeded(f.pickFeaturesUrl);A.enablePickFeatures=Ae(f.enablePickFeatures,A.enablePickFeatures),A._urlSchemeZeroPadding=Ae(f.urlSchemeZeroPadding,A.urlSchemeZeroPadding),A._tileDiscardPolicy=f.tileDiscardPolicy,A._getFeatureInfoFormats=f.getFeatureInfoFormats,A._subdomains=f.subdomains,Array.isArray(A._subdomains)?A._subdomains=A._subdomains.slice():O(A._subdomains)&&A._subdomains.length>0?A._subdomains=A._subdomains.split(""):A._subdomains=["a","b","c"],A._tileWidth=Ae(f.tileWidth,256),A._tileHeight=Ae(f.tileHeight,256),A._minimumLevel=Ae(f.minimumLevel,0),A._maximumLevel=f.maximumLevel,A._tilingScheme=Ae(f.tilingScheme,new Am({ellipsoid:f.ellipsoid})),A._rectangle=Ae(f.rectangle,A._tilingScheme.rectangle),A._rectangle=Si.intersection(A._rectangle,A._tilingScheme.rectangle),A._hasAlphaChannel=Ae(f.hasAlphaChannel,!0);let E=f.credit;return typeof E=="string"&&(E=new tl(E)),A._credit=E,A._resource=x,A._tags=C,A._pickFeaturesResource=v,A._pickFeaturesTags=y,!0})};_O.prototype.getTileCredits=function(o,A,f){};_O.prototype.requestImage=function(o,A,f,m){let C=zBi(this,o,A,f,m),y=a2.loadImage(this,C);return typeof this.loadtitle=="function"&&this.loadtitle(C),y};_O.prototype.loadtitle=function(o){};_O.prototype.pickFeatures=function(o,A,f,m,C){if(!this.enablePickFeatures||!O(this._pickFeaturesResource)||this._getFeatureInfoFormats.length===0)return;let y=0,x=this;function v(I,w){return I.callback(w)}function E(){if(y>=x._getFeatureInfoFormats.length)return Promise.resolve([]);let I=x._getFeatureInfoFormats[y],w=KBi(x,o,A,f,m,C,I.format);return++y,I.type==="json"?w.fetchJson().then(I.callback).otherwise(E):I.type==="xml"?w.fetchXML().then(I.callback).otherwise(E):I.type==="text"||I.type==="html"?w.fetchText().then(I.callback).otherwise(E):w.fetch({responseType:I.format}).then(v.bind(void 0,I)).otherwise(E)}return E()};var rie=!1,D_=new Si,nie=!1,ZJ=new Si;function zBi(o,A,f,m,C){rie=!1,nie=!1;let y=o._resource,x=y.getUrlComponent(!0),v=o._tags,E={},I=x.match(Fot);return O(I)&&I.forEach(function(w){let Q=w.substring(1,w.length-1);O(v[Q])&&(E[Q]=v[Q](o,A,f,m))}),y.getDerivedResource({request:C,templateValues:E})}var pme=!1,F8=new Bt,mme=!1;function KBi(o,A,f,m,C,y,x){rie=!1,nie=!1,pme=!1,mme=!1;let v=o._pickFeaturesResource,E=v.getUrlComponent(!0),I=o._pickFeaturesTags,w={},Q=E.match(Fot);return O(Q)&&Q.forEach(function(M){let B=M.substring(1,M.length-1);O(I[B])&&(w[B]=I[B](o,A,f,m,C,y,x))}),v.getDerivedResource({templateValues:w})}function uH(o,A,f){if(o&&o.urlSchemeZeroPadding&&o.urlSchemeZeroPadding.hasOwnProperty(A)){let m=o.urlSchemeZeroPadding[A];if(typeof m=="string"){let C=m.length;C>1&&(f=f.length>=C?f:new Array(C-f.toString().length+1).join("0")+f)}}return f}function YBi(o,A,f,m){return uH(o,"{x}",A)}function JBi(o,A,f,m){let C=o.tilingScheme.getNumberOfXTilesAtLevel(m)-A-1;return uH(o,"{reverseX}",C)}function WBi(o,A,f,m){return uH(o,"{y}",f)}function jBi(o,A,f,m){let C=o.tilingScheme.getNumberOfYTilesAtLevel(m)-f-1;return uH(o,"{reverseY}",C)}function qBi(o,A,f,m){let C=o.maximumLevel,y=O(C)&&m<C?C-m-1:m;return uH(o,"{reverseZ}",y)}function XBi(o,A,f,m){return uH(o,"{z}",m)}function ZBi(o,A,f,m){let C=(A+f+m)%o._subdomains.length;return o._subdomains[C]}function $oe(o,A,f,m){rie||(o.tilingScheme.tileXYToRectangle(A,f,m,D_),D_.west=je.toDegrees(D_.west),D_.south=je.toDegrees(D_.south),D_.east=je.toDegrees(D_.east),D_.north=je.toDegrees(D_.north),rie=!0)}function $Bi(o,A,f,m){return $oe(o,A,f,m),D_.west}function e1i(o,A,f,m){return $oe(o,A,f,m),D_.south}function t1i(o,A,f,m){return $oe(o,A,f,m),D_.east}function i1i(o,A,f,m){return $oe(o,A,f,m),D_.north}function eae(o,A,f,m){nie||(o.tilingScheme.tileXYToNativeRectangle(A,f,m,ZJ),nie=!0)}function r1i(o,A,f,m){return eae(o,A,f,m),ZJ.west}function n1i(o,A,f,m){return eae(o,A,f,m),ZJ.south}function o1i(o,A,f,m){return eae(o,A,f,m),ZJ.east}function a1i(o,A,f,m){return eae(o,A,f,m),ZJ.north}function s1i(o,A,f,m){return o.tileWidth}function l1i(o,A,f,m){return o.tileHeight}function u1i(o,A,f,m,C,y,x){return tae(o,A,f,m,C,y),F8.x}function c1i(o,A,f,m,C,y,x){return tae(o,A,f,m,C,y),F8.y}function A1i(o,A,f,m,C,y,x){return tae(o,A,f,m,C,y),o.tileWidth-F8.x-1}function h1i(o,A,f,m,C,y,x){return tae(o,A,f,m,C,y),o.tileHeight-F8.y-1}var d1i=new Si,ZG=new ee;function tae(o,A,f,m,C,y,x){if(pme)return;ZQe(o,A,f,m,C,y);let v=ZG,E=o.tilingScheme.tileXYToNativeRectangle(A,f,m,d1i);F8.x=o.tileWidth*(v.x-E.west)/E.width|0,F8.y=o.tileHeight*(E.north-v.y)/E.height|0,pme=!0}function f1i(o,A,f,m,C,y,x){return je.toDegrees(C)}function g1i(o,A,f,m,C,y,x){return je.toDegrees(y)}function p1i(o,A,f,m,C,y,x){return ZQe(o,A,f,m,C,y),ZG.x}function m1i(o,A,f,m,C,y,x){return ZQe(o,A,f,m,C,y),ZG.y}var C1i=new Kt;function ZQe(o,A,f,m,C,y,x){if(!mme){if(o.tilingScheme.projection instanceof Dg)ZG.x=je.toDegrees(C),ZG.y=je.toDegrees(y);else{let v=C1i;v.longitude=C,v.latitude=y,o.tilingScheme.projection.project(v,ZG)}mme=!0}}function y1i(o,A,f,m,C,y,x){return x}var kot=_O;function JF(o){this._definitionChanged=new br,this.baseWaterColor=Ae(o.baseWaterColor,new At(.2,.3,.6,.5)),this.waterFrequency=Ae(o.waterFrequency,1e3),this.animationSpeed=Ae(o.animationSpeed,.01),this.amplitude=Ae(o.amplitude,10),this._translucnet=Ae(o.translucent,!0),this._time=new Date().getTime()}Object.defineProperties(JF.prototype,{isConstant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}}});JF.prototype.getType=function(o){return as.WaterType};JF.prototype.getValue=function(o,A){return O(A)||(A={}),A.normalMap=xs("Assets/Images/waterNormals.jpg"),A.baseWaterColor=this.baseWaterColor,A.frequency=this.waterFrequency,A.animationSpeed=this.animationSpeed,A.amplitude=this.amplitude,A};JF.prototype.update=function(){let o=fi.now();return this.getValue(o)};JF.prototype.isTranslucent=function(){return this._translucnet};JF.prototype.equals=function(o){return this===o||o instanceof JF&&Nt.equals(this.baseWaterColor,o.baseWaterColor)};var Oot=JF,x1i=At.WHITE,v1i=At.BLACK,E1i=new Bt(2,2);function N8(o){o=Ae(o,Ae.EMPTY_OBJECT),this._definitionChanged=new br,this._evenColor=void 0,this._evenColorSubscription=void 0,this._oddColor=void 0,this._oddColorSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.evenColor=o.evenColor,this.oddColor=o.oddColor,this.repeat=o.repeat}Object.defineProperties(N8.prototype,{isConstant:{get:function(){return Nt.isConstant(this._evenColor)&&Nt.isConstant(this._oddColor)&&Nt.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},evenColor:Bi("evenColor"),oddColor:Bi("oddColor"),repeat:Bi("repeat")});N8.prototype.getType=function(o){return"Checkerboard"};N8.prototype.getValue=function(o,A){return O(A)||(A={}),A.lightColor=Nt.getValueOrClonedDefault(this._evenColor,o,x1i,A.lightColor),A.darkColor=Nt.getValueOrClonedDefault(this._oddColor,o,v1i,A.darkColor),A.repeat=Nt.getValueOrDefault(this._repeat,o,E1i),A};N8.prototype.equals=function(o){return this===o||o instanceof N8&&Nt.equals(this._evenColor,o._evenColor)&&Nt.equals(this._oddColor,o._oddColor)&&Nt.equals(this._repeat,o._repeat)};var oie=N8,aie={id:void 0},$G=new Array(2);function Cme(o){let A=o.propertyNames,f=A.length;for(let m=0;m<f;m++)o[A[m]]=void 0;o._name=void 0,o._availability=void 0}function Uot(o,A,f,m){$G[0]=f,$G[1]=m.id,A[JSON.stringify($G)]=m.definitionChanged.addEventListener(Sg.prototype._onDefinitionChanged,o)}function Got(o,A,f,m){$G[0]=f,$G[1]=m.id;let C=JSON.stringify($G);A[C](),A[C]=void 0}function yN(o){if(o._shouldRecomposite=!0,o._suspendCount!==0)return;let A=o._collections,f=A.length,m=o._collectionsCopy,C=m.length,y,x,v,E,I,w=o._composite,Q=new iw(o),M=o._eventHash,B;for(y=0;y<C;y++)for(I=m[y],I.collectionChanged.removeEventListener(Sg.prototype._onCollectionChanged,o),v=I.values,B=I.id,E=v.length-1;E>-1;E--)x=v[E],Got(o,M,B,x);for(y=f-1;y>=0;y--)for(I=A[y],I.collectionChanged.addEventListener(Sg.prototype._onCollectionChanged,o),v=I.values,B=I.id,E=v.length-1;E>-1;E--){x=v[E],Uot(o,M,B,x);let D=Q.getById(x.id);O(D)||(D=w.getById(x.id),O(D)?Cme(D):(aie.id=x.id,D=new kA(aie)),Q.add(D)),D.merge(x)}o._collectionsCopy=A.slice(0),w.suspendEvents(),w.removeAll();let T=Q.values;for(y=0;y<T.length;y++)w.add(T[y]);w.resumeEvents()}function Sg(o,A){this._owner=A,this._composite=new iw(this),this._suspendCount=0,this._collections=O(o)?o.slice():[],this._collectionsCopy=[],this._id=Vu(),this._eventHash={},yN(this),this._shouldRecomposite=!1}Object.defineProperties(Sg.prototype,{collectionChanged:{get:function(){return this._composite._collectionChanged}},id:{get:function(){return this._id}},values:{get:function(){return this._composite.values}},owner:{get:function(){return this._owner}}});Sg.prototype.addCollection=function(o,A){O(A)?this._collections.splice(A,0,o):(A=this._collections.length,this._collections.push(o)),yN(this)};Sg.prototype.removeCollection=function(o){let A=this._collections.indexOf(o);return A!==-1?(this._collections.splice(A,1),yN(this),!0):!1};Sg.prototype.removeAllCollections=function(){this._collections.length=0,yN(this)};Sg.prototype.containsCollection=function(o){return this._collections.indexOf(o)!==-1};Sg.prototype.contains=function(o){return this._composite.contains(o)};Sg.prototype.indexOfCollection=function(o){return this._collections.indexOf(o)};Sg.prototype.getCollection=function(o){return this._collections[o]};Sg.prototype.getCollectionsLength=function(){return this._collections.length};function iae(o,A){return o.indexOf(A)}function Hot(o,A,f){let m=o._collections;if(A=je.clamp(A,0,m.length-1),f=je.clamp(f,0,m.length-1),A===f)return;let C=m[A];m[A]=m[f],m[f]=C,yN(o)}Sg.prototype.raiseCollection=function(o){let A=iae(this._collections,o);Hot(this,A,A+1)};Sg.prototype.lowerCollection=function(o){let A=iae(this._collections,o);Hot(this,A,A-1)};Sg.prototype.raiseCollectionToTop=function(o){let A=iae(this._collections,o);A!==this._collections.length-1&&(this._collections.splice(A,1),this._collections.push(o),yN(this))};Sg.prototype.lowerCollectionToBottom=function(o){let A=iae(this._collections,o);A!==0&&(this._collections.splice(A,1),this._collections.splice(0,0,o),yN(this))};Sg.prototype.suspendEvents=function(){this._suspendCount++,this._composite.suspendEvents()};Sg.prototype.resumeEvents=function(){this._suspendCount--,this._shouldRecomposite&&this._suspendCount===0&&(yN(this),this._shouldRecomposite=!1),this._composite.resumeEvents()};Sg.prototype.computeAvailability=function(){return this._composite.computeAvailability()};Sg.prototype.getById=function(o){return this._composite.getById(o)};Sg.prototype._onCollectionChanged=function(o,A,f){let m=this._collectionsCopy,C=m.length,y=this._composite;y.suspendEvents();let x,v,E,I,w=f.length,Q=this._eventHash,M=o.id;for(x=0;x<w;x++){let T=f[x];Got(this,Q,M,T);let D=T.id;for(v=C-1;v>=0;v--)E=m[v].getById(D),O(E)&&(O(I)||(I=y.getById(D),Cme(I)),I.merge(E));O(I)||y.removeById(D),I=void 0}let B=A.length;for(x=0;x<B;x++){let T=A[x];Uot(this,Q,M,T);let D=T.id;for(v=C-1;v>=0;v--)E=m[v].getById(D),O(E)&&(O(I)||(I=y.getById(D),O(I)?Cme(I):(aie.id=D,I=new kA(aie),y.add(I))),I.merge(E));I=void 0}y.resumeEvents()};Sg.prototype._onDefinitionChanged=function(o,A,f,m){let C=this._collections,y=this._composite,x=C.length,v=o.id,E=y.getById(v),I=E[A],w=!O(I),Q=!0;for(let M=x-1;M>=0;M--){let B=C[M].getById(o.id);if(O(B)){let T=B[A];if(O(T)){if(Q)if(Q=!1,O(T.merge)&&O(T.clone))I=T.clone(I);else{I=T;break}I.merge(T)}}}w&&E.propertyNames.indexOf(A)===-1&&E.addProperty(A),E[A]=I};var Vot=Sg;function WF(){this._definitionChanged=new br,this._composite=new P1,this._composite.definitionChanged.addEventListener(WF.prototype._raiseDefinitionChanged,this)}Object.defineProperties(WF.prototype,{isConstant:{get:function(){return this._composite.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._composite._intervals}}});WF.prototype.getType=function(o){let A=this._composite._intervals.findDataForIntervalContainingDate(o);if(O(A))return A.getType(o)};WF.prototype.getValue=function(o,A){let f=this._composite._intervals.findDataForIntervalContainingDate(o);if(O(f))return f.getValue(o,A)};WF.prototype.equals=function(o){return this===o||o instanceof WF&&this._composite.equals(o._composite,Nt.equals)};WF.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var sie=WF,I1i=je.factorial;function $Qe(o,A,f,m,C,y){let x=0,v,E,I;if(m>0){for(E=0;E<C;E++){for(v=!1,I=0;I<y.length&&!v;I++)E===y[I]&&(v=!0);v||(y.push(E),x+=$Qe(o,A,f,m-1,C,y),y.splice(y.length-1,1))}return x}for(x=1,E=0;E<C;E++){for(v=!1,I=0;I<y.length&&!v;I++)E===y[I]&&(v=!0);v||(x*=o-f[A[E]])}return x}var rae={type:"Hermite"};rae.getRequiredDataPoints=function(o,A){return A=Ae(A,0),Math.max(Math.floor((o+1)/(A+1)),2)};rae.interpolateOrderZero=function(o,A,f,m,C){O(C)||(C=new Array(m));let y,x,v,E,I,w,Q=A.length,M=new Array(m);for(y=0;y<m;y++){C[y]=0;let F=new Array(Q);for(M[y]=F,x=0;x<Q;x++)F[x]=[]}let B=Q,T=new Array(B);for(y=0;y<B;y++)T[y]=y;let D=Q-1;for(E=0;E<m;E++){for(x=0;x<B;x++)w=T[x]*m+E,M[E][0].push(f[w]);for(y=1;y<B;y++){let F=!1;for(x=0;x<B-y;x++){let L=A[T[x]],R=A[T[x+y]],k;R-L<=0?(w=T[x]*m+m*y+E,k=f[w],M[E][y].push(k/I1i(y))):(k=M[E][y-1][x+1]-M[E][y-1][x],M[E][y].push(k/(R-L))),F=F||k!==0}F||(D=y-1)}}for(v=0,I=0;v<=I;v++)for(y=v;y<=D;y++){let F=$Qe(o,T,A,v,y,[]);for(E=0;E<m;E++){let L=M[E][y][0];C[E+v*m]+=L*F}}return C};var _1i=[];rae.interpolate=function(o,A,f,m,C,y,x){let v=m*(y+1);O(x)||(x=new Array(v));for(let L=0;L<v;L++)x[L]=0;let E=A.length,I=new Array(E*(C+1)),w;for(w=0;w<E;w++)for(let L=0;L<C+1;L++)I[w*(C+1)+L]=w;let Q=I.length,M=_1i,B=B1i(M,I,A,f,m,C),T=[],D=Q*(Q+1)/2,F=Math.min(B,y);for(let L=0;L<=F;L++)for(w=L;w<=B;w++){T.length=0;let R=$Qe(o,I,A,L,w,T),k=Math.floor(w*(1-w)/2)+Q*w;for(let U=0;U<m;U++){let V=Math.floor(U*D),H=M[V+k];x[U+L*m]+=H*R}}return x};function B1i(o,A,f,m,C,y){let x,v,E=-1,I=A.length,w=I*(I+1)/2;for(let Q=0;Q<C;Q++){let M=Math.floor(Q*w);for(x=0;x<I;x++)v=A[x]*C*(y+1)+Q,o[M+x]=m[v];for(let B=1;B<I;B++){let T=0,D=Math.floor(B*(1-B)/2)+I*B,F=!1;for(x=0;x<I-B;x++){let L=f[A[x]],R=f[A[x+B]],k,U;if(R-L<=0)v=A[x]*C*(y+1)+C*B+Q,k=m[v],U=k/je.factorial(B),o[M+D+T]=U,T++;else{let V=Math.floor((B-1)*(2-B)/2)+I*(B-1);k=o[M+V+x+1]-o[M+V+x],U=k/(R-L),o[M+D+T]=U,T++}F=F||k!==0}F&&(E=Math.max(E,B))}}return E}var eSe=rae,tSe={type:"Lagrange"};tSe.getRequiredDataPoints=function(o){return Math.max(o+1,2)};tSe.interpolateOrderZero=function(o,A,f,m,C){O(C)||(C=new Array(m));let y,x,v=A.length;for(y=0;y<m;y++)C[y]=0;for(y=0;y<v;y++){let E=1;for(x=0;x<v;x++)if(x!==y){let I=A[y]-A[x];E*=(o-A[x])/I}for(x=0;x<m;x++)C[x]+=E*f[y*m+x]}return C};var iSe=tSe;function Dx(o,A,f){this.clock=Ae(o,0),this.cone=Ae(A,0),this.magnitude=Ae(f,1)}Dx.fromCartesian3=function(o,A){let f=o.x,m=o.y,C=o.z,y=f*f+m*m;return O(A)||(A=new Dx),A.clock=Math.atan2(m,f),A.cone=Math.atan2(Math.sqrt(y),C),A.magnitude=Math.sqrt(y+C*C),A};Dx.clone=function(o,A){if(O(o))return O(A)?(A.clock=o.clock,A.cone=o.cone,A.magnitude=o.magnitude,A):new Dx(o.clock,o.cone,o.magnitude)};Dx.normalize=function(o,A){return O(A)?(A.clock=o.clock,A.cone=o.cone,A.magnitude=1,A):new Dx(o.clock,o.cone,1)};Dx.equals=function(o,A){return o===A||O(o)&&O(A)&&o.clock===A.clock&&o.cone===A.cone&&o.magnitude===A.magnitude};Dx.equalsEpsilon=function(o,A,f){return f=Ae(f,0),o===A||O(o)&&O(A)&&Math.abs(o.clock-A.clock)<=f&&Math.abs(o.cone-A.cone)<=f&&Math.abs(o.magnitude-A.magnitude)<=f};Dx.prototype.equals=function(o){return Dx.equals(this,o)};Dx.prototype.clone=function(o){return Dx.clone(this,o)};Dx.prototype.equalsEpsilon=function(o,A){return Dx.equalsEpsilon(this,o,A)};Dx.prototype.toString=function(){return`(${this.clock}, ${this.cone}, ${this.magnitude})`};var rSe=Dx,nae=xh(Z1(),1),w1i=At.WHITE,b1i=.1,Q1i=new Bt(8,8),S1i=new Bt(0,0),D1i=new Bt(1,1);function k8(o){o=Ae(o,Ae.EMPTY_OBJECT),this._definitionChanged=new br,this._color=void 0,this._colorSubscription=void 0,this._cellAlpha=void 0,this._cellAlphaSubscription=void 0,this._lineCount=void 0,this._lineCountSubscription=void 0,this._lineThickness=void 0,this._lineThicknessSubscription=void 0,this._lineOffset=void 0,this._lineOffsetSubscription=void 0,this.color=o.color,this.cellAlpha=o.cellAlpha,this.lineCount=o.lineCount,this.lineThickness=o.lineThickness,this.lineOffset=o.lineOffset}Object.defineProperties(k8.prototype,{isConstant:{get:function(){return Nt.isConstant(this._color)&&Nt.isConstant(this._cellAlpha)&&Nt.isConstant(this._lineCount)&&Nt.isConstant(this._lineThickness)&&Nt.isConstant(this._lineOffset)}},definitionChanged:{get:function(){return this._definitionChanged}},color:Bi("color"),cellAlpha:Bi("cellAlpha"),lineCount:Bi("lineCount"),lineThickness:Bi("lineThickness"),lineOffset:Bi("lineOffset")});k8.prototype.getType=function(o){return"Grid"};k8.prototype.getValue=function(o,A){return O(A)||(A={}),A.color=Nt.getValueOrClonedDefault(this._color,o,w1i,A.color),A.cellAlpha=Nt.getValueOrDefault(this._cellAlpha,o,b1i),A.lineCount=Nt.getValueOrClonedDefault(this._lineCount,o,Q1i,A.lineCount),A.lineThickness=Nt.getValueOrClonedDefault(this._lineThickness,o,D1i,A.lineThickness),A.lineOffset=Nt.getValueOrClonedDefault(this._lineOffset,o,S1i,A.lineOffset),A};k8.prototype.equals=function(o){return this===o||o instanceof k8&&Nt.equals(this._color,o._color)&&Nt.equals(this._cellAlpha,o._cellAlpha)&&Nt.equals(this._lineCount,o._lineCount)&&Nt.equals(this._lineThickness,o._lineThickness)&&Nt.equals(this._lineOffset,o._lineOffset)};var lie=k8,T1i=At.WHITE,M1i=At.TRANSPARENT,P1i=16,R1i=255;function O8(o){o=Ae(o,Ae.EMPTY_OBJECT),this._definitionChanged=new br,this._color=void 0,this._colorSubscription=void 0,this._gapColor=void 0,this._gapColorSubscription=void 0,this._dashLength=void 0,this._dashLengthSubscription=void 0,this._dashPattern=void 0,this._dashPatternSubscription=void 0,this.color=o.color,this.gapColor=o.gapColor,this.dashLength=o.dashLength,this.dashPattern=o.dashPattern}Object.defineProperties(O8.prototype,{isConstant:{get:function(){return Nt.isConstant(this._color)&&Nt.isConstant(this._gapColor)&&Nt.isConstant(this._dashLength)&&Nt.isConstant(this._dashPattern)}},definitionChanged:{get:function(){return this._definitionChanged}},color:Bi("color"),gapColor:Bi("gapColor"),dashLength:Bi("dashLength"),dashPattern:Bi("dashPattern")});O8.prototype.getType=function(o){return"PolylineDash"};O8.prototype.getValue=function(o,A){return O(A)||(A={}),A.color=Nt.getValueOrClonedDefault(this._color,o,T1i,A.color),A.gapColor=Nt.getValueOrClonedDefault(this._gapColor,o,M1i,A.gapColor),A.dashLength=Nt.getValueOrDefault(this._dashLength,o,P1i,A.dashLength),A.dashPattern=Nt.getValueOrDefault(this._dashPattern,o,R1i,A.dashPattern),A};O8.prototype.equals=function(o){return this===o||o instanceof O8&&Nt.equals(this._color,o._color)&&Nt.equals(this._gapColor,o._gapColor)&&Nt.equals(this._dashLength,o._dashLength)&&Nt.equals(this._dashPattern,o._dashPattern)};var Vl=O8,L1i=At.WHITE,F1i=.25,N1i=1;function U8(o){o=Ae(o,Ae.EMPTY_OBJECT),this._definitionChanged=new br,this._color=void 0,this._colorSubscription=void 0,this._glowPower=void 0,this._glowPowerSubscription=void 0,this._taperPower=void 0,this._taperPowerSubscription=void 0,this.color=o.color,this.glowPower=o.glowPower,this.taperPower=o.taperPower}Object.defineProperties(U8.prototype,{isConstant:{get:function(){return Nt.isConstant(this._color)&&Nt.isConstant(this._glow)}},definitionChanged:{get:function(){return this._definitionChanged}},color:Bi("color"),glowPower:Bi("glowPower"),taperPower:Bi("taperPower")});U8.prototype.getType=function(o){return"PolylineGlow"};U8.prototype.getValue=function(o,A){return O(A)||(A={}),A.color=Nt.getValueOrClonedDefault(this._color,o,L1i,A.color),A.glowPower=Nt.getValueOrDefault(this._glowPower,o,F1i,A.glowPower),A.taperPower=Nt.getValueOrDefault(this._taperPower,o,N1i,A.taperPower),A};U8.prototype.equals=function(o){return this===o||o instanceof U8&&Nt.equals(this._color,o._color)&&Nt.equals(this._glowPower,o._glowPower)&&Nt.equals(this._taperPower,o._taperPower)};var uie=U8;function jF(o){this._value=void 0,this._definitionChanged=new br,this._eventHelper=new Mx,this.setValue(o)}Object.defineProperties(jF.prototype,{isConstant:{get:function(){let o=this._value;if(!O(o))return!0;let A=o.length;for(let f=0;f<A;f++)if(!Nt.isConstant(o[f]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}}});jF.prototype.getValue=function(o,A){let f=this._value;if(!O(f))return;let m=f.length;O(A)||(A=new Array(m));let C=0,y=0;for(;C<m;){let x=this._value[C].getValue(o,A[C]);O(x)&&(A[y]=x,y++),C++}return A.length=y,A};jF.prototype.setValue=function(o){let A=this._eventHelper;if(A.removeAll(),O(o)){this._value=o.slice();let f=o.length;for(let m=0;m<f;m++){let C=o[m];O(C)&&A.add(C.definitionChanged,jF.prototype._raiseDefinitionChanged,this)}}else this._value=void 0;this._definitionChanged.raiseEvent(this)};jF.prototype.equals=function(o){return this===o||o instanceof jF&&Nt.arrayEquals(this._value,o._value)};jF.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var oae=jF,k1i={packedLength:1,pack:function(o,A,f){return f=Ae(f,0),A[f]=o,A},unpack:function(o,A,f){return A=Ae(A,0),o[A]},convertPackedArrayForInterpolation:function(o,A,f,m){O(m)||(m=[]),A=Ae(A,0),f=Ae(f,o.length);let C;for(let y=0,x=f-A+1;y<x;y++){let v=o[A+y];y===0||Math.abs(C-v)<Math.PI?m[y]=v:m[y]=v-je.TWO_PI,C=v}},unpackInterpolationResult:function(o,A,f,m,C){return C=o[0],C<0?C+je.TWO_PI:C}},YD=k1i,O1i={HORIZONTAL:0,VERTICAL:1},qF=Object.freeze(O1i),U1i=qF.HORIZONTAL,G1i=At.WHITE,H1i=At.BLACK,V1i=0,z1i=1;function G8(o){o=Ae(o,Ae.EMPTY_OBJECT),this._definitionChanged=new br,this._orientation=void 0,this._orientationSubscription=void 0,this._evenColor=void 0,this._evenColorSubscription=void 0,this._oddColor=void 0,this._oddColorSubscription=void 0,this._offset=void 0,this._offsetSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.orientation=o.orientation,this.evenColor=o.evenColor,this.oddColor=o.oddColor,this.offset=o.offset,this.repeat=o.repeat}Object.defineProperties(G8.prototype,{isConstant:{get:function(){return Nt.isConstant(this._orientation)&&Nt.isConstant(this._evenColor)&&Nt.isConstant(this._oddColor)&&Nt.isConstant(this._offset)&&Nt.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},orientation:Bi("orientation"),evenColor:Bi("evenColor"),oddColor:Bi("oddColor"),offset:Bi("offset"),repeat:Bi("repeat")});G8.prototype.getType=function(o){return"Stripe"};G8.prototype.getValue=function(o,A){return O(A)||(A={}),A.horizontal=Nt.getValueOrDefault(this._orientation,o,U1i)===qF.HORIZONTAL,A.evenColor=Nt.getValueOrClonedDefault(this._evenColor,o,G1i,A.evenColor),A.oddColor=Nt.getValueOrClonedDefault(this._oddColor,o,H1i,A.oddColor),A.offset=Nt.getValueOrDefault(this._offset,o,V1i),A.repeat=Nt.getValueOrDefault(this._repeat,o,z1i),A};G8.prototype.equals=function(o){return this===o||o instanceof G8&&Nt.equals(this._orientation,o._orientation)&&Nt.equals(this._evenColor,o._evenColor)&&Nt.equals(this._oddColor,o._oddColor)&&Nt.equals(this._offset,o._offset)&&Nt.equals(this._repeat,o._repeat)};var cie=G8;function H8(o,A){this._position=void 0,this._subscription=void 0,this._definitionChanged=new br,this._normalize=Ae(A,!0),this.position=o}Object.defineProperties(H8.prototype,{isConstant:{get:function(){return Nt.isConstant(this._position)}},definitionChanged:{get:function(){return this._definitionChanged}},position:{get:function(){return this._position},set:function(o){let A=this._position;A!==o&&(O(A)&&this._subscription(),this._position=o,O(o)&&(this._subscription=o._definitionChanged.addEventListener(function(){this._definitionChanged.raiseEvent(this)},this)),this._definitionChanged.raiseEvent(this))}},normalize:{get:function(){return this._normalize},set:function(o){this._normalize!==o&&(this._normalize=o,this._definitionChanged.raiseEvent(this))}}});var K1i=new ee,oze=new ee,aze=new fi,Hge=1/60;H8.prototype.getValue=function(o,A){return this._getValue(o,A)};H8.prototype._getValue=function(o,A,f){O(A)||(A=new ee);let m=this._position;if(Nt.isConstant(m))return this._normalize?void 0:ee.clone(ee.ZERO,A);let C=m.getValue(o,K1i),y=m.getValue(fi.addSeconds(o,Hge,aze),oze);if(!O(C)||!O(y)&&(y=C,C=m.getValue(fi.addSeconds(o,-Hge,aze),oze),!O(C)))return;if(ee.equals(C,y))return this._normalize?void 0:ee.clone(ee.ZERO,A);O(f)&&C.clone(f);let x=ee.subtract(y,C,A);return this._normalize?ee.normalize(x,A):ee.divideByScalar(x,Hge,A)};H8.prototype.equals=function(o){return this===o||o instanceof H8&&Nt.equals(this._position,o._position)};var aae=H8;function HK(o,A){this._velocityVectorProperty=new aae(o,!0),this._subscription=void 0,this._ellipsoid=void 0,this._definitionChanged=new br,this.ellipsoid=Ae(A,Ti.WGS84);let f=this;this._velocityVectorProperty.definitionChanged.addEventListener(function(){f._definitionChanged.raiseEvent(f)})}Object.defineProperties(HK.prototype,{isConstant:{get:function(){return Nt.isConstant(this._velocityVectorProperty)}},definitionChanged:{get:function(){return this._definitionChanged}},position:{get:function(){return this._velocityVectorProperty.position},set:function(o){this._velocityVectorProperty.position=o}},ellipsoid:{get:function(){return this._ellipsoid},set:function(o){this._ellipsoid!==o&&(this._ellipsoid=o,this._definitionChanged.raiseEvent(this))}}});var sze=new ee,Y1i=new ee,lze=new ci;HK.prototype.getValue=function(o,A){let f=this._velocityVectorProperty._getValue(o,Y1i,sze);if(O(f))return zn.rotationMatrixFromPositionVelocity(sze,f,this._ellipsoid,lze),jr.fromRotationMatrix(lze,A)};HK.prototype.equals=function(o){return this===o||o instanceof HK&&Nt.equals(this._velocityVectorProperty,o._velocityVectorProperty)&&(this._ellipsoid===o._ellipsoid||this._ellipsoid.equals(o._ellipsoid))};var nSe=HK;function XF(){}XF.packedLength=ee.packedLength;XF.unpack=ee.unpack;XF.pack=ee.pack;var yme;function VK(o,A){return A[0]==="#"&&(A=yme+A),QY.fromString(o,A)}function uze(o,A,f){if(O(f.reference))return VK(A,f.reference);if(O(f.velocityReference)){let m=VK(A,f.velocityReference);switch(o){case ee:case XF:return new aae(m,o===XF);case jr:return new nSe(m)}}throw new nr(`${JSON.stringify(f)} is not valid CZML.`)}function J1i(o,A){return new Bn(function(f,m){return A(o.getValue(f,m))},o.isConstant)}var ac=new ee,vv=new rSe,ax=new Kt,BO=new el,T$=new jr;function W1i(o){let A=o.rgbaf;if(O(A))return A;let f=o.rgba;if(!O(f))return;let m=f.length;if(m===At.packedLength)return[At.byteToFloat(f[0]),At.byteToFloat(f[1]),At.byteToFloat(f[2]),At.byteToFloat(f[3])];A=new Array(m);for(let C=0;C<m;C+=5)A[C]=f[C],A[C+1]=At.byteToFloat(f[C+1]),A[C+2]=At.byteToFloat(f[C+2]),A[C+3]=At.byteToFloat(f[C+3]),A[C+4]=At.byteToFloat(f[C+4]);return A}function cze(o,A){let f=Ae(o.uri,o);return O(A)?A.getDerivedResource({url:f}):An.createIfNeeded(f)}function j1i(o){let A=o.wsen;if(O(A))return A;let f=o.wsenDegrees;if(!O(f))return;let m=f.length;if(m===Si.packedLength)return[je.toRadians(f[0]),je.toRadians(f[1]),je.toRadians(f[2]),je.toRadians(f[3])];A=new Array(m);for(let C=0;C<m;C+=5)A[C]=f[C],A[C+1]=je.toRadians(f[C+1]),A[C+2]=je.toRadians(f[C+2]),A[C+3]=je.toRadians(f[C+3]),A[C+4]=je.toRadians(f[C+4]);return A}function q1i(o){let A=o.length;if(vv.magnitude=1,A===2)return vv.clock=o[0],vv.cone=o[1],ee.fromSpherical(vv,ac),[ac.x,ac.y,ac.z];let f=new Array(A/3*4);for(let m=0,C=0;m<A;m+=3,C+=4)f[C]=o[m],vv.clock=o[m+1],vv.cone=o[m+2],ee.fromSpherical(vv,ac),f[C+1]=ac.x,f[C+2]=ac.y,f[C+3]=ac.z;return f}function X1i(o){let A=o.length;if(A===3)return vv.clock=o[0],vv.cone=o[1],vv.magnitude=o[2],ee.fromSpherical(vv,ac),[ac.x,ac.y,ac.z];let f=new Array(A);for(let m=0;m<A;m+=4)f[m]=o[m],vv.clock=o[m+1],vv.cone=o[m+2],vv.magnitude=o[m+3],ee.fromSpherical(vv,ac),f[m+1]=ac.x,f[m+2]=ac.y,f[m+3]=ac.z;return f}function Z1i(o){let A=o.length;if(A===3)return ax.longitude=o[0],ax.latitude=o[1],ax.height=o[2],Ti.WGS84.cartographicToCartesian(ax,ac),[ac.x,ac.y,ac.z];let f=new Array(A);for(let m=0;m<A;m+=4)f[m]=o[m],ax.longitude=o[m+1],ax.latitude=o[m+2],ax.height=o[m+3],Ti.WGS84.cartographicToCartesian(ax,ac),f[m+1]=ac.x,f[m+2]=ac.y,f[m+3]=ac.z;return f}function $1i(o){let A=o.length;if(A===3)return ax.longitude=je.toRadians(o[0]),ax.latitude=je.toRadians(o[1]),ax.height=o[2],Ti.WGS84.cartographicToCartesian(ax,ac),[ac.x,ac.y,ac.z];let f=new Array(A);for(let m=0;m<A;m+=4)f[m]=o[m],ax.longitude=je.toRadians(o[m+1]),ax.latitude=je.toRadians(o[m+2]),ax.height=o[m+3],Ti.WGS84.cartographicToCartesian(ax,ac),f[m+1]=ac.x,f[m+2]=ac.y,f[m+3]=ac.z;return f}function oSe(o){let A=o.cartesian;if(O(A))return A;let f=o.cartesianVelocity;if(O(f))return f;let m=o.unitCartesian;if(O(m))return m;let C=o.unitSpherical;if(O(C))return q1i(C);let y=o.spherical;if(O(y))return X1i(y);let x=o.cartographicRadians;if(O(x))return Z1i(x);let v=o.cartographicDegrees;if(O(v))return $1i(v);throw new nr(`${JSON.stringify(o)} is not a valid CZML interval.`)}function Aze(o,A){ee.unpack(o,A,ac),ee.normalize(ac,ac),ee.pack(ac,o,A)}function ewi(o){let A=oSe(o);if(A.length===3)return Aze(A,0),A;for(let f=1;f<A.length;f+=4)Aze(A,f);return A}function hze(o,A){jr.unpack(o,A,T$),jr.normalize(T$,T$),jr.pack(T$,o,A)}function twi(o){let A=o.unitQuaternion;if(O(A)){if(A.length===4)return hze(A,0),A;for(let f=1;f<A.length;f+=5)hze(A,f)}return A}function dze(o){return typeof o=="boolean"?Boolean:typeof o=="number"?Number:typeof o=="string"?String:o.hasOwnProperty("array")?Array:o.hasOwnProperty("boolean")?Boolean:o.hasOwnProperty("boundingRectangle")?Kr:o.hasOwnProperty("cartesian2")?Bt:o.hasOwnProperty("cartesian")||o.hasOwnProperty("spherical")||o.hasOwnProperty("cartographicRadians")||o.hasOwnProperty("cartographicDegrees")?ee:o.hasOwnProperty("unitCartesian")||o.hasOwnProperty("unitSpherical")?XF:o.hasOwnProperty("rgba")||o.hasOwnProperty("rgbaf")?At:o.hasOwnProperty("arcType")?Pa:o.hasOwnProperty("classificationType")?Gu:o.hasOwnProperty("colorBlendMode")?HD:o.hasOwnProperty("cornerType")?qA:o.hasOwnProperty("heightReference")?xn:o.hasOwnProperty("horizontalOrigin")?tA:o.hasOwnProperty("date")?fi:o.hasOwnProperty("labelStyle")?pA:o.hasOwnProperty("number")?Number:o.hasOwnProperty("nearFarScalar")?To:o.hasOwnProperty("distanceDisplayCondition")?$o:o.hasOwnProperty("object")||o.hasOwnProperty("value")?Object:o.hasOwnProperty("unitQuaternion")?jr:o.hasOwnProperty("shadowMode")?Al:o.hasOwnProperty("string")?String:o.hasOwnProperty("stripeOrientation")?qF:o.hasOwnProperty("wsen")||o.hasOwnProperty("wsenDegrees")?Si:o.hasOwnProperty("uri")?nae.default:o.hasOwnProperty("verticalOrigin")?wn:Object}function iwi(o,A,f){switch(o){case Pa:return Pa[Ae(A.arcType,A)];case Array:return A.array;case Boolean:return Ae(A.boolean,A);case Kr:return A.boundingRectangle;case Bt:return A.cartesian2;case ee:return oSe(A);case XF:return ewi(A);case At:return W1i(A);case Gu:return Gu[Ae(A.classificationType,A)];case HD:return HD[Ae(A.colorBlendMode,A)];case qA:return qA[Ae(A.cornerType,A)];case xn:return xn[Ae(A.heightReference,A)];case tA:return tA[Ae(A.horizontalOrigin,A)];case Image:return cze(A,f);case fi:return fi.fromIso8601(Ae(A.date,A));case pA:return pA[Ae(A.labelStyle,A)];case Number:return Ae(A.number,A);case To:return A.nearFarScalar;case $o:return A.distanceDisplayCondition;case Object:return Ae(Ae(A.object,A.value),A);case jr:return twi(A);case YD:return Ae(A.number,A);case Al:return Al[Ae(Ae(A.shadowMode,A.shadows),A)];case String:return Ae(A.string,A);case qF:return qF[Ae(A.stripeOrientation,A)];case Si:return j1i(A);case nae.default:return cze(A,f);case wn:return wn[Ae(A.verticalOrigin,A)];default:throw new nr(o)}}var rwi={HERMITE:eSe,LAGRANGE:iSe,LINEAR:Qre};function Aie(o,A){let f=o.interpolationAlgorithm,m=o.interpolationDegree;(O(f)||O(m))&&A.setInterpolationOptions({interpolationAlgorithm:rwi[f],interpolationDegree:m});let C=o.forwardExtrapolationType;O(C)&&(A.forwardExtrapolationType=mD[C]);let y=o.forwardExtrapolationDuration;O(y)&&(A.forwardExtrapolationDuration=y);let x=o.backwardExtrapolationType;O(x)&&(A.backwardExtrapolationType=mD[x]);let v=o.backwardExtrapolationDuration;O(v)&&(A.backwardExtrapolationDuration=v)}var fze={iso8601:void 0};function lf(o){if(O(o))return fze.iso8601=o,el.fromIso8601(fze)}function aSe(o){let A=Cn.MAXIMUM_INTERVAL.clone();return A.data=o,A}function gze(o){let A=new P1;return A.intervals.addInterval(aSe(o)),A}function pze(o){let A=new U_(o.referenceFrame);return A.intervals.addInterval(aSe(o)),A}function hie(o,A,f,m,C,y,x){let v=lf(m.interval);O(C)&&(O(v)?v=el.intersect(v,C,BO):v=C);let E,I,w,Q=!O(m.reference)&&!O(m.velocityReference),M=O(v)&&!v.equals(Cn.MAXIMUM_INTERVAL);if(m.delete===!0){if(!M){A[f]=void 0;return}return zot(A[f],v)}let B=!1;if(Q){if(I=iwi(o,m,y),!O(I))return;E=Ae(o.packedLength,1),w=Ae(I.length,1),B=!O(m.array)&&typeof I!="string"&&w>E&&o!==Object}let T=typeof o.unpack=="function"&&o!==YD;if(!B&&!M){Q?A[f]=new bc(T?o.unpack(I,0):I):A[f]=uze(o,x,m);return}let D=A[f],F,L=m.epoch;if(O(L)&&(F=fi.fromIso8601(L)),B&&!M){D instanceof uM||(A[f]=D=new uM(o)),D.addSamplesPackedArray(I,F),Aie(m,D);return}let R;if(!B&&M){v=v.clone(),Q?v.data=T?o.unpack(I,0):I:v.data=uze(o,x,m),O(D)||(A[f]=D=Q?new f8:new P1),Q&&D instanceof f8?D.intervals.addInterval(v):D instanceof P1?(Q&&(v.data=new bc(v.data)),D.intervals.addInterval(v)):(A[f]=D=gze(D),Q&&(v.data=new bc(v.data)),D.intervals.addInterval(v));return}O(D)||(A[f]=D=new P1),D instanceof P1||(A[f]=D=gze(D));let k=D.intervals;R=k.findInterval(v),(!O(R)||!(R.data instanceof uM))&&(R=v.clone(),R.data=new uM(o),k.addInterval(R)),R.data.addSamplesPackedArray(I,F),Aie(m,R.data)}function zot(o,A){if(o instanceof uM){o.removeSamples(A);return}else if(o instanceof f8){o.intervals.removeInterval(A);return}else if(o instanceof P1){let f=o.intervals;for(let m=0;m<f.length;++m){let C=el.intersect(f.get(m),A,BO);C.isEmpty||zot(C.data,A)}f.removeInterval(A);return}}function zi(o,A,f,m,C,y,x){if(O(m))if(Array.isArray(m))for(let v=0,E=m.length;v<E;++v)hie(o,A,f,m[v],C,y,x);else hie(o,A,f,m,C,y,x)}function mze(o,A,f,m,C,y){let x=lf(f.interval);O(m)&&(O(x)?x=el.intersect(x,m,BO):x=m);let v=O(f.cartesianVelocity)?1:0,E=ee.packedLength*(v+1),I,w,Q=!O(f.reference),M=O(x)&&!x.equals(Cn.MAXIMUM_INTERVAL);if(f.delete===!0){if(!M){o[A]=void 0;return}return Kot(o[A],x)}let B,T=!1;if(Q&&(O(f.referenceFrame)&&(B=s0[f.referenceFrame]),B=Ae(B,s0.FIXED),I=oSe(f),w=Ae(I.length,1),T=w>E),!T&&!M){Q?o[A]=new _D(ee.unpack(I),B):o[A]=VK(y,f.reference);return}let D=o[A],F,L=f.epoch;if(O(L)&&(F=fi.fromIso8601(L)),T&&!M){(!(D instanceof R1)||O(B)&&D.referenceFrame!==B)&&(o[A]=D=new R1(B,v)),D.addSamplesPackedArray(I,F),Aie(f,D);return}let R;if(!T&&M){x=x.clone(),Q?x.data=ee.unpack(I):x.data=VK(y,f.reference),O(D)||(Q?D=new D8(B):D=new U_(B),o[A]=D),Q&&D instanceof D8&&O(B)&&D.referenceFrame===B?D.intervals.addInterval(x):D instanceof U_?(Q&&(x.data=new _D(x.data,B)),D.intervals.addInterval(x)):(o[A]=D=pze(D),Q&&(x.data=new _D(x.data,B)),D.intervals.addInterval(x));return}O(D)?D instanceof U_||(o[A]=D=pze(D)):o[A]=D=new U_(B);let k=D.intervals;R=k.findInterval(x),(!O(R)||!(R.data instanceof R1)||O(B)&&R.data.referenceFrame!==B)&&(R=x.clone(),R.data=new R1(B,v),k.addInterval(R)),R.data.addSamplesPackedArray(I,F),Aie(f,R.data)}function Kot(o,A){if(o instanceof R1){o.removeSamples(A);return}else if(o instanceof D8){o.intervals.removeInterval(A);return}else if(o instanceof U_){let f=o.intervals;for(let m=0;m<f.length;++m){let C=el.intersect(f.get(m),A,BO);C.isEmpty||Kot(C.data,A)}f.removeInterval(A);return}}function Yot(o,A,f,m,C,y){if(O(f))if(Array.isArray(f))for(let x=0,v=f.length;x<v;++x)mze(o,A,f[x],m,C,y);else mze(o,A,f,m,C,y)}function Cze(o,A,f,m){O(f.references)?sae(o,A,f.references,f.interval,m,oae,P1):(O(f.cartesian2)?f.array=Bt.unpackArray(f.cartesian2):O(f.cartesian)&&(f.array=Bt.unpackArray(f.cartesian)),O(f.array)&&zi(Array,o,A,f,void 0,void 0,m))}function yze(o,A,f,m,C,y){let x=lf(f.interval);O(m)&&(O(x)?x=el.intersect(x,m,BO):x=m);let v=o[A],E,I;if(O(x)){v instanceof sie||(v=new sie,o[A]=v);let Q=v.intervals;I=Q.findInterval({start:x.start,stop:x.stop}),O(I)?E=I.data:(I=x.clone(),Q.addInterval(I))}else E=v;let w;O(f.solidColor)?(E instanceof Fa||(E=new Fa),w=f.solidColor,zi(At,E,"color",w.color,void 0,void 0,y)):O(f.grid)?(E instanceof lie||(E=new lie),w=f.grid,zi(At,E,"color",w.color,void 0,C,y),zi(Number,E,"cellAlpha",w.cellAlpha,void 0,C,y),zi(Bt,E,"lineCount",w.lineCount,void 0,C,y),zi(Bt,E,"lineThickness",w.lineThickness,void 0,C,y),zi(Bt,E,"lineOffset",w.lineOffset,void 0,C,y)):O(f.image)?(E instanceof V0||(E=new V0),w=f.image,zi(Image,E,"image",w.image,void 0,C,y),zi(Bt,E,"repeat",w.repeat,void 0,C,y),zi(At,E,"color",w.color,void 0,C,y),zi(Boolean,E,"transparent",w.transparent,void 0,C,y)):O(f.stripe)?(E instanceof cie||(E=new cie),w=f.stripe,zi(qF,E,"orientation",w.orientation,void 0,C,y),zi(At,E,"evenColor",w.evenColor,void 0,C,y),zi(At,E,"oddColor",w.oddColor,void 0,C,y),zi(Number,E,"offset",w.offset,void 0,C,y),zi(Number,E,"repeat",w.repeat,void 0,C,y)):O(f.polylineOutline)?(E instanceof JM||(E=new JM),w=f.polylineOutline,zi(At,E,"color",w.color,void 0,C,y),zi(At,E,"outlineColor",w.outlineColor,void 0,C,y),zi(Number,E,"outlineWidth",w.outlineWidth,void 0,C,y)):O(f.polylineGlow)?(E instanceof uie||(E=new uie),w=f.polylineGlow,zi(At,E,"color",w.color,void 0,C,y),zi(Number,E,"glowPower",w.glowPower,void 0,C,y),zi(Number,E,"taperPower",w.taperPower,void 0,C,y)):O(f.polylineArrow)?(E instanceof vK||(E=new vK),w=f.polylineArrow,zi(At,E,"color",w.color,void 0,void 0,y)):O(f.polylineDash)?(E instanceof Vl||(E=new Vl),w=f.polylineDash,zi(At,E,"color",w.color,void 0,void 0,y),zi(At,E,"gapColor",w.gapColor,void 0,void 0,y),zi(Number,E,"dashLength",w.dashLength,void 0,C,y),zi(Number,E,"dashPattern",w.dashPattern,void 0,C,y)):O(f.checkerboard)&&(E instanceof oie||(E=new oie),w=f.checkerboard,zi(At,E,"evenColor",w.evenColor,void 0,C,y),zi(At,E,"oddColor",w.oddColor,void 0,C,y),zi(Bt,E,"repeat",w.repeat,void 0,C,y)),O(I)?I.data=E:o[A]=E}function nB(o,A,f,m,C,y){if(O(f))if(Array.isArray(f))for(let x=0,v=f.length;x<v;++x)yze(o,A,f[x],m,C,y);else yze(o,A,f,m,C,y)}function nwi(o,A,f,m){let C=A.name;O(C)&&(o.name=A.name)}function owi(o,A,f,m){let C=A.description;O(C)&&zi(String,o,"description",C,void 0,m,f)}function awi(o,A,f,m){let C=A.position;O(C)&&Yot(o,"position",C,void 0,m,f)}function swi(o,A,f,m){let C=A.viewFrom;O(C)&&zi(ee,o,"viewFrom",C,void 0,m,f)}function lwi(o,A,f,m){let C=A.orientation;O(C)&&zi(jr,o,"orientation",C,void 0,m,f)}function uwi(o,A,f,m){let C=A.properties;if(O(C)){O(o.properties)||(o.properties=new LD);for(let y in C)if(C.hasOwnProperty(y)){o.properties.hasProperty(y)||o.properties.addProperty(y);let x=C[y];if(Array.isArray(x))for(let v=0,E=x.length;v<E;++v)hie(dze(x[v]),o.properties,y,x[v],void 0,m,f);else hie(dze(x),o.properties,y,x,void 0,m,f)}}}function sae(o,A,f,m,C,y,x){let v=f.map(function(E){return VK(C,E)});if(O(m)){m=lf(m);let E=o[A];if(!(E instanceof x)){let I=new x;I.intervals.addInterval(aSe(E)),o[A]=E=I}m.data=new y(v),E.intervals.addInterval(m)}else o[A]=new y(v)}function xze(o,A,f,m){let C=f.references;O(C)?sae(o,A,C,f.interval,m,oae,P1):zi(Array,o,A,f,void 0,void 0,m)}function vze(o,A,f,m){if(O(f))if(Array.isArray(f))for(let C=0,y=f.length;C<y;++C)xze(o,A,f[C],m);else xze(o,A,f,m)}function Eze(o,A,f,m){let C=f.references;O(C)?sae(o,A,C,f.interval,m,d8,U_):(O(f.cartesian)?f.array=ee.unpackArray(f.cartesian):O(f.cartographicRadians)?f.array=ee.fromRadiansArrayHeights(f.cartographicRadians):O(f.cartographicDegrees)&&(f.array=ee.fromDegreesArrayHeights(f.cartographicDegrees)),O(f.array)&&zi(Array,o,A,f,void 0,void 0,m))}function $J(o,A,f,m){if(O(f))if(Array.isArray(f))for(let C=0,y=f.length;C<y;++C)Eze(o,A,f[C],m);else Eze(o,A,f,m)}function cwi(o){return ee.unpackArray(o)}function Awi(o){return ee.fromRadiansArrayHeights(o)}function hwi(o){return ee.fromDegreesArrayHeights(o)}function Ize(o,A,f,m){let C=f.references;if(O(C)){let y=C.map(function(x){let v={};return sae(v,"positions",x,f.interval,m,d8,U_),v.positions});o[A]=new d8(y)}else O(f.cartesian)?f.array=f.cartesian.map(cwi):O(f.cartographicRadians)?f.array=f.cartographicRadians.map(Awi):O(f.cartographicDegrees)&&(f.array=f.cartographicDegrees.map(hwi)),O(f.array)&&zi(Array,o,A,f,void 0,void 0,m)}function dwi(o,A,f,m){if(O(f))if(Array.isArray(f))for(let C=0,y=f.length;C<y;++C)Ize(o,A,f[C],m);else Ize(o,A,f,m)}function fwi(o,A,f,m){if(O(f))if(Array.isArray(f))for(let C=0,y=f.length;C<y;C++)Cze(o,A,f[C],m);else Cze(o,A,f,m)}function gwi(o,A,f,m){let C=A.availability;if(!O(C))return;let y;if(Array.isArray(C))for(let x=0,v=C.length;x<v;++x)O(y)||(y=new mx),y.addInterval(lf(C[x]));else y=new mx,y.addInterval(lf(C));o.availability=y}function pwi(o,A,f,m,C){!O(A)||zi(XF,o,"alignedAxis",A,f,m,C)}function mwi(o,A,f,m){let C=A.billboard;if(!O(C))return;let y=lf(C.interval),x=o.billboard;O(x)||(o.billboard=x=new eP),zi(Boolean,x,"show",C.show,y,m,f),zi(Image,x,"image",C.image,y,m,f),zi(Number,x,"scale",C.scale,y,m,f),zi(Bt,x,"pixelOffset",C.pixelOffset,y,m,f),zi(ee,x,"eyeOffset",C.eyeOffset,y,m,f),zi(tA,x,"horizontalOrigin",C.horizontalOrigin,y,m,f),zi(wn,x,"verticalOrigin",C.verticalOrigin,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(At,x,"color",C.color,y,m,f),zi(YD,x,"rotation",C.rotation,y,m,f),pwi(x,C.alignedAxis,y,m,f),zi(Boolean,x,"sizeInMeters",C.sizeInMeters,y,m,f),zi(Number,x,"width",C.width,y,m,f),zi(Number,x,"height",C.height,y,m,f),zi(To,x,"scaleByDistance",C.scaleByDistance,y,m,f),zi(To,x,"translucencyByDistance",C.translucencyByDistance,y,m,f),zi(To,x,"pixelOffsetScaleByDistance",C.pixelOffsetScaleByDistance,y,m,f),zi(Kr,x,"imageSubRegion",C.imageSubRegion,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f),zi(Number,x,"disableDepthTestDistance",C.disableDepthTestDistance,y,m,f)}function Cwi(o,A,f,m){let C=A.box;if(!O(C))return;let y=lf(C.interval),x=o.box;O(x)||(o.box=x=new hre),zi(Boolean,x,"show",C.show,y,m,f),zi(ee,x,"dimensions",C.dimensions,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(Boolean,x,"fill",C.fill,y,m,f),nB(x,"material",C.material,y,m,f),zi(Boolean,x,"outline",C.outline,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f)}function ywi(o,A,f,m){let C=A.corridor;if(!O(C))return;let y=lf(C.interval),x=o.corridor;O(x)||(o.corridor=x=new dre),zi(Boolean,x,"show",C.show,y,m,f),$J(x,"positions",C.positions,f),zi(Number,x,"width",C.width,y,m,f),zi(Number,x,"height",C.height,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(Number,x,"extrudedHeight",C.extrudedHeight,y,m,f),zi(xn,x,"extrudedHeightReference",C.extrudedHeightReference,y,m,f),zi(qA,x,"cornerType",C.cornerType,y,m,f),zi(Number,x,"granularity",C.granularity,y,m,f),zi(Boolean,x,"fill",C.fill,y,m,f),nB(x,"material",C.material,y,m,f),zi(Boolean,x,"outline",C.outline,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f),zi(Gu,x,"classificationType",C.classificationType,y,m,f),zi(Number,x,"zIndex",C.zIndex,y,m,f)}function xwi(o,A,f,m){let C=A.cylinder;if(!O(C))return;let y=lf(C.interval),x=o.cylinder;O(x)||(o.cylinder=x=new fre),zi(Boolean,x,"show",C.show,y,m,f),zi(Number,x,"length",C.length,y,m,f),zi(Number,x,"topRadius",C.topRadius,y,m,f),zi(Number,x,"bottomRadius",C.bottomRadius,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(Boolean,x,"fill",C.fill,y,m,f),nB(x,"material",C.material,y,m,f),zi(Boolean,x,"outline",C.outline,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(Number,x,"numberOfVerticalLines",C.numberOfVerticalLines,y,m,f),zi(Number,x,"slices",C.slices,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f)}function vwi(o,A){let f=o.version;if(O(f)&&typeof f=="string"){let y=f.split(".");if(y.length===2){if(y[0]!=="1")throw new nr("Cesium only supports CZML version 1.");A._version=f}}if(!O(A._version))throw new nr("CZML version information invalid.  It is expected to be a property on the document object in the <Major>.<Minor> version format.");let m=A._documentPacket;O(o.name)&&(m.name=o.name);let C=o.clock;if(O(C)){let y=m.clock;O(y)?(y.interval=Ae(C.interval,y.interval),y.currentTime=Ae(C.currentTime,y.currentTime),y.range=Ae(C.range,y.range),y.step=Ae(C.step,y.step),y.multiplier=Ae(C.multiplier,y.multiplier)):m.clock={interval:C.interval,currentTime:C.currentTime,range:C.range,step:C.step,multiplier:C.multiplier}}}function Ewi(o,A,f,m){let C=A.ellipse;if(!O(C))return;let y=lf(C.interval),x=o.ellipse;O(x)||(o.ellipse=x=new gre),zi(Boolean,x,"show",C.show,y,m,f),zi(Number,x,"semiMajorAxis",C.semiMajorAxis,y,m,f),zi(Number,x,"semiMinorAxis",C.semiMinorAxis,y,m,f),zi(Number,x,"height",C.height,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(Number,x,"extrudedHeight",C.extrudedHeight,y,m,f),zi(xn,x,"extrudedHeightReference",C.extrudedHeightReference,y,m,f),zi(YD,x,"rotation",C.rotation,y,m,f),zi(YD,x,"stRotation",C.stRotation,y,m,f),zi(Number,x,"granularity",C.granularity,y,m,f),zi(Boolean,x,"fill",C.fill,y,m,f),nB(x,"material",C.material,y,m,f),zi(Boolean,x,"outline",C.outline,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(Number,x,"numberOfVerticalLines",C.numberOfVerticalLines,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f),zi(Gu,x,"classificationType",C.classificationType,y,m,f),zi(Number,x,"zIndex",C.zIndex,y,m,f)}function Iwi(o,A,f,m){let C=A.ellipsoid;if(!O(C))return;let y=lf(C.interval),x=o.ellipsoid;O(x)||(o.ellipsoid=x=new l6),zi(Boolean,x,"show",C.show,y,m,f),zi(ee,x,"radii",C.radii,y,m,f),zi(ee,x,"innerRadii",C.innerRadii,y,m,f),zi(Number,x,"minimumClock",C.minimumClock,y,m,f),zi(Number,x,"maximumClock",C.maximumClock,y,m,f),zi(Number,x,"minimumCone",C.minimumCone,y,m,f),zi(Number,x,"maximumCone",C.maximumCone,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(Boolean,x,"fill",C.fill,y,m,f),nB(x,"material",C.material,y,m,f),zi(Boolean,x,"outline",C.outline,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(Number,x,"stackPartitions",C.stackPartitions,y,m,f),zi(Number,x,"slicePartitions",C.slicePartitions,y,m,f),zi(Number,x,"subdivisions",C.subdivisions,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f)}function _wi(o,A,f,m){let C=A.label;if(!O(C))return;let y=lf(C.interval),x=o.label;O(x)||(o.label=x=new u6),zi(Boolean,x,"show",C.show,y,m,f),zi(String,x,"text",C.text,y,m,f),zi(String,x,"font",C.font,y,m,f),zi(pA,x,"style",C.style,y,m,f),zi(Number,x,"scale",C.scale,y,m,f),zi(Boolean,x,"showBackground",C.showBackground,y,m,f),zi(At,x,"backgroundColor",C.backgroundColor,y,m,f),zi(Bt,x,"backgroundPadding",C.backgroundPadding,y,m,f),zi(Bt,x,"pixelOffset",C.pixelOffset,y,m,f),zi(ee,x,"eyeOffset",C.eyeOffset,y,m,f),zi(tA,x,"horizontalOrigin",C.horizontalOrigin,y,m,f),zi(wn,x,"verticalOrigin",C.verticalOrigin,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(At,x,"fillColor",C.fillColor,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(To,x,"translucencyByDistance",C.translucencyByDistance,y,m,f),zi(To,x,"pixelOffsetScaleByDistance",C.pixelOffsetScaleByDistance,y,m,f),zi(To,x,"scaleByDistance",C.scaleByDistance,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f),zi(Number,x,"disableDepthTestDistance",C.disableDepthTestDistance,y,m,f)}function Bwi(o,A,f,m){let C=A.model;if(!O(C))return;let y=lf(C.interval),x=o.model;O(x)||(o.model=x=new xY),zi(Boolean,x,"show",C.show,y,m,f),zi(nae.default,x,"uri",C.gltf,y,m,f),zi(Number,x,"scale",C.scale,y,m,f),zi(Number,x,"minimumPixelSize",C.minimumPixelSize,y,m,f),zi(Number,x,"maximumScale",C.maximumScale,y,m,f),zi(Boolean,x,"incrementallyLoadTextures",C.incrementallyLoadTextures,y,m,f),zi(Boolean,x,"runAnimations",C.runAnimations,y,m,f),zi(Boolean,x,"clampAnimations",C.clampAnimations,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(At,x,"silhouetteColor",C.silhouetteColor,y,m,f),zi(Number,x,"silhouetteSize",C.silhouetteSize,y,m,f),zi(At,x,"color",C.color,y,m,f),zi(HD,x,"colorBlendMode",C.colorBlendMode,y,m,f),zi(Number,x,"colorBlendAmount",C.colorBlendAmount,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f);let v,E,I=C.nodeTransformations;if(O(I))if(Array.isArray(I))for(v=0,E=I.length;v<E;++v)_ze(x,I[v],y,m,f);else _ze(x,I,y,m,f);let w=C.articulations;if(O(w))if(Array.isArray(w))for(v=0,E=w.length;v<E;++v)Bze(x,w[v],y,m,f);else Bze(x,w,y,m,f)}function _ze(o,A,f,m,C){let y=lf(A.interval);O(f)&&(O(y)?y=el.intersect(y,f,BO):y=f);let x=o.nodeTransformations,v=Object.keys(A);for(let E=0,I=v.length;E<I;++E){let w=v[E];if(w==="interval")continue;let Q=A[w];if(!O(Q))continue;O(x)||(o.nodeTransformations=x=new LD),x.hasProperty(w)||x.addProperty(w);let M=x[w];O(M)||(x[w]=M=new pre),zi(ee,M,"translation",Q.translation,y,m,C),zi(jr,M,"rotation",Q.rotation,y,m,C),zi(ee,M,"scale",Q.scale,y,m,C)}}function Bze(o,A,f,m,C){let y=lf(A.interval);O(f)&&(O(y)?y=el.intersect(y,f,BO):y=f);let x=o.articulations,v=Object.keys(A);for(let E=0,I=v.length;E<I;++E){let w=v[E];if(w==="interval")continue;let Q=A[w];!O(Q)||(O(x)||(o.articulations=x=new LD),x.hasProperty(w)||x.addProperty(w),zi(Number,x,w,Q,y,m,C))}}function wwi(o,A,f,m){let C=A.path;if(!O(C))return;let y=lf(C.interval),x=o.path;O(x)||(o.path=x=new vY),zi(Boolean,x,"show",C.show,y,m,f),zi(Number,x,"leadTime",C.leadTime,y,m,f),zi(Number,x,"trailTime",C.trailTime,y,m,f),zi(Number,x,"width",C.width,y,m,f),zi(Number,x,"resolution",C.resolution,y,m,f),nB(x,"material",C.material,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f)}function bwi(o,A,f,m){let C=A.point;if(!O(C))return;let y=lf(C.interval),x=o.point;O(x)||(o.point=x=new Cre),zi(Boolean,x,"show",C.show,y,m,f),zi(Number,x,"pixelSize",C.pixelSize,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(At,x,"color",C.color,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(To,x,"scaleByDistance",C.scaleByDistance,y,m,f),zi(To,x,"translucencyByDistance",C.translucencyByDistance,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f),zi(Number,x,"disableDepthTestDistance",C.disableDepthTestDistance,y,m,f)}function zK(o){this.polygon=o,this._definitionChanged=new br}Object.defineProperties(zK.prototype,{isConstant:{get:function(){let o=this.polygon._positions,A=this.polygon._holes;return(!O(o)||o.isConstant)&&(!O(A)||A.isConstant)}},definitionChanged:{get:function(){return this._definitionChanged}}});zK.prototype.getValue=function(o,A){let f;O(this.polygon._positions)&&(f=this.polygon._positions.getValue(o));let m;return O(this.polygon._holes)&&(m=this.polygon._holes.getValue(o),O(m)&&(m=m.map(function(C){return new Un(C)}))),O(A)?(A.positions=f,A.holes=m,A):new Un(f,m)};zK.prototype.equals=function(o){return this===o||o instanceof zK&&Nt.equals(this.polygon._positions,o.polygon._positions)&&Nt.equals(this.polygon._holes,o.polygon._holes)};function Qwi(o,A,f,m){let C=A.polygon;if(!O(C))return;let y=lf(C.interval),x=o.polygon;O(x)||(o.polygon=x=new yl),zi(Boolean,x,"show",C.show,y,m,f),$J(x,"_positions",C.positions,f),dwi(x,"_holes",C.holes,f),(O(x._positions)||O(x._holes))&&(x.hierarchy=new zK(x)),zi(Number,x,"height",C.height,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(Number,x,"extrudedHeight",C.extrudedHeight,y,m,f),zi(xn,x,"extrudedHeightReference",C.extrudedHeightReference,y,m,f),zi(YD,x,"stRotation",C.stRotation,y,m,f),zi(Number,x,"granularity",C.granularity,y,m,f),zi(Boolean,x,"fill",C.fill,y,m,f),nB(x,"material",C.material,y,m,f),zi(Boolean,x,"outline",C.outline,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(Boolean,x,"perPositionHeight",C.perPositionHeight,y,m,f),zi(Boolean,x,"closeTop",C.closeTop,y,m,f),zi(Boolean,x,"closeBottom",C.closeBottom,y,m,f),zi(Pa,x,"arcType",C.arcType,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f),zi(Gu,x,"classificationType",C.classificationType,y,m,f),zi(Number,x,"zIndex",C.zIndex,y,m,f)}function Swi(o){return o?Pa.GEODESIC:Pa.NONE}function Dwi(o,A,f,m){let C=A.polyline;if(!O(C))return;let y=lf(C.interval),x=o.polyline;if(O(x)||(o.polyline=x=new FD),zi(Boolean,x,"show",C.show,y,m,f),$J(x,"positions",C.positions,f),zi(Number,x,"width",C.width,y,m,f),zi(Number,x,"granularity",C.granularity,y,m,f),nB(x,"material",C.material,y,m,f),nB(x,"depthFailMaterial",C.depthFailMaterial,y,m,f),zi(Pa,x,"arcType",C.arcType,y,m,f),zi(Boolean,x,"clampToGround",C.clampToGround,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f),zi(Gu,x,"classificationType",C.classificationType,y,m,f),zi(Number,x,"zIndex",C.zIndex,y,m,f),O(C.followSurface)&&!O(C.arcType)){let v={};zi(Boolean,v,"followSurface",C.followSurface,y,m,f),x.arcType=J1i(v.followSurface,Swi)}}function Twi(o,A,f,m){let C=A.polylineVolume;if(!O(C))return;let y=lf(C.interval),x=o.polylineVolume;O(x)||(o.polylineVolume=x=new yre),$J(x,"positions",C.positions,f),fwi(x,"shape",C.shape,f),zi(Boolean,x,"show",C.show,y,m,f),zi(qA,x,"cornerType",C.cornerType,y,m,f),zi(Boolean,x,"fill",C.fill,y,m,f),nB(x,"material",C.material,y,m,f),zi(Boolean,x,"outline",C.outline,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(Number,x,"granularity",C.granularity,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f)}function Mwi(o,A,f,m){let C=A.rectangle;if(!O(C))return;let y=lf(C.interval),x=o.rectangle;O(x)||(o.rectangle=x=new c6),zi(Boolean,x,"show",C.show,y,m,f),zi(Si,x,"coordinates",C.coordinates,y,m,f),zi(Number,x,"height",C.height,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(Number,x,"extrudedHeight",C.extrudedHeight,y,m,f),zi(xn,x,"extrudedHeightReference",C.extrudedHeightReference,y,m,f),zi(YD,x,"rotation",C.rotation,y,m,f),zi(YD,x,"stRotation",C.stRotation,y,m,f),zi(Number,x,"granularity",C.granularity,y,m,f),zi(Boolean,x,"fill",C.fill,y,m,f),nB(x,"material",C.material,y,m,f),zi(Boolean,x,"outline",C.outline,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f),zi(Gu,x,"classificationType",C.classificationType,y,m,f),zi(Number,x,"zIndex",C.zIndex,y,m,f)}function Pwi(o,A,f,m){let C=A.tileset;if(!O(C))return;let y=lf(C.interval),x=o.tileset;O(x)||(o.tileset=x=new mre),zi(Boolean,x,"show",C.show,y,m,f),zi(nae.default,x,"uri",C.uri,y,m,f),zi(Number,x,"maximumScreenSpaceError",C.maximumScreenSpaceError,y,m,f)}function Rwi(o,A,f,m){let C=A.wall;if(!O(C))return;let y=lf(C.interval),x=o.wall;O(x)||(o.wall=x=new EY),zi(Boolean,x,"show",C.show,y,m,f),$J(x,"positions",C.positions,f),vze(x,"minimumHeights",C.minimumHeights,f),vze(x,"maximumHeights",C.maximumHeights,f),zi(Number,x,"granularity",C.granularity,y,m,f),zi(Boolean,x,"fill",C.fill,y,m,f),nB(x,"material",C.material,y,m,f),zi(Boolean,x,"outline",C.outline,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f)}function wze(o,A,f,m,C){let y=o.id;if(O(y)||(y=Vu()),yme=y,!O(C._version)&&y!=="document")throw new nr("The first CZML packet is required to be the document object.");if(o.delete===!0)A.removeById(y);else if(y==="document")vwi(o,C);else{let x=A.getOrCreateEntity(y),v=o.parent;O(v)&&(x.parent=A.getOrCreateEntity(v));for(let E=f.length-1;E>-1;E--)f[E](x,o,A,m)}yme=void 0}function Lwi(o){let A,f=o._documentPacket.clock;if(!O(f)){if(!O(o._clock)){let C=o._entityCollection.computeAvailability();if(!C.start.equals(Cn.MINIMUM_VALUE)){let y=C.start,x=C.stop,v=fi.secondsDifference(x,y),E=Math.round(v/120);return A=new A5,A.startTime=fi.clone(y),A.stopTime=fi.clone(x),A.clockRange=aC.LOOP_STOP,A.multiplier=E,A.currentTime=fi.clone(y),A.clockStep=Jh.SYSTEM_CLOCK_MULTIPLIER,o._clock=A,!0}}return!1}O(o._clock)?A=o._clock.clone():(A=new A5,A.startTime=Cn.MINIMUM_VALUE.clone(),A.stopTime=Cn.MAXIMUM_VALUE.clone(),A.currentTime=Cn.MINIMUM_VALUE.clone(),A.clockRange=aC.LOOP_STOP,A.clockStep=Jh.SYSTEM_CLOCK_MULTIPLIER,A.multiplier=1);let m=lf(f.interval);return O(m)&&(A.startTime=m.start,A.stopTime=m.stop),O(f.currentTime)&&(A.currentTime=fi.fromIso8601(f.currentTime)),O(f.range)&&(A.clockRange=Ae(aC[f.range],aC.LOOP_STOP)),O(f.step)&&(A.clockStep=Ae(Jh[f.step],Jh.SYSTEM_CLOCK_MULTIPLIER)),O(f.multiplier)&&(A.multiplier=f.multiplier),A.equals(o._clock)?!1:(o._clock=A.clone(o._clock),!0)}function Jot(o,A,f,m){f=Ae(f,Ae.EMPTY_OBJECT);let C=A,y=f.sourceUri,x=f.credit;if(typeof x=="string"&&(x=new tl(x)),o._credit=x,typeof A=="string"||A instanceof An){A=An.createIfNeeded(A),C=A.fetchJson(),y=Ae(y,A.clone());let v=o._resourceCredits,E=A.credits;if(O(E)){let I=E.length;for(let w=0;w<I;w++)v.push(E[w])}}return y=An.createIfNeeded(y),cy.setLoading(o,!0),Promise.resolve(C).then(function(v){return Fwi(o,v,y,m)}).catch(function(v){return cy.setLoading(o,!1),o._error.raiseEvent(o,v),console.log(v),Promise.reject(v)})}function Fwi(o,A,f,m){cy.setLoading(o,!0);let C=o._entityCollection;m&&(o._version=void 0,o._documentPacket=new Wot,C.removeAll()),aI._processCzml(A,C,f,void 0,o);let y=Lwi(o),x=o._documentPacket;return O(x.name)&&o._name!==x.name?(o._name=x.name,y=!0):!O(o._name)&&O(f)&&(o._name=_Y(f.getUrlComponent()),y=!0),cy.setLoading(o,!1),y&&o._changed.raiseEvent(o),o}function Wot(){this.name=void 0,this.clock=void 0}function aI(o){this._name=o,this._changed=new br,this._error=new br,this._isLoading=!1,this._loading=new br,this._clock=void 0,this._documentPacket=new Wot,this._version=void 0,this._entityCollection=new iw(this),this._entityCluster=new tN,this._credit=void 0,this._resourceCredits=[]}aI.load=function(o,A){return new aI().load(o,A)};Object.defineProperties(aI.prototype,{name:{get:function(){return this._name}},clock:{get:function(){return this._clock}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(o){this._entityCollection.show=o}},clustering:{get:function(){return this._entityCluster},set:function(o){this._entityCluster=o}},credit:{get:function(){return this._credit}}});aI.updaters=[mwi,Cwi,ywi,xwi,Ewi,Iwi,_wi,Bwi,nwi,owi,wwi,bwi,Qwi,Dwi,Twi,uwi,Mwi,awi,Pwi,swi,Rwi,lwi,gwi];aI.prototype.process=function(o,A){return Jot(this,o,A,!1)};aI.prototype.load=function(o,A){return Jot(this,o,A,!0)};aI.prototype.update=function(o){return!0};aI.processPacketData=zi;aI.processPositionPacketData=Yot;aI.processMaterialPacketData=nB;aI._processCzml=function(o,A,f,m,C){if(m=Ae(m,aI.updaters),Array.isArray(o))for(let y=0,x=o.length;y<x;++y)wze(o[y],A,m,f,C);else wze(o,A,m,f,C)};var eW=aI,xme=32,Nwi="http://www.opengis.net/kml/2.2",Hb="http://www.google.com/kml/ext/2.2",kwi="http://www.w3.org/2000/xmlns/";function lae(o){this._files={},this._promises=[],this._count=0,this._modelCallback=o}var Owi=/^data:image\/([^,;]+)/;lae.prototype.texture=function(o){let A=this,f;if(typeof o=="string"||o instanceof An){if(o=An.createIfNeeded(o),!o.isDataUri)return o.url;let m=o.url.match(Owi);f=`texture_${++this._count}`,O(m)&&(f+=`.${m[1]}`);let C=o.fetchBlob().then(function(y){A._files[f]=y});return this._promises.push(C),f}if(o instanceof HTMLCanvasElement){f=`texture_${++this._count}.png`;let m=new Promise(C=>{o.toBlob(function(y){A._files[f]=y,C()})});return this._promises.push(m),f}return""};function Uwi(o,A){return function(f){o._files[A]=f}}lae.prototype.model=function(o,A){let f=this._modelCallback;if(!O(f))throw new nr("Encountered a model entity while exporting to KML, but no model callback was supplied.");let m={},C=f(o,A,m);for(let y in m)if(m.hasOwnProperty(y)){let x=Promise.resolve(m[y]);this._promises.push(x),x.then(Uwi(this,y))}return C};Object.defineProperties(lae.prototype,{promise:{get:function(){return Promise.all(this._promises)}},files:{get:function(){return this._files}}});function uae(o){this._time=o}uae.prototype.get=function(o,A,f){let m;return O(o)&&(m=O(o.getValue)?o.getValue(this._time,f):o),Ae(m,A)};uae.prototype.getColor=function(o,A){let f=this.get(o,A);if(O(f))return Dk(f)};uae.prototype.getMaterialType=function(o){if(O(o))return o.getType(this._time)};function sSe(){this._ids={},this._styles={},this._count=0}sSe.prototype.get=function(o){let A=this._ids,f=o.innerHTML;if(O(A[f]))return A[f];let m=`style-${++this._count}`;return o.setAttribute("id",m),m=`#${m}`,A[f]=m,this._styles[f]=o,m};sSe.prototype.save=function(o){let A=this._styles,f=o.childNodes[0];for(let m in A)A.hasOwnProperty(m)&&o.insertBefore(A[m],f)};function jot(){this._ids={}}jot.prototype.get=function(o){if(!O(o))return this.get(Vu());let A=this._ids;return O(A[o])?`${o.toString()}-${++A[o]}`:(A[o]=0,o)};function lSe(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.entities,f=Ae(o.kmz,!1),m=lSe._createState(o),C=A.values.filter(function(I){return!O(I.parent)}),y=m.kmlDoc,x=y.documentElement;x.setAttributeNS(kwi,"xmlns:gx",Hb);let v=y.createElement("Document");x.appendChild(v),Xot(m,v,C),m.styleCache.save(v);let E=m.externalFileHandler;return E.promise.then(function(){let I=new XMLSerializer().serializeToString(m.kmlDoc);return f?Gwi(I,E.files):{kml:I,externalFiles:E.files}})}function Gwi(o,A){let f=xs("ThirdParty/Workers/z-worker-pako.js");Hve({workerScripts:{deflate:[f,"./pako_deflate.min.js"],inflate:[f,"./pako_inflate.min.js"]}});let m=new Mje,C=new dGt(m);return C.add("doc.kml",new FUt(o)).then(function(){let y=Object.keys(A);return qot(C,y,A,0)}).then(function(){return C.close()}).then(function(y){return{kmz:y}})}function qot(o,A,f,m){if(A.length===m)return;let C=A[m];return o.add(C,new Jve(f[C])).then(function(){return qot(o,A,f,m+1)})}lSe._createState=function(o){let A=o.entities,f=new sSe,m=A.computeAvailability(),C=O(o.time)?o.time:m.start,y=Ae(o.defaultAvailability,m),x=Ae(o.sampleDuration,60);y.start===Cn.MINIMUM_VALUE?y.stop===Cn.MAXIMUM_VALUE?y=new el:fi.addSeconds(y.stop,-10*x,y.start):y.stop===Cn.MAXIMUM_VALUE&&fi.addSeconds(y.start,10*x,y.stop);let v=new lae(o.modelCallback);return{kmlDoc:document.implementation.createDocument(Nwi,"kml"),ellipsoid:Ae(o.ellipsoid,Ti.WGS84),idManager:new jot,styleCache:f,externalFileHandler:v,time:C,valueGetter:new uae(C),sampleDuration:x,defaultAvailability:new mx([y])}};function Xot(o,A,f){let m=o.kmlDoc,C=o.styleCache,y=o.valueGetter,x=o.idManager,v=f.length,E,I,w;for(let Q=0;Q<v;++Q){let M=f[Q];E=[],I=[],w=[],Hwi(o,M,I,w),Vwi(o,M.polyline,I,w),Qze(o,M.rectangle,I,w,E),Qze(o,M.polygon,I,w,E),Jwi(o,M,M.model,I,w);let B,T=M.availability;O(T)&&(B=m.createElement("TimeSpan"),fi.equals(T.start,Cn.MINIMUM_VALUE)||B.appendChild(xa(m,"begin",fi.toIso8601(T.start))),fi.equals(T.stop,Cn.MAXIMUM_VALUE)||B.appendChild(xa(m,"end",fi.toIso8601(T.stop))));for(let L=0;L<E.length;++L){let R=E[L];R.setAttribute("id",x.get(M.id)),R.appendChild(xa(m,"name",M.name)),R.appendChild(xa(m,"visibility",M.show)),R.appendChild(xa(m,"description",M.description)),O(B)&&R.appendChild(B),A.appendChild(R)}let D=I.length;if(D>0){let L=m.createElement("Placemark");L.setAttribute("id",x.get(M.id));let R=M.name,k=M.label;if(O(k)){let V=m.createElement("LabelStyle"),H=y.get(k.text);R=O(H)&&H.length>0?H:R;let q=y.getColor(k.fillColor);O(q)&&(V.appendChild(xa(m,"color",q)),V.appendChild(xa(m,"colorMode","normal")));let ie=y.get(k.scale);O(ie)&&V.appendChild(xa(m,"scale",ie)),w.push(V)}L.appendChild(xa(m,"name",R)),L.appendChild(xa(m,"visibility",M.show)),L.appendChild(xa(m,"description",M.description)),O(B)&&L.appendChild(B),A.appendChild(L);let U=w.length;if(U>0){let V=m.createElement("Style");for(let H=0;H<U;++H)V.appendChild(w[H]);L.appendChild(xa(m,"styleUrl",C.get(V)))}if(I.length===1)L.appendChild(I[0]);else if(I.length>1){let V=m.createElement("MultiGeometry");for(let H=0;H<D;++H)V.appendChild(I[H]);L.appendChild(V)}}let F=M._children;if(F.length>0){let L=m.createElement("Folder");L.setAttribute("id",x.get(M.id)),L.appendChild(xa(m,"name",M.name)),L.appendChild(xa(m,"visibility",M.show)),L.appendChild(xa(m,"description",M.description)),A.appendChild(L),Xot(o,L,F)}}}var GE=new ee,Tv=new Kt,Db=new fi;function Hwi(o,A,f,m){let C=o.kmlDoc,y=o.ellipsoid,x=o.valueGetter,v=Ae(A.billboard,A.point);if(!O(v)&&!O(A.path))return;let E=A.position;if(!E.isConstant){Zot(o,A,v,f,m);return}x.get(E,void 0,GE);let I=xa(C,"coordinates",Sk(GE,y)),w=C.createElement("Point"),Q=C.createElement("altitudeMode");Q.appendChild(Zk(o,v.heightReference)),w.appendChild(Q),w.appendChild(I),f.push(w);let M=v instanceof eP?eat(o,v):$ot(o,v);m.push(M)}function Zot(o,A,f,m,C){let y=o.kmlDoc,x=o.ellipsoid,v=o.valueGetter,E,I=A.position,w=!0;I instanceof U_?(E=I.intervals,w=!1):E=Ae(A.availability,o.defaultAvailability);let Q=f instanceof xY,M,B,T,D=[];for(M=0;M<E.length;++M){let L=E.get(M),R=w?I:L.data,k=y.createElement("altitudeMode");R instanceof f6?(R=R._value,k.appendChild(Zk(o,xn.CLAMP_TO_GROUND))):O(f)?k.appendChild(Zk(o,f.heightReference)):k.appendChild(Zk(o,xn.NONE));let U=[],V=[];if(R.isConstant){v.get(R,void 0,GE);let q=xa(y,"coordinates",Sk(GE,x));U.push(fi.toIso8601(L.start)),V.push(q),U.push(fi.toIso8601(L.stop)),V.push(q)}else if(R instanceof R1)for(T=R._property._times,B=0;B<T.length;++B)U.push(fi.toIso8601(T[B])),R.getValueInReferenceFrame(T[B],s0.FIXED,GE),V.push(Sk(GE,x));else if(R instanceof uM){T=R._times;let q=R._values;for(B=0;B<T.length;++B)U.push(fi.toIso8601(T[B])),ee.fromArray(q,B*3,GE),V.push(Sk(GE,x))}else{let q=o.sampleDuration;L.start.clone(Db),L.isStartIncluded||fi.addSeconds(Db,q,Db);let ie=L.stop;for(;fi.lessThan(Db,ie);)R.getValue(Db,GE),U.push(fi.toIso8601(Db)),V.push(Sk(GE,x)),fi.addSeconds(Db,q,Db);L.isStopIncluded&&fi.equals(Db,ie)&&(R.getValue(Db,GE),U.push(fi.toIso8601(Db)),V.push(Sk(GE,x)))}let H=y.createElementNS(Hb,"Track");H.appendChild(k);for(let q=0;q<U.length;++q){let ie=xa(y,"when",U[q]),Z=xa(y,"coord",V[q],Hb);H.appendChild(ie),H.appendChild(Z)}Q&&H.appendChild(tat(o,f)),D.push(H)}if(D.length===1)m.push(D[0]);else if(D.length>1){let L=y.createElementNS(Hb,"MultiTrack");for(M=0;M<D.length;++M)L.appendChild(D[M]);m.push(L)}if(O(f)&&!Q){let L=f instanceof eP?eat(o,f):$ot(o,f);C.push(L)}let F=A.path;if(O(F)){let L=v.get(F.width),R=F.material;if(O(R)||O(L)){let k=y.createElement("LineStyle");O(L)&&k.appendChild(xa(y,"width",L)),uSe(o,R,k),C.push(k)}}}function $ot(o,A){let f=o.kmlDoc,m=o.valueGetter,C=f.createElement("IconStyle"),y=m.getColor(A.color);O(y)&&(C.appendChild(xa(f,"color",y)),C.appendChild(xa(f,"colorMode","normal")));let x=m.get(A.pixelSize);return O(x)&&C.appendChild(xa(f,"scale",x/xme)),C}function eat(o,A){let f=o.kmlDoc,m=o.valueGetter,C=o.externalFileHandler,y=f.createElement("IconStyle"),x=m.get(A.image);if(O(x)){x=C.texture(x);let M=f.createElement("Icon");M.appendChild(xa(f,"href",x));let B=m.get(A.imageSubRegion);O(B)&&(M.appendChild(xa(f,"x",B.x,Hb)),M.appendChild(xa(f,"y",B.y,Hb)),M.appendChild(xa(f,"w",B.width,Hb)),M.appendChild(xa(f,"h",B.height,Hb))),y.appendChild(M)}let v=m.getColor(A.color);O(v)&&(y.appendChild(xa(f,"color",v)),y.appendChild(xa(f,"colorMode","normal")));let E=m.get(A.scale);O(E)&&y.appendChild(xa(f,"scale",E));let I=m.get(A.pixelOffset);if(O(I)){E=Ae(E,1),Bt.divideByScalar(I,E,I);let M=m.get(A.width,xme),B=m.get(A.height,xme),T=m.get(A.horizontalOrigin,tA.CENTER);T===tA.CENTER?I.x-=M*.5:T===tA.RIGHT&&(I.x-=M);let D=m.get(A.verticalOrigin,wn.CENTER);D===wn.TOP?I.y+=B:D===wn.CENTER&&(I.y+=B*.5);let F=f.createElement("hotSpot");F.setAttribute("x",-I.x),F.setAttribute("y",I.y),F.setAttribute("xunits","pixels"),F.setAttribute("yunits","pixels"),y.appendChild(F)}let w=m.get(A.rotation),Q=m.get(A.alignedAxis);return O(w)&&ee.equals(ee.UNIT_Z,Q)&&(w=je.toDegrees(-w),w===0&&(w=360),y.appendChild(xa(f,"heading",w))),y}function Vwi(o,A,f,m){let C=o.kmlDoc,y=o.ellipsoid,x=o.valueGetter;if(!O(A))return;let v=C.createElement("LineString"),E=C.createElement("altitudeMode"),I=x.get(A.clampToGround,!1),w;I?(v.appendChild(xa(C,"tessellate",!0)),w=C.createTextNode("clampToGround")):w=C.createTextNode("absolute"),E.appendChild(w),v.appendChild(E);let Q=A.positions,M=x.get(Q),B=xa(C,"coordinates",Sk(M,y));v.appendChild(B);let T=x.get(A.zIndex);I&&O(T)&&v.appendChild(xa(C,"drawOrder",T,Hb)),f.push(v);let D=C.createElement("LineStyle"),F=x.get(A.width);O(F)&&D.appendChild(xa(C,"width",F)),uSe(o,A.material,D),m.push(D)}function zwi(o,A,f){let m=o.kmlDoc,C=o.valueGetter,y=C.get(A.height,0);f>0&&(y=f);let x=A.coordinates,v=C.get(x),E=[],I=[Si.northeast,Si.southeast,Si.southwest,Si.northwest];for(let B=0;B<4;++B)I[B](v,Tv),E.push(`${je.toDegrees(Tv.longitude)},${je.toDegrees(Tv.latitude)},${y}`);let w=xa(m,"coordinates",E.join(" ")),Q=m.createElement("outerBoundaryIs"),M=m.createElement("LinearRing");return M.appendChild(w),Q.appendChild(M),[Q]}function bze(o,A,f,m){let C=o.kmlDoc,y=o.ellipsoid,x=[],v=A.length;for(let w=0;w<v;++w)Kt.fromCartesian(A[w],y,Tv),x.push(`${je.toDegrees(Tv.longitude)},${je.toDegrees(Tv.latitude)},${m?Tv.height:f}`);let E=xa(C,"coordinates",x.join(" ")),I=C.createElement("LinearRing");return I.appendChild(E),I}function Kwi(o,A,f){let m=o.kmlDoc,C=o.valueGetter,y=C.get(A.height,0),x=C.get(A.perPositionHeight,!1);!x&&f>0&&(y=f);let v=[],E=A.hierarchy,I=C.get(E),w=Array.isArray(I)?I:I.positions,Q=m.createElement("outerBoundaryIs");Q.appendChild(bze(o,w,y,x)),v.push(Q);let M=I.holes;if(O(M)){let B=M.length;for(let T=0;T<B;++T){let D=m.createElement("innerBoundaryIs");D.appendChild(bze(o,M[T].positions,y,x)),v.push(D)}}return v}function Qze(o,A,f,m,C){let y=o.kmlDoc,x=o.valueGetter;if(!O(A))return;let v=A instanceof c6;if(v&&x.getMaterialType(A.material)==="Image"){Ywi(o,A,C);return}let E=y.createElement("Polygon"),I=x.get(A.extrudedHeight,0);I>0&&E.appendChild(xa(y,"extrude",!0));let w=v?zwi(o,A,I):Kwi(o,A,I),Q=w.length;for(let F=0;F<Q;++F)E.appendChild(w[F]);let M=y.createElement("altitudeMode");M.appendChild(Zk(o,A.heightReference)),E.appendChild(M),f.push(E);let B=y.createElement("PolyStyle"),T=x.get(A.fill,!1);T&&B.appendChild(xa(y,"fill",T)),uSe(o,A.material,B);let D=x.get(A.outline,!1);if(D){B.appendChild(xa(y,"outline",D));let F=y.createElement("LineStyle"),L=x.get(A.outlineWidth,1);F.appendChild(xa(y,"width",L));let R=x.getColor(A.outlineColor,At.BLACK);F.appendChild(xa(y,"color",R)),F.appendChild(xa(y,"colorMode","normal")),m.push(F)}m.push(B)}function Ywi(o,A,f){let m=o.kmlDoc,C=o.valueGetter,y=o.externalFileHandler,x=m.createElement("GroundOverlay"),v=m.createElement("altitudeMode");v.appendChild(Zk(o,A.heightReference)),x.appendChild(v);let E=C.get(A.height);O(E)&&x.appendChild(xa(m,"altitude",E));let I=C.get(A.coordinates),w=m.createElement("LatLonBox");w.appendChild(xa(m,"north",je.toDegrees(I.north))),w.appendChild(xa(m,"south",je.toDegrees(I.south))),w.appendChild(xa(m,"east",je.toDegrees(I.east))),w.appendChild(xa(m,"west",je.toDegrees(I.west))),x.appendChild(w);let Q=C.get(A.material),M=y.texture(Q.image),B=m.createElement("Icon");B.appendChild(xa(m,"href",M)),x.appendChild(B);let T=Q.color;O(T)&&x.appendChild(xa(m,"color",Dk(Q.color))),f.push(x)}function tat(o,A){let f=o.kmlDoc,m=o.valueGetter,C=o.externalFileHandler,y=f.createElement("Model"),x=m.get(A.scale);if(O(x)){let I=f.createElement("scale");I.appendChild(xa(f,"x",x)),I.appendChild(xa(f,"y",x)),I.appendChild(xa(f,"z",x)),y.appendChild(I)}let v=f.createElement("Link"),E=C.model(A,o.time);return v.appendChild(xa(f,"href",E)),y.appendChild(v),y}function Jwi(o,A,f,m,C){let y=o.kmlDoc,x=o.ellipsoid,v=o.valueGetter;if(!O(f))return;let E=A.position;if(!E.isConstant){Zot(o,A,f,m,C);return}let I=tat(o,f),w=y.createElement("altitudeMode");w.appendChild(Zk(o,f.heightReference)),I.appendChild(w),v.get(E,void 0,GE),Kt.fromCartesian(GE,x,Tv);let Q=y.createElement("Location");Q.appendChild(xa(y,"longitude",je.toDegrees(Tv.longitude))),Q.appendChild(xa(y,"latitude",je.toDegrees(Tv.latitude))),Q.appendChild(xa(y,"altitude",Tv.height)),I.appendChild(Q),m.push(I)}function uSe(o,A,f){let m=o.kmlDoc,C=o.valueGetter;if(!O(A))return;let y=C.get(A);if(!O(y))return;let x,v=C.getMaterialType(A),E,I;switch(v){case"Image":x=Dk(At.WHITE);break;case"Color":case"Grid":case"PolylineGlow":case"PolylineArrow":case"PolylineDash":x=Dk(y.color);break;case"PolylineOutline":x=Dk(y.color),E=Dk(y.outlineColor),I=y.outlineWidth,f.appendChild(xa(m,"outerColor",E,Hb)),f.appendChild(xa(m,"outerWidth",I,Hb));break;case"Stripe":x=Dk(y.oddColor);break}O(x)&&(f.appendChild(xa(m,"color",x)),f.appendChild(xa(m,"colorMode","normal")))}function Zk(o,A){let f=o.kmlDoc,m=o.valueGetter.get(A,xn.NONE),C;switch(m){case xn.NONE:C=f.createTextNode("absolute");break;case xn.CLAMP_TO_GROUND:C=f.createTextNode("clampToGround");break;case xn.RELATIVE_TO_GROUND:C=f.createTextNode("relativeToGround");break}return C}function Sk(o,A){Array.isArray(o)||(o=[o]);let f=o.length,m=[];for(let C=0;C<f;++C)Kt.fromCartesian(o[C],A,Tv),m.push(`${je.toDegrees(Tv.longitude)},${je.toDegrees(Tv.latitude)},${Tv.height}`);return m.join(" ")}function xa(o,A,f,m){f=Ae(f,""),typeof f=="boolean"&&(f=f?"1":"0");let C=O(m)?o.createElementNS(m,A):o.createElement(A),y=f==="string"&&f.indexOf("<")!==-1?o.createCDATASection(f):o.createTextNode(f);return C.appendChild(y),C}function Dk(o){let A="",f=o.toBytes();for(let m=3;m>=0;--m)A+=f[m]<16?`0${f[m].toString(16)}`:f[m].toString(16);return A}var iat=lSe,rat;typeof DOMParser<"u"&&(rat=new DOMParser);var Wwi=new nje({stripPrefix:!1,email:!1,replaceFn:function(o,A){if(!A.protocolUrlMatch)return!1}}),die=32,Sze=2414016,Dze=1,Tze=16093e3,Mze=.1,jwi=[null,void 0,"http://www.topografix.com/GPX/1/1"],XA={gpx:jwi};function qwi(o){return new Promise((A,f)=>{let m=new FileReader;m.addEventListener("load",function(){A(m.result)}),m.addEventListener("error",function(){f(m.error)}),m.readAsText(o)})}function cSe(o,A){let f=KK(o,"id");return f=O(f)?f:Vu(),A.getOrCreateEntity(f)}function ASe(o){let A=Pze(o,"lon"),f=Pze(o,"lat"),m=i7(o,"ele",XA.gpx);return ee.fromDegrees(A,f,m)}function Pze(o,A){if(!O(o))return;let f=o.getAttribute(A);if(f!==null){let m=parseFloat(f);return isNaN(m)?void 0:m}}function KK(o,A){if(!O(o))return;let f=o.getAttribute(A);return f!==null?f:void 0}function xN(o,A,f){if(!O(o))return;let m=o.childNodes,C=m.length;for(let y=0;y<C;y++){let x=m[y];if(x.localName===A&&f.indexOf(x.namespaceURI)!==-1)return x}}function hSe(o,A,f){if(!O(o))return;let m=[],C=o.getElementsByTagName(A),y=C.length;for(let x=0;x<y;x++){let v=C[x];v.localName===A&&f.indexOf(v.namespaceURI)!==-1&&m.push(v)}return m}function i7(o,A,f){let m=xN(o,A,f);if(O(m)){let C=parseFloat(m.textContent);return isNaN(C)?void 0:C}}function XE(o,A,f){let m=xN(o,A,f);if(O(m))return m.textContent.trim()}function nat(o){let A=new eP;return A.width=die,A.height=die,A.scaleByDistance=new To(Sze,Dze,Tze,Mze),A.pixelOffsetScaleByDistance=new To(Sze,Dze,Tze,Mze),A.verticalOrigin=new bc(wn.BOTTOM),A.image=o,A}function Xwi(){let o=new u6;return o.translucencyByDistance=new To(3e6,1,5e6,0),o.pixelOffset=new Bt(17,0),o.horizontalOrigin=tA.LEFT,o.font="16px sans-serif",o.style=pA.FILL_AND_OUTLINE,o}function oat(o){let A=new FD;return A.width=4,A.material=new JM,A.material.color=O(o)?o:At.RED,A.material.outlineWidth=2,A.material.outlineColor=At.BLACK,A}var Rze={time:{text:"Time",tag:"time"},comment:{text:"Comment",tag:"cmt"},description:{text:"Description",tag:"desc"},source:{text:"Source",tag:"src"},number:{text:"GPS track/route number",tag:"number"},type:{text:"Type",tag:"type"}},r7;typeof document<"u"&&(r7=document.createElement("div"));function dSe(o,A){let f,m="",C=Object.keys(Rze),y=C.length;for(f=0;f<y;f++){let w=C[f],Q=Rze[w];Q.value=Ae(XE(o,Q.tag,XA.gpx),""),O(Q.value)&&Q.value!==""&&(m=`${m}<p>${Q.text}: ${Q.value}</p>`)}if(!O(m)||m==="")return;m=Wwi.link(m),r7.innerHTML=m;let x=r7.querySelectorAll("a");for(f=0;f<x.length;f++)x[f].setAttribute("target","_blank");let v=At.WHITE,E=At.BLACK,I='<div class="cesium-infoBox-description-lighter" style="';return I+="overflow:auto;",I+="word-wrap:break-word;",I+=`background-color:${v.toCssColorString()};`,I+=`color:${E.toCssColorString()};`,I+='">',I+=`${r7.innerHTML}</div>`,r7.innerHTML="",I}function aat(o,A,f,m){let C=ASe(A),y=cSe(A,f);y.position=C;let x=O(m.waypointImage)?m.waypointImage:o._pinBuilder.fromMakiIconId("marker",At.RED,die);y.billboard=nat(x);let v=XE(A,"name",XA.gpx);y.name=v,y.label=Xwi(),y.label.text=v,y.description=dSe(A,y),m.clampToGround&&(y.billboard.heightReference=xn.CLAMP_TO_GROUND,y.label.heightReference=xn.CLAMP_TO_GROUND)}function Zwi(o,A,f,m){let C=cSe(A,f);C.description=dSe(A,C);let y=hSe(A,"rtept",XA.gpx),x=new Array(y.length);for(let v=0;v<y.length;v++)aat(o,y[v],f,m),x[v]=ASe(y[v]);C.polyline=oat(m.routeColor),m.clampToGround&&(C.polyline.clampToGround=!0),C.polyline.positions=x}function $wi(o,A,f,m){let C=cSe(A,f);C.description=dSe(A,C);let y=hSe(A,"trkseg",XA.gpx),x=[],v=[],E,I=!0,w=new R1;for(let Q=0;Q<y.length;Q++)E=ebi(y[Q]),x=x.concat(E.positions),E.times.length>0?(v=v.concat(E.times),w.addSamples(v,x),I=I&&!0):I=!1;if(I){let Q=O(m.waypointImage)?m.waypointImage:o._pinBuilder.fromMakiIconId("marker",At.RED,die);C.billboard=nat(Q),C.position=w,m.clampToGround&&(C.billboard.heightReference=xn.CLAMP_TO_GROUND),C.availability=new mx,C.availability.addInterval(new el({start:v[0],stop:v[v.length-1]}))}C.polyline=oat(m.trackColor),C.polyline.positions=x,m.clampToGround&&(C.polyline.clampToGround=!0)}function ebi(o){let A={positions:[],times:[]},f=hSe(o,"trkpt",XA.gpx),m;for(let C=0;C<f.length;C++){let y=ASe(f[C]);A.positions.push(y),m=XE(f[C],"time",XA.gpx),O(m)&&A.times.push(fi.fromIso8601(m))}return A}function tbi(o){let A=xN(o,"metadata",XA.gpx);if(O(A)){let f={name:XE(A,"name",XA.gpx),desc:XE(A,"desc",XA.gpx),author:ibi(A),copyright:nbi(A),link:sat(A),time:XE(A,"time",XA.gpx),keywords:XE(A,"keywords",XA.gpx),bounds:obi(A)};if(O(f.name)||O(f.desc)||O(f.author)||O(f.copyright)||O(f.link)||O(f.time)||O(f.keywords)||O(f.bounds))return f}}function ibi(o){let A=xN(o,"author",XA.gpx);if(O(A)){let f={name:XE(A,"name",XA.gpx),email:rbi(A),link:sat(A)};if(O(f.name)||O(f.email)||O(f.link))return f}}function rbi(o){let A=xN(o,"email",XA.gpx);if(O(A)){let f=XE(A,"id",XA.gpx),m=XE(A,"domain",XA.gpx);return`${f}@${m}`}}function sat(o){let A=xN(o,"link",XA.gpx);if(O(A)){let f={href:KK(A,"href"),text:XE(A,"text",XA.gpx),mimeType:XE(A,"type",XA.gpx)};if(O(f.href)||O(f.text)||O(f.mimeType))return f}}function nbi(o){let A=xN(o,"copyright",XA.gpx);if(O(A)){let f={author:KK(A,"author"),year:XE(A,"year",XA.gpx),license:XE(A,"license",XA.gpx)};if(O(f.author)||O(f.year)||O(f.license))return f}}function obi(o){let A=xN(o,"bounds",XA.gpx);if(O(A)){let f={minLat:i7(A,"minlat",XA.gpx),maxLat:i7(A,"maxlat",XA.gpx),minLon:i7(A,"minlon",XA.gpx),maxLon:i7(A,"maxlon",XA.gpx)};if(O(f.minLat)||O(f.maxLat)||O(f.minLon)||O(f.maxLon))return f}}var Lze={wpt:aat,rte:Zwi,trk:$wi};function abi(o,A,f,m){let C=Object.keys(Lze),y=C.length;for(let x=0;x<y;x++){let v=C[x],E=Lze[v],I=A.childNodes,w=I.length;for(let Q=0;Q<w;Q++){let M=I[Q];M.localName===v&&XA.gpx.indexOf(M.namespaceURI)!==-1&&E(o,M,f,m)}}}function Fze(o,A,f){let m=o._entityCollection;m.removeAll();let C=A.documentElement,y=KK(C,"version"),x=KK(C,"creator"),v,E=tbi(C);O(E)&&(v=E.name),C.localName==="gpx"?abi(o,C,m,f):console.log(`GPX - Unsupported node: ${C.localName}`);let I,w=m.computeAvailability(),Q=w.start,M=w.stop,B=fi.equals(Q,Cn.MINIMUM_VALUE),T=fi.equals(M,Cn.MAXIMUM_VALUE);if(!B||!T){let F;B&&(F=new Date,F.setHours(0,0,0,0),Q=fi.fromDate(F)),T&&(F=new Date,F.setHours(24,0,0,0),M=fi.fromDate(F)),I=new A5,I.startTime=Q,I.stopTime=M,I.currentTime=fi.clone(Q),I.clockRange=aC.LOOP_STOP,I.clockStep=Jh.SYSTEM_CLOCK_MULTIPLIER,I.multiplier=Math.round(Math.min(Math.max(fi.secondsDifference(M,Q)/60,1),31556900))}let D=!1;return o._name!==v&&(o._name=v,D=!0),o._creator!==x&&(o._creator=x,D=!0),sbi(o._metadata,E)&&(o._metadata=E,D=!0),o._version!==y&&(o._version=y,D=!0),I!==o._clock&&(D=!0,o._clock=I),D&&o._changed.raiseEvent(o),cy.setLoading(o,!1),o}function sbi(o,A){return!O(o)&&!O(A)?!1:O(o)&&O(A)?o.name!==A.name||o.dec!==A.desc||o.src!==A.src||o.author!==A.author||o.copyright!==A.copyright||o.link!==A.link||o.time!==A.time||o.bounds!==A.bounds:!0}function lbi(o,A,f,m){m=Ae(m,Ae.EMPTY_OBJECT);let C=f;if(typeof f=="string"||f instanceof An){f=An.createIfNeeded(f),C=f.fetchBlob();let y=o._resourceCredits,x=f.credits;if(O(x)){let v=x.length;for(let E=0;E<v;E++)y.push(x[E])}}return Promise.resolve(C).then(function(y){return y instanceof Blob?qwi(y).then(function(x){let v,E;try{v=rat.parseFromString(x,"application/xml")}catch(I){E=I.toString()}if(O(E)||v.body||v.documentElement.tagName==="parsererror"){let I=O(E)?E:v.documentElement.firstChild.nodeValue;throw I||(I=v.body.innerText),new nr(I)}return Fze(o,v,m)}):Fze(o,y,m)}).catch(function(y){return o._error.raiseEvent(o,y),console.log(y),Promise.reject(y)})}function V8(){this._changed=new br,this._error=new br,this._loading=new br,this._clock=void 0,this._entityCollection=new iw,this._entityCluster=new tN,this._name=void 0,this._version=void 0,this._creator=void 0,this._metadata=void 0,this._isLoading=!1,this._pinBuilder=new BY}V8.load=function(o,A){return new V8().load(o,A)};Object.defineProperties(V8.prototype,{name:{get:function(){return this._name}},version:{get:function(){return this._version}},creator:{get:function(){return this._creator}},metadata:{get:function(){return this._metadata}},clock:{get:function(){return this._clock}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(o){this._entityCollection.show=o}},clustering:{get:function(){return this._entityCluster},set:function(o){this._entityCluster=o}}});V8.prototype.update=function(o){return!0};V8.prototype.load=function(o,A){if(!O(o))throw new Ui("data is required.");A=Ae(A,Ae.EMPTY_OBJECT),cy.setLoading(this,!0);let f=this._name,m=this;return lbi(this,this._entityCollection,o,A).then(function(){let C,y=m._entityCollection.computeAvailability(),x=y.start,v=y.stop,E=fi.equals(x,Cn.MINIMUM_VALUE),I=fi.equals(v,Cn.MAXIMUM_VALUE);if(!E||!I){let Q;E&&(Q=new Date,Q.setHours(0,0,0,0),x=fi.fromDate(Q)),I&&(Q=new Date,Q.setHours(24,0,0,0),v=fi.fromDate(Q)),C=new A5,C.startTime=x,C.stopTime=v,C.currentTime=fi.clone(x),C.clockRange=aC.LOOP_STOP,C.clockStep=Jh.SYSTEM_CLOCK_MULTIPLIER,C.multiplier=Math.round(Math.min(Math.max(fi.secondsDifference(v,x)/60,1),31556900))}let w=!1;return C!==m._clock&&(m._clock=C,w=!0),f!==m._name&&(w=!0),w&&m._changed.raiseEvent(m),cy.setLoading(m,!1),m}).catch(function(C){return cy.setLoading(m,!1),m._error.raiseEvent(m,C),console.log(C),Promise.reject(C)})};var fSe=V8;function tW(){Ui.throwInstantiationError()}tW.prototype.update=Ui.throwInstantiationError;tW.prototype.getBoundingSphere=Ui.throwInstantiationError;tW.prototype.isDestroyed=Ui.throwInstantiationError;tW.prototype.destroy=Ui.throwInstantiationError;var lat=tW,uat={};(function(o,A){o.CryptoJS=A()})(uat,function(){var o=o||function(A,f){var m;if(typeof window<"u"&&window.crypto&&(m=window.crypto),typeof self<"u"&&self.crypto&&(m=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(m=globalThis.crypto),!m&&typeof window<"u"&&window.msCrypto&&(m=window.msCrypto),!m&&typeof global<"u"&&global.crypto&&(m=global.crypto),!m&&typeof sM=="function")try{m=sM("crypto")}catch{}var C=function(){if(m){if(typeof m.getRandomValues=="function")try{return m.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof m.randomBytes=="function")try{return m.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},y=Object.create||function(){function L(){}return function(R){var k;return L.prototype=R,k=new L,L.prototype=null,k}}(),x={},v=x.lib={},E=v.Base=function(){return{extend:function(L){var R=y(this);return L&&R.mixIn(L),(!R.hasOwnProperty("init")||this.init===R.init)&&(R.init=function(){R.$super.init.apply(this,arguments)}),R.init.prototype=R,R.$super=this,R},create:function(){var L=this.extend();return L.init.apply(L,arguments),L},init:function(){},mixIn:function(L){for(var R in L)L.hasOwnProperty(R)&&(this[R]=L[R]);L.hasOwnProperty("toString")&&(this.toString=L.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),I=v.WordArray=E.extend({init:function(L,R){L=this.words=L||[],R!=f?this.sigBytes=R:this.sigBytes=L.length*4},toString:function(L){return(L||Q).stringify(this)},concat:function(L){var R=this.words,k=L.words,U=this.sigBytes,V=L.sigBytes;if(this.clamp(),U%4)for(var H=0;H<V;H++){var q=k[H>>>2]>>>24-H%4*8&255;R[U+H>>>2]|=q<<24-(U+H)%4*8}else for(var ie=0;ie<V;ie+=4)R[U+ie>>>2]=k[ie>>>2];return this.sigBytes+=V,this},clamp:function(){var L=this.words,R=this.sigBytes;L[R>>>2]&=4294967295<<32-R%4*8,L.length=A.ceil(R/4)},clone:function(){var L=E.clone.call(this);return L.words=this.words.slice(0),L},random:function(L){for(var R=[],k=0;k<L;k+=4)R.push(C());return new I.init(R,L)}}),w=x.enc={},Q=w.Hex={stringify:function(L){for(var R=L.words,k=L.sigBytes,U=[],V=0;V<k;V++){var H=R[V>>>2]>>>24-V%4*8&255;U.push((H>>>4).toString(16)),U.push((H&15).toString(16))}return U.join("")},parse:function(L){for(var R=L.length,k=[],U=0;U<R;U+=2)k[U>>>3]|=parseInt(L.substr(U,2),16)<<24-U%8*4;return new I.init(k,R/2)}},M=w.Latin1={stringify:function(L){for(var R=L.words,k=L.sigBytes,U=[],V=0;V<k;V++){var H=R[V>>>2]>>>24-V%4*8&255;U.push(String.fromCharCode(H))}return U.join("")},parse:function(L){for(var R=L.length,k=[],U=0;U<R;U++)k[U>>>2]|=(L.charCodeAt(U)&255)<<24-U%4*8;return new I.init(k,R)}},B=w.Utf8={stringify:function(L){try{return decodeURIComponent(escape(M.stringify(L)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(L){return M.parse(unescape(encodeURIComponent(L)))}},T=v.BufferedBlockAlgorithm=E.extend({reset:function(){this._data=new I.init,this._nDataBytes=0},_append:function(L){typeof L=="string"&&(L=B.parse(L)),this._data.concat(L),this._nDataBytes+=L.sigBytes},_process:function(L){var R,k=this._data,U=k.words,V=k.sigBytes,H=this.blockSize,q=H*4,ie=V/q;L?ie=A.ceil(ie):ie=A.max((ie|0)-this._minBufferSize,0);var Z=ie*H,oe=A.min(Z*4,V);if(Z){for(var ne=0;ne<Z;ne+=H)this._doProcessBlock(U,ne);R=U.splice(0,Z),k.sigBytes-=oe}return new I.init(R,oe)},clone:function(){var L=E.clone.call(this);return L._data=this._data.clone(),L},_minBufferSize:0}),D=v.Hasher=T.extend({cfg:E.extend(),init:function(L){this.cfg=this.cfg.extend(L),this.reset()},reset:function(){T.reset.call(this),this._doReset()},update:function(L){return this._append(L),this._process(),this},finalize:function(L){L&&this._append(L);var R=this._doFinalize();return R},blockSize:512/32,_createHelper:function(L){return function(R,k){return new L.init(k).finalize(R)}},_createHmacHelper:function(L){return function(R,k){return new F.HMAC.init(L,k).finalize(R)}}}),F=x.algo={};return x}(Math);(function(A){var f=o,m=f.lib,C=m.Base,y=m.WordArray,x=f.x64={},v=x.Word=C.extend({init:function(I,w){this.high=I,this.low=w}}),E=x.WordArray=C.extend({init:function(I,w){I=this.words=I||[],w!=A?this.sigBytes=w:this.sigBytes=I.length*8},toX32:function(){for(var I=this.words,w=I.length,Q=[],M=0;M<w;M++){var B=I[M];Q.push(B.high),Q.push(B.low)}return y.create(Q,this.sigBytes)},clone:function(){for(var I=C.clone.call(this),w=I.words=this.words.slice(0),Q=w.length,M=0;M<Q;M++)w[M]=w[M].clone();return I}})})(),function(){if(typeof ArrayBuffer=="function"){var A=o,f=A.lib,m=f.WordArray,C=m.init,y=m.init=function(x){if(x instanceof ArrayBuffer&&(x=new Uint8Array(x)),(x instanceof Int8Array||typeof Uint8ClampedArray<"u"&&x instanceof Uint8ClampedArray||x instanceof Int16Array||x instanceof Uint16Array||x instanceof Int32Array||x instanceof Uint32Array||x instanceof Float32Array||x instanceof Float64Array)&&(x=new Uint8Array(x.buffer,x.byteOffset,x.byteLength)),x instanceof Uint8Array){for(var v=x.byteLength,E=[],I=0;I<v;I++)E[I>>>2]|=x[I]<<24-I%4*8;C.call(this,E,v)}else C.apply(this,arguments)};y.prototype=m}}(),function(){var A=o,f=A.lib,m=f.WordArray,C=A.enc,y=C.Utf16=C.Utf16BE={stringify:function(v){for(var E=v.words,I=v.sigBytes,w=[],Q=0;Q<I;Q+=2){var M=E[Q>>>2]>>>16-Q%4*8&65535;w.push(String.fromCharCode(M))}return w.join("")},parse:function(v){for(var E=v.length,I=[],w=0;w<E;w++)I[w>>>1]|=v.charCodeAt(w)<<16-w%2*16;return m.create(I,E*2)}};C.Utf16LE={stringify:function(v){for(var E=v.words,I=v.sigBytes,w=[],Q=0;Q<I;Q+=2){var M=x(E[Q>>>2]>>>16-Q%4*8&65535);w.push(String.fromCharCode(M))}return w.join("")},parse:function(v){for(var E=v.length,I=[],w=0;w<E;w++)I[w>>>1]|=x(v.charCodeAt(w)<<16-w%2*16);return m.create(I,E*2)}};function x(v){return v<<8&4278255360|v>>>8&16711935}}(),function(){var A=o,f=A.lib,m=f.WordArray,C=A.enc,y=C.Base64={stringify:function(v){var E=v.words,I=v.sigBytes,w=this._map;v.clamp();for(var Q=[],M=0;M<I;M+=3)for(var B=E[M>>>2]>>>24-M%4*8&255,T=E[M+1>>>2]>>>24-(M+1)%4*8&255,D=E[M+2>>>2]>>>24-(M+2)%4*8&255,F=B<<16|T<<8|D,L=0;L<4&&M+L*.75<I;L++)Q.push(w.charAt(F>>>6*(3-L)&63));var R=w.charAt(64);if(R)for(;Q.length%4;)Q.push(R);return Q.join("")},parse:function(v){var E=v.length,I=this._map,w=this._reverseMap;if(!w){w=this._reverseMap=[];for(var Q=0;Q<I.length;Q++)w[I.charCodeAt(Q)]=Q}var M=I.charAt(64);if(M){var B=v.indexOf(M);B!==-1&&(E=B)}return x(v,E,w)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function x(v,E,I){for(var w=[],Q=0,M=0;M<E;M++)if(M%4){var B=I[v.charCodeAt(M-1)]<<M%4*2,T=I[v.charCodeAt(M)]>>>6-M%4*2,D=B|T;w[Q>>>2]|=D<<24-Q%4*8,Q++}return m.create(w,Q)}}(),function(){var A=o,f=A.lib,m=f.WordArray,C=A.enc,y=C.Base64url={stringify:function(v,E=!0){var I=v.words,w=v.sigBytes,Q=E?this._safe_map:this._map;v.clamp();for(var M=[],B=0;B<w;B+=3)for(var T=I[B>>>2]>>>24-B%4*8&255,D=I[B+1>>>2]>>>24-(B+1)%4*8&255,F=I[B+2>>>2]>>>24-(B+2)%4*8&255,L=T<<16|D<<8|F,R=0;R<4&&B+R*.75<w;R++)M.push(Q.charAt(L>>>6*(3-R)&63));var k=Q.charAt(64);if(k)for(;M.length%4;)M.push(k);return M.join("")},parse:function(v,E=!0){var I=v.length,w=E?this._safe_map:this._map,Q=this._reverseMap;if(!Q){Q=this._reverseMap=[];for(var M=0;M<w.length;M++)Q[w.charCodeAt(M)]=M}var B=w.charAt(64);if(B){var T=v.indexOf(B);T!==-1&&(I=T)}return x(v,I,Q)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function x(v,E,I){for(var w=[],Q=0,M=0;M<E;M++)if(M%4){var B=I[v.charCodeAt(M-1)]<<M%4*2,T=I[v.charCodeAt(M)]>>>6-M%4*2,D=B|T;w[Q>>>2]|=D<<24-Q%4*8,Q++}return m.create(w,Q)}}(),function(A){var f=o,m=f.lib,C=m.WordArray,y=m.Hasher,x=f.algo,v=[];(function(){for(var B=0;B<64;B++)v[B]=A.abs(A.sin(B+1))*4294967296|0})();var E=x.MD5=y.extend({_doReset:function(){this._hash=new C.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(B,T){for(var D=0;D<16;D++){var F=T+D,L=B[F];B[F]=(L<<8|L>>>24)&16711935|(L<<24|L>>>8)&4278255360}var R=this._hash.words,k=B[T+0],U=B[T+1],V=B[T+2],H=B[T+3],q=B[T+4],ie=B[T+5],Z=B[T+6],oe=B[T+7],ne=B[T+8],se=B[T+9],ce=B[T+10],j=B[T+11],de=B[T+12],me=B[T+13],_e=B[T+14],Be=B[T+15],Qe=R[0],Ie=R[1],ve=R[2],K=R[3];Qe=I(Qe,Ie,ve,K,k,7,v[0]),K=I(K,Qe,Ie,ve,U,12,v[1]),ve=I(ve,K,Qe,Ie,V,17,v[2]),Ie=I(Ie,ve,K,Qe,H,22,v[3]),Qe=I(Qe,Ie,ve,K,q,7,v[4]),K=I(K,Qe,Ie,ve,ie,12,v[5]),ve=I(ve,K,Qe,Ie,Z,17,v[6]),Ie=I(Ie,ve,K,Qe,oe,22,v[7]),Qe=I(Qe,Ie,ve,K,ne,7,v[8]),K=I(K,Qe,Ie,ve,se,12,v[9]),ve=I(ve,K,Qe,Ie,ce,17,v[10]),Ie=I(Ie,ve,K,Qe,j,22,v[11]),Qe=I(Qe,Ie,ve,K,de,7,v[12]),K=I(K,Qe,Ie,ve,me,12,v[13]),ve=I(ve,K,Qe,Ie,_e,17,v[14]),Ie=I(Ie,ve,K,Qe,Be,22,v[15]),Qe=w(Qe,Ie,ve,K,U,5,v[16]),K=w(K,Qe,Ie,ve,Z,9,v[17]),ve=w(ve,K,Qe,Ie,j,14,v[18]),Ie=w(Ie,ve,K,Qe,k,20,v[19]),Qe=w(Qe,Ie,ve,K,ie,5,v[20]),K=w(K,Qe,Ie,ve,ce,9,v[21]),ve=w(ve,K,Qe,Ie,Be,14,v[22]),Ie=w(Ie,ve,K,Qe,q,20,v[23]),Qe=w(Qe,Ie,ve,K,se,5,v[24]),K=w(K,Qe,Ie,ve,_e,9,v[25]),ve=w(ve,K,Qe,Ie,H,14,v[26]),Ie=w(Ie,ve,K,Qe,ne,20,v[27]),Qe=w(Qe,Ie,ve,K,me,5,v[28]),K=w(K,Qe,Ie,ve,V,9,v[29]),ve=w(ve,K,Qe,Ie,oe,14,v[30]),Ie=w(Ie,ve,K,Qe,de,20,v[31]),Qe=Q(Qe,Ie,ve,K,ie,4,v[32]),K=Q(K,Qe,Ie,ve,ne,11,v[33]),ve=Q(ve,K,Qe,Ie,j,16,v[34]),Ie=Q(Ie,ve,K,Qe,_e,23,v[35]),Qe=Q(Qe,Ie,ve,K,U,4,v[36]),K=Q(K,Qe,Ie,ve,q,11,v[37]),ve=Q(ve,K,Qe,Ie,oe,16,v[38]),Ie=Q(Ie,ve,K,Qe,ce,23,v[39]),Qe=Q(Qe,Ie,ve,K,me,4,v[40]),K=Q(K,Qe,Ie,ve,k,11,v[41]),ve=Q(ve,K,Qe,Ie,H,16,v[42]),Ie=Q(Ie,ve,K,Qe,Z,23,v[43]),Qe=Q(Qe,Ie,ve,K,se,4,v[44]),K=Q(K,Qe,Ie,ve,de,11,v[45]),ve=Q(ve,K,Qe,Ie,Be,16,v[46]),Ie=Q(Ie,ve,K,Qe,V,23,v[47]),Qe=M(Qe,Ie,ve,K,k,6,v[48]),K=M(K,Qe,Ie,ve,oe,10,v[49]),ve=M(ve,K,Qe,Ie,_e,15,v[50]),Ie=M(Ie,ve,K,Qe,ie,21,v[51]),Qe=M(Qe,Ie,ve,K,de,6,v[52]),K=M(K,Qe,Ie,ve,H,10,v[53]),ve=M(ve,K,Qe,Ie,ce,15,v[54]),Ie=M(Ie,ve,K,Qe,U,21,v[55]),Qe=M(Qe,Ie,ve,K,ne,6,v[56]),K=M(K,Qe,Ie,ve,Be,10,v[57]),ve=M(ve,K,Qe,Ie,Z,15,v[58]),Ie=M(Ie,ve,K,Qe,me,21,v[59]),Qe=M(Qe,Ie,ve,K,q,6,v[60]),K=M(K,Qe,Ie,ve,j,10,v[61]),ve=M(ve,K,Qe,Ie,V,15,v[62]),Ie=M(Ie,ve,K,Qe,se,21,v[63]),R[0]=R[0]+Qe|0,R[1]=R[1]+Ie|0,R[2]=R[2]+ve|0,R[3]=R[3]+K|0},_doFinalize:function(){var B=this._data,T=B.words,D=this._nDataBytes*8,F=B.sigBytes*8;T[F>>>5]|=128<<24-F%32;var L=A.floor(D/4294967296),R=D;T[(F+64>>>9<<4)+15]=(L<<8|L>>>24)&16711935|(L<<24|L>>>8)&4278255360,T[(F+64>>>9<<4)+14]=(R<<8|R>>>24)&16711935|(R<<24|R>>>8)&4278255360,B.sigBytes=(T.length+1)*4,this._process();for(var k=this._hash,U=k.words,V=0;V<4;V++){var H=U[V];U[V]=(H<<8|H>>>24)&16711935|(H<<24|H>>>8)&4278255360}return k},clone:function(){var B=y.clone.call(this);return B._hash=this._hash.clone(),B}});function I(B,T,D,F,L,R,k){var U=B+(T&D|~T&F)+L+k;return(U<<R|U>>>32-R)+T}function w(B,T,D,F,L,R,k){var U=B+(T&F|D&~F)+L+k;return(U<<R|U>>>32-R)+T}function Q(B,T,D,F,L,R,k){var U=B+(T^D^F)+L+k;return(U<<R|U>>>32-R)+T}function M(B,T,D,F,L,R,k){var U=B+(D^(T|~F))+L+k;return(U<<R|U>>>32-R)+T}f.MD5=y._createHelper(E),f.HmacMD5=y._createHmacHelper(E)}(Math),function(){var A=o,f=A.lib,m=f.WordArray,C=f.Hasher,y=A.algo,x=[],v=y.SHA1=C.extend({_doReset:function(){this._hash=new m.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(E,I){for(var w=this._hash.words,Q=w[0],M=w[1],B=w[2],T=w[3],D=w[4],F=0;F<80;F++){if(F<16)x[F]=E[I+F]|0;else{var L=x[F-3]^x[F-8]^x[F-14]^x[F-16];x[F]=L<<1|L>>>31}var R=(Q<<5|Q>>>27)+D+x[F];F<20?R+=(M&B|~M&T)+1518500249:F<40?R+=(M^B^T)+1859775393:F<60?R+=(M&B|M&T|B&T)-1894007588:R+=(M^B^T)-899497514,D=T,T=B,B=M<<30|M>>>2,M=Q,Q=R}w[0]=w[0]+Q|0,w[1]=w[1]+M|0,w[2]=w[2]+B|0,w[3]=w[3]+T|0,w[4]=w[4]+D|0},_doFinalize:function(){var E=this._data,I=E.words,w=this._nDataBytes*8,Q=E.sigBytes*8;return I[Q>>>5]|=128<<24-Q%32,I[(Q+64>>>9<<4)+14]=Math.floor(w/4294967296),I[(Q+64>>>9<<4)+15]=w,E.sigBytes=I.length*4,this._process(),this._hash},clone:function(){var E=C.clone.call(this);return E._hash=this._hash.clone(),E}});A.SHA1=C._createHelper(v),A.HmacSHA1=C._createHmacHelper(v)}(),function(A){var f=o,m=f.lib,C=m.WordArray,y=m.Hasher,x=f.algo,v=[],E=[];(function(){function Q(D){for(var F=A.sqrt(D),L=2;L<=F;L++)if(!(D%L))return!1;return!0}function M(D){return(D-(D|0))*4294967296|0}for(var B=2,T=0;T<64;)Q(B)&&(T<8&&(v[T]=M(A.pow(B,1/2))),E[T]=M(A.pow(B,1/3)),T++),B++})();var I=[],w=x.SHA256=y.extend({_doReset:function(){this._hash=new C.init(v.slice(0))},_doProcessBlock:function(Q,M){for(var B=this._hash.words,T=B[0],D=B[1],F=B[2],L=B[3],R=B[4],k=B[5],U=B[6],V=B[7],H=0;H<64;H++){if(H<16)I[H]=Q[M+H]|0;else{var q=I[H-15],ie=(q<<25|q>>>7)^(q<<14|q>>>18)^q>>>3,Z=I[H-2],oe=(Z<<15|Z>>>17)^(Z<<13|Z>>>19)^Z>>>10;I[H]=ie+I[H-7]+oe+I[H-16]}var ne=R&k^~R&U,se=T&D^T&F^D&F,ce=(T<<30|T>>>2)^(T<<19|T>>>13)^(T<<10|T>>>22),j=(R<<26|R>>>6)^(R<<21|R>>>11)^(R<<7|R>>>25),de=V+j+ne+E[H]+I[H],me=ce+se;V=U,U=k,k=R,R=L+de|0,L=F,F=D,D=T,T=de+me|0}B[0]=B[0]+T|0,B[1]=B[1]+D|0,B[2]=B[2]+F|0,B[3]=B[3]+L|0,B[4]=B[4]+R|0,B[5]=B[5]+k|0,B[6]=B[6]+U|0,B[7]=B[7]+V|0},_doFinalize:function(){var Q=this._data,M=Q.words,B=this._nDataBytes*8,T=Q.sigBytes*8;return M[T>>>5]|=128<<24-T%32,M[(T+64>>>9<<4)+14]=A.floor(B/4294967296),M[(T+64>>>9<<4)+15]=B,Q.sigBytes=M.length*4,this._process(),this._hash},clone:function(){var Q=y.clone.call(this);return Q._hash=this._hash.clone(),Q}});f.SHA256=y._createHelper(w),f.HmacSHA256=y._createHmacHelper(w)}(Math),function(){var A=o,f=A.lib,m=f.WordArray,C=A.algo,y=C.SHA256,x=C.SHA224=y.extend({_doReset:function(){this._hash=new m.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var v=y._doFinalize.call(this);return v.sigBytes-=4,v}});A.SHA224=y._createHelper(x),A.HmacSHA224=y._createHmacHelper(x)}(),function(){var A=o,f=A.lib,m=f.Hasher,C=A.x64,y=C.Word,x=C.WordArray,v=A.algo;function E(){return y.create.apply(y,arguments)}var I=[E(1116352408,3609767458),E(1899447441,602891725),E(3049323471,3964484399),E(3921009573,2173295548),E(961987163,4081628472),E(1508970993,3053834265),E(2453635748,2937671579),E(2870763221,3664609560),E(3624381080,2734883394),E(310598401,1164996542),E(607225278,1323610764),E(1426881987,3590304994),E(1925078388,4068182383),E(2162078206,991336113),E(2614888103,633803317),E(3248222580,3479774868),E(3835390401,2666613458),E(4022224774,944711139),E(264347078,2341262773),E(604807628,2007800933),E(770255983,1495990901),E(1249150122,1856431235),E(1555081692,3175218132),E(1996064986,2198950837),E(2554220882,3999719339),E(2821834349,766784016),E(2952996808,2566594879),E(3210313671,3203337956),E(3336571891,1034457026),E(3584528711,2466948901),E(113926993,3758326383),E(338241895,168717936),E(666307205,1188179964),E(773529912,1546045734),E(1294757372,1522805485),E(1396182291,2643833823),E(1695183700,2343527390),E(1986661051,1014477480),E(2177026350,1206759142),E(2456956037,344077627),E(2730485921,1290863460),E(2820302411,3158454273),E(3259730800,3505952657),E(3345764771,106217008),E(3516065817,3606008344),E(3600352804,1432725776),E(4094571909,1467031594),E(275423344,851169720),E(430227734,3100823752),E(506948616,1363258195),E(659060556,3750685593),E(883997877,3785050280),E(958139571,3318307427),E(1322822218,3812723403),E(1537002063,2003034995),E(1747873779,3602036899),E(1955562222,1575990012),E(2024104815,1125592928),E(2227730452,2716904306),E(2361852424,442776044),E(2428436474,593698344),E(2756734187,3733110249),E(3204031479,2999351573),E(3329325298,3815920427),E(3391569614,3928383900),E(3515267271,566280711),E(3940187606,3454069534),E(4118630271,4000239992),E(116418474,1914138554),E(174292421,2731055270),E(289380356,3203993006),E(460393269,320620315),E(685471733,587496836),E(852142971,1086792851),E(1017036298,365543100),E(1126000580,2618297676),E(1288033470,3409855158),E(1501505948,4234509866),E(1607167915,987167468),E(1816402316,1246189591)],w=[];(function(){for(var M=0;M<80;M++)w[M]=E()})();var Q=v.SHA512=m.extend({_doReset:function(){this._hash=new x.init([new y.init(1779033703,4089235720),new y.init(3144134277,2227873595),new y.init(1013904242,4271175723),new y.init(2773480762,1595750129),new y.init(1359893119,2917565137),new y.init(2600822924,725511199),new y.init(528734635,4215389547),new y.init(1541459225,327033209)])},_doProcessBlock:function(M,B){for(var T=this._hash.words,D=T[0],F=T[1],L=T[2],R=T[3],k=T[4],U=T[5],V=T[6],H=T[7],q=D.high,ie=D.low,Z=F.high,oe=F.low,ne=L.high,se=L.low,ce=R.high,j=R.low,de=k.high,me=k.low,_e=U.high,Be=U.low,Qe=V.high,Ie=V.low,ve=H.high,K=H.low,W=q,te=ie,Y=Z,he=oe,fe=ne,Ce=se,Ee=ce,be=j,Re=de,Ne=me,Je=_e,ot=Be,nt=Qe,$e=Ie,ht=ve,ze=K,Ze=0;Ze<80;Ze++){var ct,We,Oe=w[Ze];if(Ze<16)We=Oe.high=M[B+Ze*2]|0,ct=Oe.low=M[B+Ze*2+1]|0;else{var Ye=w[Ze-15],rt=Ye.high,gt=Ye.low,Et=(rt>>>1|gt<<31)^(rt>>>8|gt<<24)^rt>>>7,yt=(gt>>>1|rt<<31)^(gt>>>8|rt<<24)^(gt>>>7|rt<<25),vt=w[Ze-2],Rt=vt.high,qt=vt.low,wt=(Rt>>>19|qt<<13)^(Rt<<3|qt>>>29)^Rt>>>6,Lt=(qt>>>19|Rt<<13)^(qt<<3|Rt>>>29)^(qt>>>6|Rt<<26),pi=w[Ze-7],Ut=pi.high,ri=pi.low,ni=w[Ze-16],kt=ni.high,qe=ni.low;ct=yt+ri,We=Et+Ut+(ct>>>0<yt>>>0?1:0),ct=ct+Lt,We=We+wt+(ct>>>0<Lt>>>0?1:0),ct=ct+qe,We=We+kt+(ct>>>0<qe>>>0?1:0),Oe.high=We,Oe.low=ct}var Fe=Re&Je^~Re&nt,it=Ne&ot^~Ne&$e,Ht=W&Y^W&fe^Y&fe,Jt=te&he^te&Ce^he&Ce,jt=(W>>>28|te<<4)^(W<<30|te>>>2)^(W<<25|te>>>7),or=(te>>>28|W<<4)^(te<<30|W>>>2)^(te<<25|W>>>7),Pr=(Re>>>14|Ne<<18)^(Re>>>18|Ne<<14)^(Re<<23|Ne>>>9),Mi=(Ne>>>14|Re<<18)^(Ne>>>18|Re<<14)^(Ne<<23|Re>>>9),Zi=I[Ze],lr=Zi.high,Gi=Zi.low,li=ze+Mi,di=ht+Pr+(li>>>0<ze>>>0?1:0),li=li+it,di=di+Fe+(li>>>0<it>>>0?1:0),li=li+Gi,di=di+lr+(li>>>0<Gi>>>0?1:0),li=li+ct,di=di+We+(li>>>0<ct>>>0?1:0),Ni=or+Jt,ki=jt+Ht+(Ni>>>0<or>>>0?1:0);ht=nt,ze=$e,nt=Je,$e=ot,Je=Re,ot=Ne,Ne=be+li|0,Re=Ee+di+(Ne>>>0<be>>>0?1:0)|0,Ee=fe,be=Ce,fe=Y,Ce=he,Y=W,he=te,te=li+Ni|0,W=di+ki+(te>>>0<li>>>0?1:0)|0}ie=D.low=ie+te,D.high=q+W+(ie>>>0<te>>>0?1:0),oe=F.low=oe+he,F.high=Z+Y+(oe>>>0<he>>>0?1:0),se=L.low=se+Ce,L.high=ne+fe+(se>>>0<Ce>>>0?1:0),j=R.low=j+be,R.high=ce+Ee+(j>>>0<be>>>0?1:0),me=k.low=me+Ne,k.high=de+Re+(me>>>0<Ne>>>0?1:0),Be=U.low=Be+ot,U.high=_e+Je+(Be>>>0<ot>>>0?1:0),Ie=V.low=Ie+$e,V.high=Qe+nt+(Ie>>>0<$e>>>0?1:0),K=H.low=K+ze,H.high=ve+ht+(K>>>0<ze>>>0?1:0)},_doFinalize:function(){var M=this._data,B=M.words,T=this._nDataBytes*8,D=M.sigBytes*8;B[D>>>5]|=128<<24-D%32,B[(D+128>>>10<<5)+30]=Math.floor(T/4294967296),B[(D+128>>>10<<5)+31]=T,M.sigBytes=B.length*4,this._process();var F=this._hash.toX32();return F},clone:function(){var M=m.clone.call(this);return M._hash=this._hash.clone(),M},blockSize:1024/32});A.SHA512=m._createHelper(Q),A.HmacSHA512=m._createHmacHelper(Q)}(),function(){var A=o,f=A.x64,m=f.Word,C=f.WordArray,y=A.algo,x=y.SHA512,v=y.SHA384=x.extend({_doReset:function(){this._hash=new C.init([new m.init(3418070365,3238371032),new m.init(1654270250,914150663),new m.init(2438529370,812702999),new m.init(355462360,4144912697),new m.init(1731405415,4290775857),new m.init(2394180231,1750603025),new m.init(3675008525,1694076839),new m.init(1203062813,3204075428)])},_doFinalize:function(){var E=x._doFinalize.call(this);return E.sigBytes-=16,E}});A.SHA384=x._createHelper(v),A.HmacSHA384=x._createHmacHelper(v)}(),function(A){var f=o,m=f.lib,C=m.WordArray,y=m.Hasher,x=f.x64,v=x.Word,E=f.algo,I=[],w=[],Q=[];(function(){for(var T=1,D=0,F=0;F<24;F++){I[T+5*D]=(F+1)*(F+2)/2%64;var L=D%5,R=(2*T+3*D)%5;T=L,D=R}for(var T=0;T<5;T++)for(var D=0;D<5;D++)w[T+5*D]=D+(2*T+3*D)%5*5;for(var k=1,U=0;U<24;U++){for(var V=0,H=0,q=0;q<7;q++){if(k&1){var ie=(1<<q)-1;ie<32?H^=1<<ie:V^=1<<ie-32}k&128?k=k<<1^113:k<<=1}Q[U]=v.create(V,H)}})();var M=[];(function(){for(var T=0;T<25;T++)M[T]=v.create()})();var B=E.SHA3=y.extend({cfg:y.cfg.extend({outputLength:512}),_doReset:function(){for(var T=this._state=[],D=0;D<25;D++)T[D]=new v.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(T,D){for(var F=this._state,L=this.blockSize/2,R=0;R<L;R++){var k=T[D+2*R],U=T[D+2*R+1];k=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360,U=(U<<8|U>>>24)&16711935|(U<<24|U>>>8)&4278255360;var V=F[R];V.high^=U,V.low^=k}for(var H=0;H<24;H++){for(var q=0;q<5;q++){for(var ie=0,Z=0,oe=0;oe<5;oe++){var V=F[q+5*oe];ie^=V.high,Z^=V.low}var ne=M[q];ne.high=ie,ne.low=Z}for(var q=0;q<5;q++)for(var se=M[(q+4)%5],ce=M[(q+1)%5],j=ce.high,de=ce.low,ie=se.high^(j<<1|de>>>31),Z=se.low^(de<<1|j>>>31),oe=0;oe<5;oe++){var V=F[q+5*oe];V.high^=ie,V.low^=Z}for(var me=1;me<25;me++){var ie,Z,V=F[me],_e=V.high,Be=V.low,Qe=I[me];Qe<32?(ie=_e<<Qe|Be>>>32-Qe,Z=Be<<Qe|_e>>>32-Qe):(ie=Be<<Qe-32|_e>>>64-Qe,Z=_e<<Qe-32|Be>>>64-Qe);var Ie=M[w[me]];Ie.high=ie,Ie.low=Z}var ve=M[0],K=F[0];ve.high=K.high,ve.low=K.low;for(var q=0;q<5;q++)for(var oe=0;oe<5;oe++){var me=q+5*oe,V=F[me],W=M[me],te=M[(q+1)%5+5*oe],Y=M[(q+2)%5+5*oe];V.high=W.high^~te.high&Y.high,V.low=W.low^~te.low&Y.low}var V=F[0],he=Q[H];V.high^=he.high,V.low^=he.low}},_doFinalize:function(){var T=this._data,D=T.words,F=this._nDataBytes*8,L=T.sigBytes*8,R=this.blockSize*32;D[L>>>5]|=1<<24-L%32,D[(A.ceil((L+1)/R)*R>>>5)-1]|=128,T.sigBytes=D.length*4,this._process();for(var k=this._state,U=this.cfg.outputLength/8,V=U/8,H=[],q=0;q<V;q++){var ie=k[q],Z=ie.high,oe=ie.low;Z=(Z<<8|Z>>>24)&16711935|(Z<<24|Z>>>8)&4278255360,oe=(oe<<8|oe>>>24)&16711935|(oe<<24|oe>>>8)&4278255360,H.push(oe),H.push(Z)}return new C.init(H,U)},clone:function(){for(var T=y.clone.call(this),D=T._state=this._state.slice(0),F=0;F<25;F++)D[F]=D[F].clone();return T}});f.SHA3=y._createHelper(B),f.HmacSHA3=y._createHmacHelper(B)}(Math);/** @preserve
    (c) 2012 by Cédric Mesnil. All rights reserved.
    Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
        - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
        - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    */(function(A){var f=o,m=f.lib,C=m.WordArray,y=m.Hasher,x=f.algo,v=C.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),E=C.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),I=C.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),w=C.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),Q=C.create([0,1518500249,1859775393,2400959708,2840853838]),M=C.create([1352829926,1548603684,1836072691,2053994217,0]),B=x.RIPEMD160=y.extend({_doReset:function(){this._hash=C.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(U,V){for(var H=0;H<16;H++){var q=V+H,ie=U[q];U[q]=(ie<<8|ie>>>24)&16711935|(ie<<24|ie>>>8)&4278255360}var Z=this._hash.words,oe=Q.words,ne=M.words,se=v.words,ce=E.words,j=I.words,de=w.words,me,_e,Be,Qe,Ie,ve,K,W,te,Y;ve=me=Z[0],K=_e=Z[1],W=Be=Z[2],te=Qe=Z[3],Y=Ie=Z[4];for(var he,H=0;H<80;H+=1)he=me+U[V+se[H]]|0,H<16?he+=T(_e,Be,Qe)+oe[0]:H<32?he+=D(_e,Be,Qe)+oe[1]:H<48?he+=F(_e,Be,Qe)+oe[2]:H<64?he+=L(_e,Be,Qe)+oe[3]:he+=R(_e,Be,Qe)+oe[4],he=he|0,he=k(he,j[H]),he=he+Ie|0,me=Ie,Ie=Qe,Qe=k(Be,10),Be=_e,_e=he,he=ve+U[V+ce[H]]|0,H<16?he+=R(K,W,te)+ne[0]:H<32?he+=L(K,W,te)+ne[1]:H<48?he+=F(K,W,te)+ne[2]:H<64?he+=D(K,W,te)+ne[3]:he+=T(K,W,te)+ne[4],he=he|0,he=k(he,de[H]),he=he+Y|0,ve=Y,Y=te,te=k(W,10),W=K,K=he;he=Z[1]+Be+te|0,Z[1]=Z[2]+Qe+Y|0,Z[2]=Z[3]+Ie+ve|0,Z[3]=Z[4]+me+K|0,Z[4]=Z[0]+_e+W|0,Z[0]=he},_doFinalize:function(){var U=this._data,V=U.words,H=this._nDataBytes*8,q=U.sigBytes*8;V[q>>>5]|=128<<24-q%32,V[(q+64>>>9<<4)+14]=(H<<8|H>>>24)&16711935|(H<<24|H>>>8)&4278255360,U.sigBytes=(V.length+1)*4,this._process();for(var ie=this._hash,Z=ie.words,oe=0;oe<5;oe++){var ne=Z[oe];Z[oe]=(ne<<8|ne>>>24)&16711935|(ne<<24|ne>>>8)&4278255360}return ie},clone:function(){var U=y.clone.call(this);return U._hash=this._hash.clone(),U}});function T(U,V,H){return U^V^H}function D(U,V,H){return U&V|~U&H}function F(U,V,H){return(U|~V)^H}function L(U,V,H){return U&H|V&~H}function R(U,V,H){return U^(V|~H)}function k(U,V){return U<<V|U>>>32-V}f.RIPEMD160=y._createHelper(B),f.HmacRIPEMD160=y._createHmacHelper(B)})(Math),function(){var A=o,f=A.lib,m=f.Base,C=A.enc,y=C.Utf8,x=A.algo,v=x.HMAC=m.extend({init:function(E,I){E=this._hasher=new E.init,typeof I=="string"&&(I=y.parse(I));var w=E.blockSize,Q=w*4;I.sigBytes>Q&&(I=E.finalize(I)),I.clamp();for(var M=this._oKey=I.clone(),B=this._iKey=I.clone(),T=M.words,D=B.words,F=0;F<w;F++)T[F]^=1549556828,D[F]^=909522486;M.sigBytes=B.sigBytes=Q,this.reset()},reset:function(){var E=this._hasher;E.reset(),E.update(this._iKey)},update:function(E){return this._hasher.update(E),this},finalize:function(E){var I=this._hasher,w=I.finalize(E);I.reset();var Q=I.finalize(this._oKey.clone().concat(w));return Q}})}(),function(){var A=o,f=A.lib,m=f.Base,C=f.WordArray,y=A.algo,x=y.SHA1,v=y.HMAC,E=y.PBKDF2=m.extend({cfg:m.extend({keySize:128/32,hasher:x,iterations:1}),init:function(I){this.cfg=this.cfg.extend(I)},compute:function(I,w){for(var Q=this.cfg,M=v.create(Q.hasher,I),B=C.create(),T=C.create([1]),D=B.words,F=T.words,L=Q.keySize,R=Q.iterations;D.length<L;){var k=M.update(w).finalize(T);M.reset();for(var U=k.words,V=U.length,H=k,q=1;q<R;q++){H=M.finalize(H),M.reset();for(var ie=H.words,Z=0;Z<V;Z++)U[Z]^=ie[Z]}B.concat(k),F[0]++}return B.sigBytes=L*4,B}});A.PBKDF2=function(I,w,Q){return E.create(Q).compute(I,w)}}(),function(){var A=o,f=A.lib,m=f.Base,C=f.WordArray,y=A.algo,x=y.MD5,v=y.EvpKDF=m.extend({cfg:m.extend({keySize:128/32,hasher:x,iterations:1}),init:function(E){this.cfg=this.cfg.extend(E)},compute:function(E,I){for(var w,Q=this.cfg,M=Q.hasher.create(),B=C.create(),T=B.words,D=Q.keySize,F=Q.iterations;T.length<D;){w&&M.update(w),w=M.update(E).finalize(I),M.reset();for(var L=1;L<F;L++)w=M.finalize(w),M.reset();B.concat(w)}return B.sigBytes=D*4,B}});A.EvpKDF=function(E,I,w){return v.create(w).compute(E,I)}}(),o.lib.Cipher||function(A){var f=o,m=f.lib,C=m.Base,y=m.WordArray,x=m.BufferedBlockAlgorithm,v=f.enc,E=v.Utf8,I=v.Base64,w=f.algo,Q=w.EvpKDF,M=m.Cipher=x.extend({cfg:C.extend(),createEncryptor:function(ne,se){return this.create(this._ENC_XFORM_MODE,ne,se)},createDecryptor:function(ne,se){return this.create(this._DEC_XFORM_MODE,ne,se)},init:function(ne,se,ce){this.cfg=this.cfg.extend(ce),this._xformMode=ne,this._key=se,this.reset()},reset:function(){x.reset.call(this),this._doReset()},process:function(ne){return this._append(ne),this._process()},finalize:function(ne){ne&&this._append(ne);var se=this._doFinalize();return se},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function ne(se){return typeof se=="string"?oe:q}return function(se){return{encrypt:function(ce,j,de){return ne(j).encrypt(se,ce,j,de)},decrypt:function(ce,j,de){return ne(j).decrypt(se,ce,j,de)}}}}()}),B=m.StreamCipher=M.extend({_doFinalize:function(){var ne=this._process(!0);return ne},blockSize:1}),T=f.mode={},D=m.BlockCipherMode=C.extend({createEncryptor:function(ne,se){return this.Encryptor.create(ne,se)},createDecryptor:function(ne,se){return this.Decryptor.create(ne,se)},init:function(ne,se){this._cipher=ne,this._iv=se}}),F=T.CBC=function(){var ne=D.extend();ne.Encryptor=ne.extend({processBlock:function(ce,j){var de=this._cipher,me=de.blockSize;se.call(this,ce,j,me),de.encryptBlock(ce,j),this._prevBlock=ce.slice(j,j+me)}}),ne.Decryptor=ne.extend({processBlock:function(ce,j){var de=this._cipher,me=de.blockSize,_e=ce.slice(j,j+me);de.decryptBlock(ce,j),se.call(this,ce,j,me),this._prevBlock=_e}});function se(ce,j,de){var me,_e=this._iv;_e?(me=_e,this._iv=A):me=this._prevBlock;for(var Be=0;Be<de;Be++)ce[j+Be]^=me[Be]}return ne}(),L=f.pad={},R=L.Pkcs7={pad:function(ne,se){for(var ce=se*4,j=ce-ne.sigBytes%ce,de=j<<24|j<<16|j<<8|j,me=[],_e=0;_e<j;_e+=4)me.push(de);var Be=y.create(me,j);ne.concat(Be)},unpad:function(ne){var se=ne.words[ne.sigBytes-1>>>2]&255;ne.sigBytes-=se}},k=m.BlockCipher=M.extend({cfg:M.cfg.extend({mode:F,padding:R}),reset:function(){var ne;M.reset.call(this);var se=this.cfg,ce=se.iv,j=se.mode;this._xformMode==this._ENC_XFORM_MODE?ne=j.createEncryptor:(ne=j.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==ne?this._mode.init(this,ce&&ce.words):(this._mode=ne.call(j,this,ce&&ce.words),this._mode.__creator=ne)},_doProcessBlock:function(ne,se){this._mode.processBlock(ne,se)},_doFinalize:function(){var ne,se=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(se.pad(this._data,this.blockSize),ne=this._process(!0)):(ne=this._process(!0),se.unpad(ne)),ne},blockSize:128/32}),U=m.CipherParams=C.extend({init:function(ne){this.mixIn(ne)},toString:function(ne){return(ne||this.formatter).stringify(this)}}),V=f.format={},H=V.OpenSSL={stringify:function(ne){var se,ce=ne.ciphertext,j=ne.salt;return j?se=y.create([1398893684,1701076831]).concat(j).concat(ce):se=ce,se.toString(I)},parse:function(ne){var se,ce=I.parse(ne),j=ce.words;return j[0]==1398893684&&j[1]==1701076831&&(se=y.create(j.slice(2,4)),j.splice(0,4),ce.sigBytes-=16),U.create({ciphertext:ce,salt:se})}},q=m.SerializableCipher=C.extend({cfg:C.extend({format:H}),encrypt:function(ne,se,ce,j){j=this.cfg.extend(j);var de=ne.createEncryptor(ce,j),me=de.finalize(se),_e=de.cfg;return U.create({ciphertext:me,key:ce,iv:_e.iv,algorithm:ne,mode:_e.mode,padding:_e.padding,blockSize:ne.blockSize,formatter:j.format})},decrypt:function(ne,se,ce,j){j=this.cfg.extend(j),se=this._parse(se,j.format);var de=ne.createDecryptor(ce,j).finalize(se.ciphertext);return de},_parse:function(ne,se){return typeof ne=="string"?se.parse(ne,this):ne}}),ie=f.kdf={},Z=ie.OpenSSL={execute:function(ne,se,ce,j){j||(j=y.random(64/8));var de=Q.create({keySize:se+ce}).compute(ne,j),me=y.create(de.words.slice(se),ce*4);return de.sigBytes=se*4,U.create({key:de,iv:me,salt:j})}},oe=m.PasswordBasedCipher=q.extend({cfg:q.cfg.extend({kdf:Z}),encrypt:function(ne,se,ce,j){j=this.cfg.extend(j);var de=j.kdf.execute(ce,ne.keySize,ne.ivSize);j.iv=de.iv;var me=q.encrypt.call(this,ne,se,de.key,j);return me.mixIn(de),me},decrypt:function(ne,se,ce,j){j=this.cfg.extend(j),se=this._parse(se,j.format);var de=j.kdf.execute(ce,ne.keySize,ne.ivSize,se.salt);j.iv=de.iv;var me=q.decrypt.call(this,ne,se,de.key,j);return me}})}(),o.mode.CFB=function(){var A=o.lib.BlockCipherMode.extend();A.Encryptor=A.extend({processBlock:function(m,C){var y=this._cipher,x=y.blockSize;f.call(this,m,C,x,y),this._prevBlock=m.slice(C,C+x)}}),A.Decryptor=A.extend({processBlock:function(m,C){var y=this._cipher,x=y.blockSize,v=m.slice(C,C+x);f.call(this,m,C,x,y),this._prevBlock=v}});function f(m,C,y,x){var v,E=this._iv;E?(v=E.slice(0),this._iv=void 0):v=this._prevBlock,x.encryptBlock(v,0);for(var I=0;I<y;I++)m[C+I]^=v[I]}return A}(),o.mode.CTR=function(){var A=o.lib.BlockCipherMode.extend(),f=A.Encryptor=A.extend({processBlock:function(m,C){var y=this._cipher,x=y.blockSize,v=this._iv,E=this._counter;v&&(E=this._counter=v.slice(0),this._iv=void 0);var I=E.slice(0);y.encryptBlock(I,0),E[x-1]=E[x-1]+1|0;for(var w=0;w<x;w++)m[C+w]^=I[w]}});return A.Decryptor=f,A}();/** @preserve
* Counter block mode compatible with  Dr Brian Gladman fileenc.c
* derived from CryptoJS.mode.CTR
* Jan Hruby jhruby.web@gmail.com
*/return o.mode.CTRGladman=function(){var A=o.lib.BlockCipherMode.extend();function f(y){if((y>>24&255)===255){var x=y>>16&255,v=y>>8&255,E=y&255;x===255?(x=0,v===255?(v=0,E===255?E=0:++E):++v):++x,y=0,y+=x<<16,y+=v<<8,y+=E}else y+=1<<24;return y}function m(y){return(y[0]=f(y[0]))===0&&(y[1]=f(y[1])),y}var C=A.Encryptor=A.extend({processBlock:function(y,x){var v=this._cipher,E=v.blockSize,I=this._iv,w=this._counter;I&&(w=this._counter=I.slice(0),this._iv=void 0),m(w);var Q=w.slice(0);v.encryptBlock(Q,0);for(var M=0;M<E;M++)y[x+M]^=Q[M]}});return A.Decryptor=C,A}(),o.mode.OFB=function(){var A=o.lib.BlockCipherMode.extend(),f=A.Encryptor=A.extend({processBlock:function(m,C){var y=this._cipher,x=y.blockSize,v=this._iv,E=this._keystream;v&&(E=this._keystream=v.slice(0),this._iv=void 0),y.encryptBlock(E,0);for(var I=0;I<x;I++)m[C+I]^=E[I]}});return A.Decryptor=f,A}(),o.mode.ECB=function(){var A=o.lib.BlockCipherMode.extend();return A.Encryptor=A.extend({processBlock:function(f,m){this._cipher.encryptBlock(f,m)}}),A.Decryptor=A.extend({processBlock:function(f,m){this._cipher.decryptBlock(f,m)}}),A}(),o.pad.AnsiX923={pad:function(A,f){var m=A.sigBytes,C=f*4,y=C-m%C,x=m+y-1;A.clamp(),A.words[x>>>2]|=y<<24-x%4*8,A.sigBytes+=y},unpad:function(A){var f=A.words[A.sigBytes-1>>>2]&255;A.sigBytes-=f}},o.pad.Iso10126={pad:function(A,f){var m=f*4,C=m-A.sigBytes%m;A.concat(o.lib.WordArray.random(C-1)).concat(o.lib.WordArray.create([C<<24],1))},unpad:function(A){var f=A.words[A.sigBytes-1>>>2]&255;A.sigBytes-=f}},o.pad.Iso97971={pad:function(A,f){A.concat(o.lib.WordArray.create([2147483648],1)),o.pad.ZeroPadding.pad(A,f)},unpad:function(A){o.pad.ZeroPadding.unpad(A),A.sigBytes--}},o.pad.ZeroPadding={pad:function(A,f){var m=f*4;A.clamp(),A.sigBytes+=m-(A.sigBytes%m||m)},unpad:function(A){for(var f=A.words,m=A.sigBytes-1,m=A.sigBytes-1;m>=0;m--)if(f[m>>>2]>>>24-m%4*8&255){A.sigBytes=m+1;break}}},o.pad.NoPadding={pad:function(){},unpad:function(){}},function(A){var f=o,m=f.lib,C=m.CipherParams,y=f.enc,x=y.Hex,v=f.format,E=v.Hex={stringify:function(I){return I.ciphertext.toString(x)},parse:function(I){var w=x.parse(I);return C.create({ciphertext:w})}}}(),function(){var A=o,f=A.lib,m=f.BlockCipher,C=A.algo,y=[],x=[],v=[],E=[],I=[],w=[],Q=[],M=[],B=[],T=[];(function(){for(var L=[],R=0;R<256;R++)R<128?L[R]=R<<1:L[R]=R<<1^283;for(var k=0,U=0,R=0;R<256;R++){var V=U^U<<1^U<<2^U<<3^U<<4;V=V>>>8^V&255^99,y[k]=V,x[V]=k;var H=L[k],q=L[H],ie=L[q],Z=L[V]*257^V*16843008;v[k]=Z<<24|Z>>>8,E[k]=Z<<16|Z>>>16,I[k]=Z<<8|Z>>>24,w[k]=Z;var Z=ie*16843009^q*65537^H*257^k*16843008;Q[V]=Z<<24|Z>>>8,M[V]=Z<<16|Z>>>16,B[V]=Z<<8|Z>>>24,T[V]=Z,k?(k=H^L[L[L[ie^H]]],U^=L[L[U]]):k=U=1}})();var D=[0,1,2,4,8,16,32,64,128,27,54],F=C.AES=m.extend({_doReset:function(){var L;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var R=this._keyPriorReset=this._key,k=R.words,U=R.sigBytes/4,V=this._nRounds=U+6,H=(V+1)*4,q=this._keySchedule=[],ie=0;ie<H;ie++)ie<U?q[ie]=k[ie]:(L=q[ie-1],ie%U?U>6&&ie%U==4&&(L=y[L>>>24]<<24|y[L>>>16&255]<<16|y[L>>>8&255]<<8|y[L&255]):(L=L<<8|L>>>24,L=y[L>>>24]<<24|y[L>>>16&255]<<16|y[L>>>8&255]<<8|y[L&255],L^=D[ie/U|0]<<24),q[ie]=q[ie-U]^L);for(var Z=this._invKeySchedule=[],oe=0;oe<H;oe++){var ie=H-oe;if(oe%4)var L=q[ie];else var L=q[ie-4];oe<4||ie<=4?Z[oe]=L:Z[oe]=Q[y[L>>>24]]^M[y[L>>>16&255]]^B[y[L>>>8&255]]^T[y[L&255]]}}},encryptBlock:function(L,R){this._doCryptBlock(L,R,this._keySchedule,v,E,I,w,y)},decryptBlock:function(L,R){var k=L[R+1];L[R+1]=L[R+3],L[R+3]=k,this._doCryptBlock(L,R,this._invKeySchedule,Q,M,B,T,x);var k=L[R+1];L[R+1]=L[R+3],L[R+3]=k},_doCryptBlock:function(L,R,k,U,V,H,q,ie){for(var Z=this._nRounds,oe=L[R]^k[0],ne=L[R+1]^k[1],se=L[R+2]^k[2],ce=L[R+3]^k[3],j=4,de=1;de<Z;de++){var me=U[oe>>>24]^V[ne>>>16&255]^H[se>>>8&255]^q[ce&255]^k[j++],_e=U[ne>>>24]^V[se>>>16&255]^H[ce>>>8&255]^q[oe&255]^k[j++],Be=U[se>>>24]^V[ce>>>16&255]^H[oe>>>8&255]^q[ne&255]^k[j++],Qe=U[ce>>>24]^V[oe>>>16&255]^H[ne>>>8&255]^q[se&255]^k[j++];oe=me,ne=_e,se=Be,ce=Qe}var me=(ie[oe>>>24]<<24|ie[ne>>>16&255]<<16|ie[se>>>8&255]<<8|ie[ce&255])^k[j++],_e=(ie[ne>>>24]<<24|ie[se>>>16&255]<<16|ie[ce>>>8&255]<<8|ie[oe&255])^k[j++],Be=(ie[se>>>24]<<24|ie[ce>>>16&255]<<16|ie[oe>>>8&255]<<8|ie[ne&255])^k[j++],Qe=(ie[ce>>>24]<<24|ie[oe>>>16&255]<<16|ie[ne>>>8&255]<<8|ie[se&255])^k[j++];L[R]=me,L[R+1]=_e,L[R+2]=Be,L[R+3]=Qe},keySize:256/32});A.AES=m._createHelper(F)}(),function(){var A=o,f=A.lib,m=f.WordArray,C=f.BlockCipher,y=A.algo,x=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],v=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],E=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],I=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],w=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],Q=y.DES=C.extend({_doReset:function(){for(var D=this._key,F=D.words,L=[],R=0;R<56;R++){var k=x[R]-1;L[R]=F[k>>>5]>>>31-k%32&1}for(var U=this._subKeys=[],V=0;V<16;V++){for(var H=U[V]=[],q=E[V],R=0;R<24;R++)H[R/6|0]|=L[(v[R]-1+q)%28]<<31-R%6,H[4+(R/6|0)]|=L[28+(v[R+24]-1+q)%28]<<31-R%6;H[0]=H[0]<<1|H[0]>>>31;for(var R=1;R<7;R++)H[R]=H[R]>>>(R-1)*4+3;H[7]=H[7]<<5|H[7]>>>27}for(var ie=this._invSubKeys=[],R=0;R<16;R++)ie[R]=U[15-R]},encryptBlock:function(D,F){this._doCryptBlock(D,F,this._subKeys)},decryptBlock:function(D,F){this._doCryptBlock(D,F,this._invSubKeys)},_doCryptBlock:function(D,F,L){this._lBlock=D[F],this._rBlock=D[F+1],M.call(this,4,252645135),M.call(this,16,65535),B.call(this,2,858993459),B.call(this,8,16711935),M.call(this,1,1431655765);for(var R=0;R<16;R++){for(var k=L[R],U=this._lBlock,V=this._rBlock,H=0,q=0;q<8;q++)H|=I[q][((V^k[q])&w[q])>>>0];this._lBlock=V,this._rBlock=U^H}var ie=this._lBlock;this._lBlock=this._rBlock,this._rBlock=ie,M.call(this,1,1431655765),B.call(this,8,16711935),B.call(this,2,858993459),M.call(this,16,65535),M.call(this,4,252645135),D[F]=this._lBlock,D[F+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function M(D,F){var L=(this._lBlock>>>D^this._rBlock)&F;this._rBlock^=L,this._lBlock^=L<<D}function B(D,F){var L=(this._rBlock>>>D^this._lBlock)&F;this._lBlock^=L,this._rBlock^=L<<D}A.DES=C._createHelper(Q);var T=y.TripleDES=C.extend({_doReset:function(){var D=this._key,F=D.words;if(F.length!==2&&F.length!==4&&F.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var L=F.slice(0,2),R=F.length<4?F.slice(0,2):F.slice(2,4),k=F.length<6?F.slice(0,2):F.slice(4,6);this._des1=Q.createEncryptor(m.create(L)),this._des2=Q.createEncryptor(m.create(R)),this._des3=Q.createEncryptor(m.create(k))},encryptBlock:function(D,F){this._des1.encryptBlock(D,F),this._des2.decryptBlock(D,F),this._des3.encryptBlock(D,F)},decryptBlock:function(D,F){this._des3.decryptBlock(D,F),this._des2.encryptBlock(D,F),this._des1.decryptBlock(D,F)},keySize:192/32,ivSize:64/32,blockSize:64/32});A.TripleDES=C._createHelper(T)}(),function(){var A=o,f=A.lib,m=f.StreamCipher,C=A.algo,y=C.RC4=m.extend({_doReset:function(){for(var E=this._key,I=E.words,w=E.sigBytes,Q=this._S=[],M=0;M<256;M++)Q[M]=M;for(var M=0,B=0;M<256;M++){var T=M%w,D=I[T>>>2]>>>24-T%4*8&255;B=(B+Q[M]+D)%256;var F=Q[M];Q[M]=Q[B],Q[B]=F}this._i=this._j=0},_doProcessBlock:function(E,I){E[I]^=x.call(this)},keySize:256/32,ivSize:0});function x(){for(var E=this._S,I=this._i,w=this._j,Q=0,M=0;M<4;M++){I=(I+1)%256,w=(w+E[I])%256;var B=E[I];E[I]=E[w],E[w]=B,Q|=E[(E[I]+E[w])%256]<<24-M*8}return this._i=I,this._j=w,Q}A.RC4=m._createHelper(y);var v=C.RC4Drop=y.extend({cfg:y.cfg.extend({drop:192}),_doReset:function(){y._doReset.call(this);for(var E=this.cfg.drop;E>0;E--)x.call(this)}});A.RC4Drop=m._createHelper(v)}(),function(){var A=o,f=A.lib,m=f.StreamCipher,C=A.algo,y=[],x=[],v=[],E=C.Rabbit=m.extend({_doReset:function(){for(var w=this._key.words,Q=this.cfg.iv,M=0;M<4;M++)w[M]=(w[M]<<8|w[M]>>>24)&16711935|(w[M]<<24|w[M]>>>8)&4278255360;var B=this._X=[w[0],w[3]<<16|w[2]>>>16,w[1],w[0]<<16|w[3]>>>16,w[2],w[1]<<16|w[0]>>>16,w[3],w[2]<<16|w[1]>>>16],T=this._C=[w[2]<<16|w[2]>>>16,w[0]&4294901760|w[1]&65535,w[3]<<16|w[3]>>>16,w[1]&4294901760|w[2]&65535,w[0]<<16|w[0]>>>16,w[2]&4294901760|w[3]&65535,w[1]<<16|w[1]>>>16,w[3]&4294901760|w[0]&65535];this._b=0;for(var M=0;M<4;M++)I.call(this);for(var M=0;M<8;M++)T[M]^=B[M+4&7];if(Q){var D=Q.words,F=D[0],L=D[1],R=(F<<8|F>>>24)&16711935|(F<<24|F>>>8)&4278255360,k=(L<<8|L>>>24)&16711935|(L<<24|L>>>8)&4278255360,U=R>>>16|k&4294901760,V=k<<16|R&65535;T[0]^=R,T[1]^=U,T[2]^=k,T[3]^=V,T[4]^=R,T[5]^=U,T[6]^=k,T[7]^=V;for(var M=0;M<4;M++)I.call(this)}},_doProcessBlock:function(w,Q){var M=this._X;I.call(this),y[0]=M[0]^M[5]>>>16^M[3]<<16,y[1]=M[2]^M[7]>>>16^M[5]<<16,y[2]=M[4]^M[1]>>>16^M[7]<<16,y[3]=M[6]^M[3]>>>16^M[1]<<16;for(var B=0;B<4;B++)y[B]=(y[B]<<8|y[B]>>>24)&16711935|(y[B]<<24|y[B]>>>8)&4278255360,w[Q+B]^=y[B]},blockSize:128/32,ivSize:64/32});function I(){for(var w=this._X,Q=this._C,M=0;M<8;M++)x[M]=Q[M];Q[0]=Q[0]+1295307597+this._b|0,Q[1]=Q[1]+3545052371+(Q[0]>>>0<x[0]>>>0?1:0)|0,Q[2]=Q[2]+886263092+(Q[1]>>>0<x[1]>>>0?1:0)|0,Q[3]=Q[3]+1295307597+(Q[2]>>>0<x[2]>>>0?1:0)|0,Q[4]=Q[4]+3545052371+(Q[3]>>>0<x[3]>>>0?1:0)|0,Q[5]=Q[5]+886263092+(Q[4]>>>0<x[4]>>>0?1:0)|0,Q[6]=Q[6]+1295307597+(Q[5]>>>0<x[5]>>>0?1:0)|0,Q[7]=Q[7]+3545052371+(Q[6]>>>0<x[6]>>>0?1:0)|0,this._b=Q[7]>>>0<x[7]>>>0?1:0;for(var M=0;M<8;M++){var B=w[M]+Q[M],T=B&65535,D=B>>>16,F=((T*T>>>17)+T*D>>>15)+D*D,L=((B&4294901760)*B|0)+((B&65535)*B|0);v[M]=F^L}w[0]=v[0]+(v[7]<<16|v[7]>>>16)+(v[6]<<16|v[6]>>>16)|0,w[1]=v[1]+(v[0]<<8|v[0]>>>24)+v[7]|0,w[2]=v[2]+(v[1]<<16|v[1]>>>16)+(v[0]<<16|v[0]>>>16)|0,w[3]=v[3]+(v[2]<<8|v[2]>>>24)+v[1]|0,w[4]=v[4]+(v[3]<<16|v[3]>>>16)+(v[2]<<16|v[2]>>>16)|0,w[5]=v[5]+(v[4]<<8|v[4]>>>24)+v[3]|0,w[6]=v[6]+(v[5]<<16|v[5]>>>16)+(v[4]<<16|v[4]>>>16)|0,w[7]=v[7]+(v[6]<<8|v[6]>>>24)+v[5]|0}A.Rabbit=m._createHelper(E)}(),function(){var A=o,f=A.lib,m=f.StreamCipher,C=A.algo,y=[],x=[],v=[],E=C.RabbitLegacy=m.extend({_doReset:function(){var w=this._key.words,Q=this.cfg.iv,M=this._X=[w[0],w[3]<<16|w[2]>>>16,w[1],w[0]<<16|w[3]>>>16,w[2],w[1]<<16|w[0]>>>16,w[3],w[2]<<16|w[1]>>>16],B=this._C=[w[2]<<16|w[2]>>>16,w[0]&4294901760|w[1]&65535,w[3]<<16|w[3]>>>16,w[1]&4294901760|w[2]&65535,w[0]<<16|w[0]>>>16,w[2]&4294901760|w[3]&65535,w[1]<<16|w[1]>>>16,w[3]&4294901760|w[0]&65535];this._b=0;for(var T=0;T<4;T++)I.call(this);for(var T=0;T<8;T++)B[T]^=M[T+4&7];if(Q){var D=Q.words,F=D[0],L=D[1],R=(F<<8|F>>>24)&16711935|(F<<24|F>>>8)&4278255360,k=(L<<8|L>>>24)&16711935|(L<<24|L>>>8)&4278255360,U=R>>>16|k&4294901760,V=k<<16|R&65535;B[0]^=R,B[1]^=U,B[2]^=k,B[3]^=V,B[4]^=R,B[5]^=U,B[6]^=k,B[7]^=V;for(var T=0;T<4;T++)I.call(this)}},_doProcessBlock:function(w,Q){var M=this._X;I.call(this),y[0]=M[0]^M[5]>>>16^M[3]<<16,y[1]=M[2]^M[7]>>>16^M[5]<<16,y[2]=M[4]^M[1]>>>16^M[7]<<16,y[3]=M[6]^M[3]>>>16^M[1]<<16;for(var B=0;B<4;B++)y[B]=(y[B]<<8|y[B]>>>24)&16711935|(y[B]<<24|y[B]>>>8)&4278255360,w[Q+B]^=y[B]},blockSize:128/32,ivSize:64/32});function I(){for(var w=this._X,Q=this._C,M=0;M<8;M++)x[M]=Q[M];Q[0]=Q[0]+1295307597+this._b|0,Q[1]=Q[1]+3545052371+(Q[0]>>>0<x[0]>>>0?1:0)|0,Q[2]=Q[2]+886263092+(Q[1]>>>0<x[1]>>>0?1:0)|0,Q[3]=Q[3]+1295307597+(Q[2]>>>0<x[2]>>>0?1:0)|0,Q[4]=Q[4]+3545052371+(Q[3]>>>0<x[3]>>>0?1:0)|0,Q[5]=Q[5]+886263092+(Q[4]>>>0<x[4]>>>0?1:0)|0,Q[6]=Q[6]+1295307597+(Q[5]>>>0<x[5]>>>0?1:0)|0,Q[7]=Q[7]+3545052371+(Q[6]>>>0<x[6]>>>0?1:0)|0,this._b=Q[7]>>>0<x[7]>>>0?1:0;for(var M=0;M<8;M++){var B=w[M]+Q[M],T=B&65535,D=B>>>16,F=((T*T>>>17)+T*D>>>15)+D*D,L=((B&4294901760)*B|0)+((B&65535)*B|0);v[M]=F^L}w[0]=v[0]+(v[7]<<16|v[7]>>>16)+(v[6]<<16|v[6]>>>16)|0,w[1]=v[1]+(v[0]<<8|v[0]>>>24)+v[7]|0,w[2]=v[2]+(v[1]<<16|v[1]>>>16)+(v[0]<<16|v[0]>>>16)|0,w[3]=v[3]+(v[2]<<8|v[2]>>>24)+v[1]|0,w[4]=v[4]+(v[3]<<16|v[3]>>>16)+(v[2]<<16|v[2]>>>16)|0,w[5]=v[5]+(v[4]<<8|v[4]>>>24)+v[3]|0,w[6]=v[6]+(v[5]<<16|v[5]>>>16)+(v[4]<<16|v[4]>>>16)|0,w[7]=v[7]+(v[6]<<8|v[6]>>>24)+v[5]|0}A.RabbitLegacy=m._createHelper(E)}(),o});var oD=uat.CryptoJS,cat={};(function(o,A){o.FlowEcharts=A(kb,o.Geoworld)})(cat,function(o,A){return function(f){var m={};function C(y){if(m[y])return m[y].exports;var x=m[y]={i:y,l:!1,exports:{}};return f[y].call(x.exports,x,x.exports,C),x.l=!0,x.exports}return C.m=f,C.c=m,C.d=function(y,x,v){C.o(y,x)||Object.defineProperty(y,x,{enumerable:!0,get:v})},C.r=function(y){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(y,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(y,"__esModule",{value:!0})},C.t=function(y,x){if(x&1&&(y=C(y)),x&8||x&4&&typeof y=="object"&&y&&y.__esModule)return y;var v=Object.create(null);if(C.r(v),Object.defineProperty(v,"default",{enumerable:!0,value:y}),x&2&&typeof y!="string")for(var E in y)C.d(v,E,function(I){return y[I]}.bind(null,E));return v},C.n=function(y){var x=y&&y.__esModule?function(){return y.default}:function(){return y};return C.d(x,"a",x),x},C.o=function(y,x){return Object.prototype.hasOwnProperty.call(y,x)},C.p="",C(C.s=0)}([function(f,m,C){C(1);var y=C(7);f.exports=y},function(f,m,C){var y;y=function(x){return C(2).registerCoordinateSystem("GLMap",C(3)),C(5),C(6),C(2).registerAction({type:"GLMapRoam",event:"GLMapRoam",update:"updateLayout"},function(v,E){}),{version:"1.0.0"}}.call(m,C,m,f),y!==void 0&&(f.exports=y)},function(f,m){f.exports=o},function(f,m,C){var y;y=function(x){var v=C(2);function E(I,w){this._GLMap=I,this.dimensions=["lng","lat"],this._mapOffset=[0,0],this._api=w}return E.prototype.dimensions=["lng","lat"],E.prototype.setMapOffset=function(I){this._mapOffset=I},E.prototype.getBMap=function(){return this._GLMap},E.prototype.dataToPoint=function(I){var w=je.toRadians(80),Q=[99999,99999],M=ee.fromDegrees(I[0],I[1]);if(!M)return Q;var B=this._GLMap.cartesianToCanvasCoordinates(M);if(!B)return Q;var T=this._GLMap;return T.mode===xi.SCENE3D&&ee.angleBetween(T.camera.position,M)>w?!1:[B.x-this._mapOffset[0],B.y-this._mapOffset[1]]},E.prototype.pointToData=function(Q){var w=this._mapOffset,Q=this._bmap.project([Q[0]+w[0],Q[1]+w[1]]);return[Q.lng,Q.lat]},E.prototype.getViewRect=function(){var I=this._api;return new v.graphic.BoundingRect(0,0,I.getWidth(),I.getHeight())},E.prototype.getRoamTransform=function(){return v.matrix.create()},E.dimensions=E.prototype.dimensions,E.create=function(I,w){var Q;I.eachComponent("GLMap",function(M){var B=w.getZr().painter.getViewportRoot(),T=v.glMap;Q=new E(T,w),Q.setMapOffset(M.__mapOffset||[0,0]),M.coordinateSystem=Q}),I.eachSeries(function(M){M.get("coordinateSystem")==="GLMap"&&(M.coordinateSystem=Q)})},E}.call(m,C,m,f),y!==void 0&&(f.exports=y)},function(f,m){f.exports=A},function(f,m,C){var y;y=function(x){return C(2).extendComponentModel({type:"GLMap",getBMap:function(){return this.__GLMap},defaultOption:{roam:!1}})}.call(m,C,m,f),y!==void 0&&(f.exports=y)},function(f,m,C){var y;y=function(x){return C(2).extendComponentView({type:"GLMap",init:function(v,E){this.api=E,kb.glMap.postRender.addEventListener(this.moveHandler,this)},moveHandler:function(){this.api.dispatchAction({type:"GLMapRoam"})},render:function(v,E,I){},dispose:function(v,E){kb.glMap.postRender.removeEventListener(this.moveHandler,this)}})}.call(m,C,m,f),y!==void 0&&(f.exports=y)},function(f,m){function C(y,x){this._mapContainer=y,this._overlay=this._createChartOverlay(),this._overlay.setOption(x)}C.prototype._createChartOverlay=function(){var y=this._mapContainer.scene;y.canvas.setAttribute("tabIndex",0);var x=document.createElement("div");return x.style.position="absolute",x.style.top="0px",x.style.left="0px",x.style.width=y.canvas.width+"px",x.style.height=y.canvas.height+"px",x.style.pointerEvents="none",x.setAttribute("id","echarts"),x.setAttribute("class","echartMap"),this._mapContainer.container.appendChild(x),this._echartsContainer=x,kb.glMap=y,kb.init(x)},C.prototype.dispose=function(){this._echartsContainer&&(this._mapContainer.container.removeChild(this._echartsContainer),this._echartsContainer=null),this._overlay&&(this._overlay.dispose(),this._overlay=null)},C.prototype.destroy=function(){this.dispose()},C.prototype.updateOverlay=function(y){this._overlay&&this._overlay.setOption(y)},C.prototype.getMap=function(){return this._mapContainer},C.prototype.getOverlay=function(){return this._overlay},f.exports=C}])});var cae=cat.FlowEcharts,Nze=["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"],kze=["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","audio","canvas","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","video","view","vkern"],Oze=["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"],Uze=["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmuliscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mpspace","msqrt","mystyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"],Gze=["#text"],Hze=["accept","action","align","alt","autocomplete","background","bgcolor","border","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","coords","crossorigin","datetime","default","dir","disabled","download","enctype","face","for","headers","height","hidden","high","href","hreflang","id","integrity","ismap","label","lang","list","loop","low","max","maxlength","media","method","min","multiple","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","type","usemap","valign","value","width","xmlns"],Vge=["accent-height","accumulate","additivive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"],Vze=["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"],M$=["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"];function zh(o,A){for(var f=A.length;f--;)typeof A[f]=="string"&&(A[f]=A[f].toLowerCase()),o[A[f]]=!0;return o}function zze(o){var A={},f=void 0;for(f in o)Object.prototype.hasOwnProperty.call(o,f)&&(A[f]=o[f]);return A}var ubi=/\{\{[\s\S]*|[\s\S]*\}\}/gm,cbi=/<%[\s\S]*|[\s\S]*%>/gm,Abi=/^data-[\-\w.\u00B7-\uFFFF]/,hbi=/^aria-[\-\w]+$/,dbi=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,fbi=/^(?:\w+script|data):/i,gbi=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,P$=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o};function tD(o){if(Array.isArray(o)){for(var A=0,f=Array(o.length);A<o.length;A++)f[A]=o[A];return f}else return Array.from(o)}var pbi=function(){return typeof window>"u"?null:window};function Aat(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:pbi(),A=function(Lt){return Aat(Lt)};if(A.version="1.0.8",A.removed=[],!o||!o.document||o.document.nodeType!==9)return A.isSupported=!1,A;var f=o.document,m=!1,C=!1,y=o.document,x=o.DocumentFragment,v=o.HTMLTemplateElement,E=o.Node,I=o.NodeFilter,w=o.NamedNodeMap,Q=w===void 0?o.NamedNodeMap||o.MozNamedAttrMap:w,M=o.Text,B=o.Comment,T=o.DOMParser;if(typeof v=="function"){var D=y.createElement("template");D.content&&D.content.ownerDocument&&(y=D.content.ownerDocument)}var F=y,L=F.implementation,R=F.createNodeIterator,k=F.getElementsByTagName,U=F.createDocumentFragment,V=f.importNode,H={};A.isSupported=L&&typeof L.createHTMLDocument<"u"&&y.documentMode!==9;var q=ubi,ie=cbi,Z=Abi,oe=hbi,ne=fbi,se=gbi,ce=dbi,j=null,de=zh({},[].concat(tD(Nze),tD(kze),tD(Oze),tD(Uze),tD(Gze))),me=null,_e=zh({},[].concat(tD(Hze),tD(Vge),tD(Vze),tD(M$))),Be=null,Qe=null,Ie=!0,ve=!0,K=!1,W=!1,te=!1,Y=!1,he=!1,fe=!1,Ce=!1,Ee=!1,be=!1,Re=!0,Ne=!0,Je=!1,ot={},nt=zh({},["audio","head","math","script","style","template","svg","video"]),$e=zh({},["audio","video","img","source","image"]),ht=zh({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),ze=null,Ze=y.createElement("form"),ct=function(Lt){(typeof Lt>"u"?"undefined":P$(Lt))!=="object"&&(Lt={}),j="ALLOWED_TAGS"in Lt?zh({},Lt.ALLOWED_TAGS):de,me="ALLOWED_ATTR"in Lt?zh({},Lt.ALLOWED_ATTR):_e,Be="FORBID_TAGS"in Lt?zh({},Lt.FORBID_TAGS):{},Qe="FORBID_ATTR"in Lt?zh({},Lt.FORBID_ATTR):{},ot="USE_PROFILES"in Lt?Lt.USE_PROFILES:!1,Ie=Lt.ALLOW_ARIA_ATTR!==!1,ve=Lt.ALLOW_DATA_ATTR!==!1,K=Lt.ALLOW_UNKNOWN_PROTOCOLS||!1,W=Lt.SAFE_FOR_JQUERY||!1,te=Lt.SAFE_FOR_TEMPLATES||!1,Y=Lt.WHOLE_DOCUMENT||!1,Ce=Lt.RETURN_DOM||!1,Ee=Lt.RETURN_DOM_FRAGMENT||!1,be=Lt.RETURN_DOM_IMPORT||!1,fe=Lt.FORCE_BODY||!1,Re=Lt.SANITIZE_DOM!==!1,Ne=Lt.KEEP_CONTENT!==!1,Je=Lt.IN_PLACE||!1,ce=Lt.ALLOWED_URI_REGEXP||ce,te&&(ve=!1),Ee&&(Ce=!0),ot&&(j=zh({},[].concat(tD(Gze))),me=[],ot.html===!0&&(zh(j,Nze),zh(me,Hze)),ot.svg===!0&&(zh(j,kze),zh(me,Vge),zh(me,M$)),ot.svgFilters===!0&&(zh(j,Oze),zh(me,Vge),zh(me,M$)),ot.mathMl===!0&&(zh(j,Uze),zh(me,Vze),zh(me,M$))),Lt.ADD_TAGS&&(j===de&&(j=zze(j)),zh(j,Lt.ADD_TAGS)),Lt.ADD_ATTR&&(me===_e&&(me=zze(me)),zh(me,Lt.ADD_ATTR)),Lt.ADD_URI_SAFE_ATTR&&zh(ht,Lt.ADD_URI_SAFE_ATTR),Ne&&(j["#text"]=!0),Y&&zh(j,["html","head","body"]),j.table&&zh(j,["tbody"]),Object&&"freeze"in Object&&Object.freeze(Lt),ze=Lt},We=function(Lt){A.removed.push({element:Lt});try{Lt.parentNode.removeChild(Lt)}catch{Lt.outerHTML=""}},Oe=function(Lt,pi){try{A.removed.push({attribute:pi.getAttributeNode(Lt),from:pi})}catch{A.removed.push({attribute:null,from:pi})}pi.removeAttribute(Lt)},Ye=function(Lt){var pi=void 0,Ut=void 0;if(fe)Lt="<remove></remove>"+Lt;else{var ri=Lt.match(/^[\s]+/);Ut=ri&&ri[0],Ut&&(Lt=Lt.slice(Ut.length))}if(m)try{pi=new T().parseFromString(Lt,"text/html")}catch{}if(C&&zh(Be,["title"]),!pi||!pi.documentElement){pi=L.createHTMLDocument("");var ni=pi,kt=ni.body;kt.parentNode.removeChild(kt.parentNode.firstElementChild),kt.outerHTML=Lt}return Ut&&pi.body.insertBefore(y.createTextNode(Ut),pi.body.childNodes[0]||null),k.call(pi,Y?"html":"body")[0]};A.isSupported&&(function(){try{var Lt=Ye('<svg><p><style><img src="</style><img src=x onerror=alert(1)//">');Lt.querySelector("svg img")&&(m=!0)}catch{}}(),function(){try{var Lt=Ye("<x/><title>&lt;/title&gt;&lt;img&gt;");Lt.querySelector("title").textContent.match(/<\/title/)&&(C=!0)}catch{}}());var rt=function(Lt){return R.call(Lt.ownerDocument||Lt,Lt,I.SHOW_ELEMENT|I.SHOW_COMMENT|I.SHOW_TEXT,function(){return I.FILTER_ACCEPT},!1)},gt=function(Lt){return Lt instanceof M||Lt instanceof B?!1:typeof Lt.nodeName!="string"||typeof Lt.textContent!="string"||typeof Lt.removeChild!="function"||!(Lt.attributes instanceof Q)||typeof Lt.removeAttribute!="function"||typeof Lt.setAttribute!="function"},Et=function(Lt){return(typeof E>"u"?"undefined":P$(E))==="object"?Lt instanceof E:Lt&&(typeof Lt>"u"?"undefined":P$(Lt))==="object"&&typeof Lt.nodeType=="number"&&typeof Lt.nodeName=="string"},yt=function(Lt,pi,Ut){!H[Lt]||H[Lt].forEach(function(ri){ri.call(A,pi,Ut,ze)})},vt=function(Lt){var pi=void 0;if(yt("beforeSanitizeElements",Lt,null),gt(Lt))return We(Lt),!0;var Ut=Lt.nodeName.toLowerCase();if(yt("uponSanitizeElement",Lt,{tagName:Ut,allowedTags:j}),!j[Ut]||Be[Ut]){if(Ne&&!nt[Ut]&&typeof Lt.insertAdjacentHTML=="function")try{Lt.insertAdjacentHTML("AfterEnd",Lt.innerHTML)}catch{}return We(Lt),!0}return W&&!Lt.firstElementChild&&(!Lt.content||!Lt.content.firstElementChild)&&/</g.test(Lt.textContent)&&(A.removed.push({element:Lt.cloneNode()}),Lt.innerHTML?Lt.innerHTML=Lt.innerHTML.replace(/</g,"&lt;"):Lt.innerHTML=Lt.textContent.replace(/</g,"&lt;")),te&&Lt.nodeType===3&&(pi=Lt.textContent,pi=pi.replace(q," "),pi=pi.replace(ie," "),Lt.textContent!==pi&&(A.removed.push({element:Lt.cloneNode()}),Lt.textContent=pi)),yt("afterSanitizeElements",Lt,null),!1},Rt=function(Lt,pi,Ut){return!(Re&&(pi==="id"||pi==="name")&&(Ut in y||Ut in Ze)||(te&&(Ut=Ut.replace(q," "),Ut=Ut.replace(ie," ")),!(ve&&Z.test(pi))&&!(Ie&&oe.test(pi))&&(!me[pi]||Qe[pi]||!ht[pi]&&!ce.test(Ut.replace(se,""))&&!((pi==="src"||pi==="xlink:href")&&Lt!=="script"&&Ut.indexOf("data:")===0&&$e[Lt])&&!(K&&!ne.test(Ut.replace(se,"")))&&Ut)))},qt=function(Lt){var pi=void 0,Ut=void 0,ri=void 0,ni=void 0,kt=void 0;yt("beforeSanitizeAttributes",Lt,null);var qe=Lt.attributes;if(qe){var Fe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:me};for(kt=qe.length;kt--;){pi=qe[kt];var it=pi,Ht=it.name,Jt=it.namespaceURI;if(Ut=pi.value.trim(),ri=Ht.toLowerCase(),Fe.attrName=ri,Fe.attrValue=Ut,Fe.keepAttr=!0,yt("uponSanitizeAttribute",Lt,Fe),Ut=Fe.attrValue,ri==="name"&&Lt.nodeName==="IMG"&&qe.id)ni=qe.id,qe=Array.prototype.slice.apply(qe),Oe("id",Lt),Oe(Ht,Lt),qe.indexOf(ni)>kt&&Lt.setAttribute("id",ni.value);else{if(Lt.nodeName==="INPUT"&&ri==="type"&&Ut==="file"&&(me[ri]||!Qe[ri]))continue;Ht==="id"&&Lt.setAttribute(Ht,""),Oe(Ht,Lt)}if(Fe.keepAttr){var jt=Lt.nodeName.toLowerCase();if(Rt(jt,ri,Ut))try{Jt?Lt.setAttributeNS(Jt,Ht,Ut):Lt.setAttribute(Ht,Ut),A.removed.pop()}catch{}}}yt("afterSanitizeAttributes",Lt,null)}},wt=function Lt(pi){var Ut=void 0,ri=rt(pi);for(yt("beforeSanitizeShadowDOM",pi,null);Ut=ri.nextNode();)yt("uponSanitizeShadowNode",Ut,null),!vt(Ut)&&(Ut.content instanceof x&&Lt(Ut.content),qt(Ut));yt("afterSanitizeShadowDOM",pi,null)};return A.sanitize=function(Lt,pi){var Ut=void 0,ri=void 0,ni=void 0,kt=void 0,qe=void 0;if(Lt||(Lt="<!-->"),typeof Lt!="string"&&!Et(Lt)){if(typeof Lt.toString!="function")throw new TypeError("toString is not a function");if(Lt=Lt.toString(),typeof Lt!="string")throw new TypeError("dirty is not a string, aborting")}if(!A.isSupported){if(P$(o.toStaticHTML)==="object"||typeof o.toStaticHTML=="function"){if(typeof Lt=="string")return o.toStaticHTML(Lt);if(Et(Lt))return o.toStaticHTML(Lt.outerHTML)}return Lt}if(he||ct(pi),A.removed=[],!Je)if(Lt instanceof E)Ut=Ye("<!-->"),ri=Ut.ownerDocument.importNode(Lt,!0),ri.nodeType===1&&ri.nodeName==="BODY"?Ut=ri:Ut.appendChild(ri);else{if(!Ce&&!Y&&Lt.indexOf("<")===-1)return Lt;if(Ut=Ye(Lt),!Ut)return Ce?null:""}Ut&&fe&&We(Ut.firstChild);for(var Fe=rt(Je?Lt:Ut);ni=Fe.nextNode();)ni.nodeType===3&&ni===kt||vt(ni)||(ni.content instanceof x&&wt(ni.content),qt(ni),kt=ni);if(Je)return Lt;if(Ce){if(Ee)for(qe=U.call(Ut.ownerDocument);Ut.firstChild;)qe.appendChild(Ut.firstChild);else qe=Ut;return be&&(qe=V.call(f,qe,!0)),qe}return Y?Ut.outerHTML:Ut.innerHTML},A.setConfig=function(Lt){ct(Lt),he=!0},A.clearConfig=function(){ze=null,he=!1},A.isValidAttribute=function(Lt,pi,Ut){ze||ct({});var ri=Lt.toLowerCase(),ni=pi.toLowerCase();return Rt(ri,ni,Ut)},A.addHook=function(Lt,pi){typeof pi=="function"&&(H[Lt]=H[Lt]||[],H[Lt].push(pi))},A.removeHook=function(Lt){H[Lt]&&H[Lt].pop()},A.removeHooks=function(Lt){H[Lt]&&(H[Lt]=[])},A.removeAllHooks=function(){H={}},A}var mbi=Aat(),hat=mbi,dat=`uniform sampler2D u_floatTexture;
        }`})}function UBi(o,A,f,m,C,y,x){let v=kBi(A,f,y,x);o.spotMaterial=v,m.preUpdate.addEventListener(function(){let E=m.camera.viewMatrix,I=new Xe;Xe.multiply(E,C,I),Xe.toArray(I,iie),v&&(v.uniforms.u_spotmodelViewMatrix=iie)})}function GBi(o,A,f,m,C,y,x,v){let E=Rot(A,f,y,x,v);o.customShader=E,m.preUpdate.addEventListener(function(){let I=m.camera.viewMatrix,w=new Xe;Xe.multiply(I,C,w),E.setUniform("u_spotmodelViewMatrix",w)})}function HBi(o,A,f,m,C,y,x){let v=Rot(A,f,y,x);o.customShader=v,m.preUpdate.addEventListener(function(){let E=m.camera.viewMatrix,I=new Xe;Xe.multiply(E,C,I),v.setUniform("u_spotmodelViewMatrix",I)})}function Zoe(o,A={},f=[]){!O(o)||(this._viewer=o,this._texture=void 0,!(!O(A)&&!(O(A.globe)&&O(A.tileset)&&O(A.gltf)))&&this.initialize(o,A,f))}Zoe.prototype.reSet=function(o={},A=[]){this._texture&&(this._texture.destroy(),this._texture=void 0),this.initialize(this._viewer,o,A)};Zoe.prototype.destroy=function(o){!O(o)&&!(O(o.globe)&&O(o.tileset)&&O(o.gltf))||(O(o.globe)&&o.globe.spotMaterial&&(o.globe.spotMaterial=void 0),O(o.tileset)&&o.tileset.customShader&&(o.tileset.customShader=null),O(o.gltf)&&o.gltf.customShader&&(o.gltf.customShader=null),this._texture&&(this._texture.destroy(),this._texture=void 0))};Zoe.prototype.initialize=function(o,A,f){if(!O(A)&&!(O(A.globe)&&O(A.tileset)&&O(A.gltf)))return;let m=Ae(A.globeBrightness,.2),C=Ae(A.gltfBrightness,.2),y=Ae(A.tilesetBrightness,.2),x=Ae(A.gltfLightModel,rI.PBR),v=Ae(A.tilesetLightModel,rI.PBR);if(!Array.isArray(f)||f.length===0)return;let E=o.scene,I=zn.eastNorthUpToFixedFrame(f[0].position),w=new Xe;Xe.inverseTransformation(I,w);let Q=[],M=new ee;for(let D=0;D<f.length;D++){let F=f[D];Xe.multiplyByPoint(w,F.position,M),Q.push(M.x,M.y,M.z),Q.push(F.direction.x,F.direction.y,F.direction.z),Q.push(F.spotColor.red,F.spotColor.green,F.spotColor.blue),Q.push(F.distance,Math.cos(F.cutOff/180*3.1415),Math.cos(F.outerCutOff/180*3.1415))}let B=!1,T=NBi(Q,E.context,B);this._texture=T,A.globe&&UBi(A.globe,T,Q,E,I,B,m),A.tileset&&GBi(A.tileset,T,Q,E,I,B,y,v),A.gltf&&HBi(A.gltf,T,Q,E,I,B,C,x)};var Lot=Zoe,Fot=/{[^}]+}/g,Not={x:YBi,y:WBi,z:XBi,s:ZBi,reverseX:JBi,reverseY:jBi,reverseZ:qBi,westDegrees:$Bi,southDegrees:e1i,eastDegrees:t1i,northDegrees:i1i,westProjected:r1i,southProjected:n1i,eastProjected:o1i,northProjected:a1i,width:s1i,height:l1i},VBi=ia(Not,{i:u1i,j:c1i,reverseI:A1i,reverseJ:h1i,longitudeDegrees:f1i,latitudeDegrees:g1i,longitudeProjected:p1i,latitudeProjected:m1i,format:y1i});function _O(o){this._errorEvent=new Event,this._resource=void 0,this._urlSchemeZeroPadding=void 0,this._pickFeaturesResource=void 0,this._tileWidth=void 0,this._tileHeight=void 0,this._maximumLevel=void 0,this._minimumLevel=void 0,this._tilingScheme=void 0,this._rectangle=void 0,this._tileDiscardPolicy=void 0,this._credit=void 0,this._hasAlphaChannel=void 0,this._readyPromise=void 0,this._tags=void 0,this._pickFeaturesTags=void 0,this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0,this.enablePickFeatures=!0,this.reinitialize(o)}Object.defineProperties(_O.prototype,{url:{get:function(){return this._resource.url}},urlSchemeZeroPadding:{get:function(){return this._urlSchemeZeroPadding}},pickFeaturesUrl:{get:function(){return this._pickFeaturesResource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return this._minimumLevel}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return O(this._resource)}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return this._hasAlphaChannel}}});_O.prototype.reinitialize=function(o){let A=this;A._readyPromise=Promise.resolve(o).then(function(f){let m=f.customTags,C=ia(Not,m),y=ia(VBi,m),x=An.createIfNeeded(f.url),v=An.createIfNeeded(f.pickFeaturesUrl);A.enablePickFeatures=Ae(f.enablePickFeatures,A.enablePickFeatures),A._urlSchemeZeroPadding=Ae(f.urlSchemeZeroPadding,A.urlSchemeZeroPadding),A._tileDiscardPolicy=f.tileDiscardPolicy,A._getFeatureInfoFormats=f.getFeatureInfoFormats,A._subdomains=f.subdomains,Array.isArray(A._subdomains)?A._subdomains=A._subdomains.slice():O(A._subdomains)&&A._subdomains.length>0?A._subdomains=A._subdomains.split(""):A._subdomains=["a","b","c"],A._tileWidth=Ae(f.tileWidth,256),A._tileHeight=Ae(f.tileHeight,256),A._minimumLevel=Ae(f.minimumLevel,0),A._maximumLevel=f.maximumLevel,A._tilingScheme=Ae(f.tilingScheme,new Am({ellipsoid:f.ellipsoid})),A._rectangle=Ae(f.rectangle,A._tilingScheme.rectangle),A._rectangle=Si.intersection(A._rectangle,A._tilingScheme.rectangle),A._hasAlphaChannel=Ae(f.hasAlphaChannel,!0);let E=f.credit;return typeof E=="string"&&(E=new tl(E)),A._credit=E,A._resource=x,A._tags=C,A._pickFeaturesResource=v,A._pickFeaturesTags=y,!0})};_O.prototype.getTileCredits=function(o,A,f){};_O.prototype.requestImage=function(o,A,f,m){let C=zBi(this,o,A,f,m),y=a2.loadImage(this,C);return typeof this.loadtitle=="function"&&this.loadtitle(C),y};_O.prototype.loadtitle=function(o){};_O.prototype.pickFeatures=function(o,A,f,m,C){if(!this.enablePickFeatures||!O(this._pickFeaturesResource)||this._getFeatureInfoFormats.length===0)return;let y=0,x=this;function v(I,w){return I.callback(w)}function E(){if(y>=x._getFeatureInfoFormats.length)return Promise.resolve([]);let I=x._getFeatureInfoFormats[y],w=KBi(x,o,A,f,m,C,I.format);return++y,I.type==="json"?w.fetchJson().then(I.callback).otherwise(E):I.type==="xml"?w.fetchXML().then(I.callback).otherwise(E):I.type==="text"||I.type==="html"?w.fetchText().then(I.callback).otherwise(E):w.fetch({responseType:I.format}).then(v.bind(void 0,I)).otherwise(E)}return E()};var rie=!1,D_=new Si,nie=!1,ZJ=new Si;function zBi(o,A,f,m,C){rie=!1,nie=!1;let y=o._resource,x=y.getUrlComponent(!0),v=o._tags,E={},I=x.match(Fot);return O(I)&&I.forEach(function(w){let Q=w.substring(1,w.length-1);O(v[Q])&&(E[Q]=v[Q](o,A,f,m))}),y.getDerivedResource({request:C,templateValues:E})}var pme=!1,F8=new Bt,mme=!1;function KBi(o,A,f,m,C,y,x){rie=!1,nie=!1,pme=!1,mme=!1;let v=o._pickFeaturesResource,E=v.getUrlComponent(!0),I=o._pickFeaturesTags,w={},Q=E.match(Fot);return O(Q)&&Q.forEach(function(M){let B=M.substring(1,M.length-1);O(I[B])&&(w[B]=I[B](o,A,f,m,C,y,x))}),v.getDerivedResource({templateValues:w})}function uH(o,A,f){if(o&&o.urlSchemeZeroPadding&&o.urlSchemeZeroPadding.hasOwnProperty(A)){let m=o.urlSchemeZeroPadding[A];if(typeof m=="string"){let C=m.length;C>1&&(f=f.length>=C?f:new Array(C-f.toString().length+1).join("0")+f)}}return f}function YBi(o,A,f,m){return uH(o,"{x}",A)}function JBi(o,A,f,m){let C=o.tilingScheme.getNumberOfXTilesAtLevel(m)-A-1;return uH(o,"{reverseX}",C)}function WBi(o,A,f,m){return uH(o,"{y}",f)}function jBi(o,A,f,m){let C=o.tilingScheme.getNumberOfYTilesAtLevel(m)-f-1;return uH(o,"{reverseY}",C)}function qBi(o,A,f,m){let C=o.maximumLevel,y=O(C)&&m<C?C-m-1:m;return uH(o,"{reverseZ}",y)}function XBi(o,A,f,m){return uH(o,"{z}",m)}function ZBi(o,A,f,m){let C=(A+f+m)%o._subdomains.length;return o._subdomains[C]}function $oe(o,A,f,m){rie||(o.tilingScheme.tileXYToRectangle(A,f,m,D_),D_.west=je.toDegrees(D_.west),D_.south=je.toDegrees(D_.south),D_.east=je.toDegrees(D_.east),D_.north=je.toDegrees(D_.north),rie=!0)}function $Bi(o,A,f,m){return $oe(o,A,f,m),D_.west}function e1i(o,A,f,m){return $oe(o,A,f,m),D_.south}function t1i(o,A,f,m){return $oe(o,A,f,m),D_.east}function i1i(o,A,f,m){return $oe(o,A,f,m),D_.north}function eae(o,A,f,m){nie||(o.tilingScheme.tileXYToNativeRectangle(A,f,m,ZJ),nie=!0)}function r1i(o,A,f,m){return eae(o,A,f,m),ZJ.west}function n1i(o,A,f,m){return eae(o,A,f,m),ZJ.south}function o1i(o,A,f,m){return eae(o,A,f,m),ZJ.east}function a1i(o,A,f,m){return eae(o,A,f,m),ZJ.north}function s1i(o,A,f,m){return o.tileWidth}function l1i(o,A,f,m){return o.tileHeight}function u1i(o,A,f,m,C,y,x){return tae(o,A,f,m,C,y),F8.x}function c1i(o,A,f,m,C,y,x){return tae(o,A,f,m,C,y),F8.y}function A1i(o,A,f,m,C,y,x){return tae(o,A,f,m,C,y),o.tileWidth-F8.x-1}function h1i(o,A,f,m,C,y,x){return tae(o,A,f,m,C,y),o.tileHeight-F8.y-1}var d1i=new Si,ZG=new ee;function tae(o,A,f,m,C,y,x){if(pme)return;ZQe(o,A,f,m,C,y);let v=ZG,E=o.tilingScheme.tileXYToNativeRectangle(A,f,m,d1i);F8.x=o.tileWidth*(v.x-E.west)/E.width|0,F8.y=o.tileHeight*(E.north-v.y)/E.height|0,pme=!0}function f1i(o,A,f,m,C,y,x){return je.toDegrees(C)}function g1i(o,A,f,m,C,y,x){return je.toDegrees(y)}function p1i(o,A,f,m,C,y,x){return ZQe(o,A,f,m,C,y),ZG.x}function m1i(o,A,f,m,C,y,x){return ZQe(o,A,f,m,C,y),ZG.y}var C1i=new Kt;function ZQe(o,A,f,m,C,y,x){if(!mme){if(o.tilingScheme.projection instanceof Dg)ZG.x=je.toDegrees(C),ZG.y=je.toDegrees(y);else{let v=C1i;v.longitude=C,v.latitude=y,o.tilingScheme.projection.project(v,ZG)}mme=!0}}function y1i(o,A,f,m,C,y,x){return x}var kot=_O;function JF(o){this._definitionChanged=new br,this.baseWaterColor=Ae(o.baseWaterColor,new At(.2,.3,.6,.5)),this.waterFrequency=Ae(o.waterFrequency,1e3),this.animationSpeed=Ae(o.animationSpeed,.01),this.amplitude=Ae(o.amplitude,10),this._translucnet=Ae(o.translucent,!0),this._time=new Date().getTime()}Object.defineProperties(JF.prototype,{isConstant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}}});JF.prototype.getType=function(o){return as.WaterType};JF.prototype.getValue=function(o,A){return O(A)||(A={}),A.normalMap=xs("Assets/Images/waterNormals.jpg"),A.baseWaterColor=this.baseWaterColor,A.frequency=this.waterFrequency,A.animationSpeed=this.animationSpeed,A.amplitude=this.amplitude,A};JF.prototype.update=function(){let o=fi.now();return this.getValue(o)};JF.prototype.isTranslucent=function(){return this._translucnet};JF.prototype.equals=function(o){return this===o||o instanceof JF&&Nt.equals(this.baseWaterColor,o.baseWaterColor)};var Oot=JF,Uot=`uniform sampler2D u_floatTexture;
void main()
{
float actual = texture2D(u_floatTexture, vec2(0.5, 0.5)).r;
float expected = 123456.0;
gl_FragColor = vec4(abs(actual - expected), 0.0, 0.0, 1.0);
}
`,gSe=`uniform sampler2D u_noiseTexture;
`,$Qe=`uniform sampler2D u_noiseTexture;
uniform vec3 u_noiseTextureDimensions;
uniform float u_noiseDetail;
varying vec2 v_offset;
@@ -14264,7 +14251,7 @@
#endif
#endif
}
`,pSe=`#ifdef INSTANCED
`,eSe=`#ifdef INSTANCED
attribute vec2 direction;
#endif
attribute vec4 positionHighAndScaleX;
@@ -14304,7 +14291,7 @@
v_slice = slice;
v_brightness = brightness;
}
`,mSe=`uniform vec3 u_noiseTextureDimensions;
`,tSe=`uniform vec3 u_noiseTextureDimensions;
uniform float u_noiseDetail;
uniform vec3 u_noiseOffset;
varying vec2 v_position;
@@ -14380,7 +14367,7 @@
float worley2 = clamp(worleyFBMNoise(position, 3.0, 3.0), 0.0, 1.0);
gl_FragColor = vec4(worley0, worley1, worley2, 1.0);
}
`,CSe=`uniform vec3 u_noiseTextureDimensions;
`,iSe=`uniform vec3 u_noiseTextureDimensions;
attribute vec2 position;
varying vec2 v_position;
void main()
@@ -14395,7 +14382,7 @@
transformedPos.y *= noiseTextureRows;
v_position = transformedPos;
}
`,fat=`uniform float u_radiusTS;
`,Got=`uniform float u_radiusTS;
varying vec2 v_textureCoordinates;
vec2 rotate(vec2 p, vec2 direction)
{
@@ -14427,7 +14414,7 @@
color += clamp(burst, vec4(0.0), vec4(1.0)) * 0.15;
gl_FragColor = clamp(color, vec4(0.0), vec4(1.0));
}
`,ySe=`varying vec2 v_textureCoordinates;
`,rSe=`varying vec2 v_textureCoordinates;
void main()
{
czm_materialInput materialInput;
@@ -14438,7 +14425,20 @@
czm_material material = czm_getMaterial(materialInput);
gl_FragColor = vec4(material.diffuse + material.emission, material.alpha);
}
`;function Cbi(){this.canExecute=void 0,this.beforeExecute=void 0,this.afterExecute=void 0,Ui.throwInstantiationError()}var gat=Cbi,xSe={};xSe.createCheckbox=function(o,A,f){let m=document.createElement("div"),C=document.createElement("label"),y=document.createElement("input");y.type="checkbox";let x=`checked: ${A}`;return O(f)&&(x+=`, enable: ${f}`),y.setAttribute("data-bind",x),C.appendChild(y),C.appendChild(document.createTextNode(o)),m.appendChild(C),m};xSe.createSection=function(o,A,f,m){let C=document.createElement("div");C.className="cesium-cesiumInspector-section",C.setAttribute("data-bind",`css: { "cesium-cesiumInspector-section-collapsed": !${f} }`),o.appendChild(C);let y=document.createElement("h3");y.className="cesium-cesiumInspector-sectionHeader",y.appendChild(document.createTextNode(A)),y.setAttribute("data-bind",`click: ${m}`),C.appendChild(y);let x=document.createElement("div");return x.className="cesium-cesiumInspector-sectionContent",C.appendChild(x),x};var z8=xSe;function TP(){this._flattenPolygons=[],this._needUpdateFlatten=!1,this._updateFlattenInternal=!1,this._defautTexture=void 0,this._flattenBounds=new ai,this._polygonDepth=void 0,this._matMW=Xe.IDENTITY,this._flattenOriginPoint=void 0}Object.defineProperties(TP.prototype,{needUpdateFlatten:{get:function(){return this._needUpdateFlatten},set:function(o){this._needUpdateFlatten=o}},flattenPolygons:{get:function(){return this._flattenPolygons},set:function(o){!O(o)||!O(o.length)?this._flattenPolygons=[]:this._flattenPolygons=o,this._updateFlattenInternal=!0}},localViewMatrix:{get:function(){return this._matMW},set:function(o){this._matMW=o}}});TP.prototype.initailize=function(o){if(this._flattenPolygons.length>0){O(this._polygonDepth)||(this._polygonDepth=new b8),this._polygonDepth._flattenPolygonDrawCommands=[];let A={position:0},f=new Xe;Xe.inverse(this._matMW,f);let m=new Kr,C=[];for(let y=0;y<this._flattenPolygons.length;y++){let x=o.context,v=this._flattenPolygons[y],E=eh.createGeometry(v),I=E.attributes.position.values;for(let F=0;F<I.length/3;F++){let L=new ee(0,0,0);L.x=I[3*F],L.y=I[3*F+1],L.z=I[3*F+2],Xe.multiplyByPoint(f,L,L),C.push(L),E.attributes.position.values[3*F]=L.x,E.attributes.position.values[3*F+1]=L.y,E.attributes.position.values[3*F+2]=L.z}let w=wi.transform(E.boundingSphere,f);E.boundingSphere=w;let Q=Hc.fromGeometry({context:x,geometry:E,attributeLocations:A,bufferUsage:ln.STATIC_DRAW,interleave:!0}),M=_s.fromCache({context:x,vertexShaderSource:Dne,fragmentShaderSource:Sne}),B=new fn;B.depthTest.enabled=!0,B.cull.enabled=!0,B.cull.face=Ii.BACK;let T={},D=new On({boundingVolume:w,modelMatrix:new Xe,primitiveType:yn.TRIANGLES,vertexArray:Q,shaderProgram:M,uniformMap:T,renderState:B,pass:hr.GLOBE});this._polygonDepth._flattenPolygonDrawCommands.push(D)}Kr.fromPoints(C,m),this._flattenBounds.x=m.x,this._flattenBounds.y=m.y+m.height,this._flattenBounds.z=m.x+m.width,this._flattenBounds.w=m.y,this._polygonDepth.updateFrustum(this._flattenBounds.x,this._flattenBounds.y,this._flattenBounds.z,this._flattenBounds.w)}};TP.prototype.addFlattenPolygon=function(o){this._flattenPolygons.push(o),this._updateFlattenInternal=!0,this._needUpdateFlatten=!0};TP.prototype.removeFlattenPolygon=function(o){for(let A=0;A<this._flattenPolygons.length;A++)if(this._flattenPolygons[A]===o){this._flattenPolygons.splice(A,1),this._updateFlattenInternal=!0,O(this._polygonDepth)||(this._polygonDepth=new b8),this._polygonDepth.destroy(),this._polygonDepth=void 0;break}};TP.prototype.clearFlattenPolygon=function(){O(this._polygonDepth)&&(this._polygonDepth._flattenPolygonDrawCommands=[],this._polygonDepth.destroy(),this._polygonDepth=void 0),this._flattenPolygons=[],this._needUpdateFlatten=!1,this._updateFlattenInternal=!1};TP.prototype.update=function(o,A,f){this._frameState=o,O(this._defautTexture)||(this._defautTexture=new yo({context:this._frameState.context,width:2,height:2})),this._needUpdateFlatten===!0&&O(this._flattenPolygons)&&this._flattenPolygons.length>0&&(this._updateFlattenInternal===!0&&(O(this._polygonDepth)?(this._polygonDepth.destroy(),this._polygonDepth=void 0,this.initailize(o)):this.initailize(o)),O(this._polygonDepth)&&this._polygonDepth.update(o),this._updateFlattenInternal=!1)};TP.getShader=function(o){};TP.prototype.getUniformMap=function(){let o=this,A={};return A.u_polygonTexture=function(){return O(o._polygonDepth)?o._polygonDepth._colorTexture:o._defautTexture},A.u_polygonBounds=function(){return o._flattenBounds},A.u_bFlatten=function(){return!!(o._needUpdateFlatten===!0&&O(o._polygonDepth))},A.u_eastNorthUpToFixedFrame=function(){return o.localViewMatrix},A.u_r_eastNorthUpToFixedFrame=function(){let f=new Xe;return Xe.inverse(o.localViewMatrix,f),f},A};var ybi=TP,vSe=ybi;function cH(o){this._scene=o,this._flattenPolygons=[],this._polygonTexture=new vSe,this._clipPlaneOfFlatten=!1}Object.defineProperties(cH.prototype,{clipPlaneOfFlatten:{get:function(){return this._clipPlaneOfFlatten},set:function(o){this._clipPlaneOfFlatten=o}}});cH.prototype.addPolygon=function(o){this._flattenPolygons.push(o)};cH.prototype.clearPolygon=function(){this._flattenPolygons=[];let o=this._polygonTexture,A=this._scene,f={flattenBounds:[],flattenPolygons:[],flattenPolygonHeights:[]};A.globe.flattenPolygonRegion=f,A.globe.flattenUniforms=void 0,o.clearFlattenPolygon()};cH.prototype.generatePolygonTexture=function(){let o=this._scene,A=this._polygonTexture,f=this._flattenPolygons;if(f.length<1)return;for(let v=0;v<f.length;v++){let E=f[v],I=[];for(let Q=0;Q<E.length;Q+=3){let M=E[Q],B=E[Q+1],T=E[Q+2];I.push(M,B,T)}let w=eh.fromPositions({positions:ee.fromDegreesArrayHeights(I),extrudedHeight:0,perPositionHeight:!0});A.addFlattenPolygon(w)}let m=f[0][0],C=f[0][1],y=new ee.fromDegrees(m,C,-2e3),x=zn.eastNorthUpToFixedFrame(y);A.localViewMatrix=x,A.update(o._frameState)};cH.prototype.update=function(){let o=this._scene,A=this._polygonTexture,f=this._flattenPolygons;if(f.length<1)return;this.generatePolygonTexture();let m={flattenBounds:[],flattenPolygons:[],flattenPolygonHeights:[],enableFlatten:!1},C=-100;for(let v=0;v<f.length;v++){let E=f[v],I=new Kr,w=[],Q=[],M=0,B=0;for(let D=0;D<E.length/3;D++){let F=E[3*D],L=E[3*D+1],R=new ee(F,L,0);w.push(R),Q.push([je.toRadians(F),je.toRadians(L)]),M=Math.max(E[3*D+2],M),B=Math.min(E[3*D+2],B),C=Math.min(C,B)}Kr.fromPoints(w,I);let T=new ai(I.x,I.y+I.height,I.x+I.width,I.y);m.flattenBounds.push(T),m.flattenPolygons.push(Q),m.flattenPolygonHeights.push({maxHeight:M+2,minHeight:B-2}),m.enableFlatten=!0}o.globe.flattenPolygonRegion=m;let y=A.getUniformMap();y.u_minFlattenHeight=function(){return C};let x=this;y.u_clipPlaneOfFlatten=function(){return x.clipPlaneOfFlatten},o.globe.flattenUniforms=y,o.requestRender()};var vN=cH,pat={};(function(o,A){A(o.JSEncrypt={})})(pat,function(o){"use strict";var A="0123456789abcdefghijklmnopqrstuvwxyz";function f(We){return A.charAt(We)}function m(We,Oe){return We&Oe}function C(We,Oe){return We|Oe}function y(We,Oe){return We^Oe}function x(We,Oe){return We&~Oe}function v(We){if(We==0)return-1;var Oe=0;return(65535&We)==0&&(We>>=16,Oe+=16),(255&We)==0&&(We>>=8,Oe+=8),(15&We)==0&&(We>>=4,Oe+=4),(3&We)==0&&(We>>=2,Oe+=2),(1&We)==0&&++Oe,Oe}function E(We){for(var Oe=0;We!=0;)We&=We-1,++Oe;return Oe}var I="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",w="=";function Q(We){var Oe,Ye,rt="";for(Oe=0;Oe+3<=We.length;Oe+=3)Ye=parseInt(We.substring(Oe,Oe+3),16),rt+=I.charAt(Ye>>6)+I.charAt(63&Ye);for(Oe+1==We.length?(Ye=parseInt(We.substring(Oe,Oe+1),16),rt+=I.charAt(Ye<<2)):Oe+2==We.length&&(Ye=parseInt(We.substring(Oe,Oe+2),16),rt+=I.charAt(Ye>>2)+I.charAt((3&Ye)<<4));(3&rt.length)>0;)rt+=w;return rt}var M,B=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(We,Oe){We.__proto__=Oe}||function(We,Oe){for(var Ye in Oe)Oe.hasOwnProperty(Ye)&&(We[Ye]=Oe[Ye])},T,D=function(We){var Oe;if(M===void 0){var Ye="0123456789ABCDEF",rt=` \f
`,x1i=At.WHITE,v1i=At.BLACK,E1i=new Bt(2,2);function N8(o){o=Ae(o,Ae.EMPTY_OBJECT),this._definitionChanged=new br,this._evenColor=void 0,this._evenColorSubscription=void 0,this._oddColor=void 0,this._oddColorSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.evenColor=o.evenColor,this.oddColor=o.oddColor,this.repeat=o.repeat}Object.defineProperties(N8.prototype,{isConstant:{get:function(){return Nt.isConstant(this._evenColor)&&Nt.isConstant(this._oddColor)&&Nt.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},evenColor:Bi("evenColor"),oddColor:Bi("oddColor"),repeat:Bi("repeat")});N8.prototype.getType=function(o){return"Checkerboard"};N8.prototype.getValue=function(o,A){return O(A)||(A={}),A.lightColor=Nt.getValueOrClonedDefault(this._evenColor,o,x1i,A.lightColor),A.darkColor=Nt.getValueOrClonedDefault(this._oddColor,o,v1i,A.darkColor),A.repeat=Nt.getValueOrDefault(this._repeat,o,E1i),A};N8.prototype.equals=function(o){return this===o||o instanceof N8&&Nt.equals(this._evenColor,o._evenColor)&&Nt.equals(this._oddColor,o._oddColor)&&Nt.equals(this._repeat,o._repeat)};var oie=N8,aie={id:void 0},$G=new Array(2);function Cme(o){let A=o.propertyNames,f=A.length;for(let m=0;m<f;m++)o[A[m]]=void 0;o._name=void 0,o._availability=void 0}function Hot(o,A,f,m){$G[0]=f,$G[1]=m.id,A[JSON.stringify($G)]=m.definitionChanged.addEventListener(Sg.prototype._onDefinitionChanged,o)}function Vot(o,A,f,m){$G[0]=f,$G[1]=m.id;let C=JSON.stringify($G);A[C](),A[C]=void 0}function yN(o){if(o._shouldRecomposite=!0,o._suspendCount!==0)return;let A=o._collections,f=A.length,m=o._collectionsCopy,C=m.length,y,x,v,E,I,w=o._composite,Q=new iw(o),M=o._eventHash,B;for(y=0;y<C;y++)for(I=m[y],I.collectionChanged.removeEventListener(Sg.prototype._onCollectionChanged,o),v=I.values,B=I.id,E=v.length-1;E>-1;E--)x=v[E],Vot(o,M,B,x);for(y=f-1;y>=0;y--)for(I=A[y],I.collectionChanged.addEventListener(Sg.prototype._onCollectionChanged,o),v=I.values,B=I.id,E=v.length-1;E>-1;E--){x=v[E],Hot(o,M,B,x);let D=Q.getById(x.id);O(D)||(D=w.getById(x.id),O(D)?Cme(D):(aie.id=x.id,D=new kA(aie)),Q.add(D)),D.merge(x)}o._collectionsCopy=A.slice(0),w.suspendEvents(),w.removeAll();let T=Q.values;for(y=0;y<T.length;y++)w.add(T[y]);w.resumeEvents()}function Sg(o,A){this._owner=A,this._composite=new iw(this),this._suspendCount=0,this._collections=O(o)?o.slice():[],this._collectionsCopy=[],this._id=Vu(),this._eventHash={},yN(this),this._shouldRecomposite=!1}Object.defineProperties(Sg.prototype,{collectionChanged:{get:function(){return this._composite._collectionChanged}},id:{get:function(){return this._id}},values:{get:function(){return this._composite.values}},owner:{get:function(){return this._owner}}});Sg.prototype.addCollection=function(o,A){O(A)?this._collections.splice(A,0,o):(A=this._collections.length,this._collections.push(o)),yN(this)};Sg.prototype.removeCollection=function(o){let A=this._collections.indexOf(o);return A!==-1?(this._collections.splice(A,1),yN(this),!0):!1};Sg.prototype.removeAllCollections=function(){this._collections.length=0,yN(this)};Sg.prototype.containsCollection=function(o){return this._collections.indexOf(o)!==-1};Sg.prototype.contains=function(o){return this._composite.contains(o)};Sg.prototype.indexOfCollection=function(o){return this._collections.indexOf(o)};Sg.prototype.getCollection=function(o){return this._collections[o]};Sg.prototype.getCollectionsLength=function(){return this._collections.length};function iae(o,A){return o.indexOf(A)}function zot(o,A,f){let m=o._collections;if(A=je.clamp(A,0,m.length-1),f=je.clamp(f,0,m.length-1),A===f)return;let C=m[A];m[A]=m[f],m[f]=C,yN(o)}Sg.prototype.raiseCollection=function(o){let A=iae(this._collections,o);zot(this,A,A+1)};Sg.prototype.lowerCollection=function(o){let A=iae(this._collections,o);zot(this,A,A-1)};Sg.prototype.raiseCollectionToTop=function(o){let A=iae(this._collections,o);A!==this._collections.length-1&&(this._collections.splice(A,1),this._collections.push(o),yN(this))};Sg.prototype.lowerCollectionToBottom=function(o){let A=iae(this._collections,o);A!==0&&(this._collections.splice(A,1),this._collections.splice(0,0,o),yN(this))};Sg.prototype.suspendEvents=function(){this._suspendCount++,this._composite.suspendEvents()};Sg.prototype.resumeEvents=function(){this._suspendCount--,this._shouldRecomposite&&this._suspendCount===0&&(yN(this),this._shouldRecomposite=!1),this._composite.resumeEvents()};Sg.prototype.computeAvailability=function(){return this._composite.computeAvailability()};Sg.prototype.getById=function(o){return this._composite.getById(o)};Sg.prototype._onCollectionChanged=function(o,A,f){let m=this._collectionsCopy,C=m.length,y=this._composite;y.suspendEvents();let x,v,E,I,w=f.length,Q=this._eventHash,M=o.id;for(x=0;x<w;x++){let T=f[x];Vot(this,Q,M,T);let D=T.id;for(v=C-1;v>=0;v--)E=m[v].getById(D),O(E)&&(O(I)||(I=y.getById(D),Cme(I)),I.merge(E));O(I)||y.removeById(D),I=void 0}let B=A.length;for(x=0;x<B;x++){let T=A[x];Hot(this,Q,M,T);let D=T.id;for(v=C-1;v>=0;v--)E=m[v].getById(D),O(E)&&(O(I)||(I=y.getById(D),O(I)?Cme(I):(aie.id=D,I=new kA(aie),y.add(I))),I.merge(E));I=void 0}y.resumeEvents()};Sg.prototype._onDefinitionChanged=function(o,A,f,m){let C=this._collections,y=this._composite,x=C.length,v=o.id,E=y.getById(v),I=E[A],w=!O(I),Q=!0;for(let M=x-1;M>=0;M--){let B=C[M].getById(o.id);if(O(B)){let T=B[A];if(O(T)){if(Q)if(Q=!1,O(T.merge)&&O(T.clone))I=T.clone(I);else{I=T;break}I.merge(T)}}}w&&E.propertyNames.indexOf(A)===-1&&E.addProperty(A),E[A]=I};var Kot=Sg;function WF(){this._definitionChanged=new br,this._composite=new P1,this._composite.definitionChanged.addEventListener(WF.prototype._raiseDefinitionChanged,this)}Object.defineProperties(WF.prototype,{isConstant:{get:function(){return this._composite.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._composite._intervals}}});WF.prototype.getType=function(o){let A=this._composite._intervals.findDataForIntervalContainingDate(o);if(O(A))return A.getType(o)};WF.prototype.getValue=function(o,A){let f=this._composite._intervals.findDataForIntervalContainingDate(o);if(O(f))return f.getValue(o,A)};WF.prototype.equals=function(o){return this===o||o instanceof WF&&this._composite.equals(o._composite,Nt.equals)};WF.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var sie=WF,I1i=je.factorial;function nSe(o,A,f,m,C,y){let x=0,v,E,I;if(m>0){for(E=0;E<C;E++){for(v=!1,I=0;I<y.length&&!v;I++)E===y[I]&&(v=!0);v||(y.push(E),x+=nSe(o,A,f,m-1,C,y),y.splice(y.length-1,1))}return x}for(x=1,E=0;E<C;E++){for(v=!1,I=0;I<y.length&&!v;I++)E===y[I]&&(v=!0);v||(x*=o-f[A[E]])}return x}var rae={type:"Hermite"};rae.getRequiredDataPoints=function(o,A){return A=Ae(A,0),Math.max(Math.floor((o+1)/(A+1)),2)};rae.interpolateOrderZero=function(o,A,f,m,C){O(C)||(C=new Array(m));let y,x,v,E,I,w,Q=A.length,M=new Array(m);for(y=0;y<m;y++){C[y]=0;let F=new Array(Q);for(M[y]=F,x=0;x<Q;x++)F[x]=[]}let B=Q,T=new Array(B);for(y=0;y<B;y++)T[y]=y;let D=Q-1;for(E=0;E<m;E++){for(x=0;x<B;x++)w=T[x]*m+E,M[E][0].push(f[w]);for(y=1;y<B;y++){let F=!1;for(x=0;x<B-y;x++){let L=A[T[x]],R=A[T[x+y]],k;R-L<=0?(w=T[x]*m+m*y+E,k=f[w],M[E][y].push(k/I1i(y))):(k=M[E][y-1][x+1]-M[E][y-1][x],M[E][y].push(k/(R-L))),F=F||k!==0}F||(D=y-1)}}for(v=0,I=0;v<=I;v++)for(y=v;y<=D;y++){let F=nSe(o,T,A,v,y,[]);for(E=0;E<m;E++){let L=M[E][y][0];C[E+v*m]+=L*F}}return C};var _1i=[];rae.interpolate=function(o,A,f,m,C,y,x){let v=m*(y+1);O(x)||(x=new Array(v));for(let L=0;L<v;L++)x[L]=0;let E=A.length,I=new Array(E*(C+1)),w;for(w=0;w<E;w++)for(let L=0;L<C+1;L++)I[w*(C+1)+L]=w;let Q=I.length,M=_1i,B=B1i(M,I,A,f,m,C),T=[],D=Q*(Q+1)/2,F=Math.min(B,y);for(let L=0;L<=F;L++)for(w=L;w<=B;w++){T.length=0;let R=nSe(o,I,A,L,w,T),k=Math.floor(w*(1-w)/2)+Q*w;for(let U=0;U<m;U++){let V=Math.floor(U*D),H=M[V+k];x[U+L*m]+=H*R}}return x};function B1i(o,A,f,m,C,y){let x,v,E=-1,I=A.length,w=I*(I+1)/2;for(let Q=0;Q<C;Q++){let M=Math.floor(Q*w);for(x=0;x<I;x++)v=A[x]*C*(y+1)+Q,o[M+x]=m[v];for(let B=1;B<I;B++){let T=0,D=Math.floor(B*(1-B)/2)+I*B,F=!1;for(x=0;x<I-B;x++){let L=f[A[x]],R=f[A[x+B]],k,U;if(R-L<=0)v=A[x]*C*(y+1)+C*B+Q,k=m[v],U=k/je.factorial(B),o[M+D+T]=U,T++;else{let V=Math.floor((B-1)*(2-B)/2)+I*(B-1);k=o[M+V+x+1]-o[M+V+x],U=k/(R-L),o[M+D+T]=U,T++}F=F||k!==0}F&&(E=Math.max(E,B))}}return E}var oSe=rae,aSe={type:"Lagrange"};aSe.getRequiredDataPoints=function(o){return Math.max(o+1,2)};aSe.interpolateOrderZero=function(o,A,f,m,C){O(C)||(C=new Array(m));let y,x,v=A.length;for(y=0;y<m;y++)C[y]=0;for(y=0;y<v;y++){let E=1;for(x=0;x<v;x++)if(x!==y){let I=A[y]-A[x];E*=(o-A[x])/I}for(x=0;x<m;x++)C[x]+=E*f[y*m+x]}return C};var sSe=aSe;function Dx(o,A,f){this.clock=Ae(o,0),this.cone=Ae(A,0),this.magnitude=Ae(f,1)}Dx.fromCartesian3=function(o,A){let f=o.x,m=o.y,C=o.z,y=f*f+m*m;return O(A)||(A=new Dx),A.clock=Math.atan2(m,f),A.cone=Math.atan2(Math.sqrt(y),C),A.magnitude=Math.sqrt(y+C*C),A};Dx.clone=function(o,A){if(O(o))return O(A)?(A.clock=o.clock,A.cone=o.cone,A.magnitude=o.magnitude,A):new Dx(o.clock,o.cone,o.magnitude)};Dx.normalize=function(o,A){return O(A)?(A.clock=o.clock,A.cone=o.cone,A.magnitude=1,A):new Dx(o.clock,o.cone,1)};Dx.equals=function(o,A){return o===A||O(o)&&O(A)&&o.clock===A.clock&&o.cone===A.cone&&o.magnitude===A.magnitude};Dx.equalsEpsilon=function(o,A,f){return f=Ae(f,0),o===A||O(o)&&O(A)&&Math.abs(o.clock-A.clock)<=f&&Math.abs(o.cone-A.cone)<=f&&Math.abs(o.magnitude-A.magnitude)<=f};Dx.prototype.equals=function(o){return Dx.equals(this,o)};Dx.prototype.clone=function(o){return Dx.clone(this,o)};Dx.prototype.equalsEpsilon=function(o,A){return Dx.equalsEpsilon(this,o,A)};Dx.prototype.toString=function(){return`(${this.clock}, ${this.cone}, ${this.magnitude})`};var lSe=Dx,nae=xh(Z1(),1),w1i=At.WHITE,b1i=.1,Q1i=new Bt(8,8),S1i=new Bt(0,0),D1i=new Bt(1,1);function k8(o){o=Ae(o,Ae.EMPTY_OBJECT),this._definitionChanged=new br,this._color=void 0,this._colorSubscription=void 0,this._cellAlpha=void 0,this._cellAlphaSubscription=void 0,this._lineCount=void 0,this._lineCountSubscription=void 0,this._lineThickness=void 0,this._lineThicknessSubscription=void 0,this._lineOffset=void 0,this._lineOffsetSubscription=void 0,this.color=o.color,this.cellAlpha=o.cellAlpha,this.lineCount=o.lineCount,this.lineThickness=o.lineThickness,this.lineOffset=o.lineOffset}Object.defineProperties(k8.prototype,{isConstant:{get:function(){return Nt.isConstant(this._color)&&Nt.isConstant(this._cellAlpha)&&Nt.isConstant(this._lineCount)&&Nt.isConstant(this._lineThickness)&&Nt.isConstant(this._lineOffset)}},definitionChanged:{get:function(){return this._definitionChanged}},color:Bi("color"),cellAlpha:Bi("cellAlpha"),lineCount:Bi("lineCount"),lineThickness:Bi("lineThickness"),lineOffset:Bi("lineOffset")});k8.prototype.getType=function(o){return"Grid"};k8.prototype.getValue=function(o,A){return O(A)||(A={}),A.color=Nt.getValueOrClonedDefault(this._color,o,w1i,A.color),A.cellAlpha=Nt.getValueOrDefault(this._cellAlpha,o,b1i),A.lineCount=Nt.getValueOrClonedDefault(this._lineCount,o,Q1i,A.lineCount),A.lineThickness=Nt.getValueOrClonedDefault(this._lineThickness,o,D1i,A.lineThickness),A.lineOffset=Nt.getValueOrClonedDefault(this._lineOffset,o,S1i,A.lineOffset),A};k8.prototype.equals=function(o){return this===o||o instanceof k8&&Nt.equals(this._color,o._color)&&Nt.equals(this._cellAlpha,o._cellAlpha)&&Nt.equals(this._lineCount,o._lineCount)&&Nt.equals(this._lineThickness,o._lineThickness)&&Nt.equals(this._lineOffset,o._lineOffset)};var lie=k8,T1i=At.WHITE,M1i=At.TRANSPARENT,P1i=16,R1i=255;function O8(o){o=Ae(o,Ae.EMPTY_OBJECT),this._definitionChanged=new br,this._color=void 0,this._colorSubscription=void 0,this._gapColor=void 0,this._gapColorSubscription=void 0,this._dashLength=void 0,this._dashLengthSubscription=void 0,this._dashPattern=void 0,this._dashPatternSubscription=void 0,this.color=o.color,this.gapColor=o.gapColor,this.dashLength=o.dashLength,this.dashPattern=o.dashPattern}Object.defineProperties(O8.prototype,{isConstant:{get:function(){return Nt.isConstant(this._color)&&Nt.isConstant(this._gapColor)&&Nt.isConstant(this._dashLength)&&Nt.isConstant(this._dashPattern)}},definitionChanged:{get:function(){return this._definitionChanged}},color:Bi("color"),gapColor:Bi("gapColor"),dashLength:Bi("dashLength"),dashPattern:Bi("dashPattern")});O8.prototype.getType=function(o){return"PolylineDash"};O8.prototype.getValue=function(o,A){return O(A)||(A={}),A.color=Nt.getValueOrClonedDefault(this._color,o,T1i,A.color),A.gapColor=Nt.getValueOrClonedDefault(this._gapColor,o,M1i,A.gapColor),A.dashLength=Nt.getValueOrDefault(this._dashLength,o,P1i,A.dashLength),A.dashPattern=Nt.getValueOrDefault(this._dashPattern,o,R1i,A.dashPattern),A};O8.prototype.equals=function(o){return this===o||o instanceof O8&&Nt.equals(this._color,o._color)&&Nt.equals(this._gapColor,o._gapColor)&&Nt.equals(this._dashLength,o._dashLength)&&Nt.equals(this._dashPattern,o._dashPattern)};var Vl=O8,L1i=At.WHITE,F1i=.25,N1i=1;function U8(o){o=Ae(o,Ae.EMPTY_OBJECT),this._definitionChanged=new br,this._color=void 0,this._colorSubscription=void 0,this._glowPower=void 0,this._glowPowerSubscription=void 0,this._taperPower=void 0,this._taperPowerSubscription=void 0,this.color=o.color,this.glowPower=o.glowPower,this.taperPower=o.taperPower}Object.defineProperties(U8.prototype,{isConstant:{get:function(){return Nt.isConstant(this._color)&&Nt.isConstant(this._glow)}},definitionChanged:{get:function(){return this._definitionChanged}},color:Bi("color"),glowPower:Bi("glowPower"),taperPower:Bi("taperPower")});U8.prototype.getType=function(o){return"PolylineGlow"};U8.prototype.getValue=function(o,A){return O(A)||(A={}),A.color=Nt.getValueOrClonedDefault(this._color,o,L1i,A.color),A.glowPower=Nt.getValueOrDefault(this._glowPower,o,F1i,A.glowPower),A.taperPower=Nt.getValueOrDefault(this._taperPower,o,N1i,A.taperPower),A};U8.prototype.equals=function(o){return this===o||o instanceof U8&&Nt.equals(this._color,o._color)&&Nt.equals(this._glowPower,o._glowPower)&&Nt.equals(this._taperPower,o._taperPower)};var uie=U8;function jF(o){this._value=void 0,this._definitionChanged=new br,this._eventHelper=new Mx,this.setValue(o)}Object.defineProperties(jF.prototype,{isConstant:{get:function(){let o=this._value;if(!O(o))return!0;let A=o.length;for(let f=0;f<A;f++)if(!Nt.isConstant(o[f]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}}});jF.prototype.getValue=function(o,A){let f=this._value;if(!O(f))return;let m=f.length;O(A)||(A=new Array(m));let C=0,y=0;for(;C<m;){let x=this._value[C].getValue(o,A[C]);O(x)&&(A[y]=x,y++),C++}return A.length=y,A};jF.prototype.setValue=function(o){let A=this._eventHelper;if(A.removeAll(),O(o)){this._value=o.slice();let f=o.length;for(let m=0;m<f;m++){let C=o[m];O(C)&&A.add(C.definitionChanged,jF.prototype._raiseDefinitionChanged,this)}}else this._value=void 0;this._definitionChanged.raiseEvent(this)};jF.prototype.equals=function(o){return this===o||o instanceof jF&&Nt.arrayEquals(this._value,o._value)};jF.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var oae=jF,k1i={packedLength:1,pack:function(o,A,f){return f=Ae(f,0),A[f]=o,A},unpack:function(o,A,f){return A=Ae(A,0),o[A]},convertPackedArrayForInterpolation:function(o,A,f,m){O(m)||(m=[]),A=Ae(A,0),f=Ae(f,o.length);let C;for(let y=0,x=f-A+1;y<x;y++){let v=o[A+y];y===0||Math.abs(C-v)<Math.PI?m[y]=v:m[y]=v-je.TWO_PI,C=v}},unpackInterpolationResult:function(o,A,f,m,C){return C=o[0],C<0?C+je.TWO_PI:C}},YD=k1i,O1i={HORIZONTAL:0,VERTICAL:1},qF=Object.freeze(O1i),U1i=qF.HORIZONTAL,G1i=At.WHITE,H1i=At.BLACK,V1i=0,z1i=1;function G8(o){o=Ae(o,Ae.EMPTY_OBJECT),this._definitionChanged=new br,this._orientation=void 0,this._orientationSubscription=void 0,this._evenColor=void 0,this._evenColorSubscription=void 0,this._oddColor=void 0,this._oddColorSubscription=void 0,this._offset=void 0,this._offsetSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.orientation=o.orientation,this.evenColor=o.evenColor,this.oddColor=o.oddColor,this.offset=o.offset,this.repeat=o.repeat}Object.defineProperties(G8.prototype,{isConstant:{get:function(){return Nt.isConstant(this._orientation)&&Nt.isConstant(this._evenColor)&&Nt.isConstant(this._oddColor)&&Nt.isConstant(this._offset)&&Nt.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},orientation:Bi("orientation"),evenColor:Bi("evenColor"),oddColor:Bi("oddColor"),offset:Bi("offset"),repeat:Bi("repeat")});G8.prototype.getType=function(o){return"Stripe"};G8.prototype.getValue=function(o,A){return O(A)||(A={}),A.horizontal=Nt.getValueOrDefault(this._orientation,o,U1i)===qF.HORIZONTAL,A.evenColor=Nt.getValueOrClonedDefault(this._evenColor,o,G1i,A.evenColor),A.oddColor=Nt.getValueOrClonedDefault(this._oddColor,o,H1i,A.oddColor),A.offset=Nt.getValueOrDefault(this._offset,o,V1i),A.repeat=Nt.getValueOrDefault(this._repeat,o,z1i),A};G8.prototype.equals=function(o){return this===o||o instanceof G8&&Nt.equals(this._orientation,o._orientation)&&Nt.equals(this._evenColor,o._evenColor)&&Nt.equals(this._oddColor,o._oddColor)&&Nt.equals(this._offset,o._offset)&&Nt.equals(this._repeat,o._repeat)};var cie=G8;function H8(o,A){this._position=void 0,this._subscription=void 0,this._definitionChanged=new br,this._normalize=Ae(A,!0),this.position=o}Object.defineProperties(H8.prototype,{isConstant:{get:function(){return Nt.isConstant(this._position)}},definitionChanged:{get:function(){return this._definitionChanged}},position:{get:function(){return this._position},set:function(o){let A=this._position;A!==o&&(O(A)&&this._subscription(),this._position=o,O(o)&&(this._subscription=o._definitionChanged.addEventListener(function(){this._definitionChanged.raiseEvent(this)},this)),this._definitionChanged.raiseEvent(this))}},normalize:{get:function(){return this._normalize},set:function(o){this._normalize!==o&&(this._normalize=o,this._definitionChanged.raiseEvent(this))}}});var K1i=new ee,oze=new ee,aze=new fi,Hge=1/60;H8.prototype.getValue=function(o,A){return this._getValue(o,A)};H8.prototype._getValue=function(o,A,f){O(A)||(A=new ee);let m=this._position;if(Nt.isConstant(m))return this._normalize?void 0:ee.clone(ee.ZERO,A);let C=m.getValue(o,K1i),y=m.getValue(fi.addSeconds(o,Hge,aze),oze);if(!O(C)||!O(y)&&(y=C,C=m.getValue(fi.addSeconds(o,-Hge,aze),oze),!O(C)))return;if(ee.equals(C,y))return this._normalize?void 0:ee.clone(ee.ZERO,A);O(f)&&C.clone(f);let x=ee.subtract(y,C,A);return this._normalize?ee.normalize(x,A):ee.divideByScalar(x,Hge,A)};H8.prototype.equals=function(o){return this===o||o instanceof H8&&Nt.equals(this._position,o._position)};var aae=H8;function HK(o,A){this._velocityVectorProperty=new aae(o,!0),this._subscription=void 0,this._ellipsoid=void 0,this._definitionChanged=new br,this.ellipsoid=Ae(A,Ti.WGS84);let f=this;this._velocityVectorProperty.definitionChanged.addEventListener(function(){f._definitionChanged.raiseEvent(f)})}Object.defineProperties(HK.prototype,{isConstant:{get:function(){return Nt.isConstant(this._velocityVectorProperty)}},definitionChanged:{get:function(){return this._definitionChanged}},position:{get:function(){return this._velocityVectorProperty.position},set:function(o){this._velocityVectorProperty.position=o}},ellipsoid:{get:function(){return this._ellipsoid},set:function(o){this._ellipsoid!==o&&(this._ellipsoid=o,this._definitionChanged.raiseEvent(this))}}});var sze=new ee,Y1i=new ee,lze=new ci;HK.prototype.getValue=function(o,A){let f=this._velocityVectorProperty._getValue(o,Y1i,sze);if(O(f))return zn.rotationMatrixFromPositionVelocity(sze,f,this._ellipsoid,lze),jr.fromRotationMatrix(lze,A)};HK.prototype.equals=function(o){return this===o||o instanceof HK&&Nt.equals(this._velocityVectorProperty,o._velocityVectorProperty)&&(this._ellipsoid===o._ellipsoid||this._ellipsoid.equals(o._ellipsoid))};var uSe=HK;function XF(){}XF.packedLength=ee.packedLength;XF.unpack=ee.unpack;XF.pack=ee.pack;var yme;function VK(o,A){return A[0]==="#"&&(A=yme+A),QY.fromString(o,A)}function uze(o,A,f){if(O(f.reference))return VK(A,f.reference);if(O(f.velocityReference)){let m=VK(A,f.velocityReference);switch(o){case ee:case XF:return new aae(m,o===XF);case jr:return new uSe(m)}}throw new nr(`${JSON.stringify(f)} is not valid CZML.`)}function J1i(o,A){return new Bn(function(f,m){return A(o.getValue(f,m))},o.isConstant)}var ac=new ee,vv=new lSe,ax=new Kt,BO=new el,T$=new jr;function W1i(o){let A=o.rgbaf;if(O(A))return A;let f=o.rgba;if(!O(f))return;let m=f.length;if(m===At.packedLength)return[At.byteToFloat(f[0]),At.byteToFloat(f[1]),At.byteToFloat(f[2]),At.byteToFloat(f[3])];A=new Array(m);for(let C=0;C<m;C+=5)A[C]=f[C],A[C+1]=At.byteToFloat(f[C+1]),A[C+2]=At.byteToFloat(f[C+2]),A[C+3]=At.byteToFloat(f[C+3]),A[C+4]=At.byteToFloat(f[C+4]);return A}function cze(o,A){let f=Ae(o.uri,o);return O(A)?A.getDerivedResource({url:f}):An.createIfNeeded(f)}function j1i(o){let A=o.wsen;if(O(A))return A;let f=o.wsenDegrees;if(!O(f))return;let m=f.length;if(m===Si.packedLength)return[je.toRadians(f[0]),je.toRadians(f[1]),je.toRadians(f[2]),je.toRadians(f[3])];A=new Array(m);for(let C=0;C<m;C+=5)A[C]=f[C],A[C+1]=je.toRadians(f[C+1]),A[C+2]=je.toRadians(f[C+2]),A[C+3]=je.toRadians(f[C+3]),A[C+4]=je.toRadians(f[C+4]);return A}function q1i(o){let A=o.length;if(vv.magnitude=1,A===2)return vv.clock=o[0],vv.cone=o[1],ee.fromSpherical(vv,ac),[ac.x,ac.y,ac.z];let f=new Array(A/3*4);for(let m=0,C=0;m<A;m+=3,C+=4)f[C]=o[m],vv.clock=o[m+1],vv.cone=o[m+2],ee.fromSpherical(vv,ac),f[C+1]=ac.x,f[C+2]=ac.y,f[C+3]=ac.z;return f}function X1i(o){let A=o.length;if(A===3)return vv.clock=o[0],vv.cone=o[1],vv.magnitude=o[2],ee.fromSpherical(vv,ac),[ac.x,ac.y,ac.z];let f=new Array(A);for(let m=0;m<A;m+=4)f[m]=o[m],vv.clock=o[m+1],vv.cone=o[m+2],vv.magnitude=o[m+3],ee.fromSpherical(vv,ac),f[m+1]=ac.x,f[m+2]=ac.y,f[m+3]=ac.z;return f}function Z1i(o){let A=o.length;if(A===3)return ax.longitude=o[0],ax.latitude=o[1],ax.height=o[2],Ti.WGS84.cartographicToCartesian(ax,ac),[ac.x,ac.y,ac.z];let f=new Array(A);for(let m=0;m<A;m+=4)f[m]=o[m],ax.longitude=o[m+1],ax.latitude=o[m+2],ax.height=o[m+3],Ti.WGS84.cartographicToCartesian(ax,ac),f[m+1]=ac.x,f[m+2]=ac.y,f[m+3]=ac.z;return f}function $1i(o){let A=o.length;if(A===3)return ax.longitude=je.toRadians(o[0]),ax.latitude=je.toRadians(o[1]),ax.height=o[2],Ti.WGS84.cartographicToCartesian(ax,ac),[ac.x,ac.y,ac.z];let f=new Array(A);for(let m=0;m<A;m+=4)f[m]=o[m],ax.longitude=je.toRadians(o[m+1]),ax.latitude=je.toRadians(o[m+2]),ax.height=o[m+3],Ti.WGS84.cartographicToCartesian(ax,ac),f[m+1]=ac.x,f[m+2]=ac.y,f[m+3]=ac.z;return f}function cSe(o){let A=o.cartesian;if(O(A))return A;let f=o.cartesianVelocity;if(O(f))return f;let m=o.unitCartesian;if(O(m))return m;let C=o.unitSpherical;if(O(C))return q1i(C);let y=o.spherical;if(O(y))return X1i(y);let x=o.cartographicRadians;if(O(x))return Z1i(x);let v=o.cartographicDegrees;if(O(v))return $1i(v);throw new nr(`${JSON.stringify(o)} is not a valid CZML interval.`)}function Aze(o,A){ee.unpack(o,A,ac),ee.normalize(ac,ac),ee.pack(ac,o,A)}function ewi(o){let A=cSe(o);if(A.length===3)return Aze(A,0),A;for(let f=1;f<A.length;f+=4)Aze(A,f);return A}function hze(o,A){jr.unpack(o,A,T$),jr.normalize(T$,T$),jr.pack(T$,o,A)}function twi(o){let A=o.unitQuaternion;if(O(A)){if(A.length===4)return hze(A,0),A;for(let f=1;f<A.length;f+=5)hze(A,f)}return A}function dze(o){return typeof o=="boolean"?Boolean:typeof o=="number"?Number:typeof o=="string"?String:o.hasOwnProperty("array")?Array:o.hasOwnProperty("boolean")?Boolean:o.hasOwnProperty("boundingRectangle")?Kr:o.hasOwnProperty("cartesian2")?Bt:o.hasOwnProperty("cartesian")||o.hasOwnProperty("spherical")||o.hasOwnProperty("cartographicRadians")||o.hasOwnProperty("cartographicDegrees")?ee:o.hasOwnProperty("unitCartesian")||o.hasOwnProperty("unitSpherical")?XF:o.hasOwnProperty("rgba")||o.hasOwnProperty("rgbaf")?At:o.hasOwnProperty("arcType")?Pa:o.hasOwnProperty("classificationType")?Gu:o.hasOwnProperty("colorBlendMode")?HD:o.hasOwnProperty("cornerType")?qA:o.hasOwnProperty("heightReference")?xn:o.hasOwnProperty("horizontalOrigin")?tA:o.hasOwnProperty("date")?fi:o.hasOwnProperty("labelStyle")?pA:o.hasOwnProperty("number")?Number:o.hasOwnProperty("nearFarScalar")?To:o.hasOwnProperty("distanceDisplayCondition")?$o:o.hasOwnProperty("object")||o.hasOwnProperty("value")?Object:o.hasOwnProperty("unitQuaternion")?jr:o.hasOwnProperty("shadowMode")?Al:o.hasOwnProperty("string")?String:o.hasOwnProperty("stripeOrientation")?qF:o.hasOwnProperty("wsen")||o.hasOwnProperty("wsenDegrees")?Si:o.hasOwnProperty("uri")?nae.default:o.hasOwnProperty("verticalOrigin")?wn:Object}function iwi(o,A,f){switch(o){case Pa:return Pa[Ae(A.arcType,A)];case Array:return A.array;case Boolean:return Ae(A.boolean,A);case Kr:return A.boundingRectangle;case Bt:return A.cartesian2;case ee:return cSe(A);case XF:return ewi(A);case At:return W1i(A);case Gu:return Gu[Ae(A.classificationType,A)];case HD:return HD[Ae(A.colorBlendMode,A)];case qA:return qA[Ae(A.cornerType,A)];case xn:return xn[Ae(A.heightReference,A)];case tA:return tA[Ae(A.horizontalOrigin,A)];case Image:return cze(A,f);case fi:return fi.fromIso8601(Ae(A.date,A));case pA:return pA[Ae(A.labelStyle,A)];case Number:return Ae(A.number,A);case To:return A.nearFarScalar;case $o:return A.distanceDisplayCondition;case Object:return Ae(Ae(A.object,A.value),A);case jr:return twi(A);case YD:return Ae(A.number,A);case Al:return Al[Ae(Ae(A.shadowMode,A.shadows),A)];case String:return Ae(A.string,A);case qF:return qF[Ae(A.stripeOrientation,A)];case Si:return j1i(A);case nae.default:return cze(A,f);case wn:return wn[Ae(A.verticalOrigin,A)];default:throw new nr(o)}}var rwi={HERMITE:oSe,LAGRANGE:sSe,LINEAR:Qre};function Aie(o,A){let f=o.interpolationAlgorithm,m=o.interpolationDegree;(O(f)||O(m))&&A.setInterpolationOptions({interpolationAlgorithm:rwi[f],interpolationDegree:m});let C=o.forwardExtrapolationType;O(C)&&(A.forwardExtrapolationType=mD[C]);let y=o.forwardExtrapolationDuration;O(y)&&(A.forwardExtrapolationDuration=y);let x=o.backwardExtrapolationType;O(x)&&(A.backwardExtrapolationType=mD[x]);let v=o.backwardExtrapolationDuration;O(v)&&(A.backwardExtrapolationDuration=v)}var fze={iso8601:void 0};function lf(o){if(O(o))return fze.iso8601=o,el.fromIso8601(fze)}function ASe(o){let A=Cn.MAXIMUM_INTERVAL.clone();return A.data=o,A}function gze(o){let A=new P1;return A.intervals.addInterval(ASe(o)),A}function pze(o){let A=new U_(o.referenceFrame);return A.intervals.addInterval(ASe(o)),A}function hie(o,A,f,m,C,y,x){let v=lf(m.interval);O(C)&&(O(v)?v=el.intersect(v,C,BO):v=C);let E,I,w,Q=!O(m.reference)&&!O(m.velocityReference),M=O(v)&&!v.equals(Cn.MAXIMUM_INTERVAL);if(m.delete===!0){if(!M){A[f]=void 0;return}return Yot(A[f],v)}let B=!1;if(Q){if(I=iwi(o,m,y),!O(I))return;E=Ae(o.packedLength,1),w=Ae(I.length,1),B=!O(m.array)&&typeof I!="string"&&w>E&&o!==Object}let T=typeof o.unpack=="function"&&o!==YD;if(!B&&!M){Q?A[f]=new bc(T?o.unpack(I,0):I):A[f]=uze(o,x,m);return}let D=A[f],F,L=m.epoch;if(O(L)&&(F=fi.fromIso8601(L)),B&&!M){D instanceof uM||(A[f]=D=new uM(o)),D.addSamplesPackedArray(I,F),Aie(m,D);return}let R;if(!B&&M){v=v.clone(),Q?v.data=T?o.unpack(I,0):I:v.data=uze(o,x,m),O(D)||(A[f]=D=Q?new f8:new P1),Q&&D instanceof f8?D.intervals.addInterval(v):D instanceof P1?(Q&&(v.data=new bc(v.data)),D.intervals.addInterval(v)):(A[f]=D=gze(D),Q&&(v.data=new bc(v.data)),D.intervals.addInterval(v));return}O(D)||(A[f]=D=new P1),D instanceof P1||(A[f]=D=gze(D));let k=D.intervals;R=k.findInterval(v),(!O(R)||!(R.data instanceof uM))&&(R=v.clone(),R.data=new uM(o),k.addInterval(R)),R.data.addSamplesPackedArray(I,F),Aie(m,R.data)}function Yot(o,A){if(o instanceof uM){o.removeSamples(A);return}else if(o instanceof f8){o.intervals.removeInterval(A);return}else if(o instanceof P1){let f=o.intervals;for(let m=0;m<f.length;++m){let C=el.intersect(f.get(m),A,BO);C.isEmpty||Yot(C.data,A)}f.removeInterval(A);return}}function zi(o,A,f,m,C,y,x){if(O(m))if(Array.isArray(m))for(let v=0,E=m.length;v<E;++v)hie(o,A,f,m[v],C,y,x);else hie(o,A,f,m,C,y,x)}function mze(o,A,f,m,C,y){let x=lf(f.interval);O(m)&&(O(x)?x=el.intersect(x,m,BO):x=m);let v=O(f.cartesianVelocity)?1:0,E=ee.packedLength*(v+1),I,w,Q=!O(f.reference),M=O(x)&&!x.equals(Cn.MAXIMUM_INTERVAL);if(f.delete===!0){if(!M){o[A]=void 0;return}return Jot(o[A],x)}let B,T=!1;if(Q&&(O(f.referenceFrame)&&(B=s0[f.referenceFrame]),B=Ae(B,s0.FIXED),I=cSe(f),w=Ae(I.length,1),T=w>E),!T&&!M){Q?o[A]=new _D(ee.unpack(I),B):o[A]=VK(y,f.reference);return}let D=o[A],F,L=f.epoch;if(O(L)&&(F=fi.fromIso8601(L)),T&&!M){(!(D instanceof R1)||O(B)&&D.referenceFrame!==B)&&(o[A]=D=new R1(B,v)),D.addSamplesPackedArray(I,F),Aie(f,D);return}let R;if(!T&&M){x=x.clone(),Q?x.data=ee.unpack(I):x.data=VK(y,f.reference),O(D)||(Q?D=new D8(B):D=new U_(B),o[A]=D),Q&&D instanceof D8&&O(B)&&D.referenceFrame===B?D.intervals.addInterval(x):D instanceof U_?(Q&&(x.data=new _D(x.data,B)),D.intervals.addInterval(x)):(o[A]=D=pze(D),Q&&(x.data=new _D(x.data,B)),D.intervals.addInterval(x));return}O(D)?D instanceof U_||(o[A]=D=pze(D)):o[A]=D=new U_(B);let k=D.intervals;R=k.findInterval(x),(!O(R)||!(R.data instanceof R1)||O(B)&&R.data.referenceFrame!==B)&&(R=x.clone(),R.data=new R1(B,v),k.addInterval(R)),R.data.addSamplesPackedArray(I,F),Aie(f,R.data)}function Jot(o,A){if(o instanceof R1){o.removeSamples(A);return}else if(o instanceof D8){o.intervals.removeInterval(A);return}else if(o instanceof U_){let f=o.intervals;for(let m=0;m<f.length;++m){let C=el.intersect(f.get(m),A,BO);C.isEmpty||Jot(C.data,A)}f.removeInterval(A);return}}function Wot(o,A,f,m,C,y){if(O(f))if(Array.isArray(f))for(let x=0,v=f.length;x<v;++x)mze(o,A,f[x],m,C,y);else mze(o,A,f,m,C,y)}function Cze(o,A,f,m){O(f.references)?sae(o,A,f.references,f.interval,m,oae,P1):(O(f.cartesian2)?f.array=Bt.unpackArray(f.cartesian2):O(f.cartesian)&&(f.array=Bt.unpackArray(f.cartesian)),O(f.array)&&zi(Array,o,A,f,void 0,void 0,m))}function yze(o,A,f,m,C,y){let x=lf(f.interval);O(m)&&(O(x)?x=el.intersect(x,m,BO):x=m);let v=o[A],E,I;if(O(x)){v instanceof sie||(v=new sie,o[A]=v);let Q=v.intervals;I=Q.findInterval({start:x.start,stop:x.stop}),O(I)?E=I.data:(I=x.clone(),Q.addInterval(I))}else E=v;let w;O(f.solidColor)?(E instanceof Fa||(E=new Fa),w=f.solidColor,zi(At,E,"color",w.color,void 0,void 0,y)):O(f.grid)?(E instanceof lie||(E=new lie),w=f.grid,zi(At,E,"color",w.color,void 0,C,y),zi(Number,E,"cellAlpha",w.cellAlpha,void 0,C,y),zi(Bt,E,"lineCount",w.lineCount,void 0,C,y),zi(Bt,E,"lineThickness",w.lineThickness,void 0,C,y),zi(Bt,E,"lineOffset",w.lineOffset,void 0,C,y)):O(f.image)?(E instanceof V0||(E=new V0),w=f.image,zi(Image,E,"image",w.image,void 0,C,y),zi(Bt,E,"repeat",w.repeat,void 0,C,y),zi(At,E,"color",w.color,void 0,C,y),zi(Boolean,E,"transparent",w.transparent,void 0,C,y)):O(f.stripe)?(E instanceof cie||(E=new cie),w=f.stripe,zi(qF,E,"orientation",w.orientation,void 0,C,y),zi(At,E,"evenColor",w.evenColor,void 0,C,y),zi(At,E,"oddColor",w.oddColor,void 0,C,y),zi(Number,E,"offset",w.offset,void 0,C,y),zi(Number,E,"repeat",w.repeat,void 0,C,y)):O(f.polylineOutline)?(E instanceof JM||(E=new JM),w=f.polylineOutline,zi(At,E,"color",w.color,void 0,C,y),zi(At,E,"outlineColor",w.outlineColor,void 0,C,y),zi(Number,E,"outlineWidth",w.outlineWidth,void 0,C,y)):O(f.polylineGlow)?(E instanceof uie||(E=new uie),w=f.polylineGlow,zi(At,E,"color",w.color,void 0,C,y),zi(Number,E,"glowPower",w.glowPower,void 0,C,y),zi(Number,E,"taperPower",w.taperPower,void 0,C,y)):O(f.polylineArrow)?(E instanceof vK||(E=new vK),w=f.polylineArrow,zi(At,E,"color",w.color,void 0,void 0,y)):O(f.polylineDash)?(E instanceof Vl||(E=new Vl),w=f.polylineDash,zi(At,E,"color",w.color,void 0,void 0,y),zi(At,E,"gapColor",w.gapColor,void 0,void 0,y),zi(Number,E,"dashLength",w.dashLength,void 0,C,y),zi(Number,E,"dashPattern",w.dashPattern,void 0,C,y)):O(f.checkerboard)&&(E instanceof oie||(E=new oie),w=f.checkerboard,zi(At,E,"evenColor",w.evenColor,void 0,C,y),zi(At,E,"oddColor",w.oddColor,void 0,C,y),zi(Bt,E,"repeat",w.repeat,void 0,C,y)),O(I)?I.data=E:o[A]=E}function nB(o,A,f,m,C,y){if(O(f))if(Array.isArray(f))for(let x=0,v=f.length;x<v;++x)yze(o,A,f[x],m,C,y);else yze(o,A,f,m,C,y)}function nwi(o,A,f,m){let C=A.name;O(C)&&(o.name=A.name)}function owi(o,A,f,m){let C=A.description;O(C)&&zi(String,o,"description",C,void 0,m,f)}function awi(o,A,f,m){let C=A.position;O(C)&&Wot(o,"position",C,void 0,m,f)}function swi(o,A,f,m){let C=A.viewFrom;O(C)&&zi(ee,o,"viewFrom",C,void 0,m,f)}function lwi(o,A,f,m){let C=A.orientation;O(C)&&zi(jr,o,"orientation",C,void 0,m,f)}function uwi(o,A,f,m){let C=A.properties;if(O(C)){O(o.properties)||(o.properties=new LD);for(let y in C)if(C.hasOwnProperty(y)){o.properties.hasProperty(y)||o.properties.addProperty(y);let x=C[y];if(Array.isArray(x))for(let v=0,E=x.length;v<E;++v)hie(dze(x[v]),o.properties,y,x[v],void 0,m,f);else hie(dze(x),o.properties,y,x,void 0,m,f)}}}function sae(o,A,f,m,C,y,x){let v=f.map(function(E){return VK(C,E)});if(O(m)){m=lf(m);let E=o[A];if(!(E instanceof x)){let I=new x;I.intervals.addInterval(ASe(E)),o[A]=E=I}m.data=new y(v),E.intervals.addInterval(m)}else o[A]=new y(v)}function xze(o,A,f,m){let C=f.references;O(C)?sae(o,A,C,f.interval,m,oae,P1):zi(Array,o,A,f,void 0,void 0,m)}function vze(o,A,f,m){if(O(f))if(Array.isArray(f))for(let C=0,y=f.length;C<y;++C)xze(o,A,f[C],m);else xze(o,A,f,m)}function Eze(o,A,f,m){let C=f.references;O(C)?sae(o,A,C,f.interval,m,d8,U_):(O(f.cartesian)?f.array=ee.unpackArray(f.cartesian):O(f.cartographicRadians)?f.array=ee.fromRadiansArrayHeights(f.cartographicRadians):O(f.cartographicDegrees)&&(f.array=ee.fromDegreesArrayHeights(f.cartographicDegrees)),O(f.array)&&zi(Array,o,A,f,void 0,void 0,m))}function $J(o,A,f,m){if(O(f))if(Array.isArray(f))for(let C=0,y=f.length;C<y;++C)Eze(o,A,f[C],m);else Eze(o,A,f,m)}function cwi(o){return ee.unpackArray(o)}function Awi(o){return ee.fromRadiansArrayHeights(o)}function hwi(o){return ee.fromDegreesArrayHeights(o)}function Ize(o,A,f,m){let C=f.references;if(O(C)){let y=C.map(function(x){let v={};return sae(v,"positions",x,f.interval,m,d8,U_),v.positions});o[A]=new d8(y)}else O(f.cartesian)?f.array=f.cartesian.map(cwi):O(f.cartographicRadians)?f.array=f.cartographicRadians.map(Awi):O(f.cartographicDegrees)&&(f.array=f.cartographicDegrees.map(hwi)),O(f.array)&&zi(Array,o,A,f,void 0,void 0,m)}function dwi(o,A,f,m){if(O(f))if(Array.isArray(f))for(let C=0,y=f.length;C<y;++C)Ize(o,A,f[C],m);else Ize(o,A,f,m)}function fwi(o,A,f,m){if(O(f))if(Array.isArray(f))for(let C=0,y=f.length;C<y;C++)Cze(o,A,f[C],m);else Cze(o,A,f,m)}function gwi(o,A,f,m){let C=A.availability;if(!O(C))return;let y;if(Array.isArray(C))for(let x=0,v=C.length;x<v;++x)O(y)||(y=new mx),y.addInterval(lf(C[x]));else y=new mx,y.addInterval(lf(C));o.availability=y}function pwi(o,A,f,m,C){!O(A)||zi(XF,o,"alignedAxis",A,f,m,C)}function mwi(o,A,f,m){let C=A.billboard;if(!O(C))return;let y=lf(C.interval),x=o.billboard;O(x)||(o.billboard=x=new eP),zi(Boolean,x,"show",C.show,y,m,f),zi(Image,x,"image",C.image,y,m,f),zi(Number,x,"scale",C.scale,y,m,f),zi(Bt,x,"pixelOffset",C.pixelOffset,y,m,f),zi(ee,x,"eyeOffset",C.eyeOffset,y,m,f),zi(tA,x,"horizontalOrigin",C.horizontalOrigin,y,m,f),zi(wn,x,"verticalOrigin",C.verticalOrigin,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(At,x,"color",C.color,y,m,f),zi(YD,x,"rotation",C.rotation,y,m,f),pwi(x,C.alignedAxis,y,m,f),zi(Boolean,x,"sizeInMeters",C.sizeInMeters,y,m,f),zi(Number,x,"width",C.width,y,m,f),zi(Number,x,"height",C.height,y,m,f),zi(To,x,"scaleByDistance",C.scaleByDistance,y,m,f),zi(To,x,"translucencyByDistance",C.translucencyByDistance,y,m,f),zi(To,x,"pixelOffsetScaleByDistance",C.pixelOffsetScaleByDistance,y,m,f),zi(Kr,x,"imageSubRegion",C.imageSubRegion,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f),zi(Number,x,"disableDepthTestDistance",C.disableDepthTestDistance,y,m,f)}function Cwi(o,A,f,m){let C=A.box;if(!O(C))return;let y=lf(C.interval),x=o.box;O(x)||(o.box=x=new hre),zi(Boolean,x,"show",C.show,y,m,f),zi(ee,x,"dimensions",C.dimensions,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(Boolean,x,"fill",C.fill,y,m,f),nB(x,"material",C.material,y,m,f),zi(Boolean,x,"outline",C.outline,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f)}function ywi(o,A,f,m){let C=A.corridor;if(!O(C))return;let y=lf(C.interval),x=o.corridor;O(x)||(o.corridor=x=new dre),zi(Boolean,x,"show",C.show,y,m,f),$J(x,"positions",C.positions,f),zi(Number,x,"width",C.width,y,m,f),zi(Number,x,"height",C.height,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(Number,x,"extrudedHeight",C.extrudedHeight,y,m,f),zi(xn,x,"extrudedHeightReference",C.extrudedHeightReference,y,m,f),zi(qA,x,"cornerType",C.cornerType,y,m,f),zi(Number,x,"granularity",C.granularity,y,m,f),zi(Boolean,x,"fill",C.fill,y,m,f),nB(x,"material",C.material,y,m,f),zi(Boolean,x,"outline",C.outline,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f),zi(Gu,x,"classificationType",C.classificationType,y,m,f),zi(Number,x,"zIndex",C.zIndex,y,m,f)}function xwi(o,A,f,m){let C=A.cylinder;if(!O(C))return;let y=lf(C.interval),x=o.cylinder;O(x)||(o.cylinder=x=new fre),zi(Boolean,x,"show",C.show,y,m,f),zi(Number,x,"length",C.length,y,m,f),zi(Number,x,"topRadius",C.topRadius,y,m,f),zi(Number,x,"bottomRadius",C.bottomRadius,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(Boolean,x,"fill",C.fill,y,m,f),nB(x,"material",C.material,y,m,f),zi(Boolean,x,"outline",C.outline,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(Number,x,"numberOfVerticalLines",C.numberOfVerticalLines,y,m,f),zi(Number,x,"slices",C.slices,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f)}function vwi(o,A){let f=o.version;if(O(f)&&typeof f=="string"){let y=f.split(".");if(y.length===2){if(y[0]!=="1")throw new nr("Cesium only supports CZML version 1.");A._version=f}}if(!O(A._version))throw new nr("CZML version information invalid.  It is expected to be a property on the document object in the <Major>.<Minor> version format.");let m=A._documentPacket;O(o.name)&&(m.name=o.name);let C=o.clock;if(O(C)){let y=m.clock;O(y)?(y.interval=Ae(C.interval,y.interval),y.currentTime=Ae(C.currentTime,y.currentTime),y.range=Ae(C.range,y.range),y.step=Ae(C.step,y.step),y.multiplier=Ae(C.multiplier,y.multiplier)):m.clock={interval:C.interval,currentTime:C.currentTime,range:C.range,step:C.step,multiplier:C.multiplier}}}function Ewi(o,A,f,m){let C=A.ellipse;if(!O(C))return;let y=lf(C.interval),x=o.ellipse;O(x)||(o.ellipse=x=new gre),zi(Boolean,x,"show",C.show,y,m,f),zi(Number,x,"semiMajorAxis",C.semiMajorAxis,y,m,f),zi(Number,x,"semiMinorAxis",C.semiMinorAxis,y,m,f),zi(Number,x,"height",C.height,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(Number,x,"extrudedHeight",C.extrudedHeight,y,m,f),zi(xn,x,"extrudedHeightReference",C.extrudedHeightReference,y,m,f),zi(YD,x,"rotation",C.rotation,y,m,f),zi(YD,x,"stRotation",C.stRotation,y,m,f),zi(Number,x,"granularity",C.granularity,y,m,f),zi(Boolean,x,"fill",C.fill,y,m,f),nB(x,"material",C.material,y,m,f),zi(Boolean,x,"outline",C.outline,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(Number,x,"numberOfVerticalLines",C.numberOfVerticalLines,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f),zi(Gu,x,"classificationType",C.classificationType,y,m,f),zi(Number,x,"zIndex",C.zIndex,y,m,f)}function Iwi(o,A,f,m){let C=A.ellipsoid;if(!O(C))return;let y=lf(C.interval),x=o.ellipsoid;O(x)||(o.ellipsoid=x=new l6),zi(Boolean,x,"show",C.show,y,m,f),zi(ee,x,"radii",C.radii,y,m,f),zi(ee,x,"innerRadii",C.innerRadii,y,m,f),zi(Number,x,"minimumClock",C.minimumClock,y,m,f),zi(Number,x,"maximumClock",C.maximumClock,y,m,f),zi(Number,x,"minimumCone",C.minimumCone,y,m,f),zi(Number,x,"maximumCone",C.maximumCone,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(Boolean,x,"fill",C.fill,y,m,f),nB(x,"material",C.material,y,m,f),zi(Boolean,x,"outline",C.outline,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(Number,x,"stackPartitions",C.stackPartitions,y,m,f),zi(Number,x,"slicePartitions",C.slicePartitions,y,m,f),zi(Number,x,"subdivisions",C.subdivisions,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f)}function _wi(o,A,f,m){let C=A.label;if(!O(C))return;let y=lf(C.interval),x=o.label;O(x)||(o.label=x=new u6),zi(Boolean,x,"show",C.show,y,m,f),zi(String,x,"text",C.text,y,m,f),zi(String,x,"font",C.font,y,m,f),zi(pA,x,"style",C.style,y,m,f),zi(Number,x,"scale",C.scale,y,m,f),zi(Boolean,x,"showBackground",C.showBackground,y,m,f),zi(At,x,"backgroundColor",C.backgroundColor,y,m,f),zi(Bt,x,"backgroundPadding",C.backgroundPadding,y,m,f),zi(Bt,x,"pixelOffset",C.pixelOffset,y,m,f),zi(ee,x,"eyeOffset",C.eyeOffset,y,m,f),zi(tA,x,"horizontalOrigin",C.horizontalOrigin,y,m,f),zi(wn,x,"verticalOrigin",C.verticalOrigin,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(At,x,"fillColor",C.fillColor,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(To,x,"translucencyByDistance",C.translucencyByDistance,y,m,f),zi(To,x,"pixelOffsetScaleByDistance",C.pixelOffsetScaleByDistance,y,m,f),zi(To,x,"scaleByDistance",C.scaleByDistance,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f),zi(Number,x,"disableDepthTestDistance",C.disableDepthTestDistance,y,m,f)}function Bwi(o,A,f,m){let C=A.model;if(!O(C))return;let y=lf(C.interval),x=o.model;O(x)||(o.model=x=new xY),zi(Boolean,x,"show",C.show,y,m,f),zi(nae.default,x,"uri",C.gltf,y,m,f),zi(Number,x,"scale",C.scale,y,m,f),zi(Number,x,"minimumPixelSize",C.minimumPixelSize,y,m,f),zi(Number,x,"maximumScale",C.maximumScale,y,m,f),zi(Boolean,x,"incrementallyLoadTextures",C.incrementallyLoadTextures,y,m,f),zi(Boolean,x,"runAnimations",C.runAnimations,y,m,f),zi(Boolean,x,"clampAnimations",C.clampAnimations,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(At,x,"silhouetteColor",C.silhouetteColor,y,m,f),zi(Number,x,"silhouetteSize",C.silhouetteSize,y,m,f),zi(At,x,"color",C.color,y,m,f),zi(HD,x,"colorBlendMode",C.colorBlendMode,y,m,f),zi(Number,x,"colorBlendAmount",C.colorBlendAmount,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f);let v,E,I=C.nodeTransformations;if(O(I))if(Array.isArray(I))for(v=0,E=I.length;v<E;++v)_ze(x,I[v],y,m,f);else _ze(x,I,y,m,f);let w=C.articulations;if(O(w))if(Array.isArray(w))for(v=0,E=w.length;v<E;++v)Bze(x,w[v],y,m,f);else Bze(x,w,y,m,f)}function _ze(o,A,f,m,C){let y=lf(A.interval);O(f)&&(O(y)?y=el.intersect(y,f,BO):y=f);let x=o.nodeTransformations,v=Object.keys(A);for(let E=0,I=v.length;E<I;++E){let w=v[E];if(w==="interval")continue;let Q=A[w];if(!O(Q))continue;O(x)||(o.nodeTransformations=x=new LD),x.hasProperty(w)||x.addProperty(w);let M=x[w];O(M)||(x[w]=M=new pre),zi(ee,M,"translation",Q.translation,y,m,C),zi(jr,M,"rotation",Q.rotation,y,m,C),zi(ee,M,"scale",Q.scale,y,m,C)}}function Bze(o,A,f,m,C){let y=lf(A.interval);O(f)&&(O(y)?y=el.intersect(y,f,BO):y=f);let x=o.articulations,v=Object.keys(A);for(let E=0,I=v.length;E<I;++E){let w=v[E];if(w==="interval")continue;let Q=A[w];!O(Q)||(O(x)||(o.articulations=x=new LD),x.hasProperty(w)||x.addProperty(w),zi(Number,x,w,Q,y,m,C))}}function wwi(o,A,f,m){let C=A.path;if(!O(C))return;let y=lf(C.interval),x=o.path;O(x)||(o.path=x=new vY),zi(Boolean,x,"show",C.show,y,m,f),zi(Number,x,"leadTime",C.leadTime,y,m,f),zi(Number,x,"trailTime",C.trailTime,y,m,f),zi(Number,x,"width",C.width,y,m,f),zi(Number,x,"resolution",C.resolution,y,m,f),nB(x,"material",C.material,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f)}function bwi(o,A,f,m){let C=A.point;if(!O(C))return;let y=lf(C.interval),x=o.point;O(x)||(o.point=x=new Cre),zi(Boolean,x,"show",C.show,y,m,f),zi(Number,x,"pixelSize",C.pixelSize,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(At,x,"color",C.color,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(To,x,"scaleByDistance",C.scaleByDistance,y,m,f),zi(To,x,"translucencyByDistance",C.translucencyByDistance,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f),zi(Number,x,"disableDepthTestDistance",C.disableDepthTestDistance,y,m,f)}function zK(o){this.polygon=o,this._definitionChanged=new br}Object.defineProperties(zK.prototype,{isConstant:{get:function(){let o=this.polygon._positions,A=this.polygon._holes;return(!O(o)||o.isConstant)&&(!O(A)||A.isConstant)}},definitionChanged:{get:function(){return this._definitionChanged}}});zK.prototype.getValue=function(o,A){let f;O(this.polygon._positions)&&(f=this.polygon._positions.getValue(o));let m;return O(this.polygon._holes)&&(m=this.polygon._holes.getValue(o),O(m)&&(m=m.map(function(C){return new Un(C)}))),O(A)?(A.positions=f,A.holes=m,A):new Un(f,m)};zK.prototype.equals=function(o){return this===o||o instanceof zK&&Nt.equals(this.polygon._positions,o.polygon._positions)&&Nt.equals(this.polygon._holes,o.polygon._holes)};function Qwi(o,A,f,m){let C=A.polygon;if(!O(C))return;let y=lf(C.interval),x=o.polygon;O(x)||(o.polygon=x=new yl),zi(Boolean,x,"show",C.show,y,m,f),$J(x,"_positions",C.positions,f),dwi(x,"_holes",C.holes,f),(O(x._positions)||O(x._holes))&&(x.hierarchy=new zK(x)),zi(Number,x,"height",C.height,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(Number,x,"extrudedHeight",C.extrudedHeight,y,m,f),zi(xn,x,"extrudedHeightReference",C.extrudedHeightReference,y,m,f),zi(YD,x,"stRotation",C.stRotation,y,m,f),zi(Number,x,"granularity",C.granularity,y,m,f),zi(Boolean,x,"fill",C.fill,y,m,f),nB(x,"material",C.material,y,m,f),zi(Boolean,x,"outline",C.outline,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(Boolean,x,"perPositionHeight",C.perPositionHeight,y,m,f),zi(Boolean,x,"closeTop",C.closeTop,y,m,f),zi(Boolean,x,"closeBottom",C.closeBottom,y,m,f),zi(Pa,x,"arcType",C.arcType,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f),zi(Gu,x,"classificationType",C.classificationType,y,m,f),zi(Number,x,"zIndex",C.zIndex,y,m,f)}function Swi(o){return o?Pa.GEODESIC:Pa.NONE}function Dwi(o,A,f,m){let C=A.polyline;if(!O(C))return;let y=lf(C.interval),x=o.polyline;if(O(x)||(o.polyline=x=new FD),zi(Boolean,x,"show",C.show,y,m,f),$J(x,"positions",C.positions,f),zi(Number,x,"width",C.width,y,m,f),zi(Number,x,"granularity",C.granularity,y,m,f),nB(x,"material",C.material,y,m,f),nB(x,"depthFailMaterial",C.depthFailMaterial,y,m,f),zi(Pa,x,"arcType",C.arcType,y,m,f),zi(Boolean,x,"clampToGround",C.clampToGround,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f),zi(Gu,x,"classificationType",C.classificationType,y,m,f),zi(Number,x,"zIndex",C.zIndex,y,m,f),O(C.followSurface)&&!O(C.arcType)){let v={};zi(Boolean,v,"followSurface",C.followSurface,y,m,f),x.arcType=J1i(v.followSurface,Swi)}}function Twi(o,A,f,m){let C=A.polylineVolume;if(!O(C))return;let y=lf(C.interval),x=o.polylineVolume;O(x)||(o.polylineVolume=x=new yre),$J(x,"positions",C.positions,f),fwi(x,"shape",C.shape,f),zi(Boolean,x,"show",C.show,y,m,f),zi(qA,x,"cornerType",C.cornerType,y,m,f),zi(Boolean,x,"fill",C.fill,y,m,f),nB(x,"material",C.material,y,m,f),zi(Boolean,x,"outline",C.outline,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(Number,x,"granularity",C.granularity,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f)}function Mwi(o,A,f,m){let C=A.rectangle;if(!O(C))return;let y=lf(C.interval),x=o.rectangle;O(x)||(o.rectangle=x=new c6),zi(Boolean,x,"show",C.show,y,m,f),zi(Si,x,"coordinates",C.coordinates,y,m,f),zi(Number,x,"height",C.height,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(Number,x,"extrudedHeight",C.extrudedHeight,y,m,f),zi(xn,x,"extrudedHeightReference",C.extrudedHeightReference,y,m,f),zi(YD,x,"rotation",C.rotation,y,m,f),zi(YD,x,"stRotation",C.stRotation,y,m,f),zi(Number,x,"granularity",C.granularity,y,m,f),zi(Boolean,x,"fill",C.fill,y,m,f),nB(x,"material",C.material,y,m,f),zi(Boolean,x,"outline",C.outline,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f),zi(Gu,x,"classificationType",C.classificationType,y,m,f),zi(Number,x,"zIndex",C.zIndex,y,m,f)}function Pwi(o,A,f,m){let C=A.tileset;if(!O(C))return;let y=lf(C.interval),x=o.tileset;O(x)||(o.tileset=x=new mre),zi(Boolean,x,"show",C.show,y,m,f),zi(nae.default,x,"uri",C.uri,y,m,f),zi(Number,x,"maximumScreenSpaceError",C.maximumScreenSpaceError,y,m,f)}function Rwi(o,A,f,m){let C=A.wall;if(!O(C))return;let y=lf(C.interval),x=o.wall;O(x)||(o.wall=x=new EY),zi(Boolean,x,"show",C.show,y,m,f),$J(x,"positions",C.positions,f),vze(x,"minimumHeights",C.minimumHeights,f),vze(x,"maximumHeights",C.maximumHeights,f),zi(Number,x,"granularity",C.granularity,y,m,f),zi(Boolean,x,"fill",C.fill,y,m,f),nB(x,"material",C.material,y,m,f),zi(Boolean,x,"outline",C.outline,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f)}function wze(o,A,f,m,C){let y=o.id;if(O(y)||(y=Vu()),yme=y,!O(C._version)&&y!=="document")throw new nr("The first CZML packet is required to be the document object.");if(o.delete===!0)A.removeById(y);else if(y==="document")vwi(o,C);else{let x=A.getOrCreateEntity(y),v=o.parent;O(v)&&(x.parent=A.getOrCreateEntity(v));for(let E=f.length-1;E>-1;E--)f[E](x,o,A,m)}yme=void 0}function Lwi(o){let A,f=o._documentPacket.clock;if(!O(f)){if(!O(o._clock)){let C=o._entityCollection.computeAvailability();if(!C.start.equals(Cn.MINIMUM_VALUE)){let y=C.start,x=C.stop,v=fi.secondsDifference(x,y),E=Math.round(v/120);return A=new A5,A.startTime=fi.clone(y),A.stopTime=fi.clone(x),A.clockRange=aC.LOOP_STOP,A.multiplier=E,A.currentTime=fi.clone(y),A.clockStep=Jh.SYSTEM_CLOCK_MULTIPLIER,o._clock=A,!0}}return!1}O(o._clock)?A=o._clock.clone():(A=new A5,A.startTime=Cn.MINIMUM_VALUE.clone(),A.stopTime=Cn.MAXIMUM_VALUE.clone(),A.currentTime=Cn.MINIMUM_VALUE.clone(),A.clockRange=aC.LOOP_STOP,A.clockStep=Jh.SYSTEM_CLOCK_MULTIPLIER,A.multiplier=1);let m=lf(f.interval);return O(m)&&(A.startTime=m.start,A.stopTime=m.stop),O(f.currentTime)&&(A.currentTime=fi.fromIso8601(f.currentTime)),O(f.range)&&(A.clockRange=Ae(aC[f.range],aC.LOOP_STOP)),O(f.step)&&(A.clockStep=Ae(Jh[f.step],Jh.SYSTEM_CLOCK_MULTIPLIER)),O(f.multiplier)&&(A.multiplier=f.multiplier),A.equals(o._clock)?!1:(o._clock=A.clone(o._clock),!0)}function jot(o,A,f,m){f=Ae(f,Ae.EMPTY_OBJECT);let C=A,y=f.sourceUri,x=f.credit;if(typeof x=="string"&&(x=new tl(x)),o._credit=x,typeof A=="string"||A instanceof An){A=An.createIfNeeded(A),C=A.fetchJson(),y=Ae(y,A.clone());let v=o._resourceCredits,E=A.credits;if(O(E)){let I=E.length;for(let w=0;w<I;w++)v.push(E[w])}}return y=An.createIfNeeded(y),cy.setLoading(o,!0),Promise.resolve(C).then(function(v){return Fwi(o,v,y,m)}).catch(function(v){return cy.setLoading(o,!1),o._error.raiseEvent(o,v),console.log(v),Promise.reject(v)})}function Fwi(o,A,f,m){cy.setLoading(o,!0);let C=o._entityCollection;m&&(o._version=void 0,o._documentPacket=new qot,C.removeAll()),aI._processCzml(A,C,f,void 0,o);let y=Lwi(o),x=o._documentPacket;return O(x.name)&&o._name!==x.name?(o._name=x.name,y=!0):!O(o._name)&&O(f)&&(o._name=_Y(f.getUrlComponent()),y=!0),cy.setLoading(o,!1),y&&o._changed.raiseEvent(o),o}function qot(){this.name=void 0,this.clock=void 0}function aI(o){this._name=o,this._changed=new br,this._error=new br,this._isLoading=!1,this._loading=new br,this._clock=void 0,this._documentPacket=new qot,this._version=void 0,this._entityCollection=new iw(this),this._entityCluster=new tN,this._credit=void 0,this._resourceCredits=[]}aI.load=function(o,A){return new aI().load(o,A)};Object.defineProperties(aI.prototype,{name:{get:function(){return this._name}},clock:{get:function(){return this._clock}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(o){this._entityCollection.show=o}},clustering:{get:function(){return this._entityCluster},set:function(o){this._entityCluster=o}},credit:{get:function(){return this._credit}}});aI.updaters=[mwi,Cwi,ywi,xwi,Ewi,Iwi,_wi,Bwi,nwi,owi,wwi,bwi,Qwi,Dwi,Twi,uwi,Mwi,awi,Pwi,swi,Rwi,lwi,gwi];aI.prototype.process=function(o,A){return jot(this,o,A,!1)};aI.prototype.load=function(o,A){return jot(this,o,A,!0)};aI.prototype.update=function(o){return!0};aI.processPacketData=zi;aI.processPositionPacketData=Wot;aI.processMaterialPacketData=nB;aI._processCzml=function(o,A,f,m,C){if(m=Ae(m,aI.updaters),Array.isArray(o))for(let y=0,x=o.length;y<x;++y)wze(o[y],A,m,f,C);else wze(o,A,m,f,C)};var eW=aI,xme=32,Nwi="http://www.opengis.net/kml/2.2",Hb="http://www.google.com/kml/ext/2.2",kwi="http://www.w3.org/2000/xmlns/";function lae(o){this._files={},this._promises=[],this._count=0,this._modelCallback=o}var Owi=/^data:image\/([^,;]+)/;lae.prototype.texture=function(o){let A=this,f;if(typeof o=="string"||o instanceof An){if(o=An.createIfNeeded(o),!o.isDataUri)return o.url;let m=o.url.match(Owi);f=`texture_${++this._count}`,O(m)&&(f+=`.${m[1]}`);let C=o.fetchBlob().then(function(y){A._files[f]=y});return this._promises.push(C),f}if(o instanceof HTMLCanvasElement){f=`texture_${++this._count}.png`;let m=new Promise(C=>{o.toBlob(function(y){A._files[f]=y,C()})});return this._promises.push(m),f}return""};function Uwi(o,A){return function(f){o._files[A]=f}}lae.prototype.model=function(o,A){let f=this._modelCallback;if(!O(f))throw new nr("Encountered a model entity while exporting to KML, but no model callback was supplied.");let m={},C=f(o,A,m);for(let y in m)if(m.hasOwnProperty(y)){let x=Promise.resolve(m[y]);this._promises.push(x),x.then(Uwi(this,y))}return C};Object.defineProperties(lae.prototype,{promise:{get:function(){return Promise.all(this._promises)}},files:{get:function(){return this._files}}});function uae(o){this._time=o}uae.prototype.get=function(o,A,f){let m;return O(o)&&(m=O(o.getValue)?o.getValue(this._time,f):o),Ae(m,A)};uae.prototype.getColor=function(o,A){let f=this.get(o,A);if(O(f))return Dk(f)};uae.prototype.getMaterialType=function(o){if(O(o))return o.getType(this._time)};function hSe(){this._ids={},this._styles={},this._count=0}hSe.prototype.get=function(o){let A=this._ids,f=o.innerHTML;if(O(A[f]))return A[f];let m=`style-${++this._count}`;return o.setAttribute("id",m),m=`#${m}`,A[f]=m,this._styles[f]=o,m};hSe.prototype.save=function(o){let A=this._styles,f=o.childNodes[0];for(let m in A)A.hasOwnProperty(m)&&o.insertBefore(A[m],f)};function Xot(){this._ids={}}Xot.prototype.get=function(o){if(!O(o))return this.get(Vu());let A=this._ids;return O(A[o])?`${o.toString()}-${++A[o]}`:(A[o]=0,o)};function dSe(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.entities,f=Ae(o.kmz,!1),m=dSe._createState(o),C=A.values.filter(function(I){return!O(I.parent)}),y=m.kmlDoc,x=y.documentElement;x.setAttributeNS(kwi,"xmlns:gx",Hb);let v=y.createElement("Document");x.appendChild(v),$ot(m,v,C),m.styleCache.save(v);let E=m.externalFileHandler;return E.promise.then(function(){let I=new XMLSerializer().serializeToString(m.kmlDoc);return f?Gwi(I,E.files):{kml:I,externalFiles:E.files}})}function Gwi(o,A){let f=xs("ThirdParty/Workers/z-worker-pako.js");Hve({workerScripts:{deflate:[f,"./pako_deflate.min.js"],inflate:[f,"./pako_inflate.min.js"]}});let m=new Mje,C=new dGt(m);return C.add("doc.kml",new FUt(o)).then(function(){let y=Object.keys(A);return Zot(C,y,A,0)}).then(function(){return C.close()}).then(function(y){return{kmz:y}})}function Zot(o,A,f,m){if(A.length===m)return;let C=A[m];return o.add(C,new Jve(f[C])).then(function(){return Zot(o,A,f,m+1)})}dSe._createState=function(o){let A=o.entities,f=new hSe,m=A.computeAvailability(),C=O(o.time)?o.time:m.start,y=Ae(o.defaultAvailability,m),x=Ae(o.sampleDuration,60);y.start===Cn.MINIMUM_VALUE?y.stop===Cn.MAXIMUM_VALUE?y=new el:fi.addSeconds(y.stop,-10*x,y.start):y.stop===Cn.MAXIMUM_VALUE&&fi.addSeconds(y.start,10*x,y.stop);let v=new lae(o.modelCallback);return{kmlDoc:document.implementation.createDocument(Nwi,"kml"),ellipsoid:Ae(o.ellipsoid,Ti.WGS84),idManager:new Xot,styleCache:f,externalFileHandler:v,time:C,valueGetter:new uae(C),sampleDuration:x,defaultAvailability:new mx([y])}};function $ot(o,A,f){let m=o.kmlDoc,C=o.styleCache,y=o.valueGetter,x=o.idManager,v=f.length,E,I,w;for(let Q=0;Q<v;++Q){let M=f[Q];E=[],I=[],w=[],Hwi(o,M,I,w),Vwi(o,M.polyline,I,w),Qze(o,M.rectangle,I,w,E),Qze(o,M.polygon,I,w,E),Jwi(o,M,M.model,I,w);let B,T=M.availability;O(T)&&(B=m.createElement("TimeSpan"),fi.equals(T.start,Cn.MINIMUM_VALUE)||B.appendChild(xa(m,"begin",fi.toIso8601(T.start))),fi.equals(T.stop,Cn.MAXIMUM_VALUE)||B.appendChild(xa(m,"end",fi.toIso8601(T.stop))));for(let L=0;L<E.length;++L){let R=E[L];R.setAttribute("id",x.get(M.id)),R.appendChild(xa(m,"name",M.name)),R.appendChild(xa(m,"visibility",M.show)),R.appendChild(xa(m,"description",M.description)),O(B)&&R.appendChild(B),A.appendChild(R)}let D=I.length;if(D>0){let L=m.createElement("Placemark");L.setAttribute("id",x.get(M.id));let R=M.name,k=M.label;if(O(k)){let V=m.createElement("LabelStyle"),H=y.get(k.text);R=O(H)&&H.length>0?H:R;let q=y.getColor(k.fillColor);O(q)&&(V.appendChild(xa(m,"color",q)),V.appendChild(xa(m,"colorMode","normal")));let ie=y.get(k.scale);O(ie)&&V.appendChild(xa(m,"scale",ie)),w.push(V)}L.appendChild(xa(m,"name",R)),L.appendChild(xa(m,"visibility",M.show)),L.appendChild(xa(m,"description",M.description)),O(B)&&L.appendChild(B),A.appendChild(L);let U=w.length;if(U>0){let V=m.createElement("Style");for(let H=0;H<U;++H)V.appendChild(w[H]);L.appendChild(xa(m,"styleUrl",C.get(V)))}if(I.length===1)L.appendChild(I[0]);else if(I.length>1){let V=m.createElement("MultiGeometry");for(let H=0;H<D;++H)V.appendChild(I[H]);L.appendChild(V)}}let F=M._children;if(F.length>0){let L=m.createElement("Folder");L.setAttribute("id",x.get(M.id)),L.appendChild(xa(m,"name",M.name)),L.appendChild(xa(m,"visibility",M.show)),L.appendChild(xa(m,"description",M.description)),A.appendChild(L),$ot(o,L,F)}}}var GE=new ee,Tv=new Kt,Db=new fi;function Hwi(o,A,f,m){let C=o.kmlDoc,y=o.ellipsoid,x=o.valueGetter,v=Ae(A.billboard,A.point);if(!O(v)&&!O(A.path))return;let E=A.position;if(!E.isConstant){eat(o,A,v,f,m);return}x.get(E,void 0,GE);let I=xa(C,"coordinates",Sk(GE,y)),w=C.createElement("Point"),Q=C.createElement("altitudeMode");Q.appendChild(Zk(o,v.heightReference)),w.appendChild(Q),w.appendChild(I),f.push(w);let M=v instanceof eP?iat(o,v):tat(o,v);m.push(M)}function eat(o,A,f,m,C){let y=o.kmlDoc,x=o.ellipsoid,v=o.valueGetter,E,I=A.position,w=!0;I instanceof U_?(E=I.intervals,w=!1):E=Ae(A.availability,o.defaultAvailability);let Q=f instanceof xY,M,B,T,D=[];for(M=0;M<E.length;++M){let L=E.get(M),R=w?I:L.data,k=y.createElement("altitudeMode");R instanceof f6?(R=R._value,k.appendChild(Zk(o,xn.CLAMP_TO_GROUND))):O(f)?k.appendChild(Zk(o,f.heightReference)):k.appendChild(Zk(o,xn.NONE));let U=[],V=[];if(R.isConstant){v.get(R,void 0,GE);let q=xa(y,"coordinates",Sk(GE,x));U.push(fi.toIso8601(L.start)),V.push(q),U.push(fi.toIso8601(L.stop)),V.push(q)}else if(R instanceof R1)for(T=R._property._times,B=0;B<T.length;++B)U.push(fi.toIso8601(T[B])),R.getValueInReferenceFrame(T[B],s0.FIXED,GE),V.push(Sk(GE,x));else if(R instanceof uM){T=R._times;let q=R._values;for(B=0;B<T.length;++B)U.push(fi.toIso8601(T[B])),ee.fromArray(q,B*3,GE),V.push(Sk(GE,x))}else{let q=o.sampleDuration;L.start.clone(Db),L.isStartIncluded||fi.addSeconds(Db,q,Db);let ie=L.stop;for(;fi.lessThan(Db,ie);)R.getValue(Db,GE),U.push(fi.toIso8601(Db)),V.push(Sk(GE,x)),fi.addSeconds(Db,q,Db);L.isStopIncluded&&fi.equals(Db,ie)&&(R.getValue(Db,GE),U.push(fi.toIso8601(Db)),V.push(Sk(GE,x)))}let H=y.createElementNS(Hb,"Track");H.appendChild(k);for(let q=0;q<U.length;++q){let ie=xa(y,"when",U[q]),Z=xa(y,"coord",V[q],Hb);H.appendChild(ie),H.appendChild(Z)}Q&&H.appendChild(rat(o,f)),D.push(H)}if(D.length===1)m.push(D[0]);else if(D.length>1){let L=y.createElementNS(Hb,"MultiTrack");for(M=0;M<D.length;++M)L.appendChild(D[M]);m.push(L)}if(O(f)&&!Q){let L=f instanceof eP?iat(o,f):tat(o,f);C.push(L)}let F=A.path;if(O(F)){let L=v.get(F.width),R=F.material;if(O(R)||O(L)){let k=y.createElement("LineStyle");O(L)&&k.appendChild(xa(y,"width",L)),fSe(o,R,k),C.push(k)}}}function tat(o,A){let f=o.kmlDoc,m=o.valueGetter,C=f.createElement("IconStyle"),y=m.getColor(A.color);O(y)&&(C.appendChild(xa(f,"color",y)),C.appendChild(xa(f,"colorMode","normal")));let x=m.get(A.pixelSize);return O(x)&&C.appendChild(xa(f,"scale",x/xme)),C}function iat(o,A){let f=o.kmlDoc,m=o.valueGetter,C=o.externalFileHandler,y=f.createElement("IconStyle"),x=m.get(A.image);if(O(x)){x=C.texture(x);let M=f.createElement("Icon");M.appendChild(xa(f,"href",x));let B=m.get(A.imageSubRegion);O(B)&&(M.appendChild(xa(f,"x",B.x,Hb)),M.appendChild(xa(f,"y",B.y,Hb)),M.appendChild(xa(f,"w",B.width,Hb)),M.appendChild(xa(f,"h",B.height,Hb))),y.appendChild(M)}let v=m.getColor(A.color);O(v)&&(y.appendChild(xa(f,"color",v)),y.appendChild(xa(f,"colorMode","normal")));let E=m.get(A.scale);O(E)&&y.appendChild(xa(f,"scale",E));let I=m.get(A.pixelOffset);if(O(I)){E=Ae(E,1),Bt.divideByScalar(I,E,I);let M=m.get(A.width,xme),B=m.get(A.height,xme),T=m.get(A.horizontalOrigin,tA.CENTER);T===tA.CENTER?I.x-=M*.5:T===tA.RIGHT&&(I.x-=M);let D=m.get(A.verticalOrigin,wn.CENTER);D===wn.TOP?I.y+=B:D===wn.CENTER&&(I.y+=B*.5);let F=f.createElement("hotSpot");F.setAttribute("x",-I.x),F.setAttribute("y",I.y),F.setAttribute("xunits","pixels"),F.setAttribute("yunits","pixels"),y.appendChild(F)}let w=m.get(A.rotation),Q=m.get(A.alignedAxis);return O(w)&&ee.equals(ee.UNIT_Z,Q)&&(w=je.toDegrees(-w),w===0&&(w=360),y.appendChild(xa(f,"heading",w))),y}function Vwi(o,A,f,m){let C=o.kmlDoc,y=o.ellipsoid,x=o.valueGetter;if(!O(A))return;let v=C.createElement("LineString"),E=C.createElement("altitudeMode"),I=x.get(A.clampToGround,!1),w;I?(v.appendChild(xa(C,"tessellate",!0)),w=C.createTextNode("clampToGround")):w=C.createTextNode("absolute"),E.appendChild(w),v.appendChild(E);let Q=A.positions,M=x.get(Q),B=xa(C,"coordinates",Sk(M,y));v.appendChild(B);let T=x.get(A.zIndex);I&&O(T)&&v.appendChild(xa(C,"drawOrder",T,Hb)),f.push(v);let D=C.createElement("LineStyle"),F=x.get(A.width);O(F)&&D.appendChild(xa(C,"width",F)),fSe(o,A.material,D),m.push(D)}function zwi(o,A,f){let m=o.kmlDoc,C=o.valueGetter,y=C.get(A.height,0);f>0&&(y=f);let x=A.coordinates,v=C.get(x),E=[],I=[Si.northeast,Si.southeast,Si.southwest,Si.northwest];for(let B=0;B<4;++B)I[B](v,Tv),E.push(`${je.toDegrees(Tv.longitude)},${je.toDegrees(Tv.latitude)},${y}`);let w=xa(m,"coordinates",E.join(" ")),Q=m.createElement("outerBoundaryIs"),M=m.createElement("LinearRing");return M.appendChild(w),Q.appendChild(M),[Q]}function bze(o,A,f,m){let C=o.kmlDoc,y=o.ellipsoid,x=[],v=A.length;for(let w=0;w<v;++w)Kt.fromCartesian(A[w],y,Tv),x.push(`${je.toDegrees(Tv.longitude)},${je.toDegrees(Tv.latitude)},${m?Tv.height:f}`);let E=xa(C,"coordinates",x.join(" ")),I=C.createElement("LinearRing");return I.appendChild(E),I}function Kwi(o,A,f){let m=o.kmlDoc,C=o.valueGetter,y=C.get(A.height,0),x=C.get(A.perPositionHeight,!1);!x&&f>0&&(y=f);let v=[],E=A.hierarchy,I=C.get(E),w=Array.isArray(I)?I:I.positions,Q=m.createElement("outerBoundaryIs");Q.appendChild(bze(o,w,y,x)),v.push(Q);let M=I.holes;if(O(M)){let B=M.length;for(let T=0;T<B;++T){let D=m.createElement("innerBoundaryIs");D.appendChild(bze(o,M[T].positions,y,x)),v.push(D)}}return v}function Qze(o,A,f,m,C){let y=o.kmlDoc,x=o.valueGetter;if(!O(A))return;let v=A instanceof c6;if(v&&x.getMaterialType(A.material)==="Image"){Ywi(o,A,C);return}let E=y.createElement("Polygon"),I=x.get(A.extrudedHeight,0);I>0&&E.appendChild(xa(y,"extrude",!0));let w=v?zwi(o,A,I):Kwi(o,A,I),Q=w.length;for(let F=0;F<Q;++F)E.appendChild(w[F]);let M=y.createElement("altitudeMode");M.appendChild(Zk(o,A.heightReference)),E.appendChild(M),f.push(E);let B=y.createElement("PolyStyle"),T=x.get(A.fill,!1);T&&B.appendChild(xa(y,"fill",T)),fSe(o,A.material,B);let D=x.get(A.outline,!1);if(D){B.appendChild(xa(y,"outline",D));let F=y.createElement("LineStyle"),L=x.get(A.outlineWidth,1);F.appendChild(xa(y,"width",L));let R=x.getColor(A.outlineColor,At.BLACK);F.appendChild(xa(y,"color",R)),F.appendChild(xa(y,"colorMode","normal")),m.push(F)}m.push(B)}function Ywi(o,A,f){let m=o.kmlDoc,C=o.valueGetter,y=o.externalFileHandler,x=m.createElement("GroundOverlay"),v=m.createElement("altitudeMode");v.appendChild(Zk(o,A.heightReference)),x.appendChild(v);let E=C.get(A.height);O(E)&&x.appendChild(xa(m,"altitude",E));let I=C.get(A.coordinates),w=m.createElement("LatLonBox");w.appendChild(xa(m,"north",je.toDegrees(I.north))),w.appendChild(xa(m,"south",je.toDegrees(I.south))),w.appendChild(xa(m,"east",je.toDegrees(I.east))),w.appendChild(xa(m,"west",je.toDegrees(I.west))),x.appendChild(w);let Q=C.get(A.material),M=y.texture(Q.image),B=m.createElement("Icon");B.appendChild(xa(m,"href",M)),x.appendChild(B);let T=Q.color;O(T)&&x.appendChild(xa(m,"color",Dk(Q.color))),f.push(x)}function rat(o,A){let f=o.kmlDoc,m=o.valueGetter,C=o.externalFileHandler,y=f.createElement("Model"),x=m.get(A.scale);if(O(x)){let I=f.createElement("scale");I.appendChild(xa(f,"x",x)),I.appendChild(xa(f,"y",x)),I.appendChild(xa(f,"z",x)),y.appendChild(I)}let v=f.createElement("Link"),E=C.model(A,o.time);return v.appendChild(xa(f,"href",E)),y.appendChild(v),y}function Jwi(o,A,f,m,C){let y=o.kmlDoc,x=o.ellipsoid,v=o.valueGetter;if(!O(f))return;let E=A.position;if(!E.isConstant){eat(o,A,f,m,C);return}let I=rat(o,f),w=y.createElement("altitudeMode");w.appendChild(Zk(o,f.heightReference)),I.appendChild(w),v.get(E,void 0,GE),Kt.fromCartesian(GE,x,Tv);let Q=y.createElement("Location");Q.appendChild(xa(y,"longitude",je.toDegrees(Tv.longitude))),Q.appendChild(xa(y,"latitude",je.toDegrees(Tv.latitude))),Q.appendChild(xa(y,"altitude",Tv.height)),I.appendChild(Q),m.push(I)}function fSe(o,A,f){let m=o.kmlDoc,C=o.valueGetter;if(!O(A))return;let y=C.get(A);if(!O(y))return;let x,v=C.getMaterialType(A),E,I;switch(v){case"Image":x=Dk(At.WHITE);break;case"Color":case"Grid":case"PolylineGlow":case"PolylineArrow":case"PolylineDash":x=Dk(y.color);break;case"PolylineOutline":x=Dk(y.color),E=Dk(y.outlineColor),I=y.outlineWidth,f.appendChild(xa(m,"outerColor",E,Hb)),f.appendChild(xa(m,"outerWidth",I,Hb));break;case"Stripe":x=Dk(y.oddColor);break}O(x)&&(f.appendChild(xa(m,"color",x)),f.appendChild(xa(m,"colorMode","normal")))}function Zk(o,A){let f=o.kmlDoc,m=o.valueGetter.get(A,xn.NONE),C;switch(m){case xn.NONE:C=f.createTextNode("absolute");break;case xn.CLAMP_TO_GROUND:C=f.createTextNode("clampToGround");break;case xn.RELATIVE_TO_GROUND:C=f.createTextNode("relativeToGround");break}return C}function Sk(o,A){Array.isArray(o)||(o=[o]);let f=o.length,m=[];for(let C=0;C<f;++C)Kt.fromCartesian(o[C],A,Tv),m.push(`${je.toDegrees(Tv.longitude)},${je.toDegrees(Tv.latitude)},${Tv.height}`);return m.join(" ")}function xa(o,A,f,m){f=Ae(f,""),typeof f=="boolean"&&(f=f?"1":"0");let C=O(m)?o.createElementNS(m,A):o.createElement(A),y=f==="string"&&f.indexOf("<")!==-1?o.createCDATASection(f):o.createTextNode(f);return C.appendChild(y),C}function Dk(o){let A="",f=o.toBytes();for(let m=3;m>=0;--m)A+=f[m]<16?`0${f[m].toString(16)}`:f[m].toString(16);return A}var nat=dSe,oat;typeof DOMParser<"u"&&(oat=new DOMParser);var Wwi=new nje({stripPrefix:!1,email:!1,replaceFn:function(o,A){if(!A.protocolUrlMatch)return!1}}),die=32,Sze=2414016,Dze=1,Tze=16093e3,Mze=.1,jwi=[null,void 0,"http://www.topografix.com/GPX/1/1"],XA={gpx:jwi};function qwi(o){return new Promise((A,f)=>{let m=new FileReader;m.addEventListener("load",function(){A(m.result)}),m.addEventListener("error",function(){f(m.error)}),m.readAsText(o)})}function gSe(o,A){let f=KK(o,"id");return f=O(f)?f:Vu(),A.getOrCreateEntity(f)}function pSe(o){let A=Pze(o,"lon"),f=Pze(o,"lat"),m=i7(o,"ele",XA.gpx);return ee.fromDegrees(A,f,m)}function Pze(o,A){if(!O(o))return;let f=o.getAttribute(A);if(f!==null){let m=parseFloat(f);return isNaN(m)?void 0:m}}function KK(o,A){if(!O(o))return;let f=o.getAttribute(A);return f!==null?f:void 0}function xN(o,A,f){if(!O(o))return;let m=o.childNodes,C=m.length;for(let y=0;y<C;y++){let x=m[y];if(x.localName===A&&f.indexOf(x.namespaceURI)!==-1)return x}}function mSe(o,A,f){if(!O(o))return;let m=[],C=o.getElementsByTagName(A),y=C.length;for(let x=0;x<y;x++){let v=C[x];v.localName===A&&f.indexOf(v.namespaceURI)!==-1&&m.push(v)}return m}function i7(o,A,f){let m=xN(o,A,f);if(O(m)){let C=parseFloat(m.textContent);return isNaN(C)?void 0:C}}function XE(o,A,f){let m=xN(o,A,f);if(O(m))return m.textContent.trim()}function aat(o){let A=new eP;return A.width=die,A.height=die,A.scaleByDistance=new To(Sze,Dze,Tze,Mze),A.pixelOffsetScaleByDistance=new To(Sze,Dze,Tze,Mze),A.verticalOrigin=new bc(wn.BOTTOM),A.image=o,A}function Xwi(){let o=new u6;return o.translucencyByDistance=new To(3e6,1,5e6,0),o.pixelOffset=new Bt(17,0),o.horizontalOrigin=tA.LEFT,o.font="16px sans-serif",o.style=pA.FILL_AND_OUTLINE,o}function sat(o){let A=new FD;return A.width=4,A.material=new JM,A.material.color=O(o)?o:At.RED,A.material.outlineWidth=2,A.material.outlineColor=At.BLACK,A}var Rze={time:{text:"Time",tag:"time"},comment:{text:"Comment",tag:"cmt"},description:{text:"Description",tag:"desc"},source:{text:"Source",tag:"src"},number:{text:"GPS track/route number",tag:"number"},type:{text:"Type",tag:"type"}},r7;typeof document<"u"&&(r7=document.createElement("div"));function CSe(o,A){let f,m="",C=Object.keys(Rze),y=C.length;for(f=0;f<y;f++){let w=C[f],Q=Rze[w];Q.value=Ae(XE(o,Q.tag,XA.gpx),""),O(Q.value)&&Q.value!==""&&(m=`${m}<p>${Q.text}: ${Q.value}</p>`)}if(!O(m)||m==="")return;m=Wwi.link(m),r7.innerHTML=m;let x=r7.querySelectorAll("a");for(f=0;f<x.length;f++)x[f].setAttribute("target","_blank");let v=At.WHITE,E=At.BLACK,I='<div class="cesium-infoBox-description-lighter" style="';return I+="overflow:auto;",I+="word-wrap:break-word;",I+=`background-color:${v.toCssColorString()};`,I+=`color:${E.toCssColorString()};`,I+='">',I+=`${r7.innerHTML}</div>`,r7.innerHTML="",I}function lat(o,A,f,m){let C=pSe(A),y=gSe(A,f);y.position=C;let x=O(m.waypointImage)?m.waypointImage:o._pinBuilder.fromMakiIconId("marker",At.RED,die);y.billboard=aat(x);let v=XE(A,"name",XA.gpx);y.name=v,y.label=Xwi(),y.label.text=v,y.description=CSe(A,y),m.clampToGround&&(y.billboard.heightReference=xn.CLAMP_TO_GROUND,y.label.heightReference=xn.CLAMP_TO_GROUND)}function Zwi(o,A,f,m){let C=gSe(A,f);C.description=CSe(A,C);let y=mSe(A,"rtept",XA.gpx),x=new Array(y.length);for(let v=0;v<y.length;v++)lat(o,y[v],f,m),x[v]=pSe(y[v]);C.polyline=sat(m.routeColor),m.clampToGround&&(C.polyline.clampToGround=!0),C.polyline.positions=x}function $wi(o,A,f,m){let C=gSe(A,f);C.description=CSe(A,C);let y=mSe(A,"trkseg",XA.gpx),x=[],v=[],E,I=!0,w=new R1;for(let Q=0;Q<y.length;Q++)E=ebi(y[Q]),x=x.concat(E.positions),E.times.length>0?(v=v.concat(E.times),w.addSamples(v,x),I=I&&!0):I=!1;if(I){let Q=O(m.waypointImage)?m.waypointImage:o._pinBuilder.fromMakiIconId("marker",At.RED,die);C.billboard=aat(Q),C.position=w,m.clampToGround&&(C.billboard.heightReference=xn.CLAMP_TO_GROUND),C.availability=new mx,C.availability.addInterval(new el({start:v[0],stop:v[v.length-1]}))}C.polyline=sat(m.trackColor),C.polyline.positions=x,m.clampToGround&&(C.polyline.clampToGround=!0)}function ebi(o){let A={positions:[],times:[]},f=mSe(o,"trkpt",XA.gpx),m;for(let C=0;C<f.length;C++){let y=pSe(f[C]);A.positions.push(y),m=XE(f[C],"time",XA.gpx),O(m)&&A.times.push(fi.fromIso8601(m))}return A}function tbi(o){let A=xN(o,"metadata",XA.gpx);if(O(A)){let f={name:XE(A,"name",XA.gpx),desc:XE(A,"desc",XA.gpx),author:ibi(A),copyright:nbi(A),link:uat(A),time:XE(A,"time",XA.gpx),keywords:XE(A,"keywords",XA.gpx),bounds:obi(A)};if(O(f.name)||O(f.desc)||O(f.author)||O(f.copyright)||O(f.link)||O(f.time)||O(f.keywords)||O(f.bounds))return f}}function ibi(o){let A=xN(o,"author",XA.gpx);if(O(A)){let f={name:XE(A,"name",XA.gpx),email:rbi(A),link:uat(A)};if(O(f.name)||O(f.email)||O(f.link))return f}}function rbi(o){let A=xN(o,"email",XA.gpx);if(O(A)){let f=XE(A,"id",XA.gpx),m=XE(A,"domain",XA.gpx);return`${f}@${m}`}}function uat(o){let A=xN(o,"link",XA.gpx);if(O(A)){let f={href:KK(A,"href"),text:XE(A,"text",XA.gpx),mimeType:XE(A,"type",XA.gpx)};if(O(f.href)||O(f.text)||O(f.mimeType))return f}}function nbi(o){let A=xN(o,"copyright",XA.gpx);if(O(A)){let f={author:KK(A,"author"),year:XE(A,"year",XA.gpx),license:XE(A,"license",XA.gpx)};if(O(f.author)||O(f.year)||O(f.license))return f}}function obi(o){let A=xN(o,"bounds",XA.gpx);if(O(A)){let f={minLat:i7(A,"minlat",XA.gpx),maxLat:i7(A,"maxlat",XA.gpx),minLon:i7(A,"minlon",XA.gpx),maxLon:i7(A,"maxlon",XA.gpx)};if(O(f.minLat)||O(f.maxLat)||O(f.minLon)||O(f.maxLon))return f}}var Lze={wpt:lat,rte:Zwi,trk:$wi};function abi(o,A,f,m){let C=Object.keys(Lze),y=C.length;for(let x=0;x<y;x++){let v=C[x],E=Lze[v],I=A.childNodes,w=I.length;for(let Q=0;Q<w;Q++){let M=I[Q];M.localName===v&&XA.gpx.indexOf(M.namespaceURI)!==-1&&E(o,M,f,m)}}}function Fze(o,A,f){let m=o._entityCollection;m.removeAll();let C=A.documentElement,y=KK(C,"version"),x=KK(C,"creator"),v,E=tbi(C);O(E)&&(v=E.name),C.localName==="gpx"?abi(o,C,m,f):console.log(`GPX - Unsupported node: ${C.localName}`);let I,w=m.computeAvailability(),Q=w.start,M=w.stop,B=fi.equals(Q,Cn.MINIMUM_VALUE),T=fi.equals(M,Cn.MAXIMUM_VALUE);if(!B||!T){let F;B&&(F=new Date,F.setHours(0,0,0,0),Q=fi.fromDate(F)),T&&(F=new Date,F.setHours(24,0,0,0),M=fi.fromDate(F)),I=new A5,I.startTime=Q,I.stopTime=M,I.currentTime=fi.clone(Q),I.clockRange=aC.LOOP_STOP,I.clockStep=Jh.SYSTEM_CLOCK_MULTIPLIER,I.multiplier=Math.round(Math.min(Math.max(fi.secondsDifference(M,Q)/60,1),31556900))}let D=!1;return o._name!==v&&(o._name=v,D=!0),o._creator!==x&&(o._creator=x,D=!0),sbi(o._metadata,E)&&(o._metadata=E,D=!0),o._version!==y&&(o._version=y,D=!0),I!==o._clock&&(D=!0,o._clock=I),D&&o._changed.raiseEvent(o),cy.setLoading(o,!1),o}function sbi(o,A){return!O(o)&&!O(A)?!1:O(o)&&O(A)?o.name!==A.name||o.dec!==A.desc||o.src!==A.src||o.author!==A.author||o.copyright!==A.copyright||o.link!==A.link||o.time!==A.time||o.bounds!==A.bounds:!0}function lbi(o,A,f,m){m=Ae(m,Ae.EMPTY_OBJECT);let C=f;if(typeof f=="string"||f instanceof An){f=An.createIfNeeded(f),C=f.fetchBlob();let y=o._resourceCredits,x=f.credits;if(O(x)){let v=x.length;for(let E=0;E<v;E++)y.push(x[E])}}return Promise.resolve(C).then(function(y){return y instanceof Blob?qwi(y).then(function(x){let v,E;try{v=oat.parseFromString(x,"application/xml")}catch(I){E=I.toString()}if(O(E)||v.body||v.documentElement.tagName==="parsererror"){let I=O(E)?E:v.documentElement.firstChild.nodeValue;throw I||(I=v.body.innerText),new nr(I)}return Fze(o,v,m)}):Fze(o,y,m)}).catch(function(y){return o._error.raiseEvent(o,y),console.log(y),Promise.reject(y)})}function V8(){this._changed=new br,this._error=new br,this._loading=new br,this._clock=void 0,this._entityCollection=new iw,this._entityCluster=new tN,this._name=void 0,this._version=void 0,this._creator=void 0,this._metadata=void 0,this._isLoading=!1,this._pinBuilder=new BY}V8.load=function(o,A){return new V8().load(o,A)};Object.defineProperties(V8.prototype,{name:{get:function(){return this._name}},version:{get:function(){return this._version}},creator:{get:function(){return this._creator}},metadata:{get:function(){return this._metadata}},clock:{get:function(){return this._clock}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(o){this._entityCollection.show=o}},clustering:{get:function(){return this._entityCluster},set:function(o){this._entityCluster=o}}});V8.prototype.update=function(o){return!0};V8.prototype.load=function(o,A){if(!O(o))throw new Ui("data is required.");A=Ae(A,Ae.EMPTY_OBJECT),cy.setLoading(this,!0);let f=this._name,m=this;return lbi(this,this._entityCollection,o,A).then(function(){let C,y=m._entityCollection.computeAvailability(),x=y.start,v=y.stop,E=fi.equals(x,Cn.MINIMUM_VALUE),I=fi.equals(v,Cn.MAXIMUM_VALUE);if(!E||!I){let Q;E&&(Q=new Date,Q.setHours(0,0,0,0),x=fi.fromDate(Q)),I&&(Q=new Date,Q.setHours(24,0,0,0),v=fi.fromDate(Q)),C=new A5,C.startTime=x,C.stopTime=v,C.currentTime=fi.clone(x),C.clockRange=aC.LOOP_STOP,C.clockStep=Jh.SYSTEM_CLOCK_MULTIPLIER,C.multiplier=Math.round(Math.min(Math.max(fi.secondsDifference(v,x)/60,1),31556900))}let w=!1;return C!==m._clock&&(m._clock=C,w=!0),f!==m._name&&(w=!0),w&&m._changed.raiseEvent(m),cy.setLoading(m,!1),m}).catch(function(C){return cy.setLoading(m,!1),m._error.raiseEvent(m,C),console.log(C),Promise.reject(C)})};var ySe=V8;function tW(){Ui.throwInstantiationError()}tW.prototype.update=Ui.throwInstantiationError;tW.prototype.getBoundingSphere=Ui.throwInstantiationError;tW.prototype.isDestroyed=Ui.throwInstantiationError;tW.prototype.destroy=Ui.throwInstantiationError;var cat=tW,Aat={};(function(o,A){o.CryptoJS=A()})(Aat,function(){var o=o||function(A,f){var m;if(typeof window<"u"&&window.crypto&&(m=window.crypto),typeof self<"u"&&self.crypto&&(m=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(m=globalThis.crypto),!m&&typeof window<"u"&&window.msCrypto&&(m=window.msCrypto),!m&&typeof global<"u"&&global.crypto&&(m=global.crypto),!m&&typeof sM=="function")try{m=sM("crypto")}catch{}var C=function(){if(m){if(typeof m.getRandomValues=="function")try{return m.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof m.randomBytes=="function")try{return m.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},y=Object.create||function(){function L(){}return function(R){var k;return L.prototype=R,k=new L,L.prototype=null,k}}(),x={},v=x.lib={},E=v.Base=function(){return{extend:function(L){var R=y(this);return L&&R.mixIn(L),(!R.hasOwnProperty("init")||this.init===R.init)&&(R.init=function(){R.$super.init.apply(this,arguments)}),R.init.prototype=R,R.$super=this,R},create:function(){var L=this.extend();return L.init.apply(L,arguments),L},init:function(){},mixIn:function(L){for(var R in L)L.hasOwnProperty(R)&&(this[R]=L[R]);L.hasOwnProperty("toString")&&(this.toString=L.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),I=v.WordArray=E.extend({init:function(L,R){L=this.words=L||[],R!=f?this.sigBytes=R:this.sigBytes=L.length*4},toString:function(L){return(L||Q).stringify(this)},concat:function(L){var R=this.words,k=L.words,U=this.sigBytes,V=L.sigBytes;if(this.clamp(),U%4)for(var H=0;H<V;H++){var q=k[H>>>2]>>>24-H%4*8&255;R[U+H>>>2]|=q<<24-(U+H)%4*8}else for(var ie=0;ie<V;ie+=4)R[U+ie>>>2]=k[ie>>>2];return this.sigBytes+=V,this},clamp:function(){var L=this.words,R=this.sigBytes;L[R>>>2]&=4294967295<<32-R%4*8,L.length=A.ceil(R/4)},clone:function(){var L=E.clone.call(this);return L.words=this.words.slice(0),L},random:function(L){for(var R=[],k=0;k<L;k+=4)R.push(C());return new I.init(R,L)}}),w=x.enc={},Q=w.Hex={stringify:function(L){for(var R=L.words,k=L.sigBytes,U=[],V=0;V<k;V++){var H=R[V>>>2]>>>24-V%4*8&255;U.push((H>>>4).toString(16)),U.push((H&15).toString(16))}return U.join("")},parse:function(L){for(var R=L.length,k=[],U=0;U<R;U+=2)k[U>>>3]|=parseInt(L.substr(U,2),16)<<24-U%8*4;return new I.init(k,R/2)}},M=w.Latin1={stringify:function(L){for(var R=L.words,k=L.sigBytes,U=[],V=0;V<k;V++){var H=R[V>>>2]>>>24-V%4*8&255;U.push(String.fromCharCode(H))}return U.join("")},parse:function(L){for(var R=L.length,k=[],U=0;U<R;U++)k[U>>>2]|=(L.charCodeAt(U)&255)<<24-U%4*8;return new I.init(k,R)}},B=w.Utf8={stringify:function(L){try{return decodeURIComponent(escape(M.stringify(L)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(L){return M.parse(unescape(encodeURIComponent(L)))}},T=v.BufferedBlockAlgorithm=E.extend({reset:function(){this._data=new I.init,this._nDataBytes=0},_append:function(L){typeof L=="string"&&(L=B.parse(L)),this._data.concat(L),this._nDataBytes+=L.sigBytes},_process:function(L){var R,k=this._data,U=k.words,V=k.sigBytes,H=this.blockSize,q=H*4,ie=V/q;L?ie=A.ceil(ie):ie=A.max((ie|0)-this._minBufferSize,0);var Z=ie*H,oe=A.min(Z*4,V);if(Z){for(var ne=0;ne<Z;ne+=H)this._doProcessBlock(U,ne);R=U.splice(0,Z),k.sigBytes-=oe}return new I.init(R,oe)},clone:function(){var L=E.clone.call(this);return L._data=this._data.clone(),L},_minBufferSize:0}),D=v.Hasher=T.extend({cfg:E.extend(),init:function(L){this.cfg=this.cfg.extend(L),this.reset()},reset:function(){T.reset.call(this),this._doReset()},update:function(L){return this._append(L),this._process(),this},finalize:function(L){L&&this._append(L);var R=this._doFinalize();return R},blockSize:512/32,_createHelper:function(L){return function(R,k){return new L.init(k).finalize(R)}},_createHmacHelper:function(L){return function(R,k){return new F.HMAC.init(L,k).finalize(R)}}}),F=x.algo={};return x}(Math);(function(A){var f=o,m=f.lib,C=m.Base,y=m.WordArray,x=f.x64={},v=x.Word=C.extend({init:function(I,w){this.high=I,this.low=w}}),E=x.WordArray=C.extend({init:function(I,w){I=this.words=I||[],w!=A?this.sigBytes=w:this.sigBytes=I.length*8},toX32:function(){for(var I=this.words,w=I.length,Q=[],M=0;M<w;M++){var B=I[M];Q.push(B.high),Q.push(B.low)}return y.create(Q,this.sigBytes)},clone:function(){for(var I=C.clone.call(this),w=I.words=this.words.slice(0),Q=w.length,M=0;M<Q;M++)w[M]=w[M].clone();return I}})})(),function(){if(typeof ArrayBuffer=="function"){var A=o,f=A.lib,m=f.WordArray,C=m.init,y=m.init=function(x){if(x instanceof ArrayBuffer&&(x=new Uint8Array(x)),(x instanceof Int8Array||typeof Uint8ClampedArray<"u"&&x instanceof Uint8ClampedArray||x instanceof Int16Array||x instanceof Uint16Array||x instanceof Int32Array||x instanceof Uint32Array||x instanceof Float32Array||x instanceof Float64Array)&&(x=new Uint8Array(x.buffer,x.byteOffset,x.byteLength)),x instanceof Uint8Array){for(var v=x.byteLength,E=[],I=0;I<v;I++)E[I>>>2]|=x[I]<<24-I%4*8;C.call(this,E,v)}else C.apply(this,arguments)};y.prototype=m}}(),function(){var A=o,f=A.lib,m=f.WordArray,C=A.enc,y=C.Utf16=C.Utf16BE={stringify:function(v){for(var E=v.words,I=v.sigBytes,w=[],Q=0;Q<I;Q+=2){var M=E[Q>>>2]>>>16-Q%4*8&65535;w.push(String.fromCharCode(M))}return w.join("")},parse:function(v){for(var E=v.length,I=[],w=0;w<E;w++)I[w>>>1]|=v.charCodeAt(w)<<16-w%2*16;return m.create(I,E*2)}};C.Utf16LE={stringify:function(v){for(var E=v.words,I=v.sigBytes,w=[],Q=0;Q<I;Q+=2){var M=x(E[Q>>>2]>>>16-Q%4*8&65535);w.push(String.fromCharCode(M))}return w.join("")},parse:function(v){for(var E=v.length,I=[],w=0;w<E;w++)I[w>>>1]|=x(v.charCodeAt(w)<<16-w%2*16);return m.create(I,E*2)}};function x(v){return v<<8&4278255360|v>>>8&16711935}}(),function(){var A=o,f=A.lib,m=f.WordArray,C=A.enc,y=C.Base64={stringify:function(v){var E=v.words,I=v.sigBytes,w=this._map;v.clamp();for(var Q=[],M=0;M<I;M+=3)for(var B=E[M>>>2]>>>24-M%4*8&255,T=E[M+1>>>2]>>>24-(M+1)%4*8&255,D=E[M+2>>>2]>>>24-(M+2)%4*8&255,F=B<<16|T<<8|D,L=0;L<4&&M+L*.75<I;L++)Q.push(w.charAt(F>>>6*(3-L)&63));var R=w.charAt(64);if(R)for(;Q.length%4;)Q.push(R);return Q.join("")},parse:function(v){var E=v.length,I=this._map,w=this._reverseMap;if(!w){w=this._reverseMap=[];for(var Q=0;Q<I.length;Q++)w[I.charCodeAt(Q)]=Q}var M=I.charAt(64);if(M){var B=v.indexOf(M);B!==-1&&(E=B)}return x(v,E,w)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function x(v,E,I){for(var w=[],Q=0,M=0;M<E;M++)if(M%4){var B=I[v.charCodeAt(M-1)]<<M%4*2,T=I[v.charCodeAt(M)]>>>6-M%4*2,D=B|T;w[Q>>>2]|=D<<24-Q%4*8,Q++}return m.create(w,Q)}}(),function(){var A=o,f=A.lib,m=f.WordArray,C=A.enc,y=C.Base64url={stringify:function(v,E=!0){var I=v.words,w=v.sigBytes,Q=E?this._safe_map:this._map;v.clamp();for(var M=[],B=0;B<w;B+=3)for(var T=I[B>>>2]>>>24-B%4*8&255,D=I[B+1>>>2]>>>24-(B+1)%4*8&255,F=I[B+2>>>2]>>>24-(B+2)%4*8&255,L=T<<16|D<<8|F,R=0;R<4&&B+R*.75<w;R++)M.push(Q.charAt(L>>>6*(3-R)&63));var k=Q.charAt(64);if(k)for(;M.length%4;)M.push(k);return M.join("")},parse:function(v,E=!0){var I=v.length,w=E?this._safe_map:this._map,Q=this._reverseMap;if(!Q){Q=this._reverseMap=[];for(var M=0;M<w.length;M++)Q[w.charCodeAt(M)]=M}var B=w.charAt(64);if(B){var T=v.indexOf(B);T!==-1&&(I=T)}return x(v,I,Q)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function x(v,E,I){for(var w=[],Q=0,M=0;M<E;M++)if(M%4){var B=I[v.charCodeAt(M-1)]<<M%4*2,T=I[v.charCodeAt(M)]>>>6-M%4*2,D=B|T;w[Q>>>2]|=D<<24-Q%4*8,Q++}return m.create(w,Q)}}(),function(A){var f=o,m=f.lib,C=m.WordArray,y=m.Hasher,x=f.algo,v=[];(function(){for(var B=0;B<64;B++)v[B]=A.abs(A.sin(B+1))*4294967296|0})();var E=x.MD5=y.extend({_doReset:function(){this._hash=new C.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(B,T){for(var D=0;D<16;D++){var F=T+D,L=B[F];B[F]=(L<<8|L>>>24)&16711935|(L<<24|L>>>8)&4278255360}var R=this._hash.words,k=B[T+0],U=B[T+1],V=B[T+2],H=B[T+3],q=B[T+4],ie=B[T+5],Z=B[T+6],oe=B[T+7],ne=B[T+8],se=B[T+9],ce=B[T+10],j=B[T+11],de=B[T+12],me=B[T+13],_e=B[T+14],Be=B[T+15],Qe=R[0],Ie=R[1],ve=R[2],K=R[3];Qe=I(Qe,Ie,ve,K,k,7,v[0]),K=I(K,Qe,Ie,ve,U,12,v[1]),ve=I(ve,K,Qe,Ie,V,17,v[2]),Ie=I(Ie,ve,K,Qe,H,22,v[3]),Qe=I(Qe,Ie,ve,K,q,7,v[4]),K=I(K,Qe,Ie,ve,ie,12,v[5]),ve=I(ve,K,Qe,Ie,Z,17,v[6]),Ie=I(Ie,ve,K,Qe,oe,22,v[7]),Qe=I(Qe,Ie,ve,K,ne,7,v[8]),K=I(K,Qe,Ie,ve,se,12,v[9]),ve=I(ve,K,Qe,Ie,ce,17,v[10]),Ie=I(Ie,ve,K,Qe,j,22,v[11]),Qe=I(Qe,Ie,ve,K,de,7,v[12]),K=I(K,Qe,Ie,ve,me,12,v[13]),ve=I(ve,K,Qe,Ie,_e,17,v[14]),Ie=I(Ie,ve,K,Qe,Be,22,v[15]),Qe=w(Qe,Ie,ve,K,U,5,v[16]),K=w(K,Qe,Ie,ve,Z,9,v[17]),ve=w(ve,K,Qe,Ie,j,14,v[18]),Ie=w(Ie,ve,K,Qe,k,20,v[19]),Qe=w(Qe,Ie,ve,K,ie,5,v[20]),K=w(K,Qe,Ie,ve,ce,9,v[21]),ve=w(ve,K,Qe,Ie,Be,14,v[22]),Ie=w(Ie,ve,K,Qe,q,20,v[23]),Qe=w(Qe,Ie,ve,K,se,5,v[24]),K=w(K,Qe,Ie,ve,_e,9,v[25]),ve=w(ve,K,Qe,Ie,H,14,v[26]),Ie=w(Ie,ve,K,Qe,ne,20,v[27]),Qe=w(Qe,Ie,ve,K,me,5,v[28]),K=w(K,Qe,Ie,ve,V,9,v[29]),ve=w(ve,K,Qe,Ie,oe,14,v[30]),Ie=w(Ie,ve,K,Qe,de,20,v[31]),Qe=Q(Qe,Ie,ve,K,ie,4,v[32]),K=Q(K,Qe,Ie,ve,ne,11,v[33]),ve=Q(ve,K,Qe,Ie,j,16,v[34]),Ie=Q(Ie,ve,K,Qe,_e,23,v[35]),Qe=Q(Qe,Ie,ve,K,U,4,v[36]),K=Q(K,Qe,Ie,ve,q,11,v[37]),ve=Q(ve,K,Qe,Ie,oe,16,v[38]),Ie=Q(Ie,ve,K,Qe,ce,23,v[39]),Qe=Q(Qe,Ie,ve,K,me,4,v[40]),K=Q(K,Qe,Ie,ve,k,11,v[41]),ve=Q(ve,K,Qe,Ie,H,16,v[42]),Ie=Q(Ie,ve,K,Qe,Z,23,v[43]),Qe=Q(Qe,Ie,ve,K,se,4,v[44]),K=Q(K,Qe,Ie,ve,de,11,v[45]),ve=Q(ve,K,Qe,Ie,Be,16,v[46]),Ie=Q(Ie,ve,K,Qe,V,23,v[47]),Qe=M(Qe,Ie,ve,K,k,6,v[48]),K=M(K,Qe,Ie,ve,oe,10,v[49]),ve=M(ve,K,Qe,Ie,_e,15,v[50]),Ie=M(Ie,ve,K,Qe,ie,21,v[51]),Qe=M(Qe,Ie,ve,K,de,6,v[52]),K=M(K,Qe,Ie,ve,H,10,v[53]),ve=M(ve,K,Qe,Ie,ce,15,v[54]),Ie=M(Ie,ve,K,Qe,U,21,v[55]),Qe=M(Qe,Ie,ve,K,ne,6,v[56]),K=M(K,Qe,Ie,ve,Be,10,v[57]),ve=M(ve,K,Qe,Ie,Z,15,v[58]),Ie=M(Ie,ve,K,Qe,me,21,v[59]),Qe=M(Qe,Ie,ve,K,q,6,v[60]),K=M(K,Qe,Ie,ve,j,10,v[61]),ve=M(ve,K,Qe,Ie,V,15,v[62]),Ie=M(Ie,ve,K,Qe,se,21,v[63]),R[0]=R[0]+Qe|0,R[1]=R[1]+Ie|0,R[2]=R[2]+ve|0,R[3]=R[3]+K|0},_doFinalize:function(){var B=this._data,T=B.words,D=this._nDataBytes*8,F=B.sigBytes*8;T[F>>>5]|=128<<24-F%32;var L=A.floor(D/4294967296),R=D;T[(F+64>>>9<<4)+15]=(L<<8|L>>>24)&16711935|(L<<24|L>>>8)&4278255360,T[(F+64>>>9<<4)+14]=(R<<8|R>>>24)&16711935|(R<<24|R>>>8)&4278255360,B.sigBytes=(T.length+1)*4,this._process();for(var k=this._hash,U=k.words,V=0;V<4;V++){var H=U[V];U[V]=(H<<8|H>>>24)&16711935|(H<<24|H>>>8)&4278255360}return k},clone:function(){var B=y.clone.call(this);return B._hash=this._hash.clone(),B}});function I(B,T,D,F,L,R,k){var U=B+(T&D|~T&F)+L+k;return(U<<R|U>>>32-R)+T}function w(B,T,D,F,L,R,k){var U=B+(T&F|D&~F)+L+k;return(U<<R|U>>>32-R)+T}function Q(B,T,D,F,L,R,k){var U=B+(T^D^F)+L+k;return(U<<R|U>>>32-R)+T}function M(B,T,D,F,L,R,k){var U=B+(D^(T|~F))+L+k;return(U<<R|U>>>32-R)+T}f.MD5=y._createHelper(E),f.HmacMD5=y._createHmacHelper(E)}(Math),function(){var A=o,f=A.lib,m=f.WordArray,C=f.Hasher,y=A.algo,x=[],v=y.SHA1=C.extend({_doReset:function(){this._hash=new m.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(E,I){for(var w=this._hash.words,Q=w[0],M=w[1],B=w[2],T=w[3],D=w[4],F=0;F<80;F++){if(F<16)x[F]=E[I+F]|0;else{var L=x[F-3]^x[F-8]^x[F-14]^x[F-16];x[F]=L<<1|L>>>31}var R=(Q<<5|Q>>>27)+D+x[F];F<20?R+=(M&B|~M&T)+1518500249:F<40?R+=(M^B^T)+1859775393:F<60?R+=(M&B|M&T|B&T)-1894007588:R+=(M^B^T)-899497514,D=T,T=B,B=M<<30|M>>>2,M=Q,Q=R}w[0]=w[0]+Q|0,w[1]=w[1]+M|0,w[2]=w[2]+B|0,w[3]=w[3]+T|0,w[4]=w[4]+D|0},_doFinalize:function(){var E=this._data,I=E.words,w=this._nDataBytes*8,Q=E.sigBytes*8;return I[Q>>>5]|=128<<24-Q%32,I[(Q+64>>>9<<4)+14]=Math.floor(w/4294967296),I[(Q+64>>>9<<4)+15]=w,E.sigBytes=I.length*4,this._process(),this._hash},clone:function(){var E=C.clone.call(this);return E._hash=this._hash.clone(),E}});A.SHA1=C._createHelper(v),A.HmacSHA1=C._createHmacHelper(v)}(),function(A){var f=o,m=f.lib,C=m.WordArray,y=m.Hasher,x=f.algo,v=[],E=[];(function(){function Q(D){for(var F=A.sqrt(D),L=2;L<=F;L++)if(!(D%L))return!1;return!0}function M(D){return(D-(D|0))*4294967296|0}for(var B=2,T=0;T<64;)Q(B)&&(T<8&&(v[T]=M(A.pow(B,1/2))),E[T]=M(A.pow(B,1/3)),T++),B++})();var I=[],w=x.SHA256=y.extend({_doReset:function(){this._hash=new C.init(v.slice(0))},_doProcessBlock:function(Q,M){for(var B=this._hash.words,T=B[0],D=B[1],F=B[2],L=B[3],R=B[4],k=B[5],U=B[6],V=B[7],H=0;H<64;H++){if(H<16)I[H]=Q[M+H]|0;else{var q=I[H-15],ie=(q<<25|q>>>7)^(q<<14|q>>>18)^q>>>3,Z=I[H-2],oe=(Z<<15|Z>>>17)^(Z<<13|Z>>>19)^Z>>>10;I[H]=ie+I[H-7]+oe+I[H-16]}var ne=R&k^~R&U,se=T&D^T&F^D&F,ce=(T<<30|T>>>2)^(T<<19|T>>>13)^(T<<10|T>>>22),j=(R<<26|R>>>6)^(R<<21|R>>>11)^(R<<7|R>>>25),de=V+j+ne+E[H]+I[H],me=ce+se;V=U,U=k,k=R,R=L+de|0,L=F,F=D,D=T,T=de+me|0}B[0]=B[0]+T|0,B[1]=B[1]+D|0,B[2]=B[2]+F|0,B[3]=B[3]+L|0,B[4]=B[4]+R|0,B[5]=B[5]+k|0,B[6]=B[6]+U|0,B[7]=B[7]+V|0},_doFinalize:function(){var Q=this._data,M=Q.words,B=this._nDataBytes*8,T=Q.sigBytes*8;return M[T>>>5]|=128<<24-T%32,M[(T+64>>>9<<4)+14]=A.floor(B/4294967296),M[(T+64>>>9<<4)+15]=B,Q.sigBytes=M.length*4,this._process(),this._hash},clone:function(){var Q=y.clone.call(this);return Q._hash=this._hash.clone(),Q}});f.SHA256=y._createHelper(w),f.HmacSHA256=y._createHmacHelper(w)}(Math),function(){var A=o,f=A.lib,m=f.WordArray,C=A.algo,y=C.SHA256,x=C.SHA224=y.extend({_doReset:function(){this._hash=new m.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var v=y._doFinalize.call(this);return v.sigBytes-=4,v}});A.SHA224=y._createHelper(x),A.HmacSHA224=y._createHmacHelper(x)}(),function(){var A=o,f=A.lib,m=f.Hasher,C=A.x64,y=C.Word,x=C.WordArray,v=A.algo;function E(){return y.create.apply(y,arguments)}var I=[E(1116352408,3609767458),E(1899447441,602891725),E(3049323471,3964484399),E(3921009573,2173295548),E(961987163,4081628472),E(1508970993,3053834265),E(2453635748,2937671579),E(2870763221,3664609560),E(3624381080,2734883394),E(310598401,1164996542),E(607225278,1323610764),E(1426881987,3590304994),E(1925078388,4068182383),E(2162078206,991336113),E(2614888103,633803317),E(3248222580,3479774868),E(3835390401,2666613458),E(4022224774,944711139),E(264347078,2341262773),E(604807628,2007800933),E(770255983,1495990901),E(1249150122,1856431235),E(1555081692,3175218132),E(1996064986,2198950837),E(2554220882,3999719339),E(2821834349,766784016),E(2952996808,2566594879),E(3210313671,3203337956),E(3336571891,1034457026),E(3584528711,2466948901),E(113926993,3758326383),E(338241895,168717936),E(666307205,1188179964),E(773529912,1546045734),E(1294757372,1522805485),E(1396182291,2643833823),E(1695183700,2343527390),E(1986661051,1014477480),E(2177026350,1206759142),E(2456956037,344077627),E(2730485921,1290863460),E(2820302411,3158454273),E(3259730800,3505952657),E(3345764771,106217008),E(3516065817,3606008344),E(3600352804,1432725776),E(4094571909,1467031594),E(275423344,851169720),E(430227734,3100823752),E(506948616,1363258195),E(659060556,3750685593),E(883997877,3785050280),E(958139571,3318307427),E(1322822218,3812723403),E(1537002063,2003034995),E(1747873779,3602036899),E(1955562222,1575990012),E(2024104815,1125592928),E(2227730452,2716904306),E(2361852424,442776044),E(2428436474,593698344),E(2756734187,3733110249),E(3204031479,2999351573),E(3329325298,3815920427),E(3391569614,3928383900),E(3515267271,566280711),E(3940187606,3454069534),E(4118630271,4000239992),E(116418474,1914138554),E(174292421,2731055270),E(289380356,3203993006),E(460393269,320620315),E(685471733,587496836),E(852142971,1086792851),E(1017036298,365543100),E(1126000580,2618297676),E(1288033470,3409855158),E(1501505948,4234509866),E(1607167915,987167468),E(1816402316,1246189591)],w=[];(function(){for(var M=0;M<80;M++)w[M]=E()})();var Q=v.SHA512=m.extend({_doReset:function(){this._hash=new x.init([new y.init(1779033703,4089235720),new y.init(3144134277,2227873595),new y.init(1013904242,4271175723),new y.init(2773480762,1595750129),new y.init(1359893119,2917565137),new y.init(2600822924,725511199),new y.init(528734635,4215389547),new y.init(1541459225,327033209)])},_doProcessBlock:function(M,B){for(var T=this._hash.words,D=T[0],F=T[1],L=T[2],R=T[3],k=T[4],U=T[5],V=T[6],H=T[7],q=D.high,ie=D.low,Z=F.high,oe=F.low,ne=L.high,se=L.low,ce=R.high,j=R.low,de=k.high,me=k.low,_e=U.high,Be=U.low,Qe=V.high,Ie=V.low,ve=H.high,K=H.low,W=q,te=ie,Y=Z,he=oe,fe=ne,Ce=se,Ee=ce,be=j,Re=de,Ne=me,Je=_e,ot=Be,nt=Qe,$e=Ie,ht=ve,ze=K,Ze=0;Ze<80;Ze++){var ct,We,Oe=w[Ze];if(Ze<16)We=Oe.high=M[B+Ze*2]|0,ct=Oe.low=M[B+Ze*2+1]|0;else{var Ye=w[Ze-15],rt=Ye.high,gt=Ye.low,Et=(rt>>>1|gt<<31)^(rt>>>8|gt<<24)^rt>>>7,yt=(gt>>>1|rt<<31)^(gt>>>8|rt<<24)^(gt>>>7|rt<<25),vt=w[Ze-2],Rt=vt.high,qt=vt.low,wt=(Rt>>>19|qt<<13)^(Rt<<3|qt>>>29)^Rt>>>6,Lt=(qt>>>19|Rt<<13)^(qt<<3|Rt>>>29)^(qt>>>6|Rt<<26),pi=w[Ze-7],Ut=pi.high,ri=pi.low,ni=w[Ze-16],kt=ni.high,qe=ni.low;ct=yt+ri,We=Et+Ut+(ct>>>0<yt>>>0?1:0),ct=ct+Lt,We=We+wt+(ct>>>0<Lt>>>0?1:0),ct=ct+qe,We=We+kt+(ct>>>0<qe>>>0?1:0),Oe.high=We,Oe.low=ct}var Fe=Re&Je^~Re&nt,it=Ne&ot^~Ne&$e,Ht=W&Y^W&fe^Y&fe,Jt=te&he^te&Ce^he&Ce,jt=(W>>>28|te<<4)^(W<<30|te>>>2)^(W<<25|te>>>7),or=(te>>>28|W<<4)^(te<<30|W>>>2)^(te<<25|W>>>7),Pr=(Re>>>14|Ne<<18)^(Re>>>18|Ne<<14)^(Re<<23|Ne>>>9),Mi=(Ne>>>14|Re<<18)^(Ne>>>18|Re<<14)^(Ne<<23|Re>>>9),Zi=I[Ze],lr=Zi.high,Gi=Zi.low,li=ze+Mi,di=ht+Pr+(li>>>0<ze>>>0?1:0),li=li+it,di=di+Fe+(li>>>0<it>>>0?1:0),li=li+Gi,di=di+lr+(li>>>0<Gi>>>0?1:0),li=li+ct,di=di+We+(li>>>0<ct>>>0?1:0),Ni=or+Jt,ki=jt+Ht+(Ni>>>0<or>>>0?1:0);ht=nt,ze=$e,nt=Je,$e=ot,Je=Re,ot=Ne,Ne=be+li|0,Re=Ee+di+(Ne>>>0<be>>>0?1:0)|0,Ee=fe,be=Ce,fe=Y,Ce=he,Y=W,he=te,te=li+Ni|0,W=di+ki+(te>>>0<li>>>0?1:0)|0}ie=D.low=ie+te,D.high=q+W+(ie>>>0<te>>>0?1:0),oe=F.low=oe+he,F.high=Z+Y+(oe>>>0<he>>>0?1:0),se=L.low=se+Ce,L.high=ne+fe+(se>>>0<Ce>>>0?1:0),j=R.low=j+be,R.high=ce+Ee+(j>>>0<be>>>0?1:0),me=k.low=me+Ne,k.high=de+Re+(me>>>0<Ne>>>0?1:0),Be=U.low=Be+ot,U.high=_e+Je+(Be>>>0<ot>>>0?1:0),Ie=V.low=Ie+$e,V.high=Qe+nt+(Ie>>>0<$e>>>0?1:0),K=H.low=K+ze,H.high=ve+ht+(K>>>0<ze>>>0?1:0)},_doFinalize:function(){var M=this._data,B=M.words,T=this._nDataBytes*8,D=M.sigBytes*8;B[D>>>5]|=128<<24-D%32,B[(D+128>>>10<<5)+30]=Math.floor(T/4294967296),B[(D+128>>>10<<5)+31]=T,M.sigBytes=B.length*4,this._process();var F=this._hash.toX32();return F},clone:function(){var M=m.clone.call(this);return M._hash=this._hash.clone(),M},blockSize:1024/32});A.SHA512=m._createHelper(Q),A.HmacSHA512=m._createHmacHelper(Q)}(),function(){var A=o,f=A.x64,m=f.Word,C=f.WordArray,y=A.algo,x=y.SHA512,v=y.SHA384=x.extend({_doReset:function(){this._hash=new C.init([new m.init(3418070365,3238371032),new m.init(1654270250,914150663),new m.init(2438529370,812702999),new m.init(355462360,4144912697),new m.init(1731405415,4290775857),new m.init(2394180231,1750603025),new m.init(3675008525,1694076839),new m.init(1203062813,3204075428)])},_doFinalize:function(){var E=x._doFinalize.call(this);return E.sigBytes-=16,E}});A.SHA384=x._createHelper(v),A.HmacSHA384=x._createHmacHelper(v)}(),function(A){var f=o,m=f.lib,C=m.WordArray,y=m.Hasher,x=f.x64,v=x.Word,E=f.algo,I=[],w=[],Q=[];(function(){for(var T=1,D=0,F=0;F<24;F++){I[T+5*D]=(F+1)*(F+2)/2%64;var L=D%5,R=(2*T+3*D)%5;T=L,D=R}for(var T=0;T<5;T++)for(var D=0;D<5;D++)w[T+5*D]=D+(2*T+3*D)%5*5;for(var k=1,U=0;U<24;U++){for(var V=0,H=0,q=0;q<7;q++){if(k&1){var ie=(1<<q)-1;ie<32?H^=1<<ie:V^=1<<ie-32}k&128?k=k<<1^113:k<<=1}Q[U]=v.create(V,H)}})();var M=[];(function(){for(var T=0;T<25;T++)M[T]=v.create()})();var B=E.SHA3=y.extend({cfg:y.cfg.extend({outputLength:512}),_doReset:function(){for(var T=this._state=[],D=0;D<25;D++)T[D]=new v.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(T,D){for(var F=this._state,L=this.blockSize/2,R=0;R<L;R++){var k=T[D+2*R],U=T[D+2*R+1];k=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360,U=(U<<8|U>>>24)&16711935|(U<<24|U>>>8)&4278255360;var V=F[R];V.high^=U,V.low^=k}for(var H=0;H<24;H++){for(var q=0;q<5;q++){for(var ie=0,Z=0,oe=0;oe<5;oe++){var V=F[q+5*oe];ie^=V.high,Z^=V.low}var ne=M[q];ne.high=ie,ne.low=Z}for(var q=0;q<5;q++)for(var se=M[(q+4)%5],ce=M[(q+1)%5],j=ce.high,de=ce.low,ie=se.high^(j<<1|de>>>31),Z=se.low^(de<<1|j>>>31),oe=0;oe<5;oe++){var V=F[q+5*oe];V.high^=ie,V.low^=Z}for(var me=1;me<25;me++){var ie,Z,V=F[me],_e=V.high,Be=V.low,Qe=I[me];Qe<32?(ie=_e<<Qe|Be>>>32-Qe,Z=Be<<Qe|_e>>>32-Qe):(ie=Be<<Qe-32|_e>>>64-Qe,Z=_e<<Qe-32|Be>>>64-Qe);var Ie=M[w[me]];Ie.high=ie,Ie.low=Z}var ve=M[0],K=F[0];ve.high=K.high,ve.low=K.low;for(var q=0;q<5;q++)for(var oe=0;oe<5;oe++){var me=q+5*oe,V=F[me],W=M[me],te=M[(q+1)%5+5*oe],Y=M[(q+2)%5+5*oe];V.high=W.high^~te.high&Y.high,V.low=W.low^~te.low&Y.low}var V=F[0],he=Q[H];V.high^=he.high,V.low^=he.low}},_doFinalize:function(){var T=this._data,D=T.words,F=this._nDataBytes*8,L=T.sigBytes*8,R=this.blockSize*32;D[L>>>5]|=1<<24-L%32,D[(A.ceil((L+1)/R)*R>>>5)-1]|=128,T.sigBytes=D.length*4,this._process();for(var k=this._state,U=this.cfg.outputLength/8,V=U/8,H=[],q=0;q<V;q++){var ie=k[q],Z=ie.high,oe=ie.low;Z=(Z<<8|Z>>>24)&16711935|(Z<<24|Z>>>8)&4278255360,oe=(oe<<8|oe>>>24)&16711935|(oe<<24|oe>>>8)&4278255360,H.push(oe),H.push(Z)}return new C.init(H,U)},clone:function(){for(var T=y.clone.call(this),D=T._state=this._state.slice(0),F=0;F<25;F++)D[F]=D[F].clone();return T}});f.SHA3=y._createHelper(B),f.HmacSHA3=y._createHmacHelper(B)}(Math);/** @preserve
    (c) 2012 by Cédric Mesnil. All rights reserved.
    Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
        - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
        - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    */(function(A){var f=o,m=f.lib,C=m.WordArray,y=m.Hasher,x=f.algo,v=C.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),E=C.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),I=C.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),w=C.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),Q=C.create([0,1518500249,1859775393,2400959708,2840853838]),M=C.create([1352829926,1548603684,1836072691,2053994217,0]),B=x.RIPEMD160=y.extend({_doReset:function(){this._hash=C.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(U,V){for(var H=0;H<16;H++){var q=V+H,ie=U[q];U[q]=(ie<<8|ie>>>24)&16711935|(ie<<24|ie>>>8)&4278255360}var Z=this._hash.words,oe=Q.words,ne=M.words,se=v.words,ce=E.words,j=I.words,de=w.words,me,_e,Be,Qe,Ie,ve,K,W,te,Y;ve=me=Z[0],K=_e=Z[1],W=Be=Z[2],te=Qe=Z[3],Y=Ie=Z[4];for(var he,H=0;H<80;H+=1)he=me+U[V+se[H]]|0,H<16?he+=T(_e,Be,Qe)+oe[0]:H<32?he+=D(_e,Be,Qe)+oe[1]:H<48?he+=F(_e,Be,Qe)+oe[2]:H<64?he+=L(_e,Be,Qe)+oe[3]:he+=R(_e,Be,Qe)+oe[4],he=he|0,he=k(he,j[H]),he=he+Ie|0,me=Ie,Ie=Qe,Qe=k(Be,10),Be=_e,_e=he,he=ve+U[V+ce[H]]|0,H<16?he+=R(K,W,te)+ne[0]:H<32?he+=L(K,W,te)+ne[1]:H<48?he+=F(K,W,te)+ne[2]:H<64?he+=D(K,W,te)+ne[3]:he+=T(K,W,te)+ne[4],he=he|0,he=k(he,de[H]),he=he+Y|0,ve=Y,Y=te,te=k(W,10),W=K,K=he;he=Z[1]+Be+te|0,Z[1]=Z[2]+Qe+Y|0,Z[2]=Z[3]+Ie+ve|0,Z[3]=Z[4]+me+K|0,Z[4]=Z[0]+_e+W|0,Z[0]=he},_doFinalize:function(){var U=this._data,V=U.words,H=this._nDataBytes*8,q=U.sigBytes*8;V[q>>>5]|=128<<24-q%32,V[(q+64>>>9<<4)+14]=(H<<8|H>>>24)&16711935|(H<<24|H>>>8)&4278255360,U.sigBytes=(V.length+1)*4,this._process();for(var ie=this._hash,Z=ie.words,oe=0;oe<5;oe++){var ne=Z[oe];Z[oe]=(ne<<8|ne>>>24)&16711935|(ne<<24|ne>>>8)&4278255360}return ie},clone:function(){var U=y.clone.call(this);return U._hash=this._hash.clone(),U}});function T(U,V,H){return U^V^H}function D(U,V,H){return U&V|~U&H}function F(U,V,H){return(U|~V)^H}function L(U,V,H){return U&H|V&~H}function R(U,V,H){return U^(V|~H)}function k(U,V){return U<<V|U>>>32-V}f.RIPEMD160=y._createHelper(B),f.HmacRIPEMD160=y._createHmacHelper(B)})(Math),function(){var A=o,f=A.lib,m=f.Base,C=A.enc,y=C.Utf8,x=A.algo,v=x.HMAC=m.extend({init:function(E,I){E=this._hasher=new E.init,typeof I=="string"&&(I=y.parse(I));var w=E.blockSize,Q=w*4;I.sigBytes>Q&&(I=E.finalize(I)),I.clamp();for(var M=this._oKey=I.clone(),B=this._iKey=I.clone(),T=M.words,D=B.words,F=0;F<w;F++)T[F]^=1549556828,D[F]^=909522486;M.sigBytes=B.sigBytes=Q,this.reset()},reset:function(){var E=this._hasher;E.reset(),E.update(this._iKey)},update:function(E){return this._hasher.update(E),this},finalize:function(E){var I=this._hasher,w=I.finalize(E);I.reset();var Q=I.finalize(this._oKey.clone().concat(w));return Q}})}(),function(){var A=o,f=A.lib,m=f.Base,C=f.WordArray,y=A.algo,x=y.SHA1,v=y.HMAC,E=y.PBKDF2=m.extend({cfg:m.extend({keySize:128/32,hasher:x,iterations:1}),init:function(I){this.cfg=this.cfg.extend(I)},compute:function(I,w){for(var Q=this.cfg,M=v.create(Q.hasher,I),B=C.create(),T=C.create([1]),D=B.words,F=T.words,L=Q.keySize,R=Q.iterations;D.length<L;){var k=M.update(w).finalize(T);M.reset();for(var U=k.words,V=U.length,H=k,q=1;q<R;q++){H=M.finalize(H),M.reset();for(var ie=H.words,Z=0;Z<V;Z++)U[Z]^=ie[Z]}B.concat(k),F[0]++}return B.sigBytes=L*4,B}});A.PBKDF2=function(I,w,Q){return E.create(Q).compute(I,w)}}(),function(){var A=o,f=A.lib,m=f.Base,C=f.WordArray,y=A.algo,x=y.MD5,v=y.EvpKDF=m.extend({cfg:m.extend({keySize:128/32,hasher:x,iterations:1}),init:function(E){this.cfg=this.cfg.extend(E)},compute:function(E,I){for(var w,Q=this.cfg,M=Q.hasher.create(),B=C.create(),T=B.words,D=Q.keySize,F=Q.iterations;T.length<D;){w&&M.update(w),w=M.update(E).finalize(I),M.reset();for(var L=1;L<F;L++)w=M.finalize(w),M.reset();B.concat(w)}return B.sigBytes=D*4,B}});A.EvpKDF=function(E,I,w){return v.create(w).compute(E,I)}}(),o.lib.Cipher||function(A){var f=o,m=f.lib,C=m.Base,y=m.WordArray,x=m.BufferedBlockAlgorithm,v=f.enc,E=v.Utf8,I=v.Base64,w=f.algo,Q=w.EvpKDF,M=m.Cipher=x.extend({cfg:C.extend(),createEncryptor:function(ne,se){return this.create(this._ENC_XFORM_MODE,ne,se)},createDecryptor:function(ne,se){return this.create(this._DEC_XFORM_MODE,ne,se)},init:function(ne,se,ce){this.cfg=this.cfg.extend(ce),this._xformMode=ne,this._key=se,this.reset()},reset:function(){x.reset.call(this),this._doReset()},process:function(ne){return this._append(ne),this._process()},finalize:function(ne){ne&&this._append(ne);var se=this._doFinalize();return se},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function ne(se){return typeof se=="string"?oe:q}return function(se){return{encrypt:function(ce,j,de){return ne(j).encrypt(se,ce,j,de)},decrypt:function(ce,j,de){return ne(j).decrypt(se,ce,j,de)}}}}()}),B=m.StreamCipher=M.extend({_doFinalize:function(){var ne=this._process(!0);return ne},blockSize:1}),T=f.mode={},D=m.BlockCipherMode=C.extend({createEncryptor:function(ne,se){return this.Encryptor.create(ne,se)},createDecryptor:function(ne,se){return this.Decryptor.create(ne,se)},init:function(ne,se){this._cipher=ne,this._iv=se}}),F=T.CBC=function(){var ne=D.extend();ne.Encryptor=ne.extend({processBlock:function(ce,j){var de=this._cipher,me=de.blockSize;se.call(this,ce,j,me),de.encryptBlock(ce,j),this._prevBlock=ce.slice(j,j+me)}}),ne.Decryptor=ne.extend({processBlock:function(ce,j){var de=this._cipher,me=de.blockSize,_e=ce.slice(j,j+me);de.decryptBlock(ce,j),se.call(this,ce,j,me),this._prevBlock=_e}});function se(ce,j,de){var me,_e=this._iv;_e?(me=_e,this._iv=A):me=this._prevBlock;for(var Be=0;Be<de;Be++)ce[j+Be]^=me[Be]}return ne}(),L=f.pad={},R=L.Pkcs7={pad:function(ne,se){for(var ce=se*4,j=ce-ne.sigBytes%ce,de=j<<24|j<<16|j<<8|j,me=[],_e=0;_e<j;_e+=4)me.push(de);var Be=y.create(me,j);ne.concat(Be)},unpad:function(ne){var se=ne.words[ne.sigBytes-1>>>2]&255;ne.sigBytes-=se}},k=m.BlockCipher=M.extend({cfg:M.cfg.extend({mode:F,padding:R}),reset:function(){var ne;M.reset.call(this);var se=this.cfg,ce=se.iv,j=se.mode;this._xformMode==this._ENC_XFORM_MODE?ne=j.createEncryptor:(ne=j.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==ne?this._mode.init(this,ce&&ce.words):(this._mode=ne.call(j,this,ce&&ce.words),this._mode.__creator=ne)},_doProcessBlock:function(ne,se){this._mode.processBlock(ne,se)},_doFinalize:function(){var ne,se=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(se.pad(this._data,this.blockSize),ne=this._process(!0)):(ne=this._process(!0),se.unpad(ne)),ne},blockSize:128/32}),U=m.CipherParams=C.extend({init:function(ne){this.mixIn(ne)},toString:function(ne){return(ne||this.formatter).stringify(this)}}),V=f.format={},H=V.OpenSSL={stringify:function(ne){var se,ce=ne.ciphertext,j=ne.salt;return j?se=y.create([1398893684,1701076831]).concat(j).concat(ce):se=ce,se.toString(I)},parse:function(ne){var se,ce=I.parse(ne),j=ce.words;return j[0]==1398893684&&j[1]==1701076831&&(se=y.create(j.slice(2,4)),j.splice(0,4),ce.sigBytes-=16),U.create({ciphertext:ce,salt:se})}},q=m.SerializableCipher=C.extend({cfg:C.extend({format:H}),encrypt:function(ne,se,ce,j){j=this.cfg.extend(j);var de=ne.createEncryptor(ce,j),me=de.finalize(se),_e=de.cfg;return U.create({ciphertext:me,key:ce,iv:_e.iv,algorithm:ne,mode:_e.mode,padding:_e.padding,blockSize:ne.blockSize,formatter:j.format})},decrypt:function(ne,se,ce,j){j=this.cfg.extend(j),se=this._parse(se,j.format);var de=ne.createDecryptor(ce,j).finalize(se.ciphertext);return de},_parse:function(ne,se){return typeof ne=="string"?se.parse(ne,this):ne}}),ie=f.kdf={},Z=ie.OpenSSL={execute:function(ne,se,ce,j){j||(j=y.random(64/8));var de=Q.create({keySize:se+ce}).compute(ne,j),me=y.create(de.words.slice(se),ce*4);return de.sigBytes=se*4,U.create({key:de,iv:me,salt:j})}},oe=m.PasswordBasedCipher=q.extend({cfg:q.cfg.extend({kdf:Z}),encrypt:function(ne,se,ce,j){j=this.cfg.extend(j);var de=j.kdf.execute(ce,ne.keySize,ne.ivSize);j.iv=de.iv;var me=q.encrypt.call(this,ne,se,de.key,j);return me.mixIn(de),me},decrypt:function(ne,se,ce,j){j=this.cfg.extend(j),se=this._parse(se,j.format);var de=j.kdf.execute(ce,ne.keySize,ne.ivSize,se.salt);j.iv=de.iv;var me=q.decrypt.call(this,ne,se,de.key,j);return me}})}(),o.mode.CFB=function(){var A=o.lib.BlockCipherMode.extend();A.Encryptor=A.extend({processBlock:function(m,C){var y=this._cipher,x=y.blockSize;f.call(this,m,C,x,y),this._prevBlock=m.slice(C,C+x)}}),A.Decryptor=A.extend({processBlock:function(m,C){var y=this._cipher,x=y.blockSize,v=m.slice(C,C+x);f.call(this,m,C,x,y),this._prevBlock=v}});function f(m,C,y,x){var v,E=this._iv;E?(v=E.slice(0),this._iv=void 0):v=this._prevBlock,x.encryptBlock(v,0);for(var I=0;I<y;I++)m[C+I]^=v[I]}return A}(),o.mode.CTR=function(){var A=o.lib.BlockCipherMode.extend(),f=A.Encryptor=A.extend({processBlock:function(m,C){var y=this._cipher,x=y.blockSize,v=this._iv,E=this._counter;v&&(E=this._counter=v.slice(0),this._iv=void 0);var I=E.slice(0);y.encryptBlock(I,0),E[x-1]=E[x-1]+1|0;for(var w=0;w<x;w++)m[C+w]^=I[w]}});return A.Decryptor=f,A}();/** @preserve
* Counter block mode compatible with  Dr Brian Gladman fileenc.c
* derived from CryptoJS.mode.CTR
* Jan Hruby jhruby.web@gmail.com
*/return o.mode.CTRGladman=function(){var A=o.lib.BlockCipherMode.extend();function f(y){if((y>>24&255)===255){var x=y>>16&255,v=y>>8&255,E=y&255;x===255?(x=0,v===255?(v=0,E===255?E=0:++E):++v):++x,y=0,y+=x<<16,y+=v<<8,y+=E}else y+=1<<24;return y}function m(y){return(y[0]=f(y[0]))===0&&(y[1]=f(y[1])),y}var C=A.Encryptor=A.extend({processBlock:function(y,x){var v=this._cipher,E=v.blockSize,I=this._iv,w=this._counter;I&&(w=this._counter=I.slice(0),this._iv=void 0),m(w);var Q=w.slice(0);v.encryptBlock(Q,0);for(var M=0;M<E;M++)y[x+M]^=Q[M]}});return A.Decryptor=C,A}(),o.mode.OFB=function(){var A=o.lib.BlockCipherMode.extend(),f=A.Encryptor=A.extend({processBlock:function(m,C){var y=this._cipher,x=y.blockSize,v=this._iv,E=this._keystream;v&&(E=this._keystream=v.slice(0),this._iv=void 0),y.encryptBlock(E,0);for(var I=0;I<x;I++)m[C+I]^=E[I]}});return A.Decryptor=f,A}(),o.mode.ECB=function(){var A=o.lib.BlockCipherMode.extend();return A.Encryptor=A.extend({processBlock:function(f,m){this._cipher.encryptBlock(f,m)}}),A.Decryptor=A.extend({processBlock:function(f,m){this._cipher.decryptBlock(f,m)}}),A}(),o.pad.AnsiX923={pad:function(A,f){var m=A.sigBytes,C=f*4,y=C-m%C,x=m+y-1;A.clamp(),A.words[x>>>2]|=y<<24-x%4*8,A.sigBytes+=y},unpad:function(A){var f=A.words[A.sigBytes-1>>>2]&255;A.sigBytes-=f}},o.pad.Iso10126={pad:function(A,f){var m=f*4,C=m-A.sigBytes%m;A.concat(o.lib.WordArray.random(C-1)).concat(o.lib.WordArray.create([C<<24],1))},unpad:function(A){var f=A.words[A.sigBytes-1>>>2]&255;A.sigBytes-=f}},o.pad.Iso97971={pad:function(A,f){A.concat(o.lib.WordArray.create([2147483648],1)),o.pad.ZeroPadding.pad(A,f)},unpad:function(A){o.pad.ZeroPadding.unpad(A),A.sigBytes--}},o.pad.ZeroPadding={pad:function(A,f){var m=f*4;A.clamp(),A.sigBytes+=m-(A.sigBytes%m||m)},unpad:function(A){for(var f=A.words,m=A.sigBytes-1,m=A.sigBytes-1;m>=0;m--)if(f[m>>>2]>>>24-m%4*8&255){A.sigBytes=m+1;break}}},o.pad.NoPadding={pad:function(){},unpad:function(){}},function(A){var f=o,m=f.lib,C=m.CipherParams,y=f.enc,x=y.Hex,v=f.format,E=v.Hex={stringify:function(I){return I.ciphertext.toString(x)},parse:function(I){var w=x.parse(I);return C.create({ciphertext:w})}}}(),function(){var A=o,f=A.lib,m=f.BlockCipher,C=A.algo,y=[],x=[],v=[],E=[],I=[],w=[],Q=[],M=[],B=[],T=[];(function(){for(var L=[],R=0;R<256;R++)R<128?L[R]=R<<1:L[R]=R<<1^283;for(var k=0,U=0,R=0;R<256;R++){var V=U^U<<1^U<<2^U<<3^U<<4;V=V>>>8^V&255^99,y[k]=V,x[V]=k;var H=L[k],q=L[H],ie=L[q],Z=L[V]*257^V*16843008;v[k]=Z<<24|Z>>>8,E[k]=Z<<16|Z>>>16,I[k]=Z<<8|Z>>>24,w[k]=Z;var Z=ie*16843009^q*65537^H*257^k*16843008;Q[V]=Z<<24|Z>>>8,M[V]=Z<<16|Z>>>16,B[V]=Z<<8|Z>>>24,T[V]=Z,k?(k=H^L[L[L[ie^H]]],U^=L[L[U]]):k=U=1}})();var D=[0,1,2,4,8,16,32,64,128,27,54],F=C.AES=m.extend({_doReset:function(){var L;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var R=this._keyPriorReset=this._key,k=R.words,U=R.sigBytes/4,V=this._nRounds=U+6,H=(V+1)*4,q=this._keySchedule=[],ie=0;ie<H;ie++)ie<U?q[ie]=k[ie]:(L=q[ie-1],ie%U?U>6&&ie%U==4&&(L=y[L>>>24]<<24|y[L>>>16&255]<<16|y[L>>>8&255]<<8|y[L&255]):(L=L<<8|L>>>24,L=y[L>>>24]<<24|y[L>>>16&255]<<16|y[L>>>8&255]<<8|y[L&255],L^=D[ie/U|0]<<24),q[ie]=q[ie-U]^L);for(var Z=this._invKeySchedule=[],oe=0;oe<H;oe++){var ie=H-oe;if(oe%4)var L=q[ie];else var L=q[ie-4];oe<4||ie<=4?Z[oe]=L:Z[oe]=Q[y[L>>>24]]^M[y[L>>>16&255]]^B[y[L>>>8&255]]^T[y[L&255]]}}},encryptBlock:function(L,R){this._doCryptBlock(L,R,this._keySchedule,v,E,I,w,y)},decryptBlock:function(L,R){var k=L[R+1];L[R+1]=L[R+3],L[R+3]=k,this._doCryptBlock(L,R,this._invKeySchedule,Q,M,B,T,x);var k=L[R+1];L[R+1]=L[R+3],L[R+3]=k},_doCryptBlock:function(L,R,k,U,V,H,q,ie){for(var Z=this._nRounds,oe=L[R]^k[0],ne=L[R+1]^k[1],se=L[R+2]^k[2],ce=L[R+3]^k[3],j=4,de=1;de<Z;de++){var me=U[oe>>>24]^V[ne>>>16&255]^H[se>>>8&255]^q[ce&255]^k[j++],_e=U[ne>>>24]^V[se>>>16&255]^H[ce>>>8&255]^q[oe&255]^k[j++],Be=U[se>>>24]^V[ce>>>16&255]^H[oe>>>8&255]^q[ne&255]^k[j++],Qe=U[ce>>>24]^V[oe>>>16&255]^H[ne>>>8&255]^q[se&255]^k[j++];oe=me,ne=_e,se=Be,ce=Qe}var me=(ie[oe>>>24]<<24|ie[ne>>>16&255]<<16|ie[se>>>8&255]<<8|ie[ce&255])^k[j++],_e=(ie[ne>>>24]<<24|ie[se>>>16&255]<<16|ie[ce>>>8&255]<<8|ie[oe&255])^k[j++],Be=(ie[se>>>24]<<24|ie[ce>>>16&255]<<16|ie[oe>>>8&255]<<8|ie[ne&255])^k[j++],Qe=(ie[ce>>>24]<<24|ie[oe>>>16&255]<<16|ie[ne>>>8&255]<<8|ie[se&255])^k[j++];L[R]=me,L[R+1]=_e,L[R+2]=Be,L[R+3]=Qe},keySize:256/32});A.AES=m._createHelper(F)}(),function(){var A=o,f=A.lib,m=f.WordArray,C=f.BlockCipher,y=A.algo,x=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],v=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],E=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],I=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],w=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],Q=y.DES=C.extend({_doReset:function(){for(var D=this._key,F=D.words,L=[],R=0;R<56;R++){var k=x[R]-1;L[R]=F[k>>>5]>>>31-k%32&1}for(var U=this._subKeys=[],V=0;V<16;V++){for(var H=U[V]=[],q=E[V],R=0;R<24;R++)H[R/6|0]|=L[(v[R]-1+q)%28]<<31-R%6,H[4+(R/6|0)]|=L[28+(v[R+24]-1+q)%28]<<31-R%6;H[0]=H[0]<<1|H[0]>>>31;for(var R=1;R<7;R++)H[R]=H[R]>>>(R-1)*4+3;H[7]=H[7]<<5|H[7]>>>27}for(var ie=this._invSubKeys=[],R=0;R<16;R++)ie[R]=U[15-R]},encryptBlock:function(D,F){this._doCryptBlock(D,F,this._subKeys)},decryptBlock:function(D,F){this._doCryptBlock(D,F,this._invSubKeys)},_doCryptBlock:function(D,F,L){this._lBlock=D[F],this._rBlock=D[F+1],M.call(this,4,252645135),M.call(this,16,65535),B.call(this,2,858993459),B.call(this,8,16711935),M.call(this,1,1431655765);for(var R=0;R<16;R++){for(var k=L[R],U=this._lBlock,V=this._rBlock,H=0,q=0;q<8;q++)H|=I[q][((V^k[q])&w[q])>>>0];this._lBlock=V,this._rBlock=U^H}var ie=this._lBlock;this._lBlock=this._rBlock,this._rBlock=ie,M.call(this,1,1431655765),B.call(this,8,16711935),B.call(this,2,858993459),M.call(this,16,65535),M.call(this,4,252645135),D[F]=this._lBlock,D[F+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function M(D,F){var L=(this._lBlock>>>D^this._rBlock)&F;this._rBlock^=L,this._lBlock^=L<<D}function B(D,F){var L=(this._rBlock>>>D^this._lBlock)&F;this._lBlock^=L,this._rBlock^=L<<D}A.DES=C._createHelper(Q);var T=y.TripleDES=C.extend({_doReset:function(){var D=this._key,F=D.words;if(F.length!==2&&F.length!==4&&F.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var L=F.slice(0,2),R=F.length<4?F.slice(0,2):F.slice(2,4),k=F.length<6?F.slice(0,2):F.slice(4,6);this._des1=Q.createEncryptor(m.create(L)),this._des2=Q.createEncryptor(m.create(R)),this._des3=Q.createEncryptor(m.create(k))},encryptBlock:function(D,F){this._des1.encryptBlock(D,F),this._des2.decryptBlock(D,F),this._des3.encryptBlock(D,F)},decryptBlock:function(D,F){this._des3.decryptBlock(D,F),this._des2.encryptBlock(D,F),this._des1.decryptBlock(D,F)},keySize:192/32,ivSize:64/32,blockSize:64/32});A.TripleDES=C._createHelper(T)}(),function(){var A=o,f=A.lib,m=f.StreamCipher,C=A.algo,y=C.RC4=m.extend({_doReset:function(){for(var E=this._key,I=E.words,w=E.sigBytes,Q=this._S=[],M=0;M<256;M++)Q[M]=M;for(var M=0,B=0;M<256;M++){var T=M%w,D=I[T>>>2]>>>24-T%4*8&255;B=(B+Q[M]+D)%256;var F=Q[M];Q[M]=Q[B],Q[B]=F}this._i=this._j=0},_doProcessBlock:function(E,I){E[I]^=x.call(this)},keySize:256/32,ivSize:0});function x(){for(var E=this._S,I=this._i,w=this._j,Q=0,M=0;M<4;M++){I=(I+1)%256,w=(w+E[I])%256;var B=E[I];E[I]=E[w],E[w]=B,Q|=E[(E[I]+E[w])%256]<<24-M*8}return this._i=I,this._j=w,Q}A.RC4=m._createHelper(y);var v=C.RC4Drop=y.extend({cfg:y.cfg.extend({drop:192}),_doReset:function(){y._doReset.call(this);for(var E=this.cfg.drop;E>0;E--)x.call(this)}});A.RC4Drop=m._createHelper(v)}(),function(){var A=o,f=A.lib,m=f.StreamCipher,C=A.algo,y=[],x=[],v=[],E=C.Rabbit=m.extend({_doReset:function(){for(var w=this._key.words,Q=this.cfg.iv,M=0;M<4;M++)w[M]=(w[M]<<8|w[M]>>>24)&16711935|(w[M]<<24|w[M]>>>8)&4278255360;var B=this._X=[w[0],w[3]<<16|w[2]>>>16,w[1],w[0]<<16|w[3]>>>16,w[2],w[1]<<16|w[0]>>>16,w[3],w[2]<<16|w[1]>>>16],T=this._C=[w[2]<<16|w[2]>>>16,w[0]&4294901760|w[1]&65535,w[3]<<16|w[3]>>>16,w[1]&4294901760|w[2]&65535,w[0]<<16|w[0]>>>16,w[2]&4294901760|w[3]&65535,w[1]<<16|w[1]>>>16,w[3]&4294901760|w[0]&65535];this._b=0;for(var M=0;M<4;M++)I.call(this);for(var M=0;M<8;M++)T[M]^=B[M+4&7];if(Q){var D=Q.words,F=D[0],L=D[1],R=(F<<8|F>>>24)&16711935|(F<<24|F>>>8)&4278255360,k=(L<<8|L>>>24)&16711935|(L<<24|L>>>8)&4278255360,U=R>>>16|k&4294901760,V=k<<16|R&65535;T[0]^=R,T[1]^=U,T[2]^=k,T[3]^=V,T[4]^=R,T[5]^=U,T[6]^=k,T[7]^=V;for(var M=0;M<4;M++)I.call(this)}},_doProcessBlock:function(w,Q){var M=this._X;I.call(this),y[0]=M[0]^M[5]>>>16^M[3]<<16,y[1]=M[2]^M[7]>>>16^M[5]<<16,y[2]=M[4]^M[1]>>>16^M[7]<<16,y[3]=M[6]^M[3]>>>16^M[1]<<16;for(var B=0;B<4;B++)y[B]=(y[B]<<8|y[B]>>>24)&16711935|(y[B]<<24|y[B]>>>8)&4278255360,w[Q+B]^=y[B]},blockSize:128/32,ivSize:64/32});function I(){for(var w=this._X,Q=this._C,M=0;M<8;M++)x[M]=Q[M];Q[0]=Q[0]+1295307597+this._b|0,Q[1]=Q[1]+3545052371+(Q[0]>>>0<x[0]>>>0?1:0)|0,Q[2]=Q[2]+886263092+(Q[1]>>>0<x[1]>>>0?1:0)|0,Q[3]=Q[3]+1295307597+(Q[2]>>>0<x[2]>>>0?1:0)|0,Q[4]=Q[4]+3545052371+(Q[3]>>>0<x[3]>>>0?1:0)|0,Q[5]=Q[5]+886263092+(Q[4]>>>0<x[4]>>>0?1:0)|0,Q[6]=Q[6]+1295307597+(Q[5]>>>0<x[5]>>>0?1:0)|0,Q[7]=Q[7]+3545052371+(Q[6]>>>0<x[6]>>>0?1:0)|0,this._b=Q[7]>>>0<x[7]>>>0?1:0;for(var M=0;M<8;M++){var B=w[M]+Q[M],T=B&65535,D=B>>>16,F=((T*T>>>17)+T*D>>>15)+D*D,L=((B&4294901760)*B|0)+((B&65535)*B|0);v[M]=F^L}w[0]=v[0]+(v[7]<<16|v[7]>>>16)+(v[6]<<16|v[6]>>>16)|0,w[1]=v[1]+(v[0]<<8|v[0]>>>24)+v[7]|0,w[2]=v[2]+(v[1]<<16|v[1]>>>16)+(v[0]<<16|v[0]>>>16)|0,w[3]=v[3]+(v[2]<<8|v[2]>>>24)+v[1]|0,w[4]=v[4]+(v[3]<<16|v[3]>>>16)+(v[2]<<16|v[2]>>>16)|0,w[5]=v[5]+(v[4]<<8|v[4]>>>24)+v[3]|0,w[6]=v[6]+(v[5]<<16|v[5]>>>16)+(v[4]<<16|v[4]>>>16)|0,w[7]=v[7]+(v[6]<<8|v[6]>>>24)+v[5]|0}A.Rabbit=m._createHelper(E)}(),function(){var A=o,f=A.lib,m=f.StreamCipher,C=A.algo,y=[],x=[],v=[],E=C.RabbitLegacy=m.extend({_doReset:function(){var w=this._key.words,Q=this.cfg.iv,M=this._X=[w[0],w[3]<<16|w[2]>>>16,w[1],w[0]<<16|w[3]>>>16,w[2],w[1]<<16|w[0]>>>16,w[3],w[2]<<16|w[1]>>>16],B=this._C=[w[2]<<16|w[2]>>>16,w[0]&4294901760|w[1]&65535,w[3]<<16|w[3]>>>16,w[1]&4294901760|w[2]&65535,w[0]<<16|w[0]>>>16,w[2]&4294901760|w[3]&65535,w[1]<<16|w[1]>>>16,w[3]&4294901760|w[0]&65535];this._b=0;for(var T=0;T<4;T++)I.call(this);for(var T=0;T<8;T++)B[T]^=M[T+4&7];if(Q){var D=Q.words,F=D[0],L=D[1],R=(F<<8|F>>>24)&16711935|(F<<24|F>>>8)&4278255360,k=(L<<8|L>>>24)&16711935|(L<<24|L>>>8)&4278255360,U=R>>>16|k&4294901760,V=k<<16|R&65535;B[0]^=R,B[1]^=U,B[2]^=k,B[3]^=V,B[4]^=R,B[5]^=U,B[6]^=k,B[7]^=V;for(var T=0;T<4;T++)I.call(this)}},_doProcessBlock:function(w,Q){var M=this._X;I.call(this),y[0]=M[0]^M[5]>>>16^M[3]<<16,y[1]=M[2]^M[7]>>>16^M[5]<<16,y[2]=M[4]^M[1]>>>16^M[7]<<16,y[3]=M[6]^M[3]>>>16^M[1]<<16;for(var B=0;B<4;B++)y[B]=(y[B]<<8|y[B]>>>24)&16711935|(y[B]<<24|y[B]>>>8)&4278255360,w[Q+B]^=y[B]},blockSize:128/32,ivSize:64/32});function I(){for(var w=this._X,Q=this._C,M=0;M<8;M++)x[M]=Q[M];Q[0]=Q[0]+1295307597+this._b|0,Q[1]=Q[1]+3545052371+(Q[0]>>>0<x[0]>>>0?1:0)|0,Q[2]=Q[2]+886263092+(Q[1]>>>0<x[1]>>>0?1:0)|0,Q[3]=Q[3]+1295307597+(Q[2]>>>0<x[2]>>>0?1:0)|0,Q[4]=Q[4]+3545052371+(Q[3]>>>0<x[3]>>>0?1:0)|0,Q[5]=Q[5]+886263092+(Q[4]>>>0<x[4]>>>0?1:0)|0,Q[6]=Q[6]+1295307597+(Q[5]>>>0<x[5]>>>0?1:0)|0,Q[7]=Q[7]+3545052371+(Q[6]>>>0<x[6]>>>0?1:0)|0,this._b=Q[7]>>>0<x[7]>>>0?1:0;for(var M=0;M<8;M++){var B=w[M]+Q[M],T=B&65535,D=B>>>16,F=((T*T>>>17)+T*D>>>15)+D*D,L=((B&4294901760)*B|0)+((B&65535)*B|0);v[M]=F^L}w[0]=v[0]+(v[7]<<16|v[7]>>>16)+(v[6]<<16|v[6]>>>16)|0,w[1]=v[1]+(v[0]<<8|v[0]>>>24)+v[7]|0,w[2]=v[2]+(v[1]<<16|v[1]>>>16)+(v[0]<<16|v[0]>>>16)|0,w[3]=v[3]+(v[2]<<8|v[2]>>>24)+v[1]|0,w[4]=v[4]+(v[3]<<16|v[3]>>>16)+(v[2]<<16|v[2]>>>16)|0,w[5]=v[5]+(v[4]<<8|v[4]>>>24)+v[3]|0,w[6]=v[6]+(v[5]<<16|v[5]>>>16)+(v[4]<<16|v[4]>>>16)|0,w[7]=v[7]+(v[6]<<8|v[6]>>>24)+v[5]|0}A.RabbitLegacy=m._createHelper(E)}(),o});var oD=Aat.CryptoJS,hat={};(function(o,A){o.FlowEcharts=A(kb,o.Geoworld)})(hat,function(o,A){return function(f){var m={};function C(y){if(m[y])return m[y].exports;var x=m[y]={i:y,l:!1,exports:{}};return f[y].call(x.exports,x,x.exports,C),x.l=!0,x.exports}return C.m=f,C.c=m,C.d=function(y,x,v){C.o(y,x)||Object.defineProperty(y,x,{enumerable:!0,get:v})},C.r=function(y){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(y,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(y,"__esModule",{value:!0})},C.t=function(y,x){if(x&1&&(y=C(y)),x&8||x&4&&typeof y=="object"&&y&&y.__esModule)return y;var v=Object.create(null);if(C.r(v),Object.defineProperty(v,"default",{enumerable:!0,value:y}),x&2&&typeof y!="string")for(var E in y)C.d(v,E,function(I){return y[I]}.bind(null,E));return v},C.n=function(y){var x=y&&y.__esModule?function(){return y.default}:function(){return y};return C.d(x,"a",x),x},C.o=function(y,x){return Object.prototype.hasOwnProperty.call(y,x)},C.p="",C(C.s=0)}([function(f,m,C){C(1);var y=C(7);f.exports=y},function(f,m,C){var y;y=function(x){return C(2).registerCoordinateSystem("GLMap",C(3)),C(5),C(6),C(2).registerAction({type:"GLMapRoam",event:"GLMapRoam",update:"updateLayout"},function(v,E){}),{version:"1.0.0"}}.call(m,C,m,f),y!==void 0&&(f.exports=y)},function(f,m){f.exports=o},function(f,m,C){var y;y=function(x){var v=C(2);function E(I,w){this._GLMap=I,this.dimensions=["lng","lat"],this._mapOffset=[0,0],this._api=w}return E.prototype.dimensions=["lng","lat"],E.prototype.setMapOffset=function(I){this._mapOffset=I},E.prototype.getBMap=function(){return this._GLMap},E.prototype.dataToPoint=function(I){var w=je.toRadians(80),Q=[99999,99999],M=ee.fromDegrees(I[0],I[1]);if(!M)return Q;var B=this._GLMap.cartesianToCanvasCoordinates(M);if(!B)return Q;var T=this._GLMap;return T.mode===xi.SCENE3D&&ee.angleBetween(T.camera.position,M)>w?!1:[B.x-this._mapOffset[0],B.y-this._mapOffset[1]]},E.prototype.pointToData=function(Q){var w=this._mapOffset,Q=this._bmap.project([Q[0]+w[0],Q[1]+w[1]]);return[Q.lng,Q.lat]},E.prototype.getViewRect=function(){var I=this._api;return new v.graphic.BoundingRect(0,0,I.getWidth(),I.getHeight())},E.prototype.getRoamTransform=function(){return v.matrix.create()},E.dimensions=E.prototype.dimensions,E.create=function(I,w){var Q;I.eachComponent("GLMap",function(M){var B=w.getZr().painter.getViewportRoot(),T=v.glMap;Q=new E(T,w),Q.setMapOffset(M.__mapOffset||[0,0]),M.coordinateSystem=Q}),I.eachSeries(function(M){M.get("coordinateSystem")==="GLMap"&&(M.coordinateSystem=Q)})},E}.call(m,C,m,f),y!==void 0&&(f.exports=y)},function(f,m){f.exports=A},function(f,m,C){var y;y=function(x){return C(2).extendComponentModel({type:"GLMap",getBMap:function(){return this.__GLMap},defaultOption:{roam:!1}})}.call(m,C,m,f),y!==void 0&&(f.exports=y)},function(f,m,C){var y;y=function(x){return C(2).extendComponentView({type:"GLMap",init:function(v,E){this.api=E,kb.glMap.postRender.addEventListener(this.moveHandler,this)},moveHandler:function(){this.api.dispatchAction({type:"GLMapRoam"})},render:function(v,E,I){},dispose:function(v,E){kb.glMap.postRender.removeEventListener(this.moveHandler,this)}})}.call(m,C,m,f),y!==void 0&&(f.exports=y)},function(f,m){function C(y,x){this._mapContainer=y,this._overlay=this._createChartOverlay(),this._overlay.setOption(x)}C.prototype._createChartOverlay=function(){var y=this._mapContainer.scene;y.canvas.setAttribute("tabIndex",0);var x=document.createElement("div");return x.style.position="absolute",x.style.top="0px",x.style.left="0px",x.style.width=y.canvas.width+"px",x.style.height=y.canvas.height+"px",x.style.pointerEvents="none",x.setAttribute("id","echarts"),x.setAttribute("class","echartMap"),this._mapContainer.container.appendChild(x),this._echartsContainer=x,kb.glMap=y,kb.init(x)},C.prototype.dispose=function(){this._echartsContainer&&(this._mapContainer.container.removeChild(this._echartsContainer),this._echartsContainer=null),this._overlay&&(this._overlay.dispose(),this._overlay=null)},C.prototype.destroy=function(){this.dispose()},C.prototype.updateOverlay=function(y){this._overlay&&this._overlay.setOption(y)},C.prototype.getMap=function(){return this._mapContainer},C.prototype.getOverlay=function(){return this._overlay},f.exports=C}])});var cae=hat.FlowEcharts,Nze=["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"],kze=["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","audio","canvas","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","video","view","vkern"],Oze=["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"],Uze=["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmuliscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mpspace","msqrt","mystyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"],Gze=["#text"],Hze=["accept","action","align","alt","autocomplete","background","bgcolor","border","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","coords","crossorigin","datetime","default","dir","disabled","download","enctype","face","for","headers","height","hidden","high","href","hreflang","id","integrity","ismap","label","lang","list","loop","low","max","maxlength","media","method","min","multiple","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","type","usemap","valign","value","width","xmlns"],Vge=["accent-height","accumulate","additivive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"],Vze=["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"],M$=["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"];function zh(o,A){for(var f=A.length;f--;)typeof A[f]=="string"&&(A[f]=A[f].toLowerCase()),o[A[f]]=!0;return o}function zze(o){var A={},f=void 0;for(f in o)Object.prototype.hasOwnProperty.call(o,f)&&(A[f]=o[f]);return A}var ubi=/\{\{[\s\S]*|[\s\S]*\}\}/gm,cbi=/<%[\s\S]*|[\s\S]*%>/gm,Abi=/^data-[\-\w.\u00B7-\uFFFF]/,hbi=/^aria-[\-\w]+$/,dbi=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,fbi=/^(?:\w+script|data):/i,gbi=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,P$=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o};function tD(o){if(Array.isArray(o)){for(var A=0,f=Array(o.length);A<o.length;A++)f[A]=o[A];return f}else return Array.from(o)}var pbi=function(){return typeof window>"u"?null:window};function dat(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:pbi(),A=function(Lt){return dat(Lt)};if(A.version="1.0.8",A.removed=[],!o||!o.document||o.document.nodeType!==9)return A.isSupported=!1,A;var f=o.document,m=!1,C=!1,y=o.document,x=o.DocumentFragment,v=o.HTMLTemplateElement,E=o.Node,I=o.NodeFilter,w=o.NamedNodeMap,Q=w===void 0?o.NamedNodeMap||o.MozNamedAttrMap:w,M=o.Text,B=o.Comment,T=o.DOMParser;if(typeof v=="function"){var D=y.createElement("template");D.content&&D.content.ownerDocument&&(y=D.content.ownerDocument)}var F=y,L=F.implementation,R=F.createNodeIterator,k=F.getElementsByTagName,U=F.createDocumentFragment,V=f.importNode,H={};A.isSupported=L&&typeof L.createHTMLDocument<"u"&&y.documentMode!==9;var q=ubi,ie=cbi,Z=Abi,oe=hbi,ne=fbi,se=gbi,ce=dbi,j=null,de=zh({},[].concat(tD(Nze),tD(kze),tD(Oze),tD(Uze),tD(Gze))),me=null,_e=zh({},[].concat(tD(Hze),tD(Vge),tD(Vze),tD(M$))),Be=null,Qe=null,Ie=!0,ve=!0,K=!1,W=!1,te=!1,Y=!1,he=!1,fe=!1,Ce=!1,Ee=!1,be=!1,Re=!0,Ne=!0,Je=!1,ot={},nt=zh({},["audio","head","math","script","style","template","svg","video"]),$e=zh({},["audio","video","img","source","image"]),ht=zh({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),ze=null,Ze=y.createElement("form"),ct=function(Lt){(typeof Lt>"u"?"undefined":P$(Lt))!=="object"&&(Lt={}),j="ALLOWED_TAGS"in Lt?zh({},Lt.ALLOWED_TAGS):de,me="ALLOWED_ATTR"in Lt?zh({},Lt.ALLOWED_ATTR):_e,Be="FORBID_TAGS"in Lt?zh({},Lt.FORBID_TAGS):{},Qe="FORBID_ATTR"in Lt?zh({},Lt.FORBID_ATTR):{},ot="USE_PROFILES"in Lt?Lt.USE_PROFILES:!1,Ie=Lt.ALLOW_ARIA_ATTR!==!1,ve=Lt.ALLOW_DATA_ATTR!==!1,K=Lt.ALLOW_UNKNOWN_PROTOCOLS||!1,W=Lt.SAFE_FOR_JQUERY||!1,te=Lt.SAFE_FOR_TEMPLATES||!1,Y=Lt.WHOLE_DOCUMENT||!1,Ce=Lt.RETURN_DOM||!1,Ee=Lt.RETURN_DOM_FRAGMENT||!1,be=Lt.RETURN_DOM_IMPORT||!1,fe=Lt.FORCE_BODY||!1,Re=Lt.SANITIZE_DOM!==!1,Ne=Lt.KEEP_CONTENT!==!1,Je=Lt.IN_PLACE||!1,ce=Lt.ALLOWED_URI_REGEXP||ce,te&&(ve=!1),Ee&&(Ce=!0),ot&&(j=zh({},[].concat(tD(Gze))),me=[],ot.html===!0&&(zh(j,Nze),zh(me,Hze)),ot.svg===!0&&(zh(j,kze),zh(me,Vge),zh(me,M$)),ot.svgFilters===!0&&(zh(j,Oze),zh(me,Vge),zh(me,M$)),ot.mathMl===!0&&(zh(j,Uze),zh(me,Vze),zh(me,M$))),Lt.ADD_TAGS&&(j===de&&(j=zze(j)),zh(j,Lt.ADD_TAGS)),Lt.ADD_ATTR&&(me===_e&&(me=zze(me)),zh(me,Lt.ADD_ATTR)),Lt.ADD_URI_SAFE_ATTR&&zh(ht,Lt.ADD_URI_SAFE_ATTR),Ne&&(j["#text"]=!0),Y&&zh(j,["html","head","body"]),j.table&&zh(j,["tbody"]),Object&&"freeze"in Object&&Object.freeze(Lt),ze=Lt},We=function(Lt){A.removed.push({element:Lt});try{Lt.parentNode.removeChild(Lt)}catch{Lt.outerHTML=""}},Oe=function(Lt,pi){try{A.removed.push({attribute:pi.getAttributeNode(Lt),from:pi})}catch{A.removed.push({attribute:null,from:pi})}pi.removeAttribute(Lt)},Ye=function(Lt){var pi=void 0,Ut=void 0;if(fe)Lt="<remove></remove>"+Lt;else{var ri=Lt.match(/^[\s]+/);Ut=ri&&ri[0],Ut&&(Lt=Lt.slice(Ut.length))}if(m)try{pi=new T().parseFromString(Lt,"text/html")}catch{}if(C&&zh(Be,["title"]),!pi||!pi.documentElement){pi=L.createHTMLDocument("");var ni=pi,kt=ni.body;kt.parentNode.removeChild(kt.parentNode.firstElementChild),kt.outerHTML=Lt}return Ut&&pi.body.insertBefore(y.createTextNode(Ut),pi.body.childNodes[0]||null),k.call(pi,Y?"html":"body")[0]};A.isSupported&&(function(){try{var Lt=Ye('<svg><p><style><img src="</style><img src=x onerror=alert(1)//">');Lt.querySelector("svg img")&&(m=!0)}catch{}}(),function(){try{var Lt=Ye("<x/><title>&lt;/title&gt;&lt;img&gt;");Lt.querySelector("title").textContent.match(/<\/title/)&&(C=!0)}catch{}}());var rt=function(Lt){return R.call(Lt.ownerDocument||Lt,Lt,I.SHOW_ELEMENT|I.SHOW_COMMENT|I.SHOW_TEXT,function(){return I.FILTER_ACCEPT},!1)},gt=function(Lt){return Lt instanceof M||Lt instanceof B?!1:typeof Lt.nodeName!="string"||typeof Lt.textContent!="string"||typeof Lt.removeChild!="function"||!(Lt.attributes instanceof Q)||typeof Lt.removeAttribute!="function"||typeof Lt.setAttribute!="function"},Et=function(Lt){return(typeof E>"u"?"undefined":P$(E))==="object"?Lt instanceof E:Lt&&(typeof Lt>"u"?"undefined":P$(Lt))==="object"&&typeof Lt.nodeType=="number"&&typeof Lt.nodeName=="string"},yt=function(Lt,pi,Ut){!H[Lt]||H[Lt].forEach(function(ri){ri.call(A,pi,Ut,ze)})},vt=function(Lt){var pi=void 0;if(yt("beforeSanitizeElements",Lt,null),gt(Lt))return We(Lt),!0;var Ut=Lt.nodeName.toLowerCase();if(yt("uponSanitizeElement",Lt,{tagName:Ut,allowedTags:j}),!j[Ut]||Be[Ut]){if(Ne&&!nt[Ut]&&typeof Lt.insertAdjacentHTML=="function")try{Lt.insertAdjacentHTML("AfterEnd",Lt.innerHTML)}catch{}return We(Lt),!0}return W&&!Lt.firstElementChild&&(!Lt.content||!Lt.content.firstElementChild)&&/</g.test(Lt.textContent)&&(A.removed.push({element:Lt.cloneNode()}),Lt.innerHTML?Lt.innerHTML=Lt.innerHTML.replace(/</g,"&lt;"):Lt.innerHTML=Lt.textContent.replace(/</g,"&lt;")),te&&Lt.nodeType===3&&(pi=Lt.textContent,pi=pi.replace(q," "),pi=pi.replace(ie," "),Lt.textContent!==pi&&(A.removed.push({element:Lt.cloneNode()}),Lt.textContent=pi)),yt("afterSanitizeElements",Lt,null),!1},Rt=function(Lt,pi,Ut){return!(Re&&(pi==="id"||pi==="name")&&(Ut in y||Ut in Ze)||(te&&(Ut=Ut.replace(q," "),Ut=Ut.replace(ie," ")),!(ve&&Z.test(pi))&&!(Ie&&oe.test(pi))&&(!me[pi]||Qe[pi]||!ht[pi]&&!ce.test(Ut.replace(se,""))&&!((pi==="src"||pi==="xlink:href")&&Lt!=="script"&&Ut.indexOf("data:")===0&&$e[Lt])&&!(K&&!ne.test(Ut.replace(se,"")))&&Ut)))},qt=function(Lt){var pi=void 0,Ut=void 0,ri=void 0,ni=void 0,kt=void 0;yt("beforeSanitizeAttributes",Lt,null);var qe=Lt.attributes;if(qe){var Fe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:me};for(kt=qe.length;kt--;){pi=qe[kt];var it=pi,Ht=it.name,Jt=it.namespaceURI;if(Ut=pi.value.trim(),ri=Ht.toLowerCase(),Fe.attrName=ri,Fe.attrValue=Ut,Fe.keepAttr=!0,yt("uponSanitizeAttribute",Lt,Fe),Ut=Fe.attrValue,ri==="name"&&Lt.nodeName==="IMG"&&qe.id)ni=qe.id,qe=Array.prototype.slice.apply(qe),Oe("id",Lt),Oe(Ht,Lt),qe.indexOf(ni)>kt&&Lt.setAttribute("id",ni.value);else{if(Lt.nodeName==="INPUT"&&ri==="type"&&Ut==="file"&&(me[ri]||!Qe[ri]))continue;Ht==="id"&&Lt.setAttribute(Ht,""),Oe(Ht,Lt)}if(Fe.keepAttr){var jt=Lt.nodeName.toLowerCase();if(Rt(jt,ri,Ut))try{Jt?Lt.setAttributeNS(Jt,Ht,Ut):Lt.setAttribute(Ht,Ut),A.removed.pop()}catch{}}}yt("afterSanitizeAttributes",Lt,null)}},wt=function Lt(pi){var Ut=void 0,ri=rt(pi);for(yt("beforeSanitizeShadowDOM",pi,null);Ut=ri.nextNode();)yt("uponSanitizeShadowNode",Ut,null),!vt(Ut)&&(Ut.content instanceof x&&Lt(Ut.content),qt(Ut));yt("afterSanitizeShadowDOM",pi,null)};return A.sanitize=function(Lt,pi){var Ut=void 0,ri=void 0,ni=void 0,kt=void 0,qe=void 0;if(Lt||(Lt="<!-->"),typeof Lt!="string"&&!Et(Lt)){if(typeof Lt.toString!="function")throw new TypeError("toString is not a function");if(Lt=Lt.toString(),typeof Lt!="string")throw new TypeError("dirty is not a string, aborting")}if(!A.isSupported){if(P$(o.toStaticHTML)==="object"||typeof o.toStaticHTML=="function"){if(typeof Lt=="string")return o.toStaticHTML(Lt);if(Et(Lt))return o.toStaticHTML(Lt.outerHTML)}return Lt}if(he||ct(pi),A.removed=[],!Je)if(Lt instanceof E)Ut=Ye("<!-->"),ri=Ut.ownerDocument.importNode(Lt,!0),ri.nodeType===1&&ri.nodeName==="BODY"?Ut=ri:Ut.appendChild(ri);else{if(!Ce&&!Y&&Lt.indexOf("<")===-1)return Lt;if(Ut=Ye(Lt),!Ut)return Ce?null:""}Ut&&fe&&We(Ut.firstChild);for(var Fe=rt(Je?Lt:Ut);ni=Fe.nextNode();)ni.nodeType===3&&ni===kt||vt(ni)||(ni.content instanceof x&&wt(ni.content),qt(ni),kt=ni);if(Je)return Lt;if(Ce){if(Ee)for(qe=U.call(Ut.ownerDocument);Ut.firstChild;)qe.appendChild(Ut.firstChild);else qe=Ut;return be&&(qe=V.call(f,qe,!0)),qe}return Y?Ut.outerHTML:Ut.innerHTML},A.setConfig=function(Lt){ct(Lt),he=!0},A.clearConfig=function(){ze=null,he=!1},A.isValidAttribute=function(Lt,pi,Ut){ze||ct({});var ri=Lt.toLowerCase(),ni=pi.toLowerCase();return Rt(ri,ni,Ut)},A.addHook=function(Lt,pi){typeof pi=="function"&&(H[Lt]=H[Lt]||[],H[Lt].push(pi))},A.removeHook=function(Lt){H[Lt]&&H[Lt].pop()},A.removeHooks=function(Lt){H[Lt]&&(H[Lt]=[])},A.removeAllHooks=function(){H={}},A}var mbi=dat(),fat=mbi;function Cbi(){this.canExecute=void 0,this.beforeExecute=void 0,this.afterExecute=void 0,Ui.throwInstantiationError()}var gat=Cbi,xSe={};xSe.createCheckbox=function(o,A,f){let m=document.createElement("div"),C=document.createElement("label"),y=document.createElement("input");y.type="checkbox";let x=`checked: ${A}`;return O(f)&&(x+=`, enable: ${f}`),y.setAttribute("data-bind",x),C.appendChild(y),C.appendChild(document.createTextNode(o)),m.appendChild(C),m};xSe.createSection=function(o,A,f,m){let C=document.createElement("div");C.className="cesium-cesiumInspector-section",C.setAttribute("data-bind",`css: { "cesium-cesiumInspector-section-collapsed": !${f} }`),o.appendChild(C);let y=document.createElement("h3");y.className="cesium-cesiumInspector-sectionHeader",y.appendChild(document.createTextNode(A)),y.setAttribute("data-bind",`click: ${m}`),C.appendChild(y);let x=document.createElement("div");return x.className="cesium-cesiumInspector-sectionContent",C.appendChild(x),x};var z8=xSe;function TP(){this._flattenPolygons=[],this._needUpdateFlatten=!1,this._updateFlattenInternal=!1,this._defautTexture=void 0,this._flattenBounds=new ai,this._polygonDepth=void 0,this._matMW=Xe.IDENTITY,this._flattenOriginPoint=void 0}Object.defineProperties(TP.prototype,{needUpdateFlatten:{get:function(){return this._needUpdateFlatten},set:function(o){this._needUpdateFlatten=o}},flattenPolygons:{get:function(){return this._flattenPolygons},set:function(o){!O(o)||!O(o.length)?this._flattenPolygons=[]:this._flattenPolygons=o,this._updateFlattenInternal=!0}},localViewMatrix:{get:function(){return this._matMW},set:function(o){this._matMW=o}}});TP.prototype.initailize=function(o){if(this._flattenPolygons.length>0){O(this._polygonDepth)||(this._polygonDepth=new b8),this._polygonDepth._flattenPolygonDrawCommands=[];let A={position:0},f=new Xe;Xe.inverse(this._matMW,f);let m=new Kr,C=[];for(let y=0;y<this._flattenPolygons.length;y++){let x=o.context,v=this._flattenPolygons[y],E=eh.createGeometry(v),I=E.attributes.position.values;for(let F=0;F<I.length/3;F++){let L=new ee(0,0,0);L.x=I[3*F],L.y=I[3*F+1],L.z=I[3*F+2],Xe.multiplyByPoint(f,L,L),C.push(L),E.attributes.position.values[3*F]=L.x,E.attributes.position.values[3*F+1]=L.y,E.attributes.position.values[3*F+2]=L.z}let w=wi.transform(E.boundingSphere,f);E.boundingSphere=w;let Q=Hc.fromGeometry({context:x,geometry:E,attributeLocations:A,bufferUsage:ln.STATIC_DRAW,interleave:!0}),M=_s.fromCache({context:x,vertexShaderSource:Dne,fragmentShaderSource:Sne}),B=new fn;B.depthTest.enabled=!0,B.cull.enabled=!0,B.cull.face=Ii.BACK;let T={},D=new On({boundingVolume:w,modelMatrix:new Xe,primitiveType:yn.TRIANGLES,vertexArray:Q,shaderProgram:M,uniformMap:T,renderState:B,pass:hr.GLOBE});this._polygonDepth._flattenPolygonDrawCommands.push(D)}Kr.fromPoints(C,m),this._flattenBounds.x=m.x,this._flattenBounds.y=m.y+m.height,this._flattenBounds.z=m.x+m.width,this._flattenBounds.w=m.y,this._polygonDepth.updateFrustum(this._flattenBounds.x,this._flattenBounds.y,this._flattenBounds.z,this._flattenBounds.w)}};TP.prototype.addFlattenPolygon=function(o){this._flattenPolygons.push(o),this._updateFlattenInternal=!0,this._needUpdateFlatten=!0};TP.prototype.removeFlattenPolygon=function(o){for(let A=0;A<this._flattenPolygons.length;A++)if(this._flattenPolygons[A]===o){this._flattenPolygons.splice(A,1),this._updateFlattenInternal=!0,O(this._polygonDepth)||(this._polygonDepth=new b8),this._polygonDepth.destroy(),this._polygonDepth=void 0;break}};TP.prototype.clearFlattenPolygon=function(){O(this._polygonDepth)&&(this._polygonDepth._flattenPolygonDrawCommands=[],this._polygonDepth.destroy(),this._polygonDepth=void 0),this._flattenPolygons=[],this._needUpdateFlatten=!1,this._updateFlattenInternal=!1};TP.prototype.update=function(o,A,f){this._frameState=o,O(this._defautTexture)||(this._defautTexture=new yo({context:this._frameState.context,width:2,height:2})),this._needUpdateFlatten===!0&&O(this._flattenPolygons)&&this._flattenPolygons.length>0&&(this._updateFlattenInternal===!0&&(O(this._polygonDepth)?(this._polygonDepth.destroy(),this._polygonDepth=void 0,this.initailize(o)):this.initailize(o)),O(this._polygonDepth)&&this._polygonDepth.update(o),this._updateFlattenInternal=!1)};TP.getShader=function(o){};TP.prototype.getUniformMap=function(){let o=this,A={};return A.u_polygonTexture=function(){return O(o._polygonDepth)?o._polygonDepth._colorTexture:o._defautTexture},A.u_polygonBounds=function(){return o._flattenBounds},A.u_bFlatten=function(){return!!(o._needUpdateFlatten===!0&&O(o._polygonDepth))},A.u_eastNorthUpToFixedFrame=function(){return o.localViewMatrix},A.u_r_eastNorthUpToFixedFrame=function(){let f=new Xe;return Xe.inverse(o.localViewMatrix,f),f},A};var ybi=TP,vSe=ybi;function cH(o){this._scene=o,this._flattenPolygons=[],this._polygonTexture=new vSe,this._clipPlaneOfFlatten=!1}Object.defineProperties(cH.prototype,{clipPlaneOfFlatten:{get:function(){return this._clipPlaneOfFlatten},set:function(o){this._clipPlaneOfFlatten=o}}});cH.prototype.addPolygon=function(o){this._flattenPolygons.push(o)};cH.prototype.clearPolygon=function(){this._flattenPolygons=[];let o=this._polygonTexture,A=this._scene,f={flattenBounds:[],flattenPolygons:[],flattenPolygonHeights:[]};A.globe.flattenPolygonRegion=f,A.globe.flattenUniforms=void 0,o.clearFlattenPolygon()};cH.prototype.generatePolygonTexture=function(){let o=this._scene,A=this._polygonTexture,f=this._flattenPolygons;if(f.length<1)return;for(let v=0;v<f.length;v++){let E=f[v],I=[];for(let Q=0;Q<E.length;Q+=3){let M=E[Q],B=E[Q+1],T=E[Q+2];I.push(M,B,T)}let w=eh.fromPositions({positions:ee.fromDegreesArrayHeights(I),extrudedHeight:0,perPositionHeight:!0});A.addFlattenPolygon(w)}let m=f[0][0],C=f[0][1],y=new ee.fromDegrees(m,C,-2e3),x=zn.eastNorthUpToFixedFrame(y);A.localViewMatrix=x,A.update(o._frameState)};cH.prototype.update=function(){let o=this._scene,A=this._polygonTexture,f=this._flattenPolygons;if(f.length<1)return;this.generatePolygonTexture();let m={flattenBounds:[],flattenPolygons:[],flattenPolygonHeights:[],enableFlatten:!1},C=-100;for(let v=0;v<f.length;v++){let E=f[v],I=new Kr,w=[],Q=[],M=0,B=0;for(let D=0;D<E.length/3;D++){let F=E[3*D],L=E[3*D+1],R=new ee(F,L,0);w.push(R),Q.push([je.toRadians(F),je.toRadians(L)]),M=Math.max(E[3*D+2],M),B=Math.min(E[3*D+2],B),C=Math.min(C,B)}Kr.fromPoints(w,I);let T=new ai(I.x,I.y+I.height,I.x+I.width,I.y);m.flattenBounds.push(T),m.flattenPolygons.push(Q),m.flattenPolygonHeights.push({maxHeight:M+2,minHeight:B-2}),m.enableFlatten=!0}o.globe.flattenPolygonRegion=m;let y=A.getUniformMap();y.u_minFlattenHeight=function(){return C};let x=this;y.u_clipPlaneOfFlatten=function(){return x.clipPlaneOfFlatten},o.globe.flattenUniforms=y,o.requestRender()};var vN=cH,pat={};(function(o,A){A(o.JSEncrypt={})})(pat,function(o){"use strict";var A="0123456789abcdefghijklmnopqrstuvwxyz";function f(We){return A.charAt(We)}function m(We,Oe){return We&Oe}function C(We,Oe){return We|Oe}function y(We,Oe){return We^Oe}function x(We,Oe){return We&~Oe}function v(We){if(We==0)return-1;var Oe=0;return(65535&We)==0&&(We>>=16,Oe+=16),(255&We)==0&&(We>>=8,Oe+=8),(15&We)==0&&(We>>=4,Oe+=4),(3&We)==0&&(We>>=2,Oe+=2),(1&We)==0&&++Oe,Oe}function E(We){for(var Oe=0;We!=0;)We&=We-1,++Oe;return Oe}var I="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",w="=";function Q(We){var Oe,Ye,rt="";for(Oe=0;Oe+3<=We.length;Oe+=3)Ye=parseInt(We.substring(Oe,Oe+3),16),rt+=I.charAt(Ye>>6)+I.charAt(63&Ye);for(Oe+1==We.length?(Ye=parseInt(We.substring(Oe,Oe+1),16),rt+=I.charAt(Ye<<2)):Oe+2==We.length&&(Ye=parseInt(We.substring(Oe,Oe+2),16),rt+=I.charAt(Ye>>2)+I.charAt((3&Ye)<<4));(3&rt.length)>0;)rt+=w;return rt}var M,B=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(We,Oe){We.__proto__=Oe}||function(We,Oe){for(var Ye in Oe)Oe.hasOwnProperty(Ye)&&(We[Ye]=Oe[Ye])},T,D=function(We){var Oe;if(M===void 0){var Ye="0123456789ABCDEF",rt=` \f
\r   \xA0\u2028\u2029`;for(M={},Oe=0;Oe<16;++Oe)M[Ye.charAt(Oe)]=Oe;for(Ye=Ye.toLowerCase(),Oe=10;Oe<16;++Oe)M[Ye.charAt(Oe)]=Oe;for(Oe=0;Oe<rt.length;++Oe)M[rt.charAt(Oe)]=-1}var gt=[],Et=0,yt=0;for(Oe=0;Oe<We.length;++Oe){var vt=We.charAt(Oe);if(vt=="=")break;if((vt=M[vt])!=-1){if(vt===void 0)throw new Error("Illegal character at offset "+Oe);Et|=vt,++yt>=2?(gt[gt.length]=Et,Et=0,yt=0):Et<<=4}}if(yt)throw new Error("Hex encoding incomplete: 4 bits missing");return gt},F={decode:function(We){var Oe;if(T===void 0){var Ye=`= \f
\r   \xA0\u2028\u2029`;for(T=Object.create(null),Oe=0;Oe<64;++Oe)T["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(Oe)]=Oe;for(Oe=0;Oe<Ye.length;++Oe)T[Ye.charAt(Oe)]=-1}var rt=[],gt=0,Et=0;for(Oe=0;Oe<We.length;++Oe){var yt=We.charAt(Oe);if(yt=="=")break;if((yt=T[yt])!=-1){if(yt===void 0)throw new Error("Illegal character at offset "+Oe);gt|=yt,++Et>=4?(rt[rt.length]=gt>>16,rt[rt.length]=gt>>8&255,rt[rt.length]=255&gt,gt=0,Et=0):gt<<=6}}switch(Et){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:rt[rt.length]=gt>>10;break;case 3:rt[rt.length]=gt>>16,rt[rt.length]=gt>>8&255}return rt},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(We){var Oe=F.re.exec(We);if(Oe)if(Oe[1])We=Oe[1];else{if(!Oe[2])throw new Error("RegExp out of sync");We=Oe[2]}return F.decode(We)}},L=1e13,R=function(){function We(Oe){this.buf=[+Oe||0]}return We.prototype.mulAdd=function(Oe,Ye){var rt,gt,Et=this.buf,yt=Et.length;for(rt=0;rt<yt;++rt)(gt=Et[rt]*Oe+Ye)<L?Ye=0:gt-=(Ye=0|gt/L)*L,Et[rt]=gt;Ye>0&&(Et[rt]=Ye)},We.prototype.sub=function(Oe){var Ye,rt,gt=this.buf,Et=gt.length;for(Ye=0;Ye<Et;++Ye)(rt=gt[Ye]-Oe)<0?(rt+=L,Oe=1):Oe=0,gt[Ye]=rt;for(;gt[gt.length-1]===0;)gt.pop()},We.prototype.toString=function(Oe){if((Oe||10)!=10)throw new Error("only base 10 is supported");for(var Ye=this.buf,rt=Ye[Ye.length-1].toString(),gt=Ye.length-2;gt>=0;--gt)rt+=(L+Ye[gt]).toString().substring(1);return rt},We.prototype.valueOf=function(){for(var Oe=this.buf,Ye=0,rt=Oe.length-1;rt>=0;--rt)Ye=Ye*L+Oe[rt];return Ye},We.prototype.simplify=function(){var Oe=this.buf;return Oe.length==1?Oe[0]:this},We}(),k="\u2026",U=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,V=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function H(We,Oe){return We.length>Oe&&(We=We.substring(0,Oe)+k),We}var q,ie=function(){function We(Oe,Ye){this.hexDigits="0123456789ABCDEF",Oe instanceof We?(this.enc=Oe.enc,this.pos=Oe.pos):(this.enc=Oe,this.pos=Ye)}return We.prototype.get=function(Oe){if(Oe===void 0&&(Oe=this.pos++),Oe>=this.enc.length)throw new Error("Requesting byte offset "+Oe+" on a stream of length "+this.enc.length);return typeof this.enc=="string"?this.enc.charCodeAt(Oe):this.enc[Oe]},We.prototype.hexByte=function(Oe){return this.hexDigits.charAt(Oe>>4&15)+this.hexDigits.charAt(15&Oe)},We.prototype.hexDump=function(Oe,Ye,rt){for(var gt="",Et=Oe;Et<Ye;++Et)if(gt+=this.hexByte(this.get(Et)),rt!==!0)switch(15&Et){case 7:gt+="  ";break;case 15:gt+=`
`;break;default:gt+=" "}return gt},We.prototype.isASCII=function(Oe,Ye){for(var rt=Oe;rt<Ye;++rt){var gt=this.get(rt);if(gt<32||gt>176)return!1}return!0},We.prototype.parseStringISO=function(Oe,Ye){for(var rt="",gt=Oe;gt<Ye;++gt)rt+=String.fromCharCode(this.get(gt));return rt},We.prototype.parseStringUTF=function(Oe,Ye){for(var rt="",gt=Oe;gt<Ye;){var Et=this.get(gt++);rt+=Et<128?String.fromCharCode(Et):Et>191&&Et<224?String.fromCharCode((31&Et)<<6|63&this.get(gt++)):String.fromCharCode((15&Et)<<12|(63&this.get(gt++))<<6|63&this.get(gt++))}return rt},We.prototype.parseStringBMP=function(Oe,Ye){for(var rt,gt,Et="",yt=Oe;yt<Ye;)rt=this.get(yt++),gt=this.get(yt++),Et+=String.fromCharCode(rt<<8|gt);return Et},We.prototype.parseTime=function(Oe,Ye,rt){var gt=this.parseStringISO(Oe,Ye),Et=(rt?U:V).exec(gt);return Et?(rt&&(Et[1]=+Et[1],Et[1]+=+Et[1]<70?2e3:1900),gt=Et[1]+"-"+Et[2]+"-"+Et[3]+" "+Et[4],Et[5]&&(gt+=":"+Et[5],Et[6]&&(gt+=":"+Et[6],Et[7]&&(gt+="."+Et[7]))),Et[8]&&(gt+=" UTC",Et[8]!="Z"&&(gt+=Et[8],Et[9]&&(gt+=":"+Et[9]))),gt):"Unrecognized time: "+gt},We.prototype.parseInteger=function(Oe,Ye){for(var rt,gt=this.get(Oe),Et=gt>127,yt=Et?255:0,vt="";gt==yt&&++Oe<Ye;)gt=this.get(Oe);if((rt=Ye-Oe)===0)return Et?-1:0;if(rt>4){for(vt=gt,rt<<=3;(128&(+vt^yt))==0;)vt=+vt<<1,--rt;vt="("+rt+` bit)
@@ -14451,7 +14451,13 @@
`;return Ye+=Oe.wordwrap(this.getPrivateBaseKeyB64())+`
`,Ye+="-----END RSA PRIVATE KEY-----"},Oe.prototype.getPublicKey=function(){var Ye=`-----BEGIN PUBLIC KEY-----
`;return Ye+=Oe.wordwrap(this.getPublicBaseKeyB64())+`
`,Ye+="-----END PUBLIC KEY-----"},Oe.hasPublicKeyProperty=function(Ye){return(Ye=Ye||{}).hasOwnProperty("n")&&Ye.hasOwnProperty("e")},Oe.hasPrivateKeyProperty=function(Ye){return(Ye=Ye||{}).hasOwnProperty("n")&&Ye.hasOwnProperty("e")&&Ye.hasOwnProperty("d")&&Ye.hasOwnProperty("p")&&Ye.hasOwnProperty("q")&&Ye.hasOwnProperty("dmp1")&&Ye.hasOwnProperty("dmq1")&&Ye.hasOwnProperty("coeff")},Oe.prototype.parsePropertiesFrom=function(Ye){this.n=Ye.n,this.e=Ye.e,Ye.hasOwnProperty("d")&&(this.d=Ye.d,this.p=Ye.p,this.q=Ye.q,this.dmp1=Ye.dmp1,this.dmq1=Ye.dmq1,this.coeff=Ye.coeff)},Oe}($e),ct=function(){function We(Oe){Oe=Oe||{},this.default_key_size=parseInt(Oe.default_key_size,10)||1024,this.default_public_exponent=Oe.default_public_exponent||"010001",this.log=Oe.log||!1,this.key=null}return We.prototype.setKey=function(Oe){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new Ze(Oe)},We.prototype.setPrivateKey=function(Oe){this.setKey(Oe)},We.prototype.setPublicKey=function(Oe){this.setKey(Oe)},We.prototype.decrypt=function(Oe){try{return this.getKey().decrypt(function(Ye){var rt,gt="",Et=0,yt=0;for(rt=0;rt<Ye.length&&Ye.charAt(rt)!=w;++rt){var vt=I.indexOf(Ye.charAt(rt));vt<0||(Et==0?(gt+=f(vt>>2),yt=3&vt,Et=1):Et==1?(gt+=f(yt<<2|vt>>4),yt=15&vt,Et=2):Et==2?(gt+=f(yt),gt+=f(vt>>2),yt=3&vt,Et=3):(gt+=f(yt<<2|vt>>4),gt+=f(15&vt),Et=0))}return Et==1&&(gt+=f(yt<<2)),gt}(Oe))}catch{return!1}},We.prototype.encrypt=function(Oe){try{return Q(this.getKey().encrypt(Oe))}catch{return!1}},We.prototype.getKey=function(Oe){if(!this.key){if(this.key=new Ze,Oe&&{}.toString.call(Oe)==="[object Function]")return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,Oe);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},We.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},We.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},We.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},We.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},We.version="3.0.0-beta.1",We}();window.JSEncrypt=ct,o.JSEncrypt=ct,o.default=ct,Object.defineProperty(o,"__esModule",{value:!0})});var ESe=pat.JSEncrypt.JSEncrypt;function xbi(o,A){let f=!1,m=new ESe,C=x=>{let v=oD.enc.Utf8.parse("*ya;p7291zclfleoqc20161v$DSP&%3+"),E=oD.enc.Utf8.parse("&kdaow$IEW.##%5-"),I=oD.enc.Hex.parse(x),w=oD.enc.Base64.stringify(I);return oD.AES.decrypt(w,v,{iv:E,mode:oD.mode.CBC,padding:oD.pad.Pkcs7}).toString(oD.enc.Utf8).toString()},y=async(x,v)=>{let E={cmdType:"getRegisterIds",time:new Date().getTime()},I=m.encrypt(JSON.stringify(E)),w=await An.post({url:`${x}/licensemanager/client?sid=${window.rsaPublicId}`,data:I,retryAttempts:3,headers:{"Content-Type":"application/json",dataType:"text"}});if(!w){f=!1,v&&v(f);return}return f=JSON.parse(C(w)).registeredModules.filter(Q=>Q===37).length>0,v&&v(f),f};f=(async(x,v)=>{let E=new Date().getTime();await An.fetchJson({url:`${x}/licensemanager/client?cmdType=getRsaKey&${E}`}).then(I=>{let w=I;if(!w)return f=!1;if(w.code!==200){f=!1,v&&v(f);return}return m.setPublicKey(w.data.key),window.rsaPublicKey=w.data.key,window.rsaPublicId=w.data.sid,y(x,v)}).catch(I=>{f=!1,v&&v(f)})})(o,A)}var mat=xbi,vbi=function(o){let A=document.createElement("div");A.innerHTML=o;let f=document.createDocumentFragment();for(;A.firstChild;)f.appendChild(A.firstChild);return f},ISe=vbi,Ebi=EP,Ibi=function(o,A,f){A=iA(A);let m=ISe(o),C=[],y;for(y=0;y<m.childNodes.length;++y)C.push(m.childNodes[y]);for(A.appendChild(m),y=0;y<C.length;++y){let x=C[y];(x.nodeType===1||x.nodeType===8)&&Ebi.applyBindings(f,x)}return C},Aae=Ibi,_bi=EP,YK=function(o){if(!O(o)||!O(o.terria))throw new Ui("options.terria is required.");this.terria=o.terria,this._removeSubscription=void 0,this._lastLegendUpdate=void 0,this.eventHelper=new Mx,this.distanceLabel=void 0,this.barWidth=void 0,this.enableDistanceLegend=O(o.enableDistanceLegend)?o.enableDistanceLegend:!0,_bi.track(this,["distanceLabel","barWidth"]),this.eventHelper.add(this.terria.afterWidgetChanged,function(){O(this._removeSubscription)&&(this._removeSubscription(),this._removeSubscription=void 0)},this);let A=this;function f(){if(O(A.terria)){let m=A.terria.scene;A._removeSubscription=m.postRender.addEventListener(function(){Bbi(this,m)},A)}}f(),this.eventHelper.add(this.terria.afterWidgetChanged,function(){f()},this)};YK.prototype.destroy=function(){this.eventHelper.removeAll()};YK.prototype.show=function(o){let A;this.enableDistanceLegend?A=`<div class="distance-legend" data-bind="visible: distanceLabel && barWidth"><div class="distance-legend-label" data-bind="text: distanceLabel"></div><div class="distance-legend-scale-bar" data-bind="style: { width: barWidth + 'px', left: (5 + (125 - barWidth) / 2) + 'px' }"></div></div>`:A=`<div class="distance-legend"  style="display: none;" data-bind="visible: distanceLabel && barWidth"><div class="distance-legend-label"  data-bind="text: distanceLabel"></div><div class="distance-legend-scale-bar"  data-bind="style: { width: barWidth + 'px', left: (5 + (125 - barWidth) / 2) + 'px' }"></div></div>`,Aae(A,o,this)};YK.create=function(o){let A=new YK(o);return A.show(o.container),A};var vme=Ti.MOON2000,Kze=new l0(null,null,vme),zge=[1,2,3,5,10,20,30,50,100,200,300,500,1e3,2e3,3e3,5e3,1e4,2e4,3e4,5e4,1e5,2e5,3e5,5e5,1e6,2e6,3e6,5e6,1e7,2e7,3e7,5e7];function Bbi(o,A){if(!o.enableDistanceLegend){o.barWidth=void 0,o.distanceLabel=void 0;return}let f=OA();if(f<o._lastLegendUpdate+250)return;o._lastLegendUpdate=f;let m=A.canvas.clientWidth,C=A.canvas.clientHeight,y=A.camera.getPickRay(new Bt(m/2|0,C-1)),x=A.camera.getPickRay(new Bt(1+m/2|0,C-1)),v=A.globe,E=v.pick(y,A),I=v.pick(x,A);if(!O(E)||!O(I)){o.barWidth=void 0,o.distanceLabel=void 0;return}let w=vme.cartesianToCartographic(E),Q=vme.cartesianToCartographic(I);Kze.setEndPoints(w,Q);let M=Kze.surfaceDistance,B=100,T;for(let D=zge.length-1;!O(T)&&D>=0;--D)zge[D]/M<B&&(T=zge[D]);if(O(T)){let D;T>=1e3?D=(T/1e3).toString()+" km":D=T.toString()+" m",o.barWidth=T/M|0,o.distanceLabel=D}else o.barWidth=void 0,o.distanceLabel=void 0}var _Se=YK,wbi="M 7.5,0 C 3.375,0 0,3.375 0,7.5 0,11.625 3.375,15 7.5,15 c 3.46875,0 6.375,-2.4375 7.21875,-5.625 l -1.96875,0 C 12,11.53125 9.9375,13.125 7.5,13.125 4.40625,13.125 1.875,10.59375 1.875,7.5 1.875,4.40625 4.40625,1.875 7.5,1.875 c 1.59375,0 2.90625,0.65625 3.9375,1.6875 l -3,3 6.5625,0 L 15,0 12.75,2.25 C 11.4375,0.84375 9.5625,0 7.5,0 z",BSe=wbi,bbi=EP,wSe=function(o){if(!O(o))throw new Ui("terria is required");this._terria=o,this.name="Unnamed Control",this.text=void 0,this.svgIcon=void 0,this.svgHeight=void 0,this.svgWidth=void 0,this.cssClass=void 0,this.isActive=!1,bbi.track(this,["name","svgIcon","svgHeight","svgWidth","cssClass","isActive"])};Object.defineProperties(wSe.prototype,{terria:{get:function(){return this._terria}},hasText:{get:function(){return O(this.text)&&typeof this.text=="string"}}});wSe.prototype.activate=function(){throw new Ui("activate must be implemented in the derived class.")};var hae=wSe,Cat=function(o){hae.apply(this,arguments)};Cat.prototype=Object.create(hae.prototype);var AH=Cat,iW=function(o){AH.apply(this,arguments),this.name="\u91CD\u7F6E\u89C6\u56FE",this.navigationLocked=!1,this.svgIcon=BSe,this.svgHeight=15,this.svgWidth=15,this.cssClass="navigation-control-icon-reset"};iW.prototype=Object.create(AH.prototype);iW.prototype.setNavigationLocked=function(o){this.navigationLocked=o};iW.prototype.resetView=function(){if(this.navigationLocked)return;let o=this.terria.scene;if(!o.screenSpaceCameraController.enableInputs)return;this.isActive=!0;let A=o.camera;if(O(this.terria.trackedEntity)){let f=this.terria.trackedEntity;this.terria.trackedEntity=void 0,this.terria.trackedEntity=f}else if(this.terria.options.defaultResetView){if(this.terria.options.defaultResetView&&this.terria.options.defaultResetView instanceof Kt)A.flyTo({destination:o.globe.ellipsoid.cartographicToCartesian(this.terria.options.defaultResetView)});else if(this.terria.options.defaultResetView&&this.terria.options.defaultResetView instanceof Si)try{Si.validate(this.terria.options.defaultResetView),A.flyTo({destination:this.terria.options.defaultResetView})}catch{console.log("Cesium-navigation/ResetViewNavigationControl:   options.defaultResetView Cesium rectangle is  invalid!")}}else typeof A.flyHome=="function"?A.flyHome(1):A.flyTo({destination:Ml.DEFAULT_VIEW_RECTANGLE,duration:1});this.isActive=!1};iW.prototype.activate=function(){this.resetView()};var bSe=iW,yat={},Qbi=new Kt,Kge=new ss;yat.getCameraFocus=function(o,A,f){let m=o.scene,C=m.camera;if(m.mode!==xi.MORPHING&&(O(f)||(f=new ee),O(o.trackedEntity)?f=o.trackedEntity.position.getValue(o.clock.currentTime,f):(Kge.origin=C.positionWC,Kge.direction=C.directionWC,f=m.globe.pick(Kge,m,f)),!!O(f)))return m.mode===xi.SCENE2D||m.mode===xi.COLUMBUS_VIEW?(f=C.worldToCameraCoordinatesPoint(f,f),A&&(f=m.globe.ellipsoid.cartographicToCartesian(m.mapProjection.unproject(f,Qbi),f))):A||(f=C.worldToCameraCoordinatesPoint(f,f)),f};var hH=yat,rW=function(o,A){AH.apply(this,arguments),this.name="Zoom "+(A?"In":"Out"),this.text=A?"+":"-",this.cssClass="navigation-control-icon-zoom-"+(A?"in":"out"),this.relativeAmount=2,A&&(this.relativeAmount=1/this.relativeAmount)};rW.prototype.relativeAmount=1;rW.prototype=Object.create(AH.prototype);rW.prototype.activate=function(){this.zoom(this.relativeAmount)};var Sbi=new ee;rW.prototype.zoom=function(o){if(this.isActive=!0,O(this.terria)){let A=this.terria.scene,f=A.screenSpaceCameraController;if(!f.enableInputs||!f.enableZoom)return;let m=A.camera,C;switch(A.mode){case xi.MORPHING:break;case xi.SCENE2D:m.zoomIn(m.positionCartographic.height*(1-this.relativeAmount));break;default:let y;if(O(this.terria.trackedEntity)?y=new ee:y=hH.getCameraFocus(this.terria,!1),O(y))C={direction:m.direction,up:m.up};else{let I=new ss(m.worldToCameraCoordinatesPoint(A.globe.ellipsoid.cartographicToCartesian(m.positionCartographic)),m.directionWC);y=Xh.grazingAltitudeLocation(I,A.globe.ellipsoid),C={heading:m.heading,pitch:m.pitch,roll:m.roll}}let x=ee.subtract(m.position,y,Sbi),v=ee.multiplyByScalar(x,o,x),E=ee.add(y,v,y);if(O(this.terria.trackedEntity)||A.mode===xi.COLUMBUS_VIEW)m.position=E;else{if(o===.5&&Ae(m.undergroundMode,!1)===!1&&m.positionCartographic.height<1)return;m.flyTo({destination:E,orientation:C,duration:.5,convert:!1})}}}this.isActive=!1};var fie=rW,Dbi="m 66.5625,0 0,15.15625 3.71875,0 0,-10.40625 5.5,10.40625 4.375,0 0,-15.15625 -3.71875,0 0,10.40625 L 70.9375,0 66.5625,0 z M 72.5,20.21875 c -28.867432,0 -52.28125,23.407738 -52.28125,52.28125 0,28.87351 23.413818,52.3125 52.28125,52.3125 28.86743,0 52.28125,-23.43899 52.28125,-52.3125 0,-28.873512 -23.41382,-52.28125 -52.28125,-52.28125 z m 0,1.75 c 13.842515,0 26.368948,5.558092 35.5,14.5625 l -11.03125,11 0.625,0.625 11.03125,-11 c 8.9199,9.108762 14.4375,21.579143 14.4375,35.34375 0,13.764606 -5.5176,26.22729 -14.4375,35.34375 l -11.03125,-11 -0.625,0.625 11.03125,11 c -9.130866,9.01087 -21.658601,14.59375 -35.5,14.59375 -13.801622,0 -26.321058,-5.53481 -35.4375,-14.5 l 11.125,-11.09375 c 6.277989,6.12179 14.857796,9.90625 24.3125,9.90625 19.241896,0 34.875,-15.629154 34.875,-34.875 0,-19.245847 -15.633104,-34.84375 -34.875,-34.84375 -9.454704,0 -18.034511,3.760884 -24.3125,9.875 L 37.0625,36.4375 C 46.179178,27.478444 58.696991,21.96875 72.5,21.96875 z m -0.875,0.84375 0,13.9375 1.75,0 0,-13.9375 -1.75,0 z M 36.46875,37.0625 47.5625,48.15625 C 41.429794,54.436565 37.65625,63.027539 37.65625,72.5 c 0,9.472461 3.773544,18.055746 9.90625,24.34375 L 36.46875,107.9375 c -8.96721,-9.1247 -14.5,-21.624886 -14.5,-35.4375 0,-13.812615 5.53279,-26.320526 14.5,-35.4375 z M 72.5,39.40625 c 18.297686,0 33.125,14.791695 33.125,33.09375 0,18.302054 -14.827314,33.125 -33.125,33.125 -18.297687,0 -33.09375,-14.822946 -33.09375,-33.125 0,-18.302056 14.796063,-33.09375 33.09375,-33.09375 z M 22.84375,71.625 l 0,1.75 13.96875,0 0,-1.75 -13.96875,0 z m 85.5625,0 0,1.75 14,0 0,-1.75 -14,0 z M 71.75,108.25 l 0,13.9375 1.71875,0 0,-13.9375 -1.71875,0 z",QSe=Dbi,Tbi="m 72.71875,54.375 c -0.476702,0 -0.908208,0.245402 -1.21875,0.5625 -0.310542,0.317098 -0.551189,0.701933 -0.78125,1.1875 -0.172018,0.363062 -0.319101,0.791709 -0.46875,1.25 -6.91615,1.075544 -12.313231,6.656514 -13,13.625 -0.327516,0.117495 -0.661877,0.244642 -0.9375,0.375 -0.485434,0.22959 -0.901634,0.471239 -1.21875,0.78125 -0.317116,0.310011 -0.5625,0.742111 -0.5625,1.21875 l 0.03125,0 c 0,0.476639 0.245384,0.877489 0.5625,1.1875 0.317116,0.310011 0.702066,0.58291 1.1875,0.8125 0.35554,0.168155 0.771616,0.32165 1.21875,0.46875 1.370803,6.10004 6.420817,10.834127 12.71875,11.8125 0.146999,0.447079 0.30025,0.863113 0.46875,1.21875 0.230061,0.485567 0.470708,0.870402 0.78125,1.1875 0.310542,0.317098 0.742048,0.5625 1.21875,0.5625 0.476702,0 0.876958,-0.245402 1.1875,-0.5625 0.310542,-0.317098 0.582439,-0.701933 0.8125,-1.1875 0.172018,-0.363062 0.319101,-0.791709 0.46875,-1.25 6.249045,-1.017063 11.256351,-5.7184 12.625,-11.78125 0.447134,-0.1471 0.86321,-0.300595 1.21875,-0.46875 0.485434,-0.22959 0.901633,-0.502489 1.21875,-0.8125 0.317117,-0.310011 0.5625,-0.710861 0.5625,-1.1875 l -0.03125,0 c 0,-0.476639 -0.245383,-0.908739 -0.5625,-1.21875 C 89.901633,71.846239 89.516684,71.60459 89.03125,71.375 88.755626,71.244642 88.456123,71.117495 88.125,71 87.439949,64.078341 82.072807,58.503735 75.21875,57.375 c -0.15044,-0.461669 -0.326927,-0.884711 -0.5,-1.25 -0.230061,-0.485567 -0.501958,-0.870402 -0.8125,-1.1875 -0.310542,-0.317098 -0.710798,-0.5625 -1.1875,-0.5625 z m -0.0625,1.40625 c 0.03595,-0.01283 0.05968,0 0.0625,0 0.0056,0 0.04321,-0.02233 0.1875,0.125 0.144288,0.147334 0.34336,0.447188 0.53125,0.84375 0.06385,0.134761 0.123901,0.309578 0.1875,0.46875 -0.320353,-0.01957 -0.643524,-0.0625 -0.96875,-0.0625 -0.289073,0 -0.558569,0.04702 -0.84375,0.0625 C 71.8761,57.059578 71.936151,56.884761 72,56.75 c 0.18789,-0.396562 0.355712,-0.696416 0.5,-0.84375 0.07214,-0.07367 0.120304,-0.112167 0.15625,-0.125 z m 0,2.40625 c 0.448007,0 0.906196,0.05436 1.34375,0.09375 0.177011,0.592256 0.347655,1.271044 0.5,2.03125 0.475097,2.370753 0.807525,5.463852 0.9375,8.9375 -0.906869,-0.02852 -1.834463,-0.0625 -2.78125,-0.0625 -0.92298,0 -1.802327,0.03537 -2.6875,0.0625 0.138529,-3.473648 0.493653,-6.566747 0.96875,-8.9375 0.154684,-0.771878 0.320019,-1.463985 0.5,-2.0625 0.405568,-0.03377 0.804291,-0.0625 1.21875,-0.0625 z m -2.71875,0.28125 c -0.129732,0.498888 -0.259782,0.987558 -0.375,1.5625 -0.498513,2.487595 -0.838088,5.693299 -0.96875,9.25 -3.21363,0.15162 -6.119596,0.480068 -8.40625,0.9375 -0.682394,0.136509 -1.275579,0.279657 -1.84375,0.4375 0.799068,-6.135482 5.504716,-11.036454 11.59375,-12.1875 z M 75.5,58.5 c 6.043169,1.18408 10.705093,6.052712 11.5,12.15625 -0.569435,-0.155806 -1.200273,-0.302525 -1.875,-0.4375 -2.262525,-0.452605 -5.108535,-0.783809 -8.28125,-0.9375 -0.130662,-3.556701 -0.470237,-6.762405 -0.96875,-9.25 C 75.761959,59.467174 75.626981,58.990925 75.5,58.5 z m -2.84375,12.09375 c 0.959338,0 1.895843,0.03282 2.8125,0.0625 C 75.48165,71.267751 75.5,71.871028 75.5,72.5 c 0,1.228616 -0.01449,2.438313 -0.0625,3.59375 -0.897358,0.0284 -1.811972,0.0625 -2.75,0.0625 -0.927373,0 -1.831062,-0.03473 -2.71875,-0.0625 -0.05109,-1.155437 -0.0625,-2.365134 -0.0625,-3.59375 0,-0.628972 0.01741,-1.232249 0.03125,-1.84375 0.895269,-0.02827 1.783025,-0.0625 2.71875,-0.0625 z M 68.5625,70.6875 c -0.01243,0.60601 -0.03125,1.189946 -0.03125,1.8125 0,1.22431 0.01541,2.407837 0.0625,3.5625 -3.125243,-0.150329 -5.92077,-0.471558 -8.09375,-0.90625 -0.784983,-0.157031 -1.511491,-0.316471 -2.125,-0.5 -0.107878,-0.704096 -0.1875,-1.422089 -0.1875,-2.15625 0,-0.115714 0.02849,-0.228688 0.03125,-0.34375 0.643106,-0.20284 1.389577,-0.390377 2.25,-0.5625 2.166953,-0.433487 4.97905,-0.75541 8.09375,-0.90625 z m 8.3125,0.03125 c 3.075121,0.15271 5.824455,0.446046 7.96875,0.875 0.857478,0.171534 1.630962,0.360416 2.28125,0.5625 0.0027,0.114659 0,0.228443 0,0.34375 0,0.735827 -0.07914,1.450633 -0.1875,2.15625 -0.598568,0.180148 -1.29077,0.34562 -2.0625,0.5 -2.158064,0.431708 -4.932088,0.754666 -8.03125,0.90625 0.04709,-1.154663 0.0625,-2.33819 0.0625,-3.5625 0,-0.611824 -0.01924,-1.185379 -0.03125,-1.78125 z M 57.15625,72.5625 c 0.0023,0.572772 0.06082,1.131112 0.125,1.6875 -0.125327,-0.05123 -0.266577,-0.10497 -0.375,-0.15625 -0.396499,-0.187528 -0.665288,-0.387337 -0.8125,-0.53125 -0.147212,-0.143913 -0.15625,-0.182756 -0.15625,-0.1875 0,-0.0047 -0.02221,-0.07484 0.125,-0.21875 0.147212,-0.143913 0.447251,-0.312472 0.84375,-0.5 0.07123,-0.03369 0.171867,-0.06006 0.25,-0.09375 z m 31.03125,0 c 0.08201,0.03503 0.175941,0.05872 0.25,0.09375 0.396499,0.187528 0.665288,0.356087 0.8125,0.5 0.14725,0.14391 0.15625,0.21405 0.15625,0.21875 0,0.0047 -0.009,0.04359 -0.15625,0.1875 -0.147212,0.143913 -0.416001,0.343722 -0.8125,0.53125 -0.09755,0.04613 -0.233314,0.07889 -0.34375,0.125 0.06214,-0.546289 0.09144,-1.094215 0.09375,-1.65625 z m -29.5,3.625 c 0.479308,0.123125 0.983064,0.234089 1.53125,0.34375 2.301781,0.460458 5.229421,0.787224 8.46875,0.9375 0.167006,2.84339 0.46081,5.433176 0.875,7.5 0.115218,0.574942 0.245268,1.063612 0.375,1.5625 -5.463677,-1.028179 -9.833074,-5.091831 -11.25,-10.34375 z m 27.96875,0 C 85.247546,81.408945 80.919274,85.442932 75.5,86.5 c 0.126981,-0.490925 0.261959,-0.967174 0.375,-1.53125 0.41419,-2.066824 0.707994,-4.65661 0.875,-7.5 3.204493,-0.15162 6.088346,-0.480068 8.375,-0.9375 0.548186,-0.109661 1.051942,-0.220625 1.53125,-0.34375 z M 70.0625,77.53125 c 0.865391,0.02589 1.723666,0.03125 2.625,0.03125 0.912062,0 1.782843,-0.0048 2.65625,-0.03125 -0.165173,2.736408 -0.453252,5.207651 -0.84375,7.15625 -0.152345,0.760206 -0.322989,1.438994 -0.5,2.03125 -0.437447,0.03919 -0.895856,0.0625 -1.34375,0.0625 -0.414943,0 -0.812719,-0.02881 -1.21875,-0.0625 -0.177011,-0.592256 -0.347655,-1.271044 -0.5,-2.03125 -0.390498,-1.948599 -0.700644,-4.419842 -0.875,-7.15625 z m 1.75,10.28125 c 0.284911,0.01545 0.554954,0.03125 0.84375,0.03125 0.325029,0 0.648588,-0.01171 0.96875,-0.03125 -0.05999,0.148763 -0.127309,0.31046 -0.1875,0.4375 -0.18789,0.396562 -0.386962,0.696416 -0.53125,0.84375 -0.144288,0.147334 -0.181857,0.125 -0.1875,0.125 -0.0056,0 -0.07446,0.02233 -0.21875,-0.125 C 72.355712,88.946416 72.18789,88.646562 72,88.25 71.939809,88.12296 71.872486,87.961263 71.8125,87.8125 z",SSe=Tbi,Mbi="M 72.46875,22.03125 C 59.505873,22.050338 46.521615,27.004287 36.6875,36.875 L 47.84375,47.96875 C 61.521556,34.240041 83.442603,34.227389 97.125,47.90625 l 11.125,-11.125 C 98.401629,26.935424 85.431627,22.012162 72.46875,22.03125 z",DSe=Mbi,Pbi=EP,aQ=function(o){this.terria=o.terria,this.eventHelper=new Mx,this.enableZoomControls=O(o.enableZoomControls)?o.enableZoomControls:!0,this.enableCompass=O(o.enableCompass)?o.enableCompass:!0,this.navigationLocked=!1,this.controls=o.controls,O(this.controls)||(this.controls=[new fie(this.terria,!0),new bSe(this.terria),new fie(this.terria,!1)]),this.svgCompassOuterRing=QSe,this.svgCompassGyro=SSe,this.svgCompassRotationMarker=DSe,this.showCompass=O(this.terria)&&this.enableCompass,this.heading=this.showCompass?this.terria.scene.camera.heading:0,this.isOrbiting=!1,this.orbitCursorAngle=0,this.orbitCursorOpacity=0,this.orbitLastTimestamp=0,this.orbitFrame=void 0,this.orbitIsLook=!1,this.orbitMouseMoveFunction=void 0,this.orbitMouseUpFunction=void 0,this.isRotating=!1,this.rotateInitialCursorAngle=void 0,this.rotateFrame=void 0,this.rotateIsLook=!1,this.rotateMouseMoveFunction=void 0,this.rotateMouseUpFunction=void 0,this._unsubcribeFromPostRender=void 0,Pbi.track(this,["controls","showCompass","heading","isOrbiting","orbitCursorAngle","isRotating"]);let A=this;aQ.prototype.setNavigationLocked=function(m){this.navigationLocked=m,this.controls&&this.controls.length>1&&this.controls[1].setNavigationLocked(this.navigationLocked)};function f(){O(A.terria)?(A._unsubcribeFromPostRender&&(A._unsubcribeFromPostRender(),A._unsubcribeFromPostRender=void 0),A.showCompass=A.enableCompass,A._unsubcribeFromPostRender=A.terria.scene.postRender.addEventListener(function(){A.heading=A.terria.scene.camera.heading})):(A._unsubcribeFromPostRender&&(A._unsubcribeFromPostRender(),A._unsubcribeFromPostRender=void 0),A.showCompass=!1)}this.eventHelper.add(this.terria.afterWidgetChanged,f,this),f()};aQ.prototype.destroy=function(){this.eventHelper.removeAll()};aQ.prototype.show=function(o){let A;this.enableZoomControls&&this.enableCompass?A=`<div class="compass" title=""  data-bind="visible: showCompass, event: { mousedown: handleMouseDown, dblclick: handleDoubleClick }"><div class="compass-outer-ring-background"></div> <div class="compass-rotation-marker" data-bind="visible: isOrbiting, style: { transform: 'rotate(-' + orbitCursorAngle + 'rad)', '-webkit-transform': 'rotate(-' + orbitCursorAngle + 'rad)', opacity: orbitCursorOpacity }, cesiumSvgPath: { path: svgCompassRotationMarker, width: 145, height: 145 }"></div> <div class="compass-outer-ring" title="" data-bind="style: { transform: 'rotate(-' + heading + 'rad)', '-webkit-transform': 'rotate(-' + heading + 'rad)' }, cesiumSvgPath: { path: svgCompassOuterRing, width: 145, height: 145 }"></div> <div class="compass-gyro-background"></div> <div class="compass-gyro" data-bind="cesiumSvgPath: { path: svgCompassGyro, width: 145, height: 145 }, css: { 'compass-gyro-active': isOrbiting }"></div></div><div class="navigation-controls"><!-- ko foreach: controls --><div data-bind="click: activate, attr: { title: $data.name }, css: $root.isLastControl($data) ? 'navigation-control-last' : 'navigation-control' ">   <!-- ko if: $data.hasText -->   <div data-bind="text: $data.text, css: $data.isActive ?  'navigation-control-icon-active ' + $data.cssClass : $data.cssClass"></div>   <!-- /ko -->  <!-- ko ifnot: $data.hasText -->  <div data-bind="cesiumSvgPath: { path: $data.svgIcon, width: $data.svgWidth, height: $data.svgHeight }, css: $data.isActive ?  'navigation-control-icon-active ' + $data.cssClass : $data.cssClass"></div>  <!-- /ko --> </div> <!-- /ko --></div>`:!this.enableZoomControls&&this.enableCompass?A=`<div class="compass" title="" data-bind="visible: showCompass, event: { mousedown: handleMouseDown, dblclick: handleDoubleClick }"><div class="compass-outer-ring-background"></div> <div class="compass-rotation-marker" data-bind="visible: isOrbiting, style: { transform: 'rotate(-' + orbitCursorAngle + 'rad)', '-webkit-transform': 'rotate(-' + orbitCursorAngle + 'rad)', opacity: orbitCursorOpacity }, cesiumSvgPath: { path: svgCompassRotationMarker, width: 145, height: 145 }"></div> <div class="compass-outer-ring" title="" data-bind="style: { transform: 'rotate(-' + heading + 'rad)', '-webkit-transform': 'rotate(-' + heading + 'rad)' }, cesiumSvgPath: { path: svgCompassOuterRing, width: 145, height: 145 }"></div> <div class="compass-gyro-background"></div> <div class="compass-gyro" data-bind="cesiumSvgPath: { path: svgCompassGyro, width: 145, height: 145 }, css: { 'compass-gyro-active': isOrbiting }"></div></div><div class="navigation-controls"  style="display: none;" ><!-- ko foreach: controls --><div data-bind="click: activate, attr: { title: $data.name }, css: $root.isLastControl($data) ? 'navigation-control-last' : 'navigation-control' ">   <!-- ko if: $data.hasText -->   <div data-bind="text: $data.text, css: $data.isActive ?  'navigation-control-icon-active ' + $data.cssClass : $data.cssClass"></div>   <!-- /ko -->  <!-- ko ifnot: $data.hasText -->  <div data-bind="cesiumSvgPath: { path: $data.svgIcon, width: $data.svgWidth, height: $data.svgHeight }, css: $data.isActive ?  'navigation-control-icon-active ' + $data.cssClass : $data.cssClass"></div>  <!-- /ko --> </div> <!-- /ko --></div>`:this.enableZoomControls&&!this.enableCompass?A=`<div class="compass"  style="display: none;" title="" data-bind="visible: showCompass, event: { mousedown: handleMouseDown, dblclick: handleDoubleClick }"><div class="compass-outer-ring-background"></div> <div class="compass-rotation-marker" data-bind="visible: isOrbiting, style: { transform: 'rotate(-' + orbitCursorAngle + 'rad)', '-webkit-transform': 'rotate(-' + orbitCursorAngle + 'rad)', opacity: orbitCursorOpacity }, cesiumSvgPath: { path: svgCompassRotationMarker, width: 145, height: 145 }"></div> <div class="compass-outer-ring" title="" data-bind="style: { transform: 'rotate(-' + heading + 'rad)', '-webkit-transform': 'rotate(-' + heading + 'rad)' }, cesiumSvgPath: { path: svgCompassOuterRing, width: 145, height: 145 }"></div> <div class="compass-gyro-background"></div> <div class="compass-gyro" data-bind="cesiumSvgPath: { path: svgCompassGyro, width: 145, height: 145 }, css: { 'compass-gyro-active': isOrbiting }"></div></div><div class="navigation-controls"    ><!-- ko foreach: controls --><div data-bind="click: activate, attr: { title: $data.name }, css: $root.isLastControl($data) ? 'navigation-control-last' : 'navigation-control' ">   <!-- ko if: $data.hasText -->   <div data-bind="text: $data.text, css: $data.isActive ?  'navigation-control-icon-active ' + $data.cssClass : $data.cssClass"></div>   <!-- /ko -->  <!-- ko ifnot: $data.hasText -->  <div data-bind="cesiumSvgPath: { path: $data.svgIcon, width: $data.svgWidth, height: $data.svgHeight }, css: $data.isActive ?  'navigation-control-icon-active ' + $data.cssClass : $data.cssClass"></div>  <!-- /ko --> </div> <!-- /ko --></div>`:!this.enableZoomControls&&!this.enableCompass&&(A=`<div class="compass"  style="display: none;" title="" data-bind="visible: showCompass, event: { mousedown: handleMouseDown, dblclick: handleDoubleClick }"><div class="compass-outer-ring-background"></div> <div class="compass-rotation-marker" data-bind="visible: isOrbiting, style: { transform: 'rotate(-' + orbitCursorAngle + 'rad)', '-webkit-transform': 'rotate(-' + orbitCursorAngle + 'rad)', opacity: orbitCursorOpacity }, cesiumSvgPath: { path: svgCompassRotationMarker, width: 145, height: 145 }"></div> <div class="compass-outer-ring" title="" data-bind="style: { transform: 'rotate(-' + heading + 'rad)', '-webkit-transform': 'rotate(-' + heading + 'rad)' }, cesiumSvgPath: { path: svgCompassOuterRing, width: 145, height: 145 }"></div> <div class="compass-gyro-background"></div> <div class="compass-gyro" data-bind="cesiumSvgPath: { path: svgCompassGyro, width: 145, height: 145 }, css: { 'compass-gyro-active': isOrbiting }"></div></div><div class="navigation-controls"   style="display: none;" ><!-- ko foreach: controls --><div data-bind="click: activate, attr: { title: $data.name }, css: $root.isLastControl($data) ? 'navigation-control-last' : 'navigation-control' ">   <!-- ko if: $data.hasText -->   <div data-bind="text: $data.text, css: $data.isActive ?  'navigation-control-icon-active ' + $data.cssClass : $data.cssClass"></div>   <!-- /ko -->  <!-- ko ifnot: $data.hasText -->  <div data-bind="cesiumSvgPath: { path: $data.svgIcon, width: $data.svgWidth, height: $data.svgHeight }, css: $data.isActive ?  'navigation-control-icon-active ' + $data.cssClass : $data.cssClass"></div>  <!-- /ko --> </div> <!-- /ko --></div>`),Aae(A,o,this)};aQ.prototype.add=function(o){this.controls.push(o)};aQ.prototype.remove=function(o){this.controls.remove(o)};aQ.prototype.isLastControl=function(o){return o===this.controls[this.controls.length-1]};var TSe=new Bt;aQ.prototype.handleMouseDown=function(o,A){if(this.terria.scene.mode===xi.MORPHING||o.navigationLocked)return!0;let f=A.currentTarget,m=A.currentTarget.getBoundingClientRect(),C=m.width/2,y=new Bt((m.right-m.left)/2,(m.bottom-m.top)/2),x=new Bt(A.clientX-m.left,A.clientY-m.top),v=Bt.subtract(x,y,TSe),E=Bt.magnitude(v)/C;if(E<50/145)Rbi(this,f,v);else if(E<1)Lbi(this,f,v);else return!0};var Eme=new Xe,gie=new Xe,MSe=new ee;aQ.prototype.handleDoubleClick=function(o,A){let f=o.terria.scene,m=f.camera,C=f.screenSpaceCameraController;if(f.mode===xi.MORPHING||!C.enableInputs||o.navigationLocked)return!0;if(f.mode===xi.COLUMBUS_VIEW&&!C.enableTranslate||(f.mode===xi.SCENE3D||f.mode===xi.COLUMBUS_VIEW)&&(!C.enableLook||f.mode===xi.SCENE3D&&!C.enableRotate))return;let y=hH.getCameraFocus(o.terria,!0,MSe);if(!O(y)){this.controls[1].resetView();return}let x=f.globe.ellipsoid.cartographicToCartesian(m.positionCartographic,new ee),v=f.globe.ellipsoid.geodeticSurfaceNormal(y),E=new wi(y,0);m.flyToBoundingSphere(E,{offset:new Ex(0,je.PI_OVER_TWO-ee.angleBetween(v,m.directionWC),ee.distance(x,y)),duration:1.5})};aQ.create=function(o){let A=new aQ(o);return A.show(o.container),A};function Rbi(o,A,f){let m=o.terria.scene,C=m.screenSpaceCameraController;if(m.mode===xi.MORPHING||!C.enableInputs)return;if(o.navigationLocked)return!0;switch(m.mode){case xi.COLUMBUS_VIEW:if(C.enableLook)break;if(!C.enableTranslate||!C.enableTilt)return;break;case xi.SCENE3D:if(C.enableLook)break;if(!C.enableTilt||!C.enableRotate)return;break;case xi.SCENE2D:if(!C.enableTranslate)return;break}document.removeEventListener("mousemove",o.orbitMouseMoveFunction,!1),document.removeEventListener("mouseup",o.orbitMouseUpFunction,!1),O(o.orbitTickFunction)&&o.terria.clock.onTick.removeEventListener(o.orbitTickFunction),o.orbitMouseMoveFunction=void 0,o.orbitMouseUpFunction=void 0,o.orbitTickFunction=void 0,o.isOrbiting=!0,o.orbitLastTimestamp=OA();let y=m.camera;if(O(o.terria.trackedEntity))o.orbitFrame=void 0,o.orbitIsLook=!1;else{let v=hH.getCameraFocus(o.terria,!0,MSe);O(v)?(o.orbitFrame=zn.eastNorthUpToFixedFrame(v,m.globe.ellipsoid,gie),o.orbitIsLook=!1):(o.orbitFrame=zn.eastNorthUpToFixedFrame(y.positionWC,m.globe.ellipsoid,gie),o.orbitIsLook=!0)}o.orbitTickFunction=function(v){let E=OA(),I=E-o.orbitLastTimestamp,w=(o.orbitCursorOpacity-.5)*2.5/1e3,Q=I*w,M=o.orbitCursorAngle+je.PI_OVER_TWO,B=Math.cos(M)*Q,T=Math.sin(M)*Q,D;if(o.navigationLocked)return!0;O(o.orbitFrame)&&(D=Xe.clone(y.transform,Eme),y.lookAtTransform(o.orbitFrame)),m.mode===xi.SCENE2D?y.move(new ee(B,T,0),Math.max(m.canvas.clientWidth,m.canvas.clientHeight)/100*y.positionCartographic.height*Q):o.orbitIsLook?(y.look(ee.UNIT_Z,-B),y.look(y.right,-T)):(y.rotateLeft(B),y.rotateUp(T)),O(o.orbitFrame)&&y.lookAtTransform(D),o.orbitLastTimestamp=E};function x(v,E){let I=Math.atan2(-v.y,v.x);o.orbitCursorAngle=je.zeroToTwoPi(I-je.PI_OVER_TWO);let w=Bt.magnitude(v),Q=E/2,M=Math.min(w/Q,1),B=.5*M*M+.5;o.orbitCursorOpacity=B}o.orbitMouseMoveFunction=function(v){let E=A.getBoundingClientRect(),I=new Bt((E.right-E.left)/2,(E.bottom-E.top)/2),w=new Bt(v.clientX-E.left,v.clientY-E.top),Q=Bt.subtract(w,I,TSe);x(Q,E.width)},o.orbitMouseUpFunction=function(v){o.isOrbiting=!1,document.removeEventListener("mousemove",o.orbitMouseMoveFunction,!1),document.removeEventListener("mouseup",o.orbitMouseUpFunction,!1),O(o.orbitTickFunction)&&o.terria.clock.onTick.removeEventListener(o.orbitTickFunction),o.orbitMouseMoveFunction=void 0,o.orbitMouseUpFunction=void 0,o.orbitTickFunction=void 0},document.addEventListener("mousemove",o.orbitMouseMoveFunction,!1),document.addEventListener("mouseup",o.orbitMouseUpFunction,!1),o.terria.clock.onTick.addEventListener(o.orbitTickFunction),x(f,A.getBoundingClientRect().width)}function Lbi(o,A,f){let m=o.terria.scene,C=m.camera,y=m.screenSpaceCameraController;if(m.mode===xi.MORPHING||m.mode===xi.SCENE2D||!y.enableInputs)return;if(o.navigationLocked)return!0;if(!y.enableLook&&(m.mode===xi.COLUMBUS_VIEW||m.mode===xi.SCENE3D&&!y.enableRotate))return;if(document.removeEventListener("mousemove",o.rotateMouseMoveFunction,!1),document.removeEventListener("mouseup",o.rotateMouseUpFunction,!1),o.rotateMouseMoveFunction=void 0,o.rotateMouseUpFunction=void 0,o.isRotating=!0,o.rotateInitialCursorAngle=Math.atan2(-f.y,f.x),O(o.terria.trackedEntity))o.rotateFrame=void 0,o.rotateIsLook=!1;else{let v=hH.getCameraFocus(o.terria,!0,MSe);!O(v)||m.mode===xi.COLUMBUS_VIEW&&!y.enableLook&&!y.enableTranslate?(o.rotateFrame=zn.eastNorthUpToFixedFrame(C.positionWC,m.globe.ellipsoid,gie),o.rotateIsLook=!0):(o.rotateFrame=zn.eastNorthUpToFixedFrame(v,m.globe.ellipsoid,gie),o.rotateIsLook=!1)}let x;O(o.rotateFrame)&&(x=Xe.clone(C.transform,Eme),C.lookAtTransform(o.rotateFrame)),o.rotateInitialCameraAngle=-C.heading,O(o.rotateFrame)&&C.lookAtTransform(x),o.rotateMouseMoveFunction=function(v){let E=A.getBoundingClientRect(),I=new Bt((E.right-E.left)/2,(E.bottom-E.top)/2),w=new Bt(v.clientX-E.left,v.clientY-E.top),Q=Bt.subtract(w,I,TSe),M=Math.atan2(-Q.y,Q.x)-o.rotateInitialCursorAngle,B=je.zeroToTwoPi(o.rotateInitialCameraAngle-M),T=o.terria.scene.camera,D;O(o.rotateFrame)&&(D=Xe.clone(T.transform,Eme),T.lookAtTransform(o.rotateFrame));let F=-T.heading;T.rotateRight(B-F),O(o.rotateFrame)&&T.lookAtTransform(D)},o.rotateMouseUpFunction=function(v){o.isRotating=!1,document.removeEventListener("mousemove",o.rotateMouseMoveFunction,!1),document.removeEventListener("mouseup",o.rotateMouseUpFunction,!1),o.rotateMouseMoveFunction=void 0,o.rotateMouseUpFunction=void 0},document.addEventListener("mousemove",o.rotateMouseMoveFunction,!1),document.addEventListener("mouseup",o.rotateMouseUpFunction,!1)}var R7=aQ,Yze=br,AB=function(o){Fbi.apply(this,arguments),this._onDestroyListeners=[]};AB.prototype.distanceLegendViewModel=void 0;AB.prototype.navigationViewModel=void 0;AB.prototype.navigationDiv=void 0;AB.prototype.distanceLegendDiv=void 0;AB.prototype.terria=void 0;AB.prototype.container=void 0;AB.prototype._onDestroyListeners=void 0;AB.prototype._navigationLocked=!1;AB.prototype.setNavigationLocked=function(o){this._navigationLocked=o,this.navigationViewModel.setNavigationLocked(this._navigationLocked)};AB.prototype.getNavigationLocked=function(){return this._navigationLocked};AB.prototype.destroy=function(){O(this.navigationViewModel)&&this.navigationViewModel.destroy(),O(this.distanceLegendViewModel)&&this.distanceLegendViewModel.destroy(),O(this.navigationDiv)&&this.navigationDiv.parentNode.removeChild(this.navigationDiv),delete this.navigationDiv,O(this.distanceLegendDiv)&&this.distanceLegendDiv.parentNode.removeChild(this.distanceLegendDiv),delete this.distanceLegendDiv,O(this.container)&&this.container.parentNode.removeChild(this.container),delete this.container;for(let o=0;o<this._onDestroyListeners.length;o++)this._onDestroyListeners[o]()};AB.prototype.addOnDestroyListener=function(o){typeof o=="function"&&this._onDestroyListeners.push(o)};function Fbi(o,A){if(!O(o))throw new Ui("CesiumWidget or Viewer is required.");let f=O(o.cesiumWidget)?o.cesiumWidget:o,m=document.createElement("div");m.className="Geoworld-widget-GeoworldNavigationContainer",f.container.appendChild(m),this.terria=o,this.terria.options=O(A)?A:{},this.terria.afterWidgetChanged=new Yze,this.terria.beforeWidgetChanged=new Yze,this.container=m,(!O(this.terria.options.enableDistanceLegend)||this.terria.options.enableDistanceLegend)&&(this.distanceLegendDiv=document.createElement("div"),m.appendChild(this.distanceLegendDiv),this.distanceLegendDiv.setAttribute("id","distanceLegendDiv"),this.distanceLegendViewModel=_Se.create({container:this.distanceLegendDiv,terria:this.terria,mapElement:m,enableDistanceLegend:!0})),(!O(this.terria.options.enableZoomControls)||this.terria.options.enableZoomControls)&&(!O(this.terria.options.enableCompass)||this.terria.options.enableCompass)?(this.navigationDiv=document.createElement("div"),this.navigationDiv.setAttribute("id","navigationDiv"),m.appendChild(this.navigationDiv),this.navigationViewModel=R7.create({container:this.navigationDiv,terria:this.terria,enableZoomControls:!0,enableCompass:!0})):O(this.terria.options.enableZoomControls)&&!this.terria.options.enableZoomControls&&(!O(this.terria.options.enableCompass)||this.terria.options.enableCompass)?(this.navigationDiv=document.createElement("div"),this.navigationDiv.setAttribute("id","navigationDiv"),m.appendChild(this.navigationDiv),this.navigationViewModel=R7.create({container:this.navigationDiv,terria:this.terria,enableZoomControls:!1,enableCompass:!0})):(!O(this.terria.options.enableZoomControls)||this.terria.options.enableZoomControls)&&O(this.terria.options.enableCompass)&&!this.terria.options.enableCompass?(this.navigationDiv=document.createElement("div"),this.navigationDiv.setAttribute("id","navigationDiv"),m.appendChild(this.navigationDiv),this.navigationViewModel=R7.create({container:this.navigationDiv,terria:this.terria,enableZoomControls:!0,enableCompass:!1})):O(this.terria.options.enableZoomControls)&&!this.terria.options.enableZoomControls&&O(this.terria.options.enableCompass)&&this.terria.options.enableCompass}var PSe=AB;function xat(o,A){if(!O(o))throw new Ui("viewer is required.");vat(o,A).addOnDestroyListener(function(f){return function(){delete f.cesiumNavigation}}(o)),Object.defineProperties(o,{cesiumNavigation:{configurable:!0,get:function(){return o.cesiumWidget.cesiumNavigation}}})}xat.mixinWidget=function(o,A){return vat.apply(void 0,arguments)};var vat=function(o,A){let f=new PSe(o,A),m=O(o.cesiumWidget)?o.cesiumWidget:o;return Object.defineProperties(m,{cesiumNavigation:{configurable:!0,get:function(){return f}}}),f.addOnDestroyListener(function(C){return function(){delete C.cesiumNavigation}}(m)),f},Eat=xat;function Nbi(o,A,f,m,C,y){let x=m._frameState,v=o.derivedCommands;!O(v)||(x.useLogDepth&&O(v.logDepth)&&(o=v.logDepth.command),v=o.derivedCommands,O(v[A])&&(o=v[A][f],o.execute(C,y)))}var Yge,Jge,Wge,jge;function Jze(o,A,f,m,C,y){Yge=Yge||new Yu,Jge=Jge||new n2,Wge=Wge||new Ss,jge=jge||new K0;let x=o._us,v=x._frameState,E=v.camera,I=E._scene,w=I._view,Q=w.frustumCommandsList,M=Q.length,B=I._globeTranslucencyState,T=B.translucent,D;O(E.frustum.fov)?D=E.frustum.clone(Yge):O(E.frustum.infiniteProjectionMatrix)?D=E.frustum.clone(Jge):O(E.frustum.width)?D=E.frustum.clone(Wge):D=E.frustum.clone(jge);function F(U,V,H,q){(!y||y(U,V))&&(m&&C?Nbi(U,m,C,V,H,q):U.execute(H,q))}let L,R,k;for(let U=0;U<M;++U){let V=M-U-1,H=Q[V],q=f.framebuffer;f.framebuffer=A,D.near=V!==0?H.near*I.opaqueFrustumNearOffset:H.near,D.far=H.far,x.updateFrustum(D),x.updatePass(hr.GLOBE),k=H.commands[hr.GLOBE],R=H.indices[hr.GLOBE];let ie=I._view.globeTranslucencyFramebuffer;if(T)B.executeGlobeCommands(H,F,ie,I,f);else for(L=0;L<R;++L)F(k[L],I,o,f);for(x.updatePass(hr.CESIUM_3D_TILE),k=H.commands[hr.CESIUM_3D_TILE],R=H.indices[hr.CESIUM_3D_TILE],L=0;L<R;++L)F(k[L],I,o,f);for(x.updatePass(hr.OPAQUE),k=H.commands[hr.OPAQUE],R=H.indices[hr.OPAQUE],L=0;L<R;++L)F(k[L],I,o,f);for(x.updatePass(hr.TRANSLUCENT),k=H.commands[hr.TRANSLUCENT],R=H.indices[hr.TRANSLUCENT],L=0;L<R;++L)F(k[L],I,o,f);f.framebuffer=q}}var Wze=`
`,Ye+="-----END PUBLIC KEY-----"},Oe.hasPublicKeyProperty=function(Ye){return(Ye=Ye||{}).hasOwnProperty("n")&&Ye.hasOwnProperty("e")},Oe.hasPrivateKeyProperty=function(Ye){return(Ye=Ye||{}).hasOwnProperty("n")&&Ye.hasOwnProperty("e")&&Ye.hasOwnProperty("d")&&Ye.hasOwnProperty("p")&&Ye.hasOwnProperty("q")&&Ye.hasOwnProperty("dmp1")&&Ye.hasOwnProperty("dmq1")&&Ye.hasOwnProperty("coeff")},Oe.prototype.parsePropertiesFrom=function(Ye){this.n=Ye.n,this.e=Ye.e,Ye.hasOwnProperty("d")&&(this.d=Ye.d,this.p=Ye.p,this.q=Ye.q,this.dmp1=Ye.dmp1,this.dmq1=Ye.dmq1,this.coeff=Ye.coeff)},Oe}($e),ct=function(){function We(Oe){Oe=Oe||{},this.default_key_size=parseInt(Oe.default_key_size,10)||1024,this.default_public_exponent=Oe.default_public_exponent||"010001",this.log=Oe.log||!1,this.key=null}return We.prototype.setKey=function(Oe){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new Ze(Oe)},We.prototype.setPrivateKey=function(Oe){this.setKey(Oe)},We.prototype.setPublicKey=function(Oe){this.setKey(Oe)},We.prototype.decrypt=function(Oe){try{return this.getKey().decrypt(function(Ye){var rt,gt="",Et=0,yt=0;for(rt=0;rt<Ye.length&&Ye.charAt(rt)!=w;++rt){var vt=I.indexOf(Ye.charAt(rt));vt<0||(Et==0?(gt+=f(vt>>2),yt=3&vt,Et=1):Et==1?(gt+=f(yt<<2|vt>>4),yt=15&vt,Et=2):Et==2?(gt+=f(yt),gt+=f(vt>>2),yt=3&vt,Et=3):(gt+=f(yt<<2|vt>>4),gt+=f(15&vt),Et=0))}return Et==1&&(gt+=f(yt<<2)),gt}(Oe))}catch{return!1}},We.prototype.encrypt=function(Oe){try{return Q(this.getKey().encrypt(Oe))}catch{return!1}},We.prototype.getKey=function(Oe){if(!this.key){if(this.key=new Ze,Oe&&{}.toString.call(Oe)==="[object Function]")return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,Oe);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},We.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},We.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},We.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},We.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},We.version="3.0.0-beta.1",We}();window.JSEncrypt=ct,o.JSEncrypt=ct,o.default=ct,Object.defineProperty(o,"__esModule",{value:!0})});var ESe=pat.JSEncrypt.JSEncrypt;function xbi(o,A){let f=!1,m=new ESe,C=x=>{let v=oD.enc.Utf8.parse("*ya;p7291zclfleoqc20161v$DSP&%3+"),E=oD.enc.Utf8.parse("&kdaow$IEW.##%5-"),I=oD.enc.Hex.parse(x),w=oD.enc.Base64.stringify(I);return oD.AES.decrypt(w,v,{iv:E,mode:oD.mode.CBC,padding:oD.pad.Pkcs7}).toString(oD.enc.Utf8).toString()},y=async(x,v)=>{let E={cmdType:"getRegisterIds",time:new Date().getTime()},I=m.encrypt(JSON.stringify(E)),w=await An.post({url:`${x}/licensemanager/client?sid=${window.rsaPublicId}`,data:I,retryAttempts:3,headers:{"Content-Type":"application/json",dataType:"text"}});if(!w){f=!1,v&&v(f);return}return f=JSON.parse(C(w)).registeredModules.filter(Q=>Q===37).length>0,v&&v(f),f};f=(async(x,v)=>{let E=new Date().getTime();await An.fetchJson({url:`${x}/licensemanager/client?cmdType=getRsaKey&${E}`}).then(I=>{let w=I;if(!w)return f=!1;if(w.code!==200){f=!1,v&&v(f);return}return m.setPublicKey(w.data.key),window.rsaPublicKey=w.data.key,window.rsaPublicId=w.data.sid,y(x,v)}).catch(I=>{f=!1,v&&v(f)})})(o,A)}var mat=xbi,vbi=15;function AH(o){this._resource=void 0,this._credit=void 0,this._tilingScheme=void 0,this._levelZeroMaximumGeometricError=void 0,this._maxLevel=void 0,this._terrainDataStructure=void 0,this._ready=!1,this._width=void 0,this._height=void 0,this._encoding=void 0;let A=o.token;this._hasAvailability=!1,this._tilesAvailable=void 0,this._tilesAvailablityLoaded=void 0,this._availableCache={};let f=this,m=Ae(o.ellipsoid,Ti.WGS84);this._readyPromise=Promise.resolve(o.url).then(function(C){let y=An.createIfNeeded(C);return y.appendForwardSlash(),O(A)&&(y=y.getDerivedResource({queryParameters:{token:A}})),f._resource=y,y.getDerivedResource({queryParameters:{f:"pjson"}}).fetchJson()}).then(function(C){let y=C.copyrightText;O(y)&&(f._credit=new tl(y));let x=C.spatialReference,v=Ae(x.latestWkid,x.wkid),E=C.extent,I={ellipsoid:m};if(v===4326)I.rectangle=Si.fromDegrees(E.xmin,E.ymin,E.xmax,E.ymax),f._tilingScheme=new af(I);else if(v===3857){let Q=Math.PI*m.maximumRadius;C.extent.xmax>Q&&(C.extent.xmax=Q),C.extent.ymax>Q&&(C.extent.ymax=Q),C.extent.xmin<-Q&&(C.extent.xmin=-Q),C.extent.ymin<-Q&&(C.extent.ymin=-Q),I.rectangleSouthwestInMeters=new Bt(E.xmin,E.ymin),I.rectangleNortheastInMeters=new Bt(E.xmax,E.ymax),f._tilingScheme=new Am(I)}else return Promise.reject(new nr("Invalid spatial reference"));let w=C.tileInfo;return O(w)?(f._width=w.rows+1,f._height=w.cols+1,f._encoding=w.format==="LERC"?VF.LERC:VF.NONE,f._lodCount=w.lods.length-1,(f._hasAvailability=C.capabilities.indexOf("Tilemap")!==-1)&&(f._tilesAvailable=new $L(f._tilingScheme,f._lodCount),f._tilesAvailable.addAvailableTileRange(0,0,0,f._tilingScheme.getNumberOfXTilesAtLevel(0),f._tilingScheme.getNumberOfYTilesAtLevel(0)),f._tilesAvailablityLoaded=new $L(f._tilingScheme,f._lodCount)),f._levelZeroMaximumGeometricError=Cx.getEstimatedLevelZeroGeometricErrorForAHeightmap(f._tilingScheme.ellipsoid,f._width,f._tilingScheme.getNumberOfXTilesAtLevel(0)),C.bandCount>1&&console.log("ArcGISTiledElevationTerrainProvider: Terrain data has more than 1 band. Using the first one."),O(C.minValues)&&O(C.maxValues)?f._terrainDataStructure={elementMultiplier:1,lowestEncodedHeight:C.minValues[0],highestEncodedHeight:C.maxValues[0]}:f._terrainDataStructure={elementMultiplier:1},f._ready=!0,!0):Promise.reject(new nr("tileInfo is required"))}).catch(function(C){let y=`An error occurred while accessing ${f._resource.url}.`;return wc.reportError(void 0,f,f._errorEvent,y),Promise.reject(C)}),this._errorEvent=new br}Object.defineProperties(AH.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){return this._tilesAvailable}}});AH.prototype.requestTileGeometry=function(o,A,f,m){let C=this._resource.getDerivedResource({url:`tile/${f}/${A}/${o}`,request:m}),y=this._hasAvailability,x=Promise.resolve(!0),v;if(y&&!O(ISe(this,f+1,o*2,A*2))){let Q=Cat(this,f+1,o*2,A*2);x=Q.promise,v=Q.request}let E=C.fetchArrayBuffer();if(!O(E)||!O(x))return;let I=this,w=this._tilesAvailable;return Promise.all([E,x]).then(function(Q){return new bQ({buffer:Q[0],width:I._width,height:I._height,childTileMask:y?w.computeChildMaskForTile(f,o,A):vbi,structure:I._terrainDataStructure,encoding:I._encoding})}).catch(function(Q){return O(v)&&v.state===CA.CANCELLED?(m.cancel(),m.deferred.promise.finally(function(){return m.state=CA.CANCELLED,Promise.reject(Q)})):Promise.reject(Q)})};function ISe(o,A,f,m){if(!o._hasAvailability)return;let C=o._tilesAvailablityLoaded,y=o._tilesAvailable;if(A>o._lodCount)return!1;if(y.isTileAvailable(A,f,m))return!0;if(C.isTileAvailable(A,f,m))return!1}AH.prototype.getLevelMaximumGeometricError=function(o){return this._levelZeroMaximumGeometricError/(1<<o)};AH.prototype.getTileDataAvailable=function(o,A,f){if(!this._hasAvailability)return;let m=ISe(this,f,o,A);if(O(m))return m;Cat(this,f,o,A)};AH.prototype.loadTileDataAvailability=function(o,A,f){};function Ebi(o,A,f,m){let C=A-1,y=f-1,x=m[o.y*A+o.x],v=[],E={startX:o.x,startY:o.y,endX:0,endY:0},I=new Bt(o.x+1,o.y+1),w=!1,Q=!1;for(;!(w&&Q);){let M=I.x,B=Q?I.y+1:I.y;if(!w){for(let T=o.y;T<B;++T)if(m[T*A+I.x]!==x){w=!0;break}w?(v.push(new Bt(I.x,o.y)),--I.x,--M,E.endX=I.x):I.x===C?(E.endX=I.x,w=!0):++I.x}if(!Q){let T=I.y*A;for(let D=o.x;D<=M;++D)if(m[T+D]!==x){Q=!0;break}Q?(v.push(new Bt(o.x,I.y)),--I.y,E.endY=I.y):I.y===y?(E.endY=I.y,Q=!0):++I.y}}return{endingIndices:v,range:E,value:x}}function Ibi(o,A,f,m,C){let y=[];if(C.every(function(v){return v===C[0]}))return C[0]===1&&y.push({startX:o,startY:A,endX:o+f-1,endY:A+m-1}),y;let x=[new Bt(0,0)];for(;x.length>0;){let v=x.pop(),E=Ebi(v,f,m,C);if(E.value===1){let w=E.range;w.startX+=o,w.endX+=o,w.startY+=A,w.endY+=A,y.push(w)}let I=E.endingIndices;I.length>0&&(x=x.concat(I))}return y}function Cat(o,A,f,m){if(!o._hasAvailability)return{};let C=Math.floor(f/128)*128,y=Math.floor(m/128)*128,x=Math.min(1<<A,128),v=`tilemap/${A}/${y}/${C}/${x}/${x}`,E=o._availableCache;if(O(E[v]))return E[v];let I=new cC({throttle:!1,throttleByServer:!0,type:oB.TERRAIN}),w=o._resource.getDerivedResource({url:v,request:I}).fetchJson();return O(w)?(w=w.then(function(Q){let M=Ibi(C,y,x,x,Q.data);o._tilesAvailablityLoaded.addAvailableTileRange(A,C,y,C+x,y+x);let B=o._tilesAvailable;for(let T=0;T<M.length;++T){let D=M[T];B.addAvailableTileRange(A,D.startX,D.startY,D.endX,D.endY)}return ISe(o,A,f,m)}),E[v]={promise:w,request:I},w=w.finally(function(Q){return delete E[v],Q}),{promise:w,request:I}):{}}var yat=AH,fie={};fie.defaultKey=void 0;fie.getKey=function(o){return O(o)?o:fie.defaultKey};var xat=fie,vat="https://dev.virtualearth.net/REST/v1/Locations";function _Se(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.key;this._key=A;let f={key:A};O(o.culture)&&(f.culture=o.culture),this._resource=new An({url:vat,queryParameters:f})}Object.defineProperties(_Se.prototype,{url:{get:function(){return vat}},key:{get:function(){return this._key}}});_Se.prototype.geocode=function(o){return this._resource.getDerivedResource({queryParameters:{query:o}}).fetchJsonp("jsonp").then(function(A){return A.resourceSets.length===0?[]:A.resourceSets[0].resources.map(function(f){let m=f.bbox,C=m[0],y=m[1],x=m[2],v=m[3];return{displayName:f.name,destination:Si.fromDegrees(y,C,v,x)}})})};var Eat=_Se,_bi=new ai,Kze=new ee,KU=new ee;function Bbi(o){let A=o.points,f=o.times;if(A.length<3){let m=f[0],C=1/(f[1]-m),y=A[0],x=A[1];return function(v,E){O(E)||(E=new ee);let I=(v-m)*C;return ee.lerp(y,x,I,E)}}return function(m,C){O(C)||(C=new ee);let y=o._lastTimeIndex=o.findTimeInterval(m,o._lastTimeIndex),x=(m-f[y])/(f[y+1]-f[y]),v=_bi;v.z=x,v.y=x*x,v.x=v.y*x,v.w=1;let E,I,w,Q,M;return y===0?(E=A[0],I=A[1],w=o.firstTangent,Q=ee.subtract(A[2],E,Kze),ee.multiplyByScalar(Q,.5,Q),M=Xe.multiplyByVector(QK.hermiteCoefficientMatrix,v,v)):y===A.length-2?(E=A[y],I=A[y+1],Q=o.lastTangent,w=ee.subtract(I,A[y-1],Kze),ee.multiplyByScalar(w,.5,w),M=Xe.multiplyByVector(QK.hermiteCoefficientMatrix,v,v)):(E=A[y-1],I=A[y],w=A[y+1],Q=A[y+2],M=Xe.multiplyByVector(EN.catmullRomCoefficientMatrix,v,v)),C=ee.multiplyByScalar(E,M.x,C),ee.multiplyByScalar(I,M.y,KU),ee.add(C,KU,C),ee.multiplyByScalar(w,M.z,KU),ee.add(C,KU,C),ee.multiplyByScalar(Q,M.w,KU),ee.add(C,KU,C)}}var wbi=new ee,bbi=new ee;function EN(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.points,f=o.times,m=o.firstTangent,C=o.lastTangent;if(A.length>2&&(O(m)||(m=wbi,ee.multiplyByScalar(A[1],2,m),ee.subtract(m,A[2],m),ee.subtract(m,A[0],m),ee.multiplyByScalar(m,.5,m)),!O(C))){let y=A.length-1;C=bbi,ee.multiplyByScalar(A[y-1],2,C),ee.subtract(A[y],C,C),ee.add(C,A[y-2],C),ee.multiplyByScalar(C,.5,C)}this._times=f,this._points=A,this._firstTangent=ee.clone(m),this._lastTangent=ee.clone(C),this._evaluateFunction=Bbi(this),this._lastTimeIndex=0}Object.defineProperties(EN.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}},firstTangent:{get:function(){return this._firstTangent}},lastTangent:{get:function(){return this._lastTangent}}});EN.catmullRomCoefficientMatrix=new Xe(-.5,1,-.5,0,1.5,-2.5,0,1,-1.5,2,.5,0,.5,-.5,0,0);EN.prototype.findTimeInterval=uf.prototype.findTimeInterval;EN.prototype.wrapTime=uf.prototype.wrapTime;EN.prototype.clampTime=uf.prototype.clampTime;EN.prototype.evaluate=function(o,A){return this._evaluateFunction(o,A)};var Iat=EN;function WM(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.radius,f={center:o.center,semiMajorAxis:A,semiMinorAxis:A,ellipsoid:o.ellipsoid,height:o.height,extrudedHeight:o.extrudedHeight,granularity:o.granularity,vertexFormat:o.vertexFormat,stRotation:o.stRotation,shadowVolume:o.shadowVolume};this._ellipseGeometry=new W1(f),this._workerName="createCircleGeometry"}WM.packedLength=W1.packedLength;WM.pack=function(o,A,f){return W1.pack(o._ellipseGeometry,A,f)};var Qbi=new W1({center:new ee,semiMajorAxis:1,semiMinorAxis:1}),ix={center:new ee,radius:void 0,ellipsoid:Ti.clone(Ti.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new Wr,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};WM.unpack=function(o,A,f){let m=W1.unpack(o,A,Qbi);return ix.center=ee.clone(m._center,ix.center),ix.ellipsoid=Ti.clone(m._ellipsoid,ix.ellipsoid),ix.height=m._height,ix.extrudedHeight=m._extrudedHeight,ix.granularity=m._granularity,ix.vertexFormat=Wr.clone(m._vertexFormat,ix.vertexFormat),ix.stRotation=m._stRotation,ix.shadowVolume=m._shadowVolume,O(f)?(ix.semiMajorAxis=m._semiMajorAxis,ix.semiMinorAxis=m._semiMinorAxis,f._ellipseGeometry=new W1(ix),f):(ix.radius=m._semiMajorAxis,new WM(ix))};WM.createGeometry=function(o){return W1.createGeometry(o._ellipseGeometry)};WM.createShadowVolume=function(o,A,f){let m=o._ellipseGeometry._granularity,C=o._ellipseGeometry._ellipsoid,y=A(m,C),x=f(m,C);return new WM({center:o._ellipseGeometry._center,radius:o._ellipseGeometry._semiMajorAxis,ellipsoid:C,stRotation:o._ellipseGeometry._stRotation,granularity:m,extrudedHeight:y,height:x,vertexFormat:Wr.POSITION_ONLY,shadowVolume:!0})};Object.defineProperties(WM.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}});var _at=WM;function K8(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.radius,f={center:o.center,semiMajorAxis:A,semiMinorAxis:A,ellipsoid:o.ellipsoid,height:o.height,extrudedHeight:o.extrudedHeight,granularity:o.granularity,numberOfVerticalLines:o.numberOfVerticalLines};this._ellipseGeometry=new UD(f),this._workerName="createCircleOutlineGeometry"}K8.packedLength=UD.packedLength;K8.pack=function(o,A,f){return UD.pack(o._ellipseGeometry,A,f)};var Sbi=new UD({center:new ee,semiMajorAxis:1,semiMinorAxis:1}),B_={center:new ee,radius:void 0,ellipsoid:Ti.clone(Ti.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,numberOfVerticalLines:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0};K8.unpack=function(o,A,f){let m=UD.unpack(o,A,Sbi);return B_.center=ee.clone(m._center,B_.center),B_.ellipsoid=Ti.clone(m._ellipsoid,B_.ellipsoid),B_.height=m._height,B_.extrudedHeight=m._extrudedHeight,B_.granularity=m._granularity,B_.numberOfVerticalLines=m._numberOfVerticalLines,O(f)?(B_.semiMajorAxis=m._semiMajorAxis,B_.semiMinorAxis=m._semiMinorAxis,f._ellipseGeometry=new UD(B_),f):(B_.radius=m._semiMajorAxis,new K8(B_))};K8.createGeometry=function(o){return UD.createGeometry(o._ellipseGeometry)};var Bat=K8;function hH(o){o=Ae(o,Ae.EMPTY_OBJECT),this._callback=o.callback,this._tilingScheme=o.tilingScheme,O(this._tilingScheme)||(this._tilingScheme=new af({ellipsoid:Ae(o.ellipsoid,Ti.WGS84)})),this._width=o.width,this._height=o.height;let A=Math.max(this._width,this._height);this._levelZeroMaximumGeometricError=Cx.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,A,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._errorEvent=new br;let f=o.credit;typeof f=="string"&&(f=new tl(f)),this._credit=f,this._readyPromise=Promise.resolve(!0)}Object.defineProperties(hH.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}});hH.prototype.requestTileGeometry=function(o,A,f,m){let C=this._callback(o,A,f);if(!O(C))return;let y=this._width,x=this._height;return Promise.resolve(C).then(function(v){let E=v;return Array.isArray(E)&&(E=new Float64Array(E)),new bQ({buffer:E,width:y,height:x})})};hH.prototype.getLevelMaximumGeometricError=function(o){return this._levelZeroMaximumGeometricError/(1<<o)};hH.prototype.getTileDataAvailable=function(o,A,f){};hH.prototype.loadTileDataAvailability=function(o,A,f){};var wat=hH,Dbi=1953029805,Tbi=2917034100;function BSe(o,A){if(BSe.passThroughDataForTesting)return A;let f=o.byteLength;if(f===0||f%4!==0)throw new nr("The length of key must be greater than 0 and a multiple of 4.");let m=new DataView(A),C=m.getUint32(0,!0);if(C===Dbi||C===Tbi)return A;let y=new DataView(o),x=0,v=A.byteLength,E=v-v%8,I=f,w,Q=8;for(;x<E;)for(Q=(Q+8)%24,w=Q;x<E&&w<I;)m.setUint32(x,m.getUint32(x,!0)^y.getUint32(w,!0),!0),m.setUint32(x+4,m.getUint32(x+4,!0)^y.getUint32(w+4,!0),!0),x+=8,w+=24;if(x<v)for(w>=I&&(Q=(Q+8)%24,w=Q);x<v;)m.setUint8(x,m.getUint8(x)^y.getUint8(w)),x++,w++}BSe.passThroughDataForTesting=!1;var wSe=BSe;function aQ(o){this._comparator=o.comparator,this._maximumLength=o.maximumLength,this._array=O(o.maximumLength)?new Array(o.maximumLength):[],this._length=0}Object.defineProperties(aQ.prototype,{length:{get:function(){return this._length}},maximumLength:{get:function(){return this._maximumLength},set:function(o){if(O(o)){for(;this._length>o;)this.removeMinimum();this._array.length=o}this._maximumLength=o}},internalArray:{get:function(){return this._array}},comparator:{get:function(){return this._comparator}}});aQ.prototype.clone=function(){let o=this._maximumLength,A=this._comparator,f=this._array,m=this._length,C=new aQ({comparator:A,maximumLength:o});C._length=m;for(let y=0;y<m;y++)C._array[y]=f[y];return C};aQ.prototype.reset=function(){this._length=0;let o=this._maximumLength;if(O(o))for(let A=0;A<o;A++)this._array[A]=void 0;else this._array.length=0};aQ.prototype.resort=function(){let o=this._length;for(let A=0;A<o;A++)bat(this,A)};aQ.prototype.insert=function(o){let A,f=this._maximumLength;if(O(f)){if(f===0)return;if(this._length===f){let C=this._array[0];if(this._comparator(o,C)<=0)return o;A=this.removeMinimum()}}let m=this._length;return this._array[m]=o,this._length++,bat(this,m),A};aQ.prototype.removeMinimum=function(){let o=this._length;if(o===0)return;this._length--;let A=this._array[0];return o>=2&&(this._array[0]=this._array[o-1],Qat(this,0)),this._array[o-1]=void 0,A};aQ.prototype.removeMaximum=function(){let o=this._length;if(o===0)return;this._length--;let A;if(o<=2)A=this._array[o-1];else{let f=bSe(this,1,2)?1:2;A=this._array[f],this._array[f]=this._array[o-1],o>=4&&Qat(this,f)}return this._array[o-1]=void 0,A};aQ.prototype.getMinimum=function(){if(this._length!==0)return this._array[0]};aQ.prototype.getMaximum=function(){let o=this._length;if(o!==0)return o<=2?this._array[o-1]:this._array[bSe(this,1,2)?1:2]};function gie(o,A,f){let m=o._array,C=m[A];m[A]=m[f],m[f]=C}function R7(o,A,f){return o._comparator(o._array[A],o._array[f])<0}function bSe(o,A,f){return o._comparator(o._array[A],o._array[f])>0}function bat(o,A){if(A===0)return;let f=Math.floor(je.log2(A+1))%2===0,m=Math.floor((A-1)/2),C=R7(o,A,m);for(C!==f&&(gie(o,A,m),A=m);A>=3;){let y=Math.floor((A-3)/4);if(R7(o,A,y)!==C)break;gie(o,A,y),A=y}}function Qat(o,A){let f=o._length,m=Math.floor(je.log2(A+1))%2===0,C;for(;(C=2*A+1)<f;){let y=C,x=C+1;if(x<f){R7(o,x,y)===m&&(y=x);let v=2*C+1,E=Math.max(Math.min(f-v,4),0);for(let I=0;I<E;I++){let w=v+I;R7(o,w,y)===m&&(y=w)}}if(R7(o,y,A)===m&&(gie(o,y,A),y!==C&&y!==x)){let v=Math.floor((y-1)/2);bSe(o,y,v)===m&&gie(o,y,v)}A=y}}var Sat=aQ;function Dat(){}Dat.prototype.geocode=Ui.throwInstantiationError;var Tat=Dat;function Mat(){Ui.throwInstantiationError()}Mat.createGeometry=function(o){Ui.throwInstantiationError()};var Pat=Mat,Mbi=xh(E7e(),1);function Pbi(o,A){return(o&A)!==0}var q_=Pbi,Rbi=[1,2,4,8],Rat=15,Lbi=16,Fbi=64,Nbi=128;function JD(o,A,f,m,C,y){this._bits=o,this.cnodeVersion=A,this.imageryVersion=f,this.terrainVersion=m,this.imageryProvider=C,this.terrainProvider=y,this.ancestorHasTerrain=!1,this.terrainState=void 0}JD.clone=function(o,A){return O(A)?(A._bits=o._bits,A.cnodeVersion=o.cnodeVersion,A.imageryVersion=o.imageryVersion,A.terrainVersion=o.terrainVersion,A.imageryProvider=o.imageryProvider,A.terrainProvider=o.terrainProvider):A=new JD(o._bits,o.cnodeVersion,o.imageryVersion,o.terrainVersion,o.imageryProvider,o.terrainProvider),A.ancestorHasTerrain=o.ancestorHasTerrain,A.terrainState=o.terrainState,A};JD.prototype.setParent=function(o){this.ancestorHasTerrain=o.ancestorHasTerrain||this.hasTerrain()};JD.prototype.hasSubtree=function(){return q_(this._bits,Lbi)};JD.prototype.hasImagery=function(){return q_(this._bits,Fbi)};JD.prototype.hasTerrain=function(){return q_(this._bits,Nbi)};JD.prototype.hasChildren=function(){return q_(this._bits,Rat)};JD.prototype.hasChild=function(o){return q_(this._bits,Rbi[o])};JD.prototype.getChildBitmask=function(){return this._bits&Rat};var QSe=JD;function kbi(o){let A=o.length,f=new ArrayBuffer(A),m=new Uint8Array(f);for(let C=0;C<A;++C)m[C]=o.charCodeAt(C);return f}var Obi=kbi(`E\xF4\xBD\vy\xE2jE"\x92,\xCDq\xF8IFgQ\0B%\xC6\xE8a,f)\b\xC64\xDCjb%y
wmi\xD6\xF0\x9Ck\x93\xA1\xBDNu\xE0A[\xDF@V\f\xD9\xBBr\x9B\x81|3S\xEEOl\xD4q\xB0{\xC0\x7FEVZ\xADwUe\v3\x92*\xACl5\xC50s\xF83>mF8J\xB4\xDD\xF0.\xDDu\xDA\x8CDt"\xFAa"\f3"So\xAF9D\v\x8C9\xD99L\xB9\xBF\x7F\xAB\\\x8CP_\x9F"ux\xE9\x07q\x91h;\xC1\xC4\x9B\x7F\xF0<VqH\x82'UfYNe\x98u\xA3aF}a?A\0\x9F\xD7\xB44M\xCE\x87F\xB0\xD5\xB8\x8A'{\x8B\xDC+\xBBMg0\xC8\xD1\xF6\\\x8FP\xFA[/F\x9Bn5/'C.\xEB
\f^\xA5s\x1Be4\xE5l.jC'c#U\xA9?q{gC}:\xAF\xCD\xE2TU\x9C\xFDK\xC6\xE2\x9F/(\xED\xCB\\\xC6-f\x07\x88\xA7;/*"N\xB0k.\xDD\r\x95}}G\xBAC\xB2\xB2+>M\xAA>}\xE6\xCEI\x89\xC6\xE6x\fa1-\xA4O\xA5~q \x88\xEC\r1\xE8N\v\0nPh}=\b\r\x95\xA6n\xA3h\x97$[k\xF3#\xF3\xB6s\xB3\r\v@\xC0\x9F\xD8Q]\xFA".j\xDFI\0\xB9\xA0wU\xC6\xEFj\xBF{GL\x7F\x83\xEE\xDC\xDCF\x85\xA9\xADS\x07+S4\x07\xFF\x94Y\xE48\xE81\x83N\xB9XFk\xCB-#\x86\x92p\x005\x88"\xCF1\xB2&/\xE7\xC3u-6,rt\xB0#G\xB7\xD3\xD1&\x857r\xE2\0\x8CD\xCF\xDA3-\xDE\`\x86i#i*|\xCDKQ\r\x95T9w.)\xEA\x1B\xA6P\xA2j\x8FoP\x99\\>T\xFB\xEFP[\v\x07E\x89m(w7\xDB\x8EJfJo\x99 \xE5p\xE2\xB9q~\fmI-z\xFEr\xC7\xF2Y0\x8F\xBB]s\xE5\xC9 \xEAx\xEC \x90\xF0\x8A\x7FB|G\`\xB0\xBD&\xB7q\xB6\xC7\x9F\xD13\x82=\xD3\xAB\xEEc\x99\xC8+S\xA0D\\q\xC6\xCCD2O<\xCA\xC0)=R\xD3aX\xA9}e\xB4\xDC\xCF\r\xF4=\xF1\b\xA9B\xDA#   \xD8\xBF^PI\xF8M\xC0\xCBGLO\xF7{+\xD8\xC51\x92;\xB5o\xDCl\r\x92\x88\xD1\x9E\xDB?\xE2\xE9\xDA_\xD4\x84\xE2FaZ\xDEU\xCF\xA4\0\xBE\xFD\xCEg\xF1Ji\x97\xE6 H\xD8]\x7F~\xAEq N\xAE\xC0V\xA9\x91<\x82r\xE7v\xEC)I\xD6]-\x83\xE3\xDB6\xA9;f\x97\x87j\xD5\xB6=P^R\xB9K\xC7sWx\xC9\xF4.Y\x07\x95\x93o\xD0KW>''\xC7\`\xDB;\xED\x9ASD>?\x8D\x92mw\xA2
\xEB?R\xA8\xC6U^1I7\x85\xF4\xC5&-\xA9\xBF\x8B'T\xDA\xC3j \xE5*x\xB0\xD6\x90pr\xAA\x8Bh\xBD\x88\xF7_H\xB1~\xC0XL?f\xF9>\xE1e\xC0p\xA7\xCF8i\xAF\xF0VldI\x9C'\xADxtO\xC2\x87\xDEV9\0\xDAw\v\xCB-\x1B\x89\xFB5O\xF5\bQ\`\xC1
ZGM&30x\xDA\xC0\x9CFG\xE2[y\`In7gS
>\xE9\xECF9\xB2\xF14\r\xC6\x84Sun\xE1\fY\xD9\xDE)\x85{II\xA5wy\xBEIV.6\xE7\v:\xBBOb{\xD2M1\x95/\xBD8{\xA8O!\xE1\xECFpv\x95})"x\x88
\x90\xDD\x9D\\\xDA\xDEQ\xCF\xF0\xFCYRe|3\xDF\xF3H\xDA\xBB*u\xDB\`\xB2\xD4\xFC\xED\x1B\xEC\x7F5\xA8\xFF(1\x07-\xC8\xDC\x88F|\x8A["`);function sQ(o){let A=o;typeof A!="string"&&!(A instanceof An)&&(A=o.url);let f=An.createIfNeeded(A);f.appendForwardSlash(),this._resource=f,this.imageryPresent=!0,this.protoImagery=void 0,this.terrainPresent=!0,this.negativeAltitudeExponentBias=32,this.negativeAltitudeThreshold=je.EPSILON12,this.providers={},this.key=void 0,this._quadPacketVersion=1,this._tileInfo={},this._subtreePromises={};let m=this;this._readyPromise=Ubi(this).then(function(){return m.getQuadTreePacket("",m._quadPacketVersion)}).then(function(){return!0}).catch(function(C){let y=`An error occurred while accessing ${Fat(m,"",1).url}.`;return Promise.reject(new nr(y))})}Object.defineProperties(sQ.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},resource:{get:function(){return this._resource}},readyPromise:{get:function(){return this._readyPromise}}});sQ.tileXYToQuadKey=function(o,A,f){let m="";for(let C=f;C>=0;--C){let y=1<<C,x=0;q_(A,y)?q_(o,y)&&(x|=1):(x|=2,q_(o,y)||(x|=1)),m+=x}return m};sQ.quadKeyToTileXY=function(o){let A=0,f=0,m=o.length-1;for(let C=m;C>=0;--C){let y=1<<C,x=+o[m-C];q_(x,2)?q_(x,1)||(A|=y):(f|=y,q_(x,1)&&(A|=y))}return{x:A,y:f,level:m}};sQ.prototype.isValid=function(o){let A=this.getTileInformationFromQuadKey(o);if(O(A))return A!==null;let f=!0,m=o,C;for(;m.length>1;)if(C=m.substring(m.length-1),m=m.substring(0,m.length-1),A=this.getTileInformationFromQuadKey(m),O(A)){!A.hasSubtree()&&!A.hasChild(parseInt(C))&&(f=!1);break}else if(A===null){f=!1;break}return f};var Lat=new Vf("decodeGoogleEarthEnterprisePacket");sQ.prototype.getQuadTreePacket=function(o,A,f){A=Ae(A,1),o=Ae(o,"");let m=Fat(this,o,A,f).fetchArrayBuffer();if(!O(m))return;let C=this._tileInfo,y=this.key;return m.then(function(x){return Lat.scheduleTask({buffer:x,quadKey:o,type:"Metadata",key:y},[x]).then(function(v){let E,I=-1;if(o!==""){I=o.length+1;let M=v[o];E=C[o],E._bits|=M._bits,delete v[o]}let w=Object.keys(v);w.sort(function(M,B){return M.length-B.length});let Q=w.length;for(let M=0;M<Q;++M){let B=w[M];if(v[B]!==null){let T=QSe.clone(v[B]),D=B.length;if(D===I)T.setParent(E);else if(D>1){let F=C[B.substring(0,B.length-1)];T.setParent(F)}C[B]=T}else C[B]=null}})})};sQ.prototype.populateSubtree=function(o,A,f,m){let C=sQ.tileXYToQuadKey(o,A,f);return vme(this,C,m)};function vme(o,A,f){let m=o._tileInfo,C=A,y=m[C];if(O(y)&&(!y.hasSubtree()||y.hasChildren()))return y;for(;y===void 0&&C.length>1;)C=C.substring(0,C.length-1),y=m[C];let x,v=o._subtreePromises,E=v[C];if(O(E))return E.then(function(){return x=new cC({throttle:f.throttle,throttleByServer:f.throttleByServer,type:f.type,priorityFunction:f.priorityFunction}),vme(o,A,x)});if(!O(y)||!y.hasSubtree())return Promise.reject(new nr(`Couldn't load metadata for tile ${A}`));if(E=o.getQuadTreePacket(C,y.cnodeVersion,f),!!O(E))return v[C]=E,E.then(function(){return x=new cC({throttle:f.throttle,throttleByServer:f.throttleByServer,type:f.type,priorityFunction:f.priorityFunction}),vme(o,A,x)}).finally(function(){delete v[C]})}sQ.prototype.getTileInformation=function(o,A,f){let m=sQ.tileXYToQuadKey(o,A,f);return this._tileInfo[m]};sQ.prototype.getTileInformationFromQuadKey=function(o){return this._tileInfo[o]};function Fat(o,A,f,m){return o._resource.getDerivedResource({url:`flatfile?q2-0${A}-q.${f.toString()}`,request:m})}var zge,Kge;function Ubi(o){let A=o._resource.getDerivedResource({url:"dbRoot.v5",queryParameters:{output:"proto"}});if(!O(Kge)){let f=xs("ThirdParty/google-earth-dbroot-parser.js"),m=window.cesiumGoogleEarthDbRootParser;Kge=Nie(f).then(function(){zge=window.cesiumGoogleEarthDbRootParser(Mbi),O(m)?window.cesiumGoogleEarthDbRootParser=m:delete window.cesiumGoogleEarthDbRootParser})}return Kge.then(function(){return A.fetchArrayBuffer()}).then(function(f){let m=zge.EncryptedDbRootProto.decode(new Uint8Array(f)),C=m.encryptionData,y=C.byteOffset,x=y+C.byteLength,v=o.key=C.buffer.slice(y,x);C=m.dbrootData,y=C.byteOffset,x=y+C.byteLength;let E=C.buffer.slice(y,x);return Lat.scheduleTask({buffer:E,type:"DbRoot",key:v},[E])}).then(function(f){let m=zge.DbRootProto.decode(new Uint8Array(f.buffer));if(o.imageryPresent=Ae(m.imageryPresent,o.imageryPresent),o.protoImagery=m.protoImagery,o.terrainPresent=Ae(m.terrainPresent,o.terrainPresent),O(m.endSnippet)&&O(m.endSnippet.model)){let v=m.endSnippet.model;o.negativeAltitudeExponentBias=Ae(v.negativeAltitudeExponentBias,o.negativeAltitudeExponentBias),o.negativeAltitudeThreshold=Ae(v.compressedNegativeAltitudeThreshold,o.negativeAltitudeThreshold)}O(m.databaseVersion)&&(o._quadPacketVersion=Ae(m.databaseVersion.quadtreeVersion,o._quadPacketVersion));let C=o.providers,y=Ae(m.providerInfo,[]),x=y.length;for(let v=0;v<x;++v){let E=y[v],I=E.copyrightString;O(I)&&(C[E.providerId]=new tl(I.value))}}).catch(function(){console.log(`Failed to retrieve ${A.url}. Using defaults.`),o.key=Obi})}var IN=sQ;function wO(o){o=Ae(o,Ae.EMPTY_OBJECT),this._buffer=o.buffer,this._credits=o.credits,this._negativeAltitudeExponentBias=o.negativeAltitudeExponentBias,this._negativeElevationThreshold=o.negativeElevationThreshold;let A=Ae(o.childTileMask,15),f=A&3;f|=A&4?8:0,f|=A&8?4:0,this._childTileMask=f,this._createdByUpsampling=Ae(o.createdByUpsampling,!1),this._skirtHeight=void 0,this._bufferType=this._buffer.constructor,this._mesh=void 0,this._minimumHeight=void 0,this._maximumHeight=void 0}Object.defineProperties(wO.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){}}});var Nat="createVerticesFromGoogleEarthEnterpriseBuffer",Gbi=new Vf(Nat),Hbi=new Vf(Nat,AO.maximumAsynchronousTasks),Yze=new Si,Yge=new Si;wO.prototype.createMesh=function(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.tilingScheme,f=o.x,m=o.y,C=o.level,y=Ae(o.exaggeration,1),x=Ae(o.exaggerationRelativeHeight,0),v=Ae(o.throttle,!0),E=A.ellipsoid;A.tileXYToNativeRectangle(f,m,C,Yze),A.tileXYToRectangle(f,m,C,Yge);let I=E.cartographicToCartesian(Si.center(Yge)),w=40075.16/(1<<C);this._skirtHeight=Math.min(w*8,1e3);let Q=(v?Hbi:Gbi).scheduleTask({buffer:this._buffer,nativeRectangle:Yze,rectangle:Yge,relativeToCenter:I,ellipsoid:E,skirtHeight:this._skirtHeight,exaggeration:y,exaggerationRelativeHeight:x,includeWebMercatorT:!0,negativeAltitudeExponentBias:this._negativeAltitudeExponentBias,negativeElevationThreshold:this._negativeElevationThreshold});if(!O(Q))return;let M=this;return Q.then(function(B){return M._mesh=new hO(I,new Float32Array(B.vertices),new Uint16Array(B.indices),B.indexCountWithoutSkirts,B.vertexCountWithoutSkirts,B.minimumHeight,B.maximumHeight,wi.clone(B.boundingSphere3D),ee.clone(B.occludeePointInScaledSpace),B.numberOfAttributes,Hf.clone(B.orientedBoundingBox),HM.clone(B.encoding),B.westIndicesSouthToNorth,B.southIndicesEastToWest,B.eastIndicesNorthToSouth,B.northIndicesWestToEast),M._minimumHeight=B.minimumHeight,M._maximumHeight=B.maximumHeight,M._buffer=void 0,M._mesh})};wO.prototype.interpolateHeight=function(o,A,f){let m=je.clamp((A-o.west)/o.width,0,1),C=je.clamp((f-o.south)/o.height,0,1);return O(this._mesh)?Jbi(this,m,C):qbi(this,m,C,o)};var Vbi=new Vf("upsampleQuantizedTerrainMesh",AO.maximumAsynchronousTasks);wO.prototype.upsample=function(o,A,f,m,C,y,x){let v=this._mesh;if(!O(this._mesh))return;let E=A*2!==C,I=f*2===y,w=o.ellipsoid,Q=o.tileXYToRectangle(C,y,x),M=Vbi.scheduleTask({vertices:v.vertices,indices:v.indices,indexCountWithoutSkirts:v.indexCountWithoutSkirts,vertexCountWithoutSkirts:v.vertexCountWithoutSkirts,encoding:v.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,isEastChild:E,isNorthChild:I,childRectangle:Q,ellipsoid:w});if(!O(M))return;let B=this;return M.then(function(T){let D=new Uint16Array(T.vertices),F=Nn.createTypedArray(D.length/3,T.indices),L=B._skirtHeight;return new coe({quantizedVertices:D,indices:F,minimumHeight:T.minimumHeight,maximumHeight:T.maximumHeight,boundingSphere:wi.clone(T.boundingSphere),orientedBoundingBox:Hf.clone(T.orientedBoundingBox),horizonOcclusionPoint:ee.clone(T.horizonOcclusionPoint),westIndices:T.westIndices,southIndices:T.southIndices,eastIndices:T.eastIndices,northIndices:T.northIndices,westSkirtHeight:L,southSkirtHeight:L,eastSkirtHeight:L,northSkirtHeight:L,childTileMask:0,createdByUpsampling:!0,credits:B._credits})})};wO.prototype.isChildAvailable=function(o,A,f,m){let C=2;return f!==o*2&&++C,m!==A*2&&(C-=2),(this._childTileMask&1<<C)!==0};wO.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var zbi=new Bt,Kbi=new Bt,Ybi=new Bt,kat=new ee;function Jbi(o,A,f){let m=o._mesh,C=m.vertices,y=m.encoding,x=m.indices;for(let v=0,E=x.length;v<E;v+=3){let I=x[v],w=x[v+1],Q=x[v+2],M=y.decodeTextureCoordinates(C,I,zbi),B=y.decodeTextureCoordinates(C,w,Kbi),T=y.decodeTextureCoordinates(C,Q,Ybi),D=Z6.computeBarycentricCoordinates(A,f,M.x,M.y,B.x,B.y,T.x,T.y,kat);if(D.x>=-1e-15&&D.y>=-1e-15&&D.z>=-1e-15){let F=y.decodeHeight(C,I),L=y.decodeHeight(C,w),R=y.decodeHeight(C,Q);return D.x*F+D.y*L+D.z*R}}}var Wbi=Uint16Array.BYTES_PER_ELEMENT,Jze=Uint32Array.BYTES_PER_ELEMENT,Jge=Int32Array.BYTES_PER_ELEMENT,jbi=Float32Array.BYTES_PER_ELEMENT,Wge=Float64Array.BYTES_PER_ELEMENT;function qbi(o,A,f,m){let C=o._buffer,y=0,x=0,v=0;f>.5?(A>.5?(y=2,x=.5):y=3,v=.5):A>.5&&(y=1,x=.5);let E=new DataView(C),I=0;for(let V=0;V<y;++V)I+=E.getUint32(I,!0),I+=Jze;I+=Jze,I+=2*Wge;let w=je.toRadians(E.getFloat64(I,!0)*180);I+=Wge;let Q=je.toRadians(E.getFloat64(I,!0)*180);I+=Wge;let M=m.width/w/2,B=m.height/Q/2,T=E.getInt32(I,!0);I+=Jge;let D=E.getInt32(I,!0)*3;I+=Jge,I+=Jge;let F=new Array(T),L=new Array(T),R=new Array(T),k;for(k=0;k<T;++k)F[k]=x+E.getUint8(I++)*M,L[k]=v+E.getUint8(I++)*B,R[k]=E.getFloat32(I,!0)*6371010,I+=jbi;let U=new Array(D);for(k=0;k<D;++k)U[k]=E.getUint16(I,!0),I+=Wbi;for(k=0;k<D;k+=3){let V=U[k],H=U[k+1],q=U[k+2],ie=F[V],Z=F[H],oe=F[q],ne=L[V],se=L[H],ce=L[q],j=Z6.computeBarycentricCoordinates(A,f,ie,ne,Z,se,oe,ce,kat);if(j.x>=-1e-15&&j.y>=-1e-15&&j.z>=-1e-15)return j.x*R[V]+j.y*R[H]+j.z*R[q]}}var pie=wO,I1={UNKNOWN:0,NONE:1,SELF:2,PARENT:3},R$=new fi;function Aae(){this._terrainCache={},this._lastTidy=fi.now()}Aae.prototype.add=function(o,A){this._terrainCache[o]={buffer:A,timestamp:fi.now()}};Aae.prototype.get=function(o){let A=this._terrainCache[o];if(O(A))return delete this._terrainCache[o],A.buffer};Aae.prototype.tidy=function(){if(fi.now(R$),fi.secondsDifference(R$,this._lastTidy)>10){let o=this._terrainCache,A=Object.keys(o),f=A.length;for(let m=0;m<f;++m){let C=A[m],y=o[C];fi.secondsDifference(R$,y.timestamp)>10&&delete o[C]}fi.clone(R$,this._lastTidy)}};function dH(o){o=Ae(o,Ae.EMPTY_OBJECT);let A;if(O(o.metadata))A=o.metadata;else{let y=An.createIfNeeded(o.url);A=new IN(y)}this._metadata=A,this._tilingScheme=new af({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new Si(-je.PI,-je.PI,je.PI,je.PI),ellipsoid:o.ellipsoid});let f=o.credit;typeof f=="string"&&(f=new tl(f)),this._credit=f,this._levelZeroMaximumGeometricError=40075.16,this._terrainCache=new Aae,this._terrainPromises={},this._terrainRequests={},this._errorEvent=new br,this._ready=!1;let m=this,C;this._readyPromise=A.readyPromise.then(function(y){if(!A.terrainPresent){let x=new nr(`The server ${A.url} doesn't have terrain`);return C=wc.reportError(C,m,m._errorEvent,x.message,void 0,void 0,void 0,x),Promise.reject(x)}return wc.reportSuccess(C),m._ready=y,y}).catch(function(y){return C=wc.reportError(C,m,m._errorEvent,y.message,void 0,void 0,void 0,y),Promise.reject(y)})}Object.defineProperties(dH.prototype,{url:{get:function(){return this._metadata.url}},proxy:{get:function(){return this._metadata.proxy}},tilingScheme:{get:function(){return this._tilingScheme}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}});var Xbi=new Vf("decodeGoogleEarthEnterprisePacket");function Wze(o,A,f){let m=A.getChildBitmask();if(A.terrainState===I1.PARENT){m=0;for(let C=0;C<4;++C){let y=f.getTileInformationFromQuadKey(o+C.toString());O(y)&&y.hasTerrain()&&(m|=1<<C)}}return m}dH.prototype.requestTileGeometry=function(o,A,f,m){let C=IN.tileXYToQuadKey(o,A,f),y=this._terrainCache,x=this._metadata,v=x.getTileInformationFromQuadKey(C);if(!O(v))return Promise.reject(new nr("Terrain tile doesn't exist"));let E=v.terrainState;O(E)||(E=v.terrainState=I1.UNKNOWN);let I=y.get(C);if(O(I)){let L=x.providers[v.terrainProvider];return Promise.resolve(new pie({buffer:I,childTileMask:Wze(C,v,x),credits:O(L)?[L]:void 0,negativeAltitudeExponentBias:x.negativeAltitudeExponentBias,negativeElevationThreshold:x.negativeAltitudeThreshold}))}if(y.tidy(),v.ancestorHasTerrain){if(E===I1.NONE)return Promise.reject(new nr("Terrain tile doesn't exist"))}else return Promise.resolve(new bQ({buffer:new Uint8Array(16*16),width:16,height:16}));let w,Q=C,M=-1;switch(E){case I1.SELF:M=v.terrainVersion;break;case I1.PARENT:Q=Q.substring(0,Q.length-1),w=x.getTileInformationFromQuadKey(Q),M=w.terrainVersion;break;case I1.UNKNOWN:v.hasTerrain()?M=v.terrainVersion:(Q=Q.substring(0,Q.length-1),w=x.getTileInformationFromQuadKey(Q),O(w)&&w.hasTerrain()&&(M=w.terrainVersion));break}if(M<0)return Promise.reject(new nr("Terrain tile doesn't exist"));let B=this._terrainPromises,T=this._terrainRequests,D,F;if(O(B[Q]))D=B[Q],F=T[Q];else{F=m;let L=Zbi(this,Q,M,F).fetchArrayBuffer();if(!O(L))return;D=L.then(function(R){return O(R)?Xbi.scheduleTask({buffer:R,type:"Terrain",key:x.key},[R]).then(function(k){let U=x.getTileInformationFromQuadKey(Q);U.terrainState=I1.SELF,y.add(Q,k[0]);let V=U.terrainProvider,H=k.length-1;for(let q=0;q<H;++q){let ie=Q+q.toString(),Z=x.getTileInformationFromQuadKey(ie);O(Z)&&(y.add(ie,k[q+1]),Z.terrainState=I1.PARENT,Z.terrainProvider===0&&(Z.terrainProvider=V))}}):Promise.reject(new nr("Failed to load terrain."))}),B[Q]=D,T[Q]=F,D=D.finally(function(){delete B[Q],delete T[Q]})}return D.then(function(){let L=y.get(C);if(O(L)){let R=x.providers[v.terrainProvider];return new pie({buffer:L,childTileMask:Wze(C,v,x),credits:O(R)?[R]:void 0,negativeAltitudeExponentBias:x.negativeAltitudeExponentBias,negativeElevationThreshold:x.negativeAltitudeThreshold})}return Promise.reject(new nr("Failed to load terrain."))}).catch(function(L){return F.state===CA.CANCELLED?(m.state=F.state,Promise.reject(L)):(v.terrainState=I1.NONE,Promise.reject(L))})};dH.prototype.getLevelMaximumGeometricError=function(o){return this._levelZeroMaximumGeometricError/(1<<o)};dH.prototype.getTileDataAvailable=function(o,A,f){let m=this._metadata,C=IN.tileXYToQuadKey(o,A,f),y=m.getTileInformation(o,A,f);if(y===null)return!1;if(O(y)){if(!y.ancestorHasTerrain)return!0;let x=y.terrainState;if(x===I1.NONE)return!1;if((!O(x)||x===I1.UNKNOWN)&&(y.terrainState=I1.UNKNOWN,!y.hasTerrain())){C=C.substring(0,C.length-1);let v=m.getTileInformationFromQuadKey(C);if(!O(v)||!v.hasTerrain())return!1}return!0}if(m.isValid(C)){let x=new cC({throttle:!1,throttleByServer:!0,type:oB.TERRAIN});m.populateSubtree(o,A,f,x)}return!1};dH.prototype.loadTileDataAvailability=function(o,A,f){};function Zbi(o,A,f,m){return f=O(f)&&f>0?f:1,o._metadata.resource.getDerivedResource({url:`flatfile?f1c-0${A}-t.${f.toString()}`,request:m})}var Oat=dH,iW={};iW.type=void 0;iW.getRequiredDataPoints=Ui.throwInstantiationError;iW.interpolateOrderZero=Ui.throwInstantiationError;iW.interpolate=Ui.throwInstantiationError;var Uat=iW,$bi=new Vf("transcodeCRNToDXT",Number.POSITIVE_INFINITY);function eQi(o){let A;if(o instanceof ArrayBuffer||ArrayBuffer.isView(o)?A=Promise.resolve(o):A=An.createIfNeeded(o).fetchArrayBuffer(),!!O(A))return A.then(function(f){if(!O(f))return;let m=[];return f instanceof ArrayBuffer?m.push(f):(f.byteOffset===0&&f.byteLength===f.buffer.byteLength||(f=f.slice(0,f.length)),m.push(f.buffer)),$bi.scheduleTask(f,m)}).then(function(f){return rY.clone(f)})}var Gat=eQi,$k={};$k.defaultAccessToken=void 0;var jze=!1,jge,Hat="<b>This application is using Cesium's default Mapbox access token.  Please create a new access token for the application as soon as possible and prior to deployment by visiting <a href=https://www.mapbox.com/account/apps/>https://www.mapbox.com/account/apps/</a>, and provide your token to Cesium by setting the Cesium.MapboxApi.defaultAccessToken property before constructing the CesiumWidget or any other object that uses the Mapbox API.</b>";$k.getAccessToken=function(o){return O(o)?o:O($k.defaultAccessToken)?$k.defaultAccessToken:(jze||(console.log(Hat),jze=!0),"pk.eyJ1IjoiYW5hbHl0aWNhbGdyYXBoaWNzIiwiYSI6ImNpd204Zm4wejAwNzYyeW5uNjYyZmFwdWEifQ.7i-VIZZWX8pd1bTfxIVj9g")};$k.getErrorCredit=function(o){if(!(O(o)||O($k.defaultAccessToken)))return O(jge)||(jge=new tl(Hat,!0)),jge};var Vat=$k;function hae(){Ui.throwInstantiationError()}Object.defineProperties(hae.prototype,{ellipsoid:{get:Ui.throwInstantiationError}});hae.prototype.project=Ui.throwInstantiationError;hae.prototype.unproject=Ui.throwInstantiationError;var zat=hae;function fH(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.weights,f=o.times;this._times=f,this._weights=A,this._count=A.length/f.length,this._lastTimeIndex=0}Object.defineProperties(fH.prototype,{times:{get:function(){return this._times}},weights:{get:function(){return this._weights}}});fH.prototype.findTimeInterval=uf.prototype.findTimeInterval;fH.prototype.wrapTime=uf.prototype.wrapTime;fH.prototype.clampTime=uf.prototype.clampTime;fH.prototype.evaluate=function(o,A){let f=this.weights,m=this.times,C=this._lastTimeIndex=this.findTimeInterval(o,this._lastTimeIndex),y=(o-m[C])/(m[C+1]-m[C]);O(A)||(A=new Array(this._count));for(let x=0;x<this._count;x++){let v=C*this._count+x;A[x]=f[v]*(1-y)+f[v+this._count]*y}return A};var Kat=fH;function SSe(o,A,f){o=An.createIfNeeded(o),o.appendForwardSlash(),o.setQueryParameters({key:A}),this._url=o,this._params=Ae(f,{})}Object.defineProperties(SSe.prototype,{url:{get:function(){return this._url}},params:{get:function(){return this._params}}});SSe.prototype.geocode=function(o){return this._url.getDerivedResource({url:"json",queryParameters:ia(this._params,{q:o})}).fetchJson().then(function(A){return A.results.map(function(f){let m,C=f.bounds;if(O(C))m=Si.fromDegrees(C.southwest.lng,C.southwest.lat,C.northeast.lng,C.northeast.lat);else{let y=f.geometry.lat,x=f.geometry.lng;m=ee.fromDegrees(y,x)}return{displayName:f.formatted,destination:m}})})};var Yat=SSe,tQi={packedLength:void 0,pack:Ui.throwInstantiationError,unpack:Ui.throwInstantiationError},Jat=tQi,iQi={packedInterpolationLength:void 0,convertPackedArrayForInterpolation:Ui.throwInstantiationError,unpackInterpolationResult:Ui.throwInstantiationError},Wat=iQi,rQi=new ee;function nQi(o,A,f,m){let C=cre(o,A,f,m,rQi);return O(C)?C.x>0&&C.y>0&&C.z>0:!1}var jat=nQi;function qat(){Ui.throwInstantiationError()}qat.prototype.getURL=Ui.throwInstantiationError;var Xat=qat;function oQi(o,A,f,m,C,y,x){let v=jA.numberOfPoints(o,A,C),E,I=f.red,w=f.green,Q=f.blue,M=f.alpha,B=m.red,T=m.green,D=m.blue,F=m.alpha;if(At.equals(f,m)){for(E=0;E<v;E++)y[x++]=At.floatToByte(I),y[x++]=At.floatToByte(w),y[x++]=At.floatToByte(Q),y[x++]=At.floatToByte(M);return x}let L=(B-I)/v,R=(T-w)/v,k=(D-Q)/v,U=(F-M)/v,V=x;for(E=0;E<v;E++)y[V++]=At.floatToByte(I+E*L),y[V++]=At.floatToByte(w+E*R),y[V++]=At.floatToByte(Q+E*k),y[V++]=At.floatToByte(M+E*U);return V}function YK(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.positions,f=o.colors,m=Ae(o.colorsPerVertex,!1);this._positions=A,this._colors=f,this._colorsPerVertex=m,this._arcType=Ae(o.arcType,Pa.GEODESIC),this._granularity=Ae(o.granularity,je.RADIANS_PER_DEGREE),this._ellipsoid=Ae(o.ellipsoid,Ti.WGS84),this._workerName="createSimplePolylineGeometry";let C=1+A.length*ee.packedLength;C+=O(f)?1+f.length*At.packedLength:1,this.packedLength=C+Ti.packedLength+3}YK.pack=function(o,A,f){f=Ae(f,0);let m,C=o._positions,y=C.length;for(A[f++]=y,m=0;m<y;++m,f+=ee.packedLength)ee.pack(C[m],A,f);let x=o._colors;for(y=O(x)?x.length:0,A[f++]=y,m=0;m<y;++m,f+=At.packedLength)At.pack(x[m],A,f);return Ti.pack(o._ellipsoid,A,f),f+=Ti.packedLength,A[f++]=o._colorsPerVertex?1:0,A[f++]=o._arcType,A[f]=o._granularity,A};YK.unpack=function(o,A,f){A=Ae(A,0);let m,C=o[A++],y=new Array(C);for(m=0;m<C;++m,A+=ee.packedLength)y[m]=ee.unpack(o,A);C=o[A++];let x=C>0?new Array(C):void 0;for(m=0;m<C;++m,A+=At.packedLength)x[m]=At.unpack(o,A);let v=Ti.unpack(o,A);A+=Ti.packedLength;let E=o[A++]===1,I=o[A++],w=o[A];return O(f)?(f._positions=y,f._colors=x,f._ellipsoid=v,f._colorsPerVertex=E,f._arcType=I,f._granularity=w,f):new YK({positions:y,colors:x,ellipsoid:v,colorsPerVertex:E,arcType:I,granularity:w})};var Mee=new Array(2),Pee=new Array(2),aQi={positions:Mee,height:Pee,ellipsoid:void 0,minDistance:void 0,granularity:void 0};YK.createGeometry=function(o){let A=o._positions,f=o._colors,m=o._colorsPerVertex,C=o._arcType,y=o._granularity,x=o._ellipsoid,v=je.chordLength(y,x.maximumRadius),E=O(f)&&!m,I,w=A.length,Q,M,B,T,D=0;if(C===Pa.GEODESIC||C===Pa.RHUMB){let U,V,H;C===Pa.GEODESIC?(U=je.chordLength(y,x.maximumRadius),V=jA.numberOfPoints,H=jA.generateArc):(U=y,V=jA.numberOfPointsRhumbLine,H=jA.generateRhumbArc);let q=jA.extractHeights(A,x),ie=aQi;if(C===Pa.GEODESIC?ie.minDistance=v:ie.granularity=y,ie.ellipsoid=x,E){let Z=0;for(I=0;I<w-1;I++)Z+=V(A[I],A[I+1],U)+1;Q=new Float64Array(Z*3),B=new Uint8Array(Z*4),ie.positions=Mee,ie.height=Pee;let oe=0;for(I=0;I<w-1;++I){Mee[0]=A[I],Mee[1]=A[I+1],Pee[0]=q[I],Pee[1]=q[I+1];let ne=H(ie);if(O(f)){let se=ne.length/3;T=f[I];for(let ce=0;ce<se;++ce)B[oe++]=At.floatToByte(T.red),B[oe++]=At.floatToByte(T.green),B[oe++]=At.floatToByte(T.blue),B[oe++]=At.floatToByte(T.alpha)}Q.set(ne,D),D+=ne.length}}else if(ie.positions=A,ie.height=q,Q=new Float64Array(H(ie)),O(f)){for(B=new Uint8Array(Q.length/3*4),I=0;I<w-1;++I){let oe=A[I],ne=A[I+1],se=f[I],ce=f[I+1];D=oQi(oe,ne,se,ce,v,B,D)}let Z=f[w-1];B[D++]=At.floatToByte(Z.red),B[D++]=At.floatToByte(Z.green),B[D++]=At.floatToByte(Z.blue),B[D++]=At.floatToByte(Z.alpha)}}else{M=E?w*2-2:w,Q=new Float64Array(M*3),B=O(f)?new Uint8Array(M*4):void 0;let U=0,V=0;for(I=0;I<w;++I){let H=A[I];if(E&&I>0&&(ee.pack(H,Q,U),U+=3,T=f[I-1],B[V++]=At.floatToByte(T.red),B[V++]=At.floatToByte(T.green),B[V++]=At.floatToByte(T.blue),B[V++]=At.floatToByte(T.alpha)),E&&I===w-1)break;ee.pack(H,Q,U),U+=3,O(f)&&(T=f[I],B[V++]=At.floatToByte(T.red),B[V++]=At.floatToByte(T.green),B[V++]=At.floatToByte(T.blue),B[V++]=At.floatToByte(T.alpha))}}let F=new yc;F.position=new Yr({componentDatatype:ei.DOUBLE,componentsPerAttribute:3,values:Q}),O(f)&&(F.color=new Yr({componentDatatype:ei.UNSIGNED_BYTE,componentsPerAttribute:4,values:B,normalize:!0})),M=Q.length/3;let L=(M-1)*2,R=Nn.createTypedArray(M,L),k=0;for(I=0;I<M-1;++I)R[k++]=I,R[k++]=I+1;return new Zo({attributes:F,indices:R,primitiveType:yn.LINES,boundingSphere:wi.fromPoints(A)})};var Zat=YK;function Y8(o){let A=Ae(o.radius,1),f={radii:new ee(A,A,A),stackPartitions:o.stackPartitions,slicePartitions:o.slicePartitions,vertexFormat:o.vertexFormat};this._ellipsoidGeometry=new gC(f),this._workerName="createSphereGeometry"}Y8.packedLength=gC.packedLength;Y8.pack=function(o,A,f){return gC.pack(o._ellipsoidGeometry,A,f)};var sQi=new gC,BL={radius:void 0,radii:new ee,vertexFormat:new Wr,stackPartitions:void 0,slicePartitions:void 0};Y8.unpack=function(o,A,f){let m=gC.unpack(o,A,sQi);return BL.vertexFormat=Wr.clone(m._vertexFormat,BL.vertexFormat),BL.stackPartitions=m._stackPartitions,BL.slicePartitions=m._slicePartitions,O(f)?(ee.clone(m._radii,BL.radii),f._ellipsoidGeometry=new gC(BL),f):(BL.radius=m._radii.x,new Y8(BL))};Y8.createGeometry=function(o){return gC.createGeometry(o._ellipsoidGeometry)};var $at=Y8;function _N(o){}Object.defineProperties(_N.prototype,{ellipsoid:{get:Ui.throwInstantiationError},rectangle:{get:Ui.throwInstantiationError},projection:{get:Ui.throwInstantiationError}});_N.prototype.getNumberOfXTilesAtLevel=Ui.throwInstantiationError;_N.prototype.getNumberOfYTilesAtLevel=Ui.throwInstantiationError;_N.prototype.rectangleToNativeRectangle=Ui.throwInstantiationError;_N.prototype.tileXYToNativeRectangle=Ui.throwInstantiationError;_N.prototype.tileXYToRectangle=Ui.throwInstantiationError;_N.prototype.positionToTileXY=Ui.throwInstantiationError;var est=_N;function M5(o){o=Ae(o,Ae.EMPTY_OBJECT),this._clock=void 0,this._element=void 0,this._clockSubscription=void 0,this._seekFunction=void 0,this._lastPlaybackRate=void 0,this.clock=o.clock,this.element=o.element,this.epoch=Ae(o.epoch,Cn.MINIMUM_VALUE),this.tolerance=Ae(o.tolerance,1),this._seeking=!1,this._seekFunction=void 0,this._firstTickAfterSeek=!1}Object.defineProperties(M5.prototype,{clock:{get:function(){return this._clock},set:function(o){let A=this._clock;A!==o&&(O(A)&&(this._clockSubscription(),this._clockSubscription=void 0),O(o)&&(this._clockSubscription=o.onTick.addEventListener(M5.prototype._onTick,this)),this._clock=o)}},element:{get:function(){return this._element},set:function(o){let A=this._element;A!==o&&(O(A)&&A.removeEventListener("seeked",this._seekFunction,!1),O(o)&&(this._seeking=!1,this._seekFunction=lQi(this),o.addEventListener("seeked",this._seekFunction,!1)),this._element=o,this._seeking=!1,this._firstTickAfterSeek=!1)}}});M5.prototype.destroy=function(){return this.element=void 0,this.clock=void 0,Qr(this)};M5.prototype.isDestroyed=function(){return!1};M5.prototype._trySetPlaybackRate=function(o){if(this._lastPlaybackRate===o.multiplier)return;let A=this._element;try{A.playbackRate=o.multiplier}catch{A.playbackRate=0}this._lastPlaybackRate=o.multiplier};M5.prototype._onTick=function(o){let A=this._element;if(!O(A)||A.readyState<2)return;let f=A.paused,m=o.shouldAnimate;if(m===f&&(m?A.play():A.pause()),this._seeking||this._firstTickAfterSeek){this._firstTickAfterSeek=!1;return}this._trySetPlaybackRate(o);let C=o.currentTime,y=Ae(this.epoch,Cn.MINIMUM_VALUE),x=fi.secondsDifference(C,y),v=A.duration,E,I=A.currentTime;A.loop?(x=x%v,x<0&&(x=v-x),E=x):x>v?E=v:x<0?E=0:E=x;let w=m?Ae(this.tolerance,1):.001;Math.abs(E-I)>w&&(this._seeking=!0,A.currentTime=E)};function lQi(o){return function(){o._seeking=!1,o._firstTickAfterSeek=!0}}var tst=M5;function uQi(o,A){this.rectangle=o,this.maxLevel=A}function gH(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=An.createIfNeeded(o.url);this._resource=A,this._errorEvent=new br,this._ready=!1,this._terrainDataStructure={heightScale:1/1e3,heightOffset:-1e3,elementsPerHeight:3,stride:4,elementMultiplier:256,isBigEndian:!0,lowestEncodedHeight:0,highestEncodedHeight:256*256*256-1};let f=o.credit;typeof f=="string"&&(f=new tl(f)),this._credit=f,this._tilingScheme=void 0,this._rectangles=[];let m=this,C,y=Ae(o.ellipsoid,Ti.WGS84);function x(I){let w=I.getElementsByTagName("SRS")[0].textContent;if(w==="EPSG:4326")m._tilingScheme=new af({ellipsoid:y});else return Promise.reject(new nr(`SRS ${w} is not supported.`));let Q=I.getElementsByTagName("TileFormat")[0];m._heightmapWidth=parseInt(Q.getAttribute("width"),10),m._heightmapHeight=parseInt(Q.getAttribute("height"),10),m._levelZeroMaximumGeometricError=Cx.getEstimatedLevelZeroGeometricErrorForAHeightmap(y,Math.min(m._heightmapWidth,m._heightmapHeight),m._tilingScheme.getNumberOfXTilesAtLevel(0));let M=I.getElementsByTagName("DataExtent");for(let B=0;B<M.length;++B){let T=M[B],D=je.toRadians(parseFloat(T.getAttribute("minx"))),F=je.toRadians(parseFloat(T.getAttribute("miny"))),L=je.toRadians(parseFloat(T.getAttribute("maxx"))),R=je.toRadians(parseFloat(T.getAttribute("maxy"))),k=parseInt(T.getAttribute("maxlevel"),10);m._rectangles.push(new uQi(new Si(D,F,L,R),k))}return m._ready=!0,Promise.resolve(!0)}function v(I){let w=Ae(O(I)?I.message:void 0,`An error occurred while accessing ${m._resource.url}.`);return C=wc.reportError(C,m,m._errorEvent,w),C.retry?E():Promise.reject(new nr(w))}function E(){return m._resource.fetchXML().then(x).catch(v)}this._readyPromise=E()}Object.defineProperties(gH.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}});gH.prototype.requestTileGeometry=function(o,A,f,m){let C=this._tilingScheme.getNumberOfYTilesAtLevel(f),y=this._resource.getDerivedResource({url:`${f}/${o}/${C-A-1}.tif`,queryParameters:{cesium:!0},request:m}).fetchImage({preferImageBitmap:!0});if(!O(y))return;let x=this;return Promise.resolve(y).then(function(v){return new bQ({buffer:i5(v),width:x._heightmapWidth,height:x._heightmapHeight,childTileMask:cQi(x,o,A,f),structure:x._terrainDataStructure})})};gH.prototype.getLevelMaximumGeometricError=function(o){return this._levelZeroMaximumGeometricError/(1<<o)};var ist=new Si;function cQi(o,A,f,m){let C=o._tilingScheme,y=o._rectangles,x=C.tileXYToRectangle(A,f,m),v=0;for(let E=0;E<y.length&&v!==15;++E){let I=y[E];if(I.maxLevel<=m)continue;let w=I.rectangle,Q=Si.intersection(w,x,ist);O(Q)&&(L$(C,w,A*2,f*2,m+1)&&(v|=4),L$(C,w,A*2+1,f*2,m+1)&&(v|=8),L$(C,w,A*2,f*2+1,m+1)&&(v|=1),L$(C,w,A*2+1,f*2+1,m+1)&&(v|=2))}return v}function L$(o,A,f,m,C){let y=o.tileXYToRectangle(f,m,C);return O(Si.intersection(y,A,ist))}gH.prototype.getTileDataAvailable=function(o,A,f){};gH.prototype.loadTileDataAvailability=function(o,A,f){};var rst=gH,AQi={VK_FORMAT_UNDEFINED:0,VK_FORMAT_R4G4_UNORM_PACK8:1,VK_FORMAT_R4G4B4A4_UNORM_PACK16:2,VK_FORMAT_B4G4R4A4_UNORM_PACK16:3,VK_FORMAT_R5G6B5_UNORM_PACK16:4,VK_FORMAT_B5G6R5_UNORM_PACK16:5,VK_FORMAT_R5G5B5A1_UNORM_PACK16:6,VK_FORMAT_B5G5R5A1_UNORM_PACK16:7,VK_FORMAT_A1R5G5B5_UNORM_PACK16:8,VK_FORMAT_R8_UNORM:9,VK_FORMAT_R8_SNORM:10,VK_FORMAT_R8_USCALED:11,VK_FORMAT_R8_SSCALED:12,VK_FORMAT_R8_UINT:13,VK_FORMAT_R8_SINT:14,VK_FORMAT_R8_SRGB:15,VK_FORMAT_R8G8_UNORM:16,VK_FORMAT_R8G8_SNORM:17,VK_FORMAT_R8G8_USCALED:18,VK_FORMAT_R8G8_SSCALED:19,VK_FORMAT_R8G8_UINT:20,VK_FORMAT_R8G8_SINT:21,VK_FORMAT_R8G8_SRGB:22,VK_FORMAT_R8G8B8_UNORM:23,VK_FORMAT_R8G8B8_SNORM:24,VK_FORMAT_R8G8B8_USCALED:25,VK_FORMAT_R8G8B8_SSCALED:26,VK_FORMAT_R8G8B8_UINT:27,VK_FORMAT_R8G8B8_SINT:28,VK_FORMAT_R8G8B8_SRGB:29,VK_FORMAT_B8G8R8_UNORM:30,VK_FORMAT_B8G8R8_SNORM:31,VK_FORMAT_B8G8R8_USCALED:32,VK_FORMAT_B8G8R8_SSCALED:33,VK_FORMAT_B8G8R8_UINT:34,VK_FORMAT_B8G8R8_SINT:35,VK_FORMAT_B8G8R8_SRGB:36,VK_FORMAT_R8G8B8A8_UNORM:37,VK_FORMAT_R8G8B8A8_SNORM:38,VK_FORMAT_R8G8B8A8_USCALED:39,VK_FORMAT_R8G8B8A8_SSCALED:40,VK_FORMAT_R8G8B8A8_UINT:41,VK_FORMAT_R8G8B8A8_SINT:42,VK_FORMAT_R8G8B8A8_SRGB:43,VK_FORMAT_B8G8R8A8_UNORM:44,VK_FORMAT_B8G8R8A8_SNORM:45,VK_FORMAT_B8G8R8A8_USCALED:46,VK_FORMAT_B8G8R8A8_SSCALED:47,VK_FORMAT_B8G8R8A8_UINT:48,VK_FORMAT_B8G8R8A8_SINT:49,VK_FORMAT_B8G8R8A8_SRGB:50,VK_FORMAT_A8B8G8R8_UNORM_PACK32:51,VK_FORMAT_A8B8G8R8_SNORM_PACK32:52,VK_FORMAT_A8B8G8R8_USCALED_PACK32:53,VK_FORMAT_A8B8G8R8_SSCALED_PACK32:54,VK_FORMAT_A8B8G8R8_UINT_PACK32:55,VK_FORMAT_A8B8G8R8_SINT_PACK32:56,VK_FORMAT_A8B8G8R8_SRGB_PACK32:57,VK_FORMAT_A2R10G10B10_UNORM_PACK32:58,VK_FORMAT_A2R10G10B10_SNORM_PACK32:59,VK_FORMAT_A2R10G10B10_USCALED_PACK32:60,VK_FORMAT_A2R10G10B10_SSCALED_PACK32:61,VK_FORMAT_A2R10G10B10_UINT_PACK32:62,VK_FORMAT_A2R10G10B10_SINT_PACK32:63,VK_FORMAT_A2B10G10R10_UNORM_PACK32:64,VK_FORMAT_A2B10G10R10_SNORM_PACK32:65,VK_FORMAT_A2B10G10R10_USCALED_PACK32:66,VK_FORMAT_A2B10G10R10_SSCALED_PACK32:67,VK_FORMAT_A2B10G10R10_UINT_PACK32:68,VK_FORMAT_A2B10G10R10_SINT_PACK32:69,VK_FORMAT_R16_UNORM:70,VK_FORMAT_R16_SNORM:71,VK_FORMAT_R16_USCALED:72,VK_FORMAT_R16_SSCALED:73,VK_FORMAT_R16_UINT:74,VK_FORMAT_R16_SINT:75,VK_FORMAT_R16_SFLOAT:76,VK_FORMAT_R16G16_UNORM:77,VK_FORMAT_R16G16_SNORM:78,VK_FORMAT_R16G16_USCALED:79,VK_FORMAT_R16G16_SSCALED:80,VK_FORMAT_R16G16_UINT:81,VK_FORMAT_R16G16_SINT:82,VK_FORMAT_R16G16_SFLOAT:83,VK_FORMAT_R16G16B16_UNORM:84,VK_FORMAT_R16G16B16_SNORM:85,VK_FORMAT_R16G16B16_USCALED:86,VK_FORMAT_R16G16B16_SSCALED:87,VK_FORMAT_R16G16B16_UINT:88,VK_FORMAT_R16G16B16_SINT:89,VK_FORMAT_R16G16B16_SFLOAT:90,VK_FORMAT_R16G16B16A16_UNORM:91,VK_FORMAT_R16G16B16A16_SNORM:92,VK_FORMAT_R16G16B16A16_USCALED:93,VK_FORMAT_R16G16B16A16_SSCALED:94,VK_FORMAT_R16G16B16A16_UINT:95,VK_FORMAT_R16G16B16A16_SINT:96,VK_FORMAT_R16G16B16A16_SFLOAT:97,VK_FORMAT_R32_UINT:98,VK_FORMAT_R32_SINT:99,VK_FORMAT_R32_SFLOAT:100,VK_FORMAT_R32G32_UINT:101,VK_FORMAT_R32G32_SINT:102,VK_FORMAT_R32G32_SFLOAT:103,VK_FORMAT_R32G32B32_UINT:104,VK_FORMAT_R32G32B32_SINT:105,VK_FORMAT_R32G32B32_SFLOAT:106,VK_FORMAT_R32G32B32A32_UINT:107,VK_FORMAT_R32G32B32A32_SINT:108,VK_FORMAT_R32G32B32A32_SFLOAT:109,VK_FORMAT_R64_UINT:110,VK_FORMAT_R64_SINT:111,VK_FORMAT_R64_SFLOAT:112,VK_FORMAT_R64G64_UINT:113,VK_FORMAT_R64G64_SINT:114,VK_FORMAT_R64G64_SFLOAT:115,VK_FORMAT_R64G64B64_UINT:116,VK_FORMAT_R64G64B64_SINT:117,VK_FORMAT_R64G64B64_SFLOAT:118,VK_FORMAT_R64G64B64A64_UINT:119,VK_FORMAT_R64G64B64A64_SINT:120,VK_FORMAT_R64G64B64A64_SFLOAT:121,VK_FORMAT_B10G11R11_UFLOAT_PACK32:122,VK_FORMAT_E5B9G9R9_UFLOAT_PACK32:123,VK_FORMAT_D16_UNORM:124,VK_FORMAT_X8_D24_UNORM_PACK32:125,VK_FORMAT_D32_SFLOAT:126,VK_FORMAT_S8_UINT:127,VK_FORMAT_D16_UNORM_S8_UINT:128,VK_FORMAT_D24_UNORM_S8_UINT:129,VK_FORMAT_D32_SFLOAT_S8_UINT:130,VK_FORMAT_BC1_RGB_UNORM_BLOCK:131,VK_FORMAT_BC1_RGB_SRGB_BLOCK:132,VK_FORMAT_BC1_RGBA_UNORM_BLOCK:133,VK_FORMAT_BC1_RGBA_SRGB_BLOCK:134,VK_FORMAT_BC2_UNORM_BLOCK:135,VK_FORMAT_BC2_SRGB_BLOCK:136,VK_FORMAT_BC3_UNORM_BLOCK:137,VK_FORMAT_BC3_SRGB_BLOCK:138,VK_FORMAT_BC4_UNORM_BLOCK:139,VK_FORMAT_BC4_SNORM_BLOCK:140,VK_FORMAT_BC5_UNORM_BLOCK:141,VK_FORMAT_BC5_SNORM_BLOCK:142,VK_FORMAT_BC6H_UFLOAT_BLOCK:143,VK_FORMAT_BC6H_SFLOAT_BLOCK:144,VK_FORMAT_BC7_UNORM_BLOCK:145,VK_FORMAT_BC7_SRGB_BLOCK:146,VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK:147,VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK:148,VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK:149,VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK:150,VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK:151,VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK:152,VK_FORMAT_EAC_R11_UNORM_BLOCK:153,VK_FORMAT_EAC_R11_SNORM_BLOCK:154,VK_FORMAT_EAC_R11G11_UNORM_BLOCK:155,VK_FORMAT_EAC_R11G11_SNORM_BLOCK:156,VK_FORMAT_ASTC_4x4_UNORM_BLOCK:157,VK_FORMAT_ASTC_4x4_SRGB_BLOCK:158,VK_FORMAT_ASTC_5x4_UNORM_BLOCK:159,VK_FORMAT_ASTC_5x4_SRGB_BLOCK:160,VK_FORMAT_ASTC_5x5_UNORM_BLOCK:161,VK_FORMAT_ASTC_5x5_SRGB_BLOCK:162,VK_FORMAT_ASTC_6x5_UNORM_BLOCK:163,VK_FORMAT_ASTC_6x5_SRGB_BLOCK:164,VK_FORMAT_ASTC_6x6_UNORM_BLOCK:165,VK_FORMAT_ASTC_6x6_SRGB_BLOCK:166,VK_FORMAT_ASTC_8x5_UNORM_BLOCK:167,VK_FORMAT_ASTC_8x5_SRGB_BLOCK:168,VK_FORMAT_ASTC_8x6_UNORM_BLOCK:169,VK_FORMAT_ASTC_8x6_SRGB_BLOCK:170,VK_FORMAT_ASTC_8x8_UNORM_BLOCK:171,VK_FORMAT_ASTC_8x8_SRGB_BLOCK:172,VK_FORMAT_ASTC_10x5_UNORM_BLOCK:173,VK_FORMAT_ASTC_10x5_SRGB_BLOCK:174,VK_FORMAT_ASTC_10x6_UNORM_BLOCK:175,VK_FORMAT_ASTC_10x6_SRGB_BLOCK:176,VK_FORMAT_ASTC_10x8_UNORM_BLOCK:177,VK_FORMAT_ASTC_10x8_SRGB_BLOCK:178,VK_FORMAT_ASTC_10x10_UNORM_BLOCK:179,VK_FORMAT_ASTC_10x10_SRGB_BLOCK:180,VK_FORMAT_ASTC_12x10_UNORM_BLOCK:181,VK_FORMAT_ASTC_12x10_SRGB_BLOCK:182,VK_FORMAT_ASTC_12x12_UNORM_BLOCK:183,VK_FORMAT_ASTC_12x12_SRGB_BLOCK:184,VK_FORMAT_G8B8G8R8_422_UNORM:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM:1000156006,VK_FORMAT_R10X6_UNORM_PACK16:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16:1000156016,VK_FORMAT_R12X4_UNORM_PACK16:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM:1000156033,VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG:1000054e3,VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG:1000054001,VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG:1000054002,VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG:1000054003,VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG:1000054004,VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG:1000054005,VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG:1000054006,VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG:1000054007,VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT:1000066e3,VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT:1000066001,VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT:1000066002,VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT:1000066003,VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT:1000066004,VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT:1000066005,VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT:1000066006,VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT:1000066007,VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT:1000066008,VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT:1000066009,VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT:1000066010,VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT:1000066011,VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT:1000066012,VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT:1000066013,VK_FORMAT_G8B8G8R8_422_UNORM_KHR:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM_KHR:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR:1000156006,VK_FORMAT_R10X6_UNORM_PACK16_KHR:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR:1000156016,VK_FORMAT_R12X4_UNORM_PACK16_KHR:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM_KHR:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM_KHR:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR:1000156033},nst=Object.freeze(AQi);function hQi(o){switch(o){case Ii.FLOAT:return"float";case Ii.FLOAT_VEC2:return"vec2";case Ii.FLOAT_VEC3:return"vec3";case Ii.FLOAT_VEC4:return"vec4";case Ii.FLOAT_MAT2:return"mat2";case Ii.FLOAT_MAT3:return"mat3";case Ii.FLOAT_MAT4:return"mat4";case Ii.SAMPLER_2D:return"sampler2D";case Ii.BOOL:return"bool"}}var ost=hQi;function dQi(o,A,f){return function(){f.apply(o,arguments),A.apply(o,arguments)}}var DSe=dQi,fQi=function(o){let A=document.createElement("div");A.innerHTML=o;let f=document.createDocumentFragment();for(;A.firstChild;)f.appendChild(A.firstChild);return f},TSe=fQi,gQi=EP,pQi=function(o,A,f){A=iA(A);let m=TSe(o),C=[],y;for(y=0;y<m.childNodes.length;++y)C.push(m.childNodes[y]);for(A.appendChild(m),y=0;y<C.length;++y){let x=C[y];(x.nodeType===1||x.nodeType===8)&&gQi.applyBindings(f,x)}return C},dae=pQi,mQi=EP,JK=function(o){if(!O(o)||!O(o.terria))throw new Ui("options.terria is required.");this.terria=o.terria,this._removeSubscription=void 0,this._lastLegendUpdate=void 0,this.eventHelper=new Mx,this.distanceLabel=void 0,this.barWidth=void 0,this.enableDistanceLegend=O(o.enableDistanceLegend)?o.enableDistanceLegend:!0,mQi.track(this,["distanceLabel","barWidth"]),this.eventHelper.add(this.terria.afterWidgetChanged,function(){O(this._removeSubscription)&&(this._removeSubscription(),this._removeSubscription=void 0)},this);let A=this;function f(){if(O(A.terria)){let m=A.terria.scene;A._removeSubscription=m.postRender.addEventListener(function(){CQi(this,m)},A)}}f(),this.eventHelper.add(this.terria.afterWidgetChanged,function(){f()},this)};JK.prototype.destroy=function(){this.eventHelper.removeAll()};JK.prototype.show=function(o){let A;this.enableDistanceLegend?A=`<div class="distance-legend" data-bind="visible: distanceLabel && barWidth"><div class="distance-legend-label" data-bind="text: distanceLabel"></div><div class="distance-legend-scale-bar" data-bind="style: { width: barWidth + 'px', left: (5 + (125 - barWidth) / 2) + 'px' }"></div></div>`:A=`<div class="distance-legend"  style="display: none;" data-bind="visible: distanceLabel && barWidth"><div class="distance-legend-label"  data-bind="text: distanceLabel"></div><div class="distance-legend-scale-bar"  data-bind="style: { width: barWidth + 'px', left: (5 + (125 - barWidth) / 2) + 'px' }"></div></div>`,dae(A,o,this)};JK.create=function(o){let A=new JK(o);return A.show(o.container),A};var Eme=Ti.MOON2000,qze=new l0(null,null,Eme),qge=[1,2,3,5,10,20,30,50,100,200,300,500,1e3,2e3,3e3,5e3,1e4,2e4,3e4,5e4,1e5,2e5,3e5,5e5,1e6,2e6,3e6,5e6,1e7,2e7,3e7,5e7];function CQi(o,A){if(!o.enableDistanceLegend){o.barWidth=void 0,o.distanceLabel=void 0;return}let f=OA();if(f<o._lastLegendUpdate+250)return;o._lastLegendUpdate=f;let m=A.canvas.clientWidth,C=A.canvas.clientHeight,y=A.camera.getPickRay(new Bt(m/2|0,C-1)),x=A.camera.getPickRay(new Bt(1+m/2|0,C-1)),v=A.globe,E=v.pick(y,A),I=v.pick(x,A);if(!O(E)||!O(I)){o.barWidth=void 0,o.distanceLabel=void 0;return}let w=Eme.cartesianToCartographic(E),Q=Eme.cartesianToCartographic(I);qze.setEndPoints(w,Q);let M=qze.surfaceDistance,B=100,T;for(let D=qge.length-1;!O(T)&&D>=0;--D)qge[D]/M<B&&(T=qge[D]);if(O(T)){let D;T>=1e3?D=(T/1e3).toString()+" km":D=T.toString()+" m",o.barWidth=T/M|0,o.distanceLabel=D}else o.barWidth=void 0,o.distanceLabel=void 0}var MSe=JK,yQi="M 7.5,0 C 3.375,0 0,3.375 0,7.5 0,11.625 3.375,15 7.5,15 c 3.46875,0 6.375,-2.4375 7.21875,-5.625 l -1.96875,0 C 12,11.53125 9.9375,13.125 7.5,13.125 4.40625,13.125 1.875,10.59375 1.875,7.5 1.875,4.40625 4.40625,1.875 7.5,1.875 c 1.59375,0 2.90625,0.65625 3.9375,1.6875 l -3,3 6.5625,0 L 15,0 12.75,2.25 C 11.4375,0.84375 9.5625,0 7.5,0 z",PSe=yQi,xQi=EP,RSe=function(o){if(!O(o))throw new Ui("terria is required");this._terria=o,this.name="Unnamed Control",this.text=void 0,this.svgIcon=void 0,this.svgHeight=void 0,this.svgWidth=void 0,this.cssClass=void 0,this.isActive=!1,xQi.track(this,["name","svgIcon","svgHeight","svgWidth","cssClass","isActive"])};Object.defineProperties(RSe.prototype,{terria:{get:function(){return this._terria}},hasText:{get:function(){return O(this.text)&&typeof this.text=="string"}}});RSe.prototype.activate=function(){throw new Ui("activate must be implemented in the derived class.")};var fae=RSe,ast=function(o){fae.apply(this,arguments)};ast.prototype=Object.create(fae.prototype);var pH=ast,rW=function(o){pH.apply(this,arguments),this.name="\u91CD\u7F6E\u89C6\u56FE",this.navigationLocked=!1,this.svgIcon=PSe,this.svgHeight=15,this.svgWidth=15,this.cssClass="navigation-control-icon-reset"};rW.prototype=Object.create(pH.prototype);rW.prototype.setNavigationLocked=function(o){this.navigationLocked=o};rW.prototype.resetView=function(){if(this.navigationLocked)return;let o=this.terria.scene;if(!o.screenSpaceCameraController.enableInputs)return;this.isActive=!0;let A=o.camera;if(O(this.terria.trackedEntity)){let f=this.terria.trackedEntity;this.terria.trackedEntity=void 0,this.terria.trackedEntity=f}else if(this.terria.options.defaultResetView){if(this.terria.options.defaultResetView&&this.terria.options.defaultResetView instanceof Kt)A.flyTo({destination:o.globe.ellipsoid.cartographicToCartesian(this.terria.options.defaultResetView)});else if(this.terria.options.defaultResetView&&this.terria.options.defaultResetView instanceof Si)try{Si.validate(this.terria.options.defaultResetView),A.flyTo({destination:this.terria.options.defaultResetView})}catch{console.log("Cesium-navigation/ResetViewNavigationControl:   options.defaultResetView Cesium rectangle is  invalid!")}}else typeof A.flyHome=="function"?A.flyHome(1):A.flyTo({destination:Ml.DEFAULT_VIEW_RECTANGLE,duration:1});this.isActive=!1};rW.prototype.activate=function(){this.resetView()};var LSe=rW,sst={},vQi=new Kt,Xge=new ss;sst.getCameraFocus=function(o,A,f){let m=o.scene,C=m.camera;if(m.mode!==xi.MORPHING&&(O(f)||(f=new ee),O(o.trackedEntity)?f=o.trackedEntity.position.getValue(o.clock.currentTime,f):(Xge.origin=C.positionWC,Xge.direction=C.directionWC,f=m.globe.pick(Xge,m,f)),!!O(f)))return m.mode===xi.SCENE2D||m.mode===xi.COLUMBUS_VIEW?(f=C.worldToCameraCoordinatesPoint(f,f),A&&(f=m.globe.ellipsoid.cartographicToCartesian(m.mapProjection.unproject(f,vQi),f))):A||(f=C.worldToCameraCoordinatesPoint(f,f)),f};var mH=sst,nW=function(o,A){pH.apply(this,arguments),this.name="Zoom "+(A?"In":"Out"),this.text=A?"+":"-",this.cssClass="navigation-control-icon-zoom-"+(A?"in":"out"),this.relativeAmount=2,A&&(this.relativeAmount=1/this.relativeAmount)};nW.prototype.relativeAmount=1;nW.prototype=Object.create(pH.prototype);nW.prototype.activate=function(){this.zoom(this.relativeAmount)};var EQi=new ee;nW.prototype.zoom=function(o){if(this.isActive=!0,O(this.terria)){let A=this.terria.scene,f=A.screenSpaceCameraController;if(!f.enableInputs||!f.enableZoom)return;let m=A.camera,C;switch(A.mode){case xi.MORPHING:break;case xi.SCENE2D:m.zoomIn(m.positionCartographic.height*(1-this.relativeAmount));break;default:let y;if(O(this.terria.trackedEntity)?y=new ee:y=mH.getCameraFocus(this.terria,!1),O(y))C={direction:m.direction,up:m.up};else{let I=new ss(m.worldToCameraCoordinatesPoint(A.globe.ellipsoid.cartographicToCartesian(m.positionCartographic)),m.directionWC);y=Xh.grazingAltitudeLocation(I,A.globe.ellipsoid),C={heading:m.heading,pitch:m.pitch,roll:m.roll}}let x=ee.subtract(m.position,y,EQi),v=ee.multiplyByScalar(x,o,x),E=ee.add(y,v,y);if(O(this.terria.trackedEntity)||A.mode===xi.COLUMBUS_VIEW)m.position=E;else{if(o===.5&&Ae(m.undergroundMode,!1)===!1&&m.positionCartographic.height<1)return;m.flyTo({destination:E,orientation:C,duration:.5,convert:!1})}}}this.isActive=!1};var mie=nW,IQi="m 66.5625,0 0,15.15625 3.71875,0 0,-10.40625 5.5,10.40625 4.375,0 0,-15.15625 -3.71875,0 0,10.40625 L 70.9375,0 66.5625,0 z M 72.5,20.21875 c -28.867432,0 -52.28125,23.407738 -52.28125,52.28125 0,28.87351 23.413818,52.3125 52.28125,52.3125 28.86743,0 52.28125,-23.43899 52.28125,-52.3125 0,-28.873512 -23.41382,-52.28125 -52.28125,-52.28125 z m 0,1.75 c 13.842515,0 26.368948,5.558092 35.5,14.5625 l -11.03125,11 0.625,0.625 11.03125,-11 c 8.9199,9.108762 14.4375,21.579143 14.4375,35.34375 0,13.764606 -5.5176,26.22729 -14.4375,35.34375 l -11.03125,-11 -0.625,0.625 11.03125,11 c -9.130866,9.01087 -21.658601,14.59375 -35.5,14.59375 -13.801622,0 -26.321058,-5.53481 -35.4375,-14.5 l 11.125,-11.09375 c 6.277989,6.12179 14.857796,9.90625 24.3125,9.90625 19.241896,0 34.875,-15.629154 34.875,-34.875 0,-19.245847 -15.633104,-34.84375 -34.875,-34.84375 -9.454704,0 -18.034511,3.760884 -24.3125,9.875 L 37.0625,36.4375 C 46.179178,27.478444 58.696991,21.96875 72.5,21.96875 z m -0.875,0.84375 0,13.9375 1.75,0 0,-13.9375 -1.75,0 z M 36.46875,37.0625 47.5625,48.15625 C 41.429794,54.436565 37.65625,63.027539 37.65625,72.5 c 0,9.472461 3.773544,18.055746 9.90625,24.34375 L 36.46875,107.9375 c -8.96721,-9.1247 -14.5,-21.624886 -14.5,-35.4375 0,-13.812615 5.53279,-26.320526 14.5,-35.4375 z M 72.5,39.40625 c 18.297686,0 33.125,14.791695 33.125,33.09375 0,18.302054 -14.827314,33.125 -33.125,33.125 -18.297687,0 -33.09375,-14.822946 -33.09375,-33.125 0,-18.302056 14.796063,-33.09375 33.09375,-33.09375 z M 22.84375,71.625 l 0,1.75 13.96875,0 0,-1.75 -13.96875,0 z m 85.5625,0 0,1.75 14,0 0,-1.75 -14,0 z M 71.75,108.25 l 0,13.9375 1.71875,0 0,-13.9375 -1.71875,0 z",FSe=IQi,_Qi="m 72.71875,54.375 c -0.476702,0 -0.908208,0.245402 -1.21875,0.5625 -0.310542,0.317098 -0.551189,0.701933 -0.78125,1.1875 -0.172018,0.363062 -0.319101,0.791709 -0.46875,1.25 -6.91615,1.075544 -12.313231,6.656514 -13,13.625 -0.327516,0.117495 -0.661877,0.244642 -0.9375,0.375 -0.485434,0.22959 -0.901634,0.471239 -1.21875,0.78125 -0.317116,0.310011 -0.5625,0.742111 -0.5625,1.21875 l 0.03125,0 c 0,0.476639 0.245384,0.877489 0.5625,1.1875 0.317116,0.310011 0.702066,0.58291 1.1875,0.8125 0.35554,0.168155 0.771616,0.32165 1.21875,0.46875 1.370803,6.10004 6.420817,10.834127 12.71875,11.8125 0.146999,0.447079 0.30025,0.863113 0.46875,1.21875 0.230061,0.485567 0.470708,0.870402 0.78125,1.1875 0.310542,0.317098 0.742048,0.5625 1.21875,0.5625 0.476702,0 0.876958,-0.245402 1.1875,-0.5625 0.310542,-0.317098 0.582439,-0.701933 0.8125,-1.1875 0.172018,-0.363062 0.319101,-0.791709 0.46875,-1.25 6.249045,-1.017063 11.256351,-5.7184 12.625,-11.78125 0.447134,-0.1471 0.86321,-0.300595 1.21875,-0.46875 0.485434,-0.22959 0.901633,-0.502489 1.21875,-0.8125 0.317117,-0.310011 0.5625,-0.710861 0.5625,-1.1875 l -0.03125,0 c 0,-0.476639 -0.245383,-0.908739 -0.5625,-1.21875 C 89.901633,71.846239 89.516684,71.60459 89.03125,71.375 88.755626,71.244642 88.456123,71.117495 88.125,71 87.439949,64.078341 82.072807,58.503735 75.21875,57.375 c -0.15044,-0.461669 -0.326927,-0.884711 -0.5,-1.25 -0.230061,-0.485567 -0.501958,-0.870402 -0.8125,-1.1875 -0.310542,-0.317098 -0.710798,-0.5625 -1.1875,-0.5625 z m -0.0625,1.40625 c 0.03595,-0.01283 0.05968,0 0.0625,0 0.0056,0 0.04321,-0.02233 0.1875,0.125 0.144288,0.147334 0.34336,0.447188 0.53125,0.84375 0.06385,0.134761 0.123901,0.309578 0.1875,0.46875 -0.320353,-0.01957 -0.643524,-0.0625 -0.96875,-0.0625 -0.289073,0 -0.558569,0.04702 -0.84375,0.0625 C 71.8761,57.059578 71.936151,56.884761 72,56.75 c 0.18789,-0.396562 0.355712,-0.696416 0.5,-0.84375 0.07214,-0.07367 0.120304,-0.112167 0.15625,-0.125 z m 0,2.40625 c 0.448007,0 0.906196,0.05436 1.34375,0.09375 0.177011,0.592256 0.347655,1.271044 0.5,2.03125 0.475097,2.370753 0.807525,5.463852 0.9375,8.9375 -0.906869,-0.02852 -1.834463,-0.0625 -2.78125,-0.0625 -0.92298,0 -1.802327,0.03537 -2.6875,0.0625 0.138529,-3.473648 0.493653,-6.566747 0.96875,-8.9375 0.154684,-0.771878 0.320019,-1.463985 0.5,-2.0625 0.405568,-0.03377 0.804291,-0.0625 1.21875,-0.0625 z m -2.71875,0.28125 c -0.129732,0.498888 -0.259782,0.987558 -0.375,1.5625 -0.498513,2.487595 -0.838088,5.693299 -0.96875,9.25 -3.21363,0.15162 -6.119596,0.480068 -8.40625,0.9375 -0.682394,0.136509 -1.275579,0.279657 -1.84375,0.4375 0.799068,-6.135482 5.504716,-11.036454 11.59375,-12.1875 z M 75.5,58.5 c 6.043169,1.18408 10.705093,6.052712 11.5,12.15625 -0.569435,-0.155806 -1.200273,-0.302525 -1.875,-0.4375 -2.262525,-0.452605 -5.108535,-0.783809 -8.28125,-0.9375 -0.130662,-3.556701 -0.470237,-6.762405 -0.96875,-9.25 C 75.761959,59.467174 75.626981,58.990925 75.5,58.5 z m -2.84375,12.09375 c 0.959338,0 1.895843,0.03282 2.8125,0.0625 C 75.48165,71.267751 75.5,71.871028 75.5,72.5 c 0,1.228616 -0.01449,2.438313 -0.0625,3.59375 -0.897358,0.0284 -1.811972,0.0625 -2.75,0.0625 -0.927373,0 -1.831062,-0.03473 -2.71875,-0.0625 -0.05109,-1.155437 -0.0625,-2.365134 -0.0625,-3.59375 0,-0.628972 0.01741,-1.232249 0.03125,-1.84375 0.895269,-0.02827 1.783025,-0.0625 2.71875,-0.0625 z M 68.5625,70.6875 c -0.01243,0.60601 -0.03125,1.189946 -0.03125,1.8125 0,1.22431 0.01541,2.407837 0.0625,3.5625 -3.125243,-0.150329 -5.92077,-0.471558 -8.09375,-0.90625 -0.784983,-0.157031 -1.511491,-0.316471 -2.125,-0.5 -0.107878,-0.704096 -0.1875,-1.422089 -0.1875,-2.15625 0,-0.115714 0.02849,-0.228688 0.03125,-0.34375 0.643106,-0.20284 1.389577,-0.390377 2.25,-0.5625 2.166953,-0.433487 4.97905,-0.75541 8.09375,-0.90625 z m 8.3125,0.03125 c 3.075121,0.15271 5.824455,0.446046 7.96875,0.875 0.857478,0.171534 1.630962,0.360416 2.28125,0.5625 0.0027,0.114659 0,0.228443 0,0.34375 0,0.735827 -0.07914,1.450633 -0.1875,2.15625 -0.598568,0.180148 -1.29077,0.34562 -2.0625,0.5 -2.158064,0.431708 -4.932088,0.754666 -8.03125,0.90625 0.04709,-1.154663 0.0625,-2.33819 0.0625,-3.5625 0,-0.611824 -0.01924,-1.185379 -0.03125,-1.78125 z M 57.15625,72.5625 c 0.0023,0.572772 0.06082,1.131112 0.125,1.6875 -0.125327,-0.05123 -0.266577,-0.10497 -0.375,-0.15625 -0.396499,-0.187528 -0.665288,-0.387337 -0.8125,-0.53125 -0.147212,-0.143913 -0.15625,-0.182756 -0.15625,-0.1875 0,-0.0047 -0.02221,-0.07484 0.125,-0.21875 0.147212,-0.143913 0.447251,-0.312472 0.84375,-0.5 0.07123,-0.03369 0.171867,-0.06006 0.25,-0.09375 z m 31.03125,0 c 0.08201,0.03503 0.175941,0.05872 0.25,0.09375 0.396499,0.187528 0.665288,0.356087 0.8125,0.5 0.14725,0.14391 0.15625,0.21405 0.15625,0.21875 0,0.0047 -0.009,0.04359 -0.15625,0.1875 -0.147212,0.143913 -0.416001,0.343722 -0.8125,0.53125 -0.09755,0.04613 -0.233314,0.07889 -0.34375,0.125 0.06214,-0.546289 0.09144,-1.094215 0.09375,-1.65625 z m -29.5,3.625 c 0.479308,0.123125 0.983064,0.234089 1.53125,0.34375 2.301781,0.460458 5.229421,0.787224 8.46875,0.9375 0.167006,2.84339 0.46081,5.433176 0.875,7.5 0.115218,0.574942 0.245268,1.063612 0.375,1.5625 -5.463677,-1.028179 -9.833074,-5.091831 -11.25,-10.34375 z m 27.96875,0 C 85.247546,81.408945 80.919274,85.442932 75.5,86.5 c 0.126981,-0.490925 0.261959,-0.967174 0.375,-1.53125 0.41419,-2.066824 0.707994,-4.65661 0.875,-7.5 3.204493,-0.15162 6.088346,-0.480068 8.375,-0.9375 0.548186,-0.109661 1.051942,-0.220625 1.53125,-0.34375 z M 70.0625,77.53125 c 0.865391,0.02589 1.723666,0.03125 2.625,0.03125 0.912062,0 1.782843,-0.0048 2.65625,-0.03125 -0.165173,2.736408 -0.453252,5.207651 -0.84375,7.15625 -0.152345,0.760206 -0.322989,1.438994 -0.5,2.03125 -0.437447,0.03919 -0.895856,0.0625 -1.34375,0.0625 -0.414943,0 -0.812719,-0.02881 -1.21875,-0.0625 -0.177011,-0.592256 -0.347655,-1.271044 -0.5,-2.03125 -0.390498,-1.948599 -0.700644,-4.419842 -0.875,-7.15625 z m 1.75,10.28125 c 0.284911,0.01545 0.554954,0.03125 0.84375,0.03125 0.325029,0 0.648588,-0.01171 0.96875,-0.03125 -0.05999,0.148763 -0.127309,0.31046 -0.1875,0.4375 -0.18789,0.396562 -0.386962,0.696416 -0.53125,0.84375 -0.144288,0.147334 -0.181857,0.125 -0.1875,0.125 -0.0056,0 -0.07446,0.02233 -0.21875,-0.125 C 72.355712,88.946416 72.18789,88.646562 72,88.25 71.939809,88.12296 71.872486,87.961263 71.8125,87.8125 z",NSe=_Qi,BQi="M 72.46875,22.03125 C 59.505873,22.050338 46.521615,27.004287 36.6875,36.875 L 47.84375,47.96875 C 61.521556,34.240041 83.442603,34.227389 97.125,47.90625 l 11.125,-11.125 C 98.401629,26.935424 85.431627,22.012162 72.46875,22.03125 z",kSe=BQi,wQi=EP,lQ=function(o){this.terria=o.terria,this.eventHelper=new Mx,this.enableZoomControls=O(o.enableZoomControls)?o.enableZoomControls:!0,this.enableCompass=O(o.enableCompass)?o.enableCompass:!0,this.navigationLocked=!1,this.controls=o.controls,O(this.controls)||(this.controls=[new mie(this.terria,!0),new LSe(this.terria),new mie(this.terria,!1)]),this.svgCompassOuterRing=FSe,this.svgCompassGyro=NSe,this.svgCompassRotationMarker=kSe,this.showCompass=O(this.terria)&&this.enableCompass,this.heading=this.showCompass?this.terria.scene.camera.heading:0,this.isOrbiting=!1,this.orbitCursorAngle=0,this.orbitCursorOpacity=0,this.orbitLastTimestamp=0,this.orbitFrame=void 0,this.orbitIsLook=!1,this.orbitMouseMoveFunction=void 0,this.orbitMouseUpFunction=void 0,this.isRotating=!1,this.rotateInitialCursorAngle=void 0,this.rotateFrame=void 0,this.rotateIsLook=!1,this.rotateMouseMoveFunction=void 0,this.rotateMouseUpFunction=void 0,this._unsubcribeFromPostRender=void 0,wQi.track(this,["controls","showCompass","heading","isOrbiting","orbitCursorAngle","isRotating"]);let A=this;lQ.prototype.setNavigationLocked=function(m){this.navigationLocked=m,this.controls&&this.controls.length>1&&this.controls[1].setNavigationLocked(this.navigationLocked)};function f(){O(A.terria)?(A._unsubcribeFromPostRender&&(A._unsubcribeFromPostRender(),A._unsubcribeFromPostRender=void 0),A.showCompass=A.enableCompass,A._unsubcribeFromPostRender=A.terria.scene.postRender.addEventListener(function(){A.heading=A.terria.scene.camera.heading})):(A._unsubcribeFromPostRender&&(A._unsubcribeFromPostRender(),A._unsubcribeFromPostRender=void 0),A.showCompass=!1)}this.eventHelper.add(this.terria.afterWidgetChanged,f,this),f()};lQ.prototype.destroy=function(){this.eventHelper.removeAll()};lQ.prototype.show=function(o){let A;this.enableZoomControls&&this.enableCompass?A=`<div class="compass" title=""  data-bind="visible: showCompass, event: { mousedown: handleMouseDown, dblclick: handleDoubleClick }"><div class="compass-outer-ring-background"></div> <div class="compass-rotation-marker" data-bind="visible: isOrbiting, style: { transform: 'rotate(-' + orbitCursorAngle + 'rad)', '-webkit-transform': 'rotate(-' + orbitCursorAngle + 'rad)', opacity: orbitCursorOpacity }, cesiumSvgPath: { path: svgCompassRotationMarker, width: 145, height: 145 }"></div> <div class="compass-outer-ring" title="" data-bind="style: { transform: 'rotate(-' + heading + 'rad)', '-webkit-transform': 'rotate(-' + heading + 'rad)' }, cesiumSvgPath: { path: svgCompassOuterRing, width: 145, height: 145 }"></div> <div class="compass-gyro-background"></div> <div class="compass-gyro" data-bind="cesiumSvgPath: { path: svgCompassGyro, width: 145, height: 145 }, css: { 'compass-gyro-active': isOrbiting }"></div></div><div class="navigation-controls"><!-- ko foreach: controls --><div data-bind="click: activate, attr: { title: $data.name }, css: $root.isLastControl($data) ? 'navigation-control-last' : 'navigation-control' ">   <!-- ko if: $data.hasText -->   <div data-bind="text: $data.text, css: $data.isActive ?  'navigation-control-icon-active ' + $data.cssClass : $data.cssClass"></div>   <!-- /ko -->  <!-- ko ifnot: $data.hasText -->  <div data-bind="cesiumSvgPath: { path: $data.svgIcon, width: $data.svgWidth, height: $data.svgHeight }, css: $data.isActive ?  'navigation-control-icon-active ' + $data.cssClass : $data.cssClass"></div>  <!-- /ko --> </div> <!-- /ko --></div>`:!this.enableZoomControls&&this.enableCompass?A=`<div class="compass" title="" data-bind="visible: showCompass, event: { mousedown: handleMouseDown, dblclick: handleDoubleClick }"><div class="compass-outer-ring-background"></div> <div class="compass-rotation-marker" data-bind="visible: isOrbiting, style: { transform: 'rotate(-' + orbitCursorAngle + 'rad)', '-webkit-transform': 'rotate(-' + orbitCursorAngle + 'rad)', opacity: orbitCursorOpacity }, cesiumSvgPath: { path: svgCompassRotationMarker, width: 145, height: 145 }"></div> <div class="compass-outer-ring" title="" data-bind="style: { transform: 'rotate(-' + heading + 'rad)', '-webkit-transform': 'rotate(-' + heading + 'rad)' }, cesiumSvgPath: { path: svgCompassOuterRing, width: 145, height: 145 }"></div> <div class="compass-gyro-background"></div> <div class="compass-gyro" data-bind="cesiumSvgPath: { path: svgCompassGyro, width: 145, height: 145 }, css: { 'compass-gyro-active': isOrbiting }"></div></div><div class="navigation-controls"  style="display: none;" ><!-- ko foreach: controls --><div data-bind="click: activate, attr: { title: $data.name }, css: $root.isLastControl($data) ? 'navigation-control-last' : 'navigation-control' ">   <!-- ko if: $data.hasText -->   <div data-bind="text: $data.text, css: $data.isActive ?  'navigation-control-icon-active ' + $data.cssClass : $data.cssClass"></div>   <!-- /ko -->  <!-- ko ifnot: $data.hasText -->  <div data-bind="cesiumSvgPath: { path: $data.svgIcon, width: $data.svgWidth, height: $data.svgHeight }, css: $data.isActive ?  'navigation-control-icon-active ' + $data.cssClass : $data.cssClass"></div>  <!-- /ko --> </div> <!-- /ko --></div>`:this.enableZoomControls&&!this.enableCompass?A=`<div class="compass"  style="display: none;" title="" data-bind="visible: showCompass, event: { mousedown: handleMouseDown, dblclick: handleDoubleClick }"><div class="compass-outer-ring-background"></div> <div class="compass-rotation-marker" data-bind="visible: isOrbiting, style: { transform: 'rotate(-' + orbitCursorAngle + 'rad)', '-webkit-transform': 'rotate(-' + orbitCursorAngle + 'rad)', opacity: orbitCursorOpacity }, cesiumSvgPath: { path: svgCompassRotationMarker, width: 145, height: 145 }"></div> <div class="compass-outer-ring" title="" data-bind="style: { transform: 'rotate(-' + heading + 'rad)', '-webkit-transform': 'rotate(-' + heading + 'rad)' }, cesiumSvgPath: { path: svgCompassOuterRing, width: 145, height: 145 }"></div> <div class="compass-gyro-background"></div> <div class="compass-gyro" data-bind="cesiumSvgPath: { path: svgCompassGyro, width: 145, height: 145 }, css: { 'compass-gyro-active': isOrbiting }"></div></div><div class="navigation-controls"    ><!-- ko foreach: controls --><div data-bind="click: activate, attr: { title: $data.name }, css: $root.isLastControl($data) ? 'navigation-control-last' : 'navigation-control' ">   <!-- ko if: $data.hasText -->   <div data-bind="text: $data.text, css: $data.isActive ?  'navigation-control-icon-active ' + $data.cssClass : $data.cssClass"></div>   <!-- /ko -->  <!-- ko ifnot: $data.hasText -->  <div data-bind="cesiumSvgPath: { path: $data.svgIcon, width: $data.svgWidth, height: $data.svgHeight }, css: $data.isActive ?  'navigation-control-icon-active ' + $data.cssClass : $data.cssClass"></div>  <!-- /ko --> </div> <!-- /ko --></div>`:!this.enableZoomControls&&!this.enableCompass&&(A=`<div class="compass"  style="display: none;" title="" data-bind="visible: showCompass, event: { mousedown: handleMouseDown, dblclick: handleDoubleClick }"><div class="compass-outer-ring-background"></div> <div class="compass-rotation-marker" data-bind="visible: isOrbiting, style: { transform: 'rotate(-' + orbitCursorAngle + 'rad)', '-webkit-transform': 'rotate(-' + orbitCursorAngle + 'rad)', opacity: orbitCursorOpacity }, cesiumSvgPath: { path: svgCompassRotationMarker, width: 145, height: 145 }"></div> <div class="compass-outer-ring" title="" data-bind="style: { transform: 'rotate(-' + heading + 'rad)', '-webkit-transform': 'rotate(-' + heading + 'rad)' }, cesiumSvgPath: { path: svgCompassOuterRing, width: 145, height: 145 }"></div> <div class="compass-gyro-background"></div> <div class="compass-gyro" data-bind="cesiumSvgPath: { path: svgCompassGyro, width: 145, height: 145 }, css: { 'compass-gyro-active': isOrbiting }"></div></div><div class="navigation-controls"   style="display: none;" ><!-- ko foreach: controls --><div data-bind="click: activate, attr: { title: $data.name }, css: $root.isLastControl($data) ? 'navigation-control-last' : 'navigation-control' ">   <!-- ko if: $data.hasText -->   <div data-bind="text: $data.text, css: $data.isActive ?  'navigation-control-icon-active ' + $data.cssClass : $data.cssClass"></div>   <!-- /ko -->  <!-- ko ifnot: $data.hasText -->  <div data-bind="cesiumSvgPath: { path: $data.svgIcon, width: $data.svgWidth, height: $data.svgHeight }, css: $data.isActive ?  'navigation-control-icon-active ' + $data.cssClass : $data.cssClass"></div>  <!-- /ko --> </div> <!-- /ko --></div>`),dae(A,o,this)};lQ.prototype.add=function(o){this.controls.push(o)};lQ.prototype.remove=function(o){this.controls.remove(o)};lQ.prototype.isLastControl=function(o){return o===this.controls[this.controls.length-1]};var OSe=new Bt;lQ.prototype.handleMouseDown=function(o,A){if(this.terria.scene.mode===xi.MORPHING||o.navigationLocked)return!0;let f=A.currentTarget,m=A.currentTarget.getBoundingClientRect(),C=m.width/2,y=new Bt((m.right-m.left)/2,(m.bottom-m.top)/2),x=new Bt(A.clientX-m.left,A.clientY-m.top),v=Bt.subtract(x,y,OSe),E=Bt.magnitude(v)/C;if(E<50/145)bQi(this,f,v);else if(E<1)QQi(this,f,v);else return!0};var Ime=new Xe,Cie=new Xe,USe=new ee;lQ.prototype.handleDoubleClick=function(o,A){let f=o.terria.scene,m=f.camera,C=f.screenSpaceCameraController;if(f.mode===xi.MORPHING||!C.enableInputs||o.navigationLocked)return!0;if(f.mode===xi.COLUMBUS_VIEW&&!C.enableTranslate||(f.mode===xi.SCENE3D||f.mode===xi.COLUMBUS_VIEW)&&(!C.enableLook||f.mode===xi.SCENE3D&&!C.enableRotate))return;let y=mH.getCameraFocus(o.terria,!0,USe);if(!O(y)){this.controls[1].resetView();return}let x=f.globe.ellipsoid.cartographicToCartesian(m.positionCartographic,new ee),v=f.globe.ellipsoid.geodeticSurfaceNormal(y),E=new wi(y,0);m.flyToBoundingSphere(E,{offset:new Ex(0,je.PI_OVER_TWO-ee.angleBetween(v,m.directionWC),ee.distance(x,y)),duration:1.5})};lQ.create=function(o){let A=new lQ(o);return A.show(o.container),A};function bQi(o,A,f){let m=o.terria.scene,C=m.screenSpaceCameraController;if(m.mode===xi.MORPHING||!C.enableInputs)return;if(o.navigationLocked)return!0;switch(m.mode){case xi.COLUMBUS_VIEW:if(C.enableLook)break;if(!C.enableTranslate||!C.enableTilt)return;break;case xi.SCENE3D:if(C.enableLook)break;if(!C.enableTilt||!C.enableRotate)return;break;case xi.SCENE2D:if(!C.enableTranslate)return;break}document.removeEventListener("mousemove",o.orbitMouseMoveFunction,!1),document.removeEventListener("mouseup",o.orbitMouseUpFunction,!1),O(o.orbitTickFunction)&&o.terria.clock.onTick.removeEventListener(o.orbitTickFunction),o.orbitMouseMoveFunction=void 0,o.orbitMouseUpFunction=void 0,o.orbitTickFunction=void 0,o.isOrbiting=!0,o.orbitLastTimestamp=OA();let y=m.camera;if(O(o.terria.trackedEntity))o.orbitFrame=void 0,o.orbitIsLook=!1;else{let v=mH.getCameraFocus(o.terria,!0,USe);O(v)?(o.orbitFrame=zn.eastNorthUpToFixedFrame(v,m.globe.ellipsoid,Cie),o.orbitIsLook=!1):(o.orbitFrame=zn.eastNorthUpToFixedFrame(y.positionWC,m.globe.ellipsoid,Cie),o.orbitIsLook=!0)}o.orbitTickFunction=function(v){let E=OA(),I=E-o.orbitLastTimestamp,w=(o.orbitCursorOpacity-.5)*2.5/1e3,Q=I*w,M=o.orbitCursorAngle+je.PI_OVER_TWO,B=Math.cos(M)*Q,T=Math.sin(M)*Q,D;if(o.navigationLocked)return!0;O(o.orbitFrame)&&(D=Xe.clone(y.transform,Ime),y.lookAtTransform(o.orbitFrame)),m.mode===xi.SCENE2D?y.move(new ee(B,T,0),Math.max(m.canvas.clientWidth,m.canvas.clientHeight)/100*y.positionCartographic.height*Q):o.orbitIsLook?(y.look(ee.UNIT_Z,-B),y.look(y.right,-T)):(y.rotateLeft(B),y.rotateUp(T)),O(o.orbitFrame)&&y.lookAtTransform(D),o.orbitLastTimestamp=E};function x(v,E){let I=Math.atan2(-v.y,v.x);o.orbitCursorAngle=je.zeroToTwoPi(I-je.PI_OVER_TWO);let w=Bt.magnitude(v),Q=E/2,M=Math.min(w/Q,1),B=.5*M*M+.5;o.orbitCursorOpacity=B}o.orbitMouseMoveFunction=function(v){let E=A.getBoundingClientRect(),I=new Bt((E.right-E.left)/2,(E.bottom-E.top)/2),w=new Bt(v.clientX-E.left,v.clientY-E.top),Q=Bt.subtract(w,I,OSe);x(Q,E.width)},o.orbitMouseUpFunction=function(v){o.isOrbiting=!1,document.removeEventListener("mousemove",o.orbitMouseMoveFunction,!1),document.removeEventListener("mouseup",o.orbitMouseUpFunction,!1),O(o.orbitTickFunction)&&o.terria.clock.onTick.removeEventListener(o.orbitTickFunction),o.orbitMouseMoveFunction=void 0,o.orbitMouseUpFunction=void 0,o.orbitTickFunction=void 0},document.addEventListener("mousemove",o.orbitMouseMoveFunction,!1),document.addEventListener("mouseup",o.orbitMouseUpFunction,!1),o.terria.clock.onTick.addEventListener(o.orbitTickFunction),x(f,A.getBoundingClientRect().width)}function QQi(o,A,f){let m=o.terria.scene,C=m.camera,y=m.screenSpaceCameraController;if(m.mode===xi.MORPHING||m.mode===xi.SCENE2D||!y.enableInputs)return;if(o.navigationLocked)return!0;if(!y.enableLook&&(m.mode===xi.COLUMBUS_VIEW||m.mode===xi.SCENE3D&&!y.enableRotate))return;if(document.removeEventListener("mousemove",o.rotateMouseMoveFunction,!1),document.removeEventListener("mouseup",o.rotateMouseUpFunction,!1),o.rotateMouseMoveFunction=void 0,o.rotateMouseUpFunction=void 0,o.isRotating=!0,o.rotateInitialCursorAngle=Math.atan2(-f.y,f.x),O(o.terria.trackedEntity))o.rotateFrame=void 0,o.rotateIsLook=!1;else{let v=mH.getCameraFocus(o.terria,!0,USe);!O(v)||m.mode===xi.COLUMBUS_VIEW&&!y.enableLook&&!y.enableTranslate?(o.rotateFrame=zn.eastNorthUpToFixedFrame(C.positionWC,m.globe.ellipsoid,Cie),o.rotateIsLook=!0):(o.rotateFrame=zn.eastNorthUpToFixedFrame(v,m.globe.ellipsoid,Cie),o.rotateIsLook=!1)}let x;O(o.rotateFrame)&&(x=Xe.clone(C.transform,Ime),C.lookAtTransform(o.rotateFrame)),o.rotateInitialCameraAngle=-C.heading,O(o.rotateFrame)&&C.lookAtTransform(x),o.rotateMouseMoveFunction=function(v){let E=A.getBoundingClientRect(),I=new Bt((E.right-E.left)/2,(E.bottom-E.top)/2),w=new Bt(v.clientX-E.left,v.clientY-E.top),Q=Bt.subtract(w,I,OSe),M=Math.atan2(-Q.y,Q.x)-o.rotateInitialCursorAngle,B=je.zeroToTwoPi(o.rotateInitialCameraAngle-M),T=o.terria.scene.camera,D;O(o.rotateFrame)&&(D=Xe.clone(T.transform,Ime),T.lookAtTransform(o.rotateFrame));let F=-T.heading;T.rotateRight(B-F),O(o.rotateFrame)&&T.lookAtTransform(D)},o.rotateMouseUpFunction=function(v){o.isRotating=!1,document.removeEventListener("mousemove",o.rotateMouseMoveFunction,!1),document.removeEventListener("mouseup",o.rotateMouseUpFunction,!1),o.rotateMouseMoveFunction=void 0,o.rotateMouseUpFunction=void 0},document.addEventListener("mousemove",o.rotateMouseMoveFunction,!1),document.addEventListener("mouseup",o.rotateMouseUpFunction,!1)}var L7=lQ,Xze=br,AB=function(o){SQi.apply(this,arguments),this._onDestroyListeners=[]};AB.prototype.distanceLegendViewModel=void 0;AB.prototype.navigationViewModel=void 0;AB.prototype.navigationDiv=void 0;AB.prototype.distanceLegendDiv=void 0;AB.prototype.terria=void 0;AB.prototype.container=void 0;AB.prototype._onDestroyListeners=void 0;AB.prototype._navigationLocked=!1;AB.prototype.setNavigationLocked=function(o){this._navigationLocked=o,this.navigationViewModel.setNavigationLocked(this._navigationLocked)};AB.prototype.getNavigationLocked=function(){return this._navigationLocked};AB.prototype.destroy=function(){O(this.navigationViewModel)&&this.navigationViewModel.destroy(),O(this.distanceLegendViewModel)&&this.distanceLegendViewModel.destroy(),O(this.navigationDiv)&&this.navigationDiv.parentNode.removeChild(this.navigationDiv),delete this.navigationDiv,O(this.distanceLegendDiv)&&this.distanceLegendDiv.parentNode.removeChild(this.distanceLegendDiv),delete this.distanceLegendDiv,O(this.container)&&this.container.parentNode.removeChild(this.container),delete this.container;for(let o=0;o<this._onDestroyListeners.length;o++)this._onDestroyListeners[o]()};AB.prototype.addOnDestroyListener=function(o){typeof o=="function"&&this._onDestroyListeners.push(o)};function SQi(o,A){if(!O(o))throw new Ui("CesiumWidget or Viewer is required.");let f=O(o.cesiumWidget)?o.cesiumWidget:o,m=document.createElement("div");m.className="Geoworld-widget-GeoworldNavigationContainer",f.container.appendChild(m),this.terria=o,this.terria.options=O(A)?A:{},this.terria.afterWidgetChanged=new Xze,this.terria.beforeWidgetChanged=new Xze,this.container=m,(!O(this.terria.options.enableDistanceLegend)||this.terria.options.enableDistanceLegend)&&(this.distanceLegendDiv=document.createElement("div"),m.appendChild(this.distanceLegendDiv),this.distanceLegendDiv.setAttribute("id","distanceLegendDiv"),this.distanceLegendViewModel=MSe.create({container:this.distanceLegendDiv,terria:this.terria,mapElement:m,enableDistanceLegend:!0})),(!O(this.terria.options.enableZoomControls)||this.terria.options.enableZoomControls)&&(!O(this.terria.options.enableCompass)||this.terria.options.enableCompass)?(this.navigationDiv=document.createElement("div"),this.navigationDiv.setAttribute("id","navigationDiv"),m.appendChild(this.navigationDiv),this.navigationViewModel=L7.create({container:this.navigationDiv,terria:this.terria,enableZoomControls:!0,enableCompass:!0})):O(this.terria.options.enableZoomControls)&&!this.terria.options.enableZoomControls&&(!O(this.terria.options.enableCompass)||this.terria.options.enableCompass)?(this.navigationDiv=document.createElement("div"),this.navigationDiv.setAttribute("id","navigationDiv"),m.appendChild(this.navigationDiv),this.navigationViewModel=L7.create({container:this.navigationDiv,terria:this.terria,enableZoomControls:!1,enableCompass:!0})):(!O(this.terria.options.enableZoomControls)||this.terria.options.enableZoomControls)&&O(this.terria.options.enableCompass)&&!this.terria.options.enableCompass?(this.navigationDiv=document.createElement("div"),this.navigationDiv.setAttribute("id","navigationDiv"),m.appendChild(this.navigationDiv),this.navigationViewModel=L7.create({container:this.navigationDiv,terria:this.terria,enableZoomControls:!0,enableCompass:!1})):O(this.terria.options.enableZoomControls)&&!this.terria.options.enableZoomControls&&O(this.terria.options.enableCompass)&&this.terria.options.enableCompass}var GSe=AB;function lst(o,A){if(!O(o))throw new Ui("viewer is required.");ust(o,A).addOnDestroyListener(function(f){return function(){delete f.cesiumNavigation}}(o)),Object.defineProperties(o,{cesiumNavigation:{configurable:!0,get:function(){return o.cesiumWidget.cesiumNavigation}}})}lst.mixinWidget=function(o,A){return ust.apply(void 0,arguments)};var ust=function(o,A){let f=new GSe(o,A),m=O(o.cesiumWidget)?o.cesiumWidget:o;return Object.defineProperties(m,{cesiumNavigation:{configurable:!0,get:function(){return f}}}),f.addOnDestroyListener(function(C){return function(){delete C.cesiumNavigation}}(m)),f},cst=lst;function DQi(o,A,f,m,C,y){let x=m._frameState,v=o.derivedCommands;!O(v)||(x.useLogDepth&&O(v.logDepth)&&(o=v.logDepth.command),v=o.derivedCommands,O(v[A])&&(o=v[A][f],o.execute(C,y)))}var Zge,$ge,e0e,t0e;function Zze(o,A,f,m,C,y){Zge=Zge||new Yu,$ge=$ge||new n2,e0e=e0e||new Ss,t0e=t0e||new K0;let x=o._us,v=x._frameState,E=v.camera,I=E._scene,w=I._view,Q=w.frustumCommandsList,M=Q.length,B=I._globeTranslucencyState,T=B.translucent,D;O(E.frustum.fov)?D=E.frustum.clone(Zge):O(E.frustum.infiniteProjectionMatrix)?D=E.frustum.clone($ge):O(E.frustum.width)?D=E.frustum.clone(e0e):D=E.frustum.clone(t0e);function F(U,V,H,q){(!y||y(U,V))&&(m&&C?DQi(U,m,C,V,H,q):U.execute(H,q))}let L,R,k;for(let U=0;U<M;++U){let V=M-U-1,H=Q[V],q=f.framebuffer;f.framebuffer=A,D.near=V!==0?H.near*I.opaqueFrustumNearOffset:H.near,D.far=H.far,x.updateFrustum(D),x.updatePass(hr.GLOBE),k=H.commands[hr.GLOBE],R=H.indices[hr.GLOBE];let ie=I._view.globeTranslucencyFramebuffer;if(T)B.executeGlobeCommands(H,F,ie,I,f);else for(L=0;L<R;++L)F(k[L],I,o,f);for(x.updatePass(hr.CESIUM_3D_TILE),k=H.commands[hr.CESIUM_3D_TILE],R=H.indices[hr.CESIUM_3D_TILE],L=0;L<R;++L)F(k[L],I,o,f);for(x.updatePass(hr.OPAQUE),k=H.commands[hr.OPAQUE],R=H.indices[hr.OPAQUE],L=0;L<R;++L)F(k[L],I,o,f);for(x.updatePass(hr.TRANSLUCENT),k=H.commands[hr.TRANSLUCENT],R=H.indices[hr.TRANSLUCENT],L=0;L<R;++L)F(k[L],I,o,f);f.framebuffer=q}}var $ze=`
vec3 packNormalToRGB( const in vec3 normal ) {
   return normalize( normal ) * 0.5 + 0.5;
}
@@ -14503,7 +14509,7 @@
float perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {
   return ( near * far ) / ( ( far - near ) * invClipZ - far );
}
`,jze=`uniform sampler2D czm_selectedIdTexture;
`,e7e=`uniform sampler2D czm_selectedIdTexture;
uniform float czm_selectedIdTextureStep; 
uniform float czm_selectedIdTextureWidth; 
bool czm_selected(vec4 id) 
@@ -14521,7 +14527,7 @@
    return false; 
`;function RSe(o){this._selectedIdTexture=null;let{name:A,vertexShader:f,fragmentShader:m,uniforms:C,renderStateProcess:y,beforeUpdate:x,viewportScale:v,overrideViewport:E,enableEntitySelect:I}=o,{renderType:w,textureScale:Q,shaderRedefine:M}=o,B=`renderPass_${A.replace(/[\.\\\/\-]/g,"_")}`,T=`czm_non_${B}_main`,D=`czm_${B}_main`,F=`_cache_${B}`,L=`${B}Command`,R=null,k=null,U=null,V=null,H=null,q,ie=new eA({color:At.TRANSPARENT,depth:1}),Z=new Kr,oe=this;if(E&&Kr.clone(E,Z),M=M||"add",w=w||"all",Q=Q||1,Q<0||Q>8)throw new Ui("CesiumRenderPass\uFF1AtextureScale\u5FC5\u987B\u5927\u4E8E0\u5C0F\u4E8E\u7B49\u4E8E8");function ne(he,fe,Ce,Ee){let be=he.shaderCache.getDerivedShaderProgram(fe,B);if(!O(be)){let Re=fe._attributeLocations,Ne=fe.fragmentShaderSource,Je=fe.vertexShaderSource,ot=fe._vertexShaderText,nt=Ne.sources,$e=nt.length,ht=!!H&&K(),ze=jze,Ze=/texture2D\s?\(\s?tile_pickTexture\s?,\s?tile_featureSt\s?\)/.test(Ce);Ee==="varying"&&!Ze?ze+=`
`;function HSe(o){this._selectedIdTexture=null;let{name:A,vertexShader:f,fragmentShader:m,uniforms:C,renderStateProcess:y,beforeUpdate:x,viewportScale:v,overrideViewport:E,enableEntitySelect:I}=o,{renderType:w,textureScale:Q,shaderRedefine:M}=o,B=`renderPass_${A.replace(/[\.\\\/\-]/g,"_")}`,T=`czm_non_${B}_main`,D=`czm_${B}_main`,F=`_cache_${B}`,L=`${B}Command`,R=null,k=null,U=null,V=null,H=null,q,ie=new eA({color:At.TRANSPARENT,depth:1}),Z=new Kr,oe=this;if(E&&Kr.clone(E,Z),M=M||"add",w=w||"all",Q=Q||1,Q<0||Q>8)throw new Ui("CesiumRenderPass\uFF1AtextureScale\u5FC5\u987B\u5927\u4E8E0\u5C0F\u4E8E\u7B49\u4E8E8");function ne(he,fe,Ce,Ee){let be=he.shaderCache.getDerivedShaderProgram(fe,B);if(!O(be)){let Re=fe._attributeLocations,Ne=fe.fragmentShaderSource,Je=fe.vertexShaderSource,ot=fe._vertexShaderText,nt=Ne.sources,$e=nt.length,ht=!!H&&K(),ze=e7e,Ze=/texture2D\s?\(\s?tile_pickTexture\s?,\s?tile_featureSt\s?\)/.test(Ce);Ee==="varying"&&!Ze?ze+=`
varying float me_isSelected;
bool czm_selected(){
    bool isSelected= me_isSelected>0.0000001;
@@ -14534,7 +14540,7 @@
bool czm_selected(){
    return czm_selected(${Ce});
}`;let ct=`
        ${jze}
        ${e7e}
        varying float me_isSelected;
        bool czm_selected(){
          SelectedFeature selectedFeature = feature;
@@ -14543,7 +14549,7 @@
          }
          return true;
        }
        `,We=!1,Oe=!1;if(/attribute\s?vec3\s?normal\s?;/.test(ot)||/\n\s?vec3\s?normal\s?;/.test(ot)?We=!0:/varying\s?vec3\s?v_normal\s?;/.test(ot)&&(Oe=!0),m){let Ye=!1;for(let yt=0;yt<$e;++yt)if(/vec4\s?packDepthToRGBA\s?\(/.test(nt[yt])){Ye=!0;break}let rt=Ye?"":Wze;rt+=ht?ze:"",rt+=Fr.replaceMain(m,D);let gt=`${T}();`;rt+=`void main()
        `,We=!1,Oe=!1;if(/attribute\s?vec3\s?normal\s?;/.test(ot)||/\n\s?vec3\s?normal\s?;/.test(ot)?We=!0:/varying\s?vec3\s?v_normal\s?;/.test(ot)&&(Oe=!0),m){let Ye=!1;for(let yt=0;yt<$e;++yt)if(/vec4\s?packDepthToRGBA\s?\(/.test(nt[yt])){Ye=!0;break}let rt=Ye?"":$ze;rt+=ht?ze:"",rt+=Fr.replaceMain(m,D);let gt=`${T}();`;rt+=`void main()
           { 
@@ -14552,7 +14558,7 @@
               ${D}(); 
           } 
`;let Et=new Array($e+1);for(let yt=0;yt<$e;++yt)Et[yt]=Fr.replaceMain(nt[yt],T),Et[yt]=Et[yt].replace(/gl_FragColor/g,"gl_FragData[0]");Et[$e]=rt,We?Ne.defines.push("HAS_NORMAL"):Oe&&Ne.defines.push("HAS_V_NORMAL"),Ne=new Fr({sources:Et,defines:Ne.defines})}if(f||m){nt=Je.sources,$e=nt.length;let Ye=!1;for(let Et=0;Et<$e;++Et)if(/vec4\s?packDepthToRGBA\s?\(/.test(nt[Et])){Ye=!0;break}ht=ht&&Ee==="varying"&&!Ze,We?Je.defines.push("HAS_NORMAL"):Oe&&Je.defines.push("HAS_V_NORMAL");let rt=`${Ye?"":Wze}
`;let Et=new Array($e+1);for(let yt=0;yt<$e;++yt)Et[yt]=Fr.replaceMain(nt[yt],T),Et[yt]=Et[yt].replace(/gl_FragColor/g,"gl_FragData[0]");Et[$e]=rt,We?Ne.defines.push("HAS_NORMAL"):Oe&&Ne.defines.push("HAS_V_NORMAL"),Ne=new Fr({sources:Et,defines:Ne.defines})}if(f||m){nt=Je.sources,$e=nt.length;let Ye=!1;for(let Et=0;Et<$e;++Et)if(/vec4\s?packDepthToRGBA\s?\(/.test(nt[Et])){Ye=!0;break}ht=ht&&Ee==="varying"&&!Ze,We?Je.defines.push("HAS_NORMAL"):Oe&&Je.defines.push("HAS_V_NORMAL");let rt=`${Ye?"":$ze}
          ${ht?ct:""}
          ${Fr.replaceMain(f||"void main(){}",D)}
          void main()
@@ -14560,9 +14566,9 @@
          ${M!=="replace"?`    ${T}();`:""}
          ${ht?"    me_isSelected=czm_selected()?1.:0.;":""}
              ${D}();
          }`,gt=new Array($e+1);for(let Et=0;Et<$e;++Et)gt[Et]=Fr.replaceMain(nt[Et],T);gt[$e]=rt,Je=new Fr({sources:gt,defines:Je.defines})}be=he.shaderCache.createDerivedShaderProgram(fe,B,{vertexShaderSource:Je,fragmentShaderSource:Ne,attributeLocations:Re})}return be}function se(he,fe){he._renderPassCache=he._renderPassCache||{},he._renderPassCache[F]=he._renderPassCache[F]||{};let Ce=he._renderPassCache[F],Ee=Ce[fe.id];if(!O(Ee)){let be=fn.getState(fe);typeof y=="function"&&y.call(oe,be),Ee=fn.fromCache(be),Ce[fe.id]=Ee}return Ee}function ce(he,fe,Ce){let Ee=he,be=fe._frameState,Re=he.derivedCommands;if(!O(Re))return;be.useLogDepth&&O(Re.logDepth)&&(he=Re.logDepth.command),Re=he.derivedCommands;let Ne=Re.renderPass;O(Re.renderPass)||(Ne=Re.renderPass={});let Je,ot;if(O(Ne[L])&&(Je=Ne[L].shaderProgram,ot=Ne[L].renderState),Ne[L]=On.shallowClone(he,Ne[L]),!O(Je)||Ne.shaderProgramId!==he.shaderProgram.id){let $e=he.shaderProgram,ht=Ee._pickIdQualifier=new RegExp(`uniform\\s?vec4\\s?${he.pickId}`,"g").test($e._fragmentShaderText)?"uniform":"varying";Ne[L].shaderProgram=ne(Ce,$e,he.pickId,ht),Ne[L].renderState=se(fe,he.renderState),Ne.shaderProgramId=he.shaderProgram.id}else Ne[L].shaderProgram=Je,Ne[L].renderState=ot;let nt=Ne[L].uniformMap;me(nt)}function j(he){return function(){let fe=C[he];return typeof fe=="function"?fe():fe}}function de(he,fe){return function(){let Ce=he[fe]();if(O(Ce))return Ce.dimensions}}function me(he){if(!he.__created&&(he.czm_selectedIdTexture=function(){return H._selectedIdTexture},he.czm_selectedIdTextureWidth=function(){return H._selectedIdTexture?H._selectedIdTexture.width:0},he.czm_selectedIdTextureStep=function(){return H._selectedIdTexture?1/H._selectedIdTexture.width:-1},!!C)){he.__created=!0;for(let fe in C)if(C.hasOwnProperty(fe)){typeof C[fe]!="function"?he[fe]=j(fe):he[fe]=C[fe];let Ce=he[fe]();(typeof Ce=="string"||Ce instanceof yo||Ce instanceof HTMLImageElement||Ce instanceof HTMLCanvasElement||Ce instanceof HTMLVideoElement)&&(he[`${fe}Dimensions`]=de(he,fe))}}}function _e(he){let fe=he._view,Ce=fe.frustumCommandsList,Ee=Ce.length,be,Re,Ne;for(let Je=0;Je<Ee;++Je){let ot=Ee-Je-1,nt=Ce[ot];for(Re=0;Re<nt.commands.length;Re++){let $e=nt.commands[Re];if(Ne=nt.indices[Re],!(H&&Re===hr.GLOBE))for(be=0;be<Ne;++be){let ht=$e[be];ce(ht,he,he._context)}}}}function Be(){U&&(U.destroy(),U=void 0),k&&(k.destroy(),k=void 0),V&&(V.destroy(),V=void 0),R&&(R.destroy(),R=void 0)}function Qe(he,fe,Ce,Ee){let be=fe.width,Re=fe.height;U&&U.width===be&&U.height===Re&&Ce===q||(q=Ce,Be(),U=new yo({context:he,width:be,height:Re,pixelFormat:Gn.RGBA,pixelDatatype:Qn.UNSIGNED_BYTE}),k=new yo({context:he,width:be,height:Re,pixelFormat:Gn.RGBA,pixelDatatype:Qn.UNSIGNED_BYTE}),V=new yo({context:he,width:be,height:Re,pixelFormat:Gn.DEPTH_COMPONENT,pixelDatatype:Qn.UNSIGNED_SHORT,sampler:Hs.NEAREST}),R=new Bp({colorTextures:[U,k],context:he,destroyAttachments:!1,depthTexture:V}))}function Ie(he){E||(Z=Kr.clone(he.viewport,Z),v?(Z.x=Z.width*v.x,Z.y=Z.height*v.y,Z.width*=v.width,Z.height*=v.height):(Z.width*=Q,Z.height*=Q));let fe=Object.assign({},he.passState);return fe.viewport=Z,fe}function ve(he,fe){let Ce=he._us._frameState,Ee=Ce.camera,be=Ee._scene,Re=be._view;try{if(!f&&!m){let Ne=Ie(Re);typeof x=="function"&&x.call(oe,be,fe),Qe(he,Z,be.hdr,Re.sceneFramebuffer),Jze(he,R,Ne)}else{let Ne=Ie(Re);typeof x=="function"&&x.call(oe,be,fe),Qe(he,Z,be.hdr,Re.sceneFramebuffer),_e(be),Jze(he,R,Ne,"renderPass",L,w==="all"||!H||!H._selectedIdTexture?null:W)}}catch(Ne){console.error(Ne)}}function K(){if(!H)return;let he=H.selected||H.parentSelected;if(he.length)return he}function W(he,fe){let Ce=H&&(H.selected||H.parentSelected);if(!H||!Ce||!Ce.length)return!1;if(!he.pickId||he._pickIdQualifier!=="uniform")return!0;let Ee=!0,be=he.owner,Re=w==="selected";if(be&&be.isObject3D){for(let Je=0;Je<Ce.length;Je++)if(Ce[Je]===be)return Re;return!Re}let Ne=he.uniformMap;if(Ne[he.pickId]){let Je=Ne[he.pickId]();Ee=!Re;for(let ot=0;ot<Ce.length;ot++){let nt=Ce[ot],$e=nt.pickId?[nt.pickId]:nt.pickIds||nt._pickIds;for(let ht=0;ht<$e.length;ht++){let ze=$e[ht];if(ze.color===Je||At.equals(ze.color,Je))return Re}}}return Ee}function te(he){if(R){let fe=he._us._frameState.camera._scene._view;ie.framebuffer=R,ie.execute(he,fe.passState),ie.framebuffer=void 0}}function Y(he){if(H&&oe.prevStageUpdate&&(H.update=oe.prevStageUpdate,oe.prevStageUpdate=null,oe.prevStageExecute=null),H=he,!H)return;let fe=H.update;oe.prevStageUpdate=fe,H.update=function(Ce,Ee){if(te(Ce),fe.call(H,Ce,Ee),!!H.enabled)if(!f&&!m)ve(Ce,Ee);else{let be=H.selected||H.parentSelected;be&&be.length&&ve(Ce,Ee)}}}this.update=ve,this.clear=te,Object.defineProperties(this,{texture:{get(){return U}},depthTexture:{get(){return V}},planeDepthTexture:{get(){return k}},stage:{get(){return H},set(he){H!==he&&Y(he)}}})}function LSe(o){let A=[];for(let f in o.defines)if(o.defines.hasOwnProperty(f)){let m=o.defines[f];A.push(`#define ${f}  ${m}`)}return A=`${A.join(`
          }`,gt=new Array($e+1);for(let Et=0;Et<$e;++Et)gt[Et]=Fr.replaceMain(nt[Et],T);gt[$e]=rt,Je=new Fr({sources:gt,defines:Je.defines})}be=he.shaderCache.createDerivedShaderProgram(fe,B,{vertexShaderSource:Je,fragmentShaderSource:Ne,attributeLocations:Re})}return be}function se(he,fe){he._renderPassCache=he._renderPassCache||{},he._renderPassCache[F]=he._renderPassCache[F]||{};let Ce=he._renderPassCache[F],Ee=Ce[fe.id];if(!O(Ee)){let be=fn.getState(fe);typeof y=="function"&&y.call(oe,be),Ee=fn.fromCache(be),Ce[fe.id]=Ee}return Ee}function ce(he,fe,Ce){let Ee=he,be=fe._frameState,Re=he.derivedCommands;if(!O(Re))return;be.useLogDepth&&O(Re.logDepth)&&(he=Re.logDepth.command),Re=he.derivedCommands;let Ne=Re.renderPass;O(Re.renderPass)||(Ne=Re.renderPass={});let Je,ot;if(O(Ne[L])&&(Je=Ne[L].shaderProgram,ot=Ne[L].renderState),Ne[L]=On.shallowClone(he,Ne[L]),!O(Je)||Ne.shaderProgramId!==he.shaderProgram.id){let $e=he.shaderProgram,ht=Ee._pickIdQualifier=new RegExp(`uniform\\s?vec4\\s?${he.pickId}`,"g").test($e._fragmentShaderText)?"uniform":"varying";Ne[L].shaderProgram=ne(Ce,$e,he.pickId,ht),Ne[L].renderState=se(fe,he.renderState),Ne.shaderProgramId=he.shaderProgram.id}else Ne[L].shaderProgram=Je,Ne[L].renderState=ot;let nt=Ne[L].uniformMap;me(nt)}function j(he){return function(){let fe=C[he];return typeof fe=="function"?fe():fe}}function de(he,fe){return function(){let Ce=he[fe]();if(O(Ce))return Ce.dimensions}}function me(he){if(!he.__created&&(he.czm_selectedIdTexture=function(){return H._selectedIdTexture},he.czm_selectedIdTextureWidth=function(){return H._selectedIdTexture?H._selectedIdTexture.width:0},he.czm_selectedIdTextureStep=function(){return H._selectedIdTexture?1/H._selectedIdTexture.width:-1},!!C)){he.__created=!0;for(let fe in C)if(C.hasOwnProperty(fe)){typeof C[fe]!="function"?he[fe]=j(fe):he[fe]=C[fe];let Ce=he[fe]();(typeof Ce=="string"||Ce instanceof yo||Ce instanceof HTMLImageElement||Ce instanceof HTMLCanvasElement||Ce instanceof HTMLVideoElement)&&(he[`${fe}Dimensions`]=de(he,fe))}}}function _e(he){let fe=he._view,Ce=fe.frustumCommandsList,Ee=Ce.length,be,Re,Ne;for(let Je=0;Je<Ee;++Je){let ot=Ee-Je-1,nt=Ce[ot];for(Re=0;Re<nt.commands.length;Re++){let $e=nt.commands[Re];if(Ne=nt.indices[Re],!(H&&Re===hr.GLOBE))for(be=0;be<Ne;++be){let ht=$e[be];ce(ht,he,he._context)}}}}function Be(){U&&(U.destroy(),U=void 0),k&&(k.destroy(),k=void 0),V&&(V.destroy(),V=void 0),R&&(R.destroy(),R=void 0)}function Qe(he,fe,Ce,Ee){let be=fe.width,Re=fe.height;U&&U.width===be&&U.height===Re&&Ce===q||(q=Ce,Be(),U=new yo({context:he,width:be,height:Re,pixelFormat:Gn.RGBA,pixelDatatype:Qn.UNSIGNED_BYTE}),k=new yo({context:he,width:be,height:Re,pixelFormat:Gn.RGBA,pixelDatatype:Qn.UNSIGNED_BYTE}),V=new yo({context:he,width:be,height:Re,pixelFormat:Gn.DEPTH_COMPONENT,pixelDatatype:Qn.UNSIGNED_SHORT,sampler:Hs.NEAREST}),R=new Bp({colorTextures:[U,k],context:he,destroyAttachments:!1,depthTexture:V}))}function Ie(he){E||(Z=Kr.clone(he.viewport,Z),v?(Z.x=Z.width*v.x,Z.y=Z.height*v.y,Z.width*=v.width,Z.height*=v.height):(Z.width*=Q,Z.height*=Q));let fe=Object.assign({},he.passState);return fe.viewport=Z,fe}function ve(he,fe){let Ce=he._us._frameState,Ee=Ce.camera,be=Ee._scene,Re=be._view;try{if(!f&&!m){let Ne=Ie(Re);typeof x=="function"&&x.call(oe,be,fe),Qe(he,Z,be.hdr,Re.sceneFramebuffer),Zze(he,R,Ne)}else{let Ne=Ie(Re);typeof x=="function"&&x.call(oe,be,fe),Qe(he,Z,be.hdr,Re.sceneFramebuffer),_e(be),Zze(he,R,Ne,"renderPass",L,w==="all"||!H||!H._selectedIdTexture?null:W)}}catch(Ne){console.error(Ne)}}function K(){if(!H)return;let he=H.selected||H.parentSelected;if(he.length)return he}function W(he,fe){let Ce=H&&(H.selected||H.parentSelected);if(!H||!Ce||!Ce.length)return!1;if(!he.pickId||he._pickIdQualifier!=="uniform")return!0;let Ee=!0,be=he.owner,Re=w==="selected";if(be&&be.isObject3D){for(let Je=0;Je<Ce.length;Je++)if(Ce[Je]===be)return Re;return!Re}let Ne=he.uniformMap;if(Ne[he.pickId]){let Je=Ne[he.pickId]();Ee=!Re;for(let ot=0;ot<Ce.length;ot++){let nt=Ce[ot],$e=nt.pickId?[nt.pickId]:nt.pickIds||nt._pickIds;for(let ht=0;ht<$e.length;ht++){let ze=$e[ht];if(ze.color===Je||At.equals(ze.color,Je))return Re}}}return Ee}function te(he){if(R){let fe=he._us._frameState.camera._scene._view;ie.framebuffer=R,ie.execute(he,fe.passState),ie.framebuffer=void 0}}function Y(he){if(H&&oe.prevStageUpdate&&(H.update=oe.prevStageUpdate,oe.prevStageUpdate=null,oe.prevStageExecute=null),H=he,!H)return;let fe=H.update;oe.prevStageUpdate=fe,H.update=function(Ce,Ee){if(te(Ce),fe.call(H,Ce,Ee),!!H.enabled)if(!f&&!m)ve(Ce,Ee);else{let be=H.selected||H.parentSelected;be&&be.length&&ve(Ce,Ee)}}}this.update=ve,this.clear=te,Object.defineProperties(this,{texture:{get(){return U}},depthTexture:{get(){return V}},planeDepthTexture:{get(){return k}},stage:{get(){return H},set(he){H!==he&&Y(he)}}})}function VSe(o){let A=[];for(let f in o.defines)if(o.defines.hasOwnProperty(f)){let m=o.defines[f];A.push(`#define ${f}  ${m}`)}return A=`${A.join(`
`)}
`,o.fragmentShader&&(o.fragmentShader=A+o.fragmentShader),o.vertexShader&&(o.vertexShader=A+o.vertexShader),o}var kbi=`
`,o.fragmentShader&&(o.fragmentShader=A+o.fragmentShader),o.vertexShader&&(o.vertexShader=A+o.vertexShader),o}var TQi=`
varying vec2 v_textureCoordinates;
uniform sampler2D colorTexture;
uniform vec2 colorTextureDimensions;
@@ -14573,7 +14579,7 @@
    return 0.39894 * exp( -0.5 * x * x/( sigma * sigma))/sigma;
}
void main() {    vec2 vUv=v_textureCoordinates;
    vec2 invSize = 1.0 / colorTextureDimensions;    float weightSum = gaussianPdf(0.0, kernelRadius);    vec4 diffuseSum = texture2D( colorTexture, vUv) * weightSum;    vec2 delta = direction * invSize * kernelRadius/float(MAX_RADIUS);    vec2 uvOffset = delta;    for( int i = 1; i <= MAX_RADIUS; i ++ ) {        float w = gaussianPdf(uvOffset.x, kernelRadius);        vec4 sample1 = texture2D( colorTexture, vUv + uvOffset);        vec4 sample2 = texture2D( colorTexture, vUv - uvOffset);        diffuseSum += ((sample1 + sample2) * w);        weightSum += (2.0 * w);        uvOffset += delta;    }    gl_FragColor = diffuseSum/weightSum;}`;function pie(o,A,f,m){let C=new Bt(1,0),y=new Bt(0,1),x={defines:{MAX_RADIUS:A},fragmentShader:kbi};LSe(x);let v=new va({name:`${o}_x_direction`,fragmentShader:x.fragmentShader,textureScale:m,forcePowerOfTwo:!0,uniforms:{kernelRadius:f,direction:C},sampleMode:Dv.LINEAR}),E=new va({name:`${o}_y_direction`,fragmentShader:x.fragmentShader,textureScale:m,forcePowerOfTwo:!0,uniforms:{kernelRadius:f,direction:y},sampleMode:Dv.LINEAR});return new CC({name:o,stages:[v,E],inputPreviousStageTexture:!0})}function dH(o,A){A=A||"OutlineEffect";let f=2,m=12*Math.PI/180,C=!1,y=!1,x=At.WHITE.clone(),v=At.RED.clone(),E=Ae(o,!1),I=!1,w=1,Q=3,M=!1,B=new RSe({name:`${A}Pass`,vertexShader:`
    vec2 invSize = 1.0 / colorTextureDimensions;    float weightSum = gaussianPdf(0.0, kernelRadius);    vec4 diffuseSum = texture2D( colorTexture, vUv) * weightSum;    vec2 delta = direction * invSize * kernelRadius/float(MAX_RADIUS);    vec2 uvOffset = delta;    for( int i = 1; i <= MAX_RADIUS; i ++ ) {        float w = gaussianPdf(uvOffset.x, kernelRadius);        vec4 sample1 = texture2D( colorTexture, vUv + uvOffset);        vec4 sample2 = texture2D( colorTexture, vUv - uvOffset);        diffuseSum += ((sample1 + sample2) * w);        weightSum += (2.0 * w);        uvOffset += delta;    }    gl_FragColor = diffuseSum/weightSum;}`;function yie(o,A,f,m){let C=new Bt(1,0),y=new Bt(0,1),x={defines:{MAX_RADIUS:A},fragmentShader:TQi};VSe(x);let v=new va({name:`${o}_x_direction`,fragmentShader:x.fragmentShader,textureScale:m,forcePowerOfTwo:!0,uniforms:{kernelRadius:f,direction:C},sampleMode:Dv.LINEAR}),E=new va({name:`${o}_y_direction`,fragmentShader:x.fragmentShader,textureScale:m,forcePowerOfTwo:!0,uniforms:{kernelRadius:f,direction:y},sampleMode:Dv.LINEAR});return new CC({name:o,stages:[v,E],inputPreviousStageTexture:!0})}function CH(o,A){A=A||"OutlineEffect";let f=2,m=12*Math.PI/180,C=!1,y=!1,x=At.WHITE.clone(),v=At.RED.clone(),E=Ae(o,!1),I=!1,w=1,Q=3,M=!1,B=new HSe({name:`${A}Pass`,vertexShader:`
        //varying vec3 vOutlineNormal;
        void main(){
            // #ifdef HAS_NORMALS
@@ -14768,7 +14774,7 @@
                gl_FragColor =  vec4( visibleEdgeColor + vec3(0.01) , 1. ) * vec4(d);
            }
        }
        `});B.stage=T;let D=pie(`${A}Blur1`,4,1,.75),F=pie(`${A}Blur2`,4,4,.5),L=new CC({name:`${A}BlurComposite`,stages:[T,D,F],inputPreviousStageTexture:!0}),R=new va({name:`${A}Additive`,uniforms:{showGlow:function(){return I},edgeGlow:function(){return w},edgeStrength:function(){return Q},edgeOnly(){return M},maskTexture(){return B.texture},lineTexture:T.name,edgeTexture1:D.name,edgeTexture2:L.name},fragmentShader:`
        `});B.stage=T;let D=yie(`${A}Blur1`,4,1,.75),F=yie(`${A}Blur2`,4,4,.5),L=new CC({name:`${A}BlurComposite`,stages:[T,D,F],inputPreviousStageTexture:!0}),R=new va({name:`${A}Additive`,uniforms:{showGlow:function(){return I},edgeGlow:function(){return w},edgeStrength:function(){return Q},edgeOnly(){return M},maskTexture(){return B.texture},lineTexture:T.name,edgeTexture1:D.name,edgeTexture2:L.name},fragmentShader:`
        uniform sampler2D colorTexture;
        uniform sampler2D edgeTexture1;
        uniform sampler2D edgeTexture2;
@@ -14809,13 +14815,7 @@
              }
            }
        }
        `}),k=new CC({name:`${A}Composite`,stages:[L,R],inputPreviousStageTexture:!1});function U(V){Object.defineProperties(V,{showGlow:{get(){return I},set(H){I=H}},edgeGlow:{get(){return w},set(H){w=H}},edgeStrength:{get(){return Q},set(H){Q=H}},thresholdAngle:{get(){return m},set(H){m=H}},showOutlineOnly:{get(){return y},set(H){y=H}},edgeOnly:{get(){return M},set(H){M=H}},useSingleColor:{get(){return C},set(H){C=H}},outlineWidth:{get(){return f},set(H){f=H}},visibleEdgeColor:{get(){return x},set(H){x=H}},hiddenEdgeColor:{get(){return v},set(H){v=H}}})}return U(k),k._uniforms=k._uniforms||{},U(k._uniforms),k}var Obi=15;function fH(o){this._resource=void 0,this._credit=void 0,this._tilingScheme=void 0,this._levelZeroMaximumGeometricError=void 0,this._maxLevel=void 0,this._terrainDataStructure=void 0,this._ready=!1,this._width=void 0,this._height=void 0,this._encoding=void 0;let A=o.token;this._hasAvailability=!1,this._tilesAvailable=void 0,this._tilesAvailablityLoaded=void 0,this._availableCache={};let f=this,m=Ae(o.ellipsoid,Ti.WGS84);this._readyPromise=Promise.resolve(o.url).then(function(C){let y=An.createIfNeeded(C);return y.appendForwardSlash(),O(A)&&(y=y.getDerivedResource({queryParameters:{token:A}})),f._resource=y,y.getDerivedResource({queryParameters:{f:"pjson"}}).fetchJson()}).then(function(C){let y=C.copyrightText;O(y)&&(f._credit=new tl(y));let x=C.spatialReference,v=Ae(x.latestWkid,x.wkid),E=C.extent,I={ellipsoid:m};if(v===4326)I.rectangle=Si.fromDegrees(E.xmin,E.ymin,E.xmax,E.ymax),f._tilingScheme=new af(I);else if(v===3857){let Q=Math.PI*m.maximumRadius;C.extent.xmax>Q&&(C.extent.xmax=Q),C.extent.ymax>Q&&(C.extent.ymax=Q),C.extent.xmin<-Q&&(C.extent.xmin=-Q),C.extent.ymin<-Q&&(C.extent.ymin=-Q),I.rectangleSouthwestInMeters=new Bt(E.xmin,E.ymin),I.rectangleNortheastInMeters=new Bt(E.xmax,E.ymax),f._tilingScheme=new Am(I)}else return Promise.reject(new nr("Invalid spatial reference"));let w=C.tileInfo;return O(w)?(f._width=w.rows+1,f._height=w.cols+1,f._encoding=w.format==="LERC"?VF.LERC:VF.NONE,f._lodCount=w.lods.length-1,(f._hasAvailability=C.capabilities.indexOf("Tilemap")!==-1)&&(f._tilesAvailable=new $L(f._tilingScheme,f._lodCount),f._tilesAvailable.addAvailableTileRange(0,0,0,f._tilingScheme.getNumberOfXTilesAtLevel(0),f._tilingScheme.getNumberOfYTilesAtLevel(0)),f._tilesAvailablityLoaded=new $L(f._tilingScheme,f._lodCount)),f._levelZeroMaximumGeometricError=Cx.getEstimatedLevelZeroGeometricErrorForAHeightmap(f._tilingScheme.ellipsoid,f._width,f._tilingScheme.getNumberOfXTilesAtLevel(0)),C.bandCount>1&&console.log("ArcGISTiledElevationTerrainProvider: Terrain data has more than 1 band. Using the first one."),O(C.minValues)&&O(C.maxValues)?f._terrainDataStructure={elementMultiplier:1,lowestEncodedHeight:C.minValues[0],highestEncodedHeight:C.maxValues[0]}:f._terrainDataStructure={elementMultiplier:1},f._ready=!0,!0):Promise.reject(new nr("tileInfo is required"))}).catch(function(C){let y=`An error occurred while accessing ${f._resource.url}.`;return wc.reportError(void 0,f,f._errorEvent,y),Promise.reject(C)}),this._errorEvent=new br}Object.defineProperties(fH.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){return this._tilesAvailable}}});fH.prototype.requestTileGeometry=function(o,A,f,m){let C=this._resource.getDerivedResource({url:`tile/${f}/${A}/${o}`,request:m}),y=this._hasAvailability,x=Promise.resolve(!0),v;if(y&&!O(FSe(this,f+1,o*2,A*2))){let Q=Iat(this,f+1,o*2,A*2);x=Q.promise,v=Q.request}let E=C.fetchArrayBuffer();if(!O(E)||!O(x))return;let I=this,w=this._tilesAvailable;return Promise.all([E,x]).then(function(Q){return new bQ({buffer:Q[0],width:I._width,height:I._height,childTileMask:y?w.computeChildMaskForTile(f,o,A):Obi,structure:I._terrainDataStructure,encoding:I._encoding})}).catch(function(Q){return O(v)&&v.state===CA.CANCELLED?(m.cancel(),m.deferred.promise.finally(function(){return m.state=CA.CANCELLED,Promise.reject(Q)})):Promise.reject(Q)})};function FSe(o,A,f,m){if(!o._hasAvailability)return;let C=o._tilesAvailablityLoaded,y=o._tilesAvailable;if(A>o._lodCount)return!1;if(y.isTileAvailable(A,f,m))return!0;if(C.isTileAvailable(A,f,m))return!1}fH.prototype.getLevelMaximumGeometricError=function(o){return this._levelZeroMaximumGeometricError/(1<<o)};fH.prototype.getTileDataAvailable=function(o,A,f){if(!this._hasAvailability)return;let m=FSe(this,f,o,A);if(O(m))return m;Iat(this,f,o,A)};fH.prototype.loadTileDataAvailability=function(o,A,f){};function Ubi(o,A,f,m){let C=A-1,y=f-1,x=m[o.y*A+o.x],v=[],E={startX:o.x,startY:o.y,endX:0,endY:0},I=new Bt(o.x+1,o.y+1),w=!1,Q=!1;for(;!(w&&Q);){let M=I.x,B=Q?I.y+1:I.y;if(!w){for(let T=o.y;T<B;++T)if(m[T*A+I.x]!==x){w=!0;break}w?(v.push(new Bt(I.x,o.y)),--I.x,--M,E.endX=I.x):I.x===C?(E.endX=I.x,w=!0):++I.x}if(!Q){let T=I.y*A;for(let D=o.x;D<=M;++D)if(m[T+D]!==x){Q=!0;break}Q?(v.push(new Bt(o.x,I.y)),--I.y,E.endY=I.y):I.y===y?(E.endY=I.y,Q=!0):++I.y}}return{endingIndices:v,range:E,value:x}}function Gbi(o,A,f,m,C){let y=[];if(C.every(function(v){return v===C[0]}))return C[0]===1&&y.push({startX:o,startY:A,endX:o+f-1,endY:A+m-1}),y;let x=[new Bt(0,0)];for(;x.length>0;){let v=x.pop(),E=Ubi(v,f,m,C);if(E.value===1){let w=E.range;w.startX+=o,w.endX+=o,w.startY+=A,w.endY+=A,y.push(w)}let I=E.endingIndices;I.length>0&&(x=x.concat(I))}return y}function Iat(o,A,f,m){if(!o._hasAvailability)return{};let C=Math.floor(f/128)*128,y=Math.floor(m/128)*128,x=Math.min(1<<A,128),v=`tilemap/${A}/${y}/${C}/${x}/${x}`,E=o._availableCache;if(O(E[v]))return E[v];let I=new cC({throttle:!1,throttleByServer:!0,type:oB.TERRAIN}),w=o._resource.getDerivedResource({url:v,request:I}).fetchJson();return O(w)?(w=w.then(function(Q){let M=Gbi(C,y,x,x,Q.data);o._tilesAvailablityLoaded.addAvailableTileRange(A,C,y,C+x,y+x);let B=o._tilesAvailable;for(let T=0;T<M.length;++T){let D=M[T];B.addAvailableTileRange(A,D.startX,D.startY,D.endX,D.endY)}return FSe(o,A,f,m)}),E[v]={promise:w,request:I},w=w.finally(function(Q){return delete E[v],Q}),{promise:w,request:I}):{}}var _at=fH,mie={};mie.defaultKey=void 0;mie.getKey=function(o){return O(o)?o:mie.defaultKey};var Bat=mie,wat="https://dev.virtualearth.net/REST/v1/Locations";function NSe(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.key;this._key=A;let f={key:A};O(o.culture)&&(f.culture=o.culture),this._resource=new An({url:wat,queryParameters:f})}Object.defineProperties(NSe.prototype,{url:{get:function(){return wat}},key:{get:function(){return this._key}}});NSe.prototype.geocode=function(o){return this._resource.getDerivedResource({queryParameters:{query:o}}).fetchJsonp("jsonp").then(function(A){return A.resourceSets.length===0?[]:A.resourceSets[0].resources.map(function(f){let m=f.bbox,C=m[0],y=m[1],x=m[2],v=m[3];return{displayName:f.name,destination:Si.fromDegrees(y,C,v,x)}})})};var bat=NSe,Hbi=new ai,qze=new ee,KU=new ee;function Vbi(o){let A=o.points,f=o.times;if(A.length<3){let m=f[0],C=1/(f[1]-m),y=A[0],x=A[1];return function(v,E){O(E)||(E=new ee);let I=(v-m)*C;return ee.lerp(y,x,I,E)}}return function(m,C){O(C)||(C=new ee);let y=o._lastTimeIndex=o.findTimeInterval(m,o._lastTimeIndex),x=(m-f[y])/(f[y+1]-f[y]),v=Hbi;v.z=x,v.y=x*x,v.x=v.y*x,v.w=1;let E,I,w,Q,M;return y===0?(E=A[0],I=A[1],w=o.firstTangent,Q=ee.subtract(A[2],E,qze),ee.multiplyByScalar(Q,.5,Q),M=Xe.multiplyByVector(QK.hermiteCoefficientMatrix,v,v)):y===A.length-2?(E=A[y],I=A[y+1],Q=o.lastTangent,w=ee.subtract(I,A[y-1],qze),ee.multiplyByScalar(w,.5,w),M=Xe.multiplyByVector(QK.hermiteCoefficientMatrix,v,v)):(E=A[y-1],I=A[y],w=A[y+1],Q=A[y+2],M=Xe.multiplyByVector(EN.catmullRomCoefficientMatrix,v,v)),C=ee.multiplyByScalar(E,M.x,C),ee.multiplyByScalar(I,M.y,KU),ee.add(C,KU,C),ee.multiplyByScalar(w,M.z,KU),ee.add(C,KU,C),ee.multiplyByScalar(Q,M.w,KU),ee.add(C,KU,C)}}var zbi=new ee,Kbi=new ee;function EN(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.points,f=o.times,m=o.firstTangent,C=o.lastTangent;if(A.length>2&&(O(m)||(m=zbi,ee.multiplyByScalar(A[1],2,m),ee.subtract(m,A[2],m),ee.subtract(m,A[0],m),ee.multiplyByScalar(m,.5,m)),!O(C))){let y=A.length-1;C=Kbi,ee.multiplyByScalar(A[y-1],2,C),ee.subtract(A[y],C,C),ee.add(C,A[y-2],C),ee.multiplyByScalar(C,.5,C)}this._times=f,this._points=A,this._firstTangent=ee.clone(m),this._lastTangent=ee.clone(C),this._evaluateFunction=Vbi(this),this._lastTimeIndex=0}Object.defineProperties(EN.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}},firstTangent:{get:function(){return this._firstTangent}},lastTangent:{get:function(){return this._lastTangent}}});EN.catmullRomCoefficientMatrix=new Xe(-.5,1,-.5,0,1.5,-2.5,0,1,-1.5,2,.5,0,.5,-.5,0,0);EN.prototype.findTimeInterval=uf.prototype.findTimeInterval;EN.prototype.wrapTime=uf.prototype.wrapTime;EN.prototype.clampTime=uf.prototype.clampTime;EN.prototype.evaluate=function(o,A){return this._evaluateFunction(o,A)};var Qat=EN;function WM(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.radius,f={center:o.center,semiMajorAxis:A,semiMinorAxis:A,ellipsoid:o.ellipsoid,height:o.height,extrudedHeight:o.extrudedHeight,granularity:o.granularity,vertexFormat:o.vertexFormat,stRotation:o.stRotation,shadowVolume:o.shadowVolume};this._ellipseGeometry=new W1(f),this._workerName="createCircleGeometry"}WM.packedLength=W1.packedLength;WM.pack=function(o,A,f){return W1.pack(o._ellipseGeometry,A,f)};var Ybi=new W1({center:new ee,semiMajorAxis:1,semiMinorAxis:1}),ix={center:new ee,radius:void 0,ellipsoid:Ti.clone(Ti.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new Wr,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};WM.unpack=function(o,A,f){let m=W1.unpack(o,A,Ybi);return ix.center=ee.clone(m._center,ix.center),ix.ellipsoid=Ti.clone(m._ellipsoid,ix.ellipsoid),ix.height=m._height,ix.extrudedHeight=m._extrudedHeight,ix.granularity=m._granularity,ix.vertexFormat=Wr.clone(m._vertexFormat,ix.vertexFormat),ix.stRotation=m._stRotation,ix.shadowVolume=m._shadowVolume,O(f)?(ix.semiMajorAxis=m._semiMajorAxis,ix.semiMinorAxis=m._semiMinorAxis,f._ellipseGeometry=new W1(ix),f):(ix.radius=m._semiMajorAxis,new WM(ix))};WM.createGeometry=function(o){return W1.createGeometry(o._ellipseGeometry)};WM.createShadowVolume=function(o,A,f){let m=o._ellipseGeometry._granularity,C=o._ellipseGeometry._ellipsoid,y=A(m,C),x=f(m,C);return new WM({center:o._ellipseGeometry._center,radius:o._ellipseGeometry._semiMajorAxis,ellipsoid:C,stRotation:o._ellipseGeometry._stRotation,granularity:m,extrudedHeight:y,height:x,vertexFormat:Wr.POSITION_ONLY,shadowVolume:!0})};Object.defineProperties(WM.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}});var Sat=WM;function K8(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.radius,f={center:o.center,semiMajorAxis:A,semiMinorAxis:A,ellipsoid:o.ellipsoid,height:o.height,extrudedHeight:o.extrudedHeight,granularity:o.granularity,numberOfVerticalLines:o.numberOfVerticalLines};this._ellipseGeometry=new UD(f),this._workerName="createCircleOutlineGeometry"}K8.packedLength=UD.packedLength;K8.pack=function(o,A,f){return UD.pack(o._ellipseGeometry,A,f)};var Jbi=new UD({center:new ee,semiMajorAxis:1,semiMinorAxis:1}),B_={center:new ee,radius:void 0,ellipsoid:Ti.clone(Ti.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,numberOfVerticalLines:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0};K8.unpack=function(o,A,f){let m=UD.unpack(o,A,Jbi);return B_.center=ee.clone(m._center,B_.center),B_.ellipsoid=Ti.clone(m._ellipsoid,B_.ellipsoid),B_.height=m._height,B_.extrudedHeight=m._extrudedHeight,B_.granularity=m._granularity,B_.numberOfVerticalLines=m._numberOfVerticalLines,O(f)?(B_.semiMajorAxis=m._semiMajorAxis,B_.semiMinorAxis=m._semiMinorAxis,f._ellipseGeometry=new UD(B_),f):(B_.radius=m._semiMajorAxis,new K8(B_))};K8.createGeometry=function(o){return UD.createGeometry(o._ellipseGeometry)};var Dat=K8;function gH(o){o=Ae(o,Ae.EMPTY_OBJECT),this._callback=o.callback,this._tilingScheme=o.tilingScheme,O(this._tilingScheme)||(this._tilingScheme=new af({ellipsoid:Ae(o.ellipsoid,Ti.WGS84)})),this._width=o.width,this._height=o.height;let A=Math.max(this._width,this._height);this._levelZeroMaximumGeometricError=Cx.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,A,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._errorEvent=new br;let f=o.credit;typeof f=="string"&&(f=new tl(f)),this._credit=f,this._readyPromise=Promise.resolve(!0)}Object.defineProperties(gH.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}});gH.prototype.requestTileGeometry=function(o,A,f,m){let C=this._callback(o,A,f);if(!O(C))return;let y=this._width,x=this._height;return Promise.resolve(C).then(function(v){let E=v;return Array.isArray(E)&&(E=new Float64Array(E)),new bQ({buffer:E,width:y,height:x})})};gH.prototype.getLevelMaximumGeometricError=function(o){return this._levelZeroMaximumGeometricError/(1<<o)};gH.prototype.getTileDataAvailable=function(o,A,f){};gH.prototype.loadTileDataAvailability=function(o,A,f){};var Tat=gH,Wbi=1953029805,jbi=2917034100;function kSe(o,A){if(kSe.passThroughDataForTesting)return A;let f=o.byteLength;if(f===0||f%4!==0)throw new nr("The length of key must be greater than 0 and a multiple of 4.");let m=new DataView(A),C=m.getUint32(0,!0);if(C===Wbi||C===jbi)return A;let y=new DataView(o),x=0,v=A.byteLength,E=v-v%8,I=f,w,Q=8;for(;x<E;)for(Q=(Q+8)%24,w=Q;x<E&&w<I;)m.setUint32(x,m.getUint32(x,!0)^y.getUint32(w,!0),!0),m.setUint32(x+4,m.getUint32(x+4,!0)^y.getUint32(w+4,!0),!0),x+=8,w+=24;if(x<v)for(w>=I&&(Q=(Q+8)%24,w=Q);x<v;)m.setUint8(x,m.getUint8(x)^y.getUint8(w)),x++,w++}kSe.passThroughDataForTesting=!1;var OSe=kSe;function sQ(o){this._comparator=o.comparator,this._maximumLength=o.maximumLength,this._array=O(o.maximumLength)?new Array(o.maximumLength):[],this._length=0}Object.defineProperties(sQ.prototype,{length:{get:function(){return this._length}},maximumLength:{get:function(){return this._maximumLength},set:function(o){if(O(o)){for(;this._length>o;)this.removeMinimum();this._array.length=o}this._maximumLength=o}},internalArray:{get:function(){return this._array}},comparator:{get:function(){return this._comparator}}});sQ.prototype.clone=function(){let o=this._maximumLength,A=this._comparator,f=this._array,m=this._length,C=new sQ({comparator:A,maximumLength:o});C._length=m;for(let y=0;y<m;y++)C._array[y]=f[y];return C};sQ.prototype.reset=function(){this._length=0;let o=this._maximumLength;if(O(o))for(let A=0;A<o;A++)this._array[A]=void 0;else this._array.length=0};sQ.prototype.resort=function(){let o=this._length;for(let A=0;A<o;A++)Mat(this,A)};sQ.prototype.insert=function(o){let A,f=this._maximumLength;if(O(f)){if(f===0)return;if(this._length===f){let C=this._array[0];if(this._comparator(o,C)<=0)return o;A=this.removeMinimum()}}let m=this._length;return this._array[m]=o,this._length++,Mat(this,m),A};sQ.prototype.removeMinimum=function(){let o=this._length;if(o===0)return;this._length--;let A=this._array[0];return o>=2&&(this._array[0]=this._array[o-1],Pat(this,0)),this._array[o-1]=void 0,A};sQ.prototype.removeMaximum=function(){let o=this._length;if(o===0)return;this._length--;let A;if(o<=2)A=this._array[o-1];else{let f=USe(this,1,2)?1:2;A=this._array[f],this._array[f]=this._array[o-1],o>=4&&Pat(this,f)}return this._array[o-1]=void 0,A};sQ.prototype.getMinimum=function(){if(this._length!==0)return this._array[0]};sQ.prototype.getMaximum=function(){let o=this._length;if(o!==0)return o<=2?this._array[o-1]:this._array[USe(this,1,2)?1:2]};function Cie(o,A,f){let m=o._array,C=m[A];m[A]=m[f],m[f]=C}function L7(o,A,f){return o._comparator(o._array[A],o._array[f])<0}function USe(o,A,f){return o._comparator(o._array[A],o._array[f])>0}function Mat(o,A){if(A===0)return;let f=Math.floor(je.log2(A+1))%2===0,m=Math.floor((A-1)/2),C=L7(o,A,m);for(C!==f&&(Cie(o,A,m),A=m);A>=3;){let y=Math.floor((A-3)/4);if(L7(o,A,y)!==C)break;Cie(o,A,y),A=y}}function Pat(o,A){let f=o._length,m=Math.floor(je.log2(A+1))%2===0,C;for(;(C=2*A+1)<f;){let y=C,x=C+1;if(x<f){L7(o,x,y)===m&&(y=x);let v=2*C+1,E=Math.max(Math.min(f-v,4),0);for(let I=0;I<E;I++){let w=v+I;L7(o,w,y)===m&&(y=w)}}if(L7(o,y,A)===m&&(Cie(o,y,A),y!==C&&y!==x)){let v=Math.floor((y-1)/2);USe(o,y,v)===m&&Cie(o,y,v)}A=y}}var Rat=sQ;function Lat(){}Lat.prototype.geocode=Ui.throwInstantiationError;var Fat=Lat;function Nat(){Ui.throwInstantiationError()}Nat.createGeometry=function(o){Ui.throwInstantiationError()};var kat=Nat,qbi=xh(E7e(),1);function Xbi(o,A){return(o&A)!==0}var q_=Xbi,Zbi=[1,2,4,8],Oat=15,$bi=16,eQi=64,tQi=128;function JD(o,A,f,m,C,y){this._bits=o,this.cnodeVersion=A,this.imageryVersion=f,this.terrainVersion=m,this.imageryProvider=C,this.terrainProvider=y,this.ancestorHasTerrain=!1,this.terrainState=void 0}JD.clone=function(o,A){return O(A)?(A._bits=o._bits,A.cnodeVersion=o.cnodeVersion,A.imageryVersion=o.imageryVersion,A.terrainVersion=o.terrainVersion,A.imageryProvider=o.imageryProvider,A.terrainProvider=o.terrainProvider):A=new JD(o._bits,o.cnodeVersion,o.imageryVersion,o.terrainVersion,o.imageryProvider,o.terrainProvider),A.ancestorHasTerrain=o.ancestorHasTerrain,A.terrainState=o.terrainState,A};JD.prototype.setParent=function(o){this.ancestorHasTerrain=o.ancestorHasTerrain||this.hasTerrain()};JD.prototype.hasSubtree=function(){return q_(this._bits,$bi)};JD.prototype.hasImagery=function(){return q_(this._bits,eQi)};JD.prototype.hasTerrain=function(){return q_(this._bits,tQi)};JD.prototype.hasChildren=function(){return q_(this._bits,Oat)};JD.prototype.hasChild=function(o){return q_(this._bits,Zbi[o])};JD.prototype.getChildBitmask=function(){return this._bits&Oat};var GSe=JD;function iQi(o){let A=o.length,f=new ArrayBuffer(A),m=new Uint8Array(f);for(let C=0;C<A;++C)m[C]=o.charCodeAt(C);return f}var rQi=iQi(`E\xF4\xBD\vy\xE2jE"\x92,\xCDq\xF8IFgQ\0B%\xC6\xE8a,f)\b\xC64\xDCjb%y
wmi\xD6\xF0\x9Ck\x93\xA1\xBDNu\xE0A[\xDF@V\f\xD9\xBBr\x9B\x81|3S\xEEOl\xD4q\xB0{\xC0\x7FEVZ\xADwUe\v3\x92*\xACl5\xC50s\xF83>mF8J\xB4\xDD\xF0.\xDDu\xDA\x8CDt"\xFAa"\f3"So\xAF9D\v\x8C9\xD99L\xB9\xBF\x7F\xAB\\\x8CP_\x9F"ux\xE9\x07q\x91h;\xC1\xC4\x9B\x7F\xF0<VqH\x82'UfYNe\x98u\xA3aF}a?A\0\x9F\xD7\xB44M\xCE\x87F\xB0\xD5\xB8\x8A'{\x8B\xDC+\xBBMg0\xC8\xD1\xF6\\\x8FP\xFA[/F\x9Bn5/'C.\xEB
\f^\xA5s\x1Be4\xE5l.jC'c#U\xA9?q{gC}:\xAF\xCD\xE2TU\x9C\xFDK\xC6\xE2\x9F/(\xED\xCB\\\xC6-f\x07\x88\xA7;/*"N\xB0k.\xDD\r\x95}}G\xBAC\xB2\xB2+>M\xAA>}\xE6\xCEI\x89\xC6\xE6x\fa1-\xA4O\xA5~q \x88\xEC\r1\xE8N\v\0nPh}=\b\r\x95\xA6n\xA3h\x97$[k\xF3#\xF3\xB6s\xB3\r\v@\xC0\x9F\xD8Q]\xFA".j\xDFI\0\xB9\xA0wU\xC6\xEFj\xBF{GL\x7F\x83\xEE\xDC\xDCF\x85\xA9\xADS\x07+S4\x07\xFF\x94Y\xE48\xE81\x83N\xB9XFk\xCB-#\x86\x92p\x005\x88"\xCF1\xB2&/\xE7\xC3u-6,rt\xB0#G\xB7\xD3\xD1&\x857r\xE2\0\x8CD\xCF\xDA3-\xDE\`\x86i#i*|\xCDKQ\r\x95T9w.)\xEA\x1B\xA6P\xA2j\x8FoP\x99\\>T\xFB\xEFP[\v\x07E\x89m(w7\xDB\x8EJfJo\x99 \xE5p\xE2\xB9q~\fmI-z\xFEr\xC7\xF2Y0\x8F\xBB]s\xE5\xC9 \xEAx\xEC \x90\xF0\x8A\x7FB|G\`\xB0\xBD&\xB7q\xB6\xC7\x9F\xD13\x82=\xD3\xAB\xEEc\x99\xC8+S\xA0D\\q\xC6\xCCD2O<\xCA\xC0)=R\xD3aX\xA9}e\xB4\xDC\xCF\r\xF4=\xF1\b\xA9B\xDA#   \xD8\xBF^PI\xF8M\xC0\xCBGLO\xF7{+\xD8\xC51\x92;\xB5o\xDCl\r\x92\x88\xD1\x9E\xDB?\xE2\xE9\xDA_\xD4\x84\xE2FaZ\xDEU\xCF\xA4\0\xBE\xFD\xCEg\xF1Ji\x97\xE6 H\xD8]\x7F~\xAEq N\xAE\xC0V\xA9\x91<\x82r\xE7v\xEC)I\xD6]-\x83\xE3\xDB6\xA9;f\x97\x87j\xD5\xB6=P^R\xB9K\xC7sWx\xC9\xF4.Y\x07\x95\x93o\xD0KW>''\xC7\`\xDB;\xED\x9ASD>?\x8D\x92mw\xA2
\xEB?R\xA8\xC6U^1I7\x85\xF4\xC5&-\xA9\xBF\x8B'T\xDA\xC3j \xE5*x\xB0\xD6\x90pr\xAA\x8Bh\xBD\x88\xF7_H\xB1~\xC0XL?f\xF9>\xE1e\xC0p\xA7\xCF8i\xAF\xF0VldI\x9C'\xADxtO\xC2\x87\xDEV9\0\xDAw\v\xCB-\x1B\x89\xFB5O\xF5\bQ\`\xC1
ZGM&30x\xDA\xC0\x9CFG\xE2[y\`In7gS
>\xE9\xECF9\xB2\xF14\r\xC6\x84Sun\xE1\fY\xD9\xDE)\x85{II\xA5wy\xBEIV.6\xE7\v:\xBBOb{\xD2M1\x95/\xBD8{\xA8O!\xE1\xECFpv\x95})"x\x88
\x90\xDD\x9D\\\xDA\xDEQ\xCF\xF0\xFCYRe|3\xDF\xF3H\xDA\xBB*u\xDB\`\xB2\xD4\xFC\xED\x1B\xEC\x7F5\xA8\xFF(1\x07-\xC8\xDC\x88F|\x8A["`);function lQ(o){let A=o;typeof A!="string"&&!(A instanceof An)&&(A=o.url);let f=An.createIfNeeded(A);f.appendForwardSlash(),this._resource=f,this.imageryPresent=!0,this.protoImagery=void 0,this.terrainPresent=!0,this.negativeAltitudeExponentBias=32,this.negativeAltitudeThreshold=je.EPSILON12,this.providers={},this.key=void 0,this._quadPacketVersion=1,this._tileInfo={},this._subtreePromises={};let m=this;this._readyPromise=nQi(this).then(function(){return m.getQuadTreePacket("",m._quadPacketVersion)}).then(function(){return!0}).catch(function(C){let y=`An error occurred while accessing ${Gat(m,"",1).url}.`;return Promise.reject(new nr(y))})}Object.defineProperties(lQ.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},resource:{get:function(){return this._resource}},readyPromise:{get:function(){return this._readyPromise}}});lQ.tileXYToQuadKey=function(o,A,f){let m="";for(let C=f;C>=0;--C){let y=1<<C,x=0;q_(A,y)?q_(o,y)&&(x|=1):(x|=2,q_(o,y)||(x|=1)),m+=x}return m};lQ.quadKeyToTileXY=function(o){let A=0,f=0,m=o.length-1;for(let C=m;C>=0;--C){let y=1<<C,x=+o[m-C];q_(x,2)?q_(x,1)||(A|=y):(f|=y,q_(x,1)&&(A|=y))}return{x:A,y:f,level:m}};lQ.prototype.isValid=function(o){let A=this.getTileInformationFromQuadKey(o);if(O(A))return A!==null;let f=!0,m=o,C;for(;m.length>1;)if(C=m.substring(m.length-1),m=m.substring(0,m.length-1),A=this.getTileInformationFromQuadKey(m),O(A)){!A.hasSubtree()&&!A.hasChild(parseInt(C))&&(f=!1);break}else if(A===null){f=!1;break}return f};var Uat=new Vf("decodeGoogleEarthEnterprisePacket");lQ.prototype.getQuadTreePacket=function(o,A,f){A=Ae(A,1),o=Ae(o,"");let m=Gat(this,o,A,f).fetchArrayBuffer();if(!O(m))return;let C=this._tileInfo,y=this.key;return m.then(function(x){return Uat.scheduleTask({buffer:x,quadKey:o,type:"Metadata",key:y},[x]).then(function(v){let E,I=-1;if(o!==""){I=o.length+1;let M=v[o];E=C[o],E._bits|=M._bits,delete v[o]}let w=Object.keys(v);w.sort(function(M,B){return M.length-B.length});let Q=w.length;for(let M=0;M<Q;++M){let B=w[M];if(v[B]!==null){let T=GSe.clone(v[B]),D=B.length;if(D===I)T.setParent(E);else if(D>1){let F=C[B.substring(0,B.length-1)];T.setParent(F)}C[B]=T}else C[B]=null}})})};lQ.prototype.populateSubtree=function(o,A,f,m){let C=lQ.tileXYToQuadKey(o,A,f);return Ime(this,C,m)};function Ime(o,A,f){let m=o._tileInfo,C=A,y=m[C];if(O(y)&&(!y.hasSubtree()||y.hasChildren()))return y;for(;y===void 0&&C.length>1;)C=C.substring(0,C.length-1),y=m[C];let x,v=o._subtreePromises,E=v[C];if(O(E))return E.then(function(){return x=new cC({throttle:f.throttle,throttleByServer:f.throttleByServer,type:f.type,priorityFunction:f.priorityFunction}),Ime(o,A,x)});if(!O(y)||!y.hasSubtree())return Promise.reject(new nr(`Couldn't load metadata for tile ${A}`));if(E=o.getQuadTreePacket(C,y.cnodeVersion,f),!!O(E))return v[C]=E,E.then(function(){return x=new cC({throttle:f.throttle,throttleByServer:f.throttleByServer,type:f.type,priorityFunction:f.priorityFunction}),Ime(o,A,x)}).finally(function(){delete v[C]})}lQ.prototype.getTileInformation=function(o,A,f){let m=lQ.tileXYToQuadKey(o,A,f);return this._tileInfo[m]};lQ.prototype.getTileInformationFromQuadKey=function(o){return this._tileInfo[o]};function Gat(o,A,f,m){return o._resource.getDerivedResource({url:`flatfile?q2-0${A}-q.${f.toString()}`,request:m})}var qge,Xge;function nQi(o){let A=o._resource.getDerivedResource({url:"dbRoot.v5",queryParameters:{output:"proto"}});if(!O(Xge)){let f=xs("ThirdParty/google-earth-dbroot-parser.js"),m=window.cesiumGoogleEarthDbRootParser;Xge=Nie(f).then(function(){qge=window.cesiumGoogleEarthDbRootParser(qbi),O(m)?window.cesiumGoogleEarthDbRootParser=m:delete window.cesiumGoogleEarthDbRootParser})}return Xge.then(function(){return A.fetchArrayBuffer()}).then(function(f){let m=qge.EncryptedDbRootProto.decode(new Uint8Array(f)),C=m.encryptionData,y=C.byteOffset,x=y+C.byteLength,v=o.key=C.buffer.slice(y,x);C=m.dbrootData,y=C.byteOffset,x=y+C.byteLength;let E=C.buffer.slice(y,x);return Uat.scheduleTask({buffer:E,type:"DbRoot",key:v},[E])}).then(function(f){let m=qge.DbRootProto.decode(new Uint8Array(f.buffer));if(o.imageryPresent=Ae(m.imageryPresent,o.imageryPresent),o.protoImagery=m.protoImagery,o.terrainPresent=Ae(m.terrainPresent,o.terrainPresent),O(m.endSnippet)&&O(m.endSnippet.model)){let v=m.endSnippet.model;o.negativeAltitudeExponentBias=Ae(v.negativeAltitudeExponentBias,o.negativeAltitudeExponentBias),o.negativeAltitudeThreshold=Ae(v.compressedNegativeAltitudeThreshold,o.negativeAltitudeThreshold)}O(m.databaseVersion)&&(o._quadPacketVersion=Ae(m.databaseVersion.quadtreeVersion,o._quadPacketVersion));let C=o.providers,y=Ae(m.providerInfo,[]),x=y.length;for(let v=0;v<x;++v){let E=y[v],I=E.copyrightString;O(I)&&(C[E.providerId]=new tl(I.value))}}).catch(function(){console.log(`Failed to retrieve ${A.url}. Using defaults.`),o.key=rQi})}var IN=lQ;function wO(o){o=Ae(o,Ae.EMPTY_OBJECT),this._buffer=o.buffer,this._credits=o.credits,this._negativeAltitudeExponentBias=o.negativeAltitudeExponentBias,this._negativeElevationThreshold=o.negativeElevationThreshold;let A=Ae(o.childTileMask,15),f=A&3;f|=A&4?8:0,f|=A&8?4:0,this._childTileMask=f,this._createdByUpsampling=Ae(o.createdByUpsampling,!1),this._skirtHeight=void 0,this._bufferType=this._buffer.constructor,this._mesh=void 0,this._minimumHeight=void 0,this._maximumHeight=void 0}Object.defineProperties(wO.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){}}});var Hat="createVerticesFromGoogleEarthEnterpriseBuffer",oQi=new Vf(Hat),aQi=new Vf(Hat,AO.maximumAsynchronousTasks),Xze=new Si,Zge=new Si;wO.prototype.createMesh=function(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.tilingScheme,f=o.x,m=o.y,C=o.level,y=Ae(o.exaggeration,1),x=Ae(o.exaggerationRelativeHeight,0),v=Ae(o.throttle,!0),E=A.ellipsoid;A.tileXYToNativeRectangle(f,m,C,Xze),A.tileXYToRectangle(f,m,C,Zge);let I=E.cartographicToCartesian(Si.center(Zge)),w=40075.16/(1<<C);this._skirtHeight=Math.min(w*8,1e3);let Q=(v?aQi:oQi).scheduleTask({buffer:this._buffer,nativeRectangle:Xze,rectangle:Zge,relativeToCenter:I,ellipsoid:E,skirtHeight:this._skirtHeight,exaggeration:y,exaggerationRelativeHeight:x,includeWebMercatorT:!0,negativeAltitudeExponentBias:this._negativeAltitudeExponentBias,negativeElevationThreshold:this._negativeElevationThreshold});if(!O(Q))return;let M=this;return Q.then(function(B){return M._mesh=new hO(I,new Float32Array(B.vertices),new Uint16Array(B.indices),B.indexCountWithoutSkirts,B.vertexCountWithoutSkirts,B.minimumHeight,B.maximumHeight,wi.clone(B.boundingSphere3D),ee.clone(B.occludeePointInScaledSpace),B.numberOfAttributes,Hf.clone(B.orientedBoundingBox),HM.clone(B.encoding),B.westIndicesSouthToNorth,B.southIndicesEastToWest,B.eastIndicesNorthToSouth,B.northIndicesWestToEast),M._minimumHeight=B.minimumHeight,M._maximumHeight=B.maximumHeight,M._buffer=void 0,M._mesh})};wO.prototype.interpolateHeight=function(o,A,f){let m=je.clamp((A-o.west)/o.width,0,1),C=je.clamp((f-o.south)/o.height,0,1);return O(this._mesh)?AQi(this,m,C):fQi(this,m,C,o)};var sQi=new Vf("upsampleQuantizedTerrainMesh",AO.maximumAsynchronousTasks);wO.prototype.upsample=function(o,A,f,m,C,y,x){let v=this._mesh;if(!O(this._mesh))return;let E=A*2!==C,I=f*2===y,w=o.ellipsoid,Q=o.tileXYToRectangle(C,y,x),M=sQi.scheduleTask({vertices:v.vertices,indices:v.indices,indexCountWithoutSkirts:v.indexCountWithoutSkirts,vertexCountWithoutSkirts:v.vertexCountWithoutSkirts,encoding:v.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,isEastChild:E,isNorthChild:I,childRectangle:Q,ellipsoid:w});if(!O(M))return;let B=this;return M.then(function(T){let D=new Uint16Array(T.vertices),F=Nn.createTypedArray(D.length/3,T.indices),L=B._skirtHeight;return new coe({quantizedVertices:D,indices:F,minimumHeight:T.minimumHeight,maximumHeight:T.maximumHeight,boundingSphere:wi.clone(T.boundingSphere),orientedBoundingBox:Hf.clone(T.orientedBoundingBox),horizonOcclusionPoint:ee.clone(T.horizonOcclusionPoint),westIndices:T.westIndices,southIndices:T.southIndices,eastIndices:T.eastIndices,northIndices:T.northIndices,westSkirtHeight:L,southSkirtHeight:L,eastSkirtHeight:L,northSkirtHeight:L,childTileMask:0,createdByUpsampling:!0,credits:B._credits})})};wO.prototype.isChildAvailable=function(o,A,f,m){let C=2;return f!==o*2&&++C,m!==A*2&&(C-=2),(this._childTileMask&1<<C)!==0};wO.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var lQi=new Bt,uQi=new Bt,cQi=new Bt,Vat=new ee;function AQi(o,A,f){let m=o._mesh,C=m.vertices,y=m.encoding,x=m.indices;for(let v=0,E=x.length;v<E;v+=3){let I=x[v],w=x[v+1],Q=x[v+2],M=y.decodeTextureCoordinates(C,I,lQi),B=y.decodeTextureCoordinates(C,w,uQi),T=y.decodeTextureCoordinates(C,Q,cQi),D=Z6.computeBarycentricCoordinates(A,f,M.x,M.y,B.x,B.y,T.x,T.y,Vat);if(D.x>=-1e-15&&D.y>=-1e-15&&D.z>=-1e-15){let F=y.decodeHeight(C,I),L=y.decodeHeight(C,w),R=y.decodeHeight(C,Q);return D.x*F+D.y*L+D.z*R}}}var hQi=Uint16Array.BYTES_PER_ELEMENT,Zze=Uint32Array.BYTES_PER_ELEMENT,$ge=Int32Array.BYTES_PER_ELEMENT,dQi=Float32Array.BYTES_PER_ELEMENT,e0e=Float64Array.BYTES_PER_ELEMENT;function fQi(o,A,f,m){let C=o._buffer,y=0,x=0,v=0;f>.5?(A>.5?(y=2,x=.5):y=3,v=.5):A>.5&&(y=1,x=.5);let E=new DataView(C),I=0;for(let V=0;V<y;++V)I+=E.getUint32(I,!0),I+=Zze;I+=Zze,I+=2*e0e;let w=je.toRadians(E.getFloat64(I,!0)*180);I+=e0e;let Q=je.toRadians(E.getFloat64(I,!0)*180);I+=e0e;let M=m.width/w/2,B=m.height/Q/2,T=E.getInt32(I,!0);I+=$ge;let D=E.getInt32(I,!0)*3;I+=$ge,I+=$ge;let F=new Array(T),L=new Array(T),R=new Array(T),k;for(k=0;k<T;++k)F[k]=x+E.getUint8(I++)*M,L[k]=v+E.getUint8(I++)*B,R[k]=E.getFloat32(I,!0)*6371010,I+=dQi;let U=new Array(D);for(k=0;k<D;++k)U[k]=E.getUint16(I,!0),I+=hQi;for(k=0;k<D;k+=3){let V=U[k],H=U[k+1],q=U[k+2],ie=F[V],Z=F[H],oe=F[q],ne=L[V],se=L[H],ce=L[q],j=Z6.computeBarycentricCoordinates(A,f,ie,ne,Z,se,oe,ce,Vat);if(j.x>=-1e-15&&j.y>=-1e-15&&j.z>=-1e-15)return j.x*R[V]+j.y*R[H]+j.z*R[q]}}var yie=wO,I1={UNKNOWN:0,NONE:1,SELF:2,PARENT:3},R$=new fi;function dae(){this._terrainCache={},this._lastTidy=fi.now()}dae.prototype.add=function(o,A){this._terrainCache[o]={buffer:A,timestamp:fi.now()}};dae.prototype.get=function(o){let A=this._terrainCache[o];if(O(A))return delete this._terrainCache[o],A.buffer};dae.prototype.tidy=function(){if(fi.now(R$),fi.secondsDifference(R$,this._lastTidy)>10){let o=this._terrainCache,A=Object.keys(o),f=A.length;for(let m=0;m<f;++m){let C=A[m],y=o[C];fi.secondsDifference(R$,y.timestamp)>10&&delete o[C]}fi.clone(R$,this._lastTidy)}};function pH(o){o=Ae(o,Ae.EMPTY_OBJECT);let A;if(O(o.metadata))A=o.metadata;else{let y=An.createIfNeeded(o.url);A=new IN(y)}this._metadata=A,this._tilingScheme=new af({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new Si(-je.PI,-je.PI,je.PI,je.PI),ellipsoid:o.ellipsoid});let f=o.credit;typeof f=="string"&&(f=new tl(f)),this._credit=f,this._levelZeroMaximumGeometricError=40075.16,this._terrainCache=new dae,this._terrainPromises={},this._terrainRequests={},this._errorEvent=new br,this._ready=!1;let m=this,C;this._readyPromise=A.readyPromise.then(function(y){if(!A.terrainPresent){let x=new nr(`The server ${A.url} doesn't have terrain`);return C=wc.reportError(C,m,m._errorEvent,x.message,void 0,void 0,void 0,x),Promise.reject(x)}return wc.reportSuccess(C),m._ready=y,y}).catch(function(y){return C=wc.reportError(C,m,m._errorEvent,y.message,void 0,void 0,void 0,y),Promise.reject(y)})}Object.defineProperties(pH.prototype,{url:{get:function(){return this._metadata.url}},proxy:{get:function(){return this._metadata.proxy}},tilingScheme:{get:function(){return this._tilingScheme}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}});var gQi=new Vf("decodeGoogleEarthEnterprisePacket");function $ze(o,A,f){let m=A.getChildBitmask();if(A.terrainState===I1.PARENT){m=0;for(let C=0;C<4;++C){let y=f.getTileInformationFromQuadKey(o+C.toString());O(y)&&y.hasTerrain()&&(m|=1<<C)}}return m}pH.prototype.requestTileGeometry=function(o,A,f,m){let C=IN.tileXYToQuadKey(o,A,f),y=this._terrainCache,x=this._metadata,v=x.getTileInformationFromQuadKey(C);if(!O(v))return Promise.reject(new nr("Terrain tile doesn't exist"));let E=v.terrainState;O(E)||(E=v.terrainState=I1.UNKNOWN);let I=y.get(C);if(O(I)){let L=x.providers[v.terrainProvider];return Promise.resolve(new yie({buffer:I,childTileMask:$ze(C,v,x),credits:O(L)?[L]:void 0,negativeAltitudeExponentBias:x.negativeAltitudeExponentBias,negativeElevationThreshold:x.negativeAltitudeThreshold}))}if(y.tidy(),v.ancestorHasTerrain){if(E===I1.NONE)return Promise.reject(new nr("Terrain tile doesn't exist"))}else return Promise.resolve(new bQ({buffer:new Uint8Array(16*16),width:16,height:16}));let w,Q=C,M=-1;switch(E){case I1.SELF:M=v.terrainVersion;break;case I1.PARENT:Q=Q.substring(0,Q.length-1),w=x.getTileInformationFromQuadKey(Q),M=w.terrainVersion;break;case I1.UNKNOWN:v.hasTerrain()?M=v.terrainVersion:(Q=Q.substring(0,Q.length-1),w=x.getTileInformationFromQuadKey(Q),O(w)&&w.hasTerrain()&&(M=w.terrainVersion));break}if(M<0)return Promise.reject(new nr("Terrain tile doesn't exist"));let B=this._terrainPromises,T=this._terrainRequests,D,F;if(O(B[Q]))D=B[Q],F=T[Q];else{F=m;let L=pQi(this,Q,M,F).fetchArrayBuffer();if(!O(L))return;D=L.then(function(R){return O(R)?gQi.scheduleTask({buffer:R,type:"Terrain",key:x.key},[R]).then(function(k){let U=x.getTileInformationFromQuadKey(Q);U.terrainState=I1.SELF,y.add(Q,k[0]);let V=U.terrainProvider,H=k.length-1;for(let q=0;q<H;++q){let ie=Q+q.toString(),Z=x.getTileInformationFromQuadKey(ie);O(Z)&&(y.add(ie,k[q+1]),Z.terrainState=I1.PARENT,Z.terrainProvider===0&&(Z.terrainProvider=V))}}):Promise.reject(new nr("Failed to load terrain."))}),B[Q]=D,T[Q]=F,D=D.finally(function(){delete B[Q],delete T[Q]})}return D.then(function(){let L=y.get(C);if(O(L)){let R=x.providers[v.terrainProvider];return new yie({buffer:L,childTileMask:$ze(C,v,x),credits:O(R)?[R]:void 0,negativeAltitudeExponentBias:x.negativeAltitudeExponentBias,negativeElevationThreshold:x.negativeAltitudeThreshold})}return Promise.reject(new nr("Failed to load terrain."))}).catch(function(L){return F.state===CA.CANCELLED?(m.state=F.state,Promise.reject(L)):(v.terrainState=I1.NONE,Promise.reject(L))})};pH.prototype.getLevelMaximumGeometricError=function(o){return this._levelZeroMaximumGeometricError/(1<<o)};pH.prototype.getTileDataAvailable=function(o,A,f){let m=this._metadata,C=IN.tileXYToQuadKey(o,A,f),y=m.getTileInformation(o,A,f);if(y===null)return!1;if(O(y)){if(!y.ancestorHasTerrain)return!0;let x=y.terrainState;if(x===I1.NONE)return!1;if((!O(x)||x===I1.UNKNOWN)&&(y.terrainState=I1.UNKNOWN,!y.hasTerrain())){C=C.substring(0,C.length-1);let v=m.getTileInformationFromQuadKey(C);if(!O(v)||!v.hasTerrain())return!1}return!0}if(m.isValid(C)){let x=new cC({throttle:!1,throttleByServer:!0,type:oB.TERRAIN});m.populateSubtree(o,A,f,x)}return!1};pH.prototype.loadTileDataAvailability=function(o,A,f){};function pQi(o,A,f,m){return f=O(f)&&f>0?f:1,o._metadata.resource.getDerivedResource({url:`flatfile?f1c-0${A}-t.${f.toString()}`,request:m})}var zat=pH,nW={};nW.type=void 0;nW.getRequiredDataPoints=Ui.throwInstantiationError;nW.interpolateOrderZero=Ui.throwInstantiationError;nW.interpolate=Ui.throwInstantiationError;var Kat=nW,mQi=new Vf("transcodeCRNToDXT",Number.POSITIVE_INFINITY);function CQi(o){let A;if(o instanceof ArrayBuffer||ArrayBuffer.isView(o)?A=Promise.resolve(o):A=An.createIfNeeded(o).fetchArrayBuffer(),!!O(A))return A.then(function(f){if(!O(f))return;let m=[];return f instanceof ArrayBuffer?m.push(f):(f.byteOffset===0&&f.byteLength===f.buffer.byteLength||(f=f.slice(0,f.length)),m.push(f.buffer)),mQi.scheduleTask(f,m)}).then(function(f){return rY.clone(f)})}var Yat=CQi,$k={};$k.defaultAccessToken=void 0;var e7e=!1,t0e,Jat="<b>This application is using Cesium's default Mapbox access token.  Please create a new access token for the application as soon as possible and prior to deployment by visiting <a href=https://www.mapbox.com/account/apps/>https://www.mapbox.com/account/apps/</a>, and provide your token to Cesium by setting the Cesium.MapboxApi.defaultAccessToken property before constructing the CesiumWidget or any other object that uses the Mapbox API.</b>";$k.getAccessToken=function(o){return O(o)?o:O($k.defaultAccessToken)?$k.defaultAccessToken:(e7e||(console.log(Jat),e7e=!0),"pk.eyJ1IjoiYW5hbHl0aWNhbGdyYXBoaWNzIiwiYSI6ImNpd204Zm4wejAwNzYyeW5uNjYyZmFwdWEifQ.7i-VIZZWX8pd1bTfxIVj9g")};$k.getErrorCredit=function(o){if(!(O(o)||O($k.defaultAccessToken)))return O(t0e)||(t0e=new tl(Jat,!0)),t0e};var Wat=$k;function fae(){Ui.throwInstantiationError()}Object.defineProperties(fae.prototype,{ellipsoid:{get:Ui.throwInstantiationError}});fae.prototype.project=Ui.throwInstantiationError;fae.prototype.unproject=Ui.throwInstantiationError;var jat=fae;function mH(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.weights,f=o.times;this._times=f,this._weights=A,this._count=A.length/f.length,this._lastTimeIndex=0}Object.defineProperties(mH.prototype,{times:{get:function(){return this._times}},weights:{get:function(){return this._weights}}});mH.prototype.findTimeInterval=uf.prototype.findTimeInterval;mH.prototype.wrapTime=uf.prototype.wrapTime;mH.prototype.clampTime=uf.prototype.clampTime;mH.prototype.evaluate=function(o,A){let f=this.weights,m=this.times,C=this._lastTimeIndex=this.findTimeInterval(o,this._lastTimeIndex),y=(o-m[C])/(m[C+1]-m[C]);O(A)||(A=new Array(this._count));for(let x=0;x<this._count;x++){let v=C*this._count+x;A[x]=f[v]*(1-y)+f[v+this._count]*y}return A};var qat=mH;function HSe(o,A,f){o=An.createIfNeeded(o),o.appendForwardSlash(),o.setQueryParameters({key:A}),this._url=o,this._params=Ae(f,{})}Object.defineProperties(HSe.prototype,{url:{get:function(){return this._url}},params:{get:function(){return this._params}}});HSe.prototype.geocode=function(o){return this._url.getDerivedResource({url:"json",queryParameters:ia(this._params,{q:o})}).fetchJson().then(function(A){return A.results.map(function(f){let m,C=f.bounds;if(O(C))m=Si.fromDegrees(C.southwest.lng,C.southwest.lat,C.northeast.lng,C.northeast.lat);else{let y=f.geometry.lat,x=f.geometry.lng;m=ee.fromDegrees(y,x)}return{displayName:f.formatted,destination:m}})})};var Xat=HSe,yQi={packedLength:void 0,pack:Ui.throwInstantiationError,unpack:Ui.throwInstantiationError},Zat=yQi,xQi={packedInterpolationLength:void 0,convertPackedArrayForInterpolation:Ui.throwInstantiationError,unpackInterpolationResult:Ui.throwInstantiationError},$at=xQi,vQi=new ee;function EQi(o,A,f,m){let C=cre(o,A,f,m,vQi);return O(C)?C.x>0&&C.y>0&&C.z>0:!1}var est=EQi;function tst(){Ui.throwInstantiationError()}tst.prototype.getURL=Ui.throwInstantiationError;var ist=tst;function IQi(o,A,f,m,C,y,x){let v=jA.numberOfPoints(o,A,C),E,I=f.red,w=f.green,Q=f.blue,M=f.alpha,B=m.red,T=m.green,D=m.blue,F=m.alpha;if(At.equals(f,m)){for(E=0;E<v;E++)y[x++]=At.floatToByte(I),y[x++]=At.floatToByte(w),y[x++]=At.floatToByte(Q),y[x++]=At.floatToByte(M);return x}let L=(B-I)/v,R=(T-w)/v,k=(D-Q)/v,U=(F-M)/v,V=x;for(E=0;E<v;E++)y[V++]=At.floatToByte(I+E*L),y[V++]=At.floatToByte(w+E*R),y[V++]=At.floatToByte(Q+E*k),y[V++]=At.floatToByte(M+E*U);return V}function JK(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.positions,f=o.colors,m=Ae(o.colorsPerVertex,!1);this._positions=A,this._colors=f,this._colorsPerVertex=m,this._arcType=Ae(o.arcType,Pa.GEODESIC),this._granularity=Ae(o.granularity,je.RADIANS_PER_DEGREE),this._ellipsoid=Ae(o.ellipsoid,Ti.WGS84),this._workerName="createSimplePolylineGeometry";let C=1+A.length*ee.packedLength;C+=O(f)?1+f.length*At.packedLength:1,this.packedLength=C+Ti.packedLength+3}JK.pack=function(o,A,f){f=Ae(f,0);let m,C=o._positions,y=C.length;for(A[f++]=y,m=0;m<y;++m,f+=ee.packedLength)ee.pack(C[m],A,f);let x=o._colors;for(y=O(x)?x.length:0,A[f++]=y,m=0;m<y;++m,f+=At.packedLength)At.pack(x[m],A,f);return Ti.pack(o._ellipsoid,A,f),f+=Ti.packedLength,A[f++]=o._colorsPerVertex?1:0,A[f++]=o._arcType,A[f]=o._granularity,A};JK.unpack=function(o,A,f){A=Ae(A,0);let m,C=o[A++],y=new Array(C);for(m=0;m<C;++m,A+=ee.packedLength)y[m]=ee.unpack(o,A);C=o[A++];let x=C>0?new Array(C):void 0;for(m=0;m<C;++m,A+=At.packedLength)x[m]=At.unpack(o,A);let v=Ti.unpack(o,A);A+=Ti.packedLength;let E=o[A++]===1,I=o[A++],w=o[A];return O(f)?(f._positions=y,f._colors=x,f._ellipsoid=v,f._colorsPerVertex=E,f._arcType=I,f._granularity=w,f):new JK({positions:y,colors:x,ellipsoid:v,colorsPerVertex:E,arcType:I,granularity:w})};var Mee=new Array(2),Pee=new Array(2),_Qi={positions:Mee,height:Pee,ellipsoid:void 0,minDistance:void 0,granularity:void 0};JK.createGeometry=function(o){let A=o._positions,f=o._colors,m=o._colorsPerVertex,C=o._arcType,y=o._granularity,x=o._ellipsoid,v=je.chordLength(y,x.maximumRadius),E=O(f)&&!m,I,w=A.length,Q,M,B,T,D=0;if(C===Pa.GEODESIC||C===Pa.RHUMB){let U,V,H;C===Pa.GEODESIC?(U=je.chordLength(y,x.maximumRadius),V=jA.numberOfPoints,H=jA.generateArc):(U=y,V=jA.numberOfPointsRhumbLine,H=jA.generateRhumbArc);let q=jA.extractHeights(A,x),ie=_Qi;if(C===Pa.GEODESIC?ie.minDistance=v:ie.granularity=y,ie.ellipsoid=x,E){let Z=0;for(I=0;I<w-1;I++)Z+=V(A[I],A[I+1],U)+1;Q=new Float64Array(Z*3),B=new Uint8Array(Z*4),ie.positions=Mee,ie.height=Pee;let oe=0;for(I=0;I<w-1;++I){Mee[0]=A[I],Mee[1]=A[I+1],Pee[0]=q[I],Pee[1]=q[I+1];let ne=H(ie);if(O(f)){let se=ne.length/3;T=f[I];for(let ce=0;ce<se;++ce)B[oe++]=At.floatToByte(T.red),B[oe++]=At.floatToByte(T.green),B[oe++]=At.floatToByte(T.blue),B[oe++]=At.floatToByte(T.alpha)}Q.set(ne,D),D+=ne.length}}else if(ie.positions=A,ie.height=q,Q=new Float64Array(H(ie)),O(f)){for(B=new Uint8Array(Q.length/3*4),I=0;I<w-1;++I){let oe=A[I],ne=A[I+1],se=f[I],ce=f[I+1];D=IQi(oe,ne,se,ce,v,B,D)}let Z=f[w-1];B[D++]=At.floatToByte(Z.red),B[D++]=At.floatToByte(Z.green),B[D++]=At.floatToByte(Z.blue),B[D++]=At.floatToByte(Z.alpha)}}else{M=E?w*2-2:w,Q=new Float64Array(M*3),B=O(f)?new Uint8Array(M*4):void 0;let U=0,V=0;for(I=0;I<w;++I){let H=A[I];if(E&&I>0&&(ee.pack(H,Q,U),U+=3,T=f[I-1],B[V++]=At.floatToByte(T.red),B[V++]=At.floatToByte(T.green),B[V++]=At.floatToByte(T.blue),B[V++]=At.floatToByte(T.alpha)),E&&I===w-1)break;ee.pack(H,Q,U),U+=3,O(f)&&(T=f[I],B[V++]=At.floatToByte(T.red),B[V++]=At.floatToByte(T.green),B[V++]=At.floatToByte(T.blue),B[V++]=At.floatToByte(T.alpha))}}let F=new yc;F.position=new Yr({componentDatatype:ei.DOUBLE,componentsPerAttribute:3,values:Q}),O(f)&&(F.color=new Yr({componentDatatype:ei.UNSIGNED_BYTE,componentsPerAttribute:4,values:B,normalize:!0})),M=Q.length/3;let L=(M-1)*2,R=Nn.createTypedArray(M,L),k=0;for(I=0;I<M-1;++I)R[k++]=I,R[k++]=I+1;return new Zo({attributes:F,indices:R,primitiveType:yn.LINES,boundingSphere:wi.fromPoints(A)})};var rst=JK;function Y8(o){let A=Ae(o.radius,1),f={radii:new ee(A,A,A),stackPartitions:o.stackPartitions,slicePartitions:o.slicePartitions,vertexFormat:o.vertexFormat};this._ellipsoidGeometry=new gC(f),this._workerName="createSphereGeometry"}Y8.packedLength=gC.packedLength;Y8.pack=function(o,A,f){return gC.pack(o._ellipsoidGeometry,A,f)};var BQi=new gC,BL={radius:void 0,radii:new ee,vertexFormat:new Wr,stackPartitions:void 0,slicePartitions:void 0};Y8.unpack=function(o,A,f){let m=gC.unpack(o,A,BQi);return BL.vertexFormat=Wr.clone(m._vertexFormat,BL.vertexFormat),BL.stackPartitions=m._stackPartitions,BL.slicePartitions=m._slicePartitions,O(f)?(ee.clone(m._radii,BL.radii),f._ellipsoidGeometry=new gC(BL),f):(BL.radius=m._radii.x,new Y8(BL))};Y8.createGeometry=function(o){return gC.createGeometry(o._ellipsoidGeometry)};var nst=Y8;function _N(o){}Object.defineProperties(_N.prototype,{ellipsoid:{get:Ui.throwInstantiationError},rectangle:{get:Ui.throwInstantiationError},projection:{get:Ui.throwInstantiationError}});_N.prototype.getNumberOfXTilesAtLevel=Ui.throwInstantiationError;_N.prototype.getNumberOfYTilesAtLevel=Ui.throwInstantiationError;_N.prototype.rectangleToNativeRectangle=Ui.throwInstantiationError;_N.prototype.tileXYToNativeRectangle=Ui.throwInstantiationError;_N.prototype.tileXYToRectangle=Ui.throwInstantiationError;_N.prototype.positionToTileXY=Ui.throwInstantiationError;var ost=_N;function M5(o){o=Ae(o,Ae.EMPTY_OBJECT),this._clock=void 0,this._element=void 0,this._clockSubscription=void 0,this._seekFunction=void 0,this._lastPlaybackRate=void 0,this.clock=o.clock,this.element=o.element,this.epoch=Ae(o.epoch,Cn.MINIMUM_VALUE),this.tolerance=Ae(o.tolerance,1),this._seeking=!1,this._seekFunction=void 0,this._firstTickAfterSeek=!1}Object.defineProperties(M5.prototype,{clock:{get:function(){return this._clock},set:function(o){let A=this._clock;A!==o&&(O(A)&&(this._clockSubscription(),this._clockSubscription=void 0),O(o)&&(this._clockSubscription=o.onTick.addEventListener(M5.prototype._onTick,this)),this._clock=o)}},element:{get:function(){return this._element},set:function(o){let A=this._element;A!==o&&(O(A)&&A.removeEventListener("seeked",this._seekFunction,!1),O(o)&&(this._seeking=!1,this._seekFunction=wQi(this),o.addEventListener("seeked",this._seekFunction,!1)),this._element=o,this._seeking=!1,this._firstTickAfterSeek=!1)}}});M5.prototype.destroy=function(){return this.element=void 0,this.clock=void 0,Qr(this)};M5.prototype.isDestroyed=function(){return!1};M5.prototype._trySetPlaybackRate=function(o){if(this._lastPlaybackRate===o.multiplier)return;let A=this._element;try{A.playbackRate=o.multiplier}catch{A.playbackRate=0}this._lastPlaybackRate=o.multiplier};M5.prototype._onTick=function(o){let A=this._element;if(!O(A)||A.readyState<2)return;let f=A.paused,m=o.shouldAnimate;if(m===f&&(m?A.play():A.pause()),this._seeking||this._firstTickAfterSeek){this._firstTickAfterSeek=!1;return}this._trySetPlaybackRate(o);let C=o.currentTime,y=Ae(this.epoch,Cn.MINIMUM_VALUE),x=fi.secondsDifference(C,y),v=A.duration,E,I=A.currentTime;A.loop?(x=x%v,x<0&&(x=v-x),E=x):x>v?E=v:x<0?E=0:E=x;let w=m?Ae(this.tolerance,1):.001;Math.abs(E-I)>w&&(this._seeking=!0,A.currentTime=E)};function wQi(o){return function(){o._seeking=!1,o._firstTickAfterSeek=!0}}var ast=M5;function bQi(o,A){this.rectangle=o,this.maxLevel=A}function CH(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=An.createIfNeeded(o.url);this._resource=A,this._errorEvent=new br,this._ready=!1,this._terrainDataStructure={heightScale:1/1e3,heightOffset:-1e3,elementsPerHeight:3,stride:4,elementMultiplier:256,isBigEndian:!0,lowestEncodedHeight:0,highestEncodedHeight:256*256*256-1};let f=o.credit;typeof f=="string"&&(f=new tl(f)),this._credit=f,this._tilingScheme=void 0,this._rectangles=[];let m=this,C,y=Ae(o.ellipsoid,Ti.WGS84);function x(I){let w=I.getElementsByTagName("SRS")[0].textContent;if(w==="EPSG:4326")m._tilingScheme=new af({ellipsoid:y});else return Promise.reject(new nr(`SRS ${w} is not supported.`));let Q=I.getElementsByTagName("TileFormat")[0];m._heightmapWidth=parseInt(Q.getAttribute("width"),10),m._heightmapHeight=parseInt(Q.getAttribute("height"),10),m._levelZeroMaximumGeometricError=Cx.getEstimatedLevelZeroGeometricErrorForAHeightmap(y,Math.min(m._heightmapWidth,m._heightmapHeight),m._tilingScheme.getNumberOfXTilesAtLevel(0));let M=I.getElementsByTagName("DataExtent");for(let B=0;B<M.length;++B){let T=M[B],D=je.toRadians(parseFloat(T.getAttribute("minx"))),F=je.toRadians(parseFloat(T.getAttribute("miny"))),L=je.toRadians(parseFloat(T.getAttribute("maxx"))),R=je.toRadians(parseFloat(T.getAttribute("maxy"))),k=parseInt(T.getAttribute("maxlevel"),10);m._rectangles.push(new bQi(new Si(D,F,L,R),k))}return m._ready=!0,Promise.resolve(!0)}function v(I){let w=Ae(O(I)?I.message:void 0,`An error occurred while accessing ${m._resource.url}.`);return C=wc.reportError(C,m,m._errorEvent,w),C.retry?E():Promise.reject(new nr(w))}function E(){return m._resource.fetchXML().then(x).catch(v)}this._readyPromise=E()}Object.defineProperties(CH.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}});CH.prototype.requestTileGeometry=function(o,A,f,m){let C=this._tilingScheme.getNumberOfYTilesAtLevel(f),y=this._resource.getDerivedResource({url:`${f}/${o}/${C-A-1}.tif`,queryParameters:{cesium:!0},request:m}).fetchImage({preferImageBitmap:!0});if(!O(y))return;let x=this;return Promise.resolve(y).then(function(v){return new bQ({buffer:i5(v),width:x._heightmapWidth,height:x._heightmapHeight,childTileMask:QQi(x,o,A,f),structure:x._terrainDataStructure})})};CH.prototype.getLevelMaximumGeometricError=function(o){return this._levelZeroMaximumGeometricError/(1<<o)};var sst=new Si;function QQi(o,A,f,m){let C=o._tilingScheme,y=o._rectangles,x=C.tileXYToRectangle(A,f,m),v=0;for(let E=0;E<y.length&&v!==15;++E){let I=y[E];if(I.maxLevel<=m)continue;let w=I.rectangle,Q=Si.intersection(w,x,sst);O(Q)&&(L$(C,w,A*2,f*2,m+1)&&(v|=4),L$(C,w,A*2+1,f*2,m+1)&&(v|=8),L$(C,w,A*2,f*2+1,m+1)&&(v|=1),L$(C,w,A*2+1,f*2+1,m+1)&&(v|=2))}return v}function L$(o,A,f,m,C){let y=o.tileXYToRectangle(f,m,C);return O(Si.intersection(y,A,sst))}CH.prototype.getTileDataAvailable=function(o,A,f){};CH.prototype.loadTileDataAvailability=function(o,A,f){};var lst=CH,SQi={VK_FORMAT_UNDEFINED:0,VK_FORMAT_R4G4_UNORM_PACK8:1,VK_FORMAT_R4G4B4A4_UNORM_PACK16:2,VK_FORMAT_B4G4R4A4_UNORM_PACK16:3,VK_FORMAT_R5G6B5_UNORM_PACK16:4,VK_FORMAT_B5G6R5_UNORM_PACK16:5,VK_FORMAT_R5G5B5A1_UNORM_PACK16:6,VK_FORMAT_B5G5R5A1_UNORM_PACK16:7,VK_FORMAT_A1R5G5B5_UNORM_PACK16:8,VK_FORMAT_R8_UNORM:9,VK_FORMAT_R8_SNORM:10,VK_FORMAT_R8_USCALED:11,VK_FORMAT_R8_SSCALED:12,VK_FORMAT_R8_UINT:13,VK_FORMAT_R8_SINT:14,VK_FORMAT_R8_SRGB:15,VK_FORMAT_R8G8_UNORM:16,VK_FORMAT_R8G8_SNORM:17,VK_FORMAT_R8G8_USCALED:18,VK_FORMAT_R8G8_SSCALED:19,VK_FORMAT_R8G8_UINT:20,VK_FORMAT_R8G8_SINT:21,VK_FORMAT_R8G8_SRGB:22,VK_FORMAT_R8G8B8_UNORM:23,VK_FORMAT_R8G8B8_SNORM:24,VK_FORMAT_R8G8B8_USCALED:25,VK_FORMAT_R8G8B8_SSCALED:26,VK_FORMAT_R8G8B8_UINT:27,VK_FORMAT_R8G8B8_SINT:28,VK_FORMAT_R8G8B8_SRGB:29,VK_FORMAT_B8G8R8_UNORM:30,VK_FORMAT_B8G8R8_SNORM:31,VK_FORMAT_B8G8R8_USCALED:32,VK_FORMAT_B8G8R8_SSCALED:33,VK_FORMAT_B8G8R8_UINT:34,VK_FORMAT_B8G8R8_SINT:35,VK_FORMAT_B8G8R8_SRGB:36,VK_FORMAT_R8G8B8A8_UNORM:37,VK_FORMAT_R8G8B8A8_SNORM:38,VK_FORMAT_R8G8B8A8_USCALED:39,VK_FORMAT_R8G8B8A8_SSCALED:40,VK_FORMAT_R8G8B8A8_UINT:41,VK_FORMAT_R8G8B8A8_SINT:42,VK_FORMAT_R8G8B8A8_SRGB:43,VK_FORMAT_B8G8R8A8_UNORM:44,VK_FORMAT_B8G8R8A8_SNORM:45,VK_FORMAT_B8G8R8A8_USCALED:46,VK_FORMAT_B8G8R8A8_SSCALED:47,VK_FORMAT_B8G8R8A8_UINT:48,VK_FORMAT_B8G8R8A8_SINT:49,VK_FORMAT_B8G8R8A8_SRGB:50,VK_FORMAT_A8B8G8R8_UNORM_PACK32:51,VK_FORMAT_A8B8G8R8_SNORM_PACK32:52,VK_FORMAT_A8B8G8R8_USCALED_PACK32:53,VK_FORMAT_A8B8G8R8_SSCALED_PACK32:54,VK_FORMAT_A8B8G8R8_UINT_PACK32:55,VK_FORMAT_A8B8G8R8_SINT_PACK32:56,VK_FORMAT_A8B8G8R8_SRGB_PACK32:57,VK_FORMAT_A2R10G10B10_UNORM_PACK32:58,VK_FORMAT_A2R10G10B10_SNORM_PACK32:59,VK_FORMAT_A2R10G10B10_USCALED_PACK32:60,VK_FORMAT_A2R10G10B10_SSCALED_PACK32:61,VK_FORMAT_A2R10G10B10_UINT_PACK32:62,VK_FORMAT_A2R10G10B10_SINT_PACK32:63,VK_FORMAT_A2B10G10R10_UNORM_PACK32:64,VK_FORMAT_A2B10G10R10_SNORM_PACK32:65,VK_FORMAT_A2B10G10R10_USCALED_PACK32:66,VK_FORMAT_A2B10G10R10_SSCALED_PACK32:67,VK_FORMAT_A2B10G10R10_UINT_PACK32:68,VK_FORMAT_A2B10G10R10_SINT_PACK32:69,VK_FORMAT_R16_UNORM:70,VK_FORMAT_R16_SNORM:71,VK_FORMAT_R16_USCALED:72,VK_FORMAT_R16_SSCALED:73,VK_FORMAT_R16_UINT:74,VK_FORMAT_R16_SINT:75,VK_FORMAT_R16_SFLOAT:76,VK_FORMAT_R16G16_UNORM:77,VK_FORMAT_R16G16_SNORM:78,VK_FORMAT_R16G16_USCALED:79,VK_FORMAT_R16G16_SSCALED:80,VK_FORMAT_R16G16_UINT:81,VK_FORMAT_R16G16_SINT:82,VK_FORMAT_R16G16_SFLOAT:83,VK_FORMAT_R16G16B16_UNORM:84,VK_FORMAT_R16G16B16_SNORM:85,VK_FORMAT_R16G16B16_USCALED:86,VK_FORMAT_R16G16B16_SSCALED:87,VK_FORMAT_R16G16B16_UINT:88,VK_FORMAT_R16G16B16_SINT:89,VK_FORMAT_R16G16B16_SFLOAT:90,VK_FORMAT_R16G16B16A16_UNORM:91,VK_FORMAT_R16G16B16A16_SNORM:92,VK_FORMAT_R16G16B16A16_USCALED:93,VK_FORMAT_R16G16B16A16_SSCALED:94,VK_FORMAT_R16G16B16A16_UINT:95,VK_FORMAT_R16G16B16A16_SINT:96,VK_FORMAT_R16G16B16A16_SFLOAT:97,VK_FORMAT_R32_UINT:98,VK_FORMAT_R32_SINT:99,VK_FORMAT_R32_SFLOAT:100,VK_FORMAT_R32G32_UINT:101,VK_FORMAT_R32G32_SINT:102,VK_FORMAT_R32G32_SFLOAT:103,VK_FORMAT_R32G32B32_UINT:104,VK_FORMAT_R32G32B32_SINT:105,VK_FORMAT_R32G32B32_SFLOAT:106,VK_FORMAT_R32G32B32A32_UINT:107,VK_FORMAT_R32G32B32A32_SINT:108,VK_FORMAT_R32G32B32A32_SFLOAT:109,VK_FORMAT_R64_UINT:110,VK_FORMAT_R64_SINT:111,VK_FORMAT_R64_SFLOAT:112,VK_FORMAT_R64G64_UINT:113,VK_FORMAT_R64G64_SINT:114,VK_FORMAT_R64G64_SFLOAT:115,VK_FORMAT_R64G64B64_UINT:116,VK_FORMAT_R64G64B64_SINT:117,VK_FORMAT_R64G64B64_SFLOAT:118,VK_FORMAT_R64G64B64A64_UINT:119,VK_FORMAT_R64G64B64A64_SINT:120,VK_FORMAT_R64G64B64A64_SFLOAT:121,VK_FORMAT_B10G11R11_UFLOAT_PACK32:122,VK_FORMAT_E5B9G9R9_UFLOAT_PACK32:123,VK_FORMAT_D16_UNORM:124,VK_FORMAT_X8_D24_UNORM_PACK32:125,VK_FORMAT_D32_SFLOAT:126,VK_FORMAT_S8_UINT:127,VK_FORMAT_D16_UNORM_S8_UINT:128,VK_FORMAT_D24_UNORM_S8_UINT:129,VK_FORMAT_D32_SFLOAT_S8_UINT:130,VK_FORMAT_BC1_RGB_UNORM_BLOCK:131,VK_FORMAT_BC1_RGB_SRGB_BLOCK:132,VK_FORMAT_BC1_RGBA_UNORM_BLOCK:133,VK_FORMAT_BC1_RGBA_SRGB_BLOCK:134,VK_FORMAT_BC2_UNORM_BLOCK:135,VK_FORMAT_BC2_SRGB_BLOCK:136,VK_FORMAT_BC3_UNORM_BLOCK:137,VK_FORMAT_BC3_SRGB_BLOCK:138,VK_FORMAT_BC4_UNORM_BLOCK:139,VK_FORMAT_BC4_SNORM_BLOCK:140,VK_FORMAT_BC5_UNORM_BLOCK:141,VK_FORMAT_BC5_SNORM_BLOCK:142,VK_FORMAT_BC6H_UFLOAT_BLOCK:143,VK_FORMAT_BC6H_SFLOAT_BLOCK:144,VK_FORMAT_BC7_UNORM_BLOCK:145,VK_FORMAT_BC7_SRGB_BLOCK:146,VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK:147,VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK:148,VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK:149,VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK:150,VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK:151,VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK:152,VK_FORMAT_EAC_R11_UNORM_BLOCK:153,VK_FORMAT_EAC_R11_SNORM_BLOCK:154,VK_FORMAT_EAC_R11G11_UNORM_BLOCK:155,VK_FORMAT_EAC_R11G11_SNORM_BLOCK:156,VK_FORMAT_ASTC_4x4_UNORM_BLOCK:157,VK_FORMAT_ASTC_4x4_SRGB_BLOCK:158,VK_FORMAT_ASTC_5x4_UNORM_BLOCK:159,VK_FORMAT_ASTC_5x4_SRGB_BLOCK:160,VK_FORMAT_ASTC_5x5_UNORM_BLOCK:161,VK_FORMAT_ASTC_5x5_SRGB_BLOCK:162,VK_FORMAT_ASTC_6x5_UNORM_BLOCK:163,VK_FORMAT_ASTC_6x5_SRGB_BLOCK:164,VK_FORMAT_ASTC_6x6_UNORM_BLOCK:165,VK_FORMAT_ASTC_6x6_SRGB_BLOCK:166,VK_FORMAT_ASTC_8x5_UNORM_BLOCK:167,VK_FORMAT_ASTC_8x5_SRGB_BLOCK:168,VK_FORMAT_ASTC_8x6_UNORM_BLOCK:169,VK_FORMAT_ASTC_8x6_SRGB_BLOCK:170,VK_FORMAT_ASTC_8x8_UNORM_BLOCK:171,VK_FORMAT_ASTC_8x8_SRGB_BLOCK:172,VK_FORMAT_ASTC_10x5_UNORM_BLOCK:173,VK_FORMAT_ASTC_10x5_SRGB_BLOCK:174,VK_FORMAT_ASTC_10x6_UNORM_BLOCK:175,VK_FORMAT_ASTC_10x6_SRGB_BLOCK:176,VK_FORMAT_ASTC_10x8_UNORM_BLOCK:177,VK_FORMAT_ASTC_10x8_SRGB_BLOCK:178,VK_FORMAT_ASTC_10x10_UNORM_BLOCK:179,VK_FORMAT_ASTC_10x10_SRGB_BLOCK:180,VK_FORMAT_ASTC_12x10_UNORM_BLOCK:181,VK_FORMAT_ASTC_12x10_SRGB_BLOCK:182,VK_FORMAT_ASTC_12x12_UNORM_BLOCK:183,VK_FORMAT_ASTC_12x12_SRGB_BLOCK:184,VK_FORMAT_G8B8G8R8_422_UNORM:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM:1000156006,VK_FORMAT_R10X6_UNORM_PACK16:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16:1000156016,VK_FORMAT_R12X4_UNORM_PACK16:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM:1000156033,VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG:1000054e3,VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG:1000054001,VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG:1000054002,VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG:1000054003,VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG:1000054004,VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG:1000054005,VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG:1000054006,VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG:1000054007,VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT:1000066e3,VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT:1000066001,VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT:1000066002,VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT:1000066003,VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT:1000066004,VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT:1000066005,VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT:1000066006,VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT:1000066007,VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT:1000066008,VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT:1000066009,VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT:1000066010,VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT:1000066011,VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT:1000066012,VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT:1000066013,VK_FORMAT_G8B8G8R8_422_UNORM_KHR:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM_KHR:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR:1000156006,VK_FORMAT_R10X6_UNORM_PACK16_KHR:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR:1000156016,VK_FORMAT_R12X4_UNORM_PACK16_KHR:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM_KHR:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM_KHR:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR:1000156033},ust=Object.freeze(SQi);function DQi(o){switch(o){case Ii.FLOAT:return"float";case Ii.FLOAT_VEC2:return"vec2";case Ii.FLOAT_VEC3:return"vec3";case Ii.FLOAT_VEC4:return"vec4";case Ii.FLOAT_MAT2:return"mat2";case Ii.FLOAT_MAT3:return"mat3";case Ii.FLOAT_MAT4:return"mat4";case Ii.SAMPLER_2D:return"sampler2D";case Ii.BOOL:return"bool"}}var cst=DQi;function TQi(o,A,f){return function(){f.apply(o,arguments),A.apply(o,arguments)}}var VSe=TQi;function WK(o,A,f){let m=A[o.id];if(O(m)){let C=m.primitive;f.remove(C),C.isDestroyed()||C.destroy(),delete A[o.id]}}var gae=`attribute vec4 position;
        `}),k=new CC({name:`${A}Composite`,stages:[L,R],inputPreviousStageTexture:!1});function U(V){Object.defineProperties(V,{showGlow:{get(){return I},set(H){I=H}},edgeGlow:{get(){return w},set(H){w=H}},edgeStrength:{get(){return Q},set(H){Q=H}},thresholdAngle:{get(){return m},set(H){m=H}},showOutlineOnly:{get(){return y},set(H){y=H}},edgeOnly:{get(){return M},set(H){M=H}},useSingleColor:{get(){return C},set(H){C=H}},outlineWidth:{get(){return f},set(H){f=H}},visibleEdgeColor:{get(){return x},set(H){x=H}},hiddenEdgeColor:{get(){return v},set(H){v=H}}})}return U(k),k._uniforms=k._uniforms||{},U(k._uniforms),k}function WK(o,A,f){let m=A[o.id];if(O(m)){let C=m.primitive;f.remove(C),C.isDestroyed()||C.destroy(),delete A[o.id]}}var gae=`attribute vec4 position;
attribute vec3 normal;
varying vec3 v_position;
varying vec3 v_positionWC;
@@ -15113,7 +15113,7 @@
        #endif
            gl_FragColor = czm_gammaCorrect(color);
        }
    `;function ZSe(){this.context=void 0,this.model=void 0,this.index=void 0}ZSe.prototype.set=function(o,A,f){this.context=o,this.model=A,this.index=f};ZSe.prototype.execute=function(){let o=this.context,A=this.index,f=this.model.vertexPackage,m=f.vertexAttributes[A];if(!O(m))throw new Ui("attribute is null");if(f.instanceIndex!==-1&&!O(this.model._instanceBuffer)){if(!O(f.instanceBuffer))throw new Ui("instance buffer is null");this.model.instanceBuffer=vo.createVertexBuffer({context:o,typedArray:f.instanceBuffer,usage:ln.STATIC_DRAW})}if(m.instanceDivisor===1){m.vertexBuffer=this.model.instanceBuffer;return}O(m.vertexBuffer)||(m.vertexBuffer=vo.createVertexBuffer({context:o,typedArray:m.typedArray,usage:ln.STATIC_DRAW}),m.typedArray=null,delete m.typedArray)};var $Se=ZSe;function eDe(){this.model=void 0,this.context=void 0,this.index=0}eDe.prototype.set=function(o,A,f){this.model=A,this.context=o,this.index=f};eDe.prototype.execute=function(){let o=this.context,A=this.model.arrIndexPackage[this.index],f=this.model.vertexPackage.verticesCount;if(!O(A))throw new Ui("index package is null");if(O(A.indexBuffer))return;if(!O(A.indicesTypedArray))throw new Ui("index buffer is null");let m=Nn.UNSIGNED_SHORT;(A.indexType===1||f>=je.SIXTY_FOUR_KILOBYTES)&&o.elementIndexUint&&(m=Nn.UNSIGNED_INT),A.indexBuffer=vo.createIndexBuffer({context:o,typedArray:A.indicesTypedArray,usage:ln.STATIC_DRAW,indexDatatype:m}),A.indicesTypedArray=null,delete A.indicesTypedArray};var tDe=eDe;function xH(o){this.layer=o.layer,this.vertexPackage=o.vertexPackage,this.arrIndexPackage=o.arrIndexPackage,this.vertexBufferToCreate=new d5,this.indexBufferToCreate=new d5;let A,f;for(A=0,f=this.vertexPackage.vertexAttributes.length;A<f;A++)this.vertexBufferToCreate.enqueue(A);for(A=0,f=this.arrIndexPackage.length;A<f;A++)this.indexBufferToCreate.enqueue(A);this.boundingVolume=o.boundingVolume,this.material=o.material,this.modelMatrix=o.modelMatrix,this.shaderProgram=void 0,this.vertexArray=void 0,this.colorCommand=void 0,this.ready=!1}var a7e=new $Se,s7e=new tDe;function XQi(o,A){let f=o.layer.context,m=o.vertexBufferToCreate;for(;m.length;){let C=m.peek();if(a7e.set(f,o,C),!A.jobScheduler.execute(a7e,KE.BUFFER))break;m.dequeue()}}function ZQi(o,A){let f=o.layer.context,m=o.indexBufferToCreate;for(;m.length;){let C=m.peek();if(s7e.set(f,o,C),!A.jobScheduler.execute(s7e,KE.BUFFER))break;m.dequeue()}}xH.prototype.createBuffers=function(o){XQi(this,o),ZQi(this,o)};xH.prototype.createCommand=Ui.throwInstantiationError;xH.prototype.update=Ui.throwInstantiationError;xH.prototype.isDestroyed=Ui.throwInstantiationError;xH.prototype.destroy=Ui.throwInstantiationError;var aW=xH;function bO(o){aW.call(this,o)}bO.prototype=Object.create(aW.prototype);bO.prototype.constructor=aW;function $Qi(o,A,f){let m=new Fr({sources:[qSe]}),C=new Fr({sources:[XSe]});return O(A.aNormal)&&(m.defines.push("VertexNormal"),C.defines.push("VertexNormal")),f.textures.length>0&&(m.defines.push("TexCoord"),C.defines.push("TexCoord")),f.textures.length===2&&(m.defines.push("TexCoord2"),C.defines.push("TexCoord2")),_s.fromCache({context:o,vertexShaderSource:m,fragmentShaderSource:C,attributeLocations:A})}function eSi(){return fn.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:nI.LESS_OR_EQUAL}})}function tSi(){return fn.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:nI.LESS_OR_EQUAL},blending:Bu.ALPHA_BLEND})}function iSi(o){return{uTexture:function(){return o.textures[0]},uTextureWidth:function(){return o.textures[0]._width},uTexture2:function(){return o.textures[1]},uTexture2Width:function(){return o.textures[1]._width},uDiffuseColor:function(){return o.diffuseColor},uAmbientColor:function(){return o.ambientColor}}}bO.prototype.createCommand=function(){if(O(this.colorCommand))return;let o=this.layer.context,A=this.vertexPackage,f=this.arrIndexPackage,m=A.vertexAttributes,C=A.attrLocation;if(f.length<1)return;let y=f[0],x=this.material;this.shaderProgram=$Qi(o,C,x),this.vertexArray=new Hc({context:o,attributes:m,indexBuffer:y.indexBuffer}),this.colorCommand=new On({primitiveType:y.primitiveType,modelMatrix:this.modelMatrix,boundingVolume:wi.clone(this.boundingVolume),pickId:"vSecondColor",vertexArray:this.vertexArray,shaderProgram:this.shaderProgram,pass:x.bTransparentSorting?hr.TRANSLUCENT:hr.CESIUM_3D_TILE,renderState:x.bTransparentSorting?tSi():eSi()}),this.colorCommand.uniformMap=iSi(x),this.vertexPackage=null,this.arrIndexPackage=null,this.ready=!0};bO.prototype.update=function(o){if(!this.ready){this.createBuffers(o),this.createCommand(o);return}o.commandList.push(this.colorCommand)};bO.prototype.isDestroyed=function(){return!1};bO.prototype.destroy=function(){return this.shaderProgram=this.shaderProgram&&!this.shaderProgram.isDestroyed()&&this.shaderProgram.destroy(),this.vertexArray=this.vertexArray&&!this.vertexArray.isDestroyed()&&this.vertexArray.destroy(),this.colorCommand=void 0,this.vertexPackage=null,this.arrIndexPackage=null,Qr(this)};var Iie=bO,rSi={OSGBFile:function(o){return new Iie(o)},OSGBCacheFile:function(o){return new Iie(o)}},iDe=rSi,nSi={SVC_Vertex:1,SVC_Normal:2,SVC_VertexColor:4,SVC_SecondColor:8,SVC_TexutreCoord:16,SVC_TexutreCoordIsW:32},_1=Object.freeze(nSi);function dst(){}function oSi(o,A){let f={},m=A.materials.material;for(let C=0,y=m.length;C<y;C++){let x=m[C].material,v=x.id,E=new jSe;f[v]=E;let I=x.ambient;E.ambientColor=new At(I.r,I.g,I.b,I.a);let w=x.diffuse;E.diffuseColor=new At(w.r,w.g,w.b,w.a);let Q=x.specular;E.specularColor=new At(Q.r,Q.g,Q.b,Q.a),E.shininess=x.shininess,E.bTransparentSorting=x.transparentsorting;let M=x.textureunitstates,B=M.length;for(let T=0;T<B;T++){let D=M[T].textureunitstate,F=D.id,L=D.addressmode.u===0?Za.REPEAT:Za.CLAMP_TO_EDGE,R=D.addressmode.v===0?Za.REPEAT:Za.CLAMP_TO_EDGE;E.texMatrix=Xe.unpack(D.texmodmatrix);let k=A.texturePackage[F];if(O(k)&&k.imageBuffer.byteLength>0){k.wrapS=L,k.wrapT=R;let U=new JSe(o,F,k);E.textures.push(U)}}}return f}function aSi(o,A){let f=new wi,m=new ee,C=o.vertexAttributes[0],y=C.componentsPerAttribute,x=O(o.nCompressOptions)&&(o.nCompressOptions&_1.SVC_Vertex)===_1.SVC_Vertex,v=1,E,I;x?(v=o.vertCompressConstant,E=new ee(o.minVerticesValue.x,o.minVerticesValue.y,o.minVerticesValue.z),I=new Uint16Array(C.typedArray.buffer,C.typedArray.byteOffset,C.typedArray.byteLength/2)):I=new Float32Array(C.typedArray.buffer,C.typedArray.byteOffset,C.typedArray.byteLength/4);let w=[];for(let Q=0;Q<o.verticesCount;Q++)ee.fromArray(I,y*Q,m),x&&(m=ee.multiplyByScalar(m,v,m),m=ee.add(m,E,m)),w.push(ee.clone(m));return wi.fromPoints(w,f),wi.transform(f,A,f),w.length=0,f}function sSi(o,A,f,m,C){let y={},x=m.geodes;for(let v=0,E=x.length;v<E;v++){let I=x[v],w=I.matrix,Q=Xe.multiply(o.modelMatrix,w,new Xe),M;O(C.boundingVolume)&&(M=new wi(C.boundingVolume.sphere.center,C.boundingVolume.sphere.radius),wi.transform(M,o.modelMatrix,M));let B=I.skeletonNames;for(let T=0,D=B.length;T<D;T++){let F=B[T],L=A.geoPackage[F],R=L.vertexPackage,k=L.arrIndexPackage,U=L.pickInfo,V;k.length>0&&(V=f[k[0].materialCode]);let H=O(M)?M:aSi(R,Q);y[F]=iDe[o.fileType]({layer:o,vertexPackage:R,arrIndexPackage:k,pickInfo:U,modelMatrix:Q,boundingVolume:H,material:V})}}if(!O(C.boundingVolume)){let v=[];for(let E in y)y.hasOwnProperty(E)&&v.push(y[E].boundingVolume);C.boundingVolume=wi.fromBoundingSpheres(v)}C.geoMap=y}function lSi(o,A,f){let m=A.groupNode,C=[];for(let y=0,x=m.pageLods.length;y<x;y++){let v={},E=m.pageLods[y];v.rangeMode=E.rangeMode,v.rangeDataList=E.childTile,v.rangeList=E.rangeList;let I=E.boundingSphere.center,w=E.boundingSphere.radius;v.rangeDataList!==""?v.boundingVolume={sphere:{center:new ee(I.x,I.y,I.z),radius:w}}:v.isLeafTile=!0,sSi(o,A,f,E,v),C.push(v)}return C}dst.parse=function(o,A){if(!O(A))return;let f=oSi(o.context,A);return lSi(o,A,f)};var rDe=dst;function QO(){this._list=new Jne,this._sentinel=this._list.add(),this._trimTiles=!1}QO.prototype.reset=function(){this._list.splice(this._list.tail,this._sentinel)};QO.prototype.touch=function(o){let A=o.cacheNode;O(A)&&this._list.splice(this._sentinel,A)};QO.prototype.add=function(o){O(o.cacheNode)||(o.cacheNode=this._list.add(o))};QO.prototype.unloadTile=function(o,A,f){let m=A.cacheNode;!O(m)||(this._list.remove(m),A.cacheNode=void 0,f(o,A))};QO.prototype.unloadTiles=function(o,A){let f=this._trimTiles;this._trimTiles=!1;let m=this._list,C=o.maximumMemoryUsage*1024*1024,y=this._sentinel,x=m.head;for(;x!==y&&(o.totalMemoryUsageInBytes>C||f);){let v=x.item;x=x.next,v.isDestroyed()&&console.log(v),this.unloadTile(o,v,A)}};QO.prototype.trim=function(){this._trimTiles=!0};var nDe=QO,uSi={UNLOADED:0,LOADING:1,PARSING:2,READY:3,FAILED:4},yD=Object.freeze(uSi);function fst(){this._stack=[]}function cSi(o,A,f){A.length=0;for(let m=0,C=o._rootTiles.length;m<C;m++){let y=o._rootTiles[m];y.updateVisibility(f),y.visible&&A.push(y)}}function ASi(o,A){return o.distanceToCamera-A.distanceToCamera}function hSi(o,A,f,m){let C,y=A.children,x=y.length;for(C=0;C<x;++C)y[C].updateVisibility(m);for(y.sort(ASi),C=0;C<x;++C){let v=y[C];v.visible&&f.push(v)}}function dSi(o,A,f){A.renderable&&(o._selectedTiles.push(A),A.selectedFrame=f.frameNumber)}function fSi(o,A,f){A.requestedFrame===f.frameNumber||A.contentState!==yD.UNLOADED||A.isLeafTile||(o._requestTiles.push(A),A.requestedFrame=f.frameNumber)}function gSi(o,A,f){A.touchedFrame!==f.frameNumber&&(o._cache.touch(A),A.touchedFrame=f.frameNumber)}function pSi(o,A,f){for(;A.length;){let m=A.pop();if(m.visible){if(gSi(o,m,f),m.canTraverse()){hSi(o,m,A,f);continue}dSi(o,m,f),fSi(o,m,f)}}}fst.prototype.scheduler=function(o,A){o._requestTiles.length=0,o._selectedTiles.length=0;let f=this._stack;cSi(o,f,A),pSi(o,f,A)};var oDe=fst,mSi=xh(v7e(),1);function gst(){}var l7e={SV_Unkown:0,SV_Standard:1,SV_Compressed:2};function CSi(o,A){let f=new Uint8Array(o,A);return mSi.default.inflate(f).buffer}function vH(o,A,f){let m=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let C=new Uint8Array(o,f,m),y=d2(C);return f+=m,{string:y,bytesOffset:f}}function ySi(o,A,f,m){let C={},y=[],x=new Array(16);for(let E=0;E<16;E++)x[E]=A.getFloat64(f,!0),f+=Float64Array.BYTES_PER_ELEMENT;C.matrix=x,C.skeletonNames=y;let v=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;for(let E=0;E<v;E++){let I=vH(o,A,f);y.push(I.string),f=I.bytesOffset}return m.push(C),f}function xSi(o,A,f,m){let C={};C.rangeList=A.getFloat32(f,!0),f+=Float32Array.BYTES_PER_ELEMENT,C.rangeMode=A.getUint16(f,!0),f+=Uint16Array.BYTES_PER_ELEMENT;let y={};y.x=A.getFloat64(f,!0),f+=Float64Array.BYTES_PER_ELEMENT,y.y=A.getFloat64(f,!0),f+=Float64Array.BYTES_PER_ELEMENT,y.z=A.getFloat64(f,!0),f+=Float64Array.BYTES_PER_ELEMENT;let x=A.getFloat64(f,!0);f+=Float64Array.BYTES_PER_ELEMENT,C.boundingSphere={center:y,radius:x};let v=vH(o,A,f),E=v.string;f=v.bytesOffset;let I=E.indexOf("Geometry");if(I!==-1){let Q=E.substring(I);E=E.replace(Q,"")}C.childTile=E,C.geodes=[];let w=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;for(let Q=0;Q<w;Q++)f=ySi(o,A,f,C.geodes);return m.push(C),f}function vSi(o,A,f,m){let C={},y=[],x=[],v=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let E=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;for(let w=0;w<E;w++)f=xSi(o,A,f,x);C.pageLods=x;let I=f%4;return I!==0&&(f+=4-I),m.groupNode=C,f}function pst(o,A,f,m){let C=A.getUint32(f,!0);if(m.verticesCount=C,f+=Uint32Array.BYTES_PER_ELEMENT,f<=0)return f;let y=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let x=A.getUint16(f,!0);x=y*Float32Array.BYTES_PER_ELEMENT,f+=Uint16Array.BYTES_PER_ELEMENT;let v=C*y*Float32Array.BYTES_PER_ELEMENT,E=new Uint8Array(o,f,v);f+=v;let I=m.vertexAttributes,w=m.attrLocation;return w.aPosition=I.length,I.push({index:w.aPosition,typedArray:E,componentsPerAttribute:y,componentDatatype:ei.FLOAT,offsetInBytes:0,strideInBytes:x,normalize:!1}),f}function mst(o,A,f,m){let C=A.getUint32(f,!0);if(f+=Uint32Array.BYTES_PER_ELEMENT,C<=0)return f;let y=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let x=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let v=C*y*Float32Array.BYTES_PER_ELEMENT,E=new Uint8Array(o,f,v);f+=v;let I=m.vertexAttributes,w=m.attrLocation;return w.aNormal=I.length,I.push({index:w.aNormal,typedArray:E,componentsPerAttribute:y,componentDatatype:ei.FLOAT,offsetInBytes:0,strideInBytes:x,normalize:!1}),f}function Cst(o,A,f,m){let C=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let y=m.verticesCount,x;if(C>0){let I=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT,f+=Uint8Array.BYTES_PER_ELEMENT*2;let w=C*Uint8Array.BYTES_PER_ELEMENT*4;x=new Uint8Array(o,f,w).slice(0,w),f+=w}else{x=new Uint8Array(4*y);for(let I=0;I<y;I++)x[I*4]=255,x[I*4+1]=255,x[I*4+2]=255,x[I*4+3]=255}let v=m.vertexAttributes,E=m.attrLocation;return E.aColor=v.length,v.push({index:E.aColor,typedArray:x,componentsPerAttribute:4,componentDatatype:ei.UNSIGNED_BYTE,offsetInBytes:0,strideInBytes:4,normalize:!0}),m.vertexColor=x,f}function yst(o,A,f,m){let C=A.getUint32(f,!0);if(f+=Uint32Array.BYTES_PER_ELEMENT,C<=0)return f;let y=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT,f+=Uint8Array.BYTES_PER_ELEMENT*2;let x=C*Uint8Array.BYTES_PER_ELEMENT*4,v=new Uint8Array(o,f,x);f+=x;let E=m.vertexAttributes,I=m.attrLocation;return I.aSecondColor=E.length,E.push({index:I.aSecondColor,typedArray:v,componentsPerAttribute:4,componentDatatype:ei.UNSIGNED_BYTE,offsetInBytes:0,strideInBytes:4,normalize:!0}),f}function xst(o,A,f,m){let C=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT,f+=Uint16Array.BYTES_PER_ELEMENT;for(let y=0;y<C;y++){let x=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let v=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let E=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let I=x*v*Float32Array.BYTES_PER_ELEMENT,w=new Uint8Array(o,f,I);f+=I;let Q="aTexCoord"+y,M=m.vertexAttributes,B=m.attrLocation;B[Q]=M.length,M.push({index:B[Q],typedArray:w,componentsPerAttribute:v,componentDatatype:ei.FLOAT,offsetInBytes:0,strideInBytes:v*Float32Array.BYTES_PER_ELEMENT,normalize:!1})}return f}function vst(o,A,f,m){let C=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT,f+=Uint16Array.BYTES_PER_ELEMENT;let y=m.vertexAttributes,x=m.attrLocation;for(let v=0;v<C;v++){let E=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let I=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let w=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let Q=E*I*Float32Array.BYTES_PER_ELEMENT;if(I===17||I===29){let M=new Uint8Array(o,f,Q);m.instanceCount=E,m.instanceMode=I,m.instanceBuffer=M,m.instanceIndex=1;let B=I*E*4,T=M.slice(0,B);m.vertexColorInstance=T;let D;I===17?(D=Float32Array.BYTES_PER_ELEMENT*17,x.uv2=y.length,y.push({index:x.uv2,componentsPerAttribute:4,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:D,instanceDivisor:1}),x.uv3=y.length,y.push({index:x.uv3,componentsPerAttribute:4,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:4*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}),x.uv4=y.length,y.push({index:x.uv4,componentsPerAttribute:4,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:8*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}),x.uv5=y.length,y.push({index:x.uv5,componentsPerAttribute:4,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:12*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}),x.uv6=y.length,y.push({index:x.uv6,componentsPerAttribute:4,componentDatatype:ei.UNSIGNED_BYTE,normalize:!0,offsetInBytes:16*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1})):I===29&&(D=Float32Array.BYTES_PER_ELEMENT*29,x.uv1=y.length,y.push({index:x.uv1,componentsPerAttribute:4,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:D,instanceDivisor:1,byteLength:Q}),x.uv2=y.length,y.push({index:x.uv2,componentsPerAttribute:4,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:4*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}),x.uv3=y.length,y.push({index:x.uv3,componentsPerAttribute:4,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:8*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}),x.uv4=y.length,y.push({index:x.uv4,componentsPerAttribute:4,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:12*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}),x.uv5=y.length,y.push({index:x.uv5,componentsPerAttribute:4,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:16*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}),x.uv6=y.length,y.push({index:x.uv6,componentsPerAttribute:4,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:20*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}),x.uv7=y.length,y.push({index:x.uv7,componentsPerAttribute:3,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:24*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}),x.uv8=y.length,y.push({index:x.uv8,componentsPerAttribute:4,componentDatatype:ei.UNSIGNED_BYTE,normalize:!0,offsetInBytes:27*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}),x.uv9=y.length,y.push({index:x.uv9,componentsPerAttribute:4,componentDatatype:ei.UNSIGNED_BYTE,normalize:!0,offsetInBytes:28*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}))}else{let M=E*I;m.instanceBounds=new Float32Array(M);for(let B=0;B<M;B++)m.instanceBounds[B]=A.getFloat32(f,!0)}f+=Q}return f}function ESi(o,A,f,m){let C=A.getUint32(f,!0);if(m.verticesCount=C,f+=Uint32Array.BYTES_PER_ELEMENT,f<=0)return f;let y=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let x=A.getUint16(f,!0);x=y*Int16Array.BYTES_PER_ELEMENT,f+=Uint16Array.BYTES_PER_ELEMENT;let v=A.getFloat32(f,!0);f+=Float32Array.BYTES_PER_ELEMENT;let E={};E.x=A.getFloat32(f,!0),f+=Float32Array.BYTES_PER_ELEMENT,E.y=A.getFloat32(f,!0),f+=Float32Array.BYTES_PER_ELEMENT,E.z=A.getFloat32(f,!0),f+=Float32Array.BYTES_PER_ELEMENT,E.w=A.getFloat32(f,!0),f+=Float32Array.BYTES_PER_ELEMENT,m.vertCompressConstant=v,m.minVerticesValue=E;let I=C*y*Int16Array.BYTES_PER_ELEMENT,w=new Uint8Array(o,f,I);f+=I;let Q=m.vertexAttributes,M=m.attrLocation;return M.aPosition=Q.length,Q.push({index:M.aPosition,typedArray:w,componentsPerAttribute:y,componentDatatype:ei.SHORT,offsetInBytes:0,strideInBytes:x,normalize:!1}),f}function ISi(o,A,f,m){let C=A.getUint32(f,!0);if(f+=Uint32Array.BYTES_PER_ELEMENT,C<=0)return f;let y=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let x=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let v=C*2*Int16Array.BYTES_PER_ELEMENT,E=new Uint8Array(o,f,v);f+=v;let I=m.vertexAttributes,w=m.attrLocation;return w.aNormal=I.length,I.push({index:w.aNormal,typedArray:E,componentsPerAttribute:2,componentDatatype:ei.SHORT,offsetInBytes:0,strideInBytes:x,normalize:!1}),f}function _Si(o,A,f,m){m.texCoordCompressConstant=[],m.minTexCoordValue=[];let C=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT,f+=Uint16Array.BYTES_PER_ELEMENT;for(let y=0;y<C;y++){let x=A.getUint8(f,!0);f+=Uint8Array.BYTES_PER_ELEMENT,f+=Uint8Array.BYTES_PER_ELEMENT*3;let v=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let E=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let I=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let w=A.getFloat32(f,!0);f+=Float32Array.BYTES_PER_ELEMENT,m.texCoordCompressConstant.push(w);let Q={};Q.x=A.getFloat32(f,!0),f+=Float32Array.BYTES_PER_ELEMENT,Q.y=A.getFloat32(f,!0),f+=Float32Array.BYTES_PER_ELEMENT,Q.z=A.getFloat32(f,!0),f+=Float32Array.BYTES_PER_ELEMENT,Q.w=A.getFloat32(f,!0),f+=Float32Array.BYTES_PER_ELEMENT,m.minTexCoordValue.push(Q);let M=v*E*Int16Array.BYTES_PER_ELEMENT,B=new Uint8Array(o,f,M);f+=M;let T=f%4;T!==0&&(f+=4-T);let D="aTexCoord"+y,F=m.vertexAttributes,L=m.attrLocation;if(L[D]=F.length,F.push({index:L[D],typedArray:B,componentsPerAttribute:E,componentDatatype:ei.SHORT,offsetInBytes:0,strideInBytes:E*Int16Array.BYTES_PER_ELEMENT,normalize:!1}),x){M=v*Float32Array.BYTES_PER_ELEMENT;let R=new Uint8Array(o,f,M);f+=M,m.texCoordZMatrix=!0,D="aTexCoordZ"+y,L[D]=F.length,F.push({index:L[D],typedArray:R,componentsPerAttribute:1,componentDatatype:ei.FLOAT,offsetInBytes:0,strideInBytes:Float32Array.BYTES_PER_ELEMENT,normalize:!1})}}return f}function BSi(o,A,f,m){return f=pst(o,A,f,m),f=mst(o,A,f,m),f=Cst(o,A,f,m),f=yst(o,A,f,m),f=xst(o,A,f,m),f=vst(o,A,f,m),f}function wSi(o,A,f,m){let C=A.getUint32(f,!0);return m.compressOptions=C,f+=Uint32Array.BYTES_PER_ELEMENT,(C&_1.SVC_Vertex)===_1.SVC_Vertex?f=ESi(o,A,f,m):f=pst(o,A,f,m),(C&_1.SVC_Normal)===_1.SVC_Normal?f=ISi(o,A,f,m):f=mst(o,A,f,m),f=Cst(o,A,f,m),f=yst(o,A,f,m),(C&_1.SVC_TexutreCoord)===_1.SVC_TexutreCoord?f=_Si(o,A,f,m):f=xst(o,A,f,m),(C&_1.SVC_TexutreCoordIsW)===_1.SVC_TexutreCoordIsW&&(m.textureCoordIsW=!0),f=vst(o,A,f,m),f}function bSi(o,A,f,m){let C=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;for(let y=0;y<C;y++){let x={},v=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let E=A.getUint8(f,!0);f+=Uint8Array.BYTES_PER_ELEMENT;let I=A.getUint8(f,!0);f+=Uint8Array.BYTES_PER_ELEMENT;let w=A.getUint8(f,!0);if(f+=Uint8Array.BYTES_PER_ELEMENT,f+=Uint8Array.BYTES_PER_ELEMENT,v>0){let B=null,T;E===1||E===3?(T=v*Uint32Array.BYTES_PER_ELEMENT,B=new Uint8Array(o,f,T)):(T=v*Uint16Array.BYTES_PER_ELEMENT,B=new Uint8Array(o,f,T),v%2!==0&&(T+=2)),x.indicesTypedArray=B,f+=T}x.indicesCount=v,x.indexType=E,x.primitiveType=w;let Q=[],M=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;for(let B=0;B<M;B++){let T=vH(o,A,f),D=T.string;f=T.bytesOffset,Q.push(D),x.materialCode=D}if(f%4!==0){let B=4-f%4;f+=B}m.push(x)}return f}function QSi(o,A,f,m){let C=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let y=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;for(let v=0;v<y;v++){let E=vH(o,A,f),I=E.string;f=E.bytesOffset;let w=f%4;w!==0&&(f+=4-w);let Q=A.getUint32(f,!0);f+=Int32Array.BYTES_PER_ELEMENT;let M={vertexAttributes:[],attrLocation:{},instanceCount:0,instanceMode:0,instanceIndex:-1};Q===l7e.SV_Standard?f=BSi(o,A,f,M):Q===l7e.SV_Compressed&&(f=wSi(o,A,f,M));let B=[];f=bSi(o,A,f,B),m[I]={vertexPackage:M,arrIndexPackage:B}}let x=A.getUint32(f,!0);return f+=x,f+=Uint32Array.BYTES_PER_ELEMENT,f}function SSi(o,A,f,m){let C=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let y=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;for(let x=0;x<y;x++){let v=vH(o,A,f),E=v.string;f=v.bytesOffset;let I=f%4;I!==0&&(f+=4-I);let w=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let Q=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let M=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let B=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let T=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let D=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let F=new Uint8Array(o,f,T);f+=T,m[E]={id:E,width:Q,height:M,compressType:B,nFormat:D,internalFormat:Gn.RGBA_DXT5,imageBuffer:F}}return f}function DSi(o,A,f,m){let C=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let y=new Uint8Array(o,f,C),x=d2(y);return f+=C,m.materials=JSON.parse(x),f}function TSi(o,A,f,m,C){if((m&1)===1){let y=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let x=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;for(let v=0;v<x;v++){let E=vH(o,A,f),I=E.string;f=E.bytesOffset;let w=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let Q={};C[I].pickInfo=Q;let M=C[I].vertexPackage.instanceIndex;for(let B=0;B<w;B++){let T=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let D=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let F=[];for(let L=0;L<D;L++){let R=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let k=1;M===-1&&(k=A.getUint32(f,!0),f+=Uint32Array.BYTES_PER_ELEMENT),F.push({vertexColorOffset:R,vertexColorCount:k})}Q[T]=F}}}return f}gst.parseBuffer=function(o){let A=0,f={version:void 0,groupNode:void 0,geoPackage:{},matrials:void 0,texturePackage:{}},m=new DataView(o);f.version=m.getFloat32(A,!0),A+=Float32Array.BYTES_PER_ELEMENT;let C=m.getUint32(A,!0);A+=Uint32Array.BYTES_PER_ELEMENT;let y=CSi(o,A);m=new DataView(y),A=0;let x=m.getUint32(A,!0);return A+=Uint32Array.BYTES_PER_ELEMENT,A=vSi(y,m,A,f),A=QSi(y,m,A,f.geoPackage),A=SSi(y,m,A,f.texturePackage),A=DSi(y,m,A,f),TSi(y,m,A,x,f.geoPackage),f};var aDe=gst;function AI(o,A,f,m,C,y,x){this.layer=o,this.parent=A,this.fileName=m,this.isLeafTile=Ae(x,!1),this.boundingVolume=this.createBoundingVolume(f,o.modelMatrix);let v=An.createIfNeeded(o._baseResource);if(O(A))this.baseUri=A.baseUri;else{let E=new An(m);this.baseUri=E.getBaseUri()}this.contentResource=v.getDerivedResource({url:m}),this.serverKey=V1.getServerKey(this.contentResource.getUrlComponent()),this.request=void 0,this.cacheNode=void 0,this.distanceToCamera=0,this.pixel=0,this.visibilityPlaneMask=0,this.visible=!1,this.children=[],this.lodRangeData=C,this.renderEntityMap=y,this.contentState=yD.UNLOADED,this.readerable=!1,this.touchedFrame=0,this.requestedFrame=0,this.selectedFrame=0,this.priority=0}Object.defineProperties(AI.prototype,{renderable:{get:function(){return O(this.renderEntityMap)}}});var Est=new ee;function MSi(o,A){let f=ee.clone(o.center),m=o.radius;f=Xe.multiplyByPoint(A,f,f);let C=Xe.getScale(A,Est),y=ee.maximumComponent(C);return m*=y,new yP(f,m)}function PSi(o,A){let f=new ee(o.min.x,o.min.y,o.min.z);Xe.multiplyByPoint(A,f,f);let m=new ee(o.max.x,o.max.y,o.max.z);Xe.multiplyByPoint(A,m,m);let C=wi.fromCornerPoints(f,m,new wi),y=C.center,x=C.radius,v=Xe.getScale(A,Est),E=ee.maximumComponent(v);return x*=E,new yP(y,x)}AI.prototype.createBoundingVolume=function(o,A){if(this.isLeafTile)return new yP(o.center,o.radius);if(O(o.sphere))return MSi(o.sphere,A);if(O(o.box))return PSi(o.box,A)};AI.prototype.canTraverse=function(){return this.children.length===0||this.isLeafTile?!1:O(this.lodRangeData)?this.pixel>this.lodRangeData:!0};function Ist(o,A){return o.boundingVolume}AI.prototype.getPixel=function(o){let A=this.boundingVolume,f=A.radius,m=A.center,C=ee.distance(o.camera.positionWC,m),y=o.context.drawingBufferHeight,x=o.camera.frustum._fovy*.5;return y*.5/Math.tan(x)*f/C};AI.prototype.distanceToTile=function(o){return Ist(this,o).distanceToCamera(o)};AI.prototype.visibility=function(o,A){let f=Ist(this,o);return o.cullingVolume.computeVisibilityWithPlaneMask(f,A)};AI.prototype.updateVisibility=function(o){let A=this.parent,f=O(A)?A.visibilityPlaneMask:AC.MASK_INDETERMINATE;this.distanceToCamera=this.distanceToTile(o),this.pixel=this.getPixel(o),this.visibilityPlaneMask=this.visibility(o,f),this.visible=this.visibilityPlaneMask!==AC.MASK_OUTSIDE};function RSi(o){return function(){return o.priority}}function LSi(o){return function(A){o.contentState=yD.FAILED,o.contentReadyPromise.reject(A)}}function FSi(o,A){let f=o.layer,m=A.length;for(let C=0;C<m;C++){let y=A[C],x=y.boundingVolume,v=y.rangeDataList;v=o.baseUri+v;let E=y.rangeList,I=y.geoMap,w=new AI(f,o,x,v,E,I,y.isLeafTile);o.children.push(w),o.layer._cache.add(w)}}AI.prototype.requestContent=function(){let o=this,A=this.layer,f=this.contentResource.clone(),m=new cC({throttle:!0,throttleByServer:!0,type:oB.TILES3D,priorityFunction:RSi(this),serverKey:this.serverKey});this.request=m,f.request=m;let C=f.fetchArrayBuffer();if(!O(C))return!1;this.contentState=yD.LOADING,this.contentReadyPromise=rA();let y=LSi(this);return C.then(function(x){if(o.isDestroyed()){y();return}let v=aDe.parseBuffer(x),E=rDe.parse(o.layer,v);FSi(o,E),o.selectedFrame=0,o.contentState=yD.READY,o.contentReadyPromise.resolve(v)}).catch(function(x){if(m.state===CA.CANCELLED){o.contentState=yD.UNLOADED;return}o.contentState=yD.FAILED}),!0};AI.prototype.update=function(o){let A=this.renderEntityMap;for(let f in A)A.hasOwnProperty(f)&&A[f].update(o)};AI.prototype.free=function(){for(let o=0,A=this.children.length;o<A;o++)this.children[o].destroy();this.children.length=0,this.contentState=yD.UNLOADED};AI.prototype.isDestroyed=function(){return!1};AI.prototype.destroy=function(){for(let o in this.renderEntityMap)this.renderEntityMap.hasOwnProperty(o)&&this.renderEntityMap[o].destroy();this.renderEntityMap=void 0;for(let o=0,A=this.children.length;o<A;o++)this.children[o].destroy();return this.children.length=0,Qr(this)};var sDe=AI;function sW(o){o=Ae(o,Ae.EMPTY_OBJECT),of.defined("options.url",o.url),of.defined("options.context",o.context),this.context=o.context,this._url=void 0,this._basePath=void 0,this._baseResource=void 0,this.modelMatrix=void 0,this.fileType=void 0,this._position=void 0,this._rectangle=void 0,this._rootTiles=[],this._schuduler=new oDe,this._requestTiles=[],this._selectedTiles=[],this._cache=new nDe,this._maximumMemoryUsage=-1,this._totalMemoryUsageInBytes=0,this.loadConfig(o.url)}Object.defineProperties(sW.prototype,{ready:{get:function(){return this._rootTiles.length>0}},readyPromise:{get:function(){return this._readyPromise}},rectangle:{get:function(){return this._rectangle}},totalMemoryUsageInBytes:{get:function(){return this._totalMemoryUsageInBytes},set:function(o){this._totalMemoryUsageInBytes=o}},maximumMemoryUsage:{get:function(){return this._maximumMemoryUsage},set:function(o){this._maximumMemoryUsage=o}}});sW.prototype.loadConfig=function(o){let A=this;this._readyPromise=Promise.resolve(o).then(function(f){let m,C=An.createIfNeeded(f);return m=C.getBaseUri(!0),A._url=C.url,A._basePath=m,A._baseResource=C,C.fetchJson()}).then(function(f){let m=f.extensions;A.fileType=m["s3m:FileType"];let C=f.position.x,y=f.position.y,x=f.position.z;A._position=ee.fromDegrees(C,y,x),A.modelMatrix=zn.eastNorthUpToFixedFrame(A._position),A._rectangle=Si.fromDegrees(f.geoBounds.left,f.geoBounds.bottom,f.geoBounds.right,f.geoBounds.top);for(let v=0,E=f.tiles.length;v<E;v++){let I=f.tiles[v].url,w={box:f.tiles[v].boundingbox},Q=new sDe(A,void 0,w,I);A._cache.add(Q),A._rootTiles.push(Q)}return A}).catch(function(f){return f})};function NSi(o,A){return o.priority-A.priority}function kSi(o){let A=o._requestTiles,f=A.length;A.sort(NSi);for(let m=0;m<f;++m)A[m].requestContent()}function OSi(o,A){let f=o._selectedTiles,m=f.length;for(let C=0;C<m;C++)f[C].update(A)}function USi(o,A){}function GSi(o){o._cache.unloadTiles(o,USi)}sW.prototype.prePassesUpdate=function(o){!this.ready||o.newFrame&&this._cache.reset()};sW.prototype.update=function(o){!this.ready||(this._schuduler.scheduler(this,o),kSi(this),OSi(this,o),GSi(this))};var pae=sW,HSi=new ee(1,1,1);function lDe(o){o=Ae(o,HSi),this._dimensions=ee.clone(o)}Object.defineProperties(lDe.prototype,{dimensions:{get:function(){return this._dimensions},set:function(o){ee.clone(o,this._dimensions)}}});var VSi=new ee;lDe.prototype.emit=function(o){let A=this._dimensions,f=ee.multiplyByScalar(A,.5,VSi),m=je.randomBetween(-f.x,f.x),C=je.randomBetween(-f.y,f.y),y=je.randomBetween(-f.z,f.z);o.position=ee.fromElements(m,C,y,o.position),o.velocity=ee.normalize(o.position,o.velocity)};var _st=lDe;function MP(){this.featurePropertiesDirty=!1}Object.defineProperties(MP.prototype,{featuresLength:{get:function(){Ui.throwInstantiationError()}},pointsLength:{get:function(){Ui.throwInstantiationError()}},trianglesLength:{get:function(){Ui.throwInstantiationError()}},geometryByteLength:{get:function(){Ui.throwInstantiationError()}},texturesByteLength:{get:function(){Ui.throwInstantiationError()}},batchTableByteLength:{get:function(){Ui.throwInstantiationError()}},innerContents:{get:function(){Ui.throwInstantiationError()}},readyPromise:{get:function(){Ui.throwInstantiationError()}},tileset:{get:function(){Ui.throwInstantiationError()}},tile:{get:function(){Ui.throwInstantiationError()}},url:{get:function(){Ui.throwInstantiationError()}},batchTable:{get:function(){Ui.throwInstantiationError()}},metadata:{get:function(){Ui.throwInstantiationError()},set:function(o){Ui.throwInstantiationError()}},group:{get:function(){Ui.throwInstantiationError()},set:function(o){Ui.throwInstantiationError()}}});MP.prototype.hasProperty=function(o,A){Ui.throwInstantiationError()};MP.prototype.getFeature=function(o){Ui.throwInstantiationError()};MP.prototype.applyDebugSettings=function(o,A){Ui.throwInstantiationError()};MP.prototype.applyStyle=function(o){Ui.throwInstantiationError()};MP.prototype.update=function(o,A){Ui.throwInstantiationError()};MP.prototype.isDestroyed=function(){Ui.throwInstantiationError()};MP.prototype.destroy=function(){Ui.throwInstantiationError()};var Bst=MP;function uDe(o){o=Ae(o,1),this._radius=Ae(o,1)}Object.defineProperties(uDe.prototype,{radius:{get:function(){return this._radius},set:function(o){this._radius=o}}});uDe.prototype.emit=function(o){let A=je.randomBetween(0,je.TWO_PI),f=je.randomBetween(0,this._radius),m=f*Math.cos(A),C=f*Math.sin(A),y=0;o.position=ee.fromElements(m,C,y,o.position),o.velocity=ee.clone(ee.UNIT_Z,o.velocity)};var cDe=uDe,_me={CUMULUS:0};_me.validate=function(o){return o===_me.CUMULUS};var _ie=Object.freeze(_me);function TQ(o,A){if(o=Ae(o,Ae.EMPTY_OBJECT),this._show=Ae(o.show,!0),this._position=ee.clone(Ae(o.position,ee.ZERO)),!O(o.scale)&&O(o.maximumSize))this._maximumSize=ee.clone(o.maximumSize),this._scale=new Bt(this._maximumSize.x,this._maximumSize.y);else{this._scale=Bt.clone(Ae(o.scale,new Bt(20,12)));let f=new ee(this._scale.x,this._scale.y,Math.min(this._scale.x,this._scale.y)/1.5);this._maximumSize=ee.clone(Ae(o.maximumSize,f))}this._slice=Ae(o.slice,-1),this._color=At.clone(Ae(o.color,At.WHITE)),this._brightness=Ae(o.brightness,1),this._cloudCollection=A,this._index=-1}var zSi=TQ.SHOW_INDEX=0,KSi=TQ.POSITION_INDEX=1,YSi=TQ.SCALE_INDEX=2,JSi=TQ.MAXIMUM_SIZE_INDEX=3,WSi=TQ.SLICE_INDEX=4,jSi=TQ.BRIGHTNESS_INDEX=5,qSi=TQ.COLOR_INDEX=6;TQ.NUMBER_OF_PROPERTIES=7;function mk(o,A){let f=o._cloudCollection;O(f)&&(f._updateCloud(o,A),o._dirty=!0)}Object.defineProperties(TQ.prototype,{show:{get:function(){return this._show},set:function(o){this._show!==o&&(this._show=o,mk(this,zSi))}},position:{get:function(){return this._position},set:function(o){let A=this._position;ee.equals(A,o)||(ee.clone(o,A),mk(this,KSi))}},scale:{get:function(){return this._scale},set:function(o){let A=this._scale;Bt.equals(A,o)||(Bt.clone(o,A),mk(this,YSi))}},maximumSize:{get:function(){return this._maximumSize},set:function(o){let A=this._maximumSize;ee.equals(A,o)||(ee.clone(o,A),mk(this,JSi))}},color:{get:function(){return this._color},set:function(o){let A=this._color;At.equals(A,o)||(At.clone(o,A),mk(this,qSi))}},slice:{get:function(){return this._slice},set:function(o){this._slice!==o&&(this._slice=o,mk(this,WSi))}},brightness:{get:function(){return this._brightness},set:function(o){this._brightness!==o&&(this._brightness=o,mk(this,jSi))}}});TQ.prototype._destroy=function(){this._cloudCollection=void 0};var MQ=TQ,R_,F$=new ee,XSi={positionHighAndScaleX:0,positionLowAndScaleY:1,packedAttribute0:2,packedAttribute1:3,color:4},ZSi={direction:0,positionHighAndScaleX:1,positionLowAndScaleY:2,packedAttribute0:3,packedAttribute1:4,color:5},$Si=MQ.SHOW_INDEX,eDi=MQ.POSITION_INDEX,tDi=MQ.SCALE_INDEX,iDi=MQ.MAXIMUM_SIZE_INDEX,rDi=MQ.SLICE_INDEX,nDi=MQ.BRIGHTNESS_INDEX,oDi=MQ.NUMBER_OF_PROPERTIES,aDi=MQ.COLOR_INDEX;function PQ(o){o=Ae(o,Ae.EMPTY_OBJECT),this._clouds=[],this._cloudsToUpdate=[],this._cloudsToUpdateIndex=0,this._cloudsRemoved=!1,this._createVertexArray=!1,this._propertiesChanged=new Uint32Array(oDi),this._noiseTexture=void 0,this._textureSliceWidth=128,this._noiseTextureRows=4,this.noiseDetail=Ae(o.noiseDetail,16),this.noiseOffset=ee.clone(Ae(o.noiseOffset,ee.ZERO)),this._loading=!1,this._ready=!1;let A=this;this._uniforms={u_noiseTexture:function(){return A._noiseTexture},u_noiseTextureDimensions:wst(A),u_noiseDetail:function(){return A.noiseDetail}},this._vaNoise=void 0,this._spNoise=void 0,this._spCreated=!1,this._sp=void 0,this._rs=void 0,this.show=Ae(o.show,!0),this._colorCommands=[],this.debugBillboards=Ae(o.debugBillboards,!1),this._compiledDebugBillboards=!1,this.debugEllipsoids=Ae(o.debugEllipsoids,!1),this._compiledDebugEllipsoids=!1}function wst(o){return function(){return F$.x=o._textureSliceWidth,F$.y=o._noiseTextureRows,F$.z=1/o._noiseTextureRows,F$}}Object.defineProperties(PQ.prototype,{length:{get:function(){return ADe(this),this._clouds.length}}});function bst(o){let A=o.length;for(let f=0;f<A;++f)o[f]&&o[f]._destroy()}PQ.prototype.add=function(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=Ae(o.cloudType,_ie.CUMULUS),f;return A===_ie.CUMULUS&&(f=new MQ(o,this),f._index=this._clouds.length,this._clouds.push(f),this._createVertexArray=!0),f};PQ.prototype.remove=function(o){return this.contains(o)?(this._clouds[o._index]=void 0,this._cloudsRemoved=!0,this._createVertexArray=!0,o._destroy(),!0):!1};PQ.prototype.removeAll=function(){bst(this._clouds),this._clouds=[],this._cloudsToUpdate=[],this._cloudsToUpdateIndex=0,this._cloudsRemoved=!1,this._createVertexArray=!0};function ADe(o){if(o._cloudsRemoved){o._cloudsRemoved=!1;let A=[],f=o._clouds,m=f.length;for(let C=0,y=0;C<m;++C){let x=f[C];O(x)&&(f._index=y++,A.push(x))}o._clouds=A}}PQ.prototype._updateCloud=function(o,A){o._dirty||(this._cloudsToUpdate[this._cloudsToUpdateIndex++]=o),++this._propertiesChanged[A]};PQ.prototype.contains=function(o){return O(o)&&o._cloudCollection===this};PQ.prototype.get=function(o){return ADe(this),this._clouds[o]};var sDi=new Float32Array([-1,-1,1,-1,1,1,-1,1]),lDi=new Uint16Array([0,1,2,0,2,3]);function uDi(o){let A=vo.createVertexBuffer({context:o,typedArray:sDi,usage:ln.STATIC_DRAW}),f=vo.createIndexBuffer({context:o,typedArray:lDi,usage:ln.STATIC_DRAW,indexDatatype:Nn.UNSIGNED_SHORT}),m=[{index:0,vertexBuffer:A,componentsPerAttribute:2,componentDatatype:ei.FLOAT}];return new Hc({context:o,attributes:m,indexBuffer:f})}var hDe;function cDi(o){let A=o.cache.cloudCollection_indexBufferBatched;if(O(A))return A;let f=16384*6-6,m=new Uint16Array(f);for(let C=0,y=0;C<f;C+=6,y+=4)m[C]=y,m[C+1]=y+1,m[C+2]=y+2,m[C+3]=y,m[C+4]=y+2,m[C+5]=y+3;return A=vo.createIndexBuffer({context:o,typedArray:m,usage:ln.STATIC_DRAW,indexDatatype:Nn.UNSIGNED_SHORT}),A.vertexArrayDestroyable=!1,o.cache.cloudCollection_indexBufferBatched=A,A}function ADi(o){let A=o.cache.cloudCollection_indexBufferInstanced;return O(A)||(A=vo.createIndexBuffer({context:o,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:ln.STATIC_DRAW,indexDatatype:Nn.UNSIGNED_SHORT}),A.vertexArrayDestroyable=!1,o.cache.cloudCollection_indexBufferInstanced=A),A}function hDi(o){let A=o.cache.cloudCollection_vertexBufferInstanced;return O(A)||(A=vo.createVertexBuffer({context:o,typedArray:new Float32Array([0,0,1,0,1,1,0,1]),usage:ln.STATIC_DRAW}),A.vertexArrayDestroyable=!1,o.cache.cloudCollection_vertexBufferInstanced=A),A}function dDi(o,A,f){let m=[{index:R_.positionHighAndScaleX,componentsPerAttribute:4,componentDatatype:ei.FLOAT,usage:ln.STATIC_DRAW},{index:R_.positionLowAndScaleY,componentsPerAttribute:4,componentDatatype:ei.FLOAT,usage:ln.STATIC_DRAW},{index:R_.packedAttribute0,componentsPerAttribute:4,componentDatatype:ei.FLOAT,usage:ln.STATIC_DRAW},{index:R_.packedAttribute1,componentsPerAttribute:4,componentDatatype:ei.FLOAT,usage:ln.STATIC_DRAW},{index:R_.color,componentsPerAttribute:4,componentDatatype:ei.UNSIGNED_BYTE,normalize:!0,usage:ln.STATIC_DRAW}];f&&m.push({index:R_.direction,componentsPerAttribute:2,componentDatatype:ei.FLOAT,vertexBuffer:hDi(o)});let C=f?A:4*A;return new aY(o,m,C,f)}var r0e=new Pu;function Qst(o,A,f,m){let C,y=f[R_.positionHighAndScaleX],x=f[R_.positionLowAndScaleY],v=m.position;Pu.fromCartesian(v,r0e);let E=m.scale,I=r0e.high,w=r0e.low;o._instanced?(C=m._index,y(C,I.x,I.y,I.z,E.x),x(C,w.x,w.y,w.z,E.y)):(C=m._index*4,y(C+0,I.x,I.y,I.z,E.x),y(C+1,I.x,I.y,I.z,E.x),y(C+2,I.x,I.y,I.z,E.x),y(C+3,I.x,I.y,I.z,E.x),x(C+0,w.x,w.y,w.z,E.y),x(C+1,w.x,w.y,w.z,E.y),x(C+2,w.x,w.y,w.z,E.y),x(C+3,w.x,w.y,w.z,E.y))}function Sst(o,A,f,m){let C,y=f[R_.packedAttribute0],x=m.show,v=m.brightness;o._instanced?(C=m._index,y(C,x,v,0,0)):(C=m._index*4,y(C+0,x,v,0,0),y(C+1,x,v,1,0),y(C+2,x,v,1,1),y(C+3,x,v,0,1))}function Dst(o,A,f,m){let C,y=f[R_.packedAttribute1],x=m.maximumSize,v=m.slice;o._instanced?(C=m._index,y(C,x.x,x.y,x.z,v)):(C=m._index*4,y(C+0,x.x,x.y,x.z,v),y(C+1,x.x,x.y,x.z,v),y(C+2,x.x,x.y,x.z,v),y(C+3,x.x,x.y,x.z,v))}function Tst(o,A,f,m){let C,y=f[R_.color],x=m.color,v=At.floatToByte(x.red),E=At.floatToByte(x.green),I=At.floatToByte(x.blue),w=At.floatToByte(x.alpha);o._instanced?(C=m._index,y(C,v,E,I,w)):(C=m._index*4,y(C+0,v,E,I,w),y(C+1,v,E,I,w),y(C+2,v,E,I,w),y(C+3,v,E,I,w))}function fDi(o,A,f,m){Qst(o,A,f,m),Sst(o,A,f,m),Dst(o,A,f,m),Tst(o,A,f,m)}function gDi(o,A,f,m){let C=o,y=C._textureSliceWidth,x=C._noiseTextureRows,v=A.context;C._vaNoise=uDi(v),C._spNoise=_s.fromCache({context:v,vertexShaderSource:f,fragmentShaderSource:m,attributeLocations:{position:0}});let E=C.noiseDetail,I=C.noiseOffset;C._noiseTexture=new yo({context:v,width:y*y/x,height:y*x,pixelDatatype:Qn.UNSIGNED_BYTE,pixelFormat:Gn.RGBA,sampler:new Hs({wrapS:Za.REPEAT,wrapT:Za.REPEAT,minificationFilter:fs.NEAREST,magnificationFilter:Ch.NEAREST})});let w=new B5({vertexArray:C._vaNoise,shaderProgram:C._spNoise,outputTexture:C._noiseTexture,uniformMap:{u_noiseTextureDimensions:wst(C),u_noiseDetail:function(){return E},u_noiseOffset:function(){return I}},persists:!1,owner:o,postExecute:function(Q){C._ready=!0,C._loading=!1}});A.commandList.push(w),C._loading=!0}function pDi(o,A){let f=o,m=A.context;f._createVertexArray=!1,f._vaf=f._vaf&&f._vaf.destroy();let C=o._clouds,y=C.length;if(y>0){f._vaf=dDi(m,y,f._instanced);let x=f._vaf.writers,v;for(v=0;v<y;++v){let E=C[v];fDi(o,A,x,E)}f._vaf.commit(hDe(m))}}var mDi=[];function CDi(o,A){let f=A.context,m=o,C=m._clouds.length,y=m._cloudsToUpdate,x=m._cloudsToUpdateIndex,v=m._propertiesChanged,E=mDi;E.length=0,(v[eDi]||v[tDi])&&E.push(Qst),(v[$Si]||v[nDi])&&E.push(Sst),(v[iDi]||v[rDi])&&E.push(Dst),v[aDi]&&E.push(Tst);let I=E.length,w=m._vaf.writers,Q,M,B;if(x/C>.1){for(Q=0;Q<x;++Q)for(M=y[Q],M._dirty=!1,B=0;B<I;++B)E[B](o,A,w,M);m._vaf.commit(hDe(f))}else{for(Q=0;Q<x;++Q){for(M=y[Q],M._dirty=!1,B=0;B<I;++B)E[B](o,A,w,M);m._instanced?m._vaf.subCommit(M._index,1):m._vaf.subCommit(M._index*4,4)}m._vaf.endSubCommits()}m._cloudsToUpdateIndex=0}function yDi(o,A,f,m){let C=A.context,y=o,x=new Fr({defines:[],sources:[f]});y._instanced&&x.defines.push("INSTANCED");let v=new Fr({defines:[],sources:[m]});y.debugBillboards&&v.defines.push("DEBUG_BILLBOARDS"),y.debugEllipsoids&&v.defines.push("DEBUG_ELLIPSOIDS"),y._sp=_s.replaceCache({context:C,shaderProgram:y._sp,vertexShaderSource:x,fragmentShaderSource:v,attributeLocations:R_}),y._rs=fn.fromCache({depthTest:{enabled:!0,func:Ii.LESS},depthMask:!1,blending:Bu.ALPHA_BLEND}),y._spCreated=!0,y._compiledDebugBillboards=y.debugBillboards,y._compiledDebugEllipsoids=y.debugEllipsoids}function xDi(o,A){let f=o,m=A.passes,C=f._uniforms,y=A.commandList;if(m.render){let x=f._colorCommands,v=f._vaf.va,E=v.length;x.length=E;for(let I=0;I<E;I++){let w=x[I];O(w)||(w=x[I]=new On),w.pass=hr.TRANSLUCENT,w.owner=o,w.uniformMap=C,w.count=v[I].indicesCount,w.vertexArray=v[I].va,w.shaderProgram=f._sp,w.renderState=f._rs,f._instanced&&(w.count=6,w.instanceCount=f._clouds.length),y.push(w)}}}PQ.prototype.update=function(o){if(ADe(this),!this.show)return;let A=this.debugBillboards||this.debugEllipsoids;this._ready=A?!0:O(this._noiseTexture),!this._ready&&!this._loading&&!A&&gDi(this,o,CSe,mSe),this._instanced=o.context.instancedArrays,R_=this._instanced?ZSi:XSi,hDe=this._instanced?ADi:cDi;let f=this._clouds.length,m=this._cloudsToUpdate,C=this._cloudsToUpdateIndex;this._createVertexArray?pDi(this,o):C>0&&CDi(this,o),C>f*1.5&&(m.length=f),!(!O(this._vaf)||!O(this._vaf.va)||!this._ready&!A)&&((!this._spCreated||this.debugBillboards!==this._compiledDebugBillboards||this.debugEllipsoids!==this._compiledDebugEllipsoids)&&yDi(this,o,pSe,gSe),xDi(this,o))};PQ.prototype.isDestroyed=function(){return!1};PQ.prototype.destroy=function(){return this._noiseTexture=this._noiseTexture&&this._noiseTexture.destroy(),this._sp=this._sp&&this._sp.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),bst(this._clouds),Qr(this)};var Mst=PQ,vDi=je.toRadians(30);function dDe(o){this._angle=Ae(o,vDi)}Object.defineProperties(dDe.prototype,{angle:{get:function(){return this._angle},set:function(o){this._angle=o}}});dDe.prototype.emit=function(o){let A=Math.tan(this._angle),f=je.randomBetween(0,je.TWO_PI),m=je.randomBetween(0,A),C=m*Math.cos(f),y=m*Math.sin(f),x=1;o.velocity=ee.fromElements(C,y,x,o.velocity),ee.normalize(o.velocity,o.velocity),o.position=ee.clone(ee.ZERO,o.position)};var EH=dDe,EDi=new At,IDi=new At,_Di=new At,BDi=new At,u7e=new ai,Sz=new Uint8Array(4);function c7e(o,A,f,m){let C=A.height===f.height?0:(o-A.height)/(f.height-A.height);return At.lerp(A.color,f.color,C,m)}function Ree(o,A){return{height:o,color:At.clone(A)}}function Pst(o){return o=o.filter(function(A,f,m){let C=f>0,y=f<m.length-1,x=C?A.height===m[f-1].height:!0,v=y?A.height===m[f+1].height:!0;return!x||!v}),o=o.filter(function(A,f,m){let C=f>0,y=f<m.length-1,x=C?At.equals(A.color,m[f-1].color):!1,v=y?At.equals(A.color,m[f+1].color):!1;return!x||!v}),o=o.filter(function(A,f,m){let C=f>0,y=C?At.equals(A.color,m[f-1].color):!1,x=C?A.height===m[f-1].height:!0;return!y||!x}),o}function wDi(o){let A,f,m=[],C=o.length;for(A=0;A<C;A++){let y=o[A],x=y.entries,v=x.length,E=[];for(f=0;f<v;f++){let B=x[f],T=je.clamp(B.height,ZE._minimumHeight,ZE._maximumHeight),D=At.clone(B.color,EDi);D.red*=D.alpha,D.green*=D.alpha,D.blue*=D.alpha,E.push(Ree(T,D))}let I=!0,w=!0;for(f=0;f<v-1;f++){let B=E[f+0],T=E[f+1];I=I&&B.height<=T.height,w=w&&B.height>=T.height}w?E=E.reverse():I||LJ(E,function(B,T){return je.sign(B.height-T.height)});let Q=Ae(y.extendDownwards,!1),M=Ae(y.extendUpwards,!1);E.length===1&&!Q&&!M&&(Q=!0,M=!0),Q&&E.splice(0,0,Ree(ZE._minimumHeight,E[0].color)),M&&E.splice(E.length,0,Ree(ZE._maximumHeight,E[E.length-1].color)),E=Pst(E),m.push(E)}return m}function bDi(o){let A=wDi(o),f=[],m=[],C;function y(E,I){f.push(Ree(E,I))}function x(E,I,w){let Q=At.multiplyByScalar(w,1-I.alpha,BDi);Q=At.add(Q,I,Q),y(E,Q)}let v=A.length;for(C=0;C<v;C++){let E=A[C],I=0,w=0;m=f,f=[];let Q=E.length,M=m.length;for(;I<Q||w<M;){let B=I<Q?E[I]:void 0,T=I>0?E[I-1]:void 0,D=I<Q-1?E[I+1]:void 0,F=w<M?m[w]:void 0,L=w>0?m[w-1]:void 0,R=w<M-1?m[w+1]:void 0;if(O(B)&&O(F)&&B.height===F.height){let k=O(R)&&F.height===R.height,U=!O(L),V=!O(R),H=O(D)&&B.height===D.height,q=!O(T),ie=!O(D);k?H?(x(B.height,B.color,F.color),x(B.height,D.color,R.color)):q?(y(B.height,F.color),x(B.height,B.color,R.color)):ie?(x(B.height,B.color,F.color),y(B.height,R.color)):(x(B.height,B.color,F.color),x(B.height,B.color,R.color)):U?H?(y(B.height,B.color),x(B.height,D.color,F.color)):ie?(y(B.height,B.color),y(B.height,F.color)):(q||y(B.height,B.color),x(B.height,B.color,F.color)):V?H?(x(B.height,B.color,F.color),y(B.height,D.color)):q?(y(B.height,F.color),y(B.height,B.color)):ie?x(B.height,B.color,F.color):(x(B.height,B.color,F.color),y(B.height,B.color)):H?(x(B.height,B.color,F.color),x(B.height,D.color,F.color)):q?(y(B.height,F.color),x(B.height,B.color,F.color)):ie?(x(B.height,B.color,F.color),y(B.height,F.color)):x(B.height,B.color,F.color),I+=H?2:1,w+=k?2:1}else if(O(B)&&O(F)&&O(L)&&B.height<F.height){let k=c7e(B.height,L,F,_Di);O(T)?O(D)?x(B.height,B.color,k):(x(B.height,B.color,k),y(B.height,k)):(y(B.height,k),x(B.height,B.color,k)),I++}else if(O(F)&&O(B)&&O(T)&&F.height<B.height){let k=c7e(F.height,T,B,IDi);O(L)?O(R)?x(F.height,k,F.color):(x(F.height,k,F.color),y(F.height,k)):(y(F.height,k),x(F.height,k,F.color)),w++}else O(B)&&(!O(F)||B.height<F.height)?(O(F)&&!O(L)&&!O(D)?(y(B.height,B.color),y(B.height,ZE._emptyColor),y(F.height,ZE._emptyColor)):(!O(F)&&O(L)&&!O(T)&&(y(L.height,ZE._emptyColor),y(B.height,ZE._emptyColor)),y(B.height,B.color)),I++):O(F)&&(!O(B)||F.height<B.height)&&(y(F.height,F.color),w++)}}return Pst(f)}function ZE(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.scene,f=o.layers,m=bDi(f),C=m.length,y,x,v,E;if(ZE._useFloatTexture(A.context))for(v=Qn.FLOAT,E=Gn.LUMINANCE,x=new Float32Array(C),y=0;y<C;y++)x[y]=m[y].height;else for(v=Qn.UNSIGNED_BYTE,E=Gn.RGBA,x=new Uint8Array(C*4),y=0;y<C;y++)ai.packFloat(m[y].height,u7e),ai.pack(u7e,x,y*4);let I=yo.create({context:A.context,pixelFormat:E,pixelDatatype:v,source:{arrayBufferView:x,width:C,height:1},sampler:new Hs({wrapS:Za.CLAMP_TO_EDGE,wrapT:Za.CLAMP_TO_EDGE,minificationFilter:fs.NEAREST,magnificationFilter:Ch.NEAREST})}),w=new Uint8Array(C*4);for(y=0;y<C;y++)m[y].color.toBytes(Sz),w[y*4+0]=Sz[0],w[y*4+1]=Sz[1],w[y*4+2]=Sz[2],w[y*4+3]=Sz[3];let Q=yo.create({context:A.context,pixelFormat:Gn.RGBA,pixelDatatype:Qn.UNSIGNED_BYTE,source:{arrayBufferView:w,width:C,height:1},sampler:new Hs({wrapS:Za.CLAMP_TO_EDGE,wrapT:Za.CLAMP_TO_EDGE,minificationFilter:fs.LINEAR,magnificationFilter:Ch.LINEAR})});return as.fromType("ElevationBand",{heights:I,colors:Q})}ZE._useFloatTexture=function(o){return o.floatingPointTexture};ZE._maximumHeight=5906376425472;ZE._minimumHeight=-5906376425472;ZE._emptyColor=new At(0,0,0,0);var Rst=ZE;function QDi(o){o=ia(o,{url:jk.fromAssetId(96188)});let A=new Fx(o),f=o.style;if(!O(f)){let m=Ae(o.defaultColor,At.WHITE).toCssColorString();f=new gY({color:`Boolean(\${feature['cesium#color']}) ? color(\${feature['cesium#color']}) : ${m}`})}return A.style=f,A}var Lst=QDi;function SDi(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=[],f=o.geometry;(!O(f.attributes)||!O(f.primitiveType))&&(f=f.constructor.createGeometry(f));let m=f.attributes,C=Xe.clone(Ae(o.modelMatrix,Xe.IDENTITY)),y=Ae(o.length,1e4);if(O(m.normal)&&A.push(new co({geometry:rc.createLineSegmentsForVectors(f,"normal",y),attributes:{color:new Yo(1,0,0,1)},modelMatrix:C})),O(m.tangent)&&A.push(new co({geometry:rc.createLineSegmentsForVectors(f,"tangent",y),attributes:{color:new Yo(0,1,0,1)},modelMatrix:C})),O(m.bitangent)&&A.push(new co({geometry:rc.createLineSegmentsForVectors(f,"bitangent",y),attributes:{color:new Yo(0,0,1,1)},modelMatrix:C})),A.length>0)return new Xa({asynchronous:!1,geometryInstances:A,appearance:new Va({flat:!0,translucent:!1})})}var Fst=SDi;function lW(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.attributeName,f=o.perInstanceAttribute;O(f)||(f=!1);let m=Ae(o.glslDatatype,"vec3"),C=`v_${A}`,y;if(A==="normal"||A==="tangent"||A==="bitangent")y=`vec4 getColor() { return vec4((${C} + vec3(1.0)) * 0.5, 1.0); }
    `;function ZSe(){this.context=void 0,this.model=void 0,this.index=void 0}ZSe.prototype.set=function(o,A,f){this.context=o,this.model=A,this.index=f};ZSe.prototype.execute=function(){let o=this.context,A=this.index,f=this.model.vertexPackage,m=f.vertexAttributes[A];if(!O(m))throw new Ui("attribute is null");if(f.instanceIndex!==-1&&!O(this.model._instanceBuffer)){if(!O(f.instanceBuffer))throw new Ui("instance buffer is null");this.model.instanceBuffer=vo.createVertexBuffer({context:o,typedArray:f.instanceBuffer,usage:ln.STATIC_DRAW})}if(m.instanceDivisor===1){m.vertexBuffer=this.model.instanceBuffer;return}O(m.vertexBuffer)||(m.vertexBuffer=vo.createVertexBuffer({context:o,typedArray:m.typedArray,usage:ln.STATIC_DRAW}),m.typedArray=null,delete m.typedArray)};var $Se=ZSe;function eDe(){this.model=void 0,this.context=void 0,this.index=0}eDe.prototype.set=function(o,A,f){this.model=A,this.context=o,this.index=f};eDe.prototype.execute=function(){let o=this.context,A=this.model.arrIndexPackage[this.index],f=this.model.vertexPackage.verticesCount;if(!O(A))throw new Ui("index package is null");if(O(A.indexBuffer))return;if(!O(A.indicesTypedArray))throw new Ui("index buffer is null");let m=Nn.UNSIGNED_SHORT;(A.indexType===1||f>=je.SIXTY_FOUR_KILOBYTES)&&o.elementIndexUint&&(m=Nn.UNSIGNED_INT),A.indexBuffer=vo.createIndexBuffer({context:o,typedArray:A.indicesTypedArray,usage:ln.STATIC_DRAW,indexDatatype:m}),A.indicesTypedArray=null,delete A.indicesTypedArray};var tDe=eDe;function xH(o){this.layer=o.layer,this.vertexPackage=o.vertexPackage,this.arrIndexPackage=o.arrIndexPackage,this.vertexBufferToCreate=new d5,this.indexBufferToCreate=new d5;let A,f;for(A=0,f=this.vertexPackage.vertexAttributes.length;A<f;A++)this.vertexBufferToCreate.enqueue(A);for(A=0,f=this.arrIndexPackage.length;A<f;A++)this.indexBufferToCreate.enqueue(A);this.boundingVolume=o.boundingVolume,this.material=o.material,this.modelMatrix=o.modelMatrix,this.shaderProgram=void 0,this.vertexArray=void 0,this.colorCommand=void 0,this.ready=!1}var a7e=new $Se,s7e=new tDe;function XQi(o,A){let f=o.layer.context,m=o.vertexBufferToCreate;for(;m.length;){let C=m.peek();if(a7e.set(f,o,C),!A.jobScheduler.execute(a7e,KE.BUFFER))break;m.dequeue()}}function ZQi(o,A){let f=o.layer.context,m=o.indexBufferToCreate;for(;m.length;){let C=m.peek();if(s7e.set(f,o,C),!A.jobScheduler.execute(s7e,KE.BUFFER))break;m.dequeue()}}xH.prototype.createBuffers=function(o){XQi(this,o),ZQi(this,o)};xH.prototype.createCommand=Ui.throwInstantiationError;xH.prototype.update=Ui.throwInstantiationError;xH.prototype.isDestroyed=Ui.throwInstantiationError;xH.prototype.destroy=Ui.throwInstantiationError;var aW=xH;function bO(o){aW.call(this,o)}bO.prototype=Object.create(aW.prototype);bO.prototype.constructor=aW;function $Qi(o,A,f){let m=new Fr({sources:[qSe]}),C=new Fr({sources:[XSe]});return O(A.aNormal)&&(m.defines.push("VertexNormal"),C.defines.push("VertexNormal")),f.textures.length>0&&(m.defines.push("TexCoord"),C.defines.push("TexCoord")),f.textures.length===2&&(m.defines.push("TexCoord2"),C.defines.push("TexCoord2")),_s.fromCache({context:o,vertexShaderSource:m,fragmentShaderSource:C,attributeLocations:A})}function eSi(){return fn.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:nI.LESS_OR_EQUAL}})}function tSi(){return fn.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:nI.LESS_OR_EQUAL},blending:Bu.ALPHA_BLEND})}function iSi(o){return{uTexture:function(){return o.textures[0]},uTextureWidth:function(){return o.textures[0]._width},uTexture2:function(){return o.textures[1]},uTexture2Width:function(){return o.textures[1]._width},uDiffuseColor:function(){return o.diffuseColor},uAmbientColor:function(){return o.ambientColor}}}bO.prototype.createCommand=function(){if(O(this.colorCommand))return;let o=this.layer.context,A=this.vertexPackage,f=this.arrIndexPackage,m=A.vertexAttributes,C=A.attrLocation;if(f.length<1)return;let y=f[0],x=this.material;this.shaderProgram=$Qi(o,C,x),this.vertexArray=new Hc({context:o,attributes:m,indexBuffer:y.indexBuffer}),this.colorCommand=new On({primitiveType:y.primitiveType,modelMatrix:this.modelMatrix,boundingVolume:wi.clone(this.boundingVolume),pickId:"vSecondColor",vertexArray:this.vertexArray,shaderProgram:this.shaderProgram,pass:x.bTransparentSorting?hr.TRANSLUCENT:hr.CESIUM_3D_TILE,renderState:x.bTransparentSorting?tSi():eSi()}),this.colorCommand.uniformMap=iSi(x),this.vertexPackage=null,this.arrIndexPackage=null,this.ready=!0};bO.prototype.update=function(o){if(!this.ready){this.createBuffers(o),this.createCommand(o);return}o.commandList.push(this.colorCommand)};bO.prototype.isDestroyed=function(){return!1};bO.prototype.destroy=function(){return this.shaderProgram=this.shaderProgram&&!this.shaderProgram.isDestroyed()&&this.shaderProgram.destroy(),this.vertexArray=this.vertexArray&&!this.vertexArray.isDestroyed()&&this.vertexArray.destroy(),this.colorCommand=void 0,this.vertexPackage=null,this.arrIndexPackage=null,Qr(this)};var Iie=bO,rSi={OSGBFile:function(o){return new Iie(o)},OSGBCacheFile:function(o){return new Iie(o)}},iDe=rSi,nSi={SVC_Vertex:1,SVC_Normal:2,SVC_VertexColor:4,SVC_SecondColor:8,SVC_TexutreCoord:16,SVC_TexutreCoordIsW:32},_1=Object.freeze(nSi);function dst(){}function oSi(o,A){let f={},m=A.materials.material;for(let C=0,y=m.length;C<y;C++){let x=m[C].material,v=x.id,E=new jSe;f[v]=E;let I=x.ambient;E.ambientColor=new At(I.r,I.g,I.b,I.a);let w=x.diffuse;E.diffuseColor=new At(w.r,w.g,w.b,w.a);let Q=x.specular;E.specularColor=new At(Q.r,Q.g,Q.b,Q.a),E.shininess=x.shininess,E.bTransparentSorting=x.transparentsorting;let M=x.textureunitstates,B=M.length;for(let T=0;T<B;T++){let D=M[T].textureunitstate,F=D.id,L=D.addressmode.u===0?Za.REPEAT:Za.CLAMP_TO_EDGE,R=D.addressmode.v===0?Za.REPEAT:Za.CLAMP_TO_EDGE;E.texMatrix=Xe.unpack(D.texmodmatrix);let k=A.texturePackage[F];if(O(k)&&k.imageBuffer.byteLength>0){k.wrapS=L,k.wrapT=R;let U=new JSe(o,F,k);E.textures.push(U)}}}return f}function aSi(o,A){let f=new wi,m=new ee,C=o.vertexAttributes[0],y=C.componentsPerAttribute,x=O(o.nCompressOptions)&&(o.nCompressOptions&_1.SVC_Vertex)===_1.SVC_Vertex,v=1,E,I;x?(v=o.vertCompressConstant,E=new ee(o.minVerticesValue.x,o.minVerticesValue.y,o.minVerticesValue.z),I=new Uint16Array(C.typedArray.buffer,C.typedArray.byteOffset,C.typedArray.byteLength/2)):I=new Float32Array(C.typedArray.buffer,C.typedArray.byteOffset,C.typedArray.byteLength/4);let w=[];for(let Q=0;Q<o.verticesCount;Q++)ee.fromArray(I,y*Q,m),x&&(m=ee.multiplyByScalar(m,v,m),m=ee.add(m,E,m)),w.push(ee.clone(m));return wi.fromPoints(w,f),wi.transform(f,A,f),w.length=0,f}function sSi(o,A,f,m,C){let y={},x=m.geodes;for(let v=0,E=x.length;v<E;v++){let I=x[v],w=I.matrix,Q=Xe.multiply(o.modelMatrix,w,new Xe),M;O(C.boundingVolume)&&(M=new wi(C.boundingVolume.sphere.center,C.boundingVolume.sphere.radius),wi.transform(M,o.modelMatrix,M));let B=I.skeletonNames;for(let T=0,D=B.length;T<D;T++){let F=B[T],L=A.geoPackage[F],R=L.vertexPackage,k=L.arrIndexPackage,U=L.pickInfo,V;k.length>0&&(V=f[k[0].materialCode]);let H=O(M)?M:aSi(R,Q);y[F]=iDe[o.fileType]({layer:o,vertexPackage:R,arrIndexPackage:k,pickInfo:U,modelMatrix:Q,boundingVolume:H,material:V})}}if(!O(C.boundingVolume)){let v=[];for(let E in y)y.hasOwnProperty(E)&&v.push(y[E].boundingVolume);C.boundingVolume=wi.fromBoundingSpheres(v)}C.geoMap=y}function lSi(o,A,f){let m=A.groupNode,C=[];for(let y=0,x=m.pageLods.length;y<x;y++){let v={},E=m.pageLods[y];v.rangeMode=E.rangeMode,v.rangeDataList=E.childTile,v.rangeList=E.rangeList;let I=E.boundingSphere.center,w=E.boundingSphere.radius;v.rangeDataList!==""?v.boundingVolume={sphere:{center:new ee(I.x,I.y,I.z),radius:w}}:v.isLeafTile=!0,sSi(o,A,f,E,v),C.push(v)}return C}dst.parse=function(o,A){if(!O(A))return;let f=oSi(o.context,A);return lSi(o,A,f)};var rDe=dst;function QO(){this._list=new Jne,this._sentinel=this._list.add(),this._trimTiles=!1}QO.prototype.reset=function(){this._list.splice(this._list.tail,this._sentinel)};QO.prototype.touch=function(o){let A=o.cacheNode;O(A)&&this._list.splice(this._sentinel,A)};QO.prototype.add=function(o){O(o.cacheNode)||(o.cacheNode=this._list.add(o))};QO.prototype.unloadTile=function(o,A,f){let m=A.cacheNode;!O(m)||(this._list.remove(m),A.cacheNode=void 0,f(o,A))};QO.prototype.unloadTiles=function(o,A){let f=this._trimTiles;this._trimTiles=!1;let m=this._list,C=o.maximumMemoryUsage*1024*1024,y=this._sentinel,x=m.head;for(;x!==y&&(o.totalMemoryUsageInBytes>C||f);){let v=x.item;x=x.next,v.isDestroyed()&&console.log(v),this.unloadTile(o,v,A)}};QO.prototype.trim=function(){this._trimTiles=!0};var nDe=QO,uSi={UNLOADED:0,LOADING:1,PARSING:2,READY:3,FAILED:4},yD=Object.freeze(uSi);function fst(){this._stack=[]}function cSi(o,A,f){A.length=0;for(let m=0,C=o._rootTiles.length;m<C;m++){let y=o._rootTiles[m];y.updateVisibility(f),y.visible&&A.push(y)}}function ASi(o,A){return o.distanceToCamera-A.distanceToCamera}function hSi(o,A,f,m){let C,y=A.children,x=y.length;for(C=0;C<x;++C)y[C].updateVisibility(m);for(y.sort(ASi),C=0;C<x;++C){let v=y[C];v.visible&&f.push(v)}}function dSi(o,A,f){A.renderable&&(o._selectedTiles.push(A),A.selectedFrame=f.frameNumber)}function fSi(o,A,f){A.requestedFrame===f.frameNumber||A.contentState!==yD.UNLOADED||A.isLeafTile||(o._requestTiles.push(A),A.requestedFrame=f.frameNumber)}function gSi(o,A,f){A.touchedFrame!==f.frameNumber&&(o._cache.touch(A),A.touchedFrame=f.frameNumber)}function pSi(o,A,f){for(;A.length;){let m=A.pop();if(m.visible){if(gSi(o,m,f),m.canTraverse()){hSi(o,m,A,f);continue}dSi(o,m,f),fSi(o,m,f)}}}fst.prototype.scheduler=function(o,A){o._requestTiles.length=0,o._selectedTiles.length=0;let f=this._stack;cSi(o,f,A),pSi(o,f,A)};var oDe=fst,mSi=xh(v7e(),1);function gst(){}var l7e={SV_Unkown:0,SV_Standard:1,SV_Compressed:2};function CSi(o,A){let f=new Uint8Array(o,A);return mSi.default.inflate(f).buffer}function vH(o,A,f){let m=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let C=new Uint8Array(o,f,m),y=d2(C);return f+=m,{string:y,bytesOffset:f}}function ySi(o,A,f,m){let C={},y=[],x=new Array(16);for(let E=0;E<16;E++)x[E]=A.getFloat64(f,!0),f+=Float64Array.BYTES_PER_ELEMENT;C.matrix=x,C.skeletonNames=y;let v=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;for(let E=0;E<v;E++){let I=vH(o,A,f);y.push(I.string),f=I.bytesOffset}return m.push(C),f}function xSi(o,A,f,m){let C={};C.rangeList=A.getFloat32(f,!0),f+=Float32Array.BYTES_PER_ELEMENT,C.rangeMode=A.getUint16(f,!0),f+=Uint16Array.BYTES_PER_ELEMENT;let y={};y.x=A.getFloat64(f,!0),f+=Float64Array.BYTES_PER_ELEMENT,y.y=A.getFloat64(f,!0),f+=Float64Array.BYTES_PER_ELEMENT,y.z=A.getFloat64(f,!0),f+=Float64Array.BYTES_PER_ELEMENT;let x=A.getFloat64(f,!0);f+=Float64Array.BYTES_PER_ELEMENT,C.boundingSphere={center:y,radius:x};let v=vH(o,A,f),E=v.string;f=v.bytesOffset;let I=E.indexOf("Geometry");if(I!==-1){let Q=E.substring(I);E=E.replace(Q,"")}C.childTile=E,C.geodes=[];let w=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;for(let Q=0;Q<w;Q++)f=ySi(o,A,f,C.geodes);return m.push(C),f}function vSi(o,A,f,m){let C={},y=[],x=[],v=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let E=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;for(let w=0;w<E;w++)f=xSi(o,A,f,x);C.pageLods=x;let I=f%4;return I!==0&&(f+=4-I),m.groupNode=C,f}function pst(o,A,f,m){let C=A.getUint32(f,!0);if(m.verticesCount=C,f+=Uint32Array.BYTES_PER_ELEMENT,f<=0)return f;let y=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let x=A.getUint16(f,!0);x=y*Float32Array.BYTES_PER_ELEMENT,f+=Uint16Array.BYTES_PER_ELEMENT;let v=C*y*Float32Array.BYTES_PER_ELEMENT,E=new Uint8Array(o,f,v);f+=v;let I=m.vertexAttributes,w=m.attrLocation;return w.aPosition=I.length,I.push({index:w.aPosition,typedArray:E,componentsPerAttribute:y,componentDatatype:ei.FLOAT,offsetInBytes:0,strideInBytes:x,normalize:!1}),f}function mst(o,A,f,m){let C=A.getUint32(f,!0);if(f+=Uint32Array.BYTES_PER_ELEMENT,C<=0)return f;let y=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let x=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let v=C*y*Float32Array.BYTES_PER_ELEMENT,E=new Uint8Array(o,f,v);f+=v;let I=m.vertexAttributes,w=m.attrLocation;return w.aNormal=I.length,I.push({index:w.aNormal,typedArray:E,componentsPerAttribute:y,componentDatatype:ei.FLOAT,offsetInBytes:0,strideInBytes:x,normalize:!1}),f}function Cst(o,A,f,m){let C=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let y=m.verticesCount,x;if(C>0){let I=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT,f+=Uint8Array.BYTES_PER_ELEMENT*2;let w=C*Uint8Array.BYTES_PER_ELEMENT*4;x=new Uint8Array(o,f,w).slice(0,w),f+=w}else{x=new Uint8Array(4*y);for(let I=0;I<y;I++)x[I*4]=255,x[I*4+1]=255,x[I*4+2]=255,x[I*4+3]=255}let v=m.vertexAttributes,E=m.attrLocation;return E.aColor=v.length,v.push({index:E.aColor,typedArray:x,componentsPerAttribute:4,componentDatatype:ei.UNSIGNED_BYTE,offsetInBytes:0,strideInBytes:4,normalize:!0}),m.vertexColor=x,f}function yst(o,A,f,m){let C=A.getUint32(f,!0);if(f+=Uint32Array.BYTES_PER_ELEMENT,C<=0)return f;let y=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT,f+=Uint8Array.BYTES_PER_ELEMENT*2;let x=C*Uint8Array.BYTES_PER_ELEMENT*4,v=new Uint8Array(o,f,x);f+=x;let E=m.vertexAttributes,I=m.attrLocation;return I.aSecondColor=E.length,E.push({index:I.aSecondColor,typedArray:v,componentsPerAttribute:4,componentDatatype:ei.UNSIGNED_BYTE,offsetInBytes:0,strideInBytes:4,normalize:!0}),f}function xst(o,A,f,m){let C=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT,f+=Uint16Array.BYTES_PER_ELEMENT;for(let y=0;y<C;y++){let x=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let v=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let E=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let I=x*v*Float32Array.BYTES_PER_ELEMENT,w=new Uint8Array(o,f,I);f+=I;let Q="aTexCoord"+y,M=m.vertexAttributes,B=m.attrLocation;B[Q]=M.length,M.push({index:B[Q],typedArray:w,componentsPerAttribute:v,componentDatatype:ei.FLOAT,offsetInBytes:0,strideInBytes:v*Float32Array.BYTES_PER_ELEMENT,normalize:!1})}return f}function vst(o,A,f,m){let C=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT,f+=Uint16Array.BYTES_PER_ELEMENT;let y=m.vertexAttributes,x=m.attrLocation;for(let v=0;v<C;v++){let E=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let I=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let w=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let Q=E*I*Float32Array.BYTES_PER_ELEMENT;if(I===17||I===29){let M=new Uint8Array(o,f,Q);m.instanceCount=E,m.instanceMode=I,m.instanceBuffer=M,m.instanceIndex=1;let B=I*E*4,T=M.slice(0,B);m.vertexColorInstance=T;let D;I===17?(D=Float32Array.BYTES_PER_ELEMENT*17,x.uv2=y.length,y.push({index:x.uv2,componentsPerAttribute:4,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:D,instanceDivisor:1}),x.uv3=y.length,y.push({index:x.uv3,componentsPerAttribute:4,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:4*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}),x.uv4=y.length,y.push({index:x.uv4,componentsPerAttribute:4,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:8*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}),x.uv5=y.length,y.push({index:x.uv5,componentsPerAttribute:4,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:12*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}),x.uv6=y.length,y.push({index:x.uv6,componentsPerAttribute:4,componentDatatype:ei.UNSIGNED_BYTE,normalize:!0,offsetInBytes:16*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1})):I===29&&(D=Float32Array.BYTES_PER_ELEMENT*29,x.uv1=y.length,y.push({index:x.uv1,componentsPerAttribute:4,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:D,instanceDivisor:1,byteLength:Q}),x.uv2=y.length,y.push({index:x.uv2,componentsPerAttribute:4,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:4*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}),x.uv3=y.length,y.push({index:x.uv3,componentsPerAttribute:4,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:8*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}),x.uv4=y.length,y.push({index:x.uv4,componentsPerAttribute:4,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:12*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}),x.uv5=y.length,y.push({index:x.uv5,componentsPerAttribute:4,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:16*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}),x.uv6=y.length,y.push({index:x.uv6,componentsPerAttribute:4,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:20*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}),x.uv7=y.length,y.push({index:x.uv7,componentsPerAttribute:3,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:24*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}),x.uv8=y.length,y.push({index:x.uv8,componentsPerAttribute:4,componentDatatype:ei.UNSIGNED_BYTE,normalize:!0,offsetInBytes:27*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}),x.uv9=y.length,y.push({index:x.uv9,componentsPerAttribute:4,componentDatatype:ei.UNSIGNED_BYTE,normalize:!0,offsetInBytes:28*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}))}else{let M=E*I;m.instanceBounds=new Float32Array(M);for(let B=0;B<M;B++)m.instanceBounds[B]=A.getFloat32(f,!0)}f+=Q}return f}function ESi(o,A,f,m){let C=A.getUint32(f,!0);if(m.verticesCount=C,f+=Uint32Array.BYTES_PER_ELEMENT,f<=0)return f;let y=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let x=A.getUint16(f,!0);x=y*Int16Array.BYTES_PER_ELEMENT,f+=Uint16Array.BYTES_PER_ELEMENT;let v=A.getFloat32(f,!0);f+=Float32Array.BYTES_PER_ELEMENT;let E={};E.x=A.getFloat32(f,!0),f+=Float32Array.BYTES_PER_ELEMENT,E.y=A.getFloat32(f,!0),f+=Float32Array.BYTES_PER_ELEMENT,E.z=A.getFloat32(f,!0),f+=Float32Array.BYTES_PER_ELEMENT,E.w=A.getFloat32(f,!0),f+=Float32Array.BYTES_PER_ELEMENT,m.vertCompressConstant=v,m.minVerticesValue=E;let I=C*y*Int16Array.BYTES_PER_ELEMENT,w=new Uint8Array(o,f,I);f+=I;let Q=m.vertexAttributes,M=m.attrLocation;return M.aPosition=Q.length,Q.push({index:M.aPosition,typedArray:w,componentsPerAttribute:y,componentDatatype:ei.SHORT,offsetInBytes:0,strideInBytes:x,normalize:!1}),f}function ISi(o,A,f,m){let C=A.getUint32(f,!0);if(f+=Uint32Array.BYTES_PER_ELEMENT,C<=0)return f;let y=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let x=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let v=C*2*Int16Array.BYTES_PER_ELEMENT,E=new Uint8Array(o,f,v);f+=v;let I=m.vertexAttributes,w=m.attrLocation;return w.aNormal=I.length,I.push({index:w.aNormal,typedArray:E,componentsPerAttribute:2,componentDatatype:ei.SHORT,offsetInBytes:0,strideInBytes:x,normalize:!1}),f}function _Si(o,A,f,m){m.texCoordCompressConstant=[],m.minTexCoordValue=[];let C=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT,f+=Uint16Array.BYTES_PER_ELEMENT;for(let y=0;y<C;y++){let x=A.getUint8(f,!0);f+=Uint8Array.BYTES_PER_ELEMENT,f+=Uint8Array.BYTES_PER_ELEMENT*3;let v=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let E=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let I=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let w=A.getFloat32(f,!0);f+=Float32Array.BYTES_PER_ELEMENT,m.texCoordCompressConstant.push(w);let Q={};Q.x=A.getFloat32(f,!0),f+=Float32Array.BYTES_PER_ELEMENT,Q.y=A.getFloat32(f,!0),f+=Float32Array.BYTES_PER_ELEMENT,Q.z=A.getFloat32(f,!0),f+=Float32Array.BYTES_PER_ELEMENT,Q.w=A.getFloat32(f,!0),f+=Float32Array.BYTES_PER_ELEMENT,m.minTexCoordValue.push(Q);let M=v*E*Int16Array.BYTES_PER_ELEMENT,B=new Uint8Array(o,f,M);f+=M;let T=f%4;T!==0&&(f+=4-T);let D="aTexCoord"+y,F=m.vertexAttributes,L=m.attrLocation;if(L[D]=F.length,F.push({index:L[D],typedArray:B,componentsPerAttribute:E,componentDatatype:ei.SHORT,offsetInBytes:0,strideInBytes:E*Int16Array.BYTES_PER_ELEMENT,normalize:!1}),x){M=v*Float32Array.BYTES_PER_ELEMENT;let R=new Uint8Array(o,f,M);f+=M,m.texCoordZMatrix=!0,D="aTexCoordZ"+y,L[D]=F.length,F.push({index:L[D],typedArray:R,componentsPerAttribute:1,componentDatatype:ei.FLOAT,offsetInBytes:0,strideInBytes:Float32Array.BYTES_PER_ELEMENT,normalize:!1})}}return f}function BSi(o,A,f,m){return f=pst(o,A,f,m),f=mst(o,A,f,m),f=Cst(o,A,f,m),f=yst(o,A,f,m),f=xst(o,A,f,m),f=vst(o,A,f,m),f}function wSi(o,A,f,m){let C=A.getUint32(f,!0);return m.compressOptions=C,f+=Uint32Array.BYTES_PER_ELEMENT,(C&_1.SVC_Vertex)===_1.SVC_Vertex?f=ESi(o,A,f,m):f=pst(o,A,f,m),(C&_1.SVC_Normal)===_1.SVC_Normal?f=ISi(o,A,f,m):f=mst(o,A,f,m),f=Cst(o,A,f,m),f=yst(o,A,f,m),(C&_1.SVC_TexutreCoord)===_1.SVC_TexutreCoord?f=_Si(o,A,f,m):f=xst(o,A,f,m),(C&_1.SVC_TexutreCoordIsW)===_1.SVC_TexutreCoordIsW&&(m.textureCoordIsW=!0),f=vst(o,A,f,m),f}function bSi(o,A,f,m){let C=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;for(let y=0;y<C;y++){let x={},v=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let E=A.getUint8(f,!0);f+=Uint8Array.BYTES_PER_ELEMENT;let I=A.getUint8(f,!0);f+=Uint8Array.BYTES_PER_ELEMENT;let w=A.getUint8(f,!0);if(f+=Uint8Array.BYTES_PER_ELEMENT,f+=Uint8Array.BYTES_PER_ELEMENT,v>0){let B=null,T;E===1||E===3?(T=v*Uint32Array.BYTES_PER_ELEMENT,B=new Uint8Array(o,f,T)):(T=v*Uint16Array.BYTES_PER_ELEMENT,B=new Uint8Array(o,f,T),v%2!==0&&(T+=2)),x.indicesTypedArray=B,f+=T}x.indicesCount=v,x.indexType=E,x.primitiveType=w;let Q=[],M=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;for(let B=0;B<M;B++){let T=vH(o,A,f),D=T.string;f=T.bytesOffset,Q.push(D),x.materialCode=D}if(f%4!==0){let B=4-f%4;f+=B}m.push(x)}return f}function QSi(o,A,f,m){let C=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let y=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;for(let v=0;v<y;v++){let E=vH(o,A,f),I=E.string;f=E.bytesOffset;let w=f%4;w!==0&&(f+=4-w);let Q=A.getUint32(f,!0);f+=Int32Array.BYTES_PER_ELEMENT;let M={vertexAttributes:[],attrLocation:{},instanceCount:0,instanceMode:0,instanceIndex:-1};Q===l7e.SV_Standard?f=BSi(o,A,f,M):Q===l7e.SV_Compressed&&(f=wSi(o,A,f,M));let B=[];f=bSi(o,A,f,B),m[I]={vertexPackage:M,arrIndexPackage:B}}let x=A.getUint32(f,!0);return f+=x,f+=Uint32Array.BYTES_PER_ELEMENT,f}function SSi(o,A,f,m){let C=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let y=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;for(let x=0;x<y;x++){let v=vH(o,A,f),E=v.string;f=v.bytesOffset;let I=f%4;I!==0&&(f+=4-I);let w=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let Q=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let M=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let B=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let T=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let D=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let F=new Uint8Array(o,f,T);f+=T,m[E]={id:E,width:Q,height:M,compressType:B,nFormat:D,internalFormat:Gn.RGBA_DXT5,imageBuffer:F}}return f}function DSi(o,A,f,m){let C=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let y=new Uint8Array(o,f,C),x=d2(y);return f+=C,m.materials=JSON.parse(x),f}function TSi(o,A,f,m,C){if((m&1)===1){let y=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let x=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;for(let v=0;v<x;v++){let E=vH(o,A,f),I=E.string;f=E.bytesOffset;let w=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let Q={};C[I].pickInfo=Q;let M=C[I].vertexPackage.instanceIndex;for(let B=0;B<w;B++){let T=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let D=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let F=[];for(let L=0;L<D;L++){let R=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let k=1;M===-1&&(k=A.getUint32(f,!0),f+=Uint32Array.BYTES_PER_ELEMENT),F.push({vertexColorOffset:R,vertexColorCount:k})}Q[T]=F}}}return f}gst.parseBuffer=function(o){let A=0,f={version:void 0,groupNode:void 0,geoPackage:{},matrials:void 0,texturePackage:{}},m=new DataView(o);f.version=m.getFloat32(A,!0),A+=Float32Array.BYTES_PER_ELEMENT;let C=m.getUint32(A,!0);A+=Uint32Array.BYTES_PER_ELEMENT;let y=CSi(o,A);m=new DataView(y),A=0;let x=m.getUint32(A,!0);return A+=Uint32Array.BYTES_PER_ELEMENT,A=vSi(y,m,A,f),A=QSi(y,m,A,f.geoPackage),A=SSi(y,m,A,f.texturePackage),A=DSi(y,m,A,f),TSi(y,m,A,x,f.geoPackage),f};var aDe=gst;function AI(o,A,f,m,C,y,x){this.layer=o,this.parent=A,this.fileName=m,this.isLeafTile=Ae(x,!1),this.boundingVolume=this.createBoundingVolume(f,o.modelMatrix);let v=An.createIfNeeded(o._baseResource);if(O(A))this.baseUri=A.baseUri;else{let E=new An(m);this.baseUri=E.getBaseUri()}this.contentResource=v.getDerivedResource({url:m}),this.serverKey=V1.getServerKey(this.contentResource.getUrlComponent()),this.request=void 0,this.cacheNode=void 0,this.distanceToCamera=0,this.pixel=0,this.visibilityPlaneMask=0,this.visible=!1,this.children=[],this.lodRangeData=C,this.renderEntityMap=y,this.contentState=yD.UNLOADED,this.readerable=!1,this.touchedFrame=0,this.requestedFrame=0,this.selectedFrame=0,this.priority=0}Object.defineProperties(AI.prototype,{renderable:{get:function(){return O(this.renderEntityMap)}}});var Est=new ee;function MSi(o,A){let f=ee.clone(o.center),m=o.radius;f=Xe.multiplyByPoint(A,f,f);let C=Xe.getScale(A,Est),y=ee.maximumComponent(C);return m*=y,new yP(f,m)}function PSi(o,A){let f=new ee(o.min.x,o.min.y,o.min.z);Xe.multiplyByPoint(A,f,f);let m=new ee(o.max.x,o.max.y,o.max.z);Xe.multiplyByPoint(A,m,m);let C=wi.fromCornerPoints(f,m,new wi),y=C.center,x=C.radius,v=Xe.getScale(A,Est),E=ee.maximumComponent(v);return x*=E,new yP(y,x)}AI.prototype.createBoundingVolume=function(o,A){if(this.isLeafTile)return new yP(o.center,o.radius);if(O(o.sphere))return MSi(o.sphere,A);if(O(o.box))return PSi(o.box,A)};AI.prototype.canTraverse=function(){return this.children.length===0||this.isLeafTile?!1:O(this.lodRangeData)?this.pixel>this.lodRangeData:!0};function Ist(o,A){return o.boundingVolume}AI.prototype.getPixel=function(o){let A=this.boundingVolume,f=A.radius,m=A.center,C=ee.distance(o.camera.positionWC,m),y=o.context.drawingBufferHeight,x=o.camera.frustum._fovy*.5;return y*.5/Math.tan(x)*f/C};AI.prototype.distanceToTile=function(o){return Ist(this,o).distanceToCamera(o)};AI.prototype.visibility=function(o,A){let f=Ist(this,o);return o.cullingVolume.computeVisibilityWithPlaneMask(f,A)};AI.prototype.updateVisibility=function(o){let A=this.parent,f=O(A)?A.visibilityPlaneMask:AC.MASK_INDETERMINATE;this.distanceToCamera=this.distanceToTile(o),this.pixel=this.getPixel(o),this.visibilityPlaneMask=this.visibility(o,f),this.visible=this.visibilityPlaneMask!==AC.MASK_OUTSIDE};function RSi(o){return function(){return o.priority}}function LSi(o){return function(A){o.contentState=yD.FAILED,o.contentReadyPromise.reject(A)}}function FSi(o,A){let f=o.layer,m=A.length;for(let C=0;C<m;C++){let y=A[C],x=y.boundingVolume,v=y.rangeDataList;v=o.baseUri+v;let E=y.rangeList,I=y.geoMap,w=new AI(f,o,x,v,E,I,y.isLeafTile);o.children.push(w),o.layer._cache.add(w)}}AI.prototype.requestContent=function(){let o=this,A=this.layer,f=this.contentResource.clone(),m=new cC({throttle:!0,throttleByServer:!0,type:oB.TILES3D,priorityFunction:RSi(this),serverKey:this.serverKey});this.request=m,f.request=m;let C=f.fetchArrayBuffer();if(!O(C))return!1;this.contentState=yD.LOADING,this.contentReadyPromise=rA();let y=LSi(this);return C.then(function(x){if(o.isDestroyed()){y();return}let v=aDe.parseBuffer(x),E=rDe.parse(o.layer,v);FSi(o,E),o.selectedFrame=0,o.contentState=yD.READY,o.contentReadyPromise.resolve(v)}).catch(function(x){if(m.state===CA.CANCELLED){o.contentState=yD.UNLOADED;return}o.contentState=yD.FAILED}),!0};AI.prototype.update=function(o){let A=this.renderEntityMap;for(let f in A)A.hasOwnProperty(f)&&A[f].update(o)};AI.prototype.free=function(){for(let o=0,A=this.children.length;o<A;o++)this.children[o].destroy();this.children.length=0,this.contentState=yD.UNLOADED};AI.prototype.isDestroyed=function(){return!1};AI.prototype.destroy=function(){for(let o in this.renderEntityMap)this.renderEntityMap.hasOwnProperty(o)&&this.renderEntityMap[o].destroy();this.renderEntityMap=void 0;for(let o=0,A=this.children.length;o<A;o++)this.children[o].destroy();return this.children.length=0,Qr(this)};var sDe=AI;function sW(o){o=Ae(o,Ae.EMPTY_OBJECT),of.defined("options.url",o.url),of.defined("options.context",o.context),this.context=o.context,this._url=void 0,this._basePath=void 0,this._baseResource=void 0,this.modelMatrix=void 0,this.fileType=void 0,this._position=void 0,this._rectangle=void 0,this._rootTiles=[],this._schuduler=new oDe,this._requestTiles=[],this._selectedTiles=[],this._cache=new nDe,this._maximumMemoryUsage=-1,this._totalMemoryUsageInBytes=0,this.loadConfig(o.url)}Object.defineProperties(sW.prototype,{ready:{get:function(){return this._rootTiles.length>0}},readyPromise:{get:function(){return this._readyPromise}},rectangle:{get:function(){return this._rectangle}},totalMemoryUsageInBytes:{get:function(){return this._totalMemoryUsageInBytes},set:function(o){this._totalMemoryUsageInBytes=o}},maximumMemoryUsage:{get:function(){return this._maximumMemoryUsage},set:function(o){this._maximumMemoryUsage=o}}});sW.prototype.loadConfig=function(o){let A=this;this._readyPromise=Promise.resolve(o).then(function(f){let m,C=An.createIfNeeded(f);return m=C.getBaseUri(!0),A._url=C.url,A._basePath=m,A._baseResource=C,C.fetchJson()}).then(function(f){let m=f.extensions;A.fileType=m["s3m:FileType"];let C=f.position.x,y=f.position.y,x=f.position.z;A._position=ee.fromDegrees(C,y,x),A.modelMatrix=zn.eastNorthUpToFixedFrame(A._position),A._rectangle=Si.fromDegrees(f.geoBounds.left,f.geoBounds.bottom,f.geoBounds.right,f.geoBounds.top);for(let v=0,E=f.tiles.length;v<E;v++){let I=f.tiles[v].url,w={box:f.tiles[v].boundingbox},Q=new sDe(A,void 0,w,I);A._cache.add(Q),A._rootTiles.push(Q)}return A}).catch(function(f){return f})};function NSi(o,A){return o.priority-A.priority}function kSi(o){let A=o._requestTiles,f=A.length;A.sort(NSi);for(let m=0;m<f;++m)A[m].requestContent()}function OSi(o,A){let f=o._selectedTiles,m=f.length;for(let C=0;C<m;C++)f[C].update(A)}function USi(o,A){}function GSi(o){o._cache.unloadTiles(o,USi)}sW.prototype.prePassesUpdate=function(o){!this.ready||o.newFrame&&this._cache.reset()};sW.prototype.update=function(o){!this.ready||(this._schuduler.scheduler(this,o),kSi(this),OSi(this,o),GSi(this))};var pae=sW,HSi=new ee(1,1,1);function lDe(o){o=Ae(o,HSi),this._dimensions=ee.clone(o)}Object.defineProperties(lDe.prototype,{dimensions:{get:function(){return this._dimensions},set:function(o){ee.clone(o,this._dimensions)}}});var VSi=new ee;lDe.prototype.emit=function(o){let A=this._dimensions,f=ee.multiplyByScalar(A,.5,VSi),m=je.randomBetween(-f.x,f.x),C=je.randomBetween(-f.y,f.y),y=je.randomBetween(-f.z,f.z);o.position=ee.fromElements(m,C,y,o.position),o.velocity=ee.normalize(o.position,o.velocity)};var _st=lDe;function MP(){this.featurePropertiesDirty=!1}Object.defineProperties(MP.prototype,{featuresLength:{get:function(){Ui.throwInstantiationError()}},pointsLength:{get:function(){Ui.throwInstantiationError()}},trianglesLength:{get:function(){Ui.throwInstantiationError()}},geometryByteLength:{get:function(){Ui.throwInstantiationError()}},texturesByteLength:{get:function(){Ui.throwInstantiationError()}},batchTableByteLength:{get:function(){Ui.throwInstantiationError()}},innerContents:{get:function(){Ui.throwInstantiationError()}},readyPromise:{get:function(){Ui.throwInstantiationError()}},tileset:{get:function(){Ui.throwInstantiationError()}},tile:{get:function(){Ui.throwInstantiationError()}},url:{get:function(){Ui.throwInstantiationError()}},batchTable:{get:function(){Ui.throwInstantiationError()}},metadata:{get:function(){Ui.throwInstantiationError()},set:function(o){Ui.throwInstantiationError()}},group:{get:function(){Ui.throwInstantiationError()},set:function(o){Ui.throwInstantiationError()}}});MP.prototype.hasProperty=function(o,A){Ui.throwInstantiationError()};MP.prototype.getFeature=function(o){Ui.throwInstantiationError()};MP.prototype.applyDebugSettings=function(o,A){Ui.throwInstantiationError()};MP.prototype.applyStyle=function(o){Ui.throwInstantiationError()};MP.prototype.update=function(o,A){Ui.throwInstantiationError()};MP.prototype.isDestroyed=function(){Ui.throwInstantiationError()};MP.prototype.destroy=function(){Ui.throwInstantiationError()};var Bst=MP;function uDe(o){o=Ae(o,1),this._radius=Ae(o,1)}Object.defineProperties(uDe.prototype,{radius:{get:function(){return this._radius},set:function(o){this._radius=o}}});uDe.prototype.emit=function(o){let A=je.randomBetween(0,je.TWO_PI),f=je.randomBetween(0,this._radius),m=f*Math.cos(A),C=f*Math.sin(A),y=0;o.position=ee.fromElements(m,C,y,o.position),o.velocity=ee.clone(ee.UNIT_Z,o.velocity)};var cDe=uDe,_me={CUMULUS:0};_me.validate=function(o){return o===_me.CUMULUS};var _ie=Object.freeze(_me);function TQ(o,A){if(o=Ae(o,Ae.EMPTY_OBJECT),this._show=Ae(o.show,!0),this._position=ee.clone(Ae(o.position,ee.ZERO)),!O(o.scale)&&O(o.maximumSize))this._maximumSize=ee.clone(o.maximumSize),this._scale=new Bt(this._maximumSize.x,this._maximumSize.y);else{this._scale=Bt.clone(Ae(o.scale,new Bt(20,12)));let f=new ee(this._scale.x,this._scale.y,Math.min(this._scale.x,this._scale.y)/1.5);this._maximumSize=ee.clone(Ae(o.maximumSize,f))}this._slice=Ae(o.slice,-1),this._color=At.clone(Ae(o.color,At.WHITE)),this._brightness=Ae(o.brightness,1),this._cloudCollection=A,this._index=-1}var zSi=TQ.SHOW_INDEX=0,KSi=TQ.POSITION_INDEX=1,YSi=TQ.SCALE_INDEX=2,JSi=TQ.MAXIMUM_SIZE_INDEX=3,WSi=TQ.SLICE_INDEX=4,jSi=TQ.BRIGHTNESS_INDEX=5,qSi=TQ.COLOR_INDEX=6;TQ.NUMBER_OF_PROPERTIES=7;function mk(o,A){let f=o._cloudCollection;O(f)&&(f._updateCloud(o,A),o._dirty=!0)}Object.defineProperties(TQ.prototype,{show:{get:function(){return this._show},set:function(o){this._show!==o&&(this._show=o,mk(this,zSi))}},position:{get:function(){return this._position},set:function(o){let A=this._position;ee.equals(A,o)||(ee.clone(o,A),mk(this,KSi))}},scale:{get:function(){return this._scale},set:function(o){let A=this._scale;Bt.equals(A,o)||(Bt.clone(o,A),mk(this,YSi))}},maximumSize:{get:function(){return this._maximumSize},set:function(o){let A=this._maximumSize;ee.equals(A,o)||(ee.clone(o,A),mk(this,JSi))}},color:{get:function(){return this._color},set:function(o){let A=this._color;At.equals(A,o)||(At.clone(o,A),mk(this,qSi))}},slice:{get:function(){return this._slice},set:function(o){this._slice!==o&&(this._slice=o,mk(this,WSi))}},brightness:{get:function(){return this._brightness},set:function(o){this._brightness!==o&&(this._brightness=o,mk(this,jSi))}}});TQ.prototype._destroy=function(){this._cloudCollection=void 0};var MQ=TQ,R_,F$=new ee,XSi={positionHighAndScaleX:0,positionLowAndScaleY:1,packedAttribute0:2,packedAttribute1:3,color:4},ZSi={direction:0,positionHighAndScaleX:1,positionLowAndScaleY:2,packedAttribute0:3,packedAttribute1:4,color:5},$Si=MQ.SHOW_INDEX,eDi=MQ.POSITION_INDEX,tDi=MQ.SCALE_INDEX,iDi=MQ.MAXIMUM_SIZE_INDEX,rDi=MQ.SLICE_INDEX,nDi=MQ.BRIGHTNESS_INDEX,oDi=MQ.NUMBER_OF_PROPERTIES,aDi=MQ.COLOR_INDEX;function PQ(o){o=Ae(o,Ae.EMPTY_OBJECT),this._clouds=[],this._cloudsToUpdate=[],this._cloudsToUpdateIndex=0,this._cloudsRemoved=!1,this._createVertexArray=!1,this._propertiesChanged=new Uint32Array(oDi),this._noiseTexture=void 0,this._textureSliceWidth=128,this._noiseTextureRows=4,this.noiseDetail=Ae(o.noiseDetail,16),this.noiseOffset=ee.clone(Ae(o.noiseOffset,ee.ZERO)),this._loading=!1,this._ready=!1;let A=this;this._uniforms={u_noiseTexture:function(){return A._noiseTexture},u_noiseTextureDimensions:wst(A),u_noiseDetail:function(){return A.noiseDetail}},this._vaNoise=void 0,this._spNoise=void 0,this._spCreated=!1,this._sp=void 0,this._rs=void 0,this.show=Ae(o.show,!0),this._colorCommands=[],this.debugBillboards=Ae(o.debugBillboards,!1),this._compiledDebugBillboards=!1,this.debugEllipsoids=Ae(o.debugEllipsoids,!1),this._compiledDebugEllipsoids=!1}function wst(o){return function(){return F$.x=o._textureSliceWidth,F$.y=o._noiseTextureRows,F$.z=1/o._noiseTextureRows,F$}}Object.defineProperties(PQ.prototype,{length:{get:function(){return ADe(this),this._clouds.length}}});function bst(o){let A=o.length;for(let f=0;f<A;++f)o[f]&&o[f]._destroy()}PQ.prototype.add=function(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=Ae(o.cloudType,_ie.CUMULUS),f;return A===_ie.CUMULUS&&(f=new MQ(o,this),f._index=this._clouds.length,this._clouds.push(f),this._createVertexArray=!0),f};PQ.prototype.remove=function(o){return this.contains(o)?(this._clouds[o._index]=void 0,this._cloudsRemoved=!0,this._createVertexArray=!0,o._destroy(),!0):!1};PQ.prototype.removeAll=function(){bst(this._clouds),this._clouds=[],this._cloudsToUpdate=[],this._cloudsToUpdateIndex=0,this._cloudsRemoved=!1,this._createVertexArray=!0};function ADe(o){if(o._cloudsRemoved){o._cloudsRemoved=!1;let A=[],f=o._clouds,m=f.length;for(let C=0,y=0;C<m;++C){let x=f[C];O(x)&&(f._index=y++,A.push(x))}o._clouds=A}}PQ.prototype._updateCloud=function(o,A){o._dirty||(this._cloudsToUpdate[this._cloudsToUpdateIndex++]=o),++this._propertiesChanged[A]};PQ.prototype.contains=function(o){return O(o)&&o._cloudCollection===this};PQ.prototype.get=function(o){return ADe(this),this._clouds[o]};var sDi=new Float32Array([-1,-1,1,-1,1,1,-1,1]),lDi=new Uint16Array([0,1,2,0,2,3]);function uDi(o){let A=vo.createVertexBuffer({context:o,typedArray:sDi,usage:ln.STATIC_DRAW}),f=vo.createIndexBuffer({context:o,typedArray:lDi,usage:ln.STATIC_DRAW,indexDatatype:Nn.UNSIGNED_SHORT}),m=[{index:0,vertexBuffer:A,componentsPerAttribute:2,componentDatatype:ei.FLOAT}];return new Hc({context:o,attributes:m,indexBuffer:f})}var hDe;function cDi(o){let A=o.cache.cloudCollection_indexBufferBatched;if(O(A))return A;let f=16384*6-6,m=new Uint16Array(f);for(let C=0,y=0;C<f;C+=6,y+=4)m[C]=y,m[C+1]=y+1,m[C+2]=y+2,m[C+3]=y,m[C+4]=y+2,m[C+5]=y+3;return A=vo.createIndexBuffer({context:o,typedArray:m,usage:ln.STATIC_DRAW,indexDatatype:Nn.UNSIGNED_SHORT}),A.vertexArrayDestroyable=!1,o.cache.cloudCollection_indexBufferBatched=A,A}function ADi(o){let A=o.cache.cloudCollection_indexBufferInstanced;return O(A)||(A=vo.createIndexBuffer({context:o,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:ln.STATIC_DRAW,indexDatatype:Nn.UNSIGNED_SHORT}),A.vertexArrayDestroyable=!1,o.cache.cloudCollection_indexBufferInstanced=A),A}function hDi(o){let A=o.cache.cloudCollection_vertexBufferInstanced;return O(A)||(A=vo.createVertexBuffer({context:o,typedArray:new Float32Array([0,0,1,0,1,1,0,1]),usage:ln.STATIC_DRAW}),A.vertexArrayDestroyable=!1,o.cache.cloudCollection_vertexBufferInstanced=A),A}function dDi(o,A,f){let m=[{index:R_.positionHighAndScaleX,componentsPerAttribute:4,componentDatatype:ei.FLOAT,usage:ln.STATIC_DRAW},{index:R_.positionLowAndScaleY,componentsPerAttribute:4,componentDatatype:ei.FLOAT,usage:ln.STATIC_DRAW},{index:R_.packedAttribute0,componentsPerAttribute:4,componentDatatype:ei.FLOAT,usage:ln.STATIC_DRAW},{index:R_.packedAttribute1,componentsPerAttribute:4,componentDatatype:ei.FLOAT,usage:ln.STATIC_DRAW},{index:R_.color,componentsPerAttribute:4,componentDatatype:ei.UNSIGNED_BYTE,normalize:!0,usage:ln.STATIC_DRAW}];f&&m.push({index:R_.direction,componentsPerAttribute:2,componentDatatype:ei.FLOAT,vertexBuffer:hDi(o)});let C=f?A:4*A;return new aY(o,m,C,f)}var r0e=new Pu;function Qst(o,A,f,m){let C,y=f[R_.positionHighAndScaleX],x=f[R_.positionLowAndScaleY],v=m.position;Pu.fromCartesian(v,r0e);let E=m.scale,I=r0e.high,w=r0e.low;o._instanced?(C=m._index,y(C,I.x,I.y,I.z,E.x),x(C,w.x,w.y,w.z,E.y)):(C=m._index*4,y(C+0,I.x,I.y,I.z,E.x),y(C+1,I.x,I.y,I.z,E.x),y(C+2,I.x,I.y,I.z,E.x),y(C+3,I.x,I.y,I.z,E.x),x(C+0,w.x,w.y,w.z,E.y),x(C+1,w.x,w.y,w.z,E.y),x(C+2,w.x,w.y,w.z,E.y),x(C+3,w.x,w.y,w.z,E.y))}function Sst(o,A,f,m){let C,y=f[R_.packedAttribute0],x=m.show,v=m.brightness;o._instanced?(C=m._index,y(C,x,v,0,0)):(C=m._index*4,y(C+0,x,v,0,0),y(C+1,x,v,1,0),y(C+2,x,v,1,1),y(C+3,x,v,0,1))}function Dst(o,A,f,m){let C,y=f[R_.packedAttribute1],x=m.maximumSize,v=m.slice;o._instanced?(C=m._index,y(C,x.x,x.y,x.z,v)):(C=m._index*4,y(C+0,x.x,x.y,x.z,v),y(C+1,x.x,x.y,x.z,v),y(C+2,x.x,x.y,x.z,v),y(C+3,x.x,x.y,x.z,v))}function Tst(o,A,f,m){let C,y=f[R_.color],x=m.color,v=At.floatToByte(x.red),E=At.floatToByte(x.green),I=At.floatToByte(x.blue),w=At.floatToByte(x.alpha);o._instanced?(C=m._index,y(C,v,E,I,w)):(C=m._index*4,y(C+0,v,E,I,w),y(C+1,v,E,I,w),y(C+2,v,E,I,w),y(C+3,v,E,I,w))}function fDi(o,A,f,m){Qst(o,A,f,m),Sst(o,A,f,m),Dst(o,A,f,m),Tst(o,A,f,m)}function gDi(o,A,f,m){let C=o,y=C._textureSliceWidth,x=C._noiseTextureRows,v=A.context;C._vaNoise=uDi(v),C._spNoise=_s.fromCache({context:v,vertexShaderSource:f,fragmentShaderSource:m,attributeLocations:{position:0}});let E=C.noiseDetail,I=C.noiseOffset;C._noiseTexture=new yo({context:v,width:y*y/x,height:y*x,pixelDatatype:Qn.UNSIGNED_BYTE,pixelFormat:Gn.RGBA,sampler:new Hs({wrapS:Za.REPEAT,wrapT:Za.REPEAT,minificationFilter:fs.NEAREST,magnificationFilter:Ch.NEAREST})});let w=new B5({vertexArray:C._vaNoise,shaderProgram:C._spNoise,outputTexture:C._noiseTexture,uniformMap:{u_noiseTextureDimensions:wst(C),u_noiseDetail:function(){return E},u_noiseOffset:function(){return I}},persists:!1,owner:o,postExecute:function(Q){C._ready=!0,C._loading=!1}});A.commandList.push(w),C._loading=!0}function pDi(o,A){let f=o,m=A.context;f._createVertexArray=!1,f._vaf=f._vaf&&f._vaf.destroy();let C=o._clouds,y=C.length;if(y>0){f._vaf=dDi(m,y,f._instanced);let x=f._vaf.writers,v;for(v=0;v<y;++v){let E=C[v];fDi(o,A,x,E)}f._vaf.commit(hDe(m))}}var mDi=[];function CDi(o,A){let f=A.context,m=o,C=m._clouds.length,y=m._cloudsToUpdate,x=m._cloudsToUpdateIndex,v=m._propertiesChanged,E=mDi;E.length=0,(v[eDi]||v[tDi])&&E.push(Qst),(v[$Si]||v[nDi])&&E.push(Sst),(v[iDi]||v[rDi])&&E.push(Dst),v[aDi]&&E.push(Tst);let I=E.length,w=m._vaf.writers,Q,M,B;if(x/C>.1){for(Q=0;Q<x;++Q)for(M=y[Q],M._dirty=!1,B=0;B<I;++B)E[B](o,A,w,M);m._vaf.commit(hDe(f))}else{for(Q=0;Q<x;++Q){for(M=y[Q],M._dirty=!1,B=0;B<I;++B)E[B](o,A,w,M);m._instanced?m._vaf.subCommit(M._index,1):m._vaf.subCommit(M._index*4,4)}m._vaf.endSubCommits()}m._cloudsToUpdateIndex=0}function yDi(o,A,f,m){let C=A.context,y=o,x=new Fr({defines:[],sources:[f]});y._instanced&&x.defines.push("INSTANCED");let v=new Fr({defines:[],sources:[m]});y.debugBillboards&&v.defines.push("DEBUG_BILLBOARDS"),y.debugEllipsoids&&v.defines.push("DEBUG_ELLIPSOIDS"),y._sp=_s.replaceCache({context:C,shaderProgram:y._sp,vertexShaderSource:x,fragmentShaderSource:v,attributeLocations:R_}),y._rs=fn.fromCache({depthTest:{enabled:!0,func:Ii.LESS},depthMask:!1,blending:Bu.ALPHA_BLEND}),y._spCreated=!0,y._compiledDebugBillboards=y.debugBillboards,y._compiledDebugEllipsoids=y.debugEllipsoids}function xDi(o,A){let f=o,m=A.passes,C=f._uniforms,y=A.commandList;if(m.render){let x=f._colorCommands,v=f._vaf.va,E=v.length;x.length=E;for(let I=0;I<E;I++){let w=x[I];O(w)||(w=x[I]=new On),w.pass=hr.TRANSLUCENT,w.owner=o,w.uniformMap=C,w.count=v[I].indicesCount,w.vertexArray=v[I].va,w.shaderProgram=f._sp,w.renderState=f._rs,f._instanced&&(w.count=6,w.instanceCount=f._clouds.length),y.push(w)}}}PQ.prototype.update=function(o){if(ADe(this),!this.show)return;let A=this.debugBillboards||this.debugEllipsoids;this._ready=A?!0:O(this._noiseTexture),!this._ready&&!this._loading&&!A&&gDi(this,o,iSe,tSe),this._instanced=o.context.instancedArrays,R_=this._instanced?ZSi:XSi,hDe=this._instanced?ADi:cDi;let f=this._clouds.length,m=this._cloudsToUpdate,C=this._cloudsToUpdateIndex;this._createVertexArray?pDi(this,o):C>0&&CDi(this,o),C>f*1.5&&(m.length=f),!(!O(this._vaf)||!O(this._vaf.va)||!this._ready&!A)&&((!this._spCreated||this.debugBillboards!==this._compiledDebugBillboards||this.debugEllipsoids!==this._compiledDebugEllipsoids)&&yDi(this,o,eSe,$Qe),xDi(this,o))};PQ.prototype.isDestroyed=function(){return!1};PQ.prototype.destroy=function(){return this._noiseTexture=this._noiseTexture&&this._noiseTexture.destroy(),this._sp=this._sp&&this._sp.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),bst(this._clouds),Qr(this)};var Mst=PQ,vDi=je.toRadians(30);function dDe(o){this._angle=Ae(o,vDi)}Object.defineProperties(dDe.prototype,{angle:{get:function(){return this._angle},set:function(o){this._angle=o}}});dDe.prototype.emit=function(o){let A=Math.tan(this._angle),f=je.randomBetween(0,je.TWO_PI),m=je.randomBetween(0,A),C=m*Math.cos(f),y=m*Math.sin(f),x=1;o.velocity=ee.fromElements(C,y,x,o.velocity),ee.normalize(o.velocity,o.velocity),o.position=ee.clone(ee.ZERO,o.position)};var EH=dDe,EDi=new At,IDi=new At,_Di=new At,BDi=new At,u7e=new ai,Sz=new Uint8Array(4);function c7e(o,A,f,m){let C=A.height===f.height?0:(o-A.height)/(f.height-A.height);return At.lerp(A.color,f.color,C,m)}function Ree(o,A){return{height:o,color:At.clone(A)}}function Pst(o){return o=o.filter(function(A,f,m){let C=f>0,y=f<m.length-1,x=C?A.height===m[f-1].height:!0,v=y?A.height===m[f+1].height:!0;return!x||!v}),o=o.filter(function(A,f,m){let C=f>0,y=f<m.length-1,x=C?At.equals(A.color,m[f-1].color):!1,v=y?At.equals(A.color,m[f+1].color):!1;return!x||!v}),o=o.filter(function(A,f,m){let C=f>0,y=C?At.equals(A.color,m[f-1].color):!1,x=C?A.height===m[f-1].height:!0;return!y||!x}),o}function wDi(o){let A,f,m=[],C=o.length;for(A=0;A<C;A++){let y=o[A],x=y.entries,v=x.length,E=[];for(f=0;f<v;f++){let B=x[f],T=je.clamp(B.height,ZE._minimumHeight,ZE._maximumHeight),D=At.clone(B.color,EDi);D.red*=D.alpha,D.green*=D.alpha,D.blue*=D.alpha,E.push(Ree(T,D))}let I=!0,w=!0;for(f=0;f<v-1;f++){let B=E[f+0],T=E[f+1];I=I&&B.height<=T.height,w=w&&B.height>=T.height}w?E=E.reverse():I||LJ(E,function(B,T){return je.sign(B.height-T.height)});let Q=Ae(y.extendDownwards,!1),M=Ae(y.extendUpwards,!1);E.length===1&&!Q&&!M&&(Q=!0,M=!0),Q&&E.splice(0,0,Ree(ZE._minimumHeight,E[0].color)),M&&E.splice(E.length,0,Ree(ZE._maximumHeight,E[E.length-1].color)),E=Pst(E),m.push(E)}return m}function bDi(o){let A=wDi(o),f=[],m=[],C;function y(E,I){f.push(Ree(E,I))}function x(E,I,w){let Q=At.multiplyByScalar(w,1-I.alpha,BDi);Q=At.add(Q,I,Q),y(E,Q)}let v=A.length;for(C=0;C<v;C++){let E=A[C],I=0,w=0;m=f,f=[];let Q=E.length,M=m.length;for(;I<Q||w<M;){let B=I<Q?E[I]:void 0,T=I>0?E[I-1]:void 0,D=I<Q-1?E[I+1]:void 0,F=w<M?m[w]:void 0,L=w>0?m[w-1]:void 0,R=w<M-1?m[w+1]:void 0;if(O(B)&&O(F)&&B.height===F.height){let k=O(R)&&F.height===R.height,U=!O(L),V=!O(R),H=O(D)&&B.height===D.height,q=!O(T),ie=!O(D);k?H?(x(B.height,B.color,F.color),x(B.height,D.color,R.color)):q?(y(B.height,F.color),x(B.height,B.color,R.color)):ie?(x(B.height,B.color,F.color),y(B.height,R.color)):(x(B.height,B.color,F.color),x(B.height,B.color,R.color)):U?H?(y(B.height,B.color),x(B.height,D.color,F.color)):ie?(y(B.height,B.color),y(B.height,F.color)):(q||y(B.height,B.color),x(B.height,B.color,F.color)):V?H?(x(B.height,B.color,F.color),y(B.height,D.color)):q?(y(B.height,F.color),y(B.height,B.color)):ie?x(B.height,B.color,F.color):(x(B.height,B.color,F.color),y(B.height,B.color)):H?(x(B.height,B.color,F.color),x(B.height,D.color,F.color)):q?(y(B.height,F.color),x(B.height,B.color,F.color)):ie?(x(B.height,B.color,F.color),y(B.height,F.color)):x(B.height,B.color,F.color),I+=H?2:1,w+=k?2:1}else if(O(B)&&O(F)&&O(L)&&B.height<F.height){let k=c7e(B.height,L,F,_Di);O(T)?O(D)?x(B.height,B.color,k):(x(B.height,B.color,k),y(B.height,k)):(y(B.height,k),x(B.height,B.color,k)),I++}else if(O(F)&&O(B)&&O(T)&&F.height<B.height){let k=c7e(F.height,T,B,IDi);O(L)?O(R)?x(F.height,k,F.color):(x(F.height,k,F.color),y(F.height,k)):(y(F.height,k),x(F.height,k,F.color)),w++}else O(B)&&(!O(F)||B.height<F.height)?(O(F)&&!O(L)&&!O(D)?(y(B.height,B.color),y(B.height,ZE._emptyColor),y(F.height,ZE._emptyColor)):(!O(F)&&O(L)&&!O(T)&&(y(L.height,ZE._emptyColor),y(B.height,ZE._emptyColor)),y(B.height,B.color)),I++):O(F)&&(!O(B)||F.height<B.height)&&(y(F.height,F.color),w++)}}return Pst(f)}function ZE(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.scene,f=o.layers,m=bDi(f),C=m.length,y,x,v,E;if(ZE._useFloatTexture(A.context))for(v=Qn.FLOAT,E=Gn.LUMINANCE,x=new Float32Array(C),y=0;y<C;y++)x[y]=m[y].height;else for(v=Qn.UNSIGNED_BYTE,E=Gn.RGBA,x=new Uint8Array(C*4),y=0;y<C;y++)ai.packFloat(m[y].height,u7e),ai.pack(u7e,x,y*4);let I=yo.create({context:A.context,pixelFormat:E,pixelDatatype:v,source:{arrayBufferView:x,width:C,height:1},sampler:new Hs({wrapS:Za.CLAMP_TO_EDGE,wrapT:Za.CLAMP_TO_EDGE,minificationFilter:fs.NEAREST,magnificationFilter:Ch.NEAREST})}),w=new Uint8Array(C*4);for(y=0;y<C;y++)m[y].color.toBytes(Sz),w[y*4+0]=Sz[0],w[y*4+1]=Sz[1],w[y*4+2]=Sz[2],w[y*4+3]=Sz[3];let Q=yo.create({context:A.context,pixelFormat:Gn.RGBA,pixelDatatype:Qn.UNSIGNED_BYTE,source:{arrayBufferView:w,width:C,height:1},sampler:new Hs({wrapS:Za.CLAMP_TO_EDGE,wrapT:Za.CLAMP_TO_EDGE,minificationFilter:fs.LINEAR,magnificationFilter:Ch.LINEAR})});return as.fromType("ElevationBand",{heights:I,colors:Q})}ZE._useFloatTexture=function(o){return o.floatingPointTexture};ZE._maximumHeight=5906376425472;ZE._minimumHeight=-5906376425472;ZE._emptyColor=new At(0,0,0,0);var Rst=ZE;function QDi(o){o=ia(o,{url:jk.fromAssetId(96188)});let A=new Fx(o),f=o.style;if(!O(f)){let m=Ae(o.defaultColor,At.WHITE).toCssColorString();f=new gY({color:`Boolean(\${feature['cesium#color']}) ? color(\${feature['cesium#color']}) : ${m}`})}return A.style=f,A}var Lst=QDi;function SDi(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=[],f=o.geometry;(!O(f.attributes)||!O(f.primitiveType))&&(f=f.constructor.createGeometry(f));let m=f.attributes,C=Xe.clone(Ae(o.modelMatrix,Xe.IDENTITY)),y=Ae(o.length,1e4);if(O(m.normal)&&A.push(new co({geometry:rc.createLineSegmentsForVectors(f,"normal",y),attributes:{color:new Yo(1,0,0,1)},modelMatrix:C})),O(m.tangent)&&A.push(new co({geometry:rc.createLineSegmentsForVectors(f,"tangent",y),attributes:{color:new Yo(0,1,0,1)},modelMatrix:C})),O(m.bitangent)&&A.push(new co({geometry:rc.createLineSegmentsForVectors(f,"bitangent",y),attributes:{color:new Yo(0,0,1,1)},modelMatrix:C})),A.length>0)return new Xa({asynchronous:!1,geometryInstances:A,appearance:new Va({flat:!0,translucent:!1})})}var Fst=SDi;function lW(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.attributeName,f=o.perInstanceAttribute;O(f)||(f=!1);let m=Ae(o.glslDatatype,"vec3"),C=`v_${A}`,y;if(A==="normal"||A==="tangent"||A==="bitangent")y=`vec4 getColor() { return vec4((${C} + vec3(1.0)) * 0.5, 1.0); }
`;else switch(A==="st"&&(m="vec2"),m){case"float":y=`vec4 getColor() { return vec4(vec3(${C}), 1.0); }
`;break;case"vec2":y=`vec4 getColor() { return vec4(${C}, 0.0, 1.0); }
`;break;case"vec3":y=`vec4 getColor() { return vec4(${C}, 1.0); }
@@ -15134,14 +15134,7 @@
void main()
{
gl_FragColor = getColor();
}`;this.material=void 0,this.translucent=Ae(o.translucent,!1),this._vertexShaderSource=Ae(o.vertexShaderSource,x),this._fragmentShaderSource=Ae(o.fragmentShaderSource,v),this._renderState=Sd.getDefaultRenderState(!1,!1,o.renderState),this._closed=Ae(o.closed,!1),this._attributeName=A,this._glslDatatype=m}Object.defineProperties(lW.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},attributeName:{get:function(){return this._attributeName}},glslDatatype:{get:function(){return this._glslDatatype}}});lW.prototype.getFragmentShaderSource=Sd.prototype.getFragmentShaderSource;lW.prototype.isTranslucent=Sd.prototype.isTranslucent;lW.prototype.getRenderState=Sd.prototype.getRenderState;var Nst=lW;function mae(o){o=Ae(o,Ae.EMPTY_OBJECT),this.length=Ae(o.length,1e7),this._length=void 0,this.width=Ae(o.width,2),this._width=void 0,this.show=Ae(o.show,!0),this.modelMatrix=Xe.clone(Ae(o.modelMatrix,Xe.IDENTITY)),this._modelMatrix=new Xe,this.id=o.id,this._id=void 0,this._primitive=void 0}mae.prototype.update=function(o){if(this.show){if(!O(this._primitive)||!Xe.equals(this._modelMatrix,this.modelMatrix)||this._length!==this.length||this._width!==this.width||this._id!==this.id){this._modelMatrix=Xe.clone(this.modelMatrix,this._modelMatrix),this._length=this.length,this._width=this.width,this._id=this.id,O(this._primitive)&&this._primitive.destroy(),this.modelMatrix[12]===0&&this.modelMatrix[13]===0&&this.modelMatrix[14]===0&&(this.modelMatrix[14]=.01);let A=new co({geometry:new Vk({positions:[ee.ZERO,ee.UNIT_X],width:this.width,vertexFormat:ly.VERTEX_FORMAT,colors:[At.RED,At.RED],arcType:Pa.NONE}),modelMatrix:Xe.multiplyByUniformScale(this.modelMatrix,this.length,new Xe),id:this.id,pickPrimitive:this}),f=new co({geometry:new Vk({positions:[ee.ZERO,ee.UNIT_Y],width:this.width,vertexFormat:ly.VERTEX_FORMAT,colors:[At.GREEN,At.GREEN],arcType:Pa.NONE}),modelMatrix:Xe.multiplyByUniformScale(this.modelMatrix,this.length,new Xe),id:this.id,pickPrimitive:this}),m=new co({geometry:new Vk({positions:[ee.ZERO,ee.UNIT_Z],width:this.width,vertexFormat:ly.VERTEX_FORMAT,colors:[At.BLUE,At.BLUE],arcType:Pa.NONE}),modelMatrix:Xe.multiplyByUniformScale(this.modelMatrix,this.length,new Xe),id:this.id,pickPrimitive:this});this._primitive=new Xa({geometryInstances:[A,f,m],appearance:new ly,asynchronous:!1})}this._primitive.update(o)}};mae.prototype.isDestroyed=function(){return!1};mae.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),Qr(this)};var fDe=mae;function DDi(o){this.direction=ee.clone(o.direction),this.color=At.clone(Ae(o.color,At.WHITE)),this.intensity=Ae(o.intensity,1)}var Cae=DDi;function jE(o){this._scene=o.scene,this.samplingWindow=Ae(o.samplingWindow,jE.defaultSettings.samplingWindow),this.quietPeriod=Ae(o.quietPeriod,jE.defaultSettings.quietPeriod),this.warmupPeriod=Ae(o.warmupPeriod,jE.defaultSettings.warmupPeriod),this.minimumFrameRateDuringWarmup=Ae(o.minimumFrameRateDuringWarmup,jE.defaultSettings.minimumFrameRateDuringWarmup),this.minimumFrameRateAfterWarmup=Ae(o.minimumFrameRateAfterWarmup,jE.defaultSettings.minimumFrameRateAfterWarmup),this._lowFrameRate=new br,this._nominalFrameRate=new br,this._frameTimes=[],this._needsQuietPeriod=!0,this._quietPeriodEndTime=0,this._warmupPeriodEndTime=0,this._frameRateIsLow=!1,this._lastFramesPerSecond=void 0,this._pauseCount=0;let A=this;this._preUpdateRemoveListener=this._scene.preUpdate.addEventListener(function(C,y){TDi(A,y)}),this._hiddenPropertyName=document.hidden!==void 0?"hidden":document.mozHidden!==void 0?"mozHidden":document.msHidden!==void 0?"msHidden":document.webkitHidden!==void 0?"webkitHidden":void 0;let f=document.hidden!==void 0?"visibilitychange":document.mozHidden!==void 0?"mozvisibilitychange":document.msHidden!==void 0?"msvisibilitychange":document.webkitHidden!==void 0?"webkitvisibilitychange":void 0;function m(){MDi(A)}this._visibilityChangeRemoveListener=void 0,O(f)&&(document.addEventListener(f,m,!1),this._visibilityChangeRemoveListener=function(){document.removeEventListener(f,m,!1)})}jE.defaultSettings={samplingWindow:5,quietPeriod:2,warmupPeriod:5,minimumFrameRateDuringWarmup:4,minimumFrameRateAfterWarmup:8};jE.fromScene=function(o){return(!O(o._frameRateMonitor)||o._frameRateMonitor.isDestroyed())&&(o._frameRateMonitor=new jE({scene:o})),o._frameRateMonitor};Object.defineProperties(jE.prototype,{scene:{get:function(){return this._scene}},lowFrameRate:{get:function(){return this._lowFrameRate}},nominalFrameRate:{get:function(){return this._nominalFrameRate}},lastFramesPerSecond:{get:function(){return this._lastFramesPerSecond}}});jE.prototype.pause=function(){++this._pauseCount,this._pauseCount===1&&(this._frameTimes.length=0,this._lastFramesPerSecond=void 0)};jE.prototype.unpause=function(){--this._pauseCount,this._pauseCount<=0&&(this._pauseCount=0,this._needsQuietPeriod=!0)};jE.prototype.isDestroyed=function(){return!1};jE.prototype.destroy=function(){return this._preUpdateRemoveListener(),O(this._visibilityChangeRemoveListener)&&this._visibilityChangeRemoveListener(),Qr(this)};function TDi(o,A){if(o._pauseCount>0)return;let f=OA();if(o._needsQuietPeriod)o._needsQuietPeriod=!1,o._frameTimes.length=0,o._quietPeriodEndTime=f+o.quietPeriod/Uu.SECONDS_PER_MILLISECOND,o._warmupPeriodEndTime=o._quietPeriodEndTime+(o.warmupPeriod+o.samplingWindow)/Uu.SECONDS_PER_MILLISECOND;else if(f>=o._quietPeriodEndTime){o._frameTimes.push(f);let m=f-o.samplingWindow/Uu.SECONDS_PER_MILLISECOND;if(o._frameTimes.length>=2&&o._frameTimes[0]<=m){for(;o._frameTimes.length>=2&&o._frameTimes[1]<m;)o._frameTimes.shift();let C=(f-o._frameTimes[0])/(o._frameTimes.length-1);o._lastFramesPerSecond=1e3/C;let y=1e3/(f>o._warmupPeriodEndTime?o.minimumFrameRateAfterWarmup:o.minimumFrameRateDuringWarmup);C>y?o._frameRateIsLow||(o._frameRateIsLow=!0,o._needsQuietPeriod=!0,o.lowFrameRate.raiseEvent(o.scene,o._lastFramesPerSecond)):o._frameRateIsLow&&(o._frameRateIsLow=!1,o._needsQuietPeriod=!0,o.nominalFrameRate.raiseEvent(o.scene,o._lastFramesPerSecond))}}}function MDi(o){document[o._hiddenPropertyName]?o.pause():o.unpause()}var gDe=jE,PDi=xh(E7e(),1);function pDe(){this._image=new Image}pDe.prototype.isReady=function(){return!0};pDe.prototype.shouldDiscardImage=function(o){return o===this._image};function uW(o){o=Ae(o,Ae.EMPTY_OBJECT),this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0;let A;if(O(o.metadata))A=o.metadata;else{let y=An.createIfNeeded(o.url);A=new IN(y)}this._metadata=A,this._tileDiscardPolicy=o.tileDiscardPolicy,this._tilingScheme=new af({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new Si(-je.PI,-je.PI,je.PI,je.PI),ellipsoid:o.ellipsoid});let f=o.credit;typeof f=="string"&&(f=new tl(f)),this._credit=f,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=23,O(this._tileDiscardPolicy)||(this._tileDiscardPolicy=new pDe),this._errorEvent=new br,this._ready=!1;let m=this,C;this._readyPromise=A.readyPromise.then(function(y){if(!A.imageryPresent){let x=new nr(`The server ${A.url} doesn't have imagery`);return C=wc.reportError(C,m,m._errorEvent,x.message,void 0,void 0,void 0,x),Promise.reject(x)}return wc.reportSuccess(C),m._ready=y,y}).catch(function(y){return C=wc.reportError(C,m,m._errorEvent,y.message,void 0,void 0,void 0,y),Promise.reject(y)})}Object.defineProperties(uW.prototype,{url:{get:function(){return this._metadata.url}},proxy:{get:function(){return this._metadata.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!1}}});uW.prototype.getTileCredits=function(o,A,f){let m=this._metadata,C=m.getTileInformation(o,A,f);if(O(C)){let y=m.providers[C.imageryProvider];if(O(y))return[y]}};uW.prototype.requestImage=function(o,A,f,m){let C=this._tileDiscardPolicy._image,y=this._metadata,x=IN.tileXYToQuadKey(o,A,f),v=y.getTileInformation(o,A,f);if(!O(v)){if(y.isValid(x)){let I=new cC({throttle:m.throttle,throttleByServer:m.throttleByServer,type:m.type,priorityFunction:m.priorityFunction});y.populateSubtree(o,A,f,I);return}return Promise.resolve(C)}if(!v.hasImagery())return Promise.resolve(C);let E=RDi(this,v,o,A,f,m).fetchArrayBuffer();if(O(E))return E.then(function(I){OSe(y.key,I);let w=new Uint8Array(I),Q,M=y.protoImagery;if((!O(M)||!M)&&(Q=LDi(w)),!O(Q)&&(!O(M)||M)){let B=FDi(w);Q=B.imageType,w=B.imageData}return!O(Q)||!O(w)?C:Ane({uint8Array:w,format:Q,flipY:!0})})};uW.prototype.pickFeatures=function(o,A,f,m,C){};function RDi(o,A,f,m,C,y){let x=IN.tileXYToQuadKey(f,m,C),v=A.imageryVersion;return v=O(v)&&v>0?v:1,o._metadata.resource.getDerivedResource({url:`flatfile?f1-0${x}-i.${v.toString()}`,request:y})}function LDi(o){let A="JFIF";if(o[6]===A.charCodeAt(0)&&o[7]===A.charCodeAt(1)&&o[8]===A.charCodeAt(2)&&o[9]===A.charCodeAt(3))return"image/jpeg";let f="PNG";if(o[1]===f.charCodeAt(0)&&o[2]===f.charCodeAt(1)&&o[3]===f.charCodeAt(2))return"image/png"}function FDi(o){let A=PDi.Reader.create(o),f=A.len,m={};for(;A.pos<f;){let x=A.uint32(),v;switch(x>>>3){case 1:m.imageType=A.uint32();break;case 2:m.imageData=A.bytes();break;case 3:m.alphaType=A.uint32();break;case 4:m.imageAlpha=A.bytes();break;case 5:if(v=m.copyrightIds,O(v)||(v=m.copyrightIds=[]),(x&7)===2){let E=A.uint32()+A.pos;for(;A.pos<E;)v.push(A.uint32())}else v.push(A.uint32());break;default:A.skipType(x&7);break}}let C=m.imageType;if(O(C))switch(C){case 0:m.imageType="image/jpeg";break;case 4:m.imageType="image/png";break;default:throw new nr("GoogleEarthEnterpriseImageryProvider: Unsupported image type.")}let y=m.alphaType;return O(y)&&y!==0&&(console.log("GoogleEarthEnterpriseImageryProvider: External alpha not supported."),delete m.alphaType,delete m.imageAlpha),m}var kst=uW,NDi=new At(1,1,1,.4),kDi=new At(0,1,0,.05),ODi=new At(0,.5,0,.2);function SO(o){o=Ae(o,Ae.EMPTY_OBJECT),this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0,this._tilingScheme=O(o.tilingScheme)?o.tilingScheme:new af({ellipsoid:o.ellipsoid}),this._cells=Ae(o.cells,8),this._color=Ae(o.color,NDi),this._glowColor=Ae(o.glowColor,kDi),this._glowWidth=Ae(o.glowWidth,6),this._backgroundColor=Ae(o.backgroundColor,ODi),this._errorEvent=new br,this._tileWidth=Ae(o.tileWidth,256),this._tileHeight=Ae(o.tileHeight,256),this._canvasSize=Ae(o.canvasSize,256),this._canvas=this._createGridCanvas(),this._readyPromise=Promise.resolve(!0)}Object.defineProperties(SO.prototype,{proxy:{get:function(){}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){}},minimumLevel:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){}},hasAlphaChannel:{get:function(){return!0}}});SO.prototype._drawGrid=function(o){let A=this._canvasSize;for(let f=0;f<=this._cells;++f){let m=1+f/this._cells*(A-1);o.moveTo(m,0),o.lineTo(m,A),o.moveTo(0,m),o.lineTo(A,m)}o.stroke()};SO.prototype._createGridCanvas=function(){let o=document.createElement("canvas");o.width=this._canvasSize,o.height=this._canvasSize;let A=0,f=this._canvasSize,m=o.getContext("2d"),C=this._backgroundColor.toCssColorString();m.fillStyle=C,m.fillRect(A,A,f,f);let y=this._glowColor.toCssColorString();m.strokeStyle=y,m.lineWidth=this._glowWidth,m.strokeRect(A,A,f,f),this._drawGrid(m),m.lineWidth=this._glowWidth*.5,m.strokeRect(A,A,f,f),this._drawGrid(m);let x=this._color.toCssColorString();return m.strokeStyle=x,m.lineWidth=2,m.strokeRect(A,A,f,f),m.lineWidth=1,this._drawGrid(m),o};SO.prototype.getTileCredits=function(o,A,f){};SO.prototype.requestImage=function(o,A,f,m){return Promise.resolve(this._canvas)};SO.prototype.pickFeatures=function(o,A,f,m,C){};var Ost=SO;function mDe(o,A){this._parent=o,this._dataProvider=o._dataProvider,this._layer=o._layer,O(this._parent._nodeIndex)?this._resource=this._parent._layer.resource.getDerivedResource({url:`nodes/${this._parent._data.mesh.attribute.resource}/${A}`}):this._resource=this._parent.resource.getDerivedResource({url:A})}Object.defineProperties(mDe.prototype,{resource:{get:function(){return this._resource}},data:{get:function(){return this._data}}});mDe.prototype.load=function(){let o=this;return this._dataProvider._loadJson(this._resource).then(function(A){return o._data=A,A})};var CDe=mDe;function IH(o,A){this._storageInfo=A,this._parent=o,this._dataProvider=o._dataProvider;let f=`attributes/${A.key}/0`;O(this._parent._nodeIndex)?this._resource=this._parent._layer.resource.getDerivedResource({url:`nodes/${this._parent._data.mesh.attribute.resource}/${f}`}):this._resource=this._parent.resource.getDerivedResource({url:f})}Object.defineProperties(IH.prototype,{resource:{get:function(){return this._resource}},header:{get:function(){return this._header}},values:{get:function(){return O(this._values)&&O(this._values.attributeValues)?this._values.attributeValues:[]}},name:{get:function(){return this._storageInfo.name}}});function UDi(o){return o==="UInt8"||o==="Int8"?1:o==="UInt16"||o==="Int16"?2:o==="UInt32"||o==="Int32"||o==="Oid32"||o==="Float32"?4:o==="UInt64"||o==="Int64"||o==="Float64"?8:0}IH.prototype.load=function(){let o=this;return this._dataProvider._loadBinary(this._resource).then(function(A){let f=new DataView(A),m=!0;if(f.getUint8(0)==="{".charCodeAt(0)&&new TextDecoder().decode(A).includes("404")&&(m=!1,console.error(`Failed to load: ${o.resource.url}`)),m){o._data=A;let C=o._parseHeader(f),y=UDi(o._storageInfo.attributeValues.valueType);y>0&&(C=Math.ceil(C/y)*y),o._parseBody(f,C)}})};IH.prototype._parseValue=function(o,A,f){let m;if(A==="UInt8")m=o.getUint8(f),f+=1;else if(A==="Int8")m=o.getInt8(f),f+=1;else if(A==="UInt16")m=o.getUint16(f,!0),f+=2;else if(A==="Int16")m=o.getInt16(f,!0),f+=2;else if(A==="UInt32")m=o.getUint32(f,!0),f+=4;else if(A==="Oid32")m=o.getUint32(f,!0),f+=4;else if(A==="Int32")m=o.getInt32(f,!0),f+=4;else if(A==="UInt64"){let C=o.getUint32(f,!0),y=o.getUint32(f+4,!0);m=C+Math.pow(2,32)*y,f+=8}else if(A==="Int64"){let C=o.getUint32(f,!0),y=o.getUint32(f+4,!0);y<Math.pow(2,31)?m=C+Math.pow(2,32)*y:m=C+Math.pow(2,32)*(y-Math.pow(2,32)),f+=8}else A==="Float32"?(m=o.getFloat32(f,!0),f+=4):A==="Float64"?(m=o.getFloat64(f,!0),f+=8):A==="String"&&(m=String.fromCharCode(o.getUint8(f)),f+=1);return{value:m,offset:f}};IH.prototype._parseHeader=function(o){let A=0;this._header={};for(let f=0;f<this._storageInfo.header.length;f++){let m=this._storageInfo.header[f],C=this._parseValue(o,m.valueType,A);this._header[m.property]=C.value,A=C.offset}return A};IH.prototype._parseBody=function(o,A){this._values={};for(let f=0;f<this._storageInfo.ordering.length;f++){let m=this._storageInfo.ordering[f],C=this._storageInfo[m];if(O(C)){this._values[m]=[];for(let y=0;y<this._header.count;++y)if(C.valueType!=="String"){let x=this._parseValue(o,C.valueType,A);this._values[m].push(x.value),A=x.offset}else{let x=this._values.attributeByteCounts[y],v="";for(let E=0;E<x;++E){let I=this._parseValue(o,C.valueType,A);I.value.charCodeAt(0)!==0&&(v+=I.value),A=I.offset}this._values[m].push(v)}}}};var yDe=IH;function cW(o,A){let f=o._dataProvider,m=o._layer,C;O(o._nodeIndex)?C=m.resource.getDerivedResource({url:`nodes/${o._data.mesh.geometry.resource}/${A}`}):C=o.resource.getDerivedResource({url:A}),this._parent=o,this._dataProvider=f,this._layer=m,this._resource=C,this._customAttributes=void 0}Object.defineProperties(cW.prototype,{resource:{get:function(){return this._resource}},data:{get:function(){return this._data}},customAttributes:{get:function(){return this._customAttributes}}});cW.prototype.load=function(){let o=this;return this._dataProvider._loadBinary(this._resource).then(function(A){return o._data=A,A})};var GDi=new ee,HDi=new ee,VDi=new ee,zDi=new ee,KDi=new ee;function n0e(o,A,f,m){let C=ee.subtract(m,f,GDi),y=ee.cross(C,ee.subtract(o,f,HDi),zDi),x=ee.cross(C,ee.subtract(A,f,VDi),KDi);return ee.dot(y,x)>=0}var YDi=new ee,JDi=new ee,WDi=new ee,jDi=new ee,qDi=new ee,XDi=new ee,ZDi=new ee,$Di=new ee,e2i=new ee,t2i=new ee;cW.prototype.getClosestPointIndexOnTriangle=function(o,A,f){if(O(this._customAttributes)&&O(this._customAttributes.positions)){let m=new ee(o,A,f);m.x-=this._customAttributes.cartesianCenter.x,m.y-=this._customAttributes.cartesianCenter.y,m.z-=this._customAttributes.cartesianCenter.z,ci.multiplyByVector(this._customAttributes.parentRotation,m,m);let C=Number.MAX_VALUE,y,x,v,E,I=this._customAttributes.positions,w=this._customAttributes.indices,Q;O(w)?Q=w.length:Q=I.length/3;for(let M=0;M<Q;M++){let B,T,D;O(w)?(B=w[M],T=w[M+1],D=w[M+2]):(B=M*3,T=M*3+1,D=M*3+2);let F=ee.fromElements(I[B*3],I[B*3+1],I[B*3+2],YDi),L=ee.fromElements(I[T*3],I[T*3+1],I[T*3+2],JDi),R=new ee(I[D*3],I[D*3+1],I[D*3+2],WDi);if(!n0e(m,F,L,R)||!n0e(m,L,F,R)||!n0e(m,R,F,L))continue;let k=ee.subtract(L,F,jDi),U=ee.subtract(R,F,qDi),V=ee.cross(k,U,XDi);if(ee.magnitude(V)===0)continue;let H=ee.normalize(V,ZDi),q=ee.subtract(m,F,$Di),ie=Math.abs(ee.dot(q,H));if(ie<C){C=ie,y=M;let Z=ee.magnitudeSquared(ee.subtract(m,F,q)),oe=ee.magnitudeSquared(ee.subtract(m,L,e2i)),ne=ee.magnitudeSquared(ee.subtract(m,R,t2i));Z<oe&&Z<ne?(v=B,E=F,x=Z):oe<ne?(v=T,E=L,x=oe):(v=D,E=R,x=ne)}}if(O(y))return{index:v,distanceSquared:x,distance:Math.sqrt(x),queriedPosition:m,closestPosition:ee.clone(E)}}return{index:-1,distanceSquared:Number.Infinity,distance:Number.Infinity}};cW.prototype._generateGltf=function(o,A,f,m,C,y){let x={pbrMetallicRoughness:{metallicFactor:0},doubleSided:!0,name:"Material"},v=!1,E,I="";if(O(this._parent._data.mesh)&&O(this._layer._data.materialDefinitions)){let B=this._parent._data.mesh.material.definition;if(B>=0&&B<this._layer._data.materialDefinitions.length&&(E=this._layer._data.materialDefinitions[B],x=E,O(x.pbrMetallicRoughness)&&O(x.pbrMetallicRoughness.baseColorTexture))){v=!0,x.pbrMetallicRoughness.baseColorTexture.index=0;let T="0";if(O(this._layer._data.textureSetDefinitions))for(let D=0;D<this._layer._data.textureSetDefinitions.length;D++){let F=this._layer._data.textureSetDefinitions[D];for(let L=0;L<F.formats.length;L++){let R=F.formats[L];if(R.format==="jpg"){T=R.name;break}}}O(this._parent._data.mesh)&&this._parent._data.mesh.material.resource>=0&&(I=this._layer.resource.getDerivedResource({url:`nodes/${this._parent._data.mesh.material.resource}/textures/${T}`}).url)}}else O(this._parent._data.textureData)&&(v=!0,I=this._parent.resource.getDerivedResource({url:`${this._parent._data.textureData[0].href}`}).url,x.pbrMetallicRoughness.baseColorTexture={index:0});let w=[],Q=[],M=[];return v&&(w=[{sampler:0,source:0}],Q=[{uri:I}],M=[{magFilter:9729,minFilter:9986,wrapS:10497,wrapT:10497}]),{scene:0,scenes:[{nodes:o}],nodes:A,meshes:f,buffers:m,bufferViews:C,accessors:y,materials:[x],textures:w,images:Q,samplers:M,asset:{version:"2.0"}}};var Bie=cW;function sI(o,A,f){let m,C,y,x;f?(m=0,C=o):(m=o._level+1,C=o._layer),typeof A=="number"?y=A:x=o.resource.getDerivedResource({url:`${A}/`}),this._parent=o,this._dataProvider=o._dataProvider,this._isRoot=f,this._level=m,this._layer=C,this._nodeIndex=y,this._resource=x,this._tile=void 0,this._data=void 0,this._geometryData=[],this._featureData=[],this._fields={},this._children=[],this._childrenReadyPromise=void 0,this._globalTransform=void 0,this._inverseGlobalTransform=void 0,this._inverseRotationMatrix=void 0}Object.defineProperties(sI.prototype,{resource:{get:function(){return this._resource}},layer:{get:function(){return this._layer}},parent:{get:function(){return this._parent}},children:{get:function(){return this._children}},geometryData:{get:function(){return this._geometryData}},featureData:{get:function(){return this._featureData}},fields:{get:function(){return this._fields}},tile:{get:function(){return this._tile}},data:{get:function(){return this._data}}});sI.prototype.load=function(){let o=this;function A(){if(!o._isRoot){let f=o._create3DTileDefinition();o._tile=new Ov(o._layer._tileset,o._dataProvider.resource,f,o._parent._tile),o._tile._i3sNode=o}}return O(this._nodeIndex)?this._layer._getNodeInNodePages(this._nodeIndex).then(function(f){o._data=f;let m;o._isRoot?m="nodes/root/":O(f.mesh)&&(m=`../${f.mesh.geometry.resource}/`),O(m)&&(o._resource=o._parent.resource.getDerivedResource({url:m})),A()}):this._dataProvider._loadJson(this._resource).then(function(f){o._data=f,A()})};sI.prototype.loadFields=function(){let o=this._layer._data.attributeStorageInfo,A=this;function f(C,y){let x=new yDe(A,C[y]);return A._fields[x._storageInfo.name]=x,x.load()}let m=[];if(O(o))for(let C=0;C<o.length;C++)m.push(f(o,C));return Promise.all(m)};sI.prototype.getFieldsForPickedPosition=function(o){let A=this.geometryData[0];if(!O(A.customAttributes.featureIndex))return{};let f=A.getClosestPointIndexOnTriangle(o.x,o.y,o.z);if(f.index===-1||f.index>A.customAttributes.featureIndex.length)return{};let m=A.customAttributes.featureIndex[f.index];return this.getFieldsForFeature(m)};sI.prototype.getFieldsForFeature=function(o){let A={};for(let f in this.fields)if(this.fields.hasOwnProperty(f)){let m=this.fields[f];o>=0&&o<m.values.length&&(A[m.name]=m.values[o])}return A};sI.prototype._loadChildren=function(){let o=this;if(O(this._childrenReadyPromise))return this._childrenReadyPromise;let A=[];if(O(o._data.children))for(let f=0;f<o._data.children.length;f++){let m=o._data.children[f],C=new sI(o,Ae(m.href,m),!1);o._children.push(C),A.push(C.load())}return this._childrenReadyPromise=Promise.all(A).then(function(){for(let f=0;f<o._children.length;f++)o._tile.children.push(o._children[f]._tile)}),this._childrenReadyPromise};sI.prototype._loadGeometryData=function(){let o=[];if(O(this._data.geometryData))for(let A=0;A<this._data.geometryData.length;A++){let f=new Bie(this,this._data.geometryData[A].href);this._geometryData.push(f),o.push(f.load())}else if(O(this._data.mesh)){let A=this._layer._findBestGeometryBuffers(this._data.mesh.geometry.definition,["position","uv0"]),f=`./geometries/${A.bufferIndex}/`,m=new Bie(this,f);m._geometryDefinitions=A.definition,m._geometryBufferInfo=A.geometryBufferInfo,this._geometryData.push(m),o.push(m.load())}return Promise.all(o)};sI.prototype._loadFeatureData=function(){let o=[];if(O(this._data.featureData))for(let A=0;A<this._data.featureData.length;A++){let f=new CDe(this,this._data.featureData[A].href);this._featureData.push(f),o.push(f.load())}return Promise.all(o)};sI.prototype._clearGeometryData=function(){this._geometryData=[]};sI.prototype._create3DTileDefinition=function(){let o=this._data.obb,A=this._data.mbs;if(!O(o)&&!O(A)){console.error("Failed to load I3S node. Bounding volume is required.");return}let f;if(O(o)?f=Kt.fromDegrees(o.center[0],o.center[1],o.center[2]):f=Kt.fromDegrees(A[0],A[1],A[2]),O(this._dataProvider._geoidDataList)&&O(f))for(let F=0;F<this._dataProvider._geoidDataList.length;F++){let L=this._dataProvider._geoidDataList[F],R=L.projection.project(f);if(R.x>L.nativeExtent.west&&R.x<L.nativeExtent.east&&R.y>L.nativeExtent.south&&R.y<L.nativeExtent.north){f.height+=r2i(R.x,R.y,L);break}}let m={},C,y=0;O(o)?(m={box:[0,0,0,o.halfSize[0],0,0,0,o.halfSize[1],0,0,0,o.halfSize[2]]},y=Math.max(Math.max(this._data.obb.halfSize[0],this._data.obb.halfSize[1]),this._data.obb.halfSize[2]),C=Ti.WGS84.cartographicToCartesian(f)):(m={sphere:[0,0,0,A[3]]},C=Ti.WGS84.cartographicToCartesian(f),y=this._data.mbs[3]),y*=2;let x=1/0;if(O(this._data.lodThreshold))if(this._layer._data.nodePages.lodSelectionMetricType==="maxScreenThresholdSQ"){let F=Math.sqrt(this._data.lodThreshold/(Math.PI*.25));x=y/F}else if(this._layer._data.nodePages.lodSelectionMetricType==="maxScreenThreshold"){let F=this._data.lodThreshold;x=y/F}else console.error("Invalid lodSelectionMetricType in Layer");else if(O(this._data.lodSelection))for(let F=0;F<this._data.lodSelection.length;F++)this._data.lodSelection[F].metricType==="maxScreenThreshold"&&(x=y/this._data.lodSelection[F].maxError);x===1/0&&(x=1e5);let v=x*16,E=new dC(0,0,0),I=zn.headingPitchRollQuaternion(C,E);O(this._data.obb)&&(I=new jr(this._data.obb.quaternion[0],this._data.obb.quaternion[1],this._data.obb.quaternion[2],this._data.obb.quaternion[3]));let w=ci.fromQuaternion(I),Q=ci.inverse(w,new ci),M=new Xe(w[0],w[1],w[2],0,w[3],w[4],w[5],0,w[6],w[7],w[8],0,C.x,C.y,C.z,1),B=Xe.inverse(M,new Xe),T=Xe.clone(M);O(this._parent._globalTransform)&&Xe.multiply(M,this._parent._inverseGlobalTransform,T),this._globalTransform=M,this._inverseGlobalTransform=B,this._inverseRotationMatrix=Q;let D=[];for(let F=0;F<this._children.length;F++)D.push(this._children[F]._create3DTileDefinition());return{children:D,refine:"REPLACE",boundingVolume:m,transform:[T[0],T[4],T[8],T[12],T[1],T[5],T[9],T[13],T[2],T[6],T[10],T[14],T[3],T[7],T[11],T[15]],content:{uri:O(this._resource)?this._resource.url:void 0},geometricError:v}};sI.prototype._createI3SDecoderTask=function(o,A){let f=A.geometryData._parent._data,m=A.geometryData._parent._inverseRotationMatrix,C=0,y=0,x=0;O(f.obb)?(C=f.obb.center[0],y=f.obb.center[1],x=f.obb.center[2]):O(f.mbs)&&(C=f.mbs[0],y=f.mbs[1],x=f.mbs[2]);let v=ci.fromRotationX(-je.PI_OVER_TWO),E=new ci;ci.multiply(v,m,E);let I=Kt.fromDegrees(C,y,x),w=Ti.WGS84.cartographicToCartesian(I),Q={binaryData:A.geometryData._data,featureData:O(A.featureData)&&O(A.featureData[0])?A.featureData[0].data:void 0,schema:A.defaultGeometrySchema,bufferInfo:A.geometryData._geometryBufferInfo,ellipsoidRadiiSquare:Ti.WGS84.radiiSquared,url:A.url,geoidDataList:A.geometryData._dataProvider._geoidDataList,cartographicCenter:I,cartesianCenter:w,parentRotation:E},M=o._getDecoderTaskProcessor(),B=[];return o._taskProcessorReadyPromise.then(function(){return M.scheduleTask(Q,B)})};sI.prototype._createContentURL=function(){let o={scene:0,scenes:[{nodes:[0]}],nodes:[{name:"singleNode"}],meshes:[],buffers:[],bufferViews:[],accessors:[],materials:[],textures:[],images:[],samplers:[],asset:{version:"2.0"}},A=[this._loadGeometryData()];this._dataProvider.legacyVersion16&&A.push(this._loadFeatureData());let f=this;return Promise.all(A).then(function(){let m=Promise.resolve();if(O(f._geometryData)&&f._geometryData.length>0){let C={geometryData:f._geometryData[0],featureData:f._featureData,defaultGeometrySchema:f._layer._data.store.defaultGeometrySchema,url:f._geometryData[0].resource.url,tile:f._tile},y=f._createI3SDecoderTask(f._dataProvider,C);if(!O(y))return;m=y.then(function(x){o=C.geometryData._generateGltf(x.meshData.nodesInScene,x.meshData.nodes,x.meshData.meshes,x.meshData.buffers,x.meshData.bufferViews,x.meshData.accessors),f._geometryData[0]._customAttributes=x.meshData._customAttributes})}return m.then(function(){let C=f._dataProvider._binarizeGltf(o),y=new Blob([C],{type:"application/binary"});f._glbURL=URL.createObjectURL(y)})})};Ov.prototype._hookedRequestContent=Ov.prototype.requestContent;Ov.prototype._resolveHookedObject=function(){let o=this;this._hookedRequestContent(),this._contentReadyToProcessPromise.then(function(){o._contentReadyToProcessDefer.resolve()}),this._contentReadyPromise.then(function(A){o._isLoading=!1,o._contentReadyDefer.resolve(A)})};Ov.prototype.requestContent=function(){let o=this;return this.tileset._isI3STileSet?this._isLoading?1:(this._isLoading=!0,this._contentReadyToProcessDefer=rA(),this._contentReadyDefer=rA(),this._contentReadyToProcessPromise=this._contentReadyToProcessDefer.promise,this._contentReadyPromise=this._contentReadyDefer.promise,this._i3sNode._createContentURL().then(function(){o._contentResource=new An({url:o._i3sNode._glbURL}),o._resolveHookedObject()}),0):this._hookedRequestContent()};function i2i(o,A,f,m,C,y){let x=f*(1-o)+m*o,v=C*(1-o)+y*o;return x*(1-A)+v*A}function N$(o,A,f,m){let C=o+A*f;return m[C]}function r2i(o,A,f){let m=f.nativeExtent,C=(o-m.west)/(m.east-m.west)*(f.width-1),y=(A-m.south)/(m.north-m.south)*(f.height-1),x=Math.floor(C),v=Math.floor(y);C-=x,y-=v;let E=x<f.width?x+1:x,I=v<f.height?v+1:v;v=f.height-1-v,I=f.height-1-I;let w=N$(x,v,f.width,f.buffer),Q=N$(E,v,f.width,f.buffer),M=N$(x,I,f.width,f.buffer),B=N$(E,I,f.width,f.buffer),T=i2i(C,y,w,Q,M,B);return T=T*f.scale+f.offset,T}Object.defineProperties(Ov.prototype,{i3sNode:{get:function(){return this._i3sNode}}});var wie=sI;function X1(o,A,f){this._dataProvider=o,O(A.href)||(A.href=`./layers/${f}`);let m=this._dataProvider.resource.getUrlComponent(),C="";m.match(/layers\/\d/)?C=`${m}`.replace(/\/+$/,""):C=`${m}`.replace(/\/?$/,"/").concat(`${A.href}`),this._version=A.store.version;let y=this._version.split(".");this._majorVersion=parseInt(y[0]),this._minorVersion=y.length>1?parseInt(y[1]):0,this._resource=new An({url:C}),this._resource.setQueryParameters(this._dataProvider.resource.queryParameters),this._resource.appendForwardSlash(),this._data=A,this._rootNode=void 0,this._nodePages={},this._nodePageFetches={},this._extent=void 0,this._tileset=void 0,this._geometryDefinitions=void 0,this._computeGeometryDefinitions(!0),this._computeExtent()}Object.defineProperties(X1.prototype,{resource:{get:function(){return this._resource}},rootNode:{get:function(){return this._rootNode}},tileset:{get:function(){return this._tileset}},data:{get:function(){return this._data}},version:{get:function(){return this._version}},majorVersion:{get:function(){return this._majorVersion}},minorVersion:{get:function(){return this._minorVersion}},legacyVersion16:{get:function(){if(O(this.version))return this.majorVersion<1||this.majorVersion===1&&this.minorVersion<=6}}});X1.prototype.load=function(){let o=this;return this._data.spatialReference.wkid!==4326?(console.log(`Unsupported spatial reference: ${this._data.spatialReference.wkid}`),Promise.reject()):this._dataProvider._geoidDataIsReadyPromise.then(function(){return o._loadRootNode().then(function(){return o._create3DTileset(),o._tileset.readyPromise.then(function(){if(o._rootNode._tile=o._tileset._root,o._tileset._root._i3sNode=o._rootNode,o.legacyVersion16)return o._rootNode._loadChildren()})})})};X1.prototype._computeGeometryDefinitions=function(o){if(this._geometryDefinitions=[],O(this._data.geometryDefinitions))for(let A=0;A<this._data.geometryDefinitions.length;A++){let f=[],m=this._data.geometryDefinitions[A].geometryBuffers;for(let C=0;C<m.length;C++){let y=m[C],x=[],v=!1;if(O(y.compressedAttributes)&&o){v=!0;let E=y.compressedAttributes.attributes;for(let I=0;I<E.length;I++)x.push(E[I])}else for(let E in y)E!=="offset"&&x.push(E);f.push({compressed:v,attributes:x,index:m.indexOf(y)})}f.sort(function(C,y){return C.compressed&&!y.compressed?-1:!C.compressed&&y.compressed?1:C.attributes.length-y.attributes.length}),this._geometryDefinitions.push(f)}};X1.prototype._findBestGeometryBuffers=function(o,A){let f=this._geometryDefinitions[o];if(O(f))for(let m=0;m<f.length;++m){let C=f[m],y=!1,x=C.attributes;for(let v=0;v<A.length;v++)if(!x.includes(A[v])){y=!0;break}if(!y)return{bufferIndex:C.index,definition:f,geometryBufferInfo:C}}return 0};X1.prototype._loadRootNode=function(){if(O(this._data.nodePages)){let o=0;O(this._data.nodePages.rootIndex)&&(o=this._data.nodePages.rootIndex),this._rootNode=new wie(this,o,!0)}else this._rootNode=new wie(this,this._data.store.rootNode,!0);return this._rootNode.load()};X1.prototype._getNodeInNodePages=function(o){let A=Math.floor(o/this._data.nodePages.nodesPerPage),f=o%this._data.nodePages.nodesPerPage,m=this;return this._loadNodePage(A).then(function(){return m._nodePages[A][f]})};X1._fetchJson=function(o){return o.fetchJson()};X1.prototype._loadNodePage=function(o){let A=this;if(!O(this._nodePageFetches[o])){let f=this.resource.getDerivedResource({url:`nodepages/${o}/`}),m=X1._fetchJson(f).then(function(C){return O(C.error)&&C.error.code!==200?Promise.reject(C.error):(A._nodePages[o]=C.nodes,C)});this._nodePageFetches[o]=m}return this._nodePageFetches[o]};X1.prototype._computeExtent=function(){O(this._data.fullExtent)?this._extent=Si.fromDegrees(this._data.fullExtent.xmin,this._data.fullExtent.ymin,this._data.fullExtent.xmax,this._data.fullExtent.ymax):O(this._data.store.extent)&&(this._extent=Si.fromDegrees(this._data.store.extent[0],this._data.store.extent[1],this._data.store.extent[2],this._data.store.extent[3]))};X1.prototype._create3DTileset=function(){let o={asset:{version:"1.0"},geometricError:Number.MAX_VALUE,root:this._rootNode._create3DTileDefinition()},A=new Blob([JSON.stringify(o)],{type:"application/json"}),f=URL.createObjectURL(A),m={};if(O(this._dataProvider._cesium3dTilesetOptions))for(let y in this._dataProvider._cesium3dTilesetOptions)this._dataProvider._cesium3dTilesetOptions.hasOwnProperty(y)&&(m[y]=this._dataProvider._cesium3dTilesetOptions[y]);m.url=f,m.show=this._dataProvider.show,this._tileset=new Fx(m),this._tileset._isI3STileSet=!0;let C=this;this._tileset.readyPromise.then(function(){C._tileset.tileUnload.addEventListener(function(y){y._i3sNode._clearGeometryData(),URL.revokeObjectURL(y._contentResource._url),y._contentResource=y._i3sNode.resource}),C._tileset.tileVisible.addEventListener(function(y){O(y._i3sNode)&&y._i3sNode._loadChildren()})})};var bie=X1,n2i=xh(mBt(),1);function dy(o){o=Ae(o,Ae.EMPTY_OBJECT),this._resource=An.createIfNeeded(o.url),this._name=o.name,this._show=Ae(o.show,!0),this._geoidTiledTerrainProvider=o.geoidTiledTerrainProvider,this._traceFetches=Ae(o.traceFetches,!1),this._cesium3dTilesetOptions=Ae(o.cesium3dTilesetOptions,Ae.EMPTY_OBJECT),this._layers=[],this._data=void 0,this._extent=void 0,this._geoidDataIsReadyPromise=void 0,this._geoidDataList=void 0,this._decoderTaskProcessor=void 0,this._readyPromise=void 0,this._ready=!1,this._load()}Object.defineProperties(dy.prototype,{name:{get:function(){return this._name}},show:{get:function(){return this._show},set:function(o){this._show=o;for(let A=0;A<this._layers.length;A++)O(this._layers[A]._tileset)&&(this._layers[A]._tileset.show=this._show)}},traceFetches:{get:function(){return this._traceFetches},set:function(o){this._traceFetches=o}},geoidTiledTerrainProvider:{get:function(){return this._geoidTiledTerrainProvider}},layers:{get:function(){return this._layers}},data:{get:function(){return this._data}},extent:{get:function(){return this._extent}},readyPromise:{get:function(){return this._readyPromise}},ready:{get:function(){return this._ready}},resource:{get:function(){return this._resource}}});dy.prototype.destroy=function(){for(let o=0;o<this._layers.length;o++)O(this._layers[o]._tileset)&&this._layers[o]._tileset.destroy();return Qr(this)};dy.prototype.isDestroyed=function(){return!1};dy.prototype.update=function(o){for(let A=0;A<this._layers.length;A++)O(this._layers[A]._tileset)&&this._layers[A]._tileset.ready&&this._layers[A]._tileset.update(o)};dy.prototype.prePassesUpdate=function(o){for(let A=0;A<this._layers.length;A++)O(this._layers[A]._tileset)&&this._layers[A]._tileset.ready&&this._layers[A]._tileset.prePassesUpdate(o)};dy.prototype.postPassesUpdate=function(o){for(let A=0;A<this._layers.length;A++)O(this._layers[A]._tileset)&&this._layers[A]._tileset.ready&&this._layers[A]._tileset.postPassesUpdate(o)};dy.prototype.updateForPass=function(o,A){for(let f=0;f<this._layers.length;f++)O(this._layers[f]._tileset)&&this._layers[f]._tileset.ready&&this._layers[f]._tileset.updateForPass(o,A)};dy.prototype._load=function(){let o=this;return this._readyPromise=this._loadJson(this._resource).then(function(A){if(o._data=A,O(o._data.layers))for(let m=0;m<o._data.layers.length;m++){let C=new bie(o,o._data.layers[m],m);o._layers.push(C)}else{let m=new bie(o,o._data,o._data.id);o._layers.push(m)}o._computeExtent(),o._loadGeoidData();let f=[];for(let m=0;m<o._layers.length;m++)f.push(o._layers[m].load());return Promise.all(f).then(function(){return o._ready=!0,o})}),this._readyPromise};dy._fetchJson=function(o){return o.fetchJson()};dy.prototype._loadJson=function(o){return this._traceFetches&&console.log("I3S FETCH:",o.url),dy._fetchJson(o).then(function(A){if(O(A.error)){if(console.error("Failed to fetch I3S ",o.url),O(A.error.message)&&console.error(A.error.message),O(A.error.details))for(let f=0;f<A.error.details.length;f++)console.log(A.error.details[f]);return Promise.reject(A.error)}return A})};dy.prototype._loadBinary=function(o){return this._traceFetches&&console.log("I3S FETCH:",o.url),o.fetchArrayBuffer()};dy.prototype._binarizeGltf=function(o){let A=new TextEncoder().encode(JSON.stringify(o)),f=new Uint8Array(A.byteLength+20),m={magic:new Uint8Array(f.buffer,0,4),version:new Uint32Array(f.buffer,4,1),length:new Uint32Array(f.buffer,8,1),chunkLength:new Uint32Array(f.buffer,12,1),chunkType:new Uint32Array(f.buffer,16,1),chunkData:new Uint8Array(f.buffer,20,A.byteLength)};return m.magic[0]="g".charCodeAt(),m.magic[1]="l".charCodeAt(),m.magic[2]="T".charCodeAt(),m.magic[3]="F".charCodeAt(),m.version[0]=2,m.length[0]=f.byteLength,m.chunkLength[0]=A.byteLength,m.chunkType[0]=1313821514,m.chunkData.set(A),f};dy.prototype._getDecoderTaskProcessor=function(){if(!O(this._decoderTaskProcessor)){let o=new Vf("decodeI3S");this._taskProcessorReadyPromise=o.initWebAssemblyModule({modulePath:"ThirdParty/Workers/draco_decoder_nodejs.js",wasmBinaryFile:"ThirdParty/draco_decoder.wasm"}),this._decoderTaskProcessor=o}return this._decoderTaskProcessor};function o2i(o,A){return o.readyPromise.then(function(){return s2i(o,A)})}var a2i=new Bt;function s2i(o,A){let f=o.tilingScheme,m=[],C={},y=o._lodCount,x=Kt.fromRadians(A.west,A.north),v=Kt.fromRadians(A.east,A.south),E=f.positionToTileXY(x,y),I=f.positionToTileXY(v,y);for(let Q=E.x;Q<=I.x;Q++)for(let M=E.y;M<=I.y;M++){let B=Bt.fromElements(Q,M,a2i),T=B.toString();if(!C.hasOwnProperty(T)){let D={x:B.x,y:B.y,level:y,tilingScheme:f,terrainProvider:o,positions:[]};C[T]=D,m.push(D)}}let w=[];for(let Q=0;Q<m.length;++Q){let M=m[Q],B=M.terrainProvider.requestTileGeometry(M.x,M.y,M.level);w.push(B)}return Promise.all(w).then(function(Q){let M=[];for(let B=0;B<Q.length;B++){let T={tilingScheme:f,x:m[B].x,y:m[B].y,level:m[B].level},D=Q[B],F="Geographic";f._projection instanceof NA&&(F="WebMercator");let L={projectionType:F,projection:f._projection,nativeExtent:f.tileXYToNativeRectangle(T.x,T.y,T.level),height:D._height,width:D._width,scale:D._structure.heightScale,offset:D._structure.heightOffset};if(D._encoding===VF.LERC){let R=n2i.default.decode(D._buffer);L.buffer=R.pixels[0]}else L.buffer=D._buffer;M.push(L)}return M})}dy.prototype._loadGeoidData=function(){let o=this,A=this._geoidTiledTerrainProvider;return O(A)?(this._geoidDataIsReadyPromise=A.readyPromise.then(function(){return o2i(A,o._extent).then(function(f){o._geoidDataList=f})}),this._geoidDataIsReadyPromise):(console.log("No Geoid Terrain service provided - no geoid conversion will be performed."),this._geoidDataIsReadyPromise=Promise.resolve(),this._geoidDataIsReadyPromise)};dy.prototype._computeExtent=function(){let o;for(let A=0;A<this._layers.length;A++)if(O(this._layers[A]._extent)){let f=this._layers[A]._extent;O(o)?Si.union(o,f,o):o=Si.clone(f)}this._extent=o};var Ust=dy;function Gst(){}Object.defineProperties(Gst.prototype,{color:{get:Ui.throwInstantiationError},intensity:{get:Ui.throwInstantiationError}});var Hst=Gst,l2i=/\/$/,Vst=new tl('&copy; <a href="https://www.mapbox.com/about/maps/">Mapbox</a> &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/">Improve this map</a></strong>');function _H(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.styleId,f=o.accessToken;this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0;let m=An.createIfNeeded(Ae(o.url,"https://api.mapbox.com/styles/v1/"));this._styleId=A,this._accessToken=f;let C=Ae(o.tilesize,512);this._tilesize=C;let y=Ae(o.username,"mapbox");this._username=y;let x=O(o.scaleFactor)?"@2x":"",v=m.getUrlComponent();l2i.test(v)||(v+="/"),v+=`${this._username}/${A}/tiles/${this._tilesize}/{z}/{x}/{y}${x}`,m.url=v,m.setQueryParameters({access_token:f});let E;O(o.credit)?(E=o.credit,typeof E=="string"&&(E=new tl(E))):E=Vst,this._resource=m,this._imageryProvider=new sw({url:m,credit:E,ellipsoid:o.ellipsoid,minimumLevel:o.minimumLevel,maximumLevel:o.maximumLevel,rectangle:o.rectangle})}Object.defineProperties(_H.prototype,{url:{get:function(){return this._imageryProvider.url}},ready:{get:function(){return this._imageryProvider.ready}},readyPromise:{get:function(){return this._imageryProvider.readyPromise}},rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._imageryProvider.errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},proxy:{get:function(){return this._imageryProvider.proxy}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}}});_H.prototype.getTileCredits=function(o,A,f){};_H.prototype.requestImage=function(o,A,f,m){return this._imageryProvider.requestImage(o,A,f,m)};_H.prototype.pickFeatures=function(o,A,f,m,C){return this._imageryProvider.pickFeatures(o,A,f,m,C)};_H._defaultCredit=Vst;var zst=_H;function xDe(o){}xDe.prototype.isReady=function(){return!0};xDe.prototype.shouldDiscardImage=function(o){return!1};var Kst=xDe,u2i=new Bt(1,1);function vDe(o){o=Ae(o,Ae.EMPTY_OBJECT),this.mass=Ae(o.mass,1),this.position=ee.clone(Ae(o.position,ee.ZERO)),this.velocity=ee.clone(Ae(o.velocity,ee.ZERO)),this.life=Ae(o.life,Number.MAX_VALUE),this.image=o.image,this.startColor=At.clone(Ae(o.startColor,At.WHITE)),this.endColor=At.clone(Ae(o.endColor,At.WHITE)),this.startScale=Ae(o.startScale,1),this.endScale=Ae(o.endScale,1),this.imageSize=Bt.clone(Ae(o.imageSize,u2i)),this._age=0,this._normalizedAge=0,this._billboard=void 0}Object.defineProperties(vDe.prototype,{age:{get:function(){return this._age}},normalizedAge:{get:function(){return this._normalizedAge}}});var A7e=new ee;vDe.prototype.update=function(o,A){return ee.multiplyByScalar(this.velocity,o,A7e),ee.add(this.position,A7e,this.position),O(A)&&A(this,o),this._age+=o,this.life===Number.MAX_VALUE?this._normalizedAge=0:this._normalizedAge=this._age/this.life,this._age<=this.life};var yae=vDe;function Yst(o){o=Ae(o,Ae.EMPTY_OBJECT),this.time=Ae(o.time,0),this.minimum=Ae(o.minimum,0),this.maximum=Ae(o.maximum,50),this._complete=!1}Object.defineProperties(Yst.prototype,{complete:{get:function(){return this._complete}}});var BH=Yst;function Jst(o){}Jst.prototype.emit=function(o){Ui.throwInstantiationError()};var Wst=Jst,h7e=new Bt(1,1);function AW(o){o=Ae(o,Ae.EMPTY_OBJECT),this.show=Ae(o.show,!0),this.updateCallback=o.updateCallback,this.loop=Ae(o.loop,!0),this.image=Ae(o.image,void 0);let A=o.emitter;O(A)||(A=new cDe(.5)),this._emitter=A,this._bursts=o.bursts,this._modelMatrix=Xe.clone(Ae(o.modelMatrix,Xe.IDENTITY)),this._emitterModelMatrix=Xe.clone(Ae(o.emitterModelMatrix,Xe.IDENTITY)),this._matrixDirty=!0,this._combinedMatrix=new Xe,this._startColor=At.clone(Ae(o.color,Ae(o.startColor,At.WHITE))),this._endColor=At.clone(Ae(o.color,Ae(o.endColor,At.WHITE))),this._startScale=Ae(o.scale,Ae(o.startScale,1)),this._endScale=Ae(o.scale,Ae(o.endScale,1)),this._emissionRate=Ae(o.emissionRate,5),this._minimumSpeed=Ae(o.speed,Ae(o.minimumSpeed,1)),this._maximumSpeed=Ae(o.speed,Ae(o.maximumSpeed,1)),this._minimumParticleLife=Ae(o.particleLife,Ae(o.minimumParticleLife,5)),this._maximumParticleLife=Ae(o.particleLife,Ae(o.maximumParticleLife,5)),this._minimumMass=Ae(o.mass,Ae(o.minimumMass,1)),this._maximumMass=Ae(o.mass,Ae(o.maximumMass,1)),this._minimumImageSize=Bt.clone(Ae(o.imageSize,Ae(o.minimumImageSize,h7e))),this._maximumImageSize=Bt.clone(Ae(o.imageSize,Ae(o.maximumImageSize,h7e))),this._sizeInMeters=Ae(o.sizeInMeters,!1),this._lifetime=Ae(o.lifetime,Number.MAX_VALUE),this._billboardCollection=void 0,this._particles=[],this._particlePool=[],this._previousTime=void 0,this._currentTime=0,this._carryOver=0,this._complete=new br,this._isComplete=!1,this._updateParticlePool=!0,this._particleEstimate=0}Object.defineProperties(AW.prototype,{emitter:{get:function(){return this._emitter},set:function(o){this._emitter=o}},bursts:{get:function(){return this._bursts},set:function(o){this._bursts=o,this._updateParticlePool=!0}},modelMatrix:{get:function(){return this._modelMatrix},set:function(o){this._matrixDirty=this._matrixDirty||!Xe.equals(this._modelMatrix,o),Xe.clone(o,this._modelMatrix)}},emitterModelMatrix:{get:function(){return this._emitterModelMatrix},set:function(o){this._matrixDirty=this._matrixDirty||!Xe.equals(this._emitterModelMatrix,o),Xe.clone(o,this._emitterModelMatrix)}},startColor:{get:function(){return this._startColor},set:function(o){At.clone(o,this._startColor)}},endColor:{get:function(){return this._endColor},set:function(o){At.clone(o,this._endColor)}},startScale:{get:function(){return this._startScale},set:function(o){this._startScale=o}},endScale:{get:function(){return this._endScale},set:function(o){this._endScale=o}},emissionRate:{get:function(){return this._emissionRate},set:function(o){this._emissionRate=o,this._updateParticlePool=!0}},minimumSpeed:{get:function(){return this._minimumSpeed},set:function(o){this._minimumSpeed=o}},maximumSpeed:{get:function(){return this._maximumSpeed},set:function(o){this._maximumSpeed=o}},minimumParticleLife:{get:function(){return this._minimumParticleLife},set:function(o){this._minimumParticleLife=o}},maximumParticleLife:{get:function(){return this._maximumParticleLife},set:function(o){this._maximumParticleLife=o,this._updateParticlePool=!0}},minimumMass:{get:function(){return this._minimumMass},set:function(o){this._minimumMass=o}},maximumMass:{get:function(){return this._maximumMass},set:function(o){this._maximumMass=o}},minimumImageSize:{get:function(){return this._minimumImageSize},set:function(o){this._minimumImageSize=o}},maximumImageSize:{get:function(){return this._maximumImageSize},set:function(o){this._maximumImageSize=o}},sizeInMeters:{get:function(){return this._sizeInMeters},set:function(o){this._sizeInMeters=o}},lifetime:{get:function(){return this._lifetime},set:function(o){this._lifetime=o}},complete:{get:function(){return this._complete}},isComplete:{get:function(){return this._isComplete}}});function c2i(o){let A=o._emissionRate,f=o._maximumParticleLife,m=0,C=o._bursts;if(O(C)){let Q=C.length;for(let M=0;M<Q;++M)m+=C[M].maximum}let y=o._billboardCollection,x=o.image,v=Math.ceil(A*f+m),E=o._particles,I=o._particlePool,w=Math.max(v-E.length-I.length,0);for(let Q=0;Q<w;++Q){let M=new yae;M._billboard=y.add({image:x}),I.push(M)}o._particleEstimate=v}function A2i(o){let A=o._particlePool.pop();return O(A)||(A=new yae),A}function h2i(o,A){o._particlePool.push(A)}function d2i(o){let A=o._particles,f=o._particlePool,m=o._billboardCollection,C=A.length,y=f.length,x=o._particleEstimate,v=y-Math.max(x-C-y,0);for(let E=v;E<y;++E){let I=f[E];m.remove(I._billboard)}f.length=v}function f2i(o){O(o._billboard)&&(o._billboard.show=!1)}function d7e(o,A){let f=A._billboard;O(f)||(f=A._billboard=o._billboardCollection.add({image:A.image})),f.width=A.imageSize.x,f.height=A.imageSize.y,f.position=A.position,f.sizeInMeters=o.sizeInMeters,f.show=!0;let m=je.lerp(A.startColor.red,A.endColor.red,A.normalizedAge),C=je.lerp(A.startColor.green,A.endColor.green,A.normalizedAge),y=je.lerp(A.startColor.blue,A.endColor.blue,A.normalizedAge),x=je.lerp(A.startColor.alpha,A.endColor.alpha,A.normalizedAge);f.color=new At(m,C,y,x),f.scale=je.lerp(A.startScale,A.endScale,A.normalizedAge)}function g2i(o,A){A.startColor=At.clone(o._startColor,A.startColor),A.endColor=At.clone(o._endColor,A.endColor),A.startScale=o._startScale,A.endScale=o._endScale,A.image=o.image,A.life=je.randomBetween(o._minimumParticleLife,o._maximumParticleLife),A.mass=je.randomBetween(o._minimumMass,o._maximumMass),A.imageSize.x=je.randomBetween(o._minimumImageSize.x,o._maximumImageSize.x),A.imageSize.y=je.randomBetween(o._minimumImageSize.y,o._maximumImageSize.y),A._normalizedAge=0,A._age=0;let f=je.randomBetween(o._minimumSpeed,o._maximumSpeed);ee.multiplyByScalar(A.velocity,f,A.velocity),o._particles.push(A)}function p2i(o,A){if(o._isComplete)return 0;A=je.mod(A,o._lifetime);let f=A*o._emissionRate,m=Math.floor(f);if(o._carryOver+=f-m,o._carryOver>1&&(m++,o._carryOver-=1),O(o.bursts)){let C=o.bursts.length;for(let y=0;y<C;y++){let x=o.bursts[y],v=o._currentTime;O(x)&&!x._complete&&v>x.time&&(m+=je.randomBetween(x.minimum,x.maximum),x._complete=!0)}}return m}var k$=new ee;AW.prototype.update=function(o){if(!this.show)return;O(this._billboardCollection)||(this._billboardCollection=new iI),this._updateParticlePool&&(c2i(this),this._updateParticlePool=!1);let A=0;this._previousTime&&(A=fi.secondsDifference(o.time,this._previousTime)),A<0&&(A=0);let f=this._particles,m=this._emitter,C=this.updateCallback,y,x,v=f.length;for(y=0;y<v;++y)x=f[y],x.update(A,C)?d7e(this,x):(f2i(x),h2i(this,x),f[y]=f[v-1],--y,--v);f.length=v;let E=p2i(this,A);if(E>0&&O(m)){this._matrixDirty&&(this._combinedMatrix=Xe.multiply(this.modelMatrix,this.emitterModelMatrix,this._combinedMatrix),this._matrixDirty=!1);let I=this._combinedMatrix;for(y=0;y<E;y++)x=A2i(this),this._emitter.emit(x),ee.add(x.position,x.velocity,k$),Xe.multiplyByPoint(I,k$,k$),x.position=Xe.multiplyByPoint(I,x.position,x.position),ee.subtract(k$,x.position,x.velocity),ee.normalize(x.velocity,x.velocity),g2i(this,x),d7e(this,x)}if(this._billboardCollection.update(o),this._previousTime=fi.clone(o.time,this._previousTime),this._currentTime+=A,this._lifetime!==Number.MAX_VALUE&&this._currentTime>this._lifetime)if(this.loop){if(this._currentTime=je.mod(this._currentTime,this._lifetime),this.bursts){let I=this.bursts.length;for(y=0;y<I;y++)this.bursts[y]._complete=!1}}else this._isComplete=!0,this._complete.raiseEvent(this);o.frameNumber%120===0&&d2i(this)};AW.prototype.isDestroyed=function(){return!1};AW.prototype.destroy=function(){return this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),Qr(this)};var _2=AW;function hB(){Ui.throwInstantiationError()}hB.computeDefaultLevelZeroMaximumGeometricError=function(o){return o.ellipsoid.maximumRadius*2*Math.PI*.25/(65*o.getNumberOfXTilesAtLevel(0))};Object.defineProperties(hB.prototype,{quadtree:{get:Ui.throwInstantiationError,set:Ui.throwInstantiationError},ready:{get:Ui.throwInstantiationError},tilingScheme:{get:Ui.throwInstantiationError},errorEvent:{get:Ui.throwInstantiationError}});hB.prototype.update=Ui.throwInstantiationError;hB.prototype.beginUpdate=Ui.throwInstantiationError;hB.prototype.endUpdate=Ui.throwInstantiationError;hB.prototype.getLevelMaximumGeometricError=Ui.throwInstantiationError;hB.prototype.loadTile=Ui.throwInstantiationError;hB.prototype.computeTileVisibility=Ui.throwInstantiationError;hB.prototype.showTileThisFrame=Ui.throwInstantiationError;hB.prototype.computeDistanceToTile=Ui.throwInstantiationError;hB.prototype.isDestroyed=Ui.throwInstantiationError;hB.prototype.destroy=Ui.throwInstantiationError;var jst=hB;function EDe(o){o=Ae(o,1),this._radius=Ae(o,1)}Object.defineProperties(EDe.prototype,{radius:{get:function(){return this._radius},set:function(o){this._radius=o}}});EDe.prototype.emit=function(o){let A=je.randomBetween(0,je.TWO_PI),f=je.randomBetween(0,je.PI),m=je.randomBetween(0,this._radius),C=m*Math.cos(A)*Math.sin(f),y=m*Math.sin(A)*Math.sin(f),x=m*Math.cos(f);o.position=ee.fromElements(C,y,x,o.position),o.velocity=ee.normalize(o.position,o.velocity)};var wH=EDe;function hW(){}hW.prototype.evaluate=function(o,A){Ui.throwInstantiationError()};hW.prototype.evaluateColor=function(o,A){Ui.throwInstantiationError()};hW.prototype.getShaderFunction=function(o,A,f,m){Ui.throwInstantiationError()};hW.prototype.getVariables=function(){Ui.throwInstantiationError()};var qst=hW;function bH(){}bH.prototype.boundingVolume=void 0;bH.prototype.boundingSphere=void 0;bH.prototype.distanceToCamera=function(o){Ui.throwInstantiationError()};bH.prototype.intersectPlane=function(o){Ui.throwInstantiationError()};bH.prototype.createDebugVolume=function(o){Ui.throwInstantiationError()};var Xst=bH;function dW(o){o=Ae(o,Ae.EMPTY_OBJECT),this._tilingScheme=O(o.tilingScheme)?o.tilingScheme:new af({ellipsoid:o.ellipsoid}),this._color=Ae(o.color,At.YELLOW),this._errorEvent=new br,this._tileWidth=Ae(o.tileWidth,256),this._tileHeight=Ae(o.tileHeight,256),this._readyPromise=Promise.resolve(!0),this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0}Object.defineProperties(dW.prototype,{proxy:{get:function(){}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){}},minimumLevel:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){}},hasAlphaChannel:{get:function(){return!0}}});dW.prototype.getTileCredits=function(o,A,f){};dW.prototype.requestImage=function(o,A,f,m){let C=document.createElement("canvas");C.width=256,C.height=256;let y=C.getContext("2d"),x=this._color.toCssColorString();return y.strokeStyle=x,y.lineWidth=2,y.strokeRect(1,1,255,255),y.font="bold 25px Arial",y.textAlign="center",y.fillStyle=x,y.fillText(`L: ${f}`,124,86),y.fillText(`X: ${o}`,124,136),y.fillText(`Y: ${A}`,124,186),Promise.resolve(C)};dW.prototype.pickFeatures=function(o,A,f,m,C){};var IDe=dW;function _De(o){Ui.throwInstantiationError()}_De.prototype.isReady=Ui.throwInstantiationError;_De.prototype.shouldDiscardImage=Ui.throwInstantiationError;var Zst=_De,m2i={START:0,LOADING:1,READY:2,UPSAMPLED_ONLY:3},$st=Object.freeze(m2i);function xae(o,A){this.show=!0,O(o)||(o=new Kr),this.rectangle=Kr.clone(o),O(A)||(A=as.fromType(as.ColorType,{color:new At(1,1,1,1)})),this.material=A,this._material=void 0,this._overlayCommand=void 0,this._rs=void 0}xae.prototype.update=function(o){if(!this.show)return;let A=this._rs;if((!O(A)||!Kr.equals(A.viewport,this.rectangle))&&(this._rs=fn.fromCache({blending:Bu.ALPHA_BLEND,viewport:this.rectangle})),o.passes.render){let f=o.context;if(this._material!==this.material||!O(this._overlayCommand)){this._material=this.material,O(this._overlayCommand)&&this._overlayCommand.shaderProgram.destroy();let m=new Fr({sources:[this._material.shaderSource,ySe]});this._overlayCommand=f.createViewportQuadCommand(m,{renderState:this._rs,uniformMap:this._material._uniforms,owner:this}),this._overlayCommand.pass=hr.OVERLAY}this._material.update(f),this._overlayCommand.renderState=this._rs,this._overlayCommand.uniformMap=this._material._uniforms,o.commandList.push(this._overlayCommand)}};xae.prototype.isDestroyed=function(){return!1};xae.prototype.destroy=function(){return O(this._overlayCommand)&&(this._overlayCommand.shaderProgram=this._overlayCommand.shaderProgram&&this._overlayCommand.shaderProgram.destroy()),Qr(this)};var elt=xae;function C2i(o){return function(A){let f=o._scene.pick(A.position);O(f)&&f.primitive instanceof Fx&&(o.tileset=f.primitive),o.pickActive=!1}}function tlt(o,A){A?o._eventHandler.setInputAction(function(f){let m=o._scene.pick(f.endPosition);O(m)&&m.primitive instanceof Fx&&(o.tileset=m.primitive)},Ki.MOUSE_MOVE):(o._eventHandler.removeInputAction(Ki.MOUSE_MOVE),o.picking=o.picking)}var y2i={maximumFractionDigits:3};function F7(o){let A=o/1048576;return A<1?A.toLocaleString(void 0,y2i):Math.round(A).toLocaleString()}function qK(o,A){if(!O(o))return"";let f=A?o._statisticsPerPass[Ep.PICK]:o._statisticsPerPass[Ep.RENDER],m='<ul class="cesium-cesiumInspector-statistics">';return m+=`<li><strong>\u8BBF\u95EE: </strong>${f.visited.toLocaleString()}</li><li><strong>\u9009\u62E9: </strong>${f.selected.toLocaleString()}</li><li><strong>\u7ED8\u5236\u547D\u4EE4: </strong>${f.numberOfCommands.toLocaleString()}</li>`,m+="</ul>",A||(m+='<ul class="cesium-cesiumInspector-statistics">',m+=`<li><strong>\u8BF7\u6C42: </strong>${f.numberOfPendingRequests.toLocaleString()}</li><li><strong>\u5C1D\u8BD5: </strong>${f.numberOfAttemptedRequests.toLocaleString()}</li><li><strong>\u5904\u7406\u4E2D: </strong>${f.numberOfTilesProcessing.toLocaleString()}</li><li><strong>\u5185\u5BB9\u5C31\u7EEA: </strong>${f.numberOfTilesWithContentReady.toLocaleString()}</li><li><strong>\u603B\u5171: </strong>${f.numberOfTilesTotal.toLocaleString()}</li>`,m+="</ul>",m+='<ul class="cesium-cesiumInspector-statistics">',m+=`<li><strong>\u7279\u5F81\u9009\u62E9: </strong>${f.numberOfFeaturesSelected.toLocaleString()}</li><li><strong>\u7279\u5F81\u52A0\u8F7D: </strong>${f.numberOfFeaturesLoaded.toLocaleString()}</li><li><strong>\u70B9\u4E91\u9009\u62E9: </strong>${f.numberOfPointsSelected.toLocaleString()}</li><li><strong>\u70B9\u4E91\u52A0\u8F7D: </strong>${f.numberOfPointsLoaded.toLocaleString()}</li><li><strong>\u4E09\u89D2\u5F62\u6570: </strong>${f.numberOfTrianglesSelected.toLocaleString()}</li>`,m+="</ul>",m+='<ul class="cesium-cesiumInspector-statistics">',m+=`<li><strong>\u6837\u5F0F\u6E32\u67D3\u74E6\u7247\u6570: </strong>${f.numberOfTilesStyled.toLocaleString()}</li><li><strong>\u6837\u5F0F\u6E32\u67D3\u7279\u5F81\u6570: </strong>${f.numberOfFeaturesStyled.toLocaleString()}</li>`,m+="</ul>",m+='<ul class="cesium-cesiumInspector-statistics">',m+=`<li><strong>\u5B50\u8282\u70B9\u5254\u9664\u6570: </strong>${f.numberOfTilesCulledWithChildrenUnion.toLocaleString()}</li>`,m+="</ul>",m+='<ul class="cesium-cesiumInspector-statistics">',m+=`<li><strong>\u51E0\u4F55\u5360\u5185\u5B58 (MB): </strong>${F7(f.geometryByteLength)}</li><li><strong>\u7EB9\u7406\u5360\u5185\u5B58 (MB): </strong>${F7(f.texturesByteLength)}</li><li><strong>\u5C5E\u6027\u5360\u5185\u5B58 (MB): </strong>${F7(f.batchTableByteLength)}</li>`,m+="</ul>"),m}function ilt(){let o=sf.statistics;return`
  <ul class="cesium-cesiumInspector-statistics">
    <li><strong>\u51E0\u4F55\u5360\u5185\u5B58 (MB): </strong>${F7(o.geometryByteLength)}</li>
    <li><strong>\u7EB9\u7406\u5360\u5185\u5B58 (MB): </strong>${F7(o.texturesByteLength)}</li>
  </ul>
  `}var x2i=[{text:"\u9AD8\u4EAE",value:bD.HIGHLIGHT},{text:"\u66FF\u6362",value:bD.REPLACE},{text:"\u6DF7\u5408",value:bD.MIX}],f7e=new At(1,1,0,.4),v2i=new At,O$=new At;function EC(o,A){let f=this,m=o.canvas;this._eventHandler=new Ur(m),this._scene=o,this._performanceContainer=A,this._canvas=m,this._performanceDisplay=new OJ({container:A}),this._statisticsText="",this._pickStatisticsText="",this._resourceCacheStatisticsText="",this._editorError="",this.performance=!1,this.showStatistics=!0,this.showPickStatistics=!0,this.showResourceCacheStatistics=!1,this.inspectorVisible=!0,this.tilesetVisible=!1,this.displayVisible=!1,this.updateVisible=!1,this.loggingVisible=!1,this.styleVisible=!1,this.tileDebugLabelsVisible=!1,this.optimizationVisible=!1,this.styleString="{}",this.hasEnabledWireframe=!1,this._tileset=void 0,this._feature=void 0,this._tile=void 0,gr.track(this,["performance","inspectorVisible","_statisticsText","_pickStatisticsText","_resourceCacheStatisticsText","_editorError","showPickStatistics","showStatistics","showResourceCacheStatistics","tilesetVisible","displayVisible","updateVisible","loggingVisible","styleVisible","optimizationVisible","tileDebugLabelsVisible","styleString","_feature","_tile","_tileset","hasEnabledWireframe"]),this._properties=gr.observable({}),this.properties=[],gr.defineProperty(this,"properties",function(){let Ie=[],ve=f._properties();for(let K in ve)ve.hasOwnProperty(K)&&Ie.push(K);return Ie});let C=gr.observable();gr.defineProperty(this,"dynamicScreenSpaceError",{get:function(){return C()},set:function(Ie){C(Ie),O(f._tileset)&&(f._tileset.dynamicScreenSpaceError=Ie)}}),this.dynamicScreenSpaceError=!1;let y=gr.observable();gr.defineProperty(this,"colorBlendMode",{get:function(){return y()},set:function(Ie){y(Ie),O(f._tileset)&&(f._tileset.colorBlendMode=Ie,f._scene.requestRender())}}),this.colorBlendMode=bD.HIGHLIGHT;let x=gr.observable(),v=gr.observable();gr.defineProperty(this,"picking",{get:function(){return v()},set:function(Ie){v(Ie),Ie?f._eventHandler.setInputAction(function(ve){let K=o.pick(ve.endPosition);if(K instanceof Ds?(f.feature=K,f.tile=K.content.tile):O(K)&&O(K.content)?(f.feature=void 0,f.tile=K.content.tile):(f.feature=void 0,f.tile=void 0),!!O(f._tileset)){if(x&&O(K)&&O(K.content)){let W;o.pickPositionSupported&&(W=o.pickPosition(ve.endPosition),O(W)&&(f._tileset.debugPickPosition=W)),f._tileset.debugPickedTile=K.content.tile}else f._tileset.debugPickedTile=void 0;f._scene.requestRender()}},Ki.MOUSE_MOVE):(f.feature=void 0,f.tile=void 0,f._eventHandler.removeInputAction(Ki.MOUSE_MOVE))}}),this.picking=!0;let E=gr.observable();gr.defineProperty(this,"colorize",{get:function(){return E()},set:function(Ie){E(Ie),O(f._tileset)&&(f._tileset.debugColorizeTiles=Ie,f._scene.requestRender())}}),this.colorize=!1;let I=gr.observable();gr.defineProperty(this,"wireframe",{get:function(){return I()},set:function(Ie){I(Ie),O(f._tileset)&&(f._tileset.debugWireframe=Ie,f._scene.requestRender())}}),this.wireframe=!1;let w=gr.observable();gr.defineProperty(this,"showBoundingVolumes",{get:function(){return w()},set:function(Ie){w(Ie),O(f._tileset)&&(f._tileset.debugShowBoundingVolume=Ie,f._scene.requestRender())}}),this.showBoundingVolumes=!1;let Q=gr.observable();gr.defineProperty(this,"showContentBoundingVolumes",{get:function(){return Q()},set:function(Ie){Q(Ie),O(f._tileset)&&(f._tileset.debugShowContentBoundingVolume=Ie,f._scene.requestRender())}}),this.showContentBoundingVolumes=!1;let M=gr.observable();gr.defineProperty(this,"showRequestVolumes",{get:function(){return M()},set:function(Ie){M(Ie),O(f._tileset)&&(f._tileset.debugShowViewerRequestVolume=Ie,f._scene.requestRender())}}),this.showRequestVolumes=!1;let B=gr.observable();gr.defineProperty(this,"freezeFrame",{get:function(){return B()},set:function(Ie){B(Ie),O(f._tileset)&&(f._tileset.debugFreezeFrame=Ie,f._scene.debugShowFrustumPlanes=Ie,f._scene.requestRender())}}),this.freezeFrame=!1,gr.defineProperty(this,"showOnlyPickedTileDebugLabel",{get:function(){return x()},set:function(Ie){x(Ie),O(f._tileset)&&(f._tileset.debugPickedTileLabelOnly=Ie,f._scene.requestRender())}}),this.showOnlyPickedTileDebugLabel=!1;let T=gr.observable();gr.defineProperty(this,"showGeometricError",{get:function(){return T()},set:function(Ie){T(Ie),O(f._tileset)&&(f._tileset.debugShowGeometricError=Ie,f._scene.requestRender())}}),this.showGeometricError=!1;let D=gr.observable();gr.defineProperty(this,"showRenderingStatistics",{get:function(){return D()},set:function(Ie){D(Ie),O(f._tileset)&&(f._tileset.debugShowRenderingStatistics=Ie,f._scene.requestRender())}}),this.showRenderingStatistics=!1;let F=gr.observable();gr.defineProperty(this,"showMemoryUsage",{get:function(){return F()},set:function(Ie){F(Ie),O(f._tileset)&&(f._tileset.debugShowMemoryUsage=Ie,f._scene.requestRender())}}),this.showMemoryUsage=!1;let L=gr.observable();gr.defineProperty(this,"showUrl",{get:function(){return L()},set:function(Ie){L(Ie),O(f._tileset)&&(f._tileset.debugShowUrl=Ie,f._scene.requestRender())}}),this.showUrl=!1;let R=gr.observable();gr.defineProperty(this,"maximumScreenSpaceError",{get:function(){return R()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(R(Ie),O(f._tileset)&&(f._tileset.maximumScreenSpaceError=Ie))}}),this.maximumScreenSpaceError=16;let k=gr.observable();gr.defineProperty(this,"dynamicScreenSpaceErrorDensity",{get:function(){return k()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(k(Ie),O(f._tileset)&&(f._tileset.dynamicScreenSpaceErrorDensity=Ie))}}),this.dynamicScreenSpaceErrorDensity=.00278,this.dynamicScreenSpaceErrorDensitySliderValue=void 0,gr.defineProperty(this,"dynamicScreenSpaceErrorDensitySliderValue",{get:function(){return Math.pow(k(),1/6)},set:function(Ie){k(Math.pow(Ie,6))}});let U=gr.observable();gr.defineProperty(this,"dynamicScreenSpaceErrorFactor",{get:function(){return U()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(U(Ie),O(f._tileset)&&(f._tileset.dynamicScreenSpaceErrorFactor=Ie))}}),this.dynamicScreenSpaceErrorFactor=4;let V=C2i(this),H=gr.observable();gr.defineProperty(this,"pickActive",{get:function(){return H()},set:function(Ie){H(Ie),Ie?f._eventHandler.setInputAction(V,Ki.LEFT_CLICK):f._eventHandler.removeInputAction(Ki.LEFT_CLICK)}});let q=gr.observable();gr.defineProperty(this,"pointCloudShading",{get:function(){return q()},set:function(Ie){q(Ie),O(f._tileset)&&(f._tileset.pointCloudShading.attenuation=Ie)}}),this.pointCloudShading=!1;let ie=gr.observable();gr.defineProperty(this,"geometricErrorScale",{get:function(){return ie()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(ie(Ie),O(f._tileset)&&(f._tileset.pointCloudShading.geometricErrorScale=Ie))}}),this.geometricErrorScale=1;let Z=gr.observable();gr.defineProperty(this,"maximumAttenuation",{get:function(){return Z()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(Z(Ie),O(f._tileset)&&(f._tileset.pointCloudShading.maximumAttenuation=Ie===0?void 0:Ie))}}),this.maximumAttenuation=0;let oe=gr.observable();gr.defineProperty(this,"baseResolution",{get:function(){return oe()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(oe(Ie),O(f._tileset)&&(f._tileset.pointCloudShading.baseResolution=Ie===0?void 0:Ie))}}),this.baseResolution=0;let ne=gr.observable();gr.defineProperty(this,"eyeDomeLighting",{get:function(){return ne()},set:function(Ie){ne(Ie),O(f._tileset)&&(f._tileset.pointCloudShading.eyeDomeLighting=Ie)}}),this.eyeDomeLighting=!1;let se=gr.observable();gr.defineProperty(this,"eyeDomeLightingStrength",{get:function(){return se()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(se(Ie),O(f._tileset)&&(f._tileset.pointCloudShading.eyeDomeLightingStrength=Ie))}}),this.eyeDomeLightingStrength=1;let ce=gr.observable();gr.defineProperty(this,"eyeDomeLightingRadius",{get:function(){return ce()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(ce(Ie),O(f._tileset)&&(f._tileset.pointCloudShading.eyeDomeLightingRadius=Ie))}}),this.eyeDomeLightingRadius=1,this.pickActive=!1;let j=gr.observable();gr.defineProperty(this,"skipLevelOfDetail",{get:function(){return j()},set:function(Ie){j(Ie),O(f._tileset)&&(f._tileset.skipLevelOfDetail=Ie)}}),this.skipLevelOfDetail=!0;let de=gr.observable();gr.defineProperty(this,"skipScreenSpaceErrorFactor",{get:function(){return de()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(de(Ie),O(f._tileset)&&(f._tileset.skipScreenSpaceErrorFactor=Ie))}}),this.skipScreenSpaceErrorFactor=16;let me=gr.observable();gr.defineProperty(this,"baseScreenSpaceError",{get:function(){return me()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(me(Ie),O(f._tileset)&&(f._tileset.baseScreenSpaceError=Ie))}}),this.baseScreenSpaceError=1024;let _e=gr.observable();gr.defineProperty(this,"skipLevels",{get:function(){return _e()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(_e(Ie),O(f._tileset)&&(f._tileset.skipLevels=Ie))}}),this.skipLevels=1;let Be=gr.observable();gr.defineProperty(this,"immediatelyLoadDesiredLevelOfDetail",{get:function(){return Be()},set:function(Ie){Be(Ie),O(f._tileset)&&(f._tileset.immediatelyLoadDesiredLevelOfDetail=Ie)}}),this.immediatelyLoadDesiredLevelOfDetail=!1;let Qe=gr.observable();gr.defineProperty(this,"loadSiblings",{get:function(){return Qe()},set:function(Ie){Qe(Ie),O(f._tileset)&&(f._tileset.loadSiblings=Ie)}}),this.loadSiblings=!1,this._style=void 0,this._shouldStyle=!1,this._definedProperties=["properties","dynamicScreenSpaceError","colorBlendMode","picking","colorize","wireframe","showBoundingVolumes","showContentBoundingVolumes","showRequestVolumes","freezeFrame","maximumScreenSpaceError","dynamicScreenSpaceErrorDensity","baseScreenSpaceError","skipScreenSpaceErrorFactor","skipLevelOfDetail","skipLevels","immediatelyLoadDesiredLevelOfDetail","loadSiblings","dynamicScreenSpaceErrorDensitySliderValue","dynamicScreenSpaceErrorFactor","pickActive","showOnlyPickedTileDebugLabel","showGeometricError","showRenderingStatistics","showMemoryUsage","showUrl","pointCloudShading","geometricErrorScale","maximumAttenuation","baseResolution","eyeDomeLighting","eyeDomeLightingStrength","eyeDomeLightingRadius"],this._removePostRenderEvent=o.postRender.addEventListener(function(){f._update()}),O(this._tileset)||tlt(this,!0)}Object.defineProperties(EC.prototype,{scene:{get:function(){return this._scene}},performanceContainer:{get:function(){return this._performanceContainer}},statisticsText:{get:function(){return this._statisticsText}},pickStatisticsText:{get:function(){return this._pickStatisticsText}},resourceCacheStatisticsText:{get:function(){return this._resourceCacheStatisticsText}},colorBlendModes:{get:function(){return x2i}},editorError:{get:function(){return this._editorError}},tileset:{get:function(){return this._tileset},set:function(o){if(this._tileset=o,this._style=void 0,this.styleString="{}",this.feature=void 0,this.tile=void 0,O(o)){let A=this;o.readyPromise.then(function(y){A.isDestroyed()||A._properties(y.properties)});let f=["colorize","wireframe","showBoundingVolumes","showContentBoundingVolumes","showRequestVolumes","freezeFrame","showOnlyPickedTileDebugLabel","showGeometricError","showRenderingStatistics","showMemoryUsage","showUrl"],m=f.length;for(let y=0;y<m;++y){let x=f[y];this[x]=this[x]}this.maximumScreenSpaceError=o.maximumScreenSpaceError,this.dynamicScreenSpaceError=o.dynamicScreenSpaceError,this.dynamicScreenSpaceErrorDensity=o.dynamicScreenSpaceErrorDensity,this.dynamicScreenSpaceErrorFactor=o.dynamicScreenSpaceErrorFactor,this.colorBlendMode=o.colorBlendMode,this.skipLevelOfDetail=o.skipLevelOfDetail,this.skipScreenSpaceErrorFactor=o.skipScreenSpaceErrorFactor,this.baseScreenSpaceError=o.baseScreenSpaceError,this.skipLevels=o.skipLevels,this.immediatelyLoadDesiredLevelOfDetail=o.immediatelyLoadDesiredLevelOfDetail,this.loadSiblings=o.loadSiblings,this.hasEnabledWireframe=o._enableDebugWireframe;let C=o.pointCloudShading;this.pointCloudShading=C.attenuation,this.geometricErrorScale=C.geometricErrorScale,this.maximumAttenuation=C.maximumAttenuation?C.maximumAttenuation:0,this.baseResolution=C.baseResolution?C.baseResolution:0,this.eyeDomeLighting=C.eyeDomeLighting,this.eyeDomeLightingStrength=C.eyeDomeLightingStrength,this.eyeDomeLightingRadius=C.eyeDomeLightingRadius,this._scene.requestRender()}else this._properties({});this._statisticsText=qK(o,!1),this._pickStatisticsText=qK(o,!0),this._resourceCacheStatisticsText=ilt(),tlt(this,!1)}},feature:{get:function(){return this._feature},set:function(o){if(this._feature===o)return;let A=this._feature;O(A)&&!A.content.isDestroyed()&&(!this.colorize&&O(this._style)?A.color=O(this._style.color)?this._style.color.evaluateColor(A,v2i):At.WHITE:A.color=O$,this._scene.requestRender()),O(o)&&(At.clone(o.color,O$),o.color=f7e,this._scene.requestRender()),this._feature=o}},tile:{get:function(){return this._tile},set:function(o){if(this._tile===o)return;let A=this._tile;O(A)&&!A.isDestroyed()&&!Bme(A.content)&&(A.color=O$,this._scene.requestRender()),O(o)&&!Bme(o.content)&&(At.clone(o.color,O$),o.color=f7e,this._scene.requestRender()),this._tile=o}}});function Bme(o){if(!O(o))return!1;if(o.featuresLength>0)return!0;let A=o.innerContents;if(O(A)){let f=A.length;for(let m=0;m<f;++m)if(!Bme(A[m]))return!1;return!0}return!1}EC.prototype.togglePickTileset=function(){this.pickActive=!this.pickActive};EC.prototype.toggleInspector=function(){this.inspectorVisible=!this.inspectorVisible};EC.prototype.toggleTileset=function(){this.tilesetVisible=!this.tilesetVisible};EC.prototype.toggleDisplay=function(){this.displayVisible=!this.displayVisible};EC.prototype.toggleUpdate=function(){this.updateVisible=!this.updateVisible};EC.prototype.toggleLogging=function(){this.loggingVisible=!this.loggingVisible};EC.prototype.toggleStyle=function(){this.styleVisible=!this.styleVisible};EC.prototype.toggleTileDebugLabels=function(){this.tileDebugLabelsVisible=!this.tileDebugLabelsVisible};EC.prototype.toggleOptimization=function(){this.optimizationVisible=!this.optimizationVisible};EC.prototype.trimTilesCache=function(){O(this._tileset)&&this._tileset.trimLoadedTiles()};EC.prototype.compileStyle=function(){let o=this._tileset;if(!(!O(o)||this.styleString===JSON.stringify(o.style))){this._editorError="";try{this.styleString.length===0&&(this.styleString="{}"),this._style=new gY(JSON.parse(this.styleString)),this._shouldStyle=!0,this._scene.requestRender()}catch(A){this._editorError=A.toString()}this.feature=this._feature,this.tile=this._tile}};EC.prototype.styleEditorKeyPress=function(o,A){if(A.keyCode===9){A.preventDefault();let f=A.target,m=f.selectionStart,C=f.selectionEnd,y=C,x=f.value.slice(m,C).split(`
`),v=x.length,E;if(A.shiftKey)for(E=0;E<v;++E)x[E][0]===" "&&(x[E][1]===" "?(x[E]=x[E].substr(2),y-=2):(x[E]=x[E].substr(1),y-=1));else for(E=0;E<v;++E)x[E]=`  ${x[E]}`,y+=2;let I=x.join(`
`);f.value=f.value.slice(0,m)+I+f.value.slice(C),f.selectionStart=m!==C?m:y,f.selectionEnd=y}else A.ctrlKey&&(A.keyCode===10||A.keyCode===13)&&this.compileStyle();return!0};EC.prototype._update=function(){let o=this._tileset;if(this.performance&&this._performanceDisplay.update(),O(o)){if(o.isDestroyed()){this.tile=void 0,this.feature=void 0,this.tileset=void 0;return}let A=o.style;this._style!==o.style&&(this._shouldStyle?(o.style=this._style,this._shouldStyle=!1):(this._style=A,this.styleString=JSON.stringify(A.style,null,"  ")))}this.showStatistics&&(this._statisticsText=qK(o,!1),this._pickStatisticsText=qK(o,!0),this._resourceCacheStatisticsText=ilt())};EC.prototype.isDestroyed=function(){return!1};EC.prototype.destroy=function(){this._eventHandler.destroy(),this._removePostRenderEvent();let o=this;return this._definedProperties.forEach(function(A){gr.getObservable(o,A).dispose()}),Qr(this)};EC.getStatistics=qK;var BDe=EC;function vae(o,A){o=iA(o);let f=document.createElement("div"),m=document.createElement("div");m.setAttribute("data-bind","visible: performance");let C=new BDe(A,m);this._viewModel=C,this._container=o,this._element=f;let y=document.createElement("div");y.textContent="3D Tiles \u68C0\u67E5\u5DE5\u5177",y.className="cesium-cesiumInspector-button",y.setAttribute("data-bind","click: toggleInspector"),f.appendChild(y),f.className="cesium-cesiumInspector cesium-3DTilesInspector",f.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : inspectorVisible, "cesium-cesiumInspector-hidden" : !inspectorVisible}'),o.appendChild(f);let x=document.createElement("div");this._panel=x,x.className="cesium-cesiumInspector-dropDown",f.appendChild(x);let v=z8.createSection,E=z8.createCheckbox,I=v(x,"\u74E6\u7247","tilesetVisible","toggleTileset"),w=v(x,"\u663E\u793A","displayVisible","toggleDisplay"),Q=v(x,"\u66F4\u65B0","updateVisible","toggleUpdate"),M=v(x,"\u8BB0\u5F55","loggingVisible","toggleLogging"),B=v(x,"\u74E6\u7247\u8C03\u8BD5\u6807\u7B7E","tileDebugLabelsVisible","toggleTileDebugLabels"),T=v(x,"\u6837\u5F0F","styleVisible","toggleStyle"),D=v(x,"\u4F18\u5316","optimizationVisible","toggleOptimization"),F=document.createElement("div");F.className="field-group";let L=document.createElement("label");L.className="field-label",L.appendChild(document.createTextNode("\u5C5E\u6027: "));let R=document.createElement("div");R.setAttribute("data-bind","text: properties"),F.appendChild(L),F.appendChild(R),I.appendChild(F),I.appendChild(o0e("togglePickTileset","\u62FE\u53D6\u74E6\u7247","pickActive")),I.appendChild(o0e("trimTilesCache","\u6E05\u7406\u74E6\u7247\u7F13\u5B58")),I.appendChild(E("\u53EF\u62FE\u53D6","picking")),w.appendChild(E("\u7740\u8272","colorize")),w.appendChild(E("\u7EBF\u6846","wireframe","_tileset === undefined || hasEnabledWireframe"));let k=document.createElement("p");k.setAttribute("data-bind","visible: _tileset !== undefined && !hasEnabledWireframe"),k.setAttribute("class","cesium-3DTilesInspector-disabledElementsInfo"),k.innerText="Set enableDebugWireframe to true in the tileset constructor to enable this option.",w.lastChild.appendChild(k),w.appendChild(E("\u5305\u56F4\u76D2","showBoundingVolumes")),w.appendChild(E("\u5185\u90E8\u5305\u56F4\u76D2","showContentBoundingVolumes")),w.appendChild(E("\u8BF7\u6C42\u5305\u56F4\u76D2","showRequestVolumes")),w.appendChild(E("\u70B9\u4E91\u7740\u8272","pointCloudShading"));let U=document.createElement("div");U.setAttribute("data-bind","visible: pointCloudShading"),U.appendChild(Tb("geometricErrorScale",0,2,.01,"\u51E0\u4F55\u8BEF\u5DEE\u5C3A\u5EA6")),U.appendChild(Tb("maximumAttenuation",0,32,1,"\u6700\u5927\u8870\u51CF")),U.appendChild(Tb("baseResolution",0,1,.01,"\u57FA\u672C\u5206\u8FA8\u7387")),U.appendChild(E("\u9E70\u773C\u7A79\u9876\u5149\u7167 (EDL)","eyeDomeLighting")),w.appendChild(U);let V=document.createElement("div");V.setAttribute("data-bind","visible: eyeDomeLighting"),V.appendChild(Tb("eyeDomeLightingStrength",0,2,.1,"EDL \u5F3A\u5EA6")),V.appendChild(Tb("eyeDomeLightingRadius",0,4,.1,"EDL \u534A\u5F84")),U.appendChild(V),Q.appendChild(E("\u51BB\u7ED3\u5E27","freezeFrame")),Q.appendChild(E("\u52A8\u6001\u5C4F\u5E55\u7A7A\u95F4\u8BEF\u5DEE","dynamicScreenSpaceError"));let H=document.createElement("div");H.appendChild(Tb("maximumScreenSpaceError",0,128,1,"\u6700\u5927\u5C4F\u5E55\u7A7A\u95F4\u8BEF\u5DEE")),Q.appendChild(H);let q=document.createElement("div");q.setAttribute("data-bind","visible: dynamicScreenSpaceError"),q.appendChild(Tb("dynamicScreenSpaceErrorDensitySliderValue",0,1,.005,"\u5C4F\u5E55\u7A7A\u95F4\u8BEF\u5DEE\u5BC6\u5EA6","dynamicScreenSpaceErrorDensity")),q.appendChild(Tb("dynamicScreenSpaceErrorFactor",1,10,.1,"\u5C4F\u5E55\u7A7A\u95F4\u8BEF\u5DEE\u56E0\u5B50")),Q.appendChild(q),M.appendChild(E("\u5E27\u7387","performance")),M.appendChild(m),M.appendChild(E("\u7EDF\u8BA1\u4FE1\u606F","showStatistics"));let ie=document.createElement("div");ie.className="cesium-3dTilesInspector-statistics",ie.setAttribute("data-bind","html: statisticsText, visible: showStatistics"),M.appendChild(ie),M.appendChild(E("\u62FE\u53D6\u7EDF\u8BA1","showPickStatistics"));let Z=document.createElement("div");Z.className="cesium-3dTilesInspector-statistics",Z.setAttribute("data-bind","html: pickStatisticsText, visible: showPickStatistics"),M.appendChild(Z),M.appendChild(E("\u8D44\u6E90\u7F13\u5B58\u7EDF\u8BA1","showResourceCacheStatistics"));let oe=document.createElement("div");oe.className="cesium-3dTilesInspector-statistics",oe.setAttribute("data-bind","html: resourceCacheStatisticsText, visible: showResourceCacheStatistics"),M.appendChild(oe);let ne=document.createElement("div");T.appendChild(ne),ne.appendChild(document.createTextNode("\u989C\u8272\u6DF7\u5408\u6A21\u5F0F: "));let se=document.createElement("select");se.setAttribute("data-bind",'options: colorBlendModes, optionsText: "text", optionsValue: "value", value: colorBlendMode'),ne.appendChild(se);let ce=document.createElement("textarea");ce.setAttribute("data-bind","textInput: styleString, event: { keydown: styleEditorKeyPress }"),ne.className="cesium-cesiumInspector-styleEditor",ne.appendChild(ce);let j=o0e("compileStyle","\u7F16\u8BD1 (Ctrl+Enter)");ne.appendChild(j);let de=document.createElement("div");de.className="cesium-cesiumInspector-error",de.setAttribute("data-bind","text: editorError"),ne.appendChild(de),B.appendChild(E("\u4EC5\u663E\u793A\u62FE\u53D6\u74E6\u7247","showOnlyPickedTileDebugLabel")),B.appendChild(E("\u51E0\u4F55\u8BEF\u5DEE","showGeometricError")),B.appendChild(E("\u6E32\u67D3\u7EDF\u8BA1","showRenderingStatistics")),B.appendChild(E("\u5185\u5B58\u4F7F\u7528 (MB)","showMemoryUsage")),B.appendChild(E("\u74E6\u7247\u8DEF\u5F84","showUrl")),D.appendChild(E("\u8DF3\u8FC7\u74E6\u7247\u5C42\u7EA7","skipLevelOfDetail"));let me=document.createElement("div");me.appendChild(Tb("skipScreenSpaceErrorFactor",1,50,1,"\u8DF3\u8FC7\u5C4F\u5E55\u8BEF\u5DEE\u56E0\u5B50")),D.appendChild(me);let _e=document.createElement("div");_e.appendChild(Tb("baseScreenSpaceError",0,4096,1,"\u57FA\u7840\u5C4F\u5E55\u7A7A\u95F4\u8BEF\u5DEE")),D.appendChild(_e);let Be=document.createElement("div");Be.appendChild(Tb("skipLevels",0,10,1,"\u8DF3\u8FC7\u5C42\u7EA7\u6570")),D.appendChild(Be),D.appendChild(E("\u4EC5\u52A0\u8F7D\u6EE1\u8DB3\u6700\u5927\u5C4F\u5E55\u8BEF\u5DEE\u7684\u74E6\u7247","immediatelyLoadDesiredLevelOfDetail")),D.appendChild(E("\u52A0\u8F7D\u53EF\u89C1\u74E6\u7247\u9644\u8FD1\u7684\u74E6\u7247","loadSiblings")),gr.applyBindings(C,f)}Object.defineProperties(vae.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});vae.prototype.isDestroyed=function(){return!1};vae.prototype.destroy=function(){return gr.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),Qr(this)};function Tb(o,A,f,m,C,y){y=Ae(y,o);let x=document.createElement("input");x.setAttribute("data-bind",`value: ${y}`),x.type="number";let v=document.createElement("input");v.type="range",v.min=A,v.max=f,v.step=m,v.setAttribute("data-bind",`valueUpdate: "input", value: ${o}`);let E=document.createElement("div");E.appendChild(v);let I=document.createElement("div");return I.className="cesium-cesiumInspector-slider",I.appendChild(document.createTextNode(C)),I.appendChild(x),I.appendChild(E),I}function o0e(o,A,f){let m=document.createElement("button");m.type="button",m.textContent=A,m.className="cesium-cesiumInspector-pickButton";let C=`click: ${o}`;return O(f)&&(C+=`, css: {"cesium-cesiumInspector-pickButtonHighlight" : ${f}}`),m.setAttribute("data-bind",C),m}var wDe=vae,rlt=`uniform sampler2D u_depthTexture;
}`;this.material=void 0,this.translucent=Ae(o.translucent,!1),this._vertexShaderSource=Ae(o.vertexShaderSource,x),this._fragmentShaderSource=Ae(o.fragmentShaderSource,v),this._renderState=Sd.getDefaultRenderState(!1,!1,o.renderState),this._closed=Ae(o.closed,!1),this._attributeName=A,this._glslDatatype=m}Object.defineProperties(lW.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},attributeName:{get:function(){return this._attributeName}},glslDatatype:{get:function(){return this._glslDatatype}}});lW.prototype.getFragmentShaderSource=Sd.prototype.getFragmentShaderSource;lW.prototype.isTranslucent=Sd.prototype.isTranslucent;lW.prototype.getRenderState=Sd.prototype.getRenderState;var Nst=lW;function mae(o){o=Ae(o,Ae.EMPTY_OBJECT),this.length=Ae(o.length,1e7),this._length=void 0,this.width=Ae(o.width,2),this._width=void 0,this.show=Ae(o.show,!0),this.modelMatrix=Xe.clone(Ae(o.modelMatrix,Xe.IDENTITY)),this._modelMatrix=new Xe,this.id=o.id,this._id=void 0,this._primitive=void 0}mae.prototype.update=function(o){if(this.show){if(!O(this._primitive)||!Xe.equals(this._modelMatrix,this.modelMatrix)||this._length!==this.length||this._width!==this.width||this._id!==this.id){this._modelMatrix=Xe.clone(this.modelMatrix,this._modelMatrix),this._length=this.length,this._width=this.width,this._id=this.id,O(this._primitive)&&this._primitive.destroy(),this.modelMatrix[12]===0&&this.modelMatrix[13]===0&&this.modelMatrix[14]===0&&(this.modelMatrix[14]=.01);let A=new co({geometry:new Vk({positions:[ee.ZERO,ee.UNIT_X],width:this.width,vertexFormat:ly.VERTEX_FORMAT,colors:[At.RED,At.RED],arcType:Pa.NONE}),modelMatrix:Xe.multiplyByUniformScale(this.modelMatrix,this.length,new Xe),id:this.id,pickPrimitive:this}),f=new co({geometry:new Vk({positions:[ee.ZERO,ee.UNIT_Y],width:this.width,vertexFormat:ly.VERTEX_FORMAT,colors:[At.GREEN,At.GREEN],arcType:Pa.NONE}),modelMatrix:Xe.multiplyByUniformScale(this.modelMatrix,this.length,new Xe),id:this.id,pickPrimitive:this}),m=new co({geometry:new Vk({positions:[ee.ZERO,ee.UNIT_Z],width:this.width,vertexFormat:ly.VERTEX_FORMAT,colors:[At.BLUE,At.BLUE],arcType:Pa.NONE}),modelMatrix:Xe.multiplyByUniformScale(this.modelMatrix,this.length,new Xe),id:this.id,pickPrimitive:this});this._primitive=new Xa({geometryInstances:[A,f,m],appearance:new ly,asynchronous:!1})}this._primitive.update(o)}};mae.prototype.isDestroyed=function(){return!1};mae.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),Qr(this)};var fDe=mae;function DDi(o){this.direction=ee.clone(o.direction),this.color=At.clone(Ae(o.color,At.WHITE)),this.intensity=Ae(o.intensity,1)}var Cae=DDi;function jE(o){this._scene=o.scene,this.samplingWindow=Ae(o.samplingWindow,jE.defaultSettings.samplingWindow),this.quietPeriod=Ae(o.quietPeriod,jE.defaultSettings.quietPeriod),this.warmupPeriod=Ae(o.warmupPeriod,jE.defaultSettings.warmupPeriod),this.minimumFrameRateDuringWarmup=Ae(o.minimumFrameRateDuringWarmup,jE.defaultSettings.minimumFrameRateDuringWarmup),this.minimumFrameRateAfterWarmup=Ae(o.minimumFrameRateAfterWarmup,jE.defaultSettings.minimumFrameRateAfterWarmup),this._lowFrameRate=new br,this._nominalFrameRate=new br,this._frameTimes=[],this._needsQuietPeriod=!0,this._quietPeriodEndTime=0,this._warmupPeriodEndTime=0,this._frameRateIsLow=!1,this._lastFramesPerSecond=void 0,this._pauseCount=0;let A=this;this._preUpdateRemoveListener=this._scene.preUpdate.addEventListener(function(C,y){TDi(A,y)}),this._hiddenPropertyName=document.hidden!==void 0?"hidden":document.mozHidden!==void 0?"mozHidden":document.msHidden!==void 0?"msHidden":document.webkitHidden!==void 0?"webkitHidden":void 0;let f=document.hidden!==void 0?"visibilitychange":document.mozHidden!==void 0?"mozvisibilitychange":document.msHidden!==void 0?"msvisibilitychange":document.webkitHidden!==void 0?"webkitvisibilitychange":void 0;function m(){MDi(A)}this._visibilityChangeRemoveListener=void 0,O(f)&&(document.addEventListener(f,m,!1),this._visibilityChangeRemoveListener=function(){document.removeEventListener(f,m,!1)})}jE.defaultSettings={samplingWindow:5,quietPeriod:2,warmupPeriod:5,minimumFrameRateDuringWarmup:4,minimumFrameRateAfterWarmup:8};jE.fromScene=function(o){return(!O(o._frameRateMonitor)||o._frameRateMonitor.isDestroyed())&&(o._frameRateMonitor=new jE({scene:o})),o._frameRateMonitor};Object.defineProperties(jE.prototype,{scene:{get:function(){return this._scene}},lowFrameRate:{get:function(){return this._lowFrameRate}},nominalFrameRate:{get:function(){return this._nominalFrameRate}},lastFramesPerSecond:{get:function(){return this._lastFramesPerSecond}}});jE.prototype.pause=function(){++this._pauseCount,this._pauseCount===1&&(this._frameTimes.length=0,this._lastFramesPerSecond=void 0)};jE.prototype.unpause=function(){--this._pauseCount,this._pauseCount<=0&&(this._pauseCount=0,this._needsQuietPeriod=!0)};jE.prototype.isDestroyed=function(){return!1};jE.prototype.destroy=function(){return this._preUpdateRemoveListener(),O(this._visibilityChangeRemoveListener)&&this._visibilityChangeRemoveListener(),Qr(this)};function TDi(o,A){if(o._pauseCount>0)return;let f=OA();if(o._needsQuietPeriod)o._needsQuietPeriod=!1,o._frameTimes.length=0,o._quietPeriodEndTime=f+o.quietPeriod/Uu.SECONDS_PER_MILLISECOND,o._warmupPeriodEndTime=o._quietPeriodEndTime+(o.warmupPeriod+o.samplingWindow)/Uu.SECONDS_PER_MILLISECOND;else if(f>=o._quietPeriodEndTime){o._frameTimes.push(f);let m=f-o.samplingWindow/Uu.SECONDS_PER_MILLISECOND;if(o._frameTimes.length>=2&&o._frameTimes[0]<=m){for(;o._frameTimes.length>=2&&o._frameTimes[1]<m;)o._frameTimes.shift();let C=(f-o._frameTimes[0])/(o._frameTimes.length-1);o._lastFramesPerSecond=1e3/C;let y=1e3/(f>o._warmupPeriodEndTime?o.minimumFrameRateAfterWarmup:o.minimumFrameRateDuringWarmup);C>y?o._frameRateIsLow||(o._frameRateIsLow=!0,o._needsQuietPeriod=!0,o.lowFrameRate.raiseEvent(o.scene,o._lastFramesPerSecond)):o._frameRateIsLow&&(o._frameRateIsLow=!1,o._needsQuietPeriod=!0,o.nominalFrameRate.raiseEvent(o.scene,o._lastFramesPerSecond))}}}function MDi(o){document[o._hiddenPropertyName]?o.pause():o.unpause()}var gDe=jE,PDi=xh(E7e(),1);function pDe(){this._image=new Image}pDe.prototype.isReady=function(){return!0};pDe.prototype.shouldDiscardImage=function(o){return o===this._image};function uW(o){o=Ae(o,Ae.EMPTY_OBJECT),this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0;let A;if(O(o.metadata))A=o.metadata;else{let y=An.createIfNeeded(o.url);A=new IN(y)}this._metadata=A,this._tileDiscardPolicy=o.tileDiscardPolicy,this._tilingScheme=new af({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new Si(-je.PI,-je.PI,je.PI,je.PI),ellipsoid:o.ellipsoid});let f=o.credit;typeof f=="string"&&(f=new tl(f)),this._credit=f,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=23,O(this._tileDiscardPolicy)||(this._tileDiscardPolicy=new pDe),this._errorEvent=new br,this._ready=!1;let m=this,C;this._readyPromise=A.readyPromise.then(function(y){if(!A.imageryPresent){let x=new nr(`The server ${A.url} doesn't have imagery`);return C=wc.reportError(C,m,m._errorEvent,x.message,void 0,void 0,void 0,x),Promise.reject(x)}return wc.reportSuccess(C),m._ready=y,y}).catch(function(y){return C=wc.reportError(C,m,m._errorEvent,y.message,void 0,void 0,void 0,y),Promise.reject(y)})}Object.defineProperties(uW.prototype,{url:{get:function(){return this._metadata.url}},proxy:{get:function(){return this._metadata.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!1}}});uW.prototype.getTileCredits=function(o,A,f){let m=this._metadata,C=m.getTileInformation(o,A,f);if(O(C)){let y=m.providers[C.imageryProvider];if(O(y))return[y]}};uW.prototype.requestImage=function(o,A,f,m){let C=this._tileDiscardPolicy._image,y=this._metadata,x=IN.tileXYToQuadKey(o,A,f),v=y.getTileInformation(o,A,f);if(!O(v)){if(y.isValid(x)){let I=new cC({throttle:m.throttle,throttleByServer:m.throttleByServer,type:m.type,priorityFunction:m.priorityFunction});y.populateSubtree(o,A,f,I);return}return Promise.resolve(C)}if(!v.hasImagery())return Promise.resolve(C);let E=RDi(this,v,o,A,f,m).fetchArrayBuffer();if(O(E))return E.then(function(I){wSe(y.key,I);let w=new Uint8Array(I),Q,M=y.protoImagery;if((!O(M)||!M)&&(Q=LDi(w)),!O(Q)&&(!O(M)||M)){let B=FDi(w);Q=B.imageType,w=B.imageData}return!O(Q)||!O(w)?C:Ane({uint8Array:w,format:Q,flipY:!0})})};uW.prototype.pickFeatures=function(o,A,f,m,C){};function RDi(o,A,f,m,C,y){let x=IN.tileXYToQuadKey(f,m,C),v=A.imageryVersion;return v=O(v)&&v>0?v:1,o._metadata.resource.getDerivedResource({url:`flatfile?f1-0${x}-i.${v.toString()}`,request:y})}function LDi(o){let A="JFIF";if(o[6]===A.charCodeAt(0)&&o[7]===A.charCodeAt(1)&&o[8]===A.charCodeAt(2)&&o[9]===A.charCodeAt(3))return"image/jpeg";let f="PNG";if(o[1]===f.charCodeAt(0)&&o[2]===f.charCodeAt(1)&&o[3]===f.charCodeAt(2))return"image/png"}function FDi(o){let A=PDi.Reader.create(o),f=A.len,m={};for(;A.pos<f;){let x=A.uint32(),v;switch(x>>>3){case 1:m.imageType=A.uint32();break;case 2:m.imageData=A.bytes();break;case 3:m.alphaType=A.uint32();break;case 4:m.imageAlpha=A.bytes();break;case 5:if(v=m.copyrightIds,O(v)||(v=m.copyrightIds=[]),(x&7)===2){let E=A.uint32()+A.pos;for(;A.pos<E;)v.push(A.uint32())}else v.push(A.uint32());break;default:A.skipType(x&7);break}}let C=m.imageType;if(O(C))switch(C){case 0:m.imageType="image/jpeg";break;case 4:m.imageType="image/png";break;default:throw new nr("GoogleEarthEnterpriseImageryProvider: Unsupported image type.")}let y=m.alphaType;return O(y)&&y!==0&&(console.log("GoogleEarthEnterpriseImageryProvider: External alpha not supported."),delete m.alphaType,delete m.imageAlpha),m}var kst=uW,NDi=new At(1,1,1,.4),kDi=new At(0,1,0,.05),ODi=new At(0,.5,0,.2);function SO(o){o=Ae(o,Ae.EMPTY_OBJECT),this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0,this._tilingScheme=O(o.tilingScheme)?o.tilingScheme:new af({ellipsoid:o.ellipsoid}),this._cells=Ae(o.cells,8),this._color=Ae(o.color,NDi),this._glowColor=Ae(o.glowColor,kDi),this._glowWidth=Ae(o.glowWidth,6),this._backgroundColor=Ae(o.backgroundColor,ODi),this._errorEvent=new br,this._tileWidth=Ae(o.tileWidth,256),this._tileHeight=Ae(o.tileHeight,256),this._canvasSize=Ae(o.canvasSize,256),this._canvas=this._createGridCanvas(),this._readyPromise=Promise.resolve(!0)}Object.defineProperties(SO.prototype,{proxy:{get:function(){}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){}},minimumLevel:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){}},hasAlphaChannel:{get:function(){return!0}}});SO.prototype._drawGrid=function(o){let A=this._canvasSize;for(let f=0;f<=this._cells;++f){let m=1+f/this._cells*(A-1);o.moveTo(m,0),o.lineTo(m,A),o.moveTo(0,m),o.lineTo(A,m)}o.stroke()};SO.prototype._createGridCanvas=function(){let o=document.createElement("canvas");o.width=this._canvasSize,o.height=this._canvasSize;let A=0,f=this._canvasSize,m=o.getContext("2d"),C=this._backgroundColor.toCssColorString();m.fillStyle=C,m.fillRect(A,A,f,f);let y=this._glowColor.toCssColorString();m.strokeStyle=y,m.lineWidth=this._glowWidth,m.strokeRect(A,A,f,f),this._drawGrid(m),m.lineWidth=this._glowWidth*.5,m.strokeRect(A,A,f,f),this._drawGrid(m);let x=this._color.toCssColorString();return m.strokeStyle=x,m.lineWidth=2,m.strokeRect(A,A,f,f),m.lineWidth=1,this._drawGrid(m),o};SO.prototype.getTileCredits=function(o,A,f){};SO.prototype.requestImage=function(o,A,f,m){return Promise.resolve(this._canvas)};SO.prototype.pickFeatures=function(o,A,f,m,C){};var Ost=SO;function mDe(o,A){this._parent=o,this._dataProvider=o._dataProvider,this._layer=o._layer,O(this._parent._nodeIndex)?this._resource=this._parent._layer.resource.getDerivedResource({url:`nodes/${this._parent._data.mesh.attribute.resource}/${A}`}):this._resource=this._parent.resource.getDerivedResource({url:A})}Object.defineProperties(mDe.prototype,{resource:{get:function(){return this._resource}},data:{get:function(){return this._data}}});mDe.prototype.load=function(){let o=this;return this._dataProvider._loadJson(this._resource).then(function(A){return o._data=A,A})};var CDe=mDe;function IH(o,A){this._storageInfo=A,this._parent=o,this._dataProvider=o._dataProvider;let f=`attributes/${A.key}/0`;O(this._parent._nodeIndex)?this._resource=this._parent._layer.resource.getDerivedResource({url:`nodes/${this._parent._data.mesh.attribute.resource}/${f}`}):this._resource=this._parent.resource.getDerivedResource({url:f})}Object.defineProperties(IH.prototype,{resource:{get:function(){return this._resource}},header:{get:function(){return this._header}},values:{get:function(){return O(this._values)&&O(this._values.attributeValues)?this._values.attributeValues:[]}},name:{get:function(){return this._storageInfo.name}}});function UDi(o){return o==="UInt8"||o==="Int8"?1:o==="UInt16"||o==="Int16"?2:o==="UInt32"||o==="Int32"||o==="Oid32"||o==="Float32"?4:o==="UInt64"||o==="Int64"||o==="Float64"?8:0}IH.prototype.load=function(){let o=this;return this._dataProvider._loadBinary(this._resource).then(function(A){let f=new DataView(A),m=!0;if(f.getUint8(0)==="{".charCodeAt(0)&&new TextDecoder().decode(A).includes("404")&&(m=!1,console.error(`Failed to load: ${o.resource.url}`)),m){o._data=A;let C=o._parseHeader(f),y=UDi(o._storageInfo.attributeValues.valueType);y>0&&(C=Math.ceil(C/y)*y),o._parseBody(f,C)}})};IH.prototype._parseValue=function(o,A,f){let m;if(A==="UInt8")m=o.getUint8(f),f+=1;else if(A==="Int8")m=o.getInt8(f),f+=1;else if(A==="UInt16")m=o.getUint16(f,!0),f+=2;else if(A==="Int16")m=o.getInt16(f,!0),f+=2;else if(A==="UInt32")m=o.getUint32(f,!0),f+=4;else if(A==="Oid32")m=o.getUint32(f,!0),f+=4;else if(A==="Int32")m=o.getInt32(f,!0),f+=4;else if(A==="UInt64"){let C=o.getUint32(f,!0),y=o.getUint32(f+4,!0);m=C+Math.pow(2,32)*y,f+=8}else if(A==="Int64"){let C=o.getUint32(f,!0),y=o.getUint32(f+4,!0);y<Math.pow(2,31)?m=C+Math.pow(2,32)*y:m=C+Math.pow(2,32)*(y-Math.pow(2,32)),f+=8}else A==="Float32"?(m=o.getFloat32(f,!0),f+=4):A==="Float64"?(m=o.getFloat64(f,!0),f+=8):A==="String"&&(m=String.fromCharCode(o.getUint8(f)),f+=1);return{value:m,offset:f}};IH.prototype._parseHeader=function(o){let A=0;this._header={};for(let f=0;f<this._storageInfo.header.length;f++){let m=this._storageInfo.header[f],C=this._parseValue(o,m.valueType,A);this._header[m.property]=C.value,A=C.offset}return A};IH.prototype._parseBody=function(o,A){this._values={};for(let f=0;f<this._storageInfo.ordering.length;f++){let m=this._storageInfo.ordering[f],C=this._storageInfo[m];if(O(C)){this._values[m]=[];for(let y=0;y<this._header.count;++y)if(C.valueType!=="String"){let x=this._parseValue(o,C.valueType,A);this._values[m].push(x.value),A=x.offset}else{let x=this._values.attributeByteCounts[y],v="";for(let E=0;E<x;++E){let I=this._parseValue(o,C.valueType,A);I.value.charCodeAt(0)!==0&&(v+=I.value),A=I.offset}this._values[m].push(v)}}}};var yDe=IH;function cW(o,A){let f=o._dataProvider,m=o._layer,C;O(o._nodeIndex)?C=m.resource.getDerivedResource({url:`nodes/${o._data.mesh.geometry.resource}/${A}`}):C=o.resource.getDerivedResource({url:A}),this._parent=o,this._dataProvider=f,this._layer=m,this._resource=C,this._customAttributes=void 0}Object.defineProperties(cW.prototype,{resource:{get:function(){return this._resource}},data:{get:function(){return this._data}},customAttributes:{get:function(){return this._customAttributes}}});cW.prototype.load=function(){let o=this;return this._dataProvider._loadBinary(this._resource).then(function(A){return o._data=A,A})};var GDi=new ee,HDi=new ee,VDi=new ee,zDi=new ee,KDi=new ee;function n0e(o,A,f,m){let C=ee.subtract(m,f,GDi),y=ee.cross(C,ee.subtract(o,f,HDi),zDi),x=ee.cross(C,ee.subtract(A,f,VDi),KDi);return ee.dot(y,x)>=0}var YDi=new ee,JDi=new ee,WDi=new ee,jDi=new ee,qDi=new ee,XDi=new ee,ZDi=new ee,$Di=new ee,e2i=new ee,t2i=new ee;cW.prototype.getClosestPointIndexOnTriangle=function(o,A,f){if(O(this._customAttributes)&&O(this._customAttributes.positions)){let m=new ee(o,A,f);m.x-=this._customAttributes.cartesianCenter.x,m.y-=this._customAttributes.cartesianCenter.y,m.z-=this._customAttributes.cartesianCenter.z,ci.multiplyByVector(this._customAttributes.parentRotation,m,m);let C=Number.MAX_VALUE,y,x,v,E,I=this._customAttributes.positions,w=this._customAttributes.indices,Q;O(w)?Q=w.length:Q=I.length/3;for(let M=0;M<Q;M++){let B,T,D;O(w)?(B=w[M],T=w[M+1],D=w[M+2]):(B=M*3,T=M*3+1,D=M*3+2);let F=ee.fromElements(I[B*3],I[B*3+1],I[B*3+2],YDi),L=ee.fromElements(I[T*3],I[T*3+1],I[T*3+2],JDi),R=new ee(I[D*3],I[D*3+1],I[D*3+2],WDi);if(!n0e(m,F,L,R)||!n0e(m,L,F,R)||!n0e(m,R,F,L))continue;let k=ee.subtract(L,F,jDi),U=ee.subtract(R,F,qDi),V=ee.cross(k,U,XDi);if(ee.magnitude(V)===0)continue;let H=ee.normalize(V,ZDi),q=ee.subtract(m,F,$Di),ie=Math.abs(ee.dot(q,H));if(ie<C){C=ie,y=M;let Z=ee.magnitudeSquared(ee.subtract(m,F,q)),oe=ee.magnitudeSquared(ee.subtract(m,L,e2i)),ne=ee.magnitudeSquared(ee.subtract(m,R,t2i));Z<oe&&Z<ne?(v=B,E=F,x=Z):oe<ne?(v=T,E=L,x=oe):(v=D,E=R,x=ne)}}if(O(y))return{index:v,distanceSquared:x,distance:Math.sqrt(x),queriedPosition:m,closestPosition:ee.clone(E)}}return{index:-1,distanceSquared:Number.Infinity,distance:Number.Infinity}};cW.prototype._generateGltf=function(o,A,f,m,C,y){let x={pbrMetallicRoughness:{metallicFactor:0},doubleSided:!0,name:"Material"},v=!1,E,I="";if(O(this._parent._data.mesh)&&O(this._layer._data.materialDefinitions)){let B=this._parent._data.mesh.material.definition;if(B>=0&&B<this._layer._data.materialDefinitions.length&&(E=this._layer._data.materialDefinitions[B],x=E,O(x.pbrMetallicRoughness)&&O(x.pbrMetallicRoughness.baseColorTexture))){v=!0,x.pbrMetallicRoughness.baseColorTexture.index=0;let T="0";if(O(this._layer._data.textureSetDefinitions))for(let D=0;D<this._layer._data.textureSetDefinitions.length;D++){let F=this._layer._data.textureSetDefinitions[D];for(let L=0;L<F.formats.length;L++){let R=F.formats[L];if(R.format==="jpg"){T=R.name;break}}}O(this._parent._data.mesh)&&this._parent._data.mesh.material.resource>=0&&(I=this._layer.resource.getDerivedResource({url:`nodes/${this._parent._data.mesh.material.resource}/textures/${T}`}).url)}}else O(this._parent._data.textureData)&&(v=!0,I=this._parent.resource.getDerivedResource({url:`${this._parent._data.textureData[0].href}`}).url,x.pbrMetallicRoughness.baseColorTexture={index:0});let w=[],Q=[],M=[];return v&&(w=[{sampler:0,source:0}],Q=[{uri:I}],M=[{magFilter:9729,minFilter:9986,wrapS:10497,wrapT:10497}]),{scene:0,scenes:[{nodes:o}],nodes:A,meshes:f,buffers:m,bufferViews:C,accessors:y,materials:[x],textures:w,images:Q,samplers:M,asset:{version:"2.0"}}};var Bie=cW;function sI(o,A,f){let m,C,y,x;f?(m=0,C=o):(m=o._level+1,C=o._layer),typeof A=="number"?y=A:x=o.resource.getDerivedResource({url:`${A}/`}),this._parent=o,this._dataProvider=o._dataProvider,this._isRoot=f,this._level=m,this._layer=C,this._nodeIndex=y,this._resource=x,this._tile=void 0,this._data=void 0,this._geometryData=[],this._featureData=[],this._fields={},this._children=[],this._childrenReadyPromise=void 0,this._globalTransform=void 0,this._inverseGlobalTransform=void 0,this._inverseRotationMatrix=void 0}Object.defineProperties(sI.prototype,{resource:{get:function(){return this._resource}},layer:{get:function(){return this._layer}},parent:{get:function(){return this._parent}},children:{get:function(){return this._children}},geometryData:{get:function(){return this._geometryData}},featureData:{get:function(){return this._featureData}},fields:{get:function(){return this._fields}},tile:{get:function(){return this._tile}},data:{get:function(){return this._data}}});sI.prototype.load=function(){let o=this;function A(){if(!o._isRoot){let f=o._create3DTileDefinition();o._tile=new Ov(o._layer._tileset,o._dataProvider.resource,f,o._parent._tile),o._tile._i3sNode=o}}return O(this._nodeIndex)?this._layer._getNodeInNodePages(this._nodeIndex).then(function(f){o._data=f;let m;o._isRoot?m="nodes/root/":O(f.mesh)&&(m=`../${f.mesh.geometry.resource}/`),O(m)&&(o._resource=o._parent.resource.getDerivedResource({url:m})),A()}):this._dataProvider._loadJson(this._resource).then(function(f){o._data=f,A()})};sI.prototype.loadFields=function(){let o=this._layer._data.attributeStorageInfo,A=this;function f(C,y){let x=new yDe(A,C[y]);return A._fields[x._storageInfo.name]=x,x.load()}let m=[];if(O(o))for(let C=0;C<o.length;C++)m.push(f(o,C));return Promise.all(m)};sI.prototype.getFieldsForPickedPosition=function(o){let A=this.geometryData[0];if(!O(A.customAttributes.featureIndex))return{};let f=A.getClosestPointIndexOnTriangle(o.x,o.y,o.z);if(f.index===-1||f.index>A.customAttributes.featureIndex.length)return{};let m=A.customAttributes.featureIndex[f.index];return this.getFieldsForFeature(m)};sI.prototype.getFieldsForFeature=function(o){let A={};for(let f in this.fields)if(this.fields.hasOwnProperty(f)){let m=this.fields[f];o>=0&&o<m.values.length&&(A[m.name]=m.values[o])}return A};sI.prototype._loadChildren=function(){let o=this;if(O(this._childrenReadyPromise))return this._childrenReadyPromise;let A=[];if(O(o._data.children))for(let f=0;f<o._data.children.length;f++){let m=o._data.children[f],C=new sI(o,Ae(m.href,m),!1);o._children.push(C),A.push(C.load())}return this._childrenReadyPromise=Promise.all(A).then(function(){for(let f=0;f<o._children.length;f++)o._tile.children.push(o._children[f]._tile)}),this._childrenReadyPromise};sI.prototype._loadGeometryData=function(){let o=[];if(O(this._data.geometryData))for(let A=0;A<this._data.geometryData.length;A++){let f=new Bie(this,this._data.geometryData[A].href);this._geometryData.push(f),o.push(f.load())}else if(O(this._data.mesh)){let A=this._layer._findBestGeometryBuffers(this._data.mesh.geometry.definition,["position","uv0"]),f=`./geometries/${A.bufferIndex}/`,m=new Bie(this,f);m._geometryDefinitions=A.definition,m._geometryBufferInfo=A.geometryBufferInfo,this._geometryData.push(m),o.push(m.load())}return Promise.all(o)};sI.prototype._loadFeatureData=function(){let o=[];if(O(this._data.featureData))for(let A=0;A<this._data.featureData.length;A++){let f=new CDe(this,this._data.featureData[A].href);this._featureData.push(f),o.push(f.load())}return Promise.all(o)};sI.prototype._clearGeometryData=function(){this._geometryData=[]};sI.prototype._create3DTileDefinition=function(){let o=this._data.obb,A=this._data.mbs;if(!O(o)&&!O(A)){console.error("Failed to load I3S node. Bounding volume is required.");return}let f;if(O(o)?f=Kt.fromDegrees(o.center[0],o.center[1],o.center[2]):f=Kt.fromDegrees(A[0],A[1],A[2]),O(this._dataProvider._geoidDataList)&&O(f))for(let F=0;F<this._dataProvider._geoidDataList.length;F++){let L=this._dataProvider._geoidDataList[F],R=L.projection.project(f);if(R.x>L.nativeExtent.west&&R.x<L.nativeExtent.east&&R.y>L.nativeExtent.south&&R.y<L.nativeExtent.north){f.height+=r2i(R.x,R.y,L);break}}let m={},C,y=0;O(o)?(m={box:[0,0,0,o.halfSize[0],0,0,0,o.halfSize[1],0,0,0,o.halfSize[2]]},y=Math.max(Math.max(this._data.obb.halfSize[0],this._data.obb.halfSize[1]),this._data.obb.halfSize[2]),C=Ti.WGS84.cartographicToCartesian(f)):(m={sphere:[0,0,0,A[3]]},C=Ti.WGS84.cartographicToCartesian(f),y=this._data.mbs[3]),y*=2;let x=1/0;if(O(this._data.lodThreshold))if(this._layer._data.nodePages.lodSelectionMetricType==="maxScreenThresholdSQ"){let F=Math.sqrt(this._data.lodThreshold/(Math.PI*.25));x=y/F}else if(this._layer._data.nodePages.lodSelectionMetricType==="maxScreenThreshold"){let F=this._data.lodThreshold;x=y/F}else console.error("Invalid lodSelectionMetricType in Layer");else if(O(this._data.lodSelection))for(let F=0;F<this._data.lodSelection.length;F++)this._data.lodSelection[F].metricType==="maxScreenThreshold"&&(x=y/this._data.lodSelection[F].maxError);x===1/0&&(x=1e5);let v=x*16,E=new dC(0,0,0),I=zn.headingPitchRollQuaternion(C,E);O(this._data.obb)&&(I=new jr(this._data.obb.quaternion[0],this._data.obb.quaternion[1],this._data.obb.quaternion[2],this._data.obb.quaternion[3]));let w=ci.fromQuaternion(I),Q=ci.inverse(w,new ci),M=new Xe(w[0],w[1],w[2],0,w[3],w[4],w[5],0,w[6],w[7],w[8],0,C.x,C.y,C.z,1),B=Xe.inverse(M,new Xe),T=Xe.clone(M);O(this._parent._globalTransform)&&Xe.multiply(M,this._parent._inverseGlobalTransform,T),this._globalTransform=M,this._inverseGlobalTransform=B,this._inverseRotationMatrix=Q;let D=[];for(let F=0;F<this._children.length;F++)D.push(this._children[F]._create3DTileDefinition());return{children:D,refine:"REPLACE",boundingVolume:m,transform:[T[0],T[4],T[8],T[12],T[1],T[5],T[9],T[13],T[2],T[6],T[10],T[14],T[3],T[7],T[11],T[15]],content:{uri:O(this._resource)?this._resource.url:void 0},geometricError:v}};sI.prototype._createI3SDecoderTask=function(o,A){let f=A.geometryData._parent._data,m=A.geometryData._parent._inverseRotationMatrix,C=0,y=0,x=0;O(f.obb)?(C=f.obb.center[0],y=f.obb.center[1],x=f.obb.center[2]):O(f.mbs)&&(C=f.mbs[0],y=f.mbs[1],x=f.mbs[2]);let v=ci.fromRotationX(-je.PI_OVER_TWO),E=new ci;ci.multiply(v,m,E);let I=Kt.fromDegrees(C,y,x),w=Ti.WGS84.cartographicToCartesian(I),Q={binaryData:A.geometryData._data,featureData:O(A.featureData)&&O(A.featureData[0])?A.featureData[0].data:void 0,schema:A.defaultGeometrySchema,bufferInfo:A.geometryData._geometryBufferInfo,ellipsoidRadiiSquare:Ti.WGS84.radiiSquared,url:A.url,geoidDataList:A.geometryData._dataProvider._geoidDataList,cartographicCenter:I,cartesianCenter:w,parentRotation:E},M=o._getDecoderTaskProcessor(),B=[];return o._taskProcessorReadyPromise.then(function(){return M.scheduleTask(Q,B)})};sI.prototype._createContentURL=function(){let o={scene:0,scenes:[{nodes:[0]}],nodes:[{name:"singleNode"}],meshes:[],buffers:[],bufferViews:[],accessors:[],materials:[],textures:[],images:[],samplers:[],asset:{version:"2.0"}},A=[this._loadGeometryData()];this._dataProvider.legacyVersion16&&A.push(this._loadFeatureData());let f=this;return Promise.all(A).then(function(){let m=Promise.resolve();if(O(f._geometryData)&&f._geometryData.length>0){let C={geometryData:f._geometryData[0],featureData:f._featureData,defaultGeometrySchema:f._layer._data.store.defaultGeometrySchema,url:f._geometryData[0].resource.url,tile:f._tile},y=f._createI3SDecoderTask(f._dataProvider,C);if(!O(y))return;m=y.then(function(x){o=C.geometryData._generateGltf(x.meshData.nodesInScene,x.meshData.nodes,x.meshData.meshes,x.meshData.buffers,x.meshData.bufferViews,x.meshData.accessors),f._geometryData[0]._customAttributes=x.meshData._customAttributes})}return m.then(function(){let C=f._dataProvider._binarizeGltf(o),y=new Blob([C],{type:"application/binary"});f._glbURL=URL.createObjectURL(y)})})};Ov.prototype._hookedRequestContent=Ov.prototype.requestContent;Ov.prototype._resolveHookedObject=function(){let o=this;this._hookedRequestContent(),this._contentReadyToProcessPromise.then(function(){o._contentReadyToProcessDefer.resolve()}),this._contentReadyPromise.then(function(A){o._isLoading=!1,o._contentReadyDefer.resolve(A)})};Ov.prototype.requestContent=function(){let o=this;return this.tileset._isI3STileSet?this._isLoading?1:(this._isLoading=!0,this._contentReadyToProcessDefer=rA(),this._contentReadyDefer=rA(),this._contentReadyToProcessPromise=this._contentReadyToProcessDefer.promise,this._contentReadyPromise=this._contentReadyDefer.promise,this._i3sNode._createContentURL().then(function(){o._contentResource=new An({url:o._i3sNode._glbURL}),o._resolveHookedObject()}),0):this._hookedRequestContent()};function i2i(o,A,f,m,C,y){let x=f*(1-o)+m*o,v=C*(1-o)+y*o;return x*(1-A)+v*A}function N$(o,A,f,m){let C=o+A*f;return m[C]}function r2i(o,A,f){let m=f.nativeExtent,C=(o-m.west)/(m.east-m.west)*(f.width-1),y=(A-m.south)/(m.north-m.south)*(f.height-1),x=Math.floor(C),v=Math.floor(y);C-=x,y-=v;let E=x<f.width?x+1:x,I=v<f.height?v+1:v;v=f.height-1-v,I=f.height-1-I;let w=N$(x,v,f.width,f.buffer),Q=N$(E,v,f.width,f.buffer),M=N$(x,I,f.width,f.buffer),B=N$(E,I,f.width,f.buffer),T=i2i(C,y,w,Q,M,B);return T=T*f.scale+f.offset,T}Object.defineProperties(Ov.prototype,{i3sNode:{get:function(){return this._i3sNode}}});var wie=sI;function X1(o,A,f){this._dataProvider=o,O(A.href)||(A.href=`./layers/${f}`);let m=this._dataProvider.resource.getUrlComponent(),C="";m.match(/layers\/\d/)?C=`${m}`.replace(/\/+$/,""):C=`${m}`.replace(/\/?$/,"/").concat(`${A.href}`),this._version=A.store.version;let y=this._version.split(".");this._majorVersion=parseInt(y[0]),this._minorVersion=y.length>1?parseInt(y[1]):0,this._resource=new An({url:C}),this._resource.setQueryParameters(this._dataProvider.resource.queryParameters),this._resource.appendForwardSlash(),this._data=A,this._rootNode=void 0,this._nodePages={},this._nodePageFetches={},this._extent=void 0,this._tileset=void 0,this._geometryDefinitions=void 0,this._computeGeometryDefinitions(!0),this._computeExtent()}Object.defineProperties(X1.prototype,{resource:{get:function(){return this._resource}},rootNode:{get:function(){return this._rootNode}},tileset:{get:function(){return this._tileset}},data:{get:function(){return this._data}},version:{get:function(){return this._version}},majorVersion:{get:function(){return this._majorVersion}},minorVersion:{get:function(){return this._minorVersion}},legacyVersion16:{get:function(){if(O(this.version))return this.majorVersion<1||this.majorVersion===1&&this.minorVersion<=6}}});X1.prototype.load=function(){let o=this;return this._data.spatialReference.wkid!==4326?(console.log(`Unsupported spatial reference: ${this._data.spatialReference.wkid}`),Promise.reject()):this._dataProvider._geoidDataIsReadyPromise.then(function(){return o._loadRootNode().then(function(){return o._create3DTileset(),o._tileset.readyPromise.then(function(){if(o._rootNode._tile=o._tileset._root,o._tileset._root._i3sNode=o._rootNode,o.legacyVersion16)return o._rootNode._loadChildren()})})})};X1.prototype._computeGeometryDefinitions=function(o){if(this._geometryDefinitions=[],O(this._data.geometryDefinitions))for(let A=0;A<this._data.geometryDefinitions.length;A++){let f=[],m=this._data.geometryDefinitions[A].geometryBuffers;for(let C=0;C<m.length;C++){let y=m[C],x=[],v=!1;if(O(y.compressedAttributes)&&o){v=!0;let E=y.compressedAttributes.attributes;for(let I=0;I<E.length;I++)x.push(E[I])}else for(let E in y)E!=="offset"&&x.push(E);f.push({compressed:v,attributes:x,index:m.indexOf(y)})}f.sort(function(C,y){return C.compressed&&!y.compressed?-1:!C.compressed&&y.compressed?1:C.attributes.length-y.attributes.length}),this._geometryDefinitions.push(f)}};X1.prototype._findBestGeometryBuffers=function(o,A){let f=this._geometryDefinitions[o];if(O(f))for(let m=0;m<f.length;++m){let C=f[m],y=!1,x=C.attributes;for(let v=0;v<A.length;v++)if(!x.includes(A[v])){y=!0;break}if(!y)return{bufferIndex:C.index,definition:f,geometryBufferInfo:C}}return 0};X1.prototype._loadRootNode=function(){if(O(this._data.nodePages)){let o=0;O(this._data.nodePages.rootIndex)&&(o=this._data.nodePages.rootIndex),this._rootNode=new wie(this,o,!0)}else this._rootNode=new wie(this,this._data.store.rootNode,!0);return this._rootNode.load()};X1.prototype._getNodeInNodePages=function(o){let A=Math.floor(o/this._data.nodePages.nodesPerPage),f=o%this._data.nodePages.nodesPerPage,m=this;return this._loadNodePage(A).then(function(){return m._nodePages[A][f]})};X1._fetchJson=function(o){return o.fetchJson()};X1.prototype._loadNodePage=function(o){let A=this;if(!O(this._nodePageFetches[o])){let f=this.resource.getDerivedResource({url:`nodepages/${o}/`}),m=X1._fetchJson(f).then(function(C){return O(C.error)&&C.error.code!==200?Promise.reject(C.error):(A._nodePages[o]=C.nodes,C)});this._nodePageFetches[o]=m}return this._nodePageFetches[o]};X1.prototype._computeExtent=function(){O(this._data.fullExtent)?this._extent=Si.fromDegrees(this._data.fullExtent.xmin,this._data.fullExtent.ymin,this._data.fullExtent.xmax,this._data.fullExtent.ymax):O(this._data.store.extent)&&(this._extent=Si.fromDegrees(this._data.store.extent[0],this._data.store.extent[1],this._data.store.extent[2],this._data.store.extent[3]))};X1.prototype._create3DTileset=function(){let o={asset:{version:"1.0"},geometricError:Number.MAX_VALUE,root:this._rootNode._create3DTileDefinition()},A=new Blob([JSON.stringify(o)],{type:"application/json"}),f=URL.createObjectURL(A),m={};if(O(this._dataProvider._cesium3dTilesetOptions))for(let y in this._dataProvider._cesium3dTilesetOptions)this._dataProvider._cesium3dTilesetOptions.hasOwnProperty(y)&&(m[y]=this._dataProvider._cesium3dTilesetOptions[y]);m.url=f,m.show=this._dataProvider.show,this._tileset=new Fx(m),this._tileset._isI3STileSet=!0;let C=this;this._tileset.readyPromise.then(function(){C._tileset.tileUnload.addEventListener(function(y){y._i3sNode._clearGeometryData(),URL.revokeObjectURL(y._contentResource._url),y._contentResource=y._i3sNode.resource}),C._tileset.tileVisible.addEventListener(function(y){O(y._i3sNode)&&y._i3sNode._loadChildren()})})};var bie=X1,n2i=xh(mBt(),1);function dy(o){o=Ae(o,Ae.EMPTY_OBJECT),this._resource=An.createIfNeeded(o.url),this._name=o.name,this._show=Ae(o.show,!0),this._geoidTiledTerrainProvider=o.geoidTiledTerrainProvider,this._traceFetches=Ae(o.traceFetches,!1),this._cesium3dTilesetOptions=Ae(o.cesium3dTilesetOptions,Ae.EMPTY_OBJECT),this._layers=[],this._data=void 0,this._extent=void 0,this._geoidDataIsReadyPromise=void 0,this._geoidDataList=void 0,this._decoderTaskProcessor=void 0,this._readyPromise=void 0,this._ready=!1,this._load()}Object.defineProperties(dy.prototype,{name:{get:function(){return this._name}},show:{get:function(){return this._show},set:function(o){this._show=o;for(let A=0;A<this._layers.length;A++)O(this._layers[A]._tileset)&&(this._layers[A]._tileset.show=this._show)}},traceFetches:{get:function(){return this._traceFetches},set:function(o){this._traceFetches=o}},geoidTiledTerrainProvider:{get:function(){return this._geoidTiledTerrainProvider}},layers:{get:function(){return this._layers}},data:{get:function(){return this._data}},extent:{get:function(){return this._extent}},readyPromise:{get:function(){return this._readyPromise}},ready:{get:function(){return this._ready}},resource:{get:function(){return this._resource}}});dy.prototype.destroy=function(){for(let o=0;o<this._layers.length;o++)O(this._layers[o]._tileset)&&this._layers[o]._tileset.destroy();return Qr(this)};dy.prototype.isDestroyed=function(){return!1};dy.prototype.update=function(o){for(let A=0;A<this._layers.length;A++)O(this._layers[A]._tileset)&&this._layers[A]._tileset.ready&&this._layers[A]._tileset.update(o)};dy.prototype.prePassesUpdate=function(o){for(let A=0;A<this._layers.length;A++)O(this._layers[A]._tileset)&&this._layers[A]._tileset.ready&&this._layers[A]._tileset.prePassesUpdate(o)};dy.prototype.postPassesUpdate=function(o){for(let A=0;A<this._layers.length;A++)O(this._layers[A]._tileset)&&this._layers[A]._tileset.ready&&this._layers[A]._tileset.postPassesUpdate(o)};dy.prototype.updateForPass=function(o,A){for(let f=0;f<this._layers.length;f++)O(this._layers[f]._tileset)&&this._layers[f]._tileset.ready&&this._layers[f]._tileset.updateForPass(o,A)};dy.prototype._load=function(){let o=this;return this._readyPromise=this._loadJson(this._resource).then(function(A){if(o._data=A,O(o._data.layers))for(let m=0;m<o._data.layers.length;m++){let C=new bie(o,o._data.layers[m],m);o._layers.push(C)}else{let m=new bie(o,o._data,o._data.id);o._layers.push(m)}o._computeExtent(),o._loadGeoidData();let f=[];for(let m=0;m<o._layers.length;m++)f.push(o._layers[m].load());return Promise.all(f).then(function(){return o._ready=!0,o})}),this._readyPromise};dy._fetchJson=function(o){return o.fetchJson()};dy.prototype._loadJson=function(o){return this._traceFetches&&console.log("I3S FETCH:",o.url),dy._fetchJson(o).then(function(A){if(O(A.error)){if(console.error("Failed to fetch I3S ",o.url),O(A.error.message)&&console.error(A.error.message),O(A.error.details))for(let f=0;f<A.error.details.length;f++)console.log(A.error.details[f]);return Promise.reject(A.error)}return A})};dy.prototype._loadBinary=function(o){return this._traceFetches&&console.log("I3S FETCH:",o.url),o.fetchArrayBuffer()};dy.prototype._binarizeGltf=function(o){let A=new TextEncoder().encode(JSON.stringify(o)),f=new Uint8Array(A.byteLength+20),m={magic:new Uint8Array(f.buffer,0,4),version:new Uint32Array(f.buffer,4,1),length:new Uint32Array(f.buffer,8,1),chunkLength:new Uint32Array(f.buffer,12,1),chunkType:new Uint32Array(f.buffer,16,1),chunkData:new Uint8Array(f.buffer,20,A.byteLength)};return m.magic[0]="g".charCodeAt(),m.magic[1]="l".charCodeAt(),m.magic[2]="T".charCodeAt(),m.magic[3]="F".charCodeAt(),m.version[0]=2,m.length[0]=f.byteLength,m.chunkLength[0]=A.byteLength,m.chunkType[0]=1313821514,m.chunkData.set(A),f};dy.prototype._getDecoderTaskProcessor=function(){if(!O(this._decoderTaskProcessor)){let o=new Vf("decodeI3S");this._taskProcessorReadyPromise=o.initWebAssemblyModule({modulePath:"ThirdParty/Workers/draco_decoder_nodejs.js",wasmBinaryFile:"ThirdParty/draco_decoder.wasm"}),this._decoderTaskProcessor=o}return this._decoderTaskProcessor};function o2i(o,A){return o.readyPromise.then(function(){return s2i(o,A)})}var a2i=new Bt;function s2i(o,A){let f=o.tilingScheme,m=[],C={},y=o._lodCount,x=Kt.fromRadians(A.west,A.north),v=Kt.fromRadians(A.east,A.south),E=f.positionToTileXY(x,y),I=f.positionToTileXY(v,y);for(let Q=E.x;Q<=I.x;Q++)for(let M=E.y;M<=I.y;M++){let B=Bt.fromElements(Q,M,a2i),T=B.toString();if(!C.hasOwnProperty(T)){let D={x:B.x,y:B.y,level:y,tilingScheme:f,terrainProvider:o,positions:[]};C[T]=D,m.push(D)}}let w=[];for(let Q=0;Q<m.length;++Q){let M=m[Q],B=M.terrainProvider.requestTileGeometry(M.x,M.y,M.level);w.push(B)}return Promise.all(w).then(function(Q){let M=[];for(let B=0;B<Q.length;B++){let T={tilingScheme:f,x:m[B].x,y:m[B].y,level:m[B].level},D=Q[B],F="Geographic";f._projection instanceof NA&&(F="WebMercator");let L={projectionType:F,projection:f._projection,nativeExtent:f.tileXYToNativeRectangle(T.x,T.y,T.level),height:D._height,width:D._width,scale:D._structure.heightScale,offset:D._structure.heightOffset};if(D._encoding===VF.LERC){let R=n2i.default.decode(D._buffer);L.buffer=R.pixels[0]}else L.buffer=D._buffer;M.push(L)}return M})}dy.prototype._loadGeoidData=function(){let o=this,A=this._geoidTiledTerrainProvider;return O(A)?(this._geoidDataIsReadyPromise=A.readyPromise.then(function(){return o2i(A,o._extent).then(function(f){o._geoidDataList=f})}),this._geoidDataIsReadyPromise):(console.log("No Geoid Terrain service provided - no geoid conversion will be performed."),this._geoidDataIsReadyPromise=Promise.resolve(),this._geoidDataIsReadyPromise)};dy.prototype._computeExtent=function(){let o;for(let A=0;A<this._layers.length;A++)if(O(this._layers[A]._extent)){let f=this._layers[A]._extent;O(o)?Si.union(o,f,o):o=Si.clone(f)}this._extent=o};var Ust=dy;function Gst(){}Object.defineProperties(Gst.prototype,{color:{get:Ui.throwInstantiationError},intensity:{get:Ui.throwInstantiationError}});var Hst=Gst,l2i=/\/$/,Vst=new tl('&copy; <a href="https://www.mapbox.com/about/maps/">Mapbox</a> &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/">Improve this map</a></strong>');function _H(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.styleId,f=o.accessToken;this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0;let m=An.createIfNeeded(Ae(o.url,"https://api.mapbox.com/styles/v1/"));this._styleId=A,this._accessToken=f;let C=Ae(o.tilesize,512);this._tilesize=C;let y=Ae(o.username,"mapbox");this._username=y;let x=O(o.scaleFactor)?"@2x":"",v=m.getUrlComponent();l2i.test(v)||(v+="/"),v+=`${this._username}/${A}/tiles/${this._tilesize}/{z}/{x}/{y}${x}`,m.url=v,m.setQueryParameters({access_token:f});let E;O(o.credit)?(E=o.credit,typeof E=="string"&&(E=new tl(E))):E=Vst,this._resource=m,this._imageryProvider=new sw({url:m,credit:E,ellipsoid:o.ellipsoid,minimumLevel:o.minimumLevel,maximumLevel:o.maximumLevel,rectangle:o.rectangle})}Object.defineProperties(_H.prototype,{url:{get:function(){return this._imageryProvider.url}},ready:{get:function(){return this._imageryProvider.ready}},readyPromise:{get:function(){return this._imageryProvider.readyPromise}},rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._imageryProvider.errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},proxy:{get:function(){return this._imageryProvider.proxy}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}}});_H.prototype.getTileCredits=function(o,A,f){};_H.prototype.requestImage=function(o,A,f,m){return this._imageryProvider.requestImage(o,A,f,m)};_H.prototype.pickFeatures=function(o,A,f,m,C){return this._imageryProvider.pickFeatures(o,A,f,m,C)};_H._defaultCredit=Vst;var zst=_H;function xDe(o){}xDe.prototype.isReady=function(){return!0};xDe.prototype.shouldDiscardImage=function(o){return!1};var Kst=xDe,u2i=new Bt(1,1);function vDe(o){o=Ae(o,Ae.EMPTY_OBJECT),this.mass=Ae(o.mass,1),this.position=ee.clone(Ae(o.position,ee.ZERO)),this.velocity=ee.clone(Ae(o.velocity,ee.ZERO)),this.life=Ae(o.life,Number.MAX_VALUE),this.image=o.image,this.startColor=At.clone(Ae(o.startColor,At.WHITE)),this.endColor=At.clone(Ae(o.endColor,At.WHITE)),this.startScale=Ae(o.startScale,1),this.endScale=Ae(o.endScale,1),this.imageSize=Bt.clone(Ae(o.imageSize,u2i)),this._age=0,this._normalizedAge=0,this._billboard=void 0}Object.defineProperties(vDe.prototype,{age:{get:function(){return this._age}},normalizedAge:{get:function(){return this._normalizedAge}}});var A7e=new ee;vDe.prototype.update=function(o,A){return ee.multiplyByScalar(this.velocity,o,A7e),ee.add(this.position,A7e,this.position),O(A)&&A(this,o),this._age+=o,this.life===Number.MAX_VALUE?this._normalizedAge=0:this._normalizedAge=this._age/this.life,this._age<=this.life};var yae=vDe;function Yst(o){o=Ae(o,Ae.EMPTY_OBJECT),this.time=Ae(o.time,0),this.minimum=Ae(o.minimum,0),this.maximum=Ae(o.maximum,50),this._complete=!1}Object.defineProperties(Yst.prototype,{complete:{get:function(){return this._complete}}});var BH=Yst;function Jst(o){}Jst.prototype.emit=function(o){Ui.throwInstantiationError()};var Wst=Jst,h7e=new Bt(1,1);function AW(o){o=Ae(o,Ae.EMPTY_OBJECT),this.show=Ae(o.show,!0),this.updateCallback=o.updateCallback,this.loop=Ae(o.loop,!0),this.image=Ae(o.image,void 0);let A=o.emitter;O(A)||(A=new cDe(.5)),this._emitter=A,this._bursts=o.bursts,this._modelMatrix=Xe.clone(Ae(o.modelMatrix,Xe.IDENTITY)),this._emitterModelMatrix=Xe.clone(Ae(o.emitterModelMatrix,Xe.IDENTITY)),this._matrixDirty=!0,this._combinedMatrix=new Xe,this._startColor=At.clone(Ae(o.color,Ae(o.startColor,At.WHITE))),this._endColor=At.clone(Ae(o.color,Ae(o.endColor,At.WHITE))),this._startScale=Ae(o.scale,Ae(o.startScale,1)),this._endScale=Ae(o.scale,Ae(o.endScale,1)),this._emissionRate=Ae(o.emissionRate,5),this._minimumSpeed=Ae(o.speed,Ae(o.minimumSpeed,1)),this._maximumSpeed=Ae(o.speed,Ae(o.maximumSpeed,1)),this._minimumParticleLife=Ae(o.particleLife,Ae(o.minimumParticleLife,5)),this._maximumParticleLife=Ae(o.particleLife,Ae(o.maximumParticleLife,5)),this._minimumMass=Ae(o.mass,Ae(o.minimumMass,1)),this._maximumMass=Ae(o.mass,Ae(o.maximumMass,1)),this._minimumImageSize=Bt.clone(Ae(o.imageSize,Ae(o.minimumImageSize,h7e))),this._maximumImageSize=Bt.clone(Ae(o.imageSize,Ae(o.maximumImageSize,h7e))),this._sizeInMeters=Ae(o.sizeInMeters,!1),this._lifetime=Ae(o.lifetime,Number.MAX_VALUE),this._billboardCollection=void 0,this._particles=[],this._particlePool=[],this._previousTime=void 0,this._currentTime=0,this._carryOver=0,this._complete=new br,this._isComplete=!1,this._updateParticlePool=!0,this._particleEstimate=0}Object.defineProperties(AW.prototype,{emitter:{get:function(){return this._emitter},set:function(o){this._emitter=o}},bursts:{get:function(){return this._bursts},set:function(o){this._bursts=o,this._updateParticlePool=!0}},modelMatrix:{get:function(){return this._modelMatrix},set:function(o){this._matrixDirty=this._matrixDirty||!Xe.equals(this._modelMatrix,o),Xe.clone(o,this._modelMatrix)}},emitterModelMatrix:{get:function(){return this._emitterModelMatrix},set:function(o){this._matrixDirty=this._matrixDirty||!Xe.equals(this._emitterModelMatrix,o),Xe.clone(o,this._emitterModelMatrix)}},startColor:{get:function(){return this._startColor},set:function(o){At.clone(o,this._startColor)}},endColor:{get:function(){return this._endColor},set:function(o){At.clone(o,this._endColor)}},startScale:{get:function(){return this._startScale},set:function(o){this._startScale=o}},endScale:{get:function(){return this._endScale},set:function(o){this._endScale=o}},emissionRate:{get:function(){return this._emissionRate},set:function(o){this._emissionRate=o,this._updateParticlePool=!0}},minimumSpeed:{get:function(){return this._minimumSpeed},set:function(o){this._minimumSpeed=o}},maximumSpeed:{get:function(){return this._maximumSpeed},set:function(o){this._maximumSpeed=o}},minimumParticleLife:{get:function(){return this._minimumParticleLife},set:function(o){this._minimumParticleLife=o}},maximumParticleLife:{get:function(){return this._maximumParticleLife},set:function(o){this._maximumParticleLife=o,this._updateParticlePool=!0}},minimumMass:{get:function(){return this._minimumMass},set:function(o){this._minimumMass=o}},maximumMass:{get:function(){return this._maximumMass},set:function(o){this._maximumMass=o}},minimumImageSize:{get:function(){return this._minimumImageSize},set:function(o){this._minimumImageSize=o}},maximumImageSize:{get:function(){return this._maximumImageSize},set:function(o){this._maximumImageSize=o}},sizeInMeters:{get:function(){return this._sizeInMeters},set:function(o){this._sizeInMeters=o}},lifetime:{get:function(){return this._lifetime},set:function(o){this._lifetime=o}},complete:{get:function(){return this._complete}},isComplete:{get:function(){return this._isComplete}}});function c2i(o){let A=o._emissionRate,f=o._maximumParticleLife,m=0,C=o._bursts;if(O(C)){let Q=C.length;for(let M=0;M<Q;++M)m+=C[M].maximum}let y=o._billboardCollection,x=o.image,v=Math.ceil(A*f+m),E=o._particles,I=o._particlePool,w=Math.max(v-E.length-I.length,0);for(let Q=0;Q<w;++Q){let M=new yae;M._billboard=y.add({image:x}),I.push(M)}o._particleEstimate=v}function A2i(o){let A=o._particlePool.pop();return O(A)||(A=new yae),A}function h2i(o,A){o._particlePool.push(A)}function d2i(o){let A=o._particles,f=o._particlePool,m=o._billboardCollection,C=A.length,y=f.length,x=o._particleEstimate,v=y-Math.max(x-C-y,0);for(let E=v;E<y;++E){let I=f[E];m.remove(I._billboard)}f.length=v}function f2i(o){O(o._billboard)&&(o._billboard.show=!1)}function d7e(o,A){let f=A._billboard;O(f)||(f=A._billboard=o._billboardCollection.add({image:A.image})),f.width=A.imageSize.x,f.height=A.imageSize.y,f.position=A.position,f.sizeInMeters=o.sizeInMeters,f.show=!0;let m=je.lerp(A.startColor.red,A.endColor.red,A.normalizedAge),C=je.lerp(A.startColor.green,A.endColor.green,A.normalizedAge),y=je.lerp(A.startColor.blue,A.endColor.blue,A.normalizedAge),x=je.lerp(A.startColor.alpha,A.endColor.alpha,A.normalizedAge);f.color=new At(m,C,y,x),f.scale=je.lerp(A.startScale,A.endScale,A.normalizedAge)}function g2i(o,A){A.startColor=At.clone(o._startColor,A.startColor),A.endColor=At.clone(o._endColor,A.endColor),A.startScale=o._startScale,A.endScale=o._endScale,A.image=o.image,A.life=je.randomBetween(o._minimumParticleLife,o._maximumParticleLife),A.mass=je.randomBetween(o._minimumMass,o._maximumMass),A.imageSize.x=je.randomBetween(o._minimumImageSize.x,o._maximumImageSize.x),A.imageSize.y=je.randomBetween(o._minimumImageSize.y,o._maximumImageSize.y),A._normalizedAge=0,A._age=0;let f=je.randomBetween(o._minimumSpeed,o._maximumSpeed);ee.multiplyByScalar(A.velocity,f,A.velocity),o._particles.push(A)}function p2i(o,A){if(o._isComplete)return 0;A=je.mod(A,o._lifetime);let f=A*o._emissionRate,m=Math.floor(f);if(o._carryOver+=f-m,o._carryOver>1&&(m++,o._carryOver-=1),O(o.bursts)){let C=o.bursts.length;for(let y=0;y<C;y++){let x=o.bursts[y],v=o._currentTime;O(x)&&!x._complete&&v>x.time&&(m+=je.randomBetween(x.minimum,x.maximum),x._complete=!0)}}return m}var k$=new ee;AW.prototype.update=function(o){if(!this.show)return;O(this._billboardCollection)||(this._billboardCollection=new iI),this._updateParticlePool&&(c2i(this),this._updateParticlePool=!1);let A=0;this._previousTime&&(A=fi.secondsDifference(o.time,this._previousTime)),A<0&&(A=0);let f=this._particles,m=this._emitter,C=this.updateCallback,y,x,v=f.length;for(y=0;y<v;++y)x=f[y],x.update(A,C)?d7e(this,x):(f2i(x),h2i(this,x),f[y]=f[v-1],--y,--v);f.length=v;let E=p2i(this,A);if(E>0&&O(m)){this._matrixDirty&&(this._combinedMatrix=Xe.multiply(this.modelMatrix,this.emitterModelMatrix,this._combinedMatrix),this._matrixDirty=!1);let I=this._combinedMatrix;for(y=0;y<E;y++)x=A2i(this),this._emitter.emit(x),ee.add(x.position,x.velocity,k$),Xe.multiplyByPoint(I,k$,k$),x.position=Xe.multiplyByPoint(I,x.position,x.position),ee.subtract(k$,x.position,x.velocity),ee.normalize(x.velocity,x.velocity),g2i(this,x),d7e(this,x)}if(this._billboardCollection.update(o),this._previousTime=fi.clone(o.time,this._previousTime),this._currentTime+=A,this._lifetime!==Number.MAX_VALUE&&this._currentTime>this._lifetime)if(this.loop){if(this._currentTime=je.mod(this._currentTime,this._lifetime),this.bursts){let I=this.bursts.length;for(y=0;y<I;y++)this.bursts[y]._complete=!1}}else this._isComplete=!0,this._complete.raiseEvent(this);o.frameNumber%120===0&&d2i(this)};AW.prototype.isDestroyed=function(){return!1};AW.prototype.destroy=function(){return this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),Qr(this)};var _2=AW;function hB(){Ui.throwInstantiationError()}hB.computeDefaultLevelZeroMaximumGeometricError=function(o){return o.ellipsoid.maximumRadius*2*Math.PI*.25/(65*o.getNumberOfXTilesAtLevel(0))};Object.defineProperties(hB.prototype,{quadtree:{get:Ui.throwInstantiationError,set:Ui.throwInstantiationError},ready:{get:Ui.throwInstantiationError},tilingScheme:{get:Ui.throwInstantiationError},errorEvent:{get:Ui.throwInstantiationError}});hB.prototype.update=Ui.throwInstantiationError;hB.prototype.beginUpdate=Ui.throwInstantiationError;hB.prototype.endUpdate=Ui.throwInstantiationError;hB.prototype.getLevelMaximumGeometricError=Ui.throwInstantiationError;hB.prototype.loadTile=Ui.throwInstantiationError;hB.prototype.computeTileVisibility=Ui.throwInstantiationError;hB.prototype.showTileThisFrame=Ui.throwInstantiationError;hB.prototype.computeDistanceToTile=Ui.throwInstantiationError;hB.prototype.isDestroyed=Ui.throwInstantiationError;hB.prototype.destroy=Ui.throwInstantiationError;var jst=hB;function EDe(o){o=Ae(o,1),this._radius=Ae(o,1)}Object.defineProperties(EDe.prototype,{radius:{get:function(){return this._radius},set:function(o){this._radius=o}}});EDe.prototype.emit=function(o){let A=je.randomBetween(0,je.TWO_PI),f=je.randomBetween(0,je.PI),m=je.randomBetween(0,this._radius),C=m*Math.cos(A)*Math.sin(f),y=m*Math.sin(A)*Math.sin(f),x=m*Math.cos(f);o.position=ee.fromElements(C,y,x,o.position),o.velocity=ee.normalize(o.position,o.velocity)};var wH=EDe;function hW(){}hW.prototype.evaluate=function(o,A){Ui.throwInstantiationError()};hW.prototype.evaluateColor=function(o,A){Ui.throwInstantiationError()};hW.prototype.getShaderFunction=function(o,A,f,m){Ui.throwInstantiationError()};hW.prototype.getVariables=function(){Ui.throwInstantiationError()};var qst=hW;function bH(){}bH.prototype.boundingVolume=void 0;bH.prototype.boundingSphere=void 0;bH.prototype.distanceToCamera=function(o){Ui.throwInstantiationError()};bH.prototype.intersectPlane=function(o){Ui.throwInstantiationError()};bH.prototype.createDebugVolume=function(o){Ui.throwInstantiationError()};var Xst=bH;function dW(o){o=Ae(o,Ae.EMPTY_OBJECT),this._tilingScheme=O(o.tilingScheme)?o.tilingScheme:new af({ellipsoid:o.ellipsoid}),this._color=Ae(o.color,At.YELLOW),this._errorEvent=new br,this._tileWidth=Ae(o.tileWidth,256),this._tileHeight=Ae(o.tileHeight,256),this._readyPromise=Promise.resolve(!0),this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0}Object.defineProperties(dW.prototype,{proxy:{get:function(){}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){}},minimumLevel:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){}},hasAlphaChannel:{get:function(){return!0}}});dW.prototype.getTileCredits=function(o,A,f){};dW.prototype.requestImage=function(o,A,f,m){let C=document.createElement("canvas");C.width=256,C.height=256;let y=C.getContext("2d"),x=this._color.toCssColorString();return y.strokeStyle=x,y.lineWidth=2,y.strokeRect(1,1,255,255),y.font="bold 25px Arial",y.textAlign="center",y.fillStyle=x,y.fillText(`L: ${f}`,124,86),y.fillText(`X: ${o}`,124,136),y.fillText(`Y: ${A}`,124,186),Promise.resolve(C)};dW.prototype.pickFeatures=function(o,A,f,m,C){};var IDe=dW;function _De(o){Ui.throwInstantiationError()}_De.prototype.isReady=Ui.throwInstantiationError;_De.prototype.shouldDiscardImage=Ui.throwInstantiationError;var Zst=_De,m2i={START:0,LOADING:1,READY:2,UPSAMPLED_ONLY:3},$st=Object.freeze(m2i);function xae(o,A){this.show=!0,O(o)||(o=new Kr),this.rectangle=Kr.clone(o),O(A)||(A=as.fromType(as.ColorType,{color:new At(1,1,1,1)})),this.material=A,this._material=void 0,this._overlayCommand=void 0,this._rs=void 0}xae.prototype.update=function(o){if(!this.show)return;let A=this._rs;if((!O(A)||!Kr.equals(A.viewport,this.rectangle))&&(this._rs=fn.fromCache({blending:Bu.ALPHA_BLEND,viewport:this.rectangle})),o.passes.render){let f=o.context;if(this._material!==this.material||!O(this._overlayCommand)){this._material=this.material,O(this._overlayCommand)&&this._overlayCommand.shaderProgram.destroy();let m=new Fr({sources:[this._material.shaderSource,rSe]});this._overlayCommand=f.createViewportQuadCommand(m,{renderState:this._rs,uniformMap:this._material._uniforms,owner:this}),this._overlayCommand.pass=hr.OVERLAY}this._material.update(f),this._overlayCommand.renderState=this._rs,this._overlayCommand.uniformMap=this._material._uniforms,o.commandList.push(this._overlayCommand)}};xae.prototype.isDestroyed=function(){return!1};xae.prototype.destroy=function(){return O(this._overlayCommand)&&(this._overlayCommand.shaderProgram=this._overlayCommand.shaderProgram&&this._overlayCommand.shaderProgram.destroy()),Qr(this)};var elt=xae,tlt=`uniform sampler2D u_depthTexture;
varying vec2 v_textureCoordinates;
void main()
{
@@ -15153,7 +15146,7 @@
float scale = pow(z_ndc * 0.5 + 0.5, 8.0);
gl_FragColor = vec4(mix(vec3(0.0), vec3(1.0), scale), 1.0);
}
`,nlt=`uniform sampler2D colorTexture;
`,ilt=`uniform sampler2D colorTexture;
varying vec2 v_textureCoordinates;
float hash(float x)
{
@@ -15174,7 +15167,7 @@
c*=v*b;
gl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), vec4(c,1), 0.5);
}
`,olt=`uniform sampler2D colorTexture;
`,rlt=`uniform sampler2D colorTexture;
varying vec2 v_textureCoordinates;
float snow(vec2 uv,float scale)
{
@@ -15202,7 +15195,7 @@
finalColor=(vec3(c));
gl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), vec4(finalColor,1), 0.5);
}
`,alt=`varying vec2 v_textureCoordinates;
`,nlt=`varying vec2 v_textureCoordinates;
uniform sampler2D colorTexture;
const float _BlurRadius = 5.0;
const int _Iteration = 30;
@@ -15231,7 +15224,7 @@
vec2 sunTexcoord = sunPos.xy * 0.5 + vec2(0.5);
gl_FragColor = getColor(v_textureCoordinates, sunTexcoord);
}
`,slt=`varying vec2 v_textureCoordinates;
`,olt=`varying vec2 v_textureCoordinates;
uniform sampler2D colorTexture;
const float threshold = 0.5;
void main()
@@ -15240,10 +15233,17 @@
float brightness = dot(fragColor.rgb, vec3(0.2126, 0.7152, 0.0722));
gl_FragColor = brightness > threshold ? vec4(fragColor.rgb, 1.0) : vec4(0.0, 0.0, 0.0, 1.0);
}
`;function E2i(o){let A;if(O(o)){A="Command Statistics";let f=o.commandsInFrustums;for(let m in f)if(f.hasOwnProperty(m)){let C=parseInt(m,10),y;if(C===7)y="1, 2 and 3";else{let x=[];for(let v=2;v>=0;v--){let E=Math.pow(2,v);C>=E&&(x.push(v+1),C-=E)}y=x.reverse().join(" and ")}A+=`<br>&nbsp;&nbsp;&nbsp;&nbsp;${f[m]} in frustum ${y}`}A+=`<br>Total: ${o.totalCommands}`}return A}function wme(o,A,f){let m=Math.min(f,A);return m=Math.max(m,o),m}var I2i=new ss,_2i=new ee;function fW(o,A){let f=this,m=o.canvas,C=new Ur(m);this._eventHandler=C,this._scene=o,this._canvas=m,this._primitive=void 0,this._tile=void 0,this._modelMatrixPrimitive=void 0,this._performanceDisplay=void 0,this._performanceContainer=A;let y=this._scene.globe;y.depthTestAgainstTerrain=!0,this.frustums=!1,this.frustumPlanes=!1,this.performance=!1,this.shaderCacheText="",this.primitiveBoundingSphere=!1,this.primitiveReferenceFrame=!1,this.filterPrimitive=!1,this.tileBoundingSphere=!1,this.filterTile=!1,this.wireframe=!1,this.depthFrustum=1,this._numberOfFrustums=1,this.suspendUpdates=!1,this.tileCoordinates=!1,this.frustumStatisticText=!1,this.tileText="",this.hasPickedPrimitive=!1,this.hasPickedTile=!1,this.pickPrimitiveActive=!1,this.pickTileActive=!1,this.dropDownVisible=!0,this.generalVisible=!0,this.primitivesVisible=!1,this.terrainVisible=!1,this.depthFrustumText="",gr.track(this,["frustums","frustumPlanes","performance","shaderCacheText","primitiveBoundingSphere","primitiveReferenceFrame","filterPrimitive","tileBoundingSphere","filterTile","wireframe","depthFrustum","suspendUpdates","tileCoordinates","frustumStatisticText","tileText","hasPickedPrimitive","hasPickedTile","pickPrimitiveActive","pickTileActive","dropDownVisible","generalVisible","primitivesVisible","terrainVisible","depthFrustumText"]),this._toggleDropDown=Hl(function(){f.dropDownVisible=!f.dropDownVisible}),this._toggleGeneral=Hl(function(){f.generalVisible=!f.generalVisible}),this._togglePrimitives=Hl(function(){f.primitivesVisible=!f.primitivesVisible}),this._toggleTerrain=Hl(function(){f.terrainVisible=!f.terrainVisible}),this._frustumsSubscription=gr.getObservable(this,"frustums").subscribe(function(I){f._scene.debugShowFrustums=I,f._scene.requestRender()}),this._frustumPlanesSubscription=gr.getObservable(this,"frustumPlanes").subscribe(function(I){f._scene.debugShowFrustumPlanes=I,f._scene.requestRender()}),this._performanceSubscription=gr.getObservable(this,"performance").subscribe(function(I){I?f._performanceDisplay=new OJ({container:f._performanceContainer}):f._performanceContainer.innerHTML=""}),this._showPrimitiveBoundingSphere=Hl(function(){return f._primitive.debugShowBoundingVolume=f.primitiveBoundingSphere,f._scene.requestRender(),!0}),this._primitiveBoundingSphereSubscription=gr.getObservable(this,"primitiveBoundingSphere").subscribe(function(){f._showPrimitiveBoundingSphere()}),this._showPrimitiveReferenceFrame=Hl(function(){if(f.primitiveReferenceFrame){let I=f._primitive.modelMatrix;f._modelMatrixPrimitive=new fDe({modelMatrix:I}),f._scene.primitives.add(f._modelMatrixPrimitive)}else O(f._modelMatrixPrimitive)&&(f._scene.primitives.remove(f._modelMatrixPrimitive),f._modelMatrixPrimitive=void 0);return f._scene.requestRender(),!0}),this._primitiveReferenceFrameSubscription=gr.getObservable(this,"primitiveReferenceFrame").subscribe(function(){f._showPrimitiveReferenceFrame()}),this._doFilterPrimitive=Hl(function(){return f.filterPrimitive?f._scene.debugCommandFilter=function(I){return O(f._modelMatrixPrimitive)&&I.owner===f._modelMatrixPrimitive._primitive?!0:O(f._primitive)?I.owner===f._primitive||I.owner===f._primitive._billboardCollection||I.owner.primitive===f._primitive:!1}:f._scene.debugCommandFilter=void 0,!0}),this._filterPrimitiveSubscription=gr.getObservable(this,"filterPrimitive").subscribe(function(){f._doFilterPrimitive(),f._scene.requestRender()}),this._wireframeSubscription=gr.getObservable(this,"wireframe").subscribe(function(I){y._surface.tileProvider._debug.wireframe=I,f._scene.requestRender()}),this._depthFrustumSubscription=gr.getObservable(this,"depthFrustum").subscribe(function(I){f._scene.debugShowDepthFrustum=I,f._scene.requestRender()}),this._incrementDepthFrustum=Hl(function(){let I=f.depthFrustum+1;return f.depthFrustum=wme(1,f._numberOfFrustums,I),f._scene.requestRender(),!0}),this._decrementDepthFrustum=Hl(function(){let I=f.depthFrustum-1;return f.depthFrustum=wme(1,f._numberOfFrustums,I),f._scene.requestRender(),!0}),this._suspendUpdatesSubscription=gr.getObservable(this,"suspendUpdates").subscribe(function(I){y._surface._debug.suspendLodUpdate=I,I||(f.filterTile=!1)});let x;this._showTileCoordinates=Hl(function(){return f.tileCoordinates&&!O(x)?x=o.imageryLayers.addImageryProvider(new IDe({tilingScheme:o.terrainProvider.tilingScheme})):!f.tileCoordinates&&O(x)&&(o.imageryLayers.remove(x),x=void 0),!0}),this._tileCoordinatesSubscription=gr.getObservable(this,"tileCoordinates").subscribe(function(){f._showTileCoordinates(),f._scene.requestRender()}),this._tileBoundingSphereSubscription=gr.getObservable(this,"tileBoundingSphere").subscribe(function(){f._showTileBoundingSphere(),f._scene.requestRender()}),this._showTileBoundingSphere=Hl(function(){return f.tileBoundingSphere?y._surface.tileProvider._debug.boundingSphereTile=f._tile:y._surface.tileProvider._debug.boundingSphereTile=void 0,f._scene.requestRender(),!0}),this._doFilterTile=Hl(function(){return f.filterTile?(f.suspendUpdates=!0,y._surface._tilesToRender=[],O(f._tile)&&f._tile.renderable&&y._surface._tilesToRender.push(f._tile)):f.suspendUpdates=!1,!0}),this._filterTileSubscription=gr.getObservable(this,"filterTile").subscribe(function(){f.doFilterTile(),f._scene.requestRender()});function v(I){let w=f._scene.pick({x:I.position.x,y:I.position.y});O(w)&&(f.primitive=O(w.collection)?w.collection:w.primitive),f._scene.requestRender(),f.pickPrimitiveActive=!1}this._pickPrimitive=Hl(function(){f.pickPrimitiveActive=!f.pickPrimitiveActive}),this._pickPrimitiveActiveSubscription=gr.getObservable(this,"pickPrimitiveActive").subscribe(function(I){I?C.setInputAction(v,Ki.LEFT_CLICK):C.removeInputAction(Ki.LEFT_CLICK)});function E(I){let w,Q=y.ellipsoid,M=f._scene.camera.getPickRay(I.position,I2i),B=y.pick(M,f._scene,_2i);if(O(B)){let T=Q.cartesianToCartographic(B),D=y._surface.tileProvider._tilesToRenderByTextureCount;for(let F=0;!w&&F<D.length;++F){let L=D[F];if(O(L))for(let R=0;!w&&R<L.length;++R){let k=L[R];Si.contains(k.rectangle,T)&&(w=k)}}}f.tile=w,f.pickTileActive=!1}this._pickTile=Hl(function(){f.pickTileActive=!f.pickTileActive}),this._pickTileActiveSubscription=gr.getObservable(this,"pickTileActive").subscribe(function(I){I?C.setInputAction(E,Ki.LEFT_CLICK):C.removeInputAction(Ki.LEFT_CLICK)}),this._removePostRenderEvent=o.postRender.addEventListener(function(){f._update()})}Object.defineProperties(fW.prototype,{scene:{get:function(){return this._scene}},performanceContainer:{get:function(){return this._performanceContainer}},toggleDropDown:{get:function(){return this._toggleDropDown}},showPrimitiveBoundingSphere:{get:function(){return this._showPrimitiveBoundingSphere}},showPrimitiveReferenceFrame:{get:function(){return this._showPrimitiveReferenceFrame}},doFilterPrimitive:{get:function(){return this._doFilterPrimitive}},incrementDepthFrustum:{get:function(){return this._incrementDepthFrustum}},decrementDepthFrustum:{get:function(){return this._decrementDepthFrustum}},showTileCoordinates:{get:function(){return this._showTileCoordinates}},showTileBoundingSphere:{get:function(){return this._showTileBoundingSphere}},doFilterTile:{get:function(){return this._doFilterTile}},toggleGeneral:{get:function(){return this._toggleGeneral}},togglePrimitives:{get:function(){return this._togglePrimitives}},toggleTerrain:{get:function(){return this._toggleTerrain}},pickPrimitive:{get:function(){return this._pickPrimitive}},pickTile:{get:function(){return this._pickTile}},selectParent:{get:function(){let o=this;return Hl(function(){o.tile=o.tile.parent})}},selectNW:{get:function(){let o=this;return Hl(function(){o.tile=o.tile.northwestChild})}},selectNE:{get:function(){let o=this;return Hl(function(){o.tile=o.tile.northeastChild})}},selectSW:{get:function(){let o=this;return Hl(function(){o.tile=o.tile.southwestChild})}},selectSE:{get:function(){let o=this;return Hl(function(){o.tile=o.tile.southeastChild})}},primitive:{get:function(){return this._primitive},set:function(o){let A=this._primitive;o!==A&&(this.hasPickedPrimitive=!0,O(A)&&(A.debugShowBoundingVolume=!1),this._scene.debugCommandFilter=void 0,O(this._modelMatrixPrimitive)&&(this._scene.primitives.remove(this._modelMatrixPrimitive),this._modelMatrixPrimitive=void 0),this._primitive=o,o.show=!1,setTimeout(function(){o.show=!0},50),this.showPrimitiveBoundingSphere(),this.showPrimitiveReferenceFrame(),this.doFilterPrimitive())}},tile:{get:function(){return this._tile},set:function(o){if(O(o)){this.hasPickedTile=!0;let A=this._tile;if(o!==A){this.tileText=`L: ${o.level} X: ${o.x} Y: ${o.y}`,this.tileText+=`<br>SW corner: ${o.rectangle.west}, ${o.rectangle.south}`,this.tileText+=`<br>NE corner: ${o.rectangle.east}, ${o.rectangle.north}`;let f=o.data;O(f)&&O(f.tileBoundingRegion)?this.tileText+=`<br>Min: ${f.tileBoundingRegion.minimumHeight} Max: ${f.tileBoundingRegion.maximumHeight}`:this.tileText+="<br>(Tile is not loaded)"}this._tile=o,this.showTileBoundingSphere(),this.doFilterTile()}else this.hasPickedTile=!1,this._tile=void 0}}});fW.prototype._update=function(){this.frustums&&(this.frustumStatisticText=E2i(this._scene.debugFrustumStatistics));let o=this._scene.numberOfFrustums;this._numberOfFrustums=o,this.depthFrustum=wme(1,o,this.depthFrustum),this.depthFrustumText=`${this.depthFrustum} of ${o}`,this.performance&&this._performanceDisplay.update(),this.primitiveReferenceFrame&&(this._modelMatrixPrimitive.modelMatrix=this._primitive.modelMatrix),this.shaderCacheText=`Cached shaders: ${this._scene.context.shaderCache.numberOfShaders}`};fW.prototype.isDestroyed=function(){return!1};fW.prototype.destroy=function(){return this._eventHandler.destroy(),this._removePostRenderEvent(),this._frustumsSubscription.dispose(),this._frustumPlanesSubscription.dispose(),this._performanceSubscription.dispose(),this._primitiveBoundingSphereSubscription.dispose(),this._primitiveReferenceFrameSubscription.dispose(),this._filterPrimitiveSubscription.dispose(),this._wireframeSubscription.dispose(),this._depthFrustumSubscription.dispose(),this._suspendUpdatesSubscription.dispose(),this._tileCoordinatesSubscription.dispose(),this._tileBoundingSphereSubscription.dispose(),this._filterTileSubscription.dispose(),this._pickPrimitiveActiveSubscription.dispose(),this._pickTileActiveSubscription.dispose(),Qr(this)};var bDe=fW;function Eae(o,A){o=iA(o);let f=document.createElement("div"),m=new bDe(A,f);this._viewModel=m,this._container=o;let C=document.createElement("div");this._element=C;let y=document.createElement("div");y.textContent="Cesium Inspector",y.className="cesium-cesiumInspector-button",y.setAttribute("data-bind","click: toggleDropDown"),C.appendChild(y),C.className="cesium-cesiumInspector",C.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : dropDownVisible, "cesium-cesiumInspector-hidden" : !dropDownVisible }'),o.appendChild(this._element);let x=document.createElement("div");this._panel=x,x.className="cesium-cesiumInspector-dropDown",C.appendChild(x);let v=z8.createSection,E=z8.createCheckbox,I=v(x,"General","generalVisible","toggleGeneral"),w=E("Show Frustums","frustums"),Q=document.createElement("div");Q.className="cesium-cesiumInspector-frustumStatistics",Q.setAttribute("data-bind","visible: frustums, html: frustumStatisticText"),w.appendChild(Q),I.appendChild(w),I.appendChild(E("Show Frustum Planes","frustumPlanes")),I.appendChild(E("Performance Display","performance")),f.className="cesium-cesiumInspector-performanceDisplay",I.appendChild(f);let M=document.createElement("div");M.className="cesium-cesiumInspector-shaderCache",M.setAttribute("data-bind","html: shaderCacheText"),I.appendChild(M);let B=document.createElement("div");I.appendChild(B);let T=document.createElement("span");T.setAttribute("data-bind",'html: "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Frustum:"'),B.appendChild(T);let D=document.createElement("span");D.setAttribute("data-bind","text: depthFrustumText"),B.appendChild(D);let F=document.createElement("input");F.type="button",F.value="-",F.className="cesium-cesiumInspector-pickButton",F.setAttribute("data-bind","click: decrementDepthFrustum"),B.appendChild(F);let L=document.createElement("input");L.type="button",L.value="+",L.className="cesium-cesiumInspector-pickButton",L.setAttribute("data-bind","click: incrementDepthFrustum"),B.appendChild(L);let R=v(x,"Primitives","primitivesVisible","togglePrimitives"),k=document.createElement("div");k.className="cesium-cesiumInspector-pickSection",R.appendChild(k);let U=document.createElement("input");U.type="button",U.value="Pick a primitive",U.className="cesium-cesiumInspector-pickButton",U.setAttribute("data-bind",'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickPrimitiveActive}, click: pickPrimitive');let V=document.createElement("div");V.className="cesium-cesiumInspector-center",V.appendChild(U),k.appendChild(V),k.appendChild(E("Show bounding sphere","primitiveBoundingSphere","hasPickedPrimitive")),k.appendChild(E("Show reference frame","primitiveReferenceFrame","hasPickedPrimitive")),this._primitiveOnly=E("Show only selected","filterPrimitive","hasPickedPrimitive"),k.appendChild(this._primitiveOnly);let H=v(x,"Terrain","terrainVisible","toggleTerrain"),q=document.createElement("div");q.className="cesium-cesiumInspector-pickSection",H.appendChild(q);let ie=document.createElement("input");ie.type="button",ie.value="Pick a tile",ie.className="cesium-cesiumInspector-pickButton",ie.setAttribute("data-bind",'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickTileActive}, click: pickTile'),V=document.createElement("div"),V.appendChild(ie),V.className="cesium-cesiumInspector-center",q.appendChild(V);let Z=document.createElement("div");q.appendChild(Z);let oe=document.createElement("input");oe.type="button",oe.value="Parent",oe.className="cesium-cesiumInspector-pickButton",oe.setAttribute("data-bind","click: selectParent");let ne=document.createElement("input");ne.type="button",ne.value="NW",ne.className="cesium-cesiumInspector-pickButton",ne.setAttribute("data-bind","click: selectNW");let se=document.createElement("input");se.type="button",se.value="NE",se.className="cesium-cesiumInspector-pickButton",se.setAttribute("data-bind","click: selectNE");let ce=document.createElement("input");ce.type="button",ce.value="SW",ce.className="cesium-cesiumInspector-pickButton",ce.setAttribute("data-bind","click: selectSW");let j=document.createElement("input");j.type="button",j.value="SE",j.className="cesium-cesiumInspector-pickButton",j.setAttribute("data-bind","click: selectSE");let de=document.createElement("div");de.className="cesium-cesiumInspector-tileText",Z.className="cesium-cesiumInspector-frustumStatistics",Z.appendChild(de),Z.setAttribute("data-bind","visible: hasPickedTile"),de.setAttribute("data-bind","html: tileText");let me=document.createElement("div");me.className="cesium-cesiumInspector-relativeText",me.textContent="Select relative:",Z.appendChild(me);let _e=document.createElement("table"),Be=document.createElement("tr"),Qe=document.createElement("tr"),Ie=document.createElement("td");Ie.appendChild(oe);let ve=document.createElement("td");ve.appendChild(ne);let K=document.createElement("td");K.appendChild(se),Be.appendChild(Ie),Be.appendChild(ve),Be.appendChild(K);let W=document.createElement("td"),te=document.createElement("td");te.appendChild(ce);let Y=document.createElement("td");Y.appendChild(j),Qe.appendChild(W),Qe.appendChild(te),Qe.appendChild(Y),_e.appendChild(Be),_e.appendChild(Qe),Z.appendChild(_e),q.appendChild(E("Show bounding volume","tileBoundingSphere","hasPickedTile")),q.appendChild(E("Show only selected","filterTile","hasPickedTile")),H.appendChild(E("Wireframe","wireframe")),H.appendChild(E("Suspend LOD update","suspendUpdates")),H.appendChild(E("Show tile coordinates","tileCoordinates")),gr.applyBindings(m,this._element)}Object.defineProperties(Eae.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Eae.prototype.isDestroyed=function(){return!1};Eae.prototype.destroy=function(){return gr.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),Qr(this)};var QDe=Eae,J8=new wi;function JU(o){return xs(`./Assets/Textures/SkyBox/skyBox_${o}.jpg`)}function B2i(o){o._renderLoopRunning=!0;let A=0;function f(m){o.isDestroyed()||(o._useDefaultRenderLoop?(o.resize(),o.render(),requestAnimationFrame(f)):o._renderLoopRunning=!1)}requestAnimationFrame(f)}function llt(o){let A=o._canvas,f=A.clientWidth,m=A.clientHeight,C=o._resolutionScale;o._supportsImageRenderingPixelated||(C*=Ae(window.devicePixelRatio,1)),o._canvasWidth=f,o._canvasHeight=m,f*=C,m*=C,A.width=f,A.height=m,o._canRender=f!==0&&m!==0}function ult(o){let A=o._canvas,f=A.width,m=A.height;if(f!==0&&m!==0){let C=o._scene.camera.frustum;O(C.aspectRatio)?C.aspectRatio=f/m:(C.top=C.right*(m/f),C.bottom=-C.top)}}function RQ(o,A){o=iA(o),A=Ae(A,{});let f=document.createElement("div");f.className="map-widget",o.appendChild(f);let m=document.createElement("canvas");m.setAttribute("id","mapRenderCanvas");let C=Mo.supportsImageRenderingPixelated();this._supportsImageRenderingPixelated=C,C&&(m.style.imageRendering=Mo.imageRenderingValue()),m.oncontextmenu=function(){return!1},m.onselectstart=function(){return!1},f.appendChild(m);let y=document.createElement("div");y.className="map-widget-message-pannel";let x=O(A.creditContainer)?iA(A.creditContainer):f;x.appendChild(y);let v=O(A.creditViewport)?iA(A.creditViewport):f,E=Ae(A.showRenderLoopErrors,!0);this._element=f,this._container=o,this._canvas=m,this._canvasWidth=0,this._canvasHeight=0,this._creditViewport=v,this._creditContainer=x,this._innerCreditContainer=y,this._canRender=!1,this._renderLoopRunning=!1,this._showRenderLoopErrors=E,this._resolutionScale=1,this._forceResize=!1,this._clock=O(A.clock)?A.clock:new z5,this._trackedEntityChanged=new br,llt(this);let I=new Loe({canvas:m,contextOptions:A.contextOptions,creditContainer:y,creditViewport:v,mapProjection:A.mapProjection,orderIndependentTranslucency:A.orderIndependentTranslucency,scene3DOnly:Ae(A.scene3DOnly,!1),terrainExaggeration:A.terrainExaggeration,shadows:A.shadows,mapMode2D:A.mapMode2D,requestRenderMode:A.requestRenderMode,maximumRenderTimeChange:A.maximumRenderTimeChange});this._scene=I,I.camera.constrainedAxis=ee.UNIT_Z,ult(this);let w=null;A.ellipsoidCoordinates==="CGCS2000"?w=Ae(I.mapProjection.ellipsoid,Ti.CGCS2000):w=Ae(I.mapProjection.ellipsoid,Ti.WGS84);let Q=A.globe;O(Q)||(Q=new Coe(w)),Q!==!1&&(I.globe=Q,I.globe.shadows=Ae(A.terrainShadows,Al.RECEIVE_ONLY));let M=A.skyBox;O(M)||(M=new CN({sources:{positiveX:JU("px"),negativeX:JU("mx"),positiveY:JU("py"),negativeY:JU("my"),positiveZ:JU("pz"),negativeZ:JU("mz")}})),M!==!1&&(I.skyBox=M,I.sun=new Noe,I.moon=new xoe);let B=A.skyAtmosphere;O(B)||(B=new aH(w)),B!==!1&&(I.skyAtmosphere=B);let T=A.globe===!1?!1:A.imageryProvider;if(O(T)||(T=Xk()),T!==!1)for(let F=0;F<T.length;F++)I.imageryLayers.addImageryProvider(T[F]);O(A.terrainProvider)&&A.globe!==!1&&(I.terrainProvider=A.terrainProvider),this._screenSpaceEventHandler=new Ur(m,!1),O(A.sceneMode)&&(A.sceneMode===xi.SCENE2D&&this._scene.morphTo2D(0),A.sceneMode===xi.COLUMBUS_VIEW&&this._scene.morphToColumbusView(0)),this._useDefaultRenderLoop=void 0,this.useDefaultRenderLoop=Ae(A.useDefaultRenderLoop,!0),this._targetFrameRate=void 0,this.targetFrameRate=A.targetFrameRate;let D=this;I.renderError.addEventListener(function(F,L){if(D._useDefaultRenderLoop=!1,D._renderLoopRunning=!1,D._showRenderLoopErrors){let R="An error occurred while rendering.  Rendering has stopped.";D.showErrorPanel(R,void 0,L)}})}Object.defineProperties(RQ.prototype,{container:{get:function(){return this._container}},canvas:{get:function(){return this._canvas}},creditContainer:{get:function(){return this._creditContainer}},creditViewport:{get:function(){return this._creditViewport}},scene:{get:function(){return this._scene}},imageryLayers:{get:function(){return this._scene.imageryLayers}},terrainProvider:{get:function(){return this._scene.terrainProvider},set:function(o){this._scene.terrainProvider=o}},camera:{get:function(){return this._scene.camera}},clock:{get:function(){return this._clock}},screenSpaceEventHandler:{get:function(){return this._screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._targetFrameRate},set:function(o){this._targetFrameRate=o}},useDefaultRenderLoop:{get:function(){return this._useDefaultRenderLoop},set:function(o){this._useDefaultRenderLoop!==o&&(this._useDefaultRenderLoop=o,o&&!this._renderLoopRunning&&B2i(this))}},resolutionScale:{get:function(){return this._resolutionScale},set:function(o){this._resolutionScale=o,this._forceResize=!0}},trackedEntityChanged:{get:function(){return this._trackedEntityChanged}},trackedEntity:{get:function(){return this._trackedEntity},set:function(o){if(this._trackedEntity!==o){this._trackedEntity=o,SDe(this);let A=this.scene,f=A.mode;!O(o)||!O(o.position)?(this._needTrackedEntityUpdate=!1,(f===xi.COLUMBUS_VIEW||f===xi.SCENE2D)&&(A.screenSpaceCameraController.enableTranslate=!0),(f===xi.COLUMBUS_VIEW||f===xi.SCENE3D)&&(A.screenSpaceCameraController.enableTilt=!0),this._entityView=void 0,this.camera.lookAtTransform(Xe.IDENTITY)):this._needTrackedEntityUpdate=!0,this._trackedEntityChanged.raiseEvent(o),this.scene.requestRender()}}}});RQ.prototype.showErrorPanel=function(o,A,f){let m=this._element,C=document.createElement("div");C.className="map-widget-errorPanel";let y=document.createElement("div");y.className="map-widget-errorPanel-content",C.appendChild(y);let x=document.createElement("div");x.className="map-widget-errorPanel-header",x.appendChild(document.createTextNode(o)),y.appendChild(x);let v=document.createElement("div");v.className="map-widget-errorPanel-scroll",y.appendChild(v);function E(){v.style.maxHeight=`${Math.max(Math.round(m.clientHeight*.9-100),30)}px`}if(E(),O(window.addEventListener)&&window.addEventListener("resize",E,!1),O(A)){let B=document.createElement("div");B.className="map-widget-errorPanel-message",B.innerHTML=`<p>${A}</p>`,v.appendChild(B)}let I="(no error details available)";O(f)&&(I=D5(f));let w=document.createElement("div");w.className="map-widget-errorPanel-message",w.appendChild(document.createTextNode(I)),v.appendChild(w);let Q=document.createElement("div");Q.className="map-widget-errorPanel-buttonPanel",y.appendChild(Q);let M=document.createElement("button");M.setAttribute("type","button"),M.className="map-button",M.appendChild(document.createTextNode("OK")),M.onclick=function(){O(E)&&O(window.removeEventListener)&&window.removeEventListener("resize",E,!1),m.removeChild(C)},Q.appendChild(M),m.appendChild(C),typeof console<"u"&&console.error(`${o}
`;function C2i(o){return function(A){let f=o._scene.pick(A.position);O(f)&&f.primitive instanceof Fx&&(o.tileset=f.primitive),o.pickActive=!1}}function alt(o,A){A?o._eventHandler.setInputAction(function(f){let m=o._scene.pick(f.endPosition);O(m)&&m.primitive instanceof Fx&&(o.tileset=m.primitive)},Ki.MOUSE_MOVE):(o._eventHandler.removeInputAction(Ki.MOUSE_MOVE),o.picking=o.picking)}var y2i={maximumFractionDigits:3};function F7(o){let A=o/1048576;return A<1?A.toLocaleString(void 0,y2i):Math.round(A).toLocaleString()}function qK(o,A){if(!O(o))return"";let f=A?o._statisticsPerPass[Ep.PICK]:o._statisticsPerPass[Ep.RENDER],m='<ul class="cesium-cesiumInspector-statistics">';return m+=`<li><strong>\u8BBF\u95EE: </strong>${f.visited.toLocaleString()}</li><li><strong>\u9009\u62E9: </strong>${f.selected.toLocaleString()}</li><li><strong>\u7ED8\u5236\u547D\u4EE4: </strong>${f.numberOfCommands.toLocaleString()}</li>`,m+="</ul>",A||(m+='<ul class="cesium-cesiumInspector-statistics">',m+=`<li><strong>\u8BF7\u6C42: </strong>${f.numberOfPendingRequests.toLocaleString()}</li><li><strong>\u5C1D\u8BD5: </strong>${f.numberOfAttemptedRequests.toLocaleString()}</li><li><strong>\u5904\u7406\u4E2D: </strong>${f.numberOfTilesProcessing.toLocaleString()}</li><li><strong>\u5185\u5BB9\u5C31\u7EEA: </strong>${f.numberOfTilesWithContentReady.toLocaleString()}</li><li><strong>\u603B\u5171: </strong>${f.numberOfTilesTotal.toLocaleString()}</li>`,m+="</ul>",m+='<ul class="cesium-cesiumInspector-statistics">',m+=`<li><strong>\u7279\u5F81\u9009\u62E9: </strong>${f.numberOfFeaturesSelected.toLocaleString()}</li><li><strong>\u7279\u5F81\u52A0\u8F7D: </strong>${f.numberOfFeaturesLoaded.toLocaleString()}</li><li><strong>\u70B9\u4E91\u9009\u62E9: </strong>${f.numberOfPointsSelected.toLocaleString()}</li><li><strong>\u70B9\u4E91\u52A0\u8F7D: </strong>${f.numberOfPointsLoaded.toLocaleString()}</li><li><strong>\u4E09\u89D2\u5F62\u6570: </strong>${f.numberOfTrianglesSelected.toLocaleString()}</li>`,m+="</ul>",m+='<ul class="cesium-cesiumInspector-statistics">',m+=`<li><strong>\u6837\u5F0F\u6E32\u67D3\u74E6\u7247\u6570: </strong>${f.numberOfTilesStyled.toLocaleString()}</li><li><strong>\u6837\u5F0F\u6E32\u67D3\u7279\u5F81\u6570: </strong>${f.numberOfFeaturesStyled.toLocaleString()}</li>`,m+="</ul>",m+='<ul class="cesium-cesiumInspector-statistics">',m+=`<li><strong>\u5B50\u8282\u70B9\u5254\u9664\u6570: </strong>${f.numberOfTilesCulledWithChildrenUnion.toLocaleString()}</li>`,m+="</ul>",m+='<ul class="cesium-cesiumInspector-statistics">',m+=`<li><strong>\u51E0\u4F55\u5360\u5185\u5B58 (MB): </strong>${F7(f.geometryByteLength)}</li><li><strong>\u7EB9\u7406\u5360\u5185\u5B58 (MB): </strong>${F7(f.texturesByteLength)}</li><li><strong>\u5C5E\u6027\u5360\u5185\u5B58 (MB): </strong>${F7(f.batchTableByteLength)}</li>`,m+="</ul>"),m}function slt(){let o=sf.statistics;return`
  <ul class="cesium-cesiumInspector-statistics">
    <li><strong>\u51E0\u4F55\u5360\u5185\u5B58 (MB): </strong>${F7(o.geometryByteLength)}</li>
    <li><strong>\u7EB9\u7406\u5360\u5185\u5B58 (MB): </strong>${F7(o.texturesByteLength)}</li>
  </ul>
  `}var x2i=[{text:"\u9AD8\u4EAE",value:bD.HIGHLIGHT},{text:"\u66FF\u6362",value:bD.REPLACE},{text:"\u6DF7\u5408",value:bD.MIX}],f7e=new At(1,1,0,.4),v2i=new At,O$=new At;function EC(o,A){let f=this,m=o.canvas;this._eventHandler=new Ur(m),this._scene=o,this._performanceContainer=A,this._canvas=m,this._performanceDisplay=new OJ({container:A}),this._statisticsText="",this._pickStatisticsText="",this._resourceCacheStatisticsText="",this._editorError="",this.performance=!1,this.showStatistics=!0,this.showPickStatistics=!0,this.showResourceCacheStatistics=!1,this.inspectorVisible=!0,this.tilesetVisible=!1,this.displayVisible=!1,this.updateVisible=!1,this.loggingVisible=!1,this.styleVisible=!1,this.tileDebugLabelsVisible=!1,this.optimizationVisible=!1,this.styleString="{}",this.hasEnabledWireframe=!1,this._tileset=void 0,this._feature=void 0,this._tile=void 0,gr.track(this,["performance","inspectorVisible","_statisticsText","_pickStatisticsText","_resourceCacheStatisticsText","_editorError","showPickStatistics","showStatistics","showResourceCacheStatistics","tilesetVisible","displayVisible","updateVisible","loggingVisible","styleVisible","optimizationVisible","tileDebugLabelsVisible","styleString","_feature","_tile","_tileset","hasEnabledWireframe"]),this._properties=gr.observable({}),this.properties=[],gr.defineProperty(this,"properties",function(){let Ie=[],ve=f._properties();for(let K in ve)ve.hasOwnProperty(K)&&Ie.push(K);return Ie});let C=gr.observable();gr.defineProperty(this,"dynamicScreenSpaceError",{get:function(){return C()},set:function(Ie){C(Ie),O(f._tileset)&&(f._tileset.dynamicScreenSpaceError=Ie)}}),this.dynamicScreenSpaceError=!1;let y=gr.observable();gr.defineProperty(this,"colorBlendMode",{get:function(){return y()},set:function(Ie){y(Ie),O(f._tileset)&&(f._tileset.colorBlendMode=Ie,f._scene.requestRender())}}),this.colorBlendMode=bD.HIGHLIGHT;let x=gr.observable(),v=gr.observable();gr.defineProperty(this,"picking",{get:function(){return v()},set:function(Ie){v(Ie),Ie?f._eventHandler.setInputAction(function(ve){let K=o.pick(ve.endPosition);if(K instanceof Ds?(f.feature=K,f.tile=K.content.tile):O(K)&&O(K.content)?(f.feature=void 0,f.tile=K.content.tile):(f.feature=void 0,f.tile=void 0),!!O(f._tileset)){if(x&&O(K)&&O(K.content)){let W;o.pickPositionSupported&&(W=o.pickPosition(ve.endPosition),O(W)&&(f._tileset.debugPickPosition=W)),f._tileset.debugPickedTile=K.content.tile}else f._tileset.debugPickedTile=void 0;f._scene.requestRender()}},Ki.MOUSE_MOVE):(f.feature=void 0,f.tile=void 0,f._eventHandler.removeInputAction(Ki.MOUSE_MOVE))}}),this.picking=!0;let E=gr.observable();gr.defineProperty(this,"colorize",{get:function(){return E()},set:function(Ie){E(Ie),O(f._tileset)&&(f._tileset.debugColorizeTiles=Ie,f._scene.requestRender())}}),this.colorize=!1;let I=gr.observable();gr.defineProperty(this,"wireframe",{get:function(){return I()},set:function(Ie){I(Ie),O(f._tileset)&&(f._tileset.debugWireframe=Ie,f._scene.requestRender())}}),this.wireframe=!1;let w=gr.observable();gr.defineProperty(this,"showBoundingVolumes",{get:function(){return w()},set:function(Ie){w(Ie),O(f._tileset)&&(f._tileset.debugShowBoundingVolume=Ie,f._scene.requestRender())}}),this.showBoundingVolumes=!1;let Q=gr.observable();gr.defineProperty(this,"showContentBoundingVolumes",{get:function(){return Q()},set:function(Ie){Q(Ie),O(f._tileset)&&(f._tileset.debugShowContentBoundingVolume=Ie,f._scene.requestRender())}}),this.showContentBoundingVolumes=!1;let M=gr.observable();gr.defineProperty(this,"showRequestVolumes",{get:function(){return M()},set:function(Ie){M(Ie),O(f._tileset)&&(f._tileset.debugShowViewerRequestVolume=Ie,f._scene.requestRender())}}),this.showRequestVolumes=!1;let B=gr.observable();gr.defineProperty(this,"freezeFrame",{get:function(){return B()},set:function(Ie){B(Ie),O(f._tileset)&&(f._tileset.debugFreezeFrame=Ie,f._scene.debugShowFrustumPlanes=Ie,f._scene.requestRender())}}),this.freezeFrame=!1,gr.defineProperty(this,"showOnlyPickedTileDebugLabel",{get:function(){return x()},set:function(Ie){x(Ie),O(f._tileset)&&(f._tileset.debugPickedTileLabelOnly=Ie,f._scene.requestRender())}}),this.showOnlyPickedTileDebugLabel=!1;let T=gr.observable();gr.defineProperty(this,"showGeometricError",{get:function(){return T()},set:function(Ie){T(Ie),O(f._tileset)&&(f._tileset.debugShowGeometricError=Ie,f._scene.requestRender())}}),this.showGeometricError=!1;let D=gr.observable();gr.defineProperty(this,"showRenderingStatistics",{get:function(){return D()},set:function(Ie){D(Ie),O(f._tileset)&&(f._tileset.debugShowRenderingStatistics=Ie,f._scene.requestRender())}}),this.showRenderingStatistics=!1;let F=gr.observable();gr.defineProperty(this,"showMemoryUsage",{get:function(){return F()},set:function(Ie){F(Ie),O(f._tileset)&&(f._tileset.debugShowMemoryUsage=Ie,f._scene.requestRender())}}),this.showMemoryUsage=!1;let L=gr.observable();gr.defineProperty(this,"showUrl",{get:function(){return L()},set:function(Ie){L(Ie),O(f._tileset)&&(f._tileset.debugShowUrl=Ie,f._scene.requestRender())}}),this.showUrl=!1;let R=gr.observable();gr.defineProperty(this,"maximumScreenSpaceError",{get:function(){return R()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(R(Ie),O(f._tileset)&&(f._tileset.maximumScreenSpaceError=Ie))}}),this.maximumScreenSpaceError=16;let k=gr.observable();gr.defineProperty(this,"dynamicScreenSpaceErrorDensity",{get:function(){return k()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(k(Ie),O(f._tileset)&&(f._tileset.dynamicScreenSpaceErrorDensity=Ie))}}),this.dynamicScreenSpaceErrorDensity=.00278,this.dynamicScreenSpaceErrorDensitySliderValue=void 0,gr.defineProperty(this,"dynamicScreenSpaceErrorDensitySliderValue",{get:function(){return Math.pow(k(),1/6)},set:function(Ie){k(Math.pow(Ie,6))}});let U=gr.observable();gr.defineProperty(this,"dynamicScreenSpaceErrorFactor",{get:function(){return U()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(U(Ie),O(f._tileset)&&(f._tileset.dynamicScreenSpaceErrorFactor=Ie))}}),this.dynamicScreenSpaceErrorFactor=4;let V=C2i(this),H=gr.observable();gr.defineProperty(this,"pickActive",{get:function(){return H()},set:function(Ie){H(Ie),Ie?f._eventHandler.setInputAction(V,Ki.LEFT_CLICK):f._eventHandler.removeInputAction(Ki.LEFT_CLICK)}});let q=gr.observable();gr.defineProperty(this,"pointCloudShading",{get:function(){return q()},set:function(Ie){q(Ie),O(f._tileset)&&(f._tileset.pointCloudShading.attenuation=Ie)}}),this.pointCloudShading=!1;let ie=gr.observable();gr.defineProperty(this,"geometricErrorScale",{get:function(){return ie()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(ie(Ie),O(f._tileset)&&(f._tileset.pointCloudShading.geometricErrorScale=Ie))}}),this.geometricErrorScale=1;let Z=gr.observable();gr.defineProperty(this,"maximumAttenuation",{get:function(){return Z()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(Z(Ie),O(f._tileset)&&(f._tileset.pointCloudShading.maximumAttenuation=Ie===0?void 0:Ie))}}),this.maximumAttenuation=0;let oe=gr.observable();gr.defineProperty(this,"baseResolution",{get:function(){return oe()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(oe(Ie),O(f._tileset)&&(f._tileset.pointCloudShading.baseResolution=Ie===0?void 0:Ie))}}),this.baseResolution=0;let ne=gr.observable();gr.defineProperty(this,"eyeDomeLighting",{get:function(){return ne()},set:function(Ie){ne(Ie),O(f._tileset)&&(f._tileset.pointCloudShading.eyeDomeLighting=Ie)}}),this.eyeDomeLighting=!1;let se=gr.observable();gr.defineProperty(this,"eyeDomeLightingStrength",{get:function(){return se()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(se(Ie),O(f._tileset)&&(f._tileset.pointCloudShading.eyeDomeLightingStrength=Ie))}}),this.eyeDomeLightingStrength=1;let ce=gr.observable();gr.defineProperty(this,"eyeDomeLightingRadius",{get:function(){return ce()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(ce(Ie),O(f._tileset)&&(f._tileset.pointCloudShading.eyeDomeLightingRadius=Ie))}}),this.eyeDomeLightingRadius=1,this.pickActive=!1;let j=gr.observable();gr.defineProperty(this,"skipLevelOfDetail",{get:function(){return j()},set:function(Ie){j(Ie),O(f._tileset)&&(f._tileset.skipLevelOfDetail=Ie)}}),this.skipLevelOfDetail=!0;let de=gr.observable();gr.defineProperty(this,"skipScreenSpaceErrorFactor",{get:function(){return de()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(de(Ie),O(f._tileset)&&(f._tileset.skipScreenSpaceErrorFactor=Ie))}}),this.skipScreenSpaceErrorFactor=16;let me=gr.observable();gr.defineProperty(this,"baseScreenSpaceError",{get:function(){return me()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(me(Ie),O(f._tileset)&&(f._tileset.baseScreenSpaceError=Ie))}}),this.baseScreenSpaceError=1024;let _e=gr.observable();gr.defineProperty(this,"skipLevels",{get:function(){return _e()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(_e(Ie),O(f._tileset)&&(f._tileset.skipLevels=Ie))}}),this.skipLevels=1;let Be=gr.observable();gr.defineProperty(this,"immediatelyLoadDesiredLevelOfDetail",{get:function(){return Be()},set:function(Ie){Be(Ie),O(f._tileset)&&(f._tileset.immediatelyLoadDesiredLevelOfDetail=Ie)}}),this.immediatelyLoadDesiredLevelOfDetail=!1;let Qe=gr.observable();gr.defineProperty(this,"loadSiblings",{get:function(){return Qe()},set:function(Ie){Qe(Ie),O(f._tileset)&&(f._tileset.loadSiblings=Ie)}}),this.loadSiblings=!1,this._style=void 0,this._shouldStyle=!1,this._definedProperties=["properties","dynamicScreenSpaceError","colorBlendMode","picking","colorize","wireframe","showBoundingVolumes","showContentBoundingVolumes","showRequestVolumes","freezeFrame","maximumScreenSpaceError","dynamicScreenSpaceErrorDensity","baseScreenSpaceError","skipScreenSpaceErrorFactor","skipLevelOfDetail","skipLevels","immediatelyLoadDesiredLevelOfDetail","loadSiblings","dynamicScreenSpaceErrorDensitySliderValue","dynamicScreenSpaceErrorFactor","pickActive","showOnlyPickedTileDebugLabel","showGeometricError","showRenderingStatistics","showMemoryUsage","showUrl","pointCloudShading","geometricErrorScale","maximumAttenuation","baseResolution","eyeDomeLighting","eyeDomeLightingStrength","eyeDomeLightingRadius"],this._removePostRenderEvent=o.postRender.addEventListener(function(){f._update()}),O(this._tileset)||alt(this,!0)}Object.defineProperties(EC.prototype,{scene:{get:function(){return this._scene}},performanceContainer:{get:function(){return this._performanceContainer}},statisticsText:{get:function(){return this._statisticsText}},pickStatisticsText:{get:function(){return this._pickStatisticsText}},resourceCacheStatisticsText:{get:function(){return this._resourceCacheStatisticsText}},colorBlendModes:{get:function(){return x2i}},editorError:{get:function(){return this._editorError}},tileset:{get:function(){return this._tileset},set:function(o){if(this._tileset=o,this._style=void 0,this.styleString="{}",this.feature=void 0,this.tile=void 0,O(o)){let A=this;o.readyPromise.then(function(y){A.isDestroyed()||A._properties(y.properties)});let f=["colorize","wireframe","showBoundingVolumes","showContentBoundingVolumes","showRequestVolumes","freezeFrame","showOnlyPickedTileDebugLabel","showGeometricError","showRenderingStatistics","showMemoryUsage","showUrl"],m=f.length;for(let y=0;y<m;++y){let x=f[y];this[x]=this[x]}this.maximumScreenSpaceError=o.maximumScreenSpaceError,this.dynamicScreenSpaceError=o.dynamicScreenSpaceError,this.dynamicScreenSpaceErrorDensity=o.dynamicScreenSpaceErrorDensity,this.dynamicScreenSpaceErrorFactor=o.dynamicScreenSpaceErrorFactor,this.colorBlendMode=o.colorBlendMode,this.skipLevelOfDetail=o.skipLevelOfDetail,this.skipScreenSpaceErrorFactor=o.skipScreenSpaceErrorFactor,this.baseScreenSpaceError=o.baseScreenSpaceError,this.skipLevels=o.skipLevels,this.immediatelyLoadDesiredLevelOfDetail=o.immediatelyLoadDesiredLevelOfDetail,this.loadSiblings=o.loadSiblings,this.hasEnabledWireframe=o._enableDebugWireframe;let C=o.pointCloudShading;this.pointCloudShading=C.attenuation,this.geometricErrorScale=C.geometricErrorScale,this.maximumAttenuation=C.maximumAttenuation?C.maximumAttenuation:0,this.baseResolution=C.baseResolution?C.baseResolution:0,this.eyeDomeLighting=C.eyeDomeLighting,this.eyeDomeLightingStrength=C.eyeDomeLightingStrength,this.eyeDomeLightingRadius=C.eyeDomeLightingRadius,this._scene.requestRender()}else this._properties({});this._statisticsText=qK(o,!1),this._pickStatisticsText=qK(o,!0),this._resourceCacheStatisticsText=slt(),alt(this,!1)}},feature:{get:function(){return this._feature},set:function(o){if(this._feature===o)return;let A=this._feature;O(A)&&!A.content.isDestroyed()&&(!this.colorize&&O(this._style)?A.color=O(this._style.color)?this._style.color.evaluateColor(A,v2i):At.WHITE:A.color=O$,this._scene.requestRender()),O(o)&&(At.clone(o.color,O$),o.color=f7e,this._scene.requestRender()),this._feature=o}},tile:{get:function(){return this._tile},set:function(o){if(this._tile===o)return;let A=this._tile;O(A)&&!A.isDestroyed()&&!Bme(A.content)&&(A.color=O$,this._scene.requestRender()),O(o)&&!Bme(o.content)&&(At.clone(o.color,O$),o.color=f7e,this._scene.requestRender()),this._tile=o}}});function Bme(o){if(!O(o))return!1;if(o.featuresLength>0)return!0;let A=o.innerContents;if(O(A)){let f=A.length;for(let m=0;m<f;++m)if(!Bme(A[m]))return!1;return!0}return!1}EC.prototype.togglePickTileset=function(){this.pickActive=!this.pickActive};EC.prototype.toggleInspector=function(){this.inspectorVisible=!this.inspectorVisible};EC.prototype.toggleTileset=function(){this.tilesetVisible=!this.tilesetVisible};EC.prototype.toggleDisplay=function(){this.displayVisible=!this.displayVisible};EC.prototype.toggleUpdate=function(){this.updateVisible=!this.updateVisible};EC.prototype.toggleLogging=function(){this.loggingVisible=!this.loggingVisible};EC.prototype.toggleStyle=function(){this.styleVisible=!this.styleVisible};EC.prototype.toggleTileDebugLabels=function(){this.tileDebugLabelsVisible=!this.tileDebugLabelsVisible};EC.prototype.toggleOptimization=function(){this.optimizationVisible=!this.optimizationVisible};EC.prototype.trimTilesCache=function(){O(this._tileset)&&this._tileset.trimLoadedTiles()};EC.prototype.compileStyle=function(){let o=this._tileset;if(!(!O(o)||this.styleString===JSON.stringify(o.style))){this._editorError="";try{this.styleString.length===0&&(this.styleString="{}"),this._style=new gY(JSON.parse(this.styleString)),this._shouldStyle=!0,this._scene.requestRender()}catch(A){this._editorError=A.toString()}this.feature=this._feature,this.tile=this._tile}};EC.prototype.styleEditorKeyPress=function(o,A){if(A.keyCode===9){A.preventDefault();let f=A.target,m=f.selectionStart,C=f.selectionEnd,y=C,x=f.value.slice(m,C).split(`
`),v=x.length,E;if(A.shiftKey)for(E=0;E<v;++E)x[E][0]===" "&&(x[E][1]===" "?(x[E]=x[E].substr(2),y-=2):(x[E]=x[E].substr(1),y-=1));else for(E=0;E<v;++E)x[E]=`  ${x[E]}`,y+=2;let I=x.join(`
`);f.value=f.value.slice(0,m)+I+f.value.slice(C),f.selectionStart=m!==C?m:y,f.selectionEnd=y}else A.ctrlKey&&(A.keyCode===10||A.keyCode===13)&&this.compileStyle();return!0};EC.prototype._update=function(){let o=this._tileset;if(this.performance&&this._performanceDisplay.update(),O(o)){if(o.isDestroyed()){this.tile=void 0,this.feature=void 0,this.tileset=void 0;return}let A=o.style;this._style!==o.style&&(this._shouldStyle?(o.style=this._style,this._shouldStyle=!1):(this._style=A,this.styleString=JSON.stringify(A.style,null,"  ")))}this.showStatistics&&(this._statisticsText=qK(o,!1),this._pickStatisticsText=qK(o,!0),this._resourceCacheStatisticsText=slt())};EC.prototype.isDestroyed=function(){return!1};EC.prototype.destroy=function(){this._eventHandler.destroy(),this._removePostRenderEvent();let o=this;return this._definedProperties.forEach(function(A){gr.getObservable(o,A).dispose()}),Qr(this)};EC.getStatistics=qK;var BDe=EC;function vae(o,A){o=iA(o);let f=document.createElement("div"),m=document.createElement("div");m.setAttribute("data-bind","visible: performance");let C=new BDe(A,m);this._viewModel=C,this._container=o,this._element=f;let y=document.createElement("div");y.textContent="3D Tiles \u68C0\u67E5\u5DE5\u5177",y.className="cesium-cesiumInspector-button",y.setAttribute("data-bind","click: toggleInspector"),f.appendChild(y),f.className="cesium-cesiumInspector cesium-3DTilesInspector",f.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : inspectorVisible, "cesium-cesiumInspector-hidden" : !inspectorVisible}'),o.appendChild(f);let x=document.createElement("div");this._panel=x,x.className="cesium-cesiumInspector-dropDown",f.appendChild(x);let v=z8.createSection,E=z8.createCheckbox,I=v(x,"\u74E6\u7247","tilesetVisible","toggleTileset"),w=v(x,"\u663E\u793A","displayVisible","toggleDisplay"),Q=v(x,"\u66F4\u65B0","updateVisible","toggleUpdate"),M=v(x,"\u8BB0\u5F55","loggingVisible","toggleLogging"),B=v(x,"\u74E6\u7247\u8C03\u8BD5\u6807\u7B7E","tileDebugLabelsVisible","toggleTileDebugLabels"),T=v(x,"\u6837\u5F0F","styleVisible","toggleStyle"),D=v(x,"\u4F18\u5316","optimizationVisible","toggleOptimization"),F=document.createElement("div");F.className="field-group";let L=document.createElement("label");L.className="field-label",L.appendChild(document.createTextNode("\u5C5E\u6027: "));let R=document.createElement("div");R.setAttribute("data-bind","text: properties"),F.appendChild(L),F.appendChild(R),I.appendChild(F),I.appendChild(o0e("togglePickTileset","\u62FE\u53D6\u74E6\u7247","pickActive")),I.appendChild(o0e("trimTilesCache","\u6E05\u7406\u74E6\u7247\u7F13\u5B58")),I.appendChild(E("\u53EF\u62FE\u53D6","picking")),w.appendChild(E("\u7740\u8272","colorize")),w.appendChild(E("\u7EBF\u6846","wireframe","_tileset === undefined || hasEnabledWireframe"));let k=document.createElement("p");k.setAttribute("data-bind","visible: _tileset !== undefined && !hasEnabledWireframe"),k.setAttribute("class","cesium-3DTilesInspector-disabledElementsInfo"),k.innerText="Set enableDebugWireframe to true in the tileset constructor to enable this option.",w.lastChild.appendChild(k),w.appendChild(E("\u5305\u56F4\u76D2","showBoundingVolumes")),w.appendChild(E("\u5185\u90E8\u5305\u56F4\u76D2","showContentBoundingVolumes")),w.appendChild(E("\u8BF7\u6C42\u5305\u56F4\u76D2","showRequestVolumes")),w.appendChild(E("\u70B9\u4E91\u7740\u8272","pointCloudShading"));let U=document.createElement("div");U.setAttribute("data-bind","visible: pointCloudShading"),U.appendChild(Tb("geometricErrorScale",0,2,.01,"\u51E0\u4F55\u8BEF\u5DEE\u5C3A\u5EA6")),U.appendChild(Tb("maximumAttenuation",0,32,1,"\u6700\u5927\u8870\u51CF")),U.appendChild(Tb("baseResolution",0,1,.01,"\u57FA\u672C\u5206\u8FA8\u7387")),U.appendChild(E("\u9E70\u773C\u7A79\u9876\u5149\u7167 (EDL)","eyeDomeLighting")),w.appendChild(U);let V=document.createElement("div");V.setAttribute("data-bind","visible: eyeDomeLighting"),V.appendChild(Tb("eyeDomeLightingStrength",0,2,.1,"EDL \u5F3A\u5EA6")),V.appendChild(Tb("eyeDomeLightingRadius",0,4,.1,"EDL \u534A\u5F84")),U.appendChild(V),Q.appendChild(E("\u51BB\u7ED3\u5E27","freezeFrame")),Q.appendChild(E("\u52A8\u6001\u5C4F\u5E55\u7A7A\u95F4\u8BEF\u5DEE","dynamicScreenSpaceError"));let H=document.createElement("div");H.appendChild(Tb("maximumScreenSpaceError",0,128,1,"\u6700\u5927\u5C4F\u5E55\u7A7A\u95F4\u8BEF\u5DEE")),Q.appendChild(H);let q=document.createElement("div");q.setAttribute("data-bind","visible: dynamicScreenSpaceError"),q.appendChild(Tb("dynamicScreenSpaceErrorDensitySliderValue",0,1,.005,"\u5C4F\u5E55\u7A7A\u95F4\u8BEF\u5DEE\u5BC6\u5EA6","dynamicScreenSpaceErrorDensity")),q.appendChild(Tb("dynamicScreenSpaceErrorFactor",1,10,.1,"\u5C4F\u5E55\u7A7A\u95F4\u8BEF\u5DEE\u56E0\u5B50")),Q.appendChild(q),M.appendChild(E("\u5E27\u7387","performance")),M.appendChild(m),M.appendChild(E("\u7EDF\u8BA1\u4FE1\u606F","showStatistics"));let ie=document.createElement("div");ie.className="cesium-3dTilesInspector-statistics",ie.setAttribute("data-bind","html: statisticsText, visible: showStatistics"),M.appendChild(ie),M.appendChild(E("\u62FE\u53D6\u7EDF\u8BA1","showPickStatistics"));let Z=document.createElement("div");Z.className="cesium-3dTilesInspector-statistics",Z.setAttribute("data-bind","html: pickStatisticsText, visible: showPickStatistics"),M.appendChild(Z),M.appendChild(E("\u8D44\u6E90\u7F13\u5B58\u7EDF\u8BA1","showResourceCacheStatistics"));let oe=document.createElement("div");oe.className="cesium-3dTilesInspector-statistics",oe.setAttribute("data-bind","html: resourceCacheStatisticsText, visible: showResourceCacheStatistics"),M.appendChild(oe);let ne=document.createElement("div");T.appendChild(ne),ne.appendChild(document.createTextNode("\u989C\u8272\u6DF7\u5408\u6A21\u5F0F: "));let se=document.createElement("select");se.setAttribute("data-bind",'options: colorBlendModes, optionsText: "text", optionsValue: "value", value: colorBlendMode'),ne.appendChild(se);let ce=document.createElement("textarea");ce.setAttribute("data-bind","textInput: styleString, event: { keydown: styleEditorKeyPress }"),ne.className="cesium-cesiumInspector-styleEditor",ne.appendChild(ce);let j=o0e("compileStyle","\u7F16\u8BD1 (Ctrl+Enter)");ne.appendChild(j);let de=document.createElement("div");de.className="cesium-cesiumInspector-error",de.setAttribute("data-bind","text: editorError"),ne.appendChild(de),B.appendChild(E("\u4EC5\u663E\u793A\u62FE\u53D6\u74E6\u7247","showOnlyPickedTileDebugLabel")),B.appendChild(E("\u51E0\u4F55\u8BEF\u5DEE","showGeometricError")),B.appendChild(E("\u6E32\u67D3\u7EDF\u8BA1","showRenderingStatistics")),B.appendChild(E("\u5185\u5B58\u4F7F\u7528 (MB)","showMemoryUsage")),B.appendChild(E("\u74E6\u7247\u8DEF\u5F84","showUrl")),D.appendChild(E("\u8DF3\u8FC7\u74E6\u7247\u5C42\u7EA7","skipLevelOfDetail"));let me=document.createElement("div");me.appendChild(Tb("skipScreenSpaceErrorFactor",1,50,1,"\u8DF3\u8FC7\u5C4F\u5E55\u8BEF\u5DEE\u56E0\u5B50")),D.appendChild(me);let _e=document.createElement("div");_e.appendChild(Tb("baseScreenSpaceError",0,4096,1,"\u57FA\u7840\u5C4F\u5E55\u7A7A\u95F4\u8BEF\u5DEE")),D.appendChild(_e);let Be=document.createElement("div");Be.appendChild(Tb("skipLevels",0,10,1,"\u8DF3\u8FC7\u5C42\u7EA7\u6570")),D.appendChild(Be),D.appendChild(E("\u4EC5\u52A0\u8F7D\u6EE1\u8DB3\u6700\u5927\u5C4F\u5E55\u8BEF\u5DEE\u7684\u74E6\u7247","immediatelyLoadDesiredLevelOfDetail")),D.appendChild(E("\u52A0\u8F7D\u53EF\u89C1\u74E6\u7247\u9644\u8FD1\u7684\u74E6\u7247","loadSiblings")),gr.applyBindings(C,f)}Object.defineProperties(vae.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});vae.prototype.isDestroyed=function(){return!1};vae.prototype.destroy=function(){return gr.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),Qr(this)};function Tb(o,A,f,m,C,y){y=Ae(y,o);let x=document.createElement("input");x.setAttribute("data-bind",`value: ${y}`),x.type="number";let v=document.createElement("input");v.type="range",v.min=A,v.max=f,v.step=m,v.setAttribute("data-bind",`valueUpdate: "input", value: ${o}`);let E=document.createElement("div");E.appendChild(v);let I=document.createElement("div");return I.className="cesium-cesiumInspector-slider",I.appendChild(document.createTextNode(C)),I.appendChild(x),I.appendChild(E),I}function o0e(o,A,f){let m=document.createElement("button");m.type="button",m.textContent=A,m.className="cesium-cesiumInspector-pickButton";let C=`click: ${o}`;return O(f)&&(C+=`, css: {"cesium-cesiumInspector-pickButtonHighlight" : ${f}}`),m.setAttribute("data-bind",C),m}var wDe=vae;function E2i(o){let A;if(O(o)){A="Command Statistics";let f=o.commandsInFrustums;for(let m in f)if(f.hasOwnProperty(m)){let C=parseInt(m,10),y;if(C===7)y="1, 2 and 3";else{let x=[];for(let v=2;v>=0;v--){let E=Math.pow(2,v);C>=E&&(x.push(v+1),C-=E)}y=x.reverse().join(" and ")}A+=`<br>&nbsp;&nbsp;&nbsp;&nbsp;${f[m]} in frustum ${y}`}A+=`<br>Total: ${o.totalCommands}`}return A}function wme(o,A,f){let m=Math.min(f,A);return m=Math.max(m,o),m}var I2i=new ss,_2i=new ee;function fW(o,A){let f=this,m=o.canvas,C=new Ur(m);this._eventHandler=C,this._scene=o,this._canvas=m,this._primitive=void 0,this._tile=void 0,this._modelMatrixPrimitive=void 0,this._performanceDisplay=void 0,this._performanceContainer=A;let y=this._scene.globe;y.depthTestAgainstTerrain=!0,this.frustums=!1,this.frustumPlanes=!1,this.performance=!1,this.shaderCacheText="",this.primitiveBoundingSphere=!1,this.primitiveReferenceFrame=!1,this.filterPrimitive=!1,this.tileBoundingSphere=!1,this.filterTile=!1,this.wireframe=!1,this.depthFrustum=1,this._numberOfFrustums=1,this.suspendUpdates=!1,this.tileCoordinates=!1,this.frustumStatisticText=!1,this.tileText="",this.hasPickedPrimitive=!1,this.hasPickedTile=!1,this.pickPrimitiveActive=!1,this.pickTileActive=!1,this.dropDownVisible=!0,this.generalVisible=!0,this.primitivesVisible=!1,this.terrainVisible=!1,this.depthFrustumText="",gr.track(this,["frustums","frustumPlanes","performance","shaderCacheText","primitiveBoundingSphere","primitiveReferenceFrame","filterPrimitive","tileBoundingSphere","filterTile","wireframe","depthFrustum","suspendUpdates","tileCoordinates","frustumStatisticText","tileText","hasPickedPrimitive","hasPickedTile","pickPrimitiveActive","pickTileActive","dropDownVisible","generalVisible","primitivesVisible","terrainVisible","depthFrustumText"]),this._toggleDropDown=Hl(function(){f.dropDownVisible=!f.dropDownVisible}),this._toggleGeneral=Hl(function(){f.generalVisible=!f.generalVisible}),this._togglePrimitives=Hl(function(){f.primitivesVisible=!f.primitivesVisible}),this._toggleTerrain=Hl(function(){f.terrainVisible=!f.terrainVisible}),this._frustumsSubscription=gr.getObservable(this,"frustums").subscribe(function(I){f._scene.debugShowFrustums=I,f._scene.requestRender()}),this._frustumPlanesSubscription=gr.getObservable(this,"frustumPlanes").subscribe(function(I){f._scene.debugShowFrustumPlanes=I,f._scene.requestRender()}),this._performanceSubscription=gr.getObservable(this,"performance").subscribe(function(I){I?f._performanceDisplay=new OJ({container:f._performanceContainer}):f._performanceContainer.innerHTML=""}),this._showPrimitiveBoundingSphere=Hl(function(){return f._primitive.debugShowBoundingVolume=f.primitiveBoundingSphere,f._scene.requestRender(),!0}),this._primitiveBoundingSphereSubscription=gr.getObservable(this,"primitiveBoundingSphere").subscribe(function(){f._showPrimitiveBoundingSphere()}),this._showPrimitiveReferenceFrame=Hl(function(){if(f.primitiveReferenceFrame){let I=f._primitive.modelMatrix;f._modelMatrixPrimitive=new fDe({modelMatrix:I}),f._scene.primitives.add(f._modelMatrixPrimitive)}else O(f._modelMatrixPrimitive)&&(f._scene.primitives.remove(f._modelMatrixPrimitive),f._modelMatrixPrimitive=void 0);return f._scene.requestRender(),!0}),this._primitiveReferenceFrameSubscription=gr.getObservable(this,"primitiveReferenceFrame").subscribe(function(){f._showPrimitiveReferenceFrame()}),this._doFilterPrimitive=Hl(function(){return f.filterPrimitive?f._scene.debugCommandFilter=function(I){return O(f._modelMatrixPrimitive)&&I.owner===f._modelMatrixPrimitive._primitive?!0:O(f._primitive)?I.owner===f._primitive||I.owner===f._primitive._billboardCollection||I.owner.primitive===f._primitive:!1}:f._scene.debugCommandFilter=void 0,!0}),this._filterPrimitiveSubscription=gr.getObservable(this,"filterPrimitive").subscribe(function(){f._doFilterPrimitive(),f._scene.requestRender()}),this._wireframeSubscription=gr.getObservable(this,"wireframe").subscribe(function(I){y._surface.tileProvider._debug.wireframe=I,f._scene.requestRender()}),this._depthFrustumSubscription=gr.getObservable(this,"depthFrustum").subscribe(function(I){f._scene.debugShowDepthFrustum=I,f._scene.requestRender()}),this._incrementDepthFrustum=Hl(function(){let I=f.depthFrustum+1;return f.depthFrustum=wme(1,f._numberOfFrustums,I),f._scene.requestRender(),!0}),this._decrementDepthFrustum=Hl(function(){let I=f.depthFrustum-1;return f.depthFrustum=wme(1,f._numberOfFrustums,I),f._scene.requestRender(),!0}),this._suspendUpdatesSubscription=gr.getObservable(this,"suspendUpdates").subscribe(function(I){y._surface._debug.suspendLodUpdate=I,I||(f.filterTile=!1)});let x;this._showTileCoordinates=Hl(function(){return f.tileCoordinates&&!O(x)?x=o.imageryLayers.addImageryProvider(new IDe({tilingScheme:o.terrainProvider.tilingScheme})):!f.tileCoordinates&&O(x)&&(o.imageryLayers.remove(x),x=void 0),!0}),this._tileCoordinatesSubscription=gr.getObservable(this,"tileCoordinates").subscribe(function(){f._showTileCoordinates(),f._scene.requestRender()}),this._tileBoundingSphereSubscription=gr.getObservable(this,"tileBoundingSphere").subscribe(function(){f._showTileBoundingSphere(),f._scene.requestRender()}),this._showTileBoundingSphere=Hl(function(){return f.tileBoundingSphere?y._surface.tileProvider._debug.boundingSphereTile=f._tile:y._surface.tileProvider._debug.boundingSphereTile=void 0,f._scene.requestRender(),!0}),this._doFilterTile=Hl(function(){return f.filterTile?(f.suspendUpdates=!0,y._surface._tilesToRender=[],O(f._tile)&&f._tile.renderable&&y._surface._tilesToRender.push(f._tile)):f.suspendUpdates=!1,!0}),this._filterTileSubscription=gr.getObservable(this,"filterTile").subscribe(function(){f.doFilterTile(),f._scene.requestRender()});function v(I){let w=f._scene.pick({x:I.position.x,y:I.position.y});O(w)&&(f.primitive=O(w.collection)?w.collection:w.primitive),f._scene.requestRender(),f.pickPrimitiveActive=!1}this._pickPrimitive=Hl(function(){f.pickPrimitiveActive=!f.pickPrimitiveActive}),this._pickPrimitiveActiveSubscription=gr.getObservable(this,"pickPrimitiveActive").subscribe(function(I){I?C.setInputAction(v,Ki.LEFT_CLICK):C.removeInputAction(Ki.LEFT_CLICK)});function E(I){let w,Q=y.ellipsoid,M=f._scene.camera.getPickRay(I.position,I2i),B=y.pick(M,f._scene,_2i);if(O(B)){let T=Q.cartesianToCartographic(B),D=y._surface.tileProvider._tilesToRenderByTextureCount;for(let F=0;!w&&F<D.length;++F){let L=D[F];if(O(L))for(let R=0;!w&&R<L.length;++R){let k=L[R];Si.contains(k.rectangle,T)&&(w=k)}}}f.tile=w,f.pickTileActive=!1}this._pickTile=Hl(function(){f.pickTileActive=!f.pickTileActive}),this._pickTileActiveSubscription=gr.getObservable(this,"pickTileActive").subscribe(function(I){I?C.setInputAction(E,Ki.LEFT_CLICK):C.removeInputAction(Ki.LEFT_CLICK)}),this._removePostRenderEvent=o.postRender.addEventListener(function(){f._update()})}Object.defineProperties(fW.prototype,{scene:{get:function(){return this._scene}},performanceContainer:{get:function(){return this._performanceContainer}},toggleDropDown:{get:function(){return this._toggleDropDown}},showPrimitiveBoundingSphere:{get:function(){return this._showPrimitiveBoundingSphere}},showPrimitiveReferenceFrame:{get:function(){return this._showPrimitiveReferenceFrame}},doFilterPrimitive:{get:function(){return this._doFilterPrimitive}},incrementDepthFrustum:{get:function(){return this._incrementDepthFrustum}},decrementDepthFrustum:{get:function(){return this._decrementDepthFrustum}},showTileCoordinates:{get:function(){return this._showTileCoordinates}},showTileBoundingSphere:{get:function(){return this._showTileBoundingSphere}},doFilterTile:{get:function(){return this._doFilterTile}},toggleGeneral:{get:function(){return this._toggleGeneral}},togglePrimitives:{get:function(){return this._togglePrimitives}},toggleTerrain:{get:function(){return this._toggleTerrain}},pickPrimitive:{get:function(){return this._pickPrimitive}},pickTile:{get:function(){return this._pickTile}},selectParent:{get:function(){let o=this;return Hl(function(){o.tile=o.tile.parent})}},selectNW:{get:function(){let o=this;return Hl(function(){o.tile=o.tile.northwestChild})}},selectNE:{get:function(){let o=this;return Hl(function(){o.tile=o.tile.northeastChild})}},selectSW:{get:function(){let o=this;return Hl(function(){o.tile=o.tile.southwestChild})}},selectSE:{get:function(){let o=this;return Hl(function(){o.tile=o.tile.southeastChild})}},primitive:{get:function(){return this._primitive},set:function(o){let A=this._primitive;o!==A&&(this.hasPickedPrimitive=!0,O(A)&&(A.debugShowBoundingVolume=!1),this._scene.debugCommandFilter=void 0,O(this._modelMatrixPrimitive)&&(this._scene.primitives.remove(this._modelMatrixPrimitive),this._modelMatrixPrimitive=void 0),this._primitive=o,o.show=!1,setTimeout(function(){o.show=!0},50),this.showPrimitiveBoundingSphere(),this.showPrimitiveReferenceFrame(),this.doFilterPrimitive())}},tile:{get:function(){return this._tile},set:function(o){if(O(o)){this.hasPickedTile=!0;let A=this._tile;if(o!==A){this.tileText=`L: ${o.level} X: ${o.x} Y: ${o.y}`,this.tileText+=`<br>SW corner: ${o.rectangle.west}, ${o.rectangle.south}`,this.tileText+=`<br>NE corner: ${o.rectangle.east}, ${o.rectangle.north}`;let f=o.data;O(f)&&O(f.tileBoundingRegion)?this.tileText+=`<br>Min: ${f.tileBoundingRegion.minimumHeight} Max: ${f.tileBoundingRegion.maximumHeight}`:this.tileText+="<br>(Tile is not loaded)"}this._tile=o,this.showTileBoundingSphere(),this.doFilterTile()}else this.hasPickedTile=!1,this._tile=void 0}}});fW.prototype._update=function(){this.frustums&&(this.frustumStatisticText=E2i(this._scene.debugFrustumStatistics));let o=this._scene.numberOfFrustums;this._numberOfFrustums=o,this.depthFrustum=wme(1,o,this.depthFrustum),this.depthFrustumText=`${this.depthFrustum} of ${o}`,this.performance&&this._performanceDisplay.update(),this.primitiveReferenceFrame&&(this._modelMatrixPrimitive.modelMatrix=this._primitive.modelMatrix),this.shaderCacheText=`Cached shaders: ${this._scene.context.shaderCache.numberOfShaders}`};fW.prototype.isDestroyed=function(){return!1};fW.prototype.destroy=function(){return this._eventHandler.destroy(),this._removePostRenderEvent(),this._frustumsSubscription.dispose(),this._frustumPlanesSubscription.dispose(),this._performanceSubscription.dispose(),this._primitiveBoundingSphereSubscription.dispose(),this._primitiveReferenceFrameSubscription.dispose(),this._filterPrimitiveSubscription.dispose(),this._wireframeSubscription.dispose(),this._depthFrustumSubscription.dispose(),this._suspendUpdatesSubscription.dispose(),this._tileCoordinatesSubscription.dispose(),this._tileBoundingSphereSubscription.dispose(),this._filterTileSubscription.dispose(),this._pickPrimitiveActiveSubscription.dispose(),this._pickTileActiveSubscription.dispose(),Qr(this)};var bDe=fW;function Eae(o,A){o=iA(o);let f=document.createElement("div"),m=new bDe(A,f);this._viewModel=m,this._container=o;let C=document.createElement("div");this._element=C;let y=document.createElement("div");y.textContent="Cesium Inspector",y.className="cesium-cesiumInspector-button",y.setAttribute("data-bind","click: toggleDropDown"),C.appendChild(y),C.className="cesium-cesiumInspector",C.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : dropDownVisible, "cesium-cesiumInspector-hidden" : !dropDownVisible }'),o.appendChild(this._element);let x=document.createElement("div");this._panel=x,x.className="cesium-cesiumInspector-dropDown",C.appendChild(x);let v=z8.createSection,E=z8.createCheckbox,I=v(x,"General","generalVisible","toggleGeneral"),w=E("Show Frustums","frustums"),Q=document.createElement("div");Q.className="cesium-cesiumInspector-frustumStatistics",Q.setAttribute("data-bind","visible: frustums, html: frustumStatisticText"),w.appendChild(Q),I.appendChild(w),I.appendChild(E("Show Frustum Planes","frustumPlanes")),I.appendChild(E("Performance Display","performance")),f.className="cesium-cesiumInspector-performanceDisplay",I.appendChild(f);let M=document.createElement("div");M.className="cesium-cesiumInspector-shaderCache",M.setAttribute("data-bind","html: shaderCacheText"),I.appendChild(M);let B=document.createElement("div");I.appendChild(B);let T=document.createElement("span");T.setAttribute("data-bind",'html: "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Frustum:"'),B.appendChild(T);let D=document.createElement("span");D.setAttribute("data-bind","text: depthFrustumText"),B.appendChild(D);let F=document.createElement("input");F.type="button",F.value="-",F.className="cesium-cesiumInspector-pickButton",F.setAttribute("data-bind","click: decrementDepthFrustum"),B.appendChild(F);let L=document.createElement("input");L.type="button",L.value="+",L.className="cesium-cesiumInspector-pickButton",L.setAttribute("data-bind","click: incrementDepthFrustum"),B.appendChild(L);let R=v(x,"Primitives","primitivesVisible","togglePrimitives"),k=document.createElement("div");k.className="cesium-cesiumInspector-pickSection",R.appendChild(k);let U=document.createElement("input");U.type="button",U.value="Pick a primitive",U.className="cesium-cesiumInspector-pickButton",U.setAttribute("data-bind",'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickPrimitiveActive}, click: pickPrimitive');let V=document.createElement("div");V.className="cesium-cesiumInspector-center",V.appendChild(U),k.appendChild(V),k.appendChild(E("Show bounding sphere","primitiveBoundingSphere","hasPickedPrimitive")),k.appendChild(E("Show reference frame","primitiveReferenceFrame","hasPickedPrimitive")),this._primitiveOnly=E("Show only selected","filterPrimitive","hasPickedPrimitive"),k.appendChild(this._primitiveOnly);let H=v(x,"Terrain","terrainVisible","toggleTerrain"),q=document.createElement("div");q.className="cesium-cesiumInspector-pickSection",H.appendChild(q);let ie=document.createElement("input");ie.type="button",ie.value="Pick a tile",ie.className="cesium-cesiumInspector-pickButton",ie.setAttribute("data-bind",'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickTileActive}, click: pickTile'),V=document.createElement("div"),V.appendChild(ie),V.className="cesium-cesiumInspector-center",q.appendChild(V);let Z=document.createElement("div");q.appendChild(Z);let oe=document.createElement("input");oe.type="button",oe.value="Parent",oe.className="cesium-cesiumInspector-pickButton",oe.setAttribute("data-bind","click: selectParent");let ne=document.createElement("input");ne.type="button",ne.value="NW",ne.className="cesium-cesiumInspector-pickButton",ne.setAttribute("data-bind","click: selectNW");let se=document.createElement("input");se.type="button",se.value="NE",se.className="cesium-cesiumInspector-pickButton",se.setAttribute("data-bind","click: selectNE");let ce=document.createElement("input");ce.type="button",ce.value="SW",ce.className="cesium-cesiumInspector-pickButton",ce.setAttribute("data-bind","click: selectSW");let j=document.createElement("input");j.type="button",j.value="SE",j.className="cesium-cesiumInspector-pickButton",j.setAttribute("data-bind","click: selectSE");let de=document.createElement("div");de.className="cesium-cesiumInspector-tileText",Z.className="cesium-cesiumInspector-frustumStatistics",Z.appendChild(de),Z.setAttribute("data-bind","visible: hasPickedTile"),de.setAttribute("data-bind","html: tileText");let me=document.createElement("div");me.className="cesium-cesiumInspector-relativeText",me.textContent="Select relative:",Z.appendChild(me);let _e=document.createElement("table"),Be=document.createElement("tr"),Qe=document.createElement("tr"),Ie=document.createElement("td");Ie.appendChild(oe);let ve=document.createElement("td");ve.appendChild(ne);let K=document.createElement("td");K.appendChild(se),Be.appendChild(Ie),Be.appendChild(ve),Be.appendChild(K);let W=document.createElement("td"),te=document.createElement("td");te.appendChild(ce);let Y=document.createElement("td");Y.appendChild(j),Qe.appendChild(W),Qe.appendChild(te),Qe.appendChild(Y),_e.appendChild(Be),_e.appendChild(Qe),Z.appendChild(_e),q.appendChild(E("Show bounding volume","tileBoundingSphere","hasPickedTile")),q.appendChild(E("Show only selected","filterTile","hasPickedTile")),H.appendChild(E("Wireframe","wireframe")),H.appendChild(E("Suspend LOD update","suspendUpdates")),H.appendChild(E("Show tile coordinates","tileCoordinates")),gr.applyBindings(m,this._element)}Object.defineProperties(Eae.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Eae.prototype.isDestroyed=function(){return!1};Eae.prototype.destroy=function(){return gr.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),Qr(this)};var QDe=Eae,J8=new wi;function JU(o){return xs(`./Assets/Textures/SkyBox/skyBox_${o}.jpg`)}function B2i(o){o._renderLoopRunning=!0;let A=0;function f(m){o.isDestroyed()||(o._useDefaultRenderLoop?(o.resize(),o.render(),requestAnimationFrame(f)):o._renderLoopRunning=!1)}requestAnimationFrame(f)}function llt(o){let A=o._canvas,f=A.clientWidth,m=A.clientHeight,C=o._resolutionScale;o._supportsImageRenderingPixelated||(C*=Ae(window.devicePixelRatio,1)),o._canvasWidth=f,o._canvasHeight=m,f*=C,m*=C,A.width=f,A.height=m,o._canRender=f!==0&&m!==0}function ult(o){let A=o._canvas,f=A.width,m=A.height;if(f!==0&&m!==0){let C=o._scene.camera.frustum;O(C.aspectRatio)?C.aspectRatio=f/m:(C.top=C.right*(m/f),C.bottom=-C.top)}}function RQ(o,A){o=iA(o),A=Ae(A,{});let f=document.createElement("div");f.className="map-widget",o.appendChild(f);let m=document.createElement("canvas");m.setAttribute("id","mapRenderCanvas");let C=Mo.supportsImageRenderingPixelated();this._supportsImageRenderingPixelated=C,C&&(m.style.imageRendering=Mo.imageRenderingValue()),m.oncontextmenu=function(){return!1},m.onselectstart=function(){return!1},f.appendChild(m);let y=document.createElement("div");y.className="map-widget-message-pannel";let x=O(A.creditContainer)?iA(A.creditContainer):f;x.appendChild(y);let v=O(A.creditViewport)?iA(A.creditViewport):f,E=Ae(A.showRenderLoopErrors,!0);this._element=f,this._container=o,this._canvas=m,this._canvasWidth=0,this._canvasHeight=0,this._creditViewport=v,this._creditContainer=x,this._innerCreditContainer=y,this._canRender=!1,this._renderLoopRunning=!1,this._showRenderLoopErrors=E,this._resolutionScale=1,this._forceResize=!1,this._clock=O(A.clock)?A.clock:new z5,this._trackedEntityChanged=new br,llt(this);let I=new Loe({canvas:m,contextOptions:A.contextOptions,creditContainer:y,creditViewport:v,mapProjection:A.mapProjection,orderIndependentTranslucency:A.orderIndependentTranslucency,scene3DOnly:Ae(A.scene3DOnly,!1),terrainExaggeration:A.terrainExaggeration,shadows:A.shadows,mapMode2D:A.mapMode2D,requestRenderMode:A.requestRenderMode,maximumRenderTimeChange:A.maximumRenderTimeChange});this._scene=I,I.camera.constrainedAxis=ee.UNIT_Z,ult(this);let w=null;A.ellipsoidCoordinates==="CGCS2000"?w=Ae(I.mapProjection.ellipsoid,Ti.CGCS2000):w=Ae(I.mapProjection.ellipsoid,Ti.WGS84);let Q=A.globe;O(Q)||(Q=new Coe(w)),Q!==!1&&(I.globe=Q,I.globe.shadows=Ae(A.terrainShadows,Al.RECEIVE_ONLY));let M=A.skyBox;O(M)||(M=new CN({sources:{positiveX:JU("px"),negativeX:JU("mx"),positiveY:JU("py"),negativeY:JU("my"),positiveZ:JU("pz"),negativeZ:JU("mz")}})),M!==!1&&(I.skyBox=M,I.sun=new Noe,I.moon=new xoe);let B=A.skyAtmosphere;O(B)||(B=new aH(w)),B!==!1&&(I.skyAtmosphere=B);let T=A.globe===!1?!1:A.imageryProvider;if(O(T)||(T=Xk()),T!==!1)for(let F=0;F<T.length;F++)I.imageryLayers.addImageryProvider(T[F]);O(A.terrainProvider)&&A.globe!==!1&&(I.terrainProvider=A.terrainProvider),this._screenSpaceEventHandler=new Ur(m,!1),O(A.sceneMode)&&(A.sceneMode===xi.SCENE2D&&this._scene.morphTo2D(0),A.sceneMode===xi.COLUMBUS_VIEW&&this._scene.morphToColumbusView(0)),this._useDefaultRenderLoop=void 0,this.useDefaultRenderLoop=Ae(A.useDefaultRenderLoop,!0),this._targetFrameRate=void 0,this.targetFrameRate=A.targetFrameRate;let D=this;I.renderError.addEventListener(function(F,L){if(D._useDefaultRenderLoop=!1,D._renderLoopRunning=!1,D._showRenderLoopErrors){let R="An error occurred while rendering.  Rendering has stopped.";D.showErrorPanel(R,void 0,L)}})}Object.defineProperties(RQ.prototype,{container:{get:function(){return this._container}},canvas:{get:function(){return this._canvas}},creditContainer:{get:function(){return this._creditContainer}},creditViewport:{get:function(){return this._creditViewport}},scene:{get:function(){return this._scene}},imageryLayers:{get:function(){return this._scene.imageryLayers}},terrainProvider:{get:function(){return this._scene.terrainProvider},set:function(o){this._scene.terrainProvider=o}},camera:{get:function(){return this._scene.camera}},clock:{get:function(){return this._clock}},screenSpaceEventHandler:{get:function(){return this._screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._targetFrameRate},set:function(o){this._targetFrameRate=o}},useDefaultRenderLoop:{get:function(){return this._useDefaultRenderLoop},set:function(o){this._useDefaultRenderLoop!==o&&(this._useDefaultRenderLoop=o,o&&!this._renderLoopRunning&&B2i(this))}},resolutionScale:{get:function(){return this._resolutionScale},set:function(o){this._resolutionScale=o,this._forceResize=!0}},trackedEntityChanged:{get:function(){return this._trackedEntityChanged}},trackedEntity:{get:function(){return this._trackedEntity},set:function(o){if(this._trackedEntity!==o){this._trackedEntity=o,SDe(this);let A=this.scene,f=A.mode;!O(o)||!O(o.position)?(this._needTrackedEntityUpdate=!1,(f===xi.COLUMBUS_VIEW||f===xi.SCENE2D)&&(A.screenSpaceCameraController.enableTranslate=!0),(f===xi.COLUMBUS_VIEW||f===xi.SCENE3D)&&(A.screenSpaceCameraController.enableTilt=!0),this._entityView=void 0,this.camera.lookAtTransform(Xe.IDENTITY)):this._needTrackedEntityUpdate=!0,this._trackedEntityChanged.raiseEvent(o),this.scene.requestRender()}}}});RQ.prototype.showErrorPanel=function(o,A,f){let m=this._element,C=document.createElement("div");C.className="map-widget-errorPanel";let y=document.createElement("div");y.className="map-widget-errorPanel-content",C.appendChild(y);let x=document.createElement("div");x.className="map-widget-errorPanel-header",x.appendChild(document.createTextNode(o)),y.appendChild(x);let v=document.createElement("div");v.className="map-widget-errorPanel-scroll",y.appendChild(v);function E(){v.style.maxHeight=`${Math.max(Math.round(m.clientHeight*.9-100),30)}px`}if(E(),O(window.addEventListener)&&window.addEventListener("resize",E,!1),O(A)){let B=document.createElement("div");B.className="map-widget-errorPanel-message",B.innerHTML=`<p>${A}</p>`,v.appendChild(B)}let I="(no error details available)";O(f)&&(I=D5(f));let w=document.createElement("div");w.className="map-widget-errorPanel-message",w.appendChild(document.createTextNode(I)),v.appendChild(w);let Q=document.createElement("div");Q.className="map-widget-errorPanel-buttonPanel",y.appendChild(Q);let M=document.createElement("button");M.setAttribute("type","button"),M.className="map-button",M.appendChild(document.createTextNode("OK")),M.onclick=function(){O(E)&&O(window.removeEventListener)&&window.removeEventListener("resize",E,!1),m.removeChild(C)},Q.appendChild(M),m.appendChild(C),typeof console<"u"&&console.error(`${o}
${A}
${I}`)};RQ.prototype.isDestroyed=function(){return!1};RQ.prototype.destroy=function(){this._scene=this._scene&&this._scene.destroy(),this._container.removeChild(this._element),this._creditContainer.removeChild(this._innerCreditContainer),Qr(this)};RQ.prototype.resize=function(){let o=this._canvas,A=o.clientWidth,f=o.clientHeight;!this._forceResize&&this._canvasWidth===A&&this._canvasHeight===f||(this._forceResize=!1,llt(this),ult(this),this._scene.requestRender())};RQ.prototype.render=function(){if(this._scene._frameState||console.log("\u6388\u6743\u9A8C\u8BC1\u9519\u8BEF\uFF01"),this._canRender){this._scene.initializeFrame();let o=this._clock.tick();this._scene.render(o)}else this._clock.tick()};RQ.prototype.flyTo=function(o,A){return w2i(this,o,A,!0)};function w2i(o,A,f,m){SDe(o);let C=Promise.resolve(!0);return o._zoomPromise=C,o._zoomIsFlight=m,o._zoomOptions=f,Promise.resolve(A,function(y){if(o._zoomPromise===C){if(y instanceof dD){y.getViewableRectangle().then(function(x){return IJ(x,o.scene)}).then(function(x){o._zoomPromise===C&&(o._zoomTarget=x)});return}if(y instanceof Fx){o._zoomTarget=y;return}if(y instanceof cI){o._zoomTarget=y;return}if(y instanceof K6){o._zoomTarget=y;return}if(y.isLoading&&O(y.loadingEvent)){let x=y.loadingEvent.addEventListener(function(){x(),o._zoomPromise===C&&(o._zoomTarget=y.entities.values.slice(0))});return}if(Array.isArray(y)){o._zoomTarget=y.slice(0);return}y=Ae(y.values,y),O(y.entities)&&(y=y.entities.values),Array.isArray(y)?o._zoomTarget=y.slice(0):o._zoomTarget=[y]}}),o.scene.requestRender(),C.promise}function sG(o){o._zoomPromise=void 0,o._zoomTarget=void 0,o._zoomOptions=void 0}function SDe(o){let A=o._zoomPromise;O(A)&&(sG(o),A.resolve(!1))}RQ.prototype._postRender=function(){b2i(this),Q2i(this)};RQ.prototype._onTick=function(){let o=this,A=o.coreMap,f=A.clock.currentTime,m=A._entityView;if(O(m)){let C=A._trackedEntity;o._dataSourceDisplay.getBoundingSphere(C,!1,J8)===ro.DONE&&m.update(f,J8)}};function b2i(o){let A=o.coreMap,f=A._zoomTarget;if(!O(f)||A.scene.mode===xi.MORPHING)return;let m=A.scene,C=m.camera,y=A._zoomPromise,x=Ae(A._zoomOptions,{}),v,E;if(f instanceof Fx||f instanceof cI)return f.readyPromise.then(function(){let Q=f.boundingSphere;O(x.offset)||(x.offset=new Ex(0,-.5,Q.radius)),v={offset:x.offset,duration:x.duration,maximumHeight:x.maximumHeight,complete:function(){y.resolve(!0)},cancel:function(){y.resolve(!1)}},A._zoomIsFlight?C.flyToBoundingSphere(f.boundingSphere,v):(C.viewBoundingSphere(Q,x.offset),C.lookAtTransform(Xe.IDENTITY),y.resolve(!0)),sG(A)});if(f instanceof K6)return f.readyPromise.then(function(){let Q=f.boundingSphere;O(x.offset)||(x.offset=new Ex(0,-.5,Q.radius)),v={offset:x.offset,duration:x.duration,maximumHeight:x.maximumHeight,complete:function(){y.resolve(!0)},cancel:function(){y.resolve(!1)}},A._zoomIsFlight?C.flyToBoundingSphere(Q,v):(C.viewBoundingSphere(Q,x.offset),C.lookAtTransform(Xe.IDENTITY),y.resolve(!0)),sG(A)});if(f instanceof Kt){v={destination:m.mapProjection.ellipsoid.cartographicToCartesian(f),duration:x.duration,maximumHeight:x.maximumHeight,complete:function(){y.resolve(!0)},cancel:function(){y.resolve(!1)}},A._zoomIsFlight?C.flyTo(v):(C.setView(v),y.resolve(!0)),sG(A);return}let I=f,w=[];for(let Q=0,M=I.length;Q<M;Q++){let B=o._dataSourceDisplay.getBoundingSphere(I[Q],!1,J8);if(B===ro.PENDING)return;B!==ro.FAILED&&w.push(wi.clone(J8))}if(w.length===0){SDe(A);return}A.trackedEntity=void 0,E=wi.fromBoundingSpheres(w),A._zoomIsFlight?(sG(A),C.flyToBoundingSphere(E,{duration:x.duration,maximumHeight:x.maximumHeight,complete:function(){y.resolve(!0)},cancel:function(){y.resolve(!1)},offset:x.offset})):(C.viewBoundingSphere(E,x.offset),C.lookAtTransform(Xe.IDENTITY),sG(A),y.resolve(!0))}function Q2i(o){let A=o.coreMap;if(!A._needTrackedEntityUpdate)return;let f=A.trackedEntity,m=A.clock.currentTime,C=Nt.getValueOrUndefined(f.position,m);if(!O(C))return;let y=A.scene,x=o._dataSourceDisplay.getBoundingSphere(f,!1,J8);if(x===ro.PENDING)return;let v=y.mode;(v===xi.COLUMBUS_VIEW||v===xi.SCENE2D)&&(y.screenSpaceCameraController.enableTranslate=!1),(v===xi.COLUMBUS_VIEW||v===xi.SCENE3D)&&(y.screenSpaceCameraController.enableTilt=!1);let E=x!==ro.FAILED?J8:void 0;console.info(E),A._entityView=new qne(f,y,y.mapProjection.ellipsoid),A._entityView.update(m,E),A._needTrackedEntityUpdate=!1}RQ.prototype.extend=function(o,A){o(this,A)};var clt=RQ;function DDe(o){this._scene=o.scene,this.lowFrameRateMessage=Ae(o.lowFrameRateMessage,"This application appears to be performing poorly on your system.  Please try using a different web browser or updating your video drivers."),this.lowFrameRateMessageDismissed=!1,this.showingLowFrameRateMessage=!1,gr.track(this,["lowFrameRateMessage","lowFrameRateMessageDismissed","showingLowFrameRateMessage"]);let A=this;this._dismissMessage=Hl(function(){A.showingLowFrameRateMessage=!1,A.lowFrameRateMessageDismissed=!0});let f=gDe.fromScene(o.scene);this._unsubscribeLowFrameRate=f.lowFrameRate.addEventListener(function(){A.lowFrameRateMessageDismissed||(A.showingLowFrameRateMessage=!0)}),this._unsubscribeNominalFrameRate=f.nominalFrameRate.addEventListener(function(){A.showingLowFrameRateMessage=!1})}Object.defineProperties(DDe.prototype,{scene:{get:function(){return this._scene}},dismissMessage:{get:function(){return this._dismissMessage}}});DDe.prototype.destroy=function(){return this._unsubscribeLowFrameRate(),this._unsubscribeNominalFrameRate(),Qr(this)};var TDe=DDe;function Iae(o){let A=iA(o.container),f=new TDe(o),m=document.createElement("div");m.className="cesium-performance-watchdog-message-area",m.setAttribute("data-bind","visible: showingLowFrameRateMessage");let C=document.createElement("button");C.setAttribute("type","button"),C.className="cesium-performance-watchdog-message-dismiss",C.innerHTML="&times;",C.setAttribute("data-bind","click: dismissMessage"),m.appendChild(C);let y=document.createElement("div");y.className="cesium-performance-watchdog-message",y.setAttribute("data-bind","html: lowFrameRateMessage"),m.appendChild(y),A.appendChild(m),gr.applyBindings(f,m),this._container=A,this._viewModel=f,this._element=m}Object.defineProperties(Iae.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Iae.prototype.isDestroyed=function(){return!1};Iae.prototype.destroy=function(){return this._viewModel.destroy(),gr.cleanNode(this._element),this._container.removeChild(this._element),Qr(this)};var MDe=Iae;function S2i(o){let A=document.createElement("div");A.className="cesium-viewer-cesium3DTilesInspectorContainer",o.container.appendChild(A);let f=new wDe(A,o.scene);Object.defineProperties(o,{cesium3DTilesInspector:{get:function(){return f}}})}var Alt=S2i;function D2i(o){let A=document.createElement("div");A.className="cesium-viewer-cesiumInspectorContainer",o.container.appendChild(A);let f=new QDe(A,o.scene);Object.defineProperties(o,{cesiumInspector:{get:function(){return f}}})}var hlt=D2i;function T2i(o,A){A=Ae(A,Ae.EMPTY_OBJECT);let f=!0,m=Ae(A.flyToOnDrop,!0),C=new br,y=Ae(A.clearOnDrop,!0),x=Ae(A.dropTarget,o.container),v=Ae(A.clampToGround,!0),E=A.proxy;x=iA(x),Object.defineProperties(o,{dropTarget:{get:function(){return x},set:function(w){g7e(x,I),x=w,a0e(x,I)}},dropEnabled:{get:function(){return f},set:function(w){w!==f&&(w?a0e(x,I):g7e(x,I),f=w)}},dropError:{get:function(){return C}},clearOnDrop:{get:function(){return y},set:function(w){y=w}},flyToOnDrop:{get:function(){return m},set:function(w){m=w}},proxy:{get:function(){return E},set:function(w){E=w}},clampToGround:{get:function(){return v},set:function(w){v=w}}});function I(w){e5(w),y&&(o.entities.removeAll(),o.dataSources.removeAll());let Q=w.dataTransfer.files,M=Q.length;for(let B=0;B<M;B++){let T=Q[B],D=new FileReader;D.onload=M2i(o,T,E,v),D.onerror=P2i(o,T),D.readAsText(T)}}a0e(x,I),o.destroy=VSe(o,o.destroy,function(){o.dropEnabled=!1}),o._handleDrop=I}function e5(o){o.stopPropagation(),o.preventDefault()}function g7e(o,A){let f=o;O(f)&&(f.removeEventListener("drop",A,!1),f.removeEventListener("dragenter",e5,!1),f.removeEventListener("dragover",e5,!1),f.removeEventListener("dragexit",e5,!1))}function a0e(o,A){o.addEventListener("drop",A,!1),o.addEventListener("dragenter",e5,!1),o.addEventListener("dragover",e5,!1),o.addEventListener("dragexit",e5,!1)}function M2i(o,A,f,m){let C=o.scene;return function(y){let x=A.name;try{let v;if(/\.czml$/i.test(x))v=eW.load(JSON.parse(y.target.result),{sourceUri:x});else if(/\.geojson$/i.test(x)||/\.json$/i.test(x)||/\.topojson$/i.test(x))v=gK.load(JSON.parse(y.target.result),{sourceUri:x,clampToGround:m});else if(/\.(kml|kmz)$/i.test(x))v=Pre.load(A,{sourceUri:x,proxy:f,camera:C.camera,canvas:C.canvas,clampToGround:m,screenOverlayContainer:o.container});else if(/\.gpx$/i.test(x))v=fSe.load(A,{sourceUri:x,proxy:f});else{o.dropError.raiseEvent(o,x,`Unrecognized file: ${x}`);return}O(v)&&o.dataSources.add(v).then(function(E){o.flyToOnDrop&&o.flyTo(E)}).catch(function(E){o.dropError.raiseEvent(o,x,E)})}catch(v){o.dropError.raiseEvent(o,x,v)}}}function P2i(o,A){return function(f){o.dropError.raiseEvent(o,A.name,f.target.error)}}var dlt=T2i;function R2i(o,A){A=Ae(A,Ae.EMPTY_OBJECT);let f=new MDe({scene:o.scene,container:o.bottomContainer,lowFrameRateMessage:A.lowFrameRateMessage});Object.defineProperties(o,{performanceWatchdog:{get:function(){return f}}})}var flt=R2i;function XK(o){this._angle=void 0,this._angleSubscription=void 0,this._radius=void 0,this._radiusSubscription=void 0,this._stack=void 0,this._stackSubscription=void 0,this._slice=void 0,this._sliceSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._show=void 0,this._showSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._definitionChanged=new br,this._gaze=void 0,this._gazeSubscription=void 0,this.merge(Ae(o,Ae.EMPTY_OBJECT))}Object.defineProperties(XK.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:Bi("show"),material:hy("material"),fill:Bi("fill"),shadows:Bi("shadows"),distanceDisplayCondition:Bi("distanceDisplayCondition")});XK.prototype.clone=function(o){return O(o)?(o.angle=this.angle,o.radius=this.radius,o.stack=this.stack,o.slice=this.slice,o.show=this.show,o.material=this.material,o.color=this.color,o.fill=this.fill,o.outline=this.outline,o.outlineColor=this.outlineColor,o.outlineWidth=this.outlineWidth,o.shadows=this.shadows,o.distanceDisplayCondition=this.distanceDisplayCondition,o.gaze=this.gaze,o):new XK(this)};XK.prototype.merge=function(o){this.angle=Ae(this.angle,o.angle),this.radius=Ae(this.radius,o.radius),this.stack=Ae(this.stack,o.stack),this.slice=Ae(this.slice,o.slice),this.show=Ae(this.show,o.show),this.color=Ae(this.color,o.color),this.material=Ae(this.material,o.material),this.fill=Ae(this.fill,o.fill),this.outline=Ae(this.outline,o.outline),this.outlineColor=Ae(this.outlineColor,o.outlineColor),this.outlineWidth=Ae(this.outlineWidth,o.outlineWidth),this.shadows=Ae(this.shadows,o.shadows),this.distanceDisplayCondition=Ae(this.distanceDisplayCondition,o.distanceDisplayCondition),this.gaze=Ae(this.gaze,o.gaze)};var Qie=XK;function L2i(o){return new _D(o)}function F2i(o){return Bi(o,void 0,L2i)}function _ae(o){o=o||{},this._position=void 0,this._orientation=void 0,this._show=void 0;let A=o.conicArcSensor;A instanceof Qie||(A=new Qie(A)),this._conicArcSensor=A,this._distanceDisplayCondition=new $o,this._geometry=void 0,this._outlineGeometry=void 0,this._definitionChanged=new br,this.merge(o)}Object.defineProperties(_ae.prototype,{position:F2i("position"),orientation:Bi("orientation"),show:Bi("show")});_ae.prototype.merge=function(o){this.position=o.position,this.orientation=o.orientation,this.show=o.show};_ae.prototype.gazeAt=function(o){o instanceof kA&&(this._conicArcSensor.gaze=o)};var Sie=_ae,p7e=Math.cos,m7e=Math.sin;function Die(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.angle,f=o.radius,m=Math.round(Ae(o.stackPartitions,12)),C=Math.round(Ae(o.slicePartitions,64)),y=Ae(o.vertexFormat,Wr.DEFAULT);this._angle=A,this._radius=f,this._stackPartitions=m,this._slicePartitions=C,this._vertexFormat=y}Die.fromDimensions=function(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.angle,f=o.radius,m=o.height,C=o.stackPartitions,y=o.slicePartitions;return new Die({angle:A,radius:f,stackPartitions:C,slicePartitions:y,vertexFormat:o.vertexFormat})};Die.createGeometry=function(o){console.time("createGeometry");let A=o._angle,f=o._radius,m=o._stackPartitions+1,C=o._slicePartitions+1,y=o._vertexFormat,x=new yc,v,E=3*(C-1)+6*(C-1)*(m-2)+(C-1)*1*3,I=m*C,w=Nn.createTypedArray(I,E),Q=new Float64Array(I*3+(C-1)*3*3);if(y.position){let F=0,L=new Array(C),R=new Array(C);for(let k=0;k<C;k++){let U=je.TWO_PI*k/(C-1);L[k]=p7e(U),R[k]=m7e(U),Q[F++]=0,Q[F++]=0,Q[F++]=-f}for(i=1;i<m;i++){let k=A*i/(m-1),U=m7e(k),V=f*U,H=f*U,q=f*p7e(k);for(let ie=0;ie<C;ie++)Q[F++]=L[ie]*V,Q[F++]=R[ie]*H,Q[F++]=-q}v=F;for(let k=0;k<C-1;k++)Q[F++]=0,Q[F++]=0,Q[F++]=0,Q[F++]=Q[v-(C-k-1)*3],Q[F++]=Q[v-(C-k-1)*3+1],Q[F++]=Q[v-(C-k-1)*3+2],Q[F++]=Q[v-(C-k)*3],Q[F++]=Q[v-(C-k)*3+1],Q[F++]=Q[v-(C-k)*3+2];x.position=new Yr({componentDatatype:ei.DOUBLE,componentsPerAttribute:3,values:Q})}let M=0;for(let F=0;F<C-1;F++)w[M++]=C+F,w[M++]=C+F+1,w[M++]=F+1;let B,T;for(let F=1;F<m-1;F++){B=F*C,T=(F+1)*C;for(let L=0;L<C-1;L++)w[M++]=T+L,w[M++]=T+L+1,w[M++]=B+L+1,w[M++]=T+L,w[M++]=B+L+1,w[M++]=B+L}for(let F=0,L=(C-1)*3;F<L;F++)w[M++]=F+v/3;let D=new Zo({attributes:x,indices:w,primitiveType:yn.TRIANGLES,boundingSphere:new wi(ee.ZERO,f)});return D=rc.computeNormal(D),console.timeEnd("createGeometry"),D};var Tie=Die,U$=Math.cos,G$=Math.sin;function glt(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.angle,f=o.radius,m=Math.round(Ae(o.stackPartitions,10)),C=Math.round(Ae(o.slicePartitions,8)),y=Math.round(Ae(o.subdivisions,128));this._angle=A,this._radius=f,this._stackPartitions=m,this._slicePartitions=C,this._subdivisions=y}glt.createGeometry=function(o){let A=o._angle,f=o._radius;if(f<=0||A<=0)return;let m=o._stackPartitions,C=o._slicePartitions,y=o._subdivisions,x=y*(m+C-1),v=x-C+2,E=new Float64Array(v*3),I=Nn.createTypedArray(v,x*2),w,Q,M,B,T,D,F=0,L=new Array(y),R=new Array(y);for(w=0;w<y;w++)M=je.TWO_PI*w/y,L[w]=U$(M),R[w]=G$(M);for(w=1;w<m;w++)for(B=A*w/(m-1),T=U$(B),D=G$(B),Q=0;Q<y;Q++)E[F++]=f*L[Q]*D,E[F++]=f*R[Q]*D,E[F++]=-f*T;for(L.length=C,R.length=C,w=0;w<C;w++)M=je.TWO_PI*w/C,L[w]=U$(M),R[w]=G$(M);for(E[F++]=0,E[F++]=0,E[F++]=-f,w=1;w<y;w++)for(B=A*w/y,T=U$(B),D=G$(B),Q=0;Q<C;Q++)E[F++]=f*L[Q]*D,E[F++]=f*R[Q]*D,E[F++]=-f*T;for(F=0,w=0;w<m-1;++w){let V=w*y;for(Q=0;Q<y-1;++Q)I[F++]=V+Q,I[F++]=V+Q+1;I[F++]=V+y-1,I[F++]=V}let k=y*(m-1);for(Q=1;Q<C+1;++Q)I[F++]=k,I[F++]=k+Q;for(w=0;w<y-2;++w){let V=w*C+1+k,H=(w+1)*C+1+k;for(Q=0;Q<C-1;++Q)I[F++]=H+Q,I[F++]=V+Q;I[F++]=H+C-1,I[F++]=V+C-1}let U=new yc({position:new Yr({componentDatatype:ei.DOUBLE,componentsPerAttribute:3,values:E})});return new Zo({attributes:U,indices:I,primitiveType:yn.LINES,boundingSphere:new wi(ee.ZERO,f)})};var Mie=glt;function gW(o){let A=this;if(!O(o))throw new Ui("viewer is required.");this._earthCtrl=o;let f=o.coreMap.scene;this._scene=f;let m=o.coreMap.clock;this._clock=m,this._primitives=f.primitives,this._primitive=void 0,this._outlinePrimitive=void 0,this._conicArcSensorCollection=[],m.onTick.addEventListener(function(){A.update()})}var s0e=new ci,l0e=new Xe,N2i=new ee,k2i=new ee,C7e=new ee,y7e=new jr;gW.prototype.add=function(o){return o instanceof Sie||(o=new Sie(o)),this._conicArcSensorCollection.push(o),o};gW.prototype.remove=function(o){let A=this._conicArcSensorCollection.indexOf(o);A!==-1&&this._conicArcSensorCollection.splice(A,1)};gW.prototype.removeAll=function(){this._conicArcSensorCollection.length=0};gW.prototype.update=function(){let o=this._clock.currentTime,A=this._conicArcSensorCollection,f=this._primitives,m=this._primitive,C=this._outlinePrimitive,y=[],x=[];O(m)&&f.removeAndDestroy(m),O(C)&&f.removeAndDestroy(C);for(let v=0,E=A.length;v<E;v++){let I=A[v],w=I._conicArcSensor;if(!Nt.getValueOrDefault(w.show,o,!0))continue;let Q=w.angle,M=w.radius,B=w.stack,T=w.slice;if(!O(Q)||!Nt.getValueOrDefault(I.show,o,!0))continue;let D=Nt.getValueOrUndefined(I.position,o,N2i);if(!O(D))continue;let F,L=w.gaze;if(O(L)){let ie=Nt.getValueOrUndefined(L.position,o,k2i);if(!O(D)||!O(ie))continue;let Z=ee.subtract(D,ie,C7e),oe=ee.angleBetween(ee.UNIT_Z,Z),ne=ee.cross(ee.UNIT_Z,Z,C7e),se=jr.fromAxisAngle(ne,oe,y7e),ce=ee.distance(D,ie);M=1,F=Xe.fromRotationTranslation(ci.multiplyByScalar(ci.fromQuaternion(se,s0e),ce,s0e),D,l0e)}else{let ie=Nt.getValueOrUndefined(I.orientation,o,y7e);O(ie)?F=Xe.fromRotationTranslation(ci.fromQuaternion(ie,s0e),D,l0e):F=zn.eastNorthUpToFixedFrame(D,void 0,l0e)}if(!O(F))continue;let R=I._geometry;if(!O(R)){let ie;ie=new Tie({vertexFormat:Wr.POSITION_AND_NORMAL,angle:Q,radius:M,stackPartitions:B,slicePartitions:T}),I._geometry=Tie.createGeometry(ie),R=I._geometry}let k=w.color,U=w.outline,V=w.outlineWidth;O(V)||(V=1);let H=w.outlineColor;O(H)||(H=At.WHITE);let q=new co({geometry:R,modelMatrix:F,attributes:{color:Yo.fromColor(k)}});if(y.push(q),U){let ie=I._outlineGeometry;if(!O(ie)){let oe;oe=new Mie({vertexFormat:Wr.POSITION_ONLY,angle:Q,radius:M}),I._outlineGeometry=Mie.createGeometry(oe),ie=I._outlineGeometry}let Z=new co({geometry:ie,modelMatrix:F,attributes:{color:Yo.fromColor(H)}});x.push(Z)}}y.length>0&&(this._primitive=this._primitives.add(new Xa({asynchronous:!1,geometryInstances:y,appearance:new Va({flat:!1,translucent:!0,closed:!0})}))),x.length>0&&(this._outlinePrimitive=this._primitives.add(new Xa({asynchronous:!1,geometryInstances:x,appearance:new Va({flat:!0,translucent:!0,renderState:{lineWidth:this._scene.clampLineWidth(outlineWidth)}})})))};var plt=gW;function ZK(o){this._show=void 0,this._radius=void 0,this._xHalfAngle=void 0,this._yHalfAngle=void 0,this._lineColor=void 0,this._showSectorLines=void 0,this._showSectorSegmentLines=void 0,this._showLateralSurfaces=void 0,this._material=void 0,this._showDomeSurfaces=void 0,this._showDomeLines=void 0,this._showIntersection=void 0,this._intersectionColor=void 0,this._intersectionWidth=void 0,this._showThroughEllipsoid=void 0,this._gaze=void 0,this._showScanPlane=void 0,this._scanPlaneColor=void 0,this._scanPlaneMode=void 0,this._scanPlaneRate=void 0,this._definitionChanged=new br,this.merge(Ae(o,Ae.EMPTY_OBJECT))}Object.defineProperties(ZK.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:Bi("show"),radius:Bi("radius"),xHalfAngle:Bi("xHalfAngle"),yHalfAngle:Bi("yHalfAngle"),lineColor:Bi("lineColor"),showSectorLines:Bi("showSectorLines"),showSectorSegmentLines:Bi("showSectorSegmentLines"),showLateralSurfaces:Bi("showLateralSurfaces"),material:hy("material"),showDomeSurfaces:Bi("showDomeSurfaces"),showDomeLines:Bi("showDomeLines "),showIntersection:Bi("showIntersection"),intersectionColor:Bi("intersectionColor"),intersectionWidth:Bi("intersectionWidth"),showThroughEllipsoid:Bi("showThroughEllipsoid"),gaze:Bi("gaze"),showScanPlane:Bi("showScanPlane"),scanPlaneColor:Bi("scanPlaneColor"),scanPlaneMode:Bi("scanPlaneMode"),scanPlaneRate:Bi("scanPlaneRate")});ZK.prototype.clone=function(o){return O(o)||(o=new ZK),o.show=this.show,o.radius=this.radius,o.xHalfAngle=this.xHalfAngle,o.yHalfAngle=this.yHalfAngle,o.lineColor=this.lineColor,o.showSectorLines=this.showSectorLines,o.showSectorSegmentLines=this.showSectorSegmentLines,o.showLateralSurfaces=this.showLateralSurfaces,o.material=this.material,o.showDomeSurfaces=this.showDomeSurfaces,o.showDomeLines=this.showDomeLines,o.showIntersection=this.showIntersection,o.intersectionColor=this.intersectionColor,o.intersectionWidth=this.intersectionWidth,o.showThroughEllipsoid=this.showThroughEllipsoid,o.gaze=this.gaze,o.showScanPlane=this.showScanPlane,o.scanPlaneColor=this.scanPlaneColor,o.scanPlaneMode=this.scanPlaneMode,o.scanPlaneRate=this.scanPlaneRate,o};ZK.prototype.merge=function(o){if(!O(o))throw new Ui("source is required.");this.show=Ae(this.show,o.show),this.radius=Ae(this.radius,o.radius),this.xHalfAngle=Ae(this.xHalfAngle,o.xHalfAngle),this.yHalfAngle=Ae(this.yHalfAngle,o.yHalfAngle),this.lineColor=Ae(this.lineColor,o.lineColor),this.showSectorLines=Ae(this.showSectorLines,o.showSectorLines),this.showSectorSegmentLines=Ae(this.showSectorSegmentLines,o.showSectorSegmentLines),this.showLateralSurfaces=Ae(this.showLateralSurfaces,o.showLateralSurfaces),this.material=Ae(this.material,o.material),this.showDomeSurfaces=Ae(this.showDomeSurfaces,o.showDomeSurfaces),this.showDomeLines=Ae(this.showDomeLines,o.showDomeLines),this.showIntersection=Ae(this.showIntersection,o.showIntersection),this.intersectionColor=Ae(this.intersectionColor,o.intersectionColor),this.intersectionWidth=Ae(this.intersectionWidth,o.intersectionWidth),this.showThroughEllipsoid=Ae(this.showThroughEllipsoid,o.showThroughEllipsoid),this.gaze=Ae(this.gaze,o.gaze),this.showScanPlane=Ae(this.showScanPlane,o.showScanPlane),this.scanPlaneColor=Ae(this.scanPlaneColor,o.scanPlaneColor),this.scanPlaneMode=Ae(this.scanPlaneMode,o.scanPlaneMode),this.scanPlaneRate=Ae(this.scanPlaneRate,o.scanPlaneRate)};var mlt=ZK,O2i={encNONE:0,enrS3TCDXTN:14,enrPVRTPF_PVRTC2:19,enrPVRTPF_PVRTC:20,enrPVRTPF_PVRTC_4bpp:21,enrPVRTPF_ETC1:22},Clt=Object.freeze(O2i),U2i={LUMINANCE_8:1,LUMINANCE_16:2,ALPHA:3,ALPHA_4_LUMINANCE_4:4,LUMINANCE_ALPHA:5,RGB_565:6,BGR565:7,RGB:10,BGR:11,ARGB:12,ABGR:13,BGRA:14,WEBP:25,RGBA:28,DXT1:17,DXT2:18,DXT3:19,DXT4:20,DXT5:21},ylt=Object.freeze(U2i);function G2i(o,A,f){let m;try{return m=o(A,f),m}catch(C){return Promise.reject(C)}}function H2i(o){let A;return function(f){let m=f.data,C=[],y={id:m.id,result:void 0,error:void 0};return Promise.resolve(G2i(o,m.parameters,C)).then(function(x){y.result=x}).catch(function(x){x instanceof Error?y.error={name:x.name,message:x.message,stack:x.stack}:y.error=x}).finally(function(){O(A)||(A=Ae(self.webkitPostMessage,self.postMessage)),m.canTransferArrayBuffer||(C.length=0);try{A(y,C)}catch(x){y.result=void 0,y.error=`postMessage failed with error: ${D5(x)}
  with responseMessage: ${JSON.stringify(y)}`,A(y)}})}}var xlt=H2i,vlt="1.99";var _r={};f5e(_r,{AlphaMode:()=>w8,AlphaPipelineStage:()=>hBe,Animation:()=>dwe,AnimationViewModel:()=>fwe,Appearance:()=>Sd,ApproximateTerrainHeights:()=>ZA,ArcGISTiledElevationTerrainProvider:()=>_at,ArcGisMapServerImageryProvider:()=>Xb,ArcType:()=>Pa,ArticulationStageType:()=>b_,AssociativeArray:()=>Vo,AttributeCompression:()=>Mu,AttributeType:()=>Is,AutoExposure:()=>Hbe,AutomaticUniforms:()=>_G,Axis:()=>vp,AxisAlignedBoundingBox:()=>CY,B3dmLoader:()=>v_e,B3dmParser:()=>y_e,Base64Encoder:()=>Lee,BaseLayerPicker:()=>pwe,BaseLayerPickerViewModel:()=>gwe,BatchTable:()=>ure,BatchTableHierarchy:()=>Bne,BatchTexture:()=>Q1,BatchTexturePipelineStage:()=>dBe,Billboard:()=>Zh,BillboardCollection:()=>iI,BillboardGraphics:()=>eP,BillboardVisualizer:()=>eIe,BingMapsApi:()=>Bat,BingMapsGeocoderService:()=>bat,BingMapsImageryProvider:()=>vwe,BingMapsStyle:()=>xwe,BlendEquation:()=>sx,BlendFunction:()=>RA,BlendOption:()=>tf,BlendTexture:()=>q8,BlendingState:()=>Bu,BoundingRectangle:()=>Kr,BoundingSphere:()=>wi,BoundingSphereState:()=>ro,BoxEmitter:()=>_st,BoxGeometry:()=>LM,BoxGeometryUpdater:()=>tIe,BoxGraphics:()=>hre,BoxOutlineGeometry:()=>r2,BrdfLutGenerator:()=>Xwe,Buffer:()=>vo,BufferLoader:()=>qY,BufferUsage:()=>ln,CPUStylingPipelineStage:()=>mBe,CallbackProperty:()=>Bn,Camera:()=>Ml,CameraEventAggregator:()=>$be,CameraEventType:()=>Bc,CameraFlightPath:()=>DEe,Cartesian2:()=>Bt,Cartesian3:()=>ee,Cartesian4:()=>ai,Cartographic:()=>Kt,CartographicGeocoderService:()=>bQe,CatmullRomSpline:()=>Qat,Cesium3DContentGroup:()=>Lne,Cesium3DTile:()=>Ov,Cesium3DTileBatchTable:()=>fJ,Cesium3DTileColorBlendMode:()=>bD,Cesium3DTileContent:()=>Bst,Cesium3DTileContentFactory:()=>Une,Cesium3DTileContentState:()=>FA,Cesium3DTileContentType:()=>Bv,Cesium3DTileFeature:()=>Ds,Cesium3DTileFeatureTable:()=>M6,Cesium3DTileOptimizationHint:()=>ZL,Cesium3DTileOptimizations:()=>Y1e,Cesium3DTilePass:()=>Ep,Cesium3DTilePassState:()=>wP,Cesium3DTilePointFeature:()=>Rk,Cesium3DTileRefine:()=>Ay,Cesium3DTileStyle:()=>gY,Cesium3DTileStyleEngine:()=>j1e,Cesium3DTilesInspector:()=>wDe,Cesium3DTilesInspectorViewModel:()=>BDe,Cesium3DTileset:()=>Fx,Cesium3DTilesetCache:()=>J1e,Cesium3DTilesetGraphics:()=>mre,Cesium3DTilesetHeatmap:()=>W1e,Cesium3DTilesetMetadata:()=>K1e,Cesium3DTilesetMostDetailedTraversal:()=>Gne,Cesium3DTilesetStatistics:()=>Wk,Cesium3DTilesetTraversal:()=>fN,Cesium3DTilesetVisualizer:()=>Z1e,CesiumInspector:()=>QDe,CesiumInspectorViewModel:()=>bDe,CesiumNavigation:()=>PSe,CesiumRenderPass:()=>RSe,CesiumTerrainProvider:()=>MJ,CesiumWidget:()=>JJ,Check:()=>of,CheckerboardMaterialProperty:()=>oie,CircleEmitter:()=>cDe,CircleGeometry:()=>Sat,CircleOutlineGeometry:()=>Dat,CircleWaveMaterialProperty:()=>X8,ClassificationModelDrawCommand:()=>U_e,ClassificationPipelineStage:()=>fBe,ClassificationPrimitive:()=>a6,ClassificationType:()=>Gu,ClearCommand:()=>eA,ClippingPlane:()=>kM,ClippingPlaneCollection:()=>rB,Clock:()=>z5,ClockRange:()=>aC,ClockStep:()=>Jh,ClockViewModel:()=>_Qe,CloudCollection:()=>Mst,CloudType:()=>_ie,CollectionSource:()=>rJe,Color:()=>At,ColorBlendMode:()=>HD,ColorGeometryInstanceAttribute:()=>Yo,ColorMaterialProperty:()=>Fa,Command:()=>gat,ComponentDatatype:()=>ei,Composite3DTileContent:()=>g1e,CompositeEntityCollection:()=>Vot,CompositeMaterialProperty:()=>sie,CompositePositionProperty:()=>U_,CompositeProperty:()=>P1,CompressedTextureBuffer:()=>rY,ComputeCommand:()=>B5,ComputeEngine:()=>Hwe,ConditionsExpression:()=>mve,ConeEmitter:()=>EH,ConicArcSensor:()=>Sie,ConicArcSensorCollection:()=>plt,ConicArcSensorGeometry:()=>Tie,ConicArcSensorGraphics:()=>Qie,ConicArcSensorOutlineGeometry:()=>Mie,ConstantPositionProperty:()=>_D,ConstantProperty:()=>bc,ConstantSpline:()=>b_e,ConstructionWorker:()=>oJe,ContentMetadata:()=>F1e,ContentState:()=>yD,Context:()=>jwe,ContextLimits:()=>Co,CoplanarPolygonGeometry:()=>mIe,CoplanarPolygonGeometryLibrary:()=>OG,CoplanarPolygonOutlineGeometry:()=>eM,CornerType:()=>qA,CorridorGeometry:()=>OY,CorridorGeometryLibrary:()=>Uc,CorridorGeometryUpdater:()=>nIe,CorridorGraphics:()=>dre,CorridorOutlineGeometry:()=>rIe,Credit:()=>tl,CreditDisplay:()=>Zwe,CubeMap:()=>uQ,CubeMapFace:()=>TL,CubicRealPolynomial:()=>mY,CullFace:()=>mA,CullingVolume:()=>AC,CumulusCloud:()=>MQ,CustomDataSource:()=>xre,CustomHeightmapTerrainProvider:()=>Tat,CustomMercatorProjection:()=>e6,CustomShader:()=>ZM,CustomShaderManagerEx:()=>nre,CustomShaderMode:()=>dY,CustomShaderPipelineStage:()=>_Be,CustomShaderTranslucencyMode:()=>wF,CustomTilingScheme:()=>UJe,CylinderGeometry:()=>oIe,CylinderGeometryLibrary:()=>$re,CylinderGeometryUpdater:()=>sIe,CylinderGraphics:()=>fre,CylinderOutlineGeometry:()=>aIe,CzmlDataSource:()=>eW,DDSTexture:()=>JSe,DataSource:()=>cy,DataSourceClock:()=>A5,DataSourceCollection:()=>ZEe,DataSourceDisplay:()=>EJ,DebugAppearance:()=>Nst,DebugCameraPrimitive:()=>_g,DebugInspector:()=>uQe,DebugModelMatrixPrimitive:()=>fDe,DefaultProxy:()=>HEe,DepthFunction:()=>nI,DepthPlane:()=>tbe,DequantizationPipelineStage:()=>BBe,DerivedCommand:()=>fx,DeveloperError:()=>Ui,DeviceOrientationCameraController:()=>ibe,DirectionalLight:()=>Cae,DiscardEmptyTileImagePolicy:()=>noe,DiscardMissingTileImagePolicy:()=>Cwe,DistanceDisplayCondition:()=>$o,DistanceDisplayConditionGeometryInstanceAttribute:()=>xA,DistanceLegendViewModel:()=>_Se,DoubleEndedPriorityQueue:()=>Rat,DoublyLinkedList:()=>Jne,DracoLoader:()=>XY,DrawCommand:()=>On,DynamicGeometryBatch:()=>ene,DynamicGeometryUpdater:()=>vA,ECharts:()=>HJe,EarthOrientationParameters:()=>xCe,EarthOrientationParametersSample:()=>oY,EasingFunction:()=>Ix,EllipseGeometry:()=>W1,EllipseGeometryLibrary:()=>iB,EllipseGeometryUpdater:()=>lIe,EllipseGraphics:()=>gre,EllipseOutlineGeometry:()=>UD,Ellipsoid:()=>Ti,EllipsoidGeodesic:()=>l0,EllipsoidGeometry:()=>gC,EllipsoidGeometryUpdater:()=>hIe,EllipsoidGraphics:()=>l6,EllipsoidOutlineGeometry:()=>J1,EllipsoidPrimitive:()=>Gwe,EllipsoidRhumbLine:()=>k1,EllipsoidSurfaceAppearance:()=>DY,EllipsoidTangentPlane:()=>tQ,EllipsoidTerrainProvider:()=>IP,EllipsoidalOccluder:()=>L5,Empty3DTileContent:()=>PK,EncodedCartesian3:()=>Pu,Entity:()=>kA,EntityCluster:()=>tN,EntityCollection:()=>iw,EntityView:()=>qne,Event:()=>br,EventHelper:()=>Mx,ExpandBySmartEarth:()=>UE,ExpandByTerra:()=>VJe,Expression:()=>bF,ExpressionNodeType:()=>jn,ExternalParameter:()=>px,ExtrapolationType:()=>mD,FeatureDataProvider:()=>Rre,FeatureDetection:()=>Mo,FeatureIdPipelineStage:()=>AJ,FeatureJsonData:()=>p6,FisheyeProjectionMap:()=>LY,FisheyeProjectionMapShader:()=>p7,FlattenVS:()=>Y_e,FlowEcharts:()=>cae,Fog:()=>rbe,ForEach:()=>Vr,FrameRateMonitor:()=>gDe,FrameState:()=>nbe,Framebuffer:()=>Bp,FramebufferManager:()=>Wh,FrustumCommands:()=>ube,FrustumGeometry:()=>m6,FrustumOutlineGeometry:()=>RY,Fullscreen:()=>yp,FullscreenButton:()=>wQe,FullscreenButtonViewModel:()=>BQe,GWBaiduImageryProvider:()=>Hre,GeoJsonDataSource:()=>gK,GeoJsonLoader:()=>__e,GeocodeType:()=>jJ,Geocoder:()=>MQe,GeocoderService:()=>Fat,GeocoderViewModel:()=>TQe,GeographicProjection:()=>Dg,GeographicTilingScheme:()=>af,Geometry:()=>Zo,Geometry3DTileContent:()=>p1e,GeometryAttribute:()=>Yr,GeometryAttributes:()=>yc,GeometryFactory:()=>kat,GeometryInstance:()=>co,GeometryInstanceAttribute:()=>k_,GeometryOffsetAttribute:()=>Cl,GeometryPipeline:()=>rc,GeometryPipelineStage:()=>QBe,GeometryType:()=>HL,GeometryUpdater:()=>th,GeometryVisualizer:()=>PIe,GetFeatureInfoFormat:()=>S7,GifImageProperty:()=>rXe,Globe:()=>Coe,GlobeDepth:()=>cbe,GlobeSurfaceShaderSet:()=>Mwe,GlobeSurfaceTile:()=>zM,GlobeSurfaceTileProvider:()=>Lwe,GlobeTranslucency:()=>PJ,GlobeTranslucencyFramebuffer:()=>Abe,GlobeTranslucencyState:()=>abe,GltfBufferViewLoader:()=>une,GltfDracoLoader:()=>cne,GltfImageLoader:()=>hne,GltfIndexBufferLoader:()=>dne,GltfJsonLoader:()=>pne,GltfLoader:()=>nJ,GltfLoaderUtil:()=>OM,GltfStructuralMetadataLoader:()=>c_e,GltfTextureLoader:()=>mne,GltfVertexBufferLoader:()=>Cne,GoogleEarthEnterpriseImageryProvider:()=>kst,GoogleEarthEnterpriseMapsProvider:()=>Iwe,GoogleEarthEnterpriseMetadata:()=>IN,GoogleEarthEnterpriseTerrainData:()=>yie,GoogleEarthEnterpriseTerrainProvider:()=>zat,GoogleEarthEnterpriseTileInformation:()=>GSe,GpxDataSource:()=>fSe,Graticules:()=>oXe,GraticulesImageryProvider:()=>m5,GregorianDate:()=>Z8,GridImageryProvider:()=>Ost,GridMaterialProperty:()=>lie,GroundGeometryUpdater:()=>Xl,GroundPolylineGeometry:()=>are,GroundPolylinePrimitive:()=>o6,GroundPrimitive:()=>oN,GroupMetadata:()=>Fte,GwBufferAnalysis:()=>Vre,HeadingPitchRange:()=>Ex,HeadingPitchRoll:()=>dC,Heap:()=>Fme,HeightReference:()=>xn,HeightmapEncoding:()=>VF,HeightmapTerrainData:()=>bQ,HeightmapTessellator:()=>toe,HermitePolynomialApproximation:()=>eSe,HermiteSpline:()=>QK,HilbertOrder:()=>Tte,HomeButton:()=>RQe,HomeButtonViewModel:()=>PQe,HorizontalOrigin:()=>tA,HugeAdapter:()=>k6,I3SDataProvider:()=>Ust,I3SFeature:()=>CDe,I3SField:()=>yDe,I3SGeometry:()=>Bie,I3SLayer:()=>bie,I3SNode:()=>wie,I3dmLoader:()=>w_e,I3dmParser:()=>B_e,Iau2000Orientation:()=>kwe,Iau2006XysData:()=>ECe,Iau2006XysSample:()=>Jie,IauOrientationAxes:()=>Owe,IauOrientationParameters:()=>Nwe,ImageBasedLighting:()=>_ne,ImageBasedLightingPipelineStage:()=>q_e,ImageCombine:()=>tre,ImageMaterialProperty:()=>V0,Imagery:()=>Xne,ImageryLayer:()=>dD,ImageryLayerCollection:()=>Fwe,ImageryLayerFeatureInfo:()=>pN,ImageryProvider:()=>a2,ImageryState:()=>sc,Implicit3DTileContent:()=>Lte,ImplicitAvailabilityBitstream:()=>Pte,ImplicitMetadataView:()=>Nne,ImplicitSubdivisionScheme:()=>uC,ImplicitSubtree:()=>v1e,ImplicitSubtreeMetadata:()=>x1e,ImplicitTileCoordinates:()=>X1e,ImplicitTileset:()=>q1e,IndexDatatype:()=>Nn,InfoBox:()=>NQe,InfoBoxViewModel:()=>FQe,InspectorShared:()=>z8,InstanceAttributeSemantic:()=>nC,InstancingPipelineStage:()=>sBe,InterpolationAlgorithm:()=>Kat,InterpolationType:()=>oF,Intersect:()=>La,IntersectionTests:()=>Xh,Intersections2D:()=>Z6,Interval:()=>fD,InvertClassification:()=>_oe,Ion:()=>xF,IonGeocoderService:()=>DQe,IonImageryProvider:()=>JG,IonResource:()=>jk,IonWorldImageryStyle:()=>WG,Iso8601:()=>Cn,JobScheduler:()=>sbe,JobType:()=>KE,JsonMetadataTable:()=>KY,JulianDate:()=>fi,KTX2Transcoder:()=>Ome,KeyboardEventModifier:()=>eI,KmlCamera:()=>Xve,KmlDataSource:()=>Pre,KmlLookAt:()=>Zve,KmlTour:()=>$ve,KmlTourFlyTo:()=>eEe,KmlTourWait:()=>iEe,Label:()=>V7,LabelCollection:()=>qM,LabelGraphics:()=>u6,LabelStyle:()=>pA,LabelVisualizer:()=>RIe,LagrangePolynomialApproximation:()=>iSe,LeapSecond:()=>$c,Light:()=>Hst,LightingModel:()=>rI,LightingPipelineStage:()=>DBe,LinearApproximation:()=>Qre,LinearSampler:()=>s2,LinearSpline:()=>cJ,MVTImageryProvider:()=>dXe,ManagedArray:()=>GM,MapMode2D:()=>nQ,MapProjection:()=>jat,MapWidget:()=>clt,MapboxApi:()=>Wat,MapboxImageryProvider:()=>bJ,MapboxStyleImageryProvider:()=>zst,Material:()=>as,MaterialAppearance:()=>Ig,MaterialPass:()=>jSe,MaterialPipelineStage:()=>MBe,MaterialProperty:()=>sC,Math:()=>je,Matrix2:()=>n0,Matrix3:()=>ci,Matrix4:()=>Xe,MetadataClass:()=>Q6,MetadataClassProperty:()=>WY,MetadataComponentType:()=>$s,MetadataEntity:()=>su,MetadataEnum:()=>s_e,MetadataEnumValue:()=>a_e,MetadataPipelineStage:()=>IM,MetadataSchema:()=>rO,MetadataSchemaLoader:()=>yne,MetadataSemantic:()=>E1e,MetadataTable:()=>tO,MetadataTableProperty:()=>GIe,MetadataType:()=>Zs,MipmapHint:()=>j8,Model:()=>cI,Model3DTileContent:()=>NL,ModelAlphaOptions:()=>qBe,ModelAnimation:()=>P_e,ModelAnimationChannel:()=>T_e,ModelAnimationCollection:()=>R_e,ModelAnimationLoop:()=>Gb,ModelAnimationState:()=>UL,ModelArticulation:()=>$_e,ModelArticulationStage:()=>Z_e,ModelClippingPlanesPipelineStage:()=>iBe,ModelColorPipelineStage:()=>SK,ModelComponents:()=>ta,ModelDrawCommand:()=>G_e,ModelFeature:()=>L_e,ModelFeatureTable:()=>F_e,ModelGraphics:()=>xY,ModelLightingOptions:()=>u1e,ModelMatrixUpdateStage:()=>uBe,ModelNode:()=>rBe,ModelRenderResources:()=>i1e,ModelRuntimeNode:()=>ABe,ModelRuntimePrimitive:()=>JBe,ModelSceneGraph:()=>A1e,ModelSilhouettePipelineStage:()=>o1e,ModelSkin:()=>jBe,ModelSplitterPipelineStage:()=>s1e,ModelStatistics:()=>h1e,ModelType:()=>z0,ModelUtility:()=>au,ModelVisualizer:()=>f1e,Moon:()=>xoe,MorphTargetsPipelineStage:()=>RBe,MorphWeightSpline:()=>qat,MortonOrder:()=>S8,MultiResourceImageryProvider:()=>zre,MultiResourceTerrainProvider:()=>Kre,Multiple3DTileContent:()=>G1e,MultisampleFramebuffer:()=>m_e,NavigationControl:()=>AH,NavigationHelpButton:()=>OQe,NavigationHelpButtonViewModel:()=>kQe,NavigationUtils:()=>hH,NavigationViewModel:()=>R7,NearFarScalar:()=>To,NeverTileDiscardPolicy:()=>Kst,NodeRenderResources:()=>l1e,NodeStatisticsPipelineStage:()=>cBe,NodeTransformationProperty:()=>pre,OIT:()=>gbe,Occluder:()=>Gre,OctahedralProjectedCubeMap:()=>b5,OffsetGeometryInstanceAttribute:()=>a0,OlMVTImageryProvider:()=>Jre,OpenCageGeocoderService:()=>Xat,OpenStreetMapImageryProvider:()=>D7,OrderedGroundPrimitiveCollection:()=>$Ee,OrientedBoundingBox:()=>Hf,OrthographicFrustum:()=>Ss,OrthographicOffCenterFrustum:()=>K0,Packable:()=>Zat,PackableForInterpolation:()=>$at,Particle:()=>yae,ParticleBurst:()=>BH,ParticleEmitter:()=>Wst,ParticleSystem:()=>_2,Pass:()=>hr,PassState:()=>cm,PathGraphics:()=>vY,PathVisualizer:()=>$1e,PeliasGeocoderService:()=>SQe,PerInstanceColorAppearance:()=>Va,PerformanceDisplay:()=>OJ,PerformanceWatchdog:()=>MDe,PerformanceWatchdogViewModel:()=>TDe,PerspectiveFrustum:()=>Yu,PerspectiveOffCenterFrustum:()=>n2,PerspectiveProjectionMap:()=>FY,PerspectiveProjectionMapShader:()=>m7,PerspectiveProjectionMapWithDepth:()=>NY,PerspectiveProjectionMapWithDepthShader:()=>nF,PickDepth:()=>lbe,PickDepthFramebuffer:()=>pbe,PickFramebuffer:()=>mbe,PickGlobeSlope:()=>Bot,Picking:()=>Ibe,PickingPipelineStage:()=>LBe,PinBuilder:()=>BY,PixelDatatype:()=>Qn,PixelFormat:()=>Gn,Plane:()=>Ja,PlaneGeometry:()=>dIe,PlaneGeometryUpdater:()=>pIe,PlaneGraphics:()=>Ove,PlaneOutlineGeometry:()=>fIe,PntsLoader:()=>d1e,PntsParser:()=>Rne,PointCloud:()=>uwe,PointCloudEyeDomeLighting:()=>aJ,PointCloudShading:()=>T6,PointCloudStylingPipelineStage:()=>NBe,PointGraphics:()=>Cre,PointPrimitive:()=>Tx,PointPrimitiveCollection:()=>sY,PointVisualizer:()=>ewe,PolygonDepth:()=>b8,PolygonDepthFS:()=>Sne,PolygonDepthVS:()=>Dne,PolygonGeometry:()=>eh,PolygonGeometryLibrary:()=>ql,PolygonGeometryUpdater:()=>yIe,PolygonGraphics:()=>yl,PolygonHierarchy:()=>Un,PolygonOutlineGeometry:()=>CIe,PolygonPipeline:()=>yA,Polyline:()=>t2,PolylineArrowMaterialProperty:()=>vK,PolylineCollection:()=>Y5,PolylineColorAppearance:()=>ly,PolylineDashMaterialProperty:()=>Vl,PolylineGeometry:()=>Vk,PolylineGeometryUpdater:()=>twe,PolylineGlowMaterialProperty:()=>uie,PolylineGraphics:()=>FD,PolylineMaterialAppearance:()=>L_,PolylineOutlineMaterialProperty:()=>JM,PolylinePipeline:()=>jA,PolylineTrailLinkMaterialProperty:()=>wot,PolylineVisualizer:()=>rwe,PolylineVolumeGeometry:()=>xIe,PolylineVolumeGeometryLibrary:()=>C5,PolylineVolumeGeometryUpdater:()=>EIe,PolylineVolumeGraphics:()=>yre,PolylineVolumeOutlineGeometry:()=>vIe,PositionProperty:()=>yY,PositionPropertyArray:()=>d8,PostProcessStage:()=>va,PostProcessStageCollection:()=>jbe,PostProcessStageComposite:()=>CC,PostProcessStageLibrary:()=>bv,PostProcessStageSampleMode:()=>Dv,PostProcessStageTextureCache:()=>Toe,Primitive:()=>Xa,PrimitiveCollection:()=>MD,PrimitiveLoadPlan:()=>rJ,PrimitiveOutlineGenerator:()=>Ene,PrimitiveOutlinePipelineStage:()=>UBe,PrimitivePipeline:()=>s5,PrimitiveRenderResources:()=>c1e,PrimitiveState:()=>i0,PrimitiveStatisticsPipelineStage:()=>GBe,PrimitiveType:()=>yn,ProjectionPicker:()=>GQe,ProjectionPickerViewModel:()=>UQe,Property:()=>Nt,PropertyArray:()=>oae,PropertyAttribute:()=>lne,PropertyAttributeProperty:()=>kIe,PropertyBag:()=>LD,PropertyTable:()=>AN,PropertyTexture:()=>sne,PropertyTextureProperty:()=>FIe,ProviderViewModel:()=>fp,Proxy:()=>ist,QuadraticRealPolynomial:()=>zb,QuadtreeOccluders:()=>foe,QuadtreePrimitive:()=>BP,QuadtreePrimitivezh:()=>Sot,QuadtreeTile:()=>goe,QuadtreeTileLoadState:()=>mC,QuadtreeTileProvider:()=>jst,QuantizedMeshTerrainData:()=>coe,QuarticRealPolynomial:()=>Eve,Quaternion:()=>jr,QuaternionSpline:()=>S_e,Queue:()=>d5,RasterizeHtml:()=>sH,Ray:()=>ss,Rectangle:()=>Si,RectangleCollisionChecker:()=>nne,RectangleGeometry:()=>GY,RectangleGeometryLibrary:()=>uy,RectangleGeometryUpdater:()=>QIe,RectangleGraphics:()=>c6,RectangleOutlineGeometry:()=>ine,RectangularSensor:()=>jK,RectangularSensorFS:()=>xie,RectangularSensorGraphics:()=>mlt,RectangularSensorPrimitive:()=>KSe,RectangularSensorScanPlaneFS:()=>zSe,RectangularSensorVS:()=>gae,RectangularSensorVisualizer:()=>YSe,ReferenceFrame:()=>s0,ReferenceProperty:()=>QY,RenderEntity:()=>aW,RenderObjectFactory:()=>Vc,RenderState:()=>fn,Renderbuffer:()=>G_,RenderbufferFormat:()=>qE,Request:()=>cC,RequestErrorEvent:()=>r5,RequestScheduler:()=>V1,RequestState:()=>CA,RequestType:()=>oB,ResetViewNavigationControl:()=>bSe,Resource:()=>An,ResourceCache:()=>sf,ResourceCacheKey:()=>nw,ResourceCacheStatistics:()=>u_e,ResourceLoader:()=>fy,ResourceLoaderState:()=>ha,Rotation:()=>YD,RuntimeError:()=>nr,S2Cell:()=>zG,S3MCacheFileRenderEntity:()=>Iie,S3MCompressType:()=>Clt,S3MContentFactory:()=>iDe,S3MContentParser:()=>rDe,S3MCreateIndexJob:()=>tDe,S3MCreateVertexJob:()=>$Se,S3MDataSource:()=>Pot,S3MLayerCache:()=>nDe,S3MLayerScheduler:()=>oDe,S3MPixelFormat:()=>ylt,S3MTile:()=>sDe,S3MTilesFS:()=>XSe,S3MTilesLayer:()=>pae,S3MTilesVS:()=>qSe,S3ModelParser:()=>aDe,SDFSettings:()=>Qv,SampledPositionProperty:()=>R1,SampledProperty:()=>uM,Sampler:()=>Hs,ScaledPositionProperty:()=>f6,Scene:()=>Loe,SceneFramebuffer:()=>woe,SceneMode:()=>xi,SceneMode2DPipelineStage:()=>HBe,SceneModePicker:()=>VQe,SceneModePickerViewModel:()=>HQe,SceneTransforms:()=>Qs,SceneTransitioner:()=>Zbe,ScreenSpaceCameraController:()=>oQe,ScreenSpaceEventHandler:()=>Ur,ScreenSpaceEventType:()=>Ki,SelectedFeatureIdPipelineStage:()=>DK,SelectionIndicator:()=>KQe,SelectionIndicatorViewModel:()=>zQe,Sensor:()=>hst,ShaderBuilder:()=>t1e,ShaderCache:()=>zwe,ShaderDestination:()=>Sr,ShaderFunction:()=>e1e,ShaderProgram:()=>_s,ShaderSource:()=>Fr,ShaderStruct:()=>ZBe,ShadowMap:()=>vQ,ShadowMapShader:()=>pF,ShadowMode:()=>Al,ShadowVolumeAppearance:()=>gM,ShowGeometryInstanceAttribute:()=>wu,Simon1994PlanetaryPositions:()=>kK,SimplePolylineGeometry:()=>rst,SingleTileImageryProvider:()=>QQ,SkinningPipelineStage:()=>zBe,SkyAtmosphere:()=>aH,SkyBox:()=>CN,SphereEmitter:()=>wH,SphereGeometry:()=>nst,SphereOutlineGeometry:()=>tP,Spherical:()=>rSe,Spline:()=>uf,SplitDirection:()=>uI,Splitter:()=>eoe,SpotLight:()=>Lot,StaticGeometryColorBatch:()=>AM,StaticGeometryPerMaterialBatch:()=>hM,StaticGroundGeometryColorBatch:()=>Ete,StaticGroundGeometryPerMaterialBatch:()=>SIe,StaticGroundPolylinePerMaterialBatch:()=>iwe,StaticOutlineGeometryBatch:()=>Ite,StencilConstants:()=>ca,StencilFunction:()=>Ku,StencilOperation:()=>lo,SteppedSpline:()=>Q_e,StripeMaterialProperty:()=>cie,StripeOrientation:()=>qF,StructuralMetadata:()=>nP,StyleCommandsNeeded:()=>Q5,StyleExpression:()=>qst,Sun:()=>Noe,SunLight:()=>tH,SunPostProcess:()=>lQe,SupportedImageFormats:()=>A_e,SvgPathBindingHandler:()=>hwe,TaskProcessor:()=>Vf,TerrainData:()=>AO,TerrainEncoding:()=>HM,TerrainExaggeration:()=>ID,TerrainFillMesh:()=>hoe,TerrainFlatten:()=>vN,TerrainFlattenPolygonTexture:()=>vSe,TerrainMesh:()=>hO,TerrainOffsetProperty:()=>Zre,TerrainProvider:()=>Cx,TerrainQuantization:()=>Pv,TerrainState:()=>mh,Texture:()=>yo,TextureAtlas:()=>H7,TextureCache:()=>Kwe,TextureMagnificationFilter:()=>Ch,TextureManager:()=>gve,TextureMinificationFilter:()=>fs,TextureUniform:()=>dve,TextureWrap:()=>Za,TileAvailability:()=>$L,TileBoundingRegion:()=>S5,TileBoundingS2Cell:()=>H1e,TileBoundingSphere:()=>yP,TileBoundingVolume:()=>Xst,TileCoordinatesImageryProvider:()=>IDe,TileDiscardPolicy:()=>Zst,TileEdge:()=>Ga,TileImagery:()=>Zne,TileMapServiceImageryProvider:()=>_P,TileMetadata:()=>k1e,TileOrientedBoundingBox:()=>kF,TileProviderError:()=>wc,TileReplacementQueue:()=>moe,TileSelectionResult:()=>sa,TileState:()=>$st,Tileset3DTileContent:()=>_1e,TilesetMetadata:()=>z1e,TilesetPipelineStage:()=>W_e,TilingScheme:()=>ost,TimeConstants:()=>Uu,TimeDynamicImagery:()=>loe,TimeDynamicPointCloud:()=>K6,TimeInterval:()=>el,TimeIntervalCollection:()=>mx,TimeIntervalCollectionPositionProperty:()=>D8,TimeIntervalCollectionProperty:()=>f8,TimeStandard:()=>nu,Timeline:()=>WQe,TimelineHighlightRange:()=>YQe,TimelineTrack:()=>JQe,Tipsify:()=>Mve,ToggleButtonViewModel:()=>xG,Tonemapper:()=>XG,Transforms:()=>zn,TranslationRotationScale:()=>aB,TranslucentTileClassification:()=>ybe,TridiagonalSystemSolver:()=>wne,TrustedServers:()=>Uie,TweenCollection:()=>Poe,UniformState:()=>Ywe,UniformType:()=>pa,UrlTemplateGeojsonProvider:()=>kot,UrlTemplateImageryProvider:()=>sw,UserInterfaceControl:()=>hae,Utils:()=>fQ,VERSION:()=>vlt,VRButton:()=>qQe,VRButtonViewModel:()=>jQe,VRTheWorldTerrainProvider:()=>lst,VaryingType:()=>xx,Vector3DTileBatch:()=>Q8,Vector3DTileClampedPolylines:()=>D1e,Vector3DTileContent:()=>P1e,Vector3DTileGeometry:()=>Bk,Vector3DTilePoints:()=>B1e,Vector3DTilePolygons:()=>w1e,Vector3DTilePolylines:()=>One,Vector3DTilePrimitive:()=>Fne,VelocityOrientationProperty:()=>nSe,VelocityVectorProperty:()=>aae,VertexArray:()=>Hc,VertexArrayFacade:()=>aY,VertexAttributeSemantic:()=>Fo,VertexCompressOption:()=>_1,VertexFormat:()=>Wr,VerticalOrigin:()=>wn,VideoSynchronizer:()=>ast,View:()=>Qoe,ViewShed:()=>Het,ViewShedMap:()=>nH,ViewShedMapShader:()=>EF,Viewer:()=>XJ,ViewportQuad:()=>elt,Visibility:()=>vg,Visualizer:()=>lat,VulkanConstants:()=>ust,WallGeometry:()=>DIe,WallGeometryLibrary:()=>one,WallGeometryUpdater:()=>MIe,WallGraphics:()=>EY,WallOutlineGeometry:()=>TIe,WaterFS:()=>TY,WaterMaterialProperty:()=>Oot,WebGLConstants:()=>Ii,WebMapServiceImageryProvider:()=>DJ,WebMapTileServiceImageryProvider:()=>X6,WebMercatorProjection:()=>NA,WebMercatorTilingScheme:()=>Am,WindingOrder:()=>Z_,WireframeIndexGenerator:()=>Mne,WireframePipelineStage:()=>YBe,ZoomNavigationControl:()=>fie,_shadersAcesTonemappingStage:()=>_be,_shadersAdditiveBlend:()=>aQe,_shadersAdjustTranslucentFS:()=>Wte,_shadersAllMaterialAppearanceFS:()=>mEe,_shadersAllMaterialAppearanceVS:()=>CEe,_shadersAmbientOcclusionGenerate:()=>Bbe,_shadersAmbientOcclusionModulate:()=>wbe,_shadersAspectRampMaterial:()=>Gme,_shadersAtmosphereCommon:()=>R8,_shadersBasicMaterialAppearanceFS:()=>yEe,_shadersBasicMaterialAppearanceVS:()=>xEe,_shadersBillboardCollectionFS:()=>Xxe,_shadersBillboardCollectionVS:()=>Zxe,_shadersBlackAndWhite:()=>bbe,_shadersBloomComposite:()=>Qbe,_shadersBrdfLutGeneratorFS:()=>qwe,_shadersBrightPass:()=>sQe,_shadersBrightness:()=>Sbe,_shadersBumpMapMaterial:()=>Hme,_shadersCPUStylingStageFS:()=>pBe,_shadersCPUStylingStageVS:()=>gBe,_shadersCheckFloatTexturePrecisionFS:()=>dat,_shadersCheckerboardMaterial:()=>Vme,_shadersCloudCollectionFS:()=>gSe,_shadersCloudCollectionVS:()=>pSe,_shadersCloudNoiseFS:()=>mSe,_shadersCloudNoiseVS:()=>CSe,_shadersCompareAndPackTranslucentDepth:()=>Cbe,_shadersCompositeOITFS:()=>hbe,_shadersCompositeTranslucentClassification:()=>T7,_shadersContrastBias:()=>Dbe,_shadersCustomShaderStageFS:()=>yBe,_shadersCustomShaderStageVS:()=>CBe,_shadersCzmBuiltins:()=>a7,_shadersDepthOfField:()=>Tbe,_shadersDepthPlaneFS:()=>$we,_shadersDepthPlaneVS:()=>ebe,_shadersDepthView:()=>Mbe,_shadersDepthViewPacked:()=>rlt,_shadersDotMaterial:()=>zme,_shadersEdgeDetection:()=>Pbe,_shadersElevationBandMaterial:()=>Kme,_shadersElevationContourMaterial:()=>Yme,_shadersElevationRampMaterial:()=>Jme,_shadersEllipsoidFS:()=>Yte,_shadersEllipsoidSurfaceAppearanceFS:()=>IEe,_shadersEllipsoidSurfaceAppearanceVS:()=>_Ee,_shadersEllipsoidVS:()=>Jte,_shadersFXAA:()=>Lbe,_shadersFXAA3_11:()=>Gbe,_shadersFadeMaterial:()=>Wme,_shadersFeatureIdStageFS:()=>xBe,_shadersFeatureIdStageVS:()=>vBe,_shadersFilmicTonemapping:()=>Rbe,_shadersGaussianBlur1D:()=>GK,_shadersGaussianBlur1DSun:()=>zbe,_shadersGeometryStageFS:()=>wBe,_shadersGeometryStageVS:()=>bBe,_shadersGlobeFS:()=>Swe,_shadersGlobeVS:()=>Dwe,_shadersGridMaterial:()=>jme,_shadersGroundAtmosphere:()=>Vte,_shadersHSBToRGB:()=>qye,_shadersHSLToRGB:()=>Xye,_shadersImageBasedLightingStageFS:()=>j_e,_shadersInstancingStageCommon:()=>nBe,_shadersInstancingStageVS:()=>oBe,_shadersLegacyInstancingStageVS:()=>aBe,_shadersLensFlare:()=>Fbe,_shadersLightingStageFS:()=>SBe,_shadersMaterialStageFS:()=>TBe,_shadersMetadataStageFS:()=>EBe,_shadersMetadataStageVS:()=>IBe,_shadersModelClippingPlanesStageFS:()=>tBe,_shadersModelColorStageFS:()=>eBe,_shadersModelFS:()=>N_e,_shadersModelSilhouetteStageFS:()=>r1e,_shadersModelSilhouetteStageVS:()=>n1e,_shadersModelSplitterStageFS:()=>a1e,_shadersModelVS:()=>k_e,_shadersModifiedReinhardTonemapping:()=>Nbe,_shadersMorphTargetsStageVS:()=>PBe,_shadersNightVision:()=>kbe,_shadersNormalMapMaterial:()=>qme,_shadersOctahedralProjectionAtlasFS:()=>d_e,_shadersOctahedralProjectionFS:()=>f_e,_shadersOctahedralProjectionVS:()=>g_e,_shadersPassThrough:()=>KM,_shadersPassThroughDepth:()=>UK,_shadersPerInstanceColorAppearanceFS:()=>Fve,_shadersPerInstanceColorAppearanceVS:()=>Nve,_shadersPerInstanceFlatColorAppearanceFS:()=>sre,_shadersPerInstanceFlatColorAppearanceVS:()=>kve,_shadersPointCloudEyeDomeLighting:()=>C_e,_shadersPointCloudStylingStageVS:()=>FBe,_shadersPointPrimitiveCollectionFS:()=>uG,_shadersPointPrimitiveCollectionVS:()=>tve,_shadersPolylineArrowMaterial:()=>Xme,_shadersPolylineColorAppearanceVS:()=>Qve,_shadersPolylineCommon:()=>U5,_shadersPolylineDashMaterial:()=>Zme,_shadersPolylineFS:()=>lre,_shadersPolylineGlowMaterial:()=>$me,_shadersPolylineMaterialAppearanceVS:()=>Sve,_shadersPolylineOutlineMaterial:()=>eCe,_shadersPolylineShadowVolumeFS:()=>_ve,_shadersPolylineShadowVolumeMorphFS:()=>Bve,_shadersPolylineShadowVolumeMorphVS:()=>wve,_shadersPolylineShadowVolumeVS:()=>bve,_shadersPolylineVS:()=>BEe,_shadersPostProcessRain:()=>nlt,_shadersPostProcessSnow:()=>olt,_shadersPrimitiveOutlineStageFS:()=>OBe,_shadersPrimitiveOutlineStageVS:()=>kBe,_shadersRGBToHSB:()=>Ixe,_shadersRGBToHSL:()=>_xe,_shadersRGBToXYZ:()=>Bxe,_shadersReinhardTonemapping:()=>Obe,_shadersReprojectWebMercatorFS:()=>owe,_shadersReprojectWebMercatorVS:()=>awe,_shadersRimLightingMaterial:()=>tCe,_shadersSelectedFeatureIdStageCommon:()=>Qte,_shadersShadowVolumeAppearanceFS:()=>Are,_shadersShadowVolumeAppearanceVS:()=>Lve,_shadersShadowVolumeFS:()=>q7,_shadersSilhouette:()=>Ube,_shadersSkinningStageVS:()=>VBe,_shadersSkyAtmosphereCommon:()=>$te,_shadersSkyAtmosphereFS:()=>pQe,_shadersSkyAtmosphereVS:()=>mQe,_shadersSkyBoxFS:()=>yQe,_shadersSkyBoxVS:()=>xQe,_shadersSlopeRampMaterial:()=>iCe,_shadersStripeMaterial:()=>rCe,_shadersSunFS:()=>vQe,_shadersSunShaft:()=>alt,_shadersSunShaftHdr:()=>slt,_shadersSunShaftModulate:()=>Vbe,_shadersSunTextureFS:()=>fat,_shadersSunTextureFS_v2:()=>IQe,_shadersSunVS:()=>EQe,_shadersSunVisibleFS:()=>Kbe,_shadersSunVisibleShaft:()=>Ybe,_shadersSunVisibleVS:()=>K_e,_shadersTexturedMaterialAppearanceFS:()=>vEe,_shadersTexturedMaterialAppearanceVS:()=>EEe,_shadersVector3DTileClampedPolylinesFS:()=>S1e,_shadersVector3DTileClampedPolylinesVS:()=>Q1e,_shadersVector3DTilePolylinesVS:()=>b1e,_shadersVectorTileVS:()=>Dte,_shadersViewportQuadFS:()=>ySe,_shadersViewportQuadVS:()=>voe,_shadersWater:()=>nCe,_shadersXYZToRGB:()=>Wxe,_shadersacesTonemapping:()=>xye,_shadersalphaWeight:()=>vye,_shadersantialias:()=>Eye,_shadersapproximateSphericalCoordinates:()=>Iye,_shadersbackFacing:()=>_ye,_shadersbranchFreeTernary:()=>Bye,_shaderscascadeColor:()=>wye,_shaderscascadeDistance:()=>bye,_shaderscascadeMatrix:()=>Qye,_shaderscascadeWeights:()=>Sye,_shaderscolumbusViewMorph:()=>Dye,_shaderscomputePosition:()=>Tye,_shaderscosineAndSine:()=>Mye,_shadersdecompressTextureCoordinates:()=>Pye,_shadersdefaultPbrMaterial:()=>Rye,_shadersdegreesPerRadian:()=>QCe,_shadersdepthClamp:()=>Lye,_shadersdepthRange:()=>SCe,_shadersdepthRangeStruct:()=>Aye,_shaderseastNorthUpToEyeCoordinates:()=>Fye,_shadersellipsoidContainsPoint:()=>Nye,_shadersellipsoidWgs84TextureCoordinates:()=>kye,_shadersepsilon1:()=>DCe,_shadersepsilon2:()=>TCe,_shadersepsilon3:()=>MCe,_shadersepsilon4:()=>PCe,_shadersepsilon5:()=>RCe,_shadersepsilon6:()=>LCe,_shadersepsilon7:()=>FCe,_shadersequalsEpsilon:()=>Oye,_shaderseyeOffset:()=>Uye,_shaderseyeToWindowCoordinates:()=>Gye,_shadersfastApproximateAtan:()=>Hye,_shadersfog:()=>Vye,_shadersgammaCorrect:()=>zye,_shadersgeodeticSurfaceNormal:()=>Kye,_shadersgetDefaultMaterial:()=>Yye,_shadersgetLambertDiffuse:()=>Jye,_shadersgetSpecular:()=>Wye,_shadersgetWaterNoise:()=>jye,_shadershue:()=>Zye,_shadersinfinity:()=>NCe,_shadersinverseGamma:()=>$ye,_shadersisEmpty:()=>exe,_shadersisFull:()=>txe,_shaderslatitudeToWebMercatorFraction:()=>ixe,_shaderslineDistance:()=>nxe,_shaderslinearToSrgb:()=>rxe,_shadersluminance:()=>oxe,_shadersmaterial:()=>hye,_shadersmaterialInput:()=>dye,_shadersmetersPerPixel:()=>axe,_shadersmodelMaterial:()=>fye,_shadersmodelToWindowCoordinates:()=>sxe,_shadersmodelVertexOutput:()=>gye,_shadersmultiplyWithColorBalance:()=>lxe,_shadersnearFarScalar:()=>uxe,_shadersoctDecode:()=>cxe,_shadersoneOverPi:()=>kCe,_shadersoneOverTwoPi:()=>OCe,_shaderspackDepth:()=>Axe,_shaderspassCesium3DTile:()=>UCe,_shaderspassCesium3DTileClassification:()=>GCe,_shaderspassCesium3DTileClassificationIgnoreShow:()=>HCe,_shaderspassClassification:()=>VCe,_shaderspassCompute:()=>zCe,_shaderspassEnvironment:()=>KCe,_shaderspassGlobe:()=>YCe,_shaderspassOpaque:()=>JCe,_shaderspassOverlay:()=>WCe,_shaderspassTerrainClassification:()=>jCe,_shaderspassTranslucent:()=>qCe,_shaderspbrLighting:()=>hxe,_shaderspbrMetallicRoughnessMaterial:()=>dxe,_shaderspbrParameters:()=>pye,_shaderspbrSpecularGlossinessMaterial:()=>fxe,_shadersphong:()=>gxe,_shaderspi:()=>XCe,_shaderspiOverFour:()=>ZCe,_shaderspiOverSix:()=>$Ce,_shaderspiOverThree:()=>eye,_shaderspiOverTwo:()=>tye,_shadersplaneDistance:()=>pxe,_shaderspointAlongRay:()=>mxe,_shadersradiansPerDegree:()=>iye,_shadersray:()=>mye,_shadersrayEllipsoidIntersectionInterval:()=>Cxe,_shadersraySegment:()=>Cye,_shadersraySphereIntersectionInterval:()=>yxe,_shadersreadDepth:()=>xxe,_shadersreadNonPerspective:()=>vxe,_shadersreverseLogDepth:()=>Exe,_shadersround:()=>wxe,_shaderssampleOctahedralProjection:()=>bxe,_shaderssaturation:()=>Qxe,_shaderssceneMode2D:()=>rye,_shaderssceneMode3D:()=>nye,_shaderssceneModeColumbusView:()=>oye,_shaderssceneModeMorphing:()=>aye,_shadersshadowDepthCompare:()=>Sxe,_shadersshadowParameters:()=>yye,_shadersshadowVisibility:()=>Dxe,_shaderssignNotZero:()=>Txe,_shaderssolarRadius:()=>sye,_shaderssphericalHarmonics:()=>Mxe,_shaderssrgbToLinear:()=>Pxe,_shaderstangentToEyeSpaceMatrix:()=>Rxe,_shadersthreePiOver2:()=>lye,_shaderstransformPlane:()=>Lxe,_shaderstranslateRelativeToEye:()=>Fxe,_shaderstranslucentPhong:()=>Nxe,_shaderstranspose:()=>kxe,_shaderstwoPi:()=>uye,_shadersunpackDepth:()=>Oxe,_shadersunpackFloat:()=>Uxe,_shadersunpackUint:()=>Gxe,_shadersvalueTransform:()=>Hxe,_shadersvertexLogDepth:()=>Vxe,_shaderswebMercatorMaxLatitude:()=>cye,_shaderswindowToEyeCoordinates:()=>zxe,_shaderswriteDepthClamp:()=>Kxe,_shaderswriteLogDepth:()=>Yxe,_shaderswriteNonPerspective:()=>Jxe,addBuffer:()=>$Ie,addDefaults:()=>KIe,addExtensionsRequired:()=>qIe,addExtensionsUsed:()=>iO,addPipelineExtras:()=>ZY,addToArray:()=>H_,appendForwardSlash:()=>Tme,arrayRemoveDuplicates:()=>fC,barycentricCoordinates:()=>cre,binarySearch:()=>hC,buildDrawCommand:()=>J_e,buildModuleUrl:()=>xs,clone:()=>xo,combine:()=>ia,computeFlyToLocationForRectangle:()=>IJ,createBillboardPointCallback:()=>kne,createBlurStage:()=>pie,createCommand:()=>Hl,createDefaultImageryProviderViewModels:()=>Bwe,createDefaultTerrainProviderViewModels:()=>Qwe,createEdgeStage:()=>dH,createElevationBandMaterial:()=>Rst,createFragmentFromTemplate:()=>ISe,createGuid:()=>Vu,createMaterialPropertyDescriptor:()=>hy,createOsmBuildings:()=>Lst,createPropertyDescriptor:()=>Bi,createRawPropertyDescriptor:()=>M_,createTangentSpaceDebugPrimitive:()=>Fst,createTaskProcessorWorker:()=>xlt,createUniform:()=>_Ce,createUniformArray:()=>wCe,createWorldImagery:()=>Xk,createWorldTerrain:()=>bwe,crypto_js:()=>oD,decodeGoogleEarthEnterpriseData:()=>OSe,decodeVectorPolylinePositions:()=>T1e,defaultValue:()=>Ae,defer:()=>rA,defined:()=>O,deprecationWarning:()=>$D,destroyObject:()=>Qr,echarts:()=>kb,exportKml:()=>iat,findAccessorMinMax:()=>$Y,findContentMetadata:()=>zne,findGroupMetadata:()=>Kne,findTileMetadata:()=>U1e,forEachTextureInMaterial:()=>gne,formatError:()=>D5,fragment:()=>Get,freezeRenderState:()=>IKe,getAbsoluteUri:()=>eY,getAccessorByteStride:()=>cN,getBaseUri:()=>Pme,getBinaryAccessor:()=>vM,getClipAndStyleCode:()=>lwe,getClippingFunction:()=>$ne,getComponentReader:()=>VY,getElement:()=>iA,getExtensionFromUri:()=>Rie,getFilenameFromUri:()=>_Y,getImageFromTypedArray:()=>fve,getImagePixels:()=>i5,getJsonFromTypedArray:()=>Bx,getMagic:()=>b6,getStringFromTypedArray:()=>d2,getTimestamp:()=>OA,hasExtension:()=>Qg,heightReferenceOnEntityPropertyChanged:()=>kY,isBitSet:()=>q_,isBlobUri:()=>Lie,isCrossOriginUrl:()=>Fie,isDataUri:()=>tY,isLeapYear:()=>r8,jsencrypt:()=>ESe,knockout:()=>gr,knockout_3_5_1:()=>EP,knockout_es5:()=>Awe,libgif:()=>NEe,licensechack:()=>mat,loadAndExecuteScript:()=>Nie,loadCRN:()=>Yat,loadCubeMap:()=>CQe,loadDDS:()=>Gie,loadImageFromTypedArray:()=>Ane,loadKTX2:()=>ZF,loadView:()=>Aae,mapbox_gl:()=>VEe,mergeSort:()=>LJ,modernizeShader:()=>bCe,moveTechniqueRenderStates:()=>jIe,moveTechniquesToExtension:()=>XIe,numberOfComponentsForType:()=>eO,objectToQuery:()=>kie,oneTimeWarning:()=>ua,packer:()=>Cve,parseBatchTable:()=>uJ,parseBoundingVolumeSemantics:()=>I1e,parseDefines:()=>LSe,parseFeatureMetadataLegacy:()=>VIe,parseGlb:()=>JIe,parseResponseHeaders:()=>Rme,parseStructuralMetadata:()=>HIe,pointInsideTriangle:()=>est,preprocess3DTileContent:()=>Yne,purify:()=>hat,queryToObject:()=>xD,rasterizeHTML_allinone:()=>XQe,readAccessorPacked:()=>e_e,removeExtension:()=>bK,removeExtensionsRequired:()=>YIe,removeExtensionsUsed:()=>fne,removePipelineExtras:()=>WIe,removeUnusedElements:()=>ZIe,remove_primitive:()=>WK,resizeImageToNextPowerOfTwo:()=>W7,sampleTerrain:()=>dJ,sampleTerrainMostDetailed:()=>EQ,scaleToGeodeticSurface:()=>Vie,subdivideArray:()=>Dve,subscribeAndEvaluate:()=>WE,svgCompassGyro:()=>SSe,svgCompassOuterRing:()=>QSe,svgCompassRotationMarker:()=>DSe,svgReset:()=>BSe,turf:()=>Zl,updateAccessorComponentTypes:()=>t_e,updateVersion:()=>i_e,usesExtension:()=>_p,vertex:()=>Uet,viewerCesium3DTilesInspectorMixin:()=>Alt,viewerCesiumInspectorMixin:()=>hlt,viewerCesiumNavigationMixin:()=>Eat,viewerDragDropMixin:()=>dlt,viewerPerformanceWatchdogMixin:()=>flt,webGLConstantToGlslType:()=>cst,wrapFunction:()=>VSe,writeTextToCanvas:()=>N5});function pW(o=!0){this.async=o}pW.prototype.getXmlHttpRequest=function(){if(window.XMLHttpRequest)return new XMLHttpRequest;if(window.ActiveXObject)return new ActiveXObject("MsXml2.XmlHttp")};pW.prototype.includeJsText=function(o,A){if(o!=null){var f=document.createElement("script");f.type="text/javascript",f.text=A,o.appendChild(f)}};pW.prototype.includeJsSrc=function(o,A){if(o!=null){var f=document.createElement("script");f.type="text/javascript",f.src=A,o.appendChild(f)}};pW.prototype.addJs=function(o,A){var f=this.getXmlHttpRequest(),m=this;f.onreadystatechange=function(){f.readyState===4&&(f.status===200||f.status===304?m.includeJsSrc(o,A):console.log("XML request error: "+f.statusText+" ("+f.status+")"))},f.open("GET",A,m.async),f.send(null),f.status===404?console.log(A+" is not found"):m.includeJsText(o,f.responseText)};var IC=pW;var V2i={testModel:"Workers/Model/xiaoche.glb",modelAxis:"Workers/Model/axis.gltf",flyModel:"Workers/Model/fly.glb",divpoint:"Workers/image/divpoint.png",divpoint1:"Workers/image/divpoint1.png",richtextpoint:"Workers/image/richtextpoint1.png",mark:"Workers/image/mark.png",mark1:"Workers/image/mark1.png",TrailLine:"Workers/image/TrailLine.png",road:"Workers/image/road.jpg",colors3:"Workers/image/colors3.png",loading:"Workers/image/loading.gif",smog:"Workers/image/smog.png",penquan:"Workers/image/penquan.png",fire:"Workers/image/fire.png",fire2:"Workers/image/fire2.png",bottomplane:"Workers/image/bottomplane.jpg",MTY0001:"Workers/image/MTY0001.jpg",MTY0002:"Workers/image/MTY0002.jpg",wall:"Workers/image/ggy.jpg",rotate:"Workers/image/rotate.png",move:"Workers/image/move.png",draw:"Workers/image/cursor/draw.cur",water:"Workers/image/waterNormals.jpg",movingRiver:"Workers/image/movingRiver.png",effectCircle:"Workers/image/circle.png",scanCircle:"Workers/image/scan.png",particles:"Workers/image/particles.png",trafficLight:{l_go:"Workers/image/trafficLights/l-go.png",l_wait:"Workers/image/trafficLights/l-wait.png",l_stop:"Workers/image/trafficLights/l-stop.png",l_null:"Workers/image/trafficLights/l-null.png",go:"Workers/image/trafficLights/go.png",wait:"Workers/image/trafficLights/wait.png",stop:"Workers/image/trafficLights/stop.png",null:"Workers/image/trafficLights/null.png",r_go:"Workers/image/trafficLights/r-go.png",r_wait:"Workers/image/trafficLights/r-wait.png",r_stop:"Workers/image/trafficLights/r-stop.png",r_null:"Workers/image/trafficLights/r-null.png",bg:"Workers/image/trafficLights/bg.png"}},cn=Object.freeze(V2i);function z2i(o,A){return o??A}var u0=z2i;var Ilt=`// author: \u5F20\u4E39\u948A
${I}`)};RQ.prototype.isDestroyed=function(){return!1};RQ.prototype.destroy=function(){this._scene=this._scene&&this._scene.destroy(),this._container.removeChild(this._element),this._creditContainer.removeChild(this._innerCreditContainer),Qr(this)};RQ.prototype.resize=function(){let o=this._canvas,A=o.clientWidth,f=o.clientHeight;!this._forceResize&&this._canvasWidth===A&&this._canvasHeight===f||(this._forceResize=!1,llt(this),ult(this),this._scene.requestRender())};RQ.prototype.render=function(){if(this._scene._frameState||console.log("\u6388\u6743\u9A8C\u8BC1\u9519\u8BEF\uFF01"),this._canRender){this._scene.initializeFrame();let o=this._clock.tick();this._scene.render(o)}else this._clock.tick()};RQ.prototype.flyTo=function(o,A){return w2i(this,o,A,!0)};function w2i(o,A,f,m){SDe(o);let C=Promise.resolve(!0);return o._zoomPromise=C,o._zoomIsFlight=m,o._zoomOptions=f,Promise.resolve(A,function(y){if(o._zoomPromise===C){if(y instanceof dD){y.getViewableRectangle().then(function(x){return IJ(x,o.scene)}).then(function(x){o._zoomPromise===C&&(o._zoomTarget=x)});return}if(y instanceof Fx){o._zoomTarget=y;return}if(y instanceof cI){o._zoomTarget=y;return}if(y instanceof K6){o._zoomTarget=y;return}if(y.isLoading&&O(y.loadingEvent)){let x=y.loadingEvent.addEventListener(function(){x(),o._zoomPromise===C&&(o._zoomTarget=y.entities.values.slice(0))});return}if(Array.isArray(y)){o._zoomTarget=y.slice(0);return}y=Ae(y.values,y),O(y.entities)&&(y=y.entities.values),Array.isArray(y)?o._zoomTarget=y.slice(0):o._zoomTarget=[y]}}),o.scene.requestRender(),C.promise}function sG(o){o._zoomPromise=void 0,o._zoomTarget=void 0,o._zoomOptions=void 0}function SDe(o){let A=o._zoomPromise;O(A)&&(sG(o),A.resolve(!1))}RQ.prototype._postRender=function(){b2i(this),Q2i(this)};RQ.prototype._onTick=function(){let o=this,A=o.coreMap,f=A.clock.currentTime,m=A._entityView;if(O(m)){let C=A._trackedEntity;o._dataSourceDisplay.getBoundingSphere(C,!1,J8)===ro.DONE&&m.update(f,J8)}};function b2i(o){let A=o.coreMap,f=A._zoomTarget;if(!O(f)||A.scene.mode===xi.MORPHING)return;let m=A.scene,C=m.camera,y=A._zoomPromise,x=Ae(A._zoomOptions,{}),v,E;if(f instanceof Fx||f instanceof cI)return f.readyPromise.then(function(){let Q=f.boundingSphere;O(x.offset)||(x.offset=new Ex(0,-.5,Q.radius)),v={offset:x.offset,duration:x.duration,maximumHeight:x.maximumHeight,complete:function(){y.resolve(!0)},cancel:function(){y.resolve(!1)}},A._zoomIsFlight?C.flyToBoundingSphere(f.boundingSphere,v):(C.viewBoundingSphere(Q,x.offset),C.lookAtTransform(Xe.IDENTITY),y.resolve(!0)),sG(A)});if(f instanceof K6)return f.readyPromise.then(function(){let Q=f.boundingSphere;O(x.offset)||(x.offset=new Ex(0,-.5,Q.radius)),v={offset:x.offset,duration:x.duration,maximumHeight:x.maximumHeight,complete:function(){y.resolve(!0)},cancel:function(){y.resolve(!1)}},A._zoomIsFlight?C.flyToBoundingSphere(Q,v):(C.viewBoundingSphere(Q,x.offset),C.lookAtTransform(Xe.IDENTITY),y.resolve(!0)),sG(A)});if(f instanceof Kt){v={destination:m.mapProjection.ellipsoid.cartographicToCartesian(f),duration:x.duration,maximumHeight:x.maximumHeight,complete:function(){y.resolve(!0)},cancel:function(){y.resolve(!1)}},A._zoomIsFlight?C.flyTo(v):(C.setView(v),y.resolve(!0)),sG(A);return}let I=f,w=[];for(let Q=0,M=I.length;Q<M;Q++){let B=o._dataSourceDisplay.getBoundingSphere(I[Q],!1,J8);if(B===ro.PENDING)return;B!==ro.FAILED&&w.push(wi.clone(J8))}if(w.length===0){SDe(A);return}A.trackedEntity=void 0,E=wi.fromBoundingSpheres(w),A._zoomIsFlight?(sG(A),C.flyToBoundingSphere(E,{duration:x.duration,maximumHeight:x.maximumHeight,complete:function(){y.resolve(!0)},cancel:function(){y.resolve(!1)},offset:x.offset})):(C.viewBoundingSphere(E,x.offset),C.lookAtTransform(Xe.IDENTITY),sG(A),y.resolve(!0))}function Q2i(o){let A=o.coreMap;if(!A._needTrackedEntityUpdate)return;let f=A.trackedEntity,m=A.clock.currentTime,C=Nt.getValueOrUndefined(f.position,m);if(!O(C))return;let y=A.scene,x=o._dataSourceDisplay.getBoundingSphere(f,!1,J8);if(x===ro.PENDING)return;let v=y.mode;(v===xi.COLUMBUS_VIEW||v===xi.SCENE2D)&&(y.screenSpaceCameraController.enableTranslate=!1),(v===xi.COLUMBUS_VIEW||v===xi.SCENE3D)&&(y.screenSpaceCameraController.enableTilt=!1);let E=x!==ro.FAILED?J8:void 0;console.info(E),A._entityView=new qne(f,y,y.mapProjection.ellipsoid),A._entityView.update(m,E),A._needTrackedEntityUpdate=!1}RQ.prototype.extend=function(o,A){o(this,A)};var clt=RQ;function DDe(o){this._scene=o.scene,this.lowFrameRateMessage=Ae(o.lowFrameRateMessage,"This application appears to be performing poorly on your system.  Please try using a different web browser or updating your video drivers."),this.lowFrameRateMessageDismissed=!1,this.showingLowFrameRateMessage=!1,gr.track(this,["lowFrameRateMessage","lowFrameRateMessageDismissed","showingLowFrameRateMessage"]);let A=this;this._dismissMessage=Hl(function(){A.showingLowFrameRateMessage=!1,A.lowFrameRateMessageDismissed=!0});let f=gDe.fromScene(o.scene);this._unsubscribeLowFrameRate=f.lowFrameRate.addEventListener(function(){A.lowFrameRateMessageDismissed||(A.showingLowFrameRateMessage=!0)}),this._unsubscribeNominalFrameRate=f.nominalFrameRate.addEventListener(function(){A.showingLowFrameRateMessage=!1})}Object.defineProperties(DDe.prototype,{scene:{get:function(){return this._scene}},dismissMessage:{get:function(){return this._dismissMessage}}});DDe.prototype.destroy=function(){return this._unsubscribeLowFrameRate(),this._unsubscribeNominalFrameRate(),Qr(this)};var TDe=DDe;function Iae(o){let A=iA(o.container),f=new TDe(o),m=document.createElement("div");m.className="cesium-performance-watchdog-message-area",m.setAttribute("data-bind","visible: showingLowFrameRateMessage");let C=document.createElement("button");C.setAttribute("type","button"),C.className="cesium-performance-watchdog-message-dismiss",C.innerHTML="&times;",C.setAttribute("data-bind","click: dismissMessage"),m.appendChild(C);let y=document.createElement("div");y.className="cesium-performance-watchdog-message",y.setAttribute("data-bind","html: lowFrameRateMessage"),m.appendChild(y),A.appendChild(m),gr.applyBindings(f,m),this._container=A,this._viewModel=f,this._element=m}Object.defineProperties(Iae.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Iae.prototype.isDestroyed=function(){return!1};Iae.prototype.destroy=function(){return this._viewModel.destroy(),gr.cleanNode(this._element),this._container.removeChild(this._element),Qr(this)};var MDe=Iae;function S2i(o){let A=document.createElement("div");A.className="cesium-viewer-cesium3DTilesInspectorContainer",o.container.appendChild(A);let f=new wDe(A,o.scene);Object.defineProperties(o,{cesium3DTilesInspector:{get:function(){return f}}})}var Alt=S2i;function D2i(o){let A=document.createElement("div");A.className="cesium-viewer-cesiumInspectorContainer",o.container.appendChild(A);let f=new QDe(A,o.scene);Object.defineProperties(o,{cesiumInspector:{get:function(){return f}}})}var hlt=D2i;function T2i(o,A){A=Ae(A,Ae.EMPTY_OBJECT);let f=!0,m=Ae(A.flyToOnDrop,!0),C=new br,y=Ae(A.clearOnDrop,!0),x=Ae(A.dropTarget,o.container),v=Ae(A.clampToGround,!0),E=A.proxy;x=iA(x),Object.defineProperties(o,{dropTarget:{get:function(){return x},set:function(w){g7e(x,I),x=w,a0e(x,I)}},dropEnabled:{get:function(){return f},set:function(w){w!==f&&(w?a0e(x,I):g7e(x,I),f=w)}},dropError:{get:function(){return C}},clearOnDrop:{get:function(){return y},set:function(w){y=w}},flyToOnDrop:{get:function(){return m},set:function(w){m=w}},proxy:{get:function(){return E},set:function(w){E=w}},clampToGround:{get:function(){return v},set:function(w){v=w}}});function I(w){e5(w),y&&(o.entities.removeAll(),o.dataSources.removeAll());let Q=w.dataTransfer.files,M=Q.length;for(let B=0;B<M;B++){let T=Q[B],D=new FileReader;D.onload=M2i(o,T,E,v),D.onerror=P2i(o,T),D.readAsText(T)}}a0e(x,I),o.destroy=DSe(o,o.destroy,function(){o.dropEnabled=!1}),o._handleDrop=I}function e5(o){o.stopPropagation(),o.preventDefault()}function g7e(o,A){let f=o;O(f)&&(f.removeEventListener("drop",A,!1),f.removeEventListener("dragenter",e5,!1),f.removeEventListener("dragover",e5,!1),f.removeEventListener("dragexit",e5,!1))}function a0e(o,A){o.addEventListener("drop",A,!1),o.addEventListener("dragenter",e5,!1),o.addEventListener("dragover",e5,!1),o.addEventListener("dragexit",e5,!1)}function M2i(o,A,f,m){let C=o.scene;return function(y){let x=A.name;try{let v;if(/\.czml$/i.test(x))v=eW.load(JSON.parse(y.target.result),{sourceUri:x});else if(/\.geojson$/i.test(x)||/\.json$/i.test(x)||/\.topojson$/i.test(x))v=gK.load(JSON.parse(y.target.result),{sourceUri:x,clampToGround:m});else if(/\.(kml|kmz)$/i.test(x))v=Pre.load(A,{sourceUri:x,proxy:f,camera:C.camera,canvas:C.canvas,clampToGround:m,screenOverlayContainer:o.container});else if(/\.gpx$/i.test(x))v=ySe.load(A,{sourceUri:x,proxy:f});else{o.dropError.raiseEvent(o,x,`Unrecognized file: ${x}`);return}O(v)&&o.dataSources.add(v).then(function(E){o.flyToOnDrop&&o.flyTo(E)}).catch(function(E){o.dropError.raiseEvent(o,x,E)})}catch(v){o.dropError.raiseEvent(o,x,v)}}}function P2i(o,A){return function(f){o.dropError.raiseEvent(o,A.name,f.target.error)}}var dlt=T2i;function R2i(o,A){A=Ae(A,Ae.EMPTY_OBJECT);let f=new MDe({scene:o.scene,container:o.bottomContainer,lowFrameRateMessage:A.lowFrameRateMessage});Object.defineProperties(o,{performanceWatchdog:{get:function(){return f}}})}var flt=R2i;function XK(o){this._angle=void 0,this._angleSubscription=void 0,this._radius=void 0,this._radiusSubscription=void 0,this._stack=void 0,this._stackSubscription=void 0,this._slice=void 0,this._sliceSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._show=void 0,this._showSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._definitionChanged=new br,this._gaze=void 0,this._gazeSubscription=void 0,this.merge(Ae(o,Ae.EMPTY_OBJECT))}Object.defineProperties(XK.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:Bi("show"),material:hy("material"),fill:Bi("fill"),shadows:Bi("shadows"),distanceDisplayCondition:Bi("distanceDisplayCondition")});XK.prototype.clone=function(o){return O(o)?(o.angle=this.angle,o.radius=this.radius,o.stack=this.stack,o.slice=this.slice,o.show=this.show,o.material=this.material,o.color=this.color,o.fill=this.fill,o.outline=this.outline,o.outlineColor=this.outlineColor,o.outlineWidth=this.outlineWidth,o.shadows=this.shadows,o.distanceDisplayCondition=this.distanceDisplayCondition,o.gaze=this.gaze,o):new XK(this)};XK.prototype.merge=function(o){this.angle=Ae(this.angle,o.angle),this.radius=Ae(this.radius,o.radius),this.stack=Ae(this.stack,o.stack),this.slice=Ae(this.slice,o.slice),this.show=Ae(this.show,o.show),this.color=Ae(this.color,o.color),this.material=Ae(this.material,o.material),this.fill=Ae(this.fill,o.fill),this.outline=Ae(this.outline,o.outline),this.outlineColor=Ae(this.outlineColor,o.outlineColor),this.outlineWidth=Ae(this.outlineWidth,o.outlineWidth),this.shadows=Ae(this.shadows,o.shadows),this.distanceDisplayCondition=Ae(this.distanceDisplayCondition,o.distanceDisplayCondition),this.gaze=Ae(this.gaze,o.gaze)};var Qie=XK;function L2i(o){return new _D(o)}function F2i(o){return Bi(o,void 0,L2i)}function _ae(o){o=o||{},this._position=void 0,this._orientation=void 0,this._show=void 0;let A=o.conicArcSensor;A instanceof Qie||(A=new Qie(A)),this._conicArcSensor=A,this._distanceDisplayCondition=new $o,this._geometry=void 0,this._outlineGeometry=void 0,this._definitionChanged=new br,this.merge(o)}Object.defineProperties(_ae.prototype,{position:F2i("position"),orientation:Bi("orientation"),show:Bi("show")});_ae.prototype.merge=function(o){this.position=o.position,this.orientation=o.orientation,this.show=o.show};_ae.prototype.gazeAt=function(o){o instanceof kA&&(this._conicArcSensor.gaze=o)};var Sie=_ae,p7e=Math.cos,m7e=Math.sin;function Die(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.angle,f=o.radius,m=Math.round(Ae(o.stackPartitions,12)),C=Math.round(Ae(o.slicePartitions,64)),y=Ae(o.vertexFormat,Wr.DEFAULT);this._angle=A,this._radius=f,this._stackPartitions=m,this._slicePartitions=C,this._vertexFormat=y}Die.fromDimensions=function(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.angle,f=o.radius,m=o.height,C=o.stackPartitions,y=o.slicePartitions;return new Die({angle:A,radius:f,stackPartitions:C,slicePartitions:y,vertexFormat:o.vertexFormat})};Die.createGeometry=function(o){console.time("createGeometry");let A=o._angle,f=o._radius,m=o._stackPartitions+1,C=o._slicePartitions+1,y=o._vertexFormat,x=new yc,v,E=3*(C-1)+6*(C-1)*(m-2)+(C-1)*1*3,I=m*C,w=Nn.createTypedArray(I,E),Q=new Float64Array(I*3+(C-1)*3*3);if(y.position){let F=0,L=new Array(C),R=new Array(C);for(let k=0;k<C;k++){let U=je.TWO_PI*k/(C-1);L[k]=p7e(U),R[k]=m7e(U),Q[F++]=0,Q[F++]=0,Q[F++]=-f}for(i=1;i<m;i++){let k=A*i/(m-1),U=m7e(k),V=f*U,H=f*U,q=f*p7e(k);for(let ie=0;ie<C;ie++)Q[F++]=L[ie]*V,Q[F++]=R[ie]*H,Q[F++]=-q}v=F;for(let k=0;k<C-1;k++)Q[F++]=0,Q[F++]=0,Q[F++]=0,Q[F++]=Q[v-(C-k-1)*3],Q[F++]=Q[v-(C-k-1)*3+1],Q[F++]=Q[v-(C-k-1)*3+2],Q[F++]=Q[v-(C-k)*3],Q[F++]=Q[v-(C-k)*3+1],Q[F++]=Q[v-(C-k)*3+2];x.position=new Yr({componentDatatype:ei.DOUBLE,componentsPerAttribute:3,values:Q})}let M=0;for(let F=0;F<C-1;F++)w[M++]=C+F,w[M++]=C+F+1,w[M++]=F+1;let B,T;for(let F=1;F<m-1;F++){B=F*C,T=(F+1)*C;for(let L=0;L<C-1;L++)w[M++]=T+L,w[M++]=T+L+1,w[M++]=B+L+1,w[M++]=T+L,w[M++]=B+L+1,w[M++]=B+L}for(let F=0,L=(C-1)*3;F<L;F++)w[M++]=F+v/3;let D=new Zo({attributes:x,indices:w,primitiveType:yn.TRIANGLES,boundingSphere:new wi(ee.ZERO,f)});return D=rc.computeNormal(D),console.timeEnd("createGeometry"),D};var Tie=Die,U$=Math.cos,G$=Math.sin;function glt(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.angle,f=o.radius,m=Math.round(Ae(o.stackPartitions,10)),C=Math.round(Ae(o.slicePartitions,8)),y=Math.round(Ae(o.subdivisions,128));this._angle=A,this._radius=f,this._stackPartitions=m,this._slicePartitions=C,this._subdivisions=y}glt.createGeometry=function(o){let A=o._angle,f=o._radius;if(f<=0||A<=0)return;let m=o._stackPartitions,C=o._slicePartitions,y=o._subdivisions,x=y*(m+C-1),v=x-C+2,E=new Float64Array(v*3),I=Nn.createTypedArray(v,x*2),w,Q,M,B,T,D,F=0,L=new Array(y),R=new Array(y);for(w=0;w<y;w++)M=je.TWO_PI*w/y,L[w]=U$(M),R[w]=G$(M);for(w=1;w<m;w++)for(B=A*w/(m-1),T=U$(B),D=G$(B),Q=0;Q<y;Q++)E[F++]=f*L[Q]*D,E[F++]=f*R[Q]*D,E[F++]=-f*T;for(L.length=C,R.length=C,w=0;w<C;w++)M=je.TWO_PI*w/C,L[w]=U$(M),R[w]=G$(M);for(E[F++]=0,E[F++]=0,E[F++]=-f,w=1;w<y;w++)for(B=A*w/y,T=U$(B),D=G$(B),Q=0;Q<C;Q++)E[F++]=f*L[Q]*D,E[F++]=f*R[Q]*D,E[F++]=-f*T;for(F=0,w=0;w<m-1;++w){let V=w*y;for(Q=0;Q<y-1;++Q)I[F++]=V+Q,I[F++]=V+Q+1;I[F++]=V+y-1,I[F++]=V}let k=y*(m-1);for(Q=1;Q<C+1;++Q)I[F++]=k,I[F++]=k+Q;for(w=0;w<y-2;++w){let V=w*C+1+k,H=(w+1)*C+1+k;for(Q=0;Q<C-1;++Q)I[F++]=H+Q,I[F++]=V+Q;I[F++]=H+C-1,I[F++]=V+C-1}let U=new yc({position:new Yr({componentDatatype:ei.DOUBLE,componentsPerAttribute:3,values:E})});return new Zo({attributes:U,indices:I,primitiveType:yn.LINES,boundingSphere:new wi(ee.ZERO,f)})};var Mie=glt;function gW(o){let A=this;if(!O(o))throw new Ui("viewer is required.");this._earthCtrl=o;let f=o.coreMap.scene;this._scene=f;let m=o.coreMap.clock;this._clock=m,this._primitives=f.primitives,this._primitive=void 0,this._outlinePrimitive=void 0,this._conicArcSensorCollection=[],m.onTick.addEventListener(function(){A.update()})}var s0e=new ci,l0e=new Xe,N2i=new ee,k2i=new ee,C7e=new ee,y7e=new jr;gW.prototype.add=function(o){return o instanceof Sie||(o=new Sie(o)),this._conicArcSensorCollection.push(o),o};gW.prototype.remove=function(o){let A=this._conicArcSensorCollection.indexOf(o);A!==-1&&this._conicArcSensorCollection.splice(A,1)};gW.prototype.removeAll=function(){this._conicArcSensorCollection.length=0};gW.prototype.update=function(){let o=this._clock.currentTime,A=this._conicArcSensorCollection,f=this._primitives,m=this._primitive,C=this._outlinePrimitive,y=[],x=[];O(m)&&f.removeAndDestroy(m),O(C)&&f.removeAndDestroy(C);for(let v=0,E=A.length;v<E;v++){let I=A[v],w=I._conicArcSensor;if(!Nt.getValueOrDefault(w.show,o,!0))continue;let Q=w.angle,M=w.radius,B=w.stack,T=w.slice;if(!O(Q)||!Nt.getValueOrDefault(I.show,o,!0))continue;let D=Nt.getValueOrUndefined(I.position,o,N2i);if(!O(D))continue;let F,L=w.gaze;if(O(L)){let ie=Nt.getValueOrUndefined(L.position,o,k2i);if(!O(D)||!O(ie))continue;let Z=ee.subtract(D,ie,C7e),oe=ee.angleBetween(ee.UNIT_Z,Z),ne=ee.cross(ee.UNIT_Z,Z,C7e),se=jr.fromAxisAngle(ne,oe,y7e),ce=ee.distance(D,ie);M=1,F=Xe.fromRotationTranslation(ci.multiplyByScalar(ci.fromQuaternion(se,s0e),ce,s0e),D,l0e)}else{let ie=Nt.getValueOrUndefined(I.orientation,o,y7e);O(ie)?F=Xe.fromRotationTranslation(ci.fromQuaternion(ie,s0e),D,l0e):F=zn.eastNorthUpToFixedFrame(D,void 0,l0e)}if(!O(F))continue;let R=I._geometry;if(!O(R)){let ie;ie=new Tie({vertexFormat:Wr.POSITION_AND_NORMAL,angle:Q,radius:M,stackPartitions:B,slicePartitions:T}),I._geometry=Tie.createGeometry(ie),R=I._geometry}let k=w.color,U=w.outline,V=w.outlineWidth;O(V)||(V=1);let H=w.outlineColor;O(H)||(H=At.WHITE);let q=new co({geometry:R,modelMatrix:F,attributes:{color:Yo.fromColor(k)}});if(y.push(q),U){let ie=I._outlineGeometry;if(!O(ie)){let oe;oe=new Mie({vertexFormat:Wr.POSITION_ONLY,angle:Q,radius:M}),I._outlineGeometry=Mie.createGeometry(oe),ie=I._outlineGeometry}let Z=new co({geometry:ie,modelMatrix:F,attributes:{color:Yo.fromColor(H)}});x.push(Z)}}y.length>0&&(this._primitive=this._primitives.add(new Xa({asynchronous:!1,geometryInstances:y,appearance:new Va({flat:!1,translucent:!0,closed:!0})}))),x.length>0&&(this._outlinePrimitive=this._primitives.add(new Xa({asynchronous:!1,geometryInstances:x,appearance:new Va({flat:!0,translucent:!0,renderState:{lineWidth:this._scene.clampLineWidth(outlineWidth)}})})))};var plt=gW;function ZK(o){this._show=void 0,this._radius=void 0,this._xHalfAngle=void 0,this._yHalfAngle=void 0,this._lineColor=void 0,this._showSectorLines=void 0,this._showSectorSegmentLines=void 0,this._showLateralSurfaces=void 0,this._material=void 0,this._showDomeSurfaces=void 0,this._showDomeLines=void 0,this._showIntersection=void 0,this._intersectionColor=void 0,this._intersectionWidth=void 0,this._showThroughEllipsoid=void 0,this._gaze=void 0,this._showScanPlane=void 0,this._scanPlaneColor=void 0,this._scanPlaneMode=void 0,this._scanPlaneRate=void 0,this._definitionChanged=new br,this.merge(Ae(o,Ae.EMPTY_OBJECT))}Object.defineProperties(ZK.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:Bi("show"),radius:Bi("radius"),xHalfAngle:Bi("xHalfAngle"),yHalfAngle:Bi("yHalfAngle"),lineColor:Bi("lineColor"),showSectorLines:Bi("showSectorLines"),showSectorSegmentLines:Bi("showSectorSegmentLines"),showLateralSurfaces:Bi("showLateralSurfaces"),material:hy("material"),showDomeSurfaces:Bi("showDomeSurfaces"),showDomeLines:Bi("showDomeLines "),showIntersection:Bi("showIntersection"),intersectionColor:Bi("intersectionColor"),intersectionWidth:Bi("intersectionWidth"),showThroughEllipsoid:Bi("showThroughEllipsoid"),gaze:Bi("gaze"),showScanPlane:Bi("showScanPlane"),scanPlaneColor:Bi("scanPlaneColor"),scanPlaneMode:Bi("scanPlaneMode"),scanPlaneRate:Bi("scanPlaneRate")});ZK.prototype.clone=function(o){return O(o)||(o=new ZK),o.show=this.show,o.radius=this.radius,o.xHalfAngle=this.xHalfAngle,o.yHalfAngle=this.yHalfAngle,o.lineColor=this.lineColor,o.showSectorLines=this.showSectorLines,o.showSectorSegmentLines=this.showSectorSegmentLines,o.showLateralSurfaces=this.showLateralSurfaces,o.material=this.material,o.showDomeSurfaces=this.showDomeSurfaces,o.showDomeLines=this.showDomeLines,o.showIntersection=this.showIntersection,o.intersectionColor=this.intersectionColor,o.intersectionWidth=this.intersectionWidth,o.showThroughEllipsoid=this.showThroughEllipsoid,o.gaze=this.gaze,o.showScanPlane=this.showScanPlane,o.scanPlaneColor=this.scanPlaneColor,o.scanPlaneMode=this.scanPlaneMode,o.scanPlaneRate=this.scanPlaneRate,o};ZK.prototype.merge=function(o){if(!O(o))throw new Ui("source is required.");this.show=Ae(this.show,o.show),this.radius=Ae(this.radius,o.radius),this.xHalfAngle=Ae(this.xHalfAngle,o.xHalfAngle),this.yHalfAngle=Ae(this.yHalfAngle,o.yHalfAngle),this.lineColor=Ae(this.lineColor,o.lineColor),this.showSectorLines=Ae(this.showSectorLines,o.showSectorLines),this.showSectorSegmentLines=Ae(this.showSectorSegmentLines,o.showSectorSegmentLines),this.showLateralSurfaces=Ae(this.showLateralSurfaces,o.showLateralSurfaces),this.material=Ae(this.material,o.material),this.showDomeSurfaces=Ae(this.showDomeSurfaces,o.showDomeSurfaces),this.showDomeLines=Ae(this.showDomeLines,o.showDomeLines),this.showIntersection=Ae(this.showIntersection,o.showIntersection),this.intersectionColor=Ae(this.intersectionColor,o.intersectionColor),this.intersectionWidth=Ae(this.intersectionWidth,o.intersectionWidth),this.showThroughEllipsoid=Ae(this.showThroughEllipsoid,o.showThroughEllipsoid),this.gaze=Ae(this.gaze,o.gaze),this.showScanPlane=Ae(this.showScanPlane,o.showScanPlane),this.scanPlaneColor=Ae(this.scanPlaneColor,o.scanPlaneColor),this.scanPlaneMode=Ae(this.scanPlaneMode,o.scanPlaneMode),this.scanPlaneRate=Ae(this.scanPlaneRate,o.scanPlaneRate)};var mlt=ZK,O2i={encNONE:0,enrS3TCDXTN:14,enrPVRTPF_PVRTC2:19,enrPVRTPF_PVRTC:20,enrPVRTPF_PVRTC_4bpp:21,enrPVRTPF_ETC1:22},Clt=Object.freeze(O2i),U2i={LUMINANCE_8:1,LUMINANCE_16:2,ALPHA:3,ALPHA_4_LUMINANCE_4:4,LUMINANCE_ALPHA:5,RGB_565:6,BGR565:7,RGB:10,BGR:11,ARGB:12,ABGR:13,BGRA:14,WEBP:25,RGBA:28,DXT1:17,DXT2:18,DXT3:19,DXT4:20,DXT5:21},ylt=Object.freeze(U2i);function G2i(o,A,f){let m;try{return m=o(A,f),m}catch(C){return Promise.reject(C)}}function H2i(o){let A;return function(f){let m=f.data,C=[],y={id:m.id,result:void 0,error:void 0};return Promise.resolve(G2i(o,m.parameters,C)).then(function(x){y.result=x}).catch(function(x){x instanceof Error?y.error={name:x.name,message:x.message,stack:x.stack}:y.error=x}).finally(function(){O(A)||(A=Ae(self.webkitPostMessage,self.postMessage)),m.canTransferArrayBuffer||(C.length=0);try{A(y,C)}catch(x){y.result=void 0,y.error=`postMessage failed with error: ${D5(x)}
  with responseMessage: ${JSON.stringify(y)}`,A(y)}})}}var xlt=H2i,vlt="1.99";var _r={};f5e(_r,{AlphaMode:()=>w8,AlphaPipelineStage:()=>hBe,Animation:()=>dwe,AnimationViewModel:()=>fwe,Appearance:()=>Sd,ApproximateTerrainHeights:()=>ZA,ArcGISTiledElevationTerrainProvider:()=>yat,ArcGisMapServerImageryProvider:()=>Xb,ArcType:()=>Pa,ArticulationStageType:()=>b_,AssociativeArray:()=>Vo,AttributeCompression:()=>Mu,AttributeType:()=>Is,AutoExposure:()=>Hbe,AutomaticUniforms:()=>_G,Axis:()=>vp,AxisAlignedBoundingBox:()=>CY,B3dmLoader:()=>v_e,B3dmParser:()=>y_e,Base64Encoder:()=>Lee,BaseLayerPicker:()=>pwe,BaseLayerPickerViewModel:()=>gwe,BatchTable:()=>ure,BatchTableHierarchy:()=>Bne,BatchTexture:()=>Q1,BatchTexturePipelineStage:()=>dBe,Billboard:()=>Zh,BillboardCollection:()=>iI,BillboardGraphics:()=>eP,BillboardVisualizer:()=>eIe,BingMapsApi:()=>xat,BingMapsGeocoderService:()=>Eat,BingMapsImageryProvider:()=>vwe,BingMapsStyle:()=>xwe,BlendEquation:()=>sx,BlendFunction:()=>RA,BlendOption:()=>tf,BlendTexture:()=>q8,BlendingState:()=>Bu,BoundingRectangle:()=>Kr,BoundingSphere:()=>wi,BoundingSphereState:()=>ro,BoxEmitter:()=>_st,BoxGeometry:()=>LM,BoxGeometryUpdater:()=>tIe,BoxGraphics:()=>hre,BoxOutlineGeometry:()=>r2,BrdfLutGenerator:()=>Xwe,Buffer:()=>vo,BufferLoader:()=>qY,BufferUsage:()=>ln,CPUStylingPipelineStage:()=>mBe,CallbackProperty:()=>Bn,Camera:()=>Ml,CameraEventAggregator:()=>$be,CameraEventType:()=>Bc,CameraFlightPath:()=>DEe,Cartesian2:()=>Bt,Cartesian3:()=>ee,Cartesian4:()=>ai,Cartographic:()=>Kt,CartographicGeocoderService:()=>bQe,CatmullRomSpline:()=>Iat,Cesium3DContentGroup:()=>Lne,Cesium3DTile:()=>Ov,Cesium3DTileBatchTable:()=>fJ,Cesium3DTileColorBlendMode:()=>bD,Cesium3DTileContent:()=>Bst,Cesium3DTileContentFactory:()=>Une,Cesium3DTileContentState:()=>FA,Cesium3DTileContentType:()=>Bv,Cesium3DTileFeature:()=>Ds,Cesium3DTileFeatureTable:()=>M6,Cesium3DTileOptimizationHint:()=>ZL,Cesium3DTileOptimizations:()=>Y1e,Cesium3DTilePass:()=>Ep,Cesium3DTilePassState:()=>wP,Cesium3DTilePointFeature:()=>Rk,Cesium3DTileRefine:()=>Ay,Cesium3DTileStyle:()=>gY,Cesium3DTileStyleEngine:()=>j1e,Cesium3DTilesInspector:()=>wDe,Cesium3DTilesInspectorViewModel:()=>BDe,Cesium3DTileset:()=>Fx,Cesium3DTilesetCache:()=>J1e,Cesium3DTilesetGraphics:()=>mre,Cesium3DTilesetHeatmap:()=>W1e,Cesium3DTilesetMetadata:()=>K1e,Cesium3DTilesetMostDetailedTraversal:()=>Gne,Cesium3DTilesetStatistics:()=>Wk,Cesium3DTilesetTraversal:()=>fN,Cesium3DTilesetVisualizer:()=>Z1e,CesiumInspector:()=>QDe,CesiumInspectorViewModel:()=>bDe,CesiumNavigation:()=>GSe,CesiumRenderPass:()=>HSe,CesiumTerrainProvider:()=>MJ,CesiumWidget:()=>JJ,Check:()=>of,CheckerboardMaterialProperty:()=>oie,CircleEmitter:()=>cDe,CircleGeometry:()=>_at,CircleOutlineGeometry:()=>Bat,CircleWaveMaterialProperty:()=>X8,ClassificationModelDrawCommand:()=>U_e,ClassificationPipelineStage:()=>fBe,ClassificationPrimitive:()=>a6,ClassificationType:()=>Gu,ClearCommand:()=>eA,ClippingPlane:()=>kM,ClippingPlaneCollection:()=>rB,Clock:()=>z5,ClockRange:()=>aC,ClockStep:()=>Jh,ClockViewModel:()=>_Qe,CloudCollection:()=>Mst,CloudType:()=>_ie,CollectionSource:()=>rJe,Color:()=>At,ColorBlendMode:()=>HD,ColorGeometryInstanceAttribute:()=>Yo,ColorMaterialProperty:()=>Fa,Command:()=>gat,ComponentDatatype:()=>ei,Composite3DTileContent:()=>g1e,CompositeEntityCollection:()=>Kot,CompositeMaterialProperty:()=>sie,CompositePositionProperty:()=>U_,CompositeProperty:()=>P1,CompressedTextureBuffer:()=>rY,ComputeCommand:()=>B5,ComputeEngine:()=>Hwe,ConditionsExpression:()=>mve,ConeEmitter:()=>EH,ConicArcSensor:()=>Sie,ConicArcSensorCollection:()=>plt,ConicArcSensorGeometry:()=>Tie,ConicArcSensorGraphics:()=>Qie,ConicArcSensorOutlineGeometry:()=>Mie,ConstantPositionProperty:()=>_D,ConstantProperty:()=>bc,ConstantSpline:()=>b_e,ConstructionWorker:()=>oJe,ContentMetadata:()=>F1e,ContentState:()=>yD,Context:()=>jwe,ContextLimits:()=>Co,CoplanarPolygonGeometry:()=>mIe,CoplanarPolygonGeometryLibrary:()=>OG,CoplanarPolygonOutlineGeometry:()=>eM,CornerType:()=>qA,CorridorGeometry:()=>OY,CorridorGeometryLibrary:()=>Uc,CorridorGeometryUpdater:()=>nIe,CorridorGraphics:()=>dre,CorridorOutlineGeometry:()=>rIe,Credit:()=>tl,CreditDisplay:()=>Zwe,CubeMap:()=>uQ,CubeMapFace:()=>TL,CubicRealPolynomial:()=>mY,CullFace:()=>mA,CullingVolume:()=>AC,CumulusCloud:()=>MQ,CustomDataSource:()=>xre,CustomHeightmapTerrainProvider:()=>wat,CustomMercatorProjection:()=>e6,CustomShader:()=>ZM,CustomShaderManagerEx:()=>nre,CustomShaderMode:()=>dY,CustomShaderPipelineStage:()=>_Be,CustomShaderTranslucencyMode:()=>wF,CustomTilingScheme:()=>UJe,CylinderGeometry:()=>oIe,CylinderGeometryLibrary:()=>$re,CylinderGeometryUpdater:()=>sIe,CylinderGraphics:()=>fre,CylinderOutlineGeometry:()=>aIe,CzmlDataSource:()=>eW,DDSTexture:()=>JSe,DataSource:()=>cy,DataSourceClock:()=>A5,DataSourceCollection:()=>ZEe,DataSourceDisplay:()=>EJ,DebugAppearance:()=>Nst,DebugCameraPrimitive:()=>_g,DebugInspector:()=>uQe,DebugModelMatrixPrimitive:()=>fDe,DefaultProxy:()=>HEe,DepthFunction:()=>nI,DepthPlane:()=>tbe,DequantizationPipelineStage:()=>BBe,DerivedCommand:()=>fx,DeveloperError:()=>Ui,DeviceOrientationCameraController:()=>ibe,DirectionalLight:()=>Cae,DiscardEmptyTileImagePolicy:()=>noe,DiscardMissingTileImagePolicy:()=>Cwe,DistanceDisplayCondition:()=>$o,DistanceDisplayConditionGeometryInstanceAttribute:()=>xA,DistanceLegendViewModel:()=>MSe,DoubleEndedPriorityQueue:()=>Sat,DoublyLinkedList:()=>Jne,DracoLoader:()=>XY,DrawCommand:()=>On,DynamicGeometryBatch:()=>ene,DynamicGeometryUpdater:()=>vA,ECharts:()=>HJe,EarthOrientationParameters:()=>xCe,EarthOrientationParametersSample:()=>oY,EasingFunction:()=>Ix,EllipseGeometry:()=>W1,EllipseGeometryLibrary:()=>iB,EllipseGeometryUpdater:()=>lIe,EllipseGraphics:()=>gre,EllipseOutlineGeometry:()=>UD,Ellipsoid:()=>Ti,EllipsoidGeodesic:()=>l0,EllipsoidGeometry:()=>gC,EllipsoidGeometryUpdater:()=>hIe,EllipsoidGraphics:()=>l6,EllipsoidOutlineGeometry:()=>J1,EllipsoidPrimitive:()=>Gwe,EllipsoidRhumbLine:()=>k1,EllipsoidSurfaceAppearance:()=>DY,EllipsoidTangentPlane:()=>tQ,EllipsoidTerrainProvider:()=>IP,EllipsoidalOccluder:()=>L5,Empty3DTileContent:()=>PK,EncodedCartesian3:()=>Pu,Entity:()=>kA,EntityCluster:()=>tN,EntityCollection:()=>iw,EntityView:()=>qne,Event:()=>br,EventHelper:()=>Mx,ExpandBySmartEarth:()=>UE,ExpandByTerra:()=>VJe,Expression:()=>bF,ExpressionNodeType:()=>jn,ExternalParameter:()=>px,ExtrapolationType:()=>mD,FeatureDataProvider:()=>Rre,FeatureDetection:()=>Mo,FeatureIdPipelineStage:()=>AJ,FeatureJsonData:()=>p6,FisheyeProjectionMap:()=>LY,FisheyeProjectionMapShader:()=>p7,FlattenVS:()=>Y_e,FlowEcharts:()=>cae,Fog:()=>rbe,ForEach:()=>Vr,FrameRateMonitor:()=>gDe,FrameState:()=>nbe,Framebuffer:()=>Bp,FramebufferManager:()=>Wh,FrustumCommands:()=>ube,FrustumGeometry:()=>m6,FrustumOutlineGeometry:()=>RY,Fullscreen:()=>yp,FullscreenButton:()=>wQe,FullscreenButtonViewModel:()=>BQe,GWBaiduImageryProvider:()=>Hre,GeoJsonDataSource:()=>gK,GeoJsonLoader:()=>__e,GeocodeType:()=>jJ,Geocoder:()=>MQe,GeocoderService:()=>Tat,GeocoderViewModel:()=>TQe,GeographicProjection:()=>Dg,GeographicTilingScheme:()=>af,Geometry:()=>Zo,Geometry3DTileContent:()=>p1e,GeometryAttribute:()=>Yr,GeometryAttributes:()=>yc,GeometryFactory:()=>Pat,GeometryInstance:()=>co,GeometryInstanceAttribute:()=>k_,GeometryOffsetAttribute:()=>Cl,GeometryPipeline:()=>rc,GeometryPipelineStage:()=>QBe,GeometryType:()=>HL,GeometryUpdater:()=>th,GeometryVisualizer:()=>PIe,GetFeatureInfoFormat:()=>S7,GifImageProperty:()=>rXe,Globe:()=>Coe,GlobeDepth:()=>cbe,GlobeSurfaceShaderSet:()=>Mwe,GlobeSurfaceTile:()=>zM,GlobeSurfaceTileProvider:()=>Lwe,GlobeTranslucency:()=>PJ,GlobeTranslucencyFramebuffer:()=>Abe,GlobeTranslucencyState:()=>abe,GltfBufferViewLoader:()=>une,GltfDracoLoader:()=>cne,GltfImageLoader:()=>hne,GltfIndexBufferLoader:()=>dne,GltfJsonLoader:()=>pne,GltfLoader:()=>nJ,GltfLoaderUtil:()=>OM,GltfStructuralMetadataLoader:()=>c_e,GltfTextureLoader:()=>mne,GltfVertexBufferLoader:()=>Cne,GoogleEarthEnterpriseImageryProvider:()=>kst,GoogleEarthEnterpriseMapsProvider:()=>Iwe,GoogleEarthEnterpriseMetadata:()=>IN,GoogleEarthEnterpriseTerrainData:()=>pie,GoogleEarthEnterpriseTerrainProvider:()=>Oat,GoogleEarthEnterpriseTileInformation:()=>QSe,GpxDataSource:()=>ySe,Graticules:()=>oXe,GraticulesImageryProvider:()=>m5,GregorianDate:()=>Z8,GridImageryProvider:()=>Ost,GridMaterialProperty:()=>lie,GroundGeometryUpdater:()=>Xl,GroundPolylineGeometry:()=>are,GroundPolylinePrimitive:()=>o6,GroundPrimitive:()=>oN,GroupMetadata:()=>Fte,GwBufferAnalysis:()=>Vre,HeadingPitchRange:()=>Ex,HeadingPitchRoll:()=>dC,Heap:()=>Fme,HeightReference:()=>xn,HeightmapEncoding:()=>VF,HeightmapTerrainData:()=>bQ,HeightmapTessellator:()=>toe,HermitePolynomialApproximation:()=>oSe,HermiteSpline:()=>QK,HilbertOrder:()=>Tte,HomeButton:()=>RQe,HomeButtonViewModel:()=>PQe,HorizontalOrigin:()=>tA,HugeAdapter:()=>k6,I3SDataProvider:()=>Ust,I3SFeature:()=>CDe,I3SField:()=>yDe,I3SGeometry:()=>Bie,I3SLayer:()=>bie,I3SNode:()=>wie,I3dmLoader:()=>w_e,I3dmParser:()=>B_e,Iau2000Orientation:()=>kwe,Iau2006XysData:()=>ECe,Iau2006XysSample:()=>Jie,IauOrientationAxes:()=>Owe,IauOrientationParameters:()=>Nwe,ImageBasedLighting:()=>_ne,ImageBasedLightingPipelineStage:()=>q_e,ImageCombine:()=>tre,ImageMaterialProperty:()=>V0,Imagery:()=>Xne,ImageryLayer:()=>dD,ImageryLayerCollection:()=>Fwe,ImageryLayerFeatureInfo:()=>pN,ImageryProvider:()=>a2,ImageryState:()=>sc,Implicit3DTileContent:()=>Lte,ImplicitAvailabilityBitstream:()=>Pte,ImplicitMetadataView:()=>Nne,ImplicitSubdivisionScheme:()=>uC,ImplicitSubtree:()=>v1e,ImplicitSubtreeMetadata:()=>x1e,ImplicitTileCoordinates:()=>X1e,ImplicitTileset:()=>q1e,IndexDatatype:()=>Nn,InfoBox:()=>NQe,InfoBoxViewModel:()=>FQe,InspectorShared:()=>z8,InstanceAttributeSemantic:()=>nC,InstancingPipelineStage:()=>sBe,InterpolationAlgorithm:()=>Uat,InterpolationType:()=>oF,Intersect:()=>La,IntersectionTests:()=>Xh,Intersections2D:()=>Z6,Interval:()=>fD,InvertClassification:()=>_oe,Ion:()=>xF,IonGeocoderService:()=>DQe,IonImageryProvider:()=>JG,IonResource:()=>jk,IonWorldImageryStyle:()=>WG,Iso8601:()=>Cn,JobScheduler:()=>sbe,JobType:()=>KE,JsonMetadataTable:()=>KY,JulianDate:()=>fi,KTX2Transcoder:()=>Ome,KeyboardEventModifier:()=>eI,KmlCamera:()=>Xve,KmlDataSource:()=>Pre,KmlLookAt:()=>Zve,KmlTour:()=>$ve,KmlTourFlyTo:()=>eEe,KmlTourWait:()=>iEe,Label:()=>V7,LabelCollection:()=>qM,LabelGraphics:()=>u6,LabelStyle:()=>pA,LabelVisualizer:()=>RIe,LagrangePolynomialApproximation:()=>sSe,LeapSecond:()=>$c,Light:()=>Hst,LightingModel:()=>rI,LightingPipelineStage:()=>DBe,LinearApproximation:()=>Qre,LinearSampler:()=>s2,LinearSpline:()=>cJ,MVTImageryProvider:()=>dXe,ManagedArray:()=>GM,MapMode2D:()=>nQ,MapProjection:()=>zat,MapWidget:()=>clt,MapboxApi:()=>Vat,MapboxImageryProvider:()=>bJ,MapboxStyleImageryProvider:()=>zst,Material:()=>as,MaterialAppearance:()=>Ig,MaterialPass:()=>jSe,MaterialPipelineStage:()=>MBe,MaterialProperty:()=>sC,Math:()=>je,Matrix2:()=>n0,Matrix3:()=>ci,Matrix4:()=>Xe,MetadataClass:()=>Q6,MetadataClassProperty:()=>WY,MetadataComponentType:()=>$s,MetadataEntity:()=>su,MetadataEnum:()=>s_e,MetadataEnumValue:()=>a_e,MetadataPipelineStage:()=>IM,MetadataSchema:()=>rO,MetadataSchemaLoader:()=>yne,MetadataSemantic:()=>E1e,MetadataTable:()=>tO,MetadataTableProperty:()=>GIe,MetadataType:()=>Zs,MipmapHint:()=>j8,Model:()=>cI,Model3DTileContent:()=>NL,ModelAlphaOptions:()=>qBe,ModelAnimation:()=>P_e,ModelAnimationChannel:()=>T_e,ModelAnimationCollection:()=>R_e,ModelAnimationLoop:()=>Gb,ModelAnimationState:()=>UL,ModelArticulation:()=>$_e,ModelArticulationStage:()=>Z_e,ModelClippingPlanesPipelineStage:()=>iBe,ModelColorPipelineStage:()=>SK,ModelComponents:()=>ta,ModelDrawCommand:()=>G_e,ModelFeature:()=>L_e,ModelFeatureTable:()=>F_e,ModelGraphics:()=>xY,ModelLightingOptions:()=>u1e,ModelMatrixUpdateStage:()=>uBe,ModelNode:()=>rBe,ModelRenderResources:()=>i1e,ModelRuntimeNode:()=>ABe,ModelRuntimePrimitive:()=>JBe,ModelSceneGraph:()=>A1e,ModelSilhouettePipelineStage:()=>o1e,ModelSkin:()=>jBe,ModelSplitterPipelineStage:()=>s1e,ModelStatistics:()=>h1e,ModelType:()=>z0,ModelUtility:()=>au,ModelVisualizer:()=>f1e,Moon:()=>xoe,MorphTargetsPipelineStage:()=>RBe,MorphWeightSpline:()=>Kat,MortonOrder:()=>S8,MultiResourceImageryProvider:()=>zre,MultiResourceTerrainProvider:()=>Kre,Multiple3DTileContent:()=>G1e,MultisampleFramebuffer:()=>m_e,NavigationControl:()=>pH,NavigationHelpButton:()=>OQe,NavigationHelpButtonViewModel:()=>kQe,NavigationUtils:()=>mH,NavigationViewModel:()=>L7,NearFarScalar:()=>To,NeverTileDiscardPolicy:()=>Kst,NodeRenderResources:()=>l1e,NodeStatisticsPipelineStage:()=>cBe,NodeTransformationProperty:()=>pre,OIT:()=>gbe,Occluder:()=>Gre,OctahedralProjectedCubeMap:()=>b5,OffsetGeometryInstanceAttribute:()=>a0,OlMVTImageryProvider:()=>Jre,OpenCageGeocoderService:()=>Yat,OpenStreetMapImageryProvider:()=>D7,OrderedGroundPrimitiveCollection:()=>$Ee,OrientedBoundingBox:()=>Hf,OrthographicFrustum:()=>Ss,OrthographicOffCenterFrustum:()=>K0,Packable:()=>Jat,PackableForInterpolation:()=>Wat,Particle:()=>yae,ParticleBurst:()=>BH,ParticleEmitter:()=>Wst,ParticleSystem:()=>_2,Pass:()=>hr,PassState:()=>cm,PathGraphics:()=>vY,PathVisualizer:()=>$1e,PeliasGeocoderService:()=>SQe,PerInstanceColorAppearance:()=>Va,PerformanceDisplay:()=>OJ,PerformanceWatchdog:()=>MDe,PerformanceWatchdogViewModel:()=>TDe,PerspectiveFrustum:()=>Yu,PerspectiveOffCenterFrustum:()=>n2,PerspectiveProjectionMap:()=>FY,PerspectiveProjectionMapShader:()=>m7,PerspectiveProjectionMapWithDepth:()=>NY,PerspectiveProjectionMapWithDepthShader:()=>nF,PickDepth:()=>lbe,PickDepthFramebuffer:()=>pbe,PickFramebuffer:()=>mbe,PickGlobeSlope:()=>Bot,Picking:()=>Ibe,PickingPipelineStage:()=>LBe,PinBuilder:()=>BY,PixelDatatype:()=>Qn,PixelFormat:()=>Gn,Plane:()=>Ja,PlaneGeometry:()=>dIe,PlaneGeometryUpdater:()=>pIe,PlaneGraphics:()=>Ove,PlaneOutlineGeometry:()=>fIe,PntsLoader:()=>d1e,PntsParser:()=>Rne,PointCloud:()=>uwe,PointCloudEyeDomeLighting:()=>aJ,PointCloudShading:()=>T6,PointCloudStylingPipelineStage:()=>NBe,PointGraphics:()=>Cre,PointPrimitive:()=>Tx,PointPrimitiveCollection:()=>sY,PointVisualizer:()=>ewe,PolygonDepth:()=>b8,PolygonDepthFS:()=>Sne,PolygonDepthVS:()=>Dne,PolygonGeometry:()=>eh,PolygonGeometryLibrary:()=>ql,PolygonGeometryUpdater:()=>yIe,PolygonGraphics:()=>yl,PolygonHierarchy:()=>Un,PolygonOutlineGeometry:()=>CIe,PolygonPipeline:()=>yA,Polyline:()=>t2,PolylineArrowMaterialProperty:()=>vK,PolylineCollection:()=>Y5,PolylineColorAppearance:()=>ly,PolylineDashMaterialProperty:()=>Vl,PolylineGeometry:()=>Vk,PolylineGeometryUpdater:()=>twe,PolylineGlowMaterialProperty:()=>uie,PolylineGraphics:()=>FD,PolylineMaterialAppearance:()=>L_,PolylineOutlineMaterialProperty:()=>JM,PolylinePipeline:()=>jA,PolylineTrailLinkMaterialProperty:()=>wot,PolylineVisualizer:()=>rwe,PolylineVolumeGeometry:()=>xIe,PolylineVolumeGeometryLibrary:()=>C5,PolylineVolumeGeometryUpdater:()=>EIe,PolylineVolumeGraphics:()=>yre,PolylineVolumeOutlineGeometry:()=>vIe,PositionProperty:()=>yY,PositionPropertyArray:()=>d8,PostProcessStage:()=>va,PostProcessStageCollection:()=>jbe,PostProcessStageComposite:()=>CC,PostProcessStageLibrary:()=>bv,PostProcessStageSampleMode:()=>Dv,PostProcessStageTextureCache:()=>Toe,Primitive:()=>Xa,PrimitiveCollection:()=>MD,PrimitiveLoadPlan:()=>rJ,PrimitiveOutlineGenerator:()=>Ene,PrimitiveOutlinePipelineStage:()=>UBe,PrimitivePipeline:()=>s5,PrimitiveRenderResources:()=>c1e,PrimitiveState:()=>i0,PrimitiveStatisticsPipelineStage:()=>GBe,PrimitiveType:()=>yn,ProjectionPicker:()=>GQe,ProjectionPickerViewModel:()=>UQe,Property:()=>Nt,PropertyArray:()=>oae,PropertyAttribute:()=>lne,PropertyAttributeProperty:()=>kIe,PropertyBag:()=>LD,PropertyTable:()=>AN,PropertyTexture:()=>sne,PropertyTextureProperty:()=>FIe,ProviderViewModel:()=>fp,Proxy:()=>Xat,QuadraticRealPolynomial:()=>zb,QuadtreeOccluders:()=>foe,QuadtreePrimitive:()=>BP,QuadtreePrimitivezh:()=>Sot,QuadtreeTile:()=>goe,QuadtreeTileLoadState:()=>mC,QuadtreeTileProvider:()=>jst,QuantizedMeshTerrainData:()=>coe,QuarticRealPolynomial:()=>Eve,Quaternion:()=>jr,QuaternionSpline:()=>S_e,Queue:()=>d5,RasterizeHtml:()=>sH,Ray:()=>ss,Rectangle:()=>Si,RectangleCollisionChecker:()=>nne,RectangleGeometry:()=>GY,RectangleGeometryLibrary:()=>uy,RectangleGeometryUpdater:()=>QIe,RectangleGraphics:()=>c6,RectangleOutlineGeometry:()=>ine,RectangularSensor:()=>jK,RectangularSensorFS:()=>xie,RectangularSensorGraphics:()=>mlt,RectangularSensorPrimitive:()=>KSe,RectangularSensorScanPlaneFS:()=>zSe,RectangularSensorVS:()=>gae,RectangularSensorVisualizer:()=>YSe,ReferenceFrame:()=>s0,ReferenceProperty:()=>QY,RenderEntity:()=>aW,RenderObjectFactory:()=>Vc,RenderState:()=>fn,Renderbuffer:()=>G_,RenderbufferFormat:()=>qE,Request:()=>cC,RequestErrorEvent:()=>r5,RequestScheduler:()=>V1,RequestState:()=>CA,RequestType:()=>oB,ResetViewNavigationControl:()=>LSe,Resource:()=>An,ResourceCache:()=>sf,ResourceCacheKey:()=>nw,ResourceCacheStatistics:()=>u_e,ResourceLoader:()=>fy,ResourceLoaderState:()=>ha,Rotation:()=>YD,RuntimeError:()=>nr,S2Cell:()=>zG,S3MCacheFileRenderEntity:()=>Iie,S3MCompressType:()=>Clt,S3MContentFactory:()=>iDe,S3MContentParser:()=>rDe,S3MCreateIndexJob:()=>tDe,S3MCreateVertexJob:()=>$Se,S3MDataSource:()=>Pot,S3MLayerCache:()=>nDe,S3MLayerScheduler:()=>oDe,S3MPixelFormat:()=>ylt,S3MTile:()=>sDe,S3MTilesFS:()=>XSe,S3MTilesLayer:()=>pae,S3MTilesVS:()=>qSe,S3ModelParser:()=>aDe,SDFSettings:()=>Qv,SampledPositionProperty:()=>R1,SampledProperty:()=>uM,Sampler:()=>Hs,ScaledPositionProperty:()=>f6,Scene:()=>Loe,SceneFramebuffer:()=>woe,SceneMode:()=>xi,SceneMode2DPipelineStage:()=>HBe,SceneModePicker:()=>VQe,SceneModePickerViewModel:()=>HQe,SceneTransforms:()=>Qs,SceneTransitioner:()=>Zbe,ScreenSpaceCameraController:()=>oQe,ScreenSpaceEventHandler:()=>Ur,ScreenSpaceEventType:()=>Ki,SelectedFeatureIdPipelineStage:()=>DK,SelectionIndicator:()=>KQe,SelectionIndicatorViewModel:()=>zQe,Sensor:()=>hst,ShaderBuilder:()=>t1e,ShaderCache:()=>zwe,ShaderDestination:()=>Sr,ShaderFunction:()=>e1e,ShaderProgram:()=>_s,ShaderSource:()=>Fr,ShaderStruct:()=>ZBe,ShadowMap:()=>vQ,ShadowMapShader:()=>pF,ShadowMode:()=>Al,ShadowVolumeAppearance:()=>gM,ShowGeometryInstanceAttribute:()=>wu,Simon1994PlanetaryPositions:()=>kK,SimplePolylineGeometry:()=>Zat,SingleTileImageryProvider:()=>QQ,SkinningPipelineStage:()=>zBe,SkyAtmosphere:()=>aH,SkyBox:()=>CN,SphereEmitter:()=>wH,SphereGeometry:()=>$at,SphereOutlineGeometry:()=>tP,Spherical:()=>lSe,Spline:()=>uf,SplitDirection:()=>uI,Splitter:()=>eoe,SpotLight:()=>Lot,StaticGeometryColorBatch:()=>AM,StaticGeometryPerMaterialBatch:()=>hM,StaticGroundGeometryColorBatch:()=>Ete,StaticGroundGeometryPerMaterialBatch:()=>SIe,StaticGroundPolylinePerMaterialBatch:()=>iwe,StaticOutlineGeometryBatch:()=>Ite,StencilConstants:()=>ca,StencilFunction:()=>Ku,StencilOperation:()=>lo,SteppedSpline:()=>Q_e,StripeMaterialProperty:()=>cie,StripeOrientation:()=>qF,StructuralMetadata:()=>nP,StyleCommandsNeeded:()=>Q5,StyleExpression:()=>qst,Sun:()=>Noe,SunLight:()=>tH,SunPostProcess:()=>lQe,SupportedImageFormats:()=>A_e,SvgPathBindingHandler:()=>hwe,TaskProcessor:()=>Vf,TerrainData:()=>AO,TerrainEncoding:()=>HM,TerrainExaggeration:()=>ID,TerrainFillMesh:()=>hoe,TerrainFlatten:()=>vN,TerrainFlattenPolygonTexture:()=>vSe,TerrainMesh:()=>hO,TerrainOffsetProperty:()=>Zre,TerrainProvider:()=>Cx,TerrainQuantization:()=>Pv,TerrainState:()=>mh,Texture:()=>yo,TextureAtlas:()=>H7,TextureCache:()=>Kwe,TextureMagnificationFilter:()=>Ch,TextureManager:()=>gve,TextureMinificationFilter:()=>fs,TextureUniform:()=>dve,TextureWrap:()=>Za,TileAvailability:()=>$L,TileBoundingRegion:()=>S5,TileBoundingS2Cell:()=>H1e,TileBoundingSphere:()=>yP,TileBoundingVolume:()=>Xst,TileCoordinatesImageryProvider:()=>IDe,TileDiscardPolicy:()=>Zst,TileEdge:()=>Ga,TileImagery:()=>Zne,TileMapServiceImageryProvider:()=>_P,TileMetadata:()=>k1e,TileOrientedBoundingBox:()=>kF,TileProviderError:()=>wc,TileReplacementQueue:()=>moe,TileSelectionResult:()=>sa,TileState:()=>$st,Tileset3DTileContent:()=>_1e,TilesetMetadata:()=>z1e,TilesetPipelineStage:()=>W_e,TilingScheme:()=>est,TimeConstants:()=>Uu,TimeDynamicImagery:()=>loe,TimeDynamicPointCloud:()=>K6,TimeInterval:()=>el,TimeIntervalCollection:()=>mx,TimeIntervalCollectionPositionProperty:()=>D8,TimeIntervalCollectionProperty:()=>f8,TimeStandard:()=>nu,Timeline:()=>WQe,TimelineHighlightRange:()=>YQe,TimelineTrack:()=>JQe,Tipsify:()=>Mve,ToggleButtonViewModel:()=>xG,Tonemapper:()=>XG,Transforms:()=>zn,TranslationRotationScale:()=>aB,TranslucentTileClassification:()=>ybe,TridiagonalSystemSolver:()=>wne,TrustedServers:()=>Uie,TweenCollection:()=>Poe,UniformState:()=>Ywe,UniformType:()=>pa,UrlTemplateGeojsonProvider:()=>kot,UrlTemplateImageryProvider:()=>sw,UserInterfaceControl:()=>fae,Utils:()=>fQ,VERSION:()=>vlt,VRButton:()=>qQe,VRButtonViewModel:()=>jQe,VRTheWorldTerrainProvider:()=>rst,VaryingType:()=>xx,Vector3DTileBatch:()=>Q8,Vector3DTileClampedPolylines:()=>D1e,Vector3DTileContent:()=>P1e,Vector3DTileGeometry:()=>Bk,Vector3DTilePoints:()=>B1e,Vector3DTilePolygons:()=>w1e,Vector3DTilePolylines:()=>One,Vector3DTilePrimitive:()=>Fne,VelocityOrientationProperty:()=>uSe,VelocityVectorProperty:()=>aae,VertexArray:()=>Hc,VertexArrayFacade:()=>aY,VertexAttributeSemantic:()=>Fo,VertexCompressOption:()=>_1,VertexFormat:()=>Wr,VerticalOrigin:()=>wn,VideoSynchronizer:()=>tst,View:()=>Qoe,ViewShed:()=>Het,ViewShedMap:()=>nH,ViewShedMapShader:()=>EF,Viewer:()=>XJ,ViewportQuad:()=>elt,Visibility:()=>vg,Visualizer:()=>cat,VulkanConstants:()=>nst,WallGeometry:()=>DIe,WallGeometryLibrary:()=>one,WallGeometryUpdater:()=>MIe,WallGraphics:()=>EY,WallOutlineGeometry:()=>TIe,WaterFS:()=>TY,WaterMaterialProperty:()=>Oot,WebGLConstants:()=>Ii,WebMapServiceImageryProvider:()=>DJ,WebMapTileServiceImageryProvider:()=>X6,WebMercatorProjection:()=>NA,WebMercatorTilingScheme:()=>Am,WindingOrder:()=>Z_,WireframeIndexGenerator:()=>Mne,WireframePipelineStage:()=>YBe,ZoomNavigationControl:()=>mie,_shadersAcesTonemappingStage:()=>_be,_shadersAdditiveBlend:()=>aQe,_shadersAdjustTranslucentFS:()=>Wte,_shadersAllMaterialAppearanceFS:()=>mEe,_shadersAllMaterialAppearanceVS:()=>CEe,_shadersAmbientOcclusionGenerate:()=>Bbe,_shadersAmbientOcclusionModulate:()=>wbe,_shadersAspectRampMaterial:()=>Gme,_shadersAtmosphereCommon:()=>R8,_shadersBasicMaterialAppearanceFS:()=>yEe,_shadersBasicMaterialAppearanceVS:()=>xEe,_shadersBillboardCollectionFS:()=>Xxe,_shadersBillboardCollectionVS:()=>Zxe,_shadersBlackAndWhite:()=>bbe,_shadersBloomComposite:()=>Qbe,_shadersBrdfLutGeneratorFS:()=>qwe,_shadersBrightPass:()=>sQe,_shadersBrightness:()=>Sbe,_shadersBumpMapMaterial:()=>Hme,_shadersCPUStylingStageFS:()=>pBe,_shadersCPUStylingStageVS:()=>gBe,_shadersCheckFloatTexturePrecisionFS:()=>Uot,_shadersCheckerboardMaterial:()=>Vme,_shadersCloudCollectionFS:()=>$Qe,_shadersCloudCollectionVS:()=>eSe,_shadersCloudNoiseFS:()=>tSe,_shadersCloudNoiseVS:()=>iSe,_shadersCompareAndPackTranslucentDepth:()=>Cbe,_shadersCompositeOITFS:()=>hbe,_shadersCompositeTranslucentClassification:()=>T7,_shadersContrastBias:()=>Dbe,_shadersCustomShaderStageFS:()=>yBe,_shadersCustomShaderStageVS:()=>CBe,_shadersCzmBuiltins:()=>a7,_shadersDepthOfField:()=>Tbe,_shadersDepthPlaneFS:()=>$we,_shadersDepthPlaneVS:()=>ebe,_shadersDepthView:()=>Mbe,_shadersDepthViewPacked:()=>tlt,_shadersDotMaterial:()=>zme,_shadersEdgeDetection:()=>Pbe,_shadersElevationBandMaterial:()=>Kme,_shadersElevationContourMaterial:()=>Yme,_shadersElevationRampMaterial:()=>Jme,_shadersEllipsoidFS:()=>Yte,_shadersEllipsoidSurfaceAppearanceFS:()=>IEe,_shadersEllipsoidSurfaceAppearanceVS:()=>_Ee,_shadersEllipsoidVS:()=>Jte,_shadersFXAA:()=>Lbe,_shadersFXAA3_11:()=>Gbe,_shadersFadeMaterial:()=>Wme,_shadersFeatureIdStageFS:()=>xBe,_shadersFeatureIdStageVS:()=>vBe,_shadersFilmicTonemapping:()=>Rbe,_shadersGaussianBlur1D:()=>GK,_shadersGaussianBlur1DSun:()=>zbe,_shadersGeometryStageFS:()=>wBe,_shadersGeometryStageVS:()=>bBe,_shadersGlobeFS:()=>Swe,_shadersGlobeVS:()=>Dwe,_shadersGridMaterial:()=>jme,_shadersGroundAtmosphere:()=>Vte,_shadersHSBToRGB:()=>qye,_shadersHSLToRGB:()=>Xye,_shadersImageBasedLightingStageFS:()=>j_e,_shadersInstancingStageCommon:()=>nBe,_shadersInstancingStageVS:()=>oBe,_shadersLegacyInstancingStageVS:()=>aBe,_shadersLensFlare:()=>Fbe,_shadersLightingStageFS:()=>SBe,_shadersMaterialStageFS:()=>TBe,_shadersMetadataStageFS:()=>EBe,_shadersMetadataStageVS:()=>IBe,_shadersModelClippingPlanesStageFS:()=>tBe,_shadersModelColorStageFS:()=>eBe,_shadersModelFS:()=>N_e,_shadersModelSilhouetteStageFS:()=>r1e,_shadersModelSilhouetteStageVS:()=>n1e,_shadersModelSplitterStageFS:()=>a1e,_shadersModelVS:()=>k_e,_shadersModifiedReinhardTonemapping:()=>Nbe,_shadersMorphTargetsStageVS:()=>PBe,_shadersNightVision:()=>kbe,_shadersNormalMapMaterial:()=>qme,_shadersOctahedralProjectionAtlasFS:()=>d_e,_shadersOctahedralProjectionFS:()=>f_e,_shadersOctahedralProjectionVS:()=>g_e,_shadersPassThrough:()=>KM,_shadersPassThroughDepth:()=>UK,_shadersPerInstanceColorAppearanceFS:()=>Fve,_shadersPerInstanceColorAppearanceVS:()=>Nve,_shadersPerInstanceFlatColorAppearanceFS:()=>sre,_shadersPerInstanceFlatColorAppearanceVS:()=>kve,_shadersPointCloudEyeDomeLighting:()=>C_e,_shadersPointCloudStylingStageVS:()=>FBe,_shadersPointPrimitiveCollectionFS:()=>uG,_shadersPointPrimitiveCollectionVS:()=>tve,_shadersPolylineArrowMaterial:()=>Xme,_shadersPolylineColorAppearanceVS:()=>Qve,_shadersPolylineCommon:()=>U5,_shadersPolylineDashMaterial:()=>Zme,_shadersPolylineFS:()=>lre,_shadersPolylineGlowMaterial:()=>$me,_shadersPolylineMaterialAppearanceVS:()=>Sve,_shadersPolylineOutlineMaterial:()=>eCe,_shadersPolylineShadowVolumeFS:()=>_ve,_shadersPolylineShadowVolumeMorphFS:()=>Bve,_shadersPolylineShadowVolumeMorphVS:()=>wve,_shadersPolylineShadowVolumeVS:()=>bve,_shadersPolylineVS:()=>BEe,_shadersPostProcessRain:()=>ilt,_shadersPostProcessSnow:()=>rlt,_shadersPrimitiveOutlineStageFS:()=>OBe,_shadersPrimitiveOutlineStageVS:()=>kBe,_shadersRGBToHSB:()=>Ixe,_shadersRGBToHSL:()=>_xe,_shadersRGBToXYZ:()=>Bxe,_shadersReinhardTonemapping:()=>Obe,_shadersReprojectWebMercatorFS:()=>owe,_shadersReprojectWebMercatorVS:()=>awe,_shadersRimLightingMaterial:()=>tCe,_shadersSelectedFeatureIdStageCommon:()=>Qte,_shadersShadowVolumeAppearanceFS:()=>Are,_shadersShadowVolumeAppearanceVS:()=>Lve,_shadersShadowVolumeFS:()=>q7,_shadersSilhouette:()=>Ube,_shadersSkinningStageVS:()=>VBe,_shadersSkyAtmosphereCommon:()=>$te,_shadersSkyAtmosphereFS:()=>pQe,_shadersSkyAtmosphereVS:()=>mQe,_shadersSkyBoxFS:()=>yQe,_shadersSkyBoxVS:()=>xQe,_shadersSlopeRampMaterial:()=>iCe,_shadersStripeMaterial:()=>rCe,_shadersSunFS:()=>vQe,_shadersSunShaft:()=>nlt,_shadersSunShaftHdr:()=>olt,_shadersSunShaftModulate:()=>Vbe,_shadersSunTextureFS:()=>Got,_shadersSunTextureFS_v2:()=>IQe,_shadersSunVS:()=>EQe,_shadersSunVisibleFS:()=>Kbe,_shadersSunVisibleShaft:()=>Ybe,_shadersSunVisibleVS:()=>K_e,_shadersTexturedMaterialAppearanceFS:()=>vEe,_shadersTexturedMaterialAppearanceVS:()=>EEe,_shadersVector3DTileClampedPolylinesFS:()=>S1e,_shadersVector3DTileClampedPolylinesVS:()=>Q1e,_shadersVector3DTilePolylinesVS:()=>b1e,_shadersVectorTileVS:()=>Dte,_shadersViewportQuadFS:()=>rSe,_shadersViewportQuadVS:()=>voe,_shadersWater:()=>nCe,_shadersXYZToRGB:()=>Wxe,_shadersacesTonemapping:()=>xye,_shadersalphaWeight:()=>vye,_shadersantialias:()=>Eye,_shadersapproximateSphericalCoordinates:()=>Iye,_shadersbackFacing:()=>_ye,_shadersbranchFreeTernary:()=>Bye,_shaderscascadeColor:()=>wye,_shaderscascadeDistance:()=>bye,_shaderscascadeMatrix:()=>Qye,_shaderscascadeWeights:()=>Sye,_shaderscolumbusViewMorph:()=>Dye,_shaderscomputePosition:()=>Tye,_shaderscosineAndSine:()=>Mye,_shadersdecompressTextureCoordinates:()=>Pye,_shadersdefaultPbrMaterial:()=>Rye,_shadersdegreesPerRadian:()=>QCe,_shadersdepthClamp:()=>Lye,_shadersdepthRange:()=>SCe,_shadersdepthRangeStruct:()=>Aye,_shaderseastNorthUpToEyeCoordinates:()=>Fye,_shadersellipsoidContainsPoint:()=>Nye,_shadersellipsoidWgs84TextureCoordinates:()=>kye,_shadersepsilon1:()=>DCe,_shadersepsilon2:()=>TCe,_shadersepsilon3:()=>MCe,_shadersepsilon4:()=>PCe,_shadersepsilon5:()=>RCe,_shadersepsilon6:()=>LCe,_shadersepsilon7:()=>FCe,_shadersequalsEpsilon:()=>Oye,_shaderseyeOffset:()=>Uye,_shaderseyeToWindowCoordinates:()=>Gye,_shadersfastApproximateAtan:()=>Hye,_shadersfog:()=>Vye,_shadersgammaCorrect:()=>zye,_shadersgeodeticSurfaceNormal:()=>Kye,_shadersgetDefaultMaterial:()=>Yye,_shadersgetLambertDiffuse:()=>Jye,_shadersgetSpecular:()=>Wye,_shadersgetWaterNoise:()=>jye,_shadershue:()=>Zye,_shadersinfinity:()=>NCe,_shadersinverseGamma:()=>$ye,_shadersisEmpty:()=>exe,_shadersisFull:()=>txe,_shaderslatitudeToWebMercatorFraction:()=>ixe,_shaderslineDistance:()=>nxe,_shaderslinearToSrgb:()=>rxe,_shadersluminance:()=>oxe,_shadersmaterial:()=>hye,_shadersmaterialInput:()=>dye,_shadersmetersPerPixel:()=>axe,_shadersmodelMaterial:()=>fye,_shadersmodelToWindowCoordinates:()=>sxe,_shadersmodelVertexOutput:()=>gye,_shadersmultiplyWithColorBalance:()=>lxe,_shadersnearFarScalar:()=>uxe,_shadersoctDecode:()=>cxe,_shadersoneOverPi:()=>kCe,_shadersoneOverTwoPi:()=>OCe,_shaderspackDepth:()=>Axe,_shaderspassCesium3DTile:()=>UCe,_shaderspassCesium3DTileClassification:()=>GCe,_shaderspassCesium3DTileClassificationIgnoreShow:()=>HCe,_shaderspassClassification:()=>VCe,_shaderspassCompute:()=>zCe,_shaderspassEnvironment:()=>KCe,_shaderspassGlobe:()=>YCe,_shaderspassOpaque:()=>JCe,_shaderspassOverlay:()=>WCe,_shaderspassTerrainClassification:()=>jCe,_shaderspassTranslucent:()=>qCe,_shaderspbrLighting:()=>hxe,_shaderspbrMetallicRoughnessMaterial:()=>dxe,_shaderspbrParameters:()=>pye,_shaderspbrSpecularGlossinessMaterial:()=>fxe,_shadersphong:()=>gxe,_shaderspi:()=>XCe,_shaderspiOverFour:()=>ZCe,_shaderspiOverSix:()=>$Ce,_shaderspiOverThree:()=>eye,_shaderspiOverTwo:()=>tye,_shadersplaneDistance:()=>pxe,_shaderspointAlongRay:()=>mxe,_shadersradiansPerDegree:()=>iye,_shadersray:()=>mye,_shadersrayEllipsoidIntersectionInterval:()=>Cxe,_shadersraySegment:()=>Cye,_shadersraySphereIntersectionInterval:()=>yxe,_shadersreadDepth:()=>xxe,_shadersreadNonPerspective:()=>vxe,_shadersreverseLogDepth:()=>Exe,_shadersround:()=>wxe,_shaderssampleOctahedralProjection:()=>bxe,_shaderssaturation:()=>Qxe,_shaderssceneMode2D:()=>rye,_shaderssceneMode3D:()=>nye,_shaderssceneModeColumbusView:()=>oye,_shaderssceneModeMorphing:()=>aye,_shadersshadowDepthCompare:()=>Sxe,_shadersshadowParameters:()=>yye,_shadersshadowVisibility:()=>Dxe,_shaderssignNotZero:()=>Txe,_shaderssolarRadius:()=>sye,_shaderssphericalHarmonics:()=>Mxe,_shaderssrgbToLinear:()=>Pxe,_shaderstangentToEyeSpaceMatrix:()=>Rxe,_shadersthreePiOver2:()=>lye,_shaderstransformPlane:()=>Lxe,_shaderstranslateRelativeToEye:()=>Fxe,_shaderstranslucentPhong:()=>Nxe,_shaderstranspose:()=>kxe,_shaderstwoPi:()=>uye,_shadersunpackDepth:()=>Oxe,_shadersunpackFloat:()=>Uxe,_shadersunpackUint:()=>Gxe,_shadersvalueTransform:()=>Hxe,_shadersvertexLogDepth:()=>Vxe,_shaderswebMercatorMaxLatitude:()=>cye,_shaderswindowToEyeCoordinates:()=>zxe,_shaderswriteDepthClamp:()=>Kxe,_shaderswriteLogDepth:()=>Yxe,_shaderswriteNonPerspective:()=>Jxe,addBuffer:()=>$Ie,addDefaults:()=>KIe,addExtensionsRequired:()=>qIe,addExtensionsUsed:()=>iO,addPipelineExtras:()=>ZY,addToArray:()=>H_,appendForwardSlash:()=>Tme,arrayRemoveDuplicates:()=>fC,barycentricCoordinates:()=>cre,binarySearch:()=>hC,buildDrawCommand:()=>J_e,buildModuleUrl:()=>xs,clone:()=>xo,combine:()=>ia,computeFlyToLocationForRectangle:()=>IJ,createBillboardPointCallback:()=>kne,createBlurStage:()=>yie,createCommand:()=>Hl,createDefaultImageryProviderViewModels:()=>Bwe,createDefaultTerrainProviderViewModels:()=>Qwe,createEdgeStage:()=>CH,createElevationBandMaterial:()=>Rst,createFragmentFromTemplate:()=>TSe,createGuid:()=>Vu,createMaterialPropertyDescriptor:()=>hy,createOsmBuildings:()=>Lst,createPropertyDescriptor:()=>Bi,createRawPropertyDescriptor:()=>M_,createTangentSpaceDebugPrimitive:()=>Fst,createTaskProcessorWorker:()=>xlt,createUniform:()=>_Ce,createUniformArray:()=>wCe,createWorldImagery:()=>Xk,createWorldTerrain:()=>bwe,crypto_js:()=>oD,decodeGoogleEarthEnterpriseData:()=>wSe,decodeVectorPolylinePositions:()=>T1e,defaultValue:()=>Ae,defer:()=>rA,defined:()=>O,deprecationWarning:()=>$D,destroyObject:()=>Qr,echarts:()=>kb,exportKml:()=>nat,findAccessorMinMax:()=>$Y,findContentMetadata:()=>zne,findGroupMetadata:()=>Kne,findTileMetadata:()=>U1e,forEachTextureInMaterial:()=>gne,formatError:()=>D5,fragment:()=>Get,freezeRenderState:()=>IKe,getAbsoluteUri:()=>eY,getAccessorByteStride:()=>cN,getBaseUri:()=>Pme,getBinaryAccessor:()=>vM,getClipAndStyleCode:()=>lwe,getClippingFunction:()=>$ne,getComponentReader:()=>VY,getElement:()=>iA,getExtensionFromUri:()=>Rie,getFilenameFromUri:()=>_Y,getImageFromTypedArray:()=>fve,getImagePixels:()=>i5,getJsonFromTypedArray:()=>Bx,getMagic:()=>b6,getStringFromTypedArray:()=>d2,getTimestamp:()=>OA,hasExtension:()=>Qg,heightReferenceOnEntityPropertyChanged:()=>kY,isBitSet:()=>q_,isBlobUri:()=>Lie,isCrossOriginUrl:()=>Fie,isDataUri:()=>tY,isLeapYear:()=>r8,jsencrypt:()=>ESe,knockout:()=>gr,knockout_3_5_1:()=>EP,knockout_es5:()=>Awe,libgif:()=>NEe,licensechack:()=>mat,loadAndExecuteScript:()=>Nie,loadCRN:()=>Gat,loadCubeMap:()=>CQe,loadDDS:()=>Gie,loadImageFromTypedArray:()=>Ane,loadKTX2:()=>ZF,loadView:()=>dae,mapbox_gl:()=>VEe,mergeSort:()=>LJ,modernizeShader:()=>bCe,moveTechniqueRenderStates:()=>jIe,moveTechniquesToExtension:()=>XIe,numberOfComponentsForType:()=>eO,objectToQuery:()=>kie,oneTimeWarning:()=>ua,packer:()=>Cve,parseBatchTable:()=>uJ,parseBoundingVolumeSemantics:()=>I1e,parseDefines:()=>VSe,parseFeatureMetadataLegacy:()=>VIe,parseGlb:()=>JIe,parseResponseHeaders:()=>Rme,parseStructuralMetadata:()=>HIe,pointInsideTriangle:()=>jat,preprocess3DTileContent:()=>Yne,purify:()=>fat,queryToObject:()=>xD,rasterizeHTML_allinone:()=>XQe,readAccessorPacked:()=>e_e,removeExtension:()=>bK,removeExtensionsRequired:()=>YIe,removeExtensionsUsed:()=>fne,removePipelineExtras:()=>WIe,removeUnusedElements:()=>ZIe,remove_primitive:()=>WK,resizeImageToNextPowerOfTwo:()=>W7,sampleTerrain:()=>dJ,sampleTerrainMostDetailed:()=>EQ,scaleToGeodeticSurface:()=>Vie,subdivideArray:()=>Dve,subscribeAndEvaluate:()=>WE,svgCompassGyro:()=>NSe,svgCompassOuterRing:()=>FSe,svgCompassRotationMarker:()=>kSe,svgReset:()=>PSe,turf:()=>Zl,updateAccessorComponentTypes:()=>t_e,updateVersion:()=>i_e,usesExtension:()=>_p,vertex:()=>Uet,viewerCesium3DTilesInspectorMixin:()=>Alt,viewerCesiumInspectorMixin:()=>hlt,viewerCesiumNavigationMixin:()=>cst,viewerDragDropMixin:()=>dlt,viewerPerformanceWatchdogMixin:()=>flt,webGLConstantToGlslType:()=>ost,wrapFunction:()=>DSe,writeTextToCanvas:()=>N5});function pW(o=!0){this.async=o}pW.prototype.getXmlHttpRequest=function(){if(window.XMLHttpRequest)return new XMLHttpRequest;if(window.ActiveXObject)return new ActiveXObject("MsXml2.XmlHttp")};pW.prototype.includeJsText=function(o,A){if(o!=null){var f=document.createElement("script");f.type="text/javascript",f.text=A,o.appendChild(f)}};pW.prototype.includeJsSrc=function(o,A){if(o!=null){var f=document.createElement("script");f.type="text/javascript",f.src=A,o.appendChild(f)}};pW.prototype.addJs=function(o,A){var f=this.getXmlHttpRequest(),m=this;f.onreadystatechange=function(){f.readyState===4&&(f.status===200||f.status===304?m.includeJsSrc(o,A):console.log("XML request error: "+f.statusText+" ("+f.status+")"))},f.open("GET",A,m.async),f.send(null),f.status===404?console.log(A+" is not found"):m.includeJsText(o,f.responseText)};var IC=pW;var V2i={testModel:"Workers/Model/xiaoche.glb",modelAxis:"Workers/Model/axis.gltf",flyModel:"Workers/Model/fly.glb",divpoint:"Workers/image/divpoint.png",divpoint1:"Workers/image/divpoint1.png",richtextpoint:"Workers/image/richtextpoint1.png",mark:"Workers/image/mark.png",mark1:"Workers/image/mark1.png",TrailLine:"Workers/image/TrailLine.png",road:"Workers/image/road.jpg",colors3:"Workers/image/colors3.png",loading:"Workers/image/loading.gif",smog:"Workers/image/smog.png",penquan:"Workers/image/penquan.png",fire:"Workers/image/fire.png",fire2:"Workers/image/fire2.png",bottomplane:"Workers/image/bottomplane.jpg",MTY0001:"Workers/image/MTY0001.jpg",MTY0002:"Workers/image/MTY0002.jpg",wall:"Workers/image/ggy.jpg",rotate:"Workers/image/rotate.png",move:"Workers/image/move.png",draw:"Workers/image/cursor/draw.cur",water:"Workers/image/waterNormals.jpg",movingRiver:"Workers/image/movingRiver.png",effectCircle:"Workers/image/circle.png",scanCircle:"Workers/image/scan.png",particles:"Workers/image/particles.png",trafficLight:{l_go:"Workers/image/trafficLights/l-go.png",l_wait:"Workers/image/trafficLights/l-wait.png",l_stop:"Workers/image/trafficLights/l-stop.png",l_null:"Workers/image/trafficLights/l-null.png",go:"Workers/image/trafficLights/go.png",wait:"Workers/image/trafficLights/wait.png",stop:"Workers/image/trafficLights/stop.png",null:"Workers/image/trafficLights/null.png",r_go:"Workers/image/trafficLights/r-go.png",r_wait:"Workers/image/trafficLights/r-wait.png",r_stop:"Workers/image/trafficLights/r-stop.png",r_null:"Workers/image/trafficLights/r-null.png",bg:"Workers/image/trafficLights/bg.png"}},cn=Object.freeze(V2i);function z2i(o,A){return o??A}var u0=z2i;var Ilt=`// author: \u5F20\u4E39\u948A
czm_material czm_getMaterial(czm_materialInput materialInput)
{
    czm_material material = czm_getDefaultMaterial(materialInput);
@@ -16748,7 +16748,7 @@
                }
                material.alpha = u_alpha;
            }
            `})};VO.prototype.destroy=function(){this._tileset.customShader===this._customShader&&(this._customShader=void 0,this._tileset.customShader=void 0),this._scene.preUpdate.removeEventListener(this._preUpdate)};function CRi(){this.customShaders={},this.customShaders.lightLine=VO}var Lct=CRi;function HH(o,A){this.options=Ae(A,{}),this.earthCtrl=o,this.viewer=o.coreMap,this.CSME=nre,this.Cust=new this.CSME.CustomShaderStage(this.options.primitive,A),this.stageArr=[],this.eventListener=null,this.eventListener=this.viewer.scene.preUpdate.addEventListener(()=>{this.Cust.update()}),this.create()}HH.prototype.create=function(o){let A=this,f=null;o?f=o:f=A.options,f.lineMaterialStage&&(A.LineMaterialStage=new A.CSME.LineMaterialStage(Ae(f.lineMaterialStage,{weight:.5})),A.Cust.addStage(A.LineMaterialStage),A.stageArr.push(A.LineMaterialStage)),f.gradientMaterialStage&&(A.GradientMaterialStage=new A.CSME.GradientMaterialStage(Ae(f.gradientMaterialStage,{weight:.5})),A.Cust.addStage(A.GradientMaterialStage),A.stageArr.push(A.GradientMaterialStage)),f.normalizeMaterialStage&&(A.NormalizeMaterialStage=new A.CSME.NormalizeMaterialStage(Ae(f.normalizeMaterialStage,{weight:.5})),A.Cust.addStage(A.NormalizeMaterialStage),A.stageArr.push(A.NormalizeMaterialStage)),f.dynamicColorMaterialStage&&(A.DynamicColorMaterialStage=new A.CSME.DynamicColorMaterialStage(Ae(f.dynamicColorMaterialStage,{weight:.5})),A.Cust.addStage(A.DynamicColorMaterialStage),A.stageArr.push(A.DynamicColorMaterialStage)),f.reflectMaterialStage&&(A.ReflectMaterialStage=new A.CSME.ReflectMaterialStage(Ae(f.reflectMaterialStage,{weight:.5})),A.Cust.addStage(A.ReflectMaterialStage),A.stageArr.push(A.ReflectMaterialStage)),f.textureMaterialStage&&(A.TextureMaterialStage=new A.CSME.TextureMaterialStage(Ae(f.textureMaterialStage,{weight:.5,url:`${globalThis.GEOWORLD_BASE_URL}Assets/Textures/window.png`})),A.Cust.addStage(A.TextureMaterialStage),A.stageArr.push(A.TextureMaterialStage))};HH.prototype.addStage=function(o){let A=this;A.Cust.addStage(o),A.stageArr.push(o)};HH.prototype.removeStage=function(o){this.Cust.removeStage(o.name)};HH.prototype.update=function(){let o=this;o.viewer.scene.preUpdate.removeEventListener(o.eventListener),o.eventListener=o.viewer.scene.preUpdate.addEventListener(()=>{o.Cust.update()})};HH.prototype.removeFromMap=function(){let o=this;for(let A=0;A<o.stageArr.length;A++)o.removeStage(o.stageArr[A]);o.viewer.scene.preUpdate.removeEventListener(o.eventListener),o.eventListener=null};var Fct=HH;function yse(o,A={}){this._earthCtrl=o,this._edgeStage=null,this._options=A,this._options.visibleEdgeColor=Ae(A.visibleEdgeColor,At.fromCssColorString("#101010")),this._options.outlineWidth=Ae(A.outlineWidth,1),this._options.thresholdAngle=Ae(A.thresholdAngle,12*Math.PI/180),this.add()}yse.prototype.add=function(){this._edgeStage=dH();let o=this._edgeStage;o.visibleEdgeColor=this._options.visibleEdgeColor,o.outlineWidth=this._options.outlineWidth,o.thresholdAngle=this._options.thresholdAngle,o.selected=[{},{}],o.enabled=!0,this._earthCtrl.Viewer.postProcessStages.add(o)};yse.prototype.removeFromMap=function(){this._edgeStage&&(this._earthCtrl.Viewer.postProcessStages.remove(this._edgeStage),this.__edgeStage=null)};Object.defineProperties(yse.prototype,{show:{get:function(){return this._edgeStage.show},set:function(o){this._edgeStage.show=o}},outlineWidth:{get:function(){return this._edgeStage.outlineWidth},set:function(o){this._edgeStage.outlineWidth=o}},thresholdAngle:{get:function(){return this._edgeStage.thresholdAngle},set:function(o){!o||(this._edgeStage.thresholdAngle=o)}},visibleEdgeColor:{get:function(){return this._edgeStage.visibleEdgeColor},set:function(o){!o||(this._edgeStage.visibleEdgeColor=o)}},hiddenEdgeColor:{get:function(){return this._edgeStage.hiddenEdgeColor},set:function(o){!o||(this._edgeStage.hiddenEdgeColor=o)}},showGlow:{get:function(){return this._edgeStage.showGlow},set:function(o){this._edgeStage.showGlow=o}},edgeGlow:{get:function(){return this._edgeStage.edgeGlow},set:function(o){this._edgeStage.edgeGlow=o}},edgeStrength:{get:function(){return this._edgeStage.edgeGlow},set:function(o){this._edgeStage.edgeGlow=o}},edgeOnly:{get:function(){return this._edgeStage.edgeOnly},set:function(o){this._edgeStage.edgeOnly=o}}});var Nct=yse;function xse(o,A={}){this._earthCtrl=o,this._edgeStage=null,this._options=A,this._visibleEdgeColor=Ae(A.visibleEdgeColor,At.fromCssColorString("#ff0000")),this._hiddenEdgeColor=Ae(A.hiddenEdgeColor,At.fromCssColorString("#4d4d4d")),this.handler=null,this.key=Ae(A.key,"id"),this.model=Ae(A.model,null),this.add()}xse.prototype.add=function(){let o=this,A="";this._edgeStage=dH(!0);let f=this._edgeStage;f.visibleEdgeColor=this._visibleEdgeColor,f.hiddenEdgeColor=this._hiddenEdgeColor,f.selected=[],f.enabled=!1,this._earthCtrl.Viewer.postProcessStages.add(f);function m(C,y){function x(E,I){let w=E.featuresLength;for(let Q=0;Q<w;++Q){let M=E.getFeature(Q);if(M.getProperty(o.key)===A){let T={pickId:M.pickId};y.selected=[T],y.enabled=!0}}}function v(E,I){let w=E.content,Q=w.innerContents;if(O(Q)){let M=Q.length;for(let B=0;B<M;++B)x(Q[B],I)}else x(w,I)}C.tileVisible.addEventListener(function(E){A!==""&&v(E,null)})}m(this.model,f),this.handler=new Ur(this._earthCtrl.coreMap.scene.canvas),this.handler.setInputAction(function(C){let y=o._earthCtrl.coreMap.scene.pick(C.position);if(f.selected=[],A="",!y||!y.primitive)return;let v=y.primitive._pickIds,I={pickId:y.pickId};f.selected=[I],f.enabled=!0,A=y.getProperty(o.key)},Ki.LEFT_CLICK)};xse.prototype.removeFromMap=function(){this.handler&&(this.handler.destroy(),this.handler=void 0),this._edgeStage&&this._earthCtrl.Viewer.postProcessStages.remove(this._edgeStage)};Object.defineProperties(xse.prototype,{showGlow:{get:function(){return this._edgeStage.showGlow},set:function(o){this._edgeStage.showGlow=o}},edgeGlow:{get:function(){return this._edgeStage.edgeGlow},set:function(o){this._edgeStage.edgeGlow=o}},edgeStrength:{get:function(){return this._edgeStage.edgeGlow},set:function(o){this._edgeStage.edgeGlow=o}},edgeOnly:{get:function(){return this._edgeStage.edgeOnly},set:function(o){this._edgeStage.edgeOnly=o}}});var kct=xse;function zs(o){this._earthCtrl=o,this._coreMap=o.coreMap}function Ox(){return((1+je.nextRandomNumber())*65536|0).toString(16).substring(1)}zs.createUUID=function(){return`${Ox()+Ox()}-${Ox()}-${Ox()}-${Ox()}-${Ox()}${Ox()}${Ox()}`};zs.createUUIDWithoutDash=function(){return Ox()+Ox()+Ox()+Ox()+Ox()+Ox()+Ox()+Ox()};zs.prototype.createUUID=function(){return zs.createUUID()};zs.prototype.createGroup=function(o){let A=new LH;return A.id=o.id||zs.createUUID(),A.name=o.name||"\u672A\u547D\u540D\u7EC4",A};zs.prototype.createImageryLayer=function(o,A){let f=new CTe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.IMAGERYPROVIDERS),f),f};zs.prototype.createTerrainLayer=function(o,A){let f=new yTe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.TERRAINPROVIDERS),f),f};zs.prototype.removeTerrainLayer=function(o){this._coreMap.terrainProvider=new IP({})};zs.prototype.createFeatureLayer=function(o,A){let f=new vTe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.FEATURELAYERS),f),f};zs.prototype.createModelLayer=function(o,A){let f=new xTe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.MODELLAYERS),f),f};zs.prototype.createWfsModel=function(o,A){let f=new p6(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.MODELLAYERS),f),f};zs.prototype.createModel=function(o,A){let f=new sTe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.removeModel=function(o){O(o)&&o.removeFromMap()};zs.prototype.createCZMLObject=function(o,A){let f=this,m=Ae(o.addToMap,!0),C=new eW(o.name);return C.load(o.url),m&&f._earthCtrl.dataSources.add(C),C.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A?this._earthCtrl.userScene.addChild(A,C):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),C),C};zs.prototype.createElement=function(o){let A={};return A[o.type]=o.parameters,O(o.name)&&(A.name=o.name),O(o.position)&&(A.position=o.position),this._earthCtrl.entities.add(A)};zs.prototype.removeElement=function(o){O(o)?this._earthCtrl.entities.remove(o):this._earthCtrl.entities.removeAll()};zs.prototype.createVideoProjection=function(o,A){o.addToMap=Ae(o.addToMap,!0);let f=Ae(o.sourceType,"perspective"),m=null;return f==="perspective"?(m=new $2e(this._earthCtrl,o),m.initialize(o),m.name=o.name,A?this._earthCtrl.userScene.addChild(A,m):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),m)):f==="panorama"?(m=new gct(this._earthCtrl,o),m.initialize(o),m.name=o.name,m.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A?this._earthCtrl.userScene.addChild(A,m):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),m)):f==="fisheye"&&(m=new eTe(this._earthCtrl,o),m.initialize(o),m.name=o.name,m.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A?this._earthCtrl.userScene.addChild(A,m):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),m)),m};zs.prototype.createTrack=function(o,A){let f=new pct(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),f.initialize(o),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createSceneNode=function(o,A,f){let m=new LH(this._earthCtrl);return m.id=o,m.name=A,m.label=f,m};zs.prototype.createFire=function(o,A){let f=new tTe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createSmoke=function(o,A){let f=new iTe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createExplosion=function(o,A){let f=new rTe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createFireworks=function(o,A){let f=new nTe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createRadarScan=function(o,A){let f=new oTe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),f.show=!0,A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createCircleScan=function(o,A){let f=new Bct(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),f.show=!0,A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createUpDownScan=function(o){let A=new bct(this._earthCtrl,o);return A.show=!0,A};zs.prototype.createWaters=function(o,A){let f=new ITe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),f.show=!0,A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createHeatmap=function(o,A){let f=xct.create(this._earthCtrl,o.bbox,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createLabel=function(o,A){let f=new lTe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createBillboard=function(o,A){let f=new aTe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createPolyline=function(o,A){let f=new uTe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createPolygon=function(o,A){let f=new cTe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createPoint=function(o,A){let f=new ATe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createBox=function(o,A){let f=new hTe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createEllipsoid=function(o,A){let f=new fTe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createCylinder=function(o,A){let f=new dTe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createRectangle=function(o,A){let f=new gTe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createEllipse=function(o,A){let f=new pTe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createPolylineVolume=function(o,A){let f=new mTe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createEChartLayer=function(o,A){let f=new ETe(this._earthCtrl);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(o),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createPointLight=function(o){return new Sct(this._earthCtrl,o)};zs.prototype.createHawkeye=function(o){let A=new BTe(this._earthCtrl,o);A.name=o.name,A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&A.addToMap(o)};zs.prototype.createSpotLight=function(o){let A=new wTe(this._earthCtrl.coreMap,o.entities,o.lights);return A.name=o.name,A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A};zs.prototype.createCustomShaderManager=function(o){let A=new Lct;return A.name=Ae(o.name,null),A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A};zs.prototype.createCustomShaderStage=function(o){let A=new Fct(this._earthCtrl,o);return A.name=Ae(o.name,null),A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A};zs.prototype.createModelOutline=function(o={}){let A=new Nct(this._earthCtrl,o);return A.name=Ae(o.name,null),A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A};zs.prototype.modelClick=function(o={}){let A=new kct(this._earthCtrl,o);return A.name=Ae(o.name,null),A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A};var HP=zs;var vse=class extends Y0{constructor(A,f){super(A),this._objectMap={},this._rootNode=null,this._isBenchUpdate=!1,this._selectSet=new X2e(A);let m=new LH(A);m.id=HP.createUUID(),m.name=Ae(f.ProjectName,"root"),m.version=Ae(f.version,null),m.desc=Ae(f.desc,null),m.createTime=Ae(f.createTime,new Date().toISOString()),m.lastUpdate=Ae(f.lastUpdate,null),m.show=!0,this._rootNode=m,this._editNode=m,this._objectMap[m.id]=m,this._EventDocumentChanged=new UO("EventDocumentChanged")}finalize(){this._rootNode=null,this._objectMap={}}getChildById(A){return this._objectMap.hasOwnProperty(A)?this._objectMap[A]:null}addChild(A,f){A.addChild(f),this._objectMap[f.id]=f,this._isBenchUpdate||this.commitChanged()}removeChildById(A){let f=this._objectMap[A];O(f)&&this.removeChild(f)}removeChild(A){O(A)&&O(A.parentNode)&&(A.removeFromMap(),A.parentNode.removeChild(A)),delete this._objectMap[A.id],this._isBenchUpdate||this.commitChanged()}removeAll(){}beginUpdate(){this._isBenchUpdate=!0}endUpdate(){this._isBenchUpdate&&(this.commitChanged(),this._isBenchUpdate=!1)}commitChanged(){this._EventDocumentChanged.notifyEvent(this)}flyTo(A,f){O(A)&&O(A._primitive)&&(A=A._primitive),this._earthCtrl.coreMap.flyTo(A,f)}findLocationByID(A,f){if(!A)return;let m=this.getChildById(A);O(m)&&O(m._primitive)&&(m=m._primitive),this._earthCtrl.coreMap.flyTo(m,f)}moveLayer(A,f){let m=this.getChildById(A),C=null;for(let y=0;y<m.parentNode.childNodes.length;y++)m.parentNode.childNodes[y].id===m.id&&(C=y);f==="up"?(this._earthCtrl.coreMap.scene.imageryLayers.raise(m._primitive),this.changeLayer(m.parentNode.childNodes,C,C+1)):f==="down"&&(this._earthCtrl.coreMap.scene.imageryLayers.lower(m._primitive),this.changeLayer(m.parentNode.childNodes,C,C-1))}changeLayer(A,f,m){if(f=je.clamp(f,0,A.length-1),m=je.clamp(m,0,A.length-1),f===m)return;let C=A[f];A[f]=A[m],A[m]=C}outputJson(A){let f=this;new Promise(function(C,y){let x={IMAGERYPROVIDERS:"imageryProviders",TERRAINPROVIDERS:"terrainProviders",MODELLAYERS:"modelLayers",FEATURELAYERS:"featureLayers",USERSCENE:"userScene"},v=0,E=[];for(let I in x){let w=x[I],Q=f.rootNode.getChildByName(w);if(!Q)continue;let M=[];if(Q.childNodes.length===0)M=[];else for(let B=0;B<Q.childNodes.length;B++){let T=Q.childNodes[B].toJSON();M.push(T)}Promise.all(M).then(function(B){let T=[];if(B.length!==0){for(let L=0;L<B.length;L++)T.push(B[L]);let D=T[0].class;D!=="IMAGERY_LAYER"&&D!=="TERRAIN_LAYER"&&D!=="MODEL_LAYER"&&D!=="FEATURE_LAYER"&&(D="USER_SCENE");let F={item:D,objJson:T};E.push(F)}v++,v===5&&(C(E),v=0)})}}).then(function(C){let y={version:f.rootNode.version,projectName:f.rootNode.name,desc:f.rootNode.desc,createTime:f.rootNode.createTime,lastUpdate:new Date().toISOString(),imageryProviders:[],terrainProviders:[],modelLayers:[],featureLayers:[],userScene:[]};for(let w=0;w<C.length;w++)C[w].item==="IMAGERY_LAYER"&&(y.imageryProviders=C[w].objJson),C[w].item==="TERRAIN_LAYER"&&(y.terrainProviders=C[w].objJson),C[w].item==="MODEL_LAYER"&&(y.modelLayers=C[w].objJson),C[w].item==="FEATURE_LAYER"&&(y.featureLayers=C[w].objJson),C[w].item==="USER_SCENE"&&(y.userScene=C[w].objJson);let x={class:"ENVIRONMENT",underGround:Ae(f._earthCtrl.camera.undergroundMode,null),shadow:Ae(f._earthCtrl.shadows,null),depthTest:Ae(f._earthCtrl.coreMap.scene.globe.depthTestAgainstTerrain,null),rain:Ae(f._earthCtrl.environment.rain.show,null),snow:Ae(f._earthCtrl.environment.snow.show,null),fog:Ae(f._earthCtrl.environment.fog.show,null),bwMode:Ae(f._earthCtrl.environment.bwMode.show,null),nightMode:Ae(f._earthCtrl.environment.nightMode.show,null),colorAdjustment:{show:Ae(f._earthCtrl.environment.colorAdjustment.show,null),contrast:Ae(f._earthCtrl.environment.colorAdjustment.contrast,null),saturation:Ae(f._earthCtrl.environment.colorAdjustment.saturation,null),brightness:Ae(f._earthCtrl.environment.colorAdjustment.brightness,null)}},v={class:"SKYBOX",positiveX:Ae(f._earthCtrl.environment.SkyBoxSource.positiveX,null),negativeX:Ae(f._earthCtrl.environment.SkyBoxSource.negativeX,null),positiveY:Ae(f._earthCtrl.environment.SkyBoxSource.positiveY,null),negativeY:Ae(f._earthCtrl.environment.SkyBoxSource.negativeY,null),positiveZ:Ae(f._earthCtrl.environment.SkyBoxSource.positiveZ,null),negativeZ:Ae(f._earthCtrl.environment.SkyBoxSource.negativeZ,null)},E={class:"VIEWPOINT",lon:f._earthCtrl.camera.viewPoint.lon,lat:f._earthCtrl.camera.viewPoint.lat,alt:f._earthCtrl.camera.viewPoint.alt,heading:f._earthCtrl.camera.viewPoint.heading,pitch:f._earthCtrl.camera.viewPoint.pitch,roll:f._earthCtrl.camera.viewPoint.roll,duration:f._earthCtrl.camera.viewPoint.duration};y.userScene.push(x),y.userScene.push(v),y.userScene.push(E);let I=JSON.stringify(y);A&&A(I)})}};Object.defineProperties(vse.prototype,{rootNode:{get:function(){return this._rootNode},set:function(o){this._rootNode=o}},editNode:{get:function(){return this._editNode},set:function(o){this._editNode=o}},selectSet:{get:function(){return this._selectSet}},EventDocumentChanged:{get:function(){return this._EventDocumentChanged}},EventObjectPropertyChanged:{get:function(){return this._EventObjectPropertyChanged}}});var bTe=vse;function Oct(o){this._earthCtrl=o,this._coreMap=o.coreMap,this.initialize()}var UHi=new ss,GHi=new ee,HHi=new ee;Oct.prototype.initialize=function(){let o=document.createElement("div");o.className="map-info-bar",o.style="position: absolute;left: 0px;bottom:0px;width: 100%;background:rgba(0,0,0,0.4); color:#e9e9e9; text-shadow:2px 2px 2px #000";let A=this._coreMap;A.container.appendChild(o);let f="float: right; min-width: 100px;margin-right: 20px;",m=document.createElement("div");m.style=f,o.appendChild(m);let C=document.createElement("div");C.style=f,o.appendChild(C);let y=document.createElement("div");y.style=f,o.appendChild(y);let x=A.scene.canvas,v=A.scene.globe.ellipsoid;new Ur(x).setInputAction(function(I){let w=A.camera.pickEllipsoid(I.endPosition,v);if(w){let Q=A.scene.globe.ellipsoid.cartesianToCartographic(w),M=je.toDegrees(Q.latitude).toFixed(6),B=je.toDegrees(Q.longitude).toFixed(6),T=A.camera.positionCartographic.height.toFixed(1);y.innerHTML=`\u7ECF\u5EA6\uFF1A${B}`,C.innerHTML=`\u7EAC\u5EA6\uFF1A${M}`,m.innerHTML=`\u89C6\u70B9\u9AD8\uFF1A${T}\u7C73`}},Ki.MOUSE_MOVE)};var Uct=Oct;function cu(){}cu.parseBaseData=function(o,A){let f=[];if(O(A)&&O(A.imageryProviders))for(let C=0;C<A.imageryProviders.length;C++){let y=A.imageryProviders[C];if(y.enable===!1||y.show===!1)continue;if(O(y.tilingScheme)){let v=y.tilingScheme;v.type==="GeographicTilingScheme"&&(y.tilingScheme=new af(v))}let x=HP.createImageryLayer(y);f.push(x)}let m=[];if(O(A)&&O(A.terrainProviders))for(let C=0;C<A.terrainProviders.length;C++){let y=A.terrainProviders[C];if(y.enable===!1||y.show===!1)continue;let x=HP.createTerrainLayer(y);m.push(x)}return{imageryProvider:f,terrainProvider:m}};cu.parse=function(o,A){if(!O(A))return;let f=[rl.IMAGERYPROVIDERS,rl.TERRAINPROVIDERS,rl.MODELLAYERS,rl.FEATURELAYERS,rl.USERSCENE];for(let m=0;m<f.length;m++){let C=o.factory.createSceneNode(HP.createUUID(),f[m]);C.show=!0,o.userScene.addChild(o.userScene.rootNode,C)}O(A[rl.IMAGERYPROVIDERS])&&VH(o,A[rl.IMAGERYPROVIDERS],o.userScene.rootNode.getChildByIndex(0),0),O(A[rl.TERRAINPROVIDERS])&&VH(o,A[rl.TERRAINPROVIDERS],o.userScene.rootNode.getChildByIndex(1),1),O(A[rl.MODELLAYERS])&&VH(o,A[rl.MODELLAYERS],o.userScene.rootNode.getChildByIndex(2)),O(A[rl.FEATURELAYERS])&&VH(o,A[rl.FEATURELAYERS],o.userScene.rootNode.getChildByIndex(3)),O(A[rl.USERSCENE])&&VH(o,A[rl.USERSCENE],o.userScene.rootNode.getChildByIndex(4))};function VH(o,A,f,m){for(let C=0;C<A.length;C++){let y=A[C],x=null;if(y.enable===!1)continue;O(y.class)?(y.class==="IMAGERY"&&(y.class=Eo.IMAGERY_LAYER),y.class==="TERRAIN"&&(y.class=Eo.TERRAIN_LAYER),x=y.class):(m===0?y.class=Eo.IMAGERY_LAYER:m===1&&(y.class=Eo.TERRAIN_LAYER),x=y.class);let v=cu.parserMap[x];v!==void 0&&v(o,y,f)}}function yRi(o,A,f){let m=o.factory.createSceneNode(A.id,A.name);m.show=Ae(A.show,!0),o.userScene.addChild(f,m),O(A.childNodes)&&VH(o,A.childNodes,m)}function xRi(o,A,f){let m=A;if(O(m.tilingScheme)){let C=m.tilingScheme;C.type==="GeographicTilingScheme"&&(m.tilingScheme=new af(C))}o.factory.createImageryLayer(m,f)}function vRi(o,A,f){let m=A;o.factory.createTerrainLayer(m,f)}function ERi(o,A,f){let m=A;m.addToMap=!0;let C=m.sourceType;C==="3DTiles"||C==="b3dm"||C==="osgb"||C==="s3m"||C==="ude_block"||C==="ude_model"?o.factory.createModelLayer(m,f):C==="czml"?o.factory.createCZMLObject(m,f):C==="wfsModel"&&o.factory.createWfsModel(m,f)}function IRi(o,A,f){let m=o.factory.createFeatureLayer(A,f)}function _Ri(o,A,f){o.coreMap.scene.skyBox=new CN({sources:{positiveX:A.positiveX,negativeX:A.negativeX,positiveY:A.positiveY,negativeY:A.negativeY,positiveZ:A.positiveZ,negativeZ:A.negativeZ}})}function BRi(o,A,f){o.camera.undergroundMode=Ae(A.underGround,!1),o.shadows=Ae(A.shadow,!1),A.rain===!0&&o.environment.showEffect("rain"),A.snow===!0&&o.environment.showEffect("snow"),A.fog===!0&&o.environment.showEffect("fog"),o.coreMap.scene.globe.depthTestAgainstTerrain=Ae(A.depthTest,!1),A.bwMode===!0&&o.environment.showEffect("bwMode"),A.nightMode===!0&&o.environment.showEffect("nightMode"),A.colorAdjustment.show===!0&&(o.environment.showEffect("colorAdjustment"),o.environment.colorAdjustment.contrast=A.colorAdjustment.contrast,o.environment.colorAdjustment.saturation=A.colorAdjustment.saturation,o.environment.colorAdjustment.brightness=A.colorAdjustment.brightness)}function wRi(o,A,f){o.camera.viewPoint=A,o.camera.flyTo(A.lon,A.lat,A.alt,A.heading,A.pitch,A.roll,A.duration)}function bRi(o,A,f){o.factory.createModel(A,f)}function QRi(o,A,f){o.factory.createWaters(A,f)}function SRi(o,A,f){o.factory.createExplosion(A,f)}function DRi(o,A,f){o.factory.createFireworks(A,f)}function TRi(o,A,f){o.factory.createSmoke(A,f)}function MRi(o,A,f){o.factory.createFire(A,f)}function PRi(o,A,f){A.color&&(A.color=new At(A.color.red,A.color.green,A.color.blue,A.color.alpha)),o.factory.createRadarScan(A,f)}function RRi(o,A,f){A.color&&(A.color=new At(A.color.red,A.color.green,A.color.blue,A.color.alpha)),o.factory.createCircleScan(A,f)}function LRi(o,A,f){A.color&&(A.color=new At(A.color.red,A.color.green,A.color.blue,A.color.alpha)),A.outlineColor&&(A.outlineColor=new At(A.color.red,A.color.green,A.color.blue,A.color.alpha)),o.factory.createPoint(A,f)}function FRi(o,A,f){A.fillColor&&(A.fillColor=new At(A.fillColor.red,A.fillColor.green,A.fillColor.blue,A.fillColor.alpha)),o.factory.createLabel(A,f)}function NRi(o,A,f){o.factory.createBillboard(A,f)}function kRi(o,A,f){A.positions&&(A.positions=cu.array2DtoMercator(A.positions)),A.lineColor&&(A.lineColor=new At(A.lineColor.red,A.lineColor.green,A.lineColor.blue,A.lineColor.alpha)),A.outlineColor&&(A.outlineColor=new At(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),o.factory.createPolyline(A,f)}function ORi(o,A,f){A.material&&(A.material=new At(A.material.red,A.material.green,A.material.blue,A.material.alpha)),A.outlineColor&&(A.outlineColor=new At(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),A.positions&&(A.positions=cu.array2DtoMercator(A.positions)),o.factory.createPolygon(A,f)}function URi(o,A,f){A.coordinates&&(A.coordinates=Si.fromDegrees(A.coordinates[0],A.coordinates[1],A.coordinates[2],A.coordinates[3])),A.fillColor&&(A.fillColor=new At(A.fillColor.red,A.fillColor.green,A.fillColor.blue,A.fillColor.alpha)),A.outlineColor&&(A.outlineColor=new At(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),o.factory.createRectangle(A,f)}function GRi(o,A,f){o.factory.createEllipse(A,f)}function HRi(o,A,f){A.material&&(A.material=new At(A.material.red,A.material.green,A.material.blue,A.material.alpha)),A.outlineColor&&(A.outlineColor=new At(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),A.position&&(A.position=ee.fromDegrees(A.position[0],A.position[1],A.position[2])),A.dimensions&&(A.dimensions=new ee(A.dimensions.x,A.dimensions.y,A.dimensions.z)),o.factory.createBox(A,f)}function VRi(o,A,f){A.material&&(A.material=new At(A.material.red,A.material.green,A.material.blue,A.material.alpha)),A.outlineColor&&(A.outlineColor=new At(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),A.position&&(A.position=ee.fromDegrees(A.position[0],A.position[1],A.position[2])),A.radii&&(A.radii=new ee(A.radii[0],A.radii[1],A.radii[2])),o.factory.createEllipsoid(A,f)}function zRi(o,A,f){A.material&&(A.material=new At(A.material.red,A.material.green,A.material.blue,A.material.alpha)),A.outlineColor&&(A.outlineColor=new At(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),A.position&&(A.position=ee.fromDegrees(A.position[0],A.position[1],A.position[2])),o.factory.createCylinder(A,f)}function KRi(o,A,f){o.factory.createPolylineVolume(A,f)}function YRi(o,A,f){o.factory.createVideoProjection(A,f)}function JRi(o,A,f){o.factory.createVideoProjection(A,f)}function WRi(o,A,f){o.factory.createTrack(A,f)}function jRi(o,A,f){o.factory.createHeatmap(A,f)}function qRi(o,A,f){o.factory.createEChartLayer(A,f)}function XRi(o,A,f){let m=o.factory.createElement(A);o.userScene.addChild(f,m)}cu.array2DtoMercator=function(o){let A=[];return o.forEach(function(f){let m=ee.fromDegrees(f[0],f[1],f[2]);A.push(m)}),A};cu.parserMap={};cu.parserMap[Eo.NODE]=yRi;cu.parserMap[Eo.IMAGERY_LAYER]=xRi;cu.parserMap[Eo.TERRAIN_LAYER]=vRi;cu.parserMap[Eo.MODEL_LAYER]=ERi;cu.parserMap[Eo.FEATURE_LAYER]=IRi;cu.parserMap[Eo.SKYBOX]=_Ri;cu.parserMap[Eo.ENVIRONMENT]=BRi;cu.parserMap[Eo.VIEWPOINT]=wRi;cu.parserMap[Eo.MODEL]=bRi;cu.parserMap[Eo.WATERS]=QRi;cu.parserMap[Eo.EXPLOSION]=SRi;cu.parserMap[Eo.FIREWORK]=DRi;cu.parserMap[Eo.SMOKE]=TRi;cu.parserMap[Eo.FIRE]=MRi;cu.parserMap[Eo.RADARSCAN]=PRi;cu.parserMap[Eo.CIRCLESCAN]=RRi;cu.parserMap[Eo.POINT]=LRi;cu.parserMap[Eo.LABEL]=FRi;cu.parserMap[Eo.BILLBOARD]=NRi;cu.parserMap[Eo.POLYLINE]=kRi;cu.parserMap[Eo.POLYGON]=ORi;cu.parserMap[Eo.RECTANGLE]=URi;cu.parserMap[Eo.ELLIPSE]=GRi;cu.parserMap[Eo.BOX]=HRi;cu.parserMap[Eo.ELLIPSOID]=VRi;cu.parserMap[Eo.CYLINDER]=zRi;cu.parserMap[Eo.POLYLINEVOLUME]=KRi;cu.parserMap[Eo.PERSPECTIVE_VIDEO_PROJECTION]=YRi;cu.parserMap[Eo.FISHEYE_VIDEO_PROJECTION]=JRi;cu.parserMap[Eo.TRACK]=WRi;cu.parserMap[Eo.HEATMAP]=jRi;cu.parserMap[Eo.ECHARTLAYER]=qRi;cu.parserMap.ELEMENT=XRi;var Gct=cu;var QTe=class extends es{constructor(A,f,m,C){super(A,m,C),this.editBillboard=void 0,this.pickedEntity=void 0,this.isEditing=!1,this.editBillboard=f,O(this.editBillboard)&&O(this.editBillboard.entity.billboard)?console.info(this.editBillboard.entity):(this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Billboard entity is need!"}))}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editBillboard.entity.id&&(this.isEditing=!0,this.currentPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editBillboard.entity)||this.pickObject(A,this.editBillboard.entity))&&this.mCallback&&this.mCallback(this.editBillboard),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m,this.editBillboard.entity.position=m}return this.mCallback&&this.mCallback(this.editBillboard),!0}updateBillboard(A){if(O(A)&&O(this.editBillboard)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editBillboard.entity.position=A[C]:O(A[C])&&(this.editBillboard.entity.billboard[C]=A[C])}}}endEditEntity(){}},Hct=QTe;var STe=class extends es{constructor(A,f,m,C){super(A,m,C),this.editPoint=void 0,this.pickedEntity=void 0,this.isEditing=!1,this.editPoint=f,O(this.editPoint)&&O(this.editPoint.entity.point)?console.info(this.editPoint.entity.point):(this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Point entity is need!"}))}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editPoint.entity.id&&(this.isEditing=!0,this.currentPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editPoint.entity)||this.pickObject(A,this.editPoint.entity))&&this.mCallback&&this.mCallback(this.editPoint),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m,this.editPoint.entity.position=m}return this.mCallback&&this.mCallback(this.editPoint),!0}updatePoint(A){if(O(A)&&O(this.editPoint)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editPoint.entity.position=A[C]:O(A[C])&&(this.editPoint.entity.point[C]=A[C])}}}endEditEntity(){}},Vct=STe;var DTe=class extends es{constructor(A,f,m,C){if(super(A,m,C),this.editBox=void 0,this.pickedEntity=void 0,this.editHeightPoint=void 0,this.editWHPoint=void 0,this.pickEditHeightPoint=void 0,this.pickEditWHPoint=void 0,this.isEditing=!1,this.pointsId=[],this.height=0,this.dragPosition=void 0,this.editBox=f,O(this.editBox)&&O(this.editBox.entity.box)){let y=this.editBox.entity.position._value,x=Kt.fromCartesian(y);this.height=x.height;let v=new ee,E=new ee;this.getNorthPointByDistance(v,E),this.editHeightPoint=this.mEarthCtrl.entities.add({name:"box_edit_height_point",position:v,point:{heightReference:this.editBox.entity.box.heightReference,color:At.WHITE,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}}),this.pointsId.push(this.editHeightPoint.id),this.editWHPoint=this.mEarthCtrl.entities.add({name:"box_edit_long_width_point",position:E,point:{heightReference:this.editBox.entity.box.heightReference,color:At.RED,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}}),this.pointsId.push(this.editWHPoint.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Box entity is need!"})}addHeight(A){let f=this.editBox.entity.position._value,m=Kt.fromCartesian(f);return this.height=m.height+A,ee.fromRadians(m.longitude,m.latitude,this.height)}getNorthPointByDistance(A,f,m){let C;console.info(this.editBox.entity.position),O(m)?C=this.editBox.entity.position.getValue(m):C=this.editBox.entity.position._value;let y=zn.eastNorthUpToFixedFrame(C),x=new ee,v=this.editBox.entity.box.dimensions._value;v||(v=this.editBox.entity.box.dimensions.getValue(m)),ee.divideByScalar(v,2,x),ee.clone(x,A),ee.clone(x,f),A.y*=-1,Xe.multiplyByPoint(y,A,A),f.y*=-1,f.z*=-1,Xe.multiplyByPoint(y,f,f)}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editBox.entity.id?(this.isEditing=!0,this.currentPoint=f,this.pickEditHeightPoint=void 0,this.pickEditWHPoint=void 0):f.name==="box_edit_height_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickEditHeightPoint=f,this.pickEditWHPoint=void 0):f.name==="box_edit_long_width_point"&&(this.isEditing=!0,this.currentPoint=void 0,this.pickEditHeightPoint=void 0,this.pickEditWHPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editBox)||this.pickObject(A,this.editBox.entity))&&this.mCallback&&this.mCallback(this.editBox),this.currentPoint=void 0,this.isEditing=!1,this.dragPosition=void 0,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;let f=new Date,m=fi.fromDate(f);if(O(this.currentPoint)||O(this.pickEditHeightPoint)||O(this.pickEditWHPoint)){let C=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,y=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,C);if(!y)return;let x=Kt.fromCartesian(y),v=ee.fromRadians(x.longitude,x.latitude,x.height+this.height);if(O(this.currentPoint))this.currentPoint.position=v,this.editBox.entity.position=new Bn(function(){return v},!1);else if(O(this.dragPosition)){if(O(this.pickEditWHPoint)){let w=ee.subtract(y,this.dragPosition,new ee),Q=ee.normalize(w,new ee);ee.dot(w,Q,w);let M=this.editBox.entity.box.dimensions._value;M||(M=this.editBox.entity.box.dimensions.getValue(m));let B=ee.clone(M);B.x-=w.x,B.y+=w.y,ee.abs(B,B),this.editBox.entity.box.dimensions=new Bn(function(){return B},!1)}else if(O(this.pickEditHeightPoint)){let w=ee.subtract(y,this.dragPosition,new ee),Q=this.editBox.entity.box.dimensions._value;Q||(Q=this.editBox.entity.box.dimensions.getValue(m));let M=ee.clone(Q);M.z+=w.z,ee.abs(M,M),this.editBox.entity.box.dimensions=M,this.editBox.entity.position=this.addHeight(w.z/2)}}this.dragPosition=y;let E=new ee,I=new ee;this.getNorthPointByDistance(E,I,m),this.editHeightPoint.position=E,this.editWHPoint.position=I}return this.mCallback&&this.mCallback(this.editBox),!0}updateBox(A){if(O(A)&&O(this.editBox)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editBox.entity.position=A[C]:O(A[C])&&(this.editBox.entity.box[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},zct=DTe;var TTe=class extends es{constructor(A,f,m,C){if(super(A,m,C),this.editCylinder=void 0,this.pickedEntity=void 0,this.isEditing=!1,this.pointsId=[],this.height=0,this.topRadiusPoint=void 0,this.pickTopRadiusPoint=void 0,this.bottomRadiusPoint=void 0,this.pickBottomRadiusPoint=void 0,this.heightPoint=void 0,this.pickHeightPoint=void 0,this.dragPosition=void 0,this.editCylinder=f,O(this.editCylinder)&&O(this.editCylinder.entity.cylinder)){let y=this.editCylinder.entity.position._value,x=Kt.fromCartesian(y);this.height=x.height;let v=this.editCylinder.entity.cylinder.topRadius._value,E=this.editCylinder.entity.cylinder.bottomRadius._value,I=new ee,w=new ee,Q=new ee;this.getNorthPointByDistance(I,w,Q),this.heightPoint=this.mEarthCtrl.entities.add({name:"cylinder_edit_height_point",position:Q,point:{heightReference:this.editCylinder.entity.cylinder.heightReference,color:At.WHITE,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}}),this.pointsId.push(this.heightPoint.id),v>0&&(this.topRadiusPoint=this.mEarthCtrl.entities.add({name:"cylinder_edit_top_radius_point",position:I,point:{heightReference:this.editCylinder.entity.cylinder.heightReference,color:At.RED,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}}),this.pointsId.push(this.topRadiusPoint.id)),E>0&&(this.bottomRadiusPoint=this.mEarthCtrl.entities.add({name:"cylinder_edit_bottom_radius_point",position:w,point:{heightReference:this.editCylinder.entity.cylinder.heightReference,color:At.RED,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}}),this.pointsId.push(this.bottomRadiusPoint.id))}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Cylinder entity is need!"})}addHeight(A){let f=this.editCylinder.entity.position._value,m=Kt.fromCartesian(f);return this.height=m.height+A,ee.fromRadians(m.longitude,m.latitude,this.height)}getNorthPointByDistance(A,f,m){let C=this.editCylinder.entity.position._value,y=zn.eastNorthUpToFixedFrame(C),x=this.editCylinder.entity.cylinder.length._value,v=this.editCylinder.entity.cylinder.topRadius._value,E=this.editCylinder.entity.cylinder.bottomRadius._value;v>0&&(A.z+=x/2,A.x+=v,Xe.multiplyByPoint(y,A,A)),E>0&&(f.x+=E,f.z-=x/2,Xe.multiplyByPoint(y,f,f)),m.z+=x/2,Xe.multiplyByPoint(y,m,m)}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editCylinder.entity.id?(this.isEditing=!0,this.currentPoint=f,this.pickHeightPoint=void 0,this.pickTopRadiusPoint=void 0,this.pickBottomRadiusPoint=void 0):f.name==="cylinder_edit_height_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickHeightPoint=f,this.pickTopRadiusPoint=void 0,this.pickBottomRadiusPoint=void 0):f.name==="cylinder_edit_top_radius_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickHeightPoint=void 0,this.pickTopRadiusPoint=f,this.pickBottomRadiusPoint=void 0):f.name==="cylinder_edit_bottom_radius_point"&&(this.isEditing=!0,this.currentPoint=void 0,this.pickHeightPoint=void 0,this.pickTopRadiusPoint=void 0,this.pickBottomRadiusPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editCylinder)||this.pickObject(A,this.editCylinder.entity))&&this.mCallback&&this.mCallback(this.editCylinder),this.currentPoint=void 0,this.dragPosition=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)||O(this.heightPoint)||O(this.topRadiusPoint)||O(this.bottomRadiusPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;let C=Kt.fromCartesian(m),y=ee.fromRadians(C.longitude,C.latitude,C.height+this.height);if(O(this.currentPoint))this.currentPoint.position=y,this.editCylinder.entity.position=y;else if(O(this.dragPosition)){if(O(this.pickHeightPoint)){let Q=ee.subtract(m,this.dragPosition,new ee),M=this.editCylinder.entity.cylinder.length._value;M+=Q.z,M=Math.abs(M),this.editCylinder.entity.position=this.addHeight(Q.z/2),this.editCylinder.entity.cylinder.length=M}else if(O(this.pickTopRadiusPoint)){let Q=ee.subtract(m,this.dragPosition,new ee),M=this.editCylinder.entity.cylinder.topRadius._value;M-=Q.x,M=Math.abs(M),this.editCylinder.entity.cylinder.topRadius=M}else if(O(this.pickBottomRadiusPoint)){let Q=ee.subtract(m,this.dragPosition,new ee),M=this.editCylinder.entity.cylinder.bottomRadius._value;M-=Q.x,M=Math.abs(M),this.editCylinder.entity.cylinder.bottomRadius=M}}this.dragPosition=m;let x=this.editCylinder.entity.cylinder.topRadius._value,v=this.editCylinder.entity.cylinder.bottomRadius._value,E=new ee,I=new ee,w=new ee;this.getNorthPointByDistance(E,I,w),x>0&&(this.topRadiusPoint.position=E),v>0&&(this.bottomRadiusPoint.position=I),this.heightPoint.position=w}return this.mCallback&&this.mCallback(this.editCylinder),!0}updateCylinder(A){if(O(A)&&O(this.editCylinder)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editCylinder.entity.position=A[C]:O(A[C])&&(this.editCylinder.entity.cylinder[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},Kct=TTe;var MTe=class extends es{constructor(A,f,m,C){if(super(A,m,C),this.editEllipse=void 0,this.pickedEntity=void 0,this.semiMajorAxisPoint=void 0,this.semiMinorAxisPoint=void 0,this.pickSemiMajorAxisPoint=void 0,this.pickSemiMinorAxisPoint=void 0,this.pointsId=[],this.isEditing=!1,this.circle=!1,this.editEllipse=f,O(this.editEllipse)&&O(this.editEllipse.entity.ellipse)){let y=je.PI_OVER_TWO,x=this.updatePoint(y);this.semiMajorAxisPoint=this.mEarthCtrl.entities.add({name:"semi_major_axis_point",position:x,point:{heightReference:this.editEllipse.entity.ellipse.heightReference,color:At.WHITE,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}}),this.pointsId.push(this.semiMajorAxisPoint.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Ellipse entity is need!"})}updatePoint(A){let f=new ee,m=new ee,C=new ee,y=this.editEllipse.entity.ellipse;this.semiMinorAxis=y.semiMinorAxis._value,this.semiMajorAxis=y.semiMajorAxis._value,this.circle=this.semiMajorAxis===this.semiMinorAxis;let x=Ae(y.rotation,0);this.center=this.editEllipse.entity.position._value;let v=this.semiMinorAxis*this.semiMinorAxis,E=this.semiMajorAxis*this.semiMajorAxis,I=this.semiMajorAxis*this.semiMinorAxis,w=ee.magnitude(this.center),Q=ee.normalize(this.center,f),M=ee.cross(ee.UNIT_Z,this.center,m);M=ee.normalize(M,M);let B=ee.cross(Q,M,C),T=new ee;return iB.pointOnEllipsoid(A,x,B,M,v,I,E,w,Q,T)}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editEllipse.entity.id?(this.isEditing=!0,this.currentPoint=f,this.pickSemiMajorAxisPoint=void 0,this.pickSemiMinorAxisPoint=void 0):f.name==="semi_minor_axis_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickSemiMajorAxisPoint=void 0,this.pickSemiMinorAxisPoint=f):f.name==="semi_major_axis_point"&&(this.isEditing=!0,this.currentPoint=void 0,this.pickSemiMajorAxisPoint=f,this.pickSemiMinorAxisPoint=void 0),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editEllipse)||this.pickObject(A,this.editEllipse.entity))&&this.mCallback&&this.mCallback(this.editEllipse),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)||O(this.pickSemiMajorAxisPoint)||O(this.pickSemiMinorAxisPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;if(O(this.currentPoint))this.currentPoint.position=m,this.editEllipse.entity.position=m;else if(O(this.pickSemiMajorAxisPoint)){let C=ee.distance(this.center,m);this.editEllipse.entity.ellipse.semiMajorAxis=C;let y=C*this.semiMinorAxis/this.semiMajorAxis;y>C&&(y=C),this.editEllipse.entity.ellipse.semiMinorAxis=y}else if(O(this.pickSemiMinorAxisPoint)){let C=ee.distance(this.center,m);this.editEllipse.entity.ellipse.semiMinorAxis=C}this.semiMajorAxisPoint.position=this.updatePoint(je.PI_OVER_TWO)}return this.mCallback&&this.mCallback(this.editEllipse),!0}updateEllipse(A){if(O(A)&&O(this.editEllipse)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editEllipse.entity.position=A[C]:O(A[C])&&(this.editEllipse.entity.ellipse[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},Yct=MTe;var PTe=class extends es{constructor(A,f,m,C){if(super(A,m,C),this.editEllipsoid=void 0,this.pickedEntity=void 0,this.height=0,this.isEditing=!1,this.pointsId=[],this.radiiXPoint=void 0,this.pickRadiiXPoint=void 0,this.radiiYPoint=void 0,this.pickRadiiYPoint=void 0,this.radiiZPoint=void 0,this.pickRadiiZPoint=void 0,this.dragPosition=void 0,this.editEllipsoid=f,O(this.editEllipsoid)&&O(this.editEllipsoid.entity.ellipsoid)){console.info(this.editEllipsoid.ellipsoid);let y=this.editEllipsoid.entity.position._value,x=Kt.fromCartesian(y);this.height=x.height;let v=new ee,E=new ee,I=new ee;this.getNorthPointByDistance(v,E,I),this.radiiXPoint=this.mEarthCtrl.entities.add({name:"ellipse_edit_x_point",position:v,point:{heightReference:this.editEllipsoid.entity.ellipsoid.heightReference,color:At.WHITE,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}}),this.pointsId.push(this.radiiXPoint.id),this.radiiYPoint=this.mEarthCtrl.entities.add({name:"ellipse_edit_y_point",position:E,point:{heightReference:this.editEllipsoid.entity.ellipsoid.heightReference,color:At.WHITE,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}}),this.pointsId.push(this.radiiYPoint.id),this.radiiZPoint=this.mEarthCtrl.entities.add({name:"ellipse_edit_z_point",position:I,point:{heightReference:this.editEllipsoid.entity.ellipsoid.heightReference,color:At.WHITE,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}}),this.pointsId.push(this.radiiZPoint.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Ellipsoid entity is need!"})}addHeight(A){let f=this.editEllipsoid.entity.position._value,m=Kt.fromCartesian(f);return this.height=m.height+A,ee.fromRadians(m.longitude,m.latitude,this.height)}getNorthPointByDistance(A,f,m){let C=this.editEllipsoid.entity.position._value,y=zn.eastNorthUpToFixedFrame(C),x=this.editEllipsoid.entity.ellipsoid.radii._value;A.x=x.x,Xe.multiplyByPoint(y,A,A),f.y=-x.y,Xe.multiplyByPoint(y,f,f),m.z=x.z,Xe.multiplyByPoint(y,m,m)}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editEllipsoid.entity.id?(this.isEditing=!0,this.currentPoint=f,this.pickRadiiXPoint=void 0,this.pickRadiiYPoint=void 0,this.pickRadiiZPoint=void 0):f.name==="ellipse_edit_x_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickRadiiXPoint=f,this.pickRadiiYPoint=void 0,this.pickRadiiZPoint=void 0):f.name==="ellipse_edit_y_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickRadiiXPoint=void 0,this.pickRadiiYPoint=f,this.pickRadiiZPoint=void 0):f.name==="ellipse_edit_z_point"&&(this.isEditing=!0,this.currentPoint=void 0,this.pickRadiiXPoint=void 0,this.pickRadiiYPoint=void 0,this.pickRadiiZPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editEllipsoid)||this.pickObject(A,this.editEllipsoid.entity))&&this.mCallback&&this.mCallback(this.editEllipsoid),this.currentPoint=void 0,this.dragPosition=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)||O(this.pickRadiiXPoint)||O(this.pickRadiiYPoint)||O(this.pickRadiiZPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;let C=Kt.fromCartesian(m),y=ee.fromRadians(C.longitude,C.latitude,C.height+this.height);if(O(this.currentPoint))this.currentPoint.position=y,this.editEllipsoid.entity.position=y;else{if(O(this.dragPosition)){let I=ee.subtract(m,this.dragPosition,new ee),w=ee.normalize(I,new ee);ee.dot(I,w,I);let Q=this.editEllipsoid.entity.ellipsoid.radii._value,M=ee.clone(Q);O(this.pickRadiiXPoint)?M.x-=I.x:O(this.pickRadiiYPoint)?M.y+=I.y:O(this.pickRadiiZPoint)&&(M.z+=I.z,this.editEllipsoid.entity.position=this.addHeight(I.z)),ee.abs(M,M),this.editEllipsoid.entity.ellipsoid.radii=M}this.dragPosition=m}let x=new ee,v=new ee,E=new ee;this.getNorthPointByDistance(x,v,E),this.radiiXPoint.position=x,this.radiiYPoint.position=v,this.radiiZPoint.position=E}return this.mCallback&&this.mCallback(this.editEllipsoid),!0}updateEllipsoid(A){if(O(A)&&O(this.editEllipsoid)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editEllipsoid.entity.position=A[C]:O(A[C])&&(this.editEllipsoid.entity.ellipsoid[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},Jct=PTe;var RTe=class extends es{constructor(A,f,m,C){if(super(A,m,C),this.editPolygon=void 0,this.pickedEntity=void 0,this.currentPoint=void 0,this.pointsId=[],this.isEditing=!1,this.editPolygon=f,O(this.editPolygon)&&O(this.editPolygon.entity.polygon))for(let y=0;y<this.editPolygon.entity.polygon.hierarchy._value.positions.length;y++){let x=this.editPolygon.entity.polygon.hierarchy._value.positions[y],v=this.mEarthCtrl.entities.add({name:"polygon_point",position:x,point:{color:At.WHITE,pixelSize:8,outlineColor:At.BLACK,outlineWidth:1}});this.pointsId.push(v.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Polygon entity is need!"})}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editPolygon.entity.id?(this.isEditing=!0,this.currentPoint=void 0):f.name==="polygon_point"&&(this.currentPoint=f,this.isEditing=!0),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editPolygon)||this.pickObject(A,this.editPolygon.entity))&&this.mCallback&&this.mCallback(this.editPolygon),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m;let C=[];for(let y=0;y<this.pointsId.length;y++){let x=this.pointsId[y];C.push(this.mEarthCtrl.entities.getById(x).position._value)}this.editPolygon.entity.polygon.hierarchy=C}return this.mCallback&&this.mCallback(this.editPolygon),!0}updatePolygon(A){if(O(A)&&O(this.editPolygon)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];O(A[C])&&(this.editPolygon.entity.polygon[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},Wct=RTe;var LTe=class extends es{constructor(A,f,m,C){super(A,m,C),this.editModel=void 0,this.pickedEntity=void 0,this.editColor=At.RED.withAlpha(.8),this.isEditing=!1,this.editModel=f,this.oldColor=this.editModel.entity.color,this.editModel.entity.color=this.editColor,O(this.editModel)&&O(this.editModel.entity)?console.info(this.editModel.entity):(this.mEnable=!1,this.mCallback&&this.mCallback({msg:"gltf Model is need!"}))}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f===this.editModel.parameter.id&&(this.isEditing=!0,this.currentPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editModel)||this.pickObject(A,this.editModel.entity))&&this.mCallback&&this.mCallback(this.editModel),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;let C=Kt.fromCartesian(m),y=Kt.clone(C);y.longitude=je.toDegrees(y.longitude),y.latitude=je.toDegrees(y.latitude),this.editModel.lon=y.longitude,this.editModel.lat=y.latitude}return this.mCallback&&this.mCallback(this.editModel),!0}updateModel(A){if(O(A)&&O(this.editModel)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];if(O(A[C]))switch(C){case"lon":case"lat":case"alt":case"heading":case"pitch":case"roll":this.editModel[C]=A[C];break;default:this.editModel.entity[C]=A[C];break}}}}endEditEntity(){this.editModel.entity.color=this.oldColor}},jct=LTe;var FTe=class extends es{constructor(A,f,m,C){super(A,m,C),this.editLabel=void 0,this.pickedEntity=void 0,this.isEditing=!1,this.editLabel=f,O(this.editLabel)&&O(this.editLabel.entity.label)?console.info(this.editLabel.entity):(this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Label entity is need!"}))}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editLabel.entity.id&&(this.isEditing=!0,this.currentPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editLabel.entity)||this.pickObject(A,this.editLabel.entity))&&this.mCallback&&this.mCallback(this.editLabel),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m,this.editLabel.entity.position=m}return this.mCallback&&this.mCallback(this.editLabel),!0}updateLabel(A){if(O(A)&&O(this.editLabel)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editLabel.entity.position=A[C]:O(A[C])&&(this.editLabel.entity.label[C]=A[C])}}}endEditEntity(){}},qct=FTe;var NTe=class extends es{constructor(A,f,m,C){if(super(A,m,C),this.editPolyline=void 0,this.pickedEntity=void 0,this.currentPoint=void 0,this.pointsId=[],this.isEditing=!1,this.editPolyline=f,O(this.editPolyline)&&O(this.editPolyline.polyline))for(let y=0;y<this.editPolyline.polyline.positions._value.length;y++){let x=this.editPolyline.polyline.positions._value[y],v=this.mEarthCtrl.entities.add({name:"polyline_point",position:x,point:{color:At.WHITE,pixelSize:8,outlineColor:At.BLACK,outlineWidth:1}});this.pointsId.push(v.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Polyline entity is need!"})}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editPolyline.id?(this.isEditing=!0,this.currentPoint=void 0):f.name==="polyline_point"&&(this.currentPoint=f,this.isEditing=!0),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editPolyline)||this.pickObject(A,this.editPolyline.entity))&&this.mCallback&&this.mCallback(this.editPolyline),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m;let C=[];for(let y=0;y<this.pointsId.length;y++){let x=this.pointsId[y];C.push(this.mEarthCtrl.entities.getById(x).position._value)}this.editPolyline.polyline.positions=C}return this.mCallback&&this.mCallback(this.editPolyline),!0}updatePolyline(A){if(O(A)&&O(this.editPolyline)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];O(A[C])&&(this.editPolyline.polyline[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},Xct=NTe;var kTe=class extends es{constructor(A,f,m,C){if(super(A,m,C),this.editPolylineVolume=void 0,this.pickedEntity=void 0,this.currentPoint=void 0,this.pointsId=[],this.isEditing=!1,this.editPolylineVolume=f,O(this.editPolylineVolume)&&O(this.editPolylineVolume.entity.polylineVolume))for(let y=0;y<this.editPolylineVolume.entity.polylineVolume.positions._value.length;y++){let x=this.editPolylineVolume.entity.polylineVolume.positions._value[y],v=this.mEarthCtrl.entities.add({name:"edit_polylineVolume_point",position:x,point:{color:At.WHITE,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}});this.pointsId.push(v.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"PolylineVolume entity is need!"})}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editPolylineVolume.entity.id?(this.isEditing=!0,this.currentPoint=void 0):f.name==="edit_polylineVolume_point"&&(this.isEditing=!0,this.currentPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editPolylineVolume)||this.pickObject(A,this.editPolylineVolume.entity))&&this.mCallback&&this.mCallback(this.editPolylineVolume),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m;let C=[];for(let y=0;y<this.pointsId.length;y++){let x=this.pointsId[y];C.push(this.mEarthCtrl.entities.getById(x).position._value)}this.editPolylineVolume.entity.polylineVolume.positions=C}return this.mCallback&&this.mCallback(this.editPolylineVolume),!0}updatePolylineVolume(A){if(O(A)&&O(this.editPolylineVolume)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editPolylineVolume.entity.position=A[C]:O(A[C])&&(this.editPolylineVolume.entity.polylineVolume[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},Zct=kTe;var OTe=class extends es{constructor(A,f,m,C){if(super(A,m,C),this.editRectangle=void 0,this.pickedEntity=void 0,this.leftTopPoint=void 0,this.rightBottomPoint=void 0,this.pointsId=[],this.isEditing=!1,this.editRectangle=f,O(this.editRectangle)&&O(this.editRectangle.entity.rectangle)){let y=this.editRectangle.entity.rectangle.coordinates._value,x=this.editRectangle.entity.rectangle.height._value,v=Si.northwest(y),E=ee.fromRadians(v.longitude,v.latitude,x),I=this.mEarthCtrl.entities.add({name:"rect_left_top_point",position:E,point:{heightReference:this.editRectangle.entity.rectangle.heightReference,color:At.WHITE,pixelSize:8,outlineColor:At.BLACK,outlineWidth:1}});this.pointsId.push(I.id),v=Si.southeast(y);let w=ee.fromRadians(v.longitude,v.latitude,x),Q=this.mEarthCtrl.entities.add({name:"rect_right_bottom_point",position:w,point:{heightReference:this.editRectangle.entity.rectangle.heightReference,color:At.WHITE,pixelSize:8,outlineColor:At.BLACK,outlineWidth:1}});this.pointsId.push(Q.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Rectangle entity is need!"})}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editRectangle.entity.id?(this.isEditing=!0,this.leftTopPoint=void 0,this.rightBottomPoint=void 0):f.name==="rect_left_top_point"?(this.leftTopPoint=f,this.rightBottomPoint=void 0,this.isEditing=!0):f.name==="rect_right_bottom_point"&&(this.rightBottomPoint=f,this.leftTopPoint=void 0,this.isEditing=!0),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editRectangle)||this.pickObject(A,this.editRectangle.entity))&&this.mCallback&&this.mCallback(this.editRectangle),this.leftTopPoint=void 0,this.rightBottomPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.leftTopPoint)||O(this.rightBottomPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;let C=Kt.fromCartesian(m),y=this.editRectangle.entity.rectangle.coordinates._value;O(this.leftTopPoint)?(this.leftTopPoint.position=m,y.west=C.longitude,y.north=C.latitude):O(this.rightBottomPoint)&&(this.rightBottomPoint.position=m,y.south=C.latitude,y.east=C.longitude),this.editRectangle.entity.rectangle.coordinates=y}return this.mCallback&&this.mCallback(this.editRectangle),!0}updateRectangle(A){if(O(A)&&O(this.editRectangle)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editRectangle.entity.position=A[C]:O(A[C])&&(this.editRectangle.entity.rectangle[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},$ct=OTe;function Md(o){this._earthCtrl=o,this._coreMap=o.coreMap}Md.prototype.editPoint=function(o,A){this._earthCtrl.tools.clearTool();let f=new Vct(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("point_edit_tool",f),f};Md.prototype.updatePoint=function(o,A){o.updatePoint(A)};Md.prototype.editPolyline=function(o,A){this._earthCtrl.tools.clearTool();let f=new Xct(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("polyline_edit_tool",f),f};Md.prototype.updatePolyline=function(o,A){o.updatePolyline(A)};Md.prototype.editPolygon=function(o,A){this._earthCtrl.tools.clearTool();let f=new Wct(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("polygon_edit_tool",f),f};Md.prototype.updatePolygon=function(o,A){o.updatePolygon(A)};Md.prototype.editBox=function(o,A){this._earthCtrl.tools.clearTool();let f=new zct(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("box_edit_tool",f),f};Md.prototype.updateBox=function(o,A){o.updateBox(A)};Md.prototype.editEllipsoid=function(o,A){this._earthCtrl.tools.clearTool();let f=new Jct(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("ellipsoid_edit_tool",f),f};Md.prototype.updateEllipsoid=function(o,A){o.updateEllipsoid(A)};Md.prototype.editCylinder=function(o,A){this._earthCtrl.tools.clearTool();let f=new Kct(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("cylinder_edit_tool",f),f};Md.prototype.updateCylinder=function(o,A){o.updateCylinder(A)};Md.prototype.editModel=function(o,A){this._earthCtrl.tools.clearTool();let f=new jct(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("model_edit_tool",f),f};Md.prototype.updateModel=function(o,A){o.updateModel(A)};Md.prototype.editBillboard=function(o,A){this._earthCtrl.tools.clearTool();let f=new Hct(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("billboard_edit_tool",f),f};Md.prototype.updateBillboard=function(o,A){o.updateBillboard(A)};Md.prototype.editLabel=function(o,A){this._earthCtrl.tools.clearTool();let f=new qct(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("label_edit_tool",f),f};Md.prototype.updateLabel=function(o,A){o.updateLabel(A)};Md.prototype.editRectangle=function(o,A){this._earthCtrl.tools.clearTool();let f=new $ct(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("rectangle_edit_tool",f),f};Md.prototype.updateRectangle=function(o,A){o.updateRectangle(A)};Md.prototype.editEllipse=function(o,A){this._earthCtrl.tools.clearTool();let f=new Yct(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("ellipse_edit_tool",f),f};Md.prototype.updateEllipse=function(o,A){o.updateEllipse(A)};Md.prototype.editPolylineVolume=function(o,A){this._earthCtrl.tools.clearTool();let f=new Zct(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("polylinevolume_edit_tool",f),f};Md.prototype.updatePolylineVolume=function(o,A){o.updatePolylineVolume(A)};Md.prototype.endEditEntity=function(o){this._earthCtrl.tools.clearTool(),o.endEditEntity(),this._earthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!0,this._earthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!0};var UTe=Md;function yy(o){this.mEarthCtrl=o,this.scene=this.mEarthCtrl.coreMap.scene,this.entities=this.mEarthCtrl.entities,this.camera=this.mEarthCtrl.coreMap.camera,this._points=[],this.item=void 0}yy.prototype.horizontalDistance=function(o,A){let f=this,m=!1,C=[],y="",x=[],v,E=this.scene.globe.ellipsoid,I={spot:[],distance:[],label:[],polyline:[]},w={point:At.RED,polyline:At.fromRgba(4286644096)};O(A)&&(O(A.point)&&(w.point=A.point),O(A.polyline)&&(w.polyline=A.polyline));let Q=new iI;this.scene.primitives.add(Q);let M=new NA,B=new Ur(f.scene.canvas),T=document.createElement("div");nA(".map-widget",T),nA(".map-widget",'<div id="toolTip" style="display: none;position: absolute;visibility: visible;max-width: 200px;min-width: 100px;padding: 1px 1px 1px 25px;font-size: 11px;z-index: 1000;opacity: 0.8;background-color: rgba(0,0,0,0.7);border-radius: 3px;"></div>');let F=document.getElementById("toolTip");F.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u5DE6\u952E\u5F00\u59CB,\u53F3\u952E\u7ED3\u675F\uFF01</span>';let L;m=!0;let R=function(V){let H=0,q=`${0}\u7C73`,ie,Z,oe,ne,se,ce;for(let j=0;j<V.length-1;j+=1)ie=E.cartesianToCartographic(V[j]),Z=M.project(ie),oe=Z.x,ne=Z.y,ie=E.cartesianToCartographic(V[j+1]),Z=M.project(ie),se=Z.x,ce=Z.y,H=H+Math.sqrt((oe-se)*(oe-se)+(ne-ce)*(ne-ce));return H>0&&(q=`${H.toFixed(2)}\u7C73`),H/1e3>=1&&(q=`${(H/1e3).toFixed(2)}\u5343\u7C73`),q},k=function(){function V(H){if(!O(H))throw new Ui("positions is required!");if(H.length<2)throw new Ui("positions \u7684\u957F\u5EA6\u5FC5\u987B\u5927\u4E8E\u7B49\u4E8E2");let q=as.fromType(as.ColorType);q.uniforms.color=new At(1,1,0,.5),this.options={name:"\u76F4\u7EBF",polyline:{show:!0,positions:[],material:w.polyline,width:3,clampToGround:!0}},this.path=H,this._init()}return V.prototype._init=function(){let H=this,q=function(){return H.path};this.options.polyline.positions=new Bn(q,!1),this.lineEntity=f.entities.add(this.options),f.item=this.lineEntity,I.polyline.push(this.lineEntity)},V}();B.setInputAction(function(V){let H,q;F.style.left=`${V.endPosition.x+10}px`,F.style.top=`${V.endPosition.y+20}px`,F.style.display="block",F.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u5DE6\u952E\u5F00\u59CB,\u53F3\u952E\u7ED3\u675F\uFF01</span>';let ie=!1,Z=f.camera.getPickRay(V.endPosition);Z&&(H=f.scene.globe.pick(Z,f.scene));let oe=f.scene.pick(V.endPosition);if(oe){console.log("feature",oe);let ne=f.scene.pickPosition(V.endPosition);ne&&(H=ne),ie=!0}if(!!H&&(q=Ti.WGS84.cartesianToCartographic(H),q)){let ne;ie?ne=f.scene.sampleHeight(q):ne=f.scene.globe.getHeight(q);let se=ee.fromDegrees(q.longitude/Math.PI*180,q.latitude/Math.PI*180,ne);if(m){if(C.length<1)return;O(v)?(v.path.pop(),v.path.push(se)):(C.push(se),v=new k(C));let ce=R(v.path);f.entities.remove(L),L=f.entities.add({name:"\u7A7A\u95F4\u76F4\u7EBF\u8DDD\u79BB",position:v.path[v.path.length-1],label:{text:`\u603B\u957F\uFF1A${ce}`,show:!0,font:"26px \u6977\u4F53",fillColor:At.WHITE,style:pA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:wn.BOTTOM,pixelOffset:new Bt(20,-20),disableDepthTestDistance:Number.POSITIVE_INFINITY}})}}},Ki.MOUSE_MOVE);let U=function(V){x.push(V);let H=[];if(x.length>1){let q=x[x.length-2],ie=x[x.length-1],Z=Math.abs(q.longitude-ie.longitude)*1e7,oe=Math.abs(q.latitude-ie.latitude)*1e7;Z>oe&&(oe=Z);let ne=parseInt(oe/10);ne>1e3&&(ne=1e3),ne<2&&(ne=2);for(let se=0;se<ne;++se)H.push(new Kt(je.lerp(q.longitude,ie.longitude,se/(ne-1)),je.lerp(q.latitude,ie.latitude,se/(ne-1))));H.push(ie.clone())}else H=x;if(H.length>0)for(let q=0;q<H.length;q++){V=H[q];let ie=f.scene.globe.getHeight(V),Z=ee.fromDegrees(V.longitude/Math.PI*180,V.latitude/Math.PI*180,ie);C.push(Z)}};return B.setInputAction(function(V){let H,q,ie=!1,Z=f.camera.getPickRay(V.position);if(Z&&(H=f.scene.globe.pick(Z,f.scene)),f.scene.pick(V.position)){let ne=f.scene.pickPosition(V.position);ne&&(H=ne),ie=!0}if(H&&(q=Ti.WGS84.cartesianToCartographic(H)),q){let ne;ie?ne=f.scene.sampleHeight(q):ne=f.scene.globe.getHeight(q);let se=ee.fromDegrees(q.longitude/Math.PI*180,q.latitude/Math.PI*180,ne);if(m){v&&v.path.pop(),U(q);let ce="0\u7C73";v&&(ce=R(v.path)),y=ce,I.spot.push(se),I.distance.push(ce);let j=f.entities.add({position:se,point:{pixelSize:5,color:w.point,outlineColor:At.WHITE,outlineWidth:1,clampToGround:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY},label:{text:ce,show:!0,font:"26px \u6977\u4F53",fillColor:At.WHITE,style:pA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:wn.BOTTOM,pixelOffset:new Bt(20,-20),clampToGround:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY}});I.label.push(j),f._points.push(j)}}},Ki.LEFT_CLICK),B.setInputAction(function(){f.entities.remove(L),f._points[f._points.length-1].label.text=y,B.destroy(),C.pop(),O(o)&&typeof o=="function"&&o(I),F.style.display="none"},Ki.RIGHT_CLICK),this};yy.prototype.spaceDistance=function(o,A){let f=this;f.scene.globe.depthTestAgainstTerrain=!0;let m=new Ur(f.scene.canvas),C=[],y=null,x="0\u7C73",v=null,E,I="",w,Q=document.createElement("div");nA(".map-widget",Q),nA(".map-widget",'<div id="toolTip" style="display: none;position: absolute;visibility: visible;max-width: 200px;min-width: 100px;padding: 1px 1px 1px 25px;font-size: 11px;z-index: 1000;opacity: 0.8;background-color: rgba(0,0,0,0.7);border-radius: 3px;"></div>');let B=document.getElementById("toolTip");B.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u5DE6\u952E\u5F00\u59CB,\u53F3\u952E\u7ED3\u675F\uFF01</span>';let T={name:"",spot:[],distance:[],label:[],ployline:[]},D={point:At.RED,polyline:At.fromRgba(4286644096)};O(A)&&(O(A.point)&&(D.point=A.point),O(A.polyline)&&(D.polyline=A.polyline));let F=function(){function L(R){this.options={name:"\u76F4\u7EBF",polyline:{show:!0,positions:[],material:D.polyline,width:3,clampToGround:!1}},this.positions=R,this._init()}return L.prototype._init=function(){let R=this,k=function(){return R.positions};this.options.polyline.positions=new Bn(k,!1);let U=f.entities.add(this.options);f.item=U,T.ployline.push(U);let V=f.getuid();T.name=`\u65B0\u5EFA\u7A7A\u95F4\u8DDD\u79BB${V}`},L}();return m.setInputAction(function(L){if(f.scene.bim){let R=f.scene.bim.PickWorldPositionSync(L.endPosition.x,L.endPosition.y);R[0]===0?v=f.scene.pickPosition(L.endPosition):v=new ee(R[0],R[1],R[2]),console.log("????????",v)}else v=f.scene.pickPosition(L.endPosition);!v||(B.style.left=`${L.endPosition.x+10}px`,B.style.top=`${L.endPosition.y+20}px`,B.style.display="block",C.length>=2&&(O(y)?(C.pop(),C.push(v)):y=new F(C),B.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u53F3\u952E\u7ED3\u675F\uFF01</span>',x=f.getSpaceDistance(C)),f.entities.remove(w),w=f.entities.add({name:"\u7A7A\u95F4\u76F4\u7EBF\u8DDD\u79BB",position:C[C.length-1],label:{text:`\u603B\u957F\uFF1A${x}`,show:!0,font:"26px \u6977\u4F53",fillColor:At.WHITE,style:pA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:wn.BOTTOM,pixelOffset:new Bt(20,-20),disableDepthTestDistance:Number.POSITIVE_INFINITY}}))},Ki.MOUSE_MOVE),m.setInputAction(function(L){if(f.scene.bim){let k=f.scene.bim.PickWorldPositionSync(L.position.x,L.position.y);k[0]===0?v=f.scene.pickPosition(L.position):v=new ee(k[0],k[1],k[2]),console.log("????????",v)}else v=f.scene.pickPosition(L.position);if(!v)return;C.length===0&&C.push(v.clone()),C.push(v);let R=x;I=`\u603B\u957F\uFF1A${x}`,E=f.entities.add({name:"\u7A7A\u95F4\u76F4\u7EBF\u8DDD\u79BB",position:C[C.length-1],point:{pixelSize:5,color:D.point,outlineColor:At.WHITE,outlineWidth:2,clampToGround:!1,disableDepthTestDistance:Number.POSITIVE_INFINITY},label:{text:R,show:!0,font:"26px \u6977\u4F53",fillColor:At.WHITE,style:pA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:wn.BOTTOM,pixelOffset:new Bt(20,-20),heightReference:xn.NONE,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),f._points.push(E),T.spot.push(v),T.distance.push(x),T.label.push(E)},Ki.LEFT_CLICK),m.setInputAction(function(L){B.style.display="none",f.entities.remove(w),f._points.length>0&&(f._points[f._points.length-1].label.text=I),m.destroy(),C.pop(),O(o)&&typeof o=="function"&&o(T)},Ki.RIGHT_CLICK),this};yy.prototype.getSpaceDistance=function(o){let A=0,f="";for(let m=0;m<o.length-1;m++){let C=Kt.fromCartesian(o[m]),y=Kt.fromCartesian(o[m+1]),x=new l0;x.setEndPoints(C,y);let v=x.surfaceDistance;v=Math.sqrt(Math.pow(v,2)+Math.pow(y.height-C.height,2)),A=A+v}return A>=1e3?f=`${(A/1e3).toFixed(2)}\u5343\u7C73`:f=`${A.toFixed(2)}\u7C73`,f};yy.prototype.getPlaneArea=function(o,A){let f=this;f.scene.globe.depthTestAgainstTerrain=!0;let m=0,C=new Ur(f.scene._imageryLayerCollection),y=document.getElementById("toolTip");y||(nA(".map-widget",'<div id="toolTip" style="display: none;position: absolute;visibility: visible;max-width: 200px;min-width: 100px;padding: 1px 1px 1px 25px;font-size: 11px;z-index: 1000;opacity: 0.8;background-color: rgba(0,0,0,0.7);border-radius: 3px;"></div>'),y=document.getElementById("toolTip")),y.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u5DE6\u952E\u5F00\u59CB\uFF0C\u53F3\u952E\u7ED3\u675F\uFF01</span>';let x=[],v={},E=[],I=[],w=null,Q=null,M,B={point:At.RED,polyline:At.fromRgba(4286644096),polygon:At.fromRgba(4286644096).withAlpha(.5)};O(A)&&(O(A.point)&&(B.point=A.point),O(A.polyline)&&(B.polyline=A.polyline),O(A.polygon)&&(B.polygon=A.polygon));let T={mj:0,label:[],polygon:[]};y.style.display="block";let D=function(){function F(L){this.options={name:"\u591A\u8FB9\u5F62",polygon:{hierarchy:[],perPositionHeight:!0,material:B.polygon,clampToGround:!1}},this.hierarchy=L,this._init()}return F.prototype._init=function(){let L=this,R=function(){return L.hierarchy};this.options.polygon.hierarchy=new Bn(R,!1),this.polygon=f.entities.add(this.options),f.item=this.polygon,f._entity=this.polygon,T.polygon=this.polygon},F}();return C.setInputAction(function(F){if(y.style.left=`${F.endPosition.x+10}px`,y.style.top=`${F.endPosition.y+20}px`,f.scene.bim){let V=f.scene.bim.PickWorldPositionSync(F.endPosition.x,F.endPosition.y);V[0]===0?Q=f.scene.pickPosition(F.endPosition):Q=new ee(V[0],V[1],V[2])}else Q=f.scene.pickPosition(F.endPosition);if(!Q)return;let L=Kt.fromCartesian(Q),R=je.toDegrees(L.longitude),k=je.toDegrees(L.latitude),U=L.height;if(x.length>=2){O(w)?(x.pop(),x.push(Q),v=new Un(x),I.pop(),I.push({lon:R,lat:k,hei:U})):(v=new Un(x),w=new D(v));let V=f.getArea(I,x);f.entities.remove(M),M=f.entities.add({name:"\u591A\u8FB9\u5F62\u9762\u79EF",position:x[x.length-1],label:{text:V,font:"26px \u6977\u4F53",show:!0,fillColor:At.WHITE,style:pA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:wn.BOTTOM,pixelOffset:new Bt(20,-40),heightReference:xn.CLAMP_TO_GROUND,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),T.label=M}},Ki.MOUSE_MOVE),C.setInputAction(function(F){if(f.scene.bim){let V=f.scene.bim.PickWorldPositionSync(F.position.x,F.position.y);V[0]===0?Q=f.scene.pickPosition(F.position):Q=new ee(V[0],V[1],V[2])}else Q=f.scene.pickPosition(F.position);if(!Q)return;let L=Kt.fromCartesian(Q);console.log("\u5DE6\u952E\u70B9",L);let R=je.toDegrees(L.longitude),k=je.toDegrees(L.latitude),U=L.height;x.length===0&&(x.push(Q.clone()),v=new Un(x),I.push({lon:R,lat:k,hei:U}),x.push(Q.clone()),v=new Un(x),I.push({lon:R,lat:k,hei:U})),x.push(Q),v=new Un(x),E.push({lon:R,lat:k,hei:U}),I.push({lon:R,lat:k,hei:U})},Ki.LEFT_CLICK),C.setInputAction(function(F){y.style.display="none",f.entities.remove(M),C.destroy();let L=f.getArea(I,x);m=L;let R=f.entities.add({name:"\u591A\u8FB9\u5F62\u9762\u79EF",position:x[x.length-1],label:{text:L,font:"26px \u6977\u4F53",show:!0,fillColor:At.WHITE,style:pA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:wn.BOTTOM,pixelOffset:new Bt(20,-40),heightReference:xn.CLAMP_TO_GROUND,disableDepthTestDistance:Number.POSITIVE_INFINITY}});f._points.push(R),f._lable=R,T.mj=m,T.label=R,O(o)&&typeof o=="function"&&o(T)},Ki.RIGHT_CLICK),this};yy.prototype.getSurfaceArea3d=function(o,A){let f=this;f.scene.globe.depthTestAgainstTerrain=!0;let m={mj:0,label:[],polygon:[]},C=!0,y=[],x={},v,E=f.scene,I=E.globe.ellipsoid,w=new iI;E.primitives.add(w);let Q,M,B=0,T={point:At.RED,polyline:At.fromRgba(4286644096),polygon:At.fromRgba(4286644096).withAlpha(.5)};O(A)&&(O(A.point)&&(T.point=A.point),O(A.polyline)&&(T.polyline=A.polyline),O(A.polygon)&&(T.polygon=A.polygon));let D=document.createElement("div");nA(".map-widget",D),nA(".map-widget",'<div id="toolTip" style="display: none;position: absolute;visibility: visible;max-width: 200px;min-width: 100px;padding: 1px 1px 1px 25px;font-size: 11px;z-index: 1000;opacity: 0.8;background-color: rgba(0,0,0,0.7);border-radius: 3px;"></div>');let L=document.getElementById("toolTip");L.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u5DE6\u952E\u5F00\u59CB,\u53F3\u952E\u7ED3\u675F\uFF01</span>';let R=new Ur(E.canvas),k=function(){function V(H){if(!O(H))throw new Ui("positions is required!");if(H.length<3)throw new Ui("positions \u7684\u957F\u5EA6\u5FC5\u987B\u5927\u4E8E\u7B49\u4E8E3");this.options={polygon:{show:!0,hierarchy:void 0,material:T.polygon,clampToGround:!1}},this.path=H,this._init()}return V.prototype._init=function(){let H=this,q=function(){return H.path};this.options.polygon.hierarchy=new Bn(q,!1),this.polygonEntity=f.entities.add(this.options),f.item=this.polygonEntity,m.polygon=this.polygonEntity,f._entity=this.polygonEntity},V}();R.setInputAction(function(V){let H=0;f.entities.remove(M);let q,ie,Z=f.scene.camera.getPickRay(V.endPosition);Z&&(q=f.scene.globe.pick(Z,f.scene));let oe=f.scene.pick(V.endPosition),ne=!1;if(oe){let ce=f.scene.pickPosition(V.endPosition);ce&&(q=ce),ne=!0}if(!q)return;let se=function(ce){let j=new Array(ce.length),de=function(Be){return Be.longitude=Be.longitude/Math.PI*180,Be.latitude=Be.latitude/Math.PI*180,Be},me=function(Be){let Qe=0;for(let Ie=0;Ie<Be.length;Ie++){let ve=Be[Ie],K;Ie<Be.length-1?K=Be[Ie+1]:K=Be[0],Qe+=ve.x*K.y-K.x*ve.y}return Qe/2};for(let Be=0;Be<ce.length;Be++)j[Be]=de(I.cartesianToCartographic(ce[Be]));let _e=0;for(let Be=0;Be<j.length;Be++)_e+=j[Be].longitude;_e=_e/j.length;for(let Be=0;Be<j.length;Be++)j[Be]=f.Gauss_to_XY(j[Be].longitude,j[Be].latitude,_e);return Math.abs(me(j))};if(ie=Ti.WGS84.cartesianToCartographic(q),ie&&C){if(L.style.left=`${V.endPosition.x+10}px`,L.style.top=`${V.endPosition.y+20}px`,L.style.display="block",y.length<2){B===1&&(M=f.entities.add({name:"\u591A\u8FB9\u5F62\u9762\u79EF",position:q,label:{text:`${H}\u5E73\u65B9\u5343\u7C73`,font:"26px \u6977\u4F53",show:!0,fillColor:At.WHITE,style:pA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:wn.BOTTOM,pixelOffset:new Bt(20,-40),heightReference:xn.CLAMP_TO_GROUND,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),f._points.push(M),m.label=M);return}if(O(v)?(v.path.positions.pop(),v.path.positions.push(q)):(y.push(q),x=new Un(y),v=new k(x)),y.length>=2){L.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u53F3\u952E\u7ED3\u675F\uFF01</span>';let ce=String(se(v.path.positions));ce=ce.substr(0,ce.indexOf(".",0)),ce.length<6?H=`${ce}\u5E73\u65B9\u7C73`:(ce=String(ce/1e6),ce=ce.substr(0,ce.indexOf(".",0)+3),H=`${ce}\u5E73\u65B9\u5343\u7C73`),m.mj=H,M=f.entities.add({name:"\u591A\u8FB9\u5F62\u9762\u79EF",position:q,label:{text:H,font:"26px \u6977\u4F53",show:!0,fillColor:At.WHITE,style:pA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:wn.BOTTOM,pixelOffset:new Bt(20,-40),heightReference:xn.CLAMP_TO_GROUND,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),f._points.push(M),m.label=M}}},Ki.MOUSE_MOVE),R.setInputAction(function(V){let H;B=1;let q=f.scene.camera.getPickRay(V.position);q&&(H=f.scene.globe.pick(q,f.scene));let ie=f.scene.pick(V.position),Z=!1;if(ie){let oe=f.scene.pickPosition(V.position);oe&&(H=oe),Z=!0}H&&C&&(y.push(H),x=new Un(y))},Ki.LEFT_CLICK),R.setInputAction(function(){R.removeInputAction(Ki.LEFT_CLICK),R.removeInputAction(Ki.LEFT_DOUBLE_CLICK),f.trackedEntity=void 0,C=!1,Q=w.add({show:!0,id:"measureTool",position:y[y.length-1],pixelOffset:new Bt(0,20),eyeOffset:new ee(0,0,0),horizontalOrigin:tA.CENTER,verticalOrigin:wn.CENTER,scale:1,color:new At(1,1,1,1)}),L.style.display="none",R.destroy(),O(o)&&typeof o=="function"&&o(m)},Ki.RIGHT_CLICK);let U=function(V){let H=0,q=0,ie=0;for(let oe=0;oe<V.length;oe++)H+=V[oe].x,q+=V[oe].y,ie+=V[oe].z;return new ee(H/V.length,q/V.length,ie/V.length)};return this};yy.prototype.to_N=function(o){let f=63567523142e-4,m=Math.sqrt(6378137*6378137-f*f)/6378137;return 6378137/Math.sqrt(1-m*m*Math.sin(o)*Math.sin(o))};yy.prototype.to_Sm=function(o){let f=63567523142e-4,m=Math.sqrt(6378137*6378137-f*f)/6378137,C,y,x,v,E;return C=1+m*m*3/4+Math.pow(m,4)*45/64+Math.pow(m,6)*175/256+Math.pow(m,8)*11025/16384,y=Math.pow(m,2)*3/4+Math.pow(m,4)*15/16+Math.pow(m,6)*525/512+Math.pow(m,8)*2205/2048,x=Math.pow(m,4)*15/64+Math.pow(m,6)*105/256+Math.pow(m,8)*2205/4096,v=Math.pow(m,6)*35/512+Math.pow(m,8)*315/2048,E=Math.pow(m,8)*315/16384,6378137*(1-m*m)*(C*o-y/2*Math.sin(2*o)+x/4*Math.sin(4*o)-v/6*Math.sin(6*o)+E/8*Math.sin(8*o))};yy.prototype.to_Radian=function(o){return o*Math.PI/180};yy.prototype.Gauss_to_XY=function(o,A,f){let C=63567523142e-4,y=Math.sqrt(6378137*6378137-C*C)/C,x=0,v=0,E=0,I=0,w=this.to_Radian(f);A=this.to_Radian(A),o=this.to_Radian(o);let Q=o-w,M=Math.cos(A);I=this.to_N(A),E=I*Math.cos(A),x=Math.tan(A),v=y*M;let B=Math.pow(x,2),T=Math.pow(x,4),D=Math.pow(v,2),F=Math.pow(v,4),L=Math.pow(M,3),R=Math.pow(M,5),k=this.to_Sm(A)+Math.pow(Q,2)/2*E*M*x+Math.pow(Q,4)/24*x*E*L*(5-B+9*D+4*F)+Math.pow(Q,6)/720*x*E*R*(61-58*x*x+T+270*D-330*x*x*D),U=Q*I*M+Math.pow(Q,3)/6*I*L*(1-x*x+v*v)+Math.pow(Q,5)/120*I*R*(5-18*x*x+T+14*D-58*D*B);return new Bt(U,k)};yy.prototype.getArea=function(o,A){let f=0;for(let m=0;m<o.length-2;m++){let C=(m+1)%o.length,y=(m+2)%o.length,x=this.Angle(o[m],o[C],o[y]),v=this.getdistance(A[m],A[C]),E=this.getdistance(A[C],A[y]);f+=v*E*Math.abs(Math.sin(x))}return f<1e6?f=`${f.toFixed(4)}\u5E73\u65B9\u7C73`:f=`${(f/1e6).toFixed(4)}\u5E73\u65B9\u5343\u7C73`,f};yy.prototype.getdistance=function(o,A){let f=Kt.fromCartesian(o),m=Kt.fromCartesian(A),C=new l0;C.setEndPoints(f,m);let y=C.surfaceDistance;return y=Math.sqrt(Math.pow(y,2)+Math.pow(m.height-f.height,2)),y};yy.prototype.Bearing=function(o,A){let f=Math.PI/180,m=180/Math.PI,C=o.lat*f,y=o.lon*f,x=A.lat*f,v=A.lon*f,E=-Math.atan2(Math.sin(y-v)*Math.cos(x),Math.cos(C)*Math.sin(x)-Math.sin(C)*Math.cos(x)*Math.cos(y-v));return E<0&&(E+=Math.PI*2),E=E*m,E};yy.prototype.Angle=function(o,A,f){let m=this.Bearing(A,o),C=this.Bearing(A,f),y=m-C;return y<0&&(y+=360),y};yy.prototype.getuid=function(){return this.uuid(8,16)};yy.prototype.uuid=function(o,A){let f="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),m=[],C;if(A=A||f.length,o)for(C=0;C<o;C++)m[C]=f[0|je.nextRandomNumber()*A];else{let y;for(m[8]=m[13]=m[18]=m[23]="-",m[14]="4",C=0;C<36;C++)m[C]||(y=0|je.nextRandomNumber()*16,m[C]=f[C===19?y&3|8:y])}return m.join("")};yy.prototype.deleteObject=function(){if(this.entities.remove(this.item),this._points.length>0){for(let o=0;o<this._points.length;o++)this.entities.remove(this._points[o]);this._points=[]}try{this.scene.primitives.remove(this.item)}catch(o){console.log(o)}this.item=void 0};var FW=yy;function gw(o,A){this._earthCtrl=o,this._coreMap=this._earthCtrl.coreMap,this._show=Ae(A.show,!0),this._lon=Ae(A.lon,121),this._lat=Ae(A.lat,31),this._height=Ae(A.height,10),this._heading=Ae(A.heading,0),this._pitch=Ae(A.pitch,0),this._distance=Ae(A.distance,300),this._position=ee.fromDegrees(A.lon,A.lat,A.height),this._horizontalViewAngle=Ae(A.horizontalViewAngle,90),this._verticalViewAngle=Ae(A.verticalViewAngle,60),this._horizontalViewAngle=this.adjustViewRange(this._horizontalViewAngle),this._verticalViewAngle=this.adjustViewRange(this._verticalViewAngle),this._visibleAreaColor=Ae(A.visibleAreaColor,At.GREEN.withAlpha(.4)),this._invisibleAreaColor=Ae(A.invisibleAreaColor,At.RED.withAlpha(.4)),this._size=Ae(A.size,10240),this._softShadows=Ae(A.softShadows,!0),this._colorStyle=Ae(A.colorStyle,At.YELLOW),this._parameter=A,this._lineArray=[],this._visualCone=!0,this.pyramid=void 0,this.updateViewShed()}Object.defineProperties(gw.prototype,{show:{get:function(){return this._show},set:function(o){o!==this._show&&(this._show=o,this.updateViewShed())}},distance:{get:function(){return this._distance}},heading:{get:function(){return this._heading}},pitch:{get:function(){return this._pitch}},horizontalViewAngle:{get:function(){return this._horizontalViewAngle}},verticalViewAngle:{get:function(){return this._verticalViewAngle}},colorStyle:{get:function(){return this._colorStyle},set:function(o){this._colorStyle=o}},invisibleAreaColor:{get:function(){return this._invisibleAreaColor},set:function(o){this._invisibleAreaColor=o}},visibleAreaColor:{get:function(){return this._visibleAreaColor},set:function(o){this._visibleAreaColor=o}},visualCone:{get:function(){return this._visualCone},set:function(o){this._visualCone=o,this.visualConeShow(o)}}});gw.prototype.adjustViewRange=function(o){return o<=0?o=1:o>=180&&(o=179),o};gw.prototype.removeFromMap=function(){let o=this;O(o.viewShedMap)&&(o.viewShedMap.enabled=!1),O(o.pyramid)&&(o._earthCtrl.entities.removeById(o.pyramid.id),o.pyramid=null);for(let A=0;A<o._lineArray.length;A++){let f=o._lineArray[A];o._earthCtrl.entities.remove(f)}o._lineArray=[]};gw.prototype.visualConeShow=function(o){let A=this;O(A.pyramid)&&(A.pyramid.show=o);for(let f=0;f<A._lineArray.length;f++){let m=A._lineArray[f];m.show=o}};gw.prototype.addVisualPyramid=function(){let o=this,A=new l6({radii:new Bn(function(){return new ee(o._distance,o._distance,o._distance)},!1),minimumClock:new Bn(function(){return je.toRadians(90-o._heading-o._horizontalViewAngle/2)},!1),maximumClock:new Bn(function(){return je.toRadians(90-o._heading+o._horizontalViewAngle/2)},!1),minimumCone:new Bn(function(){return je.toRadians(90-o._verticalViewAngle/2)},!1),maximumCone:new Bn(function(){return je.toRadians(90+o._verticalViewAngle/2)},!1),fill:!1,outline:!0,subdivisions:128,slicePartitions:32,stackPartitions:16,outlineColor:new Bn(function(){return o._colorStyle},!1)}),f=new kA({position:new Bn(function(){return o._position},!1),ellipsoid:A});this.pyramid=o._earthCtrl.entities.add(f)};gw.prototype.createLightCamera=function(){O(this.viewShedMap)?this._lightCamera=this.viewShedMap._lightCamera:this._lightCamera=new Ml(this._coreMap.scene),this._lightCamera.position=this._position};gw.prototype.updateParameters=function(o){let A=this,f=A._lightCamera;if(!!O(o)&&(O(o.lon)||O(o.lat)||O(o.height)||O(o.heading)||O(o.pitch)||O(o.roll)||O(o.far)||O(o.distance)||O(o.verticalViewAngle)||O(o.horizontalViewAngle))){let m=this._parameter;for(let v in o)o.hasOwnProperty(v)&&O(m[v])&&(m[v]=o[v]);m.distance>=A.viewShedMap.maximumDistance&&(m.distance=A.viewShedMap.maximumDistance),A._heading=m.heading,A._pitch=m.pitch,A._distance=m.distance,A.viewShedMap._pointLightRadius=m.distance,m.verticalViewAngle=A.adjustViewRange(m.verticalViewAngle),A._verticalViewAngle=m.verticalViewAngle,m.horizontalViewAngle=A.adjustViewRange(m.horizontalViewAngle),A._horizontalViewAngle=m.horizontalViewAngle,A._position=ee.fromDegrees(m.lon,m.lat,m.height);let C=je.toRadians(m.heading);f.setView({destination:A._position,orientation:{heading:C,pitch:0,roll:0}}),f.frustum.far=m.far||1e5;let y=je.toRadians(A._horizontalViewAngle),x=je.toRadians(A._verticalViewAngle);f.frustum.aspectRatio=Math.tan(y/2)/Math.tan(x/2),y>x?f.frustum.fov=y:f.frustum.fov=x}};gw.prototype.createShadowMap=function(){if(O(this.viewShedMap)){this.viewShedMap.enabled=!0;return}this.viewShedMap=new nH({context:this._coreMap.scene.context,lightCamera:this._lightCamera,enabled:!0,isPointLight:!0,pointLightRadius:this._distance,cascadesEnabled:!1,size:this._size,softShadows:!0,normalOffset:!1,fromLightSource:!1,visibleAreaColor:this._visibleAreaColor,invisibleAreaColor:this._invisibleAreaColor}),this._earthCtrl.viewShedMapList.push(this.viewShedMap)};var Ux=new ee;gw.prototype.drawViewCentrum=function(){let o=this;function A(){let I=o.pyramid._ellipsoid._minimumClock.getValue(),w=o.pyramid._ellipsoid._minimumCone.getValue(),Q=o.pyramid._ellipsoid.radii.getValue(),M=Math.sin,B=Math.cos,T=M(w),D=B(w),F=M(I),L=B(I);Ux.x=Q.x*T*L,Ux.y=Q.y*T*F,Ux.z=Q.z*D;let R=new fQ.changeCartesian3ByScalar(o._position,Ux);return[o._position,R]}let f=this._earthCtrl.entities.add({polyline:{positions:new Bn(A,!1),material:this._colorStyle}});this._lineArray.push(f);function m(){let I=o.pyramid._ellipsoid._maximumClock.getValue(),w=o.pyramid._ellipsoid._minimumCone.getValue(),Q=o.pyramid._ellipsoid.radii.getValue(),M=Math.sin,B=Math.cos,T=M(w),D=B(w),F=M(I),L=B(I);Ux.x=Q.x*T*L,Ux.y=Q.y*T*F,Ux.z=Q.z*D;let R=new fQ.changeCartesian3ByScalar(o._position,Ux);return[o._position,R]}let C=this._earthCtrl.entities.add({polyline:{positions:new Bn(m,!1),material:this._colorStyle}});this._lineArray.push(C);function y(){let I=o.pyramid._ellipsoid._minimumClock.getValue(),w=o.pyramid._ellipsoid._maximumCone.getValue(),Q=o.pyramid._ellipsoid.radii.getValue(),M=Math.sin,B=Math.cos,T=M(w),D=B(w),F=M(I),L=B(I);Ux.x=Q.x*T*L,Ux.y=Q.y*T*F,Ux.z=Q.z*D;let R=new fQ.changeCartesian3ByScalar(o._position,Ux);return[o._position,R]}let x=this._earthCtrl.entities.add({polyline:{positions:new Bn(y,!1),material:this._colorStyle}});this._lineArray.push(x);function v(){let I=o.pyramid._ellipsoid._maximumClock.getValue(),w=o.pyramid._ellipsoid._maximumCone.getValue(),Q=o.pyramid._ellipsoid.radii.getValue(),M=Math.sin,B=Math.cos,T=M(w),D=B(w),F=M(I),L=B(I);Ux.x=Q.x*T*L,Ux.y=Q.y*T*F,Ux.z=Q.z*D;let R=fQ.changeCartesian3ByScalar(o._position,Ux);return[o._position,R]}let E=this._earthCtrl.entities.add({polyline:{positions:new Bn(v,!1),material:this._colorStyle}});this._lineArray.push(E)};gw.prototype.updateViewShed=function(){this.show?(this.createLightCamera(),this.setCameraParams(),this.createShadowMap(),this.addVisualPyramid(),this.drawViewCentrum()):this.removeFromMap()};gw.prototype.setCameraParams=function(){this._lightCamera.frustum.near=.1,this._lightCamera.frustum.far=this._distance;let o=je.toRadians(this._horizontalViewAngle),A=je.toRadians(this._verticalViewAngle);this._lightCamera.frustum.aspectRatio=Math.tan(o/2)/Math.tan(A/2),o>A?this._lightCamera.frustum.fov=o:this._lightCamera.frustum.fov=A,this._lightCamera.setView({destination:this._position,orientation:{heading:je.toRadians(this._heading),pitch:je.toRadians(this._pitch),roll:0}})};var GTe=gw;var HTe=Ti.WGS84;function Kf(o){this._cesiumViewer=o,this.coreMap=o.coreMap,this._scene=this.coreMap.scene,this.loading||this.addLoading(),this._tooltip=ZRi(this.coreMap.container)}function VTe(o,A){if(o===null||typeof o!="object"||o.constructor!==Object&&o.constructor!==Array)return o;if(o.constructor===Date||o.constructor===RegExp||o.constructor===Function||o.constructor===String||o.constructor===Number||o.constructor===Boolean)return new o.constructor(o);A=A||new o.constructor;for(let f in o)A[f]=typeof A[f]>"u"?VTe(o[f],null):A[f];return A}function eAt(o,A){let f=VTe(o),m;for(m in A)f[m]===void 0&&(f[m]=VTe(A[m]));return f}function ZRi(o){let A=function(f){let m=document.createElement("DIV");m.className="twipsy right";let C=document.createElement("DIV");C.className="twipsy-arrow",m.appendChild(C);let y=document.createElement("DIV");y.className="twipsy-inner",m.appendChild(y),this._div=m,this._title=y,f.appendChild(m)};return A.prototype.setVisible=function(f){this._div.style.display=f?"block":"none"},A.prototype.showAt=function(f,m){f&&m&&(this.setVisible(!0),this._title.innerHTML=m,this._div.style.left=`${f.x+30}px`,this._div.style.top=`${f.y-this._div.clientHeight/2-15}px`)},new A(o)}Kf.prototype.addToolbar=function(o,A){return A=eAt(A,{container:o}),new Kf.Toolbar(this,A)};var tAt={shiftX:0,shiftY:0};Kf.prototype.createBillboardGroup=function(o,A,f){let m=new Kf.BillboardGroup(this,A);return m.addBillboards(o,f),m};Kf.BillboardGroup=function(o,A){this._drawHelper=o,this._scene=o._scene,this._options=eAt(A,tAt);let f=new iI;this._scene.primitives.add(f),this._billboards=f,this._orderedBillboards=[]};Kf.BillboardGroup.prototype.createBillboard=function(o,A){let f=this._billboards.add({show:!0,position:o,pixelOffset:new Bt(this._options.shiftX,this._options.shiftY),eyeOffset:new ee(0,0,-1e3),horizontalOrigin:tA.CENTER,verticalOrigin:wn.CENTER,scale:.3,image:Ae(this._options.iconUrl,`${globalThis.GEOWORLD_BASE_URL}Assets/Images/point.png`),color:new At(1,1,1,1)});if(A){let y=function(v){C.enableRotate=v},x=function(){let v=0;for(let E=m._orderedBillboards.length;v<E&&m._orderedBillboards[v]!==f;++v);return v},m=this,C=this._scene.screenSpaceCameraController;if(A.dragHandlers){let v=this,E=new Ur(v._scene.canvas);setListener(f,"leftDown",function(I){function w(M){f.position=M;for(let B=0,T=v._orderedBillboards.length;B<T&&v._orderedBillboards[B]!==f;++B);A.dragHandlers.onDrag&&A.dragHandlers.onDrag(x(),M)}function Q(M){E.destroy(),y(!0),A.dragHandlers.onDragEnd&&A.dragHandlers.onDragEnd(x(),M)}E.setInputAction(function(M){let B=v._scene.camera.pickEllipsoid(M.endPosition,HTe);B?w(B):Q(B)},Ki.MOUSE_MOVE),E.setInputAction(function(M){Q(v._scene.camera.pickEllipsoid(M.position,HTe))},Ki.LEFT_UP),y(!1),A.dragHandlers.onDragStart&&A.dragHandlers.onDragStart(x(),v._scene.camera.pickEllipsoid(I,HTe))})}A.onDoubleClick&&setListener(f,"leftDoubleClick",function(v){A.onDoubleClick(x())}),A.onClick&&setListener(f,"leftClick",function(v){A.onClick(x())}),A.tooltip&&(setListener(f,"mouseMove",function(v){m._drawHelper._tooltip.showAt(v,A.tooltip())}),setListener(f,"mouseOut",function(v){m._drawHelper._tooltip.setVisible(!1)}))}return f};Kf.BillboardGroup.prototype.insertBillboard=function(o,A,f){this._orderedBillboards.splice(o,0,this.createBillboard(A,f))};Kf.BillboardGroup.prototype.addBillboard=function(o,A){this._orderedBillboards.push(this.createBillboard(o,A))};Kf.BillboardGroup.prototype.addBillboards=function(o,A){let f=0;for(;f<o.length;f++)this.addBillboard(o[f],A)};Kf.BillboardGroup.prototype.updateBillboardsPositions=function(o){let A=0;for(;A<o.length;A++)this.getBillboard(A).position=o[A]};Kf.BillboardGroup.prototype.countBillboards=function(){return this._orderedBillboards.length};Kf.BillboardGroup.prototype.getBillboard=function(o){return this._orderedBillboards[o]};Kf.BillboardGroup.prototype.removeBillboard=function(o){this._billboards.remove(this.getBillboard(o)),this._orderedBillboards.splice(o,1)};Kf.BillboardGroup.prototype.remove=function(){this._billboards=this._billboards&&this._billboards.removeAll()&&this._billboards.destroy()};Kf.BillboardGroup.prototype.setOnTop=function(){this._scene.primitives.raiseToTop(this._billboards)};Kf.prototype.cleanUp=function(){this._prevEntity!==void 0&&(this._cesiumViewer.entities.remove(this._prevEntity),this._prevEntity=void 0),this._markers!==void 0&&(this._markers.remove(),this._markers=void 0),this._volumeLabel!==void 0&&(this._cesiumViewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),this._tooltip.setVisible(!1)};Kf.prototype.startDrawing=function(o){let A=this,f=this._scene;f.globe.depthTestAgainstTerrain=!0;let m=this._tooltip,C=3,y=[],x=[],v;this._positions=x;let E=new Ur(f.canvas);this._mouseHandler=E;let I=new Kf.BillboardGroup(this,tAt);this._markers=I,this._prevEntity!==void 0&&(this._cesiumViewer.entities.remove(this._prevEntity),this._prevEntity=null),this._volumeLabel!==void 0&&(this._cesiumViewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),E.setInputAction(function(Q){if(Q.position!==null){let M=f.camera.getPickRay(Q.position),B=f.globe.pick(M,f),T=Kt.fromCartesian(B),D=je.toDegrees(T.longitude),F=je.toDegrees(T.latitude);if(B){if(y.length===0&&(y.push(D,F),x.push(B),v=B,I.addBillboard(v)),x.length>=4){let L=Qs.wgs84ToWindowCoordinates(this._cesiumViewer.coreMap.scene,v);if(L!==void 0){let R=L.x-Q.position.x,k=L.y-Q.position.y;if(R*R+k*k<16){y.splice(y.length-2,2),x.pop(),this.isLoading(!0),this.stopDrawing(o);return}}}y.push(D,F),x.push(B),I.addBillboard(B),x.length===C&&(A._prevEntity=A._cesiumViewer.factory.createElement({type:"polygon",parameters:{hierarchy:ee.fromDegreesArray(y),material:At.RED.withAlpha(.6),fill:!0}}),A._prevEntity.polygon.hierarchy=w())}}}.bind(this),Ki.LEFT_CLICK),E.setInputAction(function(Q){let M=Q.endPosition;if(M!==null)if(x.length===0)m.showAt(M,"\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236\u7B2C\u4E00\u4E2A\u70B9");else{let B=f.camera.getPickRay(M),T=f.globe.pick(B,f),D=Kt.fromCartesian(T),F=je.toDegrees(D.longitude),L=je.toDegrees(D.latitude);if(T&&(y.splice(y.length-2,2),x.pop(),y.push(F,L),x.push(T),I.getBillboard(x.length-1).position=T,m.showAt(M,"\u53CC\u51FB\u7ED3\u675F\u7ED8\u5236"),x.length>=3&&x.length>=4)){let R=Qs.wgs84ToWindowCoordinates(this._cesiumViewer.coreMap.scene,v);if(R!==void 0){let k=R.x-M.x,U=R.y-M.y;k*k+U*U<16?document.body.style.cursor="pointer":document.body.style.cursor="default"}}}}.bind(this),Ki.MOUSE_MOVE),E.setInputAction(function(Q){x.length<C+2||(this.isLoading(!0),setTimeout(()=>{this.stopDrawing(o)},100))}.bind(this),Ki.LEFT_DOUBLE_CLICK);function w(){return ee.fromDegreesArray(y)}};Kf.prototype.stopDrawing=function(o){this._mouseHandler!==void 0&&(this._mouseHandler.destroy(),this._mouseHandler=void 0),this._markers!==void 0&&(this._markers.remove(),this._markers=void 0),this._prevEntity!==void 0&&(this._cesiumViewer.entities.remove(this._prevEntity),this._prevEntity=null),this._volumeLabel!==void 0&&(this._cesiumViewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),this._tooltip.setVisible(!1),document.body.style.cursor="wait";let A=this.computeCutVolume(),f=A.maxHeight;document.body.style.cursor="default",typeof o=="function"&&o(A.volume);let m={polygon:{hierarchy:{positions:this._positions},extrudedHeight:f,closeTop:!1,closeBottom:!1,material:At.RED.withAlpha(.5),outline:!0,outlineColor:At.WHITE,outlineWidth:2}};this._prevEntity=this._cesiumViewer.entities.add(m),this.isLoading(!1)};Kf.prototype.addLoading=function(){let o=document.createElement("div");o.id="cesiumLoading",o.style.cssText="width: 100%;height: 100%;display:none;pointer-events: none;position: absolute;top: 0;left: 0;-moz-box-sizing: border-box;box-sizing: border-box;background-color: unset;z-index: 99999;";let A=document.createElement("img");A.style.cssText="position: relative;width: 110px;height: 110px;margin: auto;top: 50%;left: 50%;margin-top: -55px;margin-left: -55px;",A.src=`${globalThis.GEOWORLD_BASE_URL}Workers/image/loading.gif`,o.appendChild(A),this.loading=o,this.coreMap.container.appendChild(o)};Kf.prototype.isLoading=function(o){o?this.loading.style.display="block":this.loading.style.display="none"};Kf.prototype.removeLoading=function(){this.loading&&this.loading.remove(),this.loading=void 0};function $Ri(o){let A=[],f=[];for(let Q=0;Q<o.length;Q++){let M=Kt.fromCartesian(o[Q]);A.push(M.longitude),f.push(M.latitude)}let m=0,C=0,y=0,x=0,v=0,E=0,I=0,w=0;for(let Q=0;Q<o.length;Q++)m=A[Q],C=f[Q],Q===o.length-1?(y=A[0],x=f[0]):(y=A[Q+1],x=f[Q+1]),E=m*x-y*C,v+=E,I+=(m+y)*E,w+=(C+x)*E;return v*=.5,I/=6*v,w/=6*v,new Kt(I,w)}function eLi(o,A,f){let m=ee.distance(o,A),C=ee.distance(A,f),y=ee.distance(f,o),x=(m+C+y)/2;return Math.sqrt(x*(x-m)*(x-C)*(x-y))}Kf.prototype.computeCutVolume=function(){let o=15e3;for(let k=0;k<this._positions.length;k++){let U=Kt.fromCartesian(this._positions[k]),V=this._scene.globe.getHeight(U);o>V&&(o=V)}let A=Math.PI/Math.pow(2,11);A=A/64;let f=new eh.fromPositions({positions:this._positions,vertexFormat:Va.FLAT_VERTEX_FORMAT,granularity:A}),m=new eh.createGeometry(f),C=0,y=0,x,v,E,I,w,Q,M,B,T,D,F,L;for(let k=0;k<m.indices.length;k+=3)x=m.indices[k],v=m.indices[k+1],E=m.indices[k+2],D=new ee(m.attributes.position.values[x*3],m.attributes.position.values[x*3+1],m.attributes.position.values[x*3+2]),F=Kt.fromCartesian(D),I=this._scene.globe.getHeight(F),M=ee.fromRadians(F.longitude,F.latitude,0),y<I&&(y=I),D=new ee(m.attributes.position.values[v*3],m.attributes.position.values[v*3+1],m.attributes.position.values[v*3+2]),F=Kt.fromCartesian(D),w=this._scene.globe.getHeight(F),B=ee.fromRadians(F.longitude,F.latitude,0),y<w&&(y=w),D=new ee(m.attributes.position.values[E*3],m.attributes.position.values[E*3+1],m.attributes.position.values[E*3+2]),F=Kt.fromCartesian(D),Q=this._scene.globe.getHeight(F),T=ee.fromRadians(F.longitude,F.latitude,0),y<Q&&(y=Q),L=eLi(M,B,T),C=C+L*(I-o+w-o+Q-o)/3;let R=$Ri(this._positions);return this._volumeLabel=this._cesiumViewer.entities.add({position:ee.fromRadians(R.longitude,R.latitude,y+1e3),label:{text:`${C.toFixed(4)}\u7ACB\u65B9\u7C73`}}),{maxHeight:y,volume:C}};var zTe=Kf;function iAt(o,A){if(this.mEarthCtrl=o,this._parameter=A,this.coreMap=o.coreMap,this._color=Ae(A.color,new At(1,0,0,.7)),this._positions=A.positions,this._positions.length<3)throw new Ui("invalid positions length!");this._duration=Ae(A.duration,4e3),this._minHeight=Ae(A.minHeight,0),this._maxHeight=Ae(A.maxHeight,100),this._image=A.image,this._pps=null}function tLi(o,A){let f=Kt.fromCartesian(o[0]),m=f.longitude,C=f.latitude,y=m,x=C,v=A;for(let E=1;E<o.length;E++){let I=Kt.fromCartesian(o[E]);m>I.longitude?m=I.longitude:y<I.longitude&&(y=I.longitude),C>I.latitude?C=I.latitude:x<I.latitude&&(x=I.latitude)}return new ee.fromRadians((m+y)/2,(C+x)/2,v)}function iLi(o){if(O(o._pps))return;let A=tLi(o._positions,o._minHeight),f=Kt.fromCartesian(A),m=new ai(A.x,A.y,A.z,1),C=new Kt(f.longitude,f.latitude,o.maxHeight+100),y=Kt.toCartesian(C),x=new ai(y.x,y.y,y.z,1),v=new ai,E=new ai,I=new ee,w=o.mEarthCtrl.coreMap.scene.camera,Q=o._positions.length;o._pps=new va({fragmentShader:nLi(Q),uniforms:{u_floodCenterEC:function(){return Xe.multiplyByVector(w._viewMatrix,m,v)},u_floodPlaneNormalEC:function(){let B=Xe.multiplyByVector(w._viewMatrix,m,v),T=Xe.multiplyByVector(w._viewMatrix,x,E);return I.x=T.x-B.x,I.y=T.y-B.y,I.z=T.z-B.z,ee.normalize(I,I),I},u_floodRange:function(){return o._positions},u_minHeight:function(){return o._minHeight},u_maxHeight:function(){return o._maxHeight},u_image:function(){return o.image},u_floodColor:function(){return o._color},u_positionsLength:function(){return o._positions.length}}}),o.mEarthCtrl.coreMap.scene.postProcessStages.add(o._pps)}function rLi(o){O(o._pps)&&(o.mEarthCtrl.coreMap.scene.postProcessStages.remove(o._pps),o._pps=null)}function nLi(o){return`uniform sampler2D colorTexture;
            `})};VO.prototype.destroy=function(){this._tileset.customShader===this._customShader&&(this._customShader=void 0,this._tileset.customShader=void 0),this._scene.preUpdate.removeEventListener(this._preUpdate)};function CRi(){this.customShaders={},this.customShaders.lightLine=VO}var Lct=CRi;function HH(o,A){this.options=Ae(A,{}),this.earthCtrl=o,this.viewer=o.coreMap,this.CSME=nre,this.Cust=new this.CSME.CustomShaderStage(this.options.primitive,A),this.stageArr=[],this.eventListener=null,this.eventListener=this.viewer.scene.preUpdate.addEventListener(()=>{this.Cust.update()}),this.create()}HH.prototype.create=function(o){let A=this,f=null;o?f=o:f=A.options,f.lineMaterialStage&&(A.LineMaterialStage=new A.CSME.LineMaterialStage(Ae(f.lineMaterialStage,{weight:.5})),A.Cust.addStage(A.LineMaterialStage),A.stageArr.push(A.LineMaterialStage)),f.gradientMaterialStage&&(A.GradientMaterialStage=new A.CSME.GradientMaterialStage(Ae(f.gradientMaterialStage,{weight:.5})),A.Cust.addStage(A.GradientMaterialStage),A.stageArr.push(A.GradientMaterialStage)),f.normalizeMaterialStage&&(A.NormalizeMaterialStage=new A.CSME.NormalizeMaterialStage(Ae(f.normalizeMaterialStage,{weight:.5})),A.Cust.addStage(A.NormalizeMaterialStage),A.stageArr.push(A.NormalizeMaterialStage)),f.dynamicColorMaterialStage&&(A.DynamicColorMaterialStage=new A.CSME.DynamicColorMaterialStage(Ae(f.dynamicColorMaterialStage,{weight:.5})),A.Cust.addStage(A.DynamicColorMaterialStage),A.stageArr.push(A.DynamicColorMaterialStage)),f.reflectMaterialStage&&(A.ReflectMaterialStage=new A.CSME.ReflectMaterialStage(Ae(f.reflectMaterialStage,{weight:.5})),A.Cust.addStage(A.ReflectMaterialStage),A.stageArr.push(A.ReflectMaterialStage)),f.textureMaterialStage&&(A.TextureMaterialStage=new A.CSME.TextureMaterialStage(Ae(f.textureMaterialStage,{weight:.5,url:`${globalThis.GEOWORLD_BASE_URL}Assets/Textures/window.png`})),A.Cust.addStage(A.TextureMaterialStage),A.stageArr.push(A.TextureMaterialStage))};HH.prototype.addStage=function(o){let A=this;A.Cust.addStage(o),A.stageArr.push(o)};HH.prototype.removeStage=function(o){this.Cust.removeStage(o.name)};HH.prototype.update=function(){let o=this;o.viewer.scene.preUpdate.removeEventListener(o.eventListener),o.eventListener=o.viewer.scene.preUpdate.addEventListener(()=>{o.Cust.update()})};HH.prototype.removeFromMap=function(){let o=this;for(let A=0;A<o.stageArr.length;A++)o.removeStage(o.stageArr[A]);o.viewer.scene.preUpdate.removeEventListener(o.eventListener),o.eventListener=null};var Fct=HH;function yse(o,A={}){this._earthCtrl=o,this._edgeStage=null,this._options=A,this._options.visibleEdgeColor=Ae(A.visibleEdgeColor,At.fromCssColorString("#101010")),this._options.outlineWidth=Ae(A.outlineWidth,1),this._options.thresholdAngle=Ae(A.thresholdAngle,12*Math.PI/180),this.add()}yse.prototype.add=function(){this._edgeStage=CH();let o=this._edgeStage;o.visibleEdgeColor=this._options.visibleEdgeColor,o.outlineWidth=this._options.outlineWidth,o.thresholdAngle=this._options.thresholdAngle,o.selected=[{},{}],o.enabled=!0,this._earthCtrl.Viewer.postProcessStages.add(o)};yse.prototype.removeFromMap=function(){this._edgeStage&&(this._earthCtrl.Viewer.postProcessStages.remove(this._edgeStage),this.__edgeStage=null)};Object.defineProperties(yse.prototype,{show:{get:function(){return this._edgeStage.show},set:function(o){this._edgeStage.show=o}},outlineWidth:{get:function(){return this._edgeStage.outlineWidth},set:function(o){this._edgeStage.outlineWidth=o}},thresholdAngle:{get:function(){return this._edgeStage.thresholdAngle},set:function(o){!o||(this._edgeStage.thresholdAngle=o)}},visibleEdgeColor:{get:function(){return this._edgeStage.visibleEdgeColor},set:function(o){!o||(this._edgeStage.visibleEdgeColor=o)}},hiddenEdgeColor:{get:function(){return this._edgeStage.hiddenEdgeColor},set:function(o){!o||(this._edgeStage.hiddenEdgeColor=o)}},showGlow:{get:function(){return this._edgeStage.showGlow},set:function(o){this._edgeStage.showGlow=o}},edgeGlow:{get:function(){return this._edgeStage.edgeGlow},set:function(o){this._edgeStage.edgeGlow=o}},edgeStrength:{get:function(){return this._edgeStage.edgeGlow},set:function(o){this._edgeStage.edgeGlow=o}},edgeOnly:{get:function(){return this._edgeStage.edgeOnly},set:function(o){this._edgeStage.edgeOnly=o}}});var Nct=yse;function xse(o,A={}){this._earthCtrl=o,this._edgeStage=null,this._options=A,this._visibleEdgeColor=Ae(A.visibleEdgeColor,At.fromCssColorString("#ff0000")),this._hiddenEdgeColor=Ae(A.hiddenEdgeColor,At.fromCssColorString("#4d4d4d")),this.handler=null,this.key=Ae(A.key,"id"),this.model=Ae(A.model,null),this.add()}xse.prototype.add=function(){let o=this,A="";this._edgeStage=CH(!0);let f=this._edgeStage;f.visibleEdgeColor=this._visibleEdgeColor,f.hiddenEdgeColor=this._hiddenEdgeColor,f.selected=[],f.enabled=!1,this._earthCtrl.Viewer.postProcessStages.add(f);function m(C,y){function x(E,I){let w=E.featuresLength;for(let Q=0;Q<w;++Q){let M=E.getFeature(Q);if(M.getProperty(o.key)===A){let T={pickId:M.pickId};y.selected=[T],y.enabled=!0}}}function v(E,I){let w=E.content,Q=w.innerContents;if(O(Q)){let M=Q.length;for(let B=0;B<M;++B)x(Q[B],I)}else x(w,I)}C.tileVisible.addEventListener(function(E){A!==""&&v(E,null)})}m(this.model,f),this.handler=new Ur(this._earthCtrl.coreMap.scene.canvas),this.handler.setInputAction(function(C){let y=o._earthCtrl.coreMap.scene.pick(C.position);if(f.selected=[],A="",!y||!y.primitive)return;let v=y.primitive._pickIds,I={pickId:y.pickId};f.selected=[I],f.enabled=!0,A=y.getProperty(o.key)},Ki.LEFT_CLICK)};xse.prototype.removeFromMap=function(){this.handler&&(this.handler.destroy(),this.handler=void 0),this._edgeStage&&this._earthCtrl.Viewer.postProcessStages.remove(this._edgeStage)};Object.defineProperties(xse.prototype,{showGlow:{get:function(){return this._edgeStage.showGlow},set:function(o){this._edgeStage.showGlow=o}},edgeGlow:{get:function(){return this._edgeStage.edgeGlow},set:function(o){this._edgeStage.edgeGlow=o}},edgeStrength:{get:function(){return this._edgeStage.edgeGlow},set:function(o){this._edgeStage.edgeGlow=o}},edgeOnly:{get:function(){return this._edgeStage.edgeOnly},set:function(o){this._edgeStage.edgeOnly=o}}});var kct=xse;function zs(o){this._earthCtrl=o,this._coreMap=o.coreMap}function Ox(){return((1+je.nextRandomNumber())*65536|0).toString(16).substring(1)}zs.createUUID=function(){return`${Ox()+Ox()}-${Ox()}-${Ox()}-${Ox()}-${Ox()}${Ox()}${Ox()}`};zs.createUUIDWithoutDash=function(){return Ox()+Ox()+Ox()+Ox()+Ox()+Ox()+Ox()+Ox()};zs.prototype.createUUID=function(){return zs.createUUID()};zs.prototype.createGroup=function(o){let A=new LH;return A.id=o.id||zs.createUUID(),A.name=o.name||"\u672A\u547D\u540D\u7EC4",A};zs.prototype.createImageryLayer=function(o,A){let f=new CTe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.IMAGERYPROVIDERS),f),f};zs.prototype.createTerrainLayer=function(o,A){let f=new yTe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.TERRAINPROVIDERS),f),f};zs.prototype.removeTerrainLayer=function(o){this._coreMap.terrainProvider=new IP({})};zs.prototype.createFeatureLayer=function(o,A){let f=new vTe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.FEATURELAYERS),f),f};zs.prototype.createModelLayer=function(o,A){let f=new xTe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.MODELLAYERS),f),f};zs.prototype.createWfsModel=function(o,A){let f=new p6(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.MODELLAYERS),f),f};zs.prototype.createModel=function(o,A){let f=new sTe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.removeModel=function(o){O(o)&&o.removeFromMap()};zs.prototype.createCZMLObject=function(o,A){let f=this,m=Ae(o.addToMap,!0),C=new eW(o.name);return C.load(o.url),m&&f._earthCtrl.dataSources.add(C),C.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A?this._earthCtrl.userScene.addChild(A,C):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),C),C};zs.prototype.createElement=function(o){let A={};return A[o.type]=o.parameters,O(o.name)&&(A.name=o.name),O(o.position)&&(A.position=o.position),this._earthCtrl.entities.add(A)};zs.prototype.removeElement=function(o){O(o)?this._earthCtrl.entities.remove(o):this._earthCtrl.entities.removeAll()};zs.prototype.createVideoProjection=function(o,A){o.addToMap=Ae(o.addToMap,!0);let f=Ae(o.sourceType,"perspective"),m=null;return f==="perspective"?(m=new $2e(this._earthCtrl,o),m.initialize(o),m.name=o.name,A?this._earthCtrl.userScene.addChild(A,m):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),m)):f==="panorama"?(m=new gct(this._earthCtrl,o),m.initialize(o),m.name=o.name,m.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A?this._earthCtrl.userScene.addChild(A,m):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),m)):f==="fisheye"&&(m=new eTe(this._earthCtrl,o),m.initialize(o),m.name=o.name,m.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A?this._earthCtrl.userScene.addChild(A,m):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),m)),m};zs.prototype.createTrack=function(o,A){let f=new pct(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),f.initialize(o),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createSceneNode=function(o,A,f){let m=new LH(this._earthCtrl);return m.id=o,m.name=A,m.label=f,m};zs.prototype.createFire=function(o,A){let f=new tTe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createSmoke=function(o,A){let f=new iTe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createExplosion=function(o,A){let f=new rTe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createFireworks=function(o,A){let f=new nTe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createRadarScan=function(o,A){let f=new oTe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),f.show=!0,A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createCircleScan=function(o,A){let f=new Bct(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),f.show=!0,A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createUpDownScan=function(o){let A=new bct(this._earthCtrl,o);return A.show=!0,A};zs.prototype.createWaters=function(o,A){let f=new ITe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),f.show=!0,A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createHeatmap=function(o,A){let f=xct.create(this._earthCtrl,o.bbox,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createLabel=function(o,A){let f=new lTe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createBillboard=function(o,A){let f=new aTe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createPolyline=function(o,A){let f=new uTe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createPolygon=function(o,A){let f=new cTe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createPoint=function(o,A){let f=new ATe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createBox=function(o,A){let f=new hTe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createEllipsoid=function(o,A){let f=new fTe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createCylinder=function(o,A){let f=new dTe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createRectangle=function(o,A){let f=new gTe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createEllipse=function(o,A){let f=new pTe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createPolylineVolume=function(o,A){let f=new mTe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createEChartLayer=function(o,A){let f=new ETe(this._earthCtrl);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(o),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createPointLight=function(o){return new Sct(this._earthCtrl,o)};zs.prototype.createHawkeye=function(o){let A=new BTe(this._earthCtrl,o);A.name=o.name,A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&A.addToMap(o)};zs.prototype.createSpotLight=function(o){let A=new wTe(this._earthCtrl.coreMap,o.entities,o.lights);return A.name=o.name,A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A};zs.prototype.createCustomShaderManager=function(o){let A=new Lct;return A.name=Ae(o.name,null),A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A};zs.prototype.createCustomShaderStage=function(o){let A=new Fct(this._earthCtrl,o);return A.name=Ae(o.name,null),A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A};zs.prototype.createModelOutline=function(o={}){let A=new Nct(this._earthCtrl,o);return A.name=Ae(o.name,null),A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A};zs.prototype.modelClick=function(o={}){let A=new kct(this._earthCtrl,o);return A.name=Ae(o.name,null),A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A};var HP=zs;var vse=class extends Y0{constructor(A,f){super(A),this._objectMap={},this._rootNode=null,this._isBenchUpdate=!1,this._selectSet=new X2e(A);let m=new LH(A);m.id=HP.createUUID(),m.name=Ae(f.ProjectName,"root"),m.version=Ae(f.version,null),m.desc=Ae(f.desc,null),m.createTime=Ae(f.createTime,new Date().toISOString()),m.lastUpdate=Ae(f.lastUpdate,null),m.show=!0,this._rootNode=m,this._editNode=m,this._objectMap[m.id]=m,this._EventDocumentChanged=new UO("EventDocumentChanged")}finalize(){this._rootNode=null,this._objectMap={}}getChildById(A){return this._objectMap.hasOwnProperty(A)?this._objectMap[A]:null}addChild(A,f){A.addChild(f),this._objectMap[f.id]=f,this._isBenchUpdate||this.commitChanged()}removeChildById(A){let f=this._objectMap[A];O(f)&&this.removeChild(f)}removeChild(A){O(A)&&O(A.parentNode)&&(A.removeFromMap(),A.parentNode.removeChild(A)),delete this._objectMap[A.id],this._isBenchUpdate||this.commitChanged()}removeAll(){}beginUpdate(){this._isBenchUpdate=!0}endUpdate(){this._isBenchUpdate&&(this.commitChanged(),this._isBenchUpdate=!1)}commitChanged(){this._EventDocumentChanged.notifyEvent(this)}flyTo(A,f){O(A)&&O(A._primitive)&&(A=A._primitive),this._earthCtrl.coreMap.flyTo(A,f)}findLocationByID(A,f){if(!A)return;let m=this.getChildById(A);O(m)&&O(m._primitive)&&(m=m._primitive),this._earthCtrl.coreMap.flyTo(m,f)}moveLayer(A,f){let m=this.getChildById(A),C=null;for(let y=0;y<m.parentNode.childNodes.length;y++)m.parentNode.childNodes[y].id===m.id&&(C=y);f==="up"?(this._earthCtrl.coreMap.scene.imageryLayers.raise(m._primitive),this.changeLayer(m.parentNode.childNodes,C,C+1)):f==="down"&&(this._earthCtrl.coreMap.scene.imageryLayers.lower(m._primitive),this.changeLayer(m.parentNode.childNodes,C,C-1))}changeLayer(A,f,m){if(f=je.clamp(f,0,A.length-1),m=je.clamp(m,0,A.length-1),f===m)return;let C=A[f];A[f]=A[m],A[m]=C}outputJson(A){let f=this;new Promise(function(C,y){let x={IMAGERYPROVIDERS:"imageryProviders",TERRAINPROVIDERS:"terrainProviders",MODELLAYERS:"modelLayers",FEATURELAYERS:"featureLayers",USERSCENE:"userScene"},v=0,E=[];for(let I in x){let w=x[I],Q=f.rootNode.getChildByName(w);if(!Q)continue;let M=[];if(Q.childNodes.length===0)M=[];else for(let B=0;B<Q.childNodes.length;B++){let T=Q.childNodes[B].toJSON();M.push(T)}Promise.all(M).then(function(B){let T=[];if(B.length!==0){for(let L=0;L<B.length;L++)T.push(B[L]);let D=T[0].class;D!=="IMAGERY_LAYER"&&D!=="TERRAIN_LAYER"&&D!=="MODEL_LAYER"&&D!=="FEATURE_LAYER"&&(D="USER_SCENE");let F={item:D,objJson:T};E.push(F)}v++,v===5&&(C(E),v=0)})}}).then(function(C){let y={version:f.rootNode.version,projectName:f.rootNode.name,desc:f.rootNode.desc,createTime:f.rootNode.createTime,lastUpdate:new Date().toISOString(),imageryProviders:[],terrainProviders:[],modelLayers:[],featureLayers:[],userScene:[]};for(let w=0;w<C.length;w++)C[w].item==="IMAGERY_LAYER"&&(y.imageryProviders=C[w].objJson),C[w].item==="TERRAIN_LAYER"&&(y.terrainProviders=C[w].objJson),C[w].item==="MODEL_LAYER"&&(y.modelLayers=C[w].objJson),C[w].item==="FEATURE_LAYER"&&(y.featureLayers=C[w].objJson),C[w].item==="USER_SCENE"&&(y.userScene=C[w].objJson);let x={class:"ENVIRONMENT",underGround:Ae(f._earthCtrl.camera.undergroundMode,null),shadow:Ae(f._earthCtrl.shadows,null),depthTest:Ae(f._earthCtrl.coreMap.scene.globe.depthTestAgainstTerrain,null),rain:Ae(f._earthCtrl.environment.rain.show,null),snow:Ae(f._earthCtrl.environment.snow.show,null),fog:Ae(f._earthCtrl.environment.fog.show,null),bwMode:Ae(f._earthCtrl.environment.bwMode.show,null),nightMode:Ae(f._earthCtrl.environment.nightMode.show,null),colorAdjustment:{show:Ae(f._earthCtrl.environment.colorAdjustment.show,null),contrast:Ae(f._earthCtrl.environment.colorAdjustment.contrast,null),saturation:Ae(f._earthCtrl.environment.colorAdjustment.saturation,null),brightness:Ae(f._earthCtrl.environment.colorAdjustment.brightness,null)}},v={class:"SKYBOX",positiveX:Ae(f._earthCtrl.environment.SkyBoxSource.positiveX,null),negativeX:Ae(f._earthCtrl.environment.SkyBoxSource.negativeX,null),positiveY:Ae(f._earthCtrl.environment.SkyBoxSource.positiveY,null),negativeY:Ae(f._earthCtrl.environment.SkyBoxSource.negativeY,null),positiveZ:Ae(f._earthCtrl.environment.SkyBoxSource.positiveZ,null),negativeZ:Ae(f._earthCtrl.environment.SkyBoxSource.negativeZ,null)},E={class:"VIEWPOINT",lon:f._earthCtrl.camera.viewPoint.lon,lat:f._earthCtrl.camera.viewPoint.lat,alt:f._earthCtrl.camera.viewPoint.alt,heading:f._earthCtrl.camera.viewPoint.heading,pitch:f._earthCtrl.camera.viewPoint.pitch,roll:f._earthCtrl.camera.viewPoint.roll,duration:f._earthCtrl.camera.viewPoint.duration};y.userScene.push(x),y.userScene.push(v),y.userScene.push(E);let I=JSON.stringify(y);A&&A(I)})}};Object.defineProperties(vse.prototype,{rootNode:{get:function(){return this._rootNode},set:function(o){this._rootNode=o}},editNode:{get:function(){return this._editNode},set:function(o){this._editNode=o}},selectSet:{get:function(){return this._selectSet}},EventDocumentChanged:{get:function(){return this._EventDocumentChanged}},EventObjectPropertyChanged:{get:function(){return this._EventObjectPropertyChanged}}});var bTe=vse;function Oct(o){this._earthCtrl=o,this._coreMap=o.coreMap,this.initialize()}var UHi=new ss,GHi=new ee,HHi=new ee;Oct.prototype.initialize=function(){let o=document.createElement("div");o.className="map-info-bar",o.style="position: absolute;left: 0px;bottom:0px;width: 100%;background:rgba(0,0,0,0.4); color:#e9e9e9; text-shadow:2px 2px 2px #000";let A=this._coreMap;A.container.appendChild(o);let f="float: right; min-width: 100px;margin-right: 20px;",m=document.createElement("div");m.style=f,o.appendChild(m);let C=document.createElement("div");C.style=f,o.appendChild(C);let y=document.createElement("div");y.style=f,o.appendChild(y);let x=A.scene.canvas,v=A.scene.globe.ellipsoid;new Ur(x).setInputAction(function(I){let w=A.camera.pickEllipsoid(I.endPosition,v);if(w){let Q=A.scene.globe.ellipsoid.cartesianToCartographic(w),M=je.toDegrees(Q.latitude).toFixed(6),B=je.toDegrees(Q.longitude).toFixed(6),T=A.camera.positionCartographic.height.toFixed(1);y.innerHTML=`\u7ECF\u5EA6\uFF1A${B}`,C.innerHTML=`\u7EAC\u5EA6\uFF1A${M}`,m.innerHTML=`\u89C6\u70B9\u9AD8\uFF1A${T}\u7C73`}},Ki.MOUSE_MOVE)};var Uct=Oct;function cu(){}cu.parseBaseData=function(o,A){let f=[];if(O(A)&&O(A.imageryProviders))for(let C=0;C<A.imageryProviders.length;C++){let y=A.imageryProviders[C];if(y.enable===!1||y.show===!1)continue;if(O(y.tilingScheme)){let v=y.tilingScheme;v.type==="GeographicTilingScheme"&&(y.tilingScheme=new af(v))}let x=HP.createImageryLayer(y);f.push(x)}let m=[];if(O(A)&&O(A.terrainProviders))for(let C=0;C<A.terrainProviders.length;C++){let y=A.terrainProviders[C];if(y.enable===!1||y.show===!1)continue;let x=HP.createTerrainLayer(y);m.push(x)}return{imageryProvider:f,terrainProvider:m}};cu.parse=function(o,A){if(!O(A))return;let f=[rl.IMAGERYPROVIDERS,rl.TERRAINPROVIDERS,rl.MODELLAYERS,rl.FEATURELAYERS,rl.USERSCENE];for(let m=0;m<f.length;m++){let C=o.factory.createSceneNode(HP.createUUID(),f[m]);C.show=!0,o.userScene.addChild(o.userScene.rootNode,C)}O(A[rl.IMAGERYPROVIDERS])&&VH(o,A[rl.IMAGERYPROVIDERS],o.userScene.rootNode.getChildByIndex(0),0),O(A[rl.TERRAINPROVIDERS])&&VH(o,A[rl.TERRAINPROVIDERS],o.userScene.rootNode.getChildByIndex(1),1),O(A[rl.MODELLAYERS])&&VH(o,A[rl.MODELLAYERS],o.userScene.rootNode.getChildByIndex(2)),O(A[rl.FEATURELAYERS])&&VH(o,A[rl.FEATURELAYERS],o.userScene.rootNode.getChildByIndex(3)),O(A[rl.USERSCENE])&&VH(o,A[rl.USERSCENE],o.userScene.rootNode.getChildByIndex(4))};function VH(o,A,f,m){for(let C=0;C<A.length;C++){let y=A[C],x=null;if(y.enable===!1)continue;O(y.class)?(y.class==="IMAGERY"&&(y.class=Eo.IMAGERY_LAYER),y.class==="TERRAIN"&&(y.class=Eo.TERRAIN_LAYER),x=y.class):(m===0?y.class=Eo.IMAGERY_LAYER:m===1&&(y.class=Eo.TERRAIN_LAYER),x=y.class);let v=cu.parserMap[x];v!==void 0&&v(o,y,f)}}function yRi(o,A,f){let m=o.factory.createSceneNode(A.id,A.name);m.show=Ae(A.show,!0),o.userScene.addChild(f,m),O(A.childNodes)&&VH(o,A.childNodes,m)}function xRi(o,A,f){let m=A;if(O(m.tilingScheme)){let C=m.tilingScheme;C.type==="GeographicTilingScheme"&&(m.tilingScheme=new af(C))}o.factory.createImageryLayer(m,f)}function vRi(o,A,f){let m=A;o.factory.createTerrainLayer(m,f)}function ERi(o,A,f){let m=A;m.addToMap=!0;let C=m.sourceType;C==="3DTiles"||C==="b3dm"||C==="osgb"||C==="s3m"||C==="ude_block"||C==="ude_model"?o.factory.createModelLayer(m,f):C==="czml"?o.factory.createCZMLObject(m,f):C==="wfsModel"&&o.factory.createWfsModel(m,f)}function IRi(o,A,f){let m=o.factory.createFeatureLayer(A,f)}function _Ri(o,A,f){o.coreMap.scene.skyBox=new CN({sources:{positiveX:A.positiveX,negativeX:A.negativeX,positiveY:A.positiveY,negativeY:A.negativeY,positiveZ:A.positiveZ,negativeZ:A.negativeZ}})}function BRi(o,A,f){o.camera.undergroundMode=Ae(A.underGround,!1),o.shadows=Ae(A.shadow,!1),A.rain===!0&&o.environment.showEffect("rain"),A.snow===!0&&o.environment.showEffect("snow"),A.fog===!0&&o.environment.showEffect("fog"),o.coreMap.scene.globe.depthTestAgainstTerrain=Ae(A.depthTest,!1),A.bwMode===!0&&o.environment.showEffect("bwMode"),A.nightMode===!0&&o.environment.showEffect("nightMode"),A.colorAdjustment.show===!0&&(o.environment.showEffect("colorAdjustment"),o.environment.colorAdjustment.contrast=A.colorAdjustment.contrast,o.environment.colorAdjustment.saturation=A.colorAdjustment.saturation,o.environment.colorAdjustment.brightness=A.colorAdjustment.brightness)}function wRi(o,A,f){o.camera.viewPoint=A,o.camera.flyTo(A.lon,A.lat,A.alt,A.heading,A.pitch,A.roll,A.duration)}function bRi(o,A,f){o.factory.createModel(A,f)}function QRi(o,A,f){o.factory.createWaters(A,f)}function SRi(o,A,f){o.factory.createExplosion(A,f)}function DRi(o,A,f){o.factory.createFireworks(A,f)}function TRi(o,A,f){o.factory.createSmoke(A,f)}function MRi(o,A,f){o.factory.createFire(A,f)}function PRi(o,A,f){A.color&&(A.color=new At(A.color.red,A.color.green,A.color.blue,A.color.alpha)),o.factory.createRadarScan(A,f)}function RRi(o,A,f){A.color&&(A.color=new At(A.color.red,A.color.green,A.color.blue,A.color.alpha)),o.factory.createCircleScan(A,f)}function LRi(o,A,f){A.color&&(A.color=new At(A.color.red,A.color.green,A.color.blue,A.color.alpha)),A.outlineColor&&(A.outlineColor=new At(A.color.red,A.color.green,A.color.blue,A.color.alpha)),o.factory.createPoint(A,f)}function FRi(o,A,f){A.fillColor&&(A.fillColor=new At(A.fillColor.red,A.fillColor.green,A.fillColor.blue,A.fillColor.alpha)),o.factory.createLabel(A,f)}function NRi(o,A,f){o.factory.createBillboard(A,f)}function kRi(o,A,f){A.positions&&(A.positions=cu.array2DtoMercator(A.positions)),A.lineColor&&(A.lineColor=new At(A.lineColor.red,A.lineColor.green,A.lineColor.blue,A.lineColor.alpha)),A.outlineColor&&(A.outlineColor=new At(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),o.factory.createPolyline(A,f)}function ORi(o,A,f){A.material&&(A.material=new At(A.material.red,A.material.green,A.material.blue,A.material.alpha)),A.outlineColor&&(A.outlineColor=new At(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),A.positions&&(A.positions=cu.array2DtoMercator(A.positions)),o.factory.createPolygon(A,f)}function URi(o,A,f){A.coordinates&&(A.coordinates=Si.fromDegrees(A.coordinates[0],A.coordinates[1],A.coordinates[2],A.coordinates[3])),A.fillColor&&(A.fillColor=new At(A.fillColor.red,A.fillColor.green,A.fillColor.blue,A.fillColor.alpha)),A.outlineColor&&(A.outlineColor=new At(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),o.factory.createRectangle(A,f)}function GRi(o,A,f){o.factory.createEllipse(A,f)}function HRi(o,A,f){A.material&&(A.material=new At(A.material.red,A.material.green,A.material.blue,A.material.alpha)),A.outlineColor&&(A.outlineColor=new At(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),A.position&&(A.position=ee.fromDegrees(A.position[0],A.position[1],A.position[2])),A.dimensions&&(A.dimensions=new ee(A.dimensions.x,A.dimensions.y,A.dimensions.z)),o.factory.createBox(A,f)}function VRi(o,A,f){A.material&&(A.material=new At(A.material.red,A.material.green,A.material.blue,A.material.alpha)),A.outlineColor&&(A.outlineColor=new At(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),A.position&&(A.position=ee.fromDegrees(A.position[0],A.position[1],A.position[2])),A.radii&&(A.radii=new ee(A.radii[0],A.radii[1],A.radii[2])),o.factory.createEllipsoid(A,f)}function zRi(o,A,f){A.material&&(A.material=new At(A.material.red,A.material.green,A.material.blue,A.material.alpha)),A.outlineColor&&(A.outlineColor=new At(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),A.position&&(A.position=ee.fromDegrees(A.position[0],A.position[1],A.position[2])),o.factory.createCylinder(A,f)}function KRi(o,A,f){o.factory.createPolylineVolume(A,f)}function YRi(o,A,f){o.factory.createVideoProjection(A,f)}function JRi(o,A,f){o.factory.createVideoProjection(A,f)}function WRi(o,A,f){o.factory.createTrack(A,f)}function jRi(o,A,f){o.factory.createHeatmap(A,f)}function qRi(o,A,f){o.factory.createEChartLayer(A,f)}function XRi(o,A,f){let m=o.factory.createElement(A);o.userScene.addChild(f,m)}cu.array2DtoMercator=function(o){let A=[];return o.forEach(function(f){let m=ee.fromDegrees(f[0],f[1],f[2]);A.push(m)}),A};cu.parserMap={};cu.parserMap[Eo.NODE]=yRi;cu.parserMap[Eo.IMAGERY_LAYER]=xRi;cu.parserMap[Eo.TERRAIN_LAYER]=vRi;cu.parserMap[Eo.MODEL_LAYER]=ERi;cu.parserMap[Eo.FEATURE_LAYER]=IRi;cu.parserMap[Eo.SKYBOX]=_Ri;cu.parserMap[Eo.ENVIRONMENT]=BRi;cu.parserMap[Eo.VIEWPOINT]=wRi;cu.parserMap[Eo.MODEL]=bRi;cu.parserMap[Eo.WATERS]=QRi;cu.parserMap[Eo.EXPLOSION]=SRi;cu.parserMap[Eo.FIREWORK]=DRi;cu.parserMap[Eo.SMOKE]=TRi;cu.parserMap[Eo.FIRE]=MRi;cu.parserMap[Eo.RADARSCAN]=PRi;cu.parserMap[Eo.CIRCLESCAN]=RRi;cu.parserMap[Eo.POINT]=LRi;cu.parserMap[Eo.LABEL]=FRi;cu.parserMap[Eo.BILLBOARD]=NRi;cu.parserMap[Eo.POLYLINE]=kRi;cu.parserMap[Eo.POLYGON]=ORi;cu.parserMap[Eo.RECTANGLE]=URi;cu.parserMap[Eo.ELLIPSE]=GRi;cu.parserMap[Eo.BOX]=HRi;cu.parserMap[Eo.ELLIPSOID]=VRi;cu.parserMap[Eo.CYLINDER]=zRi;cu.parserMap[Eo.POLYLINEVOLUME]=KRi;cu.parserMap[Eo.PERSPECTIVE_VIDEO_PROJECTION]=YRi;cu.parserMap[Eo.FISHEYE_VIDEO_PROJECTION]=JRi;cu.parserMap[Eo.TRACK]=WRi;cu.parserMap[Eo.HEATMAP]=jRi;cu.parserMap[Eo.ECHARTLAYER]=qRi;cu.parserMap.ELEMENT=XRi;var Gct=cu;var QTe=class extends es{constructor(A,f,m,C){super(A,m,C),this.editBillboard=void 0,this.pickedEntity=void 0,this.isEditing=!1,this.editBillboard=f,O(this.editBillboard)&&O(this.editBillboard.entity.billboard)?console.info(this.editBillboard.entity):(this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Billboard entity is need!"}))}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editBillboard.entity.id&&(this.isEditing=!0,this.currentPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editBillboard.entity)||this.pickObject(A,this.editBillboard.entity))&&this.mCallback&&this.mCallback(this.editBillboard),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m,this.editBillboard.entity.position=m}return this.mCallback&&this.mCallback(this.editBillboard),!0}updateBillboard(A){if(O(A)&&O(this.editBillboard)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editBillboard.entity.position=A[C]:O(A[C])&&(this.editBillboard.entity.billboard[C]=A[C])}}}endEditEntity(){}},Hct=QTe;var STe=class extends es{constructor(A,f,m,C){super(A,m,C),this.editPoint=void 0,this.pickedEntity=void 0,this.isEditing=!1,this.editPoint=f,O(this.editPoint)&&O(this.editPoint.entity.point)?console.info(this.editPoint.entity.point):(this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Point entity is need!"}))}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editPoint.entity.id&&(this.isEditing=!0,this.currentPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editPoint.entity)||this.pickObject(A,this.editPoint.entity))&&this.mCallback&&this.mCallback(this.editPoint),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m,this.editPoint.entity.position=m}return this.mCallback&&this.mCallback(this.editPoint),!0}updatePoint(A){if(O(A)&&O(this.editPoint)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editPoint.entity.position=A[C]:O(A[C])&&(this.editPoint.entity.point[C]=A[C])}}}endEditEntity(){}},Vct=STe;var DTe=class extends es{constructor(A,f,m,C){if(super(A,m,C),this.editBox=void 0,this.pickedEntity=void 0,this.editHeightPoint=void 0,this.editWHPoint=void 0,this.pickEditHeightPoint=void 0,this.pickEditWHPoint=void 0,this.isEditing=!1,this.pointsId=[],this.height=0,this.dragPosition=void 0,this.editBox=f,O(this.editBox)&&O(this.editBox.entity.box)){let y=this.editBox.entity.position._value,x=Kt.fromCartesian(y);this.height=x.height;let v=new ee,E=new ee;this.getNorthPointByDistance(v,E),this.editHeightPoint=this.mEarthCtrl.entities.add({name:"box_edit_height_point",position:v,point:{heightReference:this.editBox.entity.box.heightReference,color:At.WHITE,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}}),this.pointsId.push(this.editHeightPoint.id),this.editWHPoint=this.mEarthCtrl.entities.add({name:"box_edit_long_width_point",position:E,point:{heightReference:this.editBox.entity.box.heightReference,color:At.RED,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}}),this.pointsId.push(this.editWHPoint.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Box entity is need!"})}addHeight(A){let f=this.editBox.entity.position._value,m=Kt.fromCartesian(f);return this.height=m.height+A,ee.fromRadians(m.longitude,m.latitude,this.height)}getNorthPointByDistance(A,f,m){let C;console.info(this.editBox.entity.position),O(m)?C=this.editBox.entity.position.getValue(m):C=this.editBox.entity.position._value;let y=zn.eastNorthUpToFixedFrame(C),x=new ee,v=this.editBox.entity.box.dimensions._value;v||(v=this.editBox.entity.box.dimensions.getValue(m)),ee.divideByScalar(v,2,x),ee.clone(x,A),ee.clone(x,f),A.y*=-1,Xe.multiplyByPoint(y,A,A),f.y*=-1,f.z*=-1,Xe.multiplyByPoint(y,f,f)}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editBox.entity.id?(this.isEditing=!0,this.currentPoint=f,this.pickEditHeightPoint=void 0,this.pickEditWHPoint=void 0):f.name==="box_edit_height_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickEditHeightPoint=f,this.pickEditWHPoint=void 0):f.name==="box_edit_long_width_point"&&(this.isEditing=!0,this.currentPoint=void 0,this.pickEditHeightPoint=void 0,this.pickEditWHPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editBox)||this.pickObject(A,this.editBox.entity))&&this.mCallback&&this.mCallback(this.editBox),this.currentPoint=void 0,this.isEditing=!1,this.dragPosition=void 0,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;let f=new Date,m=fi.fromDate(f);if(O(this.currentPoint)||O(this.pickEditHeightPoint)||O(this.pickEditWHPoint)){let C=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,y=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,C);if(!y)return;let x=Kt.fromCartesian(y),v=ee.fromRadians(x.longitude,x.latitude,x.height+this.height);if(O(this.currentPoint))this.currentPoint.position=v,this.editBox.entity.position=new Bn(function(){return v},!1);else if(O(this.dragPosition)){if(O(this.pickEditWHPoint)){let w=ee.subtract(y,this.dragPosition,new ee),Q=ee.normalize(w,new ee);ee.dot(w,Q,w);let M=this.editBox.entity.box.dimensions._value;M||(M=this.editBox.entity.box.dimensions.getValue(m));let B=ee.clone(M);B.x-=w.x,B.y+=w.y,ee.abs(B,B),this.editBox.entity.box.dimensions=new Bn(function(){return B},!1)}else if(O(this.pickEditHeightPoint)){let w=ee.subtract(y,this.dragPosition,new ee),Q=this.editBox.entity.box.dimensions._value;Q||(Q=this.editBox.entity.box.dimensions.getValue(m));let M=ee.clone(Q);M.z+=w.z,ee.abs(M,M),this.editBox.entity.box.dimensions=M,this.editBox.entity.position=this.addHeight(w.z/2)}}this.dragPosition=y;let E=new ee,I=new ee;this.getNorthPointByDistance(E,I,m),this.editHeightPoint.position=E,this.editWHPoint.position=I}return this.mCallback&&this.mCallback(this.editBox),!0}updateBox(A){if(O(A)&&O(this.editBox)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editBox.entity.position=A[C]:O(A[C])&&(this.editBox.entity.box[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},zct=DTe;var TTe=class extends es{constructor(A,f,m,C){if(super(A,m,C),this.editCylinder=void 0,this.pickedEntity=void 0,this.isEditing=!1,this.pointsId=[],this.height=0,this.topRadiusPoint=void 0,this.pickTopRadiusPoint=void 0,this.bottomRadiusPoint=void 0,this.pickBottomRadiusPoint=void 0,this.heightPoint=void 0,this.pickHeightPoint=void 0,this.dragPosition=void 0,this.editCylinder=f,O(this.editCylinder)&&O(this.editCylinder.entity.cylinder)){let y=this.editCylinder.entity.position._value,x=Kt.fromCartesian(y);this.height=x.height;let v=this.editCylinder.entity.cylinder.topRadius._value,E=this.editCylinder.entity.cylinder.bottomRadius._value,I=new ee,w=new ee,Q=new ee;this.getNorthPointByDistance(I,w,Q),this.heightPoint=this.mEarthCtrl.entities.add({name:"cylinder_edit_height_point",position:Q,point:{heightReference:this.editCylinder.entity.cylinder.heightReference,color:At.WHITE,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}}),this.pointsId.push(this.heightPoint.id),v>0&&(this.topRadiusPoint=this.mEarthCtrl.entities.add({name:"cylinder_edit_top_radius_point",position:I,point:{heightReference:this.editCylinder.entity.cylinder.heightReference,color:At.RED,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}}),this.pointsId.push(this.topRadiusPoint.id)),E>0&&(this.bottomRadiusPoint=this.mEarthCtrl.entities.add({name:"cylinder_edit_bottom_radius_point",position:w,point:{heightReference:this.editCylinder.entity.cylinder.heightReference,color:At.RED,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}}),this.pointsId.push(this.bottomRadiusPoint.id))}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Cylinder entity is need!"})}addHeight(A){let f=this.editCylinder.entity.position._value,m=Kt.fromCartesian(f);return this.height=m.height+A,ee.fromRadians(m.longitude,m.latitude,this.height)}getNorthPointByDistance(A,f,m){let C=this.editCylinder.entity.position._value,y=zn.eastNorthUpToFixedFrame(C),x=this.editCylinder.entity.cylinder.length._value,v=this.editCylinder.entity.cylinder.topRadius._value,E=this.editCylinder.entity.cylinder.bottomRadius._value;v>0&&(A.z+=x/2,A.x+=v,Xe.multiplyByPoint(y,A,A)),E>0&&(f.x+=E,f.z-=x/2,Xe.multiplyByPoint(y,f,f)),m.z+=x/2,Xe.multiplyByPoint(y,m,m)}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editCylinder.entity.id?(this.isEditing=!0,this.currentPoint=f,this.pickHeightPoint=void 0,this.pickTopRadiusPoint=void 0,this.pickBottomRadiusPoint=void 0):f.name==="cylinder_edit_height_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickHeightPoint=f,this.pickTopRadiusPoint=void 0,this.pickBottomRadiusPoint=void 0):f.name==="cylinder_edit_top_radius_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickHeightPoint=void 0,this.pickTopRadiusPoint=f,this.pickBottomRadiusPoint=void 0):f.name==="cylinder_edit_bottom_radius_point"&&(this.isEditing=!0,this.currentPoint=void 0,this.pickHeightPoint=void 0,this.pickTopRadiusPoint=void 0,this.pickBottomRadiusPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editCylinder)||this.pickObject(A,this.editCylinder.entity))&&this.mCallback&&this.mCallback(this.editCylinder),this.currentPoint=void 0,this.dragPosition=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)||O(this.heightPoint)||O(this.topRadiusPoint)||O(this.bottomRadiusPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;let C=Kt.fromCartesian(m),y=ee.fromRadians(C.longitude,C.latitude,C.height+this.height);if(O(this.currentPoint))this.currentPoint.position=y,this.editCylinder.entity.position=y;else if(O(this.dragPosition)){if(O(this.pickHeightPoint)){let Q=ee.subtract(m,this.dragPosition,new ee),M=this.editCylinder.entity.cylinder.length._value;M+=Q.z,M=Math.abs(M),this.editCylinder.entity.position=this.addHeight(Q.z/2),this.editCylinder.entity.cylinder.length=M}else if(O(this.pickTopRadiusPoint)){let Q=ee.subtract(m,this.dragPosition,new ee),M=this.editCylinder.entity.cylinder.topRadius._value;M-=Q.x,M=Math.abs(M),this.editCylinder.entity.cylinder.topRadius=M}else if(O(this.pickBottomRadiusPoint)){let Q=ee.subtract(m,this.dragPosition,new ee),M=this.editCylinder.entity.cylinder.bottomRadius._value;M-=Q.x,M=Math.abs(M),this.editCylinder.entity.cylinder.bottomRadius=M}}this.dragPosition=m;let x=this.editCylinder.entity.cylinder.topRadius._value,v=this.editCylinder.entity.cylinder.bottomRadius._value,E=new ee,I=new ee,w=new ee;this.getNorthPointByDistance(E,I,w),x>0&&(this.topRadiusPoint.position=E),v>0&&(this.bottomRadiusPoint.position=I),this.heightPoint.position=w}return this.mCallback&&this.mCallback(this.editCylinder),!0}updateCylinder(A){if(O(A)&&O(this.editCylinder)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editCylinder.entity.position=A[C]:O(A[C])&&(this.editCylinder.entity.cylinder[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},Kct=TTe;var MTe=class extends es{constructor(A,f,m,C){if(super(A,m,C),this.editEllipse=void 0,this.pickedEntity=void 0,this.semiMajorAxisPoint=void 0,this.semiMinorAxisPoint=void 0,this.pickSemiMajorAxisPoint=void 0,this.pickSemiMinorAxisPoint=void 0,this.pointsId=[],this.isEditing=!1,this.circle=!1,this.editEllipse=f,O(this.editEllipse)&&O(this.editEllipse.entity.ellipse)){let y=je.PI_OVER_TWO,x=this.updatePoint(y);this.semiMajorAxisPoint=this.mEarthCtrl.entities.add({name:"semi_major_axis_point",position:x,point:{heightReference:this.editEllipse.entity.ellipse.heightReference,color:At.WHITE,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}}),this.pointsId.push(this.semiMajorAxisPoint.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Ellipse entity is need!"})}updatePoint(A){let f=new ee,m=new ee,C=new ee,y=this.editEllipse.entity.ellipse;this.semiMinorAxis=y.semiMinorAxis._value,this.semiMajorAxis=y.semiMajorAxis._value,this.circle=this.semiMajorAxis===this.semiMinorAxis;let x=Ae(y.rotation,0);this.center=this.editEllipse.entity.position._value;let v=this.semiMinorAxis*this.semiMinorAxis,E=this.semiMajorAxis*this.semiMajorAxis,I=this.semiMajorAxis*this.semiMinorAxis,w=ee.magnitude(this.center),Q=ee.normalize(this.center,f),M=ee.cross(ee.UNIT_Z,this.center,m);M=ee.normalize(M,M);let B=ee.cross(Q,M,C),T=new ee;return iB.pointOnEllipsoid(A,x,B,M,v,I,E,w,Q,T)}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editEllipse.entity.id?(this.isEditing=!0,this.currentPoint=f,this.pickSemiMajorAxisPoint=void 0,this.pickSemiMinorAxisPoint=void 0):f.name==="semi_minor_axis_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickSemiMajorAxisPoint=void 0,this.pickSemiMinorAxisPoint=f):f.name==="semi_major_axis_point"&&(this.isEditing=!0,this.currentPoint=void 0,this.pickSemiMajorAxisPoint=f,this.pickSemiMinorAxisPoint=void 0),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editEllipse)||this.pickObject(A,this.editEllipse.entity))&&this.mCallback&&this.mCallback(this.editEllipse),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)||O(this.pickSemiMajorAxisPoint)||O(this.pickSemiMinorAxisPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;if(O(this.currentPoint))this.currentPoint.position=m,this.editEllipse.entity.position=m;else if(O(this.pickSemiMajorAxisPoint)){let C=ee.distance(this.center,m);this.editEllipse.entity.ellipse.semiMajorAxis=C;let y=C*this.semiMinorAxis/this.semiMajorAxis;y>C&&(y=C),this.editEllipse.entity.ellipse.semiMinorAxis=y}else if(O(this.pickSemiMinorAxisPoint)){let C=ee.distance(this.center,m);this.editEllipse.entity.ellipse.semiMinorAxis=C}this.semiMajorAxisPoint.position=this.updatePoint(je.PI_OVER_TWO)}return this.mCallback&&this.mCallback(this.editEllipse),!0}updateEllipse(A){if(O(A)&&O(this.editEllipse)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editEllipse.entity.position=A[C]:O(A[C])&&(this.editEllipse.entity.ellipse[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},Yct=MTe;var PTe=class extends es{constructor(A,f,m,C){if(super(A,m,C),this.editEllipsoid=void 0,this.pickedEntity=void 0,this.height=0,this.isEditing=!1,this.pointsId=[],this.radiiXPoint=void 0,this.pickRadiiXPoint=void 0,this.radiiYPoint=void 0,this.pickRadiiYPoint=void 0,this.radiiZPoint=void 0,this.pickRadiiZPoint=void 0,this.dragPosition=void 0,this.editEllipsoid=f,O(this.editEllipsoid)&&O(this.editEllipsoid.entity.ellipsoid)){console.info(this.editEllipsoid.ellipsoid);let y=this.editEllipsoid.entity.position._value,x=Kt.fromCartesian(y);this.height=x.height;let v=new ee,E=new ee,I=new ee;this.getNorthPointByDistance(v,E,I),this.radiiXPoint=this.mEarthCtrl.entities.add({name:"ellipse_edit_x_point",position:v,point:{heightReference:this.editEllipsoid.entity.ellipsoid.heightReference,color:At.WHITE,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}}),this.pointsId.push(this.radiiXPoint.id),this.radiiYPoint=this.mEarthCtrl.entities.add({name:"ellipse_edit_y_point",position:E,point:{heightReference:this.editEllipsoid.entity.ellipsoid.heightReference,color:At.WHITE,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}}),this.pointsId.push(this.radiiYPoint.id),this.radiiZPoint=this.mEarthCtrl.entities.add({name:"ellipse_edit_z_point",position:I,point:{heightReference:this.editEllipsoid.entity.ellipsoid.heightReference,color:At.WHITE,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}}),this.pointsId.push(this.radiiZPoint.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Ellipsoid entity is need!"})}addHeight(A){let f=this.editEllipsoid.entity.position._value,m=Kt.fromCartesian(f);return this.height=m.height+A,ee.fromRadians(m.longitude,m.latitude,this.height)}getNorthPointByDistance(A,f,m){let C=this.editEllipsoid.entity.position._value,y=zn.eastNorthUpToFixedFrame(C),x=this.editEllipsoid.entity.ellipsoid.radii._value;A.x=x.x,Xe.multiplyByPoint(y,A,A),f.y=-x.y,Xe.multiplyByPoint(y,f,f),m.z=x.z,Xe.multiplyByPoint(y,m,m)}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editEllipsoid.entity.id?(this.isEditing=!0,this.currentPoint=f,this.pickRadiiXPoint=void 0,this.pickRadiiYPoint=void 0,this.pickRadiiZPoint=void 0):f.name==="ellipse_edit_x_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickRadiiXPoint=f,this.pickRadiiYPoint=void 0,this.pickRadiiZPoint=void 0):f.name==="ellipse_edit_y_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickRadiiXPoint=void 0,this.pickRadiiYPoint=f,this.pickRadiiZPoint=void 0):f.name==="ellipse_edit_z_point"&&(this.isEditing=!0,this.currentPoint=void 0,this.pickRadiiXPoint=void 0,this.pickRadiiYPoint=void 0,this.pickRadiiZPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editEllipsoid)||this.pickObject(A,this.editEllipsoid.entity))&&this.mCallback&&this.mCallback(this.editEllipsoid),this.currentPoint=void 0,this.dragPosition=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)||O(this.pickRadiiXPoint)||O(this.pickRadiiYPoint)||O(this.pickRadiiZPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;let C=Kt.fromCartesian(m),y=ee.fromRadians(C.longitude,C.latitude,C.height+this.height);if(O(this.currentPoint))this.currentPoint.position=y,this.editEllipsoid.entity.position=y;else{if(O(this.dragPosition)){let I=ee.subtract(m,this.dragPosition,new ee),w=ee.normalize(I,new ee);ee.dot(I,w,I);let Q=this.editEllipsoid.entity.ellipsoid.radii._value,M=ee.clone(Q);O(this.pickRadiiXPoint)?M.x-=I.x:O(this.pickRadiiYPoint)?M.y+=I.y:O(this.pickRadiiZPoint)&&(M.z+=I.z,this.editEllipsoid.entity.position=this.addHeight(I.z)),ee.abs(M,M),this.editEllipsoid.entity.ellipsoid.radii=M}this.dragPosition=m}let x=new ee,v=new ee,E=new ee;this.getNorthPointByDistance(x,v,E),this.radiiXPoint.position=x,this.radiiYPoint.position=v,this.radiiZPoint.position=E}return this.mCallback&&this.mCallback(this.editEllipsoid),!0}updateEllipsoid(A){if(O(A)&&O(this.editEllipsoid)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editEllipsoid.entity.position=A[C]:O(A[C])&&(this.editEllipsoid.entity.ellipsoid[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},Jct=PTe;var RTe=class extends es{constructor(A,f,m,C){if(super(A,m,C),this.editPolygon=void 0,this.pickedEntity=void 0,this.currentPoint=void 0,this.pointsId=[],this.isEditing=!1,this.editPolygon=f,O(this.editPolygon)&&O(this.editPolygon.entity.polygon))for(let y=0;y<this.editPolygon.entity.polygon.hierarchy._value.positions.length;y++){let x=this.editPolygon.entity.polygon.hierarchy._value.positions[y],v=this.mEarthCtrl.entities.add({name:"polygon_point",position:x,point:{color:At.WHITE,pixelSize:8,outlineColor:At.BLACK,outlineWidth:1}});this.pointsId.push(v.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Polygon entity is need!"})}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editPolygon.entity.id?(this.isEditing=!0,this.currentPoint=void 0):f.name==="polygon_point"&&(this.currentPoint=f,this.isEditing=!0),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editPolygon)||this.pickObject(A,this.editPolygon.entity))&&this.mCallback&&this.mCallback(this.editPolygon),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m;let C=[];for(let y=0;y<this.pointsId.length;y++){let x=this.pointsId[y];C.push(this.mEarthCtrl.entities.getById(x).position._value)}this.editPolygon.entity.polygon.hierarchy=C}return this.mCallback&&this.mCallback(this.editPolygon),!0}updatePolygon(A){if(O(A)&&O(this.editPolygon)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];O(A[C])&&(this.editPolygon.entity.polygon[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},Wct=RTe;var LTe=class extends es{constructor(A,f,m,C){super(A,m,C),this.editModel=void 0,this.pickedEntity=void 0,this.editColor=At.RED.withAlpha(.8),this.isEditing=!1,this.editModel=f,this.oldColor=this.editModel.entity.color,this.editModel.entity.color=this.editColor,O(this.editModel)&&O(this.editModel.entity)?console.info(this.editModel.entity):(this.mEnable=!1,this.mCallback&&this.mCallback({msg:"gltf Model is need!"}))}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f===this.editModel.parameter.id&&(this.isEditing=!0,this.currentPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editModel)||this.pickObject(A,this.editModel.entity))&&this.mCallback&&this.mCallback(this.editModel),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;let C=Kt.fromCartesian(m),y=Kt.clone(C);y.longitude=je.toDegrees(y.longitude),y.latitude=je.toDegrees(y.latitude),this.editModel.lon=y.longitude,this.editModel.lat=y.latitude}return this.mCallback&&this.mCallback(this.editModel),!0}updateModel(A){if(O(A)&&O(this.editModel)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];if(O(A[C]))switch(C){case"lon":case"lat":case"alt":case"heading":case"pitch":case"roll":this.editModel[C]=A[C];break;default:this.editModel.entity[C]=A[C];break}}}}endEditEntity(){this.editModel.entity.color=this.oldColor}},jct=LTe;var FTe=class extends es{constructor(A,f,m,C){super(A,m,C),this.editLabel=void 0,this.pickedEntity=void 0,this.isEditing=!1,this.editLabel=f,O(this.editLabel)&&O(this.editLabel.entity.label)?console.info(this.editLabel.entity):(this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Label entity is need!"}))}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editLabel.entity.id&&(this.isEditing=!0,this.currentPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editLabel.entity)||this.pickObject(A,this.editLabel.entity))&&this.mCallback&&this.mCallback(this.editLabel),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m,this.editLabel.entity.position=m}return this.mCallback&&this.mCallback(this.editLabel),!0}updateLabel(A){if(O(A)&&O(this.editLabel)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editLabel.entity.position=A[C]:O(A[C])&&(this.editLabel.entity.label[C]=A[C])}}}endEditEntity(){}},qct=FTe;var NTe=class extends es{constructor(A,f,m,C){if(super(A,m,C),this.editPolyline=void 0,this.pickedEntity=void 0,this.currentPoint=void 0,this.pointsId=[],this.isEditing=!1,this.editPolyline=f,O(this.editPolyline)&&O(this.editPolyline.polyline))for(let y=0;y<this.editPolyline.polyline.positions._value.length;y++){let x=this.editPolyline.polyline.positions._value[y],v=this.mEarthCtrl.entities.add({name:"polyline_point",position:x,point:{color:At.WHITE,pixelSize:8,outlineColor:At.BLACK,outlineWidth:1}});this.pointsId.push(v.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Polyline entity is need!"})}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editPolyline.id?(this.isEditing=!0,this.currentPoint=void 0):f.name==="polyline_point"&&(this.currentPoint=f,this.isEditing=!0),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editPolyline)||this.pickObject(A,this.editPolyline.entity))&&this.mCallback&&this.mCallback(this.editPolyline),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m;let C=[];for(let y=0;y<this.pointsId.length;y++){let x=this.pointsId[y];C.push(this.mEarthCtrl.entities.getById(x).position._value)}this.editPolyline.polyline.positions=C}return this.mCallback&&this.mCallback(this.editPolyline),!0}updatePolyline(A){if(O(A)&&O(this.editPolyline)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];O(A[C])&&(this.editPolyline.polyline[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},Xct=NTe;var kTe=class extends es{constructor(A,f,m,C){if(super(A,m,C),this.editPolylineVolume=void 0,this.pickedEntity=void 0,this.currentPoint=void 0,this.pointsId=[],this.isEditing=!1,this.editPolylineVolume=f,O(this.editPolylineVolume)&&O(this.editPolylineVolume.entity.polylineVolume))for(let y=0;y<this.editPolylineVolume.entity.polylineVolume.positions._value.length;y++){let x=this.editPolylineVolume.entity.polylineVolume.positions._value[y],v=this.mEarthCtrl.entities.add({name:"edit_polylineVolume_point",position:x,point:{color:At.WHITE,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}});this.pointsId.push(v.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"PolylineVolume entity is need!"})}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editPolylineVolume.entity.id?(this.isEditing=!0,this.currentPoint=void 0):f.name==="edit_polylineVolume_point"&&(this.isEditing=!0,this.currentPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editPolylineVolume)||this.pickObject(A,this.editPolylineVolume.entity))&&this.mCallback&&this.mCallback(this.editPolylineVolume),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m;let C=[];for(let y=0;y<this.pointsId.length;y++){let x=this.pointsId[y];C.push(this.mEarthCtrl.entities.getById(x).position._value)}this.editPolylineVolume.entity.polylineVolume.positions=C}return this.mCallback&&this.mCallback(this.editPolylineVolume),!0}updatePolylineVolume(A){if(O(A)&&O(this.editPolylineVolume)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editPolylineVolume.entity.position=A[C]:O(A[C])&&(this.editPolylineVolume.entity.polylineVolume[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},Zct=kTe;var OTe=class extends es{constructor(A,f,m,C){if(super(A,m,C),this.editRectangle=void 0,this.pickedEntity=void 0,this.leftTopPoint=void 0,this.rightBottomPoint=void 0,this.pointsId=[],this.isEditing=!1,this.editRectangle=f,O(this.editRectangle)&&O(this.editRectangle.entity.rectangle)){let y=this.editRectangle.entity.rectangle.coordinates._value,x=this.editRectangle.entity.rectangle.height._value,v=Si.northwest(y),E=ee.fromRadians(v.longitude,v.latitude,x),I=this.mEarthCtrl.entities.add({name:"rect_left_top_point",position:E,point:{heightReference:this.editRectangle.entity.rectangle.heightReference,color:At.WHITE,pixelSize:8,outlineColor:At.BLACK,outlineWidth:1}});this.pointsId.push(I.id),v=Si.southeast(y);let w=ee.fromRadians(v.longitude,v.latitude,x),Q=this.mEarthCtrl.entities.add({name:"rect_right_bottom_point",position:w,point:{heightReference:this.editRectangle.entity.rectangle.heightReference,color:At.WHITE,pixelSize:8,outlineColor:At.BLACK,outlineWidth:1}});this.pointsId.push(Q.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Rectangle entity is need!"})}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editRectangle.entity.id?(this.isEditing=!0,this.leftTopPoint=void 0,this.rightBottomPoint=void 0):f.name==="rect_left_top_point"?(this.leftTopPoint=f,this.rightBottomPoint=void 0,this.isEditing=!0):f.name==="rect_right_bottom_point"&&(this.rightBottomPoint=f,this.leftTopPoint=void 0,this.isEditing=!0),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editRectangle)||this.pickObject(A,this.editRectangle.entity))&&this.mCallback&&this.mCallback(this.editRectangle),this.leftTopPoint=void 0,this.rightBottomPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.leftTopPoint)||O(this.rightBottomPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;let C=Kt.fromCartesian(m),y=this.editRectangle.entity.rectangle.coordinates._value;O(this.leftTopPoint)?(this.leftTopPoint.position=m,y.west=C.longitude,y.north=C.latitude):O(this.rightBottomPoint)&&(this.rightBottomPoint.position=m,y.south=C.latitude,y.east=C.longitude),this.editRectangle.entity.rectangle.coordinates=y}return this.mCallback&&this.mCallback(this.editRectangle),!0}updateRectangle(A){if(O(A)&&O(this.editRectangle)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editRectangle.entity.position=A[C]:O(A[C])&&(this.editRectangle.entity.rectangle[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},$ct=OTe;function Md(o){this._earthCtrl=o,this._coreMap=o.coreMap}Md.prototype.editPoint=function(o,A){this._earthCtrl.tools.clearTool();let f=new Vct(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("point_edit_tool",f),f};Md.prototype.updatePoint=function(o,A){o.updatePoint(A)};Md.prototype.editPolyline=function(o,A){this._earthCtrl.tools.clearTool();let f=new Xct(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("polyline_edit_tool",f),f};Md.prototype.updatePolyline=function(o,A){o.updatePolyline(A)};Md.prototype.editPolygon=function(o,A){this._earthCtrl.tools.clearTool();let f=new Wct(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("polygon_edit_tool",f),f};Md.prototype.updatePolygon=function(o,A){o.updatePolygon(A)};Md.prototype.editBox=function(o,A){this._earthCtrl.tools.clearTool();let f=new zct(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("box_edit_tool",f),f};Md.prototype.updateBox=function(o,A){o.updateBox(A)};Md.prototype.editEllipsoid=function(o,A){this._earthCtrl.tools.clearTool();let f=new Jct(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("ellipsoid_edit_tool",f),f};Md.prototype.updateEllipsoid=function(o,A){o.updateEllipsoid(A)};Md.prototype.editCylinder=function(o,A){this._earthCtrl.tools.clearTool();let f=new Kct(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("cylinder_edit_tool",f),f};Md.prototype.updateCylinder=function(o,A){o.updateCylinder(A)};Md.prototype.editModel=function(o,A){this._earthCtrl.tools.clearTool();let f=new jct(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("model_edit_tool",f),f};Md.prototype.updateModel=function(o,A){o.updateModel(A)};Md.prototype.editBillboard=function(o,A){this._earthCtrl.tools.clearTool();let f=new Hct(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("billboard_edit_tool",f),f};Md.prototype.updateBillboard=function(o,A){o.updateBillboard(A)};Md.prototype.editLabel=function(o,A){this._earthCtrl.tools.clearTool();let f=new qct(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("label_edit_tool",f),f};Md.prototype.updateLabel=function(o,A){o.updateLabel(A)};Md.prototype.editRectangle=function(o,A){this._earthCtrl.tools.clearTool();let f=new $ct(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("rectangle_edit_tool",f),f};Md.prototype.updateRectangle=function(o,A){o.updateRectangle(A)};Md.prototype.editEllipse=function(o,A){this._earthCtrl.tools.clearTool();let f=new Yct(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("ellipse_edit_tool",f),f};Md.prototype.updateEllipse=function(o,A){o.updateEllipse(A)};Md.prototype.editPolylineVolume=function(o,A){this._earthCtrl.tools.clearTool();let f=new Zct(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("polylinevolume_edit_tool",f),f};Md.prototype.updatePolylineVolume=function(o,A){o.updatePolylineVolume(A)};Md.prototype.endEditEntity=function(o){this._earthCtrl.tools.clearTool(),o.endEditEntity(),this._earthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!0,this._earthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!0};var UTe=Md;function yy(o){this.mEarthCtrl=o,this.scene=this.mEarthCtrl.coreMap.scene,this.entities=this.mEarthCtrl.entities,this.camera=this.mEarthCtrl.coreMap.camera,this._points=[],this.item=void 0}yy.prototype.horizontalDistance=function(o,A){let f=this,m=!1,C=[],y="",x=[],v,E=this.scene.globe.ellipsoid,I={spot:[],distance:[],label:[],polyline:[]},w={point:At.RED,polyline:At.fromRgba(4286644096)};O(A)&&(O(A.point)&&(w.point=A.point),O(A.polyline)&&(w.polyline=A.polyline));let Q=new iI;this.scene.primitives.add(Q);let M=new NA,B=new Ur(f.scene.canvas),T=document.createElement("div");nA(".map-widget",T),nA(".map-widget",'<div id="toolTip" style="display: none;position: absolute;visibility: visible;max-width: 200px;min-width: 100px;padding: 1px 1px 1px 25px;font-size: 11px;z-index: 1000;opacity: 0.8;background-color: rgba(0,0,0,0.7);border-radius: 3px;"></div>');let F=document.getElementById("toolTip");F.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u5DE6\u952E\u5F00\u59CB,\u53F3\u952E\u7ED3\u675F\uFF01</span>';let L;m=!0;let R=function(V){let H=0,q=`${0}\u7C73`,ie,Z,oe,ne,se,ce;for(let j=0;j<V.length-1;j+=1)ie=E.cartesianToCartographic(V[j]),Z=M.project(ie),oe=Z.x,ne=Z.y,ie=E.cartesianToCartographic(V[j+1]),Z=M.project(ie),se=Z.x,ce=Z.y,H=H+Math.sqrt((oe-se)*(oe-se)+(ne-ce)*(ne-ce));return H>0&&(q=`${H.toFixed(2)}\u7C73`),H/1e3>=1&&(q=`${(H/1e3).toFixed(2)}\u5343\u7C73`),q},k=function(){function V(H){if(!O(H))throw new Ui("positions is required!");if(H.length<2)throw new Ui("positions \u7684\u957F\u5EA6\u5FC5\u987B\u5927\u4E8E\u7B49\u4E8E2");let q=as.fromType(as.ColorType);q.uniforms.color=new At(1,1,0,.5),this.options={name:"\u76F4\u7EBF",polyline:{show:!0,positions:[],material:w.polyline,width:3,clampToGround:!0}},this.path=H,this._init()}return V.prototype._init=function(){let H=this,q=function(){return H.path};this.options.polyline.positions=new Bn(q,!1),this.lineEntity=f.entities.add(this.options),f.item=this.lineEntity,I.polyline.push(this.lineEntity)},V}();B.setInputAction(function(V){let H,q;F.style.left=`${V.endPosition.x+10}px`,F.style.top=`${V.endPosition.y+20}px`,F.style.display="block",F.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u5DE6\u952E\u5F00\u59CB,\u53F3\u952E\u7ED3\u675F\uFF01</span>';let ie=!1,Z=f.camera.getPickRay(V.endPosition);Z&&(H=f.scene.globe.pick(Z,f.scene));let oe=f.scene.pick(V.endPosition);if(oe){console.log("feature",oe);let ne=f.scene.pickPosition(V.endPosition);ne&&(H=ne),ie=!0}if(!!H&&(q=Ti.WGS84.cartesianToCartographic(H),q)){let ne;ie?ne=f.scene.sampleHeight(q):ne=f.scene.globe.getHeight(q);let se=ee.fromDegrees(q.longitude/Math.PI*180,q.latitude/Math.PI*180,ne);if(m){if(C.length<1)return;O(v)?(v.path.pop(),v.path.push(se)):(C.push(se),v=new k(C));let ce=R(v.path);f.entities.remove(L),L=f.entities.add({name:"\u7A7A\u95F4\u76F4\u7EBF\u8DDD\u79BB",position:v.path[v.path.length-1],label:{text:`\u603B\u957F\uFF1A${ce}`,show:!0,font:"26px \u6977\u4F53",fillColor:At.WHITE,style:pA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:wn.BOTTOM,pixelOffset:new Bt(20,-20),disableDepthTestDistance:Number.POSITIVE_INFINITY}})}}},Ki.MOUSE_MOVE);let U=function(V){x.push(V);let H=[];if(x.length>1){let q=x[x.length-2],ie=x[x.length-1],Z=Math.abs(q.longitude-ie.longitude)*1e7,oe=Math.abs(q.latitude-ie.latitude)*1e7;Z>oe&&(oe=Z);let ne=parseInt(oe/10);ne>1e3&&(ne=1e3),ne<2&&(ne=2);for(let se=0;se<ne;++se)H.push(new Kt(je.lerp(q.longitude,ie.longitude,se/(ne-1)),je.lerp(q.latitude,ie.latitude,se/(ne-1))));H.push(ie.clone())}else H=x;if(H.length>0)for(let q=0;q<H.length;q++){V=H[q];let ie=f.scene.globe.getHeight(V),Z=ee.fromDegrees(V.longitude/Math.PI*180,V.latitude/Math.PI*180,ie);C.push(Z)}};return B.setInputAction(function(V){let H,q,ie=!1,Z=f.camera.getPickRay(V.position);if(Z&&(H=f.scene.globe.pick(Z,f.scene)),f.scene.pick(V.position)){let ne=f.scene.pickPosition(V.position);ne&&(H=ne),ie=!0}if(H&&(q=Ti.WGS84.cartesianToCartographic(H)),q){let ne;ie?ne=f.scene.sampleHeight(q):ne=f.scene.globe.getHeight(q);let se=ee.fromDegrees(q.longitude/Math.PI*180,q.latitude/Math.PI*180,ne);if(m){v&&v.path.pop(),U(q);let ce="0\u7C73";v&&(ce=R(v.path)),y=ce,I.spot.push(se),I.distance.push(ce);let j=f.entities.add({position:se,point:{pixelSize:5,color:w.point,outlineColor:At.WHITE,outlineWidth:1,clampToGround:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY},label:{text:ce,show:!0,font:"26px \u6977\u4F53",fillColor:At.WHITE,style:pA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:wn.BOTTOM,pixelOffset:new Bt(20,-20),clampToGround:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY}});I.label.push(j),f._points.push(j)}}},Ki.LEFT_CLICK),B.setInputAction(function(){f.entities.remove(L),f._points[f._points.length-1].label.text=y,B.destroy(),C.pop(),O(o)&&typeof o=="function"&&o(I),F.style.display="none"},Ki.RIGHT_CLICK),this};yy.prototype.spaceDistance=function(o,A){let f=this;f.scene.globe.depthTestAgainstTerrain=!0;let m=new Ur(f.scene.canvas),C=[],y=null,x="0\u7C73",v=null,E,I="",w,Q=document.createElement("div");nA(".map-widget",Q),nA(".map-widget",'<div id="toolTip" style="display: none;position: absolute;visibility: visible;max-width: 200px;min-width: 100px;padding: 1px 1px 1px 25px;font-size: 11px;z-index: 1000;opacity: 0.8;background-color: rgba(0,0,0,0.7);border-radius: 3px;"></div>');let B=document.getElementById("toolTip");B.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u5DE6\u952E\u5F00\u59CB,\u53F3\u952E\u7ED3\u675F\uFF01</span>';let T={name:"",spot:[],distance:[],label:[],ployline:[]},D={point:At.RED,polyline:At.fromRgba(4286644096)};O(A)&&(O(A.point)&&(D.point=A.point),O(A.polyline)&&(D.polyline=A.polyline));let F=function(){function L(R){this.options={name:"\u76F4\u7EBF",polyline:{show:!0,positions:[],material:D.polyline,width:3,clampToGround:!1}},this.positions=R,this._init()}return L.prototype._init=function(){let R=this,k=function(){return R.positions};this.options.polyline.positions=new Bn(k,!1);let U=f.entities.add(this.options);f.item=U,T.ployline.push(U);let V=f.getuid();T.name=`\u65B0\u5EFA\u7A7A\u95F4\u8DDD\u79BB${V}`},L}();return m.setInputAction(function(L){if(f.scene.bim){let R=f.scene.bim.PickWorldPositionSync(L.endPosition.x,L.endPosition.y);R[0]===0?v=f.scene.pickPosition(L.endPosition):v=new ee(R[0],R[1],R[2]),console.log("????????",v)}else v=f.scene.pickPosition(L.endPosition);!v||(B.style.left=`${L.endPosition.x+10}px`,B.style.top=`${L.endPosition.y+20}px`,B.style.display="block",C.length>=2&&(O(y)?(C.pop(),C.push(v)):y=new F(C),B.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u53F3\u952E\u7ED3\u675F\uFF01</span>',x=f.getSpaceDistance(C)),f.entities.remove(w),w=f.entities.add({name:"\u7A7A\u95F4\u76F4\u7EBF\u8DDD\u79BB",position:C[C.length-1],label:{text:`\u603B\u957F\uFF1A${x}`,show:!0,font:"26px \u6977\u4F53",fillColor:At.WHITE,style:pA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:wn.BOTTOM,pixelOffset:new Bt(20,-20),disableDepthTestDistance:Number.POSITIVE_INFINITY}}))},Ki.MOUSE_MOVE),m.setInputAction(function(L){if(f.scene.bim){let k=f.scene.bim.PickWorldPositionSync(L.position.x,L.position.y);k[0]===0?v=f.scene.pickPosition(L.position):v=new ee(k[0],k[1],k[2]),console.log("????????",v)}else v=f.scene.pickPosition(L.position);if(!v)return;C.length===0&&C.push(v.clone()),C.push(v);let R=x;I=`\u603B\u957F\uFF1A${x}`,E=f.entities.add({name:"\u7A7A\u95F4\u76F4\u7EBF\u8DDD\u79BB",position:C[C.length-1],point:{pixelSize:5,color:D.point,outlineColor:At.WHITE,outlineWidth:2,clampToGround:!1,disableDepthTestDistance:Number.POSITIVE_INFINITY},label:{text:R,show:!0,font:"26px \u6977\u4F53",fillColor:At.WHITE,style:pA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:wn.BOTTOM,pixelOffset:new Bt(20,-20),heightReference:xn.NONE,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),f._points.push(E),T.spot.push(v),T.distance.push(x),T.label.push(E)},Ki.LEFT_CLICK),m.setInputAction(function(L){B.style.display="none",f.entities.remove(w),f._points.length>0&&(f._points[f._points.length-1].label.text=I),m.destroy(),C.pop(),O(o)&&typeof o=="function"&&o(T)},Ki.RIGHT_CLICK),this};yy.prototype.getSpaceDistance=function(o){let A=0,f="";for(let m=0;m<o.length-1;m++){let C=Kt.fromCartesian(o[m]),y=Kt.fromCartesian(o[m+1]),x=new l0;x.setEndPoints(C,y);let v=x.surfaceDistance;v=Math.sqrt(Math.pow(v,2)+Math.pow(y.height-C.height,2)),A=A+v}return A>=1e3?f=`${(A/1e3).toFixed(2)}\u5343\u7C73`:f=`${A.toFixed(2)}\u7C73`,f};yy.prototype.getPlaneArea=function(o,A){let f=this;f.scene.globe.depthTestAgainstTerrain=!0;let m=0,C=new Ur(f.scene._imageryLayerCollection),y=document.getElementById("toolTip");y||(nA(".map-widget",'<div id="toolTip" style="display: none;position: absolute;visibility: visible;max-width: 200px;min-width: 100px;padding: 1px 1px 1px 25px;font-size: 11px;z-index: 1000;opacity: 0.8;background-color: rgba(0,0,0,0.7);border-radius: 3px;"></div>'),y=document.getElementById("toolTip")),y.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u5DE6\u952E\u5F00\u59CB\uFF0C\u53F3\u952E\u7ED3\u675F\uFF01</span>';let x=[],v={},E=[],I=[],w=null,Q=null,M,B={point:At.RED,polyline:At.fromRgba(4286644096),polygon:At.fromRgba(4286644096).withAlpha(.5)};O(A)&&(O(A.point)&&(B.point=A.point),O(A.polyline)&&(B.polyline=A.polyline),O(A.polygon)&&(B.polygon=A.polygon));let T={mj:0,label:[],polygon:[]};y.style.display="block";let D=function(){function F(L){this.options={name:"\u591A\u8FB9\u5F62",polygon:{hierarchy:[],perPositionHeight:!0,material:B.polygon,clampToGround:!1}},this.hierarchy=L,this._init()}return F.prototype._init=function(){let L=this,R=function(){return L.hierarchy};this.options.polygon.hierarchy=new Bn(R,!1),this.polygon=f.entities.add(this.options),f.item=this.polygon,f._entity=this.polygon,T.polygon=this.polygon},F}();return C.setInputAction(function(F){if(y.style.left=`${F.endPosition.x+10}px`,y.style.top=`${F.endPosition.y+20}px`,f.scene.bim){let V=f.scene.bim.PickWorldPositionSync(F.endPosition.x,F.endPosition.y);V[0]===0?Q=f.scene.pickPosition(F.endPosition):Q=new ee(V[0],V[1],V[2])}else Q=f.scene.pickPosition(F.endPosition);if(!Q)return;let L=Kt.fromCartesian(Q),R=je.toDegrees(L.longitude),k=je.toDegrees(L.latitude),U=L.height;if(x.length>=2){O(w)?(x.pop(),x.push(Q),v=new Un(x),I.pop(),I.push({lon:R,lat:k,hei:U})):(v=new Un(x),w=new D(v));let V=f.getArea(I,x);f.entities.remove(M),M=f.entities.add({name:"\u591A\u8FB9\u5F62\u9762\u79EF",position:x[x.length-1],label:{text:V,font:"26px \u6977\u4F53",show:!0,fillColor:At.WHITE,style:pA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:wn.BOTTOM,pixelOffset:new Bt(20,-40),heightReference:xn.CLAMP_TO_GROUND,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),T.label=M}},Ki.MOUSE_MOVE),C.setInputAction(function(F){if(f.scene.bim){let V=f.scene.bim.PickWorldPositionSync(F.position.x,F.position.y);V[0]===0?Q=f.scene.pickPosition(F.position):Q=new ee(V[0],V[1],V[2])}else Q=f.scene.pickPosition(F.position);if(!Q)return;let L=Kt.fromCartesian(Q);console.log("\u5DE6\u952E\u70B9",L);let R=je.toDegrees(L.longitude),k=je.toDegrees(L.latitude),U=L.height;x.length===0&&(x.push(Q.clone()),v=new Un(x),I.push({lon:R,lat:k,hei:U}),x.push(Q.clone()),v=new Un(x),I.push({lon:R,lat:k,hei:U})),x.push(Q),v=new Un(x),E.push({lon:R,lat:k,hei:U}),I.push({lon:R,lat:k,hei:U})},Ki.LEFT_CLICK),C.setInputAction(function(F){y.style.display="none",f.entities.remove(M),C.destroy();let L=f.getArea(I,x);m=L;let R=f.entities.add({name:"\u591A\u8FB9\u5F62\u9762\u79EF",position:x[x.length-1],label:{text:L,font:"26px \u6977\u4F53",show:!0,fillColor:At.WHITE,style:pA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:wn.BOTTOM,pixelOffset:new Bt(20,-40),heightReference:xn.CLAMP_TO_GROUND,disableDepthTestDistance:Number.POSITIVE_INFINITY}});f._points.push(R),f._lable=R,T.mj=m,T.label=R,O(o)&&typeof o=="function"&&o(T)},Ki.RIGHT_CLICK),this};yy.prototype.getSurfaceArea3d=function(o,A){let f=this;f.scene.globe.depthTestAgainstTerrain=!0;let m={mj:0,label:[],polygon:[]},C=!0,y=[],x={},v,E=f.scene,I=E.globe.ellipsoid,w=new iI;E.primitives.add(w);let Q,M,B=0,T={point:At.RED,polyline:At.fromRgba(4286644096),polygon:At.fromRgba(4286644096).withAlpha(.5)};O(A)&&(O(A.point)&&(T.point=A.point),O(A.polyline)&&(T.polyline=A.polyline),O(A.polygon)&&(T.polygon=A.polygon));let D=document.createElement("div");nA(".map-widget",D),nA(".map-widget",'<div id="toolTip" style="display: none;position: absolute;visibility: visible;max-width: 200px;min-width: 100px;padding: 1px 1px 1px 25px;font-size: 11px;z-index: 1000;opacity: 0.8;background-color: rgba(0,0,0,0.7);border-radius: 3px;"></div>');let L=document.getElementById("toolTip");L.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u5DE6\u952E\u5F00\u59CB,\u53F3\u952E\u7ED3\u675F\uFF01</span>';let R=new Ur(E.canvas),k=function(){function V(H){if(!O(H))throw new Ui("positions is required!");if(H.length<3)throw new Ui("positions \u7684\u957F\u5EA6\u5FC5\u987B\u5927\u4E8E\u7B49\u4E8E3");this.options={polygon:{show:!0,hierarchy:void 0,material:T.polygon,clampToGround:!1}},this.path=H,this._init()}return V.prototype._init=function(){let H=this,q=function(){return H.path};this.options.polygon.hierarchy=new Bn(q,!1),this.polygonEntity=f.entities.add(this.options),f.item=this.polygonEntity,m.polygon=this.polygonEntity,f._entity=this.polygonEntity},V}();R.setInputAction(function(V){let H=0;f.entities.remove(M);let q,ie,Z=f.scene.camera.getPickRay(V.endPosition);Z&&(q=f.scene.globe.pick(Z,f.scene));let oe=f.scene.pick(V.endPosition),ne=!1;if(oe){let ce=f.scene.pickPosition(V.endPosition);ce&&(q=ce),ne=!0}if(!q)return;let se=function(ce){let j=new Array(ce.length),de=function(Be){return Be.longitude=Be.longitude/Math.PI*180,Be.latitude=Be.latitude/Math.PI*180,Be},me=function(Be){let Qe=0;for(let Ie=0;Ie<Be.length;Ie++){let ve=Be[Ie],K;Ie<Be.length-1?K=Be[Ie+1]:K=Be[0],Qe+=ve.x*K.y-K.x*ve.y}return Qe/2};for(let Be=0;Be<ce.length;Be++)j[Be]=de(I.cartesianToCartographic(ce[Be]));let _e=0;for(let Be=0;Be<j.length;Be++)_e+=j[Be].longitude;_e=_e/j.length;for(let Be=0;Be<j.length;Be++)j[Be]=f.Gauss_to_XY(j[Be].longitude,j[Be].latitude,_e);return Math.abs(me(j))};if(ie=Ti.WGS84.cartesianToCartographic(q),ie&&C){if(L.style.left=`${V.endPosition.x+10}px`,L.style.top=`${V.endPosition.y+20}px`,L.style.display="block",y.length<2){B===1&&(M=f.entities.add({name:"\u591A\u8FB9\u5F62\u9762\u79EF",position:q,label:{text:`${H}\u5E73\u65B9\u5343\u7C73`,font:"26px \u6977\u4F53",show:!0,fillColor:At.WHITE,style:pA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:wn.BOTTOM,pixelOffset:new Bt(20,-40),heightReference:xn.CLAMP_TO_GROUND,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),f._points.push(M),m.label=M);return}if(O(v)?(v.path.positions.pop(),v.path.positions.push(q)):(y.push(q),x=new Un(y),v=new k(x)),y.length>=2){L.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u53F3\u952E\u7ED3\u675F\uFF01</span>';let ce=String(se(v.path.positions));ce=ce.substr(0,ce.indexOf(".",0)),ce.length<6?H=`${ce}\u5E73\u65B9\u7C73`:(ce=String(ce/1e6),ce=ce.substr(0,ce.indexOf(".",0)+3),H=`${ce}\u5E73\u65B9\u5343\u7C73`),m.mj=H,M=f.entities.add({name:"\u591A\u8FB9\u5F62\u9762\u79EF",position:q,label:{text:H,font:"26px \u6977\u4F53",show:!0,fillColor:At.WHITE,style:pA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:wn.BOTTOM,pixelOffset:new Bt(20,-40),heightReference:xn.CLAMP_TO_GROUND,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),f._points.push(M),m.label=M}}},Ki.MOUSE_MOVE),R.setInputAction(function(V){let H;B=1;let q=f.scene.camera.getPickRay(V.position);q&&(H=f.scene.globe.pick(q,f.scene));let ie=f.scene.pick(V.position),Z=!1;if(ie){let oe=f.scene.pickPosition(V.position);oe&&(H=oe),Z=!0}H&&C&&(y.push(H),x=new Un(y))},Ki.LEFT_CLICK),R.setInputAction(function(){R.removeInputAction(Ki.LEFT_CLICK),R.removeInputAction(Ki.LEFT_DOUBLE_CLICK),f.trackedEntity=void 0,C=!1,Q=w.add({show:!0,id:"measureTool",position:y[y.length-1],pixelOffset:new Bt(0,20),eyeOffset:new ee(0,0,0),horizontalOrigin:tA.CENTER,verticalOrigin:wn.CENTER,scale:1,color:new At(1,1,1,1)}),L.style.display="none",R.destroy(),O(o)&&typeof o=="function"&&o(m)},Ki.RIGHT_CLICK);let U=function(V){let H=0,q=0,ie=0;for(let oe=0;oe<V.length;oe++)H+=V[oe].x,q+=V[oe].y,ie+=V[oe].z;return new ee(H/V.length,q/V.length,ie/V.length)};return this};yy.prototype.to_N=function(o){let f=63567523142e-4,m=Math.sqrt(6378137*6378137-f*f)/6378137;return 6378137/Math.sqrt(1-m*m*Math.sin(o)*Math.sin(o))};yy.prototype.to_Sm=function(o){let f=63567523142e-4,m=Math.sqrt(6378137*6378137-f*f)/6378137,C,y,x,v,E;return C=1+m*m*3/4+Math.pow(m,4)*45/64+Math.pow(m,6)*175/256+Math.pow(m,8)*11025/16384,y=Math.pow(m,2)*3/4+Math.pow(m,4)*15/16+Math.pow(m,6)*525/512+Math.pow(m,8)*2205/2048,x=Math.pow(m,4)*15/64+Math.pow(m,6)*105/256+Math.pow(m,8)*2205/4096,v=Math.pow(m,6)*35/512+Math.pow(m,8)*315/2048,E=Math.pow(m,8)*315/16384,6378137*(1-m*m)*(C*o-y/2*Math.sin(2*o)+x/4*Math.sin(4*o)-v/6*Math.sin(6*o)+E/8*Math.sin(8*o))};yy.prototype.to_Radian=function(o){return o*Math.PI/180};yy.prototype.Gauss_to_XY=function(o,A,f){let C=63567523142e-4,y=Math.sqrt(6378137*6378137-C*C)/C,x=0,v=0,E=0,I=0,w=this.to_Radian(f);A=this.to_Radian(A),o=this.to_Radian(o);let Q=o-w,M=Math.cos(A);I=this.to_N(A),E=I*Math.cos(A),x=Math.tan(A),v=y*M;let B=Math.pow(x,2),T=Math.pow(x,4),D=Math.pow(v,2),F=Math.pow(v,4),L=Math.pow(M,3),R=Math.pow(M,5),k=this.to_Sm(A)+Math.pow(Q,2)/2*E*M*x+Math.pow(Q,4)/24*x*E*L*(5-B+9*D+4*F)+Math.pow(Q,6)/720*x*E*R*(61-58*x*x+T+270*D-330*x*x*D),U=Q*I*M+Math.pow(Q,3)/6*I*L*(1-x*x+v*v)+Math.pow(Q,5)/120*I*R*(5-18*x*x+T+14*D-58*D*B);return new Bt(U,k)};yy.prototype.getArea=function(o,A){let f=0;for(let m=0;m<o.length-2;m++){let C=(m+1)%o.length,y=(m+2)%o.length,x=this.Angle(o[m],o[C],o[y]),v=this.getdistance(A[m],A[C]),E=this.getdistance(A[C],A[y]);f+=v*E*Math.abs(Math.sin(x))}return f<1e6?f=`${f.toFixed(4)}\u5E73\u65B9\u7C73`:f=`${(f/1e6).toFixed(4)}\u5E73\u65B9\u5343\u7C73`,f};yy.prototype.getdistance=function(o,A){let f=Kt.fromCartesian(o),m=Kt.fromCartesian(A),C=new l0;C.setEndPoints(f,m);let y=C.surfaceDistance;return y=Math.sqrt(Math.pow(y,2)+Math.pow(m.height-f.height,2)),y};yy.prototype.Bearing=function(o,A){let f=Math.PI/180,m=180/Math.PI,C=o.lat*f,y=o.lon*f,x=A.lat*f,v=A.lon*f,E=-Math.atan2(Math.sin(y-v)*Math.cos(x),Math.cos(C)*Math.sin(x)-Math.sin(C)*Math.cos(x)*Math.cos(y-v));return E<0&&(E+=Math.PI*2),E=E*m,E};yy.prototype.Angle=function(o,A,f){let m=this.Bearing(A,o),C=this.Bearing(A,f),y=m-C;return y<0&&(y+=360),y};yy.prototype.getuid=function(){return this.uuid(8,16)};yy.prototype.uuid=function(o,A){let f="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),m=[],C;if(A=A||f.length,o)for(C=0;C<o;C++)m[C]=f[0|je.nextRandomNumber()*A];else{let y;for(m[8]=m[13]=m[18]=m[23]="-",m[14]="4",C=0;C<36;C++)m[C]||(y=0|je.nextRandomNumber()*16,m[C]=f[C===19?y&3|8:y])}return m.join("")};yy.prototype.deleteObject=function(){if(this.entities.remove(this.item),this._points.length>0){for(let o=0;o<this._points.length;o++)this.entities.remove(this._points[o]);this._points=[]}try{this.scene.primitives.remove(this.item)}catch(o){console.log(o)}this.item=void 0};var FW=yy;function gw(o,A){this._earthCtrl=o,this._coreMap=this._earthCtrl.coreMap,this._show=Ae(A.show,!0),this._lon=Ae(A.lon,121),this._lat=Ae(A.lat,31),this._height=Ae(A.height,10),this._heading=Ae(A.heading,0),this._pitch=Ae(A.pitch,0),this._distance=Ae(A.distance,300),this._position=ee.fromDegrees(A.lon,A.lat,A.height),this._horizontalViewAngle=Ae(A.horizontalViewAngle,90),this._verticalViewAngle=Ae(A.verticalViewAngle,60),this._horizontalViewAngle=this.adjustViewRange(this._horizontalViewAngle),this._verticalViewAngle=this.adjustViewRange(this._verticalViewAngle),this._visibleAreaColor=Ae(A.visibleAreaColor,At.GREEN.withAlpha(.4)),this._invisibleAreaColor=Ae(A.invisibleAreaColor,At.RED.withAlpha(.4)),this._size=Ae(A.size,10240),this._softShadows=Ae(A.softShadows,!0),this._colorStyle=Ae(A.colorStyle,At.YELLOW),this._parameter=A,this._lineArray=[],this._visualCone=!0,this.pyramid=void 0,this.updateViewShed()}Object.defineProperties(gw.prototype,{show:{get:function(){return this._show},set:function(o){o!==this._show&&(this._show=o,this.updateViewShed())}},distance:{get:function(){return this._distance}},heading:{get:function(){return this._heading}},pitch:{get:function(){return this._pitch}},horizontalViewAngle:{get:function(){return this._horizontalViewAngle}},verticalViewAngle:{get:function(){return this._verticalViewAngle}},colorStyle:{get:function(){return this._colorStyle},set:function(o){this._colorStyle=o}},invisibleAreaColor:{get:function(){return this._invisibleAreaColor},set:function(o){this._invisibleAreaColor=o}},visibleAreaColor:{get:function(){return this._visibleAreaColor},set:function(o){this._visibleAreaColor=o}},visualCone:{get:function(){return this._visualCone},set:function(o){this._visualCone=o,this.visualConeShow(o)}}});gw.prototype.adjustViewRange=function(o){return o<=0?o=1:o>=180&&(o=179),o};gw.prototype.removeFromMap=function(){let o=this;O(o.viewShedMap)&&(o.viewShedMap.enabled=!1),O(o.pyramid)&&(o._earthCtrl.entities.removeById(o.pyramid.id),o.pyramid=null);for(let A=0;A<o._lineArray.length;A++){let f=o._lineArray[A];o._earthCtrl.entities.remove(f)}o._lineArray=[]};gw.prototype.visualConeShow=function(o){let A=this;O(A.pyramid)&&(A.pyramid.show=o);for(let f=0;f<A._lineArray.length;f++){let m=A._lineArray[f];m.show=o}};gw.prototype.addVisualPyramid=function(){let o=this,A=new l6({radii:new Bn(function(){return new ee(o._distance,o._distance,o._distance)},!1),minimumClock:new Bn(function(){return je.toRadians(90-o._heading-o._horizontalViewAngle/2)},!1),maximumClock:new Bn(function(){return je.toRadians(90-o._heading+o._horizontalViewAngle/2)},!1),minimumCone:new Bn(function(){return je.toRadians(90-o._verticalViewAngle/2)},!1),maximumCone:new Bn(function(){return je.toRadians(90+o._verticalViewAngle/2)},!1),fill:!1,outline:!0,subdivisions:128,slicePartitions:32,stackPartitions:16,outlineColor:new Bn(function(){return o._colorStyle},!1)}),f=new kA({position:new Bn(function(){return o._position},!1),ellipsoid:A});this.pyramid=o._earthCtrl.entities.add(f)};gw.prototype.createLightCamera=function(){O(this.viewShedMap)?this._lightCamera=this.viewShedMap._lightCamera:this._lightCamera=new Ml(this._coreMap.scene),this._lightCamera.position=this._position};gw.prototype.updateParameters=function(o){let A=this,f=A._lightCamera;if(!!O(o)&&(O(o.lon)||O(o.lat)||O(o.height)||O(o.heading)||O(o.pitch)||O(o.roll)||O(o.far)||O(o.distance)||O(o.verticalViewAngle)||O(o.horizontalViewAngle))){let m=this._parameter;for(let v in o)o.hasOwnProperty(v)&&O(m[v])&&(m[v]=o[v]);m.distance>=A.viewShedMap.maximumDistance&&(m.distance=A.viewShedMap.maximumDistance),A._heading=m.heading,A._pitch=m.pitch,A._distance=m.distance,A.viewShedMap._pointLightRadius=m.distance,m.verticalViewAngle=A.adjustViewRange(m.verticalViewAngle),A._verticalViewAngle=m.verticalViewAngle,m.horizontalViewAngle=A.adjustViewRange(m.horizontalViewAngle),A._horizontalViewAngle=m.horizontalViewAngle,A._position=ee.fromDegrees(m.lon,m.lat,m.height);let C=je.toRadians(m.heading);f.setView({destination:A._position,orientation:{heading:C,pitch:0,roll:0}}),f.frustum.far=m.far||1e5;let y=je.toRadians(A._horizontalViewAngle),x=je.toRadians(A._verticalViewAngle);f.frustum.aspectRatio=Math.tan(y/2)/Math.tan(x/2),y>x?f.frustum.fov=y:f.frustum.fov=x}};gw.prototype.createShadowMap=function(){if(O(this.viewShedMap)){this.viewShedMap.enabled=!0;return}this.viewShedMap=new nH({context:this._coreMap.scene.context,lightCamera:this._lightCamera,enabled:!0,isPointLight:!0,pointLightRadius:this._distance,cascadesEnabled:!1,size:this._size,softShadows:!0,normalOffset:!1,fromLightSource:!1,visibleAreaColor:this._visibleAreaColor,invisibleAreaColor:this._invisibleAreaColor}),this._earthCtrl.viewShedMapList.push(this.viewShedMap)};var Ux=new ee;gw.prototype.drawViewCentrum=function(){let o=this;function A(){let I=o.pyramid._ellipsoid._minimumClock.getValue(),w=o.pyramid._ellipsoid._minimumCone.getValue(),Q=o.pyramid._ellipsoid.radii.getValue(),M=Math.sin,B=Math.cos,T=M(w),D=B(w),F=M(I),L=B(I);Ux.x=Q.x*T*L,Ux.y=Q.y*T*F,Ux.z=Q.z*D;let R=new fQ.changeCartesian3ByScalar(o._position,Ux);return[o._position,R]}let f=this._earthCtrl.entities.add({polyline:{positions:new Bn(A,!1),material:this._colorStyle}});this._lineArray.push(f);function m(){let I=o.pyramid._ellipsoid._maximumClock.getValue(),w=o.pyramid._ellipsoid._minimumCone.getValue(),Q=o.pyramid._ellipsoid.radii.getValue(),M=Math.sin,B=Math.cos,T=M(w),D=B(w),F=M(I),L=B(I);Ux.x=Q.x*T*L,Ux.y=Q.y*T*F,Ux.z=Q.z*D;let R=new fQ.changeCartesian3ByScalar(o._position,Ux);return[o._position,R]}let C=this._earthCtrl.entities.add({polyline:{positions:new Bn(m,!1),material:this._colorStyle}});this._lineArray.push(C);function y(){let I=o.pyramid._ellipsoid._minimumClock.getValue(),w=o.pyramid._ellipsoid._maximumCone.getValue(),Q=o.pyramid._ellipsoid.radii.getValue(),M=Math.sin,B=Math.cos,T=M(w),D=B(w),F=M(I),L=B(I);Ux.x=Q.x*T*L,Ux.y=Q.y*T*F,Ux.z=Q.z*D;let R=new fQ.changeCartesian3ByScalar(o._position,Ux);return[o._position,R]}let x=this._earthCtrl.entities.add({polyline:{positions:new Bn(y,!1),material:this._colorStyle}});this._lineArray.push(x);function v(){let I=o.pyramid._ellipsoid._maximumClock.getValue(),w=o.pyramid._ellipsoid._maximumCone.getValue(),Q=o.pyramid._ellipsoid.radii.getValue(),M=Math.sin,B=Math.cos,T=M(w),D=B(w),F=M(I),L=B(I);Ux.x=Q.x*T*L,Ux.y=Q.y*T*F,Ux.z=Q.z*D;let R=fQ.changeCartesian3ByScalar(o._position,Ux);return[o._position,R]}let E=this._earthCtrl.entities.add({polyline:{positions:new Bn(v,!1),material:this._colorStyle}});this._lineArray.push(E)};gw.prototype.updateViewShed=function(){this.show?(this.createLightCamera(),this.setCameraParams(),this.createShadowMap(),this.addVisualPyramid(),this.drawViewCentrum()):this.removeFromMap()};gw.prototype.setCameraParams=function(){this._lightCamera.frustum.near=.1,this._lightCamera.frustum.far=this._distance;let o=je.toRadians(this._horizontalViewAngle),A=je.toRadians(this._verticalViewAngle);this._lightCamera.frustum.aspectRatio=Math.tan(o/2)/Math.tan(A/2),o>A?this._lightCamera.frustum.fov=o:this._lightCamera.frustum.fov=A,this._lightCamera.setView({destination:this._position,orientation:{heading:je.toRadians(this._heading),pitch:je.toRadians(this._pitch),roll:0}})};var GTe=gw;var HTe=Ti.WGS84;function Kf(o){this._cesiumViewer=o,this.coreMap=o.coreMap,this._scene=this.coreMap.scene,this.loading||this.addLoading(),this._tooltip=ZRi(this.coreMap.container)}function VTe(o,A){if(o===null||typeof o!="object"||o.constructor!==Object&&o.constructor!==Array)return o;if(o.constructor===Date||o.constructor===RegExp||o.constructor===Function||o.constructor===String||o.constructor===Number||o.constructor===Boolean)return new o.constructor(o);A=A||new o.constructor;for(let f in o)A[f]=typeof A[f]>"u"?VTe(o[f],null):A[f];return A}function eAt(o,A){let f=VTe(o),m;for(m in A)f[m]===void 0&&(f[m]=VTe(A[m]));return f}function ZRi(o){let A=function(f){let m=document.createElement("DIV");m.className="twipsy right";let C=document.createElement("DIV");C.className="twipsy-arrow",m.appendChild(C);let y=document.createElement("DIV");y.className="twipsy-inner",m.appendChild(y),this._div=m,this._title=y,f.appendChild(m)};return A.prototype.setVisible=function(f){this._div.style.display=f?"block":"none"},A.prototype.showAt=function(f,m){f&&m&&(this.setVisible(!0),this._title.innerHTML=m,this._div.style.left=`${f.x+30}px`,this._div.style.top=`${f.y-this._div.clientHeight/2-15}px`)},new A(o)}Kf.prototype.addToolbar=function(o,A){return A=eAt(A,{container:o}),new Kf.Toolbar(this,A)};var tAt={shiftX:0,shiftY:0};Kf.prototype.createBillboardGroup=function(o,A,f){let m=new Kf.BillboardGroup(this,A);return m.addBillboards(o,f),m};Kf.BillboardGroup=function(o,A){this._drawHelper=o,this._scene=o._scene,this._options=eAt(A,tAt);let f=new iI;this._scene.primitives.add(f),this._billboards=f,this._orderedBillboards=[]};Kf.BillboardGroup.prototype.createBillboard=function(o,A){let f=this._billboards.add({show:!0,position:o,pixelOffset:new Bt(this._options.shiftX,this._options.shiftY),eyeOffset:new ee(0,0,-1e3),horizontalOrigin:tA.CENTER,verticalOrigin:wn.CENTER,scale:.3,image:Ae(this._options.iconUrl,`${globalThis.GEOWORLD_BASE_URL}Assets/Images/point.png`),color:new At(1,1,1,1)});if(A){let y=function(v){C.enableRotate=v},x=function(){let v=0;for(let E=m._orderedBillboards.length;v<E&&m._orderedBillboards[v]!==f;++v);return v},m=this,C=this._scene.screenSpaceCameraController;if(A.dragHandlers){let v=this,E=new Ur(v._scene.canvas);setListener(f,"leftDown",function(I){function w(M){f.position=M;for(let B=0,T=v._orderedBillboards.length;B<T&&v._orderedBillboards[B]!==f;++B);A.dragHandlers.onDrag&&A.dragHandlers.onDrag(x(),M)}function Q(M){E.destroy(),y(!0),A.dragHandlers.onDragEnd&&A.dragHandlers.onDragEnd(x(),M)}E.setInputAction(function(M){let B=v._scene.camera.pickEllipsoid(M.endPosition,HTe);B?w(B):Q(B)},Ki.MOUSE_MOVE),E.setInputAction(function(M){Q(v._scene.camera.pickEllipsoid(M.position,HTe))},Ki.LEFT_UP),y(!1),A.dragHandlers.onDragStart&&A.dragHandlers.onDragStart(x(),v._scene.camera.pickEllipsoid(I,HTe))})}A.onDoubleClick&&setListener(f,"leftDoubleClick",function(v){A.onDoubleClick(x())}),A.onClick&&setListener(f,"leftClick",function(v){A.onClick(x())}),A.tooltip&&(setListener(f,"mouseMove",function(v){m._drawHelper._tooltip.showAt(v,A.tooltip())}),setListener(f,"mouseOut",function(v){m._drawHelper._tooltip.setVisible(!1)}))}return f};Kf.BillboardGroup.prototype.insertBillboard=function(o,A,f){this._orderedBillboards.splice(o,0,this.createBillboard(A,f))};Kf.BillboardGroup.prototype.addBillboard=function(o,A){this._orderedBillboards.push(this.createBillboard(o,A))};Kf.BillboardGroup.prototype.addBillboards=function(o,A){let f=0;for(;f<o.length;f++)this.addBillboard(o[f],A)};Kf.BillboardGroup.prototype.updateBillboardsPositions=function(o){let A=0;for(;A<o.length;A++)this.getBillboard(A).position=o[A]};Kf.BillboardGroup.prototype.countBillboards=function(){return this._orderedBillboards.length};Kf.BillboardGroup.prototype.getBillboard=function(o){return this._orderedBillboards[o]};Kf.BillboardGroup.prototype.removeBillboard=function(o){this._billboards.remove(this.getBillboard(o)),this._orderedBillboards.splice(o,1)};Kf.BillboardGroup.prototype.remove=function(){this._billboards=this._billboards&&this._billboards.removeAll()&&this._billboards.destroy()};Kf.BillboardGroup.prototype.setOnTop=function(){this._scene.primitives.raiseToTop(this._billboards)};Kf.prototype.cleanUp=function(){this._prevEntity!==void 0&&(this._cesiumViewer.entities.remove(this._prevEntity),this._prevEntity=void 0),this._markers!==void 0&&(this._markers.remove(),this._markers=void 0),this._volumeLabel!==void 0&&(this._cesiumViewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),this._tooltip.setVisible(!1)};Kf.prototype.startDrawing=function(o){let A=this,f=this._scene;f.globe.depthTestAgainstTerrain=!0;let m=this._tooltip,C=3,y=[],x=[],v;this._positions=x;let E=new Ur(f.canvas);this._mouseHandler=E;let I=new Kf.BillboardGroup(this,tAt);this._markers=I,this._prevEntity!==void 0&&(this._cesiumViewer.entities.remove(this._prevEntity),this._prevEntity=null),this._volumeLabel!==void 0&&(this._cesiumViewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),E.setInputAction(function(Q){if(Q.position!==null){let M=f.camera.getPickRay(Q.position),B=f.globe.pick(M,f),T=Kt.fromCartesian(B),D=je.toDegrees(T.longitude),F=je.toDegrees(T.latitude);if(B){if(y.length===0&&(y.push(D,F),x.push(B),v=B,I.addBillboard(v)),x.length>=4){let L=Qs.wgs84ToWindowCoordinates(this._cesiumViewer.coreMap.scene,v);if(L!==void 0){let R=L.x-Q.position.x,k=L.y-Q.position.y;if(R*R+k*k<16){y.splice(y.length-2,2),x.pop(),this.isLoading(!0),this.stopDrawing(o);return}}}y.push(D,F),x.push(B),I.addBillboard(B),x.length===C&&(A._prevEntity=A._cesiumViewer.factory.createElement({type:"polygon",parameters:{hierarchy:ee.fromDegreesArray(y),material:At.RED.withAlpha(.6),fill:!0}}),A._prevEntity.polygon.hierarchy=w())}}}.bind(this),Ki.LEFT_CLICK),E.setInputAction(function(Q){let M=Q.endPosition;if(M!==null)if(x.length===0)m.showAt(M,"\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236\u7B2C\u4E00\u4E2A\u70B9");else{let B=f.camera.getPickRay(M),T=f.globe.pick(B,f),D=Kt.fromCartesian(T),F=je.toDegrees(D.longitude),L=je.toDegrees(D.latitude);if(T&&(y.splice(y.length-2,2),x.pop(),y.push(F,L),x.push(T),I.getBillboard(x.length-1).position=T,m.showAt(M,"\u53CC\u51FB\u7ED3\u675F\u7ED8\u5236"),x.length>=3&&x.length>=4)){let R=Qs.wgs84ToWindowCoordinates(this._cesiumViewer.coreMap.scene,v);if(R!==void 0){let k=R.x-M.x,U=R.y-M.y;k*k+U*U<16?document.body.style.cursor="pointer":document.body.style.cursor="default"}}}}.bind(this),Ki.MOUSE_MOVE),E.setInputAction(function(Q){x.length<C+2||(this.isLoading(!0),setTimeout(()=>{this.stopDrawing(o)},100))}.bind(this),Ki.LEFT_DOUBLE_CLICK);function w(){return ee.fromDegreesArray(y)}};Kf.prototype.stopDrawing=function(o){this._mouseHandler!==void 0&&(this._mouseHandler.destroy(),this._mouseHandler=void 0),this._markers!==void 0&&(this._markers.remove(),this._markers=void 0),this._prevEntity!==void 0&&(this._cesiumViewer.entities.remove(this._prevEntity),this._prevEntity=null),this._volumeLabel!==void 0&&(this._cesiumViewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),this._tooltip.setVisible(!1),document.body.style.cursor="wait";let A=this.computeCutVolume(),f=A.maxHeight;document.body.style.cursor="default",typeof o=="function"&&o(A.volume);let m={polygon:{hierarchy:{positions:this._positions},extrudedHeight:f,closeTop:!1,closeBottom:!1,material:At.RED.withAlpha(.5),outline:!0,outlineColor:At.WHITE,outlineWidth:2}};this._prevEntity=this._cesiumViewer.entities.add(m),this.isLoading(!1)};Kf.prototype.addLoading=function(){let o=document.createElement("div");o.id="cesiumLoading",o.style.cssText="width: 100%;height: 100%;display:none;pointer-events: none;position: absolute;top: 0;left: 0;-moz-box-sizing: border-box;box-sizing: border-box;background-color: unset;z-index: 99999;";let A=document.createElement("img");A.style.cssText="position: relative;width: 110px;height: 110px;margin: auto;top: 50%;left: 50%;margin-top: -55px;margin-left: -55px;",A.src=`${globalThis.GEOWORLD_BASE_URL}Workers/image/loading.gif`,o.appendChild(A),this.loading=o,this.coreMap.container.appendChild(o)};Kf.prototype.isLoading=function(o){o?this.loading.style.display="block":this.loading.style.display="none"};Kf.prototype.removeLoading=function(){this.loading&&this.loading.remove(),this.loading=void 0};function $Ri(o){let A=[],f=[];for(let Q=0;Q<o.length;Q++){let M=Kt.fromCartesian(o[Q]);A.push(M.longitude),f.push(M.latitude)}let m=0,C=0,y=0,x=0,v=0,E=0,I=0,w=0;for(let Q=0;Q<o.length;Q++)m=A[Q],C=f[Q],Q===o.length-1?(y=A[0],x=f[0]):(y=A[Q+1],x=f[Q+1]),E=m*x-y*C,v+=E,I+=(m+y)*E,w+=(C+x)*E;return v*=.5,I/=6*v,w/=6*v,new Kt(I,w)}function eLi(o,A,f){let m=ee.distance(o,A),C=ee.distance(A,f),y=ee.distance(f,o),x=(m+C+y)/2;return Math.sqrt(x*(x-m)*(x-C)*(x-y))}Kf.prototype.computeCutVolume=function(){let o=15e3;for(let k=0;k<this._positions.length;k++){let U=Kt.fromCartesian(this._positions[k]),V=this._scene.globe.getHeight(U);o>V&&(o=V)}let A=Math.PI/Math.pow(2,11);A=A/64;let f=new eh.fromPositions({positions:this._positions,vertexFormat:Va.FLAT_VERTEX_FORMAT,granularity:A}),m=new eh.createGeometry(f),C=0,y=0,x,v,E,I,w,Q,M,B,T,D,F,L;for(let k=0;k<m.indices.length;k+=3)x=m.indices[k],v=m.indices[k+1],E=m.indices[k+2],D=new ee(m.attributes.position.values[x*3],m.attributes.position.values[x*3+1],m.attributes.position.values[x*3+2]),F=Kt.fromCartesian(D),I=this._scene.globe.getHeight(F),M=ee.fromRadians(F.longitude,F.latitude,0),y<I&&(y=I),D=new ee(m.attributes.position.values[v*3],m.attributes.position.values[v*3+1],m.attributes.position.values[v*3+2]),F=Kt.fromCartesian(D),w=this._scene.globe.getHeight(F),B=ee.fromRadians(F.longitude,F.latitude,0),y<w&&(y=w),D=new ee(m.attributes.position.values[E*3],m.attributes.position.values[E*3+1],m.attributes.position.values[E*3+2]),F=Kt.fromCartesian(D),Q=this._scene.globe.getHeight(F),T=ee.fromRadians(F.longitude,F.latitude,0),y<Q&&(y=Q),L=eLi(M,B,T),C=C+L*(I-o+w-o+Q-o)/3;let R=$Ri(this._positions);return this._volumeLabel=this._cesiumViewer.entities.add({position:ee.fromRadians(R.longitude,R.latitude,y+1e3),label:{text:`${C.toFixed(4)}\u7ACB\u65B9\u7C73`}}),{maxHeight:y,volume:C}};var zTe=Kf;function iAt(o,A){if(this.mEarthCtrl=o,this._parameter=A,this.coreMap=o.coreMap,this._color=Ae(A.color,new At(1,0,0,.7)),this._positions=A.positions,this._positions.length<3)throw new Ui("invalid positions length!");this._duration=Ae(A.duration,4e3),this._minHeight=Ae(A.minHeight,0),this._maxHeight=Ae(A.maxHeight,100),this._image=A.image,this._pps=null}function tLi(o,A){let f=Kt.fromCartesian(o[0]),m=f.longitude,C=f.latitude,y=m,x=C,v=A;for(let E=1;E<o.length;E++){let I=Kt.fromCartesian(o[E]);m>I.longitude?m=I.longitude:y<I.longitude&&(y=I.longitude),C>I.latitude?C=I.latitude:x<I.latitude&&(x=I.latitude)}return new ee.fromRadians((m+y)/2,(C+x)/2,v)}function iLi(o){if(O(o._pps))return;let A=tLi(o._positions,o._minHeight),f=Kt.fromCartesian(A),m=new ai(A.x,A.y,A.z,1),C=new Kt(f.longitude,f.latitude,o.maxHeight+100),y=Kt.toCartesian(C),x=new ai(y.x,y.y,y.z,1),v=new ai,E=new ai,I=new ee,w=o.mEarthCtrl.coreMap.scene.camera,Q=o._positions.length;o._pps=new va({fragmentShader:nLi(Q),uniforms:{u_floodCenterEC:function(){return Xe.multiplyByVector(w._viewMatrix,m,v)},u_floodPlaneNormalEC:function(){let B=Xe.multiplyByVector(w._viewMatrix,m,v),T=Xe.multiplyByVector(w._viewMatrix,x,E);return I.x=T.x-B.x,I.y=T.y-B.y,I.z=T.z-B.z,ee.normalize(I,I),I},u_floodRange:function(){return o._positions},u_minHeight:function(){return o._minHeight},u_maxHeight:function(){return o._maxHeight},u_image:function(){return o.image},u_floodColor:function(){return o._color},u_positionsLength:function(){return o._positions.length}}}),o.mEarthCtrl.coreMap.scene.postProcessStages.add(o._pps)}function rLi(o){O(o._pps)&&(o.mEarthCtrl.coreMap.scene.postProcessStages.remove(o._pps),o._pps=null)}function nLi(o){return`uniform sampler2D colorTexture;
uniform sampler2D depthTexture;
varying vec2 v_textureCoordinates;
uniform vec4 u_floodCenterEC;
@@ -17027,7 +17027,7 @@
                   <div class="title" style="position: inherit;top: 22px;left: 70px;font-size: 14px;text-align: left;color: rgba(255,255,255,1);text-shadow: 0 0 9px rgba(0,0,0,.75)">`+v.optiontext[de]+`</div>
           </div>`,$(".cesium-viewer").append(_e),se=document.getElementById(me.id)),me.description?se.style.transform="matrix(1, 0, 0, 1, "+ce.x+", "+(ce.y-157)+")":se.style.transform="matrix(1, 0, 0, 1, "+ce.x+", "+(ce.y-134)+")",se&&(se.style.display=v.pointPrimitive.show?"block":"none")}oe&&(C||v.setVisibility(!1),oe=!1)},typeof y=="function"&&y(w)}),this._core.isnull(f.id)&&(f.id=this._core.getuid()),this._core.isnull(o)&&(o="\u5BCC\u6587\u672C");var I={id:f.id,name:o,checked:C,pId:this._core.isnull(m)?0:m,type:"DivPoint",item:this,url:A,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this.setTreeobj(I),this._tree.insertGroupId(I,this._core.isnull(m)?0:m),this};gf.prototype.createLabelRichtextGeoJsonFeatureLayerProviderLayer=function(o,A,f,m,C,y){var x={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium},v=this,E=new IA(this._viewer,this._cesium,x);this._Provider=E,E._loadTile=function(w){var Q=new v._cesium.PointPrimitiveCollection;v.optiontext=[],w.features.forEach(function(L){var R=options.pointHeight;if(L.properties.height!=null&&(R=parseFloat(L.properties.height)+R),/^\[/.test(options.pointHeight)&&/\]$/.test(options.pointHeight)){var k=options.pointHeight.replace(/\[/,"").replace(/\]/,"");R=parseFloat(L.properties[k])}if(f.position=new v._cesium.Cartesian3.fromDegrees(L.geometry.coordinates[0],L.geometry.coordinates[1],R),/^\[/.test(f.text)&&/\]$/.test(f.text)){var U=f.text.replace(/\[/,"").replace(/\]/,"");f.text=L.properties[U]}var V=v._core.getuid(),H="DivPoint"+V;Q.add({id:H,position:Cartesian3,color:v._cesium.Color.YELLOW,description:f.text}),v.optiontext.push(option.text)}),v.pointPrimitive=v._viewer.scene.primitives.add(Q);var M,B,T,D,F=!0;return v.pointPrimitive.update=function(){for(var L=0,R,k;L<v.pointPrimitive.length;L++){if(R=v.pointPrimitive.get(L),D=R.position,T=v._viewer.scene.cartesianToCanvasCoordinates(D),!T)return;B=document.getElementById(R.id),B||(k='<div id="'+R.id+'" style="position: absolute; width: 200px; height: 134px;left: 0px; top: 0px; pointer-events:none; background: url('+window.SmartEarthRootUrl+cn.divpoint1+`);transform: matrix(1, 0, 0, 1, 0, 0); transform-origin: left bottom 0px;">
                   <div class="title" style="position: inherit;top: 22px;left: 70px;font-size: 14px;text-align: left;color: rgba(255,255,255,1);text-shadow: 0 0 9px rgba(0,0,0,.75)">`+v.optiontext[L]+`</div>
           </div>`,$(".cesium-viewer").append(k),B=document.getElementById(R.id)),R.description?B.style.transform="matrix(1, 0, 0, 1, "+T.x+", "+(T.y-157)+")":B.style.transform="matrix(1, 0, 0, 1, "+T.x+", "+(T.y-134)+")"}F&&(C||v.setVisibility(!1),F=!1)},v.item=Q,""},E.addTo(this._viewer),C||this.setVisibility(!1),this._core.isnull(f.id)&&(f.id=this._core.getuid()),this._core.isnull(o)&&(o="\u5BCC\u6587\u672C"+f.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var I={id:f.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"DivPoint",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this.setTreeobj(I),this._tree.insertGroupId(I,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};gf.prototype.createModelGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y){var x={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:this._core.defaultValue(A.srs,"EPSG:4490")+":{z}",TILEMATRIXSET:this._core.defaultValue(A.srs,"EPSG:4490"),FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,Cesium:this._cesium},v=this,E=f.material;!v._core.isnull(f)&&!v._core.isnull(f.color)&&(/^\[/.test(f.color)&&f.color.toString().charAt(0)=="["&&f.color.toString().charAt(f.color.length-1)=="]"||(v._core.isHtmlColor(f.color)?f.color=v._color.colorFromHtmlColor(f.color):(/^rgb/.test(f.color)&&(f.color=v._color.rgbaStringToRgbaObj(f.color)),f.color.r>1&&(f.color.r=f.color.r/255),f.color.g>1&&(f.color.g=f.color.g/255),f.color.b>1&&(f.color.b=f.color.b/255),f.color.a>1&&(f.color.a=f.color.a/255),f.color=v._color.createColor(f.color.r,f.color.g,f.color.b,f.color.a)))),this._urlTemplate=A.url+"?"+this._core._serialize(x.urlParams);var I=A.url+"?"+this._core._serialize(x.urlParams);this._Provider=new Ts(this._viewer,this._cesium),this._Provider._normalTile=f.level_max-1,this._Provider._minimumHeight=parseFloat(f.height)||0,this._Provider.loadTile=function(B,T){if(T.state===un.QuadtreeTileLoadState.START){if(T.data={lines:[],geometryPrimitive:void 0},T.level>=f.level_min&&T.level<f.level_max&&v.item.show){var D=I.replace(window.encodeURIComponent("{x}"),T.x).replace(window.encodeURIComponent("{y}"),T.y).replace(window.encodeURIComponent("{z}"),T.level);v._cache&&(D+="&"+v._core.getuid()),v._core.xhr({url:D,type:"get",dataType:"json",success:function(F){if(F==null){T.state=un.QuadtreeTileLoadState.DONE,T.renderable=!0;return}var L={url:"",modelMatrix:v._cesium.Transforms.eastNorthUpToFixedFrame(origin),color:v._cesium.Color.DARKSALMON,scale:2},R=v._core.extend(L,f,!0);v._core.isnull(f.near)&&(f.near=0),v._core.isnull(f.far)&&(f.far=999999999);var k=parseFloat(f.near),U=parseFloat(f.far),V=new v._cesium.DistanceDisplayCondition(k,U);R.distanceDisplayCondition=V;var H=new v._cesium.PrimitiveCollection;F.features.forEach(function(q){R.id=q;var ie=R.height;if(q.properties.height!=null&&(ie=parseFloat(q.properties.height)),/^\[/.test(R.height)&&/\]$/.test(R.height)){var Z=R.height.replace(/\[/,"").replace(/\]/,"");ie=parseFloat(q.properties[Z])}R.modelMatrix=v._cesium.Transforms.eastNorthUpToFixedFrame(v._cesium.Cartesian3.fromDegrees(q.geometry.coordinates[0],q.geometry.coordinates[1],ie));var oe=v._cesium.Model.fromGltf({id:q,url:R.uri,color:R.color,modelMatrix:R.modelMatrix,scale:R.scale,heightReference:parseInt(R.heightReference),distanceDisplayCondition:R.distanceDisplayCondition});H.add(oe)}),F.features.length==0&&(T.state=un.QuadtreeTileLoadState.DONE,T.renderable=!0),T.data.geometryPrimitive=H,T.state=un.QuadtreeTileLoadState.LOADING,T.state===un.QuadtreeTileLoadState.LOADING&&(T.data.geometryPrimitive.update(B,[]),T.state=un.QuadtreeTileLoadState.DONE,T.renderable=!0)},error:function(){T.count==null&&(T.count=0),T.count+=1,T.count>=2?(T.state=un.QuadtreeTileLoadState.DONE,T.renderable=!0):T.state=un.QuadtreeTileLoadState.START}})}else{T.state=un.QuadtreeTileLoadState.DONE,T.renderable=!0;return}T.state=un.QuadtreeTileLoadState.LOADING}},this._primitive=new this._cesium.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:3});var w=this._viewer.scene,Q=w.primitives;Q.add(this._primitive),C||this.setVisibility(!1),this._core.isnull(f.id)&&(f.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+f.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var M={id:f.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this.setTreeobj(M),this._tree.insertGroupId(M,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};gf.prototype.createPointGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y){var x={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:this._core.defaultValue(A.srs,"EPSG:4490")+":{z}",TILEMATRIXSET:this._core.defaultValue(A.srs,"EPSG:4490"),FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium},v=this;!v._core.isnull(f)&&!v._core.isnull(f.color)&&(/^\[/.test(f.color)&&f.color.toString().charAt(0)=="["&&f.color.toString().charAt(f.color.length-1)=="]"||(v._core.isHtmlColor(f.color)?f.color=v._color.colorFromHtmlColor(f.color):(/^rgb/.test(f.color)&&(f.color=v._color.rgbaStringToRgbaObj(f.color)),f.color.r>1&&(f.color.r=f.color.r/255),f.color.g>1&&(f.color.g=f.color.g/255),f.color.b>1&&(f.color.b=f.color.b/255),f.color.a>1&&(f.color.a=f.color.a/255),f.color=v._color.createColor(f.color.r,f.color.g,f.color.b,f.color.a)))),!v._core.isnull(f)&&!v._core.isnull(f.outlineColor)&&(/^\[/.test(f.outlineColor)&&f.outlineColor.toString().charAt(0)=="["&&f.outlineColor.toString().charAt(f.outlineColor.length-1)=="]"||(v._core.isHtmlColor(f.outlineColor)?f.outlineColor=v._color.colorFromHtmlColor(f.outlineColor):(/^rgb/.test(f.outlineColor)&&(f.outlineColor=v._color.rgbaStringToRgbaObj(f.outlineColor)),f.outlineColor.r>1&&(f.outlineColor.r=f.outlineColor.r/255),f.outlineColor.g>1&&(f.outlineColor.g=f.outlineColor.g/255),f.outlineColor.b>1&&(f.outlineColor.b=f.outlineColor.b/255),f.outlineColor.a>1&&(f.outlineColor.a=f.outlineColor.a/255),f.outlineColor=v._color.createColor(f.outlineColor.r,f.outlineColor.g,f.outlineColor.b,f.outlineColor.a)))),this._urlTemplate=A.url+"?"+this._core._serialize(x.urlParams);var E=A.url+"?"+this._core._serialize(x.urlParams);this._Provider=new Ts(this._viewer,this._cesium),this._Provider._normalTile=f.level_max-1,this._Provider._minimumHeight=parseFloat(f.height)||0,this._Provider.loadTile=function(M,B){if(B.state===un.QuadtreeTileLoadState.START){if(B.data={lines:[],geometryPrimitive:void 0},B.level>=f.level_min&&B.level<f.level_max&&v.item.show){var T=E.replace(window.encodeURIComponent("{x}"),B.x).replace(window.encodeURIComponent("{y}"),B.y).replace(window.encodeURIComponent("{z}"),B.level);v._cache&&(T+="&"+v._core.getuid()),v._core.xhr({url:T,type:"get",dataType:"json",success:function(D){if(D==null){B.state=un.QuadtreeTileLoadState.DONE,B.renderable=!0;return}var F={Name:"",text:"",font:" 30px sans-serif",pixelSize:10,style:v._cesium.LabelStyle.OUTLINE,fillColor:v._cesium.Color.WHITE,outlineColor:v._cesium.Color.BLACK,outlineWidth:1,show:!0,showBackground:!1,backgroundColor:new v._cesium.Color(.165,.165,.165,.8),backgroundPadding:new v._cesium.Cartesian2(7,5),scale:1,horizontalOrigin:v._cesium.HorizontalOrigin.CENTER,verticalOrigin:v._cesium.VerticalOrigin.CENTER,eyeOffset:v._cesium.Cartesian3.ZERO,pixelOffset:v._cesium.Cartesian2.ZERO,heightReference:v._cesium.HeightReference.NONE,scaleByDistance:new v._cesium.NearFarScalar(0,0,1,1)},L=f.material;!v._core.isnull(f)&&!v._core.isnull(f.backgroundColor)&&(/^\[/.test(f.backgroundColor)&&f.backgroundColor.toString().charAt(0)=="["&&f.backgroundColor.toString().charAt(f.backgroundColor.length-1)=="]"||(v._core.isHtmlColor(f.backgroundColor)?f.backgroundColor=v._color.colorFromHtmlColor(f.backgroundColor):(/^rgb/.test(f.backgroundColor)&&(f.backgroundColor=v._color.rgbaStringToRgbaObj(f.backgroundColor)),f.backgroundColor.r>1&&(f.backgroundColor.r=f.backgroundColor.r/255),f.backgroundColor.g>1&&(f.backgroundColor.g=f.backgroundColor.g/255),f.backgroundColor.b>1&&(f.backgroundColor.b=f.backgroundColor.b/255),f.backgroundColor.a>1&&(f.backgroundColor.a=f.backgroundColor.a/255),f.backgroundColor=v._color.createColor(f.backgroundColor.r,f.backgroundColor.g,f.backgroundColor.b,f.backgroundColor.a))));var R=v._core.extend(F,f,!0);v._core.isnull(f.near)&&(f.near=0),v._core.isnull(f.far)&&(f.far=999999999);var k=parseFloat(f.near),U=parseFloat(f.far),V=new v._cesium.DistanceDisplayCondition(k,U);R.distanceDisplayCondition=V,v._core.isnull(f.font_size)&&(f.font_size="30px"),v._core.isnull(f.font_family)&&(f.font_family=" sans-serif"),R.font=parseFloat(f.font_size)+"px "+f.font_family;var H=new v._cesium.PointPrimitiveCollection;D.features.forEach(function(q){R.id=q;var ie=0;if(/^\[/.test(R.pointHeight)&&/\]$/.test(R.pointHeight)){var Z=R.pointHeight.replace(/\[/,"").replace(/\]/,"");ie=parseFloat(q.properties[Z])}else R.pointHeight!==void 0&&R.pointHeight!==""?ie=parseFloat(R.pointHeight):q.properties.height!=null&&(ie=parseFloat(q.properties.height));if(/^\[/.test(f.color)&&/\]$/.test(f.color)){var oe=f.color.replace(/\[/,"").replace(/\]/,"");R.color=q.properties[oe],v._core.isHtmlColor(R.color)?R.color=v._color.colorFromHtmlColor(R.color):(/^rgb/.test(R.color)&&(R.color=v._color.rgbaStringToRgbaObj(R.color)),R.color.r>1&&(R.color.r=R.color.r/255),R.color.g>1&&(R.color.g=R.color.g/255),R.color.b>1&&(R.color.b=R.color.b/255),R.color.a>1&&(R.color.a=R.color.a/255),R.color=v._color.createColor(R.color.r,R.color.g,R.color.b,R.color.a))}if(/^\[/.test(f.outlineColor)&&/\]$/.test(f.outlineColor)){var oe=f.outlineColor.replace(/\[/,"").replace(/\]/,"");R.outlineColor=q.properties[oe],v._core.isHtmlColor(R.outlineColor)?R.outlineColor=v._color.colorFromHtmlColor(R.outlineColor):(/^rgb/.test(R.outlineColor)&&(R.outlineColor=v._color.rgbaStringToRgbaObj(R.outlineColor)),R.outlineColor.r>1&&(R.outlineColor.r=R.outlineColor.r/255),R.outlineColor.g>1&&(R.outlineColor.g=R.outlineColor.g/255),R.outlineColor.b>1&&(R.outlineColor.b=R.outlineColor.b/255),R.outlineColor.a>1&&(R.outlineColor.a=R.outlineColor.a/255),R.outlineColor=v._color.createColor(R.outlineColor.r,R.outlineColor.g,R.outlineColor.b,R.outlineColor.a))}R.position=new v._cesium.Cartesian3.fromDegrees(q.geometry.coordinates[0],q.geometry.coordinates[1],ie),R.text=q.properties.name;var ne={show:R.show,position:R.position,pixelSize:R.pixelSize,color:R.color,outlineColor:R.outlineColor,outlineWidth:R.outlineWidth,id:q},se="color:"+R.color.red*255+","+R.color.green*255+","+R.color.blue*255+";outlineColor:"+R.outlineColor.red*255+","+R.outlineColor.green*255+","+R.outlineColor.blue*255;v.Legend.push(se),H.add(ne)}),D.features.length==0&&(B.state=un.QuadtreeTileLoadState.DONE,B.renderable=!0),B.data.geometryPrimitive=H,B.state=un.QuadtreeTileLoadState.LOADING,B.state===un.QuadtreeTileLoadState.LOADING&&(B.data.geometryPrimitive.update(M,[]),B.state=un.QuadtreeTileLoadState.DONE,B.renderable=!0)},error:function(){B.count==null&&(B.count=0),B.count+=1,B.count>=2?(B.state=un.QuadtreeTileLoadState.DONE,B.renderable=!0):B.state=un.QuadtreeTileLoadState.START}})}else{B.state=un.QuadtreeTileLoadState.DONE,B.renderable=!0;return}B.state=un.QuadtreeTileLoadState.LOADING}},this._primitive=new this._cesium.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:3});var I=this._viewer.scene,w=I.primitives;w.add(this._primitive),C||this.setVisibility(!1),this._core.isnull(f.id)&&(f.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+f.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var Q={id:f.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this.setTreeobj(Q),this._tree.insertGroupId(Q,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};gf.prototype.setTreeobj=function(o){this.treeobj=o};gf.prototype.getLegend=function(){var o=[];return this.Legend!=null&&(o=this._core.unique(this.Legend)),o};gf.prototype.deleteObject=function(){if(this._viewer.scene.primitives.remove(this.item),this.probj&&this.probj.length>0&&(this._viewer.scene.primitives.remove(this.probj[0]),this.probj.pop()),this.img!=null&&this._viewer.imageryLayers.remove(this.img),this.primitve&&this.primitve.length>0){for(var o=0;o<this.primitve.length;o++)this._viewer.scene.primitives.remove(this.primitve[o]);this.primitve=[]}this.loadAllKey&&this.loadAllKey.length>0&&(this.loadAllKey=[]);try{this._Provider.remove()}catch{}if(this._Provider!=null&&this._Provider.setStatus(!1),this.items!=null&&this.items!=null&&this.items.length>0)for(var o=0;o<this.items.length;o++)this._viewer.scene.primitives.remove(this.items[o]);else this._viewer.scene.primitives.remove(this.item);if(this.treeobj&&this.treeobj.type==="DivPoint"&&this.item&&this.item._pointPrimitives!=null&&this.item._pointPrimitives!=null)for(var o=0;o<this.item._pointPrimitives.length;o++){var A=document.getElementById(this.item._pointPrimitives[o].id);A&&A.remove()}try{this._Provider.remove()}catch{}};gf.prototype.export=function(){var o=this.item.show==null?void 0:this.item.show,A=this.treeobj.url;return{type:this.treeobj.type,treeobj:{name:this.treeobj.name,pId:this.treeobj.pId},style:{show:o,url:A},treeData:this.treeobj.treeData}};gf.prototype.setRefresh=function(o){try{this._Provider&&this._Provider.setStatus(!o)}catch{}};gf.prototype.setVisibility=function(o){try{if(this.loadAllKey=[],this.item!=null&&this.item.show!=null&&(this.item.show=o),this.img!=null&&(this.img.show=o),this.primitve&&this.primitve.length>0)for(var A=0;A<this.primitve.length;A++)this.primitve[A].show=o;if(this._Provider&&this._Provider.setStatus&&this._Provider._state!==void 0&&this._Provider.setStatus(o),this._Provider&&this._Provider.EntityCollection&&(!o&&(this._Provider.EntityCollection.show=o),this._Provider.EntityCollection.isShow=o),this.probj&&this.probj.length>0)for(var A=0;A<this.probj.length;A++)this.probj[A].show=o}catch{}if(this.treeobj!=null&&this.treeobj.type==="DivPoint"&&this.item&&this.item._pointPrimitives!=null&&this.item._pointPrimitives!=null)for(var A=0;A<this.item._pointPrimitives.length;A++){var f=document.getElementById(this.item._pointPrimitives[A].id);f&&(f.style.display=o?"block":"none")}this.item!=null&&(this.item.show=o),this._Provider&&this._Provider._stop!==void 0&&this._Provider.setStatus(!o)};gf.prototype.edit=function(o,A){return this.isEditting=o,this.editoption=A,this._Provider&&this._Provider.edit&&this._Provider.edit(o,A)};gf.prototype.forceRefresh=function(){try{this._cache=!0,this._forceRefreshPrvimitive||(this._forceRefreshPrvimitive=Vi.cloneDeep(this._primitive));var o=Vi.cloneDeep(this._forceRefreshPrvimitive);this._viewer.scene.primitives.remove(this._primitive),this._viewer.scene.primitives.add(o),this.edit(this.isEditting,this.editoption)}catch{}};Object.defineProperties(gf.prototype,{labelText:{set:Vi.debounce(function(o){var A=o;if(!this._core.isnull(o)){var f=this.item.entities&&this.item.entities.values;if(f&&f.length>0)for(var m=0;m<f.length;m++)if(/^\[/.test(o)&&(A=o.replace(/\[/,"").replace(/\]/,""),A=f[m].properties[A]._value),f[m].label){f[m].label.text=A;try{f[m].point.show=!1}catch{}}else{try{f[m].point.show=!1}catch{}f[m].label=new this._cesium.LabelGraphics({text:A,font:"30px sans-serif",style:this._cesium.LabelStyle.FILL,fillColor:this._cesium.Color.WHITE,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,show:!0,showBackground:!1,backgroundColor:new this._cesium.Color(.165,.165,.165,.8),backgroundPadding:new this._cesium.Cartesian2(7,5),scale:1,horizontalOrigin:this._cesium.HorizontalOrigin.CENTER,verticalOrigin:this._cesium.VerticalOrigin.CENTER,eyeOffset:this._cesium.Cartesian3.ZERO,pixelOffset:this._cesium.Cartesian2.ZERO,heightReference:this._cesium.HeightReference.NONE})}}},500)},labelStyles:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].label==null)&&A&&A.length>0&&A[0].label)for(var f=0;f<A.length;f++)A[f].label.style=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].label==null)&&o&&o.length>0&&o[0].label)return o[0].label.style}},labelFont:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(o=o.toString().replace(/px/g,""),!(A&&!/^point.fid/.test(A[0]._id)&&A[0].label==null)){var f=A[0].label.font,m=16;if(f&&(f=f._value.trimLeft().trimRight(),m=f.split("px")[0]),A&&A.length>0&&A[0].label)for(var C=0;C<A.length;C++)A[C].label.font=m+"px "+o}}},500)},labelFontSize1:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(o=o.toString().replace(/px/g,""),!(A&&!/^point.fid/.test(A[0]._id)&&A[0].label==null)){var f=A[0].label.font,m="sans-serif";if(f&&(f=f._value.trimLeft().trimRight(),m=f.split("px")[1]),A&&A.length>0&&A[0].label)for(var C=0;C<A.length;C++)A[C].label.font=o+"px  "+m}}},500)},labelFontSize:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(o=o.toString().replace(/px/g,""),!(A&&!/^point.fid/.test(A[0]._id)&&A[0].label==null)&&A&&A.length>0&&A[0].label)for(var f=0;f<A.length;f++)A[f].label.font=o+"px  sans-serif"}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].label==null)&&o&&o.length>0&&o[0].label)return parseFloat(o[0].label.font)}},labelFillColor:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){this._core.isnull(o)||(this._core.isHtmlColor(o)?o=this._color.colorFromHtmlColor(o):(/^rgb/.test(o)&&(o=this._color.rgbaStringToRgbaObj(o)),o.r>1&&(o.r=o.r/255),o.g>1&&(o.g=o.g/255),o.b>1&&(o.b=o.b/255),o.a>1&&(o.a=o.a/255),o=this._color.createColor(o.r,o.g,o.b,o.a)));var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].label==null)&&A&&A.length>0&&A[0].label)for(var f=0;f<A.length;f++)A[f].label.fillColor=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].label==null)&&o&&o.length>0&&o[0].label){var A=o[0].label.fillColor;return this._color.toHtmlColor("rgb("+A._value.red*255+","+A._value.green*255+","+A._value.blue*255+","+A._value.alpha*255+")")}}},labelOutlineColor:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){this._core.isnull(o)||(this._core.isHtmlColor(o)?o=this._color.colorFromHtmlColor(o):(/^rgb/.test(o)&&(o=this._color.rgbaStringToRgbaObj(o)),o.r>1&&(o.r=o.r/255),o.g>1&&(o.g=o.g/255),o.b>1&&(o.b=o.b/255),o.a>1&&(o.a=o.a/255),o=this._color.createColor(o.r,o.g,o.b,o.a)));var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].label==null)&&A&&A.length>0&&A[0].label)for(var f=0;f<A.length;f++)A[f].label.outlineColor=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].label==null)&&o&&o.length>0&&o[0].label){var A=o[0].label.outlineColor;try{return this._color.toHtmlColor("rgb("+A._value.red*255+","+A._value.green*255+","+A._value.blue*255+","+A._value.alpha*255+")")}catch{}}}},labelOutlineWidth:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].label==null)&&A&&A.length>0&&A[0].label)for(var f=0;f<A.length;f++)/^\[/.test(o)&&(o=o.replace(/\[/,"").replace(/\]/,""),o=A[f].properties[o]),A[f].label.outlineWidth=o}},200),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].label==null)&&o&&o.length>0&&o[0].label){var A=o[0].label.outlineWidth;return A?A._value:void 0}}},labelBackgroundColor:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){this._core.isnull(o)||(this._core.isHtmlColor(o)?o=this._color.colorFromHtmlColor(o):(/^rgb/.test(o)&&(o=this._color.rgbaStringToRgbaObj(o)),o.r>1&&(o.r=o.r/255),o.g>1&&(o.g=o.g/255),o.b>1&&(o.b=o.b/255),o.a>1&&(o.a=o.a/255),o=this._color.createColor(o.r,o.g,o.b,o.a)));var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].label==null)&&A&&A.length>0&&A[0].label)for(var f=0;f<A.length;f++)A[f].label.backgroundColor=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].label==null)&&o&&o.length>0&&o[0].label){var A=o[0].label.backgroundColor;return this._color.toHtmlColor("rgb("+A._value.red*255+","+A._value.green*255+","+A._value.blue*255+","+A._value.alpha*255+")")}}},labelBackground:{set:Vi.debounce(function(o){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].label==null)&&A&&A.length>0&&A[0].label)for(var f=0;f<A.length;f++)A[f].label.showBackground=o},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].label==null)&&o&&o.length>0&&o[0].label)return o[0].label.background}},labelScale:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].label==null)&&A&&A.length>0&&A[0].label)for(var f=0;f<A.length;f++)/^\[/.test(o)&&(o=o.replace(/\[/,"").replace(/\]/,""),o=A[f].properties[o]),A[f].label.scale=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].label==null)&&o&&o.length>0&&o[0].label){var A=o[0].label.scale;return A?A._value:void 0}}},labelHorizontalOrigin:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].label==null)&&A&&A.length>0&&A[0].label)for(var f=0;f<A.length;f++)A[f].label.horizontalOrigin=parseInt(o)}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].label==null)&&o&&o.length>0&&o[0].label){var A=o[0].label.horizontalOrigin;return A?A._value:void 0}}},labelVerticalOrigin:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].label==null)&&A&&A.length>0&&A[0].label)for(var f=0;f<A.length;f++)A[f].label.verticalOrigin=parseInt(o)}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].label==null)&&o&&o.length>0&&o[0].label){var A=o[0].label.verticalOrigin;return A?A._value:void 0}}},labelHeightReference:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].label==null)&&A&&A.length>0&&A[0].label)for(var f=0;f<A.length;f++)A[f].label.heightReference=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].label==null)&&o&&o.length>0&&o[0].label){var A=o[0].label.heightReference;return A?A._value:void 0}}},labelDistanceDisplayMaxCondition:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].label==null)&&A&&A.length>0&&A[0].label)for(var f=A[0].label.distanceDisplayCondition?A[0].label.distanceDisplayCondition._value.near:0,m=0;m<A.length;m++)A[m].label.distanceDisplayCondition=new this._cesium.DistanceDisplayCondition(f,parseInt(o)),A[m].label.scaleByDistance=new this._cesium.NearFarScalar(f,1,parseInt(o),0)}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].label==null)&&o&&o.length>0&&o[0].label){var A=o[0].label.distanceDisplayCondition?o[0].label.distanceDisplayCondition._value.far:Number.MAX_VALUE;return A}}},labelDistanceDisplayMinCondition:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].label==null)&&A&&A.length>0&&A[0].label)for(var f=A[0].label.distanceDisplayCondition?A[0].label.distanceDisplayCondition._value.far:Number.MAX_VALUE,m=0;m<A.length;m++)A[m].label.distanceDisplayCondition=new this._cesium.DistanceDisplayCondition(parseInt(o),f),A[m].label.scaleByDistance=new this._cesium.NearFarScalar(parseInt(o),1,f,0)}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].label==null)&&o&&o.length>0&&o[0].label){var A=o[0].label.distanceDisplayCondition?o[0].label.distanceDisplayCondition._value.near:0;return A}}},labelHeight:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].position==null)&&A&&A.length>0&&A[0].position)for(var f=0;f<A.length;f++){var m=this._cesium.Cartographic.fromCartesian(A[f].position._value),C=this._cesium.Math.toDegrees(m.longitude),y=this._cesium.Math.toDegrees(m.latitude),x=this._cesium.Cartesian3.fromDegrees(C,y,o);A[f].position=x}}},500),get:function(){return 0}},labelShow:{set:Vi.debounce(function(o){var A=this.item.entities&&this.item.entities.values;if(A&&A.length>0)for(var f=0;f<A.length;f++)!A[f].label&&o?(A[f].point&&(A[f].point.show=!o),A[f].model&&(A[f].model.show=!o),A[f].billboard&&(A[f].billboard.show=!o),A[f].label=new this._cesium.LabelGraphics({text:"label",font:"30px sans-serif",style:this._cesium.LabelStyle.FILL,fillColor:this._cesium.Color.WHITE,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,show:!0,showBackground:!1,backgroundColor:new this._cesium.Color(.165,.165,.165,.8),backgroundPadding:new this._cesium.Cartesian2(7,5),scale:1,horizontalOrigin:this._cesium.HorizontalOrigin.CENTER,verticalOrigin:this._cesium.VerticalOrigin.CENTER,eyeOffset:this._cesium.Cartesian3.ZERO,pixelOffset:this._cesium.Cartesian2.ZERO,heightReference:this._cesium.HeightReference.NONE})):(A[f].label&&(A[f].label.show=o),A[f].point&&(A[f].point.show=!o),A[f].model&&(A[f].model.show=!o),A[f].billboard&&(A[f].billboard.show=!o))},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].label==null)&&o&&o.length>0&&o[0].label)return o[0].label.show}},modelShow:{set:Vi.debounce(function(o){var A=this.item.entities&&this.item.entities.values;if(A&&A.length>0)for(var f=0;f<A.length;f++)A[f].label&&(A[f].label.show=!o),A[f].point&&(A[f].point.show=!o),A[f].billboard&&(A[f].billboard.show=!o),!A[f].model&&o?A[f].model=new this._cesium.ModelGraphics({show:!0,scale:1,minimumPixelSize:0,incrementallyLoadTextures:!0,runAnimations:!0,clampAnimations:!0,shadows:this._cesium.ShadowMode.ENABLED,heightReference:this._cesium.HeightReference.NONE,color:this._cesium.Color.WHITE}):(A[f].model&&(A[f].model.show=o),A[f].label&&(A[f].label.show=!o),A[f].point&&(A[f].point.show=!o),A[f].billboard&&(A[f].billboard.show=!o))},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].model==null)&&o&&o.length>0&&o[0].model)return o[0].model.show}},modelUri:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].model==null)&&A&&A.length>0)for(var f=0;f<A.length;f++)if(A[f].model)A[f].model.uri=o;else{if(/^\[/.test(o)){var m=o.split("[");m.length>1?o=m[0]+m[1].replace(/\[/,"").replace(/\]/,""):(o=o.replace(/\[/,"").replace(/\]/,""),o=A[f].properties[o])}A[f].model=new this._cesium.ModelGraphics({uri:o,show:!0,scale:1,minimumPixelSize:0,incrementallyLoadTextures:!0,runAnimations:!0,clampAnimations:!0,shadows:this._cesium.ShadowMode.ENABLED,heightReference:this._cesium.HeightReference.NONE,color:this._cesium.Color.WHITE})}}},500)},modelScale:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){o=parseFloat(o);var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].model==null)&&A&&A.length>0&&A[0].model)for(var f=0;f<A.length;f++)/^\[/.test(o)&&(o=o.replace(/\[/,"").replace(/\]/,""),o=A[f].properties[o]),A[f].model.scale=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].model==null)&&o&&o.length>0&&o[0].model){var A=o[0].model.scale;return A?A._value:void 0}}},modelShadows:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].model==null)&&A&&A.length>0&&A[0].model)for(var f=0;f<A.length;f++)A[f].model.shadows=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].model==null)&&o&&o.length>0&&o[0].model)return o[0].model.shadows}},modelHeightReference:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].model==null)&&A&&A.length>0&&A[0].model)for(var f=0;f<A.length;f++)A[f].model.heightReference=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].model==null)&&o&&o.length>0&&o[0].model){var A=o[0].model.heightReference;return A?A._value:void 0}}},modelDistanceDisplayMaxCondition:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].model==null)&&A&&A.length>0&&A[0].model)for(var f=A[0].model.distanceDisplayCondition?A[0].model.distanceDisplayCondition._value.near:0,m=0;m<A.length;m++)A[m].model.distanceDisplayCondition=new this._cesium.DistanceDisplayCondition(f,o)}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].model==null)&&o&&o.length>0&&o[0].model)var A=o[0].model.distanceDisplayCondition?o[0].model.distanceDisplayCondition._value.far:Number.MAX_VALUE}},modelDistanceDisplayMinCondition:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].model==null)&&A&&A.length>0&&A[0].model)for(var f=A[0].model.distanceDisplayCondition?A[0].model.distanceDisplayCondition._value.far:Number.MAX_VALUE,m=0;m<A.length;m++)A[m].model.distanceDisplayCondition=new this._cesium.DistanceDisplayCondition(o,f)}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].model==null)&&o&&o.length>0&&o[0].model){var A=o[0].model.distanceDisplayCondition?o[0].model.distanceDisplayCondition._value.near:0;return A}}},modelColor:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){this._core.isnull(o)||(this._core.isHtmlColor(o)?o=this._color.colorFromHtmlColor(o):(/^rgb/.test(o)&&(o=this._color.rgbaStringToRgbaObj(o)),o.r>1&&(o.r=o.r/255),o.g>1&&(o.g=o.g/255),o.b>1&&(o.b=o.b/255),o.a>1&&(o.a=o.a/255),o=this._color.createColor(o.r,o.g,o.b,o.a)));var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].model==null)&&A&&A.length>0&&A[0].model)for(var f=0;f<A.length;f++)A[f].model.color=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].model==null)&&o&&o.length>0&&o[0].model){var A=o[0].model.color;try{return this._color.toHtmlColor("rgb("+A._value.red*255+","+A._value.green*255+","+A._value.blue*255+","+A._value.alpha*255+")")}catch{}}}},modelLightColor:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){this._core.isnull(o)||(this._core.isHtmlColor(o)?o=this._color.colorFromHtmlColor(o):(/^rgb/.test(o)&&(o=this._color.rgbaStringToRgbaObj(o)),o.r>1&&(o.r=o.r/255),o.g>1&&(o.g=o.g/255),o.b>1&&(o.b=o.b/255),o.a>1&&(o.a=o.a/255),o=this._color.createColor(o.r,o.g,o.b,o.a)));var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].model==null)&&A&&A.length>0&&A[0].model)for(var f=0;f<A.length;f++)A[f].model.lightColor=o}},100),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].model==null)&&o&&o.length>0&&o[0].model){var A=o[0].model.lightColor;try{return this._color.toHtmlColor("rgb("+A._value.red*255+","+A._value.green*255+","+A._value.blue*255+","+A._value.alpha*255+")")}catch{}}}},modelHeight:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].position==null)&&A&&A.length>0&&A[0].position)for(var f=0;f<A.length;f++){var m=this._cesium.Cartographic.fromCartesian(A[f].position._value),C=this._cesium.Math.toDegrees(m.longitude),y=this._cesium.Math.toDegrees(m.latitude),x=this._cesium.Cartesian3.fromDegrees(C,y,o);A[f].position=x}}},500),get:function(){return 0}},pointColor:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){this._core.isnull(o)||(this._core.isHtmlColor(o)?o=this._color.colorFromHtmlColor(o):(/^rgb/.test(o)&&(o=this._color.rgbaStringToRgbaObj(o)),o.r>1&&(o.r=o.r/255),o.g>1&&(o.g=o.g/255),o.b>1&&(o.b=o.b/255),o.a>1&&(o.a=o.a/255),o=this._color.createColor(o.r,o.g,o.b,o.a)));var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].point==null)&&A&&A.length>0&&A[0].point)for(var f=0;f<A.length;f++)A[f].point.color=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].point==null)&&o&&o.length>0&&o[0].point){var A=o[0].point.color;try{return this._color.toHtmlColor("rgb("+A._value.red*255+","+A._value.green*255+","+A._value.blue*255+","+A._value.alpha*255+")")}catch{}}}},pointShow:{set:Vi.debounce(function(o){var A=this.item.entities&&this.item.entities.values;if(A&&A.length>0)for(var f=0;f<A.length;f++)!A[f].point&&o?(A[f].label&&(A[f].label.show=!o),A[f].model&&(A[f].model.show=!o),A[f].billboard&&(A[f].billboard.show=!o),A[f].point=new this._cesium.PointGraphics({color:this._cesium.Color.WHITE,pixelSize:1,outlineColor:this._cesium.Color.BLACK,outlineWidth:0,show:!0})):(A[f].point&&(A[f].point.show=o),A[f].label&&(A[f].label.show=!o),A[f].model&&(A[f].model.show=!o),A[f].billboard&&(A[f].billboard.show=!o))},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].point==null)&&o&&o.length>0&&o[0].point)return o[0].point.show}},pointPixelSize:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].point==null)&&A&&A.length>0&&A[0].point)for(var f=0;f<A.length;f++)/^\[/.test(o)&&(o=o.replace(/\[/,"").replace(/\]/,""),o=A[f].properties[o]),A[f].point.pixelSize=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].point==null)&&o&&o.length>0&&o[0].point){var A=o[0].point.pixelSize;return A?A._value:void 0}}},pointOutlineColor:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){this._core.isnull(o)||(this._core.isHtmlColor(o)?o=this._color.colorFromHtmlColor(o):(/^rgb/.test(o)&&(o=this._color.rgbaStringToRgbaObj(o)),o.r>1&&(o.r=o.r/255),o.g>1&&(o.g=o.g/255),o.b>1&&(o.b=o.b/255),o.a>1&&(o.a=o.a/255),o=this._color.createColor(o.r,o.g,o.b,o.a)));var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].point==null)&&A&&A.length>0&&A[0].point)for(var f=0;f<A.length;f++)A[f].point.outlineColor=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].point==null)&&o&&o.length>0&&o[0].point){var A=o[0].point.outlineColor;try{return this._color.toHtmlColor("rgb("+A._value.red*255+","+A._value.green*255+","+A._value.blue*255+","+A._value.alpha*255+")")}catch{}}}},pointOutlineWidth:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].point==null)&&A&&A.length>0&&A[0].point)for(var f=0;f<A.length;f++)/^\[/.test(o)&&(o=o.replace(/\[/,"").replace(/\]/,""),o=A[f].properties[o]),A[f].point.outlineWidth=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].point==null)&&o&&o.length>0&&o[0].point){var A=o[0].point.outlineWidth;return A?A._value:void 0}}},pointHeightReference:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].point==null)&&A&&A.length>0&&A[0].point)for(var f=0;f<A.length;f++)A[f].point.heightReference=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].point==null)&&o&&o.length>0&&o[0].point){var A=o[0].point.heightReference;return A?A._value:void 0}}},pointDistanceDisplayMaxCondition:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].point==null)&&A&&A.length>0&&A[0].point)for(var f=A[0].point.distanceDisplayCondition?A[0].point.distanceDisplayCondition._value.near:0,m=0;m<A.length;m++)A[m].point.distanceDisplayCondition=new this._cesium.DistanceDisplayCondition(f,o),A[m].point.scaleByDistance=new this._cesium.NearFarScalar(f,1,o,0)}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].point==null)&&o&&o.length>0&&o[0].point){var A=o[0].point.distanceDisplayCondition?o[0].point.distanceDisplayCondition._value.far:Number.MAX_VALUE;return A}}},pointDistanceDisplayMinCondition:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].point==null)&&A&&A.length>0&&A[0].point)for(var f=A[0].point.distanceDisplayCondition?A[0].point.distanceDisplayCondition._value.far:Number.MAX_VALUE,m=0;m<A.length;m++)A[m].point.distanceDisplayCondition=new this._cesium.DistanceDisplayCondition(o,f),A[m].point.scaleByDistance=new this._cesium.NearFarScalar(o,1,f,0)}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].point==null)&&o&&o.length>0&&o[0].point){var A=o[0].point.distanceDisplayCondition?o[0].point.distanceDisplayCondition._value.near:0;return A}}},pointHeight:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].position==null)&&A&&A.length>0&&A[0].position)for(var f=0;f<A.length;f++){var m=this._cesium.Cartographic.fromCartesian(A[f].position._value),C=this._cesium.Math.toDegrees(m.longitude),y=this._cesium.Math.toDegrees(m.latitude),x=this._cesium.Cartesian3.fromDegrees(C,y,o);A[f].position=x}}},500),get:function(){return 0}},billboardShow:{set:Vi.debounce(function(o){var A=this.item.entities&&this.item.entities.values;if(A&&A.length>0)for(var f=0;f<A.length;f++)!A[f].billboard&&o?(A[f].point&&(A[f].point.show=!o),A[f].label&&(A[f].label.show=!o),A[f].model&&(A[f].model.show=!o),A[f].billboard=new this._cesium.BillboardGraphics({show:!0,scale:1,horizontalOrigin:this._cesium.HorizontalOrigin.CENTER,verticalOrigin:this._cesium.VerticalOrigin.CENTER,eyeOffset:this._cesium.Cartesian3.ZERO,pixelOffset:this._cesium.Cartesian2.ZERO,rotation:0,alignedAxis:this._cesium.Cartesian3.ZERO,width:void 0,height:void 0,color:this._cesium.Color.WHITE,heightReference:this._cesium.HeightReference.NONE})):(A[f].billboard&&(A[f].billboard.show=o),A[f].point&&(A[f].point.show=!o),A[f].label&&(A[f].label.show=!o),A[f].billboard&&(A[f].billboard.show=!o))},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].billboard==null)&&o&&o.length>0&&o[0].billboard)return o[0].billboard.show}},billboardImage:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].billboard==null)&&A&&A.length>0)for(var f=0;f<A.length;f++){if(/^\[/.test(o)){var m=o.split("[");m.length>1?o=m[0]+m[1].replace(/\[/,"").replace(/\]/,""):(o=o.replace(/\[/,"").replace(/\]/,""),o=A[f].properties[o])}A[f].billboard?A[f].billboard.image=o:A[f].billboard=new this._cesium.BillboardGraphics({image:o,show:!0,scale:1,horizontalOrigin:this._cesium.HorizontalOrigin.CENTER,verticalOrigin:this._cesium.VerticalOrigin.CENTER,eyeOffset:this._cesium.Cartesian3.ZERO,pixelOffset:this._cesium.Cartesian2.ZERO,rotation:0,alignedAxis:this._cesium.Cartesian3.ZERO,width:void 0,height:void 0,color:this._cesium.Color.WHITE,heightReference:this._cesium.HeightReference.NONE})}}},500)},billboardScale:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].billboard==null)&&A&&A.length>0&&A[0].billboard)for(var f=0;f<A.length;f++)A[f].billboard.scale=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].billboard==null)&&o&&o.length>0&&o[0].billboard){var A=o[0].billboard.scale;return A?A._value:void 0}}},billboardHorizontalOrigin:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].billboard==null)&&A&&A.length>0&&A[0].billboard)for(var f=0;f<A.length;f++)A[f].billboard.horizontalOrigin=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].billboard==null)&&o&&o.length>0&&o[0].billboard)return o[0].billboard.horizontalOrigin}},billboardVerticalOrigin:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].billboard==null)&&A&&A.length>0&&A[0].billboard)for(var f=0;f<A.length;f++)A[f].billboard.verticalOrigin=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].billboard==null)&&o&&o.length>0&&o[0].billboard)return o[0].billboard.verticalOrigin}},billboardWidth:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].billboard==null)&&A&&A.length>0&&A[0].billboard)for(var f=0;f<A.length;f++)A[f].billboard.width=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].billboard==null)&&o&&o.length>0&&o[0].billboard){var A=o[0].billboard.width;return A?A._value:void 0}}},billboardHeight:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].billboard==null)&&A&&A.length>0&&A[0].billboard)for(var f=0;f<A.length;f++)A[f].billboard.height=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].billboard==null)&&o&&o.length>0&&o[0].billboard){var A=o[0].billboard.height;return A?A._value:void 0}}},billboardColor:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){this._core.isnull(o)||(this._core.isHtmlColor(o)?o=this._color.colorFromHtmlColor(o):(/^rgb/.test(o)&&(o=this._color.rgbaStringToRgbaObj(o)),o.r>1&&(o.r=o.r/255),o.g>1&&(o.g=o.g/255),o.b>1&&(o.b=o.b/255),o.a>1&&(o.a=o.a/255),o=this._color.createColor(o.r,o.g,o.b,o.a)));var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].billboard==null)&&A&&A.length>0&&A[0].billboard)for(var f=0;f<A.length;f++)A[f].billboard.color=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].billboard==null)&&o&&o.length>0&&o[0].billboard){var A=o[0].billboard.color;try{return this._color.toHtmlColor("rgb("+A._value.red*255+","+A._value.green*255+","+A._value.blue*255+","+A._value.alpha*255+")")}catch{}}}},billboardHeightReference:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].billboard==null)&&A&&A.length>0&&A[0].model)for(var f=0;f<A.length;f++)A[f].billboard.heightReference=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].billboard==null)&&o&&o.length>0&&o[0].model){var A=o[0].billboard.heightReference;return A?A._value:void 0}}},billboardDistanceDisplayMaxCondition:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].billboard==null)&&A&&A.length>0&&A[0].billboard)for(var f=A[0].billboard.distanceDisplayCondition?A[0].billboard.distanceDisplayCondition._value.near:0,m=0;m<A.length;m++)A[m].billboard.distanceDisplayCondition=new this._cesium.DistanceDisplayCondition(f,o),A[m].billboard.scaleByDistance=new this._cesium.NearFarScalar(f,1,o,0)}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].billboard==null)&&o&&o.length>0&&o[0].billboard){var A=o[0].billboard.distanceDisplayCondition?o[0].billboard.distanceDisplayCondition._value.far:Number.MAX_VALUE;return A}}},billboardDistanceDisplayMinCondition:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].billboard==null)&&A&&A.length>0&&A[0].billboard)for(var f=A[0].billboard.distanceDisplayCondition?A[0].billboard.distanceDisplayCondition._value.far:Number.MAX_VALUE,m=0;m<A.length;m++)A[m].billboard.distanceDisplayCondition=new this._cesium.DistanceDisplayCondition(o,f),A[m].billboard.scaleByDistance=new this._cesium.NearFarScalar(o,1,f,0)}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].billboard==null)&&o&&o.length>0&&o[0].billboard){var A=o[0].billboard.distanceDisplayCondition?o[0].billboard.distanceDisplayCondition._value.near:0;return A}}},billboardPHeight:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].position==null)&&A&&A.length>0&&A[0].position)for(var f=0;f<A.length;f++){var m=this._cesium.Cartographic.fromCartesian(A[f].position._value),C=this._cesium.Math.toDegrees(m.longitude),y=this._cesium.Math.toDegrees(m.latitude),x=this._cesium.Cartesian3.fromDegrees(C,y,o);A[f].position=x}}},500),get:function(){return 0}}});var dI=gf;function dNi(o,A,f,m){this.UrlTemplateGeojsonProvider=new A.UrlTemplateGeojsonProvider(f,1),this.UrlTemplateGeojsonProvider.loadtitle=m,this.ent=o.imageryLayers.addImageryProvider(this.UrlTemplateGeojsonProvider)}var cle=dNi;function fNi(o,A){var f={width:o,height:A};function m(x){for(var v=Number.MAX_VALUE,E,I,w={xMin:v,yMin:v,xMax:-v,yMax:-v},Q=0,M=x.length;Q<M;Q++){var B=x[Q].getBoundingRect();E={x:B.xMin,y:B.yMin},I={x:B.xMax,y:B.yMax},w.xMin=w.xMin<E.x?w.xMin:E.x,w.yMin=w.yMin<E.y?w.yMin:E.y,w.xMax=w.xMax>I.x?w.xMax:I.x,w.yMax=w.yMax>I.y?w.yMax:I.y}return w}function C(x,v){var E=v.xMax-v.xMin,I=v.yMin-v.yMax,w=Math.abs(x[0]-v.xMin),Q=x[1]-v.yMax,M=w/E,B=Q/I,T=M*f.width,D=B*f.height;return{x:T,y:D}}function y(x,v){var E=v.xMax-v.xMin,I=v.yMin-v.yMax,w=x.x/f.width*E,Q=x.y/f.height*I;return[w,Q]}this.project=C,this.unproject=y,this.getBoundingRect=m}var idt=fNi;var Ft=null;function Ll(o,A){Ft=A,this._viewer=o,this._cesium=A,this._core=new pr(o,A),this._color=new Pn(this._viewer,this._cesium),this._tree=lt,this.item={show:!0},this._option=void 0,this._primitive=void 0,this._Provider=void 0,this.Legend=[],this.datas=[],this.models=0,this.entity=null,this.primitve=[],this.probj=[],this.PrimitiveData=[],this.loadFinishKey=[],this.loadAllKey=[],this.PrimitiveObj={key:"",data:{}},this.start=0,this.Primitivekey=[],this.tilesLength=0,this.returnCount=0,this._primitiveByTile={},this._primitiveCollection=new this._cesium.PrimitiveCollection,this.img=null,this._defaultStyle=null,this._canvas=null,this._context=null,this._cache=!1,this._forceRefreshPrvimitive=null}function hle(o){if(Array.isArray(o)){for(var A=0,f=Array(o.length);A<o.length;A++)f[A]=o[A];return f}else return Array.from(o)}function rdt(o,A){var f=[];return o.level>=A?gNi(o,A,f):ndt(o,A,f),f}function gNi(o,A,f){for(var m=o,C=0;C<30;C++){if(m.level==A)return f.push({x:m.x,y:m.y,level:m.level}),!0;m=m.parent}return!0}function ndt(o,A,f){if(o.level==A)return f.push({x:o.x,y:o.y,level:o.level}),!0;if(o.level>A)return!1;for(var m=0;m<o.children.length;m++)ndt(o.children[m],A,f);return!0}var pNi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o};Ll.prototype._serialize=function(o){var A=[],f=window.encodeURIComponent;for(var m in o){var C=o[m];(typeof C>"u"?"undefined":pNi(C))==="object"?A.push(f(m)+"="+f(JSON.stringify(C))):A.push(f(m)+"="+f(o[m]))}return A.join("&")};Ll.prototype.createHistogramVectorGeoJsonFeatureLayer=function(o,A,f,m,C,y){var x={radius:50,height:100,scale:1,defaultColor:"#ffffff",showLabel:!0,label:{showBackground:!1,fillColor:"#ffffff",outlineColor:"#000000",backgroundColor:"rgba(0,0,0,0.5)",style:2,horizontalOrigin:Ft.HorizontalOrigin.CENTER,verticalOrigin:Ft.VerticalOrigin.BOTTOM,outlineWidth:1,font:"20px \u5FAE\u8F6F\u96C5\u9ED1"},alpha:.5,level_max:20,level_min:10},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:this._core.defaultValue(A.srs,"EPSG:4490")+":{z}",TILEMATRIXSET:this._core.defaultValue(A.srs,"EPSG:4490"),FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit};f.label&&(x.label=this._core.extend(x.label,f.label,!0),delete f.label);let E=this._core.extend(x,f,!0);A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");let I;Array.isArray(E.color)&&(I={name:E.color[0].name,value:{">":{},"<":{}}},E.color.forEach(L=>{if(L.value.indexOf&&L.value.indexOf(">")>-1){let R=L.value.split(">");I.value[">"][R[1]]=Ft.Color.fromCssColorString(L.color).withAlpha(E.alpha)}else if(L.value.indexOf&&L.value.indexOf("<")>-1){let R=L.value.split("<");I.value["<"][R[1]]=Ft.Color.fromCssColorString(L.color).withAlpha(E.alpha)}else I.value[L.value]=Ft.Color.fromCssColorString(L.color).withAlpha(E.alpha)}));let w=Ft.Color.fromCssColorString(E.defaultColor).withAlpha(E.alpha);var Q=this,M={text:"",...E.label,fillColor:Ft.Color.fromCssColorString(E.label.fillColor),outlineColor:Ft.Color.fromCssColorString(E.label.outlineColor),backgroundColor:Ft.Color.fromCssColorString(E.label.backgroundColor)};this._urlTemplate=A.url+"?"+this._serialize(v.urlParams);var B=A.url+"?"+this._serialize(v.urlParams);this._Provider=new Ts(this._viewer,this._cesium),this._Provider._normalTile=f.level_max-1,this._Provider._minimumHeight=0,this._Provider.loadTile=function(L,R){(function(k,U,V){if(U.state===Ft.QuadtreeTileLoadState.START){if(U.data={lines:[],geometryPrimitive:void 0},U.level>=f.level_min&&U.level<f.level_max&&V.item.show){var H=B.replace(window.encodeURIComponent("{x}"),U.x).replace(window.encodeURIComponent("{y}"),U.y).replace(window.encodeURIComponent("{z}"),U.level);V._cache&&(H+="&"+V._core.getuid());let q=[],ie=[],Z=new Ft.LabelCollection;Ft.GeoJsonDataSource.load(H).then(ne=>{let se=ne.entities.values;if(!se||!se.length){U.state=Ft.QuadtreeTileLoadState.DONE,U.renderable=!0;return}let ce=new Ft.PrimitiveCollection;if(se.forEach(j=>{let de=j.properties.getValue(),me=E.height;if(de&&typeof E.height=="string"&&/^\[/.test(E.height)&&/\]$/.test(E.height)){let Y=E.height.replace(/\[/,"").replace(/\]/,"");me=de[Y]||100}let _e=me*E.scale,Be;if(de&&typeof E.color=="string"&&/^\[/.test(E.color)&&/\]$/.test(E.color)){let Y=E.color.replace(/\[/,"").replace(/\]/,"");Y=de[Y]||E.defaultColor,Be=Ft.Color.fromCssColorString(Y).withAlpha(E.alpha)}else if(I&&de[I.name]){let Y=de[I.name];if(I.value[Y])Be=I.value[Y];else{for(let he in I.value[">"])if(Y>he){Be=I.value[">"][he];break}if(!Be){for(let he in I.value["<"])if(Y<he){Be=I.value["<"][he];break}}}}!Be&&(Be=w.clone());let Qe;if(j.polygon){let Y=j.polygon.hierarchy.getValue().positions;Qe=Ft.BoundingSphere.fromPoints(Y).center;var Ie=new Ft.PolygonGeometry({polygonHierarchy:new Ft.PolygonHierarchy(Y),height:0,extrudedHeight:0,vertexFormat:Ft.VertexFormat.DEFAULT,perPositionHeight:!1}),ve=new Ft.GeometryInstance({id:de,geometry:Ie,attributes:{color:new Ft.ColorGeometryInstanceAttribute.fromColor(Be)}});q.push(ve)}else(j.point||j.billboard)&&(Qe=j.position.getValue());let K=new Ft.GeometryInstance({geometry:new Ft.EllipseGeometry({extrudedHeight:_e,center:Qe,semiMinorAxis:E.radius,semiMajorAxis:E.radius,vertexFormat:Ft.VertexFormat.POSITION_AND_ST}),id:de}),W=Ft.Material.fromType("Color");W.uniforms.color=Be.withAlpha(1);let te=new Ft.Primitive({geometryInstances:K,appearance:new Ft.EllipsoidSurfaceAppearance({material:W}),shadows:E.shadows});if(ce.add(te),E.showLabel){let Y=V._core.toDegrees(Qe);M.text=E.value?E.value(me,de):me+"",M.position=Ft.Cartesian3.fromDegrees(Y.lon,Y.lat,_e*1.1),M.useColorConfig&&(M.fillColor=Be),Z.add(M)}}),q.length){let j=new Ft.GroundPrimitive({geometryInstances:q,appearance:new Ft.PerInstanceColorAppearance({translucent:E.alpha<1}),classificationType:Ft.ClassificationType.BOTH,shadows:E.shadows});ce.add(j)}E.showLabel&&ce.add(Z),V.probj.push(ce),U.data.geometryPrimitive=ce,U.state=Ft.QuadtreeTileLoadState.LOADING,U.state===Ft.QuadtreeTileLoadState.LOADING&&(U.data.geometryPrimitive.update(k,[]),U.state=Ft.QuadtreeTileLoadState.DONE,U.renderable=!0)},ne=>{U.count==null&&(U.count=0),U.count+=1,U.count>=2?(U.state=Ft.QuadtreeTileLoadState.DONE,U.renderable=!0):U.state=Ft.QuadtreeTileLoadState.START})}else{U.state=Ft.QuadtreeTileLoadState.DONE,U.renderable=!0;return}U.state=Ft.QuadtreeTileLoadState.LOADING}})(L,R,Q)},this._primitive=new Ft.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:5});var T=this._viewer.scene,D=T.primitives;D.add(this._primitive),C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var F={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this._Provider.treeID=F.id,this.setTreeobj(F),this._tree.insertGroupId(F,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.createLaycolorVectorGeoJsonFeatureLayer=function(o,A,f,m,C,y){var x={type:"2D",height:100,scale:1,defaultColor:"#ffffff",alpha:.5,level_max:20,level_min:10},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:this._core.defaultValue(A.srs,"EPSG:4490")+":{z}",TILEMATRIXSET:this._core.defaultValue(A.srs,"EPSG:4490"),FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit};let E=this._core.extend(x,f,!0);A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");let I;Array.isArray(E.color)&&(I={name:E.color[0].name,value:{">":{},"<":{}}},E.color.forEach(F=>{if(F.value.indexOf&&F.value.indexOf(">")>-1){let L=F.value.split(">");I.value[">"][L[1]]=Ft.Color.fromCssColorString(F.color).withAlpha(E.alpha)}else if(F.value.indexOf&&F.value.indexOf("<")>-1){let L=F.value.split("<");I.value["<"][L[1]]=Ft.Color.fromCssColorString(F.color).withAlpha(E.alpha)}else I.value[F.value]=Ft.Color.fromCssColorString(F.color).withAlpha(E.alpha)}));let w=Ft.Color.fromCssColorString(E.defaultColor).withAlpha(E.alpha);var Q=this;this._urlTemplate=A.url+"?"+this._serialize(v.urlParams);var M=A.url+"?"+this._serialize(v.urlParams);this._Provider=new Ts(this._viewer,this._cesium),this._Provider._normalTile=f.level_max-1,this._Provider._minimumHeight=0,this._Provider.loadTile=function(F,L){(function(R,k,U){if(k.state===Ft.QuadtreeTileLoadState.START){if(k.data={lines:[],geometryPrimitive:void 0},k.level>=f.level_min&&k.level<f.level_max&&U.item.show){var V=M.replace(window.encodeURIComponent("{x}"),k.x).replace(window.encodeURIComponent("{y}"),k.y).replace(window.encodeURIComponent("{z}"),k.level);U._cache&&(V+="&"+U._core.getuid());let H=[];Ft.GeoJsonDataSource.load(V).then(ie=>{let Z=ie.entities.values;if(!Z||!Z.length){k.state=Ft.QuadtreeTileLoadState.DONE,k.renderable=!0;return}Z.forEach(ne=>{let se=ne.properties.getValue(),ce,j;if(E.type==="3D"){if(ce=E.height,se&&typeof E.height=="string"&&/^\[/.test(E.height)&&/\]$/.test(E.height)){let Be=E.height.replace(/\[/,"").replace(/\]/,"");ce=se[Be]||100}j=ce*E.scale}let de;if(se&&typeof E.color=="string"&&/^\[/.test(E.color)&&/\]$/.test(E.color)){let Be=E.color.replace(/\[/,"").replace(/\]/,"");Be=se[Be]||E.defaultColor,de=Ft.Color.fromCssColorString(Be).withAlpha(E.alpha)}else if(I&&se[I.name]){let Be=se[I.name];if(I.value[Be])de=I.value[Be];else{for(let Qe in I.value[">"])if(Be>Qe){de=I.value[">"][Qe];break}if(!de){for(let Qe in I.value["<"])if(Be<Qe){de=I.value["<"][Qe];break}}}}if(!de&&(de=w.clone()),ne.polygon){let Be=ne.polygon.hierarchy.getValue().positions;var me=new Ft.PolygonGeometry({polygonHierarchy:new Ft.PolygonHierarchy(Be),height:0,extrudedHeight:E.type==="3D"?j:0,vertexFormat:Ft.VertexFormat.DEFAULT,perPositionHeight:!1}),_e=new Ft.GeometryInstance({id:se,geometry:me,attributes:{color:new Ft.ColorGeometryInstanceAttribute.fromColor(de)}});H.push(_e)}});let oe;if(H.length){let ne=E.type==="3D"?Ft.Primitive:Ft.GroundPrimitive;oe=new ne({geometryInstances:H,appearance:new Ft.PerInstanceColorAppearance({translucent:E.alpha<1}),classificationType:Ft.ClassificationType.BOTH,shadows:E.shadows})}U.probj.push(oe),k.data.geometryPrimitive=oe,k.state=Ft.QuadtreeTileLoadState.LOADING,k.state===Ft.QuadtreeTileLoadState.LOADING&&(k.data.geometryPrimitive.update(R,[]),k.state=Ft.QuadtreeTileLoadState.DONE,k.renderable=!0)},ie=>{k.count==null&&(k.count=0),k.count+=1,k.count>=2?(k.state=Ft.QuadtreeTileLoadState.DONE,k.renderable=!0):k.state=Ft.QuadtreeTileLoadState.START})}else{k.state=Ft.QuadtreeTileLoadState.DONE,k.renderable=!0;return}k.state=Ft.QuadtreeTileLoadState.LOADING}})(F,L,Q)},this._primitive=new Ft.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:5});var B=this._viewer.scene,T=B.primitives;T.add(this._primitive),C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var D={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this._Provider.treeID=D.id,this.setTreeobj(D),this._tree.insertGroupId(D,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.createVector3DTilesFeatureLayer=function(o,A,f,m,C,y){var x={color:"#ffffff",level_max:20,level_min:10,tilingScheme:new Ft.WebMercatorTilingScheme},v={url:A.url,_x:A._x||0,_y:A._y||0,upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit};let E=this._core.extend(x,f,!0);A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");var I=this;this._urlTemplate=A.url;var w=A.url;this._Provider=new Ts(this._viewer,this._cesium,E.tilingScheme),this._Provider._normalTile=f.level_max-1,this._Provider._minimumHeight=0,this._Provider.loadTile=function(T,D){(function(F,L,R){if(L.state===Ft.QuadtreeTileLoadState.START){if(L.data={lines:[],geometryPrimitive:void 0},L.level>=f.level_min&&L.level<f.level_max&&R.item.show){var k=w.replace("{x}",L.x-v._x).replace("{y}",L.y-v._y).replace("{z}",L.level);R._cache&&(k+="&"+R._core.getuid());let V=new Ft.Cesium3DTileset({url:k,...E}).readyPromise.then(function(H){R.probj.push(H),L.data.geometryPrimitive=H,R._viewer.scene.primitives.add(H),L.state=Ft.QuadtreeTileLoadState.LOADING,L.state===Ft.QuadtreeTileLoadState.LOADING&&(L.data.geometryPrimitive.update(F,[]),L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0)});V.catch&&V.catch(function(H){L.count==null&&(L.count=0),L.count+=1,L.count>=2?(L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0):L.state=Ft.QuadtreeTileLoadState.START}),V.otherwise&&V.otherwise(function(H){L.count==null&&(L.count=0),L.count+=1,L.count>=2?(L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0):L.state=Ft.QuadtreeTileLoadState.START})}else{L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0;return}L.state=Ft.QuadtreeTileLoadState.LOADING}})(T,D,I)},this._primitive=new Ft.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:5});var Q=this._viewer.scene,M=Q.primitives;M.add(this._primitive),C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id);var B={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"modelLayer",item:this,url:A.url,style:f};return this._Provider.treeID=B.id,this.setTreeobj(B),this._tree.insertGroupId(B,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.createVector3DTilesFeatureLayerRelease=function(o,A,f,m,C,y){var x={color:"#ffffff",level_max:20,level_min:10,tilingScheme:new Ft.WebMercatorTilingScheme},v={url:A.url,_x:A._x||0,_y:A._y||0,upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit};let E=this._core.extend(x,f,!0);A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");var I=this;I.models=0,this._urlTemplate=A.url;var w=A.url;this._Provider=new Ts(this._viewer,this._cesium,E.tilingScheme),this._Provider._normalTile=f.level_max-1,this._Provider._minimumHeight=0,this._Provider.loadTile=function(T,D){(function(F,L,R){if(L.state===Ft.QuadtreeTileLoadState.START){if(L.data={lines:[],geometryPrimitive:void 0},L.level>=f.level_min&&L.level<f.level_max&&R.item.show){var k=w.replace("{x}",L.x-v._x).replace("{y}",L.y-v._y).replace("{z}",18);R._cache&&(k+="&"+R._core.getuid());let V=new Ft.Cesium3DTileset({url:k,...E}).readyPromise.then(function(H){L.freeResources=function(){L.state=0,L.renderable=!1,L.upsampledFromParent=!1,Ft.defined(L.data)&&Ft.defined(L.data.freeResources)&&L.data.freeResources(),Ft.defined(this.data)&&Ft.defined(this.data.geometryPrimitive)&&L._level>=18&&(this.data.geometryPrimitive.destroy(),this.data.geometryPrimitive=void 0),q(L._southwestChild),L._southwestChild=void 0,q(L._southeastChild),L._southeastChild=void 0,q(L._northwestChild),L._northwestChild=void 0,q(L._northeastChild),L._northeastChild=void 0};function q(ie){Ft.defined(ie)&&ie.freeResources()}R.probj.push(H),R._viewer.scene.primitives.add(H),L.state=Ft.QuadtreeTileLoadState.LOADING,L.state===Ft.QuadtreeTileLoadState.LOADING&&(L.data.geometryPrimitive.update(F,[]),L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0)});V.catch&&V.catch(function(H){L.count==null&&(L.count=0),L.count+=1,L.count>=2?(L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0):L.state=Ft.QuadtreeTileLoadState.START}),V.otherwise&&V.otherwise(function(H){L.count==null&&(L.count=0),L.count+=1,L.count>=2?(L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0):L.state=Ft.QuadtreeTileLoadState.START})}else{L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0;return}L.state=Ft.QuadtreeTileLoadState.LOADING}})(T,D,I)},this._primitive=new Ft.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:5});var Q=this._viewer.scene,M=Q.primitives;M.add(this._primitive),C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id);var B={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"modelLayer",item:this,url:A.url,style:f};return this._Provider.treeID=B.id,this.setTreeobj(B),this._tree.insertGroupId(B,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.VectorGeoJsonFeatureLayer=function(o,A,f,m,C,y){var x=this._core.VectorSlice(A,this._cesium),v=new IA(this._viewer,this._cesium,x),E=this;this._Provider=v,v._loadTile=function(w){var Q=new Ft.PrimitiveCollection,M=new Ft.PointPrimitiveCollection,B=new Ft.LabelCollection,T=new Ft.BillboardCollection,D=[],F=[],L=-1;return w.features.forEach(function(R){var k=[];if(f.lable!=null&&R.geometry.coordinates[0][0]==null){var U=0;if(f.lable.height!=null&&/^\[/.test(f.lable.height)&&/\]$/.test(f.lable.height)){var V=f.lable.height.replace(/\[/,"").replace(/\]/,"");U=parseFloat(R.properties[V])}var H=E._core.StyleContrast("lable",f.lable,Ft);H.fillColor=E._color.VectorColorTransformation(H.fillColor,R),H.outlineColor=E._color.VectorColorTransformation(H.outlineColor,R),H.backgroundColor=E._color.VectorColorTransformation(H.backgroundColor,R),H.text=E._core.Analysis(H.text,R),H.position=new Ft.Cartesian3.fromDegrees(R.geometry.coordinates[0],R.geometry.coordinates[1],U),B.add(H)}if(f.billboard!=null&&R.geometry.coordinates[0][0]==null){var U=0,q=f.billboard;if(q.height!=null&&/^\[/.test(q.height)&&/\]$/.test(q.height)){var V=q.height.replace(/\[/,"").replace(/\]/,"");U=parseFloat(R.properties[V])}var ie=E._core.StyleContrast("billboard",q,Ft);ie.position=new Ft.Cartesian3.fromDegrees(R.geometry.coordinates[0],R.geometry.coordinates[1],U),T.add(ie)}if(f.point!=null&&R.geometry.coordinates[0][0]==null){var U=0,q=f.point;if(q.height!=null&&/^\[/.test(q.height)&&/\]$/.test(q.height)){var V=q.height.replace(/\[/,"").replace(/\]/,"");U=parseFloat(R.properties[V])}var ie=E._core.StyleContrast("point",q,Ft);ie.position=new Ft.Cartesian3.fromDegrees(R.geometry.coordinates[0],R.geometry.coordinates[1],U),ie.color=E._color.VectorColorTransformation(ie.color,R),ie.outlineColor=E._color.VectorColorTransformation(ie.outlineColor,R),M.add(ie)}if(f.polyline!=null){var U=0,q=f.polyline;if(q.height!=null&&/^\[/.test(q.height)&&/\]$/.test(q.height)){var V=q.height.replace(/\[/,"").replace(/\]/,"");U=parseFloat(R.properties[V])}var ie=E._core.StyleContrast("polyline",q,Ft);if(L=ie.classificationType,delete ie.classificationType,Array.isArray(R.geometry.coordinates)&&R.geometry.coordinates.length>0)if(Array.isArray(R.geometry.coordinates[0][0]))for(var Z=0;Z<R.geometry.coordinates.length;Z++){k=[],k=E._core.coordinate(k,R.geometry.coordinates[Z]),ie.positions=Ft.Cartesian3.fromDegreesArray(k);var oe=E._core.createPolyline(ie,L,R,Ft);D.push(oe)}else{k=E._core.coordinate(k,R.geometry.coordinates),ie.positions=Ft.Cartesian3.fromDegreesArray(k);var oe=E._core.createPolyline(ie,L,R,Ft);D.push(oe)}}if(f.polygon!=null){var U=0,q=f.polygon;if(q.height!=null&&/^\[/.test(q.height)&&/\]$/.test(q.height)){var V=q.height.replace(/\[/,"").replace(/\]/,"");U=parseFloat(R.properties[V])}var ie=E._core.StyleContrast("polygon",q,Ft);if(ie.material=E._color.VectorColorTransformation(ie.material,R),L=ie.classificationType,delete ie.classificationType,Array.isArray(R.geometry.coordinates)&&R.geometry.coordinates.length>0)if(Array.isArray(R.geometry.coordinates[0][0]))for(var Z=0;Z<R.geometry.coordinates.length;Z++){k=[],R.geometry.coordinates[Z].pop(),k=E._core.coordinate(k,R.geometry.coordinates[Z]),ie.polygonHierarchy=new Ft.PolygonHierarchy(Ft.Cartesian3.fromDegreesArray(k));var oe=E._core.createPolygon(ie,L,R,Ft);F.push(oe)}else{k=E._core.coordinate(k,R.geometry.coordinates),ie.polygonHierarchy=new Ft.PolygonHierarchy(Ft.Cartesian3.fromDegreesArray(k));var oe=E._core.createPolygon(ie,L,R,Ft);F.push(oe)}}}),Q.add(B),Q.add(T),Q.add(M),D.length>0&&(L!=-1?Q.add(new Ft.GroundPolylinePrimitive({geometryInstances:D,classificationType:L,appearance:new Ft.PolylineMaterialAppearance})):Q.add(new Ft.Primitive({geometryInstances:D,appearance:new Ft.PolylineMaterialAppearance}))),F.length>0&&(L!=-1?Q.add(new Ft.GroundPrimitive({geometryInstances:F,classificationType:L,appearance:new Ft.PerInstanceColorAppearance({translucent:!0,vertexShaderSource:E._core.Shaders("vertexShaderSource"),fragmentShaderSource:E._core.Shaders("fragmentShaderSource")})})):Q.add(new Ft.Primitive({geometryInstances:F,appearance:new Ft.PerInstanceColorAppearance({translucent:!0,vertexShaderSource:E._core.Shaders("vertexShaderSource"),fragmentShaderSource:E._core.Shaders("fragmentShaderSource")})}))),Q},this.item=v._primitiveCollection,v.addTo(this._viewer),C||this.setVisibility(!1),this._core.isnull(f.id)&&(f.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+f.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var I={id:f.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"Vector",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this.setTreeobj(I),this._tree.insertGroupId(I,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.createVolumeVectorGeoJsonFeatureLayerJCDthOptimizationxp=function(o,A,f,m,C,y){var x={show:!0,positions:[],shape:void 0,cornerType:this._cesium.CornerType.ROUNDED,granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.DISABLED,level_max:20,level_min:10},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a)))),this._option=this._core.extend(x,f,!0),A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");var E={polygonHierarchy:void 0,height:0,extrudedHeight:0,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,perPositionHeight:!1,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.RED},I=this;this._urlTemplate=A.url+"?"+this._serialize(v.urlParams);var w=A.url+"?"+this._serialize(v.urlParams);this._Provider=new Ts(this._viewer,this._cesium),this._Provider._normalTile=f.level_max-1,this._Provider.loadTile=function(T,D){(function(F,L,R){if(L.state===Ft.QuadtreeTileLoadState.START){if(L.data={lines:[],geometryPrimitive:void 0},L.level>=f.level_min&&L.level<f.level_max&&R.item.show){var k=w.replace(window.encodeURIComponent("{x}"),L.x).replace(window.encodeURIComponent("{y}"),L.y).replace(window.encodeURIComponent("{z}"),L.level);R._cache&&(k+="&"+R._core.getuid()),R._core.xhr({url:k,type:"get",dataType:"json",success:function(U){if(U==null){L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0;return}var V=[],H=[];R.Legend=[];function q(j){for(var de=0;de<j.length;de++)Array.isArray(j[de])?q(j[de]):oe.push(j[de])}function ie(){if(/^\[/.test(R._option.extrudedHeight)&&/\]$/.test(R._option.extrudedHeight)){var j=R._option.extrudedHeight.replace(/\[/,"").replace(/\]/,"");E.extrudedHeight=parseFloat(ne.properties[j])}if(E.material=R._option.material,/^\[/.test(R._option.material)&&/\]$/.test(R._option.material)){var de=R._option.material.replace(/\[/,"").replace(/\]/,"");E.material=ne.properties[de],R._core.isHtmlColor(E.material)?E.material=R._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=R._color.rgbaStringToRgbaObj(E.material)),E.material.red>1&&(E.material.red=E.material.red/255),E.material.green>1&&(E.material.green=E.material.green/255),E.material.blue>1&&(E.material.blue=E.material.blue/255),E.material.alpha>1&&(E.material.a=E.material.alpha/255),E.material=R._color.createColor(E.material.red,E.material.green,E.material.blue,E.material.alpha))}else R._option.material&&(E.material=R._option.material),E.material&&(R._core.isHtmlColor(E.material)?E.material=R._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=R._color.rgbaStringToRgbaObj(E.material)),E.material.red>1&&(E.material.red=E.material.red/255),E.material.green>1&&(E.material.green=E.material.green/255),E.material.blue>1&&(E.material.blue=E.material.blue/255),E.material.alpha>1&&(E.material.a=E.material.alpha/255),E.material=R._color.createColor(E.material.red,E.material.green,E.material.blue,E.material.alpha)));if(oe.length>=2){var me=Ft.Cartesian3.fromDegreesArray(oe);E.polygonHierarchy=new Ft.PolygonHierarchy(me);var _e=new Ft.PolygonGeometry(E),Be=new Ft.GeometryInstance({id:ne,geometry:_e,attributes:{color:new Ft.ColorGeometryInstanceAttribute.fromColor(E.material)}}),Qe="material:"+E.material.red*255+","+E.material.green*255+","+E.material.blue*255;R.Legend.push(Qe),V.push(Be)}}for(var Z=0;Z<U.features.length;Z++){var oe=[],ne=U.features[Z];if(Array.isArray(ne.geometry.coordinates)&&ne.geometry.coordinates.length>0)if(Array.isArray(ne.geometry.coordinates[0][0]))for(var se=0;se<ne.geometry.coordinates.length;se++)oe=[],ne.geometry.coordinates[se].pop(),q(ne.geometry.coordinates[se]),ie(oe);else q(ne.geometry.coordinates),ie(oe)}V.length==0&&(L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0);var ce=new Ft.Primitive({geometryInstances:V,appearance:new Ft.PerInstanceColorAppearance({translucent:!1,vertexShaderSource:R._core.Shaders("vertexShaderSource"),fragmentShaderSource:R._core.Shaders("fragmentShaderSource")}),shadows:R._option.shadows});L.data.geometryPrimitive=ce,L.state=Ft.QuadtreeTileLoadState.LOADING,L.state===Ft.QuadtreeTileLoadState.LOADING&&(L.data.geometryPrimitive.update(F,[]),L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0)},error:function(){L.count==null&&(L.count=0),L.count+=1,L.count>=2?(L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0):L.state=Ft.QuadtreeTileLoadState.START}})}else{L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0;return}L.state=Ft.QuadtreeTileLoadState.LOADING}})(T,D,I)},this._primitive=new Ft.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:3});var Q=this._viewer.scene,M=Q.primitives;M.add(this._primitive),C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var B={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this.setTreeobj(B),this._tree.insertGroupId(B,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.VolumeVectorGeoJsonFeatureLayerOptimization1ss=function(o,A,f,m,C,y){var x={show:!0,positions:[],shape:void 0,cornerType:this._cesium.CornerType.ROUNDED,granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.DISABLED,level_max:20,level_min:10},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a)))),this._option=this._core.extend(x,f,!0),A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");var E=[],I={polygonHierarchy:void 0,height:0,extrudedHeight:0,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,perPositionHeight:!1,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.RED},w=this;this._urlTemplate=A.url+"?"+this._serialize(v.urlParams),this._Provider=new Ts(this._viewer,this._cesium),this._Provider._normalTile=f.level_max-1,this._Provider.loadTile=function(T,D){if(this.tile=null,this.tile=D,D.state===this._cesium.QuadtreeTileLoadState.START&&w.item.show){var F="z"+D.level+"x"+D.x+"y"+D.y;if(D.data={lines:[],geometryPrimitive:void 0},D.level>=f.level_min&&D.level<f.level_max&&w.item.show){var L=Vi.filter(E,function(q){return q.x==D.x&&q.y==D.y&&q.level==D.level});if(L.length!=0&&L[0].data&&L[0].data.length>0){D.data.geometryPrimitive=new Ft.Primitive({geometryInstances:L[0].data,appearance:new Ft.PerInstanceColorAppearance({flat:!0,translucent:!0,faceForward:!0,closed:!0}),shadows:Ft.ShadowMode.ENABLED}),D.state=Ft.QuadtreeTileLoadState.LOADING,D.state===Ft.QuadtreeTileLoadState.LOADING&&(D.data.geometryPrimitive&&(D.state=Ft.QuadtreeTileLoadState.DONE),D.renderable=!0);return}if(w.PrimitiveData.length>0){for(var R=0;R<w.PrimitiveData.length;R++)if(w.PrimitiveData[R].key==F){w.Primitivekey.includes(F)||w.Primitivekey.push(F);return}}if(!w.Primitivekey.includes(F)){w.Primitivekey.push(F),E.push({level:D.level,x:D.x,y:D.y,data:void 0});for(var k=w._option.level_min+(w._option.level_max-w._option.level_min)/2,U=rdt(D,k),R=0;R<U.length;R++){var V=U[R],H="z"+V.level+"x"+V.x+"y"+V.y;w.loadAllKey.includes(H)||(w.loadAllKey.push(H),function(ie){var Z=w._urlTemplate.replace(window.encodeURIComponent("{x}"),ie.x).replace(window.encodeURIComponent("{y}"),ie.y).replace(window.encodeURIComponent("{z}"),ie.level);w.tilesLength++,w._cache&&(Z+="&"+w._core.getuid());var oe="z"+ie.level+"x"+ie.x+"y"+ie.y;w._core.xhr({url:Z,type:"get",dataType:"json",success:function(ne){var se=[],ce=[];w.Legend=[];function j(K){for(var W=0;W<K.length;W++)Array.isArray(K[W])?j(K[W]):_e.push(K[W])}function de(){if(/^\[/.test(w._option.extrudedHeight)&&/\]$/.test(w._option.extrudedHeight)){var K=w._option.extrudedHeight.replace(/\[/,"").replace(/\]/,"");I.extrudedHeight=parseFloat(Be.properties[K])}if(I.material=w._option.material,/^\[/.test(w._option.material)&&/\]$/.test(w._option.material)){var W=w._option.material.replace(/\[/,"").replace(/\]/,"");I.material=Be.properties[W],w._core.isHtmlColor(I.material)?I.material=w._color.colorFromHtmlColor(I.material):(/^rgb/.test(I.material)&&(I.material=w._color.rgbaStringToRgbaObj(I.material)),I.material.red>1&&(I.material.red=I.material.red/255),I.material.green>1&&(I.material.green=I.material.green/255),I.material.blue>1&&(I.material.blue=I.material.blue/255),I.material.alpha>1&&(I.material.a=I.material.alpha/255),I.material=w._color.createColor(I.material.red,I.material.green,I.material.blue,I.material.alpha))}else w._option.material&&(I.material=w._option.material),I.material&&(w._core.isHtmlColor(I.material)?I.material=w._color.colorFromHtmlColor(I.material):(/^rgb/.test(I.material)&&(I.material=w._color.rgbaStringToRgbaObj(I.material)),I.material.red>1&&(I.material.red=I.material.red/255),I.material.green>1&&(I.material.green=I.material.green/255),I.material.blue>1&&(I.material.blue=I.material.blue/255),I.material.alpha>1&&(I.material.a=I.material.alpha/255),I.material=w._color.createColor(I.material.red,I.material.green,I.material.blue,I.material.alpha)));if(_e.length>=2){var te=Ft.Cartesian3.fromDegreesArray(_e);I.polygonHierarchy=new Ft.PolygonHierarchy(te);var Y=new Ft.PolygonGeometry(I),he=new Ft.GeometryInstance({id:Be,geometry:Y,attributes:{color:new Ft.ColorGeometryInstanceAttribute.fromColor(I.material)}}),fe="material:"+I.material.red*255+","+I.material.green*255+","+I.material.blue*255;w.Legend.push(fe),se.push(he)}}for(var me=0;me<ne.features.length;me++){var _e=[],Be=ne.features[me];if(Array.isArray(Be.geometry.coordinates)&&Be.geometry.coordinates.length>0)if(Array.isArray(Be.geometry.coordinates[0][0]))for(var Qe=0;Qe<Be.geometry.coordinates.length;Qe++)_e=[],Be.geometry.coordinates[Qe].pop(),j(Be.geometry.coordinates[Qe]),de(_e);else j(Be.geometry.coordinates),de(_e)}if(se.length>0){var Ie=new Ft.Primitive({geometryInstances:se,appearance:new Ft.PerInstanceColorAppearance({translucent:!1,vertexShaderSource:w._core.Shaders("vertexShaderSource"),fragmentShaderSource:w._core.Shaders("fragmentShaderSource")}),shadows:w._option.shadows}),ve={level:ie.level,key:oe,data:Ie};w.probj.push(Ie),w.loadFinishKey.push(oe),w.PrimitiveData.push(ve),w._viewer.scene.primitives.add(Ie),w.returnCount++}},error:function(){},complete:function(ne,se){}})}(V))}}}else{D.state=Ft.QuadtreeTileLoadState.LOADING,D.state===Ft.QuadtreeTileLoadState.LOADING&&(D.data.geometryPrimitive&&(D.state=Ft.QuadtreeTileLoadState.DONE),D.renderable=!0);return}}},this._primitive=new Ft.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:3});var Q=this._viewer.scene,M=Q.primitives;M.add(this._primitive),C||this.setVisibility(!1),this._core.isnull(I.id)&&(I.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+I.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var B={id:I.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};this.setTreeobj(B),this._tree.insertGroupId(B,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item)};Ll.prototype.VolumeVectorGeoJsonFeatureLayerGis=function(o,A,f,m,C,y){var x={show:!0,positions:[],shape:void 0,cornerType:this._cesium.CornerType.ROUNDED,granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.DISABLED,level_max:20,level_min:10},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a)))),this._option=this._core.extend(x,f,!0),A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");var E=[],I=[],w={id:A.id,polygonHierarchy:void 0,height:0,extrudedHeight:0,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,perPositionHeight:!1,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.RED},Q=this;this._urlTemplate=A.url+"/"+window.encodeURIComponent("{z}")+"/"+window.encodeURIComponent("{x}")+"/"+window.encodeURIComponent("{reverseY}")+".json",this._Provider=new Ts(this._viewer,this._cesium),this._Provider._normalTile=f.level_max-1,this._Provider.loadTile=function(D,F){if(this.tile=null,this.tile=F,F.state===this._cesium.QuadtreeTileLoadState.START&&Q.item.show){var L="z"+F.level+"x"+F.x+"y"+F.y;if(F.data={lines:[],geometryPrimitive:void 0},F.level>=f.level_min&&F.level<f.level_max&&Q.item.show){var R=Vi.filter(E,function(U){return U.x==F.x&&U.y==F.y&&U.level==F.level});if(R.length!=0&&R[0].data&&R[0].data.length>0){F.data.geometryPrimitive=new Ft.Primitive({geometryInstances:R[0].data,appearance:new Ft.PerInstanceColorAppearance({flat:!0,translucent:!0,faceForward:!0,closed:!0}),shadows:Ft.ShadowMode.ENABLED}),F.state=Ft.QuadtreeTileLoadState.LOADING,F.state===Ft.QuadtreeTileLoadState.LOADING&&(F.data.geometryPrimitive&&(F.state=Ft.QuadtreeTileLoadState.DONE),F.renderable=!0);return}if(Q.PrimitiveData.length>0){for(var k=0;k<Q.PrimitiveData.length;k++)if(Q.PrimitiveData[k].key==L){Q.Primitivekey.includes(L)||Q.Primitivekey.push(L);return}}Q.Primitivekey.includes(L)||(Q.Primitivekey.push(L),E.push({level:F.level,x:F.x,y:F.y,data:void 0}),function(U){var V=U.tilingScheme.getNumberOfYTilesAtLevel(U.level)-U.y-1,H=Q._urlTemplate.replace(window.encodeURIComponent("{x}"),U.x).replace(window.encodeURIComponent("{reverseY}"),V).replace(window.encodeURIComponent("{z}"),U.level);Q.tilesLength++;var q="z"+U.level+"x"+U.x+"y"+U.y;Q._cache&&(H+="&"+Q._core.getuid());var ie=Vi.filter(I,function(Z){return Z.url==H});ie.length>0||(I.push({url:H}),Q._core.xhr({url:H,type:"get",dataType:"json",success:function(Z){var oe=[],ne=[];Q.Legend=[];function se(Ie){for(var ve=0;ve<Ie.length;ve++)Array.isArray(Ie[ve])?se(Ie[ve]):de.push(Ie[ve])}function ce(){if(w.extrudedHeight=parseFloat(Q._option.extrudedHeight),/^\[/.test(Q._option.extrudedHeight)&&/\]$/.test(Q._option.extrudedHeight)){var Ie=Q._option.extrudedHeight.replace(/\[/,"").replace(/\]/,"");w.extrudedHeight=parseFloat(me.properties[Ie])*3}if(w.material=Q._option.material,/^\[/.test(Q._option.material)&&/\]$/.test(Q._option.material)){var ve=Q._option.material.replace(/\[/,"").replace(/\]/,"");w.material=me.properties[ve],Q._core.isHtmlColor(w.material)?w.material=Q._color.colorFromHtmlColor(w.material):(/^rgb/.test(w.material)&&(w.material=Q._color.rgbaStringToRgbaObj(w.material)),w.material.red>1&&(w.material.red=w.material.red/255),w.material.green>1&&(w.material.green=w.material.green/255),w.material.blue>1&&(w.material.blue=w.material.blue/255),w.material.alpha>1&&(w.material.a=w.material.alpha/255),w.material=Q._color.createColor(w.material.red,w.material.green,w.material.blue,w.material.alpha))}else Q._option.material&&(w.material=Q._option.material),w.material&&(Q._core.isHtmlColor(w.material)?w.material=Q._color.colorFromHtmlColor(w.material):(/^rgb/.test(w.material)&&(w.material=Q._color.rgbaStringToRgbaObj(w.material)),w.material.red>1&&(w.material.red=w.material.red/255),w.material.green>1&&(w.material.green=w.material.green/255),w.material.blue>1&&(w.material.blue=w.material.blue/255),w.material.alpha>1&&(w.material.a=w.material.alpha/255),w.material=Q._color.createColor(w.material.red,w.material.green,w.material.blue,w.material.alpha)));var K=Ft.Color.WHITE;if(de.length>=2){var W=Ft.Cartesian3.fromDegreesArray(de);w.polygonHierarchy=new Ft.PolygonHierarchy(W);var te=new Ft.PolygonGeometry(w),Y=new Ft.GeometryInstance({id:me,geometry:te,attributes:{color:new Ft.ColorGeometryInstanceAttribute.fromColor(K)}}),he="material:"+w.material.red*255+","+w.material.green*255+","+w.material.blue*255;Q.Legend.push(he),oe.push(Y)}}for(var j=0;j<Z.features.length;j++){var de=[],me=Z.features[j];if(Array.isArray(me.geometry.coordinates)&&me.geometry.coordinates.length>0)if(Array.isArray(me.geometry.coordinates[0][0]))for(var _e=0;_e<me.geometry.coordinates.length;_e++)de=[],me.geometry.coordinates[_e].pop(),se(me.geometry.coordinates[_e]),ce(de);else se(me.geometry.coordinates),ce(de)}var Be=new Ft.Primitive({geometryInstances:oe,appearance:new Ft.PerInstanceColorAppearance({translucent:!1,vertexShaderSource:Q._core.Shaders("vertexShaderSource"),fragmentShaderSource:Q._core.Shaders("fragmentShaderSource")}),shadows:Q._option.shadows});Q.probj.push(Be);var Qe={level:U.level,key:q,data:Be};Q.loadFinishKey.push(q),Q.PrimitiveData.push(Qe),Q._viewer.scene.primitives.add(Be),Q.returnCount++;try{Q.probj.length==2&&(Q._viewer.scene.primitives.remove(Q.probj[0]),Q.probj.pop())}catch{}},error:function(){var Z=Q.Primitivekey.indexOf(q);Z>-1&&Q.Primitivekey.splice(Z,1),E=Vi.remove(E,function(oe){return oe.x==U.x&&oe.y==U.y&&oe.level==U.level})},complete:function(Z,oe){Z=null,U.state=Ft.QuadtreeTileLoadState.LOADING,U.state===Ft.QuadtreeTileLoadState.LOADING&&(U.data.geometryPrimitive&&(U.state=Ft.QuadtreeTileLoadState.DONE),U.renderable=!0)}}))}(F))}else{F.state=Ft.QuadtreeTileLoadState.LOADING,F.state===Ft.QuadtreeTileLoadState.LOADING&&(F.data.geometryPrimitive&&(F.state=Ft.QuadtreeTileLoadState.DONE),F.renderable=!0);return}}},this._primitive=new Ft.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:3});var M=this._viewer.scene,B=M.primitives;B.add(this._primitive),C||this.setVisibility(!1),this._core.isnull(w.id)&&(w.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+w.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var T={id:w.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this.setTreeobj(T),this._tree.insertGroupId(T,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.PointVectorGeoJsonFeatureLayerGis=function(o,A,f,m,C,y){var x={show:!0,positions:[],shape:void 0,cornerType:this._cesium.CornerType.ROUNDED,granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.DISABLED,level_max:20,level_min:10};this._option=this._core.extend(x,f,!0),A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");var v=[],E={id:A.id,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,perPositionHeight:!1,arcType:this._cesium.ArcType.GEODESIC},I=this;this._urlTemplate=A.url+"/{z}/{x}/{reverseY}.json",this._Provider={},this._Provider1=new cle(this._viewer,this._cesium,{url:this._urlTemplate},function(Q){if(I.Level=I.getLevel(),I.Level<I._option.level_min){if(I.primitve.length>0){for(var M=0;M<I.primitve.length;M++)I._viewer.scene.primitives.remove(I.primitve[M]);I.primitve=[]}if(I.probj.length>0){for(var M=0;M<I.probj.length;M++)I._viewer.scene.primitives.remove(I.probj[M]);I.probj=[]}v=[];return}var B=new Ft.PrimitiveCollection,T=new Ft.PointPrimitiveCollection,D=new Ft.LabelCollection,F=new Ft.BillboardCollection,L="z"+Q.templateValues.z+"x"+Q.templateValues.x+"y"+Q.templateValues.reverseY;Q.data={lines:[],geometryPrimitive:void 0};var R=Q.url.replace("png","json"),k=Vi.filter(v,function(U){return U.url==R});k.length>0||I.start!=1&&(v.push({url:R}),I._core.xhr({url:R,type:"get",dataType:"json",success:function(U){if(U.features.length==0)return;I.Legend=[];function V(ne){for(var se=0;se<ne.length;se++)Array.isArray(ne[se])?V(ne[se]):ie.push(ne[se])}function H(){if(f.lable!=null){var ne=0;if(f.lable.height!=null&&/^\[/.test(f.lable.height)&&/\]$/.test(f.lable.height)){var se=f.lable.height.replace(/\[/,"").replace(/\]/,"");ne=parseFloat(Z.properties[se])}var ce=I._core.StyleContrast("lable",f.lable,Ft);ce.fillColor=I._color.VectorColorTransformation(ce.fillColor,Z),ce.outlineColor=I._color.VectorColorTransformation(ce.outlineColor,Z),ce.backgroundColor=I._color.VectorColorTransformation(ce.backgroundColor,Z),ce.text=I._core.Analysis(ce.text,Z),ce.position=new Ft.Cartesian3.fromDegrees(ie[0],ie[1],ne),D.add(ce)}if(f.billboard!=null){var ne=0,j=f.billboard;if(j.height!=null&&/^\[/.test(j.height)&&/\]$/.test(j.height)){var se=j.height.replace(/\[/,"").replace(/\]/,"");ne=parseFloat(Z.properties[se])}var de=I._core.StyleContrast("billboard",j,Ft);de.position=new Ft.Cartesian3.fromDegrees(ie[0],ie[1],ne),F.add(de)}if(f.point!=null){var ne=0,j=f.point;if(j.height!=null&&/^\[/.test(j.height)&&/\]$/.test(j.height)){var se=j.height.replace(/\[/,"").replace(/\]/,"");ne=parseFloat(Z.properties[se])}var de=I._core.StyleContrast("point",j,Ft);de.position=new Ft.Cartesian3.fromDegrees(ie[0],ie[1],ne),de.color=I._color.VectorColorTransformation(de.color,Z),de.outlineColor=I._color.VectorColorTransformation(de.outlineColor,Z),T.add(de)}}for(var q=0;q<U.features.length;q++){var ie=[],Z=U.features[q];if(Array.isArray(Z.geometry.coordinates)&&Z.geometry.coordinates.length>0)if(Array.isArray(Z.geometry.coordinates[0][0]))for(var oe=0;oe<Z.geometry.coordinates.length;oe++)ie=[],Z.geometry.coordinates[oe].pop(),V(Z.geometry.coordinates[oe]),H(ie);else V(Z.geometry.coordinates),H(ie)}D.length>0&&B.add(D),F.length>0&&B.add(F),T.length>0&&B.add(T),I.primitve.push(B),I.probj.push(B),I._viewer.scene.primitives.add(B),I.returnCount++;try{I.probj.length==2&&(I._viewer.scene.primitives.remove(I.probj[0]),I.probj.pop())}catch{}}}))}),this.img=this._Provider1.ent,C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var w={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this.setTreeobj(w),this._tree.insertGroupId(w,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.PolylineVectorGeoJsonFeatureLayerGis=function(o,A,f,m,C,y){var x={show:!0,positions:[],shape:void 0,cornerType:this._cesium.CornerType.ROUNDED,granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.DISABLED,level_max:20,level_min:10};this._option=this._core.extend(x,f,!0),A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");var v=[],E={id:A.id,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,perPositionHeight:!1,arcType:this._cesium.ArcType.GEODESIC},I=this;this._urlTemplate=A.url+"/{z}/{x}/{reverseY}.json",this._Provider={},this._Provider1=new cle(this._viewer,this._cesium,{url:this._urlTemplate},function(Q){if(I.Level=I.getLevel(),I.Level<I._option.level_min){if(I.primitve.length>0){for(var M=0;M<I.primitve.length;M++)I._viewer.scene.primitives.remove(I.primitve[M]);I.primitve=[]}if(I.probj.length>0){for(var M=0;M<I.probj.length;M++)I._viewer.scene.primitives.remove(I.probj[M]);I.probj=[]}v=[];return}var B=-1,T="z"+Q.templateValues.z+"x"+Q.templateValues.x+"y"+Q.templateValues.reverseY;Q.data={lines:[],geometryPrimitive:void 0};var D=Q.url.replace("png","json"),F=Vi.filter(v,function(L){return L.url==D});F.length>0||I.start!=1&&(v.push({url:D}),I._core.xhr({url:D,type:"get",dataType:"json",success:function(L){if(L.features.length==0)return;var R=[];I.Legend=[];function k(oe){for(var ne=0;ne<oe.length;ne++)Array.isArray(oe[ne])?k(oe[ne]):H.push(oe[ne])}function U(){var oe=0,ne=f;if(ne.height!=null&&/^\[/.test(ne.height)&&/\]$/.test(ne.height)){var se=ne.height.replace(/\[/,"").replace(/\]/,"");oe=parseFloat(q.properties[se])}var ce=I._core.StyleContrast("polyline",ne,Ft);if(B=ce.classificationType,delete ce.classificationType,ce.material=I._option.material,/^\[/.test(I._option.material)&&/\]$/.test(I._option.material)){var j=I._option.material.replace(/\[/,"").replace(/\]/,"");ce.material=q.properties[j],I._core.isHtmlColor(ce.material)?ce.material=I._color.colorFromHtmlColor(ce.material):(/^rgb/.test(ce.material)&&(ce.material=I._color.rgbaStringToRgbaObj(ce.material)),ce.material.red>1&&(ce.material.red=ce.material.red/255),ce.material.green>1&&(ce.material.green=ce.material.green/255),ce.material.blue>1&&(ce.material.blue=ce.material.blue/255),ce.material.alpha>1&&(ce.material.a=ce.material.alpha/255),ce.material=I._color.createColor(ce.material.red,ce.material.green,ce.material.blue,ce.material.alpha))}else I._option.material&&(ce.material=I._option.material),ce.material&&(I._core.isHtmlColor(ce.material)?ce.material=I._color.colorFromHtmlColor(ce.material):(/^rgb/.test(ce.material)&&(ce.material=I._color.rgbaStringToRgbaObj(ce.material)),ce.material.red>1&&(ce.material.red=ce.material.red/255),ce.material.green>1&&(ce.material.green=ce.material.green/255),ce.material.blue>1&&(ce.material.blue=ce.material.blue/255),ce.material.alpha>1&&(ce.material.a=ce.material.alpha/255),ce.material=I._color.createColor(ce.material.red,ce.material.green,ce.material.blue,ce.material.alpha)));if(H.length>=2){ce.positions=Ft.Cartesian3.fromDegreesArray(H);var de=new Ft.GeometryInstance({id:q,geometry:new Ft.PolylineGeometry(ce),attributes:{color:new Ft.ColorGeometryInstanceAttribute.fromColor(ce.material)}}),me="material:"+ce.material.red*255+","+ce.material.green*255+","+ce.material.blue*255;I.Legend.push(me),R.push(de)}}for(var V=0;V<L.features.length;V++){var H=[],q=L.features[V];if(Array.isArray(q.geometry.coordinates)&&q.geometry.coordinates.length>0)if(Array.isArray(q.geometry.coordinates[0][0]))for(var ie=0;ie<q.geometry.coordinates.length;ie++)H=[],q.geometry.coordinates[ie].pop(),k(q.geometry.coordinates[ie]),U(H);else k(q.geometry.coordinates),U(H)}var Z=new Ft.Primitive({geometryInstances:R,appearance:new Ft.PolylineColorAppearance({flat:!0,translucent:!0,faceForward:!0,closed:!0}),shadows:I._option.shadows,classificationType:B});I.probj.push(Z),I.primitve.push(Z),I._viewer.scene.primitives.add(Z),I.returnCount++;try{I.probj.length==2&&(I._viewer.scene.primitives.remove(I.probj[0]),I.probj.pop())}catch{}}}))}),this.img=this._Provider1.ent,C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var w={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this.setTreeobj(w),this._tree.insertGroupId(w,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.VolumeVectorGeoJsonFeatureLayerGisOptimization=function(o,A,f,m,C,y){var x={show:!0,positions:[],shape:void 0,cornerType:this._cesium.CornerType.ROUNDED,granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.DISABLED,level_max:20,level_min:10},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a)))),this._option=this._core.extend(x,f,!0),A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");var E=[],I=[],w={id:A.id,polygonHierarchy:void 0,height:0,extrudedHeight:0,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,perPositionHeight:!1,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.RED},Q=this;this._urlTemplate=A.url+"/{z}/{x}/{reverseY}.json",this._Provider={},this._Provider1=new cle(this._viewer,this._cesium,{url:this._urlTemplate},function(B){if(Q.Level=Q.getLevel(),Q.Level<Q._option.level_min){if(Q.primitve.length>0){for(var T=0;T<Q.primitve.length;T++)Q._viewer.scene.primitives.remove(Q.primitve[T]);Q.primitve=[]}if(Q.probj.length>0){for(var T=0;T<Q.probj.length;T++)Q._viewer.scene.primitives.remove(Q.probj[T]);Q.probj=[]}E=[];return}var D="z"+B.templateValues.z+"x"+B.templateValues.x+"y"+B.templateValues.reverseY;B.data={lines:[],geometryPrimitive:void 0};var F=B.url.replace("png","json"),L=Vi.filter(E,function(R){return R.url==F});L.length>0||Q.start!=1&&(E.push({url:F}),Q._core.xhr({url:F,type:"get",dataType:"json",success:function(R){if(R.features.length==0)return;var k=[],U=[];Q.Legend=[];function V(se){for(var ce=0;ce<se.length;ce++)Array.isArray(se[ce])?V(se[ce]):ie.push(se[ce])}function H(){if(w.extrudedHeight=Q._option.extrudedHeight,/^\[/.test(Q._option.extrudedHeight)&&/\]$/.test(Q._option.extrudedHeight)){var se=Q._option.extrudedHeight.replace(/\[/,"").replace(/\]/,"");w.extrudedHeight=parseFloat(Z.properties[se])*3}if(w.material=Q._option.material,/^\[/.test(Q._option.material)&&/\]$/.test(Q._option.material)){var ce=Q._option.material.replace(/\[/,"").replace(/\]/,"");w.material=Z.properties[ce],Q._core.isHtmlColor(w.material)?w.material=Q._color.colorFromHtmlColor(w.material):(/^rgb/.test(w.material)&&(w.material=Q._color.rgbaStringToRgbaObj(w.material)),w.material.red>1&&(w.material.red=w.material.red/255),w.material.green>1&&(w.material.green=w.material.green/255),w.material.blue>1&&(w.material.blue=w.material.blue/255),w.material.alpha>1&&(w.material.a=w.material.alpha/255),w.material=Q._color.createColor(w.material.red,w.material.green,w.material.blue,w.material.alpha))}else Q._option.material&&(w.material=Q._option.material),w.material&&(Q._core.isHtmlColor(w.material)?w.material=Q._color.colorFromHtmlColor(w.material):(/^rgb/.test(w.material)&&(w.material=Q._color.rgbaStringToRgbaObj(w.material)),w.material.red>1&&(w.material.red=w.material.red/255),w.material.green>1&&(w.material.green=w.material.green/255),w.material.blue>1&&(w.material.blue=w.material.blue/255),w.material.alpha>1&&(w.material.a=w.material.alpha/255),w.material=Q._color.createColor(w.material.red,w.material.green,w.material.blue,w.material.alpha)));if(ie.length>=2){var j=Ft.Cartesian3.fromDegreesArray(ie);w.polygonHierarchy=new Ft.PolygonHierarchy(j);var de=new Ft.PolygonGeometry(w),me=new Ft.GeometryInstance({id:Z,geometry:de,attributes:{color:new Ft.ColorGeometryInstanceAttribute.fromColor(w.material)}}),_e="material:"+w.material.red*255+","+w.material.green*255+","+w.material.blue*255;k.push(me)}}for(var q=0;q<R.features.length;q++){var ie=[],Z=R.features[q];if(Array.isArray(Z.geometry.coordinates)&&Z.geometry.coordinates.length>0)if(Array.isArray(Z.geometry.coordinates[0][0]))for(var oe=0;oe<Z.geometry.coordinates.length;oe++)ie=[],Z.geometry.coordinates[oe].pop(),V(Z.geometry.coordinates[oe]),H(ie);else V(Z.geometry.coordinates),H(ie)}var ne=new Ft.Primitive({geometryInstances:k,appearance:new Ft.PerInstanceColorAppearance({translucent:!1,vertexShaderSource:Q._core.Shaders("vertexShaderSource"),fragmentShaderSource:Q._core.Shaders("fragmentShaderSource")}),shadows:Q._option.shadows});Q.primitve.push(ne),Q.probj.push(ne),Q._viewer.scene.primitives.add(ne),Q.returnCount++;try{Q.probj.length==2&&(Q._viewer.scene.primitives.remove(Q.probj[0]),Q.probj.pop())}catch{}}}))}),this.img=this._Provider1.ent,C||this.setVisibility(!1),this._core.isnull(w.id)&&(w.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+w.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var M={id:w.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this.setTreeobj(M),this._tree.insertGroupId(M,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.VolumeVectorGeoJsonFeatureLayerClassOptimization=function(o,A,f,m,C,y){var x={polygonHierarchy:void 0,height:0,extrudedHeight:999999,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.WHITE,shadows:this._cesium.ShadowMode.ENABLED,show:!0},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a))));var E=this._core.extend(x,f,!0);A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");var I=[],w=this;this._urlTemplate=A.url+"?"+this._serialize(v.urlParams),this._Provider=new Ts(this._viewer,this._cesium),this._Provider._normalTile=f.level_max-1,this._Provider.loadTile=function(T,D){if(this.tile=null,this.tile=D,D.state===this._cesium.QuadtreeTileLoadState.START&&w.item.show){var F="z"+D.level+"x"+D.x+"y"+D.y;if(D.data={lines:[],geometryPrimitive:void 0},D.level>=f.level_min&&D.level<f.level_max&&w.item.show){var L=Vi.filter(I,function(k){return k.x==D.x&&k.y==D.y&&k.level==D.level});if(L.length!=0&&L[0].data&&L[0].data.length>0){D.data.geometryPrimitive=new Ft.Primitive({geometryInstances:L[0].data,appearance:new Ft.PerInstanceColorAppearance({flat:!0,translucent:!0,faceForward:!0,closed:!0}),shadows:Ft.ShadowMode.ENABLED}),D.state=Ft.QuadtreeTileLoadState.LOADING,D.state===Ft.QuadtreeTileLoadState.LOADING&&(D.data.geometryPrimitive&&(D.state=Ft.QuadtreeTileLoadState.DONE),D.renderable=!0);return}if(w.PrimitiveData.length>0){for(var R=0;R<w.PrimitiveData.length;R++)if(w.PrimitiveData[R].key==F){w.Primitivekey.push(F);return}}w.Primitivekey.includes(F)||(w.Primitivekey.push(F),I.push({level:D.level,x:D.x,y:D.y,data:void 0}),function(k){var U=w._urlTemplate.replace(window.encodeURIComponent("{x}"),k.x).replace(window.encodeURIComponent("{y}"),k.y).replace(window.encodeURIComponent("{z}"),k.level);w.tilesLength++,w._cache&&(U+="&"+w._core.getuid()),w._core.xhr({url:U,type:"get",dataType:"json",success:function(V){var H=[],q=[];w.Legend=[];function ie(_e){for(var Be=0;Be<_e.length;Be++)Array.isArray(_e[Be])?ie(_e[Be]):(ne.push(_e[Be]),Be===2&&!se&&(se=!0))}function Z(){var _e=se?Ft.Cartesian3.fromDegreesArrayHeights(ne):Ft.Cartesian3.fromDegreesArray(ne);if(/^\[/.test(f.extrudedHeight)&&/\]$/.test(f.extrudedHeight)){var Be=f.extrudedHeight.replace(/\[/,"").replace(/\]/,"");E.extrudedHeight=parseFloat(ce.properties[Be])}if(E.extrudedHeight=parseFloat(E.extrudedHeight),E.heightReference==1&&delete E.height,E.extrudedHeightReference==1&&delete E.extrudedHeight,/^\[/.test(f.material)&&/\]$/.test(f.material)){var Qe=f.material.replace(/\[/,"").replace(/\]/,"");E.material=ce.properties[Qe],w._core.isHtmlColor(E.material)?E.material=w._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=w._color.rgbaStringToRgbaObj(E.material)),E.material.r>1&&(E.material.r=E.material.r/255),E.material.g>1&&(E.material.g=E.material.g/255),E.material.b>1&&(E.material.b=E.material.b/255),E.material.a>1&&(E.material.a=E.material.a/255),E.material=w._color.createColor(E.material.r,E.material.g,E.material.b,E.material.a))}E.polygonHierarchy=new Ft.PolygonHierarchy(_e);var Ie=new Ft.PolygonGeometry(E);ce.treeID=E.id,ce.VectorType="polygon",ce.VectorStyle={haveZ:se,extrudedHeight:E.extrudedHeight,positions:ne,material:E.material};var ve=new Ft.GeometryInstance({id:ce,geometry:Ie,attributes:{color:new Ft.ColorGeometryInstanceAttribute.fromColor(E.material)}}),K="material:"+E.material.red*255+","+E.material.green*255+","+E.material.blue*255;w.Legend.push(K),H.push(ve)}for(var oe=0;oe<V.features.length;oe++){var ne=[],se=!1,ce=V.features[oe];if(Array.isArray(ce.geometry.coordinates)&&ce.geometry.coordinates.length>0)if(Array.isArray(ce.geometry.coordinates[0][0]))for(var j=0;j<ce.geometry.coordinates.length;j++)ne=[],ce.geometry.coordinates[j].pop(),ie(ce.geometry.coordinates[j]),Z(ne);else ie(ce.geometry.coordinates),Z(ne)}var de=new Ft.ClassificationPrimitive({geometryInstances:H,appearance:new Ft.PerInstanceColorAppearance({translucent:!1,vertexShaderSource:w._core.Shaders("vertexShaderSource"),fragmentShaderSource:w._core.Shaders("fragmentShaderSource")}),classificationType:E.classificationType,shadows:Ft.ShadowMode.ENABLED});w.PrimitiveObj.data=de,w.PrimitiveObj.key=w.Primitivekey[w.returnCount];var me={level:k.level,key:w.Primitivekey[w.returnCount],data:de};w.loadFinishKey.push(w.Primitivekey[w.returnCount]),w.PrimitiveData.push(me),w._viewer.scene.primitives.add(de),w.returnCount++,w.returnCount>=w.tilesLength&&(w.returnCount=0,w.tilesLength=0,w.Primitivekey=[])},error:function(){I=Vi.remove(I,function(V){return V.x==k.x&&V.y==k.y&&V.level==k.level})},complete:function(V,H){V=null,k.state=Ft.QuadtreeTileLoadState.LOADING,k.state===Ft.QuadtreeTileLoadState.LOADING&&(k.data.geometryPrimitive&&(k.state=Ft.QuadtreeTileLoadState.DONE),k.renderable=!0)}})}(D))}else{D.state=Ft.QuadtreeTileLoadState.LOADING,D.state===Ft.QuadtreeTileLoadState.LOADING&&(D.data.geometryPrimitive&&(D.state=Ft.QuadtreeTileLoadState.DONE),D.renderable=!0);return}}},this._primitive=new Ft.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:3});var Q=this._viewer.scene,M=Q.primitives;f&&f.time&&(this._Provider._availability=new Ft.TimeIntervalCollection([new Ft.TimeInterval({start:f.time.start?Ft.JulianDate.fromDate(new Date(f.time.start)):Ft.Iso8601.MINIMUM_VALUE,stop:f.time.end?Ft.JulianDate.fromDate(new Date(f.time.end)):Ft.Iso8601.MAXIMUM_VALUE})]),this._Provider.isAvailable=function(T){if(!Ft.defined(T))throw new Ft.DeveloperError("time is required.");var D=this._availability;return!Ft.defined(D)||D.contains(T)}),M.add(this._primitive),C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var B={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this._Provider.treeID=E.id,this.setTreeobj(B),this._tree.insertGroupId(B,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.createVolumeVectorGeoJsonFeatureLayerDthOptimization2=function(o,A,f,m,C,y){var x={show:!0,positions:[],shape:void 0,cornerType:this._cesium.CornerType.ROUNDED,granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.DISABLED,level_max:20,level_min:10},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a)))),this._option=this._core.extend(x,f,!0),A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");var E={polygonHierarchy:void 0,height:0,extrudedHeight:0,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,perPositionHeight:!1,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.RED},I=this;this._urlTemplate=A.url+"?"+this._serialize(v.urlParams);var w=A.url+"?"+this._serialize(v.urlParams);this._Provider=new Ts(this._viewer,this._cesium),this._Provider._normalTile=f.level_max-1,this._Provider.loadTile=function(T,D){(function(F,L,R){if(L.state===Ft.QuadtreeTileLoadState.START){if(L.data={lines:[],geometryPrimitive:void 0},L.level>=f.level_min&&L.level<f.level_max&&R.item.show){var k=w.replace(window.encodeURIComponent("{x}"),L.x).replace(window.encodeURIComponent("{y}"),L.y).replace(window.encodeURIComponent("{z}"),L.level);R._cache&&(k+="&"+R._core.getuid()),R._core.xhr({url:k,type:"get",dataType:"json",success:function(U){if(U==null){L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0;return}var V=new Ft.PrimitiveCollection;R.Legend=[];function H(ce){for(var j=0;j<ce.length;j++)Array.isArray(ce[j])?H(ce[j]):Z.push(ce[j])}function q(){if(R._option.extrudedHeight&&(E.extrudedHeight=R._option.extrudedHeight),/^\[/.test(R._option.extrudedHeight)&&/\]$/.test(R._option.extrudedHeight)){var ce=R._option.extrudedHeight.replace(/\[/,"").replace(/\]/,"");E.extrudedHeight=parseFloat(oe.properties[ce])}if(E.material=R._option.material,/^\[/.test(R._option.material)&&/\]$/.test(R._option.material)){var j=R._option.material.replace(/\[/,"").replace(/\]/,"");E.material=oe.properties[j],R._core.isHtmlColor(E.material)?E.material=R._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=R._color.rgbaStringToRgbaObj(E.material)),E.material.red>1&&(E.material.red=E.material.red/255),E.material.green>1&&(E.material.green=E.material.green/255),E.material.blue>1&&(E.material.blue=E.material.blue/255),E.material.alpha>1&&(E.material.a=E.material.alpha/255),E.material=R._color.createColor(E.material.red,E.material.green,E.material.blue,E.material.alpha))}else R._option.material&&(E.material=R._option.material),E.material&&(R._core.isHtmlColor(E.material)?E.material=R._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=R._color.rgbaStringToRgbaObj(E.material)),E.material.red>1&&(E.material.red=E.material.red/255),E.material.green>1&&(E.material.green=E.material.green/255),E.material.blue>1&&(E.material.blue=E.material.blue/255),E.material.alpha>1&&(E.material.a=E.material.alpha/255),E.material=R._color.createColor(E.material.red,E.material.green,E.material.blue,E.material.alpha)));if(Z.length>=2){var de=Ft.Cartesian3.fromDegreesArray(Z);E.polygonHierarchy=new Ft.PolygonHierarchy(de);var me=new Ft.PolygonGeometry(E),_e=new Ft.GeometryInstance({id:oe,geometry:me,attributes:{color:new Ft.ColorGeometryInstanceAttribute.fromColor(E.material)}}),Be=new Ft.ClassificationPrimitive({geometryInstances:_e,appearance:new Ft.PerInstanceColorAppearance({translucent:!1,vertexShaderSource:R._core.Shaders("vertexShaderSource"),fragmentShaderSource:R._core.Shaders("fragmentShaderSource")}),classificationType:R._option.classificationType}),Qe="material:"+E.material.red*255+","+E.material.green*255+","+E.material.blue*255;R.Legend.push(Qe),V.add(Be)}}for(var ie=0;ie<U.features.length;ie++){var Z=[],oe=U.features[ie];if(Array.isArray(oe.geometry.coordinates)&&oe.geometry.coordinates.length>0)if(Array.isArray(oe.geometry.coordinates[0][0]))for(var ne=0;ne<oe.geometry.coordinates.length;ne++)Z=[],oe.geometry.coordinates[ne].pop(),H(oe.geometry.coordinates[ne]),q(Z);else H(oe.geometry.coordinates),q(Z)}var se=V;L.data.geometryPrimitive=se,L.state=Ft.QuadtreeTileLoadState.LOADING,L.state===Ft.QuadtreeTileLoadState.LOADING&&(L.data.geometryPrimitive.update(F,[]),L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0)},error:function(){L.count==null&&(L.count=0),L.count+=1,L.count>=2?(L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0):L.state=Ft.QuadtreeTileLoadState.START}})}else{L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0;return}L.state=Ft.QuadtreeTileLoadState.LOADING}})(T,D,I)},this._primitive=new Ft.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:3});var Q=this._viewer.scene,M=Q.primitives;M.add(this._primitive),C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var B={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this.setTreeobj(B),this._tree.insertGroupId(B,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.createVolumeVectorGeoJsonFeatureLayerDthOptimization3=function(o,A,f,m,C,y){var x={show:!0,positions:[],shape:void 0,cornerType:this._cesium.CornerType.ROUNDED,granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.DISABLED,level_max:20,level_min:10},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a)))),this._option=this._core.extend(x,f,!0),A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");var E={polygonHierarchy:void 0,height:0,extrudedHeight:0,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,perPositionHeight:!1,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.RED},I=this;this._urlTemplate=A.url+"?"+this._serialize(v.urlParams);var w=A.url+"?"+this._serialize(v.urlParams);this._Provider=new Ts(this._viewer,this._cesium),this._Provider._normalTile=f.level_max-1,this._Provider.loadTile=function(T,D){(function(F,L,R){if(L.state===Ft.QuadtreeTileLoadState.START){if(L.data={lines:[],geometryPrimitive:void 0},L.level>=f.level_min&&L.level<f.level_max&&R.item.show){var k=w.replace(window.encodeURIComponent("{x}"),L.x).replace(window.encodeURIComponent("{y}"),L.y).replace(window.encodeURIComponent("{z}"),L.level);R._cache&&(k+="&"+R._core.getuid()),R._core.xhr({url:k,type:"get",dataType:"json",success:function(U){if(U==null){L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0;return}var V=new Ft.PrimitiveCollection;R.Legend=[];var H=[];function q(j){for(var de=0;de<j.length;de++)Array.isArray(j[de])?q(j[de]):oe.push(j[de])}function ie(){if(R._option.extrudedHeight&&(E.extrudedHeight=R._option.extrudedHeight),/^\[/.test(R._option.extrudedHeight)&&/\]$/.test(R._option.extrudedHeight)){var j=R._option.extrudedHeight.replace(/\[/,"").replace(/\]/,"");E.extrudedHeight=parseFloat(ne.properties[j])}if(E.material=R._option.material,/^\[/.test(R._option.material)&&/\]$/.test(R._option.material)){var de=R._option.material.replace(/\[/,"").replace(/\]/,"");E.material=ne.properties[de],R._core.isHtmlColor(E.material)?E.material=R._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=R._color.rgbaStringToRgbaObj(E.material)),E.material.red>1&&(E.material.red=E.material.red/255),E.material.green>1&&(E.material.green=E.material.green/255),E.material.blue>1&&(E.material.blue=E.material.blue/255),E.material.alpha>1&&(E.material.a=E.material.alpha/255),E.material=R._color.createColor(E.material.red,E.material.green,E.material.blue,E.material.alpha))}else R._option.material&&(E.material=R._option.material),E.material&&(R._core.isHtmlColor(E.material)?E.material=R._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=R._color.rgbaStringToRgbaObj(E.material)),E.material.red>1&&(E.material.red=E.material.red/255),E.material.green>1&&(E.material.green=E.material.green/255),E.material.blue>1&&(E.material.blue=E.material.blue/255),E.material.alpha>1&&(E.material.a=E.material.alpha/255),E.material=R._color.createColor(E.material.red,E.material.green,E.material.blue,E.material.alpha)));if(oe.length>=2){var me=Ft.Cartesian3.fromDegreesArray(oe);E.polygonHierarchy=new Ft.PolygonHierarchy(me);var _e=new Ft.PolygonGeometry(E),Be=new Ft.GeometryInstance({id:ne,geometry:_e,attributes:{color:new Ft.ColorGeometryInstanceAttribute.fromColor(E.material)}});H.push(Be)}}for(var Z=0;Z<U.features.length;Z++){var oe=[],ne=U.features[Z];if(Array.isArray(ne.geometry.coordinates)&&ne.geometry.coordinates.length>0)if(Array.isArray(ne.geometry.coordinates[0][0]))for(var se=0;se<ne.geometry.coordinates.length;se++)oe=[],ne.geometry.coordinates[se].pop(),q(ne.geometry.coordinates[se]),ie(oe);else q(ne.geometry.coordinates),ie(oe)}var ce=new Ft.ClassificationPrimitive1({geometryInstances:H,appearance:new Ft.PerInstanceColorAppearance({translucent:!1,vertexShaderSource:R._core.Shaders("vertexShaderSource"),fragmentShaderSource:R._core.Shaders("fragmentShaderSource")}),classificationType:R._option.classificationType});L.data.geometryPrimitive=ce,L.state=Ft.QuadtreeTileLoadState.LOADING,L.state===Ft.QuadtreeTileLoadState.LOADING&&(L.data.geometryPrimitive.update(F,[]),L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0)},error:function(){L.count==null&&(L.count=0),L.count+=1,L.count>=2?(L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0):L.state=Ft.QuadtreeTileLoadState.START}})}else{L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0;return}L.state=Ft.QuadtreeTileLoadState.LOADING}})(T,D,I)},this._primitive=new Ft.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:3});var Q=this._viewer.scene,M=Q.primitives;M.add(this._primitive),C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var B={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this.setTreeobj(B),this._tree.insertGroupId(B,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.createVolumeVectorGeoJsonFeatureLayerDthOptimization=function(o,A,f,m,C,y){var x={show:!0,positions:[],shape:void 0,cornerType:this._cesium.CornerType.ROUNDED,granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.DISABLED,level_max:20,level_min:10},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a)))),this._option=this._core.extend(x,f,!0),A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");var E=[],I={polygonHierarchy:void 0,height:0,extrudedHeight:0,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,perPositionHeight:!1,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.RED},w=this;this._urlTemplate=A.url+"?"+this._serialize(v.urlParams),this._Provider=new Ts(this._viewer,this._cesium),this._Provider._normalTile=f.level_max-1,this._Provider.loadTile=function(T,D){if(this.tile=null,this.tile=D,D.state===this._cesium.QuadtreeTileLoadState.START&&w.item.show){var F="z"+D.level+"x"+D.x+"y"+D.y;if(D.data={lines:[],geometryPrimitive:void 0},D.level>=f.level_min&&D.level<f.level_max&&w.item.show){var L=Vi.filter(E,function(k){return k.x==D.x&&k.y==D.y&&k.level==D.level});if(L.length!=0&&L[0].data&&L[0].data.length>0){D.data.geometryPrimitive=new Ft.Primitive({geometryInstances:L[0].data,appearance:new Ft.PerInstanceColorAppearance({flat:!0,translucent:!0,faceForward:!0,closed:!0}),shadows:Ft.ShadowMode.ENABLED}),D.state=Ft.QuadtreeTileLoadState.LOADING,D.state===Ft.QuadtreeTileLoadState.LOADING&&(D.data.geometryPrimitive&&(D.state=Ft.QuadtreeTileLoadState.DONE),D.renderable=!0);return}if(w.PrimitiveData.length>0){for(var R=0;R<w.PrimitiveData.length;R++)if(w.PrimitiveData[R].key==F){w.Primitivekey.includes(F)||w.Primitivekey.push(F);return}}w.Primitivekey.includes(F)||(w.Primitivekey.push(F),E.push({level:D.level,x:D.x,y:D.y,data:void 0}),function(k){var U=w._urlTemplate.replace(window.encodeURIComponent("{x}"),k.x).replace(window.encodeURIComponent("{y}"),k.y).replace(window.encodeURIComponent("{z}"),k.level);w.tilesLength++;var V="z"+k.level+"x"+k.x+"y"+k.y;w._cache&&(U+="&"+w._core.getuid()),w._core.xhr({url:U,type:"get",dataType:"json",success:function(H){var q=[],ie=[],Z=new Ft.PrimitiveCollection;w.Legend=[];function oe(Be){for(var Qe=0;Qe<Be.length;Qe++)Array.isArray(Be[Qe])?oe(Be[Qe]):ce.push(Be[Qe])}function ne(){if(w._option.extrudedHeight&&(I.extrudedHeight=w._option.extrudedHeight),/^\[/.test(w._option.extrudedHeight)&&/\]$/.test(w._option.extrudedHeight)){var Be=w._option.extrudedHeight.replace(/\[/,"").replace(/\]/,"");I.extrudedHeight=parseFloat(j.properties[Be])}if(I.material=w._option.material,/^\[/.test(w._option.material)&&/\]$/.test(w._option.material)){var Qe=w._option.material.replace(/\[/,"").replace(/\]/,"");I.material=j.properties[Qe],w._core.isHtmlColor(I.material)?I.material=w._color.colorFromHtmlColor(I.material):(/^rgb/.test(I.material)&&(I.material=w._color.rgbaStringToRgbaObj(I.material)),I.material.red>1&&(I.material.red=I.material.red/255),I.material.green>1&&(I.material.green=I.material.green/255),I.material.blue>1&&(I.material.blue=I.material.blue/255),I.material.alpha>1&&(I.material.a=I.material.alpha/255),I.material=w._color.createColor(I.material.red,I.material.green,I.material.blue,I.material.alpha))}else w._option.material&&(I.material=w._option.material),I.material&&(w._core.isHtmlColor(I.material)?I.material=w._color.colorFromHtmlColor(I.material):(/^rgb/.test(I.material)&&(I.material=w._color.rgbaStringToRgbaObj(I.material)),I.material.red>1&&(I.material.red=I.material.red/255),I.material.green>1&&(I.material.green=I.material.green/255),I.material.blue>1&&(I.material.blue=I.material.blue/255),I.material.alpha>1&&(I.material.a=I.material.alpha/255),I.material=w._color.createColor(I.material.red,I.material.green,I.material.blue,I.material.alpha)));if(ce.length>=2){var Ie=Ft.Cartesian3.fromDegreesArray(ce);I.polygonHierarchy=new Ft.PolygonHierarchy(Ie);var ve=new Ft.PolygonGeometry(I),K=new Ft.GeometryInstance({id:j,geometry:ve,attributes:{color:new Ft.ColorGeometryInstanceAttribute.fromColor(I.material)}}),W=new Ft.ClassificationPrimitive({geometryInstances:K,appearance:new Ft.PerInstanceColorAppearance({translucent:!1,vertexShaderSource:w._core.Shaders("vertexShaderSource"),fragmentShaderSource:w._core.Shaders("fragmentShaderSource")}),classificationType:w._option.classificationType}),te="material:"+I.material.red*255+","+I.material.green*255+","+I.material.blue*255;w.Legend.push(te),Z.add(W)}}for(var se=0;se<H.features.length;se++){var ce=[],j=H.features[se];if(Array.isArray(j.geometry.coordinates)&&j.geometry.coordinates.length>0)if(Array.isArray(j.geometry.coordinates[0][0]))for(var de=0;de<j.geometry.coordinates.length;de++)ce=[],j.geometry.coordinates[de].pop(),oe(j.geometry.coordinates[de]),ne(ce);else oe(j.geometry.coordinates),ne(ce)}var me=Z;w.probj.push(me);var _e={level:k.level,key:V,data:me};w.loadFinishKey.push(V),w.PrimitiveData.push(_e),w._viewer.scene.primitives.add(me),w.returnCount++,w.removeObsoletePrimitives(k)},error:function(){var H=w.Primitivekey.indexOf(V);H>-1&&w.Primitivekey.splice(H,1),E=Vi.remove(E,function(q){return q.x==k.x&&q.y==k.y&&q.level==k.level})},complete:function(H,q){H=null,k.state=Ft.QuadtreeTileLoadState.LOADING,k.state===Ft.QuadtreeTileLoadState.LOADING&&(k.data.geometryPrimitive&&(k.state=Ft.QuadtreeTileLoadState.DONE),k.renderable=!0)}})}(D))}else{D.state=Ft.QuadtreeTileLoadState.LOADING,D.state===Ft.QuadtreeTileLoadState.LOADING&&(D.data.geometryPrimitive&&(D.state=Ft.QuadtreeTileLoadState.DONE),D.renderable=!0);return}}},this._primitive=new Ft.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:3});var Q=this._viewer.scene,M=Q.primitives;M.add(this._primitive),C||this.setVisibility(!1),this._core.isnull(I.id)&&(I.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+I.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var B={id:I.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this.setTreeobj(B),this._tree.insertGroupId(B,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.createVolumeVectorGeoJsonFeatureLayerJCDthOptimization1=function(o,A,f,m,C,y){var x={show:!0,positions:[],shape:void 0,cornerType:this._cesium.CornerType.ROUNDED,granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.DISABLED,level_max:20,level_min:10},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a)))),this._option=this._core.extend(x,f,!0),A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");var E=[],I={polygonHierarchy:void 0,height:0,extrudedHeight:0,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.RED},w=this;this._urlTemplate=A.url+"?"+this._serialize(v.urlParams),this._Provider=new Ts(this._viewer,this._cesium),this._Provider._normalTile=f.level_max-1,this._Provider.loadTile=function(T,D){if(this.tile=null,this.tile=D,D.state===this._cesium.QuadtreeTileLoadState.START&&w.item.show){var F="z"+D.level+"x"+D.x+"y"+D.y;if(D.data={lines:[],geometryPrimitive:void 0},D.level>=f.level_min&&D.level<f.level_max&&w.item.show){var L=Vi.filter(E,function(q){return q.x==D.x&&q.y==D.y&&q.level==D.level});if(L.length!=0&&L[0].data&&L[0].data.length>0){D.data.geometryPrimitive=new Ft.Primitive({geometryInstances:L[0].data,appearance:new Ft.PerInstanceColorAppearance({flat:!0,translucent:!0,faceForward:!0,closed:!0}),shadows:Ft.ShadowMode.ENABLED}),D.state=Ft.QuadtreeTileLoadState.LOADING,D.state===Ft.QuadtreeTileLoadState.LOADING&&(D.data.geometryPrimitive&&(D.state=Ft.QuadtreeTileLoadState.DONE),D.renderable=!0);return}if(w.PrimitiveData.length>0){for(var R=0;R<w.PrimitiveData.length;R++)if(w.PrimitiveData[R].key==F){w.Primitivekey.includes(F)||w.Primitivekey.push(F);return}}if(!w.Primitivekey.includes(F)){w.Primitivekey.push(F),E.push({level:D.level,x:D.x,y:D.y,data:void 0});for(var k=w._option.level_min+Math.floor((w._option.level_max-w._option.level_min)/2),U=rdt(D,k),R=0;R<U.length;R++){var V=U[R],H="z"+V.level+"x"+V.x+"y"+V.y;w.loadAllKey.includes(H)||(w.loadAllKey.push(H),function(ie){var Z=w._urlTemplate.replace(window.encodeURIComponent("{x}"),ie.x).replace(window.encodeURIComponent("{y}"),ie.y).replace(window.encodeURIComponent("{z}"),ie.level);w.tilesLength++;var oe="z"+ie.level+"x"+ie.x+"y"+ie.y;w._cache&&(Z+="&"+w._core.getuid()),w._core.xhr({url:Z,type:"get",dataType:"json",success:function(ne){var se=[],ce=[];w.Legend=[];function j(K){for(var W=0;W<K.length;W++)Array.isArray(K[W])?j(K[W]):_e.push(K[W])}function de(){if(w._option.extrudedHeight&&(I.extrudedHeight=w._option.extrudedHeight),/^\[/.test(w._option.extrudedHeight)&&/\]$/.test(w._option.extrudedHeight)){var K=w._option.extrudedHeight.replace(/\[/,"").replace(/\]/,"");I.extrudedHeight=parseFloat(Be.properties[K])}if(I.material=w._option.material,/^\[/.test(w._option.material)&&/\]$/.test(w._option.material)){var W=w._option.material.replace(/\[/,"").replace(/\]/,"");I.material=Be.properties[W],w._core.isHtmlColor(I.material)?I.material=w._color.colorFromHtmlColor(I.material):(/^rgb/.test(I.material)&&(I.material=w._color.rgbaStringToRgbaObj(I.material)),I.material.red>1&&(I.material.red=I.material.red/255),I.material.green>1&&(I.material.green=I.material.green/255),I.material.blue>1&&(I.material.blue=I.material.blue/255),I.material.alpha>1&&(I.material.a=I.material.alpha/255),I.material=w._color.createColor(I.material.red,I.material.green,I.material.blue,I.material.alpha))}else w._option.material&&(I.material=w._option.material),I.material&&(w._core.isHtmlColor(I.material)?I.material=w._color.colorFromHtmlColor(I.material):(/^rgb/.test(I.material)&&(I.material=w._color.rgbaStringToRgbaObj(I.material)),I.material.red>1&&(I.material.red=I.material.red/255),I.material.green>1&&(I.material.green=I.material.green/255),I.material.blue>1&&(I.material.blue=I.material.blue/255),I.material.alpha>1&&(I.material.a=I.material.alpha/255),I.material=w._color.createColor(I.material.red,I.material.green,I.material.blue,I.material.alpha)));if(_e.length>=2){var te=Ft.Cartesian3.fromDegreesArray(_e);I.polygonHierarchy=new Ft.PolygonHierarchy(te);var Y=new Ft.PolygonGeometry(I),he=new Ft.GeometryInstance({id:Be,geometry:Y,attributes:{color:new Ft.ColorGeometryInstanceAttribute.fromColor(I.material)}}),fe="material:"+I.material.red*255+","+I.material.green*255+","+I.material.blue*255;w.Legend.push(fe),se.push(he)}}for(var me=0;me<ne.features.length;me++){var _e=[],Be=ne.features[me];if(Array.isArray(Be.geometry.coordinates)&&Be.geometry.coordinates.length>0)if(Array.isArray(Be.geometry.coordinates[0][0]))for(var Qe=0;Qe<Be.geometry.coordinates.length;Qe++)_e=[],Be.geometry.coordinates[Qe].pop(),j(Be.geometry.coordinates[Qe]),de(_e);else j(Be.geometry.coordinates),de(_e)}if(se.length>0){var Ie=new Ft.GroundPrimitive({geometryInstances:se,appearance:new Ft.PerInstanceColorAppearance({translucent:!1,vertexShaderSource:w._core.Shaders("vertexShaderSource"),fragmentShaderSource:w._core.Shaders("fragmentShaderSource")}),classificationType:w._option.classificationType,show:w.item.show});w.probj.push(Ie);var ve={level:ie.level,key:oe,data:Ie};w.loadFinishKey.push(oe),w.PrimitiveData.push(ve),w._viewer.scene.primitives.add(Ie),w.returnCount++}},error:function(){},complete:function(ne,se){}})}(V))}}}else{D.state=Ft.QuadtreeTileLoadState.LOADING,D.state===Ft.QuadtreeTileLoadState.LOADING&&(D.data.geometryPrimitive&&(D.state=Ft.QuadtreeTileLoadState.DONE),D.renderable=!0);return}}},this._primitive=new Ft.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:3});var Q=this._viewer.scene,M=Q.primitives;M.add(this._primitive),C||this.setVisibility(!1),this._core.isnull(I.id)&&(I.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+I.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var B={id:I.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this.setTreeobj(B),this._tree.insertGroupId(B,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.createVolumeVectorGeoJsonFeatureLayerJCDthOptimization2=function(o,A,f,m,C,y){var x={show:!0,positions:[],shape:void 0,cornerType:this._cesium.CornerType.ROUNDED,granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.DISABLED,level_max:20,level_min:10},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a)))),this._option=this._core.extend(x,f,!0),A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");var E={polygonHierarchy:void 0,height:0,extrudedHeight:0,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.RED},I=this;this._urlTemplate=A.url+"?"+this._serialize(v.urlParams);var w=A.url+"?"+this._serialize(v.urlParams);this._Provider=new Ts(this._viewer,this._cesium),this._Provider._normalTile=f.level_max-1,this._Provider.loadTile=function(T,D){(function(F,L,R){if(L.state===Ft.QuadtreeTileLoadState.START){if(L.data={lines:[],geometryPrimitive:void 0},L.level>=f.level_min&&L.level<f.level_max&&R.item.show){var k=w.replace(window.encodeURIComponent("{x}"),L.x).replace(window.encodeURIComponent("{y}"),L.y).replace(window.encodeURIComponent("{z}"),L.level);R._cache&&(k+="&"+R._core.getuid()),R._core.xhr({url:k,type:"get",dataType:"json",success:function(U){if(U==null){L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0;return}var V=[],H=[];R.Legend=[];function q(j){for(var de=0;de<j.length;de++)Array.isArray(j[de])?q(j[de]):oe.push(j[de])}function ie(){if(R._option.extrudedHeight&&(E.extrudedHeight=R._option.extrudedHeight),/^\[/.test(R._option.extrudedHeight)&&/\]$/.test(R._option.extrudedHeight)){var j=R._option.extrudedHeight.replace(/\[/,"").replace(/\]/,"");E.extrudedHeight=parseFloat(ne.properties[j])}if(E.material=R._option.material,/^\[/.test(R._option.material)&&/\]$/.test(R._option.material)){var de=R._option.material.replace(/\[/,"").replace(/\]/,"");E.material=ne.properties[de],R._core.isHtmlColor(E.material)?E.material=R._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=R._color.rgbaStringToRgbaObj(E.material)),E.material.red>1&&(E.material.red=E.material.red/255),E.material.green>1&&(E.material.green=E.material.green/255),E.material.blue>1&&(E.material.blue=E.material.blue/255),E.material.alpha>1&&(E.material.a=E.material.alpha/255),E.material=R._color.createColor(E.material.red,E.material.green,E.material.blue,E.material.alpha))}else R._option.material&&(E.material=R._option.material),E.material&&(R._core.isHtmlColor(E.material)?E.material=R._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=R._color.rgbaStringToRgbaObj(E.material)),E.material.red>1&&(E.material.red=E.material.red/255),E.material.green>1&&(E.material.green=E.material.green/255),E.material.blue>1&&(E.material.blue=E.material.blue/255),E.material.alpha>1&&(E.material.a=E.material.alpha/255),E.material=R._color.createColor(E.material.red,E.material.green,E.material.blue,E.material.alpha)));if(oe.length>=2){var me=Ft.Cartesian3.fromDegreesArray(oe);E.polygonHierarchy=new Ft.PolygonHierarchy(me);var _e=new Ft.PolygonGeometry(E),Be=new Ft.GeometryInstance({id:ne,geometry:_e,attributes:{color:new Ft.ColorGeometryInstanceAttribute.fromColor(E.material)}}),Qe="material:"+E.material.red*255+","+E.material.green*255+","+E.material.blue*255;R.Legend.push(Qe),V.push(Be)}}for(var Z=0;Z<U.features.length;Z++){var oe=[],ne=U.features[Z];if(Array.isArray(ne.geometry.coordinates)&&ne.geometry.coordinates.length>0)if(Array.isArray(ne.geometry.coordinates[0][0]))for(var se=0;se<ne.geometry.coordinates.length;se++)oe=[],ne.geometry.coordinates[se].pop(),q(ne.geometry.coordinates[se]),ie(oe);else q(ne.geometry.coordinates),ie(oe)}V.length==0&&(L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0);var ce=new Ft.GroundPrimitive1({geometryInstances:V,appearance:new Ft.PerInstanceColorAppearance({translucent:!1,vertexShaderSource:R._core.Shaders("vertexShaderSource"),fragmentShaderSource:R._core.Shaders("fragmentShaderSource")}),classificationType:R._option.classificationType});L.data.geometryPrimitive=ce,L.state=Ft.QuadtreeTileLoadState.LOADING,L.state===Ft.QuadtreeTileLoadState.LOADING&&(L.data.geometryPrimitive.update1(F,[]),L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0)},error:function(){L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0}})}else{L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0;return}L.state=Ft.QuadtreeTileLoadState.LOADING}})(T,D,I)},this._primitive=new Ft.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:3});var Q=this._viewer.scene,M=Q.primitives;M.add(this._primitive),C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var B={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this.setTreeobj(B),this._tree.insertGroupId(B,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.createVolumeVectorGeoJsonFeatureLayerJCDthOptimization3=function(o,A,f,m,C,y){var x={show:!0,positions:[],shape:void 0,cornerType:this._cesium.CornerType.ROUNDED,granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.DISABLED,level_max:20,level_min:10},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a)))),this._option=this._core.extend(x,f,!0),A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");var E={polygonHierarchy:void 0,height:0,extrudedHeight:0,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.RED},I=this;this._urlTemplate=A.url+"?"+this._serialize(v.urlParams);var w=A.url+"?"+this._serialize(v.urlParams);this._Provider=new Ts(this._viewer,this._cesium),this._Provider._normalTile=f.level_max-1,this._Provider.loadTile=function(T,D){(function(F,L,R){if(L.state===Ft.QuadtreeTileLoadState.START){if(L.data={lines:[],geometryPrimitive:void 0},L.level>=f.level_min&&L.level<f.level_max&&R.item.show){var k=w.replace(window.encodeURIComponent("{x}"),L.x).replace(window.encodeURIComponent("{y}"),L.y).replace(window.encodeURIComponent("{z}"),L.level);R._cache&&(k+="&"+R._core.getuid()),R._core.xhr({url:k,type:"get",dataType:"json",success:function(U){var V=["#ffff00","#ffcc00","#ff3300","#ccff00","#cccc00","#99ff66","#999933","#66cc99","#6633ff","#33ffff","#3399cc","#009933","#ccccff","#ff99ff","#9966ff","#336699"];if(U==null){L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0;return}var H=[],q=[];R.Legend=[];function ie(de){for(var me=0;me<de.length;me++)Array.isArray(de[me])?ie(de[me]):ne.push(de[me])}function Z(){if(R._option.extrudedHeight&&(E.extrudedHeight=R._option.extrudedHeight),/^\[/.test(R._option.extrudedHeight)&&/\]$/.test(R._option.extrudedHeight)){var de=R._option.extrudedHeight.replace(/\[/,"").replace(/\]/,"");E.extrudedHeight=parseFloat(se.properties[de])}if(E.material=R._option.material,/^\[/.test(R._option.material)&&/\]$/.test(R._option.material)){var me=R._option.material.replace(/\[/,"").replace(/\]/,"");E.material=se.properties[me],R._core.isHtmlColor(E.material)?E.material=R._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=R._color.rgbaStringToRgbaObj(E.material)),E.material.red>1&&(E.material.red=E.material.red/255),E.material.green>1&&(E.material.green=E.material.green/255),E.material.blue>1&&(E.material.blue=E.material.blue/255),E.material.alpha>1&&(E.material.a=E.material.alpha/255),E.material=R._color.createColor(E.material.red,E.material.green,E.material.blue,E.material.alpha))}else R._option.material&&(E.material=R._option.material),E.material&&(R._core.isHtmlColor(E.material)?E.material=R._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=R._color.rgbaStringToRgbaObj(E.material)),E.material.red>1&&(E.material.red=E.material.red/255),E.material.green>1&&(E.material.green=E.material.green/255),E.material.blue>1&&(E.material.blue=E.material.blue/255),E.material.alpha>1&&(E.material.a=E.material.alpha/255),E.material=R._color.createColor(E.material.red,E.material.green,E.material.blue,E.material.alpha)));if(ne.length>=2){var _e=Ft.Cartesian3.fromDegreesArray(ne);E.polygonHierarchy=new Ft.PolygonHierarchy(_e),(E.extrudedHeight==0||E.extrudedHeight=="0"||E.extrudedHeight==null||E.extrudedHeight==null)&&(E.extrudedHeight=1e4);var Be=new Ft.PolygonGeometry(E),Qe=V[Math.floor(Math.random()*V.length)],Ie=new Ft.GeometryInstance({id:se,geometry:Be,attributes:{color:Ft.ColorGeometryInstanceAttribute.fromColor(Ft.Color.fromCssColorString(Qe).withAlpha(.5))}}),ve="material:"+E.material.red*255+","+E.material.green*255+","+E.material.blue*255;R.Legend.push(ve),H.push(Ie)}}for(var oe=0;oe<U.features.length;oe++){var ne=[],se=U.features[oe];if(Array.isArray(se.geometry.coordinates)&&se.geometry.coordinates.length>0)if(Array.isArray(se.geometry.coordinates[0][0]))for(var ce=0;ce<se.geometry.coordinates.length;ce++)ne=[],se.geometry.coordinates[ce].pop(),ie(se.geometry.coordinates[ce]),Z(ne);else ie(se.geometry.coordinates),Z(ne)}H.length==0&&(L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0);var j=new Ft.ClassificationPrimitive1({geometryInstances:H,classificationType:Ft.ClassificationType.BOTH});L.data.geometryPrimitive=j,L.state=Ft.QuadtreeTileLoadState.LOADING,L.state===Ft.QuadtreeTileLoadState.LOADING&&(L.data.geometryPrimitive.update(F,[]),L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0)},error:function(){L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0}})}else{L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0;return}L.state=Ft.QuadtreeTileLoadState.LOADING}})(T,D,I)},this._primitive=new Ft.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:3});var Q=this._viewer.scene,M=Q.primitives;M.add(this._primitive),C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var B={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this.setTreeobj(B),this._tree.insertGroupId(B,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.createPointGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y){var x={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:this._core.defaultValue(A.srs,"EPSG:4490")+":{z}",TILEMATRIXSET:this._core.defaultValue(A.srs,"EPSG:4490"),FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium},v=this;!v._core.isnull(f)&&!v._core.isnull(f.color)&&(/^\[/.test(f.color)&&f.color.toString().charAt(0)=="["&&f.color.toString().charAt(f.color.length-1)=="]"||(v._core.isHtmlColor(f.color)?f.color=v._color.colorFromHtmlColor(f.color):(/^rgb/.test(f.color)&&(f.color=v._color.rgbaStringToRgbaObj(f.color)),f.color.r>1&&(f.color.r=f.color.r/255),f.color.g>1&&(f.color.g=f.color.g/255),f.color.b>1&&(f.color.b=f.color.b/255),f.color.a>1&&(f.color.a=f.color.a/255),f.color=v._color.createColor(f.color.r,f.color.g,f.color.b,f.color.a)))),!v._core.isnull(f)&&!v._core.isnull(f.outlineColor)&&(/^\[/.test(f.outlineColor)&&f.outlineColor.toString().charAt(0)=="["&&f.outlineColor.toString().charAt(f.outlineColor.length-1)=="]"||(v._core.isHtmlColor(f.outlineColor)?f.outlineColor=v._color.colorFromHtmlColor(f.outlineColor):(/^rgb/.test(f.outlineColor)&&(f.outlineColor=v._color.rgbaStringToRgbaObj(f.outlineColor)),f.outlineColor.r>1&&(f.outlineColor.r=f.outlineColor.r/255),f.outlineColor.g>1&&(f.outlineColor.g=f.outlineColor.g/255),f.outlineColor.b>1&&(f.outlineColor.b=f.outlineColor.b/255),f.outlineColor.a>1&&(f.outlineColor.a=f.outlineColor.a/255),f.outlineColor=v._color.createColor(f.outlineColor.r,f.outlineColor.g,f.outlineColor.b,f.outlineColor.a))));var v=this;this._urlTemplate=A.url+"?"+this._serialize(x.urlParams);var E=A.url+"?"+this._serialize(x.urlParams);this._Provider=new Ts(this._viewer,this._cesium),this._Provider._normalTile=f.level_max-1;var I={Name:"",text:"",font:" 30px sans-serif",pixelSize:10,style:Ft.LabelStyle.OUTLINE,fillColor:Ft.Color.WHITE,outlineColor:Ft.Color.BLACK,outlineWidth:1,show:!0,showBackground:!1,backgroundColor:new Ft.Color(.165,.165,.165,.8),backgroundPadding:new Ft.Cartesian2(7,5),scale:1,horizontalOrigin:Ft.HorizontalOrigin.CENTER,verticalOrigin:Ft.VerticalOrigin.CENTER,eyeOffset:Ft.Cartesian3.ZERO,pixelOffset:Ft.Cartesian2.ZERO,heightReference:Ft.HeightReference.NONE,scaleByDistance:new Ft.NearFarScalar(0,0,1,1)};!v._core.isnull(f)&&!v._core.isnull(f.backgroundColor)&&(/^\[/.test(f.backgroundColor)&&f.backgroundColor.toString().charAt(0)=="["&&f.backgroundColor.toString().charAt(f.backgroundColor.length-1)=="]"||(v._core.isHtmlColor(f.backgroundColor)?f.backgroundColor=v._color.colorFromHtmlColor(f.backgroundColor):(/^rgb/.test(f.backgroundColor)&&(f.backgroundColor=v._color.rgbaStringToRgbaObj(f.backgroundColor)),f.backgroundColor.r>1&&(f.backgroundColor.r=f.backgroundColor.r/255),f.backgroundColor.g>1&&(f.backgroundColor.g=f.backgroundColor.g/255),f.backgroundColor.b>1&&(f.backgroundColor.b=f.backgroundColor.b/255),f.backgroundColor.a>1&&(f.backgroundColor.a=f.backgroundColor.a/255),f.backgroundColor=v._color.createColor(f.backgroundColor.r,f.backgroundColor.g,f.backgroundColor.b,f.backgroundColor.a))));var w=v._core.extend(I,f,!0);v._core.isnull(f.near)&&(f.near=0),v._core.isnull(f.far)&&(f.far=999999999);var Q=parseFloat(f.near),M=parseFloat(f.far),B=new Ft.DistanceDisplayCondition(Q,M);w.distanceDisplayCondition=B,v._core.isnull(f.font_size)&&(f.font_size="30px"),v._core.isnull(f.font_family)&&(f.font_family=" sans-serif"),w.font=parseFloat(f.font_size)+"px "+f.font_family;var T=f.material;this._Provider.loadTile=function(R,k){(function(U,V,H){if(V.state===Ft.QuadtreeTileLoadState.START){if(V.data={lines:[],geometryPrimitive:void 0},V.level>=f.level_min&&V.level<f.level_max&&H.item.show){var q=E.replace(window.encodeURIComponent("{x}"),V.x).replace(window.encodeURIComponent("{y}"),V.y).replace(window.encodeURIComponent("{z}"),V.level);H._cache&&(q+="&"+H._core.getuid()),H._core.xhr({url:q,type:"get",dataType:"json",success:function(ie){if(ie==null){V.state=Ft.QuadtreeTileLoadState.DONE,V.renderable=!0;return}var Z=new Ft.PointPrimitiveCollection;ie.features.forEach(function(oe){w.id=oe;var ne=0;if(/^\[/.test(w.pointHeight)&&/\]$/.test(w.pointHeight)){var se=w.pointHeight.replace(/\[/,"").replace(/\]/,"");ne=parseFloat(oe.properties[se])}else w.pointHeight!==void 0&&w.pointHeight!==""?ne=parseFloat(w.pointHeight):oe.properties.height!=null&&(ne=parseFloat(oe.properties.height));if(/^\[/.test(f.color)&&/\]$/.test(f.color)){var ce=f.color.replace(/\[/,"").replace(/\]/,"");w.color=oe.properties[ce],H._core.isHtmlColor(w.color)?w.color=H._color.colorFromHtmlColor(w.color):(/^rgb/.test(w.color)&&(w.color=H._color.rgbaStringToRgbaObj(w.color)),w.color.r>1&&(w.color.r=w.color.r/255),w.color.g>1&&(w.color.g=w.color.g/255),w.color.b>1&&(w.color.b=w.color.b/255),w.color.a>1&&(w.color.a=w.color.a/255),w.color=H._color.createColor(w.color.r,w.color.g,w.color.b,w.color.a))}if(/^\[/.test(f.outlineColor)&&/\]$/.test(f.outlineColor)){var ce=f.outlineColor.replace(/\[/,"").replace(/\]/,"");w.outlineColor=oe.properties[ce],H._core.isHtmlColor(w.outlineColor)?w.outlineColor=H._color.colorFromHtmlColor(w.outlineColor):(/^rgb/.test(w.outlineColor)&&(w.outlineColor=H._color.rgbaStringToRgbaObj(w.outlineColor)),w.outlineColor.r>1&&(w.outlineColor.r=w.outlineColor.r/255),w.outlineColor.g>1&&(w.outlineColor.g=w.outlineColor.g/255),w.outlineColor.b>1&&(w.outlineColor.b=w.outlineColor.b/255),w.outlineColor.a>1&&(w.outlineColor.a=w.outlineColor.a/255),w.outlineColor=H._color.createColor(w.outlineColor.r,w.outlineColor.g,w.outlineColor.b,w.outlineColor.a))}w.position=new Ft.Cartesian3.fromDegrees(oe.geometry.coordinates[0],oe.geometry.coordinates[1],ne),w.text=oe.properties.name;var j={show:w.show,position:w.position,pixelSize:w.pixelSize,color:w.color,outlineColor:w.outlineColor,outlineWidth:w.outlineWidth,id:oe};if(w.color&&w.color.red){var de="color:"+w.color.red*255+","+w.color.green*255+","+w.color.blue*255+";outlineColor:"+w.outlineColor.red*255+","+w.outlineColor.green*255+","+w.outlineColor.blue*255;H.Legend.push(de)}j.id.treeID=f.id,j.id.VectorType="point",j.id.VectorStyle={show:j.show,pointHeight:ne,position:j.position,pixelSize:j.pixelSize,color:j.color,outlineColor:j.outlineColor,outlineWidth:j.outlineWidth},Z.add(j)}),V.data.geometryPrimitive=Z,V.state=Ft.QuadtreeTileLoadState.LOADING,V.state===Ft.QuadtreeTileLoadState.LOADING&&(V.data.geometryPrimitive.update(U,[]),V.state=Ft.QuadtreeTileLoadState.DONE,V.renderable=!0)},error:function(){V.count==null&&(V.count=0),V.count+=1,V.count>=2?(V.state=Ft.QuadtreeTileLoadState.DONE,V.renderable=!0):V.state=Ft.QuadtreeTileLoadState.START}})}else{V.state=Ft.QuadtreeTileLoadState.DONE,V.renderable=!0;return}V.state=Ft.QuadtreeTileLoadState.LOADING}})(R,k,v)},this._primitive=new this._cesium.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:5});var D=this._viewer.scene,F=D.primitives;f&&f.time&&(this._Provider._availability=new Ft.TimeIntervalCollection([new Ft.TimeInterval({start:f.time.start?Ft.JulianDate.fromDate(new Date(f.time.start)):Ft.Iso8601.MINIMUM_VALUE,stop:f.time.end?Ft.JulianDate.fromDate(new Date(f.time.end)):Ft.Iso8601.MAXIMUM_VALUE})]),this._Provider.isAvailable=function(R){if(!Ft.defined(R))throw new Ft.DeveloperError("time is required.");var k=this._availability;return!Ft.defined(k)||k.contains(R)}),F.add(this._primitive),C?(this.item.show=!0,this.setVisibility(!0)):this.setVisibility(!1),this._core.isnull(f.id)&&(f.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+f.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var L={id:f.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"pointLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this._Provider.treeID=f.id,this.setTreeobj(L),this._tree.insertGroupId(L,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.VolumeVectorGeoJsonFeatureLayerOptimization=function(o,A,f,m,C,y){var x={show:!0,positions:[],shape:void 0,cornerType:this._cesium.CornerType.ROUNDED,granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.DISABLED,level_max:20,level_min:10},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:this._core.defaultValue(A.srs,"EPSG:4490")+":{z}",TILEMATRIXSET:this._core.defaultValue(A.srs,"EPSG:4490"),FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a)))),this._option=this._core.extend({...x},f,!0),A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");var E={id:this._option.id,polygonHierarchy:void 0,height:0,extrudedHeight:0,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,perPositionHeight:!1,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.RED},I=this;let w=A.url.indexOf("/gisserver/")>-1;var Q;w?Q=A.url+`/${window.encodeURIComponent("{z}")}/${window.encodeURIComponent("{x}")}/${window.encodeURIComponent("{y}")}.json`:Q=A.url+"?"+this._serialize(v.urlParams),this._urlTemplate=Q,this._Provider=new Ts(this._viewer,this._cesium,w?new Ft.WebMercatorTilingScheme:void 0),this._Provider._normalTile=f.level_max-1,this.initThisProvider=()=>{this.initThisProvider=void 0,this._Provider.loadTile=function(L,R){(function(k,U,V){if(U.state===Ft.QuadtreeTileLoadState.START){if(U.data={lines:[],geometryPrimitive:void 0},U.level>=f.level_min&&U.level<f.level_max&&V.item.show){if(w&&(U.reverseY=V._Provider.tilingScheme.getNumberOfYTilesAtLevel(U.level)-U.y-1),V.TileMatrixLimits){let q=V.TileMatrixLimits[U.level];if(!q||q&&(U.x>q.maxCol||U.x<q.minCol||U.y>q.maxRow||U.y<q.minRow)){U.state=Ft.QuadtreeTileLoadState.DONE,U.renderable=!0;return}}var H=Q.replace(window.encodeURIComponent("{x}"),U.x).replace(window.encodeURIComponent("{y}"),U.reverseY||U.y).replace(window.encodeURIComponent("{z}"),U.level);V._cache&&(H+="&"+V._core.getuid()),V._core.xhr({url:H,type:"get",dataType:"json",success:function(q){if(q==null){U.state=Ft.QuadtreeTileLoadState.DONE,U.renderable=!0;return}var ie=[],Z=[];V.Legend=[];function oe(Qe){for(var Ie=0;Ie<Qe.length;Ie++)Array.isArray(Qe[Ie])?oe(Qe[Ie]):(ce.push(Qe[Ie]),Ie===2&&!j&&(j=!0))}function ne(){if(/^\[/.test(V._option.extrudedHeight)&&/\]$/.test(V._option.extrudedHeight)){let te=V._option.extrudedHeight.replace(/\[/,"").replace(/\]/,"");E.extrudedHeight=parseFloat(de.properties[te])}else V._option.extrudedHeight&&(E.extrudedHeight=parseFloat(V._option.extrudedHeight));if(/^\[/.test(V._option.height)&&/\]$/.test(V._option.height)){let te=V._option.height.replace(/\[/,"").replace(/\]/,"");E.height=parseFloat(de.properties[te])}else V._option.height&&(E.height=parseFloat(V._option.height));if(E.material=V._option.material,/^\[/.test(V._option.material)&&/\]$/.test(V._option.material)){var Qe=V._option.material.replace(/\[/,"").replace(/\]/,"");E.material=de.properties[Qe],V._core.isHtmlColor(E.material)?E.material=V._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=V._color.rgbaStringToRgbaObj(E.material)),E.material.red>1&&(E.material.red=E.material.red/255),E.material.green>1&&(E.material.green=E.material.green/255),E.material.blue>1&&(E.material.blue=E.material.blue/255),E.material.alpha>1&&(E.material.a=E.material.alpha/255),E.material=V._color.createColor(E.material.red,E.material.green,E.material.blue,E.material.alpha))}else V._option.material&&(E.material=V._option.material),E.material&&(V._core.isHtmlColor(E.material)?E.material=V._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=V._color.rgbaStringToRgbaObj(E.material)),E.material.red>1&&(E.material.red=E.material.red/255),E.material.green>1&&(E.material.green=E.material.green/255),E.material.blue>1&&(E.material.blue=E.material.blue/255),E.material.alpha>1&&(E.material.a=E.material.alpha/255),E.material=V._color.createColor(E.material.red,E.material.green,E.material.blue,E.material.alpha)));if(f.preLoad&&f.preLoad(E,de),ce.length>=2){var Ie=j?Ft.Cartesian3.fromDegreesArrayHeights(ce):Ft.Cartesian3.fromDegreesArray(ce);E.polygonHierarchy=new Ft.PolygonHierarchy(Ie);var ve=new Ft.PolygonGeometry(E);de.treeID=E.id,de.VectorType="polygon",de.VectorStyle={haveZ:j,extrudedHeight:E.extrudedHeight,positions:ce,material:E.material};var K=new Ft.GeometryInstance({id:de,geometry:ve,attributes:{color:new Ft.ColorGeometryInstanceAttribute.fromColor(E.material),distanceDisplayCondition:new Ft.DistanceDisplayConditionGeometryInstanceAttribute(V._option.near,V._option.far)}}),W="material:"+E.material.red*255+","+E.material.green*255+","+E.material.blue*255;V.Legend.push(W),ie.push(K)}}for(var se=0;se<q.features.length;se++){var ce=[],j=!1,de=q.features[se];if(Array.isArray(de.geometry.coordinates)&&de.geometry.coordinates.length>0)if(Array.isArray(de.geometry.coordinates[0][0]))for(var me=0;me<de.geometry.coordinates.length;me++)ce=[],de.geometry.coordinates[me].pop(),oe(de.geometry.coordinates[me]),ne(ce);else oe(de.geometry.coordinates),ne(ce)}ie.length==0&&(U.state=Ft.QuadtreeTileLoadState.DONE,U.renderable=!0);var _e,Be;E.material.alpha<1?Be=new Ft.PerInstanceColorAppearance({translucent:!0}):Be=new Ft.PerInstanceColorAppearance({translucent:!1,vertexShaderSource:V._core.Shaders("vertexShaderSource"),fragmentShaderSource:V._core.Shaders("fragmentShaderSource")}),V._option.clampToGround?_e=new Ft.GroundPrimitive({geometryInstances:ie,appearance:Be,classificationType:V._option.classificationType}):_e=new Ft.Primitive({geometryInstances:ie,appearance:Be,shadows:V._option.shadows}),U.data.geometryPrimitive=_e,U.state=Ft.QuadtreeTileLoadState.LOADING,U.state===Ft.QuadtreeTileLoadState.LOADING&&(U.data.geometryPrimitive.update(k,[]),U.state=Ft.QuadtreeTileLoadState.DONE,U.renderable=!0)},error:function(){U.state=Ft.QuadtreeTileLoadState.DONE,U.renderable=!0}})}else{U.state=Ft.QuadtreeTileLoadState.DONE,U.renderable=!0;return}U.state=Ft.QuadtreeTileLoadState.LOADING}})(L,R,I)},typeof y=="function"&&y(this.item)};let M,B;this.saveDefaultVectorData=()=>{B=I._core.extend({},f,!0)},this.restoreVector=()=>{B&&(f=B,I._option=I._core.extend({...x},f,!0),I._Provider._normalTile=f.level_max-1,I._primitive&&I._primitive._tilesToRender&&I._primitive._tilesToRender.length&&(I._primitive._tilesToRender.forEach(L=>{L.data.geomeitryPrimitive&&L.data.geomeitryPrimitive.destroy(),L.state=Ft.QuadtreeTileLoadState.START}),I._primitive._tileToUpdateHeights.forEach(L=>{L.data.geomeitryPrimitive&&L.data.geomeitryPrimitive.destroy(),L.state=Ft.QuadtreeTileLoadState.START}),I._primitive._tileToUpdateHeights=[],I._primitive._tilesToRender=[])),B=void 0},this.updataVector=(L={})=>{(L.material||L.outlineColor)&&(L.material&&(L.material=Ft.Color.fromCssColorString(L.material)),L.outlineColor&&(L.outlineColor=Ft.Color.fromCssColorString(L.outlineColor))),(L.minimumLevel!==void 0||L.maximumLevel!==void 0)&&(L.minimumLevel!==void 0&&(L.level_min=L.minimumLevel),L.maximumLevel!==void 0&&(L.level_max=L.maximumLevel)),f=I._core.extend(f,L,!0),I._option=I._core.extend(I._option,f,!0),I._Provider._normalTile=f.level_max-1,I._primitive&&I._primitive._tilesToRender&&I._primitive._tilesToRender.length&&(clearTimeout(M),M=setTimeout(()=>{I._primitive._tilesToRender.forEach(R=>{R.data.geomeitryPrimitive&&R.data.geomeitryPrimitive.destroy(),R.state=Ft.QuadtreeTileLoadState.START}),I._primitive._tileToUpdateHeights.forEach(R=>{R.data.geomeitryPrimitive&&R.data.geomeitryPrimitive.destroy(),R.state=Ft.QuadtreeTileLoadState.START}),I._primitive._tileToUpdateHeights=[],I._primitive._tilesToRender=[]},100))},this._primitive=new Ft.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:5});var T=this._viewer.scene,D=T.primitives;f&&f.time&&(this._Provider._availability=new Ft.TimeIntervalCollection([new Ft.TimeInterval({start:f.time.start?Ft.JulianDate.fromDate(new Date(f.time.start)):Ft.Iso8601.MINIMUM_VALUE,stop:f.time.end?Ft.JulianDate.fromDate(new Date(f.time.end)):Ft.Iso8601.MAXIMUM_VALUE})]),this._Provider.isAvailable=function(L){if(!Ft.defined(L))throw new Ft.DeveloperError("time is required.");var R=this._availability;return!Ft.defined(R)||R.contains(L)}),D.add(this._primitive),this._core.getWMTSData({url:A.url,layer:A.layer,srs:A.srs||"EPSG:4490",gisserverTMS:w},L=>{I.item.boundingSphere=L.boundingSphere,I.TileMatrixLimits=L.TileMatrixLimits,I.initThisProvider()}),C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var F={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this._Provider.treeID=F.id,this.setTreeobj(F),this._tree.insertGroupId(F,this._core.isnull(m)?0:m),this};Ll.prototype.createModelGeoJsonFeatureLayerProvider0825=function(o,A,f,m,C,y){var x=this,v={url:"",color:Ft.Color.DARKSALMON,scale:2},E={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:this._core.defaultValue(A.srs,"EPSG:4490")+":{z}",TILEMATRIXSET:this._core.defaultValue(A.srs,"EPSG:4490"),FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!x._core.isnull(f)&&!x._core.isnull(f.color)&&(/^\[/.test(f.color)&&f.color.toString().charAt(0)=="["&&f.color.toString().charAt(f.color.length-1)=="]"||(x._core.isHtmlColor(f.color)?f.color=x._color.colorFromHtmlColor(f.color):(/^rgb/.test(f.color)&&(f.color=x._color.rgbaStringToRgbaObj(f.color)),f.color.r>1&&(f.color.r=f.color.r/255),f.color.g>1&&(f.color.g=f.color.g/255),f.color.b>1&&(f.color.b=f.color.b/255),f.color.a>1&&(f.color.a=f.color.a/255),f.color=x._color.createColor(f.color.r,f.color.g,f.color.b,f.color.a))));var I=x._core.extend(v,f,!0);x._core.isnull(f.near)&&(f.near=0),x._core.isnull(f.far)&&(f.far=999999999);var w=parseFloat(f.near),Q=parseFloat(f.far),M=new Ft.DistanceDisplayCondition(w,Q);I.distanceDisplayCondition=M;var B=f.material;this._urlTemplate=A.url+"?"+this._serialize(E.urlParams);var T=A.url+"?"+this._serialize(E.urlParams);this._Provider=new Ts(this._viewer,this._cesium),this._Provider._normalTile=f.level_max-1,this._Provider._minimumHeight=parseFloat(I.height)||0,this._Provider.loadTile=function(R,k){if(k.state===Ft.QuadtreeTileLoadState.START){if(k.data={lines:[],geometryPrimitive:void 0},k.level>=f.level_min&&k.level<f.level_max&&x.item.show){var U=T.replace(window.encodeURIComponent("{x}"),k.x).replace(window.encodeURIComponent("{y}"),k.y).replace(window.encodeURIComponent("{z}"),k.level);x._cache&&(U+="&"+x._core.getuid()),x._core.xhr({url:U,type:"get",dataType:"json",success:function(V){if(V==null){k.state=Ft.QuadtreeTileLoadState.DONE,k.renderable=!0;return}var H=new Ft.PrimitiveCollection({isModel:!0});V.features.forEach(function(q){I.id=q;var ie=q.geometry.coordinates[2]||0;if(q.properties.height!=null&&(ie=parseFloat(q.properties.height)),/^\[/.test(I.height)&&/\]$/.test(I.height)){var Z=I.height.replace(/\[/,"").replace(/\]/,"");ie+=parseFloat(q.properties[Z])}else ie+=parseFloat(I.height)||0;I.modelMatrix=Ft.Transforms.eastNorthUpToFixedFrame(Ft.Cartesian3.fromDegrees(q.geometry.coordinates[0],q.geometry.coordinates[1],ie));var oe=Ft.Model.fromGltf({id:q,url:I.uri,color:I.color,modelMatrix:I.modelMatrix,scale:I.scale,heightReference:parseInt(I.heightReference),distanceDisplayCondition:I.distanceDisplayCondition});H.add(oe)}),V.features.length==0&&(k.state=Ft.QuadtreeTileLoadState.DONE,k.renderable=!0),k.data.geometryPrimitive=H,k.state=Ft.QuadtreeTileLoadState.LOADING,k.state===Ft.QuadtreeTileLoadState.LOADING&&(k.data.geometryPrimitive.update(R,[]),k.state=Ft.QuadtreeTileLoadState.DONE,k.renderable=!0)},error:function(){k.count==null&&(k.count=0),k.count+=1,k.count>=2?(k.state=Ft.QuadtreeTileLoadState.DONE,k.renderable=!0):k.state=Ft.QuadtreeTileLoadState.START}})}else{k.state=Ft.QuadtreeTileLoadState.DONE,k.renderable=!0;return}k.state=Ft.QuadtreeTileLoadState.LOADING}},this._primitive=new Ft.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:3});var D=this._viewer.scene,F=D.primitives;F.add(this._primitive),C||this.setVisibility(!1),this._core.isnull(I.id)&&(I.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+I.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var L={id:I.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this.setTreeobj(L),this._tree.insertGroupId(L,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.createModelGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y){var x=this,v={url:"",color:Ft.Color.DARKSALMON,scale:2},E={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:this._core.defaultValue(A.srs,"EPSG:4490")+":{z}",TILEMATRIXSET:this._core.defaultValue(A.srs,"EPSG:4490"),FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,Cesium:this._cesium};!x._core.isnull(f)&&!x._core.isnull(f.color)&&(/^\[/.test(f.color)&&f.color.toString().charAt(0)=="["&&f.color.toString().charAt(f.color.length-1)=="]"||(x._core.isHtmlColor(f.color)?f.color=x._color.colorFromHtmlColor(f.color):(/^rgb/.test(f.color)&&(f.color=x._color.rgbaStringToRgbaObj(f.color)),f.color.r>1&&(f.color.r=f.color.r/255),f.color.g>1&&(f.color.g=f.color.g/255),f.color.b>1&&(f.color.b=f.color.b/255),f.color.a>1&&(f.color.a=f.color.a/255),f.color=x._color.createColor(f.color.r,f.color.g,f.color.b,f.color.a))));var I=x._core.extend(v,f,!0);x._core.isnull(f.near)&&(f.near=0),x._core.isnull(f.far)&&(f.far=999999999);var w=parseFloat(f.near),Q=parseFloat(f.far),M=new Ft.DistanceDisplayCondition(w,Q);I.distanceDisplayCondition=M;var B=f.material;let T=A.url.indexOf("/gisserver/")>-1;var D;T?D=A.url+`/${window.encodeURIComponent("{z}")}/${window.encodeURIComponent("{x}")}/${window.encodeURIComponent("{y}")}.json`:D=A.url+"?"+this._serialize(E.urlParams),this._urlTemplate=D,this._Provider=new Ts(this._viewer,this._cesium,T?new Ft.WebMercatorTilingScheme:void 0),this._Provider._normalTile=f.level_max-1,this._Provider._minimumHeight=parseFloat(I.height)||0,this.initThisProvider=()=>{this.initThisProvider=void 0,this._Provider.loadTile=function(V,H){if(H.state===Ft.QuadtreeTileLoadState.START){if(H.data={lines:[],geometryPrimitive:void 0},H.level>=f.level_min&&H.level<f.level_max&&x.item.show){if(T&&(H.reverseY=x._Provider.tilingScheme.getNumberOfYTilesAtLevel(H.level)-H.y-1),x.TileMatrixLimits){let ie=x.TileMatrixLimits[H.level];if(!ie||ie&&(H.x>ie.maxCol||H.x<ie.minCol||H.y>ie.maxRow||H.y<ie.minRow)){H.state=Ft.QuadtreeTileLoadState.DONE,H.renderable=!0;return}}var q=D.replace(window.encodeURIComponent("{x}"),H.x).replace(window.encodeURIComponent("{y}"),H.reverseY||H.y).replace(window.encodeURIComponent("{z}"),H.level);x._cache&&(q+="&"+x._core.getuid()),x._core.xhr({url:q,type:"get",dataType:"json",success:function(ie){if(ie==null){H.state=Ft.QuadtreeTileLoadState.DONE,H.renderable=!0;return}let Z=[],oe;Ft.ModelInstanceCollection||(oe=new Ft.PrimitiveCollection),ie.features.forEach(function(ne){I.id=ne;var se=ne.geometry.coordinates[2]||0;if(ne.properties.height!=null&&(se=parseFloat(ne.properties.height)),/^\[/.test(I.height)&&/\]$/.test(I.height)){var ce=I.height.replace(/\[/,"").replace(/\]/,"");se+=parseFloat(ne.properties[ce])}else se+=parseFloat(I.height)||0;let j=Ft.Transforms.eastNorthUpToFixedFrame(Ft.Cartesian3.fromDegrees(ne.geometry.coordinates[0],ne.geometry.coordinates[1],se)),de=I.heading||0,me=I.pitch||0,_e=I.roll||0;/^\[/.test(de)&&/\]$/.test(de)&&(de=de.replace(/\[/,"").replace(/\]/,""),de=parseFloat(ne.properties[de])),/^\[/.test(me)&&/\]$/.test(me)&&(me=me.replace(/\[/,"").replace(/\]/,""),me=parseFloat(ne.properties[me])),/^\[/.test(_e)&&/\]$/.test(_e)&&(_e=_e.replace(/\[/,"").replace(/\]/,""),_e=parseFloat(ne.properties[_e]));let Be=new Ft.HeadingPitchRoll(Ft.Math.toRadians(de),Ft.Math.toRadians(me),Ft.Math.toRadians(_e)),Qe=Ft.Matrix3.fromHeadingPitchRoll(Be);Ft.Matrix4.multiplyByMatrix3(j,Qe,j),Ft.Matrix4.multiplyByUniformScale(j,I.scale,j),oe?oe.add(Ft.Model.fromGltf({id:ne,url:I.uri,modelMatrix:j,color:I.color})):Z.push({modelMatrix:j,modelId:ne})}),oe||(oe=new Ft.ModelInstanceCollection({url:I.uri,instances:Z,color:I.color})),ie.features.length==0&&(H.state=Ft.QuadtreeTileLoadState.DONE,H.renderable=!0),H.data.geometryPrimitive=oe,H.state=Ft.QuadtreeTileLoadState.LOADING,H.state===Ft.QuadtreeTileLoadState.LOADING&&(H.data.geometryPrimitive.update(V,[]),H.state=Ft.QuadtreeTileLoadState.DONE,H.renderable=!0)},error:function(){H.count==null&&(H.count=0),H.count+=1,H.count>=2?(H.state=Ft.QuadtreeTileLoadState.DONE,H.renderable=!0):H.state=Ft.QuadtreeTileLoadState.START}})}else{H.state=Ft.QuadtreeTileLoadState.DONE,H.renderable=!0;return}H.state=Ft.QuadtreeTileLoadState.LOADING}},typeof y=="function"&&y(this.item)};let F,L;this.saveDefaultVectorData=()=>{L=x._core.extend({},f,!0)},this.restoreVector=()=>{L&&(f=L,I=x._core.extend({...v},f,!0),x._Provider._normalTile=f.level_max-1,x._primitive&&x._primitive._tilesToRender&&x._primitive._tilesToRender.length&&(x._primitive._tilesToRender.forEach(V=>{V.data.geomeitryPrimitive&&V.data.geomeitryPrimitive.destroy(),V.state=Ft.QuadtreeTileLoadState.START}),x._primitive._tileToUpdateHeights.forEach(V=>{V.data.geomeitryPrimitive&&V.data.geomeitryPrimitive.destroy(),V.state=Ft.QuadtreeTileLoadState.START}),x._primitive._tileToUpdateHeights=[],x._primitive._tilesToRender=[])),L=void 0},this.updataVector=(V={})=>{(V.color||V.material)&&(V.color=Ft.Color.fromCssColorString(V.color||V.material)),(V.minimumLevel!==void 0||V.maximumLevel!==void 0)&&(V.minimumLevel!==void 0&&(V.level_min=V.minimumLevel),V.maximumLevel!==void 0&&(V.level_max=V.maximumLevel)),f=x._core.extend(f,V,!0),I=x._core.extend(I,f,!0),x._Provider._normalTile=f.level_max-1,x._primitive&&x._primitive._tilesToRender&&x._primitive._tilesToRender.length&&(clearTimeout(F),F=setTimeout(()=>{x._primitive._tilesToRender.forEach(H=>{H.data.geomeitryPrimitive&&H.data.geomeitryPrimitive.destroy(),H.state=Ft.QuadtreeTileLoadState.START}),x._primitive._tileToUpdateHeights.forEach(H=>{H.data.geomeitryPrimitive&&H.data.geomeitryPrimitive.destroy(),H.state=Ft.QuadtreeTileLoadState.START}),x._primitive._tileToUpdateHeights=[],x._primitive._tilesToRender=[]},100))},this._primitive=new this._cesium.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:3});var R=this._viewer.scene,k=R.primitives;f&&f.time&&(this._Provider._availability=new Ft.TimeIntervalCollection([new Ft.TimeInterval({start:f.time.start?Ft.JulianDate.fromDate(new Date(f.time.start)):Ft.Iso8601.MINIMUM_VALUE,stop:f.time.end?Ft.JulianDate.fromDate(new Date(f.time.end)):Ft.Iso8601.MAXIMUM_VALUE})]),this._Provider.isAvailable=function(V){if(!Ft.defined(V))throw new Ft.DeveloperError("time is required.");var H=this._availability;return!Ft.defined(H)||H.contains(V)}),k.add(this._primitive),this._core.getWMTSData({url:A.url,layer:A.layer,srs:A.srs||"EPSG:4490",gisserverTMS:T},V=>{x.item.boundingSphere=V.boundingSphere,x.TileMatrixLimits=V.TileMatrixLimits,x.initThisProvider()}),C||this.setVisibility(!1),this._core.isnull(I.id)&&(I.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+I.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var U={id:I.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this.setTreeobj(U),this._tree.insertGroupId(U,this._core.isnull(m)?0:m),this};Ll.prototype.VolumeVectorGeoJsonFeatureLayerOptimization1=function(o,A,f,m,C,y){var x={show:!0,positions:[],shape:void 0,cornerType:this._cesium.CornerType.ROUNDED,granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.DISABLED,level_max:20,level_min:10},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a)))),this._option=this._core.extend(x,f,!0),A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");var E=[],I={polygonHierarchy:void 0,height:0,extrudedHeight:0,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,perPositionHeight:!1,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.RED},w=this;this._urlTemplate=A.url+"?"+this._serialize(v.urlParams),this._Provider=new Ts(this._viewer,this._cesium),this._Provider._normalTile=f.level_max-1,w._defaultStyle={outlineColor:Ft.Color.fromCssColorString("rgba(209,204,226,0)"),lineWidth:0,outline:!0,fill:!0,fillColor:Ft.Color.fromCssColorString("rgba(220,20,60,1)"),fillShow:"nod",tileCacheSize:200,showMaker:!1,showCenterLabel:!0,fontColor:Ft.Color.fromCssColorString("rgba(255,0,0,1)"),labelOffsetX:-10,labelOffsetY:-5,fontSize:13,fontFamily:"\u9ED1\u4F53",pointColor:Ft.Color.fromCssColorString("rgba(255,0,0,0)"),centerLabelPropertyName:"NAME"},w._option.fill.indexOf("[")!=-1?w._defaultStyle.fillShow=w._option.fill:w._defaultStyle.fillColor=Ft.Color.fromCssColorString(w._option.fill),this._Provider.loadTile=function(T,D){if(this.tile=null,this.tile=D,D.state===this._cesium.QuadtreeTileLoadState.START&&w.item.show){var F="z"+D.level+"x"+D.x+"y"+D.y;if(D.data={lines:[],geometryPrimitive:void 0},D.level>f.level_max+2&&w.probj.length>0)for(var L=0;L<w.probj.length;U++){w._viewer.entities.remove(w.probj[L]);var R=w.probj.indexOf(w.probj[L]);w.probj.splice(R,1)}if(D.level>=f.level_min&&D.level<f.level_max&&w.item.show){var k=Vi.filter(E,function(V){return V.x==D.x&&V.y==D.y&&V.level==D.level});if(k.length!=0&&k[0].data&&k[0].data.length>0){D.data.geometryPrimitive=new Ft.Primitive({geometryInstances:k[0].data,appearance:new Ft.PerInstanceColorAppearance({flat:!0,translucent:!0,faceForward:!0,closed:!0}),shadows:Ft.ShadowMode.ENABLED}),D.state=Ft.QuadtreeTileLoadState.LOADING,D.state===Ft.QuadtreeTileLoadState.LOADING&&(D.data.geometryPrimitive&&(D.state=Ft.QuadtreeTileLoadState.DONE),D.renderable=!0);return}if(w.PrimitiveData.length>0){for(var U=0;U<w.PrimitiveData.length;U++)if(w.PrimitiveData[U].key==F){w.Primitivekey.includes(F)||w.Primitivekey.push(F);return}}w.Primitivekey.includes(F)||(w.Primitivekey.push(F),E.push({level:D.level,x:D.x,y:D.y,data:void 0}),function(V){var H=w._urlTemplate.replace(window.encodeURIComponent("{x}"),V.x).replace(window.encodeURIComponent("{y}"),V.y).replace(window.encodeURIComponent("{z}"),V.level);w.tilesLength++;var q="z"+V.level+"x"+V.x+"y"+V.y;w._cache&&(H+="&"+w._core.getuid());var ie={xMin:Ft.Math.toDegrees(V._rectangle.west),yMin:Ft.Math.toDegrees(V._rectangle.south),xMax:Ft.Math.toDegrees(V._rectangle.east),yMax:Ft.Math.toDegrees(V._rectangle.north)};w._core.xhr({url:H,type:"get",dataType:"json",success:function(Z){var oe=Z;w._tileWidth=256,w._tileHeight=256,w.x=V._x,w.y=V._y,w.level=V._level,w._createCanvas(),w._drawGeojson(w._context,0,0,Z,ie,w._tileWidth,w._tileHeight,w._fill,w._outline,w.x,w.y,w.level);var ne=w._viewer.entities.add({ids:oe,name:"Rotating rectangle with rotating texture coordinate",rectangle:{coordinates:V.rectangle,material:new Ft.ImageMaterialProperty({image:w._canvas,transparent:!0}),zIndex:V.level,classificationType:Ft.ClassificationType.BOTH}});w.probj.push(ne);var se={level:V.level,key:q,data:ne};w.loadFinishKey.push(q),w.PrimitiveData.push(se),w.returnCount++,w.removeObsoleteEntitiesxp(V.rectangle)},error:function(){V.state=Ft.QuadtreeTileLoadState.DONE,V.renderable=!0}})}(D))}else{D.state=Ft.QuadtreeTileLoadState.LOADING,D.state===Ft.QuadtreeTileLoadState.LOADING&&(D.data.geometryPrimitive&&(D.state=Ft.QuadtreeTileLoadState.DONE),D.renderable=!0);return}}},this._primitive=new Ft.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:3});var Q=this._viewer.scene,M=Q.primitives;M.add(this._primitive),C||this.setVisibility(!1),this._core.isnull(I.id)&&(I.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+I.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var B={id:I.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this.setTreeobj(B),this._tree.insertGroupId(B,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.VolumeVectorGeoJsonFeatureLayerOptimizationtest=function(o,A,f,m,C,y){var x={show:!0,positions:[],shape:void 0,cornerType:this._cesium.CornerType.ROUNDED,granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.DISABLED,level_max:20,level_min:10},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a)))),this._option=this._core.extend(x,f,!0),A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");var E=[],I={polygonHierarchy:void 0,height:0,extrudedHeight:0,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,perPositionHeight:!1,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.RED},w=this;this._urlTemplate=A.url+"?"+this._serialize(v.urlParams),this._Provider=new Ts(this._viewer,this._cesium),this._Provider._normalTile=f.level_max-1,w._defaultStyle={outlineColor:Ft.Color.fromCssColorString("rgba(209,204,226,0)"),lineWidth:0,outline:!0,fill:!0,fillColor:Ft.Color.fromCssColorString("rgba(220,20,60,1)"),fillShow:"nod",tileCacheSize:200,showMaker:!1,showCenterLabel:!0,fontColor:Ft.Color.fromCssColorString("rgba(255,0,0,1)"),labelOffsetX:-10,labelOffsetY:-5,fontSize:13,fontFamily:"\u9ED1\u4F53",pointColor:Ft.Color.fromCssColorString("rgba(255,0,0,0)"),centerLabelPropertyName:"NAME"},w._option.fill.indexOf("[")!=-1?w._defaultStyle.fillShow=w._option.fill:w._defaultStyle.fillColor=Ft.Color.fromCssColorString(w._option.fill),this._Provider.loadTile=function(T,D){if(this.tile=null,this.tile=D,D.state===this._cesium.QuadtreeTileLoadState.START&&w.item.show){var F="z"+D.level+"x"+D.x+"y"+D.y;if(D.data={lines:[],geometryPrimitive:void 0},D.level>f.level_max+2&&w.probj.length>0)for(var L=0;L<w.probj.length;U++){w._viewer.entities.remove(w.probj[L]);var R=w.probj.indexOf(w.probj[L]);w.probj.splice(R,1)}if(D.level>=f.level_min&&D.level<f.level_max&&w.item.show){var k=Vi.filter(E,function(V){return V.x==D.x&&V.y==D.y&&V.level==D.level});if(k.length!=0&&k[0].data&&k[0].data.length>0){D.data.geometryPrimitive=new Ft.Primitive({geometryInstances:k[0].data,appearance:new Ft.PerInstanceColorAppearance({flat:!0,translucent:!0,faceForward:!0,closed:!0}),shadows:Ft.ShadowMode.ENABLED}),D.state=Ft.QuadtreeTileLoadState.LOADING,D.state===Ft.QuadtreeTileLoadState.LOADING&&(D.data.geometryPrimitive&&(D.state=Ft.QuadtreeTileLoadState.DONE),D.renderable=!0);return}if(w.PrimitiveData.length>0){for(var U=0;U<w.PrimitiveData.length;U++)if(w.PrimitiveData[U].key==F){w.Primitivekey.includes(F)||w.Primitivekey.push(F);return}}w.Primitivekey.includes(F)||(w.Primitivekey.push(F),E.push({level:D.level,x:D.x,y:D.y,data:void 0}),function(V){var H=w._urlTemplate.replace(window.encodeURIComponent("{x}"),V.x).replace(window.encodeURIComponent("{y}"),V.y).replace(window.encodeURIComponent("{z}"),V.level);w.tilesLength++;var q="z"+V.level+"x"+V.x+"y"+V.y;w._cache&&(H+="&"+w._core.getuid());var ie={xMin:Ft.Math.toDegrees(V._rectangle.west),yMin:Ft.Math.toDegrees(V._rectangle.south),xMax:Ft.Math.toDegrees(V._rectangle.east),yMax:Ft.Math.toDegrees(V._rectangle.north)};w._core.xhr({url:H,type:"get",dataType:"json",success:function(Z){var oe=Z;w._tileWidth=256,w._tileHeight=256,w.x=V._x,w.y=V._y,w.level=V._level;var ne=w._viewer.entities.add({ids:oe,name:"Rotating rectangle with rotating texture coordinate",rectangle:{coordinates:V.rectangle,material:new Ft.ImageMaterialProperty({image:Z,transparent:!0}),zIndex:V.level,classificationType:Ft.ClassificationType.BOTH}});w.probj.push(ne);var se={level:V.level,key:q,data:ne};w.loadFinishKey.push(q),w.PrimitiveData.push(se),w.returnCount++,w.removeObsoleteEntitiesxp(V.rectangle)},error:function(){V.state=Ft.QuadtreeTileLoadState.DONE,V.renderable=!0}})}(D))}else{D.state=Ft.QuadtreeTileLoadState.LOADING,D.state===Ft.QuadtreeTileLoadState.LOADING&&(D.data.geometryPrimitive&&(D.state=Ft.QuadtreeTileLoadState.DONE),D.renderable=!0);return}}},this._primitive=new Ft.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:3});var Q=this._viewer.scene,M=Q.primitives;M.add(this._primitive),C||this.setVisibility(!1),this._core.isnull(I.id)&&(I.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+I.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var B={id:I.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this.setTreeobj(B),this._tree.insertGroupId(B,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.VolumeVectorGeoJsonFeatureLayerOptimizationGroundtest=function(o,A,f,m,C,y){var x={show:!0,positions:[],shape:void 0,cornerType:this._cesium.CornerType.ROUNDED,granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.DISABLED,level_max:20,level_min:10},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:this._core.defaultValue(A.srs,"EPSG:4490")+":{z}",TILEMATRIXSET:this._core.defaultValue(A.srs,"EPSG:4490"),FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a)))),this._option=this._core.extend(x,f,!0),A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");var E={id:this._option.id,polygonHierarchy:void 0,height:0,extrudedHeight:0,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,perPositionHeight:!1,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.RED},I=this;let w=A.url.indexOf("/gisserver/")>-1;var Q;w?Q=A.url+`/${window.encodeURIComponent("{z}")}/${window.encodeURIComponent("{x}")}/${window.encodeURIComponent("{y}")}.json`:Q=A.url+"?"+this._serialize(v.urlParams),this._urlTemplate=Q,this._Provider=new Ts(this._viewer,this._cesium,w?new Ft.WebMercatorTilingScheme:void 0),this._Provider._normalTile=f.level_max-1,this._Provider._minimumHeight=parseFloat(f.height||0),this.initThisProvider=()=>{this.initThisProvider=void 0,this._Provider.loadTile=function(D,F){(function(L,R,k){if(R.state===Ft.QuadtreeTileLoadState.START){if(R.data={lines:[],geometryPrimitive:void 0},R.level>=f.level_min&&R.level<f.level_max&&k.item.show){if(k.TileMatrixLimits){let V=k.TileMatrixLimits[R.level];if(!V||V&&(R.x>V.maxCol||R.x<V.minCol||R.y>V.maxRow||R.y<V.minRow)){R.state=Ft.QuadtreeTileLoadState.DONE,R.renderable=!0;return}}var U=Q.replace(window.encodeURIComponent("{x}"),R.x).replace(window.encodeURIComponent("{y}"),R.y).replace(window.encodeURIComponent("{z}"),R.level);k._cache&&(U+="&"+k._core.getuid()),k._core.xhr({url:U,type:"get",dataType:"json",success:function(V){var H=Vi.cloneDeep(V);if(H.features.length<=0){R.state=Ft.QuadtreeTileLoadState.DONE,R.renderable=!0;return}if(H==null){R.state=Ft.QuadtreeTileLoadState.DONE,R.renderable=!0;return}var q=[],ie=[];k.Legend=[];function Z(_e){for(var Be=0;Be<_e.length;Be++)Array.isArray(_e[Be])?Z(_e[Be]):(se.push(_e[Be]),Be===2&&!ce&&(ce=!0))}function oe(){if(/^\[/.test(k._option.extrudedHeight)&&/\]$/.test(k._option.extrudedHeight)){var _e=k._option.extrudedHeight.replace(/\[/,"").replace(/\]/,"");E.extrudedHeight=parseFloat(j.properties[_e])}if(E.material=k._option.material,/^\[/.test(k._option.material)&&/\]$/.test(k._option.material)){var Be=k._option.material.replace(/\[/,"").replace(/\]/,"");E.material=j.properties[Be],k._core.isHtmlColor(E.material)?E.material=k._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=k._color.rgbaStringToRgbaObj(E.material)),E.material.red>1&&(E.material.red=E.material.red/255),E.material.green>1&&(E.material.green=E.material.green/255),E.material.blue>1&&(E.material.blue=E.material.blue/255),E.material.alpha>1&&(E.material.a=E.material.alpha/255),E.material=k._color.createColor(E.material.red,E.material.green,E.material.blue,E.material.alpha))}else k._option.material&&(E.material=k._option.material),E.material&&(k._core.isHtmlColor(E.material)?E.material=k._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=k._color.rgbaStringToRgbaObj(E.material)),E.material.red>1&&(E.material.red=E.material.red/255),E.material.green>1&&(E.material.green=E.material.green/255),E.material.blue>1&&(E.material.blue=E.material.blue/255),E.material.alpha>1&&(E.material.a=E.material.alpha/255),E.material=k._color.createColor(E.material.red,E.material.green,E.material.blue,E.material.alpha)));if(se.length>=2){var Qe=ce?Ft.Cartesian3.fromDegreesArrayHeights(se):Ft.Cartesian3.fromDegreesArray(se);E.polygonHierarchy=new Ft.PolygonHierarchy(Qe);var Ie=new Ft.PolygonGeometry(E);j.treeID=E.id,j.VectorType="polygon",j.VectorStyle={haveZ:ce,extrudedHeight:E.extrudedHeight,positions:se,material:E.material};var ve=new Ft.GeometryInstance({id:j,geometry:Ie,attributes:{color:new Ft.ColorGeometryInstanceAttribute.fromColor(E.material)}}),K="material:"+E.material.red*255+","+E.material.green*255+","+E.material.blue*255;k.Legend.push(K),q.push(ve)}}for(var ne=0;ne<H.features.length;ne++){var se=[],ce=!1,j=H.features[ne];if(Array.isArray(j.geometry.coordinates)&&j.geometry.coordinates.length>0)if(Array.isArray(j.geometry.coordinates[0][0]))for(var de=0;de<j.geometry.coordinates.length;de++)se=[],j.geometry.coordinates[de].pop(),Z(j.geometry.coordinates[de]),oe(se);else Z(j.geometry.coordinates),oe(se)}q.length==0&&(R.state=Ft.QuadtreeTileLoadState.DONE,R.renderable=!0);var me=new Ft.GroundPrimitive({geometryInstances:q,appearance:new Ft.PerInstanceColorAppearance({translucent:!1,vertexShaderSource:k._core.Shaders("vertexShaderSource"),fragmentShaderSource:k._core.Shaders("fragmentShaderSource")}),classificationType:k._option.classificationType,shadows:k._option.shadows});k.probj.push(me),R.data.geometryPrimitive=me,R.state=Ft.QuadtreeTileLoadState.LOADING,R.state===Ft.QuadtreeTileLoadState.LOADING&&(R.data.geometryPrimitive.update(L,[]),R.state=Ft.QuadtreeTileLoadState.DONE,R.renderable=!0)},error:function(){R.count==null&&(R.count=0),R.count+=1,R.count>=2?(R.state=Ft.QuadtreeTileLoadState.DONE,R.renderable=!0):R.state=Ft.QuadtreeTileLoadState.START}})}else{R.state=Ft.QuadtreeTileLoadState.DONE,R.renderable=!0;return}R.state=Ft.QuadtreeTileLoadState.LOADING}})(D,F,I)}},this._primitive=new Ft.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:5});var M=this._viewer.scene,B=M.primitives;B.add(this._primitive),this._core.getWMTSData({url:A.url,layer:A.layer,srs:A.srs||"EPSG:4490",gisserverTMS:w},D=>{I.item.boundingSphere=D.boundingSphere,I.TileMatrixLimits=D.TileMatrixLimits,I.initThisProvider()}),C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var T={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this._Provider.treeID=T.id,this.setTreeobj(T),this._tree.insertGroupId(T,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.createGeojsonImage=function(o){let A=eval;Ft.loadText("http://36.7.136.132:8090/geoserver/swagger/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=swagger%3A_20200410153959_JZ11&maxFeatures=50&outputFormat=application%2Fjson").then(function(f){f=A("("+f+")");for(var m=0;m<f.features.length;m++)m==0?f.features[m].properties.nod="rgba(255,255,0,1)":m==1?f.features[m].properties.nod="rgba(220,20,60,1)":m==2?f.features[m].properties.nod="rgba(75,0,130,1)":m==3?f.features[m].properties.nod="rgba(0,0,255,1)":m==4?f.features[m].properties.nod="rgba(30,144,255,1)":f.features[m].properties.nod="rgba(50,205,50,1)";var C=null;try{var y=new VectorTileImageryProvider({source:f,zIndex:99,removeDuplicate:!1,defaultStyle:{outlineColor:"rgba(209,204,226,1)",lineWidth:0,outline:!0,fill:!0,fillColor:"rgba(209,204,226,1)",fillShow:"[nod]",tileCacheSize:200,showMaker:!1,showCenterLabel:!0,fontColor:"rgba(255,0,0,1)",labelOffsetX:-10,labelOffsetY:-5,fontSize:13,fontFamily:"\u9ED1\u4F53",centerLabelPropertyName:"NAME"},maximumLevel:20,minimumLevel:15,simplify:!1}),x;y.readyPromise.then(function(){x=viewer.imageryLayers.addImageryProvider(y),Ft.Camera.DEFAULT_VIEW_RECTANGLE=y.rectangle})}catch(v){console.log(v)}})};Ll.prototype._drawGeojson=function(o,A,f,m,C,y,x,v,E,I,w,Q){var M=this;if(typeof v>"u"&&(v=!0),typeof E>"u"&&(E=!0),!v&&!E)return;typeof y>"u"&&(y=o.canvas.width-A),typeof x>"u"&&(x=o.canvas.height-f);var B=new idt(y,x),T=this._defaultStyle,D={labelStroke:T.labelStroke,labelStrokeWidth:T.labelStrokeWidth,labelStrokeColor:T.labelStrokeColor,pointSize:T.pointSize,fontSize:T.fontSize,fontFamily:T.fontFamily,color:T.fontColor.toCssColorString(),backgroundColor:T.pointColor.toCssColorString(),pointStyle:T.pointStyle,ringRadius:T.ringRadius,circleLineWidth:T.circleLineWidth,showMaker:T.showMaker,showLabel:T.showLabel,labelOffsetX:T.labelOffsetX,labelOffsetY:T.labelOffsetY,markerSymbol:T.makerImage instanceof Image?T.makerImage:T.makerImageEl},F=[];M._styleFilter&&(turf.featureEach(m,function(k,U){M._styleFilter&&(T=M._defaultStyle.clone(),M._styleFilter(k,T,I,w,Q),k.style=T)}),m.features.sort(function(k,U){return k.style&&k.style.lineDash?1:U.style&&U.style.lineDash?-1:0}));function L(k,U){if(M._styleFilter){if(T=k.style,T.show==!1)return;D={labelStroke:T.labelStroke,labelStrokeWidth:T.labelStrokeWidth,labelStrokeColor:T.labelStrokeColor,pointSize:T.pointSize,fontSize:T.fontSize,fontFamily:T.fontFamily,color:T.fontColor.toCssColorString(),backgroundColor:T.pointColor.toCssColorString(),pointStyle:T.pointStyle,ringRadius:T.ringRadius,circleLineWidth:T.circleLineWidth,showMaker:T.showMaker,showLabel:T.showLabel,labelOffsetX:T.labelOffsetX,labelOffsetY:T.labelOffsetY,markerSymbol:T.makerImage instanceof Image?T.makerImage:T.makerImageEl}}else T=M._defaultStyle;if(o.lineWidth=T.lineWidth,o.strokeStyle=T.outlineColor.toCssColorString(),o.fillStyle=T.fillColor.toCssColorString(),T.fillShow.indexOf("[")!=-1){var V=T.fillShow.replace("[","").replace("]","");o.fillStyle=k.properties[V]}if(T.lineDash&&o.setLineDash(T.lineDash),o.lineCap=T.lineCap,T.shadowColor&&T.shadowColor instanceof Ft.Color?o.shadowColor=T.shadowColor.toCssColorString():o.shadowColor=T.shadowColor,o.shadowBlur=T.shadowBlur,o.shadowOffsetX=T.shadowOffsetX,o.shadowOffsetY=T.shadowOffsetY,o.miterLimit=T.miterLimit,o.lineJoin=T.lineJoin,k.geometry.type=="Point")drawMarker(o,B,C,A,f,k,v,E,T.labelPropertyName,D);else if(k.geometry.type=="Polygon"&&T.fill){var H=turf.getCoords(k),q=Ale(o,B,C,A,f,H,!0,!1,T);q&&q.map(function(oe){oe.style=T,F.push(oe)})}else if(k.geometry.type=="MultiPolygon"&&T.fill){var ie;try{ie=turf.getCoords(k),ie.map(function(oe){var ne=Ale(o,B,C,A,f,oe,!0,!1,T);ne&&ne.map(function(se){se.style=T,F.push(se)})})}catch{}}else if(k.geometry.type=="MultiLineString"){if(!(k.properties.isOutline&&!T.outline)){var H=turf.getCoords(k);Ale(o,B,C,A,f,H,!1,!0,T),H=null}}else if(k.geometry.type=="LineString"&&!(k.properties.isOutline&&!T.outline)){var Z=turf.getCoords(k),H=[Z];Ale(o,B,C,A,f,H,!1,!0,T),Z=null,H=null}}function R(k,U,V,H,q,ie){var Z=k.canvas,oe=k.getImageData(0,0,Z.width,Z.height),ne=document.createElement("canvas");ne.width=Z.width,ne.height=Z.height;var se=ne.getContext("2d"),ce=[];ie.map(function(j){se.clearRect(0,0,ne.width,ne.height),se.beginPath();var de=0;j.map(function(_e){var Be=U.project(_e,V);de==0?se.moveTo(H+Be.x,q+Be.y):se.lineTo(H+Be.x,q+Be.y),de++}),se.closePath(),se.fillStyle="rgba(255,255,255,1)",se.fill(),ce=se.getImageData(0,0,ne.width,ne.height).data;for(var me=3;me<ce.length;me+=4)ce[me]>0&&(oe.data[me]=0)}),k.putImageData(oe,0,0)}turf.featureEach(m,function(k,U){(k.geometry.type=="Polygon"||k.geometry.type=="MultiPolygon")&&L(k,U)}),F&&F.length&&R(o,B,C,A,f,F),turf.featureEach(m,function(k,U){(k.geometry.type=="LineString"||k.geometry.type=="MultiLineString")&&L(k,U)}),turf.featureEach(m,function(k,U){(k.geometry.type=="Point"||k.geometry.type=="MultiPoint")&&L(k,U)})};Ll.prototype._createCanvas=function(){this._canvas=document.createElement("canvas"),this._canvas.width=this._tileWidth,this._canvas.height=this._tileHeight,this._context=this._canvas.getContext("2d"),this._context.lineWidth=this._defaultStyle.lineWidth,this._context.strokeStyle=this._defaultStyle.outlineColor.toCssColorString(),this._context.fillStyle=this._defaultStyle.fillColor.toCssColorString()};function Ale(o,A,f,m,C,y,x,v,E){var I=0,w=[];if(y.map(function(Q){if(!x||I<=0){var M=0;o.beginPath(),Q.map(function(B){var T=A.project(B,f);M==0?o.moveTo(m+T.x,C+T.y):o.lineTo(m+T.x,C+T.y),M++}),x&&(o.closePath(),o.fill()),v&&o.stroke()}else w.push(Q);I++}),x)return w;w=null}Ll.prototype.getLegend=function(){var o=[];return this.Legend!=null&&(o=this._core.unique(this.Legend)),o};Ll.prototype.removeObsoletePrimitives1=function(o){};Ll.prototype.removeObsoletePrimitives=function(o){for(var A=this._viewer.scene.globe._surface._tilesToRender,f=A.map(function(D){return D.level}),m=Math.min.apply(Math,hle(f)),C=Math.max.apply(Math,hle(f)),y=this.PrimitiveData.length-1;y>=0;y--){var x=this.PrimitiveData[y];if(x.level<m||x.level>C){var v=this._viewer.scene.primitives.remove(x.data);if(v){var E=this.Primitivekey.indexOf(this.loadFinishKey[y]);E>-1&&this.Primitivekey.splice(E,1),this.PrimitiveData.splice(y,1),this.loadFinishKey.splice(y,1)}}}var I=[],w=o.parent;if(w&&w.parent){var Q=w.parent;I.push(Q)}var M=o.children;I=I.concat(M);for(var y=0;y<M.length;y++){var B=M[y].children;I=I.concat(B)}for(var y=0;y<I.length;y++)if(I[y]){var T="z"+I[y].level+"x"+I[y].x+"y"+I[y].y,E=this.loadFinishKey.indexOf(T);if(E>-1){var v=this._viewer.scene.primitives.remove(this.PrimitiveData[E].data);if(v){var E=this.Primitivekey.indexOf(T);E>-1&&this.Primitivekey.splice(E,1),this.PrimitiveData.splice(E,1),this.loadFinishKey.splice(E,1)}}}};Ll.prototype.removeObsoleteEntities=function(o){for(var A=this._viewer.scene.globe._surface._tilesToRender,f=A.map(function(D){return D.level}),m=Math.min.apply(Math,hle(f))-1,C=Math.max.apply(Math,hle(f))+1,y=this.PrimitiveData.length-1;y>=0;y--){var x=this.PrimitiveData[y];if(x.level<m||x.level>C){var v=this._viewer.entities.remove(x.data);if(v){var E=this.Primitivekey.indexOf(this.loadFinishKey[y]);E>-1&&this.Primitivekey.splice(E,1),this.PrimitiveData.splice(y,1),this.loadFinishKey.splice(y,1)}}}var I=[],w=o.parent;if(w&&w.parent){var Q=w.parent;I.push(Q)}var M=o.children;I=I.concat(M);for(var y=0;y<M.length;y++){var B=M[y].children;I=I.concat(B)}for(var y=0;y<I.length;y++)if(I[y]){var T="z"+I[y].level+"x"+I[y].x+"y"+I[y].y,E=this.loadFinishKey.indexOf(T);if(E>-1){var v=this._viewer.entities.remove(this.PrimitiveData[E].data);if(v){var E=this.Primitivekey.indexOf(T);E>-1&&this.Primitivekey.splice(E,1),this.PrimitiveData.splice(E,1),this.loadFinishKey.splice(E,1)}}}};Ll.prototype.removeObsoleteEntitiesxp=function(o){for(var A=this._cesium.Cartesian3.fromDegrees(this._cesium.Math.toDegrees(o.west),this._cesium.Math.toDegrees(o.south)),f=this._cesium.Cartesian3.fromDegrees(this._cesium.Math.toDegrees(o.east),this._cesium.Math.toDegrees(o.north)),m=0;m<this.probj.length;m++)var C=this._cesium.Rectangle.contains(this.probj[m].rectangle.coordinates.getValue(),this._cesium.Cartographic.fromCartesian(A)),y=this._cesium.Rectangle.contains(this.probj[m].rectangle.coordinates.getValue(),this._cesium.Cartographic.fromCartesian(f));for(var x=this._viewer.camera.computeViewRectangle(),v=0;v<this.probj.length;v++){var E=this.probj[v].rectangle.coordinates.getValue(),I=this._cesium.Cartesian3.fromDegrees(this._cesium.Math.toDegrees(E.west),this._cesium.Math.toDegrees(E.south)),w=this._cesium.Cartesian3.fromDegrees(this._cesium.Math.toDegrees(E.east),this._cesium.Math.toDegrees(E.north)),Q=this._cesium.Rectangle.contains(x,this._cesium.Cartographic.fromCartesian(I)),M=this._cesium.Rectangle.contains(x,this._cesium.Cartographic.fromCartesian(w));Q||M?this.probj[v].show=!0:this.probj[v].show=!1}};Ll.prototype.computeCircle=function(o){this._core.isnull(o)&&(o=4);for(var A=[],f=0;f<360;f++){var m=this._cesium.Math.toRadians(f);A.push(new this._cesium.Cartesian2(o*Math.cos(m),o*Math.sin(m)))}return A};Ll.prototype.setTreeobj=function(o){this.treeobj=o};Ll.prototype.export=function(){var o=this.item.show==null?void 0:this.item.show,A=this.treeobj.url;return{type:this.treeobj.type,treeobj:{name:this.treeobj.name,pId:this.treeobj.pId},style:{show:o,url:A,pId:this.treeobj.pId},treeData:this.treeobj.treeData}};Ll.prototype.deleteObject=function(){if(this._viewer.scene.primitives.remove(this.item),this.probj&&this.probj.length>0&&(this._viewer.scene.primitives.remove(this.probj[0]),this.probj.pop()),this.img!=null&&this._viewer.imageryLayers.remove(this.img),this.primitve&&this.primitve.length>0){for(var o=0;o<this.primitve.length;o++)this._viewer.scene.primitives.remove(this.primitve[o]);this.primitve=[]}this.loadAllKey&&this.loadAllKey.length>0&&(this.loadAllKey=[]);try{this._Provider.remove()}catch{}};Ll.prototype.setRefresh=function(o){try{this._Provider&&this._Provider.setStatus(o)}catch{}};Ll.prototype.getLevel=function(){var o=40487.57,A=7096758e-11,f=91610.74,m=-40467.74,C=this._viewer.camera,y,x;if(C&&C.positionCartographic&&C.positionCartographic.height){var v=this._viewer.scene.globe.getHeight(C.positionCartographic);!v&&(v=0),y=C.positionCartographic.height-v,x=Math.round(m+(o-m)/(1+Math.pow(y/f,A)))}else x=0;return x};Ll.prototype.setVisibility=function(o){try{if(this.loadAllKey=[],this.item!=null&&this.item.show!=null&&(this.item.show=o),this.img!=null&&(this.img.show=o),this.primitve&&this.primitve.length>0)for(var A=0;A<this.primitve.length;A++)this.primitve[A].show=o;if(this._Provider&&this._Provider.setStatus&&this._Provider.setStatus(o),this.probj&&this.probj.length>0)for(var A=0;A<this.probj.length;A++)this.probj[A].show=o}catch{}};Ll.prototype.edit=function(o,A){return this.isEditting=o,this.editoption=A,this._Provider&&this._Provider.edit&&this._Provider.edit(o,A)};Ll.prototype.isCache=function(o){this._cache=o};Ll.prototype.forceRefresh=function(){try{for(var o=0;o<this._Provider.quadtree._levelZeroTiles.length;o++)this._Provider.quadtree._levelZeroTiles[o].freeResources()}catch{}};var Wf=Ll;var _w=null;function dle(o,A,f){_w=A,this._viewer=o,this._cesium=A,this._tree=f,this._core=new pr(o,A)}dle.prototype.flyTo=function(o,A={}){return this._viewer.flyTo(o,{duration:A.time||3,maximumHeight:A.maxHeight,offset:new _w.HeadingPitchRange(_w.Math.toRadians(A.heading||0),_w.Math.toRadians(A.pitch||-45),A.range)})};dle.prototype.flyToPointsInterest=function(o,A){return this._viewer.camera.flyTo({destination:o.destination,orientation:o.orientation,duration:o.duration,complete:A})};dle.prototype.flyToPosition=function(o,A,f,m={}){let C={heading:this._core.defaultValue(m.heading,0),pitch:this._core.defaultValue(m.pitch,-90),roll:this._core.defaultValue(m.roll,0),time:this._core.defaultValue(m.time,3)};Math.abs(o)<=180&&Math.abs(A)<=90?this._viewer.camera.flyTo({destination:this._cesium.Cartesian3.fromDegrees(o,A,f),orientation:new _w.HeadingPitchRoll(_w.Math.toRadians(C.heading),_w.Math.toRadians(C.pitch),_w.Math.toRadians(C.roll)),duration:C.time}):this._viewer.camera.flyTo({destination:{x:o,y:A,z:f},orientation:new _w.HeadingPitchRoll(_w.Math.toRadians(C.heading),_w.Math.toRadians(C.pitch),_w.Math.toRadians(C.roll)),duration:C.time})};var fle=dle;var pu=null;function vy(o,A){pu=A,this._viewer=o,this._cesium=A,this.item={show:!0},this._core=new pr(o,A),this._color=new Pn(this._viewer,this._cesium),this._tree=lt,this._flyTo=new fle(this._viewer,this._cesium,this._tree),this._Provider=void 0,this.Legend=[],this.model=[],this._cache=!1,this._forceRefreshPrvimitive=null,this._forceRefreshProvider=null}vy.prototype.createPolylineGeoJsonFeatureLayer=function(o,A,f,m,C,y){var x={positions:[],arcType:this._cesium.ArcType.GEODESIC,clampToGround:!1,width:1,show:!0,material:this._cesium.Color.WHITE,height:30};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a))));var v=this._core.extend(x,f,!0);A==null&&console.log("geojson is required");var E=null;A.then?E=A:E=this._cesium.GeoJsonDataSource.load(A);var I=this;E.then(function(Q){for(var M=Q.entities.values,B=[],T=new I._cesium.PrimitiveCollection,D=0;D<M.length;D++){var F=M[D],L=null;if(v.clampToGround){v.positions=F.polyline.positions._value;var R={positions:F.polyline.positions._value,width:v.width},R=new I._cesium.GroundPolylineGeometry(R);L=new I._cesium.GeometryInstance({id:F,geometry:R,attributes:{color:new I._cesium.ColorGeometryInstanceAttribute.fromColor(v.material)}})}else{for(var k=[],D=0;D<F.polyline.positions._value.length;D++){var U=I._viewer.scene.globe.ellipsoid,V=I._cesium.Cartographic.fromCartesian(F.polyline.positions._value[D]),H=I._cesium.Math.toDegrees(V.longitude),q=I._cesium.Math.toDegrees(V.latitude),ie=V.height+v.height,Z=new I._cesium.Cartesian3.fromDegrees(H,q,ie);k.push(Z)}v.positions=k;var oe=new I._cesium.PolylineGeometry(v),ne=I._cesium.PolylineGeometry.createGeometry(oe);L=new I._cesium.GeometryInstance({id:F,geometry:ne,attributes:{color:new I._cesium.ColorGeometryInstanceAttribute.fromColor(v.material)}})}F.positions=v.positions;var se="material:"+v.material.red*255+","+v.material.green*255+","+v.material.blue*255;I.Legend.push(se);var ce=null;v.clampToGround?ce=new I._cesium.GroundPolylinePrimitive({geometryInstances:L,appearance:new I._cesium.MaterialAppearance({material:new I._cesium.Material({fabric:{type:"Color",uniforms:{color:v.material}}}),faceForward:!0,flat:!1})}):ce=new I._cesium.Primitive({geometryInstances:L,appearance:new I._cesium.PolylineMaterialAppearance({material:new I._cesium.Material({fabric:{type:"Color",uniforms:{color:v.material}}})}),shadows:I._cesium.ShadowMode.ENABLED}),T.add(ce)}var j;f&&f.time&&(j=new I._cesium.TimeIntervalCollection([new I._cesium.TimeInterval({start:f.time.start?I._cesium.JulianDate.fromDate(new Date(f.time.start)):I._cesium.Iso8601.MINIMUM_VALUE,stop:f.time.end?I._cesium.JulianDate.fromDate(new Date(f.time.end)):I._cesium.Iso8601.MAXIMUM_VALUE})]));var de=I._viewer.scene.primitives.add(T,j);de.show=v.show,I.item=T,C||I.setVisibility(!1),typeof y=="function"&&y(I.item)}),this._core.isnull(v.id)&&(v.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+v.id);var w={id:v.id,name:o,checked:C,pId:this._core.isnull(m)?0:m,type:"polylineLayer",item:this,url:A,style:v};return this.setTreeobj(w),this._tree.insertGroupId(w,this._core.isnull(m)?0:m),this};vy.prototype.createGroundPolylineGeoJsonFeatureLayer=function(o,A,f,m,C,y){var x={positions:[],arcType:this._cesium.ArcType.GEODESIC,clampToGround:!1,width:1,show:!0,material:this._cesium.Color.WHITE,height:30};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a))));var v=this._core.extend(x,f,!0);A==null&&console.log("geojson is required");var E=null;A.then?E=A:E=this._cesium.GeoJsonDataSource.load(A);var I=this;E.then(function(Q){for(var M=Q.entities.values,B=[],T=new I._cesium.PrimitiveCollection,D=0;D<M.length;D++){var F=M[D],L=null;if(v.clampToGround){v.positions=F.polyline.positions._value;var R={positions:F.polyline.positions._value,width:v.width},R=new I._cesium.GroundPolylineGeometry(R);L=new I._cesium.GeometryInstance({id:F,geometry:R,attributes:{color:new I._cesium.ColorGeometryInstanceAttribute.fromColor(v.material)}})}else{for(var k=[],D=0;D<F.polyline.positions._value.length;D++){var U=I._viewer.scene.globe.ellipsoid,V=I._cesium.Cartographic.fromCartesian(F.polyline.positions._value[D]),H=I._cesium.Math.toDegrees(V.longitude),q=I._cesium.Math.toDegrees(V.latitude),ie=V.height+v.height,Z=new I._cesium.Cartesian3.fromDegrees(H,q,ie);k.push(Z)}v.positions=k;var oe=new I._cesium.PolylineGeometry(v),ne=I._cesium.PolylineGeometry.createGeometry(oe);L=new I._cesium.GeometryInstance({id:F,geometry:ne,attributes:{color:new I._cesium.ColorGeometryInstanceAttribute.fromColor(v.material)}})}F.positions=v.positions;var se="material:"+v.material.red*255+","+v.material.green*255+","+v.material.blue*255;I.Legend.push(se);var ce=null;v.clampToGround?ce=new I._cesium.GroundPolylinePrimitive({geometryInstances:L,appearance:new I._cesium.MaterialAppearance({material:new I._cesium.Material({fabric:{type:"Color",uniforms:{color:v.material}}}),faceForward:!0,flat:!1})}):ce=new I._cesium.Primitive({geometryInstances:L,appearance:new I._cesium.PolylineMaterialAppearance({material:new I._cesium.Material({fabric:{type:"Color",uniforms:{color:v.material}}})}),shadows:I._cesium.ShadowMode.ENABLED}),T.add(ce)}var j;f&&f.time&&(j=new I._cesium.TimeIntervalCollection([new I._cesium.TimeInterval({start:f.time.start?I._cesium.JulianDate.fromDate(new Date(f.time.start)):I._cesium.Iso8601.MINIMUM_VALUE,stop:f.time.end?I._cesium.JulianDate.fromDate(new Date(f.time.end)):I._cesium.Iso8601.MAXIMUM_VALUE})]));var de=I._viewer.scene.primitives.add(T,j);de.show=v.show,I.item=T,C||I.setVisibility(!1),typeof y=="function"&&y(I.item)}),this._core.isnull(v.id)&&(v.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+v.id);var w={id:v.id,name:o,checked:C,pId:this._core.isnull(m)?0:m,type:"polylineLayer",item:this,url:A,style:v};return this.setTreeobj(w),this._tree.insertGroupId(w,this._core.isnull(m)?0:m),this};vy.prototype.createPolylineVectorGeoJsonFeatureLayerProvider1=function(o,A,f,m,C,y){var x={positions:[],arcType:this._cesium.ArcType.GEODESIC,clampToGround:!1,width:1,show:!0,material:this._cesium.Color.WHITE,height:30},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a))));var E=this._core.extend(x,f,!0),I=this,w=new IA(this._viewer,this._cesium,v);this._Provider=w,w._loadTile=function(M){var B=[];I.Legend=[];var T=new I._cesium.PrimitiveCollection;return M.features.forEach(function(D){var F=[],L=!1;if(/^\[/.test(f.material)&&/\]$/.test(f.material)){var R=f.material.replace(/\[/,"").replace(/\]/,"");E.material=D.properties[R],I._core.isHtmlColor(E.material)?E.material=I._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=I._color.rgbaStringToRgbaObj(E.material)),E.material.r>1&&(E.material.r=E.material.r/255),E.material.g>1&&(E.material.g=E.material.g/255),E.material.b>1&&(E.material.b=E.material.b/255),E.material.a>1&&(E.material.a=E.material.a/255),E.material=I._color.createColor(E.material.r,E.material.g,E.material.b,E.material.a))}function k(H){for(var q=0;q<H.length;q++)Array.isArray(H[q])?k(H[q]):(F.push(H[q]),q===2&&!L&&(L=!0))}if(Array.isArray(D.geometry.coordinates)&&D.geometry.coordinates.length>0)if(Array.isArray(D.geometry.coordinates[0][0]))for(var U=0;U<D.geometry.coordinates.length;U++)F=[],k(D.geometry.coordinates[U]),V(F);else k(D.geometry.coordinates),V(F);function V(H){var q=L?I._cesium.Cartesian3.fromDegreesArrayHeights(H):I._cesium.Cartesian3.fromDegreesArray(H);E.positions=q;var ie={positions:E.positions,width:E.width};D.positions=q,D.treeID=E.id,D.VectorType="polyline",D.VectorStyle={haveZ:L,width:E.width,positions:H,material:E.material,clampToGround:E.clampToGround};var Z=null;if(E.clampToGround){var ie=new I._cesium.GroundPolylineGeometry(ie);Z=new I._cesium.GeometryInstance({id:D,geometry:ie,attributes:{color:new I._cesium.ColorGeometryInstanceAttribute.fromColor(E.material)}})}else{var oe=H,ne=H.length/2+1+H.length;if(/^\[/.test(f.height)&&/\]$/.test(f.height)){var se=f.height.replace(/\[/,"").replace(/\]/,"");E.height=D.properties[se]}for(var ce=2;ce<ne;ce=ce+3)oe.splice(ce,0,parseFloat(E.height));var j=I._cesium.Cartesian3.fromDegreesArrayHeights(oe);E.positions=j,D.positions=j;var de=new I._cesium.PolylineGeometry(E);Z=new I._cesium.GeometryInstance({id:D,geometry:de,attributes:{color:new I._cesium.ColorGeometryInstanceAttribute.fromColor(E.material)}})}var me="material:"+E.material.red*255+","+E.material.green*255+","+E.material.blue*255;I.Legend.push(me);var _e=null;E.clampToGround?_e=new I._cesium.GroundPolylinePrimitive({geometryInstances:Z,appearance:new I._cesium.MaterialAppearance({material:new I._cesium.Material({fabric:{type:"Color",uniforms:{color:E.material}}}),faceForward:!0,flat:!1})}):_e=new I._cesium.Primitive({geometryInstances:Z,appearance:new I._cesium.PolylineMaterialAppearance({material:new I._cesium.Material({fabric:{type:"Color",uniforms:{color:E.material}}})}),shadows:I._cesium.ShadowMode.ENABLED}),T.add(_e)}}),T},f&&f.time&&(w.availability=new I._cesium.TimeIntervalCollection([new I._cesium.TimeInterval({start:f.time.start?I._cesium.JulianDate.fromDate(new Date(f.time.start)):I._cesium.Iso8601.MINIMUM_VALUE,stop:f.time.end?I._cesium.JulianDate.fromDate(new Date(f.time.end)):I._cesium.Iso8601.MAXIMUM_VALUE})])),this.item=w._primitiveCollection,w.addTo(this._viewer),C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var Q={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polylineLayer",item:this,url:A.url,style:f};return this._Provider.treeID=E.id,this.setTreeobj(Q),this._tree.insertGroupId(Q,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};vy.prototype.createPolylineVectorGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y){var x={positions:[],arcType:this._cesium.ArcType.GEODESIC,clampToGround:!1,width:1,outlineWidth:1,show:!0,material:this._cesium.Color.WHITE,outlineColor:this._cesium.Color.WHITE,gapColor:this._cesium.Color.TRANSPARENT,height:30},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:this._core.defaultValue(A.srs,"EPSG:4326")+":{z}",TILEMATRIXSET:this._core.defaultValue(A.srs,"EPSG:4326"),FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:f.level_min,lowerLevelLimit:f.level_max,Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(f.material=pu.Color.fromCssColorString(f.material))),!this._core.isnull(f)&&!this._core.isnull(f.outlineColor)&&(f.outlineColor=pu.Color.fromCssColorString(f.outlineColor)),!this._core.isnull(f)&&!this._core.isnull(f.gapColor)&&(f.gapColor=pu.Color.fromCssColorString(f.gapColor));var E=this._core.extend({...x},f,!0),I=this;let w=A.url.indexOf("/gisserver/")>-1;var Q;w?Q=A.url+`/${window.encodeURIComponent("{z}")}/${window.encodeURIComponent("{x}")}/${window.encodeURIComponent("{y}")}.json`:Q=A.url+"?"+this._core._serialize(v.urlParams),this._urlTemplate=Q,this._Provider=new Ts(this._viewer,this._cesium,w?new pu.WebMercatorTilingScheme:void 0),this._Provider._normalTile=f.level_max-1,this.initThisProvider=()=>{this.initThisProvider=void 0,this._Provider.loadTile=function(L,R){(function(k,U,V){if(U.state===pu.QuadtreeTileLoadState.START){if(U.data={lines:[],geometryPrimitive:void 0},U.level>=f.level_min&&U.level<f.level_max&&V.item.show){if(w&&(U.reverseY=V._Provider.tilingScheme.getNumberOfYTilesAtLevel(U.level)-U.y-1),V.TileMatrixLimits){let q=V.TileMatrixLimits[U.level];if(!q||q&&(U.x>q.maxCol||U.x<q.minCol||U.y>q.maxRow||U.y<q.minRow)){U.state=pu.QuadtreeTileLoadState.DONE,U.renderable=!0;return}}var H=Q.replace(window.encodeURIComponent("{x}"),U.x).replace(window.encodeURIComponent("{y}"),U.reverseY||U.y).replace(window.encodeURIComponent("{z}"),U.level);V._cache&&(H+="&"+V._core.getuid()),V._core.xhr({url:H,type:"get",dataType:"json",success:function(q){var ie=[],Z=[],oe=!1;for(var ne of q.features){let Be=function(Ie){for(var ve=0;ve<Ie.length;ve++)Array.isArray(Ie[ve])?Be(Ie[ve]):(ve===2&&(Ie[ve]=E.height||Ie[ve],oe=!0),Z.push(Ie[ve]),ve===1&&Ie.length===2&&Z.push(E.height||0))},Qe=function(Ie){var ve=V._cesium.Cartesian3.fromDegreesArrayHeights(Ie);E.positions=ve;var K={positions:E.positions,width:E.width};ne.positions=ve,f.preLoad&&f.preLoad(E,ne),ne.treeID=E.id,ne.VectorType="polyline",ne.VectorStyle={haveZ:oe,width:E.width,positions:Ie,material:E.material,clampToGround:E.clampToGround};var W=null;if(E.clampToGround){var K=new V._cesium.GroundPolylineGeometry(K);W=new V._cesium.GeometryInstance({id:ne,geometry:K,attributes:{color:new V._cesium.ColorGeometryInstanceAttribute.fromColor(E.material),distanceDisplayCondition:new pu.DistanceDisplayConditionGeometryInstanceAttribute(E.near,E.far)}})}else{var te=new V._cesium.PolylineGeometry(E);W=new V._cesium.GeometryInstance({id:ne,geometry:te,attributes:{color:new V._cesium.ColorGeometryInstanceAttribute.fromColor(E.material),distanceDisplayCondition:new pu.DistanceDisplayConditionGeometryInstanceAttribute(E.near,E.far)}})}var Y="material:"+E.material.red*255+","+E.material.green*255+","+E.material.blue*255;V.Legend.push(Y),ie.push(W)};var Z=[];if(/^\[/.test(f.material)&&/\]$/.test(f.material)){var se=f.material.replace(/\[/,"").replace(/\]/,"");E.material=ne.properties[se],E.material=pu.Color.fromCssColorString(E.material)}if(/^\[/.test(f.height)&&/\]$/.test(f.height)){var ce=f.height.replace(/\[/,"").replace(/\]/,"");E.height=ne.properties[ce]}if(Array.isArray(ne.geometry.coordinates)&&ne.geometry.coordinates.length>0)if(Array.isArray(ne.geometry.coordinates[0][0]))for(var j=0;j<ne.geometry.coordinates.length;j++)Z=[],Be(ne.geometry.coordinates[j]),Qe(Z);else Be(ne.geometry.coordinates),Qe(Z)}var de=null;let me;E.dash?me=new pu.PolylineMaterialAppearance({material:pu.Material.fromType(pu.Material.PolylineDashType,{color:E.material,gapColor:E.gapColor||pu.Color.TRANSPARENT,dashLength:E.dashLength||20})}):me=new pu.PolylineMaterialAppearance({material:new pu.Material({fabric:{type:"PolylineOutline",uniforms:{color:E.material,outlineColor:E.outlineColor,outlineWidth:E.outlineWidth}}}),faceForward:!0,flat:!1}),E.clampToGround?de=new V._cesium.GroundPolylinePrimitive({geometryInstances:ie,appearance:me,classificationType:E.classificationType}):de=new V._cesium.Primitive({geometryInstances:ie,appearance:me,shadows:V._cesium.ShadowMode.ENABLED}),U.data.geometryPrimitive=de,U.state=pu.QuadtreeTileLoadState.LOADING,U.state===pu.QuadtreeTileLoadState.LOADING&&(U.data.geometryPrimitive.update(k,[]),U.state=pu.QuadtreeTileLoadState.DONE,U.renderable=!0)},error:function(){U.count==null&&(U.count=0),U.count+=1,U.count>=2?(U.state=pu.QuadtreeTileLoadState.DONE,U.renderable=!0):U.state=pu.QuadtreeTileLoadState.START}})}else{U.state=pu.QuadtreeTileLoadState.DONE,U.renderable=!0;return}U.state=pu.QuadtreeTileLoadState.LOADING}})(L,R,I)},typeof y=="function"&&y(this.item)};let M,B;this.saveDefaultVectorData=()=>{B=I._core.extend({},f,!0)},this.restoreVector=()=>{B&&(f=B,E=I._core.extend({...x},f,!0),I._Provider._normalTile=f.level_max-1,I._primitive&&I._primitive._tilesToRender&&I._primitive._tilesToRender.length&&(I._primitive._tilesToRender.forEach(L=>{L.data.geomeitryPrimitive&&L.data.geomeitryPrimitive.destroy(),L.state=pu.QuadtreeTileLoadState.START}),I._primitive._tileToUpdateHeights.forEach(L=>{L.data.geomeitryPrimitive&&L.data.geomeitryPrimitive.destroy(),L.state=pu.QuadtreeTileLoadState.START}),I._primitive._tileToUpdateHeights=[],I._primitive._tilesToRender=[])),B=void 0},this.updataVector=(L={})=>{(L.material||L.outlineColor||L.gapColor)&&(L.material&&(L.material=pu.Color.fromCssColorString(L.material)),L.outlineColor&&(L.outlineColor=pu.Color.fromCssColorString(L.outlineColor)),L.gapColor&&(L.gapColor=pu.Color.fromCssColorString(L.gapColor))),(L.minimumLevel!==void 0||L.maximumLevel!==void 0)&&(L.minimumLevel!==void 0&&(L.level_min=L.minimumLevel),L.maximumLevel!==void 0&&(L.level_max=L.maximumLevel)),f=I._core.extend(f,L,!0),E=I._core.extend(E,f,!0),I._Provider._normalTile=f.level_max-1,I._primitive&&I._primitive._tilesToRender&&I._primitive._tilesToRender.length&&(clearTimeout(M),M=setTimeout(()=>{I._primitive._tilesToRender.forEach(R=>{R.data.geomeitryPrimitive&&R.data.geomeitryPrimitive.destroy(),R.state=pu.QuadtreeTileLoadState.START}),I._primitive._tileToUpdateHeights.forEach(R=>{R.data.geomeitryPrimitive&&R.data.geomeitryPrimitive.destroy(),R.state=pu.QuadtreeTileLoadState.START}),I._primitive._tileToUpdateHeights=[],I._primitive._tilesToRender=[]},100))},this._forceRefreshProvider=this._Provider,this._primitive=new I._cesium.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:5});var T=this._viewer.scene,D=T.primitives;D.add(this._primitive),this._core.getWMTSData({url:A.url,layer:A.layer,srs:A.srs||"EPSG:4326",gisserverTMS:w},L=>{I.item.boundingSphere=L.boundingSphere,I.TileMatrixLimits=L.TileMatrixLimits,I.initThisProvider()}),f&&f.time&&(geoJSONVectorTileProvider.availability=new I._cesium.TimeIntervalCollection([new I._cesium.TimeInterval({start:f.time.start?I._cesium.JulianDate.fromDate(new Date(f.time.start)):I._cesium.Iso8601.MINIMUM_VALUE,stop:f.time.end?I._cesium.JulianDate.fromDate(new Date(f.time.end)):I._cesium.Iso8601.MAXIMUM_VALUE})])),C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var F={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polylineLayer",item:this,url:A.url,style:f};return this._Provider.treeID=E.id,this.setTreeobj(F),this._tree.insertGroupId(F,this._core.isnull(m)?0:m),this};vy.prototype.createPolylineVectorGeoJsonFeatureLayerProviderModel_obsolete=function(o,A,f,m,C,y){var x={positions:[],arcType:this._cesium.ArcType.GEODESIC,clampToGround:!1,width:1,show:!0,material:this._cesium.Color.WHITE,height:30},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a))));var E=this._core.extend(x,f,!0),I=this,w=new IA(this._viewer,this._cesium,v);this._Provider=w,w._loadTile=function(M,B){var T=[],D=new I._cesium.PrimitiveCollection,F=[];if(M.features.forEach(function(L){var R=[];if(/^\[/.test(f.material)&&/\]$/.test(f.material)){var k=f.material.replace(/\[/,"").replace(/\]/,"");E.material=L.properties[k],I._core.isHtmlColor(E.material)?E.material=I._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=I._color.rgbaStringToRgbaObj(E.material)),E.material.r>1&&(E.material.r=E.material.r/255),E.material.g>1&&(E.material.g=E.material.g/255),E.material.b>1&&(E.material.b=E.material.b/255),E.material.a>1&&(E.material.a=E.material.a/255),E.material=I._color.createColor(E.material.r,E.material.g,E.material.b,E.material.a))}function U(ie){for(var Z=0;Z<ie.length;Z++)Array.isArray(ie[Z])?U(ie[Z]):R.push(ie[Z])}if(Array.isArray(L.geometry.coordinates)&&L.geometry.coordinates.length>0)if(Array.isArray(L.geometry.coordinates[0][0]))for(var V=0;V<L.geometry.coordinates.length;V++)R=[],U(L.geometry.coordinates[V]),H(R),q(R);else U(L.geometry.coordinates),H(R),q(R);function H(ie){var Z=I._cesium.Cartesian3.fromDegreesArray(ie);E.positions=Z,L.positions=Z;var oe={positions:E.positions,width:E.width},ne=null;if(E.clampToGround){var oe=new I._cesium.GroundPolylineGeometry(oe);ne=new I._cesium.GeometryInstance({id:L,geometry:oe,attributes:{color:new I._cesium.ColorGeometryInstanceAttribute.fromColor(E.material)}})}else{for(var se=ie,ce=ie.length/2+1+ie.length,j=2;j<ce;j=j+3)se.splice(j,0,parseFloat(E.height));var de=I._cesium.Cartesian3.fromDegreesArrayHeights(se);E.positions=de;var me=new I._cesium.PolylineGeometry(E),_e=I._cesium.PolylineGeometry.createGeometry(me);ne=new I._cesium.GeometryInstance({id:L,geometry:_e,attributes:{color:new I._cesium.ColorGeometryInstanceAttribute.fromColor(E.material)}})}var Be=null;E.clampToGround?Be=new I._cesium.GroundPolylinePrimitive({geometryInstances:ne,appearance:new I._cesium.MaterialAppearance({material:new I._cesium.Material({fabric:{type:"Color",uniforms:{color:E.material}}}),faceForward:!0,flat:!1})}):Be=new I._cesium.Primitive({geometryInstances:ne,appearance:new I._cesium.PolylineMaterialAppearance({material:new I._cesium.Material({fabric:{type:"Color",uniforms:{color:E.material}}})}),shadows:I._cesium.ShadowMode.ENABLED}),D.add(Be)}function q(ie){var Z;E.clampToGround?Z=I._cesium.Cartesian3.fromDegreesArray(ie):Z=I._cesium.Cartesian3.fromDegreesArrayHeights(ie);for(var oe=1;oe<Z.length;oe++){var ne=[];ne.push(Z[oe-1]),ne.push(Z[oe]);var se=I._cesium.SceneTransforms.wgs84ToWindowCoordinates(I._viewer.scene,Z[oe-1]).x,ce=I._cesium.SceneTransforms.wgs84ToWindowCoordinates(I._viewer.scene,Z[oe-1]).y,j=I._cesium.SceneTransforms.wgs84ToWindowCoordinates(I._viewer.scene,Z[oe]).x,de=I._cesium.SceneTransforms.wgs84ToWindowCoordinates(I._viewer.scene,Z[oe]).y;I.setPolylinemodels(ne,se,ce,j,de,E,function(me){F.push(me)})}}}),F.length){let L;pu.ModelInstanceCollection?L=new I._cesium.ModelInstanceCollection({url:E.url,instances:F,color:E.color,lightColor:E.lightColor,scale:parseInt(E.scale),heightReference:parseInt(E.heightReference),distanceDisplayCondition:E.distanceDisplayCondition}):(L=new pu.PrimitiveCollection,F.forEach(R=>{L.add({id:R.modelId,url:E.url,modelMatrix:R.modelMatrix,color:E.color,lightColor:E.lightColor,scale:parseInt(E.scale),heightReference:parseInt(E.heightReference),distanceDisplayCondition:E.distanceDisplayCondition})})),D.add(L)}return D},f&&f.time&&(w.availability=new I._cesium.TimeIntervalCollection([new I._cesium.TimeInterval({start:f.time.start?I._cesium.JulianDate.fromDate(new Date(f.time.start)):I._cesium.Iso8601.MINIMUM_VALUE,stop:f.time.end?I._cesium.JulianDate.fromDate(new Date(f.time.end)):I._cesium.Iso8601.MAXIMUM_VALUE})])),this.item=w._primitiveCollection,w.addTo(this._viewer),C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var Q={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polylineLayer",item:this,url:A.url,style:f};return this.setTreeobj(Q),this._tree.insertGroupId(Q,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};vy.prototype.createPolylineVectorGeoJsonFeatureLayerProviderModel=function(o,A,f,m,C,y){var x={positions:[],arcType:this._cesium.ArcType.GEODESIC,clampToGround:!1,width:1,show:!0,material:this._cesium.Color.WHITE,height:30},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};this.item.show=C,!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a))));var E=this._core.extend(x,f,!0),I=this;this._urlTemplate=A.url+"?"+this._core._serialize(v.urlParams);var w=A.url+"?"+this._core._serialize(v.urlParams);this._Provider=new Ts(this._viewer,this._cesium),this._Provider._normalTile=f.level_max-1,this._Provider.loadTile=function(T,D){(function(F,L,R){if(L.state===pu.QuadtreeTileLoadState.START){if(L.data={lines:[],geometryPrimitive:void 0},L.level>=f.level_min&&L.level<f.level_max&&R.item.show){var k=w.replace(window.encodeURIComponent("{x}"),L.x).replace(window.encodeURIComponent("{y}"),L.y).replace(window.encodeURIComponent("{z}"),L.level);R._cache&&(k+="&"+R._core.getuid()),R._core.xhr({url:k,type:"get",dataType:"json",success:function(U){var V=[],H=new R._cesium.PrimitiveCollection,q=U.features,ie=[];if(/^\[/.test(f.material)&&/\]$/.test(f.material)){var Z=f.material.replace(/\[/,"").replace(/\]/,"");E.material=j.properties[Z],R._core.isHtmlColor(E.material)?E.material=R._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=R._color.rgbaStringToRgbaObj(E.material)),E.material.r>1&&(E.material.r=E.material.r/255),E.material.g>1&&(E.material.g=E.material.g/255),E.material.b>1&&(E.material.b=E.material.b/255),E.material.a>1&&(E.material.a=E.material.a/255),E.material=R._color.createColor(E.material.r,E.material.g,E.material.b,E.material.a))}function oe(me){for(var _e=0;_e<me.length;_e++)Array.isArray(me[_e])?oe(me[_e]):ie.push(me[_e])}function ne(me){var _e=R._cesium.Cartesian3.fromDegreesArray(me);E.positions=_e,j.positions=_e;var Be={positions:E.positions,width:E.width},Qe=null;if(E.clampToGround){var Be=new R._cesium.GroundPolylineGeometry(Be);Qe=new R._cesium.GeometryInstance({id:j,geometry:Be,attributes:{color:new R._cesium.ColorGeometryInstanceAttribute.fromColor(E.material)}})}else{for(var Ie=me,ve=me.length/2+1+me.length,K=2;K<ve;K=K+3)Ie.splice(K,0,parseFloat(E.height));var W=R._cesium.Cartesian3.fromDegreesArrayHeights(Ie);E.positions=W;var te=new R._cesium.PolylineGeometry(E),Y=R._cesium.PolylineGeometry.createGeometry(te);Qe=new R._cesium.GeometryInstance({id:j,geometry:Y,attributes:{color:new R._cesium.ColorGeometryInstanceAttribute.fromColor(E.material)}})}var he=null;E.clampToGround?he=new R._cesium.GroundPolylinePrimitive({geometryInstances:Qe,appearance:new R._cesium.MaterialAppearance({material:new R._cesium.Material({fabric:{type:"Color",uniforms:{color:E.material}}}),faceForward:!0,flat:!1})}):he=new R._cesium.Primitive({geometryInstances:Qe,appearance:new R._cesium.PolylineMaterialAppearance({material:new R._cesium.Material({fabric:{type:"Color",uniforms:{color:E.material}}})}),shadows:R._cesium.ShadowMode.ENABLED}),H.add(he)}function se(me){var _e;E.clampToGround?_e=R._cesium.Cartesian3.fromDegreesArray(me):_e=R._cesium.Cartesian3.fromDegreesArrayHeights(me);for(var Be=1;Be<_e.length;Be++)try{var Qe=[];Qe.push(_e[Be-1]),Qe.push(_e[Be]);var Ie=R._cesium.SceneTransforms.wgs84ToWindowCoordinates(R._viewer.scene,_e[Be-1]).x,ve=R._cesium.SceneTransforms.wgs84ToWindowCoordinates(R._viewer.scene,_e[Be-1]).y,K=R._cesium.SceneTransforms.wgs84ToWindowCoordinates(R._viewer.scene,_e[Be]).x,W=R._cesium.SceneTransforms.wgs84ToWindowCoordinates(R._viewer.scene,_e[Be]).y;R.setPolylinemodels(Qe,Ie,ve,K,W,E,function(te){V.push(te)})}catch{}}for(var ce=0;ce<q.length;ce++){var j=q[ce];if(Array.isArray(j.geometry.coordinates)&&j.geometry.coordinates.length>0)if(Array.isArray(j.geometry.coordinates[0][0]))for(var de=0;de<j.geometry.coordinates.length;de++)ie=[],oe(j.geometry.coordinates[de]),ne(ie),se(ie);else oe(j.geometry.coordinates),ne(ie),se(ie)}if(V.length){let me;pu.ModelInstanceCollection?me=new R._cesium.ModelInstanceCollection({url:E.url,instances:V,color:E.color,lightColor:E.lightColor,scale:parseInt(E.scale),heightReference:parseInt(E.heightReference),distanceDisplayCondition:E.distanceDisplayCondition}):(me=new pu.PrimitiveCollection,V.forEach(_e=>{me.add({id:_e.modelId,url:E.url,modelMatrix:_e.modelMatrix,color:E.color,lightColor:E.lightColor,scale:parseInt(E.scale),heightReference:parseInt(E.heightReference),distanceDisplayCondition:E.distanceDisplayCondition})})),H.add(me)}L.data.geometryPrimitive=H},error:function(){L.count==null&&(L.count=0),L.count+=1,L.count>=2?(L.state=pu.QuadtreeTileLoadState.DONE,L.renderable=!0):L.state=pu.QuadtreeTileLoadState.START}})}else{L.state=pu.QuadtreeTileLoadState.DONE,L.renderable=!0;return}L.state=pu.QuadtreeTileLoadState.LOADING}})(T,D,I)},this._primitive=new I._cesium.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:5});var Q=this._viewer.scene,M=Q.primitives;M.add(this._primitive),C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var B={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polylineLayer",item:this,url:A.url,style:f};return this.setTreeobj(B),this._tree.insertGroupId(B,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};vy.prototype.setPolylinemodels=function(o,A,f,m,C,y,x){var v=this._cesium,E=this._core.getSpaceDistancem(o,v),I=10,w=parseFloat(y.distance);w==0||(I=parseInt(E/w));for(var Q=o[0],M=o[o.length-1],B=v.Cartographic.fromCartesian(Q),T=v.Math.toDegrees(B.longitude),D=v.Math.toDegrees(B.latitude),F=v.Cartographic.fromCartesian(M),L=v.Math.toDegrees(F.longitude),R=v.Math.toDegrees(F.latitude),k=I,U=v.Math.lerp(T,L,1/k)-T,V=v.Math.lerp(D,R,1/k)-D,H=0;H<k;H++){var q=T+(H+1)*U,ie=D+(H+1)*V,Z=v.Transforms.eastNorthUpToFixedFrame(v.Cartesian3.fromDegrees(q,ie,parseInt(y.height)));pu.Matrix4.multiplyByUniformScale(Z,parseInt(y.scale),Z),x&&x({modelMatrix:Z,modelId:y})}};vy.prototype.getType=function(){return{label:"\u7EBF",value:"polylineLayer"}};vy.prototype.export=function(){var o=this.item.show==null?void 0:this.item.show,A=this.treeobj.url;return{type:this.treeobj.type,treeobj:{name:this.treeobj.name,pId:this.treeobj.pId},style:{show:o,url:A}}};vy.prototype.deleteObject=function(){if(this._viewer.scene.primitives.remove(this.item),this.model!=null&&this.model!=null&&this.model.length>0)for(var o=0;o<this.model.length;o++)this._viewer.scene.primitives.remove(this.model[o]);try{this._Provider.remove()}catch{}};vy.prototype.setTreeobj=function(o){this.treeobj=o};vy.prototype.getLegend=function(){var o=[];return this.Legend!=null&&(o=this._core.unique(this.Legend)),o};vy.prototype.setRefresh=function(o){try{this._Provider&&this._Provider.setStatus(!o)}catch{}};vy.prototype.setVisibility=function(o){if(this.item!=null&&(this.item.show=o),this._Provider&&this._Provider.setStatus(o),this.model!=null&&this.model!=null&&this.model.length>0)for(var A=0;A<this.model.length;A++)this.model[A].show=o};vy.prototype.edit=function(o,A){return this.editoption=A,this.isEditting=o,this._Provider&&this._Provider.edit&&this._Provider.edit(o,A)};vy.prototype.forceRefresh=function(){try{for(var o=0;o<this._Provider.quadtree._levelZeroTiles.length;o++)this._Provider.quadtree._levelZeroTiles[o].freeResources()}catch{}};var $O=vy;function ih(o,A){this._viewer=o,this._cesium=A,this._core=new pr(o,A),this._color=new Pn(this._viewer,this._cesium),this._tree=lt,this._createGroup=new ZO,this.model=[],this.heading=this._cesium.Math.toRadians(0),this.pitch=this._cesium.Math.toRadians(0),this.roll=this._cesium.Math.toRadians(0),this.rotate=10,this.state=0,this.modelPointArr=[],this.modifyModel=null,this.modifyPoint=null,this.modifyHandler=new this._cesium.ScreenSpaceEventHandler(this._viewer.scene.canvas),this.objId=Number(new Date().getTime()+""+Number(Math.random()*1e3).toFixed(0)),this.position=null,this.tempPoints=[],this.scale=0,this.Radius=20}ih.prototype.exectPointModel=function(o,A,f,m,C,y){var x={positions:[],arcType:this._cesium.ArcType.GEODESIC,clampToGround:!1,width:1,show:!0,material:this._cesium.Color.WHITE,height:30};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a)))),!this._core.isnull(f)&&!this._core.isnull(f.color)&&(f.color.toString().charAt(0)=="["&&f.color.toString().charAt(f.color.length-1)=="]"||(this._core.isHtmlColor(f.color)?f.color=this._color.colorFromHtmlColor(f.color):(/^rgb/.test(f.color)&&(f.color=this._color.rgbaStringToRgbaObj(f.color)),f.color.r>1&&(f.color.r=f.color.r/255),f.color.g>1&&(f.color.g=f.color.g/255),f.color.b>1&&(f.color.b=f.color.b/255),f.color.a>1&&(f.color.a=f.color.a/255),f.color=this._color.createColor(f.color.r,f.color.g,f.color.b,f.color.a)))),!this._core.isnull(f)&&!this._core.isnull(f.lightColor)&&(f.lightColor.toString().charAt(0)=="["&&f.lightColor.toString().charAt(f.lightColor.length-1)=="]"||(this._core.isHtmlColor(f.lightColor)?f.lightColor=this._color.colorFromHtmlColor(f.lightColor):(/^rgb/.test(f.lightColor)&&(f.lightColor=this._color.rgbaStringToRgbaObj(f.lightColor)),f.lightColor.r>1&&(f.lightColor.r=f.lightColor.r/255),f.lightColor.g>1&&(f.lightColor.g=f.lightColor.g/255),f.lightColor.b>1&&(f.lightColor.b=f.lightColor.b/255),f.lightColor.a>1&&(f.lightColor.a=f.lightColor.a/255),f.lightColor=this._color.createColor(f.lightColor.r,f.lightColor.g,f.lightColor.b,f.lightColor.a)))),!this._core.isnull(f)&&!this._core.isnull(f.linecolor)&&(f.linecolor.toString().charAt(0)=="["&&f.linecolor.toString().charAt(f.linecolor.length-1)=="]"||(this._core.isHtmlColor(f.linecolor)?f.linecolor=this._color.colorFromHtmlColor(f.linecolor):(/^rgb/.test(f.linecolor)&&(f.linecolor=this._color.rgbaStringToRgbaObj(f.linecolor)),f.linecolor.r>1&&(f.linecolor.r=f.linecolor.r/255),f.linecolor.g>1&&(f.linecolor.g=f.linecolor.g/255),f.linecolor.b>1&&(f.linecolor.b=f.linecolor.b/255),f.linecolor.a>1&&(f.linecolor.a=f.linecolor.a/255),f.linecolor=this._color.createColor(f.linecolor.r,f.linecolor.g,f.linecolor.b,f.linecolor.a))));var v=this._core.extend(x,f,!0);this._core.isnull(f.near)&&(f.near=0),this._core.isnull(f.far)&&(f.far=999999999);var E=parseFloat(f.near),I=parseFloat(f.far),w=new this._cesium.DistanceDisplayCondition(E,I);v.distanceDisplayCondition=w,A==null&&console.log("geojson is required");var Q=null;A.then?Q=A:Q=this._cesium.GeoJsonDataSource.load(A);var M=this;Q.then(function(T){for(var D=T.entities.values,F=[],D=T.entities.values,F=[],L=0;L<D.length;L++){var R=D[L],k=new M._cesium.GeometryInstance({id:R,geometry:new M._cesium.CorridorGeometry({positions:R.polyline.positions._value,width:v.width,height:v.height,arcType:v.arcType,vertexFormat:M._cesium.VertexFormat.POSITION_ONLY}),attributes:{color:new M._cesium.ColorGeometryInstanceAttribute.fromColor(v.linecolor)}});F.push(k)}var U;f&&f.time&&(U=new M._cesium.TimeIntervalCollection([new M._cesium.TimeInterval({start:f.time.start?M._cesium.JulianDate.fromDate(new Date(f.time.start)):M._cesium.Iso8601.MINIMUM_VALUE,stop:f.time.end?M._cesium.JulianDate.fromDate(new Date(f.time.end)):M._cesium.Iso8601.MAXIMUM_VALUE})]));var V=M._viewer.scene.primitives.add(new M._cesium.GroundPrimitive({geometryInstances:F,classificationType:M._cesium.ClassificationType.BOTH}),U);V.show=v.show,M.item=V;for(var H=[],L=0;L<D.length;L++)for(var R=D[L],q=v,ie=R.polyline.positions.getValue(),Z=1;Z<ie.length;Z++)try{var oe=[];oe.push(ie[Z-1]),oe.push(ie[Z]);var ne=M._cesium.SceneTransforms.wgs84ToWindowCoordinates(M._viewer.scene,ie[Z-1]).x,se=M._cesium.SceneTransforms.wgs84ToWindowCoordinates(M._viewer.scene,ie[Z-1]).y,ce=M._cesium.SceneTransforms.wgs84ToWindowCoordinates(M._viewer.scene,ie[Z]).x,j=M._cesium.SceneTransforms.wgs84ToWindowCoordinates(M._viewer.scene,ie[Z]).y;H=M.setPolylinemodels(oe,ne,se,ce,j,H,v,M._cesium,M._viewer,U)}catch{}let de;Cesium.ModelInstanceCollection?de=new M._cesium.ModelInstanceCollection({url:v.url,instances:H,color:v.color,lightColor:v.lightColor,scale:parseInt(v.scale),heightReference:parseInt(v.heightReference),distanceDisplayCondition:v.distanceDisplayCondition}):(de=new Cesium.PrimitiveCollection,H.forEach(me=>{de.add({id:me.modelId,url:v.url,modelMatrix:me.modelMatrix,color:v.color,lightColor:v.lightColor,scale:parseInt(v.scale),heightReference:parseInt(v.heightReference),distanceDisplayCondition:v.distanceDisplayCondition})})),M._viewer.scene.primitives.add(de),M.model.push(de),C||M.setVisibility(!1),typeof y=="function"&&y(V)}),this._core.isnull(v.id)&&(v.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+v.id);var B={id:v.id,name:o,checked:C,pId:this._core.isnull(m)?0:m,type:"polylineLayer",item:this};return this.setTreeobj(B),this._tree.insertGroupId(B,this._core.isnull(m)?0:m),this};ih.prototype.createPointModel=function(o,A){var f=this,m=new this._cesium.ScreenSpaceEventHandler(this._viewer.scene.canvas),C=[],y=null,x=0,v=null,E=[],I,w=o.parameterd,Q=o.objid,M=o.cyjj,B=o.url;this.modelurl=B;var T=[],D={point:f._cesium.Color.RED,polyline:f._cesium.Color.YELLOW};Object.keys(o).length>0&&(o.point!=""&&o.point!=null&&(D.point=o.point),o.polyline!=""&&o.polyline!=null&&(D.polyline=o.polyline));var F=this._core.CreateTooltip(),L="",R={spot:[],distance:[],label:[],polyline:[],model:[]};m.setInputAction(function(U){C.length===0?F.showAt(U.endPosition,"\u5DE6\u952E\u5F00\u59CB,\u53F3\u952E\u7ED3\u675F\uFF01"):F.showAt(U.endPosition,"\u53F3\u952E\u7ED3\u675F\uFF01");var V=f._viewer.camera.getPickRay(U.endPosition);v=f._viewer.scene.globe.pick(V,f._viewer.scene),C.length>=2&&(f._cesium.defined(y)?(C.pop(),C.push(v)):y=new k(C),x=f._core.getHorizontalDistance(C,f._cesium))},this._cesium.ScreenSpaceEventType.MOUSE_MOVE),m.setInputAction(function(U){var V=f._viewer.camera.getPickRay(U.position);v=f._viewer.scene.globe.pick(V,f._viewer.scene),C.length==0&&C.push(v.clone());var H={px:U.position.x,py:U.position.y};C.push(v);var q={positionsxp:v,lxy:H};T.push(q);var ie=x;L="\u603B\u957F\uFF1A"+x,R.spot.push(v),R.distance.push(x)},this._cesium.ScreenSpaceEventType.LEFT_CLICK),m.setInputAction(function(U){m.destroy(),C.pop();for(var V=0;V<E.length;V++)f._viewer.entities.remove(E[V]);for(var H=[],q=1;q<T.length;q++){var ie=[],Z=T[q-1].lxy.px,oe=T[q-1].lxy.py,ne=T[q].lxy.px,se=T[q].lxy.py,ce=w;ie.push(T[q-1].positionsxp),ie.push(T[q].positionsxp),H=f.setPolylinemodel(ie,Z,oe,ne,se,ce,M,f.modelurl,H,f._cesium,f._viewer)}R.model=H,A!=""&&A!=null&&typeof A=="function"&&A(R),F.show(!1)},this._cesium.ScreenSpaceEventType.RIGHT_CLICK);var k=function(){function U(V){this.options={name:"\u76F4\u7EBF",polyline:{show:!0,positions:[],material:D.polyline,width:3,clampToGround:!0}},this.positions=V,this._init()}return U.prototype._init=function(){var V=this,H=function(){return V.positions};this.options.polyline.positions=new f._cesium.CallbackProperty(H,!1);var q=f._viewer.entities.add(this.options);f.item=q,E.push(q),R.polyline.push(q)},U}();return this};ih.prototype.setPolylinemodel=function(o,A,f,m,C,y,x,v,E,I,w){var Q=this._core.getSpaceDistancem(o,I);x==0||(y=parseInt(Q/x));for(var M=o[0],B=o[o.length-1],T=I.Cartographic.fromCartesian(M),D=I.Math.toDegrees(T.longitude),F=I.Math.toDegrees(T.latitude),L=T.height,R=I.Cartographic.fromCartesian(B),k=I.Math.toDegrees(R.longitude),U=I.Math.toDegrees(R.latitude),V=R.height,H=y,q=I.Math.lerp(D,k,1/H)-D,ie=I.Math.lerp(F,U,1/H)-F,Z=I.Math.lerp(A,m,1/H)-A,oe=I.Math.lerp(f,C,1/H)-f,ne=[],se,ce,j=0;j<H;j++){var de=D+(j+1)*q,me=F+(j+1)*ie;j==0?se=new I.Cartesian3(de,me,0):j==1&&(ce=new I.Cartesian3(de,me,0));var Ie=A+(j+1)*Z,ve=f+(j+1)*oe,_e={x:Ie,y:ve},_e={x:Ie,y:ve},Be=w.camera.pickEllipsoid(_e,w.scene.globe.ellipsoid),Qe=I.Cartographic.fromCartesian(Be),Ie=I.Math.toDegrees(Qe.longitude),ve=I.Math.toDegrees(Qe.latitude),K=I.Transforms.eastNorthUpToFixedFrame(I.Cartesian3.fromDegrees(Ie,ve,6)),W=I.Model.fromGltf({url:v,modelMatrix:K,scale:100}),te=w.scene.primitives.add(W);E.push(W)}return E};ih.prototype.setPolylinemodels_obsolete=function(o,A,f,m,C,y,x,v,E,I){var w=this._core.getSpaceDistancem(o,v),Q=10,M=parseFloat(x.distance);M==0||(Q=parseInt(w/M));for(var B=o[0],T=o[o.length-1],D=v.Cartographic.fromCartesian(B),F=v.Math.toDegrees(D.longitude),L=v.Math.toDegrees(D.latitude),R=D.height,k=v.Cartographic.fromCartesian(T),U=v.Math.toDegrees(k.longitude),V=v.Math.toDegrees(k.latitude),H=k.height,q=v.Math.toDegrees(D.height),ie=Q,Z=v.Math.lerp(F,U,1/ie)-F,oe=v.Math.lerp(L,V,1/ie)-L,ne=v.Math.lerp(A,m,1/ie)-A,se=v.Math.lerp(f,C,1/ie)-f,ce=[],j,de,me=0;me<ie;me++){var _e=F+(me+1)*Z,Be=L+(me+1)*oe,Qe=v.Transforms.eastNorthUpToFixedFrame(v.Cartesian3.fromDegrees(_e,Be,x.height)),Ie=parseInt(x.heightReference),ve=v.Model.fromGltf({url:x.url,modelMatrix:Qe,color:x.color,lightColor:x.lightColor,scale:parseInt(x.scale),heightReference:parseInt(x.heightReference),distanceDisplayCondition:x.distanceDisplayCondition}),K=E.scene.primitives.add(ve,I);y.push(ve)}return y};ih.prototype.setPolylinemodels=function(o,A,f,m,C,y,x,v,E,I){var w=this._core.getSpaceDistancem(o,v),Q=10,M=parseFloat(x.distance);M==0||(Q=parseInt(w/M));for(var B=o[0],T=o[o.length-1],D=v.Cartographic.fromCartesian(B),F=v.Math.toDegrees(D.longitude),L=v.Math.toDegrees(D.latitude),R=D.height,k=v.Cartographic.fromCartesian(T),U=v.Math.toDegrees(k.longitude),V=v.Math.toDegrees(k.latitude),H=k.height,q=v.Math.toDegrees(D.height),ie=Q,Z=v.Math.lerp(F,U,1/ie)-F,oe=v.Math.lerp(L,V,1/ie)-L,ne=v.Math.lerp(A,m,1/ie)-A,se=v.Math.lerp(f,C,1/ie)-f,ce=[],j,de,me=0;me<ie;me++){var _e=F+(me+1)*Z,Be=L+(me+1)*oe,Qe=v.Transforms.eastNorthUpToFixedFrame(v.Cartesian3.fromDegrees(_e,Be,parseInt(x.height?x.height:0))),Ie=parseInt(x.heightReference);Cesium.Matrix4.multiplyByUniformScale(Qe,parseInt(x.scale),Qe),y.push({modelMatrix:Qe,modelId:x})}return y};ih.prototype.createPolygonModel=function(o,A,f,m,C,y){var x={height:0,extrudedHeight:0,heightReference:this._cesium.HeightReference.RELATIVE_TO_GROUND,show:!0,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,stRotation:0,granularity:this._cesium.Math.RADIANS_PER_DEGREE,perPositionHeight:!1,closeTop:!0,closeBottom:!0,shadows:this._cesium.ShadowMode.ENABLED,clampToGround:!0,scale:1,classificationType:this._cesium.ClassificationType.BOTH},v=f.modelurl;!this._core.isnull(f)&&!this._core.isnull(f.fill)&&(this._core.isHtmlColor(f.fill)?f.material=this._color.colorFromHtmlColor(f.fill):(/^rgb/.test(f.fill)&&(f.material=this._color.rgbaStringToRgbaObj(f.fill)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a))),!this._core.isnull(f)&&!this._core.isnull(f.outlineColor)&&(this._core.isHtmlColor(f.outlineColor)?f.outlineColor=this._color.colorFromHtmlColor(f.outlineColor):(/^rgb/.test(f.outlineColor)&&(f.outlineColor=this._color.rgbaStringToRgbaObj(f.outlineColor)),f.outlineColor.r>1&&(f.outlineColor.r=f.outlineColor.r/255),f.outlineColor.g>1&&(f.outlineColor.g=f.outlineColor.g/255),f.outlineColor.b>1&&(f.outlineColor.b=f.outlineColor.b/255),f.outlineColor.a>1&&(f.outlineColor.a=f.outlineColor.a/255),f.outlineColor=this._color.createColor(f.outlineColor.r,f.outlineColor.g,f.outlineColor.b,f.outlineColor.a))),!this._core.isnull(f)&&!this._core.isnull(f.color)&&(this._core.isHtmlColor(f.color)?f.color=this._color.colorFromHtmlColor(f.color):(/^rgb/.test(f.color)&&(f.color=this._color.rgbaStringToRgbaObj(f.color)),f.color.r>1&&(f.color.r=f.color.r/255),f.color.g>1&&(f.color.g=f.color.g/255),f.color.b>1&&(f.color.b=f.color.b/255),f.color.a>1&&(f.color.a=f.color.a/255),f.color=this._color.createColor(f.color.r,f.color.g,f.color.b,f.color.a))),!this._core.isnull(f)&&!this._core.isnull(f.lightColor)&&(this._core.isHtmlColor(f.lightColor)?f.lightColor=this._color.colorFromHtmlColor(f.lightColor):(/^rgb/.test(f.lightColor)&&(f.lightColor=this._color.rgbaStringToRgbaObj(f.lightColor)),f.lightColor.r>1&&(f.lightColor.r=f.lightColor.r/255),f.lightColor.g>1&&(f.lightColor.g=f.lightColor.g/255),f.lightColor.b>1&&(f.lightColor.b=f.lightColor.b/255),f.lightColor.a>1&&(f.lightColor.a=f.lightColor.a/255),f.lightColor=this._color.createColor(f.lightColor.r,f.lightColor.g,f.lightColor.b,f.lightColor.a)));var E=this._core.extend(x,f,!0);f.checked=C,E.heightReference=this._cesium.HeightReference.RELATIVE_TO_GROUND;var I={clampToGround:!0};A==null&&console.log("geojson is required");var w=null;A.then?w=A:w=this._cesium.GeoJsonDataSource.load(A,I),this._viewer.dataSources.add(w);var Q=this,M;f&&f.time&&(M=new Q._cesium.TimeIntervalCollection([new Q._cesium.TimeInterval({start:f.time.start?Q._cesium.JulianDate.fromDate(new Date(f.time.start)):Q._cesium.Iso8601.MINIMUM_VALUE,stop:f.time.end?Q._cesium.JulianDate.fromDate(new Date(f.time.end)):Q._cesium.Iso8601.MAXIMUM_VALUE})])),w.then(function(T){Q.item=T,Q.model=[];var D=T.entities.values;Q._core.isnull(f.near)&&(f.near=0),Q._core.isnull(f.far)&&(f.far=999999999);var F=parseFloat(f.near),L=parseFloat(f.far),R=new Q._cesium.DistanceDisplayCondition(F,L);E.distanceDisplayCondition=R;for(var k=0;k<D.length;k++){var U=D[k];E.height=parseFloat(Q._core.extendgl(U,f.height,E.height)),E.extrudedHeight=parseFloat(Q._core.extendgl(U,f.extrudedHeight,E.extrudedHeight)),E.heightReference=Q._core.extendgl(U,f.heightReference,E.heightReference),E.show=Q._core.extendgl(U,f.show,E.show),E.material=Q._core.extendgl(U,f.material,E.material),E.outline=Q._core.extendgl(U,f.outline,E.outline),E.outlineColor=Q._core.extendgl(U,f.outlineColor,E.outlineColor),E.outlineWidth=parseFloat(Q._core.extendgl(U,f.outlineWidth,E.outlineWidth)),E.stRotation=Q._core.extendgl(U,f.stRotation,E.stRotation),E.granularity=Q._core.extendgl(U,f.granularity,E.granularity),E.distanceDisplayCondition=Q._core.extendgl(U,f.distanceDisplayCondition,E.distanceDisplayCondition),E.perPositionHeight=Q._core.extendgl(U,f.perPositionHeight,E.perPositionHeight),E.closeTop=Q._core.extendgl(U,f.closeTop,E.closeTop),E.closeBottom=Q._core.extendgl(U,f.closeBottom,E.closeBottom),E.shadows=Q._core.extendgl(U,f.shadows,E.shadows),E.classificationType=Q._core.extendgl(U,f.classificationType,E.classificationType);var V=U.polygon._hierarchy._value.positions;U.polygon.heightReference=1,U.polygon.show=E.show,U.polygon.material=E.material,U.polygon.outline=E.outline,U.polygon.outlineColor=E.outlineColor,U.polygon.outlineWidth=E.outlineWidth,U.polygon.stRotation=E.stRotation,U.polygon.granularity=E.granularity,U.polygon.distanceDisplayCondition=R,U.polygon.closeTop=E.closeTop,U.polygon.closeBottom=E.closeBottom,U.polygon.shadows=E.shadows,U.polygon.classificationType=E.classificationType,M&&(U.availability=M);for(var H=[],q=U.polygon.hierarchy.getValue().positions,ie=0;ie<q.length;ie++){var Z=Q._cesium.Math.toDegrees(Q._cesium.Cartographic.fromCartesian(q[ie]).longitude),oe=Q._cesium.Math.toDegrees(Q._cesium.Cartographic.fromCartesian(q[ie]).latitude);H.push(Z),H.push(oe)}var ne=Q.getTheBottomPoint(H),se=Q.scanningPolygon(ne,E.offset_x,E.offset_y,H),ce=[];se.forEach(function(j){var de=Q._cesium.Transforms.eastNorthUpToFixedFrame(Q._cesium.Cartesian3.fromDegrees(j.lon,j.lat,E.height)),me=Q._cesium.Model.fromGltf({url:v,color:E.color,silhouetteColor:E.lightColor,silhouetteSize:E.lightWidth,modelMatrix:de,scale:E.scale,heightReference:parseInt(E.heightReference),distanceDisplayCondition:R}),_e=Q._viewer.scene.primitives.add(me,M);me.time=M,Q.model.push(me)})}f.checked||Q.setVisibility(!1),typeof y=="function"&&y(T)}),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id);var B={id:E.id,name:o,checked:C,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A,style:E};return this.setTreeobj(B),this._tree.insertGroupId(B,this._core.isnull(m)?0:m),this};ih.prototype.setItem=function(o){this.item=o};ih.prototype.modelMove=function(){this._tree.removeHandler(),this._tree.starttemporaryItem(this._viewer),this.yd=!1;var o=this;this._tree.handler=new this._cesium.ScreenSpaceEventHandler(this._viewer.scene.canvas),this._tree.handler.setInputAction(function(A){var f=o._viewer.scene.pickPosition(A.position),m=o._viewer.scene.pick(A.position);if(o.yd!=null&&o.yd&&o._tree.handler.destroy(),o.yd=!0,m.tileset!=null){var C=m.tileset,y=o._cesium.Cartographic.fromCartesian(C.boundingSphere.center),x=o._cesium.Cartesian3.fromRadians(y.longitude,y.latitude,y.height);o._tree.handler.setInputAction(function(v){var E=o._viewer.scene.pickPosition(v.endPosition),I=o._cesium.Cartographic.fromCartesian(E),w=o._cesium.Cartesian3.fromRadians(I.longitude,I.latitude,y.height),Q=o._cesium.Cartesian3.subtract(w,x,new o._cesium.Cartesian3);C.modelMatrix=o._cesium.Matrix4.fromTranslation(Q)},o._cesium.ScreenSpaceEventType.MOUSE_MOVE)}},o._cesium.ScreenSpaceEventType.LEFT_CLICK)};ih.prototype.getTheBottomPoint=function(o){for(var A=90,f=0,m=1;m<o.length;m+=2)A=A<o[m]?A:(f=m)&&o[m];return{lon:o[f-1],lat:o[f]}};ih.prototype.scanningPolygon=function(o,A,f,m){for(var C=[],y=180,x=-180,v=-90,E,I,w,Q,M,B=0;B<m.length;B+=2)v=v>m[B+1]?v:m[B+1],y=y<m[B]?y:m[B],x=x>m[B]?x:m[B];var T=this.GetPositionFromA_D(o.lat,o.lon,f,0),D=this.GetPositionFromA_D(o.lat,o.lon,A,90);for(E=D[0]-o.lon,I=T[1]-o.lat,C.push({lon:o.lon,lat:o.lat}),M={lon:o.lon,lat:o.lat},M.lat+=I;M.lat<=v;M.lat+=I){for(w={lon:M.lon-E,lat:M.lat},Q={lon:M.lon+E,lat:M.lat},this.IsInPolygon(M.lon,M.lat,m)&&C.push({lon:M.lon,lat:M.lat});w.lon>=y;w.lon-=E)this.IsInPolygon(w.lon,w.lat,m)&&C.push({lon:w.lon,lat:w.lat});for(;Q.lon<=x;Q.lon+=E)this.IsInPolygon(Q.lon,Q.lat,m)&&C.push({lon:Q.lon,lat:Q.lat})}return C};ih.prototype.GetPositionFromA_D=function(o,A,f,m){var C=6378137,y=6356725,x=f*Math.sin(m*Math.PI/180),v=f*Math.cos(m*Math.PI/180),E=y+(C-y)*(90-o)/90,I=E*Math.cos(o*Math.PI/180),w=(x/I+A*Math.PI/180)*180/Math.PI,Q=(v/E+o*Math.PI/180)*180/Math.PI;return[w,Q]};ih.prototype.IsInPolygon=function(o,A,f){var m=0,C,y,x,v,E;if(f.length<6)return!1;f.push(f[0],f[1]);for(var I=0;I<f.length-2;I+=2)C=f[I],x=f[I+1],y=f[I+2],v=f[I+3],(A>=x&&A<v||A>=v&&A<x)&&Math.abs(x-v)>0&&(E=C-(C-y)*(x-A)/(x-v),E<=o&&m++);return m%2!==0};ih.prototype.createModel=function(o,A,f,m,C,y){var x={id:this._core.getuid(),uri:A,show:!0,heading:0,pitch:0,roll:0,scale:1},v=this._core.extend(x,f,!0);this._position=o;var E={id:v.id,position:this._cesium.Cartesian3.fromDegrees(this._position[0],this._position[1],this._position[2]),model:v};(v.heading||v.pitch||v.roll)&&(this.heading=v.heading,this.pitch=v.pitch,this.roll=v.roll,E.orientation=this._cesium.Transforms.headingPitchRollQuaternion(this._cesium.Cartesian3.fromDegrees(this._position[0],this._position[1],this._position[2]),new this._cesium.HeadingPitchRoll(this._cesium.Math.toRadians(this._cesium.defaultValue(v.heading,0)),this._cesium.Math.toRadians(this._cesium.defaultValue(v.pitch,0)),this._cesium.Math.toRadians(this._cesium.defaultValue(v.roll,0)))));var I=this;v.rotate&&(E.orientation=new this._cesium.CallbackProperty(w,!1),I.rotate=v.rotate,delete v.rotate);function w(){return I.heading=I.heading+I.rotate,I._cesium.Transforms.headingPitchRollQuaternion(I._cesium.Cartesian3.fromDegrees(I._position[0],I._position[1],I._position[2]),new I._cesium.HeadingPitchRoll(I._cesium.Math.toRadians(I._cesium.defaultValue(I.heading,0)),I._cesium.Math.toRadians(I._cesium.defaultValue(I.pitch,0)),I._cesium.Math.toRadians(I._cesium.defaultValue(I.roll,0))))}delete v.heading,delete v.pitch,delete v.roll,E.model=v,this.item=this._viewer.entities.add(E),typeof y=="function"&&y(this.item);var Q={id:this.item.id,name:C||"\u65B0\u5EFA\u6A21\u578B"+x.id,pId:this._core.isnull(m)?0:m,type:"Point",item:this.item};return this.setTreeobj(Q),this._tree.insertGroupId(Q,this._core.isnull(m)?0:m),this};ih.prototype.createModelEditable=function(o,A,f,m,C,y){var x={id:this._core.getuid(),uri:A,show:!0,heading:0,pitch:0,roll:0,scale:1},v=this._core.extend(x,f,!0);this._position=o;var E={position:this._cesium.Cartesian3.fromDegrees(this._position[0],this._position[1],this._position[2]),model:v},I=this._cesium.Cartesian3.fromDegrees(this._position[0],this._position[1],this._position[2]),w=this.createCylinder(I,new this._cesium.CallbackProperty(F,!1),new this._cesium.CallbackProperty(H,!1),new this._cesium.CallbackProperty(q,!1),this._cesium.Color.LIMEGREEN,!1);w.oid=1,this.modelPointArr.push(w);var Q=this.createCylinder(I,new this._cesium.CallbackProperty(L,!1),new this._cesium.CallbackProperty(H,!1),new this._cesium.CallbackProperty(q,!1),this._cesium.Color.MEDIUMBLUE,!1);Q.oid=2,this.modelPointArr.push(Q);var M=this.createCylinder(I,new this._cesium.CallbackProperty(R,!1),new this._cesium.CallbackProperty(H,!1),new this._cesium.CallbackProperty(q,!1),this._cesium.Color.RED,!1);M.oid=3,this.modelPointArr.push(M);var B=this.creatBillboard(I,new this._cesium.CallbackProperty(ie,!1),"../../img/j.png",!1);B.oid=4,this.modelPointArr.push(B);var T=this.creatBillboard(I,new this._cesium.CallbackProperty(Z,!1),"../../img/s.png",!1);T.oid=5,this.modelPointArr.push(T),(v.heading||v.pitch||v.roll)&&(this.heading=v.heading,this.pitch=v.pitch,this.roll=v.roll,E.orientation=this._cesium.Transforms.headingPitchRollQuaternion(this._cesium.Cartesian3.fromDegrees(this._position[0],this._position[1],this._position[2]),new this._cesium.HeadingPitchRoll(this._cesium.Math.toRadians(this._cesium.defaultValue(v.heading,0)),this._cesium.Math.toRadians(this._cesium.defaultValue(v.pitch,0)),this._cesium.Math.toRadians(this._cesium.defaultValue(v.roll,0)))));var D=this;v.rotate&&(E.orientation=new this._cesium.CallbackProperty(U,!1),D.rotate=v.rotate,delete v.rotate),E.orientation=new this._cesium.CallbackProperty(k,!1),D.scale=v.scale,E.model.scale=new this._cesium.CallbackProperty(V,!1);function F(){var ne=D._cesium.Cartesian3.fromDegrees(D._position[0],D._position[1],D._position[2]),se=D._cesium.Math.toRadians(D.heading),ce=new D._cesium.HeadingPitchRoll(se,D._cesium.Math.toRadians(D.pitch),D._cesium.Math.toRadians(D.roll));return D._cesium.Transforms.headingPitchRollQuaternion(ne,ce)}function L(){var ne=D._cesium.Cartesian3.fromDegrees(D._position[0],D._position[1],D._position[2]),se=D._cesium.Math.toRadians(D.heading),ce=new D._cesium.HeadingPitchRoll(se,D._cesium.Math.toRadians(90+D.pitch),D._cesium.Math.toRadians(D.roll));return D._cesium.Transforms.headingPitchRollQuaternion(ne,ce)}function R(){var ne=D._cesium.Cartesian3.fromDegrees(D._position[0],D._position[1],D._position[2]),se=D._cesium.Math.toRadians(D.heading),ce=new D._cesium.HeadingPitchRoll(se,D._cesium.Math.toRadians(D.pitch),D._cesium.Math.toRadians(90+D.roll));return D._cesium.Transforms.headingPitchRollQuaternion(ne,ce)}function k(){return D._cesium.Transforms.headingPitchRollQuaternion(D._cesium.Cartesian3.fromDegrees(D._position[0],D._position[1],D._position[2]),new D._cesium.HeadingPitchRoll(D._cesium.Math.toRadians(D._cesium.defaultValue(D.heading,0)),D._cesium.Math.toRadians(D._cesium.defaultValue(D.pitch,0)),D._cesium.Math.toRadians(D._cesium.defaultValue(D.roll,0))))}function U(){return D.heading=D.heading+D.rotate,D._cesium.Transforms.headingPitchRollQuaternion(D._cesium.Cartesian3.fromDegrees(D._position[0],D._position[1],D._position[2]),new D._cesium.HeadingPitchRoll(D._cesium.Math.toRadians(D._cesium.defaultValue(D.heading,0)),D._cesium.Math.toRadians(D._cesium.defaultValue(D.pitch,0)),D._cesium.Math.toRadians(D._cesium.defaultValue(D.roll,0))))}function V(){return D.scale}function H(){return D.Radius*D.scale}function q(){return D.Radius*100}function ie(){return new D._cesium.Cartesian2(0,-(D.Radius*D.scale))}function Z(){return new D._cesium.Cartesian2(-(D.Radius*D.scale),0)}delete v.heading,delete v.pitch,delete v.roll,E.model=v,this.item=this._viewer.entities.add(E),this.item.objId=this.objId,this.state=1,typeof y=="function"&&y(this.item);var oe={id:this.item.id,name:C||"\u65B0\u5EFA\u6A21\u578B"+x.id,pId:this._core.isnull(m)?0:m,type:"Point",item:this.item};return this.setTreeobj(oe),this._tree.insertGroupId(oe,this._core.isnull(m)?0:m),this};ih.prototype.createOrientation=function(o,A,f){var m=this._cesium.Math.toRadians(0),C=new this._cesium.HeadingPitchRoll(m,this._cesium.Math.toRadians(A),this._cesium.Math.toRadians(f));return this._cesium.Transforms.headingPitchRollQuaternion(o,C)};ih.prototype.createCylinder=function(o,A,f,m,C,y){if(!!o)return this._viewer.entities.add({position:o,orientation:A,cylinder:{length:10,topRadius:f,bottomRadius:f,fill:!1,material:C.withAlpha(.5),outline:!0,outlineWidth:10,outlineColor:C,numberOfVerticalLines:m,slices:m},show:y})};ih.prototype.startModify=function(){if(!(this.state!=2&&this.state!=1)){var o=this;this.modifyHandler||(this.modifyHandler=new this._cesium.ScreenSpaceEventHandler(this._viewer.scene.canvas));for(var A=0;A<o.modelPointArr.length;A++){var f=o.modelPointArr[A];f&&(f.show=!0)}var m,C,y,x,v,E;this.modifyHandler.setInputAction(function(I){var w=o._viewer.scene.pick(I.position);o._cesium.defined(w)&&w.id&&(w.id.objId?o.modifyModel=w.id:o.modifyPoint&&(o.modifyPoint.oid==4||o.modifyPoint.oid==5)?(w.id.oid!=o.modifyPoint.oid&&(o.modifyPoint=w.id),o.modifyPoint.oid==4?o.scale=o.scale+1:o.scale=o.scale-1):o.modifyPoint=w.id,o.forbidDrawWorld(!0));var Q=o._cesium.Cartesian3.fromDegrees(o._position[0],o._position[1],o._position[2]);m=o._cesium.SceneTransforms.wgs84ToWindowCoordinates(o._viewer.scene,Q),C=I.position,x=o.heading+0,E=o.roll+0,v=o.pitch+0,o.state=2},this._cesium.ScreenSpaceEventType.LEFT_DOWN),this.modifyHandler.setInputAction(function(I){var w=o._viewer.scene.pick(I.position);if(!(o._cesium.defined(w)&&w.id)){for(var Q=0;Q<o.modelPointArr.length;Q++){var M=o.modelPointArr[Q];M&&(M.show=!1)}o.modifyHandler&&(o.modifyHandler.destroy(),o.modifyHandler=null)}},this._cesium.ScreenSpaceEventType.LEFT_CLICK),this.modifyHandler.setInputAction(function(I){var w=o._viewer.scene.pick(I.endPosition);if(!(!o.modifyModel&&!o.modifyPoint)){var Q=o._viewer.scene.pickPosition(I.endPosition);if(Q){if(o.modifyModel){o.item.position.setValue(Q);for(var M=0;M<o.modelPointArr.length;M++){var B=o.modelPointArr[M];B&&B.position.setValue(Q)}}else if(o.modifyPoint){y=I.endPosition;var T=o.arge(m,C,y);o.modifyPoint.oid==1?o.heading=x+T:o.modifyPoint.oid==2?o.roll=E+T:o.modifyPoint.oid==3&&(o.pitch=v+T)}}}},this._cesium.ScreenSpaceEventType.MOUSE_MOVE),this.modifyHandler.setInputAction(function(I){!o.modifyPoint&&!o.modifyModel||o.modifyPoint&&(o.modifyPoint.oid==4||o.modifyPoint.oid==5)||(o.modifyPoint=null,o.modifyModel=null,o.forbidDrawWorld(!1))},this._cesium.ScreenSpaceEventType.LEFT_UP)}};ih.prototype.creatBillboard=function(o,A,f,m){var C=this._viewer.entities.add({position:o,show:m,billboard:{image:f,pixelOffset:A,verticalOrigin:this._cesium.VerticalOrigin.BOTTOM}});return C.attr="editPoint",C};ih.prototype.arge=function(o,A,f){var m=Math.sqrt(Math.pow(o.x-A.x,2)+Math.pow(o.y-A.y,2)),C=Math.sqrt(Math.pow(o.x-f.x,2)+Math.pow(o.y-f.y,2)),y=Math.sqrt(Math.pow(A.x-f.x,2)+Math.pow(A.y-f.y,2)),x=(Math.pow(m,2)+Math.pow(C,2)-Math.pow(y,2))/(2*m*C);return Math.round(Math.acos(x)*180/Math.PI)};ih.prototype.forbidDrawWorld=function(o){this._viewer.scene.screenSpaceCameraController.enableRotate=!o,this._viewer.scene.screenSpaceCameraController.enableTilt=!o,this._viewer.scene.screenSpaceCameraController.enableTranslate=!o,this._viewer.scene.screenSpaceCameraController.enableInputs=!o};ih.prototype.getCatesian3FromPX=function(o,A,f){var m=A.scene.pick(o),C,y=A.scene.drillPick(o),x=null;if(f){for(var v=0;v<y.length;v++)if(y[v].id._id!=f[0].id&&y[v].id._id!=f[1].id){x=y[v].id;break}}else x=m;if(A.scene.pickPositionSupported&&Cesium.defined(x))C=A.scene.pickPosition(o);else{var E=A.camera.getPickRay(o);if(!E)return;C=A.scene.globe.pick(E,A.scene)}return C};ih.prototype.setTreeobj=function(o){this.treeobj=o};ih.prototype.setVisibility=function(o){if(this.item.item?this.item.item.show=o:this.item.show=o,this.model.length>0)for(var A=0;A<this.model.length;A++)this.model[A].show=o,this.model[A]._availability&&!o?this.model[A]._availability=void 0:this.model[A].time&&o&&(this.model[A]._availability=this.model[A].time)};ih.prototype.setOrientation=function(o){(o.heading||o.pitch||o.roll)&&(this.item.orientation=this._cesium.Transforms.headingPitchRollQuaternion(this._cesium.Cartesian3.fromDegrees(this._position[0],this._position[1],this._position[2]),new this._cesium.HeadingPitchRoll(this._cesium.Math.toRadians(this._cesium.defaultValue(o.heading,0)),this._cesium.Math.toRadians(this._cesium.defaultValue(o.pitch,0)),this._cesium.Math.toRadians(this._cesium.defaultValue(o.roll,0)))))};ih.prototype.setScale=function(o){this.item&&this.item.model&&(this.item.model.scale=o)};ih.prototype.setPosition=function(o){this.item&&this.item.model&&(this._position=o,this.item.position=this._cesium.Cartesian3.fromDegrees(this._position[0],this._position[1],this._position[2]))};ih.prototype.getVisibility=function(){return this.item.show};ih.prototype.deleteObject=function(){if(this.model&&this.model.length)for(var o=0;o<this.model.length;o++)this._viewer.scene.primitives.remove(this.model[o]);try{this._viewer.scene.primitives.remove(this.item)}catch{}try{this._viewer.entities.remove(this.item)}catch{}try{this._viewer.dataSources.remove(this.item)}catch{}try{this._Provider.remove()}catch{}};var HQ=ih;function Qp(o,A){this._viewer=o,this._cesium=A,this._core=new pr(o,A),this._color=new Pn(this._viewer,this._cesium),this._tree=lt,this._Provider=void 0,this._primitive=void 0,this._taskProcessor=new this._cesium.TaskProcessor("vectorTileProvider"),this.model=[],this.Legend=[],this._ajax=null,this.datas=null}Qp.prototype.createPolygonGeoJsonFeatureLayer=function(o,A,f,m,C){var y={polygonHierarchy:void 0,height:0,extrudedHeight:0,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,perPositionHeight:!0,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.WHITE,show:!0};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a))));var x=this._core.extend(y,f,!0);A==null&&console.log("geojson is required");var v=null;A.then?v=A:v=this._cesium.GeoJsonDataSource.load(A);var E=this,I=[];v.then(function(Q){for(var M=Q.entities.values,B=0;B<M.length;B++){var T=M[B];x.polygonHierarchy=new E._cesium.PolygonHierarchy(T.polygon.hierarchy._value.positions);var D=new E._cesium.PolygonGeometry(x),F=E._cesium.PolygonGeometry.createGeometry(D),L=new E._cesium.GeometryInstance({geometry:F});I.push(L)}var R=E._viewer.scene.primitives.add(new E._cesium.Primitive({geometryInstances:I,appearance:new E._cesium.MaterialAppearance({material:new E._cesium.Material({fabric:{type:"Color",uniforms:{color:x.material}}}),faceForward:!0,flat:!1})})),k="material:"+x.material.red*255+","+x.material.green*255+","+x.material.blue*255;E.Legend.push(k),E.item=R,x.show==!1&&(R.show=!1),typeof C=="function"&&C(R)}),this._core.isnull(x.id)&&(x.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+x.id);var w={id:x.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A,style:x};return this.setTreeobj(w),this._tree.insertGroupId(w,this._core.isnull(m)?0:m),this};Qp.prototype.deleteObject=function(){if(this.items!=null&&this.items!=null&&this.items.length>0)for(var o=0;o<this.items.length;o++)this._viewer.scene.primitives.remove(this.items[o]);else this._viewer.scene.primitives.remove(this.item);if(this.model!=null&&this.model!=null&&this.model.length>0)for(var o=0;o<this.model.length;o++)this._viewer.scene.primitives.remove(this.model[o]);try{this._Provider.remove()}catch{}};Qp.prototype.setRefresh=function(o){try{this._Provider&&this._Provider.setStatus(!o)}catch{}};Qp.prototype.setVisibility=function(o){if(this.items!=null&&this.items!=null&&this.items.length>0)for(var A=0;A<this.items.length;A++)this.items[A].show=o;else this.item.show=o;if(this.model!=null&&this.model!=null&&this.model.length>0)for(var A=0;A<this.model.length;A++)this.model[A].show=o;this._Provider&&this._Provider.setStatus(!o)};Qp.prototype.createPolygonVectorGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y){var x={polygonHierarchy:void 0,height:0,extrudedHeight:999999,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.WHITE,shadows:this._cesium.ShadowMode.ENABLED,show:!0},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a))));var E=this._core.extend(x,f,!0);E.extrudedHeight==0&&(E.extrudedHeight=999999),this.items=[];var I=this,w=new IA(this._viewer,this._cesium,v);this._Provider=w,w._loadTile=function(M){var B=[],T=null,D=scene.primitives;I.Legend=[];var F=new I._cesium.PrimitiveCollection;if(M.features.forEach(function(L){if(w._isCameraMoving)return null;var R=[];function k(H){for(var q=0;q<H.length;q++)Array.isArray(H[q])?k(H[q]):R.push(H[q])}if(Array.isArray(L.geometry.coordinates)&&L.geometry.coordinates.length>0)if(Array.isArray(L.geometry.coordinates[0][0]))for(var U=0;U<L.geometry.coordinates.length;U++)R=[],k(L.geometry.coordinates[U]),V(R);else k(L.geometry.coordinates),V(R);function V(H){if(w._isCameraMoving)return null;var q=I._cesium.Cartesian3.fromDegreesArray(H);if(/^\[/.test(f.extrudedHeight)&&/\]$/.test(f.extrudedHeight)){var ie=f.extrudedHeight.replace(/\[/,"").replace(/\]/,"");E.extrudedHeight=parseFloat(L.properties[ie])}if(E.extrudedHeight=parseFloat(E.extrudedHeight),E.heightReference==1&&delete E.height,E.extrudedHeightReference==1&&delete E.extrudedHeight,/^\[/.test(f.material)&&/\]$/.test(f.material)){var Z=f.material.replace(/\[/,"").replace(/\]/,"");E.material=L.properties[Z],I._core.isHtmlColor(E.material)?E.material=I._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=I._color.rgbaStringToRgbaObj(E.material)),E.material.r>1&&(E.material.r=E.material.r/255),E.material.g>1&&(E.material.g=E.material.g/255),E.material.b>1&&(E.material.b=E.material.b/255),E.material.a>1&&(E.material.a=E.material.a/255),E.material=I._color.createColor(E.material.r,E.material.g,E.material.b,E.material.a))}E.polygonHierarchy=new I._cesium.PolygonHierarchy(q),L.positions=q;var oe=new I._cesium.PolygonGeometry(E),ne=null;ne=new I._cesium.GeometryInstance({id:L,geometry:oe,attributes:{color:new I._cesium.ColorGeometryInstanceAttribute.fromColor(E.material)}});var se="material:"+E.material.red*255+","+E.material.green*255+","+E.material.blue*255;I.Legend.push(se),B.push(ne)}}),B.length>0)return T=new I._cesium.GroundPrimitive({geometryInstances:B,appearance:new I._cesium.PerInstanceColorAppearance({closed:!0,flat:!1}),classificationType:E.classificationType}),T},this.item=w._primitiveCollection,w.addTo(this._viewer),C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var Q={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f};return this.setTreeobj(Q),this._tree.insertGroupId(Q,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Qp.prototype.createPolygonVectorGeoJsonFeatureLayerProviderModel=function(o,A,f,m,C,y){var x={polygonHierarchy:void 0,height:0,extrudedHeight:999999,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.WHITE,shadows:this._cesium.ShadowMode.ENABLED,show:!0},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:this._core.defaultValue(A.srs,"EPSG:4490")+":{z}",TILEMATRIXSET:this._core.defaultValue(A.srs,"EPSG:4490"),FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium},E=f.material,I=f.height;!this._core.isnull(f)&&!this._core.isnull(f.color)&&(this._core.isHtmlColor(f.color)?f.color=this._color.colorFromHtmlColor(f.color):(/^rgb/.test(f.color)&&(f.color=this._color.rgbaStringToRgbaObj(f.color)),f.color.r>1&&(f.color.r=f.color.r/255),f.color.g>1&&(f.color.g=f.color.g/255),f.color.b>1&&(f.color.b=f.color.b/255),f.color.a>1&&(f.color.a=f.color.a/255),f.color=this._color.createColor(f.color.r,f.color.g,f.color.b,f.color.a))),!this._core.isnull(f)&&!this._core.isnull(f.lightColor)&&(this._core.isHtmlColor(f.lightColor)?f.lightColor=this._color.colorFromHtmlColor(f.lightColor):(/^rgb/.test(f.lightColor)&&(f.lightColor=this._color.rgbaStringToRgbaObj(f.lightColor)),f.lightColor.r>1&&(f.lightColor.r=f.lightColor.r/255),f.lightColor.g>1&&(f.lightColor.g=f.lightColor.g/255),f.lightColor.b>1&&(f.lightColor.b=f.lightColor.b/255),f.lightColor.a>1&&(f.lightColor.a=f.lightColor.a/255),f.lightColor=this._color.createColor(f.lightColor.r,f.lightColor.g,f.lightColor.b,f.lightColor.a))),!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a))));var w=this._core.extend(x,f,!0);w.extrudedHeight==0&&(w.extrudedHeight=999999),this.items=[];var Q=this,M=new IA(this._viewer,this._cesium,v);this._Provider=M,M._loadTile=function(T){var D=[],F=null,L=scene.primitives,R=new Q._cesium.PrimitiveCollection;return Q.Legend=[],T.features.forEach(function(k){if(M._isCameraMoving)return null;var U=[];function V(Z){for(var oe=0;oe<Z.length;oe++)Array.isArray(Z[oe])?V(Z[oe]):U.push(Z[oe])}if(Array.isArray(k.geometry.coordinates)&&k.geometry.coordinates.length>0)if(Array.isArray(k.geometry.coordinates[0][0]))for(var H=0;H<k.geometry.coordinates.length;H++)U=[],V(k.geometry.coordinates[H]),q(U),ie(U);else V(k.geometry.coordinates),q(U),ie(U);function q(Z){if(M._isCameraMoving)return null;var oe=Q._cesium.Cartesian3.fromDegreesArray(Z);if(/^\[/.test(f.extrudedHeight)&&/\]$/.test(f.extrudedHeight)){var ne=f.extrudedHeight.replace(/\[/,"").replace(/\]/,"");w.extrudedHeight=parseFloat(k.properties[ne])}if(w.extrudedHeight=parseFloat(w.extrudedHeight),w.heightReference==1&&delete w.height,w.extrudedHeightReference==1&&delete w.extrudedHeight,/^\[/.test(f.material)&&/\]$/.test(f.material)){var se=f.material.replace(/\[/,"").replace(/\]/,"");w.material=k.properties[se],Q._core.isHtmlColor(w.material)?w.material=Q._color.colorFromHtmlColor(w.material):(/^rgb/.test(w.material)&&(w.material=Q._color.rgbaStringToRgbaObj(w.material)),w.material.r>1&&(w.material.r=w.material.r/255),w.material.g>1&&(w.material.g=w.material.g/255),w.material.b>1&&(w.material.b=w.material.b/255),w.material.a>1&&(w.material.a=w.material.a/255),w.material=Q._color.createColor(w.material.r,w.material.g,w.material.b,w.material.a))}w.polygonHierarchy=new Q._cesium.PolygonHierarchy(oe);var ce=new Q._cesium.PolygonGeometry(w),j=null;k.positions=oe,j=new Q._cesium.GeometryInstance({id:k,geometry:ce,attributes:{color:new Q._cesium.ColorGeometryInstanceAttribute.fromColor(w.material)}});var de="material:"+w.material.red*255+","+w.material.green*255+","+w.material.blue*255;Q.Legend.push(de),F=new Q._cesium.ClassificationPrimitive({geometryInstances:j,appearance:new Q._cesium.PerInstanceColorAppearance({closed:!0,flat:!1}),classificationType:w.classificationType,shadows:Q._cesium.ShadowMode.ENABLED}),R.add(F)}function ie(Z){for(var oe=Q._cesium.Cartesian3.fromDegreesArray(Z),ne=new Q._cesium.PolygonHierarchy(oe),se=[],ce=ne.positions,j=0;j<ce.length;j++){var de=Q._cesium.Math.toDegrees(Q._cesium.Cartographic.fromCartesian(ce[j]).longitude),me=Q._cesium.Math.toDegrees(Q._cesium.Cartographic.fromCartesian(ce[j]).latitude);se.push(de),se.push(me)}var _e=Q.getTheBottomPoint(se),Be=Q.scanningPolygon(_e,w.offset_x,w.offset_y,se),Qe=[];Be.forEach(function(Ie){var ve=Q._cesium.Transforms.eastNorthUpToFixedFrame(Q._cesium.Cartesian3.fromDegrees(Ie.lon,Ie.lat,I)),K=Q._cesium.Model.fromGltf({url:E,color:w.color,lightColor:w.lightColor,modelMatrix:ve,scale:w.scale});R.add(K)})}}),R},f&&f.time&&(M.availability=new Q._cesium.TimeIntervalCollection([new Q._cesium.TimeInterval({start:f.time.start?Q._cesium.JulianDate.fromDate(new Date(f.time.start)):Q._cesium.Iso8601.MINIMUM_VALUE,stop:f.time.end?Q._cesium.JulianDate.fromDate(new Date(f.time.end)):Q._cesium.Iso8601.MAXIMUM_VALUE})])),this.item=M._primitiveCollection,M.addTo(this._viewer),C||this.setVisibility(!1),this._core.isnull(w.id)&&(w.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+w.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var B={id:w.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f};return this.setTreeobj(B),this._tree.insertGroupId(B,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Qp.prototype.GetPositionFromA_D=function(o,A,f,m){var C=6378137,y=6356725,x=f*Math.sin(m*Math.PI/180),v=f*Math.cos(m*Math.PI/180),E=y+(C-y)*(90-o)/90,I=E*Math.cos(o*Math.PI/180),w=(x/I+A*Math.PI/180)*180/Math.PI,Q=(v/E+o*Math.PI/180)*180/Math.PI;return[w,Q]};Qp.prototype.getTheBottomPoint=function(o){for(var A=90,f=0,m=1;m<o.length;m+=2)A=A<o[m]?A:(f=m)&&o[m];return{lon:o[f-1],lat:o[f]}};Qp.prototype.scanningPolygon=function(o,A,f,m){for(var C=[],y=180,x=-180,v=-90,E,I,w,Q,M,B=0;B<m.length;B+=2)v=v>m[B+1]?v:m[B+1],y=y<m[B]?y:m[B],x=x>m[B]?x:m[B];var T=this.GetPositionFromA_D(o.lat,o.lon,f,0),D=this.GetPositionFromA_D(o.lat,o.lon,A,90);for(E=D[0]-o.lon,I=T[1]-o.lat,C.push({lon:o.lon,lat:o.lat}),M={lon:o.lon,lat:o.lat},M.lat+=I;M.lat<=v;M.lat+=I){for(w={lon:M.lon-E,lat:M.lat},Q={lon:M.lon+E,lat:M.lat},this.IsInPolygon(M.lon,M.lat,m)&&C.push({lon:M.lon,lat:M.lat});w.lon>=y;w.lon-=E)this.IsInPolygon(w.lon,w.lat,m)&&C.push({lon:w.lon,lat:w.lat});for(;Q.lon<=x;Q.lon+=E)this.IsInPolygon(Q.lon,Q.lat,m)&&C.push({lon:Q.lon,lat:Q.lat})}return C};Qp.prototype.IsInPolygon=function(o,A,f){var m=0,C,y,x,v,E;if(f.length<6)return!1;f.push(f[0],f[1]);for(var I=0;I<f.length-2;I+=2)C=f[I],x=f[I+1],y=f[I+2],v=f[I+3],(A>=x&&A<v||A>=v&&A<x)&&Math.abs(x-v)>0&&(E=C-(C-y)*(x-A)/(x-v),E<=o&&m++);return m%2!==0};Qp.prototype.setPolylinemodels=function(o,A,f,m,C,y,x,v,E){var I=this._core.getSpaceDistancem(o,v),w=10,Q=parseFloat(x.distance);Q==0||(w=parseInt(I/Q));for(var M=o[0],B=o[o.length-1],T=v.Cartographic.fromCartesian(M),D=v.Math.toDegrees(T.longitude),F=v.Math.toDegrees(T.latitude),L=T.height,R=v.Cartographic.fromCartesian(B),k=v.Math.toDegrees(R.longitude),U=v.Math.toDegrees(R.latitude),V=R.height,H=v.Math.toDegrees(T.height),q=w,ie=v.Math.lerp(D,k,1/q)-D,Z=v.Math.lerp(F,U,1/q)-F,oe=v.Math.lerp(A,m,1/q)-A,ne=v.Math.lerp(f,C,1/q)-f,se=[],ce,j,de=0;de<q;de++){var me=D+(de+1)*ie,_e=F+(de+1)*Z,Be=v.Transforms.eastNorthUpToFixedFrame(v.Cartesian3.fromDegrees(me,_e,x.height)),Qe=parseInt(x.heightReference),Ie=v.Model.fromGltf({url:x.url,modelMatrix:Be,color:x.color,lightColor:x.lightColor,scale:x.scale,heightReference:parseInt(x.heightReference)}),ve=E.scene.primitives.add(Ie);y.push(Ie)}return y};Qp.prototype.createPolygonVectorGeoJsonFeatureLayerProviderlsjl=function(o,A,f,m,C,y){var x={polygonHierarchy:void 0,height:0,extrudedHeight:0,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.WHITE,shadows:this._cesium.ShadowMode.ENABLED,show:!0},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a))));var E=this._core.extend(x,f,!0),I=this,w=new IA(this._viewer,this._cesium,v);this._Provider=w,w._loadTile=function(M,B){var T=[],D=[],F=I._taskProcessor.scheduleTask({json:M,styleOption:f,options:E,tileKey:B});if(!!I._cesium.defined(F)){var L=I;I._cesium.when(F,function(R){if(!w._primitiveByTile[R.tileKey]){for(var k=new L._cesium.PrimitiveCollection,U=0;U<R.geomInstances.length;U++){var V=null,H=R.geomInstances[U],q=H.id.id;if(!w._primitiveByTile[q]){var ie=new L._cesium.Material({fabric:{type:"Color",uniforms:{color:R.materials[U]}}}),Z=new L._cesium.MaterialAppearance({material:ie,faceForward:!0,flat:!1}),V=new L._cesium.Primitive({allowPicking:!0,appearance:new L._cesium.PerInstanceColorAppearance,geometryInstances:H,shadows:I._cesium.ShadowMode.ENABLED});k.add(V)}}w._primitiveCollection.add(k),w._primitiveByTile[R.tileKey]=k}})}},this.item=w._primitiveCollection,w.addTo(this._viewer),C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var Q={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f};return this.setTreeobj(Q),this._tree.insertGroupId(Q,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Qp.prototype.createPolygonVectorGeoJsonFeatureLayerProviderls=function(o,A,f,m,C,y){var x={polygonHierarchy:void 0,height:0,extrudedHeight:0,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.WHITE,shadows:this._cesium.ShadowMode.ENABLED,show:!0},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):/^http/.test(f.material)||(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a)))),!this._core.isnull(f)&&!this._core.isnull(f.fill)&&(f.fill.toString().charAt(0)=="["&&f.fill.toString().charAt(f.fill.length-1)=="]"||(this._core.isHtmlColor(f.fill)?f.fill=this._color.colorFromHtmlColor(f.fill):/^http/.test(f.fill)||(/^rgb/.test(f.fill)&&(f.fill=this._color.rgbaStringToRgbaObj(f.fill)),f.fill.r>1&&(f.fill.r=f.fill.r/255),f.fill.g>1&&(f.fill.g=f.fill.g/255),f.fill.b>1&&(f.fill.b=f.fill.b/255),f.fill.a>1&&(f.fill.a=f.fill.a/255),f.fill=this._color.createColor(f.fill.r,f.fill.g,f.fill.b,f.fill.a))));var E=this._core.extend(x,f,!0),I=this,w=new IA(this._viewer,this._cesium,v);this._Provider=w,w._loadTile=function(M){var B=[];I.Legend=[];var T=new I._cesium.PrimitiveCollection;return M.features.forEach(function(D){var F=[];function L(U){for(var V=0;V<U.length;V++)Array.isArray(U[V])?L(U[V]):F.push(U[V])}if(Array.isArray(D.geometry.coordinates)&&D.geometry.coordinates.length>0)if(Array.isArray(D.geometry.coordinates[0][0]))for(var R=0;R<D.geometry.coordinates.length;R++)F=[],L(D.geometry.coordinates[R]),k(F);else L(D.geometry.coordinates),k(F);function k(U){var V=I._cesium.Cartesian3.fromDegreesArray(U);if(/^\[/.test(f.extrudedHeight)&&/\]$/.test(f.extrudedHeight)){var H=f.extrudedHeight.replace(/\[/,"").replace(/\]/,"");E.extrudedHeight=parseFloat(D.properties[H])}if(E.extrudedHeight=parseFloat(E.extrudedHeight),E.heightReference==1&&delete E.height,E.extrudedHeightReference==1&&delete E.extrudedHeight,/^\[/.test(f.material)&&/\]$/.test(f.material)){var q=f.material.replace(/\[/,"").replace(/\]/,"");E.material=D.properties[q],I._core.isHtmlColor(E.material)?E.material=I._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=I._color.rgbaStringToRgbaObj(E.material)),E.material.r>1&&(E.material.r=E.material.r/255),E.material.g>1&&(E.material.g=E.material.g/255),E.material.b>1&&(E.material.b=E.material.b/255),E.material.a>1&&(E.material.a=E.material.a/255),E.material=I._color.createColor(E.material.r,E.material.g,E.material.b,E.material.a))}E.polygonHierarchy=new I._cesium.PolygonHierarchy(V),D.positions=V;var ie=new I._cesium.PolygonGeometry(E),Z=null,oe=new I._cesium.ColorGeometryInstanceAttribute.fromColor(E.fill),ne={};if(/^http/.test(E.material))ne=new I._cesium.Material({fabric:{type:"Image",uniforms:{image:E.material}}});else{var se="material:"+E.material.red*255+","+E.material.green*255+","+E.material.blue*255;I.Legend.push(se),ne=new I._cesium.Material({fabric:{type:"Color",uniforms:{color:E.material}}})}Z=new I._cesium.GeometryInstance({id:D,geometry:ie,attributes:{color:oe}});var ce=null;ce=new I._cesium.Primitive({allowPicking:!0,appearance:new I._cesium.MaterialAppearance({material:ne}),geometryInstances:Z,shadows:I._cesium.ShadowMode.ENABLED}),T.add(ce)}}),T},f&&f.time&&(w.availability=new I._cesium.TimeIntervalCollection([new I._cesium.TimeInterval({start:f.time.start?I._cesium.JulianDate.fromDate(new Date(f.time.start)):I._cesium.Iso8601.MINIMUM_VALUE,stop:f.time.end?I._cesium.JulianDate.fromDate(new Date(f.time.end)):I._cesium.Iso8601.MAXIMUM_VALUE})])),this.item=w._primitiveCollection,w.addTo(this._viewer),C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var Q={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f};return this.setTreeobj(Q),this._tree.insertGroupId(Q,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Qp.prototype.createPolygonVectorGeoJsonFeatureLayerProviderlsd=function(o,A,f,m,C,y){var x={show:!0,positions:[],shape:void 0,cornerType:this._cesium.CornerType.ROUNDED,granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.DISABLED,level_max:20,level_min:10},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a)))),!this._core.isnull(f)&&!this._core.isnull(f.outlineColor)&&(f.outlineColor.toString().charAt(0)=="["&&f.outlineColor.toString().charAt(f.outlineColor.length-1)=="]"||(this._core.isHtmlColor(f.outlineColor)?f.outlineColor=this._color.colorFromHtmlColor(f.outlineColor):(/^rgb/.test(f.outlineColor)&&(f.outlineColor=this._color.rgbaStringToRgbaObj(f.outlineColor)),f.outlineColor.r>1&&(f.outlineColor.r=f.outlineColor.r/255),f.outlineColor.g>1&&(f.outlineColor.g=f.outlineColor.g/255),f.outlineColor.b>1&&(f.outlineColor.b=f.outlineColor.b/255),f.outlineColor.a>1&&(f.outlineColor.a=f.outlineColor.a/255),f.outlineColor=this._color.createColor(f.outlineColor.r,f.outlineColor.g,f.outlineColor.b,f.outlineColor.a)))),this._option=this._core.extend(x,f,!0);var E=this,I=A.urlinit,w={polygonHierarchy:void 0,height:0,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,perPositionHeight:!1,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.RED};$.ajax({url:I,type:"get",async:!1,dataType:"json",success:function(B){E.datas=B.features}});var Q=new IA(this._viewer,this._cesium,v);this._Provider=Q,Q._loadTile=function(B){var T=[];E.Legend=[];var D=new E._cesium.PrimitiveCollection,F=[],L=[],R=new Cesium.PrimitiveCollection;return B.features.forEach(function(k){var U=[];function V(oe){for(var ne=0;ne<oe.length;ne++)Array.isArray(oe[ne])?(oe[ne].length==3&&oe[ne].splice(2,1),oe[ne].push(E._option.height),V(oe[ne])):U.push(oe[ne])}var H=k.id,q=parseInt(H.split(".")[1])-1;if(k=E.datas[q],Array.isArray(k.geometry.coordinates)&&k.geometry.coordinates.length>0&&Array.isArray(k.geometry.coordinates[0][0][0]))for(var ie=0;ie<k.geometry.coordinates[0].length;ie++)U=[],V(k.geometry.coordinates[0][ie]),Z(U);function Z(oe){if(/^\[/.test(E._option.extrudedHeight)&&/\]$/.test(E._option.extrudedHeight)){var ne=E._option.extrudedHeight.replace(/\[/,"").replace(/\]/,"");w.extrudedHeight=parseFloat(k.properties[ne])}if(w.material=E._option.material,/^\[/.test(E._option.material)&&/\]$/.test(E._option.material)){var se=E._option.material.replace(/\[/,"").replace(/\]/,"");w.material=k.properties[se],E._core.isHtmlColor(w.material)?w.material=E._color.colorFromHtmlColor(w.material):(/^rgb/.test(w.material)&&(w.material=E._color.rgbaStringToRgbaObj(w.material)),w.material.red>1&&(w.material.red=w.material.red/255),w.material.green>1&&(w.material.green=w.material.green/255),w.material.blue>1&&(w.material.blue=w.material.blue/255),w.material.alpha>1&&(w.material.a=w.material.alpha/255),w.material=E._color.createColor(w.material.red,w.material.green,w.material.blue,w.material.alpha))}else E._option.material&&(w.material=E._option.material),w.material&&(E._core.isHtmlColor(w.material)?w.material=E._color.colorFromHtmlColor(w.material):(/^rgb/.test(w.material)&&(w.material=E._color.rgbaStringToRgbaObj(w.material)),w.material.red>1&&(w.material.red=w.material.red/255),w.material.green>1&&(w.material.green=w.material.green/255),w.material.blue>1&&(w.material.blue=w.material.blue/255),w.material.alpha>1&&(w.material.a=w.material.alpha/255),w.material=E._color.createColor(w.material.red,w.material.green,w.material.blue,w.material.alpha)));var ce=E._cesium.Cartesian3.fromDegreesArrayHeights(oe);w.polygonHierarchy=new E._cesium.PolygonHierarchy(ce);var j=new E._cesium.PolygonGeometry(w),de=new Cesium.GeometryInstance({id:k,geometry:j,attributes:{color:new E._cesium.ColorGeometryInstanceAttribute.fromColor(E._option.randomColor?Cesium.Color.fromRandom().withAlpha(w.material.alpha):w.material)}});F.push(de);var me={positions:ce,width:E._option.width},_e=new E._cesium.GroundPolylineGeometry(me),Be=new E._cesium.GeometryInstance({geometry:_e});L.push(Be);var Qe="material:"+w.material.red*255+","+w.material.green*255+","+w.material.blue*255;E.Legend.push(Qe)}}),F.length>0&&(w.extrudedHeight?R.add(new E._cesium.Primitive({geometryInstances:F,appearance:new E._cesium.PerInstanceColorAppearance({translucent:!1,vertexShaderSource:E._core.Shaders("vertexShaderSource"),fragmentShaderSource:E._core.Shaders("fragmentShaderSource")})})):R.add(new E._cesium.GroundPrimitive({geometryInstances:F,appearance:new E._cesium.PerInstanceColorAppearance({translucent:!0,vertexShaderSource:E._core.Shaders("vertexShaderSource")})}))),L.length>0&&R.add(new E._cesium.GroundPolylinePrimitive({geometryInstances:L,appearance:new E._cesium.PolylineMaterialAppearance({material:new E._cesium.Material({fabric:{type:"Color",uniforms:{color:E._option.outlineColor}}})}),shadows:E._cesium.ShadowMode.ENABLED})),R},this.item=Q._primitiveCollection,Q.addTo(this._viewer),C||this.setVisibility(!1),this._core.isnull(w.id)&&(w.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+w.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var M={id:w.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f};return this.setTreeobj(M),this._tree.insertGroupId(M,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Qp.prototype.setTreeobj=function(o){this.treeobj=o};Qp.prototype.createPolygonVectorFeatureLayerProvider=function(o,A,f,m,C){var y={polygonHierarchy:void 0,height:0,extrudedHeight:0,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,perPositionHeight:!0,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.WHITE,show:!0},x={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a))));var v=this._core.extend(y,f,!0),E=this,I=new IA(this._viewer,this._cesium,x);this._Provider=I,I._loadTile=function(Q){var M=[];E.Legend=[],Q.features.forEach(function(T){var D=[];function F(q){for(var ie=0;ie<q.length;ie++)Array.isArray(q[ie])?F(q[ie]):D.push(q[ie])}F(T.geometry.coordinates[0]);var L=E._cesium.Cartesian3.fromDegreesArray(D);if(/^\[/.test(f.extrudedHeight)&&/\]$/.test(f.extrudedHeight)){var R=f.extrudedHeight.replace(/\[/,"").replace(/\]/,"");v.extrudedHeight=parseFloat(T.properties[R])}v.polygonHierarchy=new E._cesium.PolygonHierarchy(L);var k=new E._cesium.PolygonGeometry(v),U=E._cesium.PolygonGeometry.createGeometry(k),V="material:"+v.material.red*255+","+v.material.green*255+","+v.material.blue*255;E.Legend.push(V);var H=new E._cesium.GeometryInstance({geometry:U,attributes:{color:new E._cesium.ColorGeometryInstanceAttribute.fromColor(v.material)},shadows:E._cesium.ShadowMode.ENABLED});M.push(H)});var B=new this._cesium.Primitive({allowPicking:!1,appearance:new this._cesium.PerInstanceColorAppearance({translucent:!1,flat:!0,faceForward:!0,closed:!0}),geometryInstances:M});return B},this.item=I._primitiveCollection,I.addTo(this._viewer),this._core.isnull(v.id)&&(v.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+v.id);var w={id:v.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f};this.setTreeobj(w),this._tree.insertGroupId(w,this._core.isnull(m)?0:m),typeof C=="function"&&C(this.item)};Qp.prototype.createPolygonVectorMonomerFeatureLayerProvider=function(o,A,f,m,C){var y={polygonHierarchy:void 0,height:0,extrudedHeight:0,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,perPositionHeight:!0,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.WHITE,show:!0},x={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a))));var v=this._core.extend(y,f,!0),E=new IA(this._viewer,this._cesium,x);this._Provider=E;var I=this;E._loadTile=function(Q){var M=[];Q.features.forEach(function(T){var D=[];function F(V){for(var H=0;H<V.length;H++)Array.isArray(V[H])?F(V[H]):D.push(V[H])}F(T.geometry.coordinates[0]);var L=I._cesium.Cartesian3.fromDegreesArray(D);if(/^\[/.test(f.extrudedHeight)&&/\]$/.test(f.extrudedHeight)){var R=f.extrudedHeight.replace(/\[/,"").replace(/\]/,"");v.extrudedHeight=parseFloat(T.properties[R])}v.polygonHierarchy=new I._cesium.PolygonHierarchy(L);var k=new I._cesium.PolygonGeometry(v),U=new I._cesium.GeometryInstance({geometry:k,attributes:{color:I._cesium.ColorGeometryInstanceAttribute.fromColor(I._cesium.Color.fromCssColorString("#004FFF").withAlpha(.5)),show:new I._cesium.ShowGeometryInstanceAttribute(!0)}});M.push(U)});var B=new I._cesium.GroundPrimitive({classificationType:I._cesium.ClassificationType.BOTH,geometryInstances:M});return B},this.item=E._primitiveCollection,E.addTo(this._viewer),this._core.isnull(v.id)&&(v.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+v.id);var w={id:v.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f};this.setTreeobj(w),this._tree.insertGroupId(w,this._core.isnull(m)?0:m),typeof C=="function"&&C(this.item)};Qp.prototype.getLegend=function(){var o=[];return this.Legend!=null&&(o=this._core.unique(this.Legend)),o};Qp.prototype.export=function(){var o=this.item.show==null?void 0:this.item.show,A=this.treeobj.url;return{type:this.treeobj.type,treeobj:{name:this.treeobj.name,pId:this.treeobj.pId},style:{show:o,url:A}}};var VQ=Qp;var oV={};oV.read=function(o,A,f,m,C){var y,x,v=C*8-m-1,E=(1<<v)-1,I=E>>1,w=-7,Q=f?C-1:0,M=f?-1:1,B=o[A+Q];for(Q+=M,y=B&(1<<-w)-1,B>>=-w,w+=v;w>0;y=y*256+o[A+Q],Q+=M,w-=8);for(x=y&(1<<-w)-1,y>>=-w,w+=m;w>0;x=x*256+o[A+Q],Q+=M,w-=8);if(y===0)y=1-I;else{if(y===E)return x?NaN:(B?-1:1)*(1/0);x=x+Math.pow(2,m),y=y-I}return(B?-1:1)*x*Math.pow(2,y-m)};oV.write=function(o,A,f,m,C,y){var x,v,E,I=y*8-C-1,w=(1<<I)-1,Q=w>>1,M=C===23?Math.pow(2,-24)-Math.pow(2,-77):0,B=m?0:y-1,T=m?1:-1,D=A<0||A===0&&1/A<0?1:0;for(A=Math.abs(A),isNaN(A)||A===1/0?(v=isNaN(A)?1:0,x=w):(x=Math.floor(Math.log(A)/Math.LN2),A*(E=Math.pow(2,-x))<1&&(x--,E*=2),x+Q>=1?A+=M/E:A+=M*Math.pow(2,1-Q),A*E>=2&&(x++,E/=2),x+Q>=w?(v=0,x=w):x+Q>=1?(v=(A*E-1)*Math.pow(2,C),x=x+Q):(v=A*Math.pow(2,Q-1)*Math.pow(2,C),x=0));C>=8;o[f+B]=v&255,B+=T,v/=256,C-=8);for(x=x<<C|v,I+=C;I>0;o[f+B]=x&255,B+=T,x/=256,I-=8);o[f+B-T]|=D*128};function A0(o){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(o)?o:new Uint8Array(o||0),this.pos=0,this.type=0,this.length=this.buf.length}A0.Varint=0;A0.Fixed64=1;A0.Bytes=2;A0.Fixed32=5;var VMe=(1<<16)*(1<<16),odt=1/VMe;A0.prototype={destroy:function(){this.buf=null},readFields:function(o,A,f){for(f=f||this.length;this.pos<f;){var m=this.readVarint(),C=m>>3,y=this.pos;this.type=m&7,o(C,A,this),this.pos===y&&this.skip(m)}return A},readMessage:function(o,A){return this.readFields(o,A,this.readVarint()+this.pos)},readFixed32:function(){var o=gle(this.buf,this.pos);return this.pos+=4,o},readSFixed32:function(){var o=sdt(this.buf,this.pos);return this.pos+=4,o},readFixed64:function(){var o=gle(this.buf,this.pos)+gle(this.buf,this.pos+4)*VMe;return this.pos+=8,o},readSFixed64:function(){var o=gle(this.buf,this.pos)+sdt(this.buf,this.pos+4)*VMe;return this.pos+=8,o},readFloat:function(){var o=oV.read(this.buf,this.pos,!0,23,4);return this.pos+=4,o},readDouble:function(){var o=oV.read(this.buf,this.pos,!0,52,8);return this.pos+=8,o},readVarint:function(o){var A=this.buf,f,m;return m=A[this.pos++],f=m&127,m<128||(m=A[this.pos++],f|=(m&127)<<7,m<128)||(m=A[this.pos++],f|=(m&127)<<14,m<128)||(m=A[this.pos++],f|=(m&127)<<21,m<128)?f:(m=A[this.pos],f|=(m&15)<<28,mNi(f,o,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var o=this.readVarint();return o%2===1?(o+1)/-2:o/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var o=this.readVarint()+this.pos,A=DNi(this.buf,this.pos,o);return this.pos=o,A},readBytes:function(){var o=this.readVarint()+this.pos,A=this.buf.subarray(this.pos,o);return this.pos=o,A},readPackedVarint:function(o,A){var f=JP(this);for(o=o||[];this.pos<f;)o.push(this.readVarint(A));return o},readPackedSVarint:function(o){var A=JP(this);for(o=o||[];this.pos<A;)o.push(this.readSVarint());return o},readPackedBoolean:function(o){var A=JP(this);for(o=o||[];this.pos<A;)o.push(this.readBoolean());return o},readPackedFloat:function(o){var A=JP(this);for(o=o||[];this.pos<A;)o.push(this.readFloat());return o},readPackedDouble:function(o){var A=JP(this);for(o=o||[];this.pos<A;)o.push(this.readDouble());return o},readPackedFixed32:function(o){var A=JP(this);for(o=o||[];this.pos<A;)o.push(this.readFixed32());return o},readPackedSFixed32:function(o){var A=JP(this);for(o=o||[];this.pos<A;)o.push(this.readSFixed32());return o},readPackedFixed64:function(o){var A=JP(this);for(o=o||[];this.pos<A;)o.push(this.readFixed64());return o},readPackedSFixed64:function(o){var A=JP(this);for(o=o||[];this.pos<A;)o.push(this.readSFixed64());return o},skip:function(o){var A=o&7;if(A===A0.Varint)for(;this.buf[this.pos++]>127;);else if(A===A0.Bytes)this.pos=this.readVarint()+this.pos;else if(A===A0.Fixed32)this.pos+=4;else if(A===A0.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+A)},writeTag:function(o,A){this.writeVarint(o<<3|A)},realloc:function(o){for(var A=this.length||16;A<this.pos+o;)A*=2;if(A!==this.length){var f=new Uint8Array(A);f.set(this.buf),this.buf=f,this.length=A}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(o){this.realloc(4),nV(this.buf,o,this.pos),this.pos+=4},writeSFixed32:function(o){this.realloc(4),nV(this.buf,o,this.pos),this.pos+=4},writeFixed64:function(o){this.realloc(8),nV(this.buf,o&-1,this.pos),nV(this.buf,Math.floor(o*odt),this.pos+4),this.pos+=8},writeSFixed64:function(o){this.realloc(8),nV(this.buf,o&-1,this.pos),nV(this.buf,Math.floor(o*odt),this.pos+4),this.pos+=8},writeVarint:function(o){if(o=+o||0,o>268435455||o<0){CNi(o,this);return}this.realloc(4),this.buf[this.pos++]=o&127|(o>127?128:0),!(o<=127)&&(this.buf[this.pos++]=(o>>>=7)&127|(o>127?128:0),!(o<=127)&&(this.buf[this.pos++]=(o>>>=7)&127|(o>127?128:0),!(o<=127)&&(this.buf[this.pos++]=o>>>7&127)))},writeSVarint:function(o){this.writeVarint(o<0?-o*2-1:o*2)},writeBoolean:function(o){this.writeVarint(Boolean(o))},writeString:function(o){o=String(o),this.realloc(o.length*4),this.pos++;var A=this.pos;this.pos=TNi(this.buf,o,this.pos);var f=this.pos-A;f>=128&&adt(A,f,this),this.pos=A-1,this.writeVarint(f),this.pos+=f},writeFloat:function(o){this.realloc(4),oV.write(this.buf,o,this.pos,!0,23,4),this.pos+=4},writeDouble:function(o){this.realloc(8),oV.write(this.buf,o,this.pos,!0,52,8),this.pos+=8},writeBytes:function(o){var A=o.length;this.writeVarint(A),this.realloc(A);for(var f=0;f<A;f++)this.buf[this.pos++]=o[f]},writeRawMessage:function(o,A){this.pos++;var f=this.pos;o(A,this);var m=this.pos-f;m>=128&&adt(f,m,this),this.pos=f-1,this.writeVarint(m),this.pos+=m},writeMessage:function(o,A,f){this.writeTag(o,A0.Bytes),this.writeRawMessage(A,f)},writePackedVarint:function(o,A){this.writeMessage(o,vNi,A)},writePackedSVarint:function(o,A){this.writeMessage(o,ENi,A)},writePackedBoolean:function(o,A){this.writeMessage(o,BNi,A)},writePackedFloat:function(o,A){this.writeMessage(o,INi,A)},writePackedDouble:function(o,A){this.writeMessage(o,_Ni,A)},writePackedFixed32:function(o,A){this.writeMessage(o,wNi,A)},writePackedSFixed32:function(o,A){this.writeMessage(o,bNi,A)},writePackedFixed64:function(o,A){this.writeMessage(o,QNi,A)},writePackedSFixed64:function(o,A){this.writeMessage(o,SNi,A)},writeBytesField:function(o,A){this.writeTag(o,A0.Bytes),this.writeBytes(A)},writeFixed32Field:function(o,A){this.writeTag(o,A0.Fixed32),this.writeFixed32(A)},writeSFixed32Field:function(o,A){this.writeTag(o,A0.Fixed32),this.writeSFixed32(A)},writeFixed64Field:function(o,A){this.writeTag(o,A0.Fixed64),this.writeFixed64(A)},writeSFixed64Field:function(o,A){this.writeTag(o,A0.Fixed64),this.writeSFixed64(A)},writeVarintField:function(o,A){this.writeTag(o,A0.Varint),this.writeVarint(A)},writeSVarintField:function(o,A){this.writeTag(o,A0.Varint),this.writeSVarint(A)},writeStringField:function(o,A){this.writeTag(o,A0.Bytes),this.writeString(A)},writeFloatField:function(o,A){this.writeTag(o,A0.Fixed32),this.writeFloat(A)},writeDoubleField:function(o,A){this.writeTag(o,A0.Fixed64),this.writeDouble(A)},writeBooleanField:function(o,A){this.writeVarintField(o,Boolean(A))}};function mNi(o,A,f){var m=f.buf,C,y;if(y=m[f.pos++],C=(y&112)>>4,y<128||(y=m[f.pos++],C|=(y&127)<<3,y<128)||(y=m[f.pos++],C|=(y&127)<<10,y<128)||(y=m[f.pos++],C|=(y&127)<<17,y<128)||(y=m[f.pos++],C|=(y&127)<<24,y<128)||(y=m[f.pos++],C|=(y&1)<<31,y<128))return rV(o,C,A);throw new Error("Expected varint not more than 10 bytes")}function JP(o){return o.type===A0.Bytes?o.readVarint()+o.pos:o.pos+1}function rV(o,A,f){return f?A*4294967296+(o>>>0):(A>>>0)*4294967296+(o>>>0)}function CNi(o,A){var f,m;if(o>=0?(f=o%4294967296|0,m=o/4294967296|0):(f=~(-o%4294967296),m=~(-o/4294967296),f^4294967295?f=f+1|0:(f=0,m=m+1|0)),o>=18446744073709552e3||o<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");A.realloc(10),yNi(f,m,A),xNi(m,A)}function yNi(o,A,f){f.buf[f.pos++]=o&127|128,o>>>=7,f.buf[f.pos++]=o&127|128,o>>>=7,f.buf[f.pos++]=o&127|128,o>>>=7,f.buf[f.pos++]=o&127|128,o>>>=7,f.buf[f.pos]=o&127}function xNi(o,A){var f=(o&7)<<4;A.buf[A.pos++]|=f|((o>>>=3)?128:0),o&&(A.buf[A.pos++]=o&127|((o>>>=7)?128:0),o&&(A.buf[A.pos++]=o&127|((o>>>=7)?128:0),o&&(A.buf[A.pos++]=o&127|((o>>>=7)?128:0),o&&(A.buf[A.pos++]=o&127|((o>>>=7)?128:0),o&&(A.buf[A.pos++]=o&127)))))}function adt(o,A,f){var m=A<=16383?1:A<=2097151?2:A<=268435455?3:Math.ceil(Math.log(A)/(Math.LN2*7));f.realloc(m);for(var C=f.pos-1;C>=o;C--)f.buf[C+m]=f.buf[C]}function vNi(o,A){for(var f=0;f<o.length;f++)A.writeVarint(o[f])}function ENi(o,A){for(var f=0;f<o.length;f++)A.writeSVarint(o[f])}function INi(o,A){for(var f=0;f<o.length;f++)A.writeFloat(o[f])}function _Ni(o,A){for(var f=0;f<o.length;f++)A.writeDouble(o[f])}function BNi(o,A){for(var f=0;f<o.length;f++)A.writeBoolean(o[f])}function wNi(o,A){for(var f=0;f<o.length;f++)A.writeFixed32(o[f])}function bNi(o,A){for(var f=0;f<o.length;f++)A.writeSFixed32(o[f])}function QNi(o,A){for(var f=0;f<o.length;f++)A.writeFixed64(o[f])}function SNi(o,A){for(var f=0;f<o.length;f++)A.writeSFixed64(o[f])}function gle(o,A){return(o[A]|o[A+1]<<8|o[A+2]<<16)+o[A+3]*16777216}function nV(o,A,f){o[f]=A,o[f+1]=A>>>8,o[f+2]=A>>>16,o[f+3]=A>>>24}function sdt(o,A){return(o[A]|o[A+1]<<8|o[A+2]<<16)+(o[A+3]<<24)}function DNi(o,A,f){for(var m="",C=A;C<f;){var y=o[C],x=null,v=y>239?4:y>223?3:y>191?2:1;if(C+v>f)break;var E,I,w;v===1?y<128&&(x=y):v===2?(E=o[C+1],(E&192)===128&&(x=(y&31)<<6|E&63,x<=127&&(x=null))):v===3?(E=o[C+1],I=o[C+2],(E&192)===128&&(I&192)===128&&(x=(y&15)<<12|(E&63)<<6|I&63,(x<=2047||x>=55296&&x<=57343)&&(x=null))):v===4&&(E=o[C+1],I=o[C+2],w=o[C+3],(E&192)===128&&(I&192)===128&&(w&192)===128&&(x=(y&15)<<18|(E&63)<<12|(I&63)<<6|w&63,(x<=65535||x>=1114112)&&(x=null))),x===null?(x=65533,v=1):x>65535&&(x-=65536,m+=String.fromCharCode(x>>>10&1023|55296),x=56320|x&1023),m+=String.fromCharCode(x),C+=v}return m}function TNi(o,A,f){for(var m=0,C,y;m<A.length;m++){if(C=A.charCodeAt(m),C>55295&&C<57344)if(y)if(C<56320){o[f++]=239,o[f++]=191,o[f++]=189,y=C;continue}else C=y-55296<<10|C-56320|65536,y=null;else{C>56319||m+1===A.length?(o[f++]=239,o[f++]=191,o[f++]=189):y=C;continue}else y&&(o[f++]=239,o[f++]=191,o[f++]=189,y=null);C<128?o[f++]=C:(C<2048?o[f++]=C>>6|192:(C<65536?o[f++]=C>>12|224:(o[f++]=C>>18|240,o[f++]=C>>12&63|128),o[f++]=C>>6&63|128),o[f++]=C&63|128)}return f}var zMe=A0;function aV(o,A){this.x=o,this.y=A}aV.prototype={clone:function(){return new aV(this.x,this.y)},add:function(o){return this.clone()._add(o)},sub:function(o){return this.clone()._sub(o)},multByPoint:function(o){return this.clone()._multByPoint(o)},divByPoint:function(o){return this.clone()._divByPoint(o)},mult:function(o){return this.clone()._mult(o)},div:function(o){return this.clone()._div(o)},rotate:function(o){return this.clone()._rotate(o)},rotateAround:function(o,A){return this.clone()._rotateAround(o,A)},matMult:function(o){return this.clone()._matMult(o)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(o){return this.x===o.x&&this.y===o.y},dist:function(o){return Math.sqrt(this.distSqr(o))},distSqr:function(o){var A=o.x-this.x,f=o.y-this.y;return A*A+f*f},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(o){return Math.atan2(this.y-o.y,this.x-o.x)},angleWith:function(o){return this.angleWithSep(o.x,o.y)},angleWithSep:function(o,A){return Math.atan2(this.x*A-this.y*o,this.x*o+this.y*A)},_matMult:function(o){var A=o[0]*this.x+o[1]*this.y,f=o[2]*this.x+o[3]*this.y;return this.x=A,this.y=f,this},_add:function(o){return this.x+=o.x,this.y+=o.y,this},_sub:function(o){return this.x-=o.x,this.y-=o.y,this},_mult:function(o){return this.x*=o,this.y*=o,this},_div:function(o){return this.x/=o,this.y/=o,this},_multByPoint:function(o){return this.x*=o.x,this.y*=o.y,this},_divByPoint:function(o){return this.x/=o.x,this.y/=o.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var o=this.y;return this.y=this.x,this.x=-o,this},_rotate:function(o){var A=Math.cos(o),f=Math.sin(o),m=A*this.x-f*this.y,C=f*this.x+A*this.y;return this.x=m,this.y=C,this},_rotateAround:function(o,A){var f=Math.cos(o),m=Math.sin(o),C=A.x+f*(this.x-A.x)-m*(this.y-A.y),y=A.y+m*(this.x-A.x)+f*(this.y-A.y);return this.x=C,this.y=y,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}};aV.convert=function(o){return o instanceof aV?o:Array.isArray(o)?new aV(o[0],o[1]):o};function sV(o,A,f,m,C){this.properties={},this.extent=f,this.type=0,this._pbf=o,this._geometry=-1,this._keys=m,this._values=C,o.readFields(MNi,this,A)}function MNi(o,A,f){o==1?A.id=f.readVarint():o==2?PNi(f,A):o==3?A.type=f.readVarint():o==4&&(A._geometry=f.pos)}function PNi(o,A){for(var f=o.readVarint()+o.pos;o.pos<f;){var m=A._keys[o.readVarint()],C=A._values[o.readVarint()];A.properties[m]=C}}sV.types=["Unknown","Point","LineString","Polygon"];sV.prototype.loadGeometry=function(){var o=this._pbf;o.pos=this._geometry;for(var A=o.readVarint()+o.pos,f=1,m=0,C=0,y=0,x=[],v;o.pos<A;){if(m<=0){var E=o.readVarint();f=E&7,m=E>>3}if(m--,f===1||f===2)C+=o.readSVarint(),y+=o.readSVarint(),f===1&&(v&&x.push(v),v=[]),v.push(new aV(C,y));else if(f===7)v&&v.push(v[0].clone());else throw new Error("unknown command "+f)}return v&&x.push(v),x};sV.prototype.bbox=function(){var o=this._pbf;o.pos=this._geometry;for(var A=o.readVarint()+o.pos,f=1,m=0,C=0,y=0,x=1/0,v=-1/0,E=1/0,I=-1/0;o.pos<A;){if(m<=0){var w=o.readVarint();f=w&7,m=w>>3}if(m--,f===1||f===2)C+=o.readSVarint(),y+=o.readSVarint(),C<x&&(x=C),C>v&&(v=C),y<E&&(E=y),y>I&&(I=y);else if(f!==7)throw new Error("unknown command "+f)}return[x,E,v,I]};sV.prototype.toGeoJSON=function(o,A,f,m){var C=this.extent*Math.pow(2,f),y=this.extent*o,x=this.extent*A/2,v=this.loadGeometry(),E=sV.types[this.type],I,w;function Q(T){for(var D=0;D<T.length;D++){var F=T[D],L=90-(F.y+x)*180/(C/2);T[D]=[(F.x+y)*360/C-180,L]}}switch(this.type){case 1:var M=[];for(I=0;I<v.length;I++)M[I]=v[I][0];v=M,Q(v);break;case 2:for(I=0;I<v.length;I++)Q(v[I]);break;case 3:for(v=RNi(v),I=0;I<v.length;I++)for(w=0;w<v[I].length;w++)Q(v[I][w]);break}v.length===1?v=v[0]:E="Multi"+E;var B={type:"Feature",geometry:{type:E,coordinates:v},properties:this.properties};return"id"in this&&(B.id=this.id),B};function RNi(o){var A=o.length;if(A<=1)return[o];for(var f=[],m,C,y=0;y<A;y++){var x=LNi(o[y]);x!==0&&(C===void 0&&(C=x<0),C===x<0?(m&&f.push(m),m=[o[y]]):m.push(o[y]))}return m&&f.push(m),f}function LNi(o){for(var A=0,f=0,m=o.length,C=m-1,y,x;f<m;C=f++)y=o[f],x=o[C],A+=(x.x-y.x)*(y.y+x.y);return A}function ldt(o,A){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=o,this._keys=[],this._values=[],this._features=[],o.readFields(FNi,this,A),this.length=this._features.length}function FNi(o,A,f){o===15?A.version=f.readVarint():o===1?A.name=f.readString():o===5?A.extent=f.readVarint():o===2?A._features.push(f.pos):o===3?A._keys.push(f.readString()):o===4&&A._values.push(NNi(f))}function NNi(o){for(var A=null,f=o.readVarint()+o.pos;o.pos<f;){var m=o.readVarint()>>3;A=m===1?o.readString():m===2?o.readFloat():m===3?o.readDouble():m===4?o.readVarint64():m===5?o.readVarint():m===6?o.readSVarint():m===7?o.readBoolean():null}return A}ldt.prototype.feature=function(o){if(o<0||o>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[o];var A=this._pbf.readVarint()+this._pbf.pos;return new sV(this._pbf,A,this.extent,this._keys,this._values)};function kNi(o,A){this.layers=o.readFields(ONi,{},A)}function ONi(o,A,f){if(o===3){var m=new ldt(f,f.readVarint()+f.pos);m.length&&(A[m.name]=m)}}var KMe=kNi;function Bw(o,A){this._viewer=o,this._cesium=A,this._core=new pr(o,A),this._color=new Pn(this._viewer,this._cesium),this._tree=lt,this.item={show:!0},this._option=void 0,this._primitive=void 0,this._Provider=void 0,this.labelCollections=new this._cesium.PointPrimitiveCollection,this.geometries_line=[],this.geometries_polygon=[]}var UNi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o};Bw.prototype._serialize=function(o){var A=[],f=window.encodeURIComponent;for(var m in o){var C=o[m];(typeof C>"u"?"undefined":UNi(C))==="object"?A.push(f(m)+"="+f(JSON.stringify(C))):A.push(f(m)+"="+f(o[m]))}return A.join("&")};Bw.prototype.createVolumeVectorGeoJsonFeatureLayer=function(o,A,f,m,C){var y={show:!0,positions:[],shape:void 0,cornerType:this._cesium.CornerType.ROUNDED,granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.DISABLED,level_max:20,level_min:10},x={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};this.extent={XMin:A.minx||0,YMin:A.miny||0,XMax:A.maxx||0,YMax:A.maxy||0},!this._core.isnull(f)&&!this._core.isnull(f.fill)&&(f.fill.toString().charAt(0)=="["&&f.fill.toString().charAt(f.fill.length-1)=="]"||(this._core.isHtmlColor(f.fill)?f.fill=this._color.colorFromHtmlColor(f.fill):(/^rgb/.test(f.fill)&&(f.fill=this._color.rgbaStringToRgbaObj(f.fill)),f.fill.r>1&&(f.fill.r=f.fill.r/255),f.fill.g>1&&(f.fill.g=f.fill.g/255),f.fill.b>1&&(f.fill.b=f.fill.b/255),f.fill.a>1&&(f.fill.a=f.fill.a/255),f.fill=this._color.createColor(f.fill.r,f.fill.g,f.fill.b,f.fill.a)))),!this._core.isnull(f)&&!this._core.isnull(f.polylinefill)&&(f.polylinefill.toString().charAt(0)=="["&&f.polylinefill.toString().charAt(f.polylinefill.length-1)=="]"||(this._core.isHtmlColor(f.polylinefill)?f.polylinefill=this._color.colorFromHtmlColor(f.polylinefill):(/^rgb/.test(f.polylinefill)&&(f.polylinefill=this._color.rgbaStringToRgbaObj(f.polylinefill)),f.polylinefill.r>1&&(f.polylinefill.r=f.polylinefill.r/255),f.polylinefill.g>1&&(f.polylinefill.g=f.polylinefill.g/255),f.polylinefill.b>1&&(f.polylinefill.b=f.polylinefill.b/255),f.polylinefill.a>1&&(f.polylinefill.a=f.polylinefill.a/255),f.polylinefill=this._color.createColor(f.polylinefill.r,f.polylinefill.g,f.polylinefill.b,f.polylinefill.a)))),!this._core.isnull(f)&&!this._core.isnull(f.outlineColor)&&(f.outlineColor.toString().charAt(0)=="["&&f.outlineColor.toString().charAt(f.outlineColor.length-1)=="]"||(this._core.isHtmlColor(f.outlineColor)?f.outlineColor=this._color.colorFromHtmlColor(f.outlineColor):(/^rgb/.test(f.outlineColor)&&(f.outlineColor=this._color.rgbaStringToRgbaObj(f.outlineColor)),f.outlineColor.r>1&&(f.outlineColor.r=f.outlineColor.r/255),f.outlineColor.g>1&&(f.outlineColor.g=f.outlineColor.g/255),f.outlineColor.b>1&&(f.outlineColor.b=f.outlineColor.b/255),f.outlineColor.a>1&&(f.outlineColor.a=f.outlineColor.a/255),f.outlineColor=this._color.createColor(f.outlineColor.r,f.outlineColor.g,f.outlineColor.b,f.outlineColor.a)))),this._option=this._core.extend(y,f,!0),A==null&&console.log("url is required"),o==null&&console.log("layername is required");var v=this,E={polygonHierarchy:void 0,height:30,extrudedHeight:100,vertexFormat:Cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:Cesium.Ellipsoid.WGS84,perPositionHeight:!0,closeTop:!0,closeBottom:!0,arcType:Cesium.ArcType.GEODESIC,material:Cesium.Color.WHITE},I="http://124.128.48.210:81/arcgis/rest/services/Hosted/tdtsd0408/VectorTileServer/resources/styles/root.json";v._core.xhr({url:I,type:"get",dataType:"json",success:function(w){var Q=[],M=w.layers,B="http://124.128.48.210:81/arcgis/rest/services/Hosted/tdtsd0408/VectorTileServer/tile/0/0/0.pbf";Cesium.Resource.createIfNeeded(B).fetchArrayBuffer().then(function(T){function D(te){for(var Y=0;Y<te.length;Y++)Array.isArray(te[Y])?D(te[Y]):Q.push(te[Y])}function F(te){var Y=Cesium.Cartesian3.fromDegreesArray(te),he={positions:Y,width:10,color:Cesium.ColorGeometryInstanceAttribute.fromColor(v._option.polylinefill)},fe=new Cesium.PolylineGeometry(he),Ce=new Cesium.GeometryInstance({geometry:fe});V.push(Ce)}function L(te){var Y=new Cesium.PolygonGeometry({polygonHierarchy:new Cesium.PolygonHierarchy(Cesium.Cartesian3.fromDegreesArray(te))}),he=Cesium.PolygonGeometry.createGeometry(Y),fe=new Cesium.GeometryInstance({geometry:he,attributes:{color:W}});H.push(fe)}var R=new zMe(T),k=0,U=new KMe(R),V=[],H=[];v.labelCollections=new v._cesium.LabelCollection;for(var q in U.layers)for(var ie=U.layers[q],Z=0;Z<ie.length;Z++)for(var oe=ie.feature(Z),ne=oe.loadGeometry(),se=0;se<ne.length;se++)for(var ce=ne[se],j=0;j<ce.length;j++){var de=ce[j],me=null;if(oe.properties._symbol!=null)for(var _e=oe.properties._symbol,Be=0;Be<M.length;Be++)M[Be].filter!=null&&M[Be].filter[0]=="=="&&M[Be].filter[1]=="_symbol"&&M[Be].filter[2]==_e&&(me=M[Be]);else if(ie.name!=null)for(var Qe=ie.name,Be=0;Be<M.length;Be++)M[Be]["source-layer"]!=null&&M[Be]["source-layer"]==Qe&&(me=M[Be]);if(oe.type==1)try{var Ie=oe.toGeoJSON(0,0,0,v.extent);if(f.text!=null&&/^\[/.test(f.text)&&/\]$/.test(f.text)){var ve=f.text.replace(/\[/,"").replace(/\]/,"");v._option.text=oe.properties[ve]}me.paint!=null&&me.paint["icon-color"]&&(v._option.fill=v._color.createColorTransformation(me.paint["icon-color"])),v._option.position=new v._cesium.Cartesian3.fromDegrees(Ie.geometry.coordinates[0],Ie.geometry.coordinates[1],v._option.height);var K={};Ie.geometry.type=="point"?K={id:Ie,color:v._option.fill,position:v._option.position}:K=v._option,v.labelCollections.add(K)}catch{}if(oe.type==2){var de=ce[0],Ie=oe.toGeoJSON(0,0,0,v.extent);if(!v._core.isnull(f.polylinefill)&&me.paint!=null&&me.paint["icon-color"]&&(v._option.polylinefill=v._color.createColorTransformation(me.paint["icon-color"])),Array.isArray(Ie.geometry.coordinates)&&Ie.geometry.coordinates.length>0)if(Array.isArray(Ie.geometry.coordinates[0][0]))for(var se=0;se<Ie.geometry.coordinates.length;se++)Q=[],D(Ie.geometry.coordinates[se]),F(Q);else D(Ie.geometry.coordinates),F(Q)}if(oe.type==3)try{var de=ce[0],Ie=oe.toGeoJSON(0,0,0,v.extent),W=Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.AQUA);if(me.paint["fill-color"]!=null&&(W=Cesium.ColorGeometryInstanceAttribute.fromColor(v._color.createColorTransformation(me.paint["fill-color"]))),Array.isArray(Ie.geometry.coordinates)&&Ie.geometry.coordinates.length>0)if(Array.isArray(Ie.geometry.coordinates[0][0]))for(var se=0;se<Ie.geometry.coordinates.length;se++)Q=[],D(Ie.geometry.coordinates[se]),L(Q);else D(Ie.geometry.coordinates),L(Q)}catch{}}v.labelCollections.length>0&&v._viewer.scene.primitives.add(v.labelCollections),V.length>0&&v._viewer.scene.primitives.add(new Cesium.Primitive({geometryInstances:V,appearance:new Cesium.PolylineColorAppearance})),H.length>0&&v._viewer.scene.primitives.add(new Cesium.Primitive({geometryInstances:H,appearance:new v._cesium.MaterialAppearance({material:new Cesium.Material({fabric:{type:"Color",uniforms:{color:Cesium.Color.fromRandom({alpha:1})}}}),faceForward:!0,flat:!1}),shadows:Cesium.ShadowMode.ENABLED}))})}})};Bw.prototype.createVolumeVectorGeoJsonFeatureLayers=function(o,A,f,m,C){var y={show:!0,positions:[],shape:void 0,cornerType:this._cesium.CornerType.ROUNDED,granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.DISABLED,level_max:20,level_min:10},x={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};this.extent={XMin:A.minx||0,YMin:A.miny||0,XMax:A.maxx||0,YMax:A.maxy||0},!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a)))),this._option=this._core.extend(y,f,!0),A==null&&console.log("url is required"),o==null&&console.log("layername is required");var v=[],E={polygonHierarchy:void 0,height:0,extrudedHeight:100,vertexFormat:Cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:Cesium.Ellipsoid.WGS84,perPositionHeight:!0,closeTop:!0,closeBottom:!0,arcType:Cesium.ArcType.GEODESIC,material:Cesium.Color.WHITE},I=this;this._urlTemplate=A.url+"?"+this._serialize(x.urlParams),this._Provider=new Ts(this._viewer,this._cesium),this._Provider._normalTile=styleOption.level_max-1,this._Provider.loadTile=function(M,B){if(this.tile=B,B.state===Cesium.QuadtreeTileLoadState.START&&I.item.show)if(B.data={lines:[],geometryPrimitive:void 0},B.level>=f.level_min&&B.level<f.level_max){var T=Vi.filter(v,function(D){return D.x==B.x&&D.y==B.y&&D.level==B.level});if(T.length!=0&&T[0].data&&T[0].data.length>0){B.data.geometryPrimitive=new Cesium.Primitive({geometryInstances:T[0].data,appearance:new Cesium.PerInstanceColorAppearance({flat:!0,translucent:!0,faceForward:!0,closed:!0}),shadows:Cesium.ShadowMode.ENABLED}),B.state=Cesium.QuadtreeTileLoadState.LOADING,B.state===Cesium.QuadtreeTileLoadState.LOADING&&(B.data.geometryPrimitive&&B.data.geometryPrimitive.update(M,[]),B.state=Cesium.QuadtreeTileLoadState.DONE,B.renderable=!0);return}(function(D){var F="http://124.128.48.210:81/arcgis/rest/services/Hosted/tdtsd0408/VectorTileServer/tile/0/0/0.pbf";Cesium.Resource.createIfNeeded(F).fetchArrayBuffer().then(function(L){var R=new zMe(L),k=new KMe(R);I.labelCollections=new I._cesium.PointPrimitiveCollection;var U=[],V=[];for(var H in k.layers)for(var q=k.layers[H],ie=0;ie<q.length;ie++)for(var Z=q.feature(ie),oe=Z.loadGeometry(),ne=0;ne<oe.length;ne++)for(var se=oe[ne],ce=0;ce<se.length;ce++){var j=se[ce];if(Z.type==1)try{var de=Z.toGeoJSON(0,0,0,I.extent);if(I._option.text!=null&&/^\[/.test(I._option.text)&&/\]$/.test(I._option.text)){var me=I._option.text.replace(/\[/,"").replace(/\]/,"");E.text=Z.properties[me]}E.position=new I._cesium.Cartesian3.fromDegrees(de.geometry.coordinates[0],de.geometry.coordinates[1],E.height);var _e={};de.geometry.type=="point"?_e={id:de,color:E.material,position:E.position}:_e=E,I.labelCollections.add(_e)}catch{}if(Z.type==2)for(var j=se[0],de=Z.toGeoJSON(D.x,D.y,D.level,I.extent),ce=0;ce<de.geometry.coordinates.length;ce++)try{var Be=[];de.geometry.coordinates[ce].forEach(function(he){Be.push(he[0],he[1])});var Qe=new Cesium.PolylineGeometry({positions:Cesium.Cartesian3.fromDegreesArray(Be),width:10}),Ie=Cesium.PolylineGeometry.createGeometry(Qe),ve=new Cesium.GeometryInstance({geometry:Ie});U.push(ve)}catch{}if(Z.type==3)for(var j=se[0],de=Z.toGeoJSON(D.x,D.y,D.level,I.extent),ce=0;ce<de.geometry.coordinates.length;ce++)try{var Be=[];de.geometry.coordinates[ce].forEach(function(Ee){Be.push(Ee[0],Ee[1])});var K=new Cesium.PolygonGeometry({polygonHierarchy:new Cesium.PolygonHierarchy(Cesium.Cartesian3.fromDegreesArray(Be))}),Ie=Cesium.PolygonGeometry.createGeometry(K),ve=new Cesium.GeometryInstance({geometry:Ie});V.push(ve)}catch{}}I.labelCollections.length>0&&I._viewer.scene.primitives.add(I.labelCollections),U.length>0&&I._viewer.scene.primitives.add(new Cesium.Primitive({geometryInstances:U,appearance:new I._cesium.MaterialAppearance({material:new Cesium.Material({fabric:{type:"Color",uniforms:{color:Cesium.Color.fromRandom({alpha:1})}}}),faceForward:!0,flat:!1}),shadows:Cesium.ShadowMode.ENABLED})),V.length>0&&I._viewer.scene.primitives.add(new Cesium.Primitive({geometryInstances:V,appearance:new I._cesium.MaterialAppearance({material:new Cesium.Material({fabric:{type:"Color",uniforms:{color:Cesium.Color.fromRandom({alpha:1})}}}),faceForward:!0,flat:!1}),shadows:Cesium.ShadowMode.ENABLED}))})})(B)}else{B.state=Cesium.QuadtreeTileLoadState.LOADING,B.state===Cesium.QuadtreeTileLoadState.LOADING&&(B.data.geometryPrimitive&&(B.data.geometryPrimitive.update(M,[]),B._parent&&B._parent.data&&B._parent.data.geometryPrimitive&&(B._parent.data.geometryPrimitive.destroy(),B._parent.data.geometryPrimitive=null,B._parent.state=Cesium.QuadtreeTileLoadState.START),B._southwestChild&&B._southwestChild.data&&B._southwestChild.data.geometryPrimitive&&(B._southwestChild.data.geometryPrimitive.destroy(),B._southwestChild.data.geometryPrimitive=null,B._southwestChild.state=Cesium.QuadtreeTileLoadState.START),B._southeastChild&&B._southeastChild.data&&B._southeastChild.data.geometryPrimitive&&(B._southeastChild.data.geometryPrimitive.destroy(),B._southeastChild.data.geometryPrimitive=null,B._southeastChild.state=Cesium.QuadtreeTileLoadState.START),B._northwestChild&&B._northwestChild.data&&B._northwestChild.data.geometryPrimitive&&(B._northwestChild.data.geometryPrimitive.destroy(),B._northwestChild.data.geometryPrimitive=null,B._northwestChild.state=Cesium.QuadtreeTileLoadState.START),B._northeastChild&&B._northeastChild.data&&B._northeastChild.data.geometryPrimitive&&(B._northeastChild.data.geometryPrimitive.destroy(),B._northeastChild.data.geometryPrimitive=null,B._northeastChild.state=Cesium.QuadtreeTileLoadState.START)),B.state=Cesium.QuadtreeTileLoadState.DONE,B.renderable=!0);return}},this._primitive=new I._cesium.QuadtreePrimitive({tileProvider:this._Provider});var w=this._viewer.scene,Q=w.primitives;Q.add(this._primitive)};Bw.prototype.createVolumeGeoJsonFeatureLayer=function(o,A,f,m,C){var y={polylinePositions:void 0,shapePositions:void 0,ellipsoid:this._cesium.Ellipsoid.WGS84,granularity:this._cesium.Math.RADIANS_PER_DEGREE,vertexFormat:this._cesium.VertexFormat.DEFAULT,cornerType:this._cesium.CornerType.ROUNDED};A==null&&console.log("geojson is required");var x=null;A.then?x=A:x=this._cesium.GeoJsonDataSource.load(A);var v=this,E=[];y.shapePositions=this.computeCircle(f.radius),x.then(function(w){var Q=v._cesium.Color.WHITE;!v._core.isnull(f)&&!v._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"?Q=f.material.replace(/\[/,"").replace("/]/",""):Q=Vi.clone(f.material),v._core.isHtmlColor(Q)?Q=v._color.colorFromHtmlColor(f.material):(/^rgb/.test(Q)&&(Q=v._color.rgbaStringToRgbaObj(Q)),Q.r>1&&(Q.r=Q.r/255),Q.g>1&&(Q.g=Q.g/255),Q.b>1&&(Q.b=Q.b/255),Q.a>1&&(Q.a=Q.a/255),Q=v._color.createColor(Q.r,Q.g,Q.b,Q.a)));for(var M=w.entities.values,B=0;B<M.length;B++){var T=M[B];y.polylinePositions=T.polyline.positions._value;var D=new v._cesium.PolylineVolumeGeometry(y),F=v._cesium.PolylineVolumeGeometry.createGeometry(D),L=new v._cesium.GeometryInstance({geometry:F});E.push(L)}var R=v._viewer.scene.primitives.add(new v._cesium.Primitive({geometryInstances:E,appearance:new v._cesium.MaterialAppearance({material:new v._cesium.Material({fabric:{type:"Color",uniforms:{color:Q}}}),faceForward:!0,flat:!1})}));v.item=R,f.show==!1&&(R.show=!1),typeof C=="function"&&C(R)}),this._core.isnull(f.id)&&(f.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u7BA1\u72B6\u56FE\u5C42"+f.id);var I={id:f.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polylineVolumeLayer",item:this,url:geoOptions.url,style:f};return this.setTreeobj(I),this._tree.insertGroupId(I,this._core.isnull(m)?0:m),this};Bw.prototype.computeCircle=function(o){this._core.isnull(o)&&(o=4);for(var A=[],f=0;f<360;f++){var m=this._cesium.Math.toRadians(f);A.push(new this._cesium.Cartesian2(o*Math.cos(m),o*Math.sin(m)))}return A};Bw.prototype.createVolumeGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y){var x={show:!0,positions:[],shape:void 0,cornerType:this._cesium.CornerType.ROUNDED,granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.RECEIVE_ONLY},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a))));var E=this._core.extend(x,f,!0),I=new IA(this._viewer,this._cesium,v);this._Provider=I;var w=this;I._loadTile=function(M){var B=[],T=new w._cesium.PrimitiveCollection;return M.features.forEach(function(D){var F=[];function L(_e){for(var Be=0;Be<_e.length;Be++)Array.isArray(_e[Be])?L(_e[Be]):F.push(_e[Be])}var R=[];if(/^\[/.test(f.material)&&/\]$/.test(f.material)){var k=f.material.replace(/\[/,"").replace(/\]/,"");E.material=D.properties[k],that._core.isHtmlColor(E.material)?E.material=that._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=that._color.rgbaStringToRgbaObj(E.material)),E.material.r>1&&(E.material.r=E.material.r/255),E.material.g>1&&(E.material.g=E.material.g/255),E.material.b>1&&(E.material.b=E.material.b/255),E.material.a>1&&(E.material.a=E.material.a/255),E.material=that._color.createColor(E.material.r,E.material.g,E.material.b,E.material.a))}for(var U=0;U<D.geometry.coordinates.length;U++){var V=D.geometry.coordinates[U];if(V.length>0)if(Array.isArray(V[0]))for(var H=0;H<V.length;H++){var q=V[H],ie=w._cesium.Cartesian3.fromDegrees(q[0],q[1],E.height);R.push(ie)}else{var Z=w._cesium.Cartesian3.fromDegrees(V[0],V[1],E.height);R.push(Z)}}if(E.position=R,E.slttype=="0"||E.slttype==0)E.shape=w._core.computeCircle(E.radius);else if(E.slttype=="1"||E.slttype==1)E.shape=w._core.starPositions(E.number,E.exradius,E.inradius);else if(E.slttype=="2"||E.slttype==2){var oe=E.orth_width/2,ne=E.orth_height/2;E.shape=[new w._cesium.Cartesian2(-oe,-ne),new w._cesium.Cartesian2(oe,-ne),new w._cesium.Cartesian2(oe,ne),new w._cesium.Cartesian2(-oe,ne)]}D.positions=R;var se={polylinePositions:E.position,shapePositions:E.shape,cornerType:E.cornerType,VertexFormat:{bitangent:!0,color:!0,position:!0,st:!0,normal:!0,tangent:!0}},ce=new w._cesium.PolylineVolumeGeometry(se),j=w._cesium.PolylineVolumeGeometry.createGeometry(ce),de=new w._cesium.GeometryInstance({id:D,geometry:j,attributes:{color:new w._cesium.ColorGeometryInstanceAttribute.fromColor(E.material)}}),me=new w._cesium.Primitive({allowPicking:!0,appearance:new w._cesium.MaterialAppearance({material:new w._cesium.Material({fabric:{type:"Color",uniforms:{color:E.material}}}),faceForward:!0,flat:!1}),shadows:E.shadows,geometryInstances:de});T.add(me)}),T},this.item=I._primitiveCollection,I.addTo(this._viewer),C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var Q={id:E.id,name:o,checked:C,pId:this._core.isnull(m)?0:m,type:"polylineVolumeLayer",item:this,url:A.url,style:f};this.setTreeobj(Q),this._tree.insertGroupId(Q,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item)};Bw.prototype.setTreeobj=function(o){this.treeobj=o};Bw.prototype.export=function(){var o=this.item.show==null?void 0:this.item.show,A=this.treeobj.url;return{type:this.treeobj.type,treeobj:{name:this.treeobj.name,pId:this.treeobj.pId},style:{show:o,url:A}}};Bw.prototype.deleteObject=function(){this._viewer.scene.primitives.remove(this.item);try{this._Provider.remove()}catch{}};Bw.prototype.setRefresh=function(o){try{this._Provider&&this._Provider.setStatus(o)}catch{}};Bw.prototype.setVisibility=function(o){this.item.show=o,this._Provider&&this._Provider.setStatus(o)};var ple=Bw;function ww(o,A){this._viewer=o,this._cesium=A,this._core=new pr(o,A),this._color=new Pn(this._viewer,this._cesium),this._tree=lt,this._VectorTileProvider=new Ts(this._viewer,this._cesium),this._primitive=void 0,this._Provider=void 0,this.Legend=[]}ww.prototype.createWallGeoFeatureLayer=function(o,A,f,m,C,y,x){var v={positions:[],minimumHeights:[],maximumHeights:[],granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.DISABLED};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a))));var E=this._core.extend(v,f,!0);this._core.isnull(m)&&(m=16),this._core.isnull(C)&&(C=14),A==null&&console.log("url is required"),o==null&&console.log("layername is required");var I=this,w=[];this._VectorTileProvider.loadTile=function(B,T){if(this.tile=T,T.state===I._cesium.QuadtreeTileLoadState.START)if(T.data={lines:[],geometryPrimitive:void 0},T.level>=C&&T.level<m){var D=Vi.filter(w,function(F){return F.x==T.x&&F.y==T.y&&F.level==T.level});if(D.length!=0&&D[0].data&&D[0].data.length>0){T.data.geometryPrimitive=new I._cesium.Primitive({geometryInstances:D[0].data,appearance:new I._cesium.PerInstanceColorAppearance({flat:!0,translucent:!0,faceForward:!0,closed:!0}),shadows:I._cesium.ShadowMode.ENABLED}),T.state=I._cesium.QuadtreeTileLoadState.LOADING,T.state===I._cesium.QuadtreeTileLoadState.LOADING&&(T.data.geometryPrimitive&&T.data.geometryPrimitive.update(B,[]),T.state=I._cesium.QuadtreeTileLoadState.DONE,T.renderable=!0);return}w.push({level:T.level,x:T.x,y:T.y,data:void 0}),function(F){I._core.xhr({url:A+"?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&LAYER="+o+"&STYLE=&TILEMATRIX=EPSG:4490:"+F.level+"&TILEMATRIXSET=EPSG:4490&FORMAT=application/json;type=geojson&TILECOL="+F.x+"&TILEROW="+F.y,type:"get",dataType:"json",success:function(L){var R=[];function k(Z){for(var oe=0;oe<Z.length;oe++)Array.isArray(Z[oe])?k(Z[oe]):V.push(Z[oe])}for(var U=0;U<L.features.length;U++){var V=[];k(L.features[U].geometry.coordinates[0]);var H=I._cesium.Cartesian3.fromDegreesArray(V);E.positions=H;var q=new I._cesium.GeometryInstance({geometry:new I._cesium.WallGeometry({positions:E.positions}),attributes:{color:new I._cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.WHITE)}});R.push(q)}var ie=Vi.filter(w,function(Z){return Z.x==F.x&&Z.y==F.y});ie[0].data=R,F.data.geometryPrimitive=new I._cesium.Primitive({geometryInstances:R,appearance:new I._cesium.PerInstanceColorAppearance({flat:!0,translucent:!0,faceForward:!0,closed:!0}),shadows:I._cesium.ShadowMode.ENABLED})},error:function(){w=Vi.remove(w,function(L){return L.x==F.x&&L.y==F.y&&L.level==F.level})},complete:function(){F.state=I._cesium.QuadtreeTileLoadState.LOADING,F.state===I._cesium.QuadtreeTileLoadState.LOADING&&(F.data.geometryPrimitive&&F.data.geometryPrimitive.update(B,[]),F.state=I._cesium.QuadtreeTileLoadState.DONE,F.renderable=!0)}})}(T)}else T.state=I._cesium.QuadtreeTileLoadState.LOADING,T.state===I._cesium.QuadtreeTileLoadState.LOADING&&(T.data.geometryPrimitive&&T.data.geometryPrimitive.update(B,[]),T.state=I._cesium.QuadtreeTileLoadState.DONE,T.renderable=!0)},this._primitive=new I._cesium.QuadtreePrimitive({tileProvider:this._VectorTileProvider});var Q=this._viewer.scene,M=Q.primitives;M.add(this._primitive)};ww.prototype.createWallPrimitiveGeoFeatureLayer=function(o,A,f,m,C,y){var x={positions:void 0,granularity:this._cesium.Math.RADIANS_PER_DEGREE,maximumHeights:0,minimumHeights:0,vertexFormat:this._cesium.VertexFormat.DEFAULT};A==null&&console.log("geojson is required");var v=null;A.then?v=A:v=this._cesium.GeoJsonDataSource.load(A);var E=this,I=[];v.then(function(Q){for(var M=Q.entities.values,B=0;B<M.length;B++){var T=M[B];x.positions=T.polyline.positions._value;var D=new Array(x.positions.length),F=new Array(x.positions.length),L=void 0,R=void 0;/^\[/.test(f.minimumHeights)?(L=f.minimumHeights.replace(/\[/,"").replace("/]/",""),L=T.properties[L]._value):L=f.minimumHeights,/^\[/.test(f.maximumHeights)?(R=f.maximumHeights.replace(/\[/,"").replace("/]/",""),R=T.properties[R]._value):R=f.maximumHeights,D.fill(L),F.fill(R),x.minimumHeights=D,x.maximumHeights=F;var k=E._cesium.Color.WHITE;!E._core.isnull(f)&&!E._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"?k=f.material.replace(/\[/,"").replace("/]/",""):k=Vi.clone(f.material),E._core.isHtmlColor(k)?k=E._color.colorFromHtmlColor(f.material):(/^rgb/.test(k)&&(k=E._color.rgbaStringToRgbaObj(k)),k.r>1&&(k.r=k.r/255),k.g>1&&(k.g=k.g/255),k.b>1&&(k.b=k.b/255),k.a>1&&(k.a=k.a/255),k=E._color.createColor(k.r,k.g,k.b,k.a)));var U="material:"+k.red*255+","+k.green*255+","+k.blue*255;E.Legend.push(U);var V=new E._cesium.GeometryInstance({id:T,geometry:new E._cesium.WallGeometry(x),attributes:{color:new E._cesium.ColorGeometryInstanceAttribute.fromColor(k)}});I.push(V)}var H;f&&f.time&&(H=new E._cesium.TimeIntervalCollection([new E._cesium.TimeInterval({start:f.time.start?E._cesium.JulianDate.fromDate(new Date(f.time.start)):E._cesium.Iso8601.MINIMUM_VALUE,stop:f.time.end?E._cesium.JulianDate.fromDate(new Date(f.time.end)):E._cesium.Iso8601.MAXIMUM_VALUE})]));var q=E._viewer.scene.primitives.add(new E._cesium.Primitive({geometryInstances:I,appearance:new E._cesium.PerInstanceColorAppearance({flat:!0,translucent:!0,faceForward:!0,closed:!0})}),H);E.item=q,C||_this.setVisibility(!1),typeof y=="function"&&y(q)}),this._core.isnull(f.id)&&(f.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u5899\u56FE\u5C42"+options.id);var w={id:f.id,name:o,pId:this._core.isnull(m)?0:m,type:"polylineWallLayer",item:this,url:A,style:options};return this.setTreeobj(w),this._tree.insertGroupId(w,this._core.isnull(m)?0:m),this};ww.prototype.createWallGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y){var x={positions:void 0,granularity:this._cesium.Math.RADIANS_PER_DEGREE,maximumHeights:0,minimumHeights:0,vertexFormat:this._cesium.VertexFormat.DEFAULT},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a))));var E=new IA(this._viewer,this._cesium,v);this._Provider=E;var I=this;E._loadTile=function(Q){var M=[];I.Legend=[];var B=new I._cesium.PrimitiveCollection;return Q.features.forEach(function(T){var D=[],F=!1;function L(U){for(var V=0;V<U.length;V++)Array.isArray(U[V])?L(U[V]):(D.push(U[V]),V===2&&!F&&(F=!0))}if(Array.isArray(T.geometry.coordinates)&&T.geometry.coordinates.length>0)if(Array.isArray(T.geometry.coordinates[0][0]))for(var R=0;R<T.geometry.coordinates.length;R++)D=[],L(T.geometry.coordinates[R]),k(D);else L(T.geometry.coordinates),k(D);function k(U){if(/^\[/.test(f.material)&&/\]$/.test(f.material)){var V=f.material.replace(/\[/,"").replace(/\]/,"");options.material=T.properties[V],I._core.isHtmlColor(options.material)?options.material=I._color.colorFromHtmlColor(options.material):(/^rgb/.test(options.material)&&(options.material=I._color.rgbaStringToRgbaObj(options.material)),options.material.r>1&&(options.material.r=options.material.r/255),options.material.g>1&&(options.material.g=options.material.g/255),options.material.b>1&&(options.material.b=options.material.b/255),options.material.a>1&&(options.material.a=options.material.a/255),options.material=I._color.createColor(options.material.r,options.material.g,options.material.b,options.material.a))}var H=F?I._cesium.Cartesian3.fromDegreesArrayHeights(U):I._cesium.Cartesian3.fromDegreesArray(U);x.positions=H,T.positions=H;var q=new Array(x.positions.length),ie=new Array(x.positions.length),Z=void 0,oe=void 0;/^\[/.test(f.minimumHeights)?(Z=f.minimumHeights.replace(/\[/,"").replace("/]/",""),Z=entity.properties[Z]._value):Z=f.minimumHeights,/^\[/.test(f.maximumHeights)?(oe=f.maximumHeights.replace(/\[/,"").replace("/]/",""),oe=entity.properties[oe]._value):oe=f.maximumHeights,q.fill(Z),ie.fill(oe),x.minimumHeights=q,x.maximumHeights=ie,T.treeID=f.id,T.VectorType="wall",T.VectorStyle={haveZ:F,minimumHeights:q,maximumHeights:ie,positions:U,material:f.material};var ne=new I._cesium.GeometryInstance({id:T,geometry:new I._cesium.WallGeometry(x),attributes:{color:new I._cesium.ColorGeometryInstanceAttribute.fromColor(f.material)}}),se="material:"+f.material.red*255+","+f.material.green*255+","+f.material.blue*255;I.Legend.push(se);var ce=new I._cesium.Primitive({geometryInstances:ne,appearance:new I._cesium.MaterialAppearance({material:new I._cesium.Material({fabric:{type:"Color",uniforms:{color:f.material}}}),faceForward:!0,flat:!1}),vertexCacheOptimize:!0,interleave:!0,shadows:I._cesium.ShadowMode.ENABLED});B.add(ce)}}),B},f&&f.time&&(E.availability=new I._cesium.TimeIntervalCollection([new I._cesium.TimeInterval({start:f.time.start?I._cesium.JulianDate.fromDate(new Date(f.time.start)):I._cesium.Iso8601.MINIMUM_VALUE,stop:f.time.end?I._cesium.JulianDate.fromDate(new Date(f.time.end)):I._cesium.Iso8601.MAXIMUM_VALUE})])),this.item=E._primitiveCollection,E.addTo(this._viewer),C||this.setVisibility(!1),this._core.isnull(f.id)&&(f.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u5899\u56FE\u5C42"+f.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var w={id:f.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polylineWallLayer",item:this,url:A.url,style:f};return this._Provider.treeID=f.id,this.setTreeobj(w),this._tree.insertGroupId(w,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};ww.prototype.setTreeobj=function(o){this.treeobj=o};ww.prototype.deleteObject=function(){this._viewer.scene.primitives.remove(this.item);try{this._Provider.remove()}catch{}};ww.prototype.export=function(){var o=this.item.show==null?void 0:this.item.show,A=this.treeobj.url;return{type:this.treeobj.type,treeobj:{name:this.treeobj.name,pId:this.treeobj.pId},style:{show:o,url:A}}};ww.prototype.getLegend=function(){var o=[];return this.Legend!=null&&(o=this._core.unique(this.Legend)),o};ww.prototype.setRefresh=function(o){try{this._Provider&&this._Provider.setStatus(!o)}catch{}};ww.prototype.setVisibility=function(o){this.item.show=o,this._Provider&&this._Provider.setStatus(!o)};ww.prototype.edit=function(o,A){return this.isEditting=o,this.editoption=A,this._Provider&&this._Provider.edit&&this._Provider.edit(o,A)};ww.prototype.forceRefresh=function(){try{for(var o=0;o<this._Provider.quadtree._levelZeroTiles.length;o++)this._Provider.quadtree._levelZeroTiles[o].freeResources()}catch{}};var ej=ww;var Li=null;function zo(o,A){this._viewer=o,this._cesium=A,Li=A,this._core=new pr(o,A),this._tree=lt,this._getPosition=new $l(this._viewer,this._cesium),this._ModelEdit=new xW(this._viewer,this._cesium),this._popupmessage=new GQ(this._viewer,this._cesium),this._createGroup=new ZO(this._viewer,this._cesium),this._billboardGeoJsonFeatureLayer=new $W(this._viewer,this._cesium),this._GeoJsonFeatureLayer=new df(this._viewer,this._cesium),this._LabelGeoJsonFeatureLayercopy=new dI(this._viewer,this._cesium),this._VectorGeoJsonFeatureLayer=new Wf(this._viewer,this._cesium),this._PolylineGeoJsonFeatureLayer=new $O(this._viewer,this._cesium),this._PointModel=new HQ(this._viewer,this._cesium),this._PolygonGeoJsonFeatureLayer=new VQ(this._viewer,this._cesium),this._PolygonVectorTileLayerArcgis=new ple(this._viewer,this._cesium),this._WallGeoFeatureLayer=new ej(this._viewer,this._cesium),this.tooltip=this._core.CreateTooltip(),this.objectsToExclude=[],this.SimpleGraphicObj=[],!lt.editPointID&&(lt.editPointID={edit:[],size:[],move:void 0,height:[],add:[]}),this.editProp=!1,this.PrimitiveCollection=new Li.PrimitiveCollection,o.scene.primitives.add(this.PrimitiveCollection),this.SizeData=[],this.featuresPlotting=[],this.openEdit=!0}zo.prototype.createSimpleGraphic=function(o,A={},f){let m=null,C=(y,x)=>{if(y&&A.removeEdit&&this.SimpleGraphicObj.pop(),A.propData&&this.setPropData(y,A.propData),y){y.deleteObject=()=>{this.remove(y.id),this._viewer.entities.removeById(y.id)};let v={type:"FeatureCollection",features:[]},E=this.getStyle(y),I={id:y.id,name:y.name,type:E.type,style:E};v.features.push(I),y.json=v}this.defaultEdit(),f&&f(y,x)};switch(this._core.mouse(this._viewer.container,1,window.SmartEarthRootUrl+cn.draw),o){case"point":m=this.createPoint(A,C);break;case"billboard":m=this.createBillboard(A,C);break;case"label":m=this.createLabel(A,C);break;case"model":m=this.createModel(A,C);break;case"polyline":m=this.createPolyline(A,C);break;case"polygon":m=this.createPolygon(A,C);break;case"triangle":m=this.createTriangle(A,C);break;case"polygon-rectangle":m=this.createPolygonRectangle(A,C);break;case"rectangle":m=this.createRectangle(A,C);break;case"circle":m=this.createCircle(A,C);break;case"ellipse":m=this.createEllipse(A,C);break;case"box":m=this.createBox(A,C);break;case"cylinder":m=this.createCylinder(A,C);break;case"cone":m=this.createCone(A,C);break;case"sphere":m=this.createSphere(A,C);break;case"polyhedron":m=this.createPolyhedron(A,C);break}return m};zo.prototype.addSimpleGraphic=function(o,A={},f){let m=null;switch(o){case"point":m=this.addPoint(A);break;case"billboard":m=this.addBillboard(A);break;case"label":m=this.addLabel(A);break;case"model":m=this.addModel(A);break;case"polyline":m=this.addPolyline(A);break;case"polylinePrimitive":m=this.addPolylinePrimitive(A);break;case"polygon":m=this.addPolygon(A);break;case"polygonPrimitive":m=this.addPolygonPrimitive(A);break;case"rectangle":m=this.addRectangle(A);break;case"circle":m=this.addCircle(A);break;case"ellipse":m=this.addEllipse(A);break;case"box":m=this.addBox(A);break;case"cylinder":m=this.addCylinder(A);break;case"cone":m=this.addCone(A);break;case"sphere":m=this.addSphere(A);break;case"ellipsoid":m=this.addSphere(A);break;case"polyhedron":m=this.addPolyhedron(A);break}if(m&&A.removeEdit&&this.SimpleGraphicObj.pop(),A.propData&&this.setPropData(m,A.propData),this.defaultEdit(),m.deleteObject=()=>{this.remove(m.id),this._viewer.entities.removeById(m.id)},f&&(A.GroupID=f.pId,A.id=f.id,A.name=f.name),A.GroupID!==void 0){let C={id:m.id,name:m.name,pId:A.GroupID,type:o,item:{item:m,setVisibility:y=>{m.show=y}}};o.indexOf("Primitive")>-1&&(C.id=A.id,C.name=A.name),lt.insertGroupId(C,A.GroupID)}return m};zo.prototype.getDefaultLabelStyle=function(o){return{show:this._core.defaultValue(o.showLabel,!1),text:this._core.defaultValue(o.label_text,"\u65B0\u5EFA\u6587\u672C"),font:this._core.defaultValue(o.label_font,"24px \u5B8B\u4F53"),scale:this._core.defaultValue(o.label_scale,1),style:this._core.defaultValue(o.label_style,2),fillColor:this._cesium.Color.fromCssColorString(this._core.defaultValue(o.label_fillColor,"#ffffff")),outlineColor:this._cesium.Color.fromCssColorString(this._core.defaultValue(o.label_outlineColor,"#000000")),outlineWidth:this._core.defaultValue(o.label_outlineWidth,0),showBackground:this._core.defaultValue(o.label_showBackground,!1),backgroundColor:this._cesium.Color.fromCssColorString(this._core.defaultValue(o.label_backgroundColor,"rgba(42,42,42,0.8)")),heightReference:this._core.defaultValue(o.label_heightReference,1),horizontalOrigin:this._core.defaultValue(o.label_horizontalOrigin,this._cesium.HorizontalOrigin.CENTER),verticalOrigin:this._core.defaultValue(o.label_verticalOrigin,this._cesium.VerticalOrigin.CENTER),scaleByDistance:this._core.defaultValue(o.label_scaleByDistance,void 0),pixelOffset:this._core.defaultValue(o.label_pixelOffset,void 0),disableDepthTestDistance:this._core.defaultValue(o.label_disableDepthTestDistance,Number.POSITIVE_INFINITY),distanceDisplayCondition:this._core.defaultValue(o.label_distanceDisplayCondition,new this._cesium.DistanceDisplayCondition(0,1e8))}};zo.prototype.end=function(o){};zo.prototype.createPoint=function(o={},A){let f=this,m=this._viewer;return this.drawHandler&&(this.drawHandler.destroy(),this.drawHandler=void 0),this.drawHandler=new this._cesium.ScreenSpaceEventHandler(m.scene.canvas),lt.states=1,this.drawHandler.setInputAction(C=>{let y=f._getPosition.getMousePosition(C);if(y){let x=m.entities.add({id:f._core.getuid(),name:"Point",position:y,point:{pixelSize:16,heightReference:0,color:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.color,"#0000ff")),outlineWidth:f._core.defaultValue(o.outlineWidth,2),outlineColor:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.outlineColor,"rgba(255,255,255,0.6)")),disableDepthTestDistance:f._core.defaultValue(o.disableDepthTestDistance,Number.POSITIVE_INFINITY),distanceDisplayCondition:f._core.defaultValue(o.distanceDisplayCondition,new f._cesium.DistanceDisplayCondition(0,1e8))}});f.SimpleGraphicObj.push(x.id),f.drawHandler.destroy(),f.drawHandler=void 0,f.tooltip.show(!1),setTimeout(function(){lt.states=0},100),f._core.mouse(f._viewer.container,0,"0"),A&&typeof A=="function"&&A(x)}},this._cesium.ScreenSpaceEventType.LEFT_CLICK),this.drawHandler.setInputAction(C=>{f.tooltip.showAt(C.endPosition,"\u70B9\u51FB\u7ED8\u5236\u70B9")},this._cesium.ScreenSpaceEventType.MOUSE_MOVE),this.drawHandler.setInputAction(C=>{this.end()},this._cesium.ScreenSpaceEventType.RIGHT_CLICK),this.end=()=>{this.end=void 0,f.drawHandler.destroy(),f.drawHandler=void 0,f.tooltip.show(!1),setTimeout(function(){lt.states=0},100),f._core.mouse(f._viewer.container,0,"0")},this};zo.prototype.addPoint=function(o={}){let A=this,m=this._viewer.entities.add({id:A._core.defaultValue(o.id,A._core.getuid()),name:A._core.defaultValue(o.name,"Point"),position:o.position,point:{pixelSize:A._core.defaultValue(o.pixelSize,16),color:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.color,"#0000ff")),outlineWidth:A._core.defaultValue(o.outlineWidth,2),outlineColor:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.outlineColor,"rgba(255,255,255,0.6)")),heightReference:A._core.defaultValue(o.heightReference,0),scaleByDistance:A._core.defaultValue(o.scaleByDistance,void 0),disableDepthTestDistance:A._core.defaultValue(o.disableDepthTestDistance,Number.POSITIVE_INFINITY),distanceDisplayCondition:A._core.defaultValue(o.distanceDisplayCondition,new A._cesium.DistanceDisplayCondition(0,1e8))}});return A.SimpleGraphicObj.push(m.id),m};zo.prototype.createBillboard=function(o={},A){let f=this,m=this._viewer;return this.drawHandler&&(this.drawHandler.destroy(),this.drawHandler=void 0),this.drawHandler=new this._cesium.ScreenSpaceEventHandler(m.scene.canvas),lt.states=1,o.image=this._core.getGifImageProperty(o.image),this.drawHandler.setInputAction(C=>{let y=f._getPosition.getMousePosition(C);if(y){let x=m.entities.add({id:f._core.getuid(),name:"Billboard",position:y,billboard:{horizontalOrigin:f._cesium.HorizontalOrigin.CENTER,verticalOrigin:f._cesium.VerticalOrigin.BOTTOM,heightReference:0,scale:f._core.defaultValue(o.scale,1),width:f._core.defaultValue(o.width,o.image?void 0:32),height:f._core.defaultValue(o.height,o.image?void 0:44),image:f._core.defaultValue(o.image,window.SmartEarthRootUrl+cn.mark),color:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.color,"#ffffff")),disableDepthTestDistance:f._core.defaultValue(o.disableDepthTestDistance,Number.POSITIVE_INFINITY),distanceDisplayCondition:f._core.defaultValue(o.distanceDisplayCondition,new f._cesium.DistanceDisplayCondition(0,1e8))},label:this.getDefaultLabelStyle(o)});f.SimpleGraphicObj.push(x.id),f.drawHandler.destroy(),f.drawHandler=void 0,f.tooltip.show(!1),setTimeout(function(){lt.states=0},100),f._core.mouse(f._viewer.container,0,"0"),A&&typeof A=="function"&&A(x)}},this._cesium.ScreenSpaceEventType.LEFT_CLICK),this.drawHandler.setInputAction(C=>{f.tooltip.showAt(C.endPosition,"\u70B9\u51FB\u7ED8\u5236\u56FE\u6807")},this._cesium.ScreenSpaceEventType.MOUSE_MOVE),this.drawHandler.setInputAction(C=>{this.end()},this._cesium.ScreenSpaceEventType.RIGHT_CLICK),this.end=()=>{this.end=void 0,f.drawHandler.destroy(),f.drawHandler=void 0,f.tooltip.show(!1),setTimeout(function(){lt.states=0},100),f._core.mouse(f._viewer.container,0,"0")},this};zo.prototype.addBillboard=function(o={}){let A=this,f=this._viewer;o.image=this._core.getGifImageProperty(o.image);let m=f.entities.add({id:A._core.defaultValue(o.id,A._core.getuid()),name:A._core.defaultValue(o.name,"Billboard"),position:o.position,billboard:{horizontalOrigin:A._core.defaultValue(o.horizontalOrigin,A._cesium.HorizontalOrigin.CENTER),verticalOrigin:A._core.defaultValue(o.verticalOrigin,A._cesium.VerticalOrigin.BOTTOM),scale:A._core.defaultValue(o.scale,1),rotation:A._core.defaultValue(o.rotation,0),width:A._core.defaultValue(o.width,void 0),height:A._core.defaultValue(o.height,void 0),image:A._core.defaultValue(o.image,window.SmartEarthRootUrl+cn.mark),color:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.color,"#ffffff")),heightReference:A._core.defaultValue(o.heightReference,0),scaleByDistance:A._core.defaultValue(o.scaleByDistance,void 0),disableDepthTestDistance:A._core.defaultValue(o.disableDepthTestDistance,Number.POSITIVE_INFINITY),distanceDisplayCondition:A._core.defaultValue(o.distanceDisplayCondition,new A._cesium.DistanceDisplayCondition(0,1e8))},label:this.getDefaultLabelStyle(o)});return A.SimpleGraphicObj.push(m.id),m};zo.prototype.createLabel=function(o={},A){let f=this,m=this._viewer;return this.drawHandler&&(this.drawHandler.destroy(),this.drawHandler=void 0),this.drawHandler=new this._cesium.ScreenSpaceEventHandler(m.scene.canvas),lt.states=1,this.drawHandler.setInputAction(C=>{let y=f._getPosition.getMousePosition(C);if(y){let x=m.entities.add({id:f._core.getuid(),name:"Label",position:y,label:{text:"\u65B0\u5EFA\u6587\u672C",font:"24px \u5B8B\u4F53",fillColor:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.fillColor,"#ffffff")),heightReference:0,scale:1,style:2,outlineColor:f._cesium.Color.BLACK,outlineWidth:0,showBackground:!1,backgroundColor:new f._cesium.Color(.165,.165,.165,.8),horizontalOrigin:f._cesium.HorizontalOrigin.CENTER,verticalOrigin:f._cesium.VerticalOrigin.CENTER,distanceDisplayCondition:f._core.defaultValue(o.distanceDisplayCondition,new f._cesium.DistanceDisplayCondition(0,1e8)),disableDepthTestDistance:Number.POSITIVE_INFINITY}});f.SimpleGraphicObj.push(x.id),f.drawHandler.destroy(),f.drawHandler=void 0,f.tooltip.show(!1),setTimeout(function(){lt.states=0},100),f._core.mouse(f._viewer.container,0,"0"),A&&typeof A=="function"&&A(x)}},this._cesium.ScreenSpaceEventType.LEFT_CLICK),this.drawHandler.setInputAction(C=>{f.tooltip.showAt(C.endPosition,"\u70B9\u51FB\u7ED8\u5236\u6587\u672C")},this._cesium.ScreenSpaceEventType.MOUSE_MOVE),this.drawHandler.setInputAction(C=>{this.end()},this._cesium.ScreenSpaceEventType.RIGHT_CLICK),this.end=()=>{this.end=void 0,f.drawHandler.destroy(),f.drawHandler=void 0,f.tooltip.show(!1),setTimeout(function(){lt.states=0},100),f._core.mouse(f._viewer.container,0,"0")},this};zo.prototype.addLabel=function(o={}){let A=this,m=this._viewer.entities.add({id:A._core.defaultValue(o.id,A._core.getuid()),name:A._core.defaultValue(o.name,"Label"),position:o.position,label:{text:A._core.defaultValue(o.text,"\u65B0\u5EFA\u6587\u672C"),font:A._core.defaultValue(o.font,"24px \u5B8B\u4F53"),scale:A._core.defaultValue(o.scale,1),style:A._core.defaultValue(o.style,2),fillColor:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.fillColor,"#ffffff")),outlineColor:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.outlineColor,"#000000")),outlineWidth:A._core.defaultValue(o.outlineWidth,0),showBackground:A._core.defaultValue(o.showBackground,!1),backgroundColor:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.backgroundColor,"rgba(42,42,42,0.8)")),heightReference:A._core.defaultValue(o.heightReference,0),horizontalOrigin:A._core.defaultValue(o.horizontalOrigin,A._cesium.HorizontalOrigin.CENTER),verticalOrigin:A._core.defaultValue(o.verticalOrigin,A._cesium.VerticalOrigin.CENTER),scaleByDistance:A._core.defaultValue(o.scaleByDistance,void 0),pixelOffset:A._core.defaultValue(o.pixelOffset,void 0),disableDepthTestDistance:A._core.defaultValue(o.disableDepthTestDistance,Number.POSITIVE_INFINITY),distanceDisplayCondition:A._core.defaultValue(o.distanceDisplayCondition,new A._cesium.DistanceDisplayCondition(0,1e8))}});return A.SimpleGraphicObj.push(m.id),m};zo.prototype.createModel=function(o={},A){let f=this,m=this._viewer;this.drawHandler&&(this.drawHandler.destroy(),this.drawHandler=void 0),this.drawHandler=new this._cesium.ScreenSpaceEventHandler(m.scene.canvas),lt.states=1;let C,y=Li.Matrix3.fromRotationX(Li.Math.toRadians(f._core.defaultValue(o.heading,0))),x=Li.Matrix3.fromRotationY(Li.Math.toRadians(f._core.defaultValue(o.pitch,0))),v=Li.Matrix3.fromRotationZ(Li.Math.toRadians(f._core.defaultValue(o.roll,0))),E=Li.Matrix4.fromRotationTranslation(y),I=Li.Matrix4.fromRotationTranslation(x),w=Li.Matrix4.fromRotationTranslation(v);this.drawHandler.setInputAction(M=>{let B=f._getPosition.getMousePosition(M,C);B&&(C&&m.scene.primitives.remove(C),C=m.entities.add({id:f._core.getuid(),name:f._core.defaultValue(o.name,"Model"),position:B,orientation:Li.Transforms.headingPitchRollQuaternion(B,new Li.HeadingPitchRoll(Li.Math.toRadians(f._core.defaultValue(o.heading,0)),Li.Math.toRadians(f._core.defaultValue(o.pitch,0)),Li.Math.toRadians(f._core.defaultValue(o.roll,0)))),model:{uri:f._core.defaultValue(o.url,window.SmartEarthRootUrl+cn.testModel),scale:f._core.defaultValue(o.scale,1),minimumPixelSize:0,runAnimations:!0,colorBlendMode:f._core.defaultValue(o.colorBlendMode,void 0),color:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.color,"#ffffff")),distanceDisplayCondition:f._core.defaultValue(o.distanceDisplayCondition,new f._cesium.DistanceDisplayCondition(0,1e8))}}),C.heading=f._core.defaultValue(o.heading,0),C.pitch=f._core.defaultValue(o.pitch,0),C.roll=f._core.defaultValue(o.roll,0),f.SimpleGraphicObj.push(C.id),f.drawHandler.destroy(),f.drawHandler=void 0,f.tooltip.show(!1),setTimeout(function(){lt.states=0},100),f._core.mouse(f._viewer.container,0,"0"),A&&typeof A=="function"&&A(C))},this._cesium.ScreenSpaceEventType.LEFT_CLICK);let Q=!1;return this.drawHandler.setInputAction(M=>{let B=f._getPosition.getMousePosition(M,C);if(C){let T=Li.Transforms.eastNorthUpToFixedFrame(B);Li.Matrix4.multiply(T,E,T),Li.Matrix4.multiply(T,I,T),Li.Matrix4.multiply(T,w,T),C.modelMatrix=T}else if(B){let T=Li.Transforms.eastNorthUpToFixedFrame(B);Li.Matrix4.multiply(T,E,T),Li.Matrix4.multiply(T,I,T),Li.Matrix4.multiply(T,w,T),C=m.scene.primitives.add(Li.Model.fromGltf({modelMatrix:T,url:f._core.defaultValue(o.url,window.SmartEarthRootUrl+cn.testModel),scale:f._core.defaultValue(o.scale,1),minimumPixelSize:0,colorBlendMode:f._core.defaultValue(o.colorBlendMode,void 0),color:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.color,"#ffffff")).withAlpha(.5),distanceDisplayCondition:f._core.defaultValue(o.distanceDisplayCondition,new f._cesium.DistanceDisplayCondition(0,1e8)),allowPicking:!1})),C.readyPromise.then(()=>{Q=!0})}Q?f.tooltip.showAt(M.endPosition,"\u70B9\u51FB\u7ED8\u5236\u6A21\u578B"):f.tooltip.showAt(M.endPosition,"\u52A0\u8F7D\u6A21\u578B\u4E2D...")},this._cesium.ScreenSpaceEventType.MOUSE_MOVE),this.drawHandler.setInputAction(M=>{this.end()},this._cesium.ScreenSpaceEventType.RIGHT_CLICK),this.end=()=>{this.end=void 0,f.drawHandler.destroy(),f.drawHandler=void 0,f.tooltip.show(!1),setTimeout(function(){lt.states=0},100),f._core.mouse(f._viewer.container,0,"0")},this};zo.prototype.addModel=function(o={}){let A=this,m=this._viewer.entities.add({id:A._core.defaultValue(o.id,A._core.getuid()),name:A._core.defaultValue(o.name,"Model"),position:o.position,orientation:Li.Transforms.headingPitchRollQuaternion(o.position,new Li.HeadingPitchRoll(Li.Math.toRadians(A._core.defaultValue(o.heading,0)),Li.Math.toRadians(A._core.defaultValue(o.pitch,0)),Li.Math.toRadians(A._core.defaultValue(o.roll,0)))),model:{scale:A._core.defaultValue(o.scale,1),uri:A._core.defaultValue(o.url,window.SmartEarthRootUrl+cn.testModel),minimumPixelSize:A._core.defaultValue(o.minimumPixelSize,0),runAnimations:A._core.defaultValue(o.runAnimations,!0),colorBlendMode:A._core.defaultValue(o.colorBlendMode,void 0),color:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.color,"#ffffff")),distanceDisplayCondition:A._core.defaultValue(o.distanceDisplayCondition,new A._cesium.DistanceDisplayCondition(0,1e8))}});return m.heading=A._core.defaultValue(o.heading,0),m.pitch=A._core.defaultValue(o.pitch,0),m.roll=A._core.defaultValue(o.roll,0),A.SimpleGraphicObj.push(m.id),m};zo.prototype.createPolyline=function(o={},A){let f=this,m=this._viewer;this.drawHandler&&(this.drawHandler.destroy(),this.drawHandler=void 0),this.drawHandler=new this._cesium.ScreenSpaceEventHandler(m.scene.canvas),lt.states=1;let C=[],y;return this.drawHandler.setInputAction(x=>{let v=f._getPosition.getMousePosition(x,y);!v||(C.length===0&&C.push(v.clone()),C.push(v),o.toPoint&&C.length===3&&(C.pop(),f.end()),y||(y=m.entities.add({id:f._core.getuid(),name:f._core.defaultValue(o.name,"\u65B0\u5EFA\u7EBF"),polyline:{positions:new f._cesium.CallbackProperty(function(){return C},!1),clampToGround:f._core.defaultValue(o.clampToGround,!0),material:new Li.PolylineOutlineMaterialProperty({color:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.color,"rgba(0,255,0,0.6)")),outlineWidth:0,outlineColor:f._cesium.Color.WHITE.withAlpha(.6)}),depthFailMaterial:o.depthFailColor&&new Li.PolylineOutlineMaterialProperty({color:f._cesium.Color.fromCssColorString(o.depthFailColor),outlineWidth:0,outlineColor:f._cesium.Color.WHITE.withAlpha(.6)}),width:f._core.defaultValue(o.width,3),distanceDisplayCondition:new f._cesium.DistanceDisplayCondition(0,1e8)}}),f.SimpleGraphicObj.push(y.id)),o.showSize&&f.showSizeData("polyline",[C[C.length-2],C[C.length-1]]))},this._cesium.ScreenSpaceEventType.LEFT_CLICK),this.drawHandler.setInputAction(x=>{if(C.length===0)f.tooltip.showAt(x.endPosition,"\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236");else{f.tooltip.showAt(x.endPosition,"\u70B9\u51FB\u6DFB\u52A0\u70B9\uFF0C\u53F3\u952E\u7ED3\u675F\u7ED8\u5236");let v=f._getPosition.getMousePosition(x,y);if(!v)return;C.pop(),C.push(v),o.showSize&&(f.clearLastSizeData(),f.showSizeData("polyline",[C[C.length-2],C[C.length-1]]))}},this._cesium.ScreenSpaceEventType.MOUSE_MOVE),this.end=function(x){if(f.drawHandler.destroy(),f.drawHandler=void 0,f.tooltip.show(!1),f.clearAllSizeData(),setTimeout(function(){lt.states=0},100),f._core.mouse(f._viewer.container,0),f.end=void 0,x==="cancel"){y&&(m.entities.remove(y),f.SimpleGraphicObj.pop());return}A&&typeof A=="function"&&A(y,C)},this.drawHandler.setInputAction(x=>{f.end()},this._cesium.ScreenSpaceEventType.RIGHT_CLICK),this};zo.prototype.addPolyline=function(o={}){let A=this,f=this._viewer,m=o.positions,C=f.entities.add({id:A._core.defaultValue(o.id,A._core.getuid()),name:A._core.defaultValue(o.name,"\u65B0\u5EFA\u7EBF"),polyline:{positions:m,clampToGround:A._core.defaultValue(o.clampToGround,!0),material:new Li.PolylineOutlineMaterialProperty({color:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.color,"rgba(0,255,0,0.6)")),outlineWidth:A._core.defaultValue(o.outlineWidth,0),outlineColor:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.outlineColor,"rgba(255,255,255,0.6)"))}),depthFailMaterial:o.depthFailColor&&new Li.PolylineOutlineMaterialProperty({color:A._cesium.Color.fromCssColorString(o.depthFailColor),outlineWidth:0,outlineColor:A._cesium.Color.WHITE.withAlpha(.6)}),width:A._core.defaultValue(o.width,3),distanceDisplayCondition:A._core.defaultValue(o.distanceDisplayCondition,new A._cesium.DistanceDisplayCondition(0,1e8))}});return A.SimpleGraphicObj.push(C.id),C};zo.prototype.addPolylinePrimitive=function(o={}){let A=this,f=this._viewer,m=o.positions,C;if(o.clampToGround)C=new A._cesium.GroundPolylineGeometry({positions:m,width:A._core.defaultValue(o.width,3)});else{let I=new Li.PolylineGeometry({positions:m,width:A._core.defaultValue(o.width,3)});C=Li.PolylineGeometry.createGeometry(I)}let y=A._cesium.Color.fromCssColorString(A._core.defaultValue(o.color,"rgba(0,255,0,0.6)")),x=new Li.GeometryInstance({id:A._core.defaultValue(o.id,A._core.getuid()),geometry:C,attributes:{color:new A._cesium.ColorGeometryInstanceAttribute.fromColor(y)}}),v,E=new A._cesium.PolylineColorAppearance({flat:!0,translucent:!0,faceForward:!0,closed:!0});return o.clampToGround?v=new A._cesium.GroundPolylinePrimitive({geometryInstances:x,appearance:E}):v=new A._cesium.Primitive({geometryInstances:x,appearance:E}),this.PrimitiveCollection.add(v),v};zo.prototype.createPolygon=function(o={},A){let f=this,m=this._viewer;this.drawHandler&&(this.drawHandler.destroy(),this.drawHandler=void 0),this.drawHandler=new this._cesium.ScreenSpaceEventHandler(m.scene.canvas),lt.states=1;let C=[],y,x;return this.drawHandler.setInputAction(v=>{let E=f._getPosition.getMousePosition(v,[x,y]);!E||(C.length===0&&C.push(E.clone()),C.push(E),C.length===2&&!x&&(o.clampToGround=f._core.defaultValue(o.clampToGround,!0),x=m.entities.add({name:"\u4E34\u65F6\u7EBF",polyline:{positions:new f._cesium.CallbackProperty(function(){return C},!1),clampToGround:f._core.defaultValue(o.clampToGround,!0),material:new Li.PolylineOutlineMaterialProperty({color:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.color,"rgba(0,255,0,0.6)")),outlineWidth:0,outlineColor:f._cesium.Color.WHITE.withAlpha(.6)}),width:3}})),C.length===3&&!y&&(x&&m.entities.remove(x),y=m.entities.add({id:f._core.getuid(),name:f._core.defaultValue(o.name,"\u65B0\u5EFA\u9762"),polygon:{hierarchy:new f._cesium.CallbackProperty(function(){return new f._cesium.PolygonHierarchy(C)},!1),material:new f._cesium.ImageMaterialProperty({image:null,repeat:new f._cesium.Cartesian2(1,1),color:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.color,"rgba(0,255,0,0.6)"))}),perPositionHeight:!f._core.defaultValue(o.clampToGround,!1),heightReference:o.clampToGround?1:0,outline:f._core.defaultValue(o.outline,!1),outlineColor:f._cesium.Color.WHITE.withAlpha(.6),distanceDisplayCondition:new f._cesium.DistanceDisplayCondition(0,1e8)}}),f.SimpleGraphicObj.push(y.id)))},this._cesium.ScreenSpaceEventType.LEFT_CLICK),this.drawHandler.setInputAction(v=>{if(C.length===0)f.tooltip.showAt(v.endPosition,"\u70B9\u51FB\u6DFB\u52A0\u7B2C\u4E00\u4E2A\u70B9");else if(C.length===1){f.tooltip.showAt(v.endPosition,"\u70B9\u51FB\u6DFB\u52A0\u7B2C\u4E8C\u4E2A\u70B9");let E=f._getPosition.getMousePosition(v,[x,y]);if(!E)return;C.pop(),C.push(E)}else{f.tooltip.showAt(v.endPosition,"\u70B9\u51FB\u6DFB\u52A0\u70B9\uFF0C\u53F3\u952E\u7ED3\u675F\u7ED8\u5236");let E=f._getPosition.getMousePosition(v,[x,y]);if(!E)return;if(C.pop(),C.push(E),o.showSize){f.clearLastSizeData();let I=f.showSizeData("polygon",C);y&&(y.sizeData=I)}}},this._cesium.ScreenSpaceEventType.MOUSE_MOVE),this.end=function(v){if(f.drawHandler.destroy(),f.drawHandler=void 0,f.tooltip.show(!1),x&&m.entities.remove(x),f.clearAllSizeData(),setTimeout(function(){lt.states=0},100),f._core.mouse(f._viewer.container,0,"0"),f.end=void 0,v==="cancel"){y&&(m.entities.remove(y),f.SimpleGraphicObj.pop());return}A&&typeof A=="function"&&A(y,C)},this.drawHandler.setInputAction(v=>{f.end()},this._cesium.ScreenSpaceEventType.RIGHT_CLICK),this};zo.prototype.createTriangle=function(o={},A){let f=this,m=this._viewer;this.drawHandler&&(this.drawHandler.destroy(),this.drawHandler=void 0),this.drawHandler=new this._cesium.ScreenSpaceEventHandler(m.scene.canvas),lt.states=1;let C=[],y,x;this.drawHandler.setInputAction(B=>{let T=f._getPosition.getMousePosition(B,x);!T||(y?(C=v(y,T),this.end()):(y=T,C=[T,T,T]),C.length&&!x&&(o.clampToGround=f._core.defaultValue(o.clampToGround,!0),x=m.entities.add({id:f._core.getuid(),name:"\u65B0\u5EFA\u4E09\u89D2\u5F62",polygon:{hierarchy:new f._cesium.CallbackProperty(function(){return new f._cesium.PolygonHierarchy(C)},!1),material:new f._cesium.ImageMaterialProperty({image:null,repeat:new f._cesium.Cartesian2(1,1),color:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.color,"rgba(0,255,0,0.6)"))}),perPositionHeight:!f._core.defaultValue(o.clampToGround,!1),heightReference:o.clampToGround?1:0,outline:f._core.defaultValue(o.outline,!1),outlineColor:f._cesium.Color.WHITE.withAlpha(.6),distanceDisplayCondition:new f._cesium.DistanceDisplayCondition(0,1e8)}}),f.SimpleGraphicObj.push(x.id)))},this._cesium.ScreenSpaceEventType.LEFT_CLICK),this.drawHandler.setInputAction(B=>{if(!y)f.tooltip.showAt(B.endPosition,"\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236");else{f.tooltip.showAt(B.endPosition,"\u518D\u6B21\u70B9\u51FB\u7ED3\u675F\u7ED8\u5236");let T=f._getPosition.getMousePosition(B,x);if(!T)return;C=v(y,T)}},this._cesium.ScreenSpaceEventType.MOUSE_MOVE),this.end=function(B){if(f.drawHandler.destroy(),f.drawHandler=void 0,f.tooltip.show(!1),setTimeout(function(){lt.states=0},100),f._core.mouse(f._viewer.container,0),f.end=void 0,B==="cancel"){x&&(m.entities.remove(x),f.SimpleGraphicObj.pop());return}A&&typeof A=="function"&&A(x)},this.drawHandler.setInputAction(B=>{f.end()},this._cesium.ScreenSpaceEventType.RIGHT_CLICK);function v(B,T){let D=[],F=f.toDegrees(B),L=f.toDegrees(T),R=Q(F.lat,F.lon,L.lat,L.lon),k=R.angle,U=R.distance;D.push(L.lon,L.lat);let V=w(F.lat,F.lon,U,k+120);return D.push(V[0],V[1]),V=w(F.lat,F.lon,U,k-120),D.push(V[0],V[1]),Li.Cartesian3.fromDegreesArray(D)}let E=6378137,I=6356725;function w(B,T,D,F){let L=D*Math.sin(F*Math.PI/180),R=D*Math.cos(F*Math.PI/180),k=I+(E-I)*(90-B)/90,U=k*Math.cos(B*Math.PI/180),V=(L/U+T*Math.PI/180)*180/Math.PI,H=(R/k+B*Math.PI/180)*180/Math.PI;return[V,H]}function Q(B,T,D,F){let L=M(B),R=M(D),k=M(D)-M(B),U=M(F)-M(T),V=2*Math.asin(Math.sqrt(Math.pow(Math.sin(k/2),2)+Math.cos(L)*Math.cos(R)*Math.pow(Math.sin(U/2),2)));return V=V*E,V=Math.round(V*1e4)/1e4,{angle:f._core.TwoPointAzimuth(T,B,F,D),distance:V}}function M(B){return B*Math.PI/180}return this};zo.prototype.createPolygonRectangle=function(o={},A){let f=this,m=this._viewer;this.drawHandler&&(this.drawHandler.destroy(),this.drawHandler=void 0),this.drawHandler=new this._cesium.ScreenSpaceEventHandler(m.scene.canvas),lt.states=1;let C=[],y,x,v;return this.drawHandler.setInputAction(E=>{let I=f._getPosition.getMousePosition(E,y);!I||(C.length?f.end():(x=E.position,C.push(I.clone(),I.clone(),I.clone(),I.clone())),y||(o.clampToGround=f._core.defaultValue(o.clampToGround,!0),y=m.entities.add({id:f._core.getuid(),name:"\u65B0\u5EFA\u9762",polygon:{hierarchy:new f._cesium.CallbackProperty(function(){return new f._cesium.PolygonHierarchy(C)},!1),material:new f._cesium.ImageMaterialProperty({image:null,repeat:new f._cesium.Cartesian2(1,1),color:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.color,"rgba(0,255,0,0.6)"))}),perPositionHeight:!f._core.defaultValue(o.clampToGround,!1),heightReference:o.clampToGround?1:0,outline:f._core.defaultValue(o.outline,!1),outlineColor:f._cesium.Color.WHITE.withAlpha(.6),distanceDisplayCondition:new f._cesium.DistanceDisplayCondition(0,1e8)}})))},this._cesium.ScreenSpaceEventType.LEFT_CLICK),this.drawHandler.setInputAction(E=>{if(C.length===0)f.tooltip.showAt(E.endPosition,"\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236");else{f.tooltip.showAt(E.endPosition,"\u70B9\u51FB\u7ED3\u675F\u7ED8\u5236"),x=m.scene.cartesianToCanvasCoordinates(C[0]),v=E.endPosition;let I={x:x.x,y:v.y},w={x:v.x,y:x.y},Q=f._getPosition.getMousePosition(I,y);Q&&(C[1]=Q),Q=f._getPosition.getMousePosition(v,y),Q&&(C[2]=Q),Q=f._getPosition.getMousePosition(w,y),Q&&(C[3]=Q)}},this._cesium.ScreenSpaceEventType.MOUSE_MOVE),this.end=function(E){if(f.drawHandler.destroy(),f.drawHandler=void 0,f.tooltip.show(!1),setTimeout(function(){lt.states=0},100),f._core.mouse(f._viewer.container,0,"0"),f.end=void 0,E==="cancel"){y&&m.entities.remove(y);return}A&&typeof A=="function"&&A(y,x,v)},this};zo.prototype.addPolygon=function(o={}){let A=this,f=this._viewer,m=o.positions,C;o.hierarchy?C=o.hierarchy:C=new A._cesium.PolygonHierarchy(m),o.clampToGround=A._core.defaultValue(o.clampToGround,!0);let y=f.entities.add({id:A._core.defaultValue(o.id,A._core.getuid()),name:A._core.defaultValue(o.name,"\u65B0\u5EFA\u9762"),polygon:{hierarchy:new A._cesium.CallbackProperty(function(){return C},!1),material:new A._cesium.ImageMaterialProperty({image:A._core.defaultValue(o.image,null),repeat:A._core.defaultValue(o.repeat,new A._cesium.Cartesian2(1,1)),color:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.color,"rgba(0,255,0,0.6)"))}),outline:A._core.defaultValue(o.outline,!1),outlineColor:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.outlineColor,"rgba(255,255,255,0.6)")),perPositionHeight:!A._core.defaultValue(o.clampToGround,!1),heightReference:o.clampToGround?1:0,distanceDisplayCondition:A._core.defaultValue(o.distanceDisplayCondition,new A._cesium.DistanceDisplayCondition(0,1e8))}});return A.SimpleGraphicObj.push(y.id),y};zo.prototype.addPolygonPrimitive=function(o={}){let A=this,f=this._viewer,m=o.positions,C;o.hierarchy?C=o.hierarchy:C=new A._cesium.PolygonHierarchy(m);let y,x=new A._cesium.PolygonGeometry({height:A._core.defaultValue(o.height,void 0),extrudedHeight:A._core.defaultValue(o.extrudedHeight,void 0),polygonHierarchy:C,vertexFormat:o.water?Li.EllipsoidSurfaceAppearance.VERTEX_FORMAT:void 0}),v=A._cesium.PolygonGeometry.createGeometry(x),E=A._cesium.Color.fromCssColorString(A._core.defaultValue(o.color,"rgba(0,255,0,0.6)")),I=new Li.GeometryInstance({id:A._core.defaultValue(o.id,A._core.getuid()),geometry:v,attributes:o.water?void 0:{color:new A._cesium.ColorGeometryInstanceAttribute.fromColor(E)}}),w;if(o.water)w=new Li.Primitive({geometryInstances:I,appearance:new Li.EllipsoidSurfaceAppearance({material:new Li.Material({fabric:{type:"Water",uniforms:{baseWaterColor:o.watherColor||Li.Color.SKYBLUE.withAlpha(.6),blendColor:o.watherColor||Li.Color.SKYBLUE.withAlpha(.6),normalMap:o.url,frequency:o.frequency||1e3,animationSpeed:o.watherSpeed||.01,amplitude:o.amplitude||10}}})}),show:!0});else if(w=new A._cesium.Primitive({geometryInstances:I,appearance:new A._cesium.PerInstanceColorAppearance({translucent:!0}),shadows:o.shadows}),o.extrudedHeight){y=new Li.PrimitiveCollection;let Q=new Li.PolygonOutlineGeometry({height:A._core.defaultValue(o.height,void 0),polygonHierarchy:C,extrudedHeight:o.extrudedHeight}),M=Li.PolygonOutlineGeometry.createGeometry(Q),B=A._cesium.Color.fromCssColorString(A._core.defaultValue(o.outlineColor,"rgba(255,255,255,0.6)")),T=new Li.GeometryInstance({id:A._core.defaultValue(o.id,A._core.getuid()),geometry:M,attributes:{color:new A._cesium.ColorGeometryInstanceAttribute.fromColor(B)}}),D=new A._cesium.Primitive({geometryInstances:T,appearance:new A._cesium.PolylineColorAppearance({flat:!0,translucent:!0,faceForward:!0,closed:!0})});y.add(w),y.add(D)}return!y&&(y=w),this.PrimitiveCollection.add(y),y};zo.prototype.createRectangle=function(o={},A){let f=this,m=this._viewer;this.drawHandler&&(this.drawHandler.destroy(),this.drawHandler=void 0),this.drawHandler=new this._cesium.ScreenSpaceEventHandler(m.scene.canvas),lt.states=1;let C=[],y;return this.drawHandler.setInputAction(x=>{let v=f._getPosition.getMousePosition(x,y);if(!!v&&(C.length===0?C.push(v,v):(C.pop(),C.push(v),f.end()),!y)){let E=f.toDegrees(C[0]);o.clampToGround=f._core.defaultValue(o.clampToGround,!0),y=m.entities.add({id:f._core.getuid(),name:"\u65B0\u5EFA\u77E9\u5F62",rectangle:{coordinates:new f._cesium.CallbackProperty(function(){return f._cesium.Rectangle.fromCartesianArray(C)},!1),material:new f._cesium.ImageMaterialProperty({image:null,repeat:new f._cesium.Cartesian2(1,1),color:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.color,"rgba(0,255,0,0.6)"))}),height:o.clampToGround?void 0:E.height,heightReference:o.clampToGround?1:0,outline:!0,outlineColor:f._cesium.Color.WHITE.withAlpha(.6),outlineWidth:1,distanceDisplayCondition:new f._cesium.DistanceDisplayCondition(0,1e8)}}),y.thisHeight=E.height,f.SimpleGraphicObj.push(y.id)}},this._cesium.ScreenSpaceEventType.LEFT_CLICK),this.drawHandler.setInputAction(x=>{if(C.length>0){f.tooltip.showAt(x.endPosition,"\u518D\u6B21\u70B9\u51FB\u7ED3\u675F\u7ED8\u5236\uFF0C\u53F3\u952E\u53D6\u6D88");let v=f._getPosition.getMousePosition(x,y);v&&(C.pop(),C.push(v),o.showSize&&(f.clearLastSizeData(),f.showSizeData("rectangle",C)))}else f.tooltip.showAt(x.endPosition,"\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236")},this._cesium.ScreenSpaceEventType.MOUSE_MOVE),this.drawHandler.setInputAction(x=>{this.end("cancel")},this._cesium.ScreenSpaceEventType.RIGHT_CLICK),this.end=x=>{if(this.end=void 0,f.drawHandler.destroy(),f.drawHandler=void 0,f.tooltip.show(!1),f.clearAllSizeData(),setTimeout(function(){lt.states=0},100),f._core.mouse(f._viewer.container,0,"0"),x==="cancel"){y&&(m.entities.remove(y),f.SimpleGraphicObj.pop());return}A&&typeof A=="function"&&A(y)},this};zo.prototype.addRectangle=function(o={}){let A=this,f=this._viewer,m=o.positions,C;o.coordinates?C=o.coordinates:C=A._cesium.Rectangle.fromCartesianArray(m);let y=f.entities.add({id:A._core.defaultValue(o.id,A._core.getuid()),name:A._core.defaultValue(o.name,"\u65B0\u5EFA\u77E9\u5F62"),rectangle:{coordinates:new A._cesium.CallbackProperty(function(){return C},!1),material:new A._cesium.ImageMaterialProperty({image:A._core.defaultValue(o.image,null),repeat:A._core.defaultValue(o.repeat,new A._cesium.Cartesian2(1,1)),color:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.color,"rgba(0,255,0,0.6)"))}),height:A._core.defaultValue(o.height,void 0),rotation:A._core.defaultValue(o.rotation,0),heightReference:A._core.defaultValue(o.heightReference,1),outline:A._core.defaultValue(o.outline,!1),outlineWidth:1,outlineColor:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.outlineColor,"rgba(255,255,255,0.6)")),distanceDisplayCondition:A._core.defaultValue(o.distanceDisplayCondition,new A._cesium.DistanceDisplayCondition(0,1e8))}});return A.SimpleGraphicObj.push(y.id),y};zo.prototype.createCircle=function(o={},A){let f=this,m=this._viewer;this.drawHandler&&(this.drawHandler.destroy(),this.drawHandler=void 0),this.drawHandler=new this._cesium.ScreenSpaceEventHandler(m.scene.canvas),lt.states=1;let C=[],y,x=0;return this.drawHandler.setInputAction(v=>{let E=f._getPosition.getMousePosition(v,y);if(!!E&&(C.length===0?C.push(E,E):(C[0]=E,x=f._cesium.Cartesian3.distance(C[0],C[1]),f.end()),!y)){let I=f.toDegrees(C[1]);o.clampToGround=f._core.defaultValue(o.clampToGround,!0),y=m.entities.add({id:f._core.getuid(),name:"\u65B0\u5EFA\u5706",position:C[1],ellipse:{semiMajorAxis:new f._cesium.CallbackProperty(function(){return x},!1),semiMinorAxis:new f._cesium.CallbackProperty(function(){return x},!1),material:new f._cesium.ImageMaterialProperty({image:null,repeat:new f._cesium.Cartesian2(1,1),color:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.color,"rgba(0,255,0,0.6)"))}),height:o.clampToGround?void 0:I.height,heightReference:o.clampToGround?1:0,outline:!0,outlineWidth:1,outlineColor:f._cesium.Color.WHITE.withAlpha(.6),distanceDisplayCondition:new f._cesium.DistanceDisplayCondition(0,1e8)}}),y.thisHeight=I.height,f.SimpleGraphicObj.push(y.id)}},this._cesium.ScreenSpaceEventType.LEFT_CLICK),this.drawHandler.setInputAction(v=>{if(C.length>0){f.tooltip.showAt(v.endPosition,"\u518D\u6B21\u70B9\u51FB\u7ED3\u675F\u7ED8\u5236\uFF0C\u53F3\u952E\u53D6\u6D88");let E=f._getPosition.getMousePosition(v,y);E&&(C[0]=E,x=f._cesium.Cartesian3.distance(C[0],C[1]),o.showSize&&(f.clearLastSizeData(),f.showSizeData("circle",C[1],x)))}else f.tooltip.showAt(v.endPosition,"\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236")},this._cesium.ScreenSpaceEventType.MOUSE_MOVE),this.drawHandler.setInputAction(v=>{this.end("cancel")},this._cesium.ScreenSpaceEventType.RIGHT_CLICK),this.end=v=>{if(this.end=void 0,f.drawHandler.destroy(),f.drawHandler=void 0,f.tooltip.show(!1),f.clearAllSizeData(),setTimeout(function(){lt.states=0},100),f._core.mouse(f._viewer.container,0,"0"),v==="cancel"){y&&(m.entities.remove(y),f.SimpleGraphicObj.pop());return}A&&typeof A=="function"&&A(y,{distance:x,positions:C})},this};zo.prototype.addCircle=function(o={}){let A=this,f=this._viewer,m=o.radius,C=f.entities.add({id:A._core.defaultValue(o.id,A._core.getuid()),name:A._core.defaultValue(o.name,"\u65B0\u5EFA\u5706"),position:o.position,ellipse:{semiMajorAxis:new A._cesium.CallbackProperty(function(){return m},!1),semiMinorAxis:new A._cesium.CallbackProperty(function(){return m},!1),material:new A._cesium.ImageMaterialProperty({image:A._core.defaultValue(o.image,null),repeat:A._core.defaultValue(o.repeat,new A._cesium.Cartesian2(1,1)),transparent:!0,color:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.color,o.image?"#ffffff":"rgba(0,255,0,0.6)"))}),height:A._core.defaultValue(o.height,void 0),heightReference:A._core.defaultValue(o.heightReference,o.height?0:1),outline:A._core.defaultValue(o.outline,!1),outlineWidth:1,rotation:o.rotation,stRotation:o.outline,outlineColor:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.outlineColor,"rgba(255,255,255,0.6)")),distanceDisplayCondition:A._core.defaultValue(o.distanceDisplayCondition,new A._cesium.DistanceDisplayCondition(0,1e8))}});return A.SimpleGraphicObj.push(C.id),C};zo.prototype.createEllipse=function(o={},A){let f=this,m=this._viewer;this.drawHandler&&(this.drawHandler.destroy(),this.drawHandler=void 0),this.drawHandler=new this._cesium.ScreenSpaceEventHandler(m.scene.canvas),lt.states=1;let C=[],y,x=0;return this.drawHandler.setInputAction(v=>{let E=f._getPosition.getMousePosition(v,y);if(!!E&&(C.length===0?C.push(E,E):(C[0]=E,x=f._cesium.Cartesian3.distance(C[0],C[1]),f.end()),!y)){let I=f.toDegrees(C[1]);o.clampToGround=f._core.defaultValue(o.clampToGround,!0),y=m.entities.add({id:f._core.getuid(),name:"\u65B0\u5EFA\u692D\u5706",position:C[1],ellipse:{semiMajorAxis:new f._cesium.CallbackProperty(function(){return x},!1),semiMinorAxis:new f._cesium.CallbackProperty(function(){return x/2},!1),material:new f._cesium.ImageMaterialProperty({image:null,repeat:new f._cesium.Cartesian2(1,1),color:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.color,"rgba(0,255,0,0.6)"))}),height:o.clampToGround?void 0:I.height,heightReference:o.clampToGround?1:0,outline:!0,outlineWidth:1,outlineColor:f._cesium.Color.WHITE.withAlpha(.6),distanceDisplayCondition:new f._cesium.DistanceDisplayCondition(0,1e8)}}),y.thisHeight=I.height,f.SimpleGraphicObj.push(y.id)}},this._cesium.ScreenSpaceEventType.LEFT_CLICK),this.drawHandler.setInputAction(v=>{if(C.length>0){f.tooltip.showAt(v.endPosition,"\u518D\u6B21\u70B9\u51FB\u7ED3\u675F\u7ED8\u5236\uFF0C\u53F3\u952E\u53D6\u6D88");let E=f._getPosition.getMousePosition(v,y);E&&(C[0]=E,x=f._cesium.Cartesian3.distance(C[0],C[1]))}else f.tooltip.showAt(v.endPosition,"\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236")},this._cesium.ScreenSpaceEventType.MOUSE_MOVE),this.drawHandler.setInputAction(v=>{this.end("cancel")},this._cesium.ScreenSpaceEventType.RIGHT_CLICK),this.end=v=>{if(this.end=void 0,f.drawHandler.destroy(),f.drawHandler=void 0,f.tooltip.show(!1),f.clearAllSizeData(),setTimeout(function(){lt.states=0},100),f._core.mouse(f._viewer.container,0,"0"),v==="cancel"){y&&(m.entities.remove(y),f.SimpleGraphicObj.pop());return}A&&typeof A=="function"&&A(y)},this};zo.prototype.addEllipse=function(o={}){let A=this,f=this._viewer,m=o.semiMajorAxis,C=o.semiMinorAxis,y=f.entities.add({id:A._core.defaultValue(o.id,A._core.getuid()),name:A._core.defaultValue(o.name,"\u65B0\u5EFA\u5706"),position:o.position,ellipse:{semiMajorAxis:new A._cesium.CallbackProperty(function(){return m},!1),semiMinorAxis:new A._cesium.CallbackProperty(function(){return C},!1),material:new A._cesium.ImageMaterialProperty({image:A._core.defaultValue(o.image,null),repeat:A._core.defaultValue(o.repeat,new A._cesium.Cartesian2(1,1)),color:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.color,"rgba(0,255,0,0.6)"))}),height:A._core.defaultValue(o.height,void 0),heightReference:A._core.defaultValue(o.heightReference,1),outline:A._core.defaultValue(o.outline,!1),outlineWidth:1,outlineColor:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.outlineColor,"rgba(255,255,255,0.6)")),distanceDisplayCondition:A._core.defaultValue(o.distanceDisplayCondition,new A._cesium.DistanceDisplayCondition(0,1e8))}});return A.SimpleGraphicObj.push(y.id),y};zo.prototype.createBox=function(o={},A){let f=this,m=this._viewer;this.drawHandler&&(this.drawHandler.destroy(),this.drawHandler=void 0),this.drawHandler=new this._cesium.ScreenSpaceEventHandler(m.scene.canvas),lt.states=1;let C=[],y,x=[0,0,200];return this.drawHandler.setInputAction(v=>{let E=f._getPosition.getMouseDegrees(v,y);if(!!E){if(C.length===0)C.push(E,E);else{E.height=C[0].height,C[1]=E;let I=f.Cdcl(C[0].lat,C[0].lon,C[0].lat,C[1].lon),w=f.Cdcl(C[0].lat,C[0].lon,C[1].lat,C[0].lon),Q={lon:(C[0].lon+C[1].lon)/2,lat:(C[0].lat+C[1].lat)/2};x&&(x[0]=I,x[1]=w),y.position=Li.Cartesian3.fromDegrees(Q.lon,Q.lat,C[0].height+x[2]/2),f.end()}y||(y=m.entities.add({id:f._core.getuid(),name:"\u65B0\u5EFA\u7ACB\u65B9\u4F53",position:f._cesium.Cartesian3.fromDegrees(E.lon,E.lat,E.height),box:{dimensions:new f._cesium.CallbackProperty(function(){return f._cesium.Cartesian3.fromArray(x)},!1),material:new f._cesium.ImageMaterialProperty({image:null,repeat:new f._cesium.Cartesian2(1,1),color:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.color,"rgba(0,255,0,0.6)"))}),fill:!0,outline:!0,outlineColor:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.outlineColor,"rgba(255,255,255,0.6)")),shadows:f._cesium.ShadowMode.ENABLED,distanceDisplayCondition:new f._cesium.DistanceDisplayCondition(0,1e8)}}),f.SimpleGraphicObj.push(y.id))}},this._cesium.ScreenSpaceEventType.LEFT_CLICK),this.drawHandler.setInputAction(v=>{if(C.length>0){f.tooltip.showAt(v.endPosition,"\u518D\u6B21\u70B9\u51FB\u7ED3\u675F\u7ED8\u5236\uFF0C\u53F3\u952E\u53D6\u6D88");let E=f._getPosition.getMouseDegrees(v,y);if(E){E.height=C[0].height,C[1]=E;let I=f.Cdcl(C[0].lat,C[0].lon,C[0].lat,C[1].lon),w=f.Cdcl(C[0].lat,C[0].lon,C[1].lat,C[0].lon),Q={lon:(C[0].lon+C[1].lon)/2,lat:(C[0].lat+C[1].lat)/2};x&&(x[0]=I,x[1]=w),y.position=Li.Cartesian3.fromDegrees(Q.lon,Q.lat,C[0].height+x[2]/2),o.showSize&&(f.clearLastSizeData(),f.showSizeData("box",y.position,x))}}else f.tooltip.showAt(v.endPosition,"\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236")},this._cesium.ScreenSpaceEventType.MOUSE_MOVE),this.drawHandler.setInputAction(v=>{this.end("cancel")},this._cesium.ScreenSpaceEventType.RIGHT_CLICK),this.end=v=>{if(this.end=void 0,f.drawHandler.destroy(),f.drawHandler=void 0,f.tooltip.show(!1),f.clearAllSizeData(),setTimeout(function(){lt.states=0},100),f._core.mouse(f._viewer.container,0,"0"),v==="cancel"){y&&(m.entities.remove(y),f.SimpleGraphicObj.pop());return}A&&typeof A=="function"&&A(y)},this};zo.prototype.addBox=function(o={}){let A=this,f=this._viewer,m=o.dimensions,C=f.entities.add({id:A._core.defaultValue(o.id,A._core.getuid()),name:A._core.defaultValue(o.name,"\u65B0\u5EFA\u7ACB\u65B9\u4F53"),position:o.position,box:{dimensions:new A._cesium.CallbackProperty(function(){return m},!1),material:new A._cesium.ImageMaterialProperty({image:A._core.defaultValue(o.image,null),repeat:A._core.defaultValue(o.repeat,new A._cesium.Cartesian2(1,1)),color:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.color,"rgba(0,255,0,0.6)"))}),fill:!0,outline:A._core.defaultValue(o.outline,!0),shadows:A._cesium.ShadowMode.ENABLED,outlineColor:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.outlineColor,"rgba(255,255,255,0.6)")),distanceDisplayCondition:A._core.defaultValue(o.distanceDisplayCondition,new A._cesium.DistanceDisplayCondition(0,1e8))}});return A.SimpleGraphicObj.push(C.id),C};zo.prototype.createCylinder=function(o={},A){let f=this,m=this._viewer;this.drawHandler&&(this.drawHandler.destroy(),this.drawHandler=void 0),this.drawHandler=new this._cesium.ScreenSpaceEventHandler(m.scene.canvas),lt.states=1;let C=[],y,x=0;return this.drawHandler.setInputAction(v=>{let E=f._getPosition.getMousePosition(v,y);if(!!E&&(C.length===0?C.push(E,E):(C[0]=E,x=f._cesium.Cartesian3.distance(C[0],C[1]),f.end()),!y)){let I=f.toDegrees(E);y=m.entities.add({id:f._core.getuid(),name:"\u65B0\u5EFA\u5706\u67F1\u4F53",position:f._cesium.Cartesian3.fromDegrees(I.lon,I.lat,I.height+100),cylinder:{length:200,topRadius:new f._cesium.CallbackProperty(function(){return x},!1),bottomRadius:new f._cesium.CallbackProperty(function(){return x},!1),material:new f._cesium.ImageMaterialProperty({image:null,repeat:new f._cesium.Cartesian2(1,1),color:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.color,"rgba(0,255,0,0.6)"))}),fill:!0,shadows:f._cesium.ShadowMode.ENABLED,distanceDisplayCondition:new f._cesium.DistanceDisplayCondition(0,1e8),outline:!0,outlineColor:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.outlineColor,"rgba(255,255,255,0.6)"))}}),y.changeTop=!0,f.SimpleGraphicObj.push(y.id)}},this._cesium.ScreenSpaceEventType.LEFT_CLICK),this.drawHandler.setInputAction(v=>{if(C.length>0){f.tooltip.showAt(v.endPosition,"\u518D\u6B21\u70B9\u51FB\u7ED3\u675F\u7ED8\u5236\uFF0C\u53F3\u952E\u53D6\u6D88");let E=f._getPosition.getMousePosition(v,y);E&&(C[0]=E,x=f._cesium.Cartesian3.distance(C[0],C[1]),o.showSize&&(f.clearLastSizeData(),f.showSizeData("cylinder",C[1],x,200)))}else f.tooltip.showAt(v.endPosition,"\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236")},this._cesium.ScreenSpaceEventType.MOUSE_MOVE),this.drawHandler.setInputAction(v=>{this.end("cancel")},this._cesium.ScreenSpaceEventType.RIGHT_CLICK),this.end=v=>{if(this.end=void 0,f.drawHandler.destroy(),f.drawHandler=void 0,f.tooltip.show(!1),f.clearAllSizeData(),setTimeout(function(){lt.states=0},100),f._core.mouse(f._viewer.container,0,"0"),v==="cancel"){y&&(m.entities.remove(y),f.SimpleGraphicObj.pop());return}A&&typeof A=="function"&&A(y)},this};zo.prototype.addCylinder=function(o={}){let A=this,f=this._viewer,m=o.radius,C=f.entities.add({id:A._core.defaultValue(o.id,A._core.getuid()),name:A._core.defaultValue(o.name,"\u65B0\u5EFA\u5706\u67F1\u4F53"),position:o.position,cylinder:{length:A._core.defaultValue(o.length,200),topRadius:new A._cesium.CallbackProperty(function(){return m},!1),bottomRadius:new A._cesium.CallbackProperty(function(){return m},!1),material:new A._cesium.ImageMaterialProperty({image:A._core.defaultValue(o.image,null),repeat:A._core.defaultValue(o.repeat,new A._cesium.Cartesian2(1,1)),color:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.color,"rgba(0,255,0,0.6)"))}),fill:!0,outline:A._core.defaultValue(o.outline,!0),shadows:A._cesium.ShadowMode.ENABLED,outlineColor:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.outlineColor,"rgba(255,255,255,0.6)")),distanceDisplayCondition:A._core.defaultValue(o.distanceDisplayCondition,new A._cesium.DistanceDisplayCondition(0,1e8))}});return C.changeTop=!0,A.SimpleGraphicObj.push(C.id),C};zo.prototype.createCone=function(o={},A){let f=this,m=this._viewer;this.drawHandler&&(this.drawHandler.destroy(),this.drawHandler=void 0),this.drawHandler=new this._cesium.ScreenSpaceEventHandler(m.scene.canvas),lt.states=1;let C=[],y,x=0;return this.drawHandler.setInputAction(v=>{let E=f._getPosition.getMousePosition(v,y);if(!!E&&(C.length===0?C.push(E,E):(C[0]=E,x=f._cesium.Cartesian3.distance(C[0],C[1]),f.end()),!y)){let I=f.toDegrees(E);y=m.entities.add({id:f._core.getuid(),name:"\u65B0\u5EFA\u5706\u9525\u4F53",position:f._cesium.Cartesian3.fromDegrees(I.lon,I.lat,I.height+100),cylinder:{length:200,topRadius:0,bottomRadius:new f._cesium.CallbackProperty(function(){return x},!1),material:new f._cesium.ImageMaterialProperty({image:null,repeat:new f._cesium.Cartesian2(1,1),color:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.color,"rgba(0,255,0,0.6)"))}),fill:!0,shadows:f._cesium.ShadowMode.ENABLED,distanceDisplayCondition:new f._cesium.DistanceDisplayCondition(0,1e8),outline:!0,outlineColor:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.outlineColor,"rgba(255,255,255,0.6)"))}}),y.changeTop=!1,f.SimpleGraphicObj.push(y.id)}},this._cesium.ScreenSpaceEventType.LEFT_CLICK),this.drawHandler.setInputAction(v=>{if(C.length>0){f.tooltip.showAt(v.endPosition,"\u518D\u6B21\u70B9\u51FB\u7ED3\u675F\u7ED8\u5236\uFF0C\u53F3\u952E\u53D6\u6D88");let E=f._getPosition.getMousePosition(v,y);E&&(C[0]=E,x=f._cesium.Cartesian3.distance(C[0],C[1]),o.showSize&&(f.clearLastSizeData(),f.showSizeData("cone",C[1],x,200)))}else f.tooltip.showAt(v.endPosition,"\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236")},this._cesium.ScreenSpaceEventType.MOUSE_MOVE),this.drawHandler.setInputAction(v=>{this.end("cancel")},this._cesium.ScreenSpaceEventType.RIGHT_CLICK),this.end=v=>{if(this.end=void 0,f.drawHandler.destroy(),f.drawHandler=void 0,f.tooltip.show(!1),f.clearAllSizeData(),setTimeout(function(){lt.states=0},100),f._core.mouse(f._viewer.container,0,"0"),v==="cancel"){y&&(m.entities.remove(y),f.SimpleGraphicObj.pop());return}A&&typeof A=="function"&&A(y)},this};zo.prototype.addCone=function(o={}){let A=this,f=this._viewer,m=o.bottomRadius,C=f.entities.add({id:A._core.defaultValue(o.id,A._core.getuid()),name:A._core.defaultValue(o.name,"\u65B0\u5EFA\u5706\u9525\u4F53"),position:o.position,cylinder:{length:A._core.defaultValue(o.length,200),topRadius:A._core.defaultValue(o.topRadius,0),bottomRadius:new A._cesium.CallbackProperty(function(){return m},!1),material:new A._cesium.ImageMaterialProperty({image:A._core.defaultValue(o.image,null),repeat:A._core.defaultValue(o.repeat,new A._cesium.Cartesian2(1,1)),color:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.color,"rgba(0,255,0,0.6)"))}),fill:!0,outline:A._core.defaultValue(o.outline,!0),shadows:A._cesium.ShadowMode.ENABLED,outlineColor:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.outlineColor,"rgba(255,255,255,0.6)")),distanceDisplayCondition:A._core.defaultValue(o.distanceDisplayCondition,new A._cesium.DistanceDisplayCondition(0,1e8))}});return C.changeTop=!1,A.SimpleGraphicObj.push(C.id),C};zo.prototype.createSphere=function(o={},A){let f=this,m=this._viewer;this.drawHandler&&(this.drawHandler.destroy(),this.drawHandler=void 0),this.drawHandler=new this._cesium.ScreenSpaceEventHandler(m.scene.canvas),lt.states=1;let C=[],y,x=0;return this.drawHandler.setInputAction(v=>{let E=f._getPosition.getMousePosition(v,y);!E||(C.length===0?C.push(E,E):(C[0]=E,x=f._cesium.Cartesian3.distance(C[0],C[1]),f.end()),y||(y=m.entities.add({id:f._core.getuid(),name:"\u65B0\u5EFA\u7403\u4F53",position:E.clone(),ellipsoid:{radii:new f._cesium.CallbackProperty(function(){return new Li.Cartesian3(x,x,x)},!1),material:new f._cesium.ImageMaterialProperty({image:null,repeat:new f._cesium.Cartesian2(1,1),color:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.color,"rgba(0,255,0,0.6)"))}),fill:!0,shadows:f._cesium.ShadowMode.ENABLED,distanceDisplayCondition:new f._cesium.DistanceDisplayCondition(0,1e8),outline:!0,outlineColor:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.outlineColor,"rgba(255,255,255,0.6)"))}}),y.isSphere=!0,f.SimpleGraphicObj.push(y.id)))},this._cesium.ScreenSpaceEventType.LEFT_CLICK),this.drawHandler.setInputAction(v=>{if(C.length>0){f.tooltip.showAt(v.endPosition,"\u518D\u6B21\u70B9\u51FB\u7ED3\u675F\u7ED8\u5236\uFF0C\u53F3\u952E\u53D6\u6D88");let E=f._getPosition.getMousePosition(v,y);E&&(C[0]=E,x=f._cesium.Cartesian3.distance(C[0],C[1]),o.showSize&&(f.clearLastSizeData(),f.showSizeData("sphere",C[1],x)))}else f.tooltip.showAt(v.endPosition,"\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236")},this._cesium.ScreenSpaceEventType.MOUSE_MOVE),this.drawHandler.setInputAction(v=>{this.end("cancel")},this._cesium.ScreenSpaceEventType.RIGHT_CLICK),this.end=v=>{if(this.end=void 0,f.drawHandler.destroy(),f.drawHandler=void 0,f.tooltip.show(!1),f.clearAllSizeData(),setTimeout(function(){lt.states=0},100),f._core.mouse(f._viewer.container,0,"0"),v==="cancel"){y&&(m.entities.remove(y),f.SimpleGraphicObj.pop());return}let E=f.toDegrees(C[0]),I=f.toDegrees(C[1]);E.height=I.height,C[0]=Li.Cartesian3.fromDegrees(E.lon,E.lat,E.height),A&&typeof A=="function"&&A(y)},this};zo.prototype.addSphere=function(o={}){let A=this,f=this._viewer,m=o.radius,C;o.radii?C=o.radii:C=new Li.Cartesian3(m,m,m);let y=f.entities.add({id:A._core.defaultValue(o.id,A._core.getuid()),name:A._core.defaultValue(o.name,"\u65B0\u5EFA\u7403\u4F53"),position:o.position,ellipsoid:{radii:new A._cesium.CallbackProperty(function(){return C},!1),material:new A._cesium.ImageMaterialProperty({image:A._core.defaultValue(o.image,null),repeat:A._core.defaultValue(o.repeat,new A._cesium.Cartesian2(1,1)),color:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.color,"rgba(0,255,0,0.6)"))}),fill:!0,outline:A._core.defaultValue(o.outline,!0),shadows:A._cesium.ShadowMode.ENABLED,outlineColor:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.outlineColor,"rgba(255,255,255,0.6)")),distanceDisplayCondition:A._core.defaultValue(o.distanceDisplayCondition,new A._cesium.DistanceDisplayCondition(0,1e8))}});return y.isSphere=!0,A.SimpleGraphicObj.push(y.id),y};zo.prototype.createPolyhedron=function(o={},A){let f=this,m=this._viewer;this.drawHandler&&(this.drawHandler.destroy(),this.drawHandler=void 0),this.drawHandler=new this._cesium.ScreenSpaceEventHandler(m.scene.canvas),lt.states=1;let C=[],y;return this.drawHandler.setInputAction(x=>{let v=f._getPosition.getMousePosition(x,y);if(!!v&&(C.length===1&&C.push(v.clone()),C.push(v),C.length===3&&!y)){let E=f.toDegrees(C[0]);y=m.entities.add({id:f._core.getuid(),name:"\u65B0\u5EFA\u591A\u8FB9\u4F53",polygon:{hierarchy:new f._cesium.CallbackProperty(function(){return new f._cesium.PolygonHierarchy(C)},!1),extrudedHeight:E.height+200,height:E.height,material:new f._cesium.ImageMaterialProperty({image:null,repeat:new f._cesium.Cartesian2(1,1),color:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.color,"rgba(0,255,0,0.6)"))}),fill:!0,shadows:f._cesium.ShadowMode.ENABLED,distanceDisplayCondition:new f._cesium.DistanceDisplayCondition(0,1e8),outline:!0,outlineColor:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.outlineColor,"rgba(255,255,255,0.6)"))}}),f.SimpleGraphicObj.push(y.id)}},this._cesium.ScreenSpaceEventType.LEFT_CLICK),this.drawHandler.setInputAction(x=>{if(C.length===0)f.tooltip.showAt(x.endPosition,"\u70B9\u51FB\u6DFB\u52A0\u7B2C\u4E00\u4E2A\u70B9");else if(C.length===1)f.tooltip.showAt(x.endPosition,"\u70B9\u51FB\u6DFB\u52A0\u7B2C\u4E8C\u4E2A\u70B9");else{f.tooltip.showAt(x.endPosition,"\u70B9\u51FB\u6DFB\u52A0\u70B9\uFF0C\u53F3\u952E\u7ED3\u675F\u7ED8\u5236");let v=f._getPosition.getMousePosition(x,y);if(!v)return;C.pop(),C.push(v),o.showSize&&(f.clearLastSizeData(),f.showSizeData("polyhedron",C,0,200))}},this._cesium.ScreenSpaceEventType.MOUSE_MOVE),this.end=function(x){if(f.drawHandler.destroy(),f.drawHandler=void 0,f.tooltip.show(!1),f.clearAllSizeData(),setTimeout(function(){lt.states=0},100),f._core.mouse(f._viewer.container,0,"0"),f.end=void 0,x==="cancel"){y&&(m.entities.remove(y),f.SimpleGraphicObj.pop());return}A&&typeof A=="function"&&A(y)},this.drawHandler.setInputAction(x=>{f.end()},this._cesium.ScreenSpaceEventType.RIGHT_CLICK),this};zo.prototype.addPolyhedron=function(o={}){let A=this,f=this._viewer,m=o.positions,C=A._core.defaultValue(o.height,0),y;o.hierarchy?y=o.hierarchy:y=new A._cesium.PolygonHierarchy(m);let x=f.entities.add({id:A._core.defaultValue(o.id,A._core.getuid()),name:A._core.defaultValue(o.name,"\u65B0\u5EFA\u591A\u8FB9\u4F53"),polygon:{hierarchy:new A._cesium.CallbackProperty(function(){return y},!1),extrudedHeight:A._core.defaultValue(o.extrudedHeight,C+200),height:C,material:new A._cesium.ImageMaterialProperty({image:A._core.defaultValue(o.image,null),repeat:A._core.defaultValue(o.repeat,new A._cesium.Cartesian2(1,1)),color:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.color,"rgba(0,255,0,0.6)"))}),shadows:A._cesium.ShadowMode.ENABLED,fill:!0,outline:A._core.defaultValue(o.outline,!0),outlineColor:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.outlineColor,"rgba(255,255,255,0.6)")),distanceDisplayCondition:A._core.defaultValue(o.distanceDisplayCondition,new A._cesium.DistanceDisplayCondition(0,1e8))}});return A.SimpleGraphicObj.push(x.id),x};zo.prototype.toDegrees=function(o){let A=this._cesium.Cartographic.fromCartesian(o);return{lon:this._cesium.Math.toDegrees(A.longitude),lat:this._cesium.Math.toDegrees(A.latitude),height:A.height}};zo.prototype.showSizeData=function(o,A,f,m){let C="",y,x=language?language.getStr("draw_tip_info_radius"):"\u534A\u5F84",v=language?language.getStr("unit_m"):"\u7C73",E=language?language.getStr("unit_km"):"\u5343\u7C73";switch(o){case"polyline":let M=Li.Cartesian3.distance(A[0],A[1]);M>=1e3?(M/=1e3,C=M.toFixed(2)+E):C=M.toFixed(2)+v,y=Li.Cartesian3.midpoint(A[0],A[1],new Li.Cartesian3);break;case"polygon":var w=[];y=new Li.Cartesian3,A.forEach(k=>{y=Li.Cartesian3.add(k,y,new Li.Cartesian3);let U=this.toDegrees(k);w.push([U.lon,U.lat])}),y=Li.Cartesian3.divideByScalar(y,A.length,new Li.Cartesian3),C=this._core.getArea(w,A);break;case"rectangle":let B=this.toDegrees(A[0]),T=this.toDegrees(A[1]),D=Li.Cartesian3.distance(A[0],Li.Cartesian3.fromDegrees(B.lon,T.lat,B.height)),F=Li.Cartesian3.distance(A[1],Li.Cartesian3.fromDegrees(B.lon,T.lat,B.height));var I=D*F;I>=1e6?(I/=1e6,C=I.toFixed(2)+"\u5E73\u65B9\u5343\u7C73"):C=I.toFixed(2)+"\u5E73\u65B9\u7C73",y=Li.Cartesian3.midpoint(A[0],A[1],new Li.Cartesian3);break;case"circle":y=A,f>=1e3?(f/=1e3,C=x+":"+f.toFixed(2)+E):C=x+":"+f.toFixed(2)+v;break;case"box":let L=[];f[0]<f[1]?(L.push(f[1]),L.push(f[0])):(L.push(f[0]),L.push(f[1])),L.push(f[2]);let R=["\u957F\uFF1A",`
           </div>`,$(".cesium-viewer").append(k),B=document.getElementById(R.id)),R.description?B.style.transform="matrix(1, 0, 0, 1, "+T.x+", "+(T.y-157)+")":B.style.transform="matrix(1, 0, 0, 1, "+T.x+", "+(T.y-134)+")"}F&&(C||v.setVisibility(!1),F=!1)},v.item=Q,""},E.addTo(this._viewer),C||this.setVisibility(!1),this._core.isnull(f.id)&&(f.id=this._core.getuid()),this._core.isnull(o)&&(o="\u5BCC\u6587\u672C"+f.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var I={id:f.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"DivPoint",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this.setTreeobj(I),this._tree.insertGroupId(I,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};gf.prototype.createModelGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y){var x={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:this._core.defaultValue(A.srs,"EPSG:4490")+":{z}",TILEMATRIXSET:this._core.defaultValue(A.srs,"EPSG:4490"),FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,Cesium:this._cesium},v=this,E=f.material;!v._core.isnull(f)&&!v._core.isnull(f.color)&&(/^\[/.test(f.color)&&f.color.toString().charAt(0)=="["&&f.color.toString().charAt(f.color.length-1)=="]"||(v._core.isHtmlColor(f.color)?f.color=v._color.colorFromHtmlColor(f.color):(/^rgb/.test(f.color)&&(f.color=v._color.rgbaStringToRgbaObj(f.color)),f.color.r>1&&(f.color.r=f.color.r/255),f.color.g>1&&(f.color.g=f.color.g/255),f.color.b>1&&(f.color.b=f.color.b/255),f.color.a>1&&(f.color.a=f.color.a/255),f.color=v._color.createColor(f.color.r,f.color.g,f.color.b,f.color.a)))),this._urlTemplate=A.url+"?"+this._core._serialize(x.urlParams);var I=A.url+"?"+this._core._serialize(x.urlParams);this._Provider=new Ts(this._viewer,this._cesium),this._Provider._normalTile=f.level_max-1,this._Provider._minimumHeight=parseFloat(f.height)||0,this._Provider.loadTile=function(B,T){if(T.state===un.QuadtreeTileLoadState.START){if(T.data={lines:[],geometryPrimitive:void 0},T.level>=f.level_min&&T.level<f.level_max&&v.item.show){var D=I.replace(window.encodeURIComponent("{x}"),T.x).replace(window.encodeURIComponent("{y}"),T.y).replace(window.encodeURIComponent("{z}"),T.level);v._cache&&(D+="&"+v._core.getuid()),v._core.xhr({url:D,type:"get",dataType:"json",success:function(F){if(F==null){T.state=un.QuadtreeTileLoadState.DONE,T.renderable=!0;return}var L={url:"",modelMatrix:v._cesium.Transforms.eastNorthUpToFixedFrame(origin),color:v._cesium.Color.DARKSALMON,scale:2},R=v._core.extend(L,f,!0);v._core.isnull(f.near)&&(f.near=0),v._core.isnull(f.far)&&(f.far=999999999);var k=parseFloat(f.near),U=parseFloat(f.far),V=new v._cesium.DistanceDisplayCondition(k,U);R.distanceDisplayCondition=V;var H=new v._cesium.PrimitiveCollection;F.features.forEach(function(q){R.id=q;var ie=R.height;if(q.properties.height!=null&&(ie=parseFloat(q.properties.height)),/^\[/.test(R.height)&&/\]$/.test(R.height)){var Z=R.height.replace(/\[/,"").replace(/\]/,"");ie=parseFloat(q.properties[Z])}R.modelMatrix=v._cesium.Transforms.eastNorthUpToFixedFrame(v._cesium.Cartesian3.fromDegrees(q.geometry.coordinates[0],q.geometry.coordinates[1],ie));var oe=v._cesium.Model.fromGltf({id:q,url:R.uri,color:R.color,modelMatrix:R.modelMatrix,scale:R.scale,heightReference:parseInt(R.heightReference),distanceDisplayCondition:R.distanceDisplayCondition});H.add(oe)}),F.features.length==0&&(T.state=un.QuadtreeTileLoadState.DONE,T.renderable=!0),T.data.geometryPrimitive=H,T.state=un.QuadtreeTileLoadState.LOADING,T.state===un.QuadtreeTileLoadState.LOADING&&(T.data.geometryPrimitive.update(B,[]),T.state=un.QuadtreeTileLoadState.DONE,T.renderable=!0)},error:function(){T.count==null&&(T.count=0),T.count+=1,T.count>=2?(T.state=un.QuadtreeTileLoadState.DONE,T.renderable=!0):T.state=un.QuadtreeTileLoadState.START}})}else{T.state=un.QuadtreeTileLoadState.DONE,T.renderable=!0;return}T.state=un.QuadtreeTileLoadState.LOADING}},this._primitive=new this._cesium.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:3});var w=this._viewer.scene,Q=w.primitives;Q.add(this._primitive),C||this.setVisibility(!1),this._core.isnull(f.id)&&(f.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+f.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var M={id:f.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this.setTreeobj(M),this._tree.insertGroupId(M,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};gf.prototype.createPointGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y){var x={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:this._core.defaultValue(A.srs,"EPSG:4490")+":{z}",TILEMATRIXSET:this._core.defaultValue(A.srs,"EPSG:4490"),FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium},v=this;!v._core.isnull(f)&&!v._core.isnull(f.color)&&(/^\[/.test(f.color)&&f.color.toString().charAt(0)=="["&&f.color.toString().charAt(f.color.length-1)=="]"||(v._core.isHtmlColor(f.color)?f.color=v._color.colorFromHtmlColor(f.color):(/^rgb/.test(f.color)&&(f.color=v._color.rgbaStringToRgbaObj(f.color)),f.color.r>1&&(f.color.r=f.color.r/255),f.color.g>1&&(f.color.g=f.color.g/255),f.color.b>1&&(f.color.b=f.color.b/255),f.color.a>1&&(f.color.a=f.color.a/255),f.color=v._color.createColor(f.color.r,f.color.g,f.color.b,f.color.a)))),!v._core.isnull(f)&&!v._core.isnull(f.outlineColor)&&(/^\[/.test(f.outlineColor)&&f.outlineColor.toString().charAt(0)=="["&&f.outlineColor.toString().charAt(f.outlineColor.length-1)=="]"||(v._core.isHtmlColor(f.outlineColor)?f.outlineColor=v._color.colorFromHtmlColor(f.outlineColor):(/^rgb/.test(f.outlineColor)&&(f.outlineColor=v._color.rgbaStringToRgbaObj(f.outlineColor)),f.outlineColor.r>1&&(f.outlineColor.r=f.outlineColor.r/255),f.outlineColor.g>1&&(f.outlineColor.g=f.outlineColor.g/255),f.outlineColor.b>1&&(f.outlineColor.b=f.outlineColor.b/255),f.outlineColor.a>1&&(f.outlineColor.a=f.outlineColor.a/255),f.outlineColor=v._color.createColor(f.outlineColor.r,f.outlineColor.g,f.outlineColor.b,f.outlineColor.a)))),this._urlTemplate=A.url+"?"+this._core._serialize(x.urlParams);var E=A.url+"?"+this._core._serialize(x.urlParams);this._Provider=new Ts(this._viewer,this._cesium),this._Provider._normalTile=f.level_max-1,this._Provider._minimumHeight=parseFloat(f.height)||0,this._Provider.loadTile=function(M,B){if(B.state===un.QuadtreeTileLoadState.START){if(B.data={lines:[],geometryPrimitive:void 0},B.level>=f.level_min&&B.level<f.level_max&&v.item.show){var T=E.replace(window.encodeURIComponent("{x}"),B.x).replace(window.encodeURIComponent("{y}"),B.y).replace(window.encodeURIComponent("{z}"),B.level);v._cache&&(T+="&"+v._core.getuid()),v._core.xhr({url:T,type:"get",dataType:"json",success:function(D){if(D==null){B.state=un.QuadtreeTileLoadState.DONE,B.renderable=!0;return}var F={Name:"",text:"",font:" 30px sans-serif",pixelSize:10,style:v._cesium.LabelStyle.OUTLINE,fillColor:v._cesium.Color.WHITE,outlineColor:v._cesium.Color.BLACK,outlineWidth:1,show:!0,showBackground:!1,backgroundColor:new v._cesium.Color(.165,.165,.165,.8),backgroundPadding:new v._cesium.Cartesian2(7,5),scale:1,horizontalOrigin:v._cesium.HorizontalOrigin.CENTER,verticalOrigin:v._cesium.VerticalOrigin.CENTER,eyeOffset:v._cesium.Cartesian3.ZERO,pixelOffset:v._cesium.Cartesian2.ZERO,heightReference:v._cesium.HeightReference.NONE,scaleByDistance:new v._cesium.NearFarScalar(0,0,1,1)},L=f.material;!v._core.isnull(f)&&!v._core.isnull(f.backgroundColor)&&(/^\[/.test(f.backgroundColor)&&f.backgroundColor.toString().charAt(0)=="["&&f.backgroundColor.toString().charAt(f.backgroundColor.length-1)=="]"||(v._core.isHtmlColor(f.backgroundColor)?f.backgroundColor=v._color.colorFromHtmlColor(f.backgroundColor):(/^rgb/.test(f.backgroundColor)&&(f.backgroundColor=v._color.rgbaStringToRgbaObj(f.backgroundColor)),f.backgroundColor.r>1&&(f.backgroundColor.r=f.backgroundColor.r/255),f.backgroundColor.g>1&&(f.backgroundColor.g=f.backgroundColor.g/255),f.backgroundColor.b>1&&(f.backgroundColor.b=f.backgroundColor.b/255),f.backgroundColor.a>1&&(f.backgroundColor.a=f.backgroundColor.a/255),f.backgroundColor=v._color.createColor(f.backgroundColor.r,f.backgroundColor.g,f.backgroundColor.b,f.backgroundColor.a))));var R=v._core.extend(F,f,!0);v._core.isnull(f.near)&&(f.near=0),v._core.isnull(f.far)&&(f.far=999999999);var k=parseFloat(f.near),U=parseFloat(f.far),V=new v._cesium.DistanceDisplayCondition(k,U);R.distanceDisplayCondition=V,v._core.isnull(f.font_size)&&(f.font_size="30px"),v._core.isnull(f.font_family)&&(f.font_family=" sans-serif"),R.font=parseFloat(f.font_size)+"px "+f.font_family;var H=new v._cesium.PointPrimitiveCollection;D.features.forEach(function(q){R.id=q;var ie=0;if(/^\[/.test(R.pointHeight)&&/\]$/.test(R.pointHeight)){var Z=R.pointHeight.replace(/\[/,"").replace(/\]/,"");ie=parseFloat(q.properties[Z])}else R.pointHeight!==void 0&&R.pointHeight!==""?ie=parseFloat(R.pointHeight):q.properties.height!=null&&(ie=parseFloat(q.properties.height));if(/^\[/.test(f.color)&&/\]$/.test(f.color)){var oe=f.color.replace(/\[/,"").replace(/\]/,"");R.color=q.properties[oe],v._core.isHtmlColor(R.color)?R.color=v._color.colorFromHtmlColor(R.color):(/^rgb/.test(R.color)&&(R.color=v._color.rgbaStringToRgbaObj(R.color)),R.color.r>1&&(R.color.r=R.color.r/255),R.color.g>1&&(R.color.g=R.color.g/255),R.color.b>1&&(R.color.b=R.color.b/255),R.color.a>1&&(R.color.a=R.color.a/255),R.color=v._color.createColor(R.color.r,R.color.g,R.color.b,R.color.a))}if(/^\[/.test(f.outlineColor)&&/\]$/.test(f.outlineColor)){var oe=f.outlineColor.replace(/\[/,"").replace(/\]/,"");R.outlineColor=q.properties[oe],v._core.isHtmlColor(R.outlineColor)?R.outlineColor=v._color.colorFromHtmlColor(R.outlineColor):(/^rgb/.test(R.outlineColor)&&(R.outlineColor=v._color.rgbaStringToRgbaObj(R.outlineColor)),R.outlineColor.r>1&&(R.outlineColor.r=R.outlineColor.r/255),R.outlineColor.g>1&&(R.outlineColor.g=R.outlineColor.g/255),R.outlineColor.b>1&&(R.outlineColor.b=R.outlineColor.b/255),R.outlineColor.a>1&&(R.outlineColor.a=R.outlineColor.a/255),R.outlineColor=v._color.createColor(R.outlineColor.r,R.outlineColor.g,R.outlineColor.b,R.outlineColor.a))}R.position=new v._cesium.Cartesian3.fromDegrees(q.geometry.coordinates[0],q.geometry.coordinates[1],ie),R.text=q.properties.name;var ne={show:R.show,position:R.position,pixelSize:R.pixelSize,color:R.color,outlineColor:R.outlineColor,outlineWidth:R.outlineWidth,id:q},se="color:"+R.color.red*255+","+R.color.green*255+","+R.color.blue*255+";outlineColor:"+R.outlineColor.red*255+","+R.outlineColor.green*255+","+R.outlineColor.blue*255;v.Legend.push(se),H.add(ne)}),D.features.length==0&&(B.state=un.QuadtreeTileLoadState.DONE,B.renderable=!0),B.data.geometryPrimitive=H,B.state=un.QuadtreeTileLoadState.LOADING,B.state===un.QuadtreeTileLoadState.LOADING&&(B.data.geometryPrimitive.update(M,[]),B.state=un.QuadtreeTileLoadState.DONE,B.renderable=!0)},error:function(){B.count==null&&(B.count=0),B.count+=1,B.count>=2?(B.state=un.QuadtreeTileLoadState.DONE,B.renderable=!0):B.state=un.QuadtreeTileLoadState.START}})}else{B.state=un.QuadtreeTileLoadState.DONE,B.renderable=!0;return}B.state=un.QuadtreeTileLoadState.LOADING}},this._primitive=new this._cesium.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:3});var I=this._viewer.scene,w=I.primitives;w.add(this._primitive),C||this.setVisibility(!1),this._core.isnull(f.id)&&(f.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+f.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var Q={id:f.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this.setTreeobj(Q),this._tree.insertGroupId(Q,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};gf.prototype.setTreeobj=function(o){this.treeobj=o};gf.prototype.getLegend=function(){var o=[];return this.Legend!=null&&(o=this._core.unique(this.Legend)),o};gf.prototype.deleteObject=function(){if(this._viewer.scene.primitives.remove(this.item),this.probj&&this.probj.length>0&&(this._viewer.scene.primitives.remove(this.probj[0]),this.probj.pop()),this.img!=null&&this._viewer.imageryLayers.remove(this.img),this.primitve&&this.primitve.length>0){for(var o=0;o<this.primitve.length;o++)this._viewer.scene.primitives.remove(this.primitve[o]);this.primitve=[]}this.loadAllKey&&this.loadAllKey.length>0&&(this.loadAllKey=[]);try{this._Provider.remove()}catch{}if(this._Provider!=null&&this._Provider.setStatus(!1),this.items!=null&&this.items!=null&&this.items.length>0)for(var o=0;o<this.items.length;o++)this._viewer.scene.primitives.remove(this.items[o]);else this._viewer.scene.primitives.remove(this.item);if(this.treeobj&&this.treeobj.type==="DivPoint"&&this.item&&this.item._pointPrimitives!=null&&this.item._pointPrimitives!=null)for(var o=0;o<this.item._pointPrimitives.length;o++){var A=document.getElementById(this.item._pointPrimitives[o].id);A&&A.remove()}try{this._Provider.remove()}catch{}};gf.prototype.export=function(){var o=this.item.show==null?void 0:this.item.show,A=this.treeobj.url;return{type:this.treeobj.type,treeobj:{name:this.treeobj.name,pId:this.treeobj.pId},style:{show:o,url:A},treeData:this.treeobj.treeData}};gf.prototype.setRefresh=function(o){try{this._Provider&&this._Provider.setStatus(!o)}catch{}};gf.prototype.setVisibility=function(o){try{if(this.loadAllKey=[],this.item!=null&&this.item.show!=null&&(this.item.show=o),this.img!=null&&(this.img.show=o),this.primitve&&this.primitve.length>0)for(var A=0;A<this.primitve.length;A++)this.primitve[A].show=o;if(this._Provider&&this._Provider.setStatus&&this._Provider._state!==void 0&&this._Provider.setStatus(o),this._Provider&&this._Provider.EntityCollection&&(!o&&(this._Provider.EntityCollection.show=o),this._Provider.EntityCollection.isShow=o),this.probj&&this.probj.length>0)for(var A=0;A<this.probj.length;A++)this.probj[A].show=o}catch{}if(this.treeobj!=null&&this.treeobj.type==="DivPoint"&&this.item&&this.item._pointPrimitives!=null&&this.item._pointPrimitives!=null)for(var A=0;A<this.item._pointPrimitives.length;A++){var f=document.getElementById(this.item._pointPrimitives[A].id);f&&(f.style.display=o?"block":"none")}this.item!=null&&(this.item.show=o),this._Provider&&this._Provider._stop!==void 0&&this._Provider.setStatus(!o)};gf.prototype.edit=function(o,A){return this.isEditting=o,this.editoption=A,this._Provider&&this._Provider.edit&&this._Provider.edit(o,A)};gf.prototype.forceRefresh=function(){try{this._cache=!0,this._forceRefreshPrvimitive||(this._forceRefreshPrvimitive=Vi.cloneDeep(this._primitive));var o=Vi.cloneDeep(this._forceRefreshPrvimitive);this._viewer.scene.primitives.remove(this._primitive),this._viewer.scene.primitives.add(o),this.edit(this.isEditting,this.editoption)}catch{}};Object.defineProperties(gf.prototype,{labelText:{set:Vi.debounce(function(o){var A=o;if(!this._core.isnull(o)){var f=this.item.entities&&this.item.entities.values;if(f&&f.length>0)for(var m=0;m<f.length;m++)if(/^\[/.test(o)&&(A=o.replace(/\[/,"").replace(/\]/,""),A=f[m].properties[A]._value),f[m].label){f[m].label.text=A;try{f[m].point.show=!1}catch{}}else{try{f[m].point.show=!1}catch{}f[m].label=new this._cesium.LabelGraphics({text:A,font:"30px sans-serif",style:this._cesium.LabelStyle.FILL,fillColor:this._cesium.Color.WHITE,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,show:!0,showBackground:!1,backgroundColor:new this._cesium.Color(.165,.165,.165,.8),backgroundPadding:new this._cesium.Cartesian2(7,5),scale:1,horizontalOrigin:this._cesium.HorizontalOrigin.CENTER,verticalOrigin:this._cesium.VerticalOrigin.CENTER,eyeOffset:this._cesium.Cartesian3.ZERO,pixelOffset:this._cesium.Cartesian2.ZERO,heightReference:this._cesium.HeightReference.NONE})}}},500)},labelStyles:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].label==null)&&A&&A.length>0&&A[0].label)for(var f=0;f<A.length;f++)A[f].label.style=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].label==null)&&o&&o.length>0&&o[0].label)return o[0].label.style}},labelFont:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(o=o.toString().replace(/px/g,""),!(A&&!/^point.fid/.test(A[0]._id)&&A[0].label==null)){var f=A[0].label.font,m=16;if(f&&(f=f._value.trimLeft().trimRight(),m=f.split("px")[0]),A&&A.length>0&&A[0].label)for(var C=0;C<A.length;C++)A[C].label.font=m+"px "+o}}},500)},labelFontSize1:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(o=o.toString().replace(/px/g,""),!(A&&!/^point.fid/.test(A[0]._id)&&A[0].label==null)){var f=A[0].label.font,m="sans-serif";if(f&&(f=f._value.trimLeft().trimRight(),m=f.split("px")[1]),A&&A.length>0&&A[0].label)for(var C=0;C<A.length;C++)A[C].label.font=o+"px  "+m}}},500)},labelFontSize:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(o=o.toString().replace(/px/g,""),!(A&&!/^point.fid/.test(A[0]._id)&&A[0].label==null)&&A&&A.length>0&&A[0].label)for(var f=0;f<A.length;f++)A[f].label.font=o+"px  sans-serif"}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].label==null)&&o&&o.length>0&&o[0].label)return parseFloat(o[0].label.font)}},labelFillColor:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){this._core.isnull(o)||(this._core.isHtmlColor(o)?o=this._color.colorFromHtmlColor(o):(/^rgb/.test(o)&&(o=this._color.rgbaStringToRgbaObj(o)),o.r>1&&(o.r=o.r/255),o.g>1&&(o.g=o.g/255),o.b>1&&(o.b=o.b/255),o.a>1&&(o.a=o.a/255),o=this._color.createColor(o.r,o.g,o.b,o.a)));var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].label==null)&&A&&A.length>0&&A[0].label)for(var f=0;f<A.length;f++)A[f].label.fillColor=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].label==null)&&o&&o.length>0&&o[0].label){var A=o[0].label.fillColor;return this._color.toHtmlColor("rgb("+A._value.red*255+","+A._value.green*255+","+A._value.blue*255+","+A._value.alpha*255+")")}}},labelOutlineColor:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){this._core.isnull(o)||(this._core.isHtmlColor(o)?o=this._color.colorFromHtmlColor(o):(/^rgb/.test(o)&&(o=this._color.rgbaStringToRgbaObj(o)),o.r>1&&(o.r=o.r/255),o.g>1&&(o.g=o.g/255),o.b>1&&(o.b=o.b/255),o.a>1&&(o.a=o.a/255),o=this._color.createColor(o.r,o.g,o.b,o.a)));var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].label==null)&&A&&A.length>0&&A[0].label)for(var f=0;f<A.length;f++)A[f].label.outlineColor=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].label==null)&&o&&o.length>0&&o[0].label){var A=o[0].label.outlineColor;try{return this._color.toHtmlColor("rgb("+A._value.red*255+","+A._value.green*255+","+A._value.blue*255+","+A._value.alpha*255+")")}catch{}}}},labelOutlineWidth:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].label==null)&&A&&A.length>0&&A[0].label)for(var f=0;f<A.length;f++)/^\[/.test(o)&&(o=o.replace(/\[/,"").replace(/\]/,""),o=A[f].properties[o]),A[f].label.outlineWidth=o}},200),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].label==null)&&o&&o.length>0&&o[0].label){var A=o[0].label.outlineWidth;return A?A._value:void 0}}},labelBackgroundColor:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){this._core.isnull(o)||(this._core.isHtmlColor(o)?o=this._color.colorFromHtmlColor(o):(/^rgb/.test(o)&&(o=this._color.rgbaStringToRgbaObj(o)),o.r>1&&(o.r=o.r/255),o.g>1&&(o.g=o.g/255),o.b>1&&(o.b=o.b/255),o.a>1&&(o.a=o.a/255),o=this._color.createColor(o.r,o.g,o.b,o.a)));var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].label==null)&&A&&A.length>0&&A[0].label)for(var f=0;f<A.length;f++)A[f].label.backgroundColor=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].label==null)&&o&&o.length>0&&o[0].label){var A=o[0].label.backgroundColor;return this._color.toHtmlColor("rgb("+A._value.red*255+","+A._value.green*255+","+A._value.blue*255+","+A._value.alpha*255+")")}}},labelBackground:{set:Vi.debounce(function(o){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].label==null)&&A&&A.length>0&&A[0].label)for(var f=0;f<A.length;f++)A[f].label.showBackground=o},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].label==null)&&o&&o.length>0&&o[0].label)return o[0].label.background}},labelScale:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].label==null)&&A&&A.length>0&&A[0].label)for(var f=0;f<A.length;f++)/^\[/.test(o)&&(o=o.replace(/\[/,"").replace(/\]/,""),o=A[f].properties[o]),A[f].label.scale=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].label==null)&&o&&o.length>0&&o[0].label){var A=o[0].label.scale;return A?A._value:void 0}}},labelHorizontalOrigin:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].label==null)&&A&&A.length>0&&A[0].label)for(var f=0;f<A.length;f++)A[f].label.horizontalOrigin=parseInt(o)}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].label==null)&&o&&o.length>0&&o[0].label){var A=o[0].label.horizontalOrigin;return A?A._value:void 0}}},labelVerticalOrigin:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].label==null)&&A&&A.length>0&&A[0].label)for(var f=0;f<A.length;f++)A[f].label.verticalOrigin=parseInt(o)}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].label==null)&&o&&o.length>0&&o[0].label){var A=o[0].label.verticalOrigin;return A?A._value:void 0}}},labelHeightReference:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].label==null)&&A&&A.length>0&&A[0].label)for(var f=0;f<A.length;f++)A[f].label.heightReference=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].label==null)&&o&&o.length>0&&o[0].label){var A=o[0].label.heightReference;return A?A._value:void 0}}},labelDistanceDisplayMaxCondition:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].label==null)&&A&&A.length>0&&A[0].label)for(var f=A[0].label.distanceDisplayCondition?A[0].label.distanceDisplayCondition._value.near:0,m=0;m<A.length;m++)A[m].label.distanceDisplayCondition=new this._cesium.DistanceDisplayCondition(f,parseInt(o)),A[m].label.scaleByDistance=new this._cesium.NearFarScalar(f,1,parseInt(o),0)}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].label==null)&&o&&o.length>0&&o[0].label){var A=o[0].label.distanceDisplayCondition?o[0].label.distanceDisplayCondition._value.far:Number.MAX_VALUE;return A}}},labelDistanceDisplayMinCondition:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].label==null)&&A&&A.length>0&&A[0].label)for(var f=A[0].label.distanceDisplayCondition?A[0].label.distanceDisplayCondition._value.far:Number.MAX_VALUE,m=0;m<A.length;m++)A[m].label.distanceDisplayCondition=new this._cesium.DistanceDisplayCondition(parseInt(o),f),A[m].label.scaleByDistance=new this._cesium.NearFarScalar(parseInt(o),1,f,0)}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].label==null)&&o&&o.length>0&&o[0].label){var A=o[0].label.distanceDisplayCondition?o[0].label.distanceDisplayCondition._value.near:0;return A}}},labelHeight:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].position==null)&&A&&A.length>0&&A[0].position)for(var f=0;f<A.length;f++){var m=this._cesium.Cartographic.fromCartesian(A[f].position._value),C=this._cesium.Math.toDegrees(m.longitude),y=this._cesium.Math.toDegrees(m.latitude),x=this._cesium.Cartesian3.fromDegrees(C,y,o);A[f].position=x}}},500),get:function(){return 0}},labelShow:{set:Vi.debounce(function(o){var A=this.item.entities&&this.item.entities.values;if(A&&A.length>0)for(var f=0;f<A.length;f++)!A[f].label&&o?(A[f].point&&(A[f].point.show=!o),A[f].model&&(A[f].model.show=!o),A[f].billboard&&(A[f].billboard.show=!o),A[f].label=new this._cesium.LabelGraphics({text:"label",font:"30px sans-serif",style:this._cesium.LabelStyle.FILL,fillColor:this._cesium.Color.WHITE,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,show:!0,showBackground:!1,backgroundColor:new this._cesium.Color(.165,.165,.165,.8),backgroundPadding:new this._cesium.Cartesian2(7,5),scale:1,horizontalOrigin:this._cesium.HorizontalOrigin.CENTER,verticalOrigin:this._cesium.VerticalOrigin.CENTER,eyeOffset:this._cesium.Cartesian3.ZERO,pixelOffset:this._cesium.Cartesian2.ZERO,heightReference:this._cesium.HeightReference.NONE})):(A[f].label&&(A[f].label.show=o),A[f].point&&(A[f].point.show=!o),A[f].model&&(A[f].model.show=!o),A[f].billboard&&(A[f].billboard.show=!o))},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].label==null)&&o&&o.length>0&&o[0].label)return o[0].label.show}},modelShow:{set:Vi.debounce(function(o){var A=this.item.entities&&this.item.entities.values;if(A&&A.length>0)for(var f=0;f<A.length;f++)A[f].label&&(A[f].label.show=!o),A[f].point&&(A[f].point.show=!o),A[f].billboard&&(A[f].billboard.show=!o),!A[f].model&&o?A[f].model=new this._cesium.ModelGraphics({show:!0,scale:1,minimumPixelSize:0,incrementallyLoadTextures:!0,runAnimations:!0,clampAnimations:!0,shadows:this._cesium.ShadowMode.ENABLED,heightReference:this._cesium.HeightReference.NONE,color:this._cesium.Color.WHITE}):(A[f].model&&(A[f].model.show=o),A[f].label&&(A[f].label.show=!o),A[f].point&&(A[f].point.show=!o),A[f].billboard&&(A[f].billboard.show=!o))},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].model==null)&&o&&o.length>0&&o[0].model)return o[0].model.show}},modelUri:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].model==null)&&A&&A.length>0)for(var f=0;f<A.length;f++)if(A[f].model)A[f].model.uri=o;else{if(/^\[/.test(o)){var m=o.split("[");m.length>1?o=m[0]+m[1].replace(/\[/,"").replace(/\]/,""):(o=o.replace(/\[/,"").replace(/\]/,""),o=A[f].properties[o])}A[f].model=new this._cesium.ModelGraphics({uri:o,show:!0,scale:1,minimumPixelSize:0,incrementallyLoadTextures:!0,runAnimations:!0,clampAnimations:!0,shadows:this._cesium.ShadowMode.ENABLED,heightReference:this._cesium.HeightReference.NONE,color:this._cesium.Color.WHITE})}}},500)},modelScale:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){o=parseFloat(o);var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].model==null)&&A&&A.length>0&&A[0].model)for(var f=0;f<A.length;f++)/^\[/.test(o)&&(o=o.replace(/\[/,"").replace(/\]/,""),o=A[f].properties[o]),A[f].model.scale=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].model==null)&&o&&o.length>0&&o[0].model){var A=o[0].model.scale;return A?A._value:void 0}}},modelShadows:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].model==null)&&A&&A.length>0&&A[0].model)for(var f=0;f<A.length;f++)A[f].model.shadows=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].model==null)&&o&&o.length>0&&o[0].model)return o[0].model.shadows}},modelHeightReference:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].model==null)&&A&&A.length>0&&A[0].model)for(var f=0;f<A.length;f++)A[f].model.heightReference=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].model==null)&&o&&o.length>0&&o[0].model){var A=o[0].model.heightReference;return A?A._value:void 0}}},modelDistanceDisplayMaxCondition:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].model==null)&&A&&A.length>0&&A[0].model)for(var f=A[0].model.distanceDisplayCondition?A[0].model.distanceDisplayCondition._value.near:0,m=0;m<A.length;m++)A[m].model.distanceDisplayCondition=new this._cesium.DistanceDisplayCondition(f,o)}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].model==null)&&o&&o.length>0&&o[0].model)var A=o[0].model.distanceDisplayCondition?o[0].model.distanceDisplayCondition._value.far:Number.MAX_VALUE}},modelDistanceDisplayMinCondition:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].model==null)&&A&&A.length>0&&A[0].model)for(var f=A[0].model.distanceDisplayCondition?A[0].model.distanceDisplayCondition._value.far:Number.MAX_VALUE,m=0;m<A.length;m++)A[m].model.distanceDisplayCondition=new this._cesium.DistanceDisplayCondition(o,f)}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].model==null)&&o&&o.length>0&&o[0].model){var A=o[0].model.distanceDisplayCondition?o[0].model.distanceDisplayCondition._value.near:0;return A}}},modelColor:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){this._core.isnull(o)||(this._core.isHtmlColor(o)?o=this._color.colorFromHtmlColor(o):(/^rgb/.test(o)&&(o=this._color.rgbaStringToRgbaObj(o)),o.r>1&&(o.r=o.r/255),o.g>1&&(o.g=o.g/255),o.b>1&&(o.b=o.b/255),o.a>1&&(o.a=o.a/255),o=this._color.createColor(o.r,o.g,o.b,o.a)));var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].model==null)&&A&&A.length>0&&A[0].model)for(var f=0;f<A.length;f++)A[f].model.color=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].model==null)&&o&&o.length>0&&o[0].model){var A=o[0].model.color;try{return this._color.toHtmlColor("rgb("+A._value.red*255+","+A._value.green*255+","+A._value.blue*255+","+A._value.alpha*255+")")}catch{}}}},modelLightColor:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){this._core.isnull(o)||(this._core.isHtmlColor(o)?o=this._color.colorFromHtmlColor(o):(/^rgb/.test(o)&&(o=this._color.rgbaStringToRgbaObj(o)),o.r>1&&(o.r=o.r/255),o.g>1&&(o.g=o.g/255),o.b>1&&(o.b=o.b/255),o.a>1&&(o.a=o.a/255),o=this._color.createColor(o.r,o.g,o.b,o.a)));var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].model==null)&&A&&A.length>0&&A[0].model)for(var f=0;f<A.length;f++)A[f].model.lightColor=o}},100),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].model==null)&&o&&o.length>0&&o[0].model){var A=o[0].model.lightColor;try{return this._color.toHtmlColor("rgb("+A._value.red*255+","+A._value.green*255+","+A._value.blue*255+","+A._value.alpha*255+")")}catch{}}}},modelHeight:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].position==null)&&A&&A.length>0&&A[0].position)for(var f=0;f<A.length;f++){var m=this._cesium.Cartographic.fromCartesian(A[f].position._value),C=this._cesium.Math.toDegrees(m.longitude),y=this._cesium.Math.toDegrees(m.latitude),x=this._cesium.Cartesian3.fromDegrees(C,y,o);A[f].position=x}}},500),get:function(){return 0}},pointColor:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){this._core.isnull(o)||(this._core.isHtmlColor(o)?o=this._color.colorFromHtmlColor(o):(/^rgb/.test(o)&&(o=this._color.rgbaStringToRgbaObj(o)),o.r>1&&(o.r=o.r/255),o.g>1&&(o.g=o.g/255),o.b>1&&(o.b=o.b/255),o.a>1&&(o.a=o.a/255),o=this._color.createColor(o.r,o.g,o.b,o.a)));var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].point==null)&&A&&A.length>0&&A[0].point)for(var f=0;f<A.length;f++)A[f].point.color=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].point==null)&&o&&o.length>0&&o[0].point){var A=o[0].point.color;try{return this._color.toHtmlColor("rgb("+A._value.red*255+","+A._value.green*255+","+A._value.blue*255+","+A._value.alpha*255+")")}catch{}}}},pointShow:{set:Vi.debounce(function(o){var A=this.item.entities&&this.item.entities.values;if(A&&A.length>0)for(var f=0;f<A.length;f++)!A[f].point&&o?(A[f].label&&(A[f].label.show=!o),A[f].model&&(A[f].model.show=!o),A[f].billboard&&(A[f].billboard.show=!o),A[f].point=new this._cesium.PointGraphics({color:this._cesium.Color.WHITE,pixelSize:1,outlineColor:this._cesium.Color.BLACK,outlineWidth:0,show:!0})):(A[f].point&&(A[f].point.show=o),A[f].label&&(A[f].label.show=!o),A[f].model&&(A[f].model.show=!o),A[f].billboard&&(A[f].billboard.show=!o))},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].point==null)&&o&&o.length>0&&o[0].point)return o[0].point.show}},pointPixelSize:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].point==null)&&A&&A.length>0&&A[0].point)for(var f=0;f<A.length;f++)/^\[/.test(o)&&(o=o.replace(/\[/,"").replace(/\]/,""),o=A[f].properties[o]),A[f].point.pixelSize=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].point==null)&&o&&o.length>0&&o[0].point){var A=o[0].point.pixelSize;return A?A._value:void 0}}},pointOutlineColor:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){this._core.isnull(o)||(this._core.isHtmlColor(o)?o=this._color.colorFromHtmlColor(o):(/^rgb/.test(o)&&(o=this._color.rgbaStringToRgbaObj(o)),o.r>1&&(o.r=o.r/255),o.g>1&&(o.g=o.g/255),o.b>1&&(o.b=o.b/255),o.a>1&&(o.a=o.a/255),o=this._color.createColor(o.r,o.g,o.b,o.a)));var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].point==null)&&A&&A.length>0&&A[0].point)for(var f=0;f<A.length;f++)A[f].point.outlineColor=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].point==null)&&o&&o.length>0&&o[0].point){var A=o[0].point.outlineColor;try{return this._color.toHtmlColor("rgb("+A._value.red*255+","+A._value.green*255+","+A._value.blue*255+","+A._value.alpha*255+")")}catch{}}}},pointOutlineWidth:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].point==null)&&A&&A.length>0&&A[0].point)for(var f=0;f<A.length;f++)/^\[/.test(o)&&(o=o.replace(/\[/,"").replace(/\]/,""),o=A[f].properties[o]),A[f].point.outlineWidth=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].point==null)&&o&&o.length>0&&o[0].point){var A=o[0].point.outlineWidth;return A?A._value:void 0}}},pointHeightReference:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].point==null)&&A&&A.length>0&&A[0].point)for(var f=0;f<A.length;f++)A[f].point.heightReference=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].point==null)&&o&&o.length>0&&o[0].point){var A=o[0].point.heightReference;return A?A._value:void 0}}},pointDistanceDisplayMaxCondition:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].point==null)&&A&&A.length>0&&A[0].point)for(var f=A[0].point.distanceDisplayCondition?A[0].point.distanceDisplayCondition._value.near:0,m=0;m<A.length;m++)A[m].point.distanceDisplayCondition=new this._cesium.DistanceDisplayCondition(f,o),A[m].point.scaleByDistance=new this._cesium.NearFarScalar(f,1,o,0)}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].point==null)&&o&&o.length>0&&o[0].point){var A=o[0].point.distanceDisplayCondition?o[0].point.distanceDisplayCondition._value.far:Number.MAX_VALUE;return A}}},pointDistanceDisplayMinCondition:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].point==null)&&A&&A.length>0&&A[0].point)for(var f=A[0].point.distanceDisplayCondition?A[0].point.distanceDisplayCondition._value.far:Number.MAX_VALUE,m=0;m<A.length;m++)A[m].point.distanceDisplayCondition=new this._cesium.DistanceDisplayCondition(o,f),A[m].point.scaleByDistance=new this._cesium.NearFarScalar(o,1,f,0)}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].point==null)&&o&&o.length>0&&o[0].point){var A=o[0].point.distanceDisplayCondition?o[0].point.distanceDisplayCondition._value.near:0;return A}}},pointHeight:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].position==null)&&A&&A.length>0&&A[0].position)for(var f=0;f<A.length;f++){var m=this._cesium.Cartographic.fromCartesian(A[f].position._value),C=this._cesium.Math.toDegrees(m.longitude),y=this._cesium.Math.toDegrees(m.latitude),x=this._cesium.Cartesian3.fromDegrees(C,y,o);A[f].position=x}}},500),get:function(){return 0}},billboardShow:{set:Vi.debounce(function(o){var A=this.item.entities&&this.item.entities.values;if(A&&A.length>0)for(var f=0;f<A.length;f++)!A[f].billboard&&o?(A[f].point&&(A[f].point.show=!o),A[f].label&&(A[f].label.show=!o),A[f].model&&(A[f].model.show=!o),A[f].billboard=new this._cesium.BillboardGraphics({show:!0,scale:1,horizontalOrigin:this._cesium.HorizontalOrigin.CENTER,verticalOrigin:this._cesium.VerticalOrigin.CENTER,eyeOffset:this._cesium.Cartesian3.ZERO,pixelOffset:this._cesium.Cartesian2.ZERO,rotation:0,alignedAxis:this._cesium.Cartesian3.ZERO,width:void 0,height:void 0,color:this._cesium.Color.WHITE,heightReference:this._cesium.HeightReference.NONE})):(A[f].billboard&&(A[f].billboard.show=o),A[f].point&&(A[f].point.show=!o),A[f].label&&(A[f].label.show=!o),A[f].billboard&&(A[f].billboard.show=!o))},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].billboard==null)&&o&&o.length>0&&o[0].billboard)return o[0].billboard.show}},billboardImage:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].billboard==null)&&A&&A.length>0)for(var f=0;f<A.length;f++){if(/^\[/.test(o)){var m=o.split("[");m.length>1?o=m[0]+m[1].replace(/\[/,"").replace(/\]/,""):(o=o.replace(/\[/,"").replace(/\]/,""),o=A[f].properties[o])}A[f].billboard?A[f].billboard.image=o:A[f].billboard=new this._cesium.BillboardGraphics({image:o,show:!0,scale:1,horizontalOrigin:this._cesium.HorizontalOrigin.CENTER,verticalOrigin:this._cesium.VerticalOrigin.CENTER,eyeOffset:this._cesium.Cartesian3.ZERO,pixelOffset:this._cesium.Cartesian2.ZERO,rotation:0,alignedAxis:this._cesium.Cartesian3.ZERO,width:void 0,height:void 0,color:this._cesium.Color.WHITE,heightReference:this._cesium.HeightReference.NONE})}}},500)},billboardScale:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].billboard==null)&&A&&A.length>0&&A[0].billboard)for(var f=0;f<A.length;f++)A[f].billboard.scale=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].billboard==null)&&o&&o.length>0&&o[0].billboard){var A=o[0].billboard.scale;return A?A._value:void 0}}},billboardHorizontalOrigin:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].billboard==null)&&A&&A.length>0&&A[0].billboard)for(var f=0;f<A.length;f++)A[f].billboard.horizontalOrigin=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].billboard==null)&&o&&o.length>0&&o[0].billboard)return o[0].billboard.horizontalOrigin}},billboardVerticalOrigin:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].billboard==null)&&A&&A.length>0&&A[0].billboard)for(var f=0;f<A.length;f++)A[f].billboard.verticalOrigin=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].billboard==null)&&o&&o.length>0&&o[0].billboard)return o[0].billboard.verticalOrigin}},billboardWidth:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].billboard==null)&&A&&A.length>0&&A[0].billboard)for(var f=0;f<A.length;f++)A[f].billboard.width=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].billboard==null)&&o&&o.length>0&&o[0].billboard){var A=o[0].billboard.width;return A?A._value:void 0}}},billboardHeight:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].billboard==null)&&A&&A.length>0&&A[0].billboard)for(var f=0;f<A.length;f++)A[f].billboard.height=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].billboard==null)&&o&&o.length>0&&o[0].billboard){var A=o[0].billboard.height;return A?A._value:void 0}}},billboardColor:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){this._core.isnull(o)||(this._core.isHtmlColor(o)?o=this._color.colorFromHtmlColor(o):(/^rgb/.test(o)&&(o=this._color.rgbaStringToRgbaObj(o)),o.r>1&&(o.r=o.r/255),o.g>1&&(o.g=o.g/255),o.b>1&&(o.b=o.b/255),o.a>1&&(o.a=o.a/255),o=this._color.createColor(o.r,o.g,o.b,o.a)));var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].billboard==null)&&A&&A.length>0&&A[0].billboard)for(var f=0;f<A.length;f++)A[f].billboard.color=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].billboard==null)&&o&&o.length>0&&o[0].billboard){var A=o[0].billboard.color;try{return this._color.toHtmlColor("rgb("+A._value.red*255+","+A._value.green*255+","+A._value.blue*255+","+A._value.alpha*255+")")}catch{}}}},billboardHeightReference:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].billboard==null)&&A&&A.length>0&&A[0].model)for(var f=0;f<A.length;f++)A[f].billboard.heightReference=o}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].billboard==null)&&o&&o.length>0&&o[0].model){var A=o[0].billboard.heightReference;return A?A._value:void 0}}},billboardDistanceDisplayMaxCondition:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].billboard==null)&&A&&A.length>0&&A[0].billboard)for(var f=A[0].billboard.distanceDisplayCondition?A[0].billboard.distanceDisplayCondition._value.near:0,m=0;m<A.length;m++)A[m].billboard.distanceDisplayCondition=new this._cesium.DistanceDisplayCondition(f,o),A[m].billboard.scaleByDistance=new this._cesium.NearFarScalar(f,1,o,0)}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].billboard==null)&&o&&o.length>0&&o[0].billboard){var A=o[0].billboard.distanceDisplayCondition?o[0].billboard.distanceDisplayCondition._value.far:Number.MAX_VALUE;return A}}},billboardDistanceDisplayMinCondition:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].billboard==null)&&A&&A.length>0&&A[0].billboard)for(var f=A[0].billboard.distanceDisplayCondition?A[0].billboard.distanceDisplayCondition._value.far:Number.MAX_VALUE,m=0;m<A.length;m++)A[m].billboard.distanceDisplayCondition=new this._cesium.DistanceDisplayCondition(o,f),A[m].billboard.scaleByDistance=new this._cesium.NearFarScalar(o,1,f,0)}},500),get:function(){var o=this.item.entities&&this.item.entities.values;if(!(o&&!/^point.fid/.test(o[0]._id)&&o[0].billboard==null)&&o&&o.length>0&&o[0].billboard){var A=o[0].billboard.distanceDisplayCondition?o[0].billboard.distanceDisplayCondition._value.near:0;return A}}},billboardPHeight:{set:Vi.debounce(function(o){if(!this._core.isnull(o)){var A=this.item.entities&&this.item.entities.values;if(!(A&&!/^point.fid/.test(A[0]._id)&&A[0].position==null)&&A&&A.length>0&&A[0].position)for(var f=0;f<A.length;f++){var m=this._cesium.Cartographic.fromCartesian(A[f].position._value),C=this._cesium.Math.toDegrees(m.longitude),y=this._cesium.Math.toDegrees(m.latitude),x=this._cesium.Cartesian3.fromDegrees(C,y,o);A[f].position=x}}},500),get:function(){return 0}}});var dI=gf;function dNi(o,A,f,m){this.UrlTemplateGeojsonProvider=new A.UrlTemplateGeojsonProvider(f,1),this.UrlTemplateGeojsonProvider.loadtitle=m,this.ent=o.imageryLayers.addImageryProvider(this.UrlTemplateGeojsonProvider)}var cle=dNi;function fNi(o,A){var f={width:o,height:A};function m(x){for(var v=Number.MAX_VALUE,E,I,w={xMin:v,yMin:v,xMax:-v,yMax:-v},Q=0,M=x.length;Q<M;Q++){var B=x[Q].getBoundingRect();E={x:B.xMin,y:B.yMin},I={x:B.xMax,y:B.yMax},w.xMin=w.xMin<E.x?w.xMin:E.x,w.yMin=w.yMin<E.y?w.yMin:E.y,w.xMax=w.xMax>I.x?w.xMax:I.x,w.yMax=w.yMax>I.y?w.yMax:I.y}return w}function C(x,v){var E=v.xMax-v.xMin,I=v.yMin-v.yMax,w=Math.abs(x[0]-v.xMin),Q=x[1]-v.yMax,M=w/E,B=Q/I,T=M*f.width,D=B*f.height;return{x:T,y:D}}function y(x,v){var E=v.xMax-v.xMin,I=v.yMin-v.yMax,w=x.x/f.width*E,Q=x.y/f.height*I;return[w,Q]}this.project=C,this.unproject=y,this.getBoundingRect=m}var idt=fNi;var Ft=null;function Ll(o,A){Ft=A,this._viewer=o,this._cesium=A,this._core=new pr(o,A),this._color=new Pn(this._viewer,this._cesium),this._tree=lt,this.item={show:!0},this._option=void 0,this._primitive=void 0,this._Provider=void 0,this.Legend=[],this.datas=[],this.models=0,this.entity=null,this.primitve=[],this.probj=[],this.PrimitiveData=[],this.loadFinishKey=[],this.loadAllKey=[],this.PrimitiveObj={key:"",data:{}},this.start=0,this.Primitivekey=[],this.tilesLength=0,this.returnCount=0,this._primitiveByTile={},this._primitiveCollection=new this._cesium.PrimitiveCollection,this.img=null,this._defaultStyle=null,this._canvas=null,this._context=null,this._cache=!1,this._forceRefreshPrvimitive=null}function hle(o){if(Array.isArray(o)){for(var A=0,f=Array(o.length);A<o.length;A++)f[A]=o[A];return f}else return Array.from(o)}function rdt(o,A){var f=[];return o.level>=A?gNi(o,A,f):ndt(o,A,f),f}function gNi(o,A,f){for(var m=o,C=0;C<30;C++){if(m.level==A)return f.push({x:m.x,y:m.y,level:m.level}),!0;m=m.parent}return!0}function ndt(o,A,f){if(o.level==A)return f.push({x:o.x,y:o.y,level:o.level}),!0;if(o.level>A)return!1;for(var m=0;m<o.children.length;m++)ndt(o.children[m],A,f);return!0}var pNi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o};Ll.prototype._serialize=function(o){var A=[],f=window.encodeURIComponent;for(var m in o){var C=o[m];(typeof C>"u"?"undefined":pNi(C))==="object"?A.push(f(m)+"="+f(JSON.stringify(C))):A.push(f(m)+"="+f(o[m]))}return A.join("&")};Ll.prototype.createHistogramVectorGeoJsonFeatureLayer=function(o,A,f,m,C,y){var x={radius:50,height:100,scale:1,defaultColor:"#ffffff",showLabel:!0,label:{showBackground:!1,fillColor:"#ffffff",outlineColor:"#000000",backgroundColor:"rgba(0,0,0,0.5)",style:2,horizontalOrigin:Ft.HorizontalOrigin.CENTER,verticalOrigin:Ft.VerticalOrigin.BOTTOM,outlineWidth:1,font:"20px \u5FAE\u8F6F\u96C5\u9ED1"},alpha:.5,level_max:20,level_min:10},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:this._core.defaultValue(A.srs,"EPSG:4490")+":{z}",TILEMATRIXSET:this._core.defaultValue(A.srs,"EPSG:4490"),FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit};f.label&&(x.label=this._core.extend(x.label,f.label,!0),delete f.label);let E=this._core.extend(x,f,!0);A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");let I;Array.isArray(E.color)&&(I={name:E.color[0].name,value:{">":{},"<":{}}},E.color.forEach(L=>{if(L.value.indexOf&&L.value.indexOf(">")>-1){let R=L.value.split(">");I.value[">"][R[1]]=Ft.Color.fromCssColorString(L.color).withAlpha(E.alpha)}else if(L.value.indexOf&&L.value.indexOf("<")>-1){let R=L.value.split("<");I.value["<"][R[1]]=Ft.Color.fromCssColorString(L.color).withAlpha(E.alpha)}else I.value[L.value]=Ft.Color.fromCssColorString(L.color).withAlpha(E.alpha)}));let w=Ft.Color.fromCssColorString(E.defaultColor).withAlpha(E.alpha);var Q=this,M={text:"",...E.label,fillColor:Ft.Color.fromCssColorString(E.label.fillColor),outlineColor:Ft.Color.fromCssColorString(E.label.outlineColor),backgroundColor:Ft.Color.fromCssColorString(E.label.backgroundColor)};this._urlTemplate=A.url+"?"+this._serialize(v.urlParams);var B=A.url+"?"+this._serialize(v.urlParams);this._Provider=new Ts(this._viewer,this._cesium),this._Provider._normalTile=f.level_max-1,this._Provider._minimumHeight=0,this._Provider.loadTile=function(L,R){(function(k,U,V){if(U.state===Ft.QuadtreeTileLoadState.START){if(U.data={lines:[],geometryPrimitive:void 0},U.level>=f.level_min&&U.level<f.level_max&&V.item.show){var H=B.replace(window.encodeURIComponent("{x}"),U.x).replace(window.encodeURIComponent("{y}"),U.y).replace(window.encodeURIComponent("{z}"),U.level);V._cache&&(H+="&"+V._core.getuid());let q=[],ie=[],Z=new Ft.LabelCollection;Ft.GeoJsonDataSource.load(H).then(ne=>{let se=ne.entities.values;if(!se||!se.length){U.state=Ft.QuadtreeTileLoadState.DONE,U.renderable=!0;return}let ce=new Ft.PrimitiveCollection;if(se.forEach(j=>{let de=j.properties.getValue(),me=E.height;if(de&&typeof E.height=="string"&&/^\[/.test(E.height)&&/\]$/.test(E.height)){let Y=E.height.replace(/\[/,"").replace(/\]/,"");me=de[Y]||100}let _e=me*E.scale,Be;if(de&&typeof E.color=="string"&&/^\[/.test(E.color)&&/\]$/.test(E.color)){let Y=E.color.replace(/\[/,"").replace(/\]/,"");Y=de[Y]||E.defaultColor,Be=Ft.Color.fromCssColorString(Y).withAlpha(E.alpha)}else if(I&&de[I.name]){let Y=de[I.name];if(I.value[Y])Be=I.value[Y];else{for(let he in I.value[">"])if(Y>he){Be=I.value[">"][he];break}if(!Be){for(let he in I.value["<"])if(Y<he){Be=I.value["<"][he];break}}}}!Be&&(Be=w.clone());let Qe;if(j.polygon){let Y=j.polygon.hierarchy.getValue().positions;Qe=Ft.BoundingSphere.fromPoints(Y).center;var Ie=new Ft.PolygonGeometry({polygonHierarchy:new Ft.PolygonHierarchy(Y),height:0,extrudedHeight:0,vertexFormat:Ft.VertexFormat.DEFAULT,perPositionHeight:!1}),ve=new Ft.GeometryInstance({id:de,geometry:Ie,attributes:{color:new Ft.ColorGeometryInstanceAttribute.fromColor(Be)}});q.push(ve)}else(j.point||j.billboard)&&(Qe=j.position.getValue());let K=new Ft.GeometryInstance({geometry:new Ft.EllipseGeometry({extrudedHeight:_e,center:Qe,semiMinorAxis:E.radius,semiMajorAxis:E.radius,vertexFormat:Ft.VertexFormat.POSITION_AND_ST}),id:de}),W=Ft.Material.fromType("Color");W.uniforms.color=Be.withAlpha(1);let te=new Ft.Primitive({geometryInstances:K,appearance:new Ft.EllipsoidSurfaceAppearance({material:W}),shadows:E.shadows});if(ce.add(te),E.showLabel){let Y=V._core.toDegrees(Qe);M.text=E.value?E.value(me,de):me+"",M.position=Ft.Cartesian3.fromDegrees(Y.lon,Y.lat,_e*1.1),M.useColorConfig&&(M.fillColor=Be),Z.add(M)}}),q.length){let j=new Ft.GroundPrimitive({geometryInstances:q,appearance:new Ft.PerInstanceColorAppearance({translucent:E.alpha<1}),classificationType:Ft.ClassificationType.BOTH,shadows:E.shadows});ce.add(j)}E.showLabel&&ce.add(Z),V.probj.push(ce),U.data.geometryPrimitive=ce,U.state=Ft.QuadtreeTileLoadState.LOADING,U.state===Ft.QuadtreeTileLoadState.LOADING&&(U.data.geometryPrimitive.update(k,[]),U.state=Ft.QuadtreeTileLoadState.DONE,U.renderable=!0)},ne=>{U.count==null&&(U.count=0),U.count+=1,U.count>=2?(U.state=Ft.QuadtreeTileLoadState.DONE,U.renderable=!0):U.state=Ft.QuadtreeTileLoadState.START})}else{U.state=Ft.QuadtreeTileLoadState.DONE,U.renderable=!0;return}U.state=Ft.QuadtreeTileLoadState.LOADING}})(L,R,Q)},this._primitive=new Ft.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:5});var T=this._viewer.scene,D=T.primitives;D.add(this._primitive),C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var F={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this._Provider.treeID=F.id,this.setTreeobj(F),this._tree.insertGroupId(F,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.createLaycolorVectorGeoJsonFeatureLayer=function(o,A,f,m,C,y){var x={type:"2D",height:100,scale:1,defaultColor:"#ffffff",alpha:.5,level_max:20,level_min:10},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:this._core.defaultValue(A.srs,"EPSG:4490")+":{z}",TILEMATRIXSET:this._core.defaultValue(A.srs,"EPSG:4490"),FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit};let E=this._core.extend(x,f,!0);A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");let I;Array.isArray(E.color)&&(I={name:E.color[0].name,value:{">":{},"<":{}}},E.color.forEach(F=>{if(F.value.indexOf&&F.value.indexOf(">")>-1){let L=F.value.split(">");I.value[">"][L[1]]=Ft.Color.fromCssColorString(F.color).withAlpha(E.alpha)}else if(F.value.indexOf&&F.value.indexOf("<")>-1){let L=F.value.split("<");I.value["<"][L[1]]=Ft.Color.fromCssColorString(F.color).withAlpha(E.alpha)}else I.value[F.value]=Ft.Color.fromCssColorString(F.color).withAlpha(E.alpha)}));let w=Ft.Color.fromCssColorString(E.defaultColor).withAlpha(E.alpha);var Q=this;this._urlTemplate=A.url+"?"+this._serialize(v.urlParams);var M=A.url+"?"+this._serialize(v.urlParams);this._Provider=new Ts(this._viewer,this._cesium),this._Provider._normalTile=f.level_max-1,this._Provider._minimumHeight=0,this._Provider.loadTile=function(F,L){(function(R,k,U){if(k.state===Ft.QuadtreeTileLoadState.START){if(k.data={lines:[],geometryPrimitive:void 0},k.level>=f.level_min&&k.level<f.level_max&&U.item.show){var V=M.replace(window.encodeURIComponent("{x}"),k.x).replace(window.encodeURIComponent("{y}"),k.y).replace(window.encodeURIComponent("{z}"),k.level);U._cache&&(V+="&"+U._core.getuid());let H=[];Ft.GeoJsonDataSource.load(V).then(ie=>{let Z=ie.entities.values;if(!Z||!Z.length){k.state=Ft.QuadtreeTileLoadState.DONE,k.renderable=!0;return}Z.forEach(ne=>{let se=ne.properties.getValue(),ce,j;if(E.type==="3D"){if(ce=E.height,se&&typeof E.height=="string"&&/^\[/.test(E.height)&&/\]$/.test(E.height)){let Be=E.height.replace(/\[/,"").replace(/\]/,"");ce=se[Be]||100}j=ce*E.scale}let de;if(se&&typeof E.color=="string"&&/^\[/.test(E.color)&&/\]$/.test(E.color)){let Be=E.color.replace(/\[/,"").replace(/\]/,"");Be=se[Be]||E.defaultColor,de=Ft.Color.fromCssColorString(Be).withAlpha(E.alpha)}else if(I&&se[I.name]){let Be=se[I.name];if(I.value[Be])de=I.value[Be];else{for(let Qe in I.value[">"])if(Be>Qe){de=I.value[">"][Qe];break}if(!de){for(let Qe in I.value["<"])if(Be<Qe){de=I.value["<"][Qe];break}}}}if(!de&&(de=w.clone()),ne.polygon){let Be=ne.polygon.hierarchy.getValue().positions;var me=new Ft.PolygonGeometry({polygonHierarchy:new Ft.PolygonHierarchy(Be),height:0,extrudedHeight:E.type==="3D"?j:0,vertexFormat:Ft.VertexFormat.DEFAULT,perPositionHeight:!1}),_e=new Ft.GeometryInstance({id:se,geometry:me,attributes:{color:new Ft.ColorGeometryInstanceAttribute.fromColor(de)}});H.push(_e)}});let oe;if(H.length){let ne=E.type==="3D"?Ft.Primitive:Ft.GroundPrimitive;oe=new ne({geometryInstances:H,appearance:new Ft.PerInstanceColorAppearance({translucent:E.alpha<1}),classificationType:Ft.ClassificationType.BOTH,shadows:E.shadows})}U.probj.push(oe),k.data.geometryPrimitive=oe,k.state=Ft.QuadtreeTileLoadState.LOADING,k.state===Ft.QuadtreeTileLoadState.LOADING&&(k.data.geometryPrimitive.update(R,[]),k.state=Ft.QuadtreeTileLoadState.DONE,k.renderable=!0)},ie=>{k.count==null&&(k.count=0),k.count+=1,k.count>=2?(k.state=Ft.QuadtreeTileLoadState.DONE,k.renderable=!0):k.state=Ft.QuadtreeTileLoadState.START})}else{k.state=Ft.QuadtreeTileLoadState.DONE,k.renderable=!0;return}k.state=Ft.QuadtreeTileLoadState.LOADING}})(F,L,Q)},this._primitive=new Ft.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:5});var B=this._viewer.scene,T=B.primitives;T.add(this._primitive),C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var D={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this._Provider.treeID=D.id,this.setTreeobj(D),this._tree.insertGroupId(D,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.createVector3DTilesFeatureLayer=function(o,A,f,m,C,y){var x={color:"#ffffff",level_max:20,level_min:10,tilingScheme:new Ft.WebMercatorTilingScheme},v={url:A.url,_x:A._x||0,_y:A._y||0,upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit};let E=this._core.extend(x,f,!0);A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");var I=this;this._urlTemplate=A.url;var w=A.url;this._Provider=new Ts(this._viewer,this._cesium,E.tilingScheme),this._Provider._normalTile=f.level_max-1,this._Provider._minimumHeight=0,this._Provider.loadTile=function(T,D){(function(F,L,R){if(L.state===Ft.QuadtreeTileLoadState.START){if(L.data={lines:[],geometryPrimitive:void 0},L.level>=f.level_min&&L.level<f.level_max&&R.item.show){var k=w.replace("{x}",L.x-v._x).replace("{y}",L.y-v._y).replace("{z}",L.level);R._cache&&(k+="&"+R._core.getuid());let V=new Ft.Cesium3DTileset({url:k,...E}).readyPromise.then(function(H){R.probj.push(H),L.data.geometryPrimitive=H,R._viewer.scene.primitives.add(H),L.state=Ft.QuadtreeTileLoadState.LOADING,L.state===Ft.QuadtreeTileLoadState.LOADING&&(L.data.geometryPrimitive.update(F,[]),L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0)});V.catch&&V.catch(function(H){L.count==null&&(L.count=0),L.count+=1,L.count>=2?(L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0):L.state=Ft.QuadtreeTileLoadState.START}),V.otherwise&&V.otherwise(function(H){L.count==null&&(L.count=0),L.count+=1,L.count>=2?(L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0):L.state=Ft.QuadtreeTileLoadState.START})}else{L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0;return}L.state=Ft.QuadtreeTileLoadState.LOADING}})(T,D,I)},this._primitive=new Ft.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:5});var Q=this._viewer.scene,M=Q.primitives;M.add(this._primitive),C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id);var B={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"modelLayer",item:this,url:A.url,style:f};return this._Provider.treeID=B.id,this.setTreeobj(B),this._tree.insertGroupId(B,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.createVector3DTilesFeatureLayerRelease=function(o,A,f,m,C,y){var x={color:"#ffffff",level_max:20,level_min:10,tilingScheme:new Ft.WebMercatorTilingScheme},v={url:A.url,_x:A._x||0,_y:A._y||0,upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit};let E=this._core.extend(x,f,!0);A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");var I=this;I.models=0,this._urlTemplate=A.url;var w=A.url;this._Provider=new Ts(this._viewer,this._cesium,E.tilingScheme),this._Provider._normalTile=f.level_max-1,this._Provider._minimumHeight=0,this._Provider.loadTile=function(T,D){(function(F,L,R){if(L.state===Ft.QuadtreeTileLoadState.START){if(L.data={lines:[],geometryPrimitive:void 0},L.level>=f.level_min&&L.level<f.level_max&&R.item.show){var k=w.replace("{x}",L.x-v._x).replace("{y}",L.y-v._y).replace("{z}",18);R._cache&&(k+="&"+R._core.getuid());let V=new Ft.Cesium3DTileset({url:k,...E}).readyPromise.then(function(H){L.freeResources=function(){L.state=0,L.renderable=!1,L.upsampledFromParent=!1,Ft.defined(L.data)&&Ft.defined(L.data.freeResources)&&L.data.freeResources(),Ft.defined(this.data)&&Ft.defined(this.data.geometryPrimitive)&&L._level>=18&&(this.data.geometryPrimitive.destroy(),this.data.geometryPrimitive=void 0),q(L._southwestChild),L._southwestChild=void 0,q(L._southeastChild),L._southeastChild=void 0,q(L._northwestChild),L._northwestChild=void 0,q(L._northeastChild),L._northeastChild=void 0};function q(ie){Ft.defined(ie)&&ie.freeResources()}R.probj.push(H),R._viewer.scene.primitives.add(H),L.state=Ft.QuadtreeTileLoadState.LOADING,L.state===Ft.QuadtreeTileLoadState.LOADING&&(L.data.geometryPrimitive.update(F,[]),L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0)});V.catch&&V.catch(function(H){L.count==null&&(L.count=0),L.count+=1,L.count>=2?(L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0):L.state=Ft.QuadtreeTileLoadState.START}),V.otherwise&&V.otherwise(function(H){L.count==null&&(L.count=0),L.count+=1,L.count>=2?(L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0):L.state=Ft.QuadtreeTileLoadState.START})}else{L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0;return}L.state=Ft.QuadtreeTileLoadState.LOADING}})(T,D,I)},this._primitive=new Ft.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:5});var Q=this._viewer.scene,M=Q.primitives;M.add(this._primitive),C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id);var B={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"modelLayer",item:this,url:A.url,style:f};return this._Provider.treeID=B.id,this.setTreeobj(B),this._tree.insertGroupId(B,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.VectorGeoJsonFeatureLayer=function(o,A,f,m,C,y){var x=this._core.VectorSlice(A,this._cesium),v=new IA(this._viewer,this._cesium,x),E=this;this._Provider=v,v._loadTile=function(w){var Q=new Ft.PrimitiveCollection,M=new Ft.PointPrimitiveCollection,B=new Ft.LabelCollection,T=new Ft.BillboardCollection,D=[],F=[],L=-1;return w.features.forEach(function(R){var k=[];if(f.lable!=null&&R.geometry.coordinates[0][0]==null){var U=0;if(f.lable.height!=null&&/^\[/.test(f.lable.height)&&/\]$/.test(f.lable.height)){var V=f.lable.height.replace(/\[/,"").replace(/\]/,"");U=parseFloat(R.properties[V])}var H=E._core.StyleContrast("lable",f.lable,Ft);H.fillColor=E._color.VectorColorTransformation(H.fillColor,R),H.outlineColor=E._color.VectorColorTransformation(H.outlineColor,R),H.backgroundColor=E._color.VectorColorTransformation(H.backgroundColor,R),H.text=E._core.Analysis(H.text,R),H.position=new Ft.Cartesian3.fromDegrees(R.geometry.coordinates[0],R.geometry.coordinates[1],U),B.add(H)}if(f.billboard!=null&&R.geometry.coordinates[0][0]==null){var U=0,q=f.billboard;if(q.height!=null&&/^\[/.test(q.height)&&/\]$/.test(q.height)){var V=q.height.replace(/\[/,"").replace(/\]/,"");U=parseFloat(R.properties[V])}var ie=E._core.StyleContrast("billboard",q,Ft);ie.position=new Ft.Cartesian3.fromDegrees(R.geometry.coordinates[0],R.geometry.coordinates[1],U),T.add(ie)}if(f.point!=null&&R.geometry.coordinates[0][0]==null){var U=0,q=f.point;if(q.height!=null&&/^\[/.test(q.height)&&/\]$/.test(q.height)){var V=q.height.replace(/\[/,"").replace(/\]/,"");U=parseFloat(R.properties[V])}var ie=E._core.StyleContrast("point",q,Ft);ie.position=new Ft.Cartesian3.fromDegrees(R.geometry.coordinates[0],R.geometry.coordinates[1],U),ie.color=E._color.VectorColorTransformation(ie.color,R),ie.outlineColor=E._color.VectorColorTransformation(ie.outlineColor,R),M.add(ie)}if(f.polyline!=null){var U=0,q=f.polyline;if(q.height!=null&&/^\[/.test(q.height)&&/\]$/.test(q.height)){var V=q.height.replace(/\[/,"").replace(/\]/,"");U=parseFloat(R.properties[V])}var ie=E._core.StyleContrast("polyline",q,Ft);if(L=ie.classificationType,delete ie.classificationType,Array.isArray(R.geometry.coordinates)&&R.geometry.coordinates.length>0)if(Array.isArray(R.geometry.coordinates[0][0]))for(var Z=0;Z<R.geometry.coordinates.length;Z++){k=[],k=E._core.coordinate(k,R.geometry.coordinates[Z]),ie.positions=Ft.Cartesian3.fromDegreesArray(k);var oe=E._core.createPolyline(ie,L,R,Ft);D.push(oe)}else{k=E._core.coordinate(k,R.geometry.coordinates),ie.positions=Ft.Cartesian3.fromDegreesArray(k);var oe=E._core.createPolyline(ie,L,R,Ft);D.push(oe)}}if(f.polygon!=null){var U=0,q=f.polygon;if(q.height!=null&&/^\[/.test(q.height)&&/\]$/.test(q.height)){var V=q.height.replace(/\[/,"").replace(/\]/,"");U=parseFloat(R.properties[V])}var ie=E._core.StyleContrast("polygon",q,Ft);if(ie.material=E._color.VectorColorTransformation(ie.material,R),L=ie.classificationType,delete ie.classificationType,Array.isArray(R.geometry.coordinates)&&R.geometry.coordinates.length>0)if(Array.isArray(R.geometry.coordinates[0][0]))for(var Z=0;Z<R.geometry.coordinates.length;Z++){k=[],R.geometry.coordinates[Z].pop(),k=E._core.coordinate(k,R.geometry.coordinates[Z]),ie.polygonHierarchy=new Ft.PolygonHierarchy(Ft.Cartesian3.fromDegreesArray(k));var oe=E._core.createPolygon(ie,L,R,Ft);F.push(oe)}else{k=E._core.coordinate(k,R.geometry.coordinates),ie.polygonHierarchy=new Ft.PolygonHierarchy(Ft.Cartesian3.fromDegreesArray(k));var oe=E._core.createPolygon(ie,L,R,Ft);F.push(oe)}}}),Q.add(B),Q.add(T),Q.add(M),D.length>0&&(L!=-1?Q.add(new Ft.GroundPolylinePrimitive({geometryInstances:D,classificationType:L,appearance:new Ft.PolylineMaterialAppearance})):Q.add(new Ft.Primitive({geometryInstances:D,appearance:new Ft.PolylineMaterialAppearance}))),F.length>0&&(L!=-1?Q.add(new Ft.GroundPrimitive({geometryInstances:F,classificationType:L,appearance:new Ft.PerInstanceColorAppearance({translucent:!0,vertexShaderSource:E._core.Shaders("vertexShaderSource"),fragmentShaderSource:E._core.Shaders("fragmentShaderSource")})})):Q.add(new Ft.Primitive({geometryInstances:F,appearance:new Ft.PerInstanceColorAppearance({translucent:!0,vertexShaderSource:E._core.Shaders("vertexShaderSource"),fragmentShaderSource:E._core.Shaders("fragmentShaderSource")})}))),Q},this.item=v._primitiveCollection,v.addTo(this._viewer),C||this.setVisibility(!1),this._core.isnull(f.id)&&(f.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+f.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var I={id:f.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"Vector",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this.setTreeobj(I),this._tree.insertGroupId(I,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.createVolumeVectorGeoJsonFeatureLayerJCDthOptimizationxp=function(o,A,f,m,C,y){var x={show:!0,positions:[],shape:void 0,cornerType:this._cesium.CornerType.ROUNDED,granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.DISABLED,level_max:20,level_min:10},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a)))),this._option=this._core.extend(x,f,!0),A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");var E={polygonHierarchy:void 0,height:0,extrudedHeight:0,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,perPositionHeight:!1,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.RED},I=this;this._urlTemplate=A.url+"?"+this._serialize(v.urlParams);var w=A.url+"?"+this._serialize(v.urlParams);this._Provider=new Ts(this._viewer,this._cesium),this._Provider._normalTile=f.level_max-1,this._Provider.loadTile=function(T,D){(function(F,L,R){if(L.state===Ft.QuadtreeTileLoadState.START){if(L.data={lines:[],geometryPrimitive:void 0},L.level>=f.level_min&&L.level<f.level_max&&R.item.show){var k=w.replace(window.encodeURIComponent("{x}"),L.x).replace(window.encodeURIComponent("{y}"),L.y).replace(window.encodeURIComponent("{z}"),L.level);R._cache&&(k+="&"+R._core.getuid()),R._core.xhr({url:k,type:"get",dataType:"json",success:function(U){if(U==null){L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0;return}var V=[],H=[];R.Legend=[];function q(j){for(var de=0;de<j.length;de++)Array.isArray(j[de])?q(j[de]):oe.push(j[de])}function ie(){if(/^\[/.test(R._option.extrudedHeight)&&/\]$/.test(R._option.extrudedHeight)){var j=R._option.extrudedHeight.replace(/\[/,"").replace(/\]/,"");E.extrudedHeight=parseFloat(ne.properties[j])}if(E.material=R._option.material,/^\[/.test(R._option.material)&&/\]$/.test(R._option.material)){var de=R._option.material.replace(/\[/,"").replace(/\]/,"");E.material=ne.properties[de],R._core.isHtmlColor(E.material)?E.material=R._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=R._color.rgbaStringToRgbaObj(E.material)),E.material.red>1&&(E.material.red=E.material.red/255),E.material.green>1&&(E.material.green=E.material.green/255),E.material.blue>1&&(E.material.blue=E.material.blue/255),E.material.alpha>1&&(E.material.a=E.material.alpha/255),E.material=R._color.createColor(E.material.red,E.material.green,E.material.blue,E.material.alpha))}else R._option.material&&(E.material=R._option.material),E.material&&(R._core.isHtmlColor(E.material)?E.material=R._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=R._color.rgbaStringToRgbaObj(E.material)),E.material.red>1&&(E.material.red=E.material.red/255),E.material.green>1&&(E.material.green=E.material.green/255),E.material.blue>1&&(E.material.blue=E.material.blue/255),E.material.alpha>1&&(E.material.a=E.material.alpha/255),E.material=R._color.createColor(E.material.red,E.material.green,E.material.blue,E.material.alpha)));if(oe.length>=2){var me=Ft.Cartesian3.fromDegreesArray(oe);E.polygonHierarchy=new Ft.PolygonHierarchy(me);var _e=new Ft.PolygonGeometry(E),Be=new Ft.GeometryInstance({id:ne,geometry:_e,attributes:{color:new Ft.ColorGeometryInstanceAttribute.fromColor(E.material)}}),Qe="material:"+E.material.red*255+","+E.material.green*255+","+E.material.blue*255;R.Legend.push(Qe),V.push(Be)}}for(var Z=0;Z<U.features.length;Z++){var oe=[],ne=U.features[Z];if(Array.isArray(ne.geometry.coordinates)&&ne.geometry.coordinates.length>0)if(Array.isArray(ne.geometry.coordinates[0][0]))for(var se=0;se<ne.geometry.coordinates.length;se++)oe=[],ne.geometry.coordinates[se].pop(),q(ne.geometry.coordinates[se]),ie(oe);else q(ne.geometry.coordinates),ie(oe)}V.length==0&&(L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0);var ce=new Ft.Primitive({geometryInstances:V,appearance:new Ft.PerInstanceColorAppearance({translucent:!1,vertexShaderSource:R._core.Shaders("vertexShaderSource"),fragmentShaderSource:R._core.Shaders("fragmentShaderSource")}),shadows:R._option.shadows});L.data.geometryPrimitive=ce,L.state=Ft.QuadtreeTileLoadState.LOADING,L.state===Ft.QuadtreeTileLoadState.LOADING&&(L.data.geometryPrimitive.update(F,[]),L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0)},error:function(){L.count==null&&(L.count=0),L.count+=1,L.count>=2?(L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0):L.state=Ft.QuadtreeTileLoadState.START}})}else{L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0;return}L.state=Ft.QuadtreeTileLoadState.LOADING}})(T,D,I)},this._primitive=new Ft.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:3});var Q=this._viewer.scene,M=Q.primitives;M.add(this._primitive),C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var B={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this.setTreeobj(B),this._tree.insertGroupId(B,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.VolumeVectorGeoJsonFeatureLayerOptimization1ss=function(o,A,f,m,C,y){var x={show:!0,positions:[],shape:void 0,cornerType:this._cesium.CornerType.ROUNDED,granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.DISABLED,level_max:20,level_min:10},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a)))),this._option=this._core.extend(x,f,!0),A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");var E=[],I={polygonHierarchy:void 0,height:0,extrudedHeight:0,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,perPositionHeight:!1,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.RED},w=this;this._urlTemplate=A.url+"?"+this._serialize(v.urlParams),this._Provider=new Ts(this._viewer,this._cesium),this._Provider._normalTile=f.level_max-1,this._Provider.loadTile=function(T,D){if(this.tile=null,this.tile=D,D.state===this._cesium.QuadtreeTileLoadState.START&&w.item.show){var F="z"+D.level+"x"+D.x+"y"+D.y;if(D.data={lines:[],geometryPrimitive:void 0},D.level>=f.level_min&&D.level<f.level_max&&w.item.show){var L=Vi.filter(E,function(q){return q.x==D.x&&q.y==D.y&&q.level==D.level});if(L.length!=0&&L[0].data&&L[0].data.length>0){D.data.geometryPrimitive=new Ft.Primitive({geometryInstances:L[0].data,appearance:new Ft.PerInstanceColorAppearance({flat:!0,translucent:!0,faceForward:!0,closed:!0}),shadows:Ft.ShadowMode.ENABLED}),D.state=Ft.QuadtreeTileLoadState.LOADING,D.state===Ft.QuadtreeTileLoadState.LOADING&&(D.data.geometryPrimitive&&(D.state=Ft.QuadtreeTileLoadState.DONE),D.renderable=!0);return}if(w.PrimitiveData.length>0){for(var R=0;R<w.PrimitiveData.length;R++)if(w.PrimitiveData[R].key==F){w.Primitivekey.includes(F)||w.Primitivekey.push(F);return}}if(!w.Primitivekey.includes(F)){w.Primitivekey.push(F),E.push({level:D.level,x:D.x,y:D.y,data:void 0});for(var k=w._option.level_min+(w._option.level_max-w._option.level_min)/2,U=rdt(D,k),R=0;R<U.length;R++){var V=U[R],H="z"+V.level+"x"+V.x+"y"+V.y;w.loadAllKey.includes(H)||(w.loadAllKey.push(H),function(ie){var Z=w._urlTemplate.replace(window.encodeURIComponent("{x}"),ie.x).replace(window.encodeURIComponent("{y}"),ie.y).replace(window.encodeURIComponent("{z}"),ie.level);w.tilesLength++,w._cache&&(Z+="&"+w._core.getuid());var oe="z"+ie.level+"x"+ie.x+"y"+ie.y;w._core.xhr({url:Z,type:"get",dataType:"json",success:function(ne){var se=[],ce=[];w.Legend=[];function j(K){for(var W=0;W<K.length;W++)Array.isArray(K[W])?j(K[W]):_e.push(K[W])}function de(){if(/^\[/.test(w._option.extrudedHeight)&&/\]$/.test(w._option.extrudedHeight)){var K=w._option.extrudedHeight.replace(/\[/,"").replace(/\]/,"");I.extrudedHeight=parseFloat(Be.properties[K])}if(I.material=w._option.material,/^\[/.test(w._option.material)&&/\]$/.test(w._option.material)){var W=w._option.material.replace(/\[/,"").replace(/\]/,"");I.material=Be.properties[W],w._core.isHtmlColor(I.material)?I.material=w._color.colorFromHtmlColor(I.material):(/^rgb/.test(I.material)&&(I.material=w._color.rgbaStringToRgbaObj(I.material)),I.material.red>1&&(I.material.red=I.material.red/255),I.material.green>1&&(I.material.green=I.material.green/255),I.material.blue>1&&(I.material.blue=I.material.blue/255),I.material.alpha>1&&(I.material.a=I.material.alpha/255),I.material=w._color.createColor(I.material.red,I.material.green,I.material.blue,I.material.alpha))}else w._option.material&&(I.material=w._option.material),I.material&&(w._core.isHtmlColor(I.material)?I.material=w._color.colorFromHtmlColor(I.material):(/^rgb/.test(I.material)&&(I.material=w._color.rgbaStringToRgbaObj(I.material)),I.material.red>1&&(I.material.red=I.material.red/255),I.material.green>1&&(I.material.green=I.material.green/255),I.material.blue>1&&(I.material.blue=I.material.blue/255),I.material.alpha>1&&(I.material.a=I.material.alpha/255),I.material=w._color.createColor(I.material.red,I.material.green,I.material.blue,I.material.alpha)));if(_e.length>=2){var te=Ft.Cartesian3.fromDegreesArray(_e);I.polygonHierarchy=new Ft.PolygonHierarchy(te);var Y=new Ft.PolygonGeometry(I),he=new Ft.GeometryInstance({id:Be,geometry:Y,attributes:{color:new Ft.ColorGeometryInstanceAttribute.fromColor(I.material)}}),fe="material:"+I.material.red*255+","+I.material.green*255+","+I.material.blue*255;w.Legend.push(fe),se.push(he)}}for(var me=0;me<ne.features.length;me++){var _e=[],Be=ne.features[me];if(Array.isArray(Be.geometry.coordinates)&&Be.geometry.coordinates.length>0)if(Array.isArray(Be.geometry.coordinates[0][0]))for(var Qe=0;Qe<Be.geometry.coordinates.length;Qe++)_e=[],Be.geometry.coordinates[Qe].pop(),j(Be.geometry.coordinates[Qe]),de(_e);else j(Be.geometry.coordinates),de(_e)}if(se.length>0){var Ie=new Ft.Primitive({geometryInstances:se,appearance:new Ft.PerInstanceColorAppearance({translucent:!1,vertexShaderSource:w._core.Shaders("vertexShaderSource"),fragmentShaderSource:w._core.Shaders("fragmentShaderSource")}),shadows:w._option.shadows}),ve={level:ie.level,key:oe,data:Ie};w.probj.push(Ie),w.loadFinishKey.push(oe),w.PrimitiveData.push(ve),w._viewer.scene.primitives.add(Ie),w.returnCount++}},error:function(){},complete:function(ne,se){}})}(V))}}}else{D.state=Ft.QuadtreeTileLoadState.LOADING,D.state===Ft.QuadtreeTileLoadState.LOADING&&(D.data.geometryPrimitive&&(D.state=Ft.QuadtreeTileLoadState.DONE),D.renderable=!0);return}}},this._primitive=new Ft.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:3});var Q=this._viewer.scene,M=Q.primitives;M.add(this._primitive),C||this.setVisibility(!1),this._core.isnull(I.id)&&(I.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+I.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var B={id:I.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};this.setTreeobj(B),this._tree.insertGroupId(B,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item)};Ll.prototype.VolumeVectorGeoJsonFeatureLayerGis=function(o,A,f,m,C,y){var x={show:!0,positions:[],shape:void 0,cornerType:this._cesium.CornerType.ROUNDED,granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.DISABLED,level_max:20,level_min:10},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a)))),this._option=this._core.extend(x,f,!0),A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");var E=[],I=[],w={id:A.id,polygonHierarchy:void 0,height:0,extrudedHeight:0,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,perPositionHeight:!1,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.RED},Q=this;this._urlTemplate=A.url+"/"+window.encodeURIComponent("{z}")+"/"+window.encodeURIComponent("{x}")+"/"+window.encodeURIComponent("{reverseY}")+".json",this._Provider=new Ts(this._viewer,this._cesium),this._Provider._normalTile=f.level_max-1,this._Provider.loadTile=function(D,F){if(this.tile=null,this.tile=F,F.state===this._cesium.QuadtreeTileLoadState.START&&Q.item.show){var L="z"+F.level+"x"+F.x+"y"+F.y;if(F.data={lines:[],geometryPrimitive:void 0},F.level>=f.level_min&&F.level<f.level_max&&Q.item.show){var R=Vi.filter(E,function(U){return U.x==F.x&&U.y==F.y&&U.level==F.level});if(R.length!=0&&R[0].data&&R[0].data.length>0){F.data.geometryPrimitive=new Ft.Primitive({geometryInstances:R[0].data,appearance:new Ft.PerInstanceColorAppearance({flat:!0,translucent:!0,faceForward:!0,closed:!0}),shadows:Ft.ShadowMode.ENABLED}),F.state=Ft.QuadtreeTileLoadState.LOADING,F.state===Ft.QuadtreeTileLoadState.LOADING&&(F.data.geometryPrimitive&&(F.state=Ft.QuadtreeTileLoadState.DONE),F.renderable=!0);return}if(Q.PrimitiveData.length>0){for(var k=0;k<Q.PrimitiveData.length;k++)if(Q.PrimitiveData[k].key==L){Q.Primitivekey.includes(L)||Q.Primitivekey.push(L);return}}Q.Primitivekey.includes(L)||(Q.Primitivekey.push(L),E.push({level:F.level,x:F.x,y:F.y,data:void 0}),function(U){var V=U.tilingScheme.getNumberOfYTilesAtLevel(U.level)-U.y-1,H=Q._urlTemplate.replace(window.encodeURIComponent("{x}"),U.x).replace(window.encodeURIComponent("{reverseY}"),V).replace(window.encodeURIComponent("{z}"),U.level);Q.tilesLength++;var q="z"+U.level+"x"+U.x+"y"+U.y;Q._cache&&(H+="&"+Q._core.getuid());var ie=Vi.filter(I,function(Z){return Z.url==H});ie.length>0||(I.push({url:H}),Q._core.xhr({url:H,type:"get",dataType:"json",success:function(Z){var oe=[],ne=[];Q.Legend=[];function se(Ie){for(var ve=0;ve<Ie.length;ve++)Array.isArray(Ie[ve])?se(Ie[ve]):de.push(Ie[ve])}function ce(){if(w.extrudedHeight=parseFloat(Q._option.extrudedHeight),/^\[/.test(Q._option.extrudedHeight)&&/\]$/.test(Q._option.extrudedHeight)){var Ie=Q._option.extrudedHeight.replace(/\[/,"").replace(/\]/,"");w.extrudedHeight=parseFloat(me.properties[Ie])*3}if(w.material=Q._option.material,/^\[/.test(Q._option.material)&&/\]$/.test(Q._option.material)){var ve=Q._option.material.replace(/\[/,"").replace(/\]/,"");w.material=me.properties[ve],Q._core.isHtmlColor(w.material)?w.material=Q._color.colorFromHtmlColor(w.material):(/^rgb/.test(w.material)&&(w.material=Q._color.rgbaStringToRgbaObj(w.material)),w.material.red>1&&(w.material.red=w.material.red/255),w.material.green>1&&(w.material.green=w.material.green/255),w.material.blue>1&&(w.material.blue=w.material.blue/255),w.material.alpha>1&&(w.material.a=w.material.alpha/255),w.material=Q._color.createColor(w.material.red,w.material.green,w.material.blue,w.material.alpha))}else Q._option.material&&(w.material=Q._option.material),w.material&&(Q._core.isHtmlColor(w.material)?w.material=Q._color.colorFromHtmlColor(w.material):(/^rgb/.test(w.material)&&(w.material=Q._color.rgbaStringToRgbaObj(w.material)),w.material.red>1&&(w.material.red=w.material.red/255),w.material.green>1&&(w.material.green=w.material.green/255),w.material.blue>1&&(w.material.blue=w.material.blue/255),w.material.alpha>1&&(w.material.a=w.material.alpha/255),w.material=Q._color.createColor(w.material.red,w.material.green,w.material.blue,w.material.alpha)));var K=Ft.Color.WHITE;if(de.length>=2){var W=Ft.Cartesian3.fromDegreesArray(de);w.polygonHierarchy=new Ft.PolygonHierarchy(W);var te=new Ft.PolygonGeometry(w),Y=new Ft.GeometryInstance({id:me,geometry:te,attributes:{color:new Ft.ColorGeometryInstanceAttribute.fromColor(K)}}),he="material:"+w.material.red*255+","+w.material.green*255+","+w.material.blue*255;Q.Legend.push(he),oe.push(Y)}}for(var j=0;j<Z.features.length;j++){var de=[],me=Z.features[j];if(Array.isArray(me.geometry.coordinates)&&me.geometry.coordinates.length>0)if(Array.isArray(me.geometry.coordinates[0][0]))for(var _e=0;_e<me.geometry.coordinates.length;_e++)de=[],me.geometry.coordinates[_e].pop(),se(me.geometry.coordinates[_e]),ce(de);else se(me.geometry.coordinates),ce(de)}var Be=new Ft.Primitive({geometryInstances:oe,appearance:new Ft.PerInstanceColorAppearance({translucent:!1,vertexShaderSource:Q._core.Shaders("vertexShaderSource"),fragmentShaderSource:Q._core.Shaders("fragmentShaderSource")}),shadows:Q._option.shadows});Q.probj.push(Be);var Qe={level:U.level,key:q,data:Be};Q.loadFinishKey.push(q),Q.PrimitiveData.push(Qe),Q._viewer.scene.primitives.add(Be),Q.returnCount++;try{Q.probj.length==2&&(Q._viewer.scene.primitives.remove(Q.probj[0]),Q.probj.pop())}catch{}},error:function(){var Z=Q.Primitivekey.indexOf(q);Z>-1&&Q.Primitivekey.splice(Z,1),E=Vi.remove(E,function(oe){return oe.x==U.x&&oe.y==U.y&&oe.level==U.level})},complete:function(Z,oe){Z=null,U.state=Ft.QuadtreeTileLoadState.LOADING,U.state===Ft.QuadtreeTileLoadState.LOADING&&(U.data.geometryPrimitive&&(U.state=Ft.QuadtreeTileLoadState.DONE),U.renderable=!0)}}))}(F))}else{F.state=Ft.QuadtreeTileLoadState.LOADING,F.state===Ft.QuadtreeTileLoadState.LOADING&&(F.data.geometryPrimitive&&(F.state=Ft.QuadtreeTileLoadState.DONE),F.renderable=!0);return}}},this._primitive=new Ft.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:3});var M=this._viewer.scene,B=M.primitives;B.add(this._primitive),C||this.setVisibility(!1),this._core.isnull(w.id)&&(w.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+w.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var T={id:w.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this.setTreeobj(T),this._tree.insertGroupId(T,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.PointVectorGeoJsonFeatureLayerGis=function(o,A,f,m,C,y){var x={show:!0,positions:[],shape:void 0,cornerType:this._cesium.CornerType.ROUNDED,granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.DISABLED,level_max:20,level_min:10};this._option=this._core.extend(x,f,!0),A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");var v=[],E={id:A.id,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,perPositionHeight:!1,arcType:this._cesium.ArcType.GEODESIC},I=this;this._urlTemplate=A.url+"/{z}/{x}/{reverseY}.json",this._Provider={},this._Provider1=new cle(this._viewer,this._cesium,{url:this._urlTemplate},function(Q){if(I.Level=I.getLevel(),I.Level<I._option.level_min){if(I.primitve.length>0){for(var M=0;M<I.primitve.length;M++)I._viewer.scene.primitives.remove(I.primitve[M]);I.primitve=[]}if(I.probj.length>0){for(var M=0;M<I.probj.length;M++)I._viewer.scene.primitives.remove(I.probj[M]);I.probj=[]}v=[];return}var B=new Ft.PrimitiveCollection,T=new Ft.PointPrimitiveCollection,D=new Ft.LabelCollection,F=new Ft.BillboardCollection,L="z"+Q.templateValues.z+"x"+Q.templateValues.x+"y"+Q.templateValues.reverseY;Q.data={lines:[],geometryPrimitive:void 0};var R=Q.url.replace("png","json"),k=Vi.filter(v,function(U){return U.url==R});k.length>0||I.start!=1&&(v.push({url:R}),I._core.xhr({url:R,type:"get",dataType:"json",success:function(U){if(U.features.length==0)return;I.Legend=[];function V(ne){for(var se=0;se<ne.length;se++)Array.isArray(ne[se])?V(ne[se]):ie.push(ne[se])}function H(){if(f.lable!=null){var ne=0;if(f.lable.height!=null&&/^\[/.test(f.lable.height)&&/\]$/.test(f.lable.height)){var se=f.lable.height.replace(/\[/,"").replace(/\]/,"");ne=parseFloat(Z.properties[se])}var ce=I._core.StyleContrast("lable",f.lable,Ft);ce.fillColor=I._color.VectorColorTransformation(ce.fillColor,Z),ce.outlineColor=I._color.VectorColorTransformation(ce.outlineColor,Z),ce.backgroundColor=I._color.VectorColorTransformation(ce.backgroundColor,Z),ce.text=I._core.Analysis(ce.text,Z),ce.position=new Ft.Cartesian3.fromDegrees(ie[0],ie[1],ne),D.add(ce)}if(f.billboard!=null){var ne=0,j=f.billboard;if(j.height!=null&&/^\[/.test(j.height)&&/\]$/.test(j.height)){var se=j.height.replace(/\[/,"").replace(/\]/,"");ne=parseFloat(Z.properties[se])}var de=I._core.StyleContrast("billboard",j,Ft);de.position=new Ft.Cartesian3.fromDegrees(ie[0],ie[1],ne),F.add(de)}if(f.point!=null){var ne=0,j=f.point;if(j.height!=null&&/^\[/.test(j.height)&&/\]$/.test(j.height)){var se=j.height.replace(/\[/,"").replace(/\]/,"");ne=parseFloat(Z.properties[se])}var de=I._core.StyleContrast("point",j,Ft);de.position=new Ft.Cartesian3.fromDegrees(ie[0],ie[1],ne),de.color=I._color.VectorColorTransformation(de.color,Z),de.outlineColor=I._color.VectorColorTransformation(de.outlineColor,Z),T.add(de)}}for(var q=0;q<U.features.length;q++){var ie=[],Z=U.features[q];if(Array.isArray(Z.geometry.coordinates)&&Z.geometry.coordinates.length>0)if(Array.isArray(Z.geometry.coordinates[0][0]))for(var oe=0;oe<Z.geometry.coordinates.length;oe++)ie=[],Z.geometry.coordinates[oe].pop(),V(Z.geometry.coordinates[oe]),H(ie);else V(Z.geometry.coordinates),H(ie)}D.length>0&&B.add(D),F.length>0&&B.add(F),T.length>0&&B.add(T),I.primitve.push(B),I.probj.push(B),I._viewer.scene.primitives.add(B),I.returnCount++;try{I.probj.length==2&&(I._viewer.scene.primitives.remove(I.probj[0]),I.probj.pop())}catch{}}}))}),this.img=this._Provider1.ent,C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var w={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this.setTreeobj(w),this._tree.insertGroupId(w,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.PolylineVectorGeoJsonFeatureLayerGis=function(o,A,f,m,C,y){var x={show:!0,positions:[],shape:void 0,cornerType:this._cesium.CornerType.ROUNDED,granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.DISABLED,level_max:20,level_min:10};this._option=this._core.extend(x,f,!0),A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");var v=[],E={id:A.id,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,perPositionHeight:!1,arcType:this._cesium.ArcType.GEODESIC},I=this;this._urlTemplate=A.url+"/{z}/{x}/{reverseY}.json",this._Provider={},this._Provider1=new cle(this._viewer,this._cesium,{url:this._urlTemplate},function(Q){if(I.Level=I.getLevel(),I.Level<I._option.level_min){if(I.primitve.length>0){for(var M=0;M<I.primitve.length;M++)I._viewer.scene.primitives.remove(I.primitve[M]);I.primitve=[]}if(I.probj.length>0){for(var M=0;M<I.probj.length;M++)I._viewer.scene.primitives.remove(I.probj[M]);I.probj=[]}v=[];return}var B=-1,T="z"+Q.templateValues.z+"x"+Q.templateValues.x+"y"+Q.templateValues.reverseY;Q.data={lines:[],geometryPrimitive:void 0};var D=Q.url.replace("png","json"),F=Vi.filter(v,function(L){return L.url==D});F.length>0||I.start!=1&&(v.push({url:D}),I._core.xhr({url:D,type:"get",dataType:"json",success:function(L){if(L.features.length==0)return;var R=[];I.Legend=[];function k(oe){for(var ne=0;ne<oe.length;ne++)Array.isArray(oe[ne])?k(oe[ne]):H.push(oe[ne])}function U(){var oe=0,ne=f;if(ne.height!=null&&/^\[/.test(ne.height)&&/\]$/.test(ne.height)){var se=ne.height.replace(/\[/,"").replace(/\]/,"");oe=parseFloat(q.properties[se])}var ce=I._core.StyleContrast("polyline",ne,Ft);if(B=ce.classificationType,delete ce.classificationType,ce.material=I._option.material,/^\[/.test(I._option.material)&&/\]$/.test(I._option.material)){var j=I._option.material.replace(/\[/,"").replace(/\]/,"");ce.material=q.properties[j],I._core.isHtmlColor(ce.material)?ce.material=I._color.colorFromHtmlColor(ce.material):(/^rgb/.test(ce.material)&&(ce.material=I._color.rgbaStringToRgbaObj(ce.material)),ce.material.red>1&&(ce.material.red=ce.material.red/255),ce.material.green>1&&(ce.material.green=ce.material.green/255),ce.material.blue>1&&(ce.material.blue=ce.material.blue/255),ce.material.alpha>1&&(ce.material.a=ce.material.alpha/255),ce.material=I._color.createColor(ce.material.red,ce.material.green,ce.material.blue,ce.material.alpha))}else I._option.material&&(ce.material=I._option.material),ce.material&&(I._core.isHtmlColor(ce.material)?ce.material=I._color.colorFromHtmlColor(ce.material):(/^rgb/.test(ce.material)&&(ce.material=I._color.rgbaStringToRgbaObj(ce.material)),ce.material.red>1&&(ce.material.red=ce.material.red/255),ce.material.green>1&&(ce.material.green=ce.material.green/255),ce.material.blue>1&&(ce.material.blue=ce.material.blue/255),ce.material.alpha>1&&(ce.material.a=ce.material.alpha/255),ce.material=I._color.createColor(ce.material.red,ce.material.green,ce.material.blue,ce.material.alpha)));if(H.length>=2){ce.positions=Ft.Cartesian3.fromDegreesArray(H);var de=new Ft.GeometryInstance({id:q,geometry:new Ft.PolylineGeometry(ce),attributes:{color:new Ft.ColorGeometryInstanceAttribute.fromColor(ce.material)}}),me="material:"+ce.material.red*255+","+ce.material.green*255+","+ce.material.blue*255;I.Legend.push(me),R.push(de)}}for(var V=0;V<L.features.length;V++){var H=[],q=L.features[V];if(Array.isArray(q.geometry.coordinates)&&q.geometry.coordinates.length>0)if(Array.isArray(q.geometry.coordinates[0][0]))for(var ie=0;ie<q.geometry.coordinates.length;ie++)H=[],q.geometry.coordinates[ie].pop(),k(q.geometry.coordinates[ie]),U(H);else k(q.geometry.coordinates),U(H)}var Z=new Ft.Primitive({geometryInstances:R,appearance:new Ft.PolylineColorAppearance({flat:!0,translucent:!0,faceForward:!0,closed:!0}),shadows:I._option.shadows,classificationType:B});I.probj.push(Z),I.primitve.push(Z),I._viewer.scene.primitives.add(Z),I.returnCount++;try{I.probj.length==2&&(I._viewer.scene.primitives.remove(I.probj[0]),I.probj.pop())}catch{}}}))}),this.img=this._Provider1.ent,C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var w={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this.setTreeobj(w),this._tree.insertGroupId(w,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.VolumeVectorGeoJsonFeatureLayerGisOptimization=function(o,A,f,m,C,y){var x={show:!0,positions:[],shape:void 0,cornerType:this._cesium.CornerType.ROUNDED,granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.DISABLED,level_max:20,level_min:10},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a)))),this._option=this._core.extend(x,f,!0),A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");var E=[],I=[],w={id:A.id,polygonHierarchy:void 0,height:0,extrudedHeight:0,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,perPositionHeight:!1,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.RED},Q=this;this._urlTemplate=A.url+"/{z}/{x}/{reverseY}.json",this._Provider={},this._Provider1=new cle(this._viewer,this._cesium,{url:this._urlTemplate},function(B){if(Q.Level=Q.getLevel(),Q.Level<Q._option.level_min){if(Q.primitve.length>0){for(var T=0;T<Q.primitve.length;T++)Q._viewer.scene.primitives.remove(Q.primitve[T]);Q.primitve=[]}if(Q.probj.length>0){for(var T=0;T<Q.probj.length;T++)Q._viewer.scene.primitives.remove(Q.probj[T]);Q.probj=[]}E=[];return}var D="z"+B.templateValues.z+"x"+B.templateValues.x+"y"+B.templateValues.reverseY;B.data={lines:[],geometryPrimitive:void 0};var F=B.url.replace("png","json"),L=Vi.filter(E,function(R){return R.url==F});L.length>0||Q.start!=1&&(E.push({url:F}),Q._core.xhr({url:F,type:"get",dataType:"json",success:function(R){if(R.features.length==0)return;var k=[],U=[];Q.Legend=[];function V(se){for(var ce=0;ce<se.length;ce++)Array.isArray(se[ce])?V(se[ce]):ie.push(se[ce])}function H(){if(w.extrudedHeight=Q._option.extrudedHeight,/^\[/.test(Q._option.extrudedHeight)&&/\]$/.test(Q._option.extrudedHeight)){var se=Q._option.extrudedHeight.replace(/\[/,"").replace(/\]/,"");w.extrudedHeight=parseFloat(Z.properties[se])*3}if(w.material=Q._option.material,/^\[/.test(Q._option.material)&&/\]$/.test(Q._option.material)){var ce=Q._option.material.replace(/\[/,"").replace(/\]/,"");w.material=Z.properties[ce],Q._core.isHtmlColor(w.material)?w.material=Q._color.colorFromHtmlColor(w.material):(/^rgb/.test(w.material)&&(w.material=Q._color.rgbaStringToRgbaObj(w.material)),w.material.red>1&&(w.material.red=w.material.red/255),w.material.green>1&&(w.material.green=w.material.green/255),w.material.blue>1&&(w.material.blue=w.material.blue/255),w.material.alpha>1&&(w.material.a=w.material.alpha/255),w.material=Q._color.createColor(w.material.red,w.material.green,w.material.blue,w.material.alpha))}else Q._option.material&&(w.material=Q._option.material),w.material&&(Q._core.isHtmlColor(w.material)?w.material=Q._color.colorFromHtmlColor(w.material):(/^rgb/.test(w.material)&&(w.material=Q._color.rgbaStringToRgbaObj(w.material)),w.material.red>1&&(w.material.red=w.material.red/255),w.material.green>1&&(w.material.green=w.material.green/255),w.material.blue>1&&(w.material.blue=w.material.blue/255),w.material.alpha>1&&(w.material.a=w.material.alpha/255),w.material=Q._color.createColor(w.material.red,w.material.green,w.material.blue,w.material.alpha)));if(ie.length>=2){var j=Ft.Cartesian3.fromDegreesArray(ie);w.polygonHierarchy=new Ft.PolygonHierarchy(j);var de=new Ft.PolygonGeometry(w),me=new Ft.GeometryInstance({id:Z,geometry:de,attributes:{color:new Ft.ColorGeometryInstanceAttribute.fromColor(w.material)}}),_e="material:"+w.material.red*255+","+w.material.green*255+","+w.material.blue*255;k.push(me)}}for(var q=0;q<R.features.length;q++){var ie=[],Z=R.features[q];if(Array.isArray(Z.geometry.coordinates)&&Z.geometry.coordinates.length>0)if(Array.isArray(Z.geometry.coordinates[0][0]))for(var oe=0;oe<Z.geometry.coordinates.length;oe++)ie=[],Z.geometry.coordinates[oe].pop(),V(Z.geometry.coordinates[oe]),H(ie);else V(Z.geometry.coordinates),H(ie)}var ne=new Ft.Primitive({geometryInstances:k,appearance:new Ft.PerInstanceColorAppearance({translucent:!1,vertexShaderSource:Q._core.Shaders("vertexShaderSource"),fragmentShaderSource:Q._core.Shaders("fragmentShaderSource")}),shadows:Q._option.shadows});Q.primitve.push(ne),Q.probj.push(ne),Q._viewer.scene.primitives.add(ne),Q.returnCount++;try{Q.probj.length==2&&(Q._viewer.scene.primitives.remove(Q.probj[0]),Q.probj.pop())}catch{}}}))}),this.img=this._Provider1.ent,C||this.setVisibility(!1),this._core.isnull(w.id)&&(w.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+w.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var M={id:w.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this.setTreeobj(M),this._tree.insertGroupId(M,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.VolumeVectorGeoJsonFeatureLayerClassOptimization=function(o,A,f,m,C,y){var x={polygonHierarchy:void 0,height:0,extrudedHeight:999999,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.WHITE,shadows:this._cesium.ShadowMode.ENABLED,show:!0},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a))));var E=this._core.extend(x,f,!0);A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");var I=[],w=this;this._urlTemplate=A.url+"?"+this._serialize(v.urlParams),this._Provider=new Ts(this._viewer,this._cesium),this._Provider._normalTile=f.level_max-1,this._Provider.loadTile=function(T,D){if(this.tile=null,this.tile=D,D.state===this._cesium.QuadtreeTileLoadState.START&&w.item.show){var F="z"+D.level+"x"+D.x+"y"+D.y;if(D.data={lines:[],geometryPrimitive:void 0},D.level>=f.level_min&&D.level<f.level_max&&w.item.show){var L=Vi.filter(I,function(k){return k.x==D.x&&k.y==D.y&&k.level==D.level});if(L.length!=0&&L[0].data&&L[0].data.length>0){D.data.geometryPrimitive=new Ft.Primitive({geometryInstances:L[0].data,appearance:new Ft.PerInstanceColorAppearance({flat:!0,translucent:!0,faceForward:!0,closed:!0}),shadows:Ft.ShadowMode.ENABLED}),D.state=Ft.QuadtreeTileLoadState.LOADING,D.state===Ft.QuadtreeTileLoadState.LOADING&&(D.data.geometryPrimitive&&(D.state=Ft.QuadtreeTileLoadState.DONE),D.renderable=!0);return}if(w.PrimitiveData.length>0){for(var R=0;R<w.PrimitiveData.length;R++)if(w.PrimitiveData[R].key==F){w.Primitivekey.push(F);return}}w.Primitivekey.includes(F)||(w.Primitivekey.push(F),I.push({level:D.level,x:D.x,y:D.y,data:void 0}),function(k){var U=w._urlTemplate.replace(window.encodeURIComponent("{x}"),k.x).replace(window.encodeURIComponent("{y}"),k.y).replace(window.encodeURIComponent("{z}"),k.level);w.tilesLength++,w._cache&&(U+="&"+w._core.getuid()),w._core.xhr({url:U,type:"get",dataType:"json",success:function(V){var H=[],q=[];w.Legend=[];function ie(_e){for(var Be=0;Be<_e.length;Be++)Array.isArray(_e[Be])?ie(_e[Be]):(ne.push(_e[Be]),Be===2&&!se&&(se=!0))}function Z(){var _e=se?Ft.Cartesian3.fromDegreesArrayHeights(ne):Ft.Cartesian3.fromDegreesArray(ne);if(/^\[/.test(f.extrudedHeight)&&/\]$/.test(f.extrudedHeight)){var Be=f.extrudedHeight.replace(/\[/,"").replace(/\]/,"");E.extrudedHeight=parseFloat(ce.properties[Be])}if(E.extrudedHeight=parseFloat(E.extrudedHeight),E.heightReference==1&&delete E.height,E.extrudedHeightReference==1&&delete E.extrudedHeight,/^\[/.test(f.material)&&/\]$/.test(f.material)){var Qe=f.material.replace(/\[/,"").replace(/\]/,"");E.material=ce.properties[Qe],w._core.isHtmlColor(E.material)?E.material=w._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=w._color.rgbaStringToRgbaObj(E.material)),E.material.r>1&&(E.material.r=E.material.r/255),E.material.g>1&&(E.material.g=E.material.g/255),E.material.b>1&&(E.material.b=E.material.b/255),E.material.a>1&&(E.material.a=E.material.a/255),E.material=w._color.createColor(E.material.r,E.material.g,E.material.b,E.material.a))}E.polygonHierarchy=new Ft.PolygonHierarchy(_e);var Ie=new Ft.PolygonGeometry(E);ce.treeID=E.id,ce.VectorType="polygon",ce.VectorStyle={haveZ:se,extrudedHeight:E.extrudedHeight,positions:ne,material:E.material};var ve=new Ft.GeometryInstance({id:ce,geometry:Ie,attributes:{color:new Ft.ColorGeometryInstanceAttribute.fromColor(E.material)}}),K="material:"+E.material.red*255+","+E.material.green*255+","+E.material.blue*255;w.Legend.push(K),H.push(ve)}for(var oe=0;oe<V.features.length;oe++){var ne=[],se=!1,ce=V.features[oe];if(Array.isArray(ce.geometry.coordinates)&&ce.geometry.coordinates.length>0)if(Array.isArray(ce.geometry.coordinates[0][0]))for(var j=0;j<ce.geometry.coordinates.length;j++)ne=[],ce.geometry.coordinates[j].pop(),ie(ce.geometry.coordinates[j]),Z(ne);else ie(ce.geometry.coordinates),Z(ne)}var de=new Ft.ClassificationPrimitive({geometryInstances:H,appearance:new Ft.PerInstanceColorAppearance({translucent:!1,vertexShaderSource:w._core.Shaders("vertexShaderSource"),fragmentShaderSource:w._core.Shaders("fragmentShaderSource")}),classificationType:E.classificationType,shadows:Ft.ShadowMode.ENABLED});w.PrimitiveObj.data=de,w.PrimitiveObj.key=w.Primitivekey[w.returnCount];var me={level:k.level,key:w.Primitivekey[w.returnCount],data:de};w.loadFinishKey.push(w.Primitivekey[w.returnCount]),w.PrimitiveData.push(me),w._viewer.scene.primitives.add(de),w.returnCount++,w.returnCount>=w.tilesLength&&(w.returnCount=0,w.tilesLength=0,w.Primitivekey=[])},error:function(){I=Vi.remove(I,function(V){return V.x==k.x&&V.y==k.y&&V.level==k.level})},complete:function(V,H){V=null,k.state=Ft.QuadtreeTileLoadState.LOADING,k.state===Ft.QuadtreeTileLoadState.LOADING&&(k.data.geometryPrimitive&&(k.state=Ft.QuadtreeTileLoadState.DONE),k.renderable=!0)}})}(D))}else{D.state=Ft.QuadtreeTileLoadState.LOADING,D.state===Ft.QuadtreeTileLoadState.LOADING&&(D.data.geometryPrimitive&&(D.state=Ft.QuadtreeTileLoadState.DONE),D.renderable=!0);return}}},this._primitive=new Ft.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:3});var Q=this._viewer.scene,M=Q.primitives;f&&f.time&&(this._Provider._availability=new Ft.TimeIntervalCollection([new Ft.TimeInterval({start:f.time.start?Ft.JulianDate.fromDate(new Date(f.time.start)):Ft.Iso8601.MINIMUM_VALUE,stop:f.time.end?Ft.JulianDate.fromDate(new Date(f.time.end)):Ft.Iso8601.MAXIMUM_VALUE})]),this._Provider.isAvailable=function(T){if(!Ft.defined(T))throw new Ft.DeveloperError("time is required.");var D=this._availability;return!Ft.defined(D)||D.contains(T)}),M.add(this._primitive),C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var B={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this._Provider.treeID=E.id,this.setTreeobj(B),this._tree.insertGroupId(B,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.createVolumeVectorGeoJsonFeatureLayerDthOptimization2=function(o,A,f,m,C,y){var x={show:!0,positions:[],shape:void 0,cornerType:this._cesium.CornerType.ROUNDED,granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.DISABLED,level_max:20,level_min:10},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a)))),this._option=this._core.extend(x,f,!0),A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");var E={polygonHierarchy:void 0,height:0,extrudedHeight:0,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,perPositionHeight:!1,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.RED},I=this;this._urlTemplate=A.url+"?"+this._serialize(v.urlParams);var w=A.url+"?"+this._serialize(v.urlParams);this._Provider=new Ts(this._viewer,this._cesium),this._Provider._normalTile=f.level_max-1,this._Provider.loadTile=function(T,D){(function(F,L,R){if(L.state===Ft.QuadtreeTileLoadState.START){if(L.data={lines:[],geometryPrimitive:void 0},L.level>=f.level_min&&L.level<f.level_max&&R.item.show){var k=w.replace(window.encodeURIComponent("{x}"),L.x).replace(window.encodeURIComponent("{y}"),L.y).replace(window.encodeURIComponent("{z}"),L.level);R._cache&&(k+="&"+R._core.getuid()),R._core.xhr({url:k,type:"get",dataType:"json",success:function(U){if(U==null){L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0;return}var V=new Ft.PrimitiveCollection;R.Legend=[];function H(ce){for(var j=0;j<ce.length;j++)Array.isArray(ce[j])?H(ce[j]):Z.push(ce[j])}function q(){if(R._option.extrudedHeight&&(E.extrudedHeight=R._option.extrudedHeight),/^\[/.test(R._option.extrudedHeight)&&/\]$/.test(R._option.extrudedHeight)){var ce=R._option.extrudedHeight.replace(/\[/,"").replace(/\]/,"");E.extrudedHeight=parseFloat(oe.properties[ce])}if(E.material=R._option.material,/^\[/.test(R._option.material)&&/\]$/.test(R._option.material)){var j=R._option.material.replace(/\[/,"").replace(/\]/,"");E.material=oe.properties[j],R._core.isHtmlColor(E.material)?E.material=R._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=R._color.rgbaStringToRgbaObj(E.material)),E.material.red>1&&(E.material.red=E.material.red/255),E.material.green>1&&(E.material.green=E.material.green/255),E.material.blue>1&&(E.material.blue=E.material.blue/255),E.material.alpha>1&&(E.material.a=E.material.alpha/255),E.material=R._color.createColor(E.material.red,E.material.green,E.material.blue,E.material.alpha))}else R._option.material&&(E.material=R._option.material),E.material&&(R._core.isHtmlColor(E.material)?E.material=R._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=R._color.rgbaStringToRgbaObj(E.material)),E.material.red>1&&(E.material.red=E.material.red/255),E.material.green>1&&(E.material.green=E.material.green/255),E.material.blue>1&&(E.material.blue=E.material.blue/255),E.material.alpha>1&&(E.material.a=E.material.alpha/255),E.material=R._color.createColor(E.material.red,E.material.green,E.material.blue,E.material.alpha)));if(Z.length>=2){var de=Ft.Cartesian3.fromDegreesArray(Z);E.polygonHierarchy=new Ft.PolygonHierarchy(de);var me=new Ft.PolygonGeometry(E),_e=new Ft.GeometryInstance({id:oe,geometry:me,attributes:{color:new Ft.ColorGeometryInstanceAttribute.fromColor(E.material)}}),Be=new Ft.ClassificationPrimitive({geometryInstances:_e,appearance:new Ft.PerInstanceColorAppearance({translucent:!1,vertexShaderSource:R._core.Shaders("vertexShaderSource"),fragmentShaderSource:R._core.Shaders("fragmentShaderSource")}),classificationType:R._option.classificationType}),Qe="material:"+E.material.red*255+","+E.material.green*255+","+E.material.blue*255;R.Legend.push(Qe),V.add(Be)}}for(var ie=0;ie<U.features.length;ie++){var Z=[],oe=U.features[ie];if(Array.isArray(oe.geometry.coordinates)&&oe.geometry.coordinates.length>0)if(Array.isArray(oe.geometry.coordinates[0][0]))for(var ne=0;ne<oe.geometry.coordinates.length;ne++)Z=[],oe.geometry.coordinates[ne].pop(),H(oe.geometry.coordinates[ne]),q(Z);else H(oe.geometry.coordinates),q(Z)}var se=V;L.data.geometryPrimitive=se,L.state=Ft.QuadtreeTileLoadState.LOADING,L.state===Ft.QuadtreeTileLoadState.LOADING&&(L.data.geometryPrimitive.update(F,[]),L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0)},error:function(){L.count==null&&(L.count=0),L.count+=1,L.count>=2?(L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0):L.state=Ft.QuadtreeTileLoadState.START}})}else{L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0;return}L.state=Ft.QuadtreeTileLoadState.LOADING}})(T,D,I)},this._primitive=new Ft.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:3});var Q=this._viewer.scene,M=Q.primitives;M.add(this._primitive),C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var B={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this.setTreeobj(B),this._tree.insertGroupId(B,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.createVolumeVectorGeoJsonFeatureLayerDthOptimization3=function(o,A,f,m,C,y){var x={show:!0,positions:[],shape:void 0,cornerType:this._cesium.CornerType.ROUNDED,granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.DISABLED,level_max:20,level_min:10},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a)))),this._option=this._core.extend(x,f,!0),A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");var E={polygonHierarchy:void 0,height:0,extrudedHeight:0,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,perPositionHeight:!1,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.RED},I=this;this._urlTemplate=A.url+"?"+this._serialize(v.urlParams);var w=A.url+"?"+this._serialize(v.urlParams);this._Provider=new Ts(this._viewer,this._cesium),this._Provider._normalTile=f.level_max-1,this._Provider.loadTile=function(T,D){(function(F,L,R){if(L.state===Ft.QuadtreeTileLoadState.START){if(L.data={lines:[],geometryPrimitive:void 0},L.level>=f.level_min&&L.level<f.level_max&&R.item.show){var k=w.replace(window.encodeURIComponent("{x}"),L.x).replace(window.encodeURIComponent("{y}"),L.y).replace(window.encodeURIComponent("{z}"),L.level);R._cache&&(k+="&"+R._core.getuid()),R._core.xhr({url:k,type:"get",dataType:"json",success:function(U){if(U==null){L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0;return}var V=new Ft.PrimitiveCollection;R.Legend=[];var H=[];function q(j){for(var de=0;de<j.length;de++)Array.isArray(j[de])?q(j[de]):oe.push(j[de])}function ie(){if(R._option.extrudedHeight&&(E.extrudedHeight=R._option.extrudedHeight),/^\[/.test(R._option.extrudedHeight)&&/\]$/.test(R._option.extrudedHeight)){var j=R._option.extrudedHeight.replace(/\[/,"").replace(/\]/,"");E.extrudedHeight=parseFloat(ne.properties[j])}if(E.material=R._option.material,/^\[/.test(R._option.material)&&/\]$/.test(R._option.material)){var de=R._option.material.replace(/\[/,"").replace(/\]/,"");E.material=ne.properties[de],R._core.isHtmlColor(E.material)?E.material=R._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=R._color.rgbaStringToRgbaObj(E.material)),E.material.red>1&&(E.material.red=E.material.red/255),E.material.green>1&&(E.material.green=E.material.green/255),E.material.blue>1&&(E.material.blue=E.material.blue/255),E.material.alpha>1&&(E.material.a=E.material.alpha/255),E.material=R._color.createColor(E.material.red,E.material.green,E.material.blue,E.material.alpha))}else R._option.material&&(E.material=R._option.material),E.material&&(R._core.isHtmlColor(E.material)?E.material=R._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=R._color.rgbaStringToRgbaObj(E.material)),E.material.red>1&&(E.material.red=E.material.red/255),E.material.green>1&&(E.material.green=E.material.green/255),E.material.blue>1&&(E.material.blue=E.material.blue/255),E.material.alpha>1&&(E.material.a=E.material.alpha/255),E.material=R._color.createColor(E.material.red,E.material.green,E.material.blue,E.material.alpha)));if(oe.length>=2){var me=Ft.Cartesian3.fromDegreesArray(oe);E.polygonHierarchy=new Ft.PolygonHierarchy(me);var _e=new Ft.PolygonGeometry(E),Be=new Ft.GeometryInstance({id:ne,geometry:_e,attributes:{color:new Ft.ColorGeometryInstanceAttribute.fromColor(E.material)}});H.push(Be)}}for(var Z=0;Z<U.features.length;Z++){var oe=[],ne=U.features[Z];if(Array.isArray(ne.geometry.coordinates)&&ne.geometry.coordinates.length>0)if(Array.isArray(ne.geometry.coordinates[0][0]))for(var se=0;se<ne.geometry.coordinates.length;se++)oe=[],ne.geometry.coordinates[se].pop(),q(ne.geometry.coordinates[se]),ie(oe);else q(ne.geometry.coordinates),ie(oe)}var ce=new Ft.ClassificationPrimitive1({geometryInstances:H,appearance:new Ft.PerInstanceColorAppearance({translucent:!1,vertexShaderSource:R._core.Shaders("vertexShaderSource"),fragmentShaderSource:R._core.Shaders("fragmentShaderSource")}),classificationType:R._option.classificationType});L.data.geometryPrimitive=ce,L.state=Ft.QuadtreeTileLoadState.LOADING,L.state===Ft.QuadtreeTileLoadState.LOADING&&(L.data.geometryPrimitive.update(F,[]),L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0)},error:function(){L.count==null&&(L.count=0),L.count+=1,L.count>=2?(L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0):L.state=Ft.QuadtreeTileLoadState.START}})}else{L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0;return}L.state=Ft.QuadtreeTileLoadState.LOADING}})(T,D,I)},this._primitive=new Ft.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:3});var Q=this._viewer.scene,M=Q.primitives;M.add(this._primitive),C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var B={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this.setTreeobj(B),this._tree.insertGroupId(B,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.createVolumeVectorGeoJsonFeatureLayerDthOptimization=function(o,A,f,m,C,y){var x={show:!0,positions:[],shape:void 0,cornerType:this._cesium.CornerType.ROUNDED,granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.DISABLED,level_max:20,level_min:10},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a)))),this._option=this._core.extend(x,f,!0),A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");var E=[],I={polygonHierarchy:void 0,height:0,extrudedHeight:0,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,perPositionHeight:!1,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.RED},w=this;this._urlTemplate=A.url+"?"+this._serialize(v.urlParams),this._Provider=new Ts(this._viewer,this._cesium),this._Provider._normalTile=f.level_max-1,this._Provider.loadTile=function(T,D){if(this.tile=null,this.tile=D,D.state===this._cesium.QuadtreeTileLoadState.START&&w.item.show){var F="z"+D.level+"x"+D.x+"y"+D.y;if(D.data={lines:[],geometryPrimitive:void 0},D.level>=f.level_min&&D.level<f.level_max&&w.item.show){var L=Vi.filter(E,function(k){return k.x==D.x&&k.y==D.y&&k.level==D.level});if(L.length!=0&&L[0].data&&L[0].data.length>0){D.data.geometryPrimitive=new Ft.Primitive({geometryInstances:L[0].data,appearance:new Ft.PerInstanceColorAppearance({flat:!0,translucent:!0,faceForward:!0,closed:!0}),shadows:Ft.ShadowMode.ENABLED}),D.state=Ft.QuadtreeTileLoadState.LOADING,D.state===Ft.QuadtreeTileLoadState.LOADING&&(D.data.geometryPrimitive&&(D.state=Ft.QuadtreeTileLoadState.DONE),D.renderable=!0);return}if(w.PrimitiveData.length>0){for(var R=0;R<w.PrimitiveData.length;R++)if(w.PrimitiveData[R].key==F){w.Primitivekey.includes(F)||w.Primitivekey.push(F);return}}w.Primitivekey.includes(F)||(w.Primitivekey.push(F),E.push({level:D.level,x:D.x,y:D.y,data:void 0}),function(k){var U=w._urlTemplate.replace(window.encodeURIComponent("{x}"),k.x).replace(window.encodeURIComponent("{y}"),k.y).replace(window.encodeURIComponent("{z}"),k.level);w.tilesLength++;var V="z"+k.level+"x"+k.x+"y"+k.y;w._cache&&(U+="&"+w._core.getuid()),w._core.xhr({url:U,type:"get",dataType:"json",success:function(H){var q=[],ie=[],Z=new Ft.PrimitiveCollection;w.Legend=[];function oe(Be){for(var Qe=0;Qe<Be.length;Qe++)Array.isArray(Be[Qe])?oe(Be[Qe]):ce.push(Be[Qe])}function ne(){if(w._option.extrudedHeight&&(I.extrudedHeight=w._option.extrudedHeight),/^\[/.test(w._option.extrudedHeight)&&/\]$/.test(w._option.extrudedHeight)){var Be=w._option.extrudedHeight.replace(/\[/,"").replace(/\]/,"");I.extrudedHeight=parseFloat(j.properties[Be])}if(I.material=w._option.material,/^\[/.test(w._option.material)&&/\]$/.test(w._option.material)){var Qe=w._option.material.replace(/\[/,"").replace(/\]/,"");I.material=j.properties[Qe],w._core.isHtmlColor(I.material)?I.material=w._color.colorFromHtmlColor(I.material):(/^rgb/.test(I.material)&&(I.material=w._color.rgbaStringToRgbaObj(I.material)),I.material.red>1&&(I.material.red=I.material.red/255),I.material.green>1&&(I.material.green=I.material.green/255),I.material.blue>1&&(I.material.blue=I.material.blue/255),I.material.alpha>1&&(I.material.a=I.material.alpha/255),I.material=w._color.createColor(I.material.red,I.material.green,I.material.blue,I.material.alpha))}else w._option.material&&(I.material=w._option.material),I.material&&(w._core.isHtmlColor(I.material)?I.material=w._color.colorFromHtmlColor(I.material):(/^rgb/.test(I.material)&&(I.material=w._color.rgbaStringToRgbaObj(I.material)),I.material.red>1&&(I.material.red=I.material.red/255),I.material.green>1&&(I.material.green=I.material.green/255),I.material.blue>1&&(I.material.blue=I.material.blue/255),I.material.alpha>1&&(I.material.a=I.material.alpha/255),I.material=w._color.createColor(I.material.red,I.material.green,I.material.blue,I.material.alpha)));if(ce.length>=2){var Ie=Ft.Cartesian3.fromDegreesArray(ce);I.polygonHierarchy=new Ft.PolygonHierarchy(Ie);var ve=new Ft.PolygonGeometry(I),K=new Ft.GeometryInstance({id:j,geometry:ve,attributes:{color:new Ft.ColorGeometryInstanceAttribute.fromColor(I.material)}}),W=new Ft.ClassificationPrimitive({geometryInstances:K,appearance:new Ft.PerInstanceColorAppearance({translucent:!1,vertexShaderSource:w._core.Shaders("vertexShaderSource"),fragmentShaderSource:w._core.Shaders("fragmentShaderSource")}),classificationType:w._option.classificationType}),te="material:"+I.material.red*255+","+I.material.green*255+","+I.material.blue*255;w.Legend.push(te),Z.add(W)}}for(var se=0;se<H.features.length;se++){var ce=[],j=H.features[se];if(Array.isArray(j.geometry.coordinates)&&j.geometry.coordinates.length>0)if(Array.isArray(j.geometry.coordinates[0][0]))for(var de=0;de<j.geometry.coordinates.length;de++)ce=[],j.geometry.coordinates[de].pop(),oe(j.geometry.coordinates[de]),ne(ce);else oe(j.geometry.coordinates),ne(ce)}var me=Z;w.probj.push(me);var _e={level:k.level,key:V,data:me};w.loadFinishKey.push(V),w.PrimitiveData.push(_e),w._viewer.scene.primitives.add(me),w.returnCount++,w.removeObsoletePrimitives(k)},error:function(){var H=w.Primitivekey.indexOf(V);H>-1&&w.Primitivekey.splice(H,1),E=Vi.remove(E,function(q){return q.x==k.x&&q.y==k.y&&q.level==k.level})},complete:function(H,q){H=null,k.state=Ft.QuadtreeTileLoadState.LOADING,k.state===Ft.QuadtreeTileLoadState.LOADING&&(k.data.geometryPrimitive&&(k.state=Ft.QuadtreeTileLoadState.DONE),k.renderable=!0)}})}(D))}else{D.state=Ft.QuadtreeTileLoadState.LOADING,D.state===Ft.QuadtreeTileLoadState.LOADING&&(D.data.geometryPrimitive&&(D.state=Ft.QuadtreeTileLoadState.DONE),D.renderable=!0);return}}},this._primitive=new Ft.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:3});var Q=this._viewer.scene,M=Q.primitives;M.add(this._primitive),C||this.setVisibility(!1),this._core.isnull(I.id)&&(I.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+I.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var B={id:I.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this.setTreeobj(B),this._tree.insertGroupId(B,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.createVolumeVectorGeoJsonFeatureLayerJCDthOptimization1=function(o,A,f,m,C,y){var x={show:!0,positions:[],shape:void 0,cornerType:this._cesium.CornerType.ROUNDED,granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.DISABLED,level_max:20,level_min:10},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a)))),this._option=this._core.extend(x,f,!0),A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");var E=[],I={polygonHierarchy:void 0,height:0,extrudedHeight:0,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.RED},w=this;this._urlTemplate=A.url+"?"+this._serialize(v.urlParams),this._Provider=new Ts(this._viewer,this._cesium),this._Provider._normalTile=f.level_max-1,this._Provider.loadTile=function(T,D){if(this.tile=null,this.tile=D,D.state===this._cesium.QuadtreeTileLoadState.START&&w.item.show){var F="z"+D.level+"x"+D.x+"y"+D.y;if(D.data={lines:[],geometryPrimitive:void 0},D.level>=f.level_min&&D.level<f.level_max&&w.item.show){var L=Vi.filter(E,function(q){return q.x==D.x&&q.y==D.y&&q.level==D.level});if(L.length!=0&&L[0].data&&L[0].data.length>0){D.data.geometryPrimitive=new Ft.Primitive({geometryInstances:L[0].data,appearance:new Ft.PerInstanceColorAppearance({flat:!0,translucent:!0,faceForward:!0,closed:!0}),shadows:Ft.ShadowMode.ENABLED}),D.state=Ft.QuadtreeTileLoadState.LOADING,D.state===Ft.QuadtreeTileLoadState.LOADING&&(D.data.geometryPrimitive&&(D.state=Ft.QuadtreeTileLoadState.DONE),D.renderable=!0);return}if(w.PrimitiveData.length>0){for(var R=0;R<w.PrimitiveData.length;R++)if(w.PrimitiveData[R].key==F){w.Primitivekey.includes(F)||w.Primitivekey.push(F);return}}if(!w.Primitivekey.includes(F)){w.Primitivekey.push(F),E.push({level:D.level,x:D.x,y:D.y,data:void 0});for(var k=w._option.level_min+Math.floor((w._option.level_max-w._option.level_min)/2),U=rdt(D,k),R=0;R<U.length;R++){var V=U[R],H="z"+V.level+"x"+V.x+"y"+V.y;w.loadAllKey.includes(H)||(w.loadAllKey.push(H),function(ie){var Z=w._urlTemplate.replace(window.encodeURIComponent("{x}"),ie.x).replace(window.encodeURIComponent("{y}"),ie.y).replace(window.encodeURIComponent("{z}"),ie.level);w.tilesLength++;var oe="z"+ie.level+"x"+ie.x+"y"+ie.y;w._cache&&(Z+="&"+w._core.getuid()),w._core.xhr({url:Z,type:"get",dataType:"json",success:function(ne){var se=[],ce=[];w.Legend=[];function j(K){for(var W=0;W<K.length;W++)Array.isArray(K[W])?j(K[W]):_e.push(K[W])}function de(){if(w._option.extrudedHeight&&(I.extrudedHeight=w._option.extrudedHeight),/^\[/.test(w._option.extrudedHeight)&&/\]$/.test(w._option.extrudedHeight)){var K=w._option.extrudedHeight.replace(/\[/,"").replace(/\]/,"");I.extrudedHeight=parseFloat(Be.properties[K])}if(I.material=w._option.material,/^\[/.test(w._option.material)&&/\]$/.test(w._option.material)){var W=w._option.material.replace(/\[/,"").replace(/\]/,"");I.material=Be.properties[W],w._core.isHtmlColor(I.material)?I.material=w._color.colorFromHtmlColor(I.material):(/^rgb/.test(I.material)&&(I.material=w._color.rgbaStringToRgbaObj(I.material)),I.material.red>1&&(I.material.red=I.material.red/255),I.material.green>1&&(I.material.green=I.material.green/255),I.material.blue>1&&(I.material.blue=I.material.blue/255),I.material.alpha>1&&(I.material.a=I.material.alpha/255),I.material=w._color.createColor(I.material.red,I.material.green,I.material.blue,I.material.alpha))}else w._option.material&&(I.material=w._option.material),I.material&&(w._core.isHtmlColor(I.material)?I.material=w._color.colorFromHtmlColor(I.material):(/^rgb/.test(I.material)&&(I.material=w._color.rgbaStringToRgbaObj(I.material)),I.material.red>1&&(I.material.red=I.material.red/255),I.material.green>1&&(I.material.green=I.material.green/255),I.material.blue>1&&(I.material.blue=I.material.blue/255),I.material.alpha>1&&(I.material.a=I.material.alpha/255),I.material=w._color.createColor(I.material.red,I.material.green,I.material.blue,I.material.alpha)));if(_e.length>=2){var te=Ft.Cartesian3.fromDegreesArray(_e);I.polygonHierarchy=new Ft.PolygonHierarchy(te);var Y=new Ft.PolygonGeometry(I),he=new Ft.GeometryInstance({id:Be,geometry:Y,attributes:{color:new Ft.ColorGeometryInstanceAttribute.fromColor(I.material)}}),fe="material:"+I.material.red*255+","+I.material.green*255+","+I.material.blue*255;w.Legend.push(fe),se.push(he)}}for(var me=0;me<ne.features.length;me++){var _e=[],Be=ne.features[me];if(Array.isArray(Be.geometry.coordinates)&&Be.geometry.coordinates.length>0)if(Array.isArray(Be.geometry.coordinates[0][0]))for(var Qe=0;Qe<Be.geometry.coordinates.length;Qe++)_e=[],Be.geometry.coordinates[Qe].pop(),j(Be.geometry.coordinates[Qe]),de(_e);else j(Be.geometry.coordinates),de(_e)}if(se.length>0){var Ie=new Ft.GroundPrimitive({geometryInstances:se,appearance:new Ft.PerInstanceColorAppearance({translucent:!1,vertexShaderSource:w._core.Shaders("vertexShaderSource"),fragmentShaderSource:w._core.Shaders("fragmentShaderSource")}),classificationType:w._option.classificationType,show:w.item.show});w.probj.push(Ie);var ve={level:ie.level,key:oe,data:Ie};w.loadFinishKey.push(oe),w.PrimitiveData.push(ve),w._viewer.scene.primitives.add(Ie),w.returnCount++}},error:function(){},complete:function(ne,se){}})}(V))}}}else{D.state=Ft.QuadtreeTileLoadState.LOADING,D.state===Ft.QuadtreeTileLoadState.LOADING&&(D.data.geometryPrimitive&&(D.state=Ft.QuadtreeTileLoadState.DONE),D.renderable=!0);return}}},this._primitive=new Ft.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:3});var Q=this._viewer.scene,M=Q.primitives;M.add(this._primitive),C||this.setVisibility(!1),this._core.isnull(I.id)&&(I.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+I.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var B={id:I.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this.setTreeobj(B),this._tree.insertGroupId(B,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.createVolumeVectorGeoJsonFeatureLayerJCDthOptimization2=function(o,A,f,m,C,y){var x={show:!0,positions:[],shape:void 0,cornerType:this._cesium.CornerType.ROUNDED,granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.DISABLED,level_max:20,level_min:10},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a)))),this._option=this._core.extend(x,f,!0),A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");var E={polygonHierarchy:void 0,height:0,extrudedHeight:0,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.RED},I=this;this._urlTemplate=A.url+"?"+this._serialize(v.urlParams);var w=A.url+"?"+this._serialize(v.urlParams);this._Provider=new Ts(this._viewer,this._cesium),this._Provider._normalTile=f.level_max-1,this._Provider.loadTile=function(T,D){(function(F,L,R){if(L.state===Ft.QuadtreeTileLoadState.START){if(L.data={lines:[],geometryPrimitive:void 0},L.level>=f.level_min&&L.level<f.level_max&&R.item.show){var k=w.replace(window.encodeURIComponent("{x}"),L.x).replace(window.encodeURIComponent("{y}"),L.y).replace(window.encodeURIComponent("{z}"),L.level);R._cache&&(k+="&"+R._core.getuid()),R._core.xhr({url:k,type:"get",dataType:"json",success:function(U){if(U==null){L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0;return}var V=[],H=[];R.Legend=[];function q(j){for(var de=0;de<j.length;de++)Array.isArray(j[de])?q(j[de]):oe.push(j[de])}function ie(){if(R._option.extrudedHeight&&(E.extrudedHeight=R._option.extrudedHeight),/^\[/.test(R._option.extrudedHeight)&&/\]$/.test(R._option.extrudedHeight)){var j=R._option.extrudedHeight.replace(/\[/,"").replace(/\]/,"");E.extrudedHeight=parseFloat(ne.properties[j])}if(E.material=R._option.material,/^\[/.test(R._option.material)&&/\]$/.test(R._option.material)){var de=R._option.material.replace(/\[/,"").replace(/\]/,"");E.material=ne.properties[de],R._core.isHtmlColor(E.material)?E.material=R._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=R._color.rgbaStringToRgbaObj(E.material)),E.material.red>1&&(E.material.red=E.material.red/255),E.material.green>1&&(E.material.green=E.material.green/255),E.material.blue>1&&(E.material.blue=E.material.blue/255),E.material.alpha>1&&(E.material.a=E.material.alpha/255),E.material=R._color.createColor(E.material.red,E.material.green,E.material.blue,E.material.alpha))}else R._option.material&&(E.material=R._option.material),E.material&&(R._core.isHtmlColor(E.material)?E.material=R._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=R._color.rgbaStringToRgbaObj(E.material)),E.material.red>1&&(E.material.red=E.material.red/255),E.material.green>1&&(E.material.green=E.material.green/255),E.material.blue>1&&(E.material.blue=E.material.blue/255),E.material.alpha>1&&(E.material.a=E.material.alpha/255),E.material=R._color.createColor(E.material.red,E.material.green,E.material.blue,E.material.alpha)));if(oe.length>=2){var me=Ft.Cartesian3.fromDegreesArray(oe);E.polygonHierarchy=new Ft.PolygonHierarchy(me);var _e=new Ft.PolygonGeometry(E),Be=new Ft.GeometryInstance({id:ne,geometry:_e,attributes:{color:new Ft.ColorGeometryInstanceAttribute.fromColor(E.material)}}),Qe="material:"+E.material.red*255+","+E.material.green*255+","+E.material.blue*255;R.Legend.push(Qe),V.push(Be)}}for(var Z=0;Z<U.features.length;Z++){var oe=[],ne=U.features[Z];if(Array.isArray(ne.geometry.coordinates)&&ne.geometry.coordinates.length>0)if(Array.isArray(ne.geometry.coordinates[0][0]))for(var se=0;se<ne.geometry.coordinates.length;se++)oe=[],ne.geometry.coordinates[se].pop(),q(ne.geometry.coordinates[se]),ie(oe);else q(ne.geometry.coordinates),ie(oe)}V.length==0&&(L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0);var ce=new Ft.GroundPrimitive1({geometryInstances:V,appearance:new Ft.PerInstanceColorAppearance({translucent:!1,vertexShaderSource:R._core.Shaders("vertexShaderSource"),fragmentShaderSource:R._core.Shaders("fragmentShaderSource")}),classificationType:R._option.classificationType});L.data.geometryPrimitive=ce,L.state=Ft.QuadtreeTileLoadState.LOADING,L.state===Ft.QuadtreeTileLoadState.LOADING&&(L.data.geometryPrimitive.update1(F,[]),L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0)},error:function(){L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0}})}else{L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0;return}L.state=Ft.QuadtreeTileLoadState.LOADING}})(T,D,I)},this._primitive=new Ft.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:3});var Q=this._viewer.scene,M=Q.primitives;M.add(this._primitive),C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var B={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this.setTreeobj(B),this._tree.insertGroupId(B,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.createVolumeVectorGeoJsonFeatureLayerJCDthOptimization3=function(o,A,f,m,C,y){var x={show:!0,positions:[],shape:void 0,cornerType:this._cesium.CornerType.ROUNDED,granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.DISABLED,level_max:20,level_min:10},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a)))),this._option=this._core.extend(x,f,!0),A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");var E={polygonHierarchy:void 0,height:0,extrudedHeight:0,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.RED},I=this;this._urlTemplate=A.url+"?"+this._serialize(v.urlParams);var w=A.url+"?"+this._serialize(v.urlParams);this._Provider=new Ts(this._viewer,this._cesium),this._Provider._normalTile=f.level_max-1,this._Provider.loadTile=function(T,D){(function(F,L,R){if(L.state===Ft.QuadtreeTileLoadState.START){if(L.data={lines:[],geometryPrimitive:void 0},L.level>=f.level_min&&L.level<f.level_max&&R.item.show){var k=w.replace(window.encodeURIComponent("{x}"),L.x).replace(window.encodeURIComponent("{y}"),L.y).replace(window.encodeURIComponent("{z}"),L.level);R._cache&&(k+="&"+R._core.getuid()),R._core.xhr({url:k,type:"get",dataType:"json",success:function(U){var V=["#ffff00","#ffcc00","#ff3300","#ccff00","#cccc00","#99ff66","#999933","#66cc99","#6633ff","#33ffff","#3399cc","#009933","#ccccff","#ff99ff","#9966ff","#336699"];if(U==null){L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0;return}var H=[],q=[];R.Legend=[];function ie(de){for(var me=0;me<de.length;me++)Array.isArray(de[me])?ie(de[me]):ne.push(de[me])}function Z(){if(R._option.extrudedHeight&&(E.extrudedHeight=R._option.extrudedHeight),/^\[/.test(R._option.extrudedHeight)&&/\]$/.test(R._option.extrudedHeight)){var de=R._option.extrudedHeight.replace(/\[/,"").replace(/\]/,"");E.extrudedHeight=parseFloat(se.properties[de])}if(E.material=R._option.material,/^\[/.test(R._option.material)&&/\]$/.test(R._option.material)){var me=R._option.material.replace(/\[/,"").replace(/\]/,"");E.material=se.properties[me],R._core.isHtmlColor(E.material)?E.material=R._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=R._color.rgbaStringToRgbaObj(E.material)),E.material.red>1&&(E.material.red=E.material.red/255),E.material.green>1&&(E.material.green=E.material.green/255),E.material.blue>1&&(E.material.blue=E.material.blue/255),E.material.alpha>1&&(E.material.a=E.material.alpha/255),E.material=R._color.createColor(E.material.red,E.material.green,E.material.blue,E.material.alpha))}else R._option.material&&(E.material=R._option.material),E.material&&(R._core.isHtmlColor(E.material)?E.material=R._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=R._color.rgbaStringToRgbaObj(E.material)),E.material.red>1&&(E.material.red=E.material.red/255),E.material.green>1&&(E.material.green=E.material.green/255),E.material.blue>1&&(E.material.blue=E.material.blue/255),E.material.alpha>1&&(E.material.a=E.material.alpha/255),E.material=R._color.createColor(E.material.red,E.material.green,E.material.blue,E.material.alpha)));if(ne.length>=2){var _e=Ft.Cartesian3.fromDegreesArray(ne);E.polygonHierarchy=new Ft.PolygonHierarchy(_e),(E.extrudedHeight==0||E.extrudedHeight=="0"||E.extrudedHeight==null||E.extrudedHeight==null)&&(E.extrudedHeight=1e4);var Be=new Ft.PolygonGeometry(E),Qe=V[Math.floor(Math.random()*V.length)],Ie=new Ft.GeometryInstance({id:se,geometry:Be,attributes:{color:Ft.ColorGeometryInstanceAttribute.fromColor(Ft.Color.fromCssColorString(Qe).withAlpha(.5))}}),ve="material:"+E.material.red*255+","+E.material.green*255+","+E.material.blue*255;R.Legend.push(ve),H.push(Ie)}}for(var oe=0;oe<U.features.length;oe++){var ne=[],se=U.features[oe];if(Array.isArray(se.geometry.coordinates)&&se.geometry.coordinates.length>0)if(Array.isArray(se.geometry.coordinates[0][0]))for(var ce=0;ce<se.geometry.coordinates.length;ce++)ne=[],se.geometry.coordinates[ce].pop(),ie(se.geometry.coordinates[ce]),Z(ne);else ie(se.geometry.coordinates),Z(ne)}H.length==0&&(L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0);var j=new Ft.ClassificationPrimitive1({geometryInstances:H,classificationType:Ft.ClassificationType.BOTH});L.data.geometryPrimitive=j,L.state=Ft.QuadtreeTileLoadState.LOADING,L.state===Ft.QuadtreeTileLoadState.LOADING&&(L.data.geometryPrimitive.update(F,[]),L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0)},error:function(){L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0}})}else{L.state=Ft.QuadtreeTileLoadState.DONE,L.renderable=!0;return}L.state=Ft.QuadtreeTileLoadState.LOADING}})(T,D,I)},this._primitive=new Ft.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:3});var Q=this._viewer.scene,M=Q.primitives;M.add(this._primitive),C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var B={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this.setTreeobj(B),this._tree.insertGroupId(B,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.createPointGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y){var x={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:this._core.defaultValue(A.srs,"EPSG:4490")+":{z}",TILEMATRIXSET:this._core.defaultValue(A.srs,"EPSG:4490"),FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium},v=this;!v._core.isnull(f)&&!v._core.isnull(f.color)&&(/^\[/.test(f.color)&&f.color.toString().charAt(0)=="["&&f.color.toString().charAt(f.color.length-1)=="]"||(v._core.isHtmlColor(f.color)?f.color=v._color.colorFromHtmlColor(f.color):(/^rgb/.test(f.color)&&(f.color=v._color.rgbaStringToRgbaObj(f.color)),f.color.r>1&&(f.color.r=f.color.r/255),f.color.g>1&&(f.color.g=f.color.g/255),f.color.b>1&&(f.color.b=f.color.b/255),f.color.a>1&&(f.color.a=f.color.a/255),f.color=v._color.createColor(f.color.r,f.color.g,f.color.b,f.color.a)))),!v._core.isnull(f)&&!v._core.isnull(f.outlineColor)&&(/^\[/.test(f.outlineColor)&&f.outlineColor.toString().charAt(0)=="["&&f.outlineColor.toString().charAt(f.outlineColor.length-1)=="]"||(v._core.isHtmlColor(f.outlineColor)?f.outlineColor=v._color.colorFromHtmlColor(f.outlineColor):(/^rgb/.test(f.outlineColor)&&(f.outlineColor=v._color.rgbaStringToRgbaObj(f.outlineColor)),f.outlineColor.r>1&&(f.outlineColor.r=f.outlineColor.r/255),f.outlineColor.g>1&&(f.outlineColor.g=f.outlineColor.g/255),f.outlineColor.b>1&&(f.outlineColor.b=f.outlineColor.b/255),f.outlineColor.a>1&&(f.outlineColor.a=f.outlineColor.a/255),f.outlineColor=v._color.createColor(f.outlineColor.r,f.outlineColor.g,f.outlineColor.b,f.outlineColor.a))));var v=this;this._urlTemplate=A.url+"?"+this._serialize(x.urlParams);var E=A.url+"?"+this._serialize(x.urlParams);this._Provider=new Ts(this._viewer,this._cesium),this._Provider._normalTile=f.level_max-1;var I={Name:"",text:"",font:" 30px sans-serif",pixelSize:10,style:Ft.LabelStyle.OUTLINE,fillColor:Ft.Color.WHITE,outlineColor:Ft.Color.BLACK,outlineWidth:1,show:!0,showBackground:!1,backgroundColor:new Ft.Color(.165,.165,.165,.8),backgroundPadding:new Ft.Cartesian2(7,5),scale:1,horizontalOrigin:Ft.HorizontalOrigin.CENTER,verticalOrigin:Ft.VerticalOrigin.CENTER,eyeOffset:Ft.Cartesian3.ZERO,pixelOffset:Ft.Cartesian2.ZERO,heightReference:Ft.HeightReference.NONE,scaleByDistance:new Ft.NearFarScalar(0,0,1,1)};!v._core.isnull(f)&&!v._core.isnull(f.backgroundColor)&&(/^\[/.test(f.backgroundColor)&&f.backgroundColor.toString().charAt(0)=="["&&f.backgroundColor.toString().charAt(f.backgroundColor.length-1)=="]"||(v._core.isHtmlColor(f.backgroundColor)?f.backgroundColor=v._color.colorFromHtmlColor(f.backgroundColor):(/^rgb/.test(f.backgroundColor)&&(f.backgroundColor=v._color.rgbaStringToRgbaObj(f.backgroundColor)),f.backgroundColor.r>1&&(f.backgroundColor.r=f.backgroundColor.r/255),f.backgroundColor.g>1&&(f.backgroundColor.g=f.backgroundColor.g/255),f.backgroundColor.b>1&&(f.backgroundColor.b=f.backgroundColor.b/255),f.backgroundColor.a>1&&(f.backgroundColor.a=f.backgroundColor.a/255),f.backgroundColor=v._color.createColor(f.backgroundColor.r,f.backgroundColor.g,f.backgroundColor.b,f.backgroundColor.a))));var w=v._core.extend(I,f,!0);v._core.isnull(f.near)&&(f.near=0),v._core.isnull(f.far)&&(f.far=999999999);var Q=parseFloat(f.near),M=parseFloat(f.far),B=new Ft.DistanceDisplayCondition(Q,M);w.distanceDisplayCondition=B,v._core.isnull(f.font_size)&&(f.font_size="30px"),v._core.isnull(f.font_family)&&(f.font_family=" sans-serif"),w.font=parseFloat(f.font_size)+"px "+f.font_family;var T=f.material;this._Provider.loadTile=function(R,k){(function(U,V,H){if(V.state===Ft.QuadtreeTileLoadState.START){if(V.data={lines:[],geometryPrimitive:void 0},V.level>=f.level_min&&V.level<f.level_max&&H.item.show){var q=E.replace(window.encodeURIComponent("{x}"),V.x).replace(window.encodeURIComponent("{y}"),V.y).replace(window.encodeURIComponent("{z}"),V.level);H._cache&&(q+="&"+H._core.getuid()),H._core.xhr({url:q,type:"get",dataType:"json",success:function(ie){if(ie==null){V.state=Ft.QuadtreeTileLoadState.DONE,V.renderable=!0;return}var Z=new Ft.PointPrimitiveCollection;ie.features.forEach(function(oe){w.id=oe;var ne=0;if(/^\[/.test(w.pointHeight)&&/\]$/.test(w.pointHeight)){var se=w.pointHeight.replace(/\[/,"").replace(/\]/,"");ne=parseFloat(oe.properties[se])}else w.pointHeight!==void 0&&w.pointHeight!==""?ne=parseFloat(w.pointHeight):oe.properties.height!=null&&(ne=parseFloat(oe.properties.height));if(/^\[/.test(f.color)&&/\]$/.test(f.color)){var ce=f.color.replace(/\[/,"").replace(/\]/,"");w.color=oe.properties[ce],H._core.isHtmlColor(w.color)?w.color=H._color.colorFromHtmlColor(w.color):(/^rgb/.test(w.color)&&(w.color=H._color.rgbaStringToRgbaObj(w.color)),w.color.r>1&&(w.color.r=w.color.r/255),w.color.g>1&&(w.color.g=w.color.g/255),w.color.b>1&&(w.color.b=w.color.b/255),w.color.a>1&&(w.color.a=w.color.a/255),w.color=H._color.createColor(w.color.r,w.color.g,w.color.b,w.color.a))}if(/^\[/.test(f.outlineColor)&&/\]$/.test(f.outlineColor)){var ce=f.outlineColor.replace(/\[/,"").replace(/\]/,"");w.outlineColor=oe.properties[ce],H._core.isHtmlColor(w.outlineColor)?w.outlineColor=H._color.colorFromHtmlColor(w.outlineColor):(/^rgb/.test(w.outlineColor)&&(w.outlineColor=H._color.rgbaStringToRgbaObj(w.outlineColor)),w.outlineColor.r>1&&(w.outlineColor.r=w.outlineColor.r/255),w.outlineColor.g>1&&(w.outlineColor.g=w.outlineColor.g/255),w.outlineColor.b>1&&(w.outlineColor.b=w.outlineColor.b/255),w.outlineColor.a>1&&(w.outlineColor.a=w.outlineColor.a/255),w.outlineColor=H._color.createColor(w.outlineColor.r,w.outlineColor.g,w.outlineColor.b,w.outlineColor.a))}w.position=new Ft.Cartesian3.fromDegrees(oe.geometry.coordinates[0],oe.geometry.coordinates[1],ne),w.text=oe.properties.name;var j={show:w.show,position:w.position,pixelSize:w.pixelSize,color:w.color,outlineColor:w.outlineColor,outlineWidth:w.outlineWidth,id:oe};if(w.color&&w.color.red){var de="color:"+w.color.red*255+","+w.color.green*255+","+w.color.blue*255+";outlineColor:"+w.outlineColor.red*255+","+w.outlineColor.green*255+","+w.outlineColor.blue*255;H.Legend.push(de)}j.id.treeID=f.id,j.id.VectorType="point",j.id.VectorStyle={show:j.show,pointHeight:ne,position:j.position,pixelSize:j.pixelSize,color:j.color,outlineColor:j.outlineColor,outlineWidth:j.outlineWidth},Z.add(j)}),V.data.geometryPrimitive=Z,V.state=Ft.QuadtreeTileLoadState.LOADING,V.state===Ft.QuadtreeTileLoadState.LOADING&&(V.data.geometryPrimitive.update(U,[]),V.state=Ft.QuadtreeTileLoadState.DONE,V.renderable=!0)},error:function(){V.count==null&&(V.count=0),V.count+=1,V.count>=2?(V.state=Ft.QuadtreeTileLoadState.DONE,V.renderable=!0):V.state=Ft.QuadtreeTileLoadState.START}})}else{V.state=Ft.QuadtreeTileLoadState.DONE,V.renderable=!0;return}V.state=Ft.QuadtreeTileLoadState.LOADING}})(R,k,v)},this._primitive=new this._cesium.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:5});var D=this._viewer.scene,F=D.primitives;f&&f.time&&(this._Provider._availability=new Ft.TimeIntervalCollection([new Ft.TimeInterval({start:f.time.start?Ft.JulianDate.fromDate(new Date(f.time.start)):Ft.Iso8601.MINIMUM_VALUE,stop:f.time.end?Ft.JulianDate.fromDate(new Date(f.time.end)):Ft.Iso8601.MAXIMUM_VALUE})]),this._Provider.isAvailable=function(R){if(!Ft.defined(R))throw new Ft.DeveloperError("time is required.");var k=this._availability;return!Ft.defined(k)||k.contains(R)}),F.add(this._primitive),C?(this.item.show=!0,this.setVisibility(!0)):this.setVisibility(!1),this._core.isnull(f.id)&&(f.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+f.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var L={id:f.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"pointLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this._Provider.treeID=f.id,this.setTreeobj(L),this._tree.insertGroupId(L,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.VolumeVectorGeoJsonFeatureLayerOptimization=function(o,A,f,m,C,y){var x={show:!0,positions:[],shape:void 0,cornerType:this._cesium.CornerType.ROUNDED,granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.DISABLED,level_max:20,level_min:10},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:this._core.defaultValue(A.srs,"EPSG:4490")+":{z}",TILEMATRIXSET:this._core.defaultValue(A.srs,"EPSG:4490"),FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a)))),this._option=this._core.extend({...x},f,!0),A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");var E={id:this._option.id,polygonHierarchy:void 0,height:0,extrudedHeight:0,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,perPositionHeight:!1,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.RED},I=this;let w=A.url.indexOf("/gisserver/")>-1;var Q;w?Q=A.url+`/${window.encodeURIComponent("{z}")}/${window.encodeURIComponent("{x}")}/${window.encodeURIComponent("{y}")}.json`:Q=A.url+"?"+this._serialize(v.urlParams),this._urlTemplate=Q,this._Provider=new Ts(this._viewer,this._cesium,w?new Ft.WebMercatorTilingScheme:void 0),this._Provider._normalTile=f.level_max-1,this.initThisProvider=()=>{this.initThisProvider=void 0,this._Provider.loadTile=function(L,R){(function(k,U,V){if(U.state===Ft.QuadtreeTileLoadState.START){if(U.data={lines:[],geometryPrimitive:void 0},U.level>=f.level_min&&U.level<f.level_max&&V.item.show){if(w&&(U.reverseY=V._Provider.tilingScheme.getNumberOfYTilesAtLevel(U.level)-U.y-1),V.TileMatrixLimits){let q=V.TileMatrixLimits[U.level];if(!q||q&&(U.x>q.maxCol||U.x<q.minCol||U.y>q.maxRow||U.y<q.minRow)){U.state=Ft.QuadtreeTileLoadState.DONE,U.renderable=!0;return}}var H=Q.replace(window.encodeURIComponent("{x}"),U.x).replace(window.encodeURIComponent("{y}"),U.reverseY||U.y).replace(window.encodeURIComponent("{z}"),U.level);V._cache&&(H+="&"+V._core.getuid()),V._core.xhr({url:H,type:"get",dataType:"json",success:function(q){if(q==null){U.state=Ft.QuadtreeTileLoadState.DONE,U.renderable=!0;return}var ie=[],Z=[];V.Legend=[];function oe(Qe){for(var Ie=0;Ie<Qe.length;Ie++)Array.isArray(Qe[Ie])?oe(Qe[Ie]):(ce.push(Qe[Ie]),Ie===2&&!j&&(j=!0))}function ne(){if(/^\[/.test(V._option.extrudedHeight)&&/\]$/.test(V._option.extrudedHeight)){let te=V._option.extrudedHeight.replace(/\[/,"").replace(/\]/,"");E.extrudedHeight=parseFloat(de.properties[te])}else V._option.extrudedHeight&&(E.extrudedHeight=parseFloat(V._option.extrudedHeight));if(/^\[/.test(V._option.height)&&/\]$/.test(V._option.height)){let te=V._option.height.replace(/\[/,"").replace(/\]/,"");E.height=parseFloat(de.properties[te])}else V._option.height&&(E.height=parseFloat(V._option.height));if(E.material=V._option.material,/^\[/.test(V._option.material)&&/\]$/.test(V._option.material)){var Qe=V._option.material.replace(/\[/,"").replace(/\]/,"");E.material=de.properties[Qe],V._core.isHtmlColor(E.material)?E.material=V._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=V._color.rgbaStringToRgbaObj(E.material)),E.material.red>1&&(E.material.red=E.material.red/255),E.material.green>1&&(E.material.green=E.material.green/255),E.material.blue>1&&(E.material.blue=E.material.blue/255),E.material.alpha>1&&(E.material.a=E.material.alpha/255),E.material=V._color.createColor(E.material.red,E.material.green,E.material.blue,E.material.alpha))}else V._option.material&&(E.material=V._option.material),E.material&&(V._core.isHtmlColor(E.material)?E.material=V._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=V._color.rgbaStringToRgbaObj(E.material)),E.material.red>1&&(E.material.red=E.material.red/255),E.material.green>1&&(E.material.green=E.material.green/255),E.material.blue>1&&(E.material.blue=E.material.blue/255),E.material.alpha>1&&(E.material.a=E.material.alpha/255),E.material=V._color.createColor(E.material.red,E.material.green,E.material.blue,E.material.alpha)));if(f.preLoad&&f.preLoad(E,de),ce.length>=2){var Ie=j?Ft.Cartesian3.fromDegreesArrayHeights(ce):Ft.Cartesian3.fromDegreesArray(ce);E.polygonHierarchy=new Ft.PolygonHierarchy(Ie);var ve=new Ft.PolygonGeometry(E);de.treeID=E.id,de.VectorType="polygon",de.VectorStyle={haveZ:j,extrudedHeight:E.extrudedHeight,positions:ce,material:E.material};var K=new Ft.GeometryInstance({id:de,geometry:ve,attributes:{color:new Ft.ColorGeometryInstanceAttribute.fromColor(E.material),distanceDisplayCondition:new Ft.DistanceDisplayConditionGeometryInstanceAttribute(V._option.near,V._option.far)}}),W="material:"+E.material.red*255+","+E.material.green*255+","+E.material.blue*255;V.Legend.push(W),ie.push(K)}}for(var se=0;se<q.features.length;se++){var ce=[],j=!1,de=q.features[se];if(Array.isArray(de.geometry.coordinates)&&de.geometry.coordinates.length>0)if(Array.isArray(de.geometry.coordinates[0][0]))for(var me=0;me<de.geometry.coordinates.length;me++)ce=[],de.geometry.coordinates[me].pop(),oe(de.geometry.coordinates[me]),ne(ce);else oe(de.geometry.coordinates),ne(ce)}ie.length==0&&(U.state=Ft.QuadtreeTileLoadState.DONE,U.renderable=!0);var _e,Be;E.material.alpha<1?Be=new Ft.PerInstanceColorAppearance({translucent:!0}):Be=new Ft.PerInstanceColorAppearance({translucent:!1,vertexShaderSource:V._core.Shaders("vertexShaderSource"),fragmentShaderSource:V._core.Shaders("fragmentShaderSource")}),V._option.clampToGround?_e=new Ft.GroundPrimitive({geometryInstances:ie,appearance:Be,classificationType:V._option.classificationType}):_e=new Ft.Primitive({geometryInstances:ie,appearance:Be,shadows:V._option.shadows}),U.data.geometryPrimitive=_e,U.state=Ft.QuadtreeTileLoadState.LOADING,U.state===Ft.QuadtreeTileLoadState.LOADING&&(U.data.geometryPrimitive.update(k,[]),U.state=Ft.QuadtreeTileLoadState.DONE,U.renderable=!0)},error:function(){U.state=Ft.QuadtreeTileLoadState.DONE,U.renderable=!0}})}else{U.state=Ft.QuadtreeTileLoadState.DONE,U.renderable=!0;return}U.state=Ft.QuadtreeTileLoadState.LOADING}})(L,R,I)},typeof y=="function"&&y(this.item)};let M,B;this.saveDefaultVectorData=()=>{B=I._core.extend({},f,!0)},this.restoreVector=()=>{B&&(f=B,I._option=I._core.extend({...x},f,!0),I._Provider._normalTile=f.level_max-1,I._primitive&&I._primitive._tilesToRender&&I._primitive._tilesToRender.length&&(I._primitive._tilesToRender.forEach(L=>{L.data.geomeitryPrimitive&&L.data.geomeitryPrimitive.destroy(),L.state=Ft.QuadtreeTileLoadState.START}),I._primitive._tileToUpdateHeights.forEach(L=>{L.data.geomeitryPrimitive&&L.data.geomeitryPrimitive.destroy(),L.state=Ft.QuadtreeTileLoadState.START}),I._primitive._tileToUpdateHeights=[],I._primitive._tilesToRender=[])),B=void 0},this.updataVector=(L={})=>{(L.material||L.outlineColor)&&(L.material&&(L.material=Ft.Color.fromCssColorString(L.material)),L.outlineColor&&(L.outlineColor=Ft.Color.fromCssColorString(L.outlineColor))),(L.minimumLevel!==void 0||L.maximumLevel!==void 0)&&(L.minimumLevel!==void 0&&(L.level_min=L.minimumLevel),L.maximumLevel!==void 0&&(L.level_max=L.maximumLevel)),f=I._core.extend(f,L,!0),I._option=I._core.extend(I._option,f,!0),I._Provider._normalTile=f.level_max-1,I._primitive&&I._primitive._tilesToRender&&I._primitive._tilesToRender.length&&(clearTimeout(M),M=setTimeout(()=>{I._primitive._tilesToRender.forEach(R=>{R.data.geomeitryPrimitive&&R.data.geomeitryPrimitive.destroy(),R.state=Ft.QuadtreeTileLoadState.START}),I._primitive._tileToUpdateHeights.forEach(R=>{R.data.geomeitryPrimitive&&R.data.geomeitryPrimitive.destroy(),R.state=Ft.QuadtreeTileLoadState.START}),I._primitive._tileToUpdateHeights=[],I._primitive._tilesToRender=[]},100))},this._primitive=new Ft.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:5});var T=this._viewer.scene,D=T.primitives;f&&f.time&&(this._Provider._availability=new Ft.TimeIntervalCollection([new Ft.TimeInterval({start:f.time.start?Ft.JulianDate.fromDate(new Date(f.time.start)):Ft.Iso8601.MINIMUM_VALUE,stop:f.time.end?Ft.JulianDate.fromDate(new Date(f.time.end)):Ft.Iso8601.MAXIMUM_VALUE})]),this._Provider.isAvailable=function(L){if(!Ft.defined(L))throw new Ft.DeveloperError("time is required.");var R=this._availability;return!Ft.defined(R)||R.contains(L)}),D.add(this._primitive),this._core.getWMTSData({url:A.url,layer:A.layer,srs:A.srs||"EPSG:4490",gisserverTMS:w},L=>{I.item.boundingSphere=L.boundingSphere,I.TileMatrixLimits=L.TileMatrixLimits,I.initThisProvider()}),C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var F={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this._Provider.treeID=F.id,this.setTreeobj(F),this._tree.insertGroupId(F,this._core.isnull(m)?0:m),this};Ll.prototype.createModelGeoJsonFeatureLayerProvider0825=function(o,A,f,m,C,y){var x=this,v={url:"",color:Ft.Color.DARKSALMON,scale:2},E={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:this._core.defaultValue(A.srs,"EPSG:4490")+":{z}",TILEMATRIXSET:this._core.defaultValue(A.srs,"EPSG:4490"),FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!x._core.isnull(f)&&!x._core.isnull(f.color)&&(/^\[/.test(f.color)&&f.color.toString().charAt(0)=="["&&f.color.toString().charAt(f.color.length-1)=="]"||(x._core.isHtmlColor(f.color)?f.color=x._color.colorFromHtmlColor(f.color):(/^rgb/.test(f.color)&&(f.color=x._color.rgbaStringToRgbaObj(f.color)),f.color.r>1&&(f.color.r=f.color.r/255),f.color.g>1&&(f.color.g=f.color.g/255),f.color.b>1&&(f.color.b=f.color.b/255),f.color.a>1&&(f.color.a=f.color.a/255),f.color=x._color.createColor(f.color.r,f.color.g,f.color.b,f.color.a))));var I=x._core.extend(v,f,!0);x._core.isnull(f.near)&&(f.near=0),x._core.isnull(f.far)&&(f.far=999999999);var w=parseFloat(f.near),Q=parseFloat(f.far),M=new Ft.DistanceDisplayCondition(w,Q);I.distanceDisplayCondition=M;var B=f.material;this._urlTemplate=A.url+"?"+this._serialize(E.urlParams);var T=A.url+"?"+this._serialize(E.urlParams);this._Provider=new Ts(this._viewer,this._cesium),this._Provider._normalTile=f.level_max-1,this._Provider._minimumHeight=parseFloat(I.height)||0,this._Provider.loadTile=function(R,k){if(k.state===Ft.QuadtreeTileLoadState.START){if(k.data={lines:[],geometryPrimitive:void 0},k.level>=f.level_min&&k.level<f.level_max&&x.item.show){var U=T.replace(window.encodeURIComponent("{x}"),k.x).replace(window.encodeURIComponent("{y}"),k.y).replace(window.encodeURIComponent("{z}"),k.level);x._cache&&(U+="&"+x._core.getuid()),x._core.xhr({url:U,type:"get",dataType:"json",success:function(V){if(V==null){k.state=Ft.QuadtreeTileLoadState.DONE,k.renderable=!0;return}var H=new Ft.PrimitiveCollection({isModel:!0});V.features.forEach(function(q){I.id=q;var ie=q.geometry.coordinates[2]||0;if(q.properties.height!=null&&(ie=parseFloat(q.properties.height)),/^\[/.test(I.height)&&/\]$/.test(I.height)){var Z=I.height.replace(/\[/,"").replace(/\]/,"");ie+=parseFloat(q.properties[Z])}else ie+=parseFloat(I.height)||0;I.modelMatrix=Ft.Transforms.eastNorthUpToFixedFrame(Ft.Cartesian3.fromDegrees(q.geometry.coordinates[0],q.geometry.coordinates[1],ie));var oe=Ft.Model.fromGltf({id:q,url:I.uri,color:I.color,modelMatrix:I.modelMatrix,scale:I.scale,heightReference:parseInt(I.heightReference),distanceDisplayCondition:I.distanceDisplayCondition});H.add(oe)}),V.features.length==0&&(k.state=Ft.QuadtreeTileLoadState.DONE,k.renderable=!0),k.data.geometryPrimitive=H,k.state=Ft.QuadtreeTileLoadState.LOADING,k.state===Ft.QuadtreeTileLoadState.LOADING&&(k.data.geometryPrimitive.update(R,[]),k.state=Ft.QuadtreeTileLoadState.DONE,k.renderable=!0)},error:function(){k.count==null&&(k.count=0),k.count+=1,k.count>=2?(k.state=Ft.QuadtreeTileLoadState.DONE,k.renderable=!0):k.state=Ft.QuadtreeTileLoadState.START}})}else{k.state=Ft.QuadtreeTileLoadState.DONE,k.renderable=!0;return}k.state=Ft.QuadtreeTileLoadState.LOADING}},this._primitive=new Ft.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:3});var D=this._viewer.scene,F=D.primitives;F.add(this._primitive),C||this.setVisibility(!1),this._core.isnull(I.id)&&(I.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+I.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var L={id:I.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this.setTreeobj(L),this._tree.insertGroupId(L,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.createModelGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y){var x=this,v={url:"",color:Ft.Color.DARKSALMON,scale:2},E={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:this._core.defaultValue(A.srs,"EPSG:4490")+":{z}",TILEMATRIXSET:this._core.defaultValue(A.srs,"EPSG:4490"),FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,Cesium:this._cesium};!x._core.isnull(f)&&!x._core.isnull(f.color)&&(/^\[/.test(f.color)&&f.color.toString().charAt(0)=="["&&f.color.toString().charAt(f.color.length-1)=="]"||(x._core.isHtmlColor(f.color)?f.color=x._color.colorFromHtmlColor(f.color):(/^rgb/.test(f.color)&&(f.color=x._color.rgbaStringToRgbaObj(f.color)),f.color.r>1&&(f.color.r=f.color.r/255),f.color.g>1&&(f.color.g=f.color.g/255),f.color.b>1&&(f.color.b=f.color.b/255),f.color.a>1&&(f.color.a=f.color.a/255),f.color=x._color.createColor(f.color.r,f.color.g,f.color.b,f.color.a))));var I=x._core.extend(v,f,!0);x._core.isnull(f.near)&&(f.near=0),x._core.isnull(f.far)&&(f.far=999999999);var w=parseFloat(f.near),Q=parseFloat(f.far),M=new Ft.DistanceDisplayCondition(w,Q);I.distanceDisplayCondition=M;var B=f.material;let T=A.url.indexOf("/gisserver/")>-1;var D;T?D=A.url+`/${window.encodeURIComponent("{z}")}/${window.encodeURIComponent("{x}")}/${window.encodeURIComponent("{y}")}.json`:D=A.url+"?"+this._serialize(E.urlParams),this._urlTemplate=D,this._Provider=new Ts(this._viewer,this._cesium,T?new Ft.WebMercatorTilingScheme:void 0),this._Provider._normalTile=f.level_max-1,this._Provider._minimumHeight=parseFloat(I.height)||0,this.initThisProvider=()=>{this.initThisProvider=void 0,this._Provider.loadTile=function(V,H){if(H.state===Ft.QuadtreeTileLoadState.START){if(H.data={lines:[],geometryPrimitive:void 0},H.level>=f.level_min&&H.level<f.level_max&&x.item.show){if(T&&(H.reverseY=x._Provider.tilingScheme.getNumberOfYTilesAtLevel(H.level)-H.y-1),x.TileMatrixLimits){let ie=x.TileMatrixLimits[H.level];if(!ie||ie&&(H.x>ie.maxCol||H.x<ie.minCol||H.y>ie.maxRow||H.y<ie.minRow)){H.state=Ft.QuadtreeTileLoadState.DONE,H.renderable=!0;return}}var q=D.replace(window.encodeURIComponent("{x}"),H.x).replace(window.encodeURIComponent("{y}"),H.reverseY||H.y).replace(window.encodeURIComponent("{z}"),H.level);x._cache&&(q+="&"+x._core.getuid()),x._core.xhr({url:q,type:"get",dataType:"json",success:function(ie){if(ie==null){H.state=Ft.QuadtreeTileLoadState.DONE,H.renderable=!0;return}let Z=[],oe;Ft.ModelInstanceCollection||(oe=new Ft.PrimitiveCollection),ie.features.forEach(function(ne){I.id=ne;var se=ne.geometry.coordinates[2]||0;if(ne.properties.height!=null&&(se=parseFloat(ne.properties.height)),/^\[/.test(I.height)&&/\]$/.test(I.height)){var ce=I.height.replace(/\[/,"").replace(/\]/,"");se+=parseFloat(ne.properties[ce])}else se+=parseFloat(I.height)||0;let j=Ft.Transforms.eastNorthUpToFixedFrame(Ft.Cartesian3.fromDegrees(ne.geometry.coordinates[0],ne.geometry.coordinates[1],se)),de=I.heading||0,me=I.pitch||0,_e=I.roll||0;/^\[/.test(de)&&/\]$/.test(de)&&(de=de.replace(/\[/,"").replace(/\]/,""),de=parseFloat(ne.properties[de])),/^\[/.test(me)&&/\]$/.test(me)&&(me=me.replace(/\[/,"").replace(/\]/,""),me=parseFloat(ne.properties[me])),/^\[/.test(_e)&&/\]$/.test(_e)&&(_e=_e.replace(/\[/,"").replace(/\]/,""),_e=parseFloat(ne.properties[_e]));let Be=new Ft.HeadingPitchRoll(Ft.Math.toRadians(de),Ft.Math.toRadians(me),Ft.Math.toRadians(_e)),Qe=Ft.Matrix3.fromHeadingPitchRoll(Be);Ft.Matrix4.multiplyByMatrix3(j,Qe,j),Ft.Matrix4.multiplyByUniformScale(j,I.scale,j),oe?oe.add(Ft.Model.fromGltf({id:ne,url:I.uri,modelMatrix:j,color:I.color})):Z.push({modelMatrix:j,modelId:ne})}),oe||(oe=new Ft.ModelInstanceCollection({url:I.uri,instances:Z,color:I.color})),ie.features.length==0&&(H.state=Ft.QuadtreeTileLoadState.DONE,H.renderable=!0),H.data.geometryPrimitive=oe,H.state=Ft.QuadtreeTileLoadState.LOADING,H.state===Ft.QuadtreeTileLoadState.LOADING&&(H.data.geometryPrimitive.update(V,[]),H.state=Ft.QuadtreeTileLoadState.DONE,H.renderable=!0)},error:function(){H.count==null&&(H.count=0),H.count+=1,H.count>=2?(H.state=Ft.QuadtreeTileLoadState.DONE,H.renderable=!0):H.state=Ft.QuadtreeTileLoadState.START}})}else{H.state=Ft.QuadtreeTileLoadState.DONE,H.renderable=!0;return}H.state=Ft.QuadtreeTileLoadState.LOADING}},typeof y=="function"&&y(this.item)};let F,L;this.saveDefaultVectorData=()=>{L=x._core.extend({},f,!0)},this.restoreVector=()=>{L&&(f=L,I=x._core.extend({...v},f,!0),x._Provider._normalTile=f.level_max-1,x._primitive&&x._primitive._tilesToRender&&x._primitive._tilesToRender.length&&(x._primitive._tilesToRender.forEach(V=>{V.data.geomeitryPrimitive&&V.data.geomeitryPrimitive.destroy(),V.state=Ft.QuadtreeTileLoadState.START}),x._primitive._tileToUpdateHeights.forEach(V=>{V.data.geomeitryPrimitive&&V.data.geomeitryPrimitive.destroy(),V.state=Ft.QuadtreeTileLoadState.START}),x._primitive._tileToUpdateHeights=[],x._primitive._tilesToRender=[])),L=void 0},this.updataVector=(V={})=>{(V.color||V.material)&&(V.color=Ft.Color.fromCssColorString(V.color||V.material)),(V.minimumLevel!==void 0||V.maximumLevel!==void 0)&&(V.minimumLevel!==void 0&&(V.level_min=V.minimumLevel),V.maximumLevel!==void 0&&(V.level_max=V.maximumLevel)),f=x._core.extend(f,V,!0),I=x._core.extend(I,f,!0),x._Provider._normalTile=f.level_max-1,x._primitive&&x._primitive._tilesToRender&&x._primitive._tilesToRender.length&&(clearTimeout(F),F=setTimeout(()=>{x._primitive._tilesToRender.forEach(H=>{H.data.geomeitryPrimitive&&H.data.geomeitryPrimitive.destroy(),H.state=Ft.QuadtreeTileLoadState.START}),x._primitive._tileToUpdateHeights.forEach(H=>{H.data.geomeitryPrimitive&&H.data.geomeitryPrimitive.destroy(),H.state=Ft.QuadtreeTileLoadState.START}),x._primitive._tileToUpdateHeights=[],x._primitive._tilesToRender=[]},100))},this._primitive=new this._cesium.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:3});var R=this._viewer.scene,k=R.primitives;f&&f.time&&(this._Provider._availability=new Ft.TimeIntervalCollection([new Ft.TimeInterval({start:f.time.start?Ft.JulianDate.fromDate(new Date(f.time.start)):Ft.Iso8601.MINIMUM_VALUE,stop:f.time.end?Ft.JulianDate.fromDate(new Date(f.time.end)):Ft.Iso8601.MAXIMUM_VALUE})]),this._Provider.isAvailable=function(V){if(!Ft.defined(V))throw new Ft.DeveloperError("time is required.");var H=this._availability;return!Ft.defined(H)||H.contains(V)}),k.add(this._primitive),this._core.getWMTSData({url:A.url,layer:A.layer,srs:A.srs||"EPSG:4490",gisserverTMS:T},V=>{x.item.boundingSphere=V.boundingSphere,x.TileMatrixLimits=V.TileMatrixLimits,x.initThisProvider()}),C||this.setVisibility(!1),this._core.isnull(I.id)&&(I.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+I.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var U={id:I.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this.setTreeobj(U),this._tree.insertGroupId(U,this._core.isnull(m)?0:m),this};Ll.prototype.VolumeVectorGeoJsonFeatureLayerOptimization1=function(o,A,f,m,C,y){var x={show:!0,positions:[],shape:void 0,cornerType:this._cesium.CornerType.ROUNDED,granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.DISABLED,level_max:20,level_min:10},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a)))),this._option=this._core.extend(x,f,!0),A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");var E=[],I={polygonHierarchy:void 0,height:0,extrudedHeight:0,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,perPositionHeight:!1,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.RED},w=this;this._urlTemplate=A.url+"?"+this._serialize(v.urlParams),this._Provider=new Ts(this._viewer,this._cesium),this._Provider._normalTile=f.level_max-1,w._defaultStyle={outlineColor:Ft.Color.fromCssColorString("rgba(209,204,226,0)"),lineWidth:0,outline:!0,fill:!0,fillColor:Ft.Color.fromCssColorString("rgba(220,20,60,1)"),fillShow:"nod",tileCacheSize:200,showMaker:!1,showCenterLabel:!0,fontColor:Ft.Color.fromCssColorString("rgba(255,0,0,1)"),labelOffsetX:-10,labelOffsetY:-5,fontSize:13,fontFamily:"\u9ED1\u4F53",pointColor:Ft.Color.fromCssColorString("rgba(255,0,0,0)"),centerLabelPropertyName:"NAME"},w._option.fill.indexOf("[")!=-1?w._defaultStyle.fillShow=w._option.fill:w._defaultStyle.fillColor=Ft.Color.fromCssColorString(w._option.fill),this._Provider.loadTile=function(T,D){if(this.tile=null,this.tile=D,D.state===this._cesium.QuadtreeTileLoadState.START&&w.item.show){var F="z"+D.level+"x"+D.x+"y"+D.y;if(D.data={lines:[],geometryPrimitive:void 0},D.level>f.level_max+2&&w.probj.length>0)for(var L=0;L<w.probj.length;U++){w._viewer.entities.remove(w.probj[L]);var R=w.probj.indexOf(w.probj[L]);w.probj.splice(R,1)}if(D.level>=f.level_min&&D.level<f.level_max&&w.item.show){var k=Vi.filter(E,function(V){return V.x==D.x&&V.y==D.y&&V.level==D.level});if(k.length!=0&&k[0].data&&k[0].data.length>0){D.data.geometryPrimitive=new Ft.Primitive({geometryInstances:k[0].data,appearance:new Ft.PerInstanceColorAppearance({flat:!0,translucent:!0,faceForward:!0,closed:!0}),shadows:Ft.ShadowMode.ENABLED}),D.state=Ft.QuadtreeTileLoadState.LOADING,D.state===Ft.QuadtreeTileLoadState.LOADING&&(D.data.geometryPrimitive&&(D.state=Ft.QuadtreeTileLoadState.DONE),D.renderable=!0);return}if(w.PrimitiveData.length>0){for(var U=0;U<w.PrimitiveData.length;U++)if(w.PrimitiveData[U].key==F){w.Primitivekey.includes(F)||w.Primitivekey.push(F);return}}w.Primitivekey.includes(F)||(w.Primitivekey.push(F),E.push({level:D.level,x:D.x,y:D.y,data:void 0}),function(V){var H=w._urlTemplate.replace(window.encodeURIComponent("{x}"),V.x).replace(window.encodeURIComponent("{y}"),V.y).replace(window.encodeURIComponent("{z}"),V.level);w.tilesLength++;var q="z"+V.level+"x"+V.x+"y"+V.y;w._cache&&(H+="&"+w._core.getuid());var ie={xMin:Ft.Math.toDegrees(V._rectangle.west),yMin:Ft.Math.toDegrees(V._rectangle.south),xMax:Ft.Math.toDegrees(V._rectangle.east),yMax:Ft.Math.toDegrees(V._rectangle.north)};w._core.xhr({url:H,type:"get",dataType:"json",success:function(Z){var oe=Z;w._tileWidth=256,w._tileHeight=256,w.x=V._x,w.y=V._y,w.level=V._level,w._createCanvas(),w._drawGeojson(w._context,0,0,Z,ie,w._tileWidth,w._tileHeight,w._fill,w._outline,w.x,w.y,w.level);var ne=w._viewer.entities.add({ids:oe,name:"Rotating rectangle with rotating texture coordinate",rectangle:{coordinates:V.rectangle,material:new Ft.ImageMaterialProperty({image:w._canvas,transparent:!0}),zIndex:V.level,classificationType:Ft.ClassificationType.BOTH}});w.probj.push(ne);var se={level:V.level,key:q,data:ne};w.loadFinishKey.push(q),w.PrimitiveData.push(se),w.returnCount++,w.removeObsoleteEntitiesxp(V.rectangle)},error:function(){V.state=Ft.QuadtreeTileLoadState.DONE,V.renderable=!0}})}(D))}else{D.state=Ft.QuadtreeTileLoadState.LOADING,D.state===Ft.QuadtreeTileLoadState.LOADING&&(D.data.geometryPrimitive&&(D.state=Ft.QuadtreeTileLoadState.DONE),D.renderable=!0);return}}},this._primitive=new Ft.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:3});var Q=this._viewer.scene,M=Q.primitives;M.add(this._primitive),C||this.setVisibility(!1),this._core.isnull(I.id)&&(I.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+I.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var B={id:I.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this.setTreeobj(B),this._tree.insertGroupId(B,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.VolumeVectorGeoJsonFeatureLayerOptimizationtest=function(o,A,f,m,C,y){var x={show:!0,positions:[],shape:void 0,cornerType:this._cesium.CornerType.ROUNDED,granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.DISABLED,level_max:20,level_min:10},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a)))),this._option=this._core.extend(x,f,!0),A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");var E=[],I={polygonHierarchy:void 0,height:0,extrudedHeight:0,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,perPositionHeight:!1,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.RED},w=this;this._urlTemplate=A.url+"?"+this._serialize(v.urlParams),this._Provider=new Ts(this._viewer,this._cesium),this._Provider._normalTile=f.level_max-1,w._defaultStyle={outlineColor:Ft.Color.fromCssColorString("rgba(209,204,226,0)"),lineWidth:0,outline:!0,fill:!0,fillColor:Ft.Color.fromCssColorString("rgba(220,20,60,1)"),fillShow:"nod",tileCacheSize:200,showMaker:!1,showCenterLabel:!0,fontColor:Ft.Color.fromCssColorString("rgba(255,0,0,1)"),labelOffsetX:-10,labelOffsetY:-5,fontSize:13,fontFamily:"\u9ED1\u4F53",pointColor:Ft.Color.fromCssColorString("rgba(255,0,0,0)"),centerLabelPropertyName:"NAME"},w._option.fill.indexOf("[")!=-1?w._defaultStyle.fillShow=w._option.fill:w._defaultStyle.fillColor=Ft.Color.fromCssColorString(w._option.fill),this._Provider.loadTile=function(T,D){if(this.tile=null,this.tile=D,D.state===this._cesium.QuadtreeTileLoadState.START&&w.item.show){var F="z"+D.level+"x"+D.x+"y"+D.y;if(D.data={lines:[],geometryPrimitive:void 0},D.level>f.level_max+2&&w.probj.length>0)for(var L=0;L<w.probj.length;U++){w._viewer.entities.remove(w.probj[L]);var R=w.probj.indexOf(w.probj[L]);w.probj.splice(R,1)}if(D.level>=f.level_min&&D.level<f.level_max&&w.item.show){var k=Vi.filter(E,function(V){return V.x==D.x&&V.y==D.y&&V.level==D.level});if(k.length!=0&&k[0].data&&k[0].data.length>0){D.data.geometryPrimitive=new Ft.Primitive({geometryInstances:k[0].data,appearance:new Ft.PerInstanceColorAppearance({flat:!0,translucent:!0,faceForward:!0,closed:!0}),shadows:Ft.ShadowMode.ENABLED}),D.state=Ft.QuadtreeTileLoadState.LOADING,D.state===Ft.QuadtreeTileLoadState.LOADING&&(D.data.geometryPrimitive&&(D.state=Ft.QuadtreeTileLoadState.DONE),D.renderable=!0);return}if(w.PrimitiveData.length>0){for(var U=0;U<w.PrimitiveData.length;U++)if(w.PrimitiveData[U].key==F){w.Primitivekey.includes(F)||w.Primitivekey.push(F);return}}w.Primitivekey.includes(F)||(w.Primitivekey.push(F),E.push({level:D.level,x:D.x,y:D.y,data:void 0}),function(V){var H=w._urlTemplate.replace(window.encodeURIComponent("{x}"),V.x).replace(window.encodeURIComponent("{y}"),V.y).replace(window.encodeURIComponent("{z}"),V.level);w.tilesLength++;var q="z"+V.level+"x"+V.x+"y"+V.y;w._cache&&(H+="&"+w._core.getuid());var ie={xMin:Ft.Math.toDegrees(V._rectangle.west),yMin:Ft.Math.toDegrees(V._rectangle.south),xMax:Ft.Math.toDegrees(V._rectangle.east),yMax:Ft.Math.toDegrees(V._rectangle.north)};w._core.xhr({url:H,type:"get",dataType:"json",success:function(Z){var oe=Z;w._tileWidth=256,w._tileHeight=256,w.x=V._x,w.y=V._y,w.level=V._level;var ne=w._viewer.entities.add({ids:oe,name:"Rotating rectangle with rotating texture coordinate",rectangle:{coordinates:V.rectangle,material:new Ft.ImageMaterialProperty({image:Z,transparent:!0}),zIndex:V.level,classificationType:Ft.ClassificationType.BOTH}});w.probj.push(ne);var se={level:V.level,key:q,data:ne};w.loadFinishKey.push(q),w.PrimitiveData.push(se),w.returnCount++,w.removeObsoleteEntitiesxp(V.rectangle)},error:function(){V.state=Ft.QuadtreeTileLoadState.DONE,V.renderable=!0}})}(D))}else{D.state=Ft.QuadtreeTileLoadState.LOADING,D.state===Ft.QuadtreeTileLoadState.LOADING&&(D.data.geometryPrimitive&&(D.state=Ft.QuadtreeTileLoadState.DONE),D.renderable=!0);return}}},this._primitive=new Ft.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:3});var Q=this._viewer.scene,M=Q.primitives;M.add(this._primitive),C||this.setVisibility(!1),this._core.isnull(I.id)&&(I.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+I.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var B={id:I.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this.setTreeobj(B),this._tree.insertGroupId(B,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.VolumeVectorGeoJsonFeatureLayerOptimizationGroundtest=function(o,A,f,m,C,y){var x={show:!0,positions:[],shape:void 0,cornerType:this._cesium.CornerType.ROUNDED,granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.DISABLED,level_max:20,level_min:10},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:this._core.defaultValue(A.srs,"EPSG:4490")+":{z}",TILEMATRIXSET:this._core.defaultValue(A.srs,"EPSG:4490"),FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a)))),this._option=this._core.extend(x,f,!0),A==null&&console.log("geoOptions is required"),o==null&&console.log("layername is required");var E={id:this._option.id,polygonHierarchy:void 0,height:0,extrudedHeight:0,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,perPositionHeight:!1,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.RED},I=this;let w=A.url.indexOf("/gisserver/")>-1;var Q;w?Q=A.url+`/${window.encodeURIComponent("{z}")}/${window.encodeURIComponent("{x}")}/${window.encodeURIComponent("{y}")}.json`:Q=A.url+"?"+this._serialize(v.urlParams),this._urlTemplate=Q,this._Provider=new Ts(this._viewer,this._cesium,w?new Ft.WebMercatorTilingScheme:void 0),this._Provider._normalTile=f.level_max-1,this._Provider._minimumHeight=parseFloat(f.height||0),this.initThisProvider=()=>{this.initThisProvider=void 0,this._Provider.loadTile=function(D,F){(function(L,R,k){if(R.state===Ft.QuadtreeTileLoadState.START){if(R.data={lines:[],geometryPrimitive:void 0},R.level>=f.level_min&&R.level<f.level_max&&k.item.show){if(k.TileMatrixLimits){let V=k.TileMatrixLimits[R.level];if(!V||V&&(R.x>V.maxCol||R.x<V.minCol||R.y>V.maxRow||R.y<V.minRow)){R.state=Ft.QuadtreeTileLoadState.DONE,R.renderable=!0;return}}var U=Q.replace(window.encodeURIComponent("{x}"),R.x).replace(window.encodeURIComponent("{y}"),R.y).replace(window.encodeURIComponent("{z}"),R.level);k._cache&&(U+="&"+k._core.getuid()),k._core.xhr({url:U,type:"get",dataType:"json",success:function(V){var H=Vi.cloneDeep(V);if(H.features.length<=0){R.state=Ft.QuadtreeTileLoadState.DONE,R.renderable=!0;return}if(H==null){R.state=Ft.QuadtreeTileLoadState.DONE,R.renderable=!0;return}var q=[],ie=[];k.Legend=[];function Z(_e){for(var Be=0;Be<_e.length;Be++)Array.isArray(_e[Be])?Z(_e[Be]):(se.push(_e[Be]),Be===2&&!ce&&(ce=!0))}function oe(){if(/^\[/.test(k._option.extrudedHeight)&&/\]$/.test(k._option.extrudedHeight)){var _e=k._option.extrudedHeight.replace(/\[/,"").replace(/\]/,"");E.extrudedHeight=parseFloat(j.properties[_e])}if(E.material=k._option.material,/^\[/.test(k._option.material)&&/\]$/.test(k._option.material)){var Be=k._option.material.replace(/\[/,"").replace(/\]/,"");E.material=j.properties[Be],k._core.isHtmlColor(E.material)?E.material=k._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=k._color.rgbaStringToRgbaObj(E.material)),E.material.red>1&&(E.material.red=E.material.red/255),E.material.green>1&&(E.material.green=E.material.green/255),E.material.blue>1&&(E.material.blue=E.material.blue/255),E.material.alpha>1&&(E.material.a=E.material.alpha/255),E.material=k._color.createColor(E.material.red,E.material.green,E.material.blue,E.material.alpha))}else k._option.material&&(E.material=k._option.material),E.material&&(k._core.isHtmlColor(E.material)?E.material=k._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=k._color.rgbaStringToRgbaObj(E.material)),E.material.red>1&&(E.material.red=E.material.red/255),E.material.green>1&&(E.material.green=E.material.green/255),E.material.blue>1&&(E.material.blue=E.material.blue/255),E.material.alpha>1&&(E.material.a=E.material.alpha/255),E.material=k._color.createColor(E.material.red,E.material.green,E.material.blue,E.material.alpha)));if(se.length>=2){var Qe=ce?Ft.Cartesian3.fromDegreesArrayHeights(se):Ft.Cartesian3.fromDegreesArray(se);E.polygonHierarchy=new Ft.PolygonHierarchy(Qe);var Ie=new Ft.PolygonGeometry(E);j.treeID=E.id,j.VectorType="polygon",j.VectorStyle={haveZ:ce,extrudedHeight:E.extrudedHeight,positions:se,material:E.material};var ve=new Ft.GeometryInstance({id:j,geometry:Ie,attributes:{color:new Ft.ColorGeometryInstanceAttribute.fromColor(E.material)}}),K="material:"+E.material.red*255+","+E.material.green*255+","+E.material.blue*255;k.Legend.push(K),q.push(ve)}}for(var ne=0;ne<H.features.length;ne++){var se=[],ce=!1,j=H.features[ne];if(Array.isArray(j.geometry.coordinates)&&j.geometry.coordinates.length>0)if(Array.isArray(j.geometry.coordinates[0][0]))for(var de=0;de<j.geometry.coordinates.length;de++)se=[],j.geometry.coordinates[de].pop(),Z(j.geometry.coordinates[de]),oe(se);else Z(j.geometry.coordinates),oe(se)}q.length==0&&(R.state=Ft.QuadtreeTileLoadState.DONE,R.renderable=!0);var me=new Ft.GroundPrimitive({geometryInstances:q,appearance:new Ft.PerInstanceColorAppearance({translucent:!1,vertexShaderSource:k._core.Shaders("vertexShaderSource"),fragmentShaderSource:k._core.Shaders("fragmentShaderSource")}),classificationType:k._option.classificationType,shadows:k._option.shadows});k.probj.push(me),R.data.geometryPrimitive=me,R.state=Ft.QuadtreeTileLoadState.LOADING,R.state===Ft.QuadtreeTileLoadState.LOADING&&(R.data.geometryPrimitive.update(L,[]),R.state=Ft.QuadtreeTileLoadState.DONE,R.renderable=!0)},error:function(){R.count==null&&(R.count=0),R.count+=1,R.count>=2?(R.state=Ft.QuadtreeTileLoadState.DONE,R.renderable=!0):R.state=Ft.QuadtreeTileLoadState.START}})}else{R.state=Ft.QuadtreeTileLoadState.DONE,R.renderable=!0;return}R.state=Ft.QuadtreeTileLoadState.LOADING}})(D,F,I)}},this._primitive=new Ft.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:5});var M=this._viewer.scene,B=M.primitives;B.add(this._primitive),this._core.getWMTSData({url:A.url,layer:A.layer,srs:A.srs||"EPSG:4490",gisserverTMS:w},D=>{I.item.boundingSphere=D.boundingSphere,I.TileMatrixLimits=D.TileMatrixLimits,I.initThisProvider()}),C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var T={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f,treeData:{name:o,geoOptions:A,styleOption:f,GroupID:m,checked:C,disFnc:y}};return this._Provider.treeID=T.id,this.setTreeobj(T),this._tree.insertGroupId(T,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Ll.prototype.createGeojsonImage=function(o){let A=eval;Ft.loadText("http://36.7.136.132:8090/geoserver/swagger/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=swagger%3A_20200410153959_JZ11&maxFeatures=50&outputFormat=application%2Fjson").then(function(f){f=A("("+f+")");for(var m=0;m<f.features.length;m++)m==0?f.features[m].properties.nod="rgba(255,255,0,1)":m==1?f.features[m].properties.nod="rgba(220,20,60,1)":m==2?f.features[m].properties.nod="rgba(75,0,130,1)":m==3?f.features[m].properties.nod="rgba(0,0,255,1)":m==4?f.features[m].properties.nod="rgba(30,144,255,1)":f.features[m].properties.nod="rgba(50,205,50,1)";var C=null;try{var y=new VectorTileImageryProvider({source:f,zIndex:99,removeDuplicate:!1,defaultStyle:{outlineColor:"rgba(209,204,226,1)",lineWidth:0,outline:!0,fill:!0,fillColor:"rgba(209,204,226,1)",fillShow:"[nod]",tileCacheSize:200,showMaker:!1,showCenterLabel:!0,fontColor:"rgba(255,0,0,1)",labelOffsetX:-10,labelOffsetY:-5,fontSize:13,fontFamily:"\u9ED1\u4F53",centerLabelPropertyName:"NAME"},maximumLevel:20,minimumLevel:15,simplify:!1}),x;y.readyPromise.then(function(){x=viewer.imageryLayers.addImageryProvider(y),Ft.Camera.DEFAULT_VIEW_RECTANGLE=y.rectangle})}catch(v){console.log(v)}})};Ll.prototype._drawGeojson=function(o,A,f,m,C,y,x,v,E,I,w,Q){var M=this;if(typeof v>"u"&&(v=!0),typeof E>"u"&&(E=!0),!v&&!E)return;typeof y>"u"&&(y=o.canvas.width-A),typeof x>"u"&&(x=o.canvas.height-f);var B=new idt(y,x),T=this._defaultStyle,D={labelStroke:T.labelStroke,labelStrokeWidth:T.labelStrokeWidth,labelStrokeColor:T.labelStrokeColor,pointSize:T.pointSize,fontSize:T.fontSize,fontFamily:T.fontFamily,color:T.fontColor.toCssColorString(),backgroundColor:T.pointColor.toCssColorString(),pointStyle:T.pointStyle,ringRadius:T.ringRadius,circleLineWidth:T.circleLineWidth,showMaker:T.showMaker,showLabel:T.showLabel,labelOffsetX:T.labelOffsetX,labelOffsetY:T.labelOffsetY,markerSymbol:T.makerImage instanceof Image?T.makerImage:T.makerImageEl},F=[];M._styleFilter&&(turf.featureEach(m,function(k,U){M._styleFilter&&(T=M._defaultStyle.clone(),M._styleFilter(k,T,I,w,Q),k.style=T)}),m.features.sort(function(k,U){return k.style&&k.style.lineDash?1:U.style&&U.style.lineDash?-1:0}));function L(k,U){if(M._styleFilter){if(T=k.style,T.show==!1)return;D={labelStroke:T.labelStroke,labelStrokeWidth:T.labelStrokeWidth,labelStrokeColor:T.labelStrokeColor,pointSize:T.pointSize,fontSize:T.fontSize,fontFamily:T.fontFamily,color:T.fontColor.toCssColorString(),backgroundColor:T.pointColor.toCssColorString(),pointStyle:T.pointStyle,ringRadius:T.ringRadius,circleLineWidth:T.circleLineWidth,showMaker:T.showMaker,showLabel:T.showLabel,labelOffsetX:T.labelOffsetX,labelOffsetY:T.labelOffsetY,markerSymbol:T.makerImage instanceof Image?T.makerImage:T.makerImageEl}}else T=M._defaultStyle;if(o.lineWidth=T.lineWidth,o.strokeStyle=T.outlineColor.toCssColorString(),o.fillStyle=T.fillColor.toCssColorString(),T.fillShow.indexOf("[")!=-1){var V=T.fillShow.replace("[","").replace("]","");o.fillStyle=k.properties[V]}if(T.lineDash&&o.setLineDash(T.lineDash),o.lineCap=T.lineCap,T.shadowColor&&T.shadowColor instanceof Ft.Color?o.shadowColor=T.shadowColor.toCssColorString():o.shadowColor=T.shadowColor,o.shadowBlur=T.shadowBlur,o.shadowOffsetX=T.shadowOffsetX,o.shadowOffsetY=T.shadowOffsetY,o.miterLimit=T.miterLimit,o.lineJoin=T.lineJoin,k.geometry.type=="Point")drawMarker(o,B,C,A,f,k,v,E,T.labelPropertyName,D);else if(k.geometry.type=="Polygon"&&T.fill){var H=turf.getCoords(k),q=Ale(o,B,C,A,f,H,!0,!1,T);q&&q.map(function(oe){oe.style=T,F.push(oe)})}else if(k.geometry.type=="MultiPolygon"&&T.fill){var ie;try{ie=turf.getCoords(k),ie.map(function(oe){var ne=Ale(o,B,C,A,f,oe,!0,!1,T);ne&&ne.map(function(se){se.style=T,F.push(se)})})}catch{}}else if(k.geometry.type=="MultiLineString"){if(!(k.properties.isOutline&&!T.outline)){var H=turf.getCoords(k);Ale(o,B,C,A,f,H,!1,!0,T),H=null}}else if(k.geometry.type=="LineString"&&!(k.properties.isOutline&&!T.outline)){var Z=turf.getCoords(k),H=[Z];Ale(o,B,C,A,f,H,!1,!0,T),Z=null,H=null}}function R(k,U,V,H,q,ie){var Z=k.canvas,oe=k.getImageData(0,0,Z.width,Z.height),ne=document.createElement("canvas");ne.width=Z.width,ne.height=Z.height;var se=ne.getContext("2d"),ce=[];ie.map(function(j){se.clearRect(0,0,ne.width,ne.height),se.beginPath();var de=0;j.map(function(_e){var Be=U.project(_e,V);de==0?se.moveTo(H+Be.x,q+Be.y):se.lineTo(H+Be.x,q+Be.y),de++}),se.closePath(),se.fillStyle="rgba(255,255,255,1)",se.fill(),ce=se.getImageData(0,0,ne.width,ne.height).data;for(var me=3;me<ce.length;me+=4)ce[me]>0&&(oe.data[me]=0)}),k.putImageData(oe,0,0)}turf.featureEach(m,function(k,U){(k.geometry.type=="Polygon"||k.geometry.type=="MultiPolygon")&&L(k,U)}),F&&F.length&&R(o,B,C,A,f,F),turf.featureEach(m,function(k,U){(k.geometry.type=="LineString"||k.geometry.type=="MultiLineString")&&L(k,U)}),turf.featureEach(m,function(k,U){(k.geometry.type=="Point"||k.geometry.type=="MultiPoint")&&L(k,U)})};Ll.prototype._createCanvas=function(){this._canvas=document.createElement("canvas"),this._canvas.width=this._tileWidth,this._canvas.height=this._tileHeight,this._context=this._canvas.getContext("2d"),this._context.lineWidth=this._defaultStyle.lineWidth,this._context.strokeStyle=this._defaultStyle.outlineColor.toCssColorString(),this._context.fillStyle=this._defaultStyle.fillColor.toCssColorString()};function Ale(o,A,f,m,C,y,x,v,E){var I=0,w=[];if(y.map(function(Q){if(!x||I<=0){var M=0;o.beginPath(),Q.map(function(B){var T=A.project(B,f);M==0?o.moveTo(m+T.x,C+T.y):o.lineTo(m+T.x,C+T.y),M++}),x&&(o.closePath(),o.fill()),v&&o.stroke()}else w.push(Q);I++}),x)return w;w=null}Ll.prototype.getLegend=function(){var o=[];return this.Legend!=null&&(o=this._core.unique(this.Legend)),o};Ll.prototype.removeObsoletePrimitives1=function(o){};Ll.prototype.removeObsoletePrimitives=function(o){for(var A=this._viewer.scene.globe._surface._tilesToRender,f=A.map(function(D){return D.level}),m=Math.min.apply(Math,hle(f)),C=Math.max.apply(Math,hle(f)),y=this.PrimitiveData.length-1;y>=0;y--){var x=this.PrimitiveData[y];if(x.level<m||x.level>C){var v=this._viewer.scene.primitives.remove(x.data);if(v){var E=this.Primitivekey.indexOf(this.loadFinishKey[y]);E>-1&&this.Primitivekey.splice(E,1),this.PrimitiveData.splice(y,1),this.loadFinishKey.splice(y,1)}}}var I=[],w=o.parent;if(w&&w.parent){var Q=w.parent;I.push(Q)}var M=o.children;I=I.concat(M);for(var y=0;y<M.length;y++){var B=M[y].children;I=I.concat(B)}for(var y=0;y<I.length;y++)if(I[y]){var T="z"+I[y].level+"x"+I[y].x+"y"+I[y].y,E=this.loadFinishKey.indexOf(T);if(E>-1){var v=this._viewer.scene.primitives.remove(this.PrimitiveData[E].data);if(v){var E=this.Primitivekey.indexOf(T);E>-1&&this.Primitivekey.splice(E,1),this.PrimitiveData.splice(E,1),this.loadFinishKey.splice(E,1)}}}};Ll.prototype.removeObsoleteEntities=function(o){for(var A=this._viewer.scene.globe._surface._tilesToRender,f=A.map(function(D){return D.level}),m=Math.min.apply(Math,hle(f))-1,C=Math.max.apply(Math,hle(f))+1,y=this.PrimitiveData.length-1;y>=0;y--){var x=this.PrimitiveData[y];if(x.level<m||x.level>C){var v=this._viewer.entities.remove(x.data);if(v){var E=this.Primitivekey.indexOf(this.loadFinishKey[y]);E>-1&&this.Primitivekey.splice(E,1),this.PrimitiveData.splice(y,1),this.loadFinishKey.splice(y,1)}}}var I=[],w=o.parent;if(w&&w.parent){var Q=w.parent;I.push(Q)}var M=o.children;I=I.concat(M);for(var y=0;y<M.length;y++){var B=M[y].children;I=I.concat(B)}for(var y=0;y<I.length;y++)if(I[y]){var T="z"+I[y].level+"x"+I[y].x+"y"+I[y].y,E=this.loadFinishKey.indexOf(T);if(E>-1){var v=this._viewer.entities.remove(this.PrimitiveData[E].data);if(v){var E=this.Primitivekey.indexOf(T);E>-1&&this.Primitivekey.splice(E,1),this.PrimitiveData.splice(E,1),this.loadFinishKey.splice(E,1)}}}};Ll.prototype.removeObsoleteEntitiesxp=function(o){for(var A=this._cesium.Cartesian3.fromDegrees(this._cesium.Math.toDegrees(o.west),this._cesium.Math.toDegrees(o.south)),f=this._cesium.Cartesian3.fromDegrees(this._cesium.Math.toDegrees(o.east),this._cesium.Math.toDegrees(o.north)),m=0;m<this.probj.length;m++)var C=this._cesium.Rectangle.contains(this.probj[m].rectangle.coordinates.getValue(),this._cesium.Cartographic.fromCartesian(A)),y=this._cesium.Rectangle.contains(this.probj[m].rectangle.coordinates.getValue(),this._cesium.Cartographic.fromCartesian(f));for(var x=this._viewer.camera.computeViewRectangle(),v=0;v<this.probj.length;v++){var E=this.probj[v].rectangle.coordinates.getValue(),I=this._cesium.Cartesian3.fromDegrees(this._cesium.Math.toDegrees(E.west),this._cesium.Math.toDegrees(E.south)),w=this._cesium.Cartesian3.fromDegrees(this._cesium.Math.toDegrees(E.east),this._cesium.Math.toDegrees(E.north)),Q=this._cesium.Rectangle.contains(x,this._cesium.Cartographic.fromCartesian(I)),M=this._cesium.Rectangle.contains(x,this._cesium.Cartographic.fromCartesian(w));Q||M?this.probj[v].show=!0:this.probj[v].show=!1}};Ll.prototype.computeCircle=function(o){this._core.isnull(o)&&(o=4);for(var A=[],f=0;f<360;f++){var m=this._cesium.Math.toRadians(f);A.push(new this._cesium.Cartesian2(o*Math.cos(m),o*Math.sin(m)))}return A};Ll.prototype.setTreeobj=function(o){this.treeobj=o};Ll.prototype.export=function(){var o=this.item.show==null?void 0:this.item.show,A=this.treeobj.url;return{type:this.treeobj.type,treeobj:{name:this.treeobj.name,pId:this.treeobj.pId},style:{show:o,url:A,pId:this.treeobj.pId},treeData:this.treeobj.treeData}};Ll.prototype.deleteObject=function(){if(this._viewer.scene.primitives.remove(this.item),this.probj&&this.probj.length>0&&(this._viewer.scene.primitives.remove(this.probj[0]),this.probj.pop()),this.img!=null&&this._viewer.imageryLayers.remove(this.img),this.primitve&&this.primitve.length>0){for(var o=0;o<this.primitve.length;o++)this._viewer.scene.primitives.remove(this.primitve[o]);this.primitve=[]}this.loadAllKey&&this.loadAllKey.length>0&&(this.loadAllKey=[]);try{this._Provider.remove()}catch{}};Ll.prototype.setRefresh=function(o){try{this._Provider&&this._Provider.setStatus(o)}catch{}};Ll.prototype.getLevel=function(){var o=40487.57,A=7096758e-11,f=91610.74,m=-40467.74,C=this._viewer.camera,y,x;if(C&&C.positionCartographic&&C.positionCartographic.height){var v=this._viewer.scene.globe.getHeight(C.positionCartographic);!v&&(v=0),y=C.positionCartographic.height-v,x=Math.round(m+(o-m)/(1+Math.pow(y/f,A)))}else x=0;return x};Ll.prototype.setVisibility=function(o){try{if(this.loadAllKey=[],this.item!=null&&this.item.show!=null&&(this.item.show=o),this.img!=null&&(this.img.show=o),this.primitve&&this.primitve.length>0)for(var A=0;A<this.primitve.length;A++)this.primitve[A].show=o;if(this._Provider&&this._Provider.setStatus&&this._Provider.setStatus(o),this.probj&&this.probj.length>0)for(var A=0;A<this.probj.length;A++)this.probj[A].show=o}catch{}};Ll.prototype.edit=function(o,A){return this.isEditting=o,this.editoption=A,this._Provider&&this._Provider.edit&&this._Provider.edit(o,A)};Ll.prototype.isCache=function(o){this._cache=o};Ll.prototype.forceRefresh=function(){try{for(var o=0;o<this._Provider.quadtree._levelZeroTiles.length;o++)this._Provider.quadtree._levelZeroTiles[o].freeResources()}catch{}};var Wf=Ll;var _w=null;function dle(o,A,f){_w=A,this._viewer=o,this._cesium=A,this._tree=f,this._core=new pr(o,A)}dle.prototype.flyTo=function(o,A={}){return this._viewer.flyTo(o,{duration:A.time||3,maximumHeight:A.maxHeight,offset:new _w.HeadingPitchRange(_w.Math.toRadians(A.heading||0),_w.Math.toRadians(A.pitch||-45),A.range)})};dle.prototype.flyToPointsInterest=function(o,A){return this._viewer.camera.flyTo({destination:o.destination,orientation:o.orientation,duration:o.duration,complete:A})};dle.prototype.flyToPosition=function(o,A,f,m={}){let C={heading:this._core.defaultValue(m.heading,0),pitch:this._core.defaultValue(m.pitch,-90),roll:this._core.defaultValue(m.roll,0),time:this._core.defaultValue(m.time,3)};Math.abs(o)<=180&&Math.abs(A)<=90?this._viewer.camera.flyTo({destination:this._cesium.Cartesian3.fromDegrees(o,A,f),orientation:new _w.HeadingPitchRoll(_w.Math.toRadians(C.heading),_w.Math.toRadians(C.pitch),_w.Math.toRadians(C.roll)),duration:C.time}):this._viewer.camera.flyTo({destination:{x:o,y:A,z:f},orientation:new _w.HeadingPitchRoll(_w.Math.toRadians(C.heading),_w.Math.toRadians(C.pitch),_w.Math.toRadians(C.roll)),duration:C.time})};var fle=dle;var pu=null;function vy(o,A){pu=A,this._viewer=o,this._cesium=A,this.item={show:!0},this._core=new pr(o,A),this._color=new Pn(this._viewer,this._cesium),this._tree=lt,this._flyTo=new fle(this._viewer,this._cesium,this._tree),this._Provider=void 0,this.Legend=[],this.model=[],this._cache=!1,this._forceRefreshPrvimitive=null,this._forceRefreshProvider=null}vy.prototype.createPolylineGeoJsonFeatureLayer=function(o,A,f,m,C,y){var x={positions:[],arcType:this._cesium.ArcType.GEODESIC,clampToGround:!1,width:1,show:!0,material:this._cesium.Color.WHITE,height:30};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a))));var v=this._core.extend(x,f,!0);A==null&&console.log("geojson is required");var E=null;A.then?E=A:E=this._cesium.GeoJsonDataSource.load(A);var I=this;E.then(function(Q){for(var M=Q.entities.values,B=[],T=new I._cesium.PrimitiveCollection,D=0;D<M.length;D++){var F=M[D],L=null;if(v.clampToGround){v.positions=F.polyline.positions._value;var R={positions:F.polyline.positions._value,width:v.width},R=new I._cesium.GroundPolylineGeometry(R);L=new I._cesium.GeometryInstance({id:F,geometry:R,attributes:{color:new I._cesium.ColorGeometryInstanceAttribute.fromColor(v.material)}})}else{for(var k=[],D=0;D<F.polyline.positions._value.length;D++){var U=I._viewer.scene.globe.ellipsoid,V=I._cesium.Cartographic.fromCartesian(F.polyline.positions._value[D]),H=I._cesium.Math.toDegrees(V.longitude),q=I._cesium.Math.toDegrees(V.latitude),ie=V.height+v.height,Z=new I._cesium.Cartesian3.fromDegrees(H,q,ie);k.push(Z)}v.positions=k;var oe=new I._cesium.PolylineGeometry(v),ne=I._cesium.PolylineGeometry.createGeometry(oe);L=new I._cesium.GeometryInstance({id:F,geometry:ne,attributes:{color:new I._cesium.ColorGeometryInstanceAttribute.fromColor(v.material)}})}F.positions=v.positions;var se="material:"+v.material.red*255+","+v.material.green*255+","+v.material.blue*255;I.Legend.push(se);var ce=null;v.clampToGround?ce=new I._cesium.GroundPolylinePrimitive({geometryInstances:L,appearance:new I._cesium.MaterialAppearance({material:new I._cesium.Material({fabric:{type:"Color",uniforms:{color:v.material}}}),faceForward:!0,flat:!1})}):ce=new I._cesium.Primitive({geometryInstances:L,appearance:new I._cesium.PolylineMaterialAppearance({material:new I._cesium.Material({fabric:{type:"Color",uniforms:{color:v.material}}})}),shadows:I._cesium.ShadowMode.ENABLED}),T.add(ce)}var j;f&&f.time&&(j=new I._cesium.TimeIntervalCollection([new I._cesium.TimeInterval({start:f.time.start?I._cesium.JulianDate.fromDate(new Date(f.time.start)):I._cesium.Iso8601.MINIMUM_VALUE,stop:f.time.end?I._cesium.JulianDate.fromDate(new Date(f.time.end)):I._cesium.Iso8601.MAXIMUM_VALUE})]));var de=I._viewer.scene.primitives.add(T,j);de.show=v.show,I.item=T,C||I.setVisibility(!1),typeof y=="function"&&y(I.item)}),this._core.isnull(v.id)&&(v.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+v.id);var w={id:v.id,name:o,checked:C,pId:this._core.isnull(m)?0:m,type:"polylineLayer",item:this,url:A,style:v};return this.setTreeobj(w),this._tree.insertGroupId(w,this._core.isnull(m)?0:m),this};vy.prototype.createGroundPolylineGeoJsonFeatureLayer=function(o,A,f,m,C,y){var x={positions:[],arcType:this._cesium.ArcType.GEODESIC,clampToGround:!1,width:1,show:!0,material:this._cesium.Color.WHITE,height:30};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a))));var v=this._core.extend(x,f,!0);A==null&&console.log("geojson is required");var E=null;A.then?E=A:E=this._cesium.GeoJsonDataSource.load(A);var I=this;E.then(function(Q){for(var M=Q.entities.values,B=[],T=new I._cesium.PrimitiveCollection,D=0;D<M.length;D++){var F=M[D],L=null;if(v.clampToGround){v.positions=F.polyline.positions._value;var R={positions:F.polyline.positions._value,width:v.width},R=new I._cesium.GroundPolylineGeometry(R);L=new I._cesium.GeometryInstance({id:F,geometry:R,attributes:{color:new I._cesium.ColorGeometryInstanceAttribute.fromColor(v.material)}})}else{for(var k=[],D=0;D<F.polyline.positions._value.length;D++){var U=I._viewer.scene.globe.ellipsoid,V=I._cesium.Cartographic.fromCartesian(F.polyline.positions._value[D]),H=I._cesium.Math.toDegrees(V.longitude),q=I._cesium.Math.toDegrees(V.latitude),ie=V.height+v.height,Z=new I._cesium.Cartesian3.fromDegrees(H,q,ie);k.push(Z)}v.positions=k;var oe=new I._cesium.PolylineGeometry(v),ne=I._cesium.PolylineGeometry.createGeometry(oe);L=new I._cesium.GeometryInstance({id:F,geometry:ne,attributes:{color:new I._cesium.ColorGeometryInstanceAttribute.fromColor(v.material)}})}F.positions=v.positions;var se="material:"+v.material.red*255+","+v.material.green*255+","+v.material.blue*255;I.Legend.push(se);var ce=null;v.clampToGround?ce=new I._cesium.GroundPolylinePrimitive({geometryInstances:L,appearance:new I._cesium.MaterialAppearance({material:new I._cesium.Material({fabric:{type:"Color",uniforms:{color:v.material}}}),faceForward:!0,flat:!1})}):ce=new I._cesium.Primitive({geometryInstances:L,appearance:new I._cesium.PolylineMaterialAppearance({material:new I._cesium.Material({fabric:{type:"Color",uniforms:{color:v.material}}})}),shadows:I._cesium.ShadowMode.ENABLED}),T.add(ce)}var j;f&&f.time&&(j=new I._cesium.TimeIntervalCollection([new I._cesium.TimeInterval({start:f.time.start?I._cesium.JulianDate.fromDate(new Date(f.time.start)):I._cesium.Iso8601.MINIMUM_VALUE,stop:f.time.end?I._cesium.JulianDate.fromDate(new Date(f.time.end)):I._cesium.Iso8601.MAXIMUM_VALUE})]));var de=I._viewer.scene.primitives.add(T,j);de.show=v.show,I.item=T,C||I.setVisibility(!1),typeof y=="function"&&y(I.item)}),this._core.isnull(v.id)&&(v.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+v.id);var w={id:v.id,name:o,checked:C,pId:this._core.isnull(m)?0:m,type:"polylineLayer",item:this,url:A,style:v};return this.setTreeobj(w),this._tree.insertGroupId(w,this._core.isnull(m)?0:m),this};vy.prototype.createPolylineVectorGeoJsonFeatureLayerProvider1=function(o,A,f,m,C,y){var x={positions:[],arcType:this._cesium.ArcType.GEODESIC,clampToGround:!1,width:1,show:!0,material:this._cesium.Color.WHITE,height:30},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a))));var E=this._core.extend(x,f,!0),I=this,w=new IA(this._viewer,this._cesium,v);this._Provider=w,w._loadTile=function(M){var B=[];I.Legend=[];var T=new I._cesium.PrimitiveCollection;return M.features.forEach(function(D){var F=[],L=!1;if(/^\[/.test(f.material)&&/\]$/.test(f.material)){var R=f.material.replace(/\[/,"").replace(/\]/,"");E.material=D.properties[R],I._core.isHtmlColor(E.material)?E.material=I._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=I._color.rgbaStringToRgbaObj(E.material)),E.material.r>1&&(E.material.r=E.material.r/255),E.material.g>1&&(E.material.g=E.material.g/255),E.material.b>1&&(E.material.b=E.material.b/255),E.material.a>1&&(E.material.a=E.material.a/255),E.material=I._color.createColor(E.material.r,E.material.g,E.material.b,E.material.a))}function k(H){for(var q=0;q<H.length;q++)Array.isArray(H[q])?k(H[q]):(F.push(H[q]),q===2&&!L&&(L=!0))}if(Array.isArray(D.geometry.coordinates)&&D.geometry.coordinates.length>0)if(Array.isArray(D.geometry.coordinates[0][0]))for(var U=0;U<D.geometry.coordinates.length;U++)F=[],k(D.geometry.coordinates[U]),V(F);else k(D.geometry.coordinates),V(F);function V(H){var q=L?I._cesium.Cartesian3.fromDegreesArrayHeights(H):I._cesium.Cartesian3.fromDegreesArray(H);E.positions=q;var ie={positions:E.positions,width:E.width};D.positions=q,D.treeID=E.id,D.VectorType="polyline",D.VectorStyle={haveZ:L,width:E.width,positions:H,material:E.material,clampToGround:E.clampToGround};var Z=null;if(E.clampToGround){var ie=new I._cesium.GroundPolylineGeometry(ie);Z=new I._cesium.GeometryInstance({id:D,geometry:ie,attributes:{color:new I._cesium.ColorGeometryInstanceAttribute.fromColor(E.material)}})}else{var oe=H,ne=H.length/2+1+H.length;if(/^\[/.test(f.height)&&/\]$/.test(f.height)){var se=f.height.replace(/\[/,"").replace(/\]/,"");E.height=D.properties[se]}for(var ce=2;ce<ne;ce=ce+3)oe.splice(ce,0,parseFloat(E.height));var j=I._cesium.Cartesian3.fromDegreesArrayHeights(oe);E.positions=j,D.positions=j;var de=new I._cesium.PolylineGeometry(E);Z=new I._cesium.GeometryInstance({id:D,geometry:de,attributes:{color:new I._cesium.ColorGeometryInstanceAttribute.fromColor(E.material)}})}var me="material:"+E.material.red*255+","+E.material.green*255+","+E.material.blue*255;I.Legend.push(me);var _e=null;E.clampToGround?_e=new I._cesium.GroundPolylinePrimitive({geometryInstances:Z,appearance:new I._cesium.MaterialAppearance({material:new I._cesium.Material({fabric:{type:"Color",uniforms:{color:E.material}}}),faceForward:!0,flat:!1})}):_e=new I._cesium.Primitive({geometryInstances:Z,appearance:new I._cesium.PolylineMaterialAppearance({material:new I._cesium.Material({fabric:{type:"Color",uniforms:{color:E.material}}})}),shadows:I._cesium.ShadowMode.ENABLED}),T.add(_e)}}),T},f&&f.time&&(w.availability=new I._cesium.TimeIntervalCollection([new I._cesium.TimeInterval({start:f.time.start?I._cesium.JulianDate.fromDate(new Date(f.time.start)):I._cesium.Iso8601.MINIMUM_VALUE,stop:f.time.end?I._cesium.JulianDate.fromDate(new Date(f.time.end)):I._cesium.Iso8601.MAXIMUM_VALUE})])),this.item=w._primitiveCollection,w.addTo(this._viewer),C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var Q={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polylineLayer",item:this,url:A.url,style:f};return this._Provider.treeID=E.id,this.setTreeobj(Q),this._tree.insertGroupId(Q,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};vy.prototype.createPolylineVectorGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y){var x={positions:[],arcType:this._cesium.ArcType.GEODESIC,clampToGround:!1,width:1,outlineWidth:1,show:!0,material:this._cesium.Color.WHITE,outlineColor:this._cesium.Color.WHITE,gapColor:this._cesium.Color.TRANSPARENT,height:30},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:this._core.defaultValue(A.srs,"EPSG:4326")+":{z}",TILEMATRIXSET:this._core.defaultValue(A.srs,"EPSG:4326"),FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:f.level_min,lowerLevelLimit:f.level_max,Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(f.material=pu.Color.fromCssColorString(f.material))),!this._core.isnull(f)&&!this._core.isnull(f.outlineColor)&&(f.outlineColor=pu.Color.fromCssColorString(f.outlineColor)),!this._core.isnull(f)&&!this._core.isnull(f.gapColor)&&(f.gapColor=pu.Color.fromCssColorString(f.gapColor));var E=this._core.extend({...x},f,!0),I=this;let w=A.url.indexOf("/gisserver/")>-1;var Q;w?Q=A.url+`/${window.encodeURIComponent("{z}")}/${window.encodeURIComponent("{x}")}/${window.encodeURIComponent("{y}")}.json`:Q=A.url+"?"+this._core._serialize(v.urlParams),this._urlTemplate=Q,this._Provider=new Ts(this._viewer,this._cesium,w?new pu.WebMercatorTilingScheme:void 0),this._Provider._normalTile=f.level_max-1,this.initThisProvider=()=>{this.initThisProvider=void 0,this._Provider.loadTile=function(L,R){(function(k,U,V){if(U.state===pu.QuadtreeTileLoadState.START){if(U.data={lines:[],geometryPrimitive:void 0},U.level>=f.level_min&&U.level<f.level_max&&V.item.show){if(w&&(U.reverseY=V._Provider.tilingScheme.getNumberOfYTilesAtLevel(U.level)-U.y-1),V.TileMatrixLimits){let q=V.TileMatrixLimits[U.level];if(!q||q&&(U.x>q.maxCol||U.x<q.minCol||U.y>q.maxRow||U.y<q.minRow)){U.state=pu.QuadtreeTileLoadState.DONE,U.renderable=!0;return}}var H=Q.replace(window.encodeURIComponent("{x}"),U.x).replace(window.encodeURIComponent("{y}"),U.reverseY||U.y).replace(window.encodeURIComponent("{z}"),U.level);V._cache&&(H+="&"+V._core.getuid()),V._core.xhr({url:H,type:"get",dataType:"json",success:function(q){var ie=[],Z=[],oe=!1;for(var ne of q.features){let Be=function(Ie){for(var ve=0;ve<Ie.length;ve++)Array.isArray(Ie[ve])?Be(Ie[ve]):(ve===2&&(Ie[ve]=E.height||Ie[ve],oe=!0),Z.push(Ie[ve]),ve===1&&Ie.length===2&&Z.push(E.height||0))},Qe=function(Ie){var ve=V._cesium.Cartesian3.fromDegreesArrayHeights(Ie);E.positions=ve;var K={positions:E.positions,width:E.width};ne.positions=ve,f.preLoad&&f.preLoad(E,ne),ne.treeID=E.id,ne.VectorType="polyline",ne.VectorStyle={haveZ:oe,width:E.width,positions:Ie,material:E.material,clampToGround:E.clampToGround};var W=null;if(E.clampToGround){var K=new V._cesium.GroundPolylineGeometry(K);W=new V._cesium.GeometryInstance({id:ne,geometry:K,attributes:{color:new V._cesium.ColorGeometryInstanceAttribute.fromColor(E.material),distanceDisplayCondition:new pu.DistanceDisplayConditionGeometryInstanceAttribute(E.near,E.far)}})}else{var te=new V._cesium.PolylineGeometry(E);W=new V._cesium.GeometryInstance({id:ne,geometry:te,attributes:{color:new V._cesium.ColorGeometryInstanceAttribute.fromColor(E.material),distanceDisplayCondition:new pu.DistanceDisplayConditionGeometryInstanceAttribute(E.near,E.far)}})}var Y="material:"+E.material.red*255+","+E.material.green*255+","+E.material.blue*255;V.Legend.push(Y),ie.push(W)};var Z=[];if(/^\[/.test(f.material)&&/\]$/.test(f.material)){var se=f.material.replace(/\[/,"").replace(/\]/,"");E.material=ne.properties[se],E.material=pu.Color.fromCssColorString(E.material)}if(/^\[/.test(f.height)&&/\]$/.test(f.height)){var ce=f.height.replace(/\[/,"").replace(/\]/,"");E.height=ne.properties[ce]}if(Array.isArray(ne.geometry.coordinates)&&ne.geometry.coordinates.length>0)if(Array.isArray(ne.geometry.coordinates[0][0]))for(var j=0;j<ne.geometry.coordinates.length;j++)Z=[],Be(ne.geometry.coordinates[j]),Qe(Z);else Be(ne.geometry.coordinates),Qe(Z)}var de=null;let me;E.dash?me=new pu.PolylineMaterialAppearance({material:pu.Material.fromType(pu.Material.PolylineDashType,{color:E.material,gapColor:E.gapColor||pu.Color.TRANSPARENT,dashLength:E.dashLength||20})}):me=new pu.PolylineMaterialAppearance({material:new pu.Material({fabric:{type:"PolylineOutline",uniforms:{color:E.material,outlineColor:E.outlineColor,outlineWidth:E.outlineWidth}}}),faceForward:!0,flat:!1}),E.clampToGround?de=new V._cesium.GroundPolylinePrimitive({geometryInstances:ie,appearance:me,classificationType:E.classificationType}):de=new V._cesium.Primitive({geometryInstances:ie,appearance:me,shadows:V._cesium.ShadowMode.ENABLED}),U.data.geometryPrimitive=de,U.state=pu.QuadtreeTileLoadState.LOADING,U.state===pu.QuadtreeTileLoadState.LOADING&&(U.data.geometryPrimitive.update(k,[]),U.state=pu.QuadtreeTileLoadState.DONE,U.renderable=!0)},error:function(){U.count==null&&(U.count=0),U.count+=1,U.count>=2?(U.state=pu.QuadtreeTileLoadState.DONE,U.renderable=!0):U.state=pu.QuadtreeTileLoadState.START}})}else{U.state=pu.QuadtreeTileLoadState.DONE,U.renderable=!0;return}U.state=pu.QuadtreeTileLoadState.LOADING}})(L,R,I)},typeof y=="function"&&y(this.item)};let M,B;this.saveDefaultVectorData=()=>{B=I._core.extend({},f,!0)},this.restoreVector=()=>{B&&(f=B,E=I._core.extend({...x},f,!0),I._Provider._normalTile=f.level_max-1,I._primitive&&I._primitive._tilesToRender&&I._primitive._tilesToRender.length&&(I._primitive._tilesToRender.forEach(L=>{L.data.geomeitryPrimitive&&L.data.geomeitryPrimitive.destroy(),L.state=pu.QuadtreeTileLoadState.START}),I._primitive._tileToUpdateHeights.forEach(L=>{L.data.geomeitryPrimitive&&L.data.geomeitryPrimitive.destroy(),L.state=pu.QuadtreeTileLoadState.START}),I._primitive._tileToUpdateHeights=[],I._primitive._tilesToRender=[])),B=void 0},this.updataVector=(L={})=>{(L.material||L.outlineColor||L.gapColor)&&(L.material&&(L.material=pu.Color.fromCssColorString(L.material)),L.outlineColor&&(L.outlineColor=pu.Color.fromCssColorString(L.outlineColor)),L.gapColor&&(L.gapColor=pu.Color.fromCssColorString(L.gapColor))),(L.minimumLevel!==void 0||L.maximumLevel!==void 0)&&(L.minimumLevel!==void 0&&(L.level_min=L.minimumLevel),L.maximumLevel!==void 0&&(L.level_max=L.maximumLevel)),f=I._core.extend(f,L,!0),E=I._core.extend(E,f,!0),I._Provider._normalTile=f.level_max-1,I._primitive&&I._primitive._tilesToRender&&I._primitive._tilesToRender.length&&(clearTimeout(M),M=setTimeout(()=>{I._primitive._tilesToRender.forEach(R=>{R.data.geomeitryPrimitive&&R.data.geomeitryPrimitive.destroy(),R.state=pu.QuadtreeTileLoadState.START}),I._primitive._tileToUpdateHeights.forEach(R=>{R.data.geomeitryPrimitive&&R.data.geomeitryPrimitive.destroy(),R.state=pu.QuadtreeTileLoadState.START}),I._primitive._tileToUpdateHeights=[],I._primitive._tilesToRender=[]},100))},this._forceRefreshProvider=this._Provider,this._primitive=new I._cesium.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:5});var T=this._viewer.scene,D=T.primitives;D.add(this._primitive),this._core.getWMTSData({url:A.url,layer:A.layer,srs:A.srs||"EPSG:4326",gisserverTMS:w},L=>{I.item.boundingSphere=L.boundingSphere,I.TileMatrixLimits=L.TileMatrixLimits,I.initThisProvider()}),f&&f.time&&(geoJSONVectorTileProvider.availability=new I._cesium.TimeIntervalCollection([new I._cesium.TimeInterval({start:f.time.start?I._cesium.JulianDate.fromDate(new Date(f.time.start)):I._cesium.Iso8601.MINIMUM_VALUE,stop:f.time.end?I._cesium.JulianDate.fromDate(new Date(f.time.end)):I._cesium.Iso8601.MAXIMUM_VALUE})])),C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var F={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polylineLayer",item:this,url:A.url,style:f};return this._Provider.treeID=E.id,this.setTreeobj(F),this._tree.insertGroupId(F,this._core.isnull(m)?0:m),this};vy.prototype.createPolylineVectorGeoJsonFeatureLayerProviderModel_obsolete=function(o,A,f,m,C,y){var x={positions:[],arcType:this._cesium.ArcType.GEODESIC,clampToGround:!1,width:1,show:!0,material:this._cesium.Color.WHITE,height:30},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a))));var E=this._core.extend(x,f,!0),I=this,w=new IA(this._viewer,this._cesium,v);this._Provider=w,w._loadTile=function(M,B){var T=[],D=new I._cesium.PrimitiveCollection,F=[];if(M.features.forEach(function(L){var R=[];if(/^\[/.test(f.material)&&/\]$/.test(f.material)){var k=f.material.replace(/\[/,"").replace(/\]/,"");E.material=L.properties[k],I._core.isHtmlColor(E.material)?E.material=I._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=I._color.rgbaStringToRgbaObj(E.material)),E.material.r>1&&(E.material.r=E.material.r/255),E.material.g>1&&(E.material.g=E.material.g/255),E.material.b>1&&(E.material.b=E.material.b/255),E.material.a>1&&(E.material.a=E.material.a/255),E.material=I._color.createColor(E.material.r,E.material.g,E.material.b,E.material.a))}function U(ie){for(var Z=0;Z<ie.length;Z++)Array.isArray(ie[Z])?U(ie[Z]):R.push(ie[Z])}if(Array.isArray(L.geometry.coordinates)&&L.geometry.coordinates.length>0)if(Array.isArray(L.geometry.coordinates[0][0]))for(var V=0;V<L.geometry.coordinates.length;V++)R=[],U(L.geometry.coordinates[V]),H(R),q(R);else U(L.geometry.coordinates),H(R),q(R);function H(ie){var Z=I._cesium.Cartesian3.fromDegreesArray(ie);E.positions=Z,L.positions=Z;var oe={positions:E.positions,width:E.width},ne=null;if(E.clampToGround){var oe=new I._cesium.GroundPolylineGeometry(oe);ne=new I._cesium.GeometryInstance({id:L,geometry:oe,attributes:{color:new I._cesium.ColorGeometryInstanceAttribute.fromColor(E.material)}})}else{for(var se=ie,ce=ie.length/2+1+ie.length,j=2;j<ce;j=j+3)se.splice(j,0,parseFloat(E.height));var de=I._cesium.Cartesian3.fromDegreesArrayHeights(se);E.positions=de;var me=new I._cesium.PolylineGeometry(E),_e=I._cesium.PolylineGeometry.createGeometry(me);ne=new I._cesium.GeometryInstance({id:L,geometry:_e,attributes:{color:new I._cesium.ColorGeometryInstanceAttribute.fromColor(E.material)}})}var Be=null;E.clampToGround?Be=new I._cesium.GroundPolylinePrimitive({geometryInstances:ne,appearance:new I._cesium.MaterialAppearance({material:new I._cesium.Material({fabric:{type:"Color",uniforms:{color:E.material}}}),faceForward:!0,flat:!1})}):Be=new I._cesium.Primitive({geometryInstances:ne,appearance:new I._cesium.PolylineMaterialAppearance({material:new I._cesium.Material({fabric:{type:"Color",uniforms:{color:E.material}}})}),shadows:I._cesium.ShadowMode.ENABLED}),D.add(Be)}function q(ie){var Z;E.clampToGround?Z=I._cesium.Cartesian3.fromDegreesArray(ie):Z=I._cesium.Cartesian3.fromDegreesArrayHeights(ie);for(var oe=1;oe<Z.length;oe++){var ne=[];ne.push(Z[oe-1]),ne.push(Z[oe]);var se=I._cesium.SceneTransforms.wgs84ToWindowCoordinates(I._viewer.scene,Z[oe-1]).x,ce=I._cesium.SceneTransforms.wgs84ToWindowCoordinates(I._viewer.scene,Z[oe-1]).y,j=I._cesium.SceneTransforms.wgs84ToWindowCoordinates(I._viewer.scene,Z[oe]).x,de=I._cesium.SceneTransforms.wgs84ToWindowCoordinates(I._viewer.scene,Z[oe]).y;I.setPolylinemodels(ne,se,ce,j,de,E,function(me){F.push(me)})}}}),F.length){let L;pu.ModelInstanceCollection?L=new I._cesium.ModelInstanceCollection({url:E.url,instances:F,color:E.color,lightColor:E.lightColor,scale:parseInt(E.scale),heightReference:parseInt(E.heightReference),distanceDisplayCondition:E.distanceDisplayCondition}):(L=new pu.PrimitiveCollection,F.forEach(R=>{L.add({id:R.modelId,url:E.url,modelMatrix:R.modelMatrix,color:E.color,lightColor:E.lightColor,scale:parseInt(E.scale),heightReference:parseInt(E.heightReference),distanceDisplayCondition:E.distanceDisplayCondition})})),D.add(L)}return D},f&&f.time&&(w.availability=new I._cesium.TimeIntervalCollection([new I._cesium.TimeInterval({start:f.time.start?I._cesium.JulianDate.fromDate(new Date(f.time.start)):I._cesium.Iso8601.MINIMUM_VALUE,stop:f.time.end?I._cesium.JulianDate.fromDate(new Date(f.time.end)):I._cesium.Iso8601.MAXIMUM_VALUE})])),this.item=w._primitiveCollection,w.addTo(this._viewer),C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var Q={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polylineLayer",item:this,url:A.url,style:f};return this.setTreeobj(Q),this._tree.insertGroupId(Q,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};vy.prototype.createPolylineVectorGeoJsonFeatureLayerProviderModel=function(o,A,f,m,C,y){var x={positions:[],arcType:this._cesium.ArcType.GEODESIC,clampToGround:!1,width:1,show:!0,material:this._cesium.Color.WHITE,height:30},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};this.item.show=C,!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a))));var E=this._core.extend(x,f,!0),I=this;this._urlTemplate=A.url+"?"+this._core._serialize(v.urlParams);var w=A.url+"?"+this._core._serialize(v.urlParams);this._Provider=new Ts(this._viewer,this._cesium),this._Provider._normalTile=f.level_max-1,this._Provider.loadTile=function(T,D){(function(F,L,R){if(L.state===pu.QuadtreeTileLoadState.START){if(L.data={lines:[],geometryPrimitive:void 0},L.level>=f.level_min&&L.level<f.level_max&&R.item.show){var k=w.replace(window.encodeURIComponent("{x}"),L.x).replace(window.encodeURIComponent("{y}"),L.y).replace(window.encodeURIComponent("{z}"),L.level);R._cache&&(k+="&"+R._core.getuid()),R._core.xhr({url:k,type:"get",dataType:"json",success:function(U){var V=[],H=new R._cesium.PrimitiveCollection,q=U.features,ie=[];if(/^\[/.test(f.material)&&/\]$/.test(f.material)){var Z=f.material.replace(/\[/,"").replace(/\]/,"");E.material=j.properties[Z],R._core.isHtmlColor(E.material)?E.material=R._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=R._color.rgbaStringToRgbaObj(E.material)),E.material.r>1&&(E.material.r=E.material.r/255),E.material.g>1&&(E.material.g=E.material.g/255),E.material.b>1&&(E.material.b=E.material.b/255),E.material.a>1&&(E.material.a=E.material.a/255),E.material=R._color.createColor(E.material.r,E.material.g,E.material.b,E.material.a))}function oe(me){for(var _e=0;_e<me.length;_e++)Array.isArray(me[_e])?oe(me[_e]):ie.push(me[_e])}function ne(me){var _e=R._cesium.Cartesian3.fromDegreesArray(me);E.positions=_e,j.positions=_e;var Be={positions:E.positions,width:E.width},Qe=null;if(E.clampToGround){var Be=new R._cesium.GroundPolylineGeometry(Be);Qe=new R._cesium.GeometryInstance({id:j,geometry:Be,attributes:{color:new R._cesium.ColorGeometryInstanceAttribute.fromColor(E.material)}})}else{for(var Ie=me,ve=me.length/2+1+me.length,K=2;K<ve;K=K+3)Ie.splice(K,0,parseFloat(E.height));var W=R._cesium.Cartesian3.fromDegreesArrayHeights(Ie);E.positions=W;var te=new R._cesium.PolylineGeometry(E),Y=R._cesium.PolylineGeometry.createGeometry(te);Qe=new R._cesium.GeometryInstance({id:j,geometry:Y,attributes:{color:new R._cesium.ColorGeometryInstanceAttribute.fromColor(E.material)}})}var he=null;E.clampToGround?he=new R._cesium.GroundPolylinePrimitive({geometryInstances:Qe,appearance:new R._cesium.MaterialAppearance({material:new R._cesium.Material({fabric:{type:"Color",uniforms:{color:E.material}}}),faceForward:!0,flat:!1})}):he=new R._cesium.Primitive({geometryInstances:Qe,appearance:new R._cesium.PolylineMaterialAppearance({material:new R._cesium.Material({fabric:{type:"Color",uniforms:{color:E.material}}})}),shadows:R._cesium.ShadowMode.ENABLED}),H.add(he)}function se(me){var _e;E.clampToGround?_e=R._cesium.Cartesian3.fromDegreesArray(me):_e=R._cesium.Cartesian3.fromDegreesArrayHeights(me);for(var Be=1;Be<_e.length;Be++)try{var Qe=[];Qe.push(_e[Be-1]),Qe.push(_e[Be]);var Ie=R._cesium.SceneTransforms.wgs84ToWindowCoordinates(R._viewer.scene,_e[Be-1]).x,ve=R._cesium.SceneTransforms.wgs84ToWindowCoordinates(R._viewer.scene,_e[Be-1]).y,K=R._cesium.SceneTransforms.wgs84ToWindowCoordinates(R._viewer.scene,_e[Be]).x,W=R._cesium.SceneTransforms.wgs84ToWindowCoordinates(R._viewer.scene,_e[Be]).y;R.setPolylinemodels(Qe,Ie,ve,K,W,E,function(te){V.push(te)})}catch{}}for(var ce=0;ce<q.length;ce++){var j=q[ce];if(Array.isArray(j.geometry.coordinates)&&j.geometry.coordinates.length>0)if(Array.isArray(j.geometry.coordinates[0][0]))for(var de=0;de<j.geometry.coordinates.length;de++)ie=[],oe(j.geometry.coordinates[de]),ne(ie),se(ie);else oe(j.geometry.coordinates),ne(ie),se(ie)}if(V.length){let me;pu.ModelInstanceCollection?me=new R._cesium.ModelInstanceCollection({url:E.url,instances:V,color:E.color,lightColor:E.lightColor,scale:parseInt(E.scale),heightReference:parseInt(E.heightReference),distanceDisplayCondition:E.distanceDisplayCondition}):(me=new pu.PrimitiveCollection,V.forEach(_e=>{me.add({id:_e.modelId,url:E.url,modelMatrix:_e.modelMatrix,color:E.color,lightColor:E.lightColor,scale:parseInt(E.scale),heightReference:parseInt(E.heightReference),distanceDisplayCondition:E.distanceDisplayCondition})})),H.add(me)}L.data.geometryPrimitive=H},error:function(){L.count==null&&(L.count=0),L.count+=1,L.count>=2?(L.state=pu.QuadtreeTileLoadState.DONE,L.renderable=!0):L.state=pu.QuadtreeTileLoadState.START}})}else{L.state=pu.QuadtreeTileLoadState.DONE,L.renderable=!0;return}L.state=pu.QuadtreeTileLoadState.LOADING}})(T,D,I)},this._primitive=new I._cesium.QuadtreePrimitivezh({tileProvider:this._Provider,tileCacheSize:1,maximumScreenSpaceError:5});var Q=this._viewer.scene,M=Q.primitives;M.add(this._primitive),C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var B={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polylineLayer",item:this,url:A.url,style:f};return this.setTreeobj(B),this._tree.insertGroupId(B,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};vy.prototype.setPolylinemodels=function(o,A,f,m,C,y,x){var v=this._cesium,E=this._core.getSpaceDistancem(o,v),I=10,w=parseFloat(y.distance);w==0||(I=parseInt(E/w));for(var Q=o[0],M=o[o.length-1],B=v.Cartographic.fromCartesian(Q),T=v.Math.toDegrees(B.longitude),D=v.Math.toDegrees(B.latitude),F=v.Cartographic.fromCartesian(M),L=v.Math.toDegrees(F.longitude),R=v.Math.toDegrees(F.latitude),k=I,U=v.Math.lerp(T,L,1/k)-T,V=v.Math.lerp(D,R,1/k)-D,H=0;H<k;H++){var q=T+(H+1)*U,ie=D+(H+1)*V,Z=v.Transforms.eastNorthUpToFixedFrame(v.Cartesian3.fromDegrees(q,ie,parseInt(y.height)));pu.Matrix4.multiplyByUniformScale(Z,parseInt(y.scale),Z),x&&x({modelMatrix:Z,modelId:y})}};vy.prototype.getType=function(){return{label:"\u7EBF",value:"polylineLayer"}};vy.prototype.export=function(){var o=this.item.show==null?void 0:this.item.show,A=this.treeobj.url;return{type:this.treeobj.type,treeobj:{name:this.treeobj.name,pId:this.treeobj.pId},style:{show:o,url:A}}};vy.prototype.deleteObject=function(){if(this._viewer.scene.primitives.remove(this.item),this.model!=null&&this.model!=null&&this.model.length>0)for(var o=0;o<this.model.length;o++)this._viewer.scene.primitives.remove(this.model[o]);try{this._Provider.remove()}catch{}};vy.prototype.setTreeobj=function(o){this.treeobj=o};vy.prototype.getLegend=function(){var o=[];return this.Legend!=null&&(o=this._core.unique(this.Legend)),o};vy.prototype.setRefresh=function(o){try{this._Provider&&this._Provider.setStatus(!o)}catch{}};vy.prototype.setVisibility=function(o){if(this.item!=null&&(this.item.show=o),this._Provider&&this._Provider.setStatus(o),this.model!=null&&this.model!=null&&this.model.length>0)for(var A=0;A<this.model.length;A++)this.model[A].show=o};vy.prototype.edit=function(o,A){return this.editoption=A,this.isEditting=o,this._Provider&&this._Provider.edit&&this._Provider.edit(o,A)};vy.prototype.forceRefresh=function(){try{for(var o=0;o<this._Provider.quadtree._levelZeroTiles.length;o++)this._Provider.quadtree._levelZeroTiles[o].freeResources()}catch{}};var $O=vy;function ih(o,A){this._viewer=o,this._cesium=A,this._core=new pr(o,A),this._color=new Pn(this._viewer,this._cesium),this._tree=lt,this._createGroup=new ZO,this.model=[],this.heading=this._cesium.Math.toRadians(0),this.pitch=this._cesium.Math.toRadians(0),this.roll=this._cesium.Math.toRadians(0),this.rotate=10,this.state=0,this.modelPointArr=[],this.modifyModel=null,this.modifyPoint=null,this.modifyHandler=new this._cesium.ScreenSpaceEventHandler(this._viewer.scene.canvas),this.objId=Number(new Date().getTime()+""+Number(Math.random()*1e3).toFixed(0)),this.position=null,this.tempPoints=[],this.scale=0,this.Radius=20}ih.prototype.exectPointModel=function(o,A,f,m,C,y){var x={positions:[],arcType:this._cesium.ArcType.GEODESIC,clampToGround:!1,width:1,show:!0,material:this._cesium.Color.WHITE,height:30};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a)))),!this._core.isnull(f)&&!this._core.isnull(f.color)&&(f.color.toString().charAt(0)=="["&&f.color.toString().charAt(f.color.length-1)=="]"||(this._core.isHtmlColor(f.color)?f.color=this._color.colorFromHtmlColor(f.color):(/^rgb/.test(f.color)&&(f.color=this._color.rgbaStringToRgbaObj(f.color)),f.color.r>1&&(f.color.r=f.color.r/255),f.color.g>1&&(f.color.g=f.color.g/255),f.color.b>1&&(f.color.b=f.color.b/255),f.color.a>1&&(f.color.a=f.color.a/255),f.color=this._color.createColor(f.color.r,f.color.g,f.color.b,f.color.a)))),!this._core.isnull(f)&&!this._core.isnull(f.lightColor)&&(f.lightColor.toString().charAt(0)=="["&&f.lightColor.toString().charAt(f.lightColor.length-1)=="]"||(this._core.isHtmlColor(f.lightColor)?f.lightColor=this._color.colorFromHtmlColor(f.lightColor):(/^rgb/.test(f.lightColor)&&(f.lightColor=this._color.rgbaStringToRgbaObj(f.lightColor)),f.lightColor.r>1&&(f.lightColor.r=f.lightColor.r/255),f.lightColor.g>1&&(f.lightColor.g=f.lightColor.g/255),f.lightColor.b>1&&(f.lightColor.b=f.lightColor.b/255),f.lightColor.a>1&&(f.lightColor.a=f.lightColor.a/255),f.lightColor=this._color.createColor(f.lightColor.r,f.lightColor.g,f.lightColor.b,f.lightColor.a)))),!this._core.isnull(f)&&!this._core.isnull(f.linecolor)&&(f.linecolor.toString().charAt(0)=="["&&f.linecolor.toString().charAt(f.linecolor.length-1)=="]"||(this._core.isHtmlColor(f.linecolor)?f.linecolor=this._color.colorFromHtmlColor(f.linecolor):(/^rgb/.test(f.linecolor)&&(f.linecolor=this._color.rgbaStringToRgbaObj(f.linecolor)),f.linecolor.r>1&&(f.linecolor.r=f.linecolor.r/255),f.linecolor.g>1&&(f.linecolor.g=f.linecolor.g/255),f.linecolor.b>1&&(f.linecolor.b=f.linecolor.b/255),f.linecolor.a>1&&(f.linecolor.a=f.linecolor.a/255),f.linecolor=this._color.createColor(f.linecolor.r,f.linecolor.g,f.linecolor.b,f.linecolor.a))));var v=this._core.extend(x,f,!0);this._core.isnull(f.near)&&(f.near=0),this._core.isnull(f.far)&&(f.far=999999999);var E=parseFloat(f.near),I=parseFloat(f.far),w=new this._cesium.DistanceDisplayCondition(E,I);v.distanceDisplayCondition=w,A==null&&console.log("geojson is required");var Q=null;A.then?Q=A:Q=this._cesium.GeoJsonDataSource.load(A);var M=this;Q.then(function(T){for(var D=T.entities.values,F=[],D=T.entities.values,F=[],L=0;L<D.length;L++){var R=D[L],k=new M._cesium.GeometryInstance({id:R,geometry:new M._cesium.CorridorGeometry({positions:R.polyline.positions._value,width:v.width,height:v.height,arcType:v.arcType,vertexFormat:M._cesium.VertexFormat.POSITION_ONLY}),attributes:{color:new M._cesium.ColorGeometryInstanceAttribute.fromColor(v.linecolor)}});F.push(k)}var U;f&&f.time&&(U=new M._cesium.TimeIntervalCollection([new M._cesium.TimeInterval({start:f.time.start?M._cesium.JulianDate.fromDate(new Date(f.time.start)):M._cesium.Iso8601.MINIMUM_VALUE,stop:f.time.end?M._cesium.JulianDate.fromDate(new Date(f.time.end)):M._cesium.Iso8601.MAXIMUM_VALUE})]));var V=M._viewer.scene.primitives.add(new M._cesium.GroundPrimitive({geometryInstances:F,classificationType:M._cesium.ClassificationType.BOTH}),U);V.show=v.show,M.item=V;for(var H=[],L=0;L<D.length;L++)for(var R=D[L],q=v,ie=R.polyline.positions.getValue(),Z=1;Z<ie.length;Z++)try{var oe=[];oe.push(ie[Z-1]),oe.push(ie[Z]);var ne=M._cesium.SceneTransforms.wgs84ToWindowCoordinates(M._viewer.scene,ie[Z-1]).x,se=M._cesium.SceneTransforms.wgs84ToWindowCoordinates(M._viewer.scene,ie[Z-1]).y,ce=M._cesium.SceneTransforms.wgs84ToWindowCoordinates(M._viewer.scene,ie[Z]).x,j=M._cesium.SceneTransforms.wgs84ToWindowCoordinates(M._viewer.scene,ie[Z]).y;H=M.setPolylinemodels(oe,ne,se,ce,j,H,v,M._cesium,M._viewer,U)}catch{}let de;Cesium.ModelInstanceCollection?de=new M._cesium.ModelInstanceCollection({url:v.url,instances:H,color:v.color,lightColor:v.lightColor,scale:parseInt(v.scale),heightReference:parseInt(v.heightReference),distanceDisplayCondition:v.distanceDisplayCondition}):(de=new Cesium.PrimitiveCollection,H.forEach(me=>{de.add({id:me.modelId,url:v.url,modelMatrix:me.modelMatrix,color:v.color,lightColor:v.lightColor,scale:parseInt(v.scale),heightReference:parseInt(v.heightReference),distanceDisplayCondition:v.distanceDisplayCondition})})),M._viewer.scene.primitives.add(de),M.model.push(de),C||M.setVisibility(!1),typeof y=="function"&&y(V)}),this._core.isnull(v.id)&&(v.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+v.id);var B={id:v.id,name:o,checked:C,pId:this._core.isnull(m)?0:m,type:"polylineLayer",item:this};return this.setTreeobj(B),this._tree.insertGroupId(B,this._core.isnull(m)?0:m),this};ih.prototype.createPointModel=function(o,A){var f=this,m=new this._cesium.ScreenSpaceEventHandler(this._viewer.scene.canvas),C=[],y=null,x=0,v=null,E=[],I,w=o.parameterd,Q=o.objid,M=o.cyjj,B=o.url;this.modelurl=B;var T=[],D={point:f._cesium.Color.RED,polyline:f._cesium.Color.YELLOW};Object.keys(o).length>0&&(o.point!=""&&o.point!=null&&(D.point=o.point),o.polyline!=""&&o.polyline!=null&&(D.polyline=o.polyline));var F=this._core.CreateTooltip(),L="",R={spot:[],distance:[],label:[],polyline:[],model:[]};m.setInputAction(function(U){C.length===0?F.showAt(U.endPosition,"\u5DE6\u952E\u5F00\u59CB,\u53F3\u952E\u7ED3\u675F\uFF01"):F.showAt(U.endPosition,"\u53F3\u952E\u7ED3\u675F\uFF01");var V=f._viewer.camera.getPickRay(U.endPosition);v=f._viewer.scene.globe.pick(V,f._viewer.scene),C.length>=2&&(f._cesium.defined(y)?(C.pop(),C.push(v)):y=new k(C),x=f._core.getHorizontalDistance(C,f._cesium))},this._cesium.ScreenSpaceEventType.MOUSE_MOVE),m.setInputAction(function(U){var V=f._viewer.camera.getPickRay(U.position);v=f._viewer.scene.globe.pick(V,f._viewer.scene),C.length==0&&C.push(v.clone());var H={px:U.position.x,py:U.position.y};C.push(v);var q={positionsxp:v,lxy:H};T.push(q);var ie=x;L="\u603B\u957F\uFF1A"+x,R.spot.push(v),R.distance.push(x)},this._cesium.ScreenSpaceEventType.LEFT_CLICK),m.setInputAction(function(U){m.destroy(),C.pop();for(var V=0;V<E.length;V++)f._viewer.entities.remove(E[V]);for(var H=[],q=1;q<T.length;q++){var ie=[],Z=T[q-1].lxy.px,oe=T[q-1].lxy.py,ne=T[q].lxy.px,se=T[q].lxy.py,ce=w;ie.push(T[q-1].positionsxp),ie.push(T[q].positionsxp),H=f.setPolylinemodel(ie,Z,oe,ne,se,ce,M,f.modelurl,H,f._cesium,f._viewer)}R.model=H,A!=""&&A!=null&&typeof A=="function"&&A(R),F.show(!1)},this._cesium.ScreenSpaceEventType.RIGHT_CLICK);var k=function(){function U(V){this.options={name:"\u76F4\u7EBF",polyline:{show:!0,positions:[],material:D.polyline,width:3,clampToGround:!0}},this.positions=V,this._init()}return U.prototype._init=function(){var V=this,H=function(){return V.positions};this.options.polyline.positions=new f._cesium.CallbackProperty(H,!1);var q=f._viewer.entities.add(this.options);f.item=q,E.push(q),R.polyline.push(q)},U}();return this};ih.prototype.setPolylinemodel=function(o,A,f,m,C,y,x,v,E,I,w){var Q=this._core.getSpaceDistancem(o,I);x==0||(y=parseInt(Q/x));for(var M=o[0],B=o[o.length-1],T=I.Cartographic.fromCartesian(M),D=I.Math.toDegrees(T.longitude),F=I.Math.toDegrees(T.latitude),L=T.height,R=I.Cartographic.fromCartesian(B),k=I.Math.toDegrees(R.longitude),U=I.Math.toDegrees(R.latitude),V=R.height,H=y,q=I.Math.lerp(D,k,1/H)-D,ie=I.Math.lerp(F,U,1/H)-F,Z=I.Math.lerp(A,m,1/H)-A,oe=I.Math.lerp(f,C,1/H)-f,ne=[],se,ce,j=0;j<H;j++){var de=D+(j+1)*q,me=F+(j+1)*ie;j==0?se=new I.Cartesian3(de,me,0):j==1&&(ce=new I.Cartesian3(de,me,0));var Ie=A+(j+1)*Z,ve=f+(j+1)*oe,_e={x:Ie,y:ve},_e={x:Ie,y:ve},Be=w.camera.pickEllipsoid(_e,w.scene.globe.ellipsoid),Qe=I.Cartographic.fromCartesian(Be),Ie=I.Math.toDegrees(Qe.longitude),ve=I.Math.toDegrees(Qe.latitude),K=I.Transforms.eastNorthUpToFixedFrame(I.Cartesian3.fromDegrees(Ie,ve,6)),W=I.Model.fromGltf({url:v,modelMatrix:K,scale:100}),te=w.scene.primitives.add(W);E.push(W)}return E};ih.prototype.setPolylinemodels_obsolete=function(o,A,f,m,C,y,x,v,E,I){var w=this._core.getSpaceDistancem(o,v),Q=10,M=parseFloat(x.distance);M==0||(Q=parseInt(w/M));for(var B=o[0],T=o[o.length-1],D=v.Cartographic.fromCartesian(B),F=v.Math.toDegrees(D.longitude),L=v.Math.toDegrees(D.latitude),R=D.height,k=v.Cartographic.fromCartesian(T),U=v.Math.toDegrees(k.longitude),V=v.Math.toDegrees(k.latitude),H=k.height,q=v.Math.toDegrees(D.height),ie=Q,Z=v.Math.lerp(F,U,1/ie)-F,oe=v.Math.lerp(L,V,1/ie)-L,ne=v.Math.lerp(A,m,1/ie)-A,se=v.Math.lerp(f,C,1/ie)-f,ce=[],j,de,me=0;me<ie;me++){var _e=F+(me+1)*Z,Be=L+(me+1)*oe,Qe=v.Transforms.eastNorthUpToFixedFrame(v.Cartesian3.fromDegrees(_e,Be,x.height)),Ie=parseInt(x.heightReference),ve=v.Model.fromGltf({url:x.url,modelMatrix:Qe,color:x.color,lightColor:x.lightColor,scale:parseInt(x.scale),heightReference:parseInt(x.heightReference),distanceDisplayCondition:x.distanceDisplayCondition}),K=E.scene.primitives.add(ve,I);y.push(ve)}return y};ih.prototype.setPolylinemodels=function(o,A,f,m,C,y,x,v,E,I){var w=this._core.getSpaceDistancem(o,v),Q=10,M=parseFloat(x.distance);M==0||(Q=parseInt(w/M));for(var B=o[0],T=o[o.length-1],D=v.Cartographic.fromCartesian(B),F=v.Math.toDegrees(D.longitude),L=v.Math.toDegrees(D.latitude),R=D.height,k=v.Cartographic.fromCartesian(T),U=v.Math.toDegrees(k.longitude),V=v.Math.toDegrees(k.latitude),H=k.height,q=v.Math.toDegrees(D.height),ie=Q,Z=v.Math.lerp(F,U,1/ie)-F,oe=v.Math.lerp(L,V,1/ie)-L,ne=v.Math.lerp(A,m,1/ie)-A,se=v.Math.lerp(f,C,1/ie)-f,ce=[],j,de,me=0;me<ie;me++){var _e=F+(me+1)*Z,Be=L+(me+1)*oe,Qe=v.Transforms.eastNorthUpToFixedFrame(v.Cartesian3.fromDegrees(_e,Be,parseInt(x.height?x.height:0))),Ie=parseInt(x.heightReference);Cesium.Matrix4.multiplyByUniformScale(Qe,parseInt(x.scale),Qe),y.push({modelMatrix:Qe,modelId:x})}return y};ih.prototype.createPolygonModel=function(o,A,f,m,C,y){var x={height:0,extrudedHeight:0,heightReference:this._cesium.HeightReference.RELATIVE_TO_GROUND,show:!0,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,stRotation:0,granularity:this._cesium.Math.RADIANS_PER_DEGREE,perPositionHeight:!1,closeTop:!0,closeBottom:!0,shadows:this._cesium.ShadowMode.ENABLED,clampToGround:!0,scale:1,classificationType:this._cesium.ClassificationType.BOTH},v=f.modelurl;!this._core.isnull(f)&&!this._core.isnull(f.fill)&&(this._core.isHtmlColor(f.fill)?f.material=this._color.colorFromHtmlColor(f.fill):(/^rgb/.test(f.fill)&&(f.material=this._color.rgbaStringToRgbaObj(f.fill)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a))),!this._core.isnull(f)&&!this._core.isnull(f.outlineColor)&&(this._core.isHtmlColor(f.outlineColor)?f.outlineColor=this._color.colorFromHtmlColor(f.outlineColor):(/^rgb/.test(f.outlineColor)&&(f.outlineColor=this._color.rgbaStringToRgbaObj(f.outlineColor)),f.outlineColor.r>1&&(f.outlineColor.r=f.outlineColor.r/255),f.outlineColor.g>1&&(f.outlineColor.g=f.outlineColor.g/255),f.outlineColor.b>1&&(f.outlineColor.b=f.outlineColor.b/255),f.outlineColor.a>1&&(f.outlineColor.a=f.outlineColor.a/255),f.outlineColor=this._color.createColor(f.outlineColor.r,f.outlineColor.g,f.outlineColor.b,f.outlineColor.a))),!this._core.isnull(f)&&!this._core.isnull(f.color)&&(this._core.isHtmlColor(f.color)?f.color=this._color.colorFromHtmlColor(f.color):(/^rgb/.test(f.color)&&(f.color=this._color.rgbaStringToRgbaObj(f.color)),f.color.r>1&&(f.color.r=f.color.r/255),f.color.g>1&&(f.color.g=f.color.g/255),f.color.b>1&&(f.color.b=f.color.b/255),f.color.a>1&&(f.color.a=f.color.a/255),f.color=this._color.createColor(f.color.r,f.color.g,f.color.b,f.color.a))),!this._core.isnull(f)&&!this._core.isnull(f.lightColor)&&(this._core.isHtmlColor(f.lightColor)?f.lightColor=this._color.colorFromHtmlColor(f.lightColor):(/^rgb/.test(f.lightColor)&&(f.lightColor=this._color.rgbaStringToRgbaObj(f.lightColor)),f.lightColor.r>1&&(f.lightColor.r=f.lightColor.r/255),f.lightColor.g>1&&(f.lightColor.g=f.lightColor.g/255),f.lightColor.b>1&&(f.lightColor.b=f.lightColor.b/255),f.lightColor.a>1&&(f.lightColor.a=f.lightColor.a/255),f.lightColor=this._color.createColor(f.lightColor.r,f.lightColor.g,f.lightColor.b,f.lightColor.a)));var E=this._core.extend(x,f,!0);f.checked=C,E.heightReference=this._cesium.HeightReference.RELATIVE_TO_GROUND;var I={clampToGround:!0};A==null&&console.log("geojson is required");var w=null;A.then?w=A:w=this._cesium.GeoJsonDataSource.load(A,I),this._viewer.dataSources.add(w);var Q=this,M;f&&f.time&&(M=new Q._cesium.TimeIntervalCollection([new Q._cesium.TimeInterval({start:f.time.start?Q._cesium.JulianDate.fromDate(new Date(f.time.start)):Q._cesium.Iso8601.MINIMUM_VALUE,stop:f.time.end?Q._cesium.JulianDate.fromDate(new Date(f.time.end)):Q._cesium.Iso8601.MAXIMUM_VALUE})])),w.then(function(T){Q.item=T,Q.model=[];var D=T.entities.values;Q._core.isnull(f.near)&&(f.near=0),Q._core.isnull(f.far)&&(f.far=999999999);var F=parseFloat(f.near),L=parseFloat(f.far),R=new Q._cesium.DistanceDisplayCondition(F,L);E.distanceDisplayCondition=R;for(var k=0;k<D.length;k++){var U=D[k];E.height=parseFloat(Q._core.extendgl(U,f.height,E.height)),E.extrudedHeight=parseFloat(Q._core.extendgl(U,f.extrudedHeight,E.extrudedHeight)),E.heightReference=Q._core.extendgl(U,f.heightReference,E.heightReference),E.show=Q._core.extendgl(U,f.show,E.show),E.material=Q._core.extendgl(U,f.material,E.material),E.outline=Q._core.extendgl(U,f.outline,E.outline),E.outlineColor=Q._core.extendgl(U,f.outlineColor,E.outlineColor),E.outlineWidth=parseFloat(Q._core.extendgl(U,f.outlineWidth,E.outlineWidth)),E.stRotation=Q._core.extendgl(U,f.stRotation,E.stRotation),E.granularity=Q._core.extendgl(U,f.granularity,E.granularity),E.distanceDisplayCondition=Q._core.extendgl(U,f.distanceDisplayCondition,E.distanceDisplayCondition),E.perPositionHeight=Q._core.extendgl(U,f.perPositionHeight,E.perPositionHeight),E.closeTop=Q._core.extendgl(U,f.closeTop,E.closeTop),E.closeBottom=Q._core.extendgl(U,f.closeBottom,E.closeBottom),E.shadows=Q._core.extendgl(U,f.shadows,E.shadows),E.classificationType=Q._core.extendgl(U,f.classificationType,E.classificationType);var V=U.polygon._hierarchy._value.positions;U.polygon.heightReference=1,U.polygon.show=E.show,U.polygon.material=E.material,U.polygon.outline=E.outline,U.polygon.outlineColor=E.outlineColor,U.polygon.outlineWidth=E.outlineWidth,U.polygon.stRotation=E.stRotation,U.polygon.granularity=E.granularity,U.polygon.distanceDisplayCondition=R,U.polygon.closeTop=E.closeTop,U.polygon.closeBottom=E.closeBottom,U.polygon.shadows=E.shadows,U.polygon.classificationType=E.classificationType,M&&(U.availability=M);for(var H=[],q=U.polygon.hierarchy.getValue().positions,ie=0;ie<q.length;ie++){var Z=Q._cesium.Math.toDegrees(Q._cesium.Cartographic.fromCartesian(q[ie]).longitude),oe=Q._cesium.Math.toDegrees(Q._cesium.Cartographic.fromCartesian(q[ie]).latitude);H.push(Z),H.push(oe)}var ne=Q.getTheBottomPoint(H),se=Q.scanningPolygon(ne,E.offset_x,E.offset_y,H),ce=[];se.forEach(function(j){var de=Q._cesium.Transforms.eastNorthUpToFixedFrame(Q._cesium.Cartesian3.fromDegrees(j.lon,j.lat,E.height)),me=Q._cesium.Model.fromGltf({url:v,color:E.color,silhouetteColor:E.lightColor,silhouetteSize:E.lightWidth,modelMatrix:de,scale:E.scale,heightReference:parseInt(E.heightReference),distanceDisplayCondition:R}),_e=Q._viewer.scene.primitives.add(me,M);me.time=M,Q.model.push(me)})}f.checked||Q.setVisibility(!1),typeof y=="function"&&y(T)}),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id);var B={id:E.id,name:o,checked:C,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A,style:E};return this.setTreeobj(B),this._tree.insertGroupId(B,this._core.isnull(m)?0:m),this};ih.prototype.setItem=function(o){this.item=o};ih.prototype.modelMove=function(){this._tree.removeHandler(),this._tree.starttemporaryItem(this._viewer),this.yd=!1;var o=this;this._tree.handler=new this._cesium.ScreenSpaceEventHandler(this._viewer.scene.canvas),this._tree.handler.setInputAction(function(A){var f=o._viewer.scene.pickPosition(A.position),m=o._viewer.scene.pick(A.position);if(o.yd!=null&&o.yd&&o._tree.handler.destroy(),o.yd=!0,m.tileset!=null){var C=m.tileset,y=o._cesium.Cartographic.fromCartesian(C.boundingSphere.center),x=o._cesium.Cartesian3.fromRadians(y.longitude,y.latitude,y.height);o._tree.handler.setInputAction(function(v){var E=o._viewer.scene.pickPosition(v.endPosition),I=o._cesium.Cartographic.fromCartesian(E),w=o._cesium.Cartesian3.fromRadians(I.longitude,I.latitude,y.height),Q=o._cesium.Cartesian3.subtract(w,x,new o._cesium.Cartesian3);C.modelMatrix=o._cesium.Matrix4.fromTranslation(Q)},o._cesium.ScreenSpaceEventType.MOUSE_MOVE)}},o._cesium.ScreenSpaceEventType.LEFT_CLICK)};ih.prototype.getTheBottomPoint=function(o){for(var A=90,f=0,m=1;m<o.length;m+=2)A=A<o[m]?A:(f=m)&&o[m];return{lon:o[f-1],lat:o[f]}};ih.prototype.scanningPolygon=function(o,A,f,m){for(var C=[],y=180,x=-180,v=-90,E,I,w,Q,M,B=0;B<m.length;B+=2)v=v>m[B+1]?v:m[B+1],y=y<m[B]?y:m[B],x=x>m[B]?x:m[B];var T=this.GetPositionFromA_D(o.lat,o.lon,f,0),D=this.GetPositionFromA_D(o.lat,o.lon,A,90);for(E=D[0]-o.lon,I=T[1]-o.lat,C.push({lon:o.lon,lat:o.lat}),M={lon:o.lon,lat:o.lat},M.lat+=I;M.lat<=v;M.lat+=I){for(w={lon:M.lon-E,lat:M.lat},Q={lon:M.lon+E,lat:M.lat},this.IsInPolygon(M.lon,M.lat,m)&&C.push({lon:M.lon,lat:M.lat});w.lon>=y;w.lon-=E)this.IsInPolygon(w.lon,w.lat,m)&&C.push({lon:w.lon,lat:w.lat});for(;Q.lon<=x;Q.lon+=E)this.IsInPolygon(Q.lon,Q.lat,m)&&C.push({lon:Q.lon,lat:Q.lat})}return C};ih.prototype.GetPositionFromA_D=function(o,A,f,m){var C=6378137,y=6356725,x=f*Math.sin(m*Math.PI/180),v=f*Math.cos(m*Math.PI/180),E=y+(C-y)*(90-o)/90,I=E*Math.cos(o*Math.PI/180),w=(x/I+A*Math.PI/180)*180/Math.PI,Q=(v/E+o*Math.PI/180)*180/Math.PI;return[w,Q]};ih.prototype.IsInPolygon=function(o,A,f){var m=0,C,y,x,v,E;if(f.length<6)return!1;f.push(f[0],f[1]);for(var I=0;I<f.length-2;I+=2)C=f[I],x=f[I+1],y=f[I+2],v=f[I+3],(A>=x&&A<v||A>=v&&A<x)&&Math.abs(x-v)>0&&(E=C-(C-y)*(x-A)/(x-v),E<=o&&m++);return m%2!==0};ih.prototype.createModel=function(o,A,f,m,C,y){var x={id:this._core.getuid(),uri:A,show:!0,heading:0,pitch:0,roll:0,scale:1},v=this._core.extend(x,f,!0);this._position=o;var E={id:v.id,position:this._cesium.Cartesian3.fromDegrees(this._position[0],this._position[1],this._position[2]),model:v};(v.heading||v.pitch||v.roll)&&(this.heading=v.heading,this.pitch=v.pitch,this.roll=v.roll,E.orientation=this._cesium.Transforms.headingPitchRollQuaternion(this._cesium.Cartesian3.fromDegrees(this._position[0],this._position[1],this._position[2]),new this._cesium.HeadingPitchRoll(this._cesium.Math.toRadians(this._cesium.defaultValue(v.heading,0)),this._cesium.Math.toRadians(this._cesium.defaultValue(v.pitch,0)),this._cesium.Math.toRadians(this._cesium.defaultValue(v.roll,0)))));var I=this;v.rotate&&(E.orientation=new this._cesium.CallbackProperty(w,!1),I.rotate=v.rotate,delete v.rotate);function w(){return I.heading=I.heading+I.rotate,I._cesium.Transforms.headingPitchRollQuaternion(I._cesium.Cartesian3.fromDegrees(I._position[0],I._position[1],I._position[2]),new I._cesium.HeadingPitchRoll(I._cesium.Math.toRadians(I._cesium.defaultValue(I.heading,0)),I._cesium.Math.toRadians(I._cesium.defaultValue(I.pitch,0)),I._cesium.Math.toRadians(I._cesium.defaultValue(I.roll,0))))}delete v.heading,delete v.pitch,delete v.roll,E.model=v,this.item=this._viewer.entities.add(E),typeof y=="function"&&y(this.item);var Q={id:this.item.id,name:C||"\u65B0\u5EFA\u6A21\u578B"+x.id,pId:this._core.isnull(m)?0:m,type:"Point",item:this.item};return this.setTreeobj(Q),this._tree.insertGroupId(Q,this._core.isnull(m)?0:m),this};ih.prototype.createModelEditable=function(o,A,f,m,C,y){var x={id:this._core.getuid(),uri:A,show:!0,heading:0,pitch:0,roll:0,scale:1},v=this._core.extend(x,f,!0);this._position=o;var E={position:this._cesium.Cartesian3.fromDegrees(this._position[0],this._position[1],this._position[2]),model:v},I=this._cesium.Cartesian3.fromDegrees(this._position[0],this._position[1],this._position[2]),w=this.createCylinder(I,new this._cesium.CallbackProperty(F,!1),new this._cesium.CallbackProperty(H,!1),new this._cesium.CallbackProperty(q,!1),this._cesium.Color.LIMEGREEN,!1);w.oid=1,this.modelPointArr.push(w);var Q=this.createCylinder(I,new this._cesium.CallbackProperty(L,!1),new this._cesium.CallbackProperty(H,!1),new this._cesium.CallbackProperty(q,!1),this._cesium.Color.MEDIUMBLUE,!1);Q.oid=2,this.modelPointArr.push(Q);var M=this.createCylinder(I,new this._cesium.CallbackProperty(R,!1),new this._cesium.CallbackProperty(H,!1),new this._cesium.CallbackProperty(q,!1),this._cesium.Color.RED,!1);M.oid=3,this.modelPointArr.push(M);var B=this.creatBillboard(I,new this._cesium.CallbackProperty(ie,!1),"../../img/j.png",!1);B.oid=4,this.modelPointArr.push(B);var T=this.creatBillboard(I,new this._cesium.CallbackProperty(Z,!1),"../../img/s.png",!1);T.oid=5,this.modelPointArr.push(T),(v.heading||v.pitch||v.roll)&&(this.heading=v.heading,this.pitch=v.pitch,this.roll=v.roll,E.orientation=this._cesium.Transforms.headingPitchRollQuaternion(this._cesium.Cartesian3.fromDegrees(this._position[0],this._position[1],this._position[2]),new this._cesium.HeadingPitchRoll(this._cesium.Math.toRadians(this._cesium.defaultValue(v.heading,0)),this._cesium.Math.toRadians(this._cesium.defaultValue(v.pitch,0)),this._cesium.Math.toRadians(this._cesium.defaultValue(v.roll,0)))));var D=this;v.rotate&&(E.orientation=new this._cesium.CallbackProperty(U,!1),D.rotate=v.rotate,delete v.rotate),E.orientation=new this._cesium.CallbackProperty(k,!1),D.scale=v.scale,E.model.scale=new this._cesium.CallbackProperty(V,!1);function F(){var ne=D._cesium.Cartesian3.fromDegrees(D._position[0],D._position[1],D._position[2]),se=D._cesium.Math.toRadians(D.heading),ce=new D._cesium.HeadingPitchRoll(se,D._cesium.Math.toRadians(D.pitch),D._cesium.Math.toRadians(D.roll));return D._cesium.Transforms.headingPitchRollQuaternion(ne,ce)}function L(){var ne=D._cesium.Cartesian3.fromDegrees(D._position[0],D._position[1],D._position[2]),se=D._cesium.Math.toRadians(D.heading),ce=new D._cesium.HeadingPitchRoll(se,D._cesium.Math.toRadians(90+D.pitch),D._cesium.Math.toRadians(D.roll));return D._cesium.Transforms.headingPitchRollQuaternion(ne,ce)}function R(){var ne=D._cesium.Cartesian3.fromDegrees(D._position[0],D._position[1],D._position[2]),se=D._cesium.Math.toRadians(D.heading),ce=new D._cesium.HeadingPitchRoll(se,D._cesium.Math.toRadians(D.pitch),D._cesium.Math.toRadians(90+D.roll));return D._cesium.Transforms.headingPitchRollQuaternion(ne,ce)}function k(){return D._cesium.Transforms.headingPitchRollQuaternion(D._cesium.Cartesian3.fromDegrees(D._position[0],D._position[1],D._position[2]),new D._cesium.HeadingPitchRoll(D._cesium.Math.toRadians(D._cesium.defaultValue(D.heading,0)),D._cesium.Math.toRadians(D._cesium.defaultValue(D.pitch,0)),D._cesium.Math.toRadians(D._cesium.defaultValue(D.roll,0))))}function U(){return D.heading=D.heading+D.rotate,D._cesium.Transforms.headingPitchRollQuaternion(D._cesium.Cartesian3.fromDegrees(D._position[0],D._position[1],D._position[2]),new D._cesium.HeadingPitchRoll(D._cesium.Math.toRadians(D._cesium.defaultValue(D.heading,0)),D._cesium.Math.toRadians(D._cesium.defaultValue(D.pitch,0)),D._cesium.Math.toRadians(D._cesium.defaultValue(D.roll,0))))}function V(){return D.scale}function H(){return D.Radius*D.scale}function q(){return D.Radius*100}function ie(){return new D._cesium.Cartesian2(0,-(D.Radius*D.scale))}function Z(){return new D._cesium.Cartesian2(-(D.Radius*D.scale),0)}delete v.heading,delete v.pitch,delete v.roll,E.model=v,this.item=this._viewer.entities.add(E),this.item.objId=this.objId,this.state=1,typeof y=="function"&&y(this.item);var oe={id:this.item.id,name:C||"\u65B0\u5EFA\u6A21\u578B"+x.id,pId:this._core.isnull(m)?0:m,type:"Point",item:this.item};return this.setTreeobj(oe),this._tree.insertGroupId(oe,this._core.isnull(m)?0:m),this};ih.prototype.createOrientation=function(o,A,f){var m=this._cesium.Math.toRadians(0),C=new this._cesium.HeadingPitchRoll(m,this._cesium.Math.toRadians(A),this._cesium.Math.toRadians(f));return this._cesium.Transforms.headingPitchRollQuaternion(o,C)};ih.prototype.createCylinder=function(o,A,f,m,C,y){if(!!o)return this._viewer.entities.add({position:o,orientation:A,cylinder:{length:10,topRadius:f,bottomRadius:f,fill:!1,material:C.withAlpha(.5),outline:!0,outlineWidth:10,outlineColor:C,numberOfVerticalLines:m,slices:m},show:y})};ih.prototype.startModify=function(){if(!(this.state!=2&&this.state!=1)){var o=this;this.modifyHandler||(this.modifyHandler=new this._cesium.ScreenSpaceEventHandler(this._viewer.scene.canvas));for(var A=0;A<o.modelPointArr.length;A++){var f=o.modelPointArr[A];f&&(f.show=!0)}var m,C,y,x,v,E;this.modifyHandler.setInputAction(function(I){var w=o._viewer.scene.pick(I.position);o._cesium.defined(w)&&w.id&&(w.id.objId?o.modifyModel=w.id:o.modifyPoint&&(o.modifyPoint.oid==4||o.modifyPoint.oid==5)?(w.id.oid!=o.modifyPoint.oid&&(o.modifyPoint=w.id),o.modifyPoint.oid==4?o.scale=o.scale+1:o.scale=o.scale-1):o.modifyPoint=w.id,o.forbidDrawWorld(!0));var Q=o._cesium.Cartesian3.fromDegrees(o._position[0],o._position[1],o._position[2]);m=o._cesium.SceneTransforms.wgs84ToWindowCoordinates(o._viewer.scene,Q),C=I.position,x=o.heading+0,E=o.roll+0,v=o.pitch+0,o.state=2},this._cesium.ScreenSpaceEventType.LEFT_DOWN),this.modifyHandler.setInputAction(function(I){var w=o._viewer.scene.pick(I.position);if(!(o._cesium.defined(w)&&w.id)){for(var Q=0;Q<o.modelPointArr.length;Q++){var M=o.modelPointArr[Q];M&&(M.show=!1)}o.modifyHandler&&(o.modifyHandler.destroy(),o.modifyHandler=null)}},this._cesium.ScreenSpaceEventType.LEFT_CLICK),this.modifyHandler.setInputAction(function(I){var w=o._viewer.scene.pick(I.endPosition);if(!(!o.modifyModel&&!o.modifyPoint)){var Q=o._viewer.scene.pickPosition(I.endPosition);if(Q){if(o.modifyModel){o.item.position.setValue(Q);for(var M=0;M<o.modelPointArr.length;M++){var B=o.modelPointArr[M];B&&B.position.setValue(Q)}}else if(o.modifyPoint){y=I.endPosition;var T=o.arge(m,C,y);o.modifyPoint.oid==1?o.heading=x+T:o.modifyPoint.oid==2?o.roll=E+T:o.modifyPoint.oid==3&&(o.pitch=v+T)}}}},this._cesium.ScreenSpaceEventType.MOUSE_MOVE),this.modifyHandler.setInputAction(function(I){!o.modifyPoint&&!o.modifyModel||o.modifyPoint&&(o.modifyPoint.oid==4||o.modifyPoint.oid==5)||(o.modifyPoint=null,o.modifyModel=null,o.forbidDrawWorld(!1))},this._cesium.ScreenSpaceEventType.LEFT_UP)}};ih.prototype.creatBillboard=function(o,A,f,m){var C=this._viewer.entities.add({position:o,show:m,billboard:{image:f,pixelOffset:A,verticalOrigin:this._cesium.VerticalOrigin.BOTTOM}});return C.attr="editPoint",C};ih.prototype.arge=function(o,A,f){var m=Math.sqrt(Math.pow(o.x-A.x,2)+Math.pow(o.y-A.y,2)),C=Math.sqrt(Math.pow(o.x-f.x,2)+Math.pow(o.y-f.y,2)),y=Math.sqrt(Math.pow(A.x-f.x,2)+Math.pow(A.y-f.y,2)),x=(Math.pow(m,2)+Math.pow(C,2)-Math.pow(y,2))/(2*m*C);return Math.round(Math.acos(x)*180/Math.PI)};ih.prototype.forbidDrawWorld=function(o){this._viewer.scene.screenSpaceCameraController.enableRotate=!o,this._viewer.scene.screenSpaceCameraController.enableTilt=!o,this._viewer.scene.screenSpaceCameraController.enableTranslate=!o,this._viewer.scene.screenSpaceCameraController.enableInputs=!o};ih.prototype.getCatesian3FromPX=function(o,A,f){var m=A.scene.pick(o),C,y=A.scene.drillPick(o),x=null;if(f){for(var v=0;v<y.length;v++)if(y[v].id._id!=f[0].id&&y[v].id._id!=f[1].id){x=y[v].id;break}}else x=m;if(A.scene.pickPositionSupported&&Cesium.defined(x))C=A.scene.pickPosition(o);else{var E=A.camera.getPickRay(o);if(!E)return;C=A.scene.globe.pick(E,A.scene)}return C};ih.prototype.setTreeobj=function(o){this.treeobj=o};ih.prototype.setVisibility=function(o){if(this.item.item?this.item.item.show=o:this.item.show=o,this.model.length>0)for(var A=0;A<this.model.length;A++)this.model[A].show=o,this.model[A]._availability&&!o?this.model[A]._availability=void 0:this.model[A].time&&o&&(this.model[A]._availability=this.model[A].time)};ih.prototype.setOrientation=function(o){(o.heading||o.pitch||o.roll)&&(this.item.orientation=this._cesium.Transforms.headingPitchRollQuaternion(this._cesium.Cartesian3.fromDegrees(this._position[0],this._position[1],this._position[2]),new this._cesium.HeadingPitchRoll(this._cesium.Math.toRadians(this._cesium.defaultValue(o.heading,0)),this._cesium.Math.toRadians(this._cesium.defaultValue(o.pitch,0)),this._cesium.Math.toRadians(this._cesium.defaultValue(o.roll,0)))))};ih.prototype.setScale=function(o){this.item&&this.item.model&&(this.item.model.scale=o)};ih.prototype.setPosition=function(o){this.item&&this.item.model&&(this._position=o,this.item.position=this._cesium.Cartesian3.fromDegrees(this._position[0],this._position[1],this._position[2]))};ih.prototype.getVisibility=function(){return this.item.show};ih.prototype.deleteObject=function(){if(this.model&&this.model.length)for(var o=0;o<this.model.length;o++)this._viewer.scene.primitives.remove(this.model[o]);try{this._viewer.scene.primitives.remove(this.item)}catch{}try{this._viewer.entities.remove(this.item)}catch{}try{this._viewer.dataSources.remove(this.item)}catch{}try{this._Provider.remove()}catch{}};var HQ=ih;function Qp(o,A){this._viewer=o,this._cesium=A,this._core=new pr(o,A),this._color=new Pn(this._viewer,this._cesium),this._tree=lt,this._Provider=void 0,this._primitive=void 0,this._taskProcessor=new this._cesium.TaskProcessor("vectorTileProvider"),this.model=[],this.Legend=[],this._ajax=null,this.datas=null}Qp.prototype.createPolygonGeoJsonFeatureLayer=function(o,A,f,m,C){var y={polygonHierarchy:void 0,height:0,extrudedHeight:0,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,perPositionHeight:!0,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.WHITE,show:!0};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a))));var x=this._core.extend(y,f,!0);A==null&&console.log("geojson is required");var v=null;A.then?v=A:v=this._cesium.GeoJsonDataSource.load(A);var E=this,I=[];v.then(function(Q){for(var M=Q.entities.values,B=0;B<M.length;B++){var T=M[B];x.polygonHierarchy=new E._cesium.PolygonHierarchy(T.polygon.hierarchy._value.positions);var D=new E._cesium.PolygonGeometry(x),F=E._cesium.PolygonGeometry.createGeometry(D),L=new E._cesium.GeometryInstance({geometry:F});I.push(L)}var R=E._viewer.scene.primitives.add(new E._cesium.Primitive({geometryInstances:I,appearance:new E._cesium.MaterialAppearance({material:new E._cesium.Material({fabric:{type:"Color",uniforms:{color:x.material}}}),faceForward:!0,flat:!1})})),k="material:"+x.material.red*255+","+x.material.green*255+","+x.material.blue*255;E.Legend.push(k),E.item=R,x.show==!1&&(R.show=!1),typeof C=="function"&&C(R)}),this._core.isnull(x.id)&&(x.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+x.id);var w={id:x.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A,style:x};return this.setTreeobj(w),this._tree.insertGroupId(w,this._core.isnull(m)?0:m),this};Qp.prototype.deleteObject=function(){if(this.items!=null&&this.items!=null&&this.items.length>0)for(var o=0;o<this.items.length;o++)this._viewer.scene.primitives.remove(this.items[o]);else this._viewer.scene.primitives.remove(this.item);if(this.model!=null&&this.model!=null&&this.model.length>0)for(var o=0;o<this.model.length;o++)this._viewer.scene.primitives.remove(this.model[o]);try{this._Provider.remove()}catch{}};Qp.prototype.setRefresh=function(o){try{this._Provider&&this._Provider.setStatus(!o)}catch{}};Qp.prototype.setVisibility=function(o){if(this.items!=null&&this.items!=null&&this.items.length>0)for(var A=0;A<this.items.length;A++)this.items[A].show=o;else this.item.show=o;if(this.model!=null&&this.model!=null&&this.model.length>0)for(var A=0;A<this.model.length;A++)this.model[A].show=o;this._Provider&&this._Provider.setStatus(!o)};Qp.prototype.createPolygonVectorGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y){var x={polygonHierarchy:void 0,height:0,extrudedHeight:999999,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.WHITE,shadows:this._cesium.ShadowMode.ENABLED,show:!0},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a))));var E=this._core.extend(x,f,!0);E.extrudedHeight==0&&(E.extrudedHeight=999999),this.items=[];var I=this,w=new IA(this._viewer,this._cesium,v);this._Provider=w,w._loadTile=function(M){var B=[],T=null,D=scene.primitives;I.Legend=[];var F=new I._cesium.PrimitiveCollection;if(M.features.forEach(function(L){if(w._isCameraMoving)return null;var R=[];function k(H){for(var q=0;q<H.length;q++)Array.isArray(H[q])?k(H[q]):R.push(H[q])}if(Array.isArray(L.geometry.coordinates)&&L.geometry.coordinates.length>0)if(Array.isArray(L.geometry.coordinates[0][0]))for(var U=0;U<L.geometry.coordinates.length;U++)R=[],k(L.geometry.coordinates[U]),V(R);else k(L.geometry.coordinates),V(R);function V(H){if(w._isCameraMoving)return null;var q=I._cesium.Cartesian3.fromDegreesArray(H);if(/^\[/.test(f.extrudedHeight)&&/\]$/.test(f.extrudedHeight)){var ie=f.extrudedHeight.replace(/\[/,"").replace(/\]/,"");E.extrudedHeight=parseFloat(L.properties[ie])}if(E.extrudedHeight=parseFloat(E.extrudedHeight),E.heightReference==1&&delete E.height,E.extrudedHeightReference==1&&delete E.extrudedHeight,/^\[/.test(f.material)&&/\]$/.test(f.material)){var Z=f.material.replace(/\[/,"").replace(/\]/,"");E.material=L.properties[Z],I._core.isHtmlColor(E.material)?E.material=I._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=I._color.rgbaStringToRgbaObj(E.material)),E.material.r>1&&(E.material.r=E.material.r/255),E.material.g>1&&(E.material.g=E.material.g/255),E.material.b>1&&(E.material.b=E.material.b/255),E.material.a>1&&(E.material.a=E.material.a/255),E.material=I._color.createColor(E.material.r,E.material.g,E.material.b,E.material.a))}E.polygonHierarchy=new I._cesium.PolygonHierarchy(q),L.positions=q;var oe=new I._cesium.PolygonGeometry(E),ne=null;ne=new I._cesium.GeometryInstance({id:L,geometry:oe,attributes:{color:new I._cesium.ColorGeometryInstanceAttribute.fromColor(E.material)}});var se="material:"+E.material.red*255+","+E.material.green*255+","+E.material.blue*255;I.Legend.push(se),B.push(ne)}}),B.length>0)return T=new I._cesium.GroundPrimitive({geometryInstances:B,appearance:new I._cesium.PerInstanceColorAppearance({closed:!0,flat:!1}),classificationType:E.classificationType}),T},this.item=w._primitiveCollection,w.addTo(this._viewer),C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var Q={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f};return this.setTreeobj(Q),this._tree.insertGroupId(Q,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Qp.prototype.createPolygonVectorGeoJsonFeatureLayerProviderModel=function(o,A,f,m,C,y){var x={polygonHierarchy:void 0,height:0,extrudedHeight:999999,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.WHITE,shadows:this._cesium.ShadowMode.ENABLED,show:!0},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:this._core.defaultValue(A.srs,"EPSG:4490")+":{z}",TILEMATRIXSET:this._core.defaultValue(A.srs,"EPSG:4490"),FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium},E=f.material,I=f.height;!this._core.isnull(f)&&!this._core.isnull(f.color)&&(this._core.isHtmlColor(f.color)?f.color=this._color.colorFromHtmlColor(f.color):(/^rgb/.test(f.color)&&(f.color=this._color.rgbaStringToRgbaObj(f.color)),f.color.r>1&&(f.color.r=f.color.r/255),f.color.g>1&&(f.color.g=f.color.g/255),f.color.b>1&&(f.color.b=f.color.b/255),f.color.a>1&&(f.color.a=f.color.a/255),f.color=this._color.createColor(f.color.r,f.color.g,f.color.b,f.color.a))),!this._core.isnull(f)&&!this._core.isnull(f.lightColor)&&(this._core.isHtmlColor(f.lightColor)?f.lightColor=this._color.colorFromHtmlColor(f.lightColor):(/^rgb/.test(f.lightColor)&&(f.lightColor=this._color.rgbaStringToRgbaObj(f.lightColor)),f.lightColor.r>1&&(f.lightColor.r=f.lightColor.r/255),f.lightColor.g>1&&(f.lightColor.g=f.lightColor.g/255),f.lightColor.b>1&&(f.lightColor.b=f.lightColor.b/255),f.lightColor.a>1&&(f.lightColor.a=f.lightColor.a/255),f.lightColor=this._color.createColor(f.lightColor.r,f.lightColor.g,f.lightColor.b,f.lightColor.a))),!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a))));var w=this._core.extend(x,f,!0);w.extrudedHeight==0&&(w.extrudedHeight=999999),this.items=[];var Q=this,M=new IA(this._viewer,this._cesium,v);this._Provider=M,M._loadTile=function(T){var D=[],F=null,L=scene.primitives,R=new Q._cesium.PrimitiveCollection;return Q.Legend=[],T.features.forEach(function(k){if(M._isCameraMoving)return null;var U=[];function V(Z){for(var oe=0;oe<Z.length;oe++)Array.isArray(Z[oe])?V(Z[oe]):U.push(Z[oe])}if(Array.isArray(k.geometry.coordinates)&&k.geometry.coordinates.length>0)if(Array.isArray(k.geometry.coordinates[0][0]))for(var H=0;H<k.geometry.coordinates.length;H++)U=[],V(k.geometry.coordinates[H]),q(U),ie(U);else V(k.geometry.coordinates),q(U),ie(U);function q(Z){if(M._isCameraMoving)return null;var oe=Q._cesium.Cartesian3.fromDegreesArray(Z);if(/^\[/.test(f.extrudedHeight)&&/\]$/.test(f.extrudedHeight)){var ne=f.extrudedHeight.replace(/\[/,"").replace(/\]/,"");w.extrudedHeight=parseFloat(k.properties[ne])}if(w.extrudedHeight=parseFloat(w.extrudedHeight),w.heightReference==1&&delete w.height,w.extrudedHeightReference==1&&delete w.extrudedHeight,/^\[/.test(f.material)&&/\]$/.test(f.material)){var se=f.material.replace(/\[/,"").replace(/\]/,"");w.material=k.properties[se],Q._core.isHtmlColor(w.material)?w.material=Q._color.colorFromHtmlColor(w.material):(/^rgb/.test(w.material)&&(w.material=Q._color.rgbaStringToRgbaObj(w.material)),w.material.r>1&&(w.material.r=w.material.r/255),w.material.g>1&&(w.material.g=w.material.g/255),w.material.b>1&&(w.material.b=w.material.b/255),w.material.a>1&&(w.material.a=w.material.a/255),w.material=Q._color.createColor(w.material.r,w.material.g,w.material.b,w.material.a))}w.polygonHierarchy=new Q._cesium.PolygonHierarchy(oe);var ce=new Q._cesium.PolygonGeometry(w),j=null;k.positions=oe,j=new Q._cesium.GeometryInstance({id:k,geometry:ce,attributes:{color:new Q._cesium.ColorGeometryInstanceAttribute.fromColor(w.material)}});var de="material:"+w.material.red*255+","+w.material.green*255+","+w.material.blue*255;Q.Legend.push(de),F=new Q._cesium.ClassificationPrimitive({geometryInstances:j,appearance:new Q._cesium.PerInstanceColorAppearance({closed:!0,flat:!1}),classificationType:w.classificationType,shadows:Q._cesium.ShadowMode.ENABLED}),R.add(F)}function ie(Z){for(var oe=Q._cesium.Cartesian3.fromDegreesArray(Z),ne=new Q._cesium.PolygonHierarchy(oe),se=[],ce=ne.positions,j=0;j<ce.length;j++){var de=Q._cesium.Math.toDegrees(Q._cesium.Cartographic.fromCartesian(ce[j]).longitude),me=Q._cesium.Math.toDegrees(Q._cesium.Cartographic.fromCartesian(ce[j]).latitude);se.push(de),se.push(me)}var _e=Q.getTheBottomPoint(se),Be=Q.scanningPolygon(_e,w.offset_x,w.offset_y,se),Qe=[];Be.forEach(function(Ie){var ve=Q._cesium.Transforms.eastNorthUpToFixedFrame(Q._cesium.Cartesian3.fromDegrees(Ie.lon,Ie.lat,I)),K=Q._cesium.Model.fromGltf({url:E,color:w.color,lightColor:w.lightColor,modelMatrix:ve,scale:w.scale});R.add(K)})}}),R},f&&f.time&&(M.availability=new Q._cesium.TimeIntervalCollection([new Q._cesium.TimeInterval({start:f.time.start?Q._cesium.JulianDate.fromDate(new Date(f.time.start)):Q._cesium.Iso8601.MINIMUM_VALUE,stop:f.time.end?Q._cesium.JulianDate.fromDate(new Date(f.time.end)):Q._cesium.Iso8601.MAXIMUM_VALUE})])),this.item=M._primitiveCollection,M.addTo(this._viewer),C||this.setVisibility(!1),this._core.isnull(w.id)&&(w.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+w.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var B={id:w.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f};return this.setTreeobj(B),this._tree.insertGroupId(B,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Qp.prototype.GetPositionFromA_D=function(o,A,f,m){var C=6378137,y=6356725,x=f*Math.sin(m*Math.PI/180),v=f*Math.cos(m*Math.PI/180),E=y+(C-y)*(90-o)/90,I=E*Math.cos(o*Math.PI/180),w=(x/I+A*Math.PI/180)*180/Math.PI,Q=(v/E+o*Math.PI/180)*180/Math.PI;return[w,Q]};Qp.prototype.getTheBottomPoint=function(o){for(var A=90,f=0,m=1;m<o.length;m+=2)A=A<o[m]?A:(f=m)&&o[m];return{lon:o[f-1],lat:o[f]}};Qp.prototype.scanningPolygon=function(o,A,f,m){for(var C=[],y=180,x=-180,v=-90,E,I,w,Q,M,B=0;B<m.length;B+=2)v=v>m[B+1]?v:m[B+1],y=y<m[B]?y:m[B],x=x>m[B]?x:m[B];var T=this.GetPositionFromA_D(o.lat,o.lon,f,0),D=this.GetPositionFromA_D(o.lat,o.lon,A,90);for(E=D[0]-o.lon,I=T[1]-o.lat,C.push({lon:o.lon,lat:o.lat}),M={lon:o.lon,lat:o.lat},M.lat+=I;M.lat<=v;M.lat+=I){for(w={lon:M.lon-E,lat:M.lat},Q={lon:M.lon+E,lat:M.lat},this.IsInPolygon(M.lon,M.lat,m)&&C.push({lon:M.lon,lat:M.lat});w.lon>=y;w.lon-=E)this.IsInPolygon(w.lon,w.lat,m)&&C.push({lon:w.lon,lat:w.lat});for(;Q.lon<=x;Q.lon+=E)this.IsInPolygon(Q.lon,Q.lat,m)&&C.push({lon:Q.lon,lat:Q.lat})}return C};Qp.prototype.IsInPolygon=function(o,A,f){var m=0,C,y,x,v,E;if(f.length<6)return!1;f.push(f[0],f[1]);for(var I=0;I<f.length-2;I+=2)C=f[I],x=f[I+1],y=f[I+2],v=f[I+3],(A>=x&&A<v||A>=v&&A<x)&&Math.abs(x-v)>0&&(E=C-(C-y)*(x-A)/(x-v),E<=o&&m++);return m%2!==0};Qp.prototype.setPolylinemodels=function(o,A,f,m,C,y,x,v,E){var I=this._core.getSpaceDistancem(o,v),w=10,Q=parseFloat(x.distance);Q==0||(w=parseInt(I/Q));for(var M=o[0],B=o[o.length-1],T=v.Cartographic.fromCartesian(M),D=v.Math.toDegrees(T.longitude),F=v.Math.toDegrees(T.latitude),L=T.height,R=v.Cartographic.fromCartesian(B),k=v.Math.toDegrees(R.longitude),U=v.Math.toDegrees(R.latitude),V=R.height,H=v.Math.toDegrees(T.height),q=w,ie=v.Math.lerp(D,k,1/q)-D,Z=v.Math.lerp(F,U,1/q)-F,oe=v.Math.lerp(A,m,1/q)-A,ne=v.Math.lerp(f,C,1/q)-f,se=[],ce,j,de=0;de<q;de++){var me=D+(de+1)*ie,_e=F+(de+1)*Z,Be=v.Transforms.eastNorthUpToFixedFrame(v.Cartesian3.fromDegrees(me,_e,x.height)),Qe=parseInt(x.heightReference),Ie=v.Model.fromGltf({url:x.url,modelMatrix:Be,color:x.color,lightColor:x.lightColor,scale:x.scale,heightReference:parseInt(x.heightReference)}),ve=E.scene.primitives.add(Ie);y.push(Ie)}return y};Qp.prototype.createPolygonVectorGeoJsonFeatureLayerProviderlsjl=function(o,A,f,m,C,y){var x={polygonHierarchy:void 0,height:0,extrudedHeight:0,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.WHITE,shadows:this._cesium.ShadowMode.ENABLED,show:!0},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a))));var E=this._core.extend(x,f,!0),I=this,w=new IA(this._viewer,this._cesium,v);this._Provider=w,w._loadTile=function(M,B){var T=[],D=[],F=I._taskProcessor.scheduleTask({json:M,styleOption:f,options:E,tileKey:B});if(!!I._cesium.defined(F)){var L=I;I._cesium.when(F,function(R){if(!w._primitiveByTile[R.tileKey]){for(var k=new L._cesium.PrimitiveCollection,U=0;U<R.geomInstances.length;U++){var V=null,H=R.geomInstances[U],q=H.id.id;if(!w._primitiveByTile[q]){var ie=new L._cesium.Material({fabric:{type:"Color",uniforms:{color:R.materials[U]}}}),Z=new L._cesium.MaterialAppearance({material:ie,faceForward:!0,flat:!1}),V=new L._cesium.Primitive({allowPicking:!0,appearance:new L._cesium.PerInstanceColorAppearance,geometryInstances:H,shadows:I._cesium.ShadowMode.ENABLED});k.add(V)}}w._primitiveCollection.add(k),w._primitiveByTile[R.tileKey]=k}})}},this.item=w._primitiveCollection,w.addTo(this._viewer),C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var Q={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f};return this.setTreeobj(Q),this._tree.insertGroupId(Q,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Qp.prototype.createPolygonVectorGeoJsonFeatureLayerProviderls=function(o,A,f,m,C,y){var x={polygonHierarchy:void 0,height:0,extrudedHeight:0,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.WHITE,shadows:this._cesium.ShadowMode.ENABLED,show:!0},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):/^http/.test(f.material)||(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a)))),!this._core.isnull(f)&&!this._core.isnull(f.fill)&&(f.fill.toString().charAt(0)=="["&&f.fill.toString().charAt(f.fill.length-1)=="]"||(this._core.isHtmlColor(f.fill)?f.fill=this._color.colorFromHtmlColor(f.fill):/^http/.test(f.fill)||(/^rgb/.test(f.fill)&&(f.fill=this._color.rgbaStringToRgbaObj(f.fill)),f.fill.r>1&&(f.fill.r=f.fill.r/255),f.fill.g>1&&(f.fill.g=f.fill.g/255),f.fill.b>1&&(f.fill.b=f.fill.b/255),f.fill.a>1&&(f.fill.a=f.fill.a/255),f.fill=this._color.createColor(f.fill.r,f.fill.g,f.fill.b,f.fill.a))));var E=this._core.extend(x,f,!0),I=this,w=new IA(this._viewer,this._cesium,v);this._Provider=w,w._loadTile=function(M){var B=[];I.Legend=[];var T=new I._cesium.PrimitiveCollection;return M.features.forEach(function(D){var F=[];function L(U){for(var V=0;V<U.length;V++)Array.isArray(U[V])?L(U[V]):F.push(U[V])}if(Array.isArray(D.geometry.coordinates)&&D.geometry.coordinates.length>0)if(Array.isArray(D.geometry.coordinates[0][0]))for(var R=0;R<D.geometry.coordinates.length;R++)F=[],L(D.geometry.coordinates[R]),k(F);else L(D.geometry.coordinates),k(F);function k(U){var V=I._cesium.Cartesian3.fromDegreesArray(U);if(/^\[/.test(f.extrudedHeight)&&/\]$/.test(f.extrudedHeight)){var H=f.extrudedHeight.replace(/\[/,"").replace(/\]/,"");E.extrudedHeight=parseFloat(D.properties[H])}if(E.extrudedHeight=parseFloat(E.extrudedHeight),E.heightReference==1&&delete E.height,E.extrudedHeightReference==1&&delete E.extrudedHeight,/^\[/.test(f.material)&&/\]$/.test(f.material)){var q=f.material.replace(/\[/,"").replace(/\]/,"");E.material=D.properties[q],I._core.isHtmlColor(E.material)?E.material=I._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=I._color.rgbaStringToRgbaObj(E.material)),E.material.r>1&&(E.material.r=E.material.r/255),E.material.g>1&&(E.material.g=E.material.g/255),E.material.b>1&&(E.material.b=E.material.b/255),E.material.a>1&&(E.material.a=E.material.a/255),E.material=I._color.createColor(E.material.r,E.material.g,E.material.b,E.material.a))}E.polygonHierarchy=new I._cesium.PolygonHierarchy(V),D.positions=V;var ie=new I._cesium.PolygonGeometry(E),Z=null,oe=new I._cesium.ColorGeometryInstanceAttribute.fromColor(E.fill),ne={};if(/^http/.test(E.material))ne=new I._cesium.Material({fabric:{type:"Image",uniforms:{image:E.material}}});else{var se="material:"+E.material.red*255+","+E.material.green*255+","+E.material.blue*255;I.Legend.push(se),ne=new I._cesium.Material({fabric:{type:"Color",uniforms:{color:E.material}}})}Z=new I._cesium.GeometryInstance({id:D,geometry:ie,attributes:{color:oe}});var ce=null;ce=new I._cesium.Primitive({allowPicking:!0,appearance:new I._cesium.MaterialAppearance({material:ne}),geometryInstances:Z,shadows:I._cesium.ShadowMode.ENABLED}),T.add(ce)}}),T},f&&f.time&&(w.availability=new I._cesium.TimeIntervalCollection([new I._cesium.TimeInterval({start:f.time.start?I._cesium.JulianDate.fromDate(new Date(f.time.start)):I._cesium.Iso8601.MINIMUM_VALUE,stop:f.time.end?I._cesium.JulianDate.fromDate(new Date(f.time.end)):I._cesium.Iso8601.MAXIMUM_VALUE})])),this.item=w._primitiveCollection,w.addTo(this._viewer),C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var Q={id:E.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f};return this.setTreeobj(Q),this._tree.insertGroupId(Q,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Qp.prototype.createPolygonVectorGeoJsonFeatureLayerProviderlsd=function(o,A,f,m,C,y){var x={show:!0,positions:[],shape:void 0,cornerType:this._cesium.CornerType.ROUNDED,granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.DISABLED,level_max:20,level_min:10},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a)))),!this._core.isnull(f)&&!this._core.isnull(f.outlineColor)&&(f.outlineColor.toString().charAt(0)=="["&&f.outlineColor.toString().charAt(f.outlineColor.length-1)=="]"||(this._core.isHtmlColor(f.outlineColor)?f.outlineColor=this._color.colorFromHtmlColor(f.outlineColor):(/^rgb/.test(f.outlineColor)&&(f.outlineColor=this._color.rgbaStringToRgbaObj(f.outlineColor)),f.outlineColor.r>1&&(f.outlineColor.r=f.outlineColor.r/255),f.outlineColor.g>1&&(f.outlineColor.g=f.outlineColor.g/255),f.outlineColor.b>1&&(f.outlineColor.b=f.outlineColor.b/255),f.outlineColor.a>1&&(f.outlineColor.a=f.outlineColor.a/255),f.outlineColor=this._color.createColor(f.outlineColor.r,f.outlineColor.g,f.outlineColor.b,f.outlineColor.a)))),this._option=this._core.extend(x,f,!0);var E=this,I=A.urlinit,w={polygonHierarchy:void 0,height:0,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,perPositionHeight:!1,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.RED};$.ajax({url:I,type:"get",async:!1,dataType:"json",success:function(B){E.datas=B.features}});var Q=new IA(this._viewer,this._cesium,v);this._Provider=Q,Q._loadTile=function(B){var T=[];E.Legend=[];var D=new E._cesium.PrimitiveCollection,F=[],L=[],R=new Cesium.PrimitiveCollection;return B.features.forEach(function(k){var U=[];function V(oe){for(var ne=0;ne<oe.length;ne++)Array.isArray(oe[ne])?(oe[ne].length==3&&oe[ne].splice(2,1),oe[ne].push(E._option.height),V(oe[ne])):U.push(oe[ne])}var H=k.id,q=parseInt(H.split(".")[1])-1;if(k=E.datas[q],Array.isArray(k.geometry.coordinates)&&k.geometry.coordinates.length>0&&Array.isArray(k.geometry.coordinates[0][0][0]))for(var ie=0;ie<k.geometry.coordinates[0].length;ie++)U=[],V(k.geometry.coordinates[0][ie]),Z(U);function Z(oe){if(/^\[/.test(E._option.extrudedHeight)&&/\]$/.test(E._option.extrudedHeight)){var ne=E._option.extrudedHeight.replace(/\[/,"").replace(/\]/,"");w.extrudedHeight=parseFloat(k.properties[ne])}if(w.material=E._option.material,/^\[/.test(E._option.material)&&/\]$/.test(E._option.material)){var se=E._option.material.replace(/\[/,"").replace(/\]/,"");w.material=k.properties[se],E._core.isHtmlColor(w.material)?w.material=E._color.colorFromHtmlColor(w.material):(/^rgb/.test(w.material)&&(w.material=E._color.rgbaStringToRgbaObj(w.material)),w.material.red>1&&(w.material.red=w.material.red/255),w.material.green>1&&(w.material.green=w.material.green/255),w.material.blue>1&&(w.material.blue=w.material.blue/255),w.material.alpha>1&&(w.material.a=w.material.alpha/255),w.material=E._color.createColor(w.material.red,w.material.green,w.material.blue,w.material.alpha))}else E._option.material&&(w.material=E._option.material),w.material&&(E._core.isHtmlColor(w.material)?w.material=E._color.colorFromHtmlColor(w.material):(/^rgb/.test(w.material)&&(w.material=E._color.rgbaStringToRgbaObj(w.material)),w.material.red>1&&(w.material.red=w.material.red/255),w.material.green>1&&(w.material.green=w.material.green/255),w.material.blue>1&&(w.material.blue=w.material.blue/255),w.material.alpha>1&&(w.material.a=w.material.alpha/255),w.material=E._color.createColor(w.material.red,w.material.green,w.material.blue,w.material.alpha)));var ce=E._cesium.Cartesian3.fromDegreesArrayHeights(oe);w.polygonHierarchy=new E._cesium.PolygonHierarchy(ce);var j=new E._cesium.PolygonGeometry(w),de=new Cesium.GeometryInstance({id:k,geometry:j,attributes:{color:new E._cesium.ColorGeometryInstanceAttribute.fromColor(E._option.randomColor?Cesium.Color.fromRandom().withAlpha(w.material.alpha):w.material)}});F.push(de);var me={positions:ce,width:E._option.width},_e=new E._cesium.GroundPolylineGeometry(me),Be=new E._cesium.GeometryInstance({geometry:_e});L.push(Be);var Qe="material:"+w.material.red*255+","+w.material.green*255+","+w.material.blue*255;E.Legend.push(Qe)}}),F.length>0&&(w.extrudedHeight?R.add(new E._cesium.Primitive({geometryInstances:F,appearance:new E._cesium.PerInstanceColorAppearance({translucent:!1,vertexShaderSource:E._core.Shaders("vertexShaderSource"),fragmentShaderSource:E._core.Shaders("fragmentShaderSource")})})):R.add(new E._cesium.GroundPrimitive({geometryInstances:F,appearance:new E._cesium.PerInstanceColorAppearance({translucent:!0,vertexShaderSource:E._core.Shaders("vertexShaderSource")})}))),L.length>0&&R.add(new E._cesium.GroundPolylinePrimitive({geometryInstances:L,appearance:new E._cesium.PolylineMaterialAppearance({material:new E._cesium.Material({fabric:{type:"Color",uniforms:{color:E._option.outlineColor}}})}),shadows:E._cesium.ShadowMode.ENABLED})),R},this.item=Q._primitiveCollection,Q.addTo(this._viewer),C||this.setVisibility(!1),this._core.isnull(w.id)&&(w.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+w.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var M={id:w.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f};return this.setTreeobj(M),this._tree.insertGroupId(M,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};Qp.prototype.setTreeobj=function(o){this.treeobj=o};Qp.prototype.createPolygonVectorFeatureLayerProvider=function(o,A,f,m,C){var y={polygonHierarchy:void 0,height:0,extrudedHeight:0,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,perPositionHeight:!0,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.WHITE,show:!0},x={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a))));var v=this._core.extend(y,f,!0),E=this,I=new IA(this._viewer,this._cesium,x);this._Provider=I,I._loadTile=function(Q){var M=[];E.Legend=[],Q.features.forEach(function(T){var D=[];function F(q){for(var ie=0;ie<q.length;ie++)Array.isArray(q[ie])?F(q[ie]):D.push(q[ie])}F(T.geometry.coordinates[0]);var L=E._cesium.Cartesian3.fromDegreesArray(D);if(/^\[/.test(f.extrudedHeight)&&/\]$/.test(f.extrudedHeight)){var R=f.extrudedHeight.replace(/\[/,"").replace(/\]/,"");v.extrudedHeight=parseFloat(T.properties[R])}v.polygonHierarchy=new E._cesium.PolygonHierarchy(L);var k=new E._cesium.PolygonGeometry(v),U=E._cesium.PolygonGeometry.createGeometry(k),V="material:"+v.material.red*255+","+v.material.green*255+","+v.material.blue*255;E.Legend.push(V);var H=new E._cesium.GeometryInstance({geometry:U,attributes:{color:new E._cesium.ColorGeometryInstanceAttribute.fromColor(v.material)},shadows:E._cesium.ShadowMode.ENABLED});M.push(H)});var B=new this._cesium.Primitive({allowPicking:!1,appearance:new this._cesium.PerInstanceColorAppearance({translucent:!1,flat:!0,faceForward:!0,closed:!0}),geometryInstances:M});return B},this.item=I._primitiveCollection,I.addTo(this._viewer),this._core.isnull(v.id)&&(v.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+v.id);var w={id:v.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f};this.setTreeobj(w),this._tree.insertGroupId(w,this._core.isnull(m)?0:m),typeof C=="function"&&C(this.item)};Qp.prototype.createPolygonVectorMonomerFeatureLayerProvider=function(o,A,f,m,C){var y={polygonHierarchy:void 0,height:0,extrudedHeight:0,vertexFormat:this._cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:this._cesium.Ellipsoid.WGS84,perPositionHeight:!0,closeTop:!0,closeBottom:!0,arcType:this._cesium.ArcType.GEODESIC,material:this._cesium.Color.WHITE,show:!0},x={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a))));var v=this._core.extend(y,f,!0),E=new IA(this._viewer,this._cesium,x);this._Provider=E;var I=this;E._loadTile=function(Q){var M=[];Q.features.forEach(function(T){var D=[];function F(V){for(var H=0;H<V.length;H++)Array.isArray(V[H])?F(V[H]):D.push(V[H])}F(T.geometry.coordinates[0]);var L=I._cesium.Cartesian3.fromDegreesArray(D);if(/^\[/.test(f.extrudedHeight)&&/\]$/.test(f.extrudedHeight)){var R=f.extrudedHeight.replace(/\[/,"").replace(/\]/,"");v.extrudedHeight=parseFloat(T.properties[R])}v.polygonHierarchy=new I._cesium.PolygonHierarchy(L);var k=new I._cesium.PolygonGeometry(v),U=new I._cesium.GeometryInstance({geometry:k,attributes:{color:I._cesium.ColorGeometryInstanceAttribute.fromColor(I._cesium.Color.fromCssColorString("#004FFF").withAlpha(.5)),show:new I._cesium.ShowGeometryInstanceAttribute(!0)}});M.push(U)});var B=new I._cesium.GroundPrimitive({classificationType:I._cesium.ClassificationType.BOTH,geometryInstances:M});return B},this.item=E._primitiveCollection,E.addTo(this._viewer),this._core.isnull(v.id)&&(v.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+v.id);var w={id:v.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polygonLayer",item:this,url:A.url,style:f};this.setTreeobj(w),this._tree.insertGroupId(w,this._core.isnull(m)?0:m),typeof C=="function"&&C(this.item)};Qp.prototype.getLegend=function(){var o=[];return this.Legend!=null&&(o=this._core.unique(this.Legend)),o};Qp.prototype.export=function(){var o=this.item.show==null?void 0:this.item.show,A=this.treeobj.url;return{type:this.treeobj.type,treeobj:{name:this.treeobj.name,pId:this.treeobj.pId},style:{show:o,url:A}}};var VQ=Qp;var oV={};oV.read=function(o,A,f,m,C){var y,x,v=C*8-m-1,E=(1<<v)-1,I=E>>1,w=-7,Q=f?C-1:0,M=f?-1:1,B=o[A+Q];for(Q+=M,y=B&(1<<-w)-1,B>>=-w,w+=v;w>0;y=y*256+o[A+Q],Q+=M,w-=8);for(x=y&(1<<-w)-1,y>>=-w,w+=m;w>0;x=x*256+o[A+Q],Q+=M,w-=8);if(y===0)y=1-I;else{if(y===E)return x?NaN:(B?-1:1)*(1/0);x=x+Math.pow(2,m),y=y-I}return(B?-1:1)*x*Math.pow(2,y-m)};oV.write=function(o,A,f,m,C,y){var x,v,E,I=y*8-C-1,w=(1<<I)-1,Q=w>>1,M=C===23?Math.pow(2,-24)-Math.pow(2,-77):0,B=m?0:y-1,T=m?1:-1,D=A<0||A===0&&1/A<0?1:0;for(A=Math.abs(A),isNaN(A)||A===1/0?(v=isNaN(A)?1:0,x=w):(x=Math.floor(Math.log(A)/Math.LN2),A*(E=Math.pow(2,-x))<1&&(x--,E*=2),x+Q>=1?A+=M/E:A+=M*Math.pow(2,1-Q),A*E>=2&&(x++,E/=2),x+Q>=w?(v=0,x=w):x+Q>=1?(v=(A*E-1)*Math.pow(2,C),x=x+Q):(v=A*Math.pow(2,Q-1)*Math.pow(2,C),x=0));C>=8;o[f+B]=v&255,B+=T,v/=256,C-=8);for(x=x<<C|v,I+=C;I>0;o[f+B]=x&255,B+=T,x/=256,I-=8);o[f+B-T]|=D*128};function A0(o){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(o)?o:new Uint8Array(o||0),this.pos=0,this.type=0,this.length=this.buf.length}A0.Varint=0;A0.Fixed64=1;A0.Bytes=2;A0.Fixed32=5;var VMe=(1<<16)*(1<<16),odt=1/VMe;A0.prototype={destroy:function(){this.buf=null},readFields:function(o,A,f){for(f=f||this.length;this.pos<f;){var m=this.readVarint(),C=m>>3,y=this.pos;this.type=m&7,o(C,A,this),this.pos===y&&this.skip(m)}return A},readMessage:function(o,A){return this.readFields(o,A,this.readVarint()+this.pos)},readFixed32:function(){var o=gle(this.buf,this.pos);return this.pos+=4,o},readSFixed32:function(){var o=sdt(this.buf,this.pos);return this.pos+=4,o},readFixed64:function(){var o=gle(this.buf,this.pos)+gle(this.buf,this.pos+4)*VMe;return this.pos+=8,o},readSFixed64:function(){var o=gle(this.buf,this.pos)+sdt(this.buf,this.pos+4)*VMe;return this.pos+=8,o},readFloat:function(){var o=oV.read(this.buf,this.pos,!0,23,4);return this.pos+=4,o},readDouble:function(){var o=oV.read(this.buf,this.pos,!0,52,8);return this.pos+=8,o},readVarint:function(o){var A=this.buf,f,m;return m=A[this.pos++],f=m&127,m<128||(m=A[this.pos++],f|=(m&127)<<7,m<128)||(m=A[this.pos++],f|=(m&127)<<14,m<128)||(m=A[this.pos++],f|=(m&127)<<21,m<128)?f:(m=A[this.pos],f|=(m&15)<<28,mNi(f,o,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var o=this.readVarint();return o%2===1?(o+1)/-2:o/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var o=this.readVarint()+this.pos,A=DNi(this.buf,this.pos,o);return this.pos=o,A},readBytes:function(){var o=this.readVarint()+this.pos,A=this.buf.subarray(this.pos,o);return this.pos=o,A},readPackedVarint:function(o,A){var f=JP(this);for(o=o||[];this.pos<f;)o.push(this.readVarint(A));return o},readPackedSVarint:function(o){var A=JP(this);for(o=o||[];this.pos<A;)o.push(this.readSVarint());return o},readPackedBoolean:function(o){var A=JP(this);for(o=o||[];this.pos<A;)o.push(this.readBoolean());return o},readPackedFloat:function(o){var A=JP(this);for(o=o||[];this.pos<A;)o.push(this.readFloat());return o},readPackedDouble:function(o){var A=JP(this);for(o=o||[];this.pos<A;)o.push(this.readDouble());return o},readPackedFixed32:function(o){var A=JP(this);for(o=o||[];this.pos<A;)o.push(this.readFixed32());return o},readPackedSFixed32:function(o){var A=JP(this);for(o=o||[];this.pos<A;)o.push(this.readSFixed32());return o},readPackedFixed64:function(o){var A=JP(this);for(o=o||[];this.pos<A;)o.push(this.readFixed64());return o},readPackedSFixed64:function(o){var A=JP(this);for(o=o||[];this.pos<A;)o.push(this.readSFixed64());return o},skip:function(o){var A=o&7;if(A===A0.Varint)for(;this.buf[this.pos++]>127;);else if(A===A0.Bytes)this.pos=this.readVarint()+this.pos;else if(A===A0.Fixed32)this.pos+=4;else if(A===A0.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+A)},writeTag:function(o,A){this.writeVarint(o<<3|A)},realloc:function(o){for(var A=this.length||16;A<this.pos+o;)A*=2;if(A!==this.length){var f=new Uint8Array(A);f.set(this.buf),this.buf=f,this.length=A}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(o){this.realloc(4),nV(this.buf,o,this.pos),this.pos+=4},writeSFixed32:function(o){this.realloc(4),nV(this.buf,o,this.pos),this.pos+=4},writeFixed64:function(o){this.realloc(8),nV(this.buf,o&-1,this.pos),nV(this.buf,Math.floor(o*odt),this.pos+4),this.pos+=8},writeSFixed64:function(o){this.realloc(8),nV(this.buf,o&-1,this.pos),nV(this.buf,Math.floor(o*odt),this.pos+4),this.pos+=8},writeVarint:function(o){if(o=+o||0,o>268435455||o<0){CNi(o,this);return}this.realloc(4),this.buf[this.pos++]=o&127|(o>127?128:0),!(o<=127)&&(this.buf[this.pos++]=(o>>>=7)&127|(o>127?128:0),!(o<=127)&&(this.buf[this.pos++]=(o>>>=7)&127|(o>127?128:0),!(o<=127)&&(this.buf[this.pos++]=o>>>7&127)))},writeSVarint:function(o){this.writeVarint(o<0?-o*2-1:o*2)},writeBoolean:function(o){this.writeVarint(Boolean(o))},writeString:function(o){o=String(o),this.realloc(o.length*4),this.pos++;var A=this.pos;this.pos=TNi(this.buf,o,this.pos);var f=this.pos-A;f>=128&&adt(A,f,this),this.pos=A-1,this.writeVarint(f),this.pos+=f},writeFloat:function(o){this.realloc(4),oV.write(this.buf,o,this.pos,!0,23,4),this.pos+=4},writeDouble:function(o){this.realloc(8),oV.write(this.buf,o,this.pos,!0,52,8),this.pos+=8},writeBytes:function(o){var A=o.length;this.writeVarint(A),this.realloc(A);for(var f=0;f<A;f++)this.buf[this.pos++]=o[f]},writeRawMessage:function(o,A){this.pos++;var f=this.pos;o(A,this);var m=this.pos-f;m>=128&&adt(f,m,this),this.pos=f-1,this.writeVarint(m),this.pos+=m},writeMessage:function(o,A,f){this.writeTag(o,A0.Bytes),this.writeRawMessage(A,f)},writePackedVarint:function(o,A){this.writeMessage(o,vNi,A)},writePackedSVarint:function(o,A){this.writeMessage(o,ENi,A)},writePackedBoolean:function(o,A){this.writeMessage(o,BNi,A)},writePackedFloat:function(o,A){this.writeMessage(o,INi,A)},writePackedDouble:function(o,A){this.writeMessage(o,_Ni,A)},writePackedFixed32:function(o,A){this.writeMessage(o,wNi,A)},writePackedSFixed32:function(o,A){this.writeMessage(o,bNi,A)},writePackedFixed64:function(o,A){this.writeMessage(o,QNi,A)},writePackedSFixed64:function(o,A){this.writeMessage(o,SNi,A)},writeBytesField:function(o,A){this.writeTag(o,A0.Bytes),this.writeBytes(A)},writeFixed32Field:function(o,A){this.writeTag(o,A0.Fixed32),this.writeFixed32(A)},writeSFixed32Field:function(o,A){this.writeTag(o,A0.Fixed32),this.writeSFixed32(A)},writeFixed64Field:function(o,A){this.writeTag(o,A0.Fixed64),this.writeFixed64(A)},writeSFixed64Field:function(o,A){this.writeTag(o,A0.Fixed64),this.writeSFixed64(A)},writeVarintField:function(o,A){this.writeTag(o,A0.Varint),this.writeVarint(A)},writeSVarintField:function(o,A){this.writeTag(o,A0.Varint),this.writeSVarint(A)},writeStringField:function(o,A){this.writeTag(o,A0.Bytes),this.writeString(A)},writeFloatField:function(o,A){this.writeTag(o,A0.Fixed32),this.writeFloat(A)},writeDoubleField:function(o,A){this.writeTag(o,A0.Fixed64),this.writeDouble(A)},writeBooleanField:function(o,A){this.writeVarintField(o,Boolean(A))}};function mNi(o,A,f){var m=f.buf,C,y;if(y=m[f.pos++],C=(y&112)>>4,y<128||(y=m[f.pos++],C|=(y&127)<<3,y<128)||(y=m[f.pos++],C|=(y&127)<<10,y<128)||(y=m[f.pos++],C|=(y&127)<<17,y<128)||(y=m[f.pos++],C|=(y&127)<<24,y<128)||(y=m[f.pos++],C|=(y&1)<<31,y<128))return rV(o,C,A);throw new Error("Expected varint not more than 10 bytes")}function JP(o){return o.type===A0.Bytes?o.readVarint()+o.pos:o.pos+1}function rV(o,A,f){return f?A*4294967296+(o>>>0):(A>>>0)*4294967296+(o>>>0)}function CNi(o,A){var f,m;if(o>=0?(f=o%4294967296|0,m=o/4294967296|0):(f=~(-o%4294967296),m=~(-o/4294967296),f^4294967295?f=f+1|0:(f=0,m=m+1|0)),o>=18446744073709552e3||o<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");A.realloc(10),yNi(f,m,A),xNi(m,A)}function yNi(o,A,f){f.buf[f.pos++]=o&127|128,o>>>=7,f.buf[f.pos++]=o&127|128,o>>>=7,f.buf[f.pos++]=o&127|128,o>>>=7,f.buf[f.pos++]=o&127|128,o>>>=7,f.buf[f.pos]=o&127}function xNi(o,A){var f=(o&7)<<4;A.buf[A.pos++]|=f|((o>>>=3)?128:0),o&&(A.buf[A.pos++]=o&127|((o>>>=7)?128:0),o&&(A.buf[A.pos++]=o&127|((o>>>=7)?128:0),o&&(A.buf[A.pos++]=o&127|((o>>>=7)?128:0),o&&(A.buf[A.pos++]=o&127|((o>>>=7)?128:0),o&&(A.buf[A.pos++]=o&127)))))}function adt(o,A,f){var m=A<=16383?1:A<=2097151?2:A<=268435455?3:Math.ceil(Math.log(A)/(Math.LN2*7));f.realloc(m);for(var C=f.pos-1;C>=o;C--)f.buf[C+m]=f.buf[C]}function vNi(o,A){for(var f=0;f<o.length;f++)A.writeVarint(o[f])}function ENi(o,A){for(var f=0;f<o.length;f++)A.writeSVarint(o[f])}function INi(o,A){for(var f=0;f<o.length;f++)A.writeFloat(o[f])}function _Ni(o,A){for(var f=0;f<o.length;f++)A.writeDouble(o[f])}function BNi(o,A){for(var f=0;f<o.length;f++)A.writeBoolean(o[f])}function wNi(o,A){for(var f=0;f<o.length;f++)A.writeFixed32(o[f])}function bNi(o,A){for(var f=0;f<o.length;f++)A.writeSFixed32(o[f])}function QNi(o,A){for(var f=0;f<o.length;f++)A.writeFixed64(o[f])}function SNi(o,A){for(var f=0;f<o.length;f++)A.writeSFixed64(o[f])}function gle(o,A){return(o[A]|o[A+1]<<8|o[A+2]<<16)+o[A+3]*16777216}function nV(o,A,f){o[f]=A,o[f+1]=A>>>8,o[f+2]=A>>>16,o[f+3]=A>>>24}function sdt(o,A){return(o[A]|o[A+1]<<8|o[A+2]<<16)+(o[A+3]<<24)}function DNi(o,A,f){for(var m="",C=A;C<f;){var y=o[C],x=null,v=y>239?4:y>223?3:y>191?2:1;if(C+v>f)break;var E,I,w;v===1?y<128&&(x=y):v===2?(E=o[C+1],(E&192)===128&&(x=(y&31)<<6|E&63,x<=127&&(x=null))):v===3?(E=o[C+1],I=o[C+2],(E&192)===128&&(I&192)===128&&(x=(y&15)<<12|(E&63)<<6|I&63,(x<=2047||x>=55296&&x<=57343)&&(x=null))):v===4&&(E=o[C+1],I=o[C+2],w=o[C+3],(E&192)===128&&(I&192)===128&&(w&192)===128&&(x=(y&15)<<18|(E&63)<<12|(I&63)<<6|w&63,(x<=65535||x>=1114112)&&(x=null))),x===null?(x=65533,v=1):x>65535&&(x-=65536,m+=String.fromCharCode(x>>>10&1023|55296),x=56320|x&1023),m+=String.fromCharCode(x),C+=v}return m}function TNi(o,A,f){for(var m=0,C,y;m<A.length;m++){if(C=A.charCodeAt(m),C>55295&&C<57344)if(y)if(C<56320){o[f++]=239,o[f++]=191,o[f++]=189,y=C;continue}else C=y-55296<<10|C-56320|65536,y=null;else{C>56319||m+1===A.length?(o[f++]=239,o[f++]=191,o[f++]=189):y=C;continue}else y&&(o[f++]=239,o[f++]=191,o[f++]=189,y=null);C<128?o[f++]=C:(C<2048?o[f++]=C>>6|192:(C<65536?o[f++]=C>>12|224:(o[f++]=C>>18|240,o[f++]=C>>12&63|128),o[f++]=C>>6&63|128),o[f++]=C&63|128)}return f}var zMe=A0;function aV(o,A){this.x=o,this.y=A}aV.prototype={clone:function(){return new aV(this.x,this.y)},add:function(o){return this.clone()._add(o)},sub:function(o){return this.clone()._sub(o)},multByPoint:function(o){return this.clone()._multByPoint(o)},divByPoint:function(o){return this.clone()._divByPoint(o)},mult:function(o){return this.clone()._mult(o)},div:function(o){return this.clone()._div(o)},rotate:function(o){return this.clone()._rotate(o)},rotateAround:function(o,A){return this.clone()._rotateAround(o,A)},matMult:function(o){return this.clone()._matMult(o)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(o){return this.x===o.x&&this.y===o.y},dist:function(o){return Math.sqrt(this.distSqr(o))},distSqr:function(o){var A=o.x-this.x,f=o.y-this.y;return A*A+f*f},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(o){return Math.atan2(this.y-o.y,this.x-o.x)},angleWith:function(o){return this.angleWithSep(o.x,o.y)},angleWithSep:function(o,A){return Math.atan2(this.x*A-this.y*o,this.x*o+this.y*A)},_matMult:function(o){var A=o[0]*this.x+o[1]*this.y,f=o[2]*this.x+o[3]*this.y;return this.x=A,this.y=f,this},_add:function(o){return this.x+=o.x,this.y+=o.y,this},_sub:function(o){return this.x-=o.x,this.y-=o.y,this},_mult:function(o){return this.x*=o,this.y*=o,this},_div:function(o){return this.x/=o,this.y/=o,this},_multByPoint:function(o){return this.x*=o.x,this.y*=o.y,this},_divByPoint:function(o){return this.x/=o.x,this.y/=o.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var o=this.y;return this.y=this.x,this.x=-o,this},_rotate:function(o){var A=Math.cos(o),f=Math.sin(o),m=A*this.x-f*this.y,C=f*this.x+A*this.y;return this.x=m,this.y=C,this},_rotateAround:function(o,A){var f=Math.cos(o),m=Math.sin(o),C=A.x+f*(this.x-A.x)-m*(this.y-A.y),y=A.y+m*(this.x-A.x)+f*(this.y-A.y);return this.x=C,this.y=y,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}};aV.convert=function(o){return o instanceof aV?o:Array.isArray(o)?new aV(o[0],o[1]):o};function sV(o,A,f,m,C){this.properties={},this.extent=f,this.type=0,this._pbf=o,this._geometry=-1,this._keys=m,this._values=C,o.readFields(MNi,this,A)}function MNi(o,A,f){o==1?A.id=f.readVarint():o==2?PNi(f,A):o==3?A.type=f.readVarint():o==4&&(A._geometry=f.pos)}function PNi(o,A){for(var f=o.readVarint()+o.pos;o.pos<f;){var m=A._keys[o.readVarint()],C=A._values[o.readVarint()];A.properties[m]=C}}sV.types=["Unknown","Point","LineString","Polygon"];sV.prototype.loadGeometry=function(){var o=this._pbf;o.pos=this._geometry;for(var A=o.readVarint()+o.pos,f=1,m=0,C=0,y=0,x=[],v;o.pos<A;){if(m<=0){var E=o.readVarint();f=E&7,m=E>>3}if(m--,f===1||f===2)C+=o.readSVarint(),y+=o.readSVarint(),f===1&&(v&&x.push(v),v=[]),v.push(new aV(C,y));else if(f===7)v&&v.push(v[0].clone());else throw new Error("unknown command "+f)}return v&&x.push(v),x};sV.prototype.bbox=function(){var o=this._pbf;o.pos=this._geometry;for(var A=o.readVarint()+o.pos,f=1,m=0,C=0,y=0,x=1/0,v=-1/0,E=1/0,I=-1/0;o.pos<A;){if(m<=0){var w=o.readVarint();f=w&7,m=w>>3}if(m--,f===1||f===2)C+=o.readSVarint(),y+=o.readSVarint(),C<x&&(x=C),C>v&&(v=C),y<E&&(E=y),y>I&&(I=y);else if(f!==7)throw new Error("unknown command "+f)}return[x,E,v,I]};sV.prototype.toGeoJSON=function(o,A,f,m){var C=this.extent*Math.pow(2,f),y=this.extent*o,x=this.extent*A/2,v=this.loadGeometry(),E=sV.types[this.type],I,w;function Q(T){for(var D=0;D<T.length;D++){var F=T[D],L=90-(F.y+x)*180/(C/2);T[D]=[(F.x+y)*360/C-180,L]}}switch(this.type){case 1:var M=[];for(I=0;I<v.length;I++)M[I]=v[I][0];v=M,Q(v);break;case 2:for(I=0;I<v.length;I++)Q(v[I]);break;case 3:for(v=RNi(v),I=0;I<v.length;I++)for(w=0;w<v[I].length;w++)Q(v[I][w]);break}v.length===1?v=v[0]:E="Multi"+E;var B={type:"Feature",geometry:{type:E,coordinates:v},properties:this.properties};return"id"in this&&(B.id=this.id),B};function RNi(o){var A=o.length;if(A<=1)return[o];for(var f=[],m,C,y=0;y<A;y++){var x=LNi(o[y]);x!==0&&(C===void 0&&(C=x<0),C===x<0?(m&&f.push(m),m=[o[y]]):m.push(o[y]))}return m&&f.push(m),f}function LNi(o){for(var A=0,f=0,m=o.length,C=m-1,y,x;f<m;C=f++)y=o[f],x=o[C],A+=(x.x-y.x)*(y.y+x.y);return A}function ldt(o,A){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=o,this._keys=[],this._values=[],this._features=[],o.readFields(FNi,this,A),this.length=this._features.length}function FNi(o,A,f){o===15?A.version=f.readVarint():o===1?A.name=f.readString():o===5?A.extent=f.readVarint():o===2?A._features.push(f.pos):o===3?A._keys.push(f.readString()):o===4&&A._values.push(NNi(f))}function NNi(o){for(var A=null,f=o.readVarint()+o.pos;o.pos<f;){var m=o.readVarint()>>3;A=m===1?o.readString():m===2?o.readFloat():m===3?o.readDouble():m===4?o.readVarint64():m===5?o.readVarint():m===6?o.readSVarint():m===7?o.readBoolean():null}return A}ldt.prototype.feature=function(o){if(o<0||o>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[o];var A=this._pbf.readVarint()+this._pbf.pos;return new sV(this._pbf,A,this.extent,this._keys,this._values)};function kNi(o,A){this.layers=o.readFields(ONi,{},A)}function ONi(o,A,f){if(o===3){var m=new ldt(f,f.readVarint()+f.pos);m.length&&(A[m.name]=m)}}var KMe=kNi;function Bw(o,A){this._viewer=o,this._cesium=A,this._core=new pr(o,A),this._color=new Pn(this._viewer,this._cesium),this._tree=lt,this.item={show:!0},this._option=void 0,this._primitive=void 0,this._Provider=void 0,this.labelCollections=new this._cesium.PointPrimitiveCollection,this.geometries_line=[],this.geometries_polygon=[]}var UNi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o};Bw.prototype._serialize=function(o){var A=[],f=window.encodeURIComponent;for(var m in o){var C=o[m];(typeof C>"u"?"undefined":UNi(C))==="object"?A.push(f(m)+"="+f(JSON.stringify(C))):A.push(f(m)+"="+f(o[m]))}return A.join("&")};Bw.prototype.createVolumeVectorGeoJsonFeatureLayer=function(o,A,f,m,C){var y={show:!0,positions:[],shape:void 0,cornerType:this._cesium.CornerType.ROUNDED,granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.DISABLED,level_max:20,level_min:10},x={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};this.extent={XMin:A.minx||0,YMin:A.miny||0,XMax:A.maxx||0,YMax:A.maxy||0},!this._core.isnull(f)&&!this._core.isnull(f.fill)&&(f.fill.toString().charAt(0)=="["&&f.fill.toString().charAt(f.fill.length-1)=="]"||(this._core.isHtmlColor(f.fill)?f.fill=this._color.colorFromHtmlColor(f.fill):(/^rgb/.test(f.fill)&&(f.fill=this._color.rgbaStringToRgbaObj(f.fill)),f.fill.r>1&&(f.fill.r=f.fill.r/255),f.fill.g>1&&(f.fill.g=f.fill.g/255),f.fill.b>1&&(f.fill.b=f.fill.b/255),f.fill.a>1&&(f.fill.a=f.fill.a/255),f.fill=this._color.createColor(f.fill.r,f.fill.g,f.fill.b,f.fill.a)))),!this._core.isnull(f)&&!this._core.isnull(f.polylinefill)&&(f.polylinefill.toString().charAt(0)=="["&&f.polylinefill.toString().charAt(f.polylinefill.length-1)=="]"||(this._core.isHtmlColor(f.polylinefill)?f.polylinefill=this._color.colorFromHtmlColor(f.polylinefill):(/^rgb/.test(f.polylinefill)&&(f.polylinefill=this._color.rgbaStringToRgbaObj(f.polylinefill)),f.polylinefill.r>1&&(f.polylinefill.r=f.polylinefill.r/255),f.polylinefill.g>1&&(f.polylinefill.g=f.polylinefill.g/255),f.polylinefill.b>1&&(f.polylinefill.b=f.polylinefill.b/255),f.polylinefill.a>1&&(f.polylinefill.a=f.polylinefill.a/255),f.polylinefill=this._color.createColor(f.polylinefill.r,f.polylinefill.g,f.polylinefill.b,f.polylinefill.a)))),!this._core.isnull(f)&&!this._core.isnull(f.outlineColor)&&(f.outlineColor.toString().charAt(0)=="["&&f.outlineColor.toString().charAt(f.outlineColor.length-1)=="]"||(this._core.isHtmlColor(f.outlineColor)?f.outlineColor=this._color.colorFromHtmlColor(f.outlineColor):(/^rgb/.test(f.outlineColor)&&(f.outlineColor=this._color.rgbaStringToRgbaObj(f.outlineColor)),f.outlineColor.r>1&&(f.outlineColor.r=f.outlineColor.r/255),f.outlineColor.g>1&&(f.outlineColor.g=f.outlineColor.g/255),f.outlineColor.b>1&&(f.outlineColor.b=f.outlineColor.b/255),f.outlineColor.a>1&&(f.outlineColor.a=f.outlineColor.a/255),f.outlineColor=this._color.createColor(f.outlineColor.r,f.outlineColor.g,f.outlineColor.b,f.outlineColor.a)))),this._option=this._core.extend(y,f,!0),A==null&&console.log("url is required"),o==null&&console.log("layername is required");var v=this,E={polygonHierarchy:void 0,height:30,extrudedHeight:100,vertexFormat:Cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:Cesium.Ellipsoid.WGS84,perPositionHeight:!0,closeTop:!0,closeBottom:!0,arcType:Cesium.ArcType.GEODESIC,material:Cesium.Color.WHITE},I="http://124.128.48.210:81/arcgis/rest/services/Hosted/tdtsd0408/VectorTileServer/resources/styles/root.json";v._core.xhr({url:I,type:"get",dataType:"json",success:function(w){var Q=[],M=w.layers,B="http://124.128.48.210:81/arcgis/rest/services/Hosted/tdtsd0408/VectorTileServer/tile/0/0/0.pbf";Cesium.Resource.createIfNeeded(B).fetchArrayBuffer().then(function(T){function D(te){for(var Y=0;Y<te.length;Y++)Array.isArray(te[Y])?D(te[Y]):Q.push(te[Y])}function F(te){var Y=Cesium.Cartesian3.fromDegreesArray(te),he={positions:Y,width:10,color:Cesium.ColorGeometryInstanceAttribute.fromColor(v._option.polylinefill)},fe=new Cesium.PolylineGeometry(he),Ce=new Cesium.GeometryInstance({geometry:fe});V.push(Ce)}function L(te){var Y=new Cesium.PolygonGeometry({polygonHierarchy:new Cesium.PolygonHierarchy(Cesium.Cartesian3.fromDegreesArray(te))}),he=Cesium.PolygonGeometry.createGeometry(Y),fe=new Cesium.GeometryInstance({geometry:he,attributes:{color:W}});H.push(fe)}var R=new zMe(T),k=0,U=new KMe(R),V=[],H=[];v.labelCollections=new v._cesium.LabelCollection;for(var q in U.layers)for(var ie=U.layers[q],Z=0;Z<ie.length;Z++)for(var oe=ie.feature(Z),ne=oe.loadGeometry(),se=0;se<ne.length;se++)for(var ce=ne[se],j=0;j<ce.length;j++){var de=ce[j],me=null;if(oe.properties._symbol!=null)for(var _e=oe.properties._symbol,Be=0;Be<M.length;Be++)M[Be].filter!=null&&M[Be].filter[0]=="=="&&M[Be].filter[1]=="_symbol"&&M[Be].filter[2]==_e&&(me=M[Be]);else if(ie.name!=null)for(var Qe=ie.name,Be=0;Be<M.length;Be++)M[Be]["source-layer"]!=null&&M[Be]["source-layer"]==Qe&&(me=M[Be]);if(oe.type==1)try{var Ie=oe.toGeoJSON(0,0,0,v.extent);if(f.text!=null&&/^\[/.test(f.text)&&/\]$/.test(f.text)){var ve=f.text.replace(/\[/,"").replace(/\]/,"");v._option.text=oe.properties[ve]}me.paint!=null&&me.paint["icon-color"]&&(v._option.fill=v._color.createColorTransformation(me.paint["icon-color"])),v._option.position=new v._cesium.Cartesian3.fromDegrees(Ie.geometry.coordinates[0],Ie.geometry.coordinates[1],v._option.height);var K={};Ie.geometry.type=="point"?K={id:Ie,color:v._option.fill,position:v._option.position}:K=v._option,v.labelCollections.add(K)}catch{}if(oe.type==2){var de=ce[0],Ie=oe.toGeoJSON(0,0,0,v.extent);if(!v._core.isnull(f.polylinefill)&&me.paint!=null&&me.paint["icon-color"]&&(v._option.polylinefill=v._color.createColorTransformation(me.paint["icon-color"])),Array.isArray(Ie.geometry.coordinates)&&Ie.geometry.coordinates.length>0)if(Array.isArray(Ie.geometry.coordinates[0][0]))for(var se=0;se<Ie.geometry.coordinates.length;se++)Q=[],D(Ie.geometry.coordinates[se]),F(Q);else D(Ie.geometry.coordinates),F(Q)}if(oe.type==3)try{var de=ce[0],Ie=oe.toGeoJSON(0,0,0,v.extent),W=Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.AQUA);if(me.paint["fill-color"]!=null&&(W=Cesium.ColorGeometryInstanceAttribute.fromColor(v._color.createColorTransformation(me.paint["fill-color"]))),Array.isArray(Ie.geometry.coordinates)&&Ie.geometry.coordinates.length>0)if(Array.isArray(Ie.geometry.coordinates[0][0]))for(var se=0;se<Ie.geometry.coordinates.length;se++)Q=[],D(Ie.geometry.coordinates[se]),L(Q);else D(Ie.geometry.coordinates),L(Q)}catch{}}v.labelCollections.length>0&&v._viewer.scene.primitives.add(v.labelCollections),V.length>0&&v._viewer.scene.primitives.add(new Cesium.Primitive({geometryInstances:V,appearance:new Cesium.PolylineColorAppearance})),H.length>0&&v._viewer.scene.primitives.add(new Cesium.Primitive({geometryInstances:H,appearance:new v._cesium.MaterialAppearance({material:new Cesium.Material({fabric:{type:"Color",uniforms:{color:Cesium.Color.fromRandom({alpha:1})}}}),faceForward:!0,flat:!1}),shadows:Cesium.ShadowMode.ENABLED}))})}})};Bw.prototype.createVolumeVectorGeoJsonFeatureLayers=function(o,A,f,m,C){var y={show:!0,positions:[],shape:void 0,cornerType:this._cesium.CornerType.ROUNDED,granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.DISABLED,level_max:20,level_min:10},x={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};this.extent={XMin:A.minx||0,YMin:A.miny||0,XMax:A.maxx||0,YMax:A.maxy||0},!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a)))),this._option=this._core.extend(y,f,!0),A==null&&console.log("url is required"),o==null&&console.log("layername is required");var v=[],E={polygonHierarchy:void 0,height:0,extrudedHeight:100,vertexFormat:Cesium.VertexFormat.DEFAULT,stRotation:0,ellipsoid:Cesium.Ellipsoid.WGS84,perPositionHeight:!0,closeTop:!0,closeBottom:!0,arcType:Cesium.ArcType.GEODESIC,material:Cesium.Color.WHITE},I=this;this._urlTemplate=A.url+"?"+this._serialize(x.urlParams),this._Provider=new Ts(this._viewer,this._cesium),this._Provider._normalTile=styleOption.level_max-1,this._Provider.loadTile=function(M,B){if(this.tile=B,B.state===Cesium.QuadtreeTileLoadState.START&&I.item.show)if(B.data={lines:[],geometryPrimitive:void 0},B.level>=f.level_min&&B.level<f.level_max){var T=Vi.filter(v,function(D){return D.x==B.x&&D.y==B.y&&D.level==B.level});if(T.length!=0&&T[0].data&&T[0].data.length>0){B.data.geometryPrimitive=new Cesium.Primitive({geometryInstances:T[0].data,appearance:new Cesium.PerInstanceColorAppearance({flat:!0,translucent:!0,faceForward:!0,closed:!0}),shadows:Cesium.ShadowMode.ENABLED}),B.state=Cesium.QuadtreeTileLoadState.LOADING,B.state===Cesium.QuadtreeTileLoadState.LOADING&&(B.data.geometryPrimitive&&B.data.geometryPrimitive.update(M,[]),B.state=Cesium.QuadtreeTileLoadState.DONE,B.renderable=!0);return}(function(D){var F="http://124.128.48.210:81/arcgis/rest/services/Hosted/tdtsd0408/VectorTileServer/tile/0/0/0.pbf";Cesium.Resource.createIfNeeded(F).fetchArrayBuffer().then(function(L){var R=new zMe(L),k=new KMe(R);I.labelCollections=new I._cesium.PointPrimitiveCollection;var U=[],V=[];for(var H in k.layers)for(var q=k.layers[H],ie=0;ie<q.length;ie++)for(var Z=q.feature(ie),oe=Z.loadGeometry(),ne=0;ne<oe.length;ne++)for(var se=oe[ne],ce=0;ce<se.length;ce++){var j=se[ce];if(Z.type==1)try{var de=Z.toGeoJSON(0,0,0,I.extent);if(I._option.text!=null&&/^\[/.test(I._option.text)&&/\]$/.test(I._option.text)){var me=I._option.text.replace(/\[/,"").replace(/\]/,"");E.text=Z.properties[me]}E.position=new I._cesium.Cartesian3.fromDegrees(de.geometry.coordinates[0],de.geometry.coordinates[1],E.height);var _e={};de.geometry.type=="point"?_e={id:de,color:E.material,position:E.position}:_e=E,I.labelCollections.add(_e)}catch{}if(Z.type==2)for(var j=se[0],de=Z.toGeoJSON(D.x,D.y,D.level,I.extent),ce=0;ce<de.geometry.coordinates.length;ce++)try{var Be=[];de.geometry.coordinates[ce].forEach(function(he){Be.push(he[0],he[1])});var Qe=new Cesium.PolylineGeometry({positions:Cesium.Cartesian3.fromDegreesArray(Be),width:10}),Ie=Cesium.PolylineGeometry.createGeometry(Qe),ve=new Cesium.GeometryInstance({geometry:Ie});U.push(ve)}catch{}if(Z.type==3)for(var j=se[0],de=Z.toGeoJSON(D.x,D.y,D.level,I.extent),ce=0;ce<de.geometry.coordinates.length;ce++)try{var Be=[];de.geometry.coordinates[ce].forEach(function(Ee){Be.push(Ee[0],Ee[1])});var K=new Cesium.PolygonGeometry({polygonHierarchy:new Cesium.PolygonHierarchy(Cesium.Cartesian3.fromDegreesArray(Be))}),Ie=Cesium.PolygonGeometry.createGeometry(K),ve=new Cesium.GeometryInstance({geometry:Ie});V.push(ve)}catch{}}I.labelCollections.length>0&&I._viewer.scene.primitives.add(I.labelCollections),U.length>0&&I._viewer.scene.primitives.add(new Cesium.Primitive({geometryInstances:U,appearance:new I._cesium.MaterialAppearance({material:new Cesium.Material({fabric:{type:"Color",uniforms:{color:Cesium.Color.fromRandom({alpha:1})}}}),faceForward:!0,flat:!1}),shadows:Cesium.ShadowMode.ENABLED})),V.length>0&&I._viewer.scene.primitives.add(new Cesium.Primitive({geometryInstances:V,appearance:new I._cesium.MaterialAppearance({material:new Cesium.Material({fabric:{type:"Color",uniforms:{color:Cesium.Color.fromRandom({alpha:1})}}}),faceForward:!0,flat:!1}),shadows:Cesium.ShadowMode.ENABLED}))})})(B)}else{B.state=Cesium.QuadtreeTileLoadState.LOADING,B.state===Cesium.QuadtreeTileLoadState.LOADING&&(B.data.geometryPrimitive&&(B.data.geometryPrimitive.update(M,[]),B._parent&&B._parent.data&&B._parent.data.geometryPrimitive&&(B._parent.data.geometryPrimitive.destroy(),B._parent.data.geometryPrimitive=null,B._parent.state=Cesium.QuadtreeTileLoadState.START),B._southwestChild&&B._southwestChild.data&&B._southwestChild.data.geometryPrimitive&&(B._southwestChild.data.geometryPrimitive.destroy(),B._southwestChild.data.geometryPrimitive=null,B._southwestChild.state=Cesium.QuadtreeTileLoadState.START),B._southeastChild&&B._southeastChild.data&&B._southeastChild.data.geometryPrimitive&&(B._southeastChild.data.geometryPrimitive.destroy(),B._southeastChild.data.geometryPrimitive=null,B._southeastChild.state=Cesium.QuadtreeTileLoadState.START),B._northwestChild&&B._northwestChild.data&&B._northwestChild.data.geometryPrimitive&&(B._northwestChild.data.geometryPrimitive.destroy(),B._northwestChild.data.geometryPrimitive=null,B._northwestChild.state=Cesium.QuadtreeTileLoadState.START),B._northeastChild&&B._northeastChild.data&&B._northeastChild.data.geometryPrimitive&&(B._northeastChild.data.geometryPrimitive.destroy(),B._northeastChild.data.geometryPrimitive=null,B._northeastChild.state=Cesium.QuadtreeTileLoadState.START)),B.state=Cesium.QuadtreeTileLoadState.DONE,B.renderable=!0);return}},this._primitive=new I._cesium.QuadtreePrimitive({tileProvider:this._Provider});var w=this._viewer.scene,Q=w.primitives;Q.add(this._primitive)};Bw.prototype.createVolumeGeoJsonFeatureLayer=function(o,A,f,m,C){var y={polylinePositions:void 0,shapePositions:void 0,ellipsoid:this._cesium.Ellipsoid.WGS84,granularity:this._cesium.Math.RADIANS_PER_DEGREE,vertexFormat:this._cesium.VertexFormat.DEFAULT,cornerType:this._cesium.CornerType.ROUNDED};A==null&&console.log("geojson is required");var x=null;A.then?x=A:x=this._cesium.GeoJsonDataSource.load(A);var v=this,E=[];y.shapePositions=this.computeCircle(f.radius),x.then(function(w){var Q=v._cesium.Color.WHITE;!v._core.isnull(f)&&!v._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"?Q=f.material.replace(/\[/,"").replace("/]/",""):Q=Vi.clone(f.material),v._core.isHtmlColor(Q)?Q=v._color.colorFromHtmlColor(f.material):(/^rgb/.test(Q)&&(Q=v._color.rgbaStringToRgbaObj(Q)),Q.r>1&&(Q.r=Q.r/255),Q.g>1&&(Q.g=Q.g/255),Q.b>1&&(Q.b=Q.b/255),Q.a>1&&(Q.a=Q.a/255),Q=v._color.createColor(Q.r,Q.g,Q.b,Q.a)));for(var M=w.entities.values,B=0;B<M.length;B++){var T=M[B];y.polylinePositions=T.polyline.positions._value;var D=new v._cesium.PolylineVolumeGeometry(y),F=v._cesium.PolylineVolumeGeometry.createGeometry(D),L=new v._cesium.GeometryInstance({geometry:F});E.push(L)}var R=v._viewer.scene.primitives.add(new v._cesium.Primitive({geometryInstances:E,appearance:new v._cesium.MaterialAppearance({material:new v._cesium.Material({fabric:{type:"Color",uniforms:{color:Q}}}),faceForward:!0,flat:!1})}));v.item=R,f.show==!1&&(R.show=!1),typeof C=="function"&&C(R)}),this._core.isnull(f.id)&&(f.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u7BA1\u72B6\u56FE\u5C42"+f.id);var I={id:f.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polylineVolumeLayer",item:this,url:geoOptions.url,style:f};return this.setTreeobj(I),this._tree.insertGroupId(I,this._core.isnull(m)?0:m),this};Bw.prototype.computeCircle=function(o){this._core.isnull(o)&&(o=4);for(var A=[],f=0;f<360;f++){var m=this._cesium.Math.toRadians(f);A.push(new this._cesium.Cartesian2(o*Math.cos(m),o*Math.sin(m)))}return A};Bw.prototype.createVolumeGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y){var x={show:!0,positions:[],shape:void 0,cornerType:this._cesium.CornerType.ROUNDED,granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.RECEIVE_ONLY},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a))));var E=this._core.extend(x,f,!0),I=new IA(this._viewer,this._cesium,v);this._Provider=I;var w=this;I._loadTile=function(M){var B=[],T=new w._cesium.PrimitiveCollection;return M.features.forEach(function(D){var F=[];function L(_e){for(var Be=0;Be<_e.length;Be++)Array.isArray(_e[Be])?L(_e[Be]):F.push(_e[Be])}var R=[];if(/^\[/.test(f.material)&&/\]$/.test(f.material)){var k=f.material.replace(/\[/,"").replace(/\]/,"");E.material=D.properties[k],that._core.isHtmlColor(E.material)?E.material=that._color.colorFromHtmlColor(E.material):(/^rgb/.test(E.material)&&(E.material=that._color.rgbaStringToRgbaObj(E.material)),E.material.r>1&&(E.material.r=E.material.r/255),E.material.g>1&&(E.material.g=E.material.g/255),E.material.b>1&&(E.material.b=E.material.b/255),E.material.a>1&&(E.material.a=E.material.a/255),E.material=that._color.createColor(E.material.r,E.material.g,E.material.b,E.material.a))}for(var U=0;U<D.geometry.coordinates.length;U++){var V=D.geometry.coordinates[U];if(V.length>0)if(Array.isArray(V[0]))for(var H=0;H<V.length;H++){var q=V[H],ie=w._cesium.Cartesian3.fromDegrees(q[0],q[1],E.height);R.push(ie)}else{var Z=w._cesium.Cartesian3.fromDegrees(V[0],V[1],E.height);R.push(Z)}}if(E.position=R,E.slttype=="0"||E.slttype==0)E.shape=w._core.computeCircle(E.radius);else if(E.slttype=="1"||E.slttype==1)E.shape=w._core.starPositions(E.number,E.exradius,E.inradius);else if(E.slttype=="2"||E.slttype==2){var oe=E.orth_width/2,ne=E.orth_height/2;E.shape=[new w._cesium.Cartesian2(-oe,-ne),new w._cesium.Cartesian2(oe,-ne),new w._cesium.Cartesian2(oe,ne),new w._cesium.Cartesian2(-oe,ne)]}D.positions=R;var se={polylinePositions:E.position,shapePositions:E.shape,cornerType:E.cornerType,VertexFormat:{bitangent:!0,color:!0,position:!0,st:!0,normal:!0,tangent:!0}},ce=new w._cesium.PolylineVolumeGeometry(se),j=w._cesium.PolylineVolumeGeometry.createGeometry(ce),de=new w._cesium.GeometryInstance({id:D,geometry:j,attributes:{color:new w._cesium.ColorGeometryInstanceAttribute.fromColor(E.material)}}),me=new w._cesium.Primitive({allowPicking:!0,appearance:new w._cesium.MaterialAppearance({material:new w._cesium.Material({fabric:{type:"Color",uniforms:{color:E.material}}}),faceForward:!0,flat:!1}),shadows:E.shadows,geometryInstances:de});T.add(me)}),T},this.item=I._primitiveCollection,I.addTo(this._viewer),C||this.setVisibility(!1),this._core.isnull(E.id)&&(E.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u56FE\u5C42"+E.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var Q={id:E.id,name:o,checked:C,pId:this._core.isnull(m)?0:m,type:"polylineVolumeLayer",item:this,url:A.url,style:f};this.setTreeobj(Q),this._tree.insertGroupId(Q,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item)};Bw.prototype.setTreeobj=function(o){this.treeobj=o};Bw.prototype.export=function(){var o=this.item.show==null?void 0:this.item.show,A=this.treeobj.url;return{type:this.treeobj.type,treeobj:{name:this.treeobj.name,pId:this.treeobj.pId},style:{show:o,url:A}}};Bw.prototype.deleteObject=function(){this._viewer.scene.primitives.remove(this.item);try{this._Provider.remove()}catch{}};Bw.prototype.setRefresh=function(o){try{this._Provider&&this._Provider.setStatus(o)}catch{}};Bw.prototype.setVisibility=function(o){this.item.show=o,this._Provider&&this._Provider.setStatus(o)};var ple=Bw;function ww(o,A){this._viewer=o,this._cesium=A,this._core=new pr(o,A),this._color=new Pn(this._viewer,this._cesium),this._tree=lt,this._VectorTileProvider=new Ts(this._viewer,this._cesium),this._primitive=void 0,this._Provider=void 0,this.Legend=[]}ww.prototype.createWallGeoFeatureLayer=function(o,A,f,m,C,y,x){var v={positions:[],minimumHeights:[],maximumHeights:[],granularity:this._cesium.Math.RADIANS_PER_DEGREE,fill:!0,material:this._cesium.Color.WHITE,outline:!1,outlineColor:this._cesium.Color.BLACK,outlineWidth:1,shadows:this._cesium.ShadowMode.DISABLED};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a))));var E=this._core.extend(v,f,!0);this._core.isnull(m)&&(m=16),this._core.isnull(C)&&(C=14),A==null&&console.log("url is required"),o==null&&console.log("layername is required");var I=this,w=[];this._VectorTileProvider.loadTile=function(B,T){if(this.tile=T,T.state===I._cesium.QuadtreeTileLoadState.START)if(T.data={lines:[],geometryPrimitive:void 0},T.level>=C&&T.level<m){var D=Vi.filter(w,function(F){return F.x==T.x&&F.y==T.y&&F.level==T.level});if(D.length!=0&&D[0].data&&D[0].data.length>0){T.data.geometryPrimitive=new I._cesium.Primitive({geometryInstances:D[0].data,appearance:new I._cesium.PerInstanceColorAppearance({flat:!0,translucent:!0,faceForward:!0,closed:!0}),shadows:I._cesium.ShadowMode.ENABLED}),T.state=I._cesium.QuadtreeTileLoadState.LOADING,T.state===I._cesium.QuadtreeTileLoadState.LOADING&&(T.data.geometryPrimitive&&T.data.geometryPrimitive.update(B,[]),T.state=I._cesium.QuadtreeTileLoadState.DONE,T.renderable=!0);return}w.push({level:T.level,x:T.x,y:T.y,data:void 0}),function(F){I._core.xhr({url:A+"?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&LAYER="+o+"&STYLE=&TILEMATRIX=EPSG:4490:"+F.level+"&TILEMATRIXSET=EPSG:4490&FORMAT=application/json;type=geojson&TILECOL="+F.x+"&TILEROW="+F.y,type:"get",dataType:"json",success:function(L){var R=[];function k(Z){for(var oe=0;oe<Z.length;oe++)Array.isArray(Z[oe])?k(Z[oe]):V.push(Z[oe])}for(var U=0;U<L.features.length;U++){var V=[];k(L.features[U].geometry.coordinates[0]);var H=I._cesium.Cartesian3.fromDegreesArray(V);E.positions=H;var q=new I._cesium.GeometryInstance({geometry:new I._cesium.WallGeometry({positions:E.positions}),attributes:{color:new I._cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.WHITE)}});R.push(q)}var ie=Vi.filter(w,function(Z){return Z.x==F.x&&Z.y==F.y});ie[0].data=R,F.data.geometryPrimitive=new I._cesium.Primitive({geometryInstances:R,appearance:new I._cesium.PerInstanceColorAppearance({flat:!0,translucent:!0,faceForward:!0,closed:!0}),shadows:I._cesium.ShadowMode.ENABLED})},error:function(){w=Vi.remove(w,function(L){return L.x==F.x&&L.y==F.y&&L.level==F.level})},complete:function(){F.state=I._cesium.QuadtreeTileLoadState.LOADING,F.state===I._cesium.QuadtreeTileLoadState.LOADING&&(F.data.geometryPrimitive&&F.data.geometryPrimitive.update(B,[]),F.state=I._cesium.QuadtreeTileLoadState.DONE,F.renderable=!0)}})}(T)}else T.state=I._cesium.QuadtreeTileLoadState.LOADING,T.state===I._cesium.QuadtreeTileLoadState.LOADING&&(T.data.geometryPrimitive&&T.data.geometryPrimitive.update(B,[]),T.state=I._cesium.QuadtreeTileLoadState.DONE,T.renderable=!0)},this._primitive=new I._cesium.QuadtreePrimitive({tileProvider:this._VectorTileProvider});var Q=this._viewer.scene,M=Q.primitives;M.add(this._primitive)};ww.prototype.createWallPrimitiveGeoFeatureLayer=function(o,A,f,m,C,y){var x={positions:void 0,granularity:this._cesium.Math.RADIANS_PER_DEGREE,maximumHeights:0,minimumHeights:0,vertexFormat:this._cesium.VertexFormat.DEFAULT};A==null&&console.log("geojson is required");var v=null;A.then?v=A:v=this._cesium.GeoJsonDataSource.load(A);var E=this,I=[];v.then(function(Q){for(var M=Q.entities.values,B=0;B<M.length;B++){var T=M[B];x.positions=T.polyline.positions._value;var D=new Array(x.positions.length),F=new Array(x.positions.length),L=void 0,R=void 0;/^\[/.test(f.minimumHeights)?(L=f.minimumHeights.replace(/\[/,"").replace("/]/",""),L=T.properties[L]._value):L=f.minimumHeights,/^\[/.test(f.maximumHeights)?(R=f.maximumHeights.replace(/\[/,"").replace("/]/",""),R=T.properties[R]._value):R=f.maximumHeights,D.fill(L),F.fill(R),x.minimumHeights=D,x.maximumHeights=F;var k=E._cesium.Color.WHITE;!E._core.isnull(f)&&!E._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"?k=f.material.replace(/\[/,"").replace("/]/",""):k=Vi.clone(f.material),E._core.isHtmlColor(k)?k=E._color.colorFromHtmlColor(f.material):(/^rgb/.test(k)&&(k=E._color.rgbaStringToRgbaObj(k)),k.r>1&&(k.r=k.r/255),k.g>1&&(k.g=k.g/255),k.b>1&&(k.b=k.b/255),k.a>1&&(k.a=k.a/255),k=E._color.createColor(k.r,k.g,k.b,k.a)));var U="material:"+k.red*255+","+k.green*255+","+k.blue*255;E.Legend.push(U);var V=new E._cesium.GeometryInstance({id:T,geometry:new E._cesium.WallGeometry(x),attributes:{color:new E._cesium.ColorGeometryInstanceAttribute.fromColor(k)}});I.push(V)}var H;f&&f.time&&(H=new E._cesium.TimeIntervalCollection([new E._cesium.TimeInterval({start:f.time.start?E._cesium.JulianDate.fromDate(new Date(f.time.start)):E._cesium.Iso8601.MINIMUM_VALUE,stop:f.time.end?E._cesium.JulianDate.fromDate(new Date(f.time.end)):E._cesium.Iso8601.MAXIMUM_VALUE})]));var q=E._viewer.scene.primitives.add(new E._cesium.Primitive({geometryInstances:I,appearance:new E._cesium.PerInstanceColorAppearance({flat:!0,translucent:!0,faceForward:!0,closed:!0})}),H);E.item=q,C||_this.setVisibility(!1),typeof y=="function"&&y(q)}),this._core.isnull(f.id)&&(f.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u5899\u56FE\u5C42"+options.id);var w={id:f.id,name:o,pId:this._core.isnull(m)?0:m,type:"polylineWallLayer",item:this,url:A,style:options};return this.setTreeobj(w),this._tree.insertGroupId(w,this._core.isnull(m)?0:m),this};ww.prototype.createWallGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y){var x={positions:void 0,granularity:this._cesium.Math.RADIANS_PER_DEGREE,maximumHeights:0,minimumHeights:0,vertexFormat:this._cesium.VertexFormat.DEFAULT},v={url:A.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:A.layer,STYLE:"",TILEMATRIX:"EPSG:4490:{z}",TILEMATRIXSET:"EPSG:4490",FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:A.upperLevelLimit,lowerLevelLimit:A.lowerLevelLimit,rectangle:this._cesium.Rectangle.fromDegrees(A.minx,A.miny,A.maxx,A.maxy),Cesium:this._cesium};!this._core.isnull(f)&&!this._core.isnull(f.material)&&(f.material.toString().charAt(0)=="["&&f.material.toString().charAt(f.material.length-1)=="]"||(this._core.isHtmlColor(f.material)?f.material=this._color.colorFromHtmlColor(f.material):(/^rgb/.test(f.material)&&(f.material=this._color.rgbaStringToRgbaObj(f.material)),f.material.r>1&&(f.material.r=f.material.r/255),f.material.g>1&&(f.material.g=f.material.g/255),f.material.b>1&&(f.material.b=f.material.b/255),f.material.a>1&&(f.material.a=f.material.a/255),f.material=this._color.createColor(f.material.r,f.material.g,f.material.b,f.material.a))));var E=new IA(this._viewer,this._cesium,v);this._Provider=E;var I=this;E._loadTile=function(Q){var M=[];I.Legend=[];var B=new I._cesium.PrimitiveCollection;return Q.features.forEach(function(T){var D=[],F=!1;function L(U){for(var V=0;V<U.length;V++)Array.isArray(U[V])?L(U[V]):(D.push(U[V]),V===2&&!F&&(F=!0))}if(Array.isArray(T.geometry.coordinates)&&T.geometry.coordinates.length>0)if(Array.isArray(T.geometry.coordinates[0][0]))for(var R=0;R<T.geometry.coordinates.length;R++)D=[],L(T.geometry.coordinates[R]),k(D);else L(T.geometry.coordinates),k(D);function k(U){if(/^\[/.test(f.material)&&/\]$/.test(f.material)){var V=f.material.replace(/\[/,"").replace(/\]/,"");options.material=T.properties[V],I._core.isHtmlColor(options.material)?options.material=I._color.colorFromHtmlColor(options.material):(/^rgb/.test(options.material)&&(options.material=I._color.rgbaStringToRgbaObj(options.material)),options.material.r>1&&(options.material.r=options.material.r/255),options.material.g>1&&(options.material.g=options.material.g/255),options.material.b>1&&(options.material.b=options.material.b/255),options.material.a>1&&(options.material.a=options.material.a/255),options.material=I._color.createColor(options.material.r,options.material.g,options.material.b,options.material.a))}var H=F?I._cesium.Cartesian3.fromDegreesArrayHeights(U):I._cesium.Cartesian3.fromDegreesArray(U);x.positions=H,T.positions=H;var q=new Array(x.positions.length),ie=new Array(x.positions.length),Z=void 0,oe=void 0;/^\[/.test(f.minimumHeights)?(Z=f.minimumHeights.replace(/\[/,"").replace("/]/",""),Z=entity.properties[Z]._value):Z=f.minimumHeights,/^\[/.test(f.maximumHeights)?(oe=f.maximumHeights.replace(/\[/,"").replace("/]/",""),oe=entity.properties[oe]._value):oe=f.maximumHeights,q.fill(Z),ie.fill(oe),x.minimumHeights=q,x.maximumHeights=ie,T.treeID=f.id,T.VectorType="wall",T.VectorStyle={haveZ:F,minimumHeights:q,maximumHeights:ie,positions:U,material:f.material};var ne=new I._cesium.GeometryInstance({id:T,geometry:new I._cesium.WallGeometry(x),attributes:{color:new I._cesium.ColorGeometryInstanceAttribute.fromColor(f.material)}}),se="material:"+f.material.red*255+","+f.material.green*255+","+f.material.blue*255;I.Legend.push(se);var ce=new I._cesium.Primitive({geometryInstances:ne,appearance:new I._cesium.MaterialAppearance({material:new I._cesium.Material({fabric:{type:"Color",uniforms:{color:f.material}}}),faceForward:!0,flat:!1}),vertexCacheOptimize:!0,interleave:!0,shadows:I._cesium.ShadowMode.ENABLED});B.add(ce)}}),B},f&&f.time&&(E.availability=new I._cesium.TimeIntervalCollection([new I._cesium.TimeInterval({start:f.time.start?I._cesium.JulianDate.fromDate(new Date(f.time.start)):I._cesium.Iso8601.MINIMUM_VALUE,stop:f.time.end?I._cesium.JulianDate.fromDate(new Date(f.time.end)):I._cesium.Iso8601.MAXIMUM_VALUE})])),this.item=E._primitiveCollection,E.addTo(this._viewer),C||this.setVisibility(!1),this._core.isnull(f.id)&&(f.id=this._core.getuid()),this._core.isnull(o)&&(o="\u65B0\u5EFA\u5899\u56FE\u5C42"+f.id),this.west=A.minx,this.south=A.miny,this.east=A.maxx,this.north=A.maxy;var w={id:f.id,name:o,checked:!0,pId:this._core.isnull(m)?0:m,type:"polylineWallLayer",item:this,url:A.url,style:f};return this._Provider.treeID=f.id,this.setTreeobj(w),this._tree.insertGroupId(w,this._core.isnull(m)?0:m),typeof y=="function"&&y(this.item),this};ww.prototype.setTreeobj=function(o){this.treeobj=o};ww.prototype.deleteObject=function(){this._viewer.scene.primitives.remove(this.item);try{this._Provider.remove()}catch{}};ww.prototype.export=function(){var o=this.item.show==null?void 0:this.item.show,A=this.treeobj.url;return{type:this.treeobj.type,treeobj:{name:this.treeobj.name,pId:this.treeobj.pId},style:{show:o,url:A}}};ww.prototype.getLegend=function(){var o=[];return this.Legend!=null&&(o=this._core.unique(this.Legend)),o};ww.prototype.setRefresh=function(o){try{this._Provider&&this._Provider.setStatus(!o)}catch{}};ww.prototype.setVisibility=function(o){this.item.show=o,this._Provider&&this._Provider.setStatus(!o)};ww.prototype.edit=function(o,A){return this.isEditting=o,this.editoption=A,this._Provider&&this._Provider.edit&&this._Provider.edit(o,A)};ww.prototype.forceRefresh=function(){try{for(var o=0;o<this._Provider.quadtree._levelZeroTiles.length;o++)this._Provider.quadtree._levelZeroTiles[o].freeResources()}catch{}};var ej=ww;var Li=null;function zo(o,A){this._viewer=o,this._cesium=A,Li=A,this._core=new pr(o,A),this._tree=lt,this._getPosition=new $l(this._viewer,this._cesium),this._ModelEdit=new xW(this._viewer,this._cesium),this._popupmessage=new GQ(this._viewer,this._cesium),this._createGroup=new ZO(this._viewer,this._cesium),this._billboardGeoJsonFeatureLayer=new $W(this._viewer,this._cesium),this._GeoJsonFeatureLayer=new df(this._viewer,this._cesium),this._LabelGeoJsonFeatureLayercopy=new dI(this._viewer,this._cesium),this._VectorGeoJsonFeatureLayer=new Wf(this._viewer,this._cesium),this._PolylineGeoJsonFeatureLayer=new $O(this._viewer,this._cesium),this._PointModel=new HQ(this._viewer,this._cesium),this._PolygonGeoJsonFeatureLayer=new VQ(this._viewer,this._cesium),this._PolygonVectorTileLayerArcgis=new ple(this._viewer,this._cesium),this._WallGeoFeatureLayer=new ej(this._viewer,this._cesium),this.tooltip=this._core.CreateTooltip(),this.objectsToExclude=[],this.SimpleGraphicObj=[],!lt.editPointID&&(lt.editPointID={edit:[],size:[],move:void 0,height:[],add:[]}),this.editProp=!1,this.PrimitiveCollection=new Li.PrimitiveCollection,o.scene.primitives.add(this.PrimitiveCollection),this.SizeData=[],this.featuresPlotting=[],this.openEdit=!0}zo.prototype.createSimpleGraphic=function(o,A={},f){let m=null,C=(y,x)=>{if(y&&A.removeEdit&&this.SimpleGraphicObj.pop(),A.propData&&this.setPropData(y,A.propData),y){y.deleteObject=()=>{this.remove(y.id),this._viewer.entities.removeById(y.id)};let v={type:"FeatureCollection",features:[]},E=this.getStyle(y),I={id:y.id,name:y.name,type:E.type,style:E};v.features.push(I),y.json=v}this.defaultEdit(),f&&f(y,x)};switch(this._core.mouse(this._viewer.container,1,window.SmartEarthRootUrl+cn.draw),o){case"point":m=this.createPoint(A,C);break;case"billboard":m=this.createBillboard(A,C);break;case"label":m=this.createLabel(A,C);break;case"model":m=this.createModel(A,C);break;case"polyline":m=this.createPolyline(A,C);break;case"polygon":m=this.createPolygon(A,C);break;case"triangle":m=this.createTriangle(A,C);break;case"polygon-rectangle":m=this.createPolygonRectangle(A,C);break;case"rectangle":m=this.createRectangle(A,C);break;case"circle":m=this.createCircle(A,C);break;case"ellipse":m=this.createEllipse(A,C);break;case"box":m=this.createBox(A,C);break;case"cylinder":m=this.createCylinder(A,C);break;case"cone":m=this.createCone(A,C);break;case"sphere":m=this.createSphere(A,C);break;case"polyhedron":m=this.createPolyhedron(A,C);break}return m};zo.prototype.addSimpleGraphic=function(o,A={},f){let m=null;switch(o){case"point":m=this.addPoint(A);break;case"billboard":m=this.addBillboard(A);break;case"label":m=this.addLabel(A);break;case"model":m=this.addModel(A);break;case"polyline":m=this.addPolyline(A);break;case"polylinePrimitive":m=this.addPolylinePrimitive(A);break;case"polygon":m=this.addPolygon(A);break;case"polygonPrimitive":m=this.addPolygonPrimitive(A);break;case"rectangle":m=this.addRectangle(A);break;case"circle":m=this.addCircle(A);break;case"ellipse":m=this.addEllipse(A);break;case"box":m=this.addBox(A);break;case"cylinder":m=this.addCylinder(A);break;case"cone":m=this.addCone(A);break;case"sphere":m=this.addSphere(A);break;case"ellipsoid":m=this.addSphere(A);break;case"polyhedron":m=this.addPolyhedron(A);break}if(m&&A.removeEdit&&this.SimpleGraphicObj.pop(),A.propData&&this.setPropData(m,A.propData),this.defaultEdit(),m.deleteObject=()=>{this.remove(m.id),this._viewer.entities.removeById(m.id)},f&&(A.GroupID=f.pId,A.id=f.id,A.name=f.name),A.GroupID!==void 0){let C={id:m.id,name:m.name,pId:A.GroupID,type:o,item:{item:m,setVisibility:y=>{m.show=y}}};o.indexOf("Primitive")>-1&&(C.id=A.id,C.name=A.name),lt.insertGroupId(C,A.GroupID)}return m};zo.prototype.getDefaultLabelStyle=function(o){return{show:this._core.defaultValue(o.showLabel,!1),text:this._core.defaultValue(o.label_text,"\u65B0\u5EFA\u6587\u672C"),font:this._core.defaultValue(o.label_font,"24px \u5B8B\u4F53"),scale:this._core.defaultValue(o.label_scale,1),style:this._core.defaultValue(o.label_style,2),fillColor:this._cesium.Color.fromCssColorString(this._core.defaultValue(o.label_fillColor,"#ffffff")),outlineColor:this._cesium.Color.fromCssColorString(this._core.defaultValue(o.label_outlineColor,"#000000")),outlineWidth:this._core.defaultValue(o.label_outlineWidth,0),showBackground:this._core.defaultValue(o.label_showBackground,!1),backgroundColor:this._cesium.Color.fromCssColorString(this._core.defaultValue(o.label_backgroundColor,"rgba(42,42,42,0.8)")),heightReference:this._core.defaultValue(o.label_heightReference,1),horizontalOrigin:this._core.defaultValue(o.label_horizontalOrigin,this._cesium.HorizontalOrigin.CENTER),verticalOrigin:this._core.defaultValue(o.label_verticalOrigin,this._cesium.VerticalOrigin.CENTER),scaleByDistance:this._core.defaultValue(o.label_scaleByDistance,void 0),pixelOffset:this._core.defaultValue(o.label_pixelOffset,void 0),disableDepthTestDistance:this._core.defaultValue(o.label_disableDepthTestDistance,Number.POSITIVE_INFINITY),distanceDisplayCondition:this._core.defaultValue(o.label_distanceDisplayCondition,new this._cesium.DistanceDisplayCondition(0,1e8))}};zo.prototype.end=function(o){};zo.prototype.createPoint=function(o={},A){let f=this,m=this._viewer;return this.drawHandler&&(this.drawHandler.destroy(),this.drawHandler=void 0),this.drawHandler=new this._cesium.ScreenSpaceEventHandler(m.scene.canvas),lt.states=1,this.drawHandler.setInputAction(C=>{let y=f._getPosition.getMousePosition(C);if(y){let x=m.entities.add({id:f._core.getuid(),name:"\u65B0\u5EFA\u70B9",position:y,point:{pixelSize:16,heightReference:0,color:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.color,"#0000ff")),outlineWidth:f._core.defaultValue(o.outlineWidth,2),outlineColor:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.outlineColor,"rgba(255,255,255,0.6)")),disableDepthTestDistance:f._core.defaultValue(o.disableDepthTestDistance,Number.POSITIVE_INFINITY),distanceDisplayCondition:f._core.defaultValue(o.distanceDisplayCondition,new f._cesium.DistanceDisplayCondition(0,1e8))}});f.SimpleGraphicObj.push(x.id),f.drawHandler.destroy(),f.drawHandler=void 0,f.tooltip.show(!1),setTimeout(function(){lt.states=0},100),f._core.mouse(f._viewer.container,0,"0"),A&&typeof A=="function"&&A(x)}},this._cesium.ScreenSpaceEventType.LEFT_CLICK),this.drawHandler.setInputAction(C=>{f.tooltip.showAt(C.endPosition,"\u70B9\u51FB\u7ED8\u5236\u70B9")},this._cesium.ScreenSpaceEventType.MOUSE_MOVE),this.drawHandler.setInputAction(C=>{this.end()},this._cesium.ScreenSpaceEventType.RIGHT_CLICK),this.end=()=>{this.end=void 0,f.drawHandler.destroy(),f.drawHandler=void 0,f.tooltip.show(!1),setTimeout(function(){lt.states=0},100),f._core.mouse(f._viewer.container,0,"0")},this};zo.prototype.addPoint=function(o={}){let A=this,m=this._viewer.entities.add({id:A._core.defaultValue(o.id,A._core.getuid()),name:A._core.defaultValue(o.name,"\u65B0\u5EFA\u70B9"),position:o.position,point:{pixelSize:A._core.defaultValue(o.pixelSize,16),color:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.color,"#0000ff")),outlineWidth:A._core.defaultValue(o.outlineWidth,2),outlineColor:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.outlineColor,"rgba(255,255,255,0.6)")),heightReference:A._core.defaultValue(o.heightReference,0),scaleByDistance:A._core.defaultValue(o.scaleByDistance,void 0),disableDepthTestDistance:A._core.defaultValue(o.disableDepthTestDistance,Number.POSITIVE_INFINITY),distanceDisplayCondition:A._core.defaultValue(o.distanceDisplayCondition,new A._cesium.DistanceDisplayCondition(0,1e8))}});return A.SimpleGraphicObj.push(m.id),m};zo.prototype.createBillboard=function(o={},A){let f=this,m=this._viewer;return this.drawHandler&&(this.drawHandler.destroy(),this.drawHandler=void 0),this.drawHandler=new this._cesium.ScreenSpaceEventHandler(m.scene.canvas),lt.states=1,o.image=this._core.getGifImageProperty(o.image),this.drawHandler.setInputAction(C=>{let y=f._getPosition.getMousePosition(C);if(y){let x=m.entities.add({id:f._core.getuid(),name:"Billboard",position:y,billboard:{horizontalOrigin:f._cesium.HorizontalOrigin.CENTER,verticalOrigin:f._cesium.VerticalOrigin.BOTTOM,heightReference:0,scale:f._core.defaultValue(o.scale,1),width:f._core.defaultValue(o.width,o.image?void 0:32),height:f._core.defaultValue(o.height,o.image?void 0:44),image:f._core.defaultValue(o.image,window.SmartEarthRootUrl+cn.mark),color:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.color,"#ffffff")),disableDepthTestDistance:f._core.defaultValue(o.disableDepthTestDistance,Number.POSITIVE_INFINITY),distanceDisplayCondition:f._core.defaultValue(o.distanceDisplayCondition,new f._cesium.DistanceDisplayCondition(0,1e8))},label:this.getDefaultLabelStyle(o)});f.SimpleGraphicObj.push(x.id),f.drawHandler.destroy(),f.drawHandler=void 0,f.tooltip.show(!1),setTimeout(function(){lt.states=0},100),f._core.mouse(f._viewer.container,0,"0"),A&&typeof A=="function"&&A(x)}},this._cesium.ScreenSpaceEventType.LEFT_CLICK),this.drawHandler.setInputAction(C=>{f.tooltip.showAt(C.endPosition,"\u70B9\u51FB\u7ED8\u5236\u56FE\u6807")},this._cesium.ScreenSpaceEventType.MOUSE_MOVE),this.drawHandler.setInputAction(C=>{this.end()},this._cesium.ScreenSpaceEventType.RIGHT_CLICK),this.end=()=>{this.end=void 0,f.drawHandler.destroy(),f.drawHandler=void 0,f.tooltip.show(!1),setTimeout(function(){lt.states=0},100),f._core.mouse(f._viewer.container,0,"0")},this};zo.prototype.addBillboard=function(o={}){let A=this,f=this._viewer;o.image=this._core.getGifImageProperty(o.image);let m=f.entities.add({id:A._core.defaultValue(o.id,A._core.getuid()),name:A._core.defaultValue(o.name,"Billboard"),position:o.position,billboard:{horizontalOrigin:A._core.defaultValue(o.horizontalOrigin,A._cesium.HorizontalOrigin.CENTER),verticalOrigin:A._core.defaultValue(o.verticalOrigin,A._cesium.VerticalOrigin.BOTTOM),scale:A._core.defaultValue(o.scale,1),rotation:A._core.defaultValue(o.rotation,0),width:A._core.defaultValue(o.width,void 0),height:A._core.defaultValue(o.height,void 0),image:A._core.defaultValue(o.image,window.SmartEarthRootUrl+cn.mark),color:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.color,"#ffffff")),heightReference:A._core.defaultValue(o.heightReference,0),scaleByDistance:A._core.defaultValue(o.scaleByDistance,void 0),disableDepthTestDistance:A._core.defaultValue(o.disableDepthTestDistance,Number.POSITIVE_INFINITY),distanceDisplayCondition:A._core.defaultValue(o.distanceDisplayCondition,new A._cesium.DistanceDisplayCondition(0,1e8))},label:this.getDefaultLabelStyle(o)});return A.SimpleGraphicObj.push(m.id),m};zo.prototype.createLabel=function(o={},A){let f=this,m=this._viewer;return this.drawHandler&&(this.drawHandler.destroy(),this.drawHandler=void 0),this.drawHandler=new this._cesium.ScreenSpaceEventHandler(m.scene.canvas),lt.states=1,this.drawHandler.setInputAction(C=>{let y=f._getPosition.getMousePosition(C);if(y){let x=m.entities.add({id:f._core.getuid(),name:"\u65B0\u5EFA\u6587\u672C",position:y,label:{text:"\u65B0\u5EFA\u6587\u672C",font:"24px \u5B8B\u4F53",fillColor:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.fillColor,"#ffffff")),heightReference:0,scale:1,style:2,outlineColor:f._cesium.Color.BLACK,outlineWidth:0,showBackground:!1,backgroundColor:new f._cesium.Color(.165,.165,.165,.8),horizontalOrigin:f._cesium.HorizontalOrigin.CENTER,verticalOrigin:f._cesium.VerticalOrigin.CENTER,distanceDisplayCondition:f._core.defaultValue(o.distanceDisplayCondition,new f._cesium.DistanceDisplayCondition(0,1e8)),disableDepthTestDistance:Number.POSITIVE_INFINITY}});f.SimpleGraphicObj.push(x.id),f.drawHandler.destroy(),f.drawHandler=void 0,f.tooltip.show(!1),setTimeout(function(){lt.states=0},100),f._core.mouse(f._viewer.container,0,"0"),A&&typeof A=="function"&&A(x)}},this._cesium.ScreenSpaceEventType.LEFT_CLICK),this.drawHandler.setInputAction(C=>{f.tooltip.showAt(C.endPosition,"\u70B9\u51FB\u7ED8\u5236\u6587\u672C")},this._cesium.ScreenSpaceEventType.MOUSE_MOVE),this.drawHandler.setInputAction(C=>{this.end()},this._cesium.ScreenSpaceEventType.RIGHT_CLICK),this.end=()=>{this.end=void 0,f.drawHandler.destroy(),f.drawHandler=void 0,f.tooltip.show(!1),setTimeout(function(){lt.states=0},100),f._core.mouse(f._viewer.container,0,"0")},this};zo.prototype.addLabel=function(o={}){let A=this,m=this._viewer.entities.add({id:A._core.defaultValue(o.id,A._core.getuid()),name:A._core.defaultValue(o.name,"\u65B0\u5EFA\u6587\u672C"),position:o.position,label:{text:A._core.defaultValue(o.text,"\u65B0\u5EFA\u6587\u672C"),font:A._core.defaultValue(o.font,"24px \u5B8B\u4F53"),scale:A._core.defaultValue(o.scale,1),style:A._core.defaultValue(o.style,2),fillColor:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.fillColor,"#ffffff")),outlineColor:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.outlineColor,"#000000")),outlineWidth:A._core.defaultValue(o.outlineWidth,0),showBackground:A._core.defaultValue(o.showBackground,!1),backgroundColor:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.backgroundColor,"rgba(42,42,42,0.8)")),heightReference:A._core.defaultValue(o.heightReference,0),horizontalOrigin:A._core.defaultValue(o.horizontalOrigin,A._cesium.HorizontalOrigin.CENTER),verticalOrigin:A._core.defaultValue(o.verticalOrigin,A._cesium.VerticalOrigin.CENTER),scaleByDistance:A._core.defaultValue(o.scaleByDistance,void 0),pixelOffset:A._core.defaultValue(o.pixelOffset,void 0),disableDepthTestDistance:A._core.defaultValue(o.disableDepthTestDistance,Number.POSITIVE_INFINITY),distanceDisplayCondition:A._core.defaultValue(o.distanceDisplayCondition,new A._cesium.DistanceDisplayCondition(0,1e8))}});return A.SimpleGraphicObj.push(m.id),m};zo.prototype.createModel=function(o={},A){let f=this,m=this._viewer;this.drawHandler&&(this.drawHandler.destroy(),this.drawHandler=void 0),this.drawHandler=new this._cesium.ScreenSpaceEventHandler(m.scene.canvas),lt.states=1;let C,y=Li.Matrix3.fromRotationX(Li.Math.toRadians(f._core.defaultValue(o.heading,0))),x=Li.Matrix3.fromRotationY(Li.Math.toRadians(f._core.defaultValue(o.pitch,0))),v=Li.Matrix3.fromRotationZ(Li.Math.toRadians(f._core.defaultValue(o.roll,0))),E=Li.Matrix4.fromRotationTranslation(y),I=Li.Matrix4.fromRotationTranslation(x),w=Li.Matrix4.fromRotationTranslation(v);this.drawHandler.setInputAction(M=>{let B=f._getPosition.getMousePosition(M,C);B&&(C&&m.scene.primitives.remove(C),C=m.entities.add({id:f._core.getuid(),name:f._core.defaultValue(o.name,"Model"),position:B,orientation:Li.Transforms.headingPitchRollQuaternion(B,new Li.HeadingPitchRoll(Li.Math.toRadians(f._core.defaultValue(o.heading,0)),Li.Math.toRadians(f._core.defaultValue(o.pitch,0)),Li.Math.toRadians(f._core.defaultValue(o.roll,0)))),model:{uri:f._core.defaultValue(o.url,window.SmartEarthRootUrl+cn.testModel),scale:f._core.defaultValue(o.scale,1),minimumPixelSize:0,runAnimations:!0,colorBlendMode:f._core.defaultValue(o.colorBlendMode,void 0),color:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.color,"#ffffff")),distanceDisplayCondition:f._core.defaultValue(o.distanceDisplayCondition,new f._cesium.DistanceDisplayCondition(0,1e8))}}),C.heading=f._core.defaultValue(o.heading,0),C.pitch=f._core.defaultValue(o.pitch,0),C.roll=f._core.defaultValue(o.roll,0),f.SimpleGraphicObj.push(C.id),f.drawHandler.destroy(),f.drawHandler=void 0,f.tooltip.show(!1),setTimeout(function(){lt.states=0},100),f._core.mouse(f._viewer.container,0,"0"),A&&typeof A=="function"&&A(C))},this._cesium.ScreenSpaceEventType.LEFT_CLICK);let Q=!1;return this.drawHandler.setInputAction(M=>{let B=f._getPosition.getMousePosition(M,C);if(C){let T=Li.Transforms.eastNorthUpToFixedFrame(B);Li.Matrix4.multiply(T,E,T),Li.Matrix4.multiply(T,I,T),Li.Matrix4.multiply(T,w,T),C.modelMatrix=T}else if(B){let T=Li.Transforms.eastNorthUpToFixedFrame(B);Li.Matrix4.multiply(T,E,T),Li.Matrix4.multiply(T,I,T),Li.Matrix4.multiply(T,w,T),C=m.scene.primitives.add(Li.Model.fromGltf({modelMatrix:T,url:f._core.defaultValue(o.url,window.SmartEarthRootUrl+cn.testModel),scale:f._core.defaultValue(o.scale,1),minimumPixelSize:0,colorBlendMode:f._core.defaultValue(o.colorBlendMode,void 0),color:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.color,"#ffffff")).withAlpha(.5),distanceDisplayCondition:f._core.defaultValue(o.distanceDisplayCondition,new f._cesium.DistanceDisplayCondition(0,1e8)),allowPicking:!1})),C.readyPromise.then(()=>{Q=!0})}Q?f.tooltip.showAt(M.endPosition,"\u70B9\u51FB\u7ED8\u5236\u6A21\u578B"):f.tooltip.showAt(M.endPosition,"\u52A0\u8F7D\u6A21\u578B\u4E2D...")},this._cesium.ScreenSpaceEventType.MOUSE_MOVE),this.drawHandler.setInputAction(M=>{this.end()},this._cesium.ScreenSpaceEventType.RIGHT_CLICK),this.end=()=>{this.end=void 0,f.drawHandler.destroy(),f.drawHandler=void 0,f.tooltip.show(!1),setTimeout(function(){lt.states=0},100),f._core.mouse(f._viewer.container,0,"0")},this};zo.prototype.addModel=function(o={}){let A=this,m=this._viewer.entities.add({id:A._core.defaultValue(o.id,A._core.getuid()),name:A._core.defaultValue(o.name,"Model"),position:o.position,orientation:Li.Transforms.headingPitchRollQuaternion(o.position,new Li.HeadingPitchRoll(Li.Math.toRadians(A._core.defaultValue(o.heading,0)),Li.Math.toRadians(A._core.defaultValue(o.pitch,0)),Li.Math.toRadians(A._core.defaultValue(o.roll,0)))),model:{scale:A._core.defaultValue(o.scale,1),uri:A._core.defaultValue(o.url,window.SmartEarthRootUrl+cn.testModel),minimumPixelSize:A._core.defaultValue(o.minimumPixelSize,0),runAnimations:A._core.defaultValue(o.runAnimations,!0),colorBlendMode:A._core.defaultValue(o.colorBlendMode,void 0),color:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.color,"#ffffff")),distanceDisplayCondition:A._core.defaultValue(o.distanceDisplayCondition,new A._cesium.DistanceDisplayCondition(0,1e8))}});return m.heading=A._core.defaultValue(o.heading,0),m.pitch=A._core.defaultValue(o.pitch,0),m.roll=A._core.defaultValue(o.roll,0),A.SimpleGraphicObj.push(m.id),m};zo.prototype.createPolyline=function(o={},A){let f=this,m=this._viewer;this.drawHandler&&(this.drawHandler.destroy(),this.drawHandler=void 0),this.drawHandler=new this._cesium.ScreenSpaceEventHandler(m.scene.canvas),lt.states=1;let C=[],y;return this.drawHandler.setInputAction(x=>{let v=f._getPosition.getMousePosition(x,y);!v||(C.length===0&&C.push(v.clone()),C.push(v),o.toPoint&&C.length===3&&(C.pop(),f.end()),y||(y=m.entities.add({id:f._core.getuid(),name:f._core.defaultValue(o.name,"\u65B0\u5EFA\u7EBF"),polyline:{positions:new f._cesium.CallbackProperty(function(){return C},!1),clampToGround:f._core.defaultValue(o.clampToGround,!0),material:new Li.PolylineOutlineMaterialProperty({color:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.color,"rgba(0,255,0,0.6)")),outlineWidth:0,outlineColor:f._cesium.Color.WHITE.withAlpha(.6)}),depthFailMaterial:o.depthFailColor&&new Li.PolylineOutlineMaterialProperty({color:f._cesium.Color.fromCssColorString(o.depthFailColor),outlineWidth:0,outlineColor:f._cesium.Color.WHITE.withAlpha(.6)}),width:f._core.defaultValue(o.width,3),distanceDisplayCondition:new f._cesium.DistanceDisplayCondition(0,1e8)}}),f.SimpleGraphicObj.push(y.id)),o.showSize&&f.showSizeData("polyline",[C[C.length-2],C[C.length-1]]))},this._cesium.ScreenSpaceEventType.LEFT_CLICK),this.drawHandler.setInputAction(x=>{if(C.length===0)f.tooltip.showAt(x.endPosition,"\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236");else{f.tooltip.showAt(x.endPosition,"\u70B9\u51FB\u6DFB\u52A0\u70B9\uFF0C\u53F3\u952E\u7ED3\u675F\u7ED8\u5236");let v=f._getPosition.getMousePosition(x,y);if(!v)return;C.pop(),C.push(v),o.showSize&&(f.clearLastSizeData(),f.showSizeData("polyline",[C[C.length-2],C[C.length-1]]))}},this._cesium.ScreenSpaceEventType.MOUSE_MOVE),this.end=function(x){if(f.drawHandler.destroy(),f.drawHandler=void 0,f.tooltip.show(!1),f.clearAllSizeData(),setTimeout(function(){lt.states=0},100),f._core.mouse(f._viewer.container,0),f.end=void 0,x==="cancel"){y&&(m.entities.remove(y),f.SimpleGraphicObj.pop());return}A&&typeof A=="function"&&A(y,C)},this.drawHandler.setInputAction(x=>{f.end()},this._cesium.ScreenSpaceEventType.RIGHT_CLICK),this};zo.prototype.addPolyline=function(o={}){let A=this,f=this._viewer,m=o.positions,C=f.entities.add({id:A._core.defaultValue(o.id,A._core.getuid()),name:A._core.defaultValue(o.name,"\u65B0\u5EFA\u7EBF"),polyline:{positions:m,clampToGround:A._core.defaultValue(o.clampToGround,!0),material:new Li.PolylineOutlineMaterialProperty({color:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.color,"rgba(0,255,0,0.6)")),outlineWidth:A._core.defaultValue(o.outlineWidth,0),outlineColor:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.outlineColor,"rgba(255,255,255,0.6)"))}),depthFailMaterial:o.depthFailColor&&new Li.PolylineOutlineMaterialProperty({color:A._cesium.Color.fromCssColorString(o.depthFailColor),outlineWidth:0,outlineColor:A._cesium.Color.WHITE.withAlpha(.6)}),width:A._core.defaultValue(o.width,3),distanceDisplayCondition:A._core.defaultValue(o.distanceDisplayCondition,new A._cesium.DistanceDisplayCondition(0,1e8))}});return A.SimpleGraphicObj.push(C.id),C};zo.prototype.addPolylinePrimitive=function(o={}){let A=this,f=this._viewer,m=o.positions,C;if(o.clampToGround)C=new A._cesium.GroundPolylineGeometry({positions:m,width:A._core.defaultValue(o.width,3)});else{let I=new Li.PolylineGeometry({positions:m,width:A._core.defaultValue(o.width,3)});C=Li.PolylineGeometry.createGeometry(I)}let y=A._cesium.Color.fromCssColorString(A._core.defaultValue(o.color,"rgba(0,255,0,0.6)")),x=new Li.GeometryInstance({id:A._core.defaultValue(o.id,A._core.getuid()),geometry:C,attributes:{color:new A._cesium.ColorGeometryInstanceAttribute.fromColor(y)}}),v,E=new A._cesium.PolylineColorAppearance({flat:!0,translucent:!0,faceForward:!0,closed:!0});return o.clampToGround?v=new A._cesium.GroundPolylinePrimitive({geometryInstances:x,appearance:E}):v=new A._cesium.Primitive({geometryInstances:x,appearance:E}),this.PrimitiveCollection.add(v),v};zo.prototype.createPolygon=function(o={},A){let f=this,m=this._viewer;this.drawHandler&&(this.drawHandler.destroy(),this.drawHandler=void 0),this.drawHandler=new this._cesium.ScreenSpaceEventHandler(m.scene.canvas),lt.states=1;let C=[],y,x;return this.drawHandler.setInputAction(v=>{let E=f._getPosition.getMousePosition(v,[x,y]);!E||(C.length===0&&C.push(E.clone()),C.push(E),C.length===2&&!x&&(o.clampToGround=f._core.defaultValue(o.clampToGround,!0),x=m.entities.add({name:"\u4E34\u65F6\u7EBF",polyline:{positions:new f._cesium.CallbackProperty(function(){return C},!1),clampToGround:f._core.defaultValue(o.clampToGround,!0),material:new Li.PolylineOutlineMaterialProperty({color:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.color,"rgba(0,255,0,0.6)")),outlineWidth:0,outlineColor:f._cesium.Color.WHITE.withAlpha(.6)}),width:3}})),C.length===3&&!y&&(x&&m.entities.remove(x),y=m.entities.add({id:f._core.getuid(),name:f._core.defaultValue(o.name,"\u65B0\u5EFA\u9762"),polygon:{hierarchy:new f._cesium.CallbackProperty(function(){return new f._cesium.PolygonHierarchy(C)},!1),material:new f._cesium.ImageMaterialProperty({image:null,repeat:new f._cesium.Cartesian2(1,1),color:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.color,"rgba(0,255,0,0.6)"))}),perPositionHeight:!f._core.defaultValue(o.clampToGround,!1),heightReference:o.clampToGround?1:0,outline:f._core.defaultValue(o.outline,!1),outlineColor:f._cesium.Color.WHITE.withAlpha(.6),distanceDisplayCondition:new f._cesium.DistanceDisplayCondition(0,1e8)}}),f.SimpleGraphicObj.push(y.id)))},this._cesium.ScreenSpaceEventType.LEFT_CLICK),this.drawHandler.setInputAction(v=>{if(C.length===0)f.tooltip.showAt(v.endPosition,"\u70B9\u51FB\u6DFB\u52A0\u7B2C\u4E00\u4E2A\u70B9");else if(C.length===1){f.tooltip.showAt(v.endPosition,"\u70B9\u51FB\u6DFB\u52A0\u7B2C\u4E8C\u4E2A\u70B9");let E=f._getPosition.getMousePosition(v,[x,y]);if(!E)return;C.pop(),C.push(E)}else{f.tooltip.showAt(v.endPosition,"\u70B9\u51FB\u6DFB\u52A0\u70B9\uFF0C\u53F3\u952E\u7ED3\u675F\u7ED8\u5236");let E=f._getPosition.getMousePosition(v,[x,y]);if(!E)return;if(C.pop(),C.push(E),o.showSize){f.clearLastSizeData();let I=f.showSizeData("polygon",C);y&&(y.sizeData=I)}}},this._cesium.ScreenSpaceEventType.MOUSE_MOVE),this.end=function(v){if(f.drawHandler.destroy(),f.drawHandler=void 0,f.tooltip.show(!1),x&&m.entities.remove(x),f.clearAllSizeData(),setTimeout(function(){lt.states=0},100),f._core.mouse(f._viewer.container,0,"0"),f.end=void 0,v==="cancel"){y&&(m.entities.remove(y),f.SimpleGraphicObj.pop());return}A&&typeof A=="function"&&A(y,C)},this.drawHandler.setInputAction(v=>{f.end()},this._cesium.ScreenSpaceEventType.RIGHT_CLICK),this};zo.prototype.createTriangle=function(o={},A){let f=this,m=this._viewer;this.drawHandler&&(this.drawHandler.destroy(),this.drawHandler=void 0),this.drawHandler=new this._cesium.ScreenSpaceEventHandler(m.scene.canvas),lt.states=1;let C=[],y,x;this.drawHandler.setInputAction(B=>{let T=f._getPosition.getMousePosition(B,x);!T||(y?(C=v(y,T),this.end()):(y=T,C=[T,T,T]),C.length&&!x&&(o.clampToGround=f._core.defaultValue(o.clampToGround,!0),x=m.entities.add({id:f._core.getuid(),name:"\u65B0\u5EFA\u4E09\u89D2\u5F62",polygon:{hierarchy:new f._cesium.CallbackProperty(function(){return new f._cesium.PolygonHierarchy(C)},!1),material:new f._cesium.ImageMaterialProperty({image:null,repeat:new f._cesium.Cartesian2(1,1),color:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.color,"rgba(0,255,0,0.6)"))}),perPositionHeight:!f._core.defaultValue(o.clampToGround,!1),heightReference:o.clampToGround?1:0,outline:f._core.defaultValue(o.outline,!1),outlineColor:f._cesium.Color.WHITE.withAlpha(.6),distanceDisplayCondition:new f._cesium.DistanceDisplayCondition(0,1e8)}}),f.SimpleGraphicObj.push(x.id)))},this._cesium.ScreenSpaceEventType.LEFT_CLICK),this.drawHandler.setInputAction(B=>{if(!y)f.tooltip.showAt(B.endPosition,"\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236");else{f.tooltip.showAt(B.endPosition,"\u518D\u6B21\u70B9\u51FB\u7ED3\u675F\u7ED8\u5236");let T=f._getPosition.getMousePosition(B,x);if(!T)return;C=v(y,T)}},this._cesium.ScreenSpaceEventType.MOUSE_MOVE),this.end=function(B){if(f.drawHandler.destroy(),f.drawHandler=void 0,f.tooltip.show(!1),setTimeout(function(){lt.states=0},100),f._core.mouse(f._viewer.container,0),f.end=void 0,B==="cancel"){x&&(m.entities.remove(x),f.SimpleGraphicObj.pop());return}A&&typeof A=="function"&&A(x)},this.drawHandler.setInputAction(B=>{f.end()},this._cesium.ScreenSpaceEventType.RIGHT_CLICK);function v(B,T){let D=[],F=f.toDegrees(B),L=f.toDegrees(T),R=Q(F.lat,F.lon,L.lat,L.lon),k=R.angle,U=R.distance;D.push(L.lon,L.lat);let V=w(F.lat,F.lon,U,k+120);return D.push(V[0],V[1]),V=w(F.lat,F.lon,U,k-120),D.push(V[0],V[1]),Li.Cartesian3.fromDegreesArray(D)}let E=6378137,I=6356725;function w(B,T,D,F){let L=D*Math.sin(F*Math.PI/180),R=D*Math.cos(F*Math.PI/180),k=I+(E-I)*(90-B)/90,U=k*Math.cos(B*Math.PI/180),V=(L/U+T*Math.PI/180)*180/Math.PI,H=(R/k+B*Math.PI/180)*180/Math.PI;return[V,H]}function Q(B,T,D,F){let L=M(B),R=M(D),k=M(D)-M(B),U=M(F)-M(T),V=2*Math.asin(Math.sqrt(Math.pow(Math.sin(k/2),2)+Math.cos(L)*Math.cos(R)*Math.pow(Math.sin(U/2),2)));return V=V*E,V=Math.round(V*1e4)/1e4,{angle:f._core.TwoPointAzimuth(T,B,F,D),distance:V}}function M(B){return B*Math.PI/180}return this};zo.prototype.createPolygonRectangle=function(o={},A){let f=this,m=this._viewer;this.drawHandler&&(this.drawHandler.destroy(),this.drawHandler=void 0),this.drawHandler=new this._cesium.ScreenSpaceEventHandler(m.scene.canvas),lt.states=1;let C=[],y,x,v;return this.drawHandler.setInputAction(E=>{let I=f._getPosition.getMousePosition(E,y);!I||(C.length?f.end():(x=E.position,C.push(I.clone(),I.clone(),I.clone(),I.clone())),y||(o.clampToGround=f._core.defaultValue(o.clampToGround,!0),y=m.entities.add({id:f._core.getuid(),name:"\u65B0\u5EFA\u9762",polygon:{hierarchy:new f._cesium.CallbackProperty(function(){return new f._cesium.PolygonHierarchy(C)},!1),material:new f._cesium.ImageMaterialProperty({image:null,repeat:new f._cesium.Cartesian2(1,1),color:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.color,"rgba(0,255,0,0.6)"))}),perPositionHeight:!f._core.defaultValue(o.clampToGround,!1),heightReference:o.clampToGround?1:0,outline:f._core.defaultValue(o.outline,!1),outlineColor:f._cesium.Color.WHITE.withAlpha(.6),distanceDisplayCondition:new f._cesium.DistanceDisplayCondition(0,1e8)}})))},this._cesium.ScreenSpaceEventType.LEFT_CLICK),this.drawHandler.setInputAction(E=>{if(C.length===0)f.tooltip.showAt(E.endPosition,"\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236");else{f.tooltip.showAt(E.endPosition,"\u70B9\u51FB\u7ED3\u675F\u7ED8\u5236"),x=m.scene.cartesianToCanvasCoordinates(C[0]),v=E.endPosition;let I={x:x.x,y:v.y},w={x:v.x,y:x.y},Q=f._getPosition.getMousePosition(I,y);Q&&(C[1]=Q),Q=f._getPosition.getMousePosition(v,y),Q&&(C[2]=Q),Q=f._getPosition.getMousePosition(w,y),Q&&(C[3]=Q)}},this._cesium.ScreenSpaceEventType.MOUSE_MOVE),this.end=function(E){if(f.drawHandler.destroy(),f.drawHandler=void 0,f.tooltip.show(!1),setTimeout(function(){lt.states=0},100),f._core.mouse(f._viewer.container,0,"0"),f.end=void 0,E==="cancel"){y&&m.entities.remove(y);return}A&&typeof A=="function"&&A(y,x,v)},this};zo.prototype.addPolygon=function(o={}){let A=this,f=this._viewer,m=o.positions,C;o.hierarchy?C=o.hierarchy:C=new A._cesium.PolygonHierarchy(m),o.clampToGround=A._core.defaultValue(o.clampToGround,!0);let y=f.entities.add({id:A._core.defaultValue(o.id,A._core.getuid()),name:A._core.defaultValue(o.name,"\u65B0\u5EFA\u9762"),polygon:{hierarchy:new A._cesium.CallbackProperty(function(){return C},!1),material:new A._cesium.ImageMaterialProperty({image:A._core.defaultValue(o.image,null),repeat:A._core.defaultValue(o.repeat,new A._cesium.Cartesian2(1,1)),color:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.color,"rgba(0,255,0,0.6)"))}),outline:A._core.defaultValue(o.outline,!1),outlineColor:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.outlineColor,"rgba(255,255,255,0.6)")),perPositionHeight:!A._core.defaultValue(o.clampToGround,!1),heightReference:o.clampToGround?1:0,distanceDisplayCondition:A._core.defaultValue(o.distanceDisplayCondition,new A._cesium.DistanceDisplayCondition(0,1e8))}});return A.SimpleGraphicObj.push(y.id),y};zo.prototype.addPolygonPrimitive=function(o={}){let A=this,f=this._viewer,m=o.positions,C;o.hierarchy?C=o.hierarchy:C=new A._cesium.PolygonHierarchy(m);let y,x=new A._cesium.PolygonGeometry({height:A._core.defaultValue(o.height,void 0),extrudedHeight:A._core.defaultValue(o.extrudedHeight,void 0),polygonHierarchy:C,vertexFormat:o.water?Li.EllipsoidSurfaceAppearance.VERTEX_FORMAT:void 0}),v=A._cesium.PolygonGeometry.createGeometry(x),E=A._cesium.Color.fromCssColorString(A._core.defaultValue(o.color,"rgba(0,255,0,0.6)")),I=new Li.GeometryInstance({id:A._core.defaultValue(o.id,A._core.getuid()),geometry:v,attributes:o.water?void 0:{color:new A._cesium.ColorGeometryInstanceAttribute.fromColor(E)}}),w;if(o.water)w=new Li.Primitive({geometryInstances:I,appearance:new Li.EllipsoidSurfaceAppearance({material:new Li.Material({fabric:{type:"Water",uniforms:{baseWaterColor:o.watherColor||Li.Color.SKYBLUE.withAlpha(.6),blendColor:o.watherColor||Li.Color.SKYBLUE.withAlpha(.6),normalMap:o.url,frequency:o.frequency||1e3,animationSpeed:o.watherSpeed||.01,amplitude:o.amplitude||10}}})}),show:!0});else if(w=new A._cesium.Primitive({geometryInstances:I,appearance:new A._cesium.PerInstanceColorAppearance({translucent:!0}),shadows:o.shadows}),o.extrudedHeight){y=new Li.PrimitiveCollection;let Q=new Li.PolygonOutlineGeometry({height:A._core.defaultValue(o.height,void 0),polygonHierarchy:C,extrudedHeight:o.extrudedHeight}),M=Li.PolygonOutlineGeometry.createGeometry(Q),B=A._cesium.Color.fromCssColorString(A._core.defaultValue(o.outlineColor,"rgba(255,255,255,0.6)")),T=new Li.GeometryInstance({id:A._core.defaultValue(o.id,A._core.getuid()),geometry:M,attributes:{color:new A._cesium.ColorGeometryInstanceAttribute.fromColor(B)}}),D=new A._cesium.Primitive({geometryInstances:T,appearance:new A._cesium.PolylineColorAppearance({flat:!0,translucent:!0,faceForward:!0,closed:!0})});y.add(w),y.add(D)}return!y&&(y=w),this.PrimitiveCollection.add(y),y};zo.prototype.createRectangle=function(o={},A){let f=this,m=this._viewer;this.drawHandler&&(this.drawHandler.destroy(),this.drawHandler=void 0),this.drawHandler=new this._cesium.ScreenSpaceEventHandler(m.scene.canvas),lt.states=1;let C=[],y;return this.drawHandler.setInputAction(x=>{let v=f._getPosition.getMousePosition(x,y);if(!!v&&(C.length===0?C.push(v,v):(C.pop(),C.push(v),f.end()),!y)){let E=f.toDegrees(C[0]);o.clampToGround=f._core.defaultValue(o.clampToGround,!0),y=m.entities.add({id:f._core.getuid(),name:"\u65B0\u5EFA\u77E9\u5F62",rectangle:{coordinates:new f._cesium.CallbackProperty(function(){return f._cesium.Rectangle.fromCartesianArray(C)},!1),material:new f._cesium.ImageMaterialProperty({image:null,repeat:new f._cesium.Cartesian2(1,1),color:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.color,"rgba(0,255,0,0.6)"))}),height:o.clampToGround?void 0:E.height,heightReference:o.clampToGround?1:0,outline:!0,outlineColor:f._cesium.Color.WHITE.withAlpha(.6),outlineWidth:1,distanceDisplayCondition:new f._cesium.DistanceDisplayCondition(0,1e8)}}),y.thisHeight=E.height,f.SimpleGraphicObj.push(y.id)}},this._cesium.ScreenSpaceEventType.LEFT_CLICK),this.drawHandler.setInputAction(x=>{if(C.length>0){f.tooltip.showAt(x.endPosition,"\u518D\u6B21\u70B9\u51FB\u7ED3\u675F\u7ED8\u5236\uFF0C\u53F3\u952E\u53D6\u6D88");let v=f._getPosition.getMousePosition(x,y);v&&(C.pop(),C.push(v),o.showSize&&(f.clearLastSizeData(),f.showSizeData("rectangle",C)))}else f.tooltip.showAt(x.endPosition,"\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236")},this._cesium.ScreenSpaceEventType.MOUSE_MOVE),this.drawHandler.setInputAction(x=>{this.end("cancel")},this._cesium.ScreenSpaceEventType.RIGHT_CLICK),this.end=x=>{if(this.end=void 0,f.drawHandler.destroy(),f.drawHandler=void 0,f.tooltip.show(!1),f.clearAllSizeData(),setTimeout(function(){lt.states=0},100),f._core.mouse(f._viewer.container,0,"0"),x==="cancel"){y&&(m.entities.remove(y),f.SimpleGraphicObj.pop());return}A&&typeof A=="function"&&A(y)},this};zo.prototype.addRectangle=function(o={}){let A=this,f=this._viewer,m=o.positions,C;o.coordinates?C=o.coordinates:C=A._cesium.Rectangle.fromCartesianArray(m);let y=f.entities.add({id:A._core.defaultValue(o.id,A._core.getuid()),name:A._core.defaultValue(o.name,"\u65B0\u5EFA\u77E9\u5F62"),rectangle:{coordinates:new A._cesium.CallbackProperty(function(){return C},!1),material:new A._cesium.ImageMaterialProperty({image:A._core.defaultValue(o.image,null),repeat:A._core.defaultValue(o.repeat,new A._cesium.Cartesian2(1,1)),color:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.color,"rgba(0,255,0,0.6)"))}),height:A._core.defaultValue(o.height,void 0),rotation:A._core.defaultValue(o.rotation,0),heightReference:A._core.defaultValue(o.heightReference,1),outline:A._core.defaultValue(o.outline,!1),outlineWidth:1,outlineColor:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.outlineColor,"rgba(255,255,255,0.6)")),distanceDisplayCondition:A._core.defaultValue(o.distanceDisplayCondition,new A._cesium.DistanceDisplayCondition(0,1e8))}});return A.SimpleGraphicObj.push(y.id),y};zo.prototype.createCircle=function(o={},A){let f=this,m=this._viewer;this.drawHandler&&(this.drawHandler.destroy(),this.drawHandler=void 0),this.drawHandler=new this._cesium.ScreenSpaceEventHandler(m.scene.canvas),lt.states=1;let C=[],y,x=0;return this.drawHandler.setInputAction(v=>{let E=f._getPosition.getMousePosition(v,y);if(!!E&&(C.length===0?C.push(E,E):(C[0]=E,x=f._cesium.Cartesian3.distance(C[0],C[1]),f.end()),!y)){let I=f.toDegrees(C[1]);o.clampToGround=f._core.defaultValue(o.clampToGround,!0),y=m.entities.add({id:f._core.getuid(),name:"\u65B0\u5EFA\u5706",position:C[1],ellipse:{semiMajorAxis:new f._cesium.CallbackProperty(function(){return x},!1),semiMinorAxis:new f._cesium.CallbackProperty(function(){return x},!1),material:new f._cesium.ImageMaterialProperty({image:null,repeat:new f._cesium.Cartesian2(1,1),color:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.color,"rgba(0,255,0,0.6)"))}),height:o.clampToGround?void 0:I.height,heightReference:o.clampToGround?1:0,outline:!0,outlineWidth:1,outlineColor:f._cesium.Color.WHITE.withAlpha(.6),distanceDisplayCondition:new f._cesium.DistanceDisplayCondition(0,1e8)}}),y.thisHeight=I.height,f.SimpleGraphicObj.push(y.id)}},this._cesium.ScreenSpaceEventType.LEFT_CLICK),this.drawHandler.setInputAction(v=>{if(C.length>0){f.tooltip.showAt(v.endPosition,"\u518D\u6B21\u70B9\u51FB\u7ED3\u675F\u7ED8\u5236\uFF0C\u53F3\u952E\u53D6\u6D88");let E=f._getPosition.getMousePosition(v,y);E&&(C[0]=E,x=f._cesium.Cartesian3.distance(C[0],C[1]),o.showSize&&(f.clearLastSizeData(),f.showSizeData("circle",C[1],x)))}else f.tooltip.showAt(v.endPosition,"\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236")},this._cesium.ScreenSpaceEventType.MOUSE_MOVE),this.drawHandler.setInputAction(v=>{this.end("cancel")},this._cesium.ScreenSpaceEventType.RIGHT_CLICK),this.end=v=>{if(this.end=void 0,f.drawHandler.destroy(),f.drawHandler=void 0,f.tooltip.show(!1),f.clearAllSizeData(),setTimeout(function(){lt.states=0},100),f._core.mouse(f._viewer.container,0,"0"),v==="cancel"){y&&(m.entities.remove(y),f.SimpleGraphicObj.pop());return}A&&typeof A=="function"&&A(y,{distance:x,positions:C})},this};zo.prototype.addCircle=function(o={}){let A=this,f=this._viewer,m=o.radius,C=f.entities.add({id:A._core.defaultValue(o.id,A._core.getuid()),name:A._core.defaultValue(o.name,"\u65B0\u5EFA\u5706"),position:o.position,ellipse:{semiMajorAxis:new A._cesium.CallbackProperty(function(){return m},!1),semiMinorAxis:new A._cesium.CallbackProperty(function(){return m},!1),material:new A._cesium.ImageMaterialProperty({image:A._core.defaultValue(o.image,null),repeat:A._core.defaultValue(o.repeat,new A._cesium.Cartesian2(1,1)),transparent:!0,color:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.color,o.image?"#ffffff":"rgba(0,255,0,0.6)"))}),height:A._core.defaultValue(o.height,void 0),heightReference:A._core.defaultValue(o.heightReference,o.height?0:1),outline:A._core.defaultValue(o.outline,!1),outlineWidth:1,rotation:o.rotation,stRotation:o.outline,outlineColor:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.outlineColor,"rgba(255,255,255,0.6)")),distanceDisplayCondition:A._core.defaultValue(o.distanceDisplayCondition,new A._cesium.DistanceDisplayCondition(0,1e8))}});return A.SimpleGraphicObj.push(C.id),C};zo.prototype.createEllipse=function(o={},A){let f=this,m=this._viewer;this.drawHandler&&(this.drawHandler.destroy(),this.drawHandler=void 0),this.drawHandler=new this._cesium.ScreenSpaceEventHandler(m.scene.canvas),lt.states=1;let C=[],y,x=0;return this.drawHandler.setInputAction(v=>{let E=f._getPosition.getMousePosition(v,y);if(!!E&&(C.length===0?C.push(E,E):(C[0]=E,x=f._cesium.Cartesian3.distance(C[0],C[1]),f.end()),!y)){let I=f.toDegrees(C[1]);o.clampToGround=f._core.defaultValue(o.clampToGround,!0),y=m.entities.add({id:f._core.getuid(),name:"\u65B0\u5EFA\u692D\u5706",position:C[1],ellipse:{semiMajorAxis:new f._cesium.CallbackProperty(function(){return x},!1),semiMinorAxis:new f._cesium.CallbackProperty(function(){return x/2},!1),material:new f._cesium.ImageMaterialProperty({image:null,repeat:new f._cesium.Cartesian2(1,1),color:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.color,"rgba(0,255,0,0.6)"))}),height:o.clampToGround?void 0:I.height,heightReference:o.clampToGround?1:0,outline:!0,outlineWidth:1,outlineColor:f._cesium.Color.WHITE.withAlpha(.6),distanceDisplayCondition:new f._cesium.DistanceDisplayCondition(0,1e8)}}),y.thisHeight=I.height,f.SimpleGraphicObj.push(y.id)}},this._cesium.ScreenSpaceEventType.LEFT_CLICK),this.drawHandler.setInputAction(v=>{if(C.length>0){f.tooltip.showAt(v.endPosition,"\u518D\u6B21\u70B9\u51FB\u7ED3\u675F\u7ED8\u5236\uFF0C\u53F3\u952E\u53D6\u6D88");let E=f._getPosition.getMousePosition(v,y);E&&(C[0]=E,x=f._cesium.Cartesian3.distance(C[0],C[1]))}else f.tooltip.showAt(v.endPosition,"\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236")},this._cesium.ScreenSpaceEventType.MOUSE_MOVE),this.drawHandler.setInputAction(v=>{this.end("cancel")},this._cesium.ScreenSpaceEventType.RIGHT_CLICK),this.end=v=>{if(this.end=void 0,f.drawHandler.destroy(),f.drawHandler=void 0,f.tooltip.show(!1),f.clearAllSizeData(),setTimeout(function(){lt.states=0},100),f._core.mouse(f._viewer.container,0,"0"),v==="cancel"){y&&(m.entities.remove(y),f.SimpleGraphicObj.pop());return}A&&typeof A=="function"&&A(y)},this};zo.prototype.addEllipse=function(o={}){let A=this,f=this._viewer,m=o.semiMajorAxis,C=o.semiMinorAxis,y=f.entities.add({id:A._core.defaultValue(o.id,A._core.getuid()),name:A._core.defaultValue(o.name,"\u65B0\u5EFA\u5706"),position:o.position,ellipse:{semiMajorAxis:new A._cesium.CallbackProperty(function(){return m},!1),semiMinorAxis:new A._cesium.CallbackProperty(function(){return C},!1),material:new A._cesium.ImageMaterialProperty({image:A._core.defaultValue(o.image,null),repeat:A._core.defaultValue(o.repeat,new A._cesium.Cartesian2(1,1)),color:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.color,"rgba(0,255,0,0.6)"))}),height:A._core.defaultValue(o.height,void 0),heightReference:A._core.defaultValue(o.heightReference,1),outline:A._core.defaultValue(o.outline,!1),outlineWidth:1,outlineColor:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.outlineColor,"rgba(255,255,255,0.6)")),distanceDisplayCondition:A._core.defaultValue(o.distanceDisplayCondition,new A._cesium.DistanceDisplayCondition(0,1e8))}});return A.SimpleGraphicObj.push(y.id),y};zo.prototype.createBox=function(o={},A){let f=this,m=this._viewer;this.drawHandler&&(this.drawHandler.destroy(),this.drawHandler=void 0),this.drawHandler=new this._cesium.ScreenSpaceEventHandler(m.scene.canvas),lt.states=1;let C=[],y,x=[0,0,200];return this.drawHandler.setInputAction(v=>{let E=f._getPosition.getMouseDegrees(v,y);if(!!E){if(C.length===0)C.push(E,E);else{E.height=C[0].height,C[1]=E;let I=f.Cdcl(C[0].lat,C[0].lon,C[0].lat,C[1].lon),w=f.Cdcl(C[0].lat,C[0].lon,C[1].lat,C[0].lon),Q={lon:(C[0].lon+C[1].lon)/2,lat:(C[0].lat+C[1].lat)/2};x&&(x[0]=I,x[1]=w),y.position=Li.Cartesian3.fromDegrees(Q.lon,Q.lat,C[0].height+x[2]/2),f.end()}y||(y=m.entities.add({id:f._core.getuid(),name:"\u65B0\u5EFA\u7ACB\u65B9\u4F53",position:f._cesium.Cartesian3.fromDegrees(E.lon,E.lat,E.height),box:{dimensions:new f._cesium.CallbackProperty(function(){return f._cesium.Cartesian3.fromArray(x)},!1),material:new f._cesium.ImageMaterialProperty({image:null,repeat:new f._cesium.Cartesian2(1,1),color:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.color,"rgba(0,255,0,0.6)"))}),fill:!0,outline:!0,outlineColor:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.outlineColor,"rgba(255,255,255,0.6)")),shadows:f._cesium.ShadowMode.ENABLED,distanceDisplayCondition:new f._cesium.DistanceDisplayCondition(0,1e8)}}),f.SimpleGraphicObj.push(y.id))}},this._cesium.ScreenSpaceEventType.LEFT_CLICK),this.drawHandler.setInputAction(v=>{if(C.length>0){f.tooltip.showAt(v.endPosition,"\u518D\u6B21\u70B9\u51FB\u7ED3\u675F\u7ED8\u5236\uFF0C\u53F3\u952E\u53D6\u6D88");let E=f._getPosition.getMouseDegrees(v,y);if(E){E.height=C[0].height,C[1]=E;let I=f.Cdcl(C[0].lat,C[0].lon,C[0].lat,C[1].lon),w=f.Cdcl(C[0].lat,C[0].lon,C[1].lat,C[0].lon),Q={lon:(C[0].lon+C[1].lon)/2,lat:(C[0].lat+C[1].lat)/2};x&&(x[0]=I,x[1]=w),y.position=Li.Cartesian3.fromDegrees(Q.lon,Q.lat,C[0].height+x[2]/2),o.showSize&&(f.clearLastSizeData(),f.showSizeData("box",y.position,x))}}else f.tooltip.showAt(v.endPosition,"\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236")},this._cesium.ScreenSpaceEventType.MOUSE_MOVE),this.drawHandler.setInputAction(v=>{this.end("cancel")},this._cesium.ScreenSpaceEventType.RIGHT_CLICK),this.end=v=>{if(this.end=void 0,f.drawHandler.destroy(),f.drawHandler=void 0,f.tooltip.show(!1),f.clearAllSizeData(),setTimeout(function(){lt.states=0},100),f._core.mouse(f._viewer.container,0,"0"),v==="cancel"){y&&(m.entities.remove(y),f.SimpleGraphicObj.pop());return}A&&typeof A=="function"&&A(y)},this};zo.prototype.addBox=function(o={}){let A=this,f=this._viewer,m=o.dimensions,C=f.entities.add({id:A._core.defaultValue(o.id,A._core.getuid()),name:A._core.defaultValue(o.name,"\u65B0\u5EFA\u7ACB\u65B9\u4F53"),position:o.position,box:{dimensions:new A._cesium.CallbackProperty(function(){return m},!1),material:new A._cesium.ImageMaterialProperty({image:A._core.defaultValue(o.image,null),repeat:A._core.defaultValue(o.repeat,new A._cesium.Cartesian2(1,1)),color:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.color,"rgba(0,255,0,0.6)"))}),fill:!0,outline:A._core.defaultValue(o.outline,!0),shadows:A._cesium.ShadowMode.ENABLED,outlineColor:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.outlineColor,"rgba(255,255,255,0.6)")),distanceDisplayCondition:A._core.defaultValue(o.distanceDisplayCondition,new A._cesium.DistanceDisplayCondition(0,1e8))}});return A.SimpleGraphicObj.push(C.id),C};zo.prototype.createCylinder=function(o={},A){let f=this,m=this._viewer;this.drawHandler&&(this.drawHandler.destroy(),this.drawHandler=void 0),this.drawHandler=new this._cesium.ScreenSpaceEventHandler(m.scene.canvas),lt.states=1;let C=[],y,x=0;return this.drawHandler.setInputAction(v=>{let E=f._getPosition.getMousePosition(v,y);if(!!E&&(C.length===0?C.push(E,E):(C[0]=E,x=f._cesium.Cartesian3.distance(C[0],C[1]),f.end()),!y)){let I=f.toDegrees(E);y=m.entities.add({id:f._core.getuid(),name:"\u65B0\u5EFA\u5706\u67F1\u4F53",position:f._cesium.Cartesian3.fromDegrees(I.lon,I.lat,I.height+100),cylinder:{length:200,topRadius:new f._cesium.CallbackProperty(function(){return x},!1),bottomRadius:new f._cesium.CallbackProperty(function(){return x},!1),material:new f._cesium.ImageMaterialProperty({image:null,repeat:new f._cesium.Cartesian2(1,1),color:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.color,"rgba(0,255,0,0.6)"))}),fill:!0,shadows:f._cesium.ShadowMode.ENABLED,distanceDisplayCondition:new f._cesium.DistanceDisplayCondition(0,1e8),outline:!0,outlineColor:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.outlineColor,"rgba(255,255,255,0.6)"))}}),y.changeTop=!0,f.SimpleGraphicObj.push(y.id)}},this._cesium.ScreenSpaceEventType.LEFT_CLICK),this.drawHandler.setInputAction(v=>{if(C.length>0){f.tooltip.showAt(v.endPosition,"\u518D\u6B21\u70B9\u51FB\u7ED3\u675F\u7ED8\u5236\uFF0C\u53F3\u952E\u53D6\u6D88");let E=f._getPosition.getMousePosition(v,y);E&&(C[0]=E,x=f._cesium.Cartesian3.distance(C[0],C[1]),o.showSize&&(f.clearLastSizeData(),f.showSizeData("cylinder",C[1],x,200)))}else f.tooltip.showAt(v.endPosition,"\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236")},this._cesium.ScreenSpaceEventType.MOUSE_MOVE),this.drawHandler.setInputAction(v=>{this.end("cancel")},this._cesium.ScreenSpaceEventType.RIGHT_CLICK),this.end=v=>{if(this.end=void 0,f.drawHandler.destroy(),f.drawHandler=void 0,f.tooltip.show(!1),f.clearAllSizeData(),setTimeout(function(){lt.states=0},100),f._core.mouse(f._viewer.container,0,"0"),v==="cancel"){y&&(m.entities.remove(y),f.SimpleGraphicObj.pop());return}A&&typeof A=="function"&&A(y)},this};zo.prototype.addCylinder=function(o={}){let A=this,f=this._viewer,m=o.radius,C=f.entities.add({id:A._core.defaultValue(o.id,A._core.getuid()),name:A._core.defaultValue(o.name,"\u65B0\u5EFA\u5706\u67F1\u4F53"),position:o.position,cylinder:{length:A._core.defaultValue(o.length,200),topRadius:new A._cesium.CallbackProperty(function(){return m},!1),bottomRadius:new A._cesium.CallbackProperty(function(){return m},!1),material:new A._cesium.ImageMaterialProperty({image:A._core.defaultValue(o.image,null),repeat:A._core.defaultValue(o.repeat,new A._cesium.Cartesian2(1,1)),color:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.color,"rgba(0,255,0,0.6)"))}),fill:!0,outline:A._core.defaultValue(o.outline,!0),shadows:A._cesium.ShadowMode.ENABLED,outlineColor:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.outlineColor,"rgba(255,255,255,0.6)")),distanceDisplayCondition:A._core.defaultValue(o.distanceDisplayCondition,new A._cesium.DistanceDisplayCondition(0,1e8))}});return C.changeTop=!0,A.SimpleGraphicObj.push(C.id),C};zo.prototype.createCone=function(o={},A){let f=this,m=this._viewer;this.drawHandler&&(this.drawHandler.destroy(),this.drawHandler=void 0),this.drawHandler=new this._cesium.ScreenSpaceEventHandler(m.scene.canvas),lt.states=1;let C=[],y,x=0;return this.drawHandler.setInputAction(v=>{let E=f._getPosition.getMousePosition(v,y);if(!!E&&(C.length===0?C.push(E,E):(C[0]=E,x=f._cesium.Cartesian3.distance(C[0],C[1]),f.end()),!y)){let I=f.toDegrees(E);y=m.entities.add({id:f._core.getuid(),name:"\u65B0\u5EFA\u5706\u9525\u4F53",position:f._cesium.Cartesian3.fromDegrees(I.lon,I.lat,I.height+100),cylinder:{length:200,topRadius:0,bottomRadius:new f._cesium.CallbackProperty(function(){return x},!1),material:new f._cesium.ImageMaterialProperty({image:null,repeat:new f._cesium.Cartesian2(1,1),color:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.color,"rgba(0,255,0,0.6)"))}),fill:!0,shadows:f._cesium.ShadowMode.ENABLED,distanceDisplayCondition:new f._cesium.DistanceDisplayCondition(0,1e8),outline:!0,outlineColor:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.outlineColor,"rgba(255,255,255,0.6)"))}}),y.changeTop=!1,f.SimpleGraphicObj.push(y.id)}},this._cesium.ScreenSpaceEventType.LEFT_CLICK),this.drawHandler.setInputAction(v=>{if(C.length>0){f.tooltip.showAt(v.endPosition,"\u518D\u6B21\u70B9\u51FB\u7ED3\u675F\u7ED8\u5236\uFF0C\u53F3\u952E\u53D6\u6D88");let E=f._getPosition.getMousePosition(v,y);E&&(C[0]=E,x=f._cesium.Cartesian3.distance(C[0],C[1]),o.showSize&&(f.clearLastSizeData(),f.showSizeData("cone",C[1],x,200)))}else f.tooltip.showAt(v.endPosition,"\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236")},this._cesium.ScreenSpaceEventType.MOUSE_MOVE),this.drawHandler.setInputAction(v=>{this.end("cancel")},this._cesium.ScreenSpaceEventType.RIGHT_CLICK),this.end=v=>{if(this.end=void 0,f.drawHandler.destroy(),f.drawHandler=void 0,f.tooltip.show(!1),f.clearAllSizeData(),setTimeout(function(){lt.states=0},100),f._core.mouse(f._viewer.container,0,"0"),v==="cancel"){y&&(m.entities.remove(y),f.SimpleGraphicObj.pop());return}A&&typeof A=="function"&&A(y)},this};zo.prototype.addCone=function(o={}){let A=this,f=this._viewer,m=o.bottomRadius,C=f.entities.add({id:A._core.defaultValue(o.id,A._core.getuid()),name:A._core.defaultValue(o.name,"\u65B0\u5EFA\u5706\u9525\u4F53"),position:o.position,cylinder:{length:A._core.defaultValue(o.length,200),topRadius:A._core.defaultValue(o.topRadius,0),bottomRadius:new A._cesium.CallbackProperty(function(){return m},!1),material:new A._cesium.ImageMaterialProperty({image:A._core.defaultValue(o.image,null),repeat:A._core.defaultValue(o.repeat,new A._cesium.Cartesian2(1,1)),color:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.color,"rgba(0,255,0,0.6)"))}),fill:!0,outline:A._core.defaultValue(o.outline,!0),shadows:A._cesium.ShadowMode.ENABLED,outlineColor:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.outlineColor,"rgba(255,255,255,0.6)")),distanceDisplayCondition:A._core.defaultValue(o.distanceDisplayCondition,new A._cesium.DistanceDisplayCondition(0,1e8))}});return C.changeTop=!1,A.SimpleGraphicObj.push(C.id),C};zo.prototype.createSphere=function(o={},A){let f=this,m=this._viewer;this.drawHandler&&(this.drawHandler.destroy(),this.drawHandler=void 0),this.drawHandler=new this._cesium.ScreenSpaceEventHandler(m.scene.canvas),lt.states=1;let C=[],y,x=0;return this.drawHandler.setInputAction(v=>{let E=f._getPosition.getMousePosition(v,y);!E||(C.length===0?C.push(E,E):(C[0]=E,x=f._cesium.Cartesian3.distance(C[0],C[1]),f.end()),y||(y=m.entities.add({id:f._core.getuid(),name:"\u65B0\u5EFA\u7403\u4F53",position:E.clone(),ellipsoid:{radii:new f._cesium.CallbackProperty(function(){return new Li.Cartesian3(x,x,x)},!1),material:new f._cesium.ImageMaterialProperty({image:null,repeat:new f._cesium.Cartesian2(1,1),color:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.color,"rgba(0,255,0,0.6)"))}),fill:!0,shadows:f._cesium.ShadowMode.ENABLED,distanceDisplayCondition:new f._cesium.DistanceDisplayCondition(0,1e8),outline:!0,outlineColor:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.outlineColor,"rgba(255,255,255,0.6)"))}}),y.isSphere=!0,f.SimpleGraphicObj.push(y.id)))},this._cesium.ScreenSpaceEventType.LEFT_CLICK),this.drawHandler.setInputAction(v=>{if(C.length>0){f.tooltip.showAt(v.endPosition,"\u518D\u6B21\u70B9\u51FB\u7ED3\u675F\u7ED8\u5236\uFF0C\u53F3\u952E\u53D6\u6D88");let E=f._getPosition.getMousePosition(v,y);E&&(C[0]=E,x=f._cesium.Cartesian3.distance(C[0],C[1]),o.showSize&&(f.clearLastSizeData(),f.showSizeData("sphere",C[1],x)))}else f.tooltip.showAt(v.endPosition,"\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236")},this._cesium.ScreenSpaceEventType.MOUSE_MOVE),this.drawHandler.setInputAction(v=>{this.end("cancel")},this._cesium.ScreenSpaceEventType.RIGHT_CLICK),this.end=v=>{if(this.end=void 0,f.drawHandler.destroy(),f.drawHandler=void 0,f.tooltip.show(!1),f.clearAllSizeData(),setTimeout(function(){lt.states=0},100),f._core.mouse(f._viewer.container,0,"0"),v==="cancel"){y&&(m.entities.remove(y),f.SimpleGraphicObj.pop());return}let E=f.toDegrees(C[0]),I=f.toDegrees(C[1]);E.height=I.height,C[0]=Li.Cartesian3.fromDegrees(E.lon,E.lat,E.height),A&&typeof A=="function"&&A(y)},this};zo.prototype.addSphere=function(o={}){let A=this,f=this._viewer,m=o.radius,C;o.radii?C=o.radii:C=new Li.Cartesian3(m,m,m);let y=f.entities.add({id:A._core.defaultValue(o.id,A._core.getuid()),name:A._core.defaultValue(o.name,"\u65B0\u5EFA\u7403\u4F53"),position:o.position,ellipsoid:{radii:new A._cesium.CallbackProperty(function(){return C},!1),material:new A._cesium.ImageMaterialProperty({image:A._core.defaultValue(o.image,null),repeat:A._core.defaultValue(o.repeat,new A._cesium.Cartesian2(1,1)),color:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.color,"rgba(0,255,0,0.6)"))}),fill:!0,outline:A._core.defaultValue(o.outline,!0),shadows:A._cesium.ShadowMode.ENABLED,outlineColor:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.outlineColor,"rgba(255,255,255,0.6)")),distanceDisplayCondition:A._core.defaultValue(o.distanceDisplayCondition,new A._cesium.DistanceDisplayCondition(0,1e8))}});return y.isSphere=!0,A.SimpleGraphicObj.push(y.id),y};zo.prototype.createPolyhedron=function(o={},A){let f=this,m=this._viewer;this.drawHandler&&(this.drawHandler.destroy(),this.drawHandler=void 0),this.drawHandler=new this._cesium.ScreenSpaceEventHandler(m.scene.canvas),lt.states=1;let C=[],y;return this.drawHandler.setInputAction(x=>{let v=f._getPosition.getMousePosition(x,y);if(!!v&&(C.length===1&&C.push(v.clone()),C.push(v),C.length===3&&!y)){let E=f.toDegrees(C[0]);y=m.entities.add({id:f._core.getuid(),name:"\u65B0\u5EFA\u591A\u8FB9\u4F53",polygon:{hierarchy:new f._cesium.CallbackProperty(function(){return new f._cesium.PolygonHierarchy(C)},!1),extrudedHeight:E.height+200,height:E.height,material:new f._cesium.ImageMaterialProperty({image:null,repeat:new f._cesium.Cartesian2(1,1),color:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.color,"rgba(0,255,0,0.6)"))}),fill:!0,shadows:f._cesium.ShadowMode.ENABLED,distanceDisplayCondition:new f._cesium.DistanceDisplayCondition(0,1e8),outline:!0,outlineColor:f._cesium.Color.fromCssColorString(f._core.defaultValue(o.outlineColor,"rgba(255,255,255,0.6)"))}}),f.SimpleGraphicObj.push(y.id)}},this._cesium.ScreenSpaceEventType.LEFT_CLICK),this.drawHandler.setInputAction(x=>{if(C.length===0)f.tooltip.showAt(x.endPosition,"\u70B9\u51FB\u6DFB\u52A0\u7B2C\u4E00\u4E2A\u70B9");else if(C.length===1)f.tooltip.showAt(x.endPosition,"\u70B9\u51FB\u6DFB\u52A0\u7B2C\u4E8C\u4E2A\u70B9");else{f.tooltip.showAt(x.endPosition,"\u70B9\u51FB\u6DFB\u52A0\u70B9\uFF0C\u53F3\u952E\u7ED3\u675F\u7ED8\u5236");let v=f._getPosition.getMousePosition(x,y);if(!v)return;C.pop(),C.push(v),o.showSize&&(f.clearLastSizeData(),f.showSizeData("polyhedron",C,0,200))}},this._cesium.ScreenSpaceEventType.MOUSE_MOVE),this.end=function(x){if(f.drawHandler.destroy(),f.drawHandler=void 0,f.tooltip.show(!1),f.clearAllSizeData(),setTimeout(function(){lt.states=0},100),f._core.mouse(f._viewer.container,0,"0"),f.end=void 0,x==="cancel"){y&&(m.entities.remove(y),f.SimpleGraphicObj.pop());return}A&&typeof A=="function"&&A(y)},this.drawHandler.setInputAction(x=>{f.end()},this._cesium.ScreenSpaceEventType.RIGHT_CLICK),this};zo.prototype.addPolyhedron=function(o={}){let A=this,f=this._viewer,m=o.positions,C=A._core.defaultValue(o.height,0),y;o.hierarchy?y=o.hierarchy:y=new A._cesium.PolygonHierarchy(m);let x=f.entities.add({id:A._core.defaultValue(o.id,A._core.getuid()),name:A._core.defaultValue(o.name,"\u65B0\u5EFA\u591A\u8FB9\u4F53"),polygon:{hierarchy:new A._cesium.CallbackProperty(function(){return y},!1),extrudedHeight:A._core.defaultValue(o.extrudedHeight,C+200),height:C,material:new A._cesium.ImageMaterialProperty({image:A._core.defaultValue(o.image,null),repeat:A._core.defaultValue(o.repeat,new A._cesium.Cartesian2(1,1)),color:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.color,"rgba(0,255,0,0.6)"))}),shadows:A._cesium.ShadowMode.ENABLED,fill:!0,outline:A._core.defaultValue(o.outline,!0),outlineColor:A._cesium.Color.fromCssColorString(A._core.defaultValue(o.outlineColor,"rgba(255,255,255,0.6)")),distanceDisplayCondition:A._core.defaultValue(o.distanceDisplayCondition,new A._cesium.DistanceDisplayCondition(0,1e8))}});return A.SimpleGraphicObj.push(x.id),x};zo.prototype.toDegrees=function(o){let A=this._cesium.Cartographic.fromCartesian(o);return{lon:this._cesium.Math.toDegrees(A.longitude),lat:this._cesium.Math.toDegrees(A.latitude),height:A.height}};zo.prototype.showSizeData=function(o,A,f,m){let C="",y,x=language?language.getStr("draw_tip_info_radius"):"\u534A\u5F84",v=language?language.getStr("unit_m"):"\u7C73",E=language?language.getStr("unit_km"):"\u5343\u7C73";switch(o){case"polyline":let M=Li.Cartesian3.distance(A[0],A[1]);M>=1e3?(M/=1e3,C=M.toFixed(2)+E):C=M.toFixed(2)+v,y=Li.Cartesian3.midpoint(A[0],A[1],new Li.Cartesian3);break;case"polygon":var w=[];y=new Li.Cartesian3,A.forEach(k=>{y=Li.Cartesian3.add(k,y,new Li.Cartesian3);let U=this.toDegrees(k);w.push([U.lon,U.lat])}),y=Li.Cartesian3.divideByScalar(y,A.length,new Li.Cartesian3),C=this._core.getArea(w,A);break;case"rectangle":let B=this.toDegrees(A[0]),T=this.toDegrees(A[1]),D=Li.Cartesian3.distance(A[0],Li.Cartesian3.fromDegrees(B.lon,T.lat,B.height)),F=Li.Cartesian3.distance(A[1],Li.Cartesian3.fromDegrees(B.lon,T.lat,B.height));var I=D*F;I>=1e6?(I/=1e6,C=I.toFixed(2)+"\u5E73\u65B9\u5343\u7C73"):C=I.toFixed(2)+"\u5E73\u65B9\u7C73",y=Li.Cartesian3.midpoint(A[0],A[1],new Li.Cartesian3);break;case"circle":y=A,f>=1e3?(f/=1e3,C=x+":"+f.toFixed(2)+E):C=x+":"+f.toFixed(2)+v;break;case"box":let L=[];f[0]<f[1]?(L.push(f[1]),L.push(f[0])):(L.push(f[0]),L.push(f[1])),L.push(f[2]);let R=["\u957F\uFF1A",`
\u5BBD\uFF1A`,`
\u9AD8\uFF1A`];L.forEach((k,U)=>{k>=1e3?(k/=1e3,C+=R[U]+k.toFixed(2)+E):C+=R[U]+k.toFixed(2)+v}),y=A;break;case"cylinder":y=A,f>=1e3?(f/=1e3,C=x+":"+f.toFixed(2)+E+`
`):C=x+":"+f.toFixed(2)+v+`