casc-cesium
Version:
Vue 3.x components for CesiumJS.
803 lines • 699 kB
JavaScript
/*! Vue Cesium v3.0.10 */import{ref as ie,getCurrentInstance as re,inject as Po,computed as ye,provide as on,unref as cs,isRef as wu,onBeforeUnmount as wn,onUnmounted as ot,watch as fe,markRaw as n1,reactive as Pe,onMounted as Sr,nextTick as De,withDirectives as _u,h as P,defineComponent as te,Transition as xu,Teleport as r1,createCommentVNode as ne,createApp as o1,toRaw as Tr,renderSlot as a1}from"vue";const s1="3.0.10",Eu=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",zi=Eu?Symbol("VueCesium"):"VueCesium",Ou=Eu?Symbol("_vc_f_"):"_vc_f_",Pu=Symbol();var l1=typeof global=="object"&&global&&global.Object===Object&&global,Mu=l1,c1=typeof self=="object"&&self&&self.Object===Object&&self,u1=Mu||c1||Function("return this")(),xi=u1,d1=xi.Symbol,fi=d1,Su=Object.prototype,h1=Su.hasOwnProperty,m1=Su.toString,Ar=fi?fi.toStringTag:void 0;function f1(e){var t=h1.call(e,Ar),i=e[Ar];try{e[Ar]=void 0;var n=!0}catch(a){}var r=m1.call(e);return n&&(t?e[Ar]=i:delete e[Ar]),r}var p1=Object.prototype,v1=p1.toString;function g1(e){return v1.call(e)}var y1="[object Null]",b1="[object Undefined]",Tu=fi?fi.toStringTag:void 0;function qn(e){return e==null?e===void 0?b1:y1:Tu&&Tu in Object(e)?f1(e):g1(e)}function Vi(e){return e!=null&&typeof e=="object"}var C1="[object Symbol]";function Mo(e){return typeof e=="symbol"||Vi(e)&&qn(e)==C1}function Au(e,t){for(var i=-1,n=e==null?0:e.length,r=Array(n);++i<n;)r[i]=t(e[i],i,e);return r}var w1=Array.isArray,Ei=w1,_1=1/0,Du=fi?fi.prototype:void 0,Iu=Du?Du.toString:void 0;function Ru(e){if(typeof e=="string")return e;if(Ei(e))return Au(e,Ru)+"";if(Mo(e))return Iu?Iu.call(e):"";var t=e+"";return t=="0"&&1/e==-_1?"-0":t}var x1=/\s/;function E1(e){for(var t=e.length;t--&&x1.test(e.charAt(t)););return t}var O1=/^\s+/;function P1(e){return e&&e.slice(0,E1(e)+1).replace(O1,"")}function $i(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Lu=0/0,M1=/^[-+]0x[0-9a-f]+$/i,S1=/^0b[01]+$/i,T1=/^0o[0-7]+$/i,A1=parseInt;function us(e){if(typeof e=="number")return e;if(Mo(e))return Lu;if($i(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=$i(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=P1(e);var i=S1.test(e);return i||T1.test(e)?A1(e.slice(2),i?2:8):M1.test(e)?Lu:+e}var Bu=1/0,D1=17976931348623157e292;function I1(e){if(!e)return e===0?e:0;if(e=us(e),e===Bu||e===-Bu){var t=e<0?-1:1;return t*D1}return e===e?e:0}function R1(e){var t=I1(e),i=t%1;return t===t?i?t-i:t:0}function ds(e){return e}var L1="[object AsyncFunction]",B1="[object Function]",j1="[object GeneratorFunction]",F1="[object Proxy]";function ju(e){if(!$i(e))return!1;var t=qn(e);return t==B1||t==j1||t==L1||t==F1}var k1=xi["__core-js_shared__"],hs=k1,Fu=function(){var e=/[^.]+$/.exec(hs&&hs.keys&&hs.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function N1(e){return!!Fu&&Fu in e}var z1=Function.prototype,V1=z1.toString;function _n(e){if(e!=null){try{return V1.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var $1=/[\\^$.*+?()[\]{}|]/g,G1=/^\[object .+?Constructor\]$/,U1=Function.prototype,H1=Object.prototype,W1=U1.toString,q1=H1.hasOwnProperty,Z1=RegExp("^"+W1.call(q1).replace($1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Q1(e){if(!$i(e)||N1(e))return!1;var t=ju(e)?Z1:G1;return t.test(_n(e))}function X1(e,t){return e==null?void 0:e[t]}function xn(e,t){var i=X1(e,t);return Q1(i)?i:void 0}var Y1=xn(xi,"WeakMap"),ms=Y1,ku=Object.create,J1=function(){function e(){}return function(t){if(!$i(t))return{};if(ku)return ku(t);e.prototype=t;var i=new e;return e.prototype=void 0,i}}(),K1=J1;function ew(e,t,i){switch(i.length){case 0:return e.call(t);case 1:return e.call(t,i[0]);case 2:return e.call(t,i[0],i[1]);case 3:return e.call(t,i[0],i[1],i[2])}return e.apply(t,i)}function tw(e,t){var i=-1,n=e.length;for(t||(t=Array(n));++i<n;)t[i]=e[i];return t}var iw=800,nw=16,rw=Date.now;function ow(e){var t=0,i=0;return function(){var n=rw(),r=nw-(n-i);if(i=n,r>0){if(++t>=iw)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function aw(e){return function(){return e}}var sw=function(){try{var e=xn(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),So=sw,lw=So?function(e,t){return So(e,"toString",{configurable:!0,enumerable:!1,value:aw(t),writable:!0})}:ds,cw=lw,uw=ow(cw),dw=uw;function hw(e,t){for(var i=-1,n=e==null?0:e.length;++i<n&&t(e[i],i,e)!==!1;);return e}function Nu(e,t,i,n){for(var r=e.length,a=i+(n?1:-1);n?a--:++a<r;)if(t(e[a],a,e))return a;return-1}function mw(e){return e!==e}function fw(e,t,i){for(var n=i-1,r=e.length;++n<r;)if(e[n]===t)return n;return-1}function pw(e,t,i){return t===t?fw(e,t,i):Nu(e,mw,i)}function vw(e,t){var i=e==null?0:e.length;return!!i&&pw(e,t,0)>-1}var gw=9007199254740991,yw=/^(?:0|[1-9]\d*)$/;function fs(e,t){var i=typeof e;return t=t==null?gw:t,!!t&&(i=="number"||i!="symbol"&&yw.test(e))&&e>-1&&e%1==0&&e<t}function zu(e,t,i){t=="__proto__"&&So?So(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i}function ps(e,t){return e===t||e!==e&&t!==t}var bw=Object.prototype,Cw=bw.hasOwnProperty;function Vu(e,t,i){var n=e[t];(!(Cw.call(e,t)&&ps(n,i))||i===void 0&&!(t in e))&&zu(e,t,i)}function To(e,t,i,n){var r=!i;i||(i={});for(var a=-1,o=t.length;++a<o;){var s=t[a],l=n?n(i[s],e[s],s,i,e):void 0;l===void 0&&(l=e[s]),r?zu(i,s,l):Vu(i,s,l)}return i}var $u=Math.max;function ww(e,t,i){return t=$u(t===void 0?e.length-1:t,0),function(){for(var n=arguments,r=-1,a=$u(n.length-t,0),o=Array(a);++r<a;)o[r]=n[t+r];r=-1;for(var s=Array(t+1);++r<t;)s[r]=n[r];return s[t]=i(o),ew(e,this,s)}}function _w(e,t){return dw(ww(e,t,ds),e+"")}var xw=9007199254740991;function vs(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=xw}function Ao(e){return e!=null&&vs(e.length)&&!ju(e)}var Ew=Object.prototype;function gs(e){var t=e&&e.constructor,i=typeof t=="function"&&t.prototype||Ew;return e===i}function Ow(e,t){for(var i=-1,n=Array(e);++i<e;)n[i]=t(i);return n}var Pw="[object Arguments]";function Gu(e){return Vi(e)&&qn(e)==Pw}var Uu=Object.prototype,Mw=Uu.hasOwnProperty,Sw=Uu.propertyIsEnumerable,Tw=Gu(function(){return arguments}())?Gu:function(e){return Vi(e)&&Mw.call(e,"callee")&&!Sw.call(e,"callee")},ys=Tw;function Aw(){return!1}var Hu=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Wu=Hu&&typeof module=="object"&&module&&!module.nodeType&&module,Dw=Wu&&Wu.exports===Hu,qu=Dw?xi.Buffer:void 0,Iw=qu?qu.isBuffer:void 0,Rw=Iw||Aw,Do=Rw,Lw="[object Arguments]",Bw="[object Array]",jw="[object Boolean]",Fw="[object Date]",kw="[object Error]",Nw="[object Function]",zw="[object Map]",Vw="[object Number]",$w="[object Object]",Gw="[object RegExp]",Uw="[object Set]",Hw="[object String]",Ww="[object WeakMap]",qw="[object ArrayBuffer]",Zw="[object DataView]",Qw="[object Float32Array]",Xw="[object Float64Array]",Yw="[object Int8Array]",Jw="[object Int16Array]",Kw="[object Int32Array]",e_="[object Uint8Array]",t_="[object Uint8ClampedArray]",i_="[object Uint16Array]",n_="[object Uint32Array]",Xe={};Xe[Qw]=Xe[Xw]=Xe[Yw]=Xe[Jw]=Xe[Kw]=Xe[e_]=Xe[t_]=Xe[i_]=Xe[n_]=!0,Xe[Lw]=Xe[Bw]=Xe[qw]=Xe[jw]=Xe[Zw]=Xe[Fw]=Xe[kw]=Xe[Nw]=Xe[zw]=Xe[Vw]=Xe[$w]=Xe[Gw]=Xe[Uw]=Xe[Hw]=Xe[Ww]=!1;function r_(e){return Vi(e)&&vs(e.length)&&!!Xe[qn(e)]}function Io(e){return function(t){return e(t)}}var Zu=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Dr=Zu&&typeof module=="object"&&module&&!module.nodeType&&module,o_=Dr&&Dr.exports===Zu,bs=o_&&Mu.process,a_=function(){try{var e=Dr&&Dr.require&&Dr.require("util").types;return e||bs&&bs.binding&&bs.binding("util")}catch(t){}}(),Zn=a_,Qu=Zn&&Zn.isTypedArray,s_=Qu?Io(Qu):r_,Xu=s_,l_=Object.prototype,c_=l_.hasOwnProperty;function Yu(e,t){var i=Ei(e),n=!i&&ys(e),r=!i&&!n&&Do(e),a=!i&&!n&&!r&&Xu(e),o=i||n||r||a,s=o?Ow(e.length,String):[],l=s.length;for(var c in e)(t||c_.call(e,c))&&!(o&&(c=="length"||r&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||fs(c,l)))&&s.push(c);return s}function Ju(e,t){return function(i){return e(t(i))}}var u_=Ju(Object.keys,Object),d_=u_,h_=Object.prototype,m_=h_.hasOwnProperty;function f_(e){if(!gs(e))return d_(e);var t=[];for(var i in Object(e))m_.call(e,i)&&i!="constructor"&&t.push(i);return t}function Ir(e){return Ao(e)?Yu(e):f_(e)}function p_(e){var t=[];if(e!=null)for(var i in Object(e))t.push(i);return t}var v_=Object.prototype,g_=v_.hasOwnProperty;function y_(e){if(!$i(e))return p_(e);var t=gs(e),i=[];for(var n in e)n=="constructor"&&(t||!g_.call(e,n))||i.push(n);return i}function Cs(e){return Ao(e)?Yu(e,!0):y_(e)}var b_=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,C_=/^\w*$/;function ws(e,t){if(Ei(e))return!1;var i=typeof e;return i=="number"||i=="symbol"||i=="boolean"||e==null||Mo(e)?!0:C_.test(e)||!b_.test(e)||t!=null&&e in Object(t)}var w_=xn(Object,"create"),Rr=w_;function __(){this.__data__=Rr?Rr(null):{},this.size=0}function x_(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var E_="__lodash_hash_undefined__",O_=Object.prototype,P_=O_.hasOwnProperty;function M_(e){var t=this.__data__;if(Rr){var i=t[e];return i===E_?void 0:i}return P_.call(t,e)?t[e]:void 0}var S_=Object.prototype,T_=S_.hasOwnProperty;function A_(e){var t=this.__data__;return Rr?t[e]!==void 0:T_.call(t,e)}var D_="__lodash_hash_undefined__";function I_(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=Rr&&t===void 0?D_:t,this}function En(e){var t=-1,i=e==null?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}En.prototype.clear=__,En.prototype.delete=x_,En.prototype.get=M_,En.prototype.has=A_,En.prototype.set=I_;function R_(){this.__data__=[],this.size=0}function Ro(e,t){for(var i=e.length;i--;)if(ps(e[i][0],t))return i;return-1}var L_=Array.prototype,B_=L_.splice;function j_(e){var t=this.__data__,i=Ro(t,e);if(i<0)return!1;var n=t.length-1;return i==n?t.pop():B_.call(t,i,1),--this.size,!0}function F_(e){var t=this.__data__,i=Ro(t,e);return i<0?void 0:t[i][1]}function k_(e){return Ro(this.__data__,e)>-1}function N_(e,t){var i=this.__data__,n=Ro(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this}function Gi(e){var t=-1,i=e==null?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}Gi.prototype.clear=R_,Gi.prototype.delete=j_,Gi.prototype.get=F_,Gi.prototype.has=k_,Gi.prototype.set=N_;var z_=xn(xi,"Map"),Lr=z_;function V_(){this.size=0,this.__data__={hash:new En,map:new(Lr||Gi),string:new En}}function $_(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Lo(e,t){var i=e.__data__;return $_(t)?i[typeof t=="string"?"string":"hash"]:i.map}function G_(e){var t=Lo(this,e).delete(e);return this.size-=t?1:0,t}function U_(e){return Lo(this,e).get(e)}function H_(e){return Lo(this,e).has(e)}function W_(e,t){var i=Lo(this,e),n=i.size;return i.set(e,t),this.size+=i.size==n?0:1,this}function Ui(e){var t=-1,i=e==null?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}Ui.prototype.clear=V_,Ui.prototype.delete=G_,Ui.prototype.get=U_,Ui.prototype.has=H_,Ui.prototype.set=W_;var q_="Expected a function";function _s(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(q_);var i=function(){var n=arguments,r=t?t.apply(this,n):n[0],a=i.cache;if(a.has(r))return a.get(r);var o=e.apply(this,n);return i.cache=a.set(r,o)||a,o};return i.cache=new(_s.Cache||Ui),i}_s.Cache=Ui;var Z_=500;function Q_(e){var t=_s(e,function(n){return i.size===Z_&&i.clear(),n}),i=t.cache;return t}var X_=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Y_=/\\(\\)?/g,J_=Q_(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(X_,function(i,n,r,a){t.push(r?a.replace(Y_,"$1"):n||i)}),t}),K_=J_;function Br(e){return e==null?"":Ru(e)}function xs(e,t){return Ei(e)?e:ws(e,t)?[e]:K_(Br(e))}var e2=1/0;function jr(e){if(typeof e=="string"||Mo(e))return e;var t=e+"";return t=="0"&&1/e==-e2?"-0":t}function Es(e,t){t=xs(t,e);for(var i=0,n=t.length;e!=null&&i<n;)e=e[jr(t[i++])];return i&&i==n?e:void 0}function Ku(e,t,i){var n=e==null?void 0:Es(e,t);return n===void 0?i:n}function Os(e,t){for(var i=-1,n=t.length,r=e.length;++i<n;)e[r+i]=t[i];return e}var ed=fi?fi.isConcatSpreadable:void 0;function t2(e){return Ei(e)||ys(e)||!!(ed&&e&&e[ed])}function td(e,t,i,n,r){var a=-1,o=e.length;for(i||(i=t2),r||(r=[]);++a<o;){var s=e[a];t>0&&i(s)?t>1?td(s,t-1,i,n,r):Os(r,s):n||(r[r.length]=s)}return r}var i2=Ju(Object.getPrototypeOf,Object),id=i2;function nd(e,t,i){var n=-1,r=e.length;t<0&&(t=-t>r?0:r+t),i=i>r?r:i,i<0&&(i+=r),r=t>i?0:i-t>>>0,t>>>=0;for(var a=Array(r);++n<r;)a[n]=e[n+t];return a}function n2(e,t,i){var n=e.length;return i=i===void 0?n:i,!t&&i>=n?e:nd(e,t,i)}var r2="\\ud800-\\udfff",o2="\\u0300-\\u036f",a2="\\ufe20-\\ufe2f",s2="\\u20d0-\\u20ff",l2=o2+a2+s2,c2="\\ufe0e\\ufe0f",u2="\\u200d",d2=RegExp("["+u2+r2+l2+c2+"]");function rd(e){return d2.test(e)}function h2(e){return e.split("")}var od="\\ud800-\\udfff",m2="\\u0300-\\u036f",f2="\\ufe20-\\ufe2f",p2="\\u20d0-\\u20ff",v2=m2+f2+p2,g2="\\ufe0e\\ufe0f",y2="["+od+"]",Ps="["+v2+"]",Ms="\\ud83c[\\udffb-\\udfff]",b2="(?:"+Ps+"|"+Ms+")",ad="[^"+od+"]",sd="(?:\\ud83c[\\udde6-\\uddff]){2}",ld="[\\ud800-\\udbff][\\udc00-\\udfff]",C2="\\u200d",cd=b2+"?",ud="["+g2+"]?",w2="(?:"+C2+"(?:"+[ad,sd,ld].join("|")+")"+ud+cd+")*",_2=ud+cd+w2,x2="(?:"+[ad+Ps+"?",Ps,sd,ld,y2].join("|")+")",E2=RegExp(Ms+"(?="+Ms+")|"+x2+_2,"g");function O2(e){return e.match(E2)||[]}function P2(e){return rd(e)?O2(e):h2(e)}function M2(e){return function(t){t=Br(t);var i=rd(t)?P2(t):void 0,n=i?i[0]:t.charAt(0),r=i?n2(i,1).join(""):t.slice(1);return n[e]()+r}}var S2=M2("toUpperCase"),T2=S2;function A2(e){return T2(Br(e).toLowerCase())}function D2(e,t,i,n){var r=-1,a=e==null?0:e.length;for(n&&a&&(i=e[++r]);++r<a;)i=t(i,e[r],r,e);return i}function I2(e){return function(t){return e==null?void 0:e[t]}}var R2={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},L2=I2(R2),B2=L2,j2=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,F2="\\u0300-\\u036f",k2="\\ufe20-\\ufe2f",N2="\\u20d0-\\u20ff",z2=F2+k2+N2,V2="["+z2+"]",$2=RegExp(V2,"g");function G2(e){return e=Br(e),e&&e.replace(j2,B2).replace($2,"")}var U2=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function H2(e){return e.match(U2)||[]}var W2=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function q2(e){return W2.test(e)}var dd="\\ud800-\\udfff",Z2="\\u0300-\\u036f",Q2="\\ufe20-\\ufe2f",X2="\\u20d0-\\u20ff",Y2=Z2+Q2+X2,hd="\\u2700-\\u27bf",md="a-z\\xdf-\\xf6\\xf8-\\xff",J2="\\xac\\xb1\\xd7\\xf7",K2="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ex="\\u2000-\\u206f",tx=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",fd="A-Z\\xc0-\\xd6\\xd8-\\xde",ix="\\ufe0e\\ufe0f",pd=J2+K2+ex+tx,vd="['\u2019]",gd="["+pd+"]",nx="["+Y2+"]",yd="\\d+",rx="["+hd+"]",bd="["+md+"]",Cd="[^"+dd+pd+yd+hd+md+fd+"]",ox="\\ud83c[\\udffb-\\udfff]",ax="(?:"+nx+"|"+ox+")",sx="[^"+dd+"]",wd="(?:\\ud83c[\\udde6-\\uddff]){2}",_d="[\\ud800-\\udbff][\\udc00-\\udfff]",Qn="["+fd+"]",lx="\\u200d",xd="(?:"+bd+"|"+Cd+")",cx="(?:"+Qn+"|"+Cd+")",Ed="(?:"+vd+"(?:d|ll|m|re|s|t|ve))?",Od="(?:"+vd+"(?:D|LL|M|RE|S|T|VE))?",Pd=ax+"?",Md="["+ix+"]?",ux="(?:"+lx+"(?:"+[sx,wd,_d].join("|")+")"+Md+Pd+")*",dx="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",hx="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",mx=Md+Pd+ux,fx="(?:"+[rx,wd,_d].join("|")+")"+mx,px=RegExp([Qn+"?"+bd+"+"+Ed+"(?="+[gd,Qn,"$"].join("|")+")",cx+"+"+Od+"(?="+[gd,Qn+xd,"$"].join("|")+")",Qn+"?"+xd+"+"+Ed,Qn+"+"+Od,hx,dx,yd,fx].join("|"),"g");function vx(e){return e.match(px)||[]}function gx(e,t,i){return e=Br(e),t=i?void 0:t,t===void 0?q2(e)?vx(e):H2(e):e.match(t)||[]}var yx="['\u2019]",bx=RegExp(yx,"g");function Cx(e){return function(t){return D2(gx(G2(t).replace(bx,"")),e,"")}}var wx=Cx(function(e,t,i){return t=t.toLowerCase(),e+(i?A2(t):t)}),Sd=wx;function _x(){this.__data__=new Gi,this.size=0}function xx(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i}function Ex(e){return this.__data__.get(e)}function Ox(e){return this.__data__.has(e)}var Px=200;function Mx(e,t){var i=this.__data__;if(i instanceof Gi){var n=i.__data__;if(!Lr||n.length<Px-1)return n.push([e,t]),this.size=++i.size,this;i=this.__data__=new Ui(n)}return i.set(e,t),this.size=i.size,this}function Ri(e){var t=this.__data__=new Gi(e);this.size=t.size}Ri.prototype.clear=_x,Ri.prototype.delete=xx,Ri.prototype.get=Ex,Ri.prototype.has=Ox,Ri.prototype.set=Mx;function Sx(e,t){return e&&To(t,Ir(t),e)}function Tx(e,t){return e&&To(t,Cs(t),e)}var Td=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ad=Td&&typeof module=="object"&&module&&!module.nodeType&&module,Ax=Ad&&Ad.exports===Td,Dd=Ax?xi.Buffer:void 0,Id=Dd?Dd.allocUnsafe:void 0;function Dx(e,t){if(t)return e.slice();var i=e.length,n=Id?Id(i):new e.constructor(i);return e.copy(n),n}function Ix(e,t){for(var i=-1,n=e==null?0:e.length,r=0,a=[];++i<n;){var o=e[i];t(o,i,e)&&(a[r++]=o)}return a}function Rd(){return[]}var Rx=Object.prototype,Lx=Rx.propertyIsEnumerable,Ld=Object.getOwnPropertySymbols,Bx=Ld?function(e){return e==null?[]:(e=Object(e),Ix(Ld(e),function(t){return Lx.call(e,t)}))}:Rd,Ss=Bx;function jx(e,t){return To(e,Ss(e),t)}var Fx=Object.getOwnPropertySymbols,kx=Fx?function(e){for(var t=[];e;)Os(t,Ss(e)),e=id(e);return t}:Rd,Bd=kx;function Nx(e,t){return To(e,Bd(e),t)}function jd(e,t,i){var n=t(e);return Ei(e)?n:Os(n,i(e))}function Ts(e){return jd(e,Ir,Ss)}function zx(e){return jd(e,Cs,Bd)}var Vx=xn(xi,"DataView"),As=Vx,$x=xn(xi,"Promise"),Ds=$x,Gx=xn(xi,"Set"),Is=Gx,Fd="[object Map]",Ux="[object Object]",kd="[object Promise]",Nd="[object Set]",zd="[object WeakMap]",Vd="[object DataView]",Hx=_n(As),Wx=_n(Lr),qx=_n(Ds),Zx=_n(Is),Qx=_n(ms),On=qn;(As&&On(new As(new ArrayBuffer(1)))!=Vd||Lr&&On(new Lr)!=Fd||Ds&&On(Ds.resolve())!=kd||Is&&On(new Is)!=Nd||ms&&On(new ms)!=zd)&&(On=function(e){var t=qn(e),i=t==Ux?e.constructor:void 0,n=i?_n(i):"";if(n)switch(n){case Hx:return Vd;case Wx:return Fd;case qx:return kd;case Zx:return Nd;case Qx:return zd}return t});var Fr=On,Xx=Object.prototype,Yx=Xx.hasOwnProperty;function Jx(e){var t=e.length,i=new e.constructor(t);return t&&typeof e[0]=="string"&&Yx.call(e,"index")&&(i.index=e.index,i.input=e.input),i}var Kx=xi.Uint8Array,Bo=Kx;function Rs(e){var t=new e.constructor(e.byteLength);return new Bo(t).set(new Bo(e)),t}function eE(e,t){var i=t?Rs(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.byteLength)}var tE=/\w*$/;function iE(e){var t=new e.constructor(e.source,tE.exec(e));return t.lastIndex=e.lastIndex,t}var $d=fi?fi.prototype:void 0,Gd=$d?$d.valueOf:void 0;function nE(e){return Gd?Object(Gd.call(e)):{}}function rE(e,t){var i=t?Rs(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.length)}var oE="[object Boolean]",aE="[object Date]",sE="[object Map]",lE="[object Number]",cE="[object RegExp]",uE="[object Set]",dE="[object String]",hE="[object Symbol]",mE="[object ArrayBuffer]",fE="[object DataView]",pE="[object Float32Array]",vE="[object Float64Array]",gE="[object Int8Array]",yE="[object Int16Array]",bE="[object Int32Array]",CE="[object Uint8Array]",wE="[object Uint8ClampedArray]",_E="[object Uint16Array]",xE="[object Uint32Array]";function EE(e,t,i){var n=e.constructor;switch(t){case mE:return Rs(e);case oE:case aE:return new n(+e);case fE:return eE(e,i);case pE:case vE:case gE:case yE:case bE:case CE:case wE:case _E:case xE:return rE(e,i);case sE:return new n;case lE:case dE:return new n(e);case cE:return iE(e);case uE:return new n;case hE:return nE(e)}}function OE(e){return typeof e.constructor=="function"&&!gs(e)?K1(id(e)):{}}var PE="[object Map]";function ME(e){return Vi(e)&&Fr(e)==PE}var Ud=Zn&&Zn.isMap,SE=Ud?Io(Ud):ME,TE=SE,AE="[object Set]";function DE(e){return Vi(e)&&Fr(e)==AE}var Hd=Zn&&Zn.isSet,IE=Hd?Io(Hd):DE,RE=IE,LE=1,BE=2,jE=4,Wd="[object Arguments]",FE="[object Array]",kE="[object Boolean]",NE="[object Date]",zE="[object Error]",qd="[object Function]",VE="[object GeneratorFunction]",$E="[object Map]",GE="[object Number]",Zd="[object Object]",UE="[object RegExp]",HE="[object Set]",WE="[object String]",qE="[object Symbol]",ZE="[object WeakMap]",QE="[object ArrayBuffer]",XE="[object DataView]",YE="[object Float32Array]",JE="[object Float64Array]",KE="[object Int8Array]",eO="[object Int16Array]",tO="[object Int32Array]",iO="[object Uint8Array]",nO="[object Uint8ClampedArray]",rO="[object Uint16Array]",oO="[object Uint32Array]",qe={};qe[Wd]=qe[FE]=qe[QE]=qe[XE]=qe[kE]=qe[NE]=qe[YE]=qe[JE]=qe[KE]=qe[eO]=qe[tO]=qe[$E]=qe[GE]=qe[Zd]=qe[UE]=qe[HE]=qe[WE]=qe[qE]=qe[iO]=qe[nO]=qe[rO]=qe[oO]=!0,qe[zE]=qe[qd]=qe[ZE]=!1;function jo(e,t,i,n,r,a){var o,s=t&LE,l=t&BE,c=t&jE;if(i&&(o=r?i(e,n,r,a):i(e)),o!==void 0)return o;if(!$i(e))return e;var u=Ei(e);if(u){if(o=Jx(e),!s)return tw(e,o)}else{var d=Fr(e),m=d==qd||d==VE;if(Do(e))return Dx(e,s);if(d==Zd||d==Wd||m&&!r){if(o=l||m?{}:OE(e),!s)return l?Nx(e,Tx(o,e)):jx(e,Sx(o,e))}else{if(!qe[d])return r?e:{};o=EE(e,d,s)}}a||(a=new Ri);var f=a.get(e);if(f)return f;a.set(e,o),RE(e)?e.forEach(function(b){o.add(jo(b,t,i,b,e,a))}):TE(e)&&e.forEach(function(b,_){o.set(_,jo(b,t,i,_,e,a))});var v=c?l?zx:Ts:l?Cs:Ir,C=u?void 0:v(e);return hw(C||e,function(b,_){C&&(_=b,b=e[_]),Vu(o,_,jo(b,t,i,_,e,a))}),o}var aO=1,sO=4;function an(e){return jo(e,aO|sO)}var lO="__lodash_hash_undefined__";function cO(e){return this.__data__.set(e,lO),this}function uO(e){return this.__data__.has(e)}function kr(e){var t=-1,i=e==null?0:e.length;for(this.__data__=new Ui;++t<i;)this.add(e[t])}kr.prototype.add=kr.prototype.push=cO,kr.prototype.has=uO;function dO(e,t){for(var i=-1,n=e==null?0:e.length;++i<n;)if(t(e[i],i,e))return!0;return!1}function Qd(e,t){return e.has(t)}var hO=1,mO=2;function Xd(e,t,i,n,r,a){var o=i&hO,s=e.length,l=t.length;if(s!=l&&!(o&&l>s))return!1;var c=a.get(e),u=a.get(t);if(c&&u)return c==t&&u==e;var d=-1,m=!0,f=i&mO?new kr:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var v=e[d],C=t[d];if(n)var b=o?n(C,v,d,t,e,a):n(v,C,d,e,t,a);if(b!==void 0){if(b)continue;m=!1;break}if(f){if(!dO(t,function(_,M){if(!Qd(f,M)&&(v===_||r(v,_,i,n,a)))return f.push(M)})){m=!1;break}}else if(!(v===C||r(v,C,i,n,a))){m=!1;break}}return a.delete(e),a.delete(t),m}function fO(e){var t=-1,i=Array(e.size);return e.forEach(function(n,r){i[++t]=[r,n]}),i}function pO(e){var t=-1,i=Array(e.size);return e.forEach(function(n){i[++t]=n}),i}var vO=1,gO=2,yO="[object Boolean]",bO="[object Date]",CO="[object Error]",wO="[object Map]",_O="[object Number]",xO="[object RegExp]",EO="[object Set]",OO="[object String]",PO="[object Symbol]",MO="[object ArrayBuffer]",SO="[object DataView]",Yd=fi?fi.prototype:void 0,Ls=Yd?Yd.valueOf:void 0;function TO(e,t,i,n,r,a,o){switch(i){case SO:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case MO:return!(e.byteLength!=t.byteLength||!a(new Bo(e),new Bo(t)));case yO:case bO:case _O:return ps(+e,+t);case CO:return e.name==t.name&&e.message==t.message;case xO:case OO:return e==t+"";case wO:var s=fO;case EO:var l=n&vO;if(s||(s=pO),e.size!=t.size&&!l)return!1;var c=o.get(e);if(c)return c==t;n|=gO,o.set(e,t);var u=Xd(s(e),s(t),n,r,a,o);return o.delete(e),u;case PO:if(Ls)return Ls.call(e)==Ls.call(t)}return!1}var AO=1,DO=Object.prototype,IO=DO.hasOwnProperty;function RO(e,t,i,n,r,a){var o=i&AO,s=Ts(e),l=s.length,c=Ts(t),u=c.length;if(l!=u&&!o)return!1;for(var d=l;d--;){var m=s[d];if(!(o?m in t:IO.call(t,m)))return!1}var f=a.get(e),v=a.get(t);if(f&&v)return f==t&&v==e;var C=!0;a.set(e,t),a.set(t,e);for(var b=o;++d<l;){m=s[d];var _=e[m],M=t[m];if(n)var g=o?n(M,_,m,t,e,a):n(_,M,m,e,t,a);if(!(g===void 0?_===M||r(_,M,i,n,a):g)){C=!1;break}b||(b=m=="constructor")}if(C&&!b){var E=e.constructor,T=t.constructor;E!=T&&"constructor"in e&&"constructor"in t&&!(typeof E=="function"&&E instanceof E&&typeof T=="function"&&T instanceof T)&&(C=!1)}return a.delete(e),a.delete(t),C}var LO=1,Jd="[object Arguments]",Kd="[object Array]",Fo="[object Object]",BO=Object.prototype,eh=BO.hasOwnProperty;function jO(e,t,i,n,r,a){var o=Ei(e),s=Ei(t),l=o?Kd:Fr(e),c=s?Kd:Fr(t);l=l==Jd?Fo:l,c=c==Jd?Fo:c;var u=l==Fo,d=c==Fo,m=l==c;if(m&&Do(e)){if(!Do(t))return!1;o=!0,u=!1}if(m&&!u)return a||(a=new Ri),o||Xu(e)?Xd(e,t,i,n,r,a):TO(e,t,l,i,n,r,a);if(!(i&LO)){var f=u&&eh.call(e,"__wrapped__"),v=d&&eh.call(t,"__wrapped__");if(f||v){var C=f?e.value():e,b=v?t.value():t;return a||(a=new Ri),r(C,b,i,n,a)}}return m?(a||(a=new Ri),RO(e,t,i,n,r,a)):!1}function ko(e,t,i,n,r){return e===t?!0:e==null||t==null||!Vi(e)&&!Vi(t)?e!==e&&t!==t:jO(e,t,i,n,ko,r)}var FO=1,kO=2;function NO(e,t,i,n){var r=i.length,a=r,o=!n;if(e==null)return!a;for(e=Object(e);r--;){var s=i[r];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++r<a;){s=i[r];var l=s[0],c=e[l],u=s[1];if(o&&s[2]){if(c===void 0&&!(l in e))return!1}else{var d=new Ri;if(n)var m=n(c,u,l,e,t,d);if(!(m===void 0?ko(u,c,FO|kO,n,d):m))return!1}}return!0}function th(e){return e===e&&!$i(e)}function zO(e){for(var t=Ir(e),i=t.length;i--;){var n=t[i],r=e[n];t[i]=[n,r,th(r)]}return t}function ih(e,t){return function(i){return i==null?!1:i[e]===t&&(t!==void 0||e in Object(i))}}function VO(e){var t=zO(e);return t.length==1&&t[0][2]?ih(t[0][0],t[0][1]):function(i){return i===e||NO(i,e,t)}}function $O(e,t){return e!=null&&t in Object(e)}function GO(e,t,i){t=xs(t,e);for(var n=-1,r=t.length,a=!1;++n<r;){var o=jr(t[n]);if(!(a=e!=null&&i(e,o)))break;e=e[o]}return a||++n!=r?a:(r=e==null?0:e.length,!!r&&vs(r)&&fs(o,r)&&(Ei(e)||ys(e)))}function UO(e,t){return e!=null&&GO(e,t,$O)}var HO=1,WO=2;function qO(e,t){return ws(e)&&th(t)?ih(jr(e),t):function(i){var n=Ku(i,e);return n===void 0&&n===t?UO(i,e):ko(t,n,HO|WO)}}function ZO(e){return function(t){return t==null?void 0:t[e]}}function QO(e){return function(t){return Es(t,e)}}function XO(e){return ws(e)?ZO(jr(e)):QO(e)}function No(e){return typeof e=="function"?e:e==null?ds:typeof e=="object"?Ei(e)?qO(e[0],e[1]):VO(e):XO(e)}var YO=function(){return xi.Date.now()},Bs=YO,JO="Expected a function",KO=Math.max,eP=Math.min;function tP(e,t,i){var n,r,a,o,s,l,c=0,u=!1,d=!1,m=!0;if(typeof e!="function")throw new TypeError(JO);t=us(t)||0,$i(i)&&(u=!!i.leading,d="maxWait"in i,a=d?KO(us(i.maxWait)||0,t):a,m="trailing"in i?!!i.trailing:m);function f(A){var R=n,I=r;return n=r=void 0,c=A,o=e.apply(I,R),o}function v(A){return c=A,s=setTimeout(_,t),u?f(A):o}function C(A){var R=A-l,I=A-c,j=t-R;return d?eP(j,a-I):j}function b(A){var R=A-l,I=A-c;return l===void 0||R>=t||R<0||d&&I>=a}function _(){var A=Bs();if(b(A))return M(A);s=setTimeout(_,C(A))}function M(A){return s=void 0,m&&n?f(A):(n=r=void 0,o)}function g(){s!==void 0&&clearTimeout(s),c=0,n=l=r=s=void 0}function E(){return s===void 0?o:M(Bs())}function T(){var A=Bs(),R=b(A);if(n=arguments,r=this,l=A,R){if(s===void 0)return v(l);if(d)return clearTimeout(s),s=setTimeout(_,t),f(l)}return s===void 0&&(s=setTimeout(_,t)),o}return T.cancel=g,T.flush=E,T}function js(e){return Vi(e)&&Ao(e)}function iP(e,t,i){for(var n=-1,r=e==null?0:e.length;++n<r;)if(i(t,e[n]))return!0;return!1}var nP=200;function rP(e,t,i,n){var r=-1,a=vw,o=!0,s=e.length,l=[],c=t.length;if(!s)return l;i&&(t=Au(t,Io(i))),n?(a=iP,o=!1):t.length>=nP&&(a=Qd,o=!1,t=new kr(t));e:for(;++r<s;){var u=e[r],d=i==null?u:i(u);if(u=n||u!==0?u:0,o&&d===d){for(var m=c;m--;)if(t[m]===d)continue e;l.push(u)}else a(t,d,n)||l.push(u)}return l}function nh(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var oP=_w(function(e,t){var i=nh(t);return js(i)&&(i=void 0),js(e)?rP(e,td(t,1,js,!0),No(i)):[]}),Mt=oP;function aP(e){return function(t,i,n){var r=Object(t);if(!Ao(t)){var a=No(i);t=Ir(t),i=function(s){return a(r[s],s,r)}}var o=e(t,i,n);return o>-1?r[a?t[o]:o]:void 0}}var sP=Math.max;function rh(e,t,i){var n=e==null?0:e.length;if(!n)return-1;var r=i==null?0:R1(i);return r<0&&(r=sP(n+r,0)),Nu(e,No(t),r)}var lP=aP(rh),oh=lP;function cP(e,t){return t.length<2?e:Es(e,nd(t,0,-1))}function uP(e,t){return ko(e,t)}function dP(e){return e===null}function ci(e){return e===void 0}function hP(e,t){return t=xs(t,e),e=cP(e,t),e==null||delete e[jr(nh(t))]}var mP=Array.prototype,fP=mP.splice;function pP(e,t){for(var i=e?t.length:0,n=i-1;i--;){var r=t[i];if(i==n||r!==a){var a=r;fs(r)?fP.call(e,r,1):hP(e,r)}}return e}function ah(e,t){var i=[];if(!(e&&e.length))return i;var n=-1,r=[],a=e.length;for(t=No(t);++n<a;){var o=e[n];t(o,n,e)&&(i.push(o),r.push(n))}return pP(e,r),i}const vP=Object.prototype.hasOwnProperty,je=(e,t)=>vP.call(e,t),Ze=Array.isArray,bt=e=>typeof e=="function",pi=e=>typeof e=="string",Pn=e=>e!==null&&typeof e=="object",gP=Object.prototype.toString,yP=e=>gP.call(e),Ye=e=>yP(e)==="[object Object]",Fs=e=>{const t=Object.create(null);return i=>t[i]||(t[i]=e(i))},bP=/-(\w)/g,Rt=Fs(e=>e.replace(bP,(t,i)=>i?i.toUpperCase():"")),CP=/\B([A-Z])/g,wP=Fs(e=>e.replace(CP,"-$1").toLowerCase()),zo=Fs(e=>e.charAt(0).toUpperCase()+e.slice(1)),sh=e=>Object.keys(e),Vo=ie();function $o(e,t=void 0){const i=re()?Po(Pu,Vo):Vo;return e?ye(()=>{var n,r;return(r=(n=i.value)==null?void 0:n[e])!=null?r:t}):i}const lh=(e,t,i=!1)=>{var n;const r=!!re(),a=r?$o():void 0,o=(n=t==null?void 0:t.provide)!=null?n:r?on:void 0;if(!o){console.warn("provideGlobalConfig","provideGlobalConfig() can only be used inside setup().");return}const s=ye(()=>{const l=cs(e);return(a==null?void 0:a.value)?_P(a.value,l):l});return o(Pu,s),(i||!Vo.value)&&(Vo.value=s.value),s},_P=(e,t)=>{var i;const n=[...new Set([...sh(e),...sh(t)])],r={};for(const a of n)r[a]=(i=t[a])!=null?i:e[a];return r};function xP(e){if(typeof e!="string"&&(e=e+""),e.length===0)return".";let t=e.charCodeAt(0);const i=t===47;let n=-1,r=!0;for(let a=e.length-1;a>=1;--a)if(t=e.charCodeAt(a),t===47){if(!r){n=a;break}}else r=!1;return n===-1?i?"/":".":i&&n===1?"/":e.slice(0,n)}function Go(e){return ci(e)||dP(e)?!0:e instanceof Element?!1:Object.keys(e).length===0}const ae=wP;function EP(e,t){if(typeof e!="object"||e===null)return!1;let i=Object.getPrototypeOf(e);for(;;){if(i===null)return!1;if(i===(t==null?void 0:t.prototype))return!0;i=Object.getPrototypeOf(i)}}function OP(e){let t;const i=Object.keys(Cesium);for(let n=0;n<i.length;n++){const r=i[n];if(EP(e,Cesium[r])){t=r;break}}return t}function Nr(e,t=!1){if(e&&e.constructor){if(t){const i=OP(e);if(i)return i}return e.constructor.name}return typeof e}function Xn(e,t){return e!=null?e:t}function vi(e,t=[]){const i={};return Object.keys(e).forEach(n=>{if(t.indexOf(n)===-1){const r=e[n];i[n]=bt(r)?void 0:Ye(r)?bt(r.default)?r.default():r.default:r}}),i}const sn=(e,t,i=[])=>{for(const n in t)!e[n]&&i.indexOf(n)===-1&&(e[n]=t[n])};function PP(e){if(Array.isArray(e))return!0;if(typeof e!="object"||!e)return!1;const t=e.length;return typeof t=="number"&&t>=0}function Uo(e){var t,i,n,r;const a=(b="")=>function(..._){b&&(pi(_[0])?_[0]=b.trim()+" "+_[0]:_=[b.trim(),..._]),console.log(..._)},o=(b="")=>function(..._){b&&(pi(_[0])?_[0]=b.trim()+" "+_[0]:_=[b.trim(),..._]),console.warn(..._)},s=(b="")=>function(..._){b&&(pi(_[0])?_[0]=b.trim()+" "+_[0]:_=[b.trim(),..._]),console.error(..._)},l=(b="")=>function(..._){b&&(pi(_[0])?_[0]=b.trim()+" "+_[0]:_=[b.trim(),..._])},c=(b="default")=>{let _="";switch(b){case"default":_="#35495E";break;case"primary":_="#3488ff";break;case"success":_="#43B883";break;case"warning":_="#e6a23c";break;case"danger":_="#f56c6c";break}return _},u=(b,_,M="primary")=>{console.log(`%c ${b} %c ${_} %c`,"background:#35495E; padding: 1px; border-radius: 3px 0 0 3px; color: #fff;",`background:${c(M)}; padding: 1px; border-radius: 0 3px 3px 0; color: #fff;`,"background:transparent")},d=b=>{console.log(`%c${b.map(_=>_.text||"").join("%c")}`,...b.map(_=>`color: ${c(_.type)};`))},m=b=>{d([{text:b,type:"success"}])},f=b=>{d([{text:b,type:"warning"}])},v=b=>{d([{text:b,type:"danger"}])},C=b=>{d([{text:b,type:"primary"}])};return{log:a(`[VueCesium] ${(t=e==null?void 0:e.proxy)==null?void 0:t.$options.name}`),warn:o(`[VueCesium] WARN ${(i=e==null?void 0:e.proxy)==null?void 0:i.$options.name}`),error:s(`[VueCesium] ERR ${(n=e==null?void 0:e.proxy)==null?void 0:n.$options.name}`),debug:l(`[VueCesium] Debug ${(r=e==null?void 0:e.proxy)==null?void 0:r.$options.name}`),capsule:u,success:m,warning:f,danger:v,primary:C}}Uo(void 0);const ch=Symbol("INSTALLED_KEY"),MP=(e=[])=>({version:s1,install:(i,n)=>{if(i[ch])return;const r={cesiumPath:"https://unpkg.com/cesium@latest/Build/Cesium/Cesium.js",accessToken:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI2OGE2MjZlOC1mMzhiLTRkZjQtOWEwZi1jZTE0MWY0YzhlMTAiLCJpZCI6MjU5LCJpYXQiOjE2NDM3MjU1NzZ9.ptZ5tVXvMmuWRC0WhjtYTg-17nQh14fgxBsx0HJiVXQ"};i[ch]=!0,e.forEach(o=>{i.use(o,n)});const a=Object.assign(r,n);lh(a,i,!0)}});var uh=MP;function dh(e){return{all:e=e||new Map,on:function(t,i){var n=e.get(t);n?n.push(i):e.set(t,[i])},off:function(t,i){var n=e.get(t);n&&(i?n.splice(n.indexOf(i)>>>0,1):e.set(t,[]))},emit:function(t,i){var n=e.get(t);n&&n.slice().map(function(r){r(i)}),(n=e.get("*"))&&n.slice().map(function(r){r(t,i)})}}}/*!
* merge-descriptors
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/const SP=Object.prototype.hasOwnProperty;function TP(e,t,i){if(!e)throw new TypeError("argument dest is required");if(!t)throw new TypeError("argument src is required");return i===void 0&&(i=!0),Object.getOwnPropertyNames(t).forEach(function(r){if(!i&&SP.call(e,r))return;const a=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,a)}),e}function Mn(...e){let t;return typeof e[e.length-1]!="object"&&(t=e.pop()),e.slice(1).reduce((i,n,r)=>TP(i,n,t),e[0])}function AP(e){return e.appContext.config.globalProperties.$router!==void 0}function ks(e,t){return e.vnode.props!==null&&e.vnode.props[t]!==void 0}function Me(e,t){const i=e.vnode.props;if(i===null)return;const n=Object.keys(i),r=rh(n,o=>o.includes(`on${zo(t)}`)||o.includes(`on${zo(Sd(t))}`));return i[n[r]]}function oe(e){return e.value}function xt(e){var t;const i=e.parent;return!i.cesiumClass&&((t=i.proxy)==null?void 0:t.$options.name)!=="VcViewer"?xt(i):i}function mt(e,t=!1){const{Cartesian2:i,CallbackProperty:n}=Cesium;if(e instanceof Cesium.Cartesian2||e instanceof n)return e;if(Ye(e)&&je(e,"x")&&je(e,"y")){const r=e;return new i(r.x,r.y)}if(Ze(e))return new i(e[0],e[1]);if(bt(e))return new n(e,t)}function Qe(e,t,i=!1){const{CallbackProperty:n,Cartesian3:r,Ellipsoid:a,SampledPositionProperty:o,CompositePositionProperty:s,ConstantPositionProperty:l,TimeIntervalCollectionPositionProperty:c}=Cesium;if(e instanceof r||e instanceof n||e instanceof o||e instanceof s||e instanceof l||e instanceof c)return e;if(t=t||a.WGS84,Ye(e)){if(je(e,"x")&&je(e,"y")&&je(e,"z")){const u=e;return new r(u.x,u.y,u.z)}else if(je(e,"lng")&&je(e,"lat")){const u=e;return r.fromDegrees(u.lng,u.lat,u.height||0,t)}}if(Ze(e))return r.fromDegrees(e[0],e[1],e[2]||0,t);if(bt(e))return new n(e,i)}function Hi(e,t,i=!1){const{CallbackProperty:n,Cartesian3:r,Ellipsoid:a}=Cesium;if(e instanceof n)return e;if(bt(e))return new n(e,i);if(t=t||a.WGS84,Ze(e)){if(Ze(e[0])||Ye(e[0])){const o=[];return e.forEach(s=>{o.push(Qe(s,t))}),o}return r.fromDegreesArrayHeights(e,t)}}function hh(e,t){const{CallbackProperty:i}=Cesium;if(e instanceof i)return e;if(bt(e))return new i(e,t);if(Ze(e)){const n=[];return e.forEach(r=>{n.push(mt(r))}),n}}function Ns(e,t=!1){const{CallbackProperty:i,Quaternion:n,VelocityOrientationProperty:r}=Cesium;if(e instanceof n||e instanceof i||e instanceof r)return e;if(Ye(e)&&je(e,"x")&&je(e,"y")){const a=e;return new n(a.x,a.y,a.z,a.w)}if(Ze(e))return new n(e[0],e[1],e[2],e[3]);if(bt(e))return new i(e,t)}function mh(e,t){e.forEach(i=>{i.positions=Hi(i.positions,t),i.holes&&mh(i.holes,t)})}function zs(e,t,i=!1){var n;const{PolygonHierarchy:r,CallbackProperty:a}=Cesium;if(e instanceof r||e instanceof a)return e;if(bt(e))return new a(e,i);if(Ze(e)&&e.length>=3){const o=Hi(e,t);return new r(o)}if(Ye(e)&&je(e,"positions")){const o=e;return o.positions=Hi(o.positions,t),((n=o.holes)==null?void 0:n.length)&&mh(o.holes,t),o}}function Vs(e,t=!1){const{NearFarScalar:i,CallbackProperty:n}=Cesium;if(e instanceof i||e instanceof n)return e;if(Ye(e)&&je(e,"near")&&je(e,"far")){const r=e;return new i(r.near,r.nearValue||0,r.far,r.farValue||1)}if(Ze(e))return new i(e[0],e[1],e[2],e[3]);if(bt(e))return new n(e,t)}function DP(e,t=!1){const{DistanceDisplayCondition:i,CallbackProperty:n}=Cesium;if(e instanceof i||e instanceof n)return e;if(Ye(e)&&je(e,"near")&&je(e,"far")){const r=e;return new i(r.near,r.far)}if(Ze(e))return new i(e[0],e[1]);if(bt(e))return new n(e,t)}function Te(e,t=!1){const{Color:i,CallbackProperty:n,defaultValue:r}=Cesium;if(e instanceof i||e instanceof n)return e;if(pi(e))return i.fromCssColorString(e);if(Ye(e)){if(je(e,"red")){const a=e;return i.fromBytes(r(a.red,255),r(a.green,255),r(a.blue,255),r(a.alpha,255))}else if(je(e,"x")){const a=e;return new i(r(a.x,1),r(a.y,1),r(a.z,1),r(a.w,1))}}if(Ze(e))return i.fromBytes(e[0],e[1],e[2],r(e[3],255));if(bt(e))return new n(e,t)}function IP(e){if(Ze(e)){const t=[];return e.forEach(i=>{t.push(Te(i))}),t}else return e}function RP(e,t=!1){const{CallbackProperty:i,Color:n,CheckerboardMaterialProperty:r,ColorMaterialProperty:a,GridMaterialProperty:o,ImageMaterialProperty:s,PolylineArrowMaterialProperty:l,PolylineDashMaterialProperty:c,PolylineGlowMaterialProperty:u,PolylineOutlineMaterialProperty:d,StripeMaterialProperty:m,StripeOrientation:f,defaultValue:v}=Cesium;if(e instanceof i||e instanceof n||e instanceof r||e instanceof a||e instanceof s||e instanceof l||e instanceof c||e instanceof u||e instanceof d||e instanceof m||Nr(e).indexOf("MaterialProperty")!==-1)return e;if(pi(e)&&/(.*)\.(jpg|bmp|gif|ico|pcx|jpeg|tif|png|raw|tga)$/.test(e)||e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement)return new s({image:e,repeat:mt({x:1,y:1}),color:n.WHITE,transparent:!0});if(Ze(e)||pi(e))return new a(Te(e));if(Ye(e)&&je(e,"fabric")){const C=e;switch(C.fabric.type){case"Image":return new s({image:C.fabric.uniforms.image,repeat:mt(v(C.fabric.uniforms.repeat,{x:1,y:1})),color:v(Te(C.fabric.uniforms.color),n.WHITE),transparent:v(C.fabric.uniforms.transparent,!1)});case"Color":return new a(Te(v(C.fabric.uniforms.color,n.WHITE)));case"PolylineArrow":return new l(Te(v(C.fabric.uniforms.color,n.WHITE)));case"PolylineDash":return new c({color:Te(v(C.fabric.uniforms.color,"white")),gapColor:Te(v(C.fabric.uniforms.gapColor,n.TRANSPARENT)),dashLength:v(C.fabric.uniforms.taperPower,16),dashPattern:v(C.fabric.uniforms.taperPower,255)});case"PolylineGlow":return new u({color:Te(v(C.fabric.uniforms.color,n.WHITE)),glowPower:v(C.fabric.uniforms.glowPower,.25),taperPower:v(C.fabric.uniforms.taperPower,1)});case"PolylineOutline":return new d({color:Te(v(C.fabric.uniforms.color,n.WHITE)),outlineColor:Te(v(C.fabric.uniforms.outlineColor,n.BLACK)),outlineWidth:v(C.fabric.uniforms.outlineWidth,1)});case"Checkerboard":return new r({evenColor:Te(v(C.fabric.uniforms.evenColor,n.WHITE)),oddColor:Te(v(C.fabric.uniforms.oddColor,n.BLACK)),repeat:v(mt(C.fabric.uniforms.repeat),{x:2,y:2})});case"Grid":return new o({color:Te(v(C.fabric.uniforms.color,n.WHITE)),cellAlpha:v(C.fabric.uniforms.cellAlpha,.1),lineCount:v(mt(C.fabric.uniforms.lineCount),{x:8,y:8}),lineThickness:v(mt(C.fabric.uniforms.lineThickness),{x:1,y:1}),lineOffset:v(mt(C.fabric.uniforms.lineOffset),{x:0,y:0})});case"Stripe":return new m({orientation:v(C.fabric.uniforms.orientation,f.HORIZONTAL),evenColor:Te(v(C.fabric.uniforms.evenColor,"white")),oddColor:Te(v(C.fabric.uniforms.oddColor,"black")),offset:v(C.fabric.uniforms.offset,0),repeat:v(C.fabric.uniforms.repeat,1)})}}return bt(e)?new i(e,t):e}function $s(e){var t;const i=this,n=(t=i==null?void 0:i.proxy)==null?void 0:t.$options.name;if(n&&(n.indexOf("Graphics")!==-1||n.indexOf("Datasource")!==-1||n==="VcOverlayDynamic"||n==="VcEntity"))return RP(e);const{Material:r,combine:a}=Cesium;if(e instanceof r)return e;if(Ye(e)&&je(e,"fabric")){const o=s=>{for(const l in s)if(!Ze(s[l])&&Ye(s[l]))o(s[l]);else if(l.toLocaleLowerCase().indexOf("color")!==-1&&!Go(s[l])){const c=Te(s[l]);s[l]=a(c,c,!0)}};return o(e),new r(e)}if(Ze(e)||pi(e)){const o=r.fromType("Color");return o.uniforms.color=Te(e),o}}function Ho(e){var t;const{Appearance:i,DebugAppearance:n,MaterialAppearance:r,PolylineColorAppearance:a,EllipsoidSurfaceAppearance:o,PerInstanceColorAppearance:s,PolylineMaterialAppearance:l}=Cesium;if(e instanceof i||e instanceof n||e instanceof r||e instanceof a||e instanceof o||e instanceof s||e instanceof l||Nr(e).indexOf("Appearance")!==-1)return e;if(Ye(e)&&je(e,"type")){const c={...e.options};return((t=e.options)==null?void 0:t.material)&&(c.material=$s.call(this,e.options.material)),new Cesium[e.type]({...c})}}function Sn(e,t=!1){const{Rectangle:i,RectangleGraphics:n,CallbackProperty:r}=Cesium;if(e instanceof n||e instanceof i||e instanceof r)return e;if(Ze(e))return i.fromDegrees(e[0],e[1],e[2],e[3]);if(Ye(e)){if(je(e,"west")){const a=e;return i.fromDegrees(a.west,a.south,a.east,a.north)}else if(je(e,"x")){const a=e;return new i(a.x,a.y,a.z,a.w)}}if(bt(e))return new r(e,t)}function fh(e,t=!1){const{BoundingRectangle:i,CallbackProperty:n}=Cesium;if(e instanceof i||e instanceof n)return e;if(Ye(e)&&je(e,"x")){const r=e;return new i(r.x,r.y,r.width,r.height)}if(Ze(e))return new i(e[0],e[1],e[2],e[3]);if(bt(e))return new n(e,t)}function LP(e,t=!1){const{Cartesian3:i,Plane:n,PlaneGraphics:r,CallbackProperty:a}=Cesium;if(e instanceof r||e instanceof n||e instanceof a)return e;if(Ye(e)&&je(e,"normal")){const o=e;return i.normalize(Qe(o.normal),o.normal),new n(o.normal,o.distance)}if(Ze(e)){const o=Qe(e[0]),s=i.normalize(o,new i);return new n(s,e[1])}if(bt(e))return new a(e,t)}function BP(e,t=!1){const{TranslationRotationScale:i,CallbackProperty:n}=Cesium;if(e instanceof n||e instanceof i)return e;if(Ye(e)&&je(e,"translation")){const r=e;return new i(Qe(r.translation),Ns(r.rotation),Qe(r.scale))}return Ze(e)?new i(Qe(e[0]),Ns(e[1]),Qe(e[2])):bt(e)?new n(e,t):e}function jP(e){var t;const n=(t=this.proxy)==null?void 0:t.$options.name,r={};switch(n){case"VcDatasourceGeojson":return Object.assign(r,e),r&&r.markerColor&&(r.markerColor=Te(r.markerColor)),r&&r.stroke&&(r.stroke=Te(r.stroke)),r&&r.fill&&(r.fill=Te(r.fill)),r}return e}function FP(e){const t=e.scene,i=new Promise((n,r)=>{const a=e.scene.postRender.addEventListener(()=>{a();try{const s=e.scene.canvas;n(s.toDataURL("image/png"))}catch(o){r(o)}})});return t.render(e.clock.currentTime),i}function ph(e,t){const{Math:i,Rectangle:n,defaultValue:r}=Cesium;let a,o={};if(je(e,"position")){const s=e.position;a=Qe(s,t),je(s,"lng")&&je(s,"lat")||Ze(s)?o={heading:i.toRadians(r(e.heading,360)),pitch:i.toRadians(r(e.pitch,-90)),roll:i.toRadians(r(e.roll,0))}:o={heading:r(e.heading,2*Math.PI),pitch:r(e.pitch,-Math.PI/2),roll:r(e.roll,0)}}else if(je(e,"rectangle")){const s=e.retangle;a=Sn(s),n.validate(a),je(s,"west")&&je(s,"south")&&je(s,"east")&&je(s,"north")||Ze(s)?o={heading:i.toRadians(r(e.heading,360)),pitch:i.toRadians(r(e.pitch,-90)),roll:i.toRadians(r(e.roll,0))}:o={heading:r(e.heading,2*Math.PI),pitch:r(e.pitch,-Math.PI/2),roll:r(e.roll,0)}}return{destination:a,orientation:o}}function Gs(e,t){const{destination:i,orientation:n}=ph(t,e.scene.globe.ellipsoid);e.camera.setView({destination:i,orientation:n})}function kP(e,t,i){const{destination:n,orientation:r}=ph(t,e.scene.globe.ellipsoid);e.camera.flyTo({...i,destination:(i==null?void 0:i.destination)||n,orientation:(i==null?void 0:i.orientation)||r})}function Us(e,t,i){const{EllipsoidGeodesic:n,Ellipsoid:r}=Cesium;i=i||r.WGS84;const a=i.cartesianToCartographic(e),o=i.cartesianToCartographic(t);return new n(a,o).surfaceDistance}function NP(e,t,i,n){const{Cartesian3:r}=Cesium;if(r.equals(e,t))return;const a=Cesium.Cartesian3.subtract(t,e,new Cesium.Cartesian3),o=Cesium.Cartesian3.normalize(a,new Cesium.Cartesian3),s=Cesium.Transforms.rotationMatrixFromPositionVelocity(e,o,i.globe.ellipsoid),l=Cesium.Matrix4.fromRotationTranslation(s,e),c=Cesium.Transforms.eastNorthUpToFixedFrame(Cesium.Matrix4.getTranslation(l,new Cesium.Cartesian3),Cesium.Ellipsoid.WGS84,new Cesium.Matrix4),u=Cesium.Matrix4.multiply(Cesium.Matrix4.inverse(c,new Cesium.Matrix4),l,new Cesium.Matrix4),d=Cesium.Matrix4.getMatrix3(u,new Cesium.Matrix3),m=Cesium.Quaternion.fromRotationMatrix(d);return Cesium.HeadingPitchRoll.fromQuaternion(m)}function zP(e,t,i,n){const{HeadingPitchRoll:r,Transforms:a,Matrix4:o,Cartesian3:s,Cartesian4:l,Quaternion:c,Cartographic:u,Ellipsoid:d}=Cesium;n=n||d.WGS84;const m=new r(t,0,0),f=new s(1,1,1),v=a.headingPitchRollToFixedFrame(e,m),C=o.getColumn(v,1,new l),b=new s(C.x,C.y,C.z),_=c.fromAxisAngle(b,i*n.oneOverRadii.x),M=o.fromTranslationQuaternionRotationScale(s.ZERO,_,f),g=o.multiplyByPoint(M,e,new s),E=u.fromCartesian(e,n),T=u.fromCartesian(g,n);return T.height=E.height,u.toCartesian(T,n)}function vh(e){let t=0;const{CoplanarPolygonGeometry:i,VertexFormat:n,defined:r,Cartesian3:a}=Cesium,o=i.createGeometry(i.fromPositions({positions:e,vertexFormat:n.POSITION_ONLY}));if(!ci(o)&&r(o)){const s=o.indices,l=o.attributes.position.values;for(let c=0;c<s.length;c+=3){const u=s[c],d=s[c+1],m=s[c+2];t+=VP(a.unpack(l,3*u,{}),a.unpack(l,3*d,{}),a.unpack(l,3*m,{}))}}return t}const VP=(e,t,i)=>{const{Cartesian3:n}=Cesium,r=n.subtract(e,t,{}),a=n.subtract(i,t,{}),o=n.cross(r,a,r);return .5*n.magnitude(o)};function ln(e){const{JulianDate:t}=Cesium;return e instanceof t?e:pi(e)?Cesium.JulianDate.fromDate(new Date(e)):e instanceof Date?Cesium.JulianDate.fromDate(e):Cesium.JulianDate.now()}function Hs(e){const{HeadingPitchRange:t,Math:i}=Cesium;return e instanceof Cesium.HeadingPitchRange?e:Array.isArray(e)?new t(i.toRadians(e[0])||0,i.toRadians(e[1])||0,e[2]||0):Ye(e)?new t(e.heading||0,e.pitch||0,e.range||0):new t}function gh(e,t){const{Cartesian3:i,Matrix4:n,Transforms:r,Math:a}=Cesium,o=new i,s=r.eastNorthUpToFixedFrame(e);return n.inverse(s,s),n.multiplyByPoint(s,t,o),i.normalize(o,o),a.toDegrees(Math.atan2(o.x,o.y))}function yh(e,t){const{Cartesian3:i,Matrix4:n,Transforms:r,Math:a}=Cesium,o=new i,s=r.eastNorthUpToFixedFrame(e);return n.inverse(s,s),n.multiplyByPoint(s,t,o),i.normalize(o,o),a.toDegrees(Math.asin(o.z))}function bh(e,t,i,n=[]){const{Cartesian3:r,Ray:a,defined:o}=Cesium,s=r.normalize(r.subtract(t,e,new r),new r),l=new a(e,s),c=i.scene.pickFromRay(l,n);if(o(c)&&o(c.position))return c.position}function Ws(e){const i=7096758e-11,n=91610.74,r=-40467.74;return Math.round(r+(40487.57-r)/(1+Math.pow(e/n,i)))}const Tn={position:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:Qe,deep:!0}}},Ch={viewFrom:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:Qe,deep:!0}}},qs={orientation:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:Ns}}},Zs={alignedAxis:{type:[Object,Array,Function],default:()=>({x:0,y:0,z:0}),watcherOptions:{cesiumObjectBuilder:Qe}}},Wi={color:{type:[Object,String,Array,Function],default:"white",watcherOptions:{cesiumObjectBuilder:Te}}},$P={depthFailColor:{type:[Object,String,Array,Function],default:"white",watcherOptions:{cesiumObjectBuilder:Te}}},An={disableDepthTestDistance:[Number,Object,Function]},lt={distanceDisplayCondition:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:DP}}},zr={eyeOffset:{type:[Object,Array,Function],default:()=>({x:0,y:0,z:0}),watcherOptions:{cesiumObjectBuilder:Qe}}},Lt={height:[Number,Object,Function]},Wt={heightReference:{type:[Number,Object,Function]}},Vr={horizontalOrigin:{type:[Number,Object,Function],default:0}},Wo={image:[String,Object,HTMLCanvasElement,Function]},wh={imageSubRegion:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:fh}}},Yn={pixelOffset:{type:[Object,Array,Function],default:()=>({x:0,y:0}),validator:e=>Ze(e)?e.length===2:Pn(e)?je(e,"x")&&je(e,"y"):!!bt(e),watcherOptions:{cesiumObjectBuilder:mt}}},$r={pixelOffsetScaleByDistance:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:Vs}}},qi={rotation:{type:[Number,Object,Function],default:0}},Dn={scale:{type:[Number,Object,Function],default:1}},In={scaleByDistance:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:Vs}}},Ae={show:{type:[Boolean,Object,Function],default:!0}},qo={sizeInMeters:{type:[Boolean,Object,Function],default:!1}},Rn={translucencyByDistance:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:Vs}}},Gr={verticalOrigin:{type:[Number,Object,Function],default:0}},Oi={width:[Number,Object,Function]},Zo={dimensions:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:Qe}}},Pi={fill:{type:[Boolean,Object,Function],default:!0}},ei={material:{type:[Object,String,Array,Function],default:"white",watcherOptions:{cesiumObjectBuilder:$s}}},Mi={outline:{type:[Boolean,Object,Function],default:!1}},qt={outlineColor:{type:[Object,String,Array,Function],default:"black",watcherOptions:{cesiumObjectBuilder:Te}}},Zt={outlineWidth:{type:[Number,Object,Function],default:1}},Vt={shadows:[Number,Object,Function]},ti={positions:{type:[Array,Object,Function],watcherOptions:{cesiumObjectBuilder:Hi,exclude:"_callback",deep:!0}}},Qt={extrudedHeight:[Number,Object,Function]},Ur={extrudedHeightReference:[Number,Object,Function]},Ln={cornerType:{type:[Number,Object,Function],default:0}},Je={granularity:[Number,Object,Function]},Si={classificationType:{type:[Number,Object,Function]}},Jn={zIndex:[Number,Object,Function]},Qo={length:[Number,Object,Function]},Xo={topRadius:[Number,Object,Function]},Yo={bottomRadius:[Number,Object,Function]},Kn={numberOfVerticalLines:{type:[Number,Object,Function],default:16}},Jo={slices:{type:[Number,Object,Function],default:128}},Ko={semiMajorAxis:[Number,Object,Function]},ea={semiMinorAxis:[Number,Object,Function]},Li={stRotation:{type:[Number,Object,Function],default:0}},ta={radii:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:Qe}}},ia={innerRadii:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:Qe}}},na={minimumClock:{type:[Number,Object,Function],default:0}},ra={maximumClock:{type:[Number,Object,Function],default:2*Math.PI}},oa={minimumCone:{type:[Number,Object,Function],default:0}},aa={maximumCone:{type:[Number,Object,Function],default:Math.PI}},er={stackPartitions:{type:[Number,Object,Function],default:64}},tr={slicePartitions:{type:[Number,Object,Function],default:64}},sa={subdivisions:{type:[Number,Object,Function],default:128}},Qs={text:[String,Object,Function]},Xs={font:{type:[String,Object,Function],default:"30px sans-serif"}},Ys={labelStyle:{type:[Number,Object,Function],default:0}},Js={showBackground:{type:[Boolean,Object,Function],default:!1}},Ks={backgroundColor:{type:[Object,String,Array,Function],default:()=>({x:.165,y:.165,z:.165,w:.8}),watcherOptions:{cesiumObjectBuilder:Te}}},el={backgroundPadding:{type:[Object,Array,Function],default:()=>({x:7,y:5}),watcherOptions:{cesiumObjectBuilder:mt}}},tl={fillColor:{type:[Object,String,Array,Function],default:"white",watcherOptions:{cesiumObjectBuilder:Te}}},il={uri:[String,Object,Function]},nl={minimumPixelSize:{type:[Number,Object,Function],default:0}},rl={maximumScale:[Number,Object,Function]},ol={incrementallyLoadTextures:{type:[Boolean,Object,Function],default:!0}},_h={clampAnimations:{type:[Boolean,Object,Function],default:!0}},al={clampAnimations:{type:[Boolean,Object,Function],default:!0}},sl={silhouetteColor:{type:[Object,String,Array,Function],watcherOptions:{cesiumObjectBuilder:Te}}},ll={silhouetteSize:{type:[Number,Object,Function],default:0}},cl={colorBlendMode:{type:[Number,Object,Function],default:0}},ul={colorBlendAmount:{type:[Number,Object,Function],default:.5}},la={imageBasedLightingFactor:{type:[Object,Array,Function],default:()=>[1,1],watcherOptions:{cesiumObjectBuilder:mt}}},dl={lightColor:{type:[Object,String,Array,Function],watcherOptions:{cesiumObjectBuilder:Te}}},xh={nodeTransformations:{type:[Object,Function],watcherOptions:{cesiumObjectBuilder:BP}}},Eh={articulations:[Object,Function]},ca={clippingPlanes:[Object,Function]},Oh={plane:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:LP}}},hl={pixelSize:{type:[Number,Object,Function],default:1}},Ph={hierarchy:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:zs,deep:!0,exclude:"_callback"}}},ua={perPositionHeight:{type:[Boolean,Object,Function],default:!1}},ml={closeTop:{type:[Boolean,Object,Function],default:!0}},fl={closeBottom:{type:[Boolean,Object,Function],default:!0}},Zi={arcType:{type:[Number,Object,Function],default:1}},Mh={depthFailMaterial:{type:[Object,String,Array,Function],watcherOptions:{cesiumObjectBuilder:$s}}},Hr={clampToGround:{type:[Boolean,Object,Function],default:!1}},Sh={shape:{type:[Array,Object,Function],watcherOptions:{cesiumObjectBuilder:hh}}},Th={coordinates:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:Sn}}},pl={maximumScreenSpaceError:{type:[Number,Object,Function],default:16}},da={minimumHeights:[Array,Object,Function]},ha={maximumHeights:[Array,Object,Function]},Ah={cutoutRectangle:{type:[Object,Array],watcherOptions:{cesiumObjectBuilder:Sn}}},Dh={colorToAlpha:{type:[Object,String,Array],watcherOptions:{cesiumObjectBuilder:Te}}},Ti={url:[String,Object]},vl={token:String},Wr={tileDiscardPolicy:Object},gl={layers:String},ma={enablePickFeatures:{type:Boolean,default:!0}},St={rectangle:{type:[Object,Array],watcherOptions:{cesiumObjectBuilder:Sn}}},Ai={tilingScheme:Object},Re={ellipsoid:Object},Et={credit:{type:[String,Object],default:""}},Qi={tileWidth:{type:Number,default:256}},Xi={tileHeight:{type:Number,default:256}},ii={maximumLevel:Number},ui={minimumLevel:{type:Number,default:0}},yl={fileExtension:{type:String,default:"png"}},bl={accessToken:String},Cl={format:{type:String,default:"png"}},fa={subdomains:[String,Array]},wl={getFeatureInfoFormats:Array},_l={clock:Object},xl={times:Object},Bn={projectionTransforms:{type:[Boolean,Object],default:!1}},jn={allowPicking:{type:Boolean,default:!0}},Fn={asynchronous:{type:Boolean,default:!0}},pa={debugShowShadowVolume:{type:Boolean,default:!1}},qr={releaseGeometryInstances:{type:Boolean,default:!0}},Zr={interleave:{type:Boolean,default:!1}},ir={appearance:{type:Object,watcherOptions:{cesiumObjectBuilder:Ho,deep:!0}}},El={depthFailAppearance:{type:Object,watcherOptions:{cesiumObjectBuilder:Ho,deep:!0}}},Qr={geometryInstances:[Array,Object]},va={vertexCacheOptimize:{type:Boolean,default:!1}},Xr={compressVertices:{type:Boolean,default:!0}},Bi={modelMatrix:Object},Di={debugShowBoundingVolume:{tyep:Boolean,default:!1}},Yr={scene:Object},ga={blendOption:{type:Number,default:2}},cn={id:null},Ol={loop:{type:Boolean,default:!1}},Pl={debugWireframe:{type:Boolean,default:!1}},Bt={vertexFormat:Object},Jr={center:{type:[Object,Array],watcherOptions:{cesiumObjectBuilder:Qe}}},Kr={radius:Number},Ml={frustum:Object},Sl={origin:{type:[Object,Array],watcherOptions:{cesiumObjectBuilder:Qe}}},kn={polygonHierarchy:{type:[Object,Array],watcherOptions:{cesiumObjectBuilder:zs,deep:!0}}},Ih={startColor:{type:[Object,String,Array],watcherOptions:{cesiumObjectBuilder:Te}}},Rh={endColor:{type:[Object,String,Array],watcherOptions:{cesiumObjectBuilder:Te}}},Lh={minimumImageSize:{type:[Object,Array],watcherOptions:{cesiumObjectBuilder:mt}}},Bh={maximumImageSize:{type:[Object,Array],watcherOptions:{cesiumObjectBuilder:mt}}},jh={imageSize:{type:[Object,Array],watcherOptions:{cesiumObjectBuilder:mt}}},Tl={shapePositions:{type:Array,watcherOptions:{cesiumObjectBuilder:hh,deep:!0}}},Al={polylinePositions:{type:Array,watcherOptions:{cesiumObjectBuilder:Hi,deep:!0}}},Fh={lightColor:{type:[Object,Array],watcherOptions:{cesiumObjectBuilder:Qe}}},Dl={luminanceAtZenith:{type:Number,default:.2}},Il={sphericalHarmonicCoefficients:{type:[Array,Object],watcherOptions:{cesiumObjectBuilder:Hi}}},Rl={specularEnvironmentMaps:String},Ll={backFaceCulling:{type:Boolean,default:!0}},Bl={colors:{type:Array,watcherOptions:{cesiumObjectBuilder:IP,deep:!0}}},jl={data:{type:[String,Object],required:!0}},ya={sourceUri:{type:[String,Object]}},GP={options:{type:Object,watcherOptions:{cesiumObjectBuilder:jP,deep:!0}}},kh={glowColor:{type:[String,Array,Object],default:()=>[0,1,0,.05],watcherOptions:{cesiumObjectBuilder:Te}}},Nh={clearColor:{type:[String,Array,Object],watcherOptions:{cesiumObjectBuilder:Te}}},zh={scissorRectangle:{type:[Object,Array],watcherOptions:{cesiumObjectBuilder:fh}}},et={enableMouseEvent:{type:Boolean,default:!0}};var Vh=Object.freeze({__proto__:null,viewFrom:Ch,projectionTransforms:Bn,sourceUri:ya,colors:Bl,enableMouseEvent:et,backFaceCulling:Ll,specularEnvironmentMaps:Rl,sphericalHarmonicCoefficients:Il,luminanceAtZenith:Dl,maximumScreenSpaceError:pl,runAnimations:_h,articulations:Eh,scissorRectangle:zh,clearColor:Nh,glowColor:kh,options:GP,data:jl,imageSubRegion:wh,coordinates:Th,nodeTransformations:xh,hierarchy:Ph,plane:Oh,colorToAlpha:Dh,cutoutRectangle:Ah,polylinePositions:Al,shapePositions:Tl,imageSize:jh,maximumImageSize:Bh,minimumImageSize:Lh,endColor:Rh,startColor:Ih,shape:Sh,lightColor:dl,lightColor2:Fh,imageBasedLightingFactor:la,polygonHierarchy:kn,orientation:qs,origin:Sl,frustum:Ml,maximumCone:aa,minimumCone:oa,maximumClock:ra,minimumClock:na,innerRadii:ia,radius:Kr,center:Jr,debugWireframe:Pl,vertexFormat:Bt,position:Tn,loop:Ol,geometryInstances:Qr,depthFailAppearance:El,appearance:ir,interleave:Zr,releaseGeometryInstances:qr,debugShowShadowVolume:pa,id:cn,allowPicking:jn,asynchronous:Fn,vertexCacheOptimize:va,compressVertices:Xr,modelMatrix:Bi,debugShowBoundingVolume:Di,scene:Yr,blendOption:ga,maximumHeights:ha,minimumHeights:da,arcType:Zi,clampToGround:Hr,closeBottom:fl,closeTop:ml,perPositionHeight:ua,pixelSize:hl,clippingPlanes:ca,colorBlendAmount:ul,colorBlendMode:cl,silhouetteSize:ll,silhouetteColor:sl,clampAnimations:al,incrementallyLoadTextures:ol,maximumScale:rl,minimumPixelSize:nl,uri:il,fillColor:tl,backgroundPadding:el,backgroundColor:Ks,showBackground:Js,labelStyle:Ys,font:Xs,text:Qs,subdivisions:sa,slicePartitions:tr,stackPartitions:er,radii:ta,stRotation:Li,semiMinorAxis:ea,semiMajorAxis:Ko,slices:Jo,numberOfVerticalLines:Kn,bottomRadius:Yo,topRadius:Xo,length:Qo,zIndex:Jn,classificationType:Si,granularity:Je,cornerType:Ln,extrudedHeightReference:Ur,extrudedHeight:Qt,positions:ti,image:Wo,scale:Dn,pixelOffset:Yn,eyeOffset:zr,horizontalOrigin:Vr,verticalOrigin:Gr,heightReference:Wt,depthFailColor:$P,color:Wi,rotation:qi,alignedAxis:Zs,sizeInMeters:qo,width:Oi,height:Lt,scaleByDistance:In,translucencyByDistance:Rn,pixelOffsetScaleByDistance:$r,disableDepthTestDistance:An,dimensions:Zo,fill:Pi,depthFailMaterial:Mh,material:ei,outline:Mi,outlineColor:qt,outlineWidth:Zt,shadows:Vt,distanceDisplayCondition:lt,show:Ae,times:xl,clock:_l,getFeatureInfoFormats:wl,subdomains:fa,format:Cl,accessToken:bl,fileExtension:yl,minimumLevel:ui,maximumLevel:ii,tileHeight:Xi,url:Ti,token:vl,tileDiscardPolicy:Wr,layers:gl,enablePickFeatures:ma,rectangle:St,tilingScheme:Ai,ellipsoid:Re,credit:Et,tileWidth:Qi}),$h={name:"zh-hans",nativeName:"\u4E2D\u6587(\u7B80\u4F53)",vc:{loadError:"\u52A0\u8F7D\u5931\u8D25\uFF0C\u5FC5\u987B\u4F5C\u4E3A VcViewer \u7684\u5B50\u7EC4\u4EF6\u52A0\u8F7D\u3002",navigation:{compass:{outerTip:`\u65CB\u8F6C\u89C6\u56FE\uFF1A\u987A/\u9006\u65F6\u9488\u65B9\u5411\u62D6\u62FD\u7F57\u76D8\u5916\u73AF\u3002
\u91CD\u7F6E\u89C6\u56FE\uFF1A\u53CC\u51FB\u7F57\u76D8\u5916\u73AF\u3002`,innerTip:`\u7FFB\u8F6C\u89C6\u56FE\uFF1A\u7531\u5185\u73AF\u5411\u5916\u73AF\u62D6\u62FD\u7F57\u76D8\u3002
\u6216\u8005\u6309\u4F4F Ctrl \u952E\u7684\u540C\u65F6\u62D6\u62FD\u5730\u56FE\u3002`,title:"\u6309\u4F4F\u9F20\u6807\u62D6\u62FD\u65CB\u8F6C\u76F8\u673A\u3002"},zoomCotrol:{zoomInTip:"\u653E\u5927",zoomResetTip:"\u91CD\u7F6E\u89C6\u56FE",zoomOutTip:"\u7F29\u5C0F"},print:{printTip:"\u573A\u666F\u622A\u56FE/\u6253\u5370",printViewTitle:"\u6253\u5370\u9884\u89C8",credit:"\u5730\u56FE\u7248\u6743",screenshot:"\u573A\u666F\u622A\u56FE"},myLocation:{myLocationTip:"\u5B9A\u4F4D\u60A8\u7684\u4F4D\u7F6E",positioning:"\u5B9A\u4F4D\u4E2D...",fail:"\u5B9A\u4F4D\u5931\u8D25",centreMap:"\u6211\u7684\u4F4D\u7F6E",lat:"\u7EAC\u5EA6",lng:"\u7ECF\u5EA6",address:"\u5730\u5740"},statusBar:{lat:"\u7EAC\u5EA6",lng:"\u7ECF\u5EA6",zone:"\u5E26\u53F7",e:"X",n:"Y",elev:"\u9AD8\u7A0B",level:"\u5C42\u7EA7",heading:"\u65B9\u4F4D",pitch:"\u4FEF\u4EF0",roll:"\u4FA7\u7FFB",cameraHeight:"\u89C6\u9AD8",tip:"\u70B9\u51FB\u5207\u6362\u9F20\u6807\u663E\u793A\u5750\u6807\u4E3A UTM \u6295\u5F71\u5750\u6807"}},navigationSm:{compass:{outerTip:"\u65CB\u8F6C\u89C6\u56FE\uFF1A\u987A/\u9006\u65F6\u9488\u65B9\u5411\u62D6\u62FD\u7F57\u76D8\u5916\u73AF\uFF1B\u91CD\u7F6E\u89C6\u56FE\uFF1A\u53CC\u51FB\u7F57\u76D8\u5916\u73AF\u3002"},zoomCotrol:{zoomInTip:"\u653E\u5927",zoomBarTip:"\u6309\u4F4F\u6ED1\u5757\u5411\u4E0A\u653E\u5927\uFF0C\u5411\u4E0B\u7F29\u5C0F\u3002",zoomOutTip:"\u7F29\u5C0F"}},measurement:{expand:"\u5C55\u5F00",collapse:"\u6536\u62E2",editor:{move:"\u79FB\u52A8\u8282\u70B9",insert:"\u63D2\u5165\u8282\u70B9",remove:"\u79FB\u9664\u8282\u70B9",removeAll:"\u79FB\u9664\u6240\u6709\u8282\u70B9"},distance:{tip:"\u8DDD\u79BB\u91CF\u7B97",drawingTipStart:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u8DDD\u79BB\u91CF\u7B97\u8D77\u70B9\u3002",drawingTipEnd:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u8DDD\u79BB\u91CF\u7B97\u7EC8\u70B9\u3002",drawingTipEditing:"\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002"},"component-distance":{tip:"\u4E09\u89D2\u91CF\u7B97",drawingTipStart:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u4E09\u89D2\u91CF\u7B97\u8D77\u70B9\u3002",drawingTipEnd:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u4E09\u89D2\u91CF\u7B97\u7EC8\u70B9\u3002",drawingTipEditing:"\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002"},polyline:{tip:"\u6298\u7EBF\u8DDD\u79BB\u91CF\u7B97",drawingTipStart:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u7B2C\u4E00\u4E2A\u70B9\u3002",drawingTipEnd:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u4E0B\u4E00\u4E2A\u70B9\uFF0C\u53CC\u51FB\u5DE6\u952E\u7ED3\u675F\u91CF\u7B97\u3002",drawingTipEditing:"\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002"},horizontal:{tip:"\u6C34\u5E73\u8DDD\u79BB\u91CF\u7B97",drawingTipStart:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u7B2C\u4E00\u4E2A\u70B9\u3002",drawingTipEnd:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u4E0B\u4E00\u4E2A\u70B9\uFF0C\u53CC\u51FB\u5DE6\u952E\u7ED3\u675F\u91CF\u7B97\u3002",drawingTipEditing:"\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002"},vertical:{tip:"\u5782\u76F4\u8DDD\u79BB\u91CF\u7B97",drawingTipStart:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u5782\u76F4\u8DDD\u79BB\u91CF\u7B97\u8D77\u70B9\u3002",drawingTipEnd:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u5782\u76F4\u8DDD\u79BB\u91CF\u7B97\u7EC8\u70B9\u3002",drawingTipEditing:"\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002"},height:{tip:"\u5730\u8868\u9AD8\u5EA6\u91CF\u7B97",drawingTipStart:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u9AD8\u5EA6\u91CF\u7B97\u70B9\u3002",drawingTipEnd:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u9AD8\u5EA6\u91CF\u7B97\u70B9\u3002",drawingTipEditing:"\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002"},area:{tip:"\u9762\u79EF\u91CF\u7B97",drawingTipStart:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u7B2C\u4E00\u4E2A\u70B9\u3002",drawingTipEnd:"\u70B9\u51FB\u5DE6\u952E\u7ED8\u5236\u4E0B\u4E00\u4E2A\u70B9\uFF0C\u53CC\u51FB\u5DE6\u952E\u7ED3\u675F\u91CF\u7B97\u3002",drawingTipEditing:"\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002"},point:{tip:"\u5750\u6807\u91CF\u7B97",drawingTipStart:"\u70B9\u51FB\u5DE6\u952E\u7ED8\u5236\u5750\u6807\u91CF\u7B97\u70B9\u3002",drawingTipEnd:"\u70B9\u51FB\u5DE6\u952E\u7ED8\u5236\u5750\u6807\u91CF\u7B97\u70B9\u3002",drawingTipEditing:"\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002",lng:"\u7ECF\u5EA6\uFF1A",lat:"\u7EAC\u5EA6\uFF1A",height:"\u9AD8\u5EA6\uFF1A",slope:"\u5761\u5EA6\uFF1A"},rectangle:{tip:"\u77E9\u5F62\u91CF\u7B97",drawingTipStart:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u77E9\u5F62\u91CF\u7B97\u8D77\u70B9\u3002",drawingTipEnd:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u77E9\u5F62\u91CF\u7B97\u7EC8\u70B9\u3002",drawingTipEditing:"\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002"},regular:{tip:"\u6B63\u591A\u8FB9\u5F62\u91CF\u7B97",drawingTipStart:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u6B63\u591A\u8FB9\u5F62\u91CF\u7B97\u8D77\u70B9\u3002",drawingTipEnd:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u6B63\u591A\u8FB9\u5F62\u91CF\u7B97\u7EC8\u70B9\u3002",drawingTipEditing:"\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002"},circle:{tip:"\u5706\u5F62\u91CF\u7B97",drawingTipStart:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u5706\u5F62\u91CF\u7B97\u8D77\u70B9\u3002",drawingTipEnd:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u5706\u5F62\u91CF\u7B97\u7EC8\u70B9\u3002",drawingTipEditing:"\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002"},clear:{tip:"\u6E05\u9664\u91CF\u7B97\u7ED3\u679C"}},drawing:{expand:"\u5C55\u5F00",collapse:"\u6536\u62E2",editor:{move:"\u79FB\u52A8\u8282\u70B9",insert:"\u63D2\u5165\u8282\u70B9",remove:"\u79FB\u9664\u8282\u70B9",removeAll:"\u79FB\u9664\u6240\u6709\u8282\u70B9"},pin:{tip:"\u7ED8\u5236\u56FE\u6807\u70B9",drawingTipStart:"\u70B9\u51FB\u5DE6\u952E\u7ED8\u5236\u56FE\u6807\u70B9\u3002",drawingTipEnd:"\u70B9\u51FB\u5DE6\u952E\u7ED8\u5236\u56FE\u6807\u70B9\u3002",drawingTipEditing:"\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002"},point:{tip:"\u7ED8\u5236\u70B9",drawingTipStart:"\u70B9\u51FB\u5DE6\u952E\u7ED8\u5236\u70B9\u3002",drawingTipEnd:"\u70B9\u51FB\u5DE6\u952E\u7ED8\u5236\u70B9\u3002",drawingTipEditing:"\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002"},polyline:{tip:"\u7ED8\u5236\u7EBF",drawingTipStart:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u7B2C\u4E00\u4E2A\u70B9\u3002",drawingTipEnd:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u4E0B\u4E00\u4E2A\u70B9\uFF0C\u53CC\u51FB\u5DE6\u952E\u7ED3\u675F\u7ED8\u5236\u3002",drawingTipEditing:"\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002"},polygon:{tip:"\u7ED8\u5236\u9762",drawingTipStart:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u7B2C\u4E00\u4E2A\u70B9\u3002",drawingTipEnd:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u4E0B\u4E00\u4E2A\u70B9\uFF0C\u53CC\u51FB\u5DE6\u952E\u7ED3\u675F\u7ED8\u5236\u3002",drawingTipEditing:"\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002"},rectangle:{tip:"\u7ED8\u5236\u77E9\u5F62",drawingTipStart:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u77E9\u5F62\u8D77\u70B9\u3002",drawingTipEnd:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u77E9\u5F62\u7EC8\u70B9\u3002",drawingTipEditing:"\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002"},circle:{tip:"\u7ED8\u5236\u5706",drawingTipStart:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u5706\u5F62\u8D77\u70B9\u3002",drawingTipEnd:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u5706\u5F62\u7EC8\u70B9\u3002",drawingTipEditing:"\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002"},regular:{tip:"\u7ED8\u5236\u6B63\u591A\u8FB9\u5F62",drawingTipStart:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u6B63\u591A\u8FB9\u5F62\u8D77\u70B9\u3002",drawingTipEnd:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u6B63\u591A\u8FB9\u5F62\u7EC8\u70B9\u3002",drawingTipEditing:"\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002"},clear:{tip:"\u6E05\u9664\u7ED8\u5236\u7ED3\u679C"}},analysis:{expand:"\u5C55\u5F00",collapse:"\u6536\u62E2",editor:{move:"\u79FB\u52A8\u8282\u70B9",insert:"\u63D2\u5165\u8282\u70B9",remove:"\u79FB\u9664\u8282\u70B9",removeAll:"\u79FB\u9664\u6240\u6709\u8282\u70B9"},sightline:{tip:"\u901A\u89C6\u5206\u6790",drawingTipStart:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u89C2\u6D4B\u70B9\u3002",drawingTipEnd:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u76EE\u6807\u70B9\uFF0C\u53CC\u51FB\u5DE6\u952E\u7ED3\u675F\u7ED8\u5236\u3002",drawingTipEditing:"\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002"},viewshed:{tip:"\u53EF\u89C6\u57DF\u5206\u6790",drawingTipStart:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u53EF\u89C6\u57DF\u5206\u6790\u8D77\u70B9\u3002",drawingTipEnd:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u53EF\u89C6\u57DF\u5206\u6790\u7EC8\u70B9\u3002",drawingTipEditing:"\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002"},clear:{tip:"\u6E05\u9664\u5206\u6790\u7ED3\u679C"}},overview:{show:"\u663E\u793A\u9E70\u773C",hidden:"\u9690\u85CF\u9E70\u773C"}}};const Gh=e=>(t,i)=>Uh(t,i,cs(e)),Uh=(e,t,i)=>Ku(i,e,e).replace(/\{(\w+)\}/g,(n,r)=>{var a;return`${(a=t==null?void 0:t[r])!=null?a:`{${r}}`}`}),Hh=e=>{const t=ye(()=>cs(e).name),i=wu(e)?e:ie(e);return{lang:t,locale:i,t:Gh(e)}},Ct=()=>{const e=$o("locale");return Hh(ye(()=>e.value||$h))};function Fl(e,t,i){const n=(o,s,l=!0)=>{const c=s||t.cesiumEvents||[];c&&c.forEach(u=>{if(o[u]){const d=Me(t,u),m=l?"addEventListener":"removeEventListener";d&&o[u][m](d)}else process.env.VUECESIUM_DEBUG&&i.warn("Add event linstener of "+u+" failed, try to upgrade Cesium to latest version.")})},r=o=>{var s;const{viewer:l,cesiumObject:c}=t;if(c===void 0)return;const{ScreenSpaceEventHandler:u,ScreenSpaceEventType:d}=Cesium;(!l._vcPickScreenSpaceEventHandler||!l._vcViewerScreenSpaceEventHandler)&&(l._vcPickScreenSpaceEventHandler=new u(l.canvas),l._vcViewerScreenSpaceEventHandler=new u(l.canvas),kl.forEach(m=>{const f=Me(t,m);f&&l._vcViewerScreenSpaceEventHandler.setInputAction(f,d[m]),l._vcPickScreenSpaceEventHandler.setInputAction(a.bind({eventName:m,viewer:l}),d[m])})),n(c,t.cesiumEvents||[],o),(s=t.cesiumMembersEvents)==null||s.forEach(m=>{const f=Ze(m.name)&&m.name.length>0&&c[m.name[0]]?c[m.name[0]][m.name[1]]:c[m.name];f&&n(f,m.events,o)}),e.enableMouseEvent&&Wh.forEach(m=>{const f=Me(t,m);o?f&&(c[`vc${m}`]=f):f&&delete c[`vc${m}`]})};function a(o){if(!e.enableMouseEvent||!o)return;const s=this.viewer,{eventName:l}=this,c=o.position||o.endPosition;if(!c)return;const u=[];let d;l.indexOf("LEFT_DOUBLE_CLICK")!==-1?d="dblclick":l.indexOf("CLICK")!==-1?d="click":l.indexOf("DOWN")!==-1?d="mousedown":l.indexOf("UP")!==-1?d="mouseup":l.indexOf("MOUSE_MOVE")!==-1&&(d="mousemove");let m;d==="mousemove"?m="mouseout":d==="click"&&(m="clickout");const f=s.scene.pick(c);if(Cesium.defined(f)?(this.pickedFeature&&this.pickedFeature.id!==f.id&&u.push({callbackName:m,pickedFeature:this.pickedFeature}),d==="mousemove"&&(!this.pickedFeature||this.pickedFeature.id!==f.id)&&u.push({callbackName:"mouseover",pickedFeature:f}),u.push({callbackName:d,pickedFeature:f})):(this.pickedFeature&&u.push({callbackName:m,pickedFeature:this.pickedFeature}),this.pickedFeature=void 0),u.length===0)return;let v;const C=s.scene;if(C.mode===Cesium.SceneMode.SCENE3D){const M=C.camera.getPickRay(c);v=C.globe.pick(M,C)}else v=C.camera.pickEllipsoid(c,C.globe.ellipsoid);let b=-1;l.indexOf("LEFT")!==-1?b=0:l.indexOf("MIDDLE")!==-1?b=1:l.indexOf("RIGHT")!==-1&&(b=2);const _=[];u.forEach(M=>{const g=M.callbackName,E=M.pickedFeature;E.id&&(Ze(E.id)&&E.id[0]instanceof Cesium.Entity?_.push({callbackName:g,cesiumObject:E.id[0].entityCollection.owner,pickedFeature:E}):E.id instanceof Cesium.Entity&&(_.push({callbackName:g,cesiumObject:E.id,pickedFeature:E}),_.push({callbackName:g,cesiumObject:E.id.entityCollection.owner,pickedFeature:E})));const T=A=>{_.push({callbackName:g,cesiumObject:A,pickedFeature:E}),A._vcParent&&T(A._vcParent)};E.primitive&&(E.primitive._vcParent&&T(E.primitive._vcParent),_.push({callbackName:g,cesiumObject:E.primitive,pickedFeature:E})),E.collection&&(E.collection._vcParent&&T(E.collection._vcParent),_.push({callbackName:g,cesiumObject:E.collection,pickedFeature:E}))}),_.forEach(M=>{if(M.callbackName){const g=M.cesiumObject[`vc${M.callbackName}`]||M.cesiumObject[`on${zo(M.callbackName)}`]||M.cesiumObject[ae(`on${zo(M.callbackName)}`)];if(Cesium.defined(g)){const E={type:`on${M.callbackName}`,windowPosition:c,surfacePosition:v,pickedFeature:M.pickedFeature,button:b,cesiumObject:M.cesiumObject};g instanceof Cesium.CallbackProperty?g._callback(E):g(E)}}}),this.pickedFeature=f}return{bindEvents:n,registerEvents:r}}const kl=["LEFT_CLICK","LEFT_DOUBLE_CLICK","LEFT_DOWN","LEFT_UP","MIDDLE_CLICK","MIDDLE_DOWN","MIDDLE_UP","MOUSE_MOVE","PINCH_END","PINCH_MOVE","PINCH_START","RIGHT_CLICK","RIGHT_DOWN","RIGHT_UP","WHEEL"],Wh=["mousedown","mouseup","click","clickout","dblclick","mousemove","mouseover","mouseout"];function Nl(){let e;return wn(()=>{clearTimeout(e)}),{registerTimeout(t,i){clearTimeout(e),e=setTimeout(t,i)},removeTimeout(){clearTimeout(e)}}}const UP=["Graphics","VcEntity","Datasource","VcOverlayDynamic"];function Be(e,{emit:t,attrs:i},n){const r=Uo(n),{registerTimeout:a,removeTimeout:o}=Nl();n.alreadyListening=[],n.removeCallbacks=[];let s=[];n.mounted=!1;const l=dh();n.vcMitt=l;const c=Po(zi),{t:u}=Ct();if(c===void 0){console.error(`${n.cesiumClass} ${u("vc.loadError")}`);return}const d=xt(n),m=Fl(e,n,r);n.children=[];const f={billboard:!0,box:!0,corridor:!0,cylinder:!0,ellipse:!0,ellipsoid:!0,label:!0,model:!0,tileset:!0,path:!0,plane:!0,point:!0,polygon:!0,polyline:!0,polylineVolume:!0,rectangle:!0,wall:!0},v=$o(),C=async()=>{if(t("beforeLoad",n),d.nowaiting)return!0;await d.proxy.creatingPromise},b=async()=>{var p;if(n.mounted)return!1;r.debug(`${n.cesiumClass}---loading`),await C();const{Cesium:y,viewer:O}=c;return n.viewer=O,n.Cesium=y,!d.cesiumObject&&!d.nowaiting?await((p=d.proxy)==null?void 0:p.load()):(j(!0),R().then(async x=>(n.cesiumObject=x,T().then(()=>{n.mounted=!0,d.children.push(n),Object.assign(n.proxy,{cesiumObject:n.cesiumObject});const w={Cesium:y,viewer:O,cesiumObject:x,vm:n.proxy};return t("ready",w),l.emit("ready",w),r.debug(`${n.cesiumClass}---loaded`),w}))))},_=async()=>{await n.unloadingPromise},M=async()=>{await _();for(let p=0;p<n.children.length;p++)await n.children[p].proxy.unload();return n.children.length=0,n.mounted?A().then(async()=>(j(!1),n.cesiumObject=void 0,n.mounted=!1,n.removeCallbacks.forEach(p=>{p()}),t("destroyed",n),r.debug(`${n.cesiumClass}---unmounted`),n.renderByParent&&!n.unloadingPromise?d.proxy.unload():!0)):!1},g=async()=>{await n.reloadingPromise},E=async()=>(await g(),M().then(()=>b())),T=async()=>{var p;return m.registerEvents(!0),((p=n.mount)==null?void 0:p.call(n))||!0},A=async()=>{var p;return m.registerEvents(!1),((p=n.unmount)==null?void 0:p.call(n))||!0},R=async()=>{if(r.debug("do createCesiumObject"),bt(n.createCesiumObject))return n.createCesiumObject();{const p=W(e);return new Cesium[n.cesiumClass](p)}},I=(p,y)=>{let O=y==null?void 0:y.deep;const{SampledPositionProperty:x,Appearance:w,DebugAppearance:D,MaterialAppearance:S,PolylineColorAppearance:B,EllipsoidSurfaceAppearance:F,PerInstanceColorAppearance:G,PolylineMaterialAppearance:q}=Cesium;if(p==="position")O=!(n.proxy[p]instanceof x);else if(p==="appearance"||p==="depthFailAppearance"){const U=n.proxy[p];O=!(U instanceof w||U instanceof D||U instanceof S||U instanceof B||U instanceof F||U instanceof G||U instanceof q||Nr(U).indexOf("Appearance")!==-1)}return O},j=p=>{if(p){if(!n.cesiumClass||!Cesium[n.cesiumClass])return;e&&Object.keys(e).forEach(y=>{var O,x,w,D,S;let B=y;if(y==="labelStyle"||y==="wmtsStyle"?B="style":y==="bmKey"&&(B="key"),((x=(O=n.proxy)==null?void 0:O.$options.watch)==null?void 0:x[y])||n.alreadyListening.indexOf(y)!==-1)return;const F=(D=(w=n.proxy)==null?void 0:w.$options.props[y])==null?void 0:D.watcherOptions,G=(S=n.proxy)==null?void 0:S.$watch(y,async(q,U)=>{await n.proxy.creatingPromise;const{cesiumObject:K}=n,N=K&&Object.getOwnPropertyDescriptor(K,B),L=K&&Object.getOwnPropertyDescriptor(Object.getPrototypeOf(K),B);if(N&&(N.writable||N.set)||L&&(L.writable||L.set)){if(F&&F.cesiumObjectBuilder){const z=F.cesiumObjectBuilder.call(n,q,n.viewer.scene.globe.ellipsoid);Cesium.defined(K[B])&&Cesium.defined(K[B]._callback)||(K[B]=z)}else K[B]=$(B,q);return!0}else(!uP(q,U)||Array.isArray(q))&&(i["reload-mode"]==="once"||i.reloadMode==="once"||v.value.reloadMode==="once"?(o(),a(()=>{n.proxy.reload()},0)):n.reloadingPromise=new Promise((z,Q)=>{n.proxy.reload().then(()=>{z(!0)}).catch(Z=>{Q(Z)})}))},{deep:I(y,F)});s.push(G)})}else s.forEach(y=>y()),s=[]},W=(p,y)=>{const O={};return p&&Object.keys(p).forEach(x=>{let w=x;if(x==="labelStyle"||x==="wmtsStyle"?w="style":x==="bmKey"&&(w="key"),p[x]===void 0||p[x]===null)return;Nr(p[x])&&f[w]&&(n.cesiumClass==="Entity"||n.cesiumClass.indexOf("DataSource")>0||n.cesiumClass==="VcOverlayDynamic")?O[w]=W(p[x],y):O[w]=$(x,p[x],y)}),O},$=(p,y,O)=>{var x,w;const D=Nr(y);if(D&&D.indexOf("Graphics")===-1&&f[p]&&(n.cesiumClass==="Entity"||n.cesiumClass.indexOf("DataSource")>0||n.cesiumClass==="VcOverlayDynamic"))return W(y,O);{const S=(x=n.proxy)==null?void 0:x.$options.name;let B=!1;bt(y)&&S&&UP.forEach(G=>{S.indexOf(G)!==-1&&(B=!0)});const F=((w=n.proxy)==null?void 0:w.$options.props[p])||(O==null?void 0:O[p])||Vh[p]&&Vh[p][p];return(F==null?void 0:F.watcherOptions)&&!Go(y)?F.watcherOptions.cesiumObjectBuilder.call(n,y,n.viewer.scene.globe.ellipsoid):B?new Cesium.CallbackProperty(y,!1):y}},k=()=>Mn({},c||{}),h=new Promise((p,y)=>{try{let O=!1;c.viewer&&(O=!0,b().then(x=>{p(x),O=!1}).catch(x=>{t("unready",x),y(x)})),d.vcMitt.on("ready",()=>{!O&&!n.isUnmounted&&b().then(x=>{p(x)}).catch(x=>{t("unready",x),y(x)})})}catch(O){t("unready",O),y(O)}});return r.debug(`${n.cesiumClass}---onCreated`),ot(()=>{r.debug(`${n.cesiumClass}---onUnmounted`),n.unloadingPromise=new Promise((p,y)=>{M().then(()=>{r.debug(`${n.cesiumClass}---unloaded`),p(!0),n.unloadingPromise=void 0,l.all.clear()})}),n.alreadyListening=[]}),Object.assign(n.proxy,{creatingPromise:h,load:b,unload:M,reload:E,getCreatingPromise:()=>h,getCesiumObject:()=>n.cesiumObject}),{$services:c,load:b,unload:M,reload:E,creatingPromise:h,transformProp:$,transformProps:W,unwatchFns:s,setPropsWatcher:j,logger:r,getServices:k}}function eo(e,t,i){i.cesiumEvents=["changedEvent","errorEvent","loadingEvent"],i.cesiumClass==="KmlDataSource"&&(i.cesiumEvents.push("refreshEvent"),i.cesiumEvents.push("unsupportedNodeEvent")),i.cesiumMembersEvents=[{name:"clock",events:["definitionChanged"]},{name:"clustering",events:["clusterEvent"]},{name:"entities",events:["collectionChanged"]}];const n=Be(e,t,i);if(n===void 0)return;i.alreadyListening.push("entities");let r=[];r.push(fe(()=>an(e.entities),(s,l)=>{if(!i.mounted)return;const c=i.cesiumObject;if(s.length===l.length){const u=[];for(let d=0;d<s.length;d++){const m=s[d],f=l[d];JSON.stringify(m)!==JSON.stringify(f)&&u.push({newOptions:m,oldOptions:f})}u.forEach(d=>{const m=c.entities.getById(d.oldOptions.id);if(d.oldOptions.id===d.newOptions.id)m&&Object.keys(d.newOptions).forEach(f=>{d.oldOptions[f]!==d.newOptions[f]&&(m[f]=n.transformProp(f,d.newOptions[f]))});else{c.entities.remove(m);const f=d.newOptions;a(c,[f])}})}else{const u=Mt(s,l,"id"),d=Mt(l,s,"id"),m=[];for(let f=0;f<d.length;f++){const v=c.entities.getById(d[f].id);m.push(v)}m.forEach(f=>{c.entities.remove(f)}),a(c,u)}},{deep:!0}));const a=(s,l)=>{for(let c=0;c<l.length;c++){const u=l[c],d=n.transformProps(u),m=s.entities.add(d);u.id!==m.id&&(u.id=m.id),sn(m,d)}};i.mount=async()=>{const s=n.$services.dataSources,l=i.cesiumObject;return l.show=e.show,a(l,e.entities),s.add(l).then(()=>!0)},i.unmount=async()=>{const s=n.$services.dataSources,l=i.cesiumObject;return s&&s.remove(l,e.destroy)};const o=()=>Mn(n.getServices(),{get datasource(){return i.cesiumObject},get entities(){var s;return(s=i.cesiumObject)==null?void 0:s.entities}});return ot(()=>{r.forEach(s=>s()),r=[]}),on(zi,o()),{transformProps:n.transformProps,unwatchFns:n.unwatchFns,setPropsWatcher:n.setPropsWatcher}}function Ne(e,t,i){i.cesiumEvents=[],i.renderByParent=!0;const n=Be(e,t,i);if(n!==void 0)return i.mount=async()=>{var r;const a=i.cesiumObject,o=xt(i).proxy;return(r=o.__updateGeometry)==null?void 0:r.call(o,a)},{transformProps:n.transformProps,unwatchFns:n.unwatchFns,setPropsWatcher:n.setPropsWatcher}}function Tt(e,t,i){i.cesiumEvents=["definitionChanged"],Be(e,t,i)!==void 0&&(i.mount=async()=>{var r,a;const o=i.cesiumObject;if(o===void 0)return!1;const s=ae(((r=i.proxy)==null?void 0:r.$options.name)||"").split("-"),l=s.length===3?`update:${s[2]}`:"update:polylineVolume",c=xt(i).proxy;return c&&((a=c.__updateGraphics)==null?void 0:a.call(c,o,l))},i.unmount=async()=>{var r,a;const o=ae(((r=i.proxy)==null?void 0:r.$options.name)||"").split("-"),s=o.length===3?`update:${o[2]}`:"update:polylineVolume",l=xt(i).proxy;return l&&((a=l.__updateGraphics)==null?void 0:a.call(l,void 0,s))})}const zl=e=>n1(e);function Vl(e,t){const i=e.style;Object.keys(t).forEach(n=>{i[n]=t[n]})}function HP(e){if(e==null)return;if(typeof e=="string")try{return document.querySelector(e)||void 0}catch(i){return}const t=wu(e)===!0?e.value:e;if(t)return t.$el||t}const nr={hasPassive:!1,passiveCapture:!0,notPassiveCapture:!0,passive:void 0};try{const e=Object.defineProperty({},"passive",{get(){Object.assign(nr,{hasPassive:!0,passive:{passive:!0},notPassive:{passive:!1},passiveCapture:{passive:!0,capture:!0},notPassiveCapture:{passive:!1,capture:!0}})}});window.addEventListener("qtest",null,e),window.removeEventListener("qtest",null,e)}catch(e){}function qh(){}function Zh(e){return e.button===0}function rr(e){return e.touches&&e.touches[0]?e=e.touches[0]:e.changedTouches&&e.changedTouches[0]?e=e.changedTouches[0]:e.targetTouches&&e.targetTouches[0]&&(e=e.targetTouches[0]),{top:e.clientY,left:e.clientX}}function Qh(e){e.stopPropagation()}function $l(e){e.cancelable!==!1&&e.preventDefault()}function un(e){e.cancelable!==!1&&e.preventDefault(),e.stopPropagation()}function Xt(e,t,i){const n=`__vc_${t}_evt`;e[n]=e[n]!==void 0?e[n].concat(i):i,i.forEach(r=>{r[0].addEventListener(r[1],e[r[2]],nr[r[3]])})}function ji(e,t){const i=`__vc_${t}_evt`;e[i]!==void 0&&(e[i].forEach(n=>{n[0].removeEventListener(n[1],e[n[2]],nr[n[3]])}),e[i]=void 0)}function WP(e){return e!==Object(e)||e.isComposing===!0||e.qKeyEvent===!0}function to(e,t){return WP(e)===!0?!1:[].concat(t).includes(e.keyCode)}function Gl(e,t=250){let i=!1,n;return function(){return i===!1&&(i=!0,setTimeout(()=>{i=!1},t),n=e.apply(this,arguments)),n}}function Xh(e,t,i,n){i.modifiers.stop===!0&&Qh(e);const r=i.modifiers.color;let a=i.modifiers.center;a=a===!0||n===!0;const o=document.createElement("span"),s=document.createElement("span"),l=rr(e),{left:c,top:u,width:d,height:m}=t.getBoundingClientRect(),f=Math.sqrt(d*d+m*m),v=f/2,C=`${(d-f)/2}px`,b=a?C:`${l.left-c-v}px`,_=`${(m-f)/2}px`,M=a?_:`${l.top-u-v}px`;s.className="vc-ripple__inner",Vl(s,{height:`${f}px`,width:`${f}px`,transform:`translate3d(${b},${M},0) scale3d(.2,.2,1)`,opacity:0}),o.className=`vc-ripple${r?" text-"+r:""}`,o.setAttribute("dir","ltr"),o.appendChild(s),t.appendChild(o);const g=()=>{o.remove(),clearTimeout(E)};i.abort.push(g);let E=setTimeout(()=>{s.classList.add("vc-ripple__inner--enter"),s.style.transform=`translate3d(${C},${_},0) scale3d(1,1,1)`,s.style.opacity="0.2",E=setTimeout(()=>{s.classList.remove("vc-ripple__inner--enter"),s.classList.add("vc-ripple__inner--leave"),s.style.opacity="0",E=setTimeout(()=>{o.remove(),i.abort.splice(i.abort.indexOf(g),1)},275)},250)},50)}function Yh(e,{modifiers:t,value:i,arg:n,instance:r}){const a=Object.assign({},t,i);e.modifiers={early:a.early===!0,stop:a.stop===!0,center:a.center===!0,color:a.color||n,keyCodes:[].concat(a.keyCodes||13)}}var Jh=zl({name:"ripple",beforeMount(e,t){const i={enabled:t.value!==!1,modifiers:{},abort:[],start(n){i.enabled===!0&&n.qSkipRipple!==!0&&(i.modifiers.early===!0?["mousedown","touchstart"].includes(n.type)===!0:n.type==="click")&&Xh(n,e,i,n.qKeyEvent===!0)},keystart:Gl(n=>{i.enabled===!0&&n.qSkipRipple!==!0&&to(n,i.modifiers.keyCodes)===!0&&n.type===`key${i.modifiers.early===!0?"down":"up"}`&&Xh(n,e,i,!0)},300)};Yh(i,t),e.__vcripple=i,Xt(i,"main",[[e,"mousedown","start","passive"],[e,"touchstart","start","passive"],[e,"click","start","passive"],[e,"keydown","keystart","passive"],[e,"keyup","keystart","passive"]])},updated(e,t){if(t.oldValue!==t.value){const i=e.__vcripple;i.enabled=t.value!==!1,i.enabled===!0&&Object(t.value)===t.value&&Yh(i,t)}},beforeUnmount(e){const t=e.__vcripple;t.abort.forEach(i=>{i()}),ji(t,"main"),delete e._vcripple}});function At(){const e=navigator.userAgent,t=/(?:Windows Phone)/.test(e),i=/(?:SymbianOS)/.test(e)||t,n=/(?:Android)/.test(e),r=/(?:Firefox)/.test(e),a=/(?:Chrome|CriOS)/.test(e),o=/(?:iPad|PlayBook)/.test(e)||n&&!/(?:Mobile)/.test(e)||r&&/(?:Tablet)/.test(e),s=/(?:iPhone)/.test(e)&&!o,l=!s&&!n&&!i,c=!!e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);return{isTablet:o,isPhone:s,isAndroid:n,isPc:l,isChrome:a,isIOS:c,hasTouch:"ontouchstart"in window||window.navigator.maxTouchPoints>0}}function Yi(){if(window.getSelection!==void 0){const e=window.getSelection();(e==null?void 0:e.empty)!==void 0?e.empty():(e==null?void 0:e.removeAllRanges)!==void 0&&(e.removeAllRanges(),At().isPhone!==!0&&e.addRange(document.createRange()))}else document.selection!==void 0&&document.selection.empty()}var ba=zl({name:"touch-hold",beforeMount(e,t){const{modifiers:i}=t;if(i.mouse!==!0&&At().hasTouch!==!0)return;const n={handler:t.value,noop:qh,mouseStart(a){typeof n.handler=="function"&&Zh(a)===!0&&(Xt(n,"temp",[[document,"mousemove","move","passiveCapture"],[document,"click","end","notPassiveCapture"]]),n.start(a,!0))},touchStart(a){var o;if(a.target!==void 0&&typeof n.handler=="function"){const s=a.target;Xt(n,"temp",[[s,"touchmove","move","passiveCapture"],[s,"touchcancel","end","notPassiveCapture"],[s,"touchend","end","notPassiveCapture"]]),n.start(a),(o=t==null?void 0:t.touchStart)==null||o.call(t,a)}},start(a,o){n.origin=rr(a);const s=Date.now();At().isPhone===!0&&(document.body.classList.add("non-selectable"),Yi(),n.styleCleanup=l=>{n.styleCleanup=void 0;const c=()=>{document.body.classList.remove("non-selectable")};l===!0?(Yi(),setTimeout(c,10)):c()}),n.triggered=!1,n.sensitivity=o===!0?n.mouseSensitivity:n.touchSensitivity,n.timer=setTimeout(()=>{Yi(),n.triggered=!0,n.handler({evt:a,touch:o!==!0,mouse:o===!0,position:n.origin,duration:Date.now()-s})},n.duration)},move(a){const{top:o,left:s}=rr(a);(Math.abs(s-n.origin.left)>=n.sensitivity||Math.abs(o-n.origin.top)>=n.sensitivity)&&clearTimeout(n.timer)},end(a){var o;ji(n,"temp"),n.styleCleanup!==void 0&&n.styleCleanup(n.triggered),n.triggered===!0?a!==void 0&&un(a):clearTimeout(n.timer),(o=t==null?void 0:t.touchEnd)==null||o.call(t,a)}},r=[600,5,7];typeof t.arg=="string"&&t.arg.length>0&&t.arg.split(":").forEach((a,o)=>{const s=parseInt(a,10);s&&(r[o]=s)}),[n.duration,n.touchSensitivity,n.mouseSensitivity]=r,e.__vctouchhold=n,i.mouse===!0&&Xt(n,"main",[[e,"mousedown","mouseStart",`passive${i.mouseCapture===!0?"Capture":""}`]]),At().hasTouch===!0&&Xt(n,"main",[[e,"touchstart","touchStart",`passive${i.capture===!0?"Capture":""}`],[e,"touchend","noop","notPassiveCapture"]])},updated(e,t){const i=e.__vctouchhold;i!==void 0&&t.oldValue!==t.value&&(typeof t.value!="function"&&i.end(),i.handler=t.value)},beforeUnmount(e){const t=e.__vctouchhold;t!==void 0&&(ji(t,"main"),ji(t,"temp"),clearTimeout(t.timer),t.styleCleanup!==void 0&&t.styleCleanup(),delete e.__vctouchhold)}});const Kh={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},qP=new RegExp(`^([\\d+]+|${Object.keys(Kh).join("|")})$`,"i");function ZP(e,t){const{top:i,left:n}=rr(e);return Math.abs(n-t.left)>=7||Math.abs(i-t.top)>=7}var QP=zl({name:"touch-repeat",beforeMount(e,{modifiers:t,value:i,arg:n,touchStart:r}){const a=Object.keys(t).reduce((c,u)=>{if(qP.test(u)===!0){const d=isNaN(parseInt(u,10))?Kh[u.toLowerCase()]:parseInt(u,10);d>=0&&c.push(d)}return c},[]);if(t.mouse!==!0&&At().hasTouch!==!0&&a.length===0)return;const o=typeof n=="string"&&n.length>0?n.split(":").map(c=>parseInt(c,10)):[0,600,300],s=o.length-1,l={keyboard:a,handler:i,noop:qh,mouseStart(c){l.event===void 0&&typeof l.handler=="function"&&Zh(c)===!0&&(Xt(l,"temp",[[document,"mousemove","move","passiveCapture"],[document,"click","end","notPassiveCapture"]]),l.start(c,!0))},keyboardStart(c){if(typeof l.handler=="function"&&to(c,a)===!0){if((o[0]===0||l.event!==void 0)&&(un(c),e.focus(),l.event!==void 0))return;Xt(l,"temp",[[document,"keyup","end","notPassiveCapture"],[document,"click","end","notPassiveCapture"]]),l.start(c,!1,!0)}},touchStart(c){if(c.target!==void 0&&typeof l.handler=="function"){const u=c.target;Xt(l,"temp",[[u,"touchmove","move","passiveCapture"],[u,"touchcancel","end","notPassiveCapture"],[u,"touchend","end","notPassiveCapture"]]),l.start(c),r==null||r(c)}},start(c,u,d){d!==!0&&(l.origin=rr(c));function m(v){l.styleCleanup=void 0,document.documentElement.style.cursor="";const C=()=>{document.body.classList.remove("non-selectable")};v===!0?(Yi(),setTimeout(C,10)):C()}At().isPhone===!0&&(document.body.classList.add("non-selectable"),Yi(),l.styleCleanup=m),l.event={touch:u!==!0&&d!==!0,mouse:u===!0,keyboard:d===!0,startTime:Date.now(),repeatCount:0};const f=()=>{if(l.event===void 0)return;l.event.repeatCount===0&&(l.event.evt=c,d===!0?l.event.keyCode=c.keyCode:l.event.position=rr(c),At().isPhone!==!0&&(document.documentElement.style.cursor="pointer",document.body.classList.add("non-selectable"),Yi(),l.styleCleanup=m)),l.event.duration=Date.now()-l.event.startTime,l.event.repeatCount+=1,l.handler(l.event);const v=s<l.event.repeatCount?s:l.event.repeatCount;l.timer=setTimeout(f,o[v])};o[0]===0?f():l.timer=setTimeout(f,o[0])},move(c){l.event!==void 0&&ZP(c,l.origin)===!0&&clearTimeout(l.timer)},end(c){l.event!==void 0&&(l.styleCleanup!==void 0&&l.styleCleanup(!0),c!==void 0&&l.event.repeatCount>0&&un(c),ji(l,"temp"),clearTimeout(l.timer),l.event=void 0)}};e.__vctouchrepeat=l,t.mouse===!0&&Xt(l,"main",[[e,"mousedown","mouseStart",`passive${t.mouseCapture===!0?"Capture":""}`]]),At().hasTouch===!0&&Xt(l,"main",[[e,"touchstart","touchStart",`passive${t.capture===!0?"Capture":""}`],[e,"touchend","noop","notPassiveCapture"]]),a.length>0&&Xt(l,"main",[[e,"keydown","keyboardStart",`notPassive${t.keyCapture===!0?"Capture":""}`]])},updated(e,{oldValue:t,value:i}){const n=e.__vctouchrepeat;n!==void 0&&t!==i&&(typeof i!="function"&&n.end(),n.handler=i)},beforeUnmount(e){const t=e.__vctouchrepeat;t!==void 0&&(clearTimeout(t.timer),ji(t,"main"),ji(t,"temp"),t.styleCleanup!==void 0&&t.styleCleanup(),delete e.__vctouchrepeat)}});function or(){let e,t;const i=new Promise(function(n,r){e=n,t=r});return{resolve:e,reject:t,promise:i}}function em(e,{handleMouseClick:t=void 0,handleMouseDown:i=void 0,handleMouseUp:n=void 0,handleMouseMove:r=void 0,handleDoubleClick:a=void 0,handleMouseWheel:o=void 0,handlePinch:s=void 0}){const l=ie(void 0),c=ie(!1),u=()=>{if(c.value)return;const{ScreenSpaceEventType:V,KeyboardEventModifier:se,ScreenSpaceEventHandler:he}=Cesium;if(!l.value){const{viewer:Se}=e;l.value=new he(Se.canvas),ba.beforeMount(Se.canvas,{arg:"2000",value:ve,touchStart:xe,touchEnd:ue,modifiers:{}})}const we=l.value;we.setInputAction(f,V.LEFT_CLICK),we.setInputAction(v,V.LEFT_CLICK,se.SHIFT),we.setInputAction(C,V.LEFT_CLICK,se.CTRL),we.setInputAction(R,V.LEFT_DOWN),we.setInputAction(I,V.LEFT_DOWN,se.SHIFT),we.setInputAction(j,V.LEFT_DOWN,se.CTRL),we.setInputAction(O,V.LEFT_UP),we.setInputAction(x,V.LEFT_UP,se.SHIFT),we.setInputAction(w,V.LEFT_UP,se.CTRL),we.setInputAction(E,V.RIGHT_CLICK),we.setInputAction(T,V.RIGHT_CLICK,se.SHIFT),we.setInputAction(A,V.RIGHT_CLICK,se.CTRL),we.setInputAction(h,V.RIGHT_DOWN),we.setInputAction(p,V.RIGHT_DOWN,se.SHIFT),we.setInputAction(y,V.RIGHT_DOWN,se.CTRL),we.setInputAction(F,V.RIGHT_UP),we.setInputAction(G,V.RIGHT_UP,se.SHIFT),we.setInputAction(q,V.RIGHT_UP,se.CTRL),we.setInputAction(b,V.MIDDLE_CLICK),we.setInputAction(_,V.MIDDLE_CLICK,se.SHIFT),we.setInputAction(M,V.MIDDLE_CLICK,se.CTRL),we.setInputAction(W,V.MIDDLE_DOWN),we.setInputAction($,V.MIDDLE_DOWN,se.SHIFT),we.setInputAction(k,V.MIDDLE_DOWN,se.CTRL),we.setInputAction(D,V.MIDDLE_UP),we.setInputAction(S,V.MIDDLE_UP,se.SHIFT),we.setInputAction(B,V.MIDDLE_UP,se.CTRL),we.setInputAction(U,V.LEFT_DOUBLE_CLICK),we.setInputAction(K,V.LEFT_DOUBLE_CLICK,se.SHIFT),we.setInputAction(N,V.LEFT_DOUBLE_CLICK,se.CTRL),we.setInputAction(L,V.MOUSE_MOVE),we.setInputAction(H,V.MOUSE_MOVE,se.SHIFT),we.setInputAction(z,V.MOUSE_MOVE,se.CTRL),we.setInputAction(Q,V.WHEEL),we.setInputAction(Z,V.WHEEL,se.SHIFT),we.setInputAction(J,V.WHEEL,se.CTRL),we.setInputAction(X,V.PINCH_START),we.setInputAction(ee,V.PINCH_START,se.SHIFT),we.setInputAction(Y,V.PINCH_START,se.CTRL),we.setInputAction(le,V.PINCH_END),we.setInputAction(ce,V.PINCH_END,se.SHIFT),we.setInputAction(me,V.PINCH_END,se.CTRL),we.setInputAction(de,V.PINCH_MOVE),we.setInputAction(ge,V.PINCH_MOVE,se.SHIFT),we.setInputAction(be,V.PINCH_MOVE,se.CTRL),c.value=!0},d=()=>{if(!c.value)return;const{ScreenSpaceEventType:V,KeyboardEventModifier:se}=Cesium,he=l.value;if(!he)return;he.removeInputAction(V.LEFT_CLICK),he.removeInputAction(V.LEFT_CLICK,se.SHIFT),he.removeInputAction(V.LEFT_CLICK,se.CTRL),he.removeInputAction(V.LEFT_DOWN),he.removeInputAction(V.LEFT_DOWN,se.SHIFT),he.removeInputAction(V.LEFT_DOWN,se.CTRL),he.removeInputAction(V.LEFT_UP),he.removeInputAction(V.LEFT_UP,se.SHIFT),he.removeInputAction(V.LEFT_UP,se.CTRL),he.removeInputAction(V.RIGHT_CLICK),he.removeInputAction(V.RIGHT_CLICK,se.SHIFT),he.removeInputAction(V.RIGHT_CLICK,se.CTRL),he.removeInputAction(V.RIGHT_DOWN),he.removeInputAction(V.RIGHT_DOWN,se.SHIFT),he.removeInputAction(V.RIGHT_DOWN,se.CTRL),he.removeInputAction(V.RIGHT_UP),he.removeInputAction(V.RIGHT_UP,se.SHIFT),he.removeInputAction(V.RIGHT_UP,se.CTRL),he.removeInputAction(V.MIDDLE_CLICK),he.removeInputAction(V.MIDDLE_CLICK,se.SHIFT),he.removeInputAction(V.MIDDLE_CLICK,se.CTRL),he.removeInputAction(V.MIDDLE_DOWN),he.removeInputAction(V.MIDDLE_DOWN,se.SHIFT),he.removeInputAction(V.MIDDLE_DOWN,se.CTRL),he.removeInputAction(V.MIDDLE_UP),he.removeInputAction(V.MIDDLE_UP,se.SHIFT),he.removeInputAction(V.MIDDLE_UP,se.CTRL),he.removeInputAction(V.LEFT_DOUBLE_CLICK),he.removeInputAction(V.LEFT_DOUBLE_CLICK,se.SHIFT),he.removeInputAction(V.LEFT_DOUBLE_CLICK,se.CTRL),he.removeInputAction(V.MOUSE_MOVE),he.removeInputAction(V.MOUSE_MOVE,se.SHIFT),he.removeInputAction(V.MOUSE_MOVE,se.CTRL),he.removeInputAction(V.WHEEL),he.removeInputAction(V.WHEEL,se.SHIFT),he.removeInputAction(V.WHEEL,se.CTRL),he.removeInputAction(V.PINCH_START),he.removeInputAction(V.PINCH_START,se.SHIFT),he.removeInputAction(V.PINCH_START,se.CTRL),he.removeInputAction(V.PINCH_END),he.removeInputAction(V.PINCH_END,se.SHIFT),he.removeInputAction(V.PINCH_END,se.CTRL),he.removeInputAction(V.PINCH_MOVE),he.removeInputAction(V.PINCH_MOVE,se.SHIFT),he.removeInputAction(V.PINCH_MOVE,se.CTRL);const{viewer:we}=e;ba.beforeUnmount(we.canvas),c.value=!1},m=()=>{var V;(V=l.value)==null||V.destroy(),l.value=void 0},f=V=>{t==null||t(V,{button:0})},v=V=>{t==null||t(V,{button:0,shift:!0})},C=V=>{t==null||t(V,{button:0,ctrl:!0})},b=V=>{t==null||t(V,{button:1})},_=V=>{t==null||t(V,{button:1,shift:!0})},M=V=>{t==null||t(V,{button:1,ctrl:!0})};let g;const E=V=>{var se;g?(se=g==null?void 0:g.promise)==null||se.then(he=>{he&&(t==null||t(V,{button:2}))}):t==null||t(V,{button:2})},T=V=>{t==null||t(V,{button:2,shift:!0})},A=V=>{t==null||t(V,{button:2,ctrl:!0})},R=V=>{i==null||i(V,{button:0})},I=V=>{i==null||i(V,{button:0,shift:!0})},j=V=>{i==null||i(V,{button:0,ctrl:!0})},W=V=>{i==null||i(V,{button:1})},$=V=>{i==null||i(V,{button:1,shift:!0})},k=V=>{i==null||i(V,{button:1,ctrl:!0})},h=V=>{i==null||i(V,{button:2})},p=V=>{i==null||i(V,{button:2,shift:!0})},y=V=>{i==null||i(V,{button:2,ctrl:!0})},O=V=>{n==null||n(V,{button:0})},x=V=>{n==null||n(V,{button:0,shift:!0})},w=V=>{n==null||n(V,{button:0,ctrl:!0})},D=V=>{n==null||n(V,{button:1,ctrl:!0})},S=V=>{n==null||n(V,{button:1,shift:!0})},B=V=>{n==null||n(V,{button:1,ctrl:!0})},F=V=>{n==null||n(V,{button:2})},G=V=>{n==null||n(V,{button:2,shift:!0})},q=V=>{n==null||n(V,{button:2,ctrl:!0})},U=V=>{a==null||a(V,{button:0})},K=V=>{a==null||a(V,{button:0,shift:!0})},N=V=>{a==null||a(V,{button:0,ctrl:!0})},L=V=>{r==null||r(V)},H=V=>{r==null||r(V,{shift:!0})},z=V=>{r==null||r(V,{ctrl:!0})},Q=V=>{o==null||o(V)},Z=V=>{o==null||o(V,{shift:!0})},J=V=>{o==null||o(V,{ctrl:!0})},X=V=>{s==null||s(V,{start:!0})},ee=V=>{s==null||s(V,{start:!0,shift:!0})},Y=V=>{s==null||s(V,{start:!0,ctrl:!0})},le=V=>{s==null||s(V,{end:!0})},ce=V=>{s==null||s(V,{end:!0,shift:!0})},me=V=>{s==null||s(V,{end:!0,ctrl:!0})},de=V=>{s==null||s(V,{move:!0})},ge=V=>{s==null||s(V,{move:!0,shift:!0})},be=V=>{s==null||s(V,{move:!0,ctrl:!0})},ve=V=>{if(V.touch){const se={position:{x:V.position.left,y:V.position.top}};a==null||a(se,{button:0})}g.resolve(!1)},ue=V=>{g.resolve(!0)},xe=V=>{g=or()};return{activate:u,deactivate:d,destroy:m,isActive:c}}function Nn(e,t,i){const n=Be(e,t,i);if(n!==void 0)return i.createCesiumObject=async()=>{const r=n.transformProps(e),a=n.$services.primitives;return a&&a.add(r)},i.mount=async()=>{const r=n.$services.primitives,a=i.cesiumObject;return r&&r.contains(a)},i.unmount=async()=>{const r=n.$services.primitives,a=i.cesiumObject;return r&&!r.isDestroyed()&&r.remove(a)},{transformProps:n.transformProps,unwatchFns:n.unwatchFns,setPropsWatcher:n.setPropsWatcher,$services:n.$services}}function zn(e,t,i){const n=Be(e,t,i);return n===void 0?void 0:(i.mount=async()=>{const a=n.$services.primitives,o=i.cesiumObject,s=a&&a.add(o);return Cesium.defined(s)},i.unmount=async()=>{const a=n.$services.primitives,o=i.cesiumObject;return a&&a.remove(o)},on(zi,(()=>Mn(n.getServices(),{get primitives(){return i.cesiumObject}}))()),{transformProps:n.transformProps,transformProp:n.transformProp,unwatchFns:n.unwatchFns,setPropsWatcher:n.setPropsWatcher})}function dn(e,t,i){const n=Be(e,t,i);if(n===void 0)return;const{emit:r}=t,a=ie(0),o=ie([]);i.createCesiumObject=async()=>{var u,d;const m=n.transformProps(e);return m.asynchronous||await((d=(u=Cesium[i.cesiumClass]).initializeTerrainHeights)==null?void 0:d.call(u)),e.geometryInstances&&(Ze(e.geometryInstances)?(o.value.push(...e.geometryInstances),a.value+=e.geometryInstances.length):(a.value+=1,o.value.push(e.geometryInstances))),new Cesium[i.cesiumClass](m)},i.mount=async()=>{const u=i.cesiumClass.includes("Ground")?n.$services.groundPrimitives:n.$services.primitives,d=i.cesiumObject;d.readyPromise&&d.readyPromise.then(f=>{Me(i,"readyPromise")&&r("readyPromise",f,n.$services.viewer,i.proxy)}),d._vcParent=u;const m=u&&u.add(d);if(i.cesiumClass==="ParticleSystem"){const f=setInterval(()=>{Cesium.defined(m._billboardCollection)&&(m._billboardCollection._vcParent=m,clearInterval(f))},500)}return Cesium.defined(m)},i.unmount=async()=>{a.value=0,o.value=[];const u=i.cesiumClass.includes("Ground")?n.$services.groundPrimitives:n.$services.primitives,d=i.cesiumObject;return u&&u.remove(d)};const s=(u,d)=>{if(o.value.push(u),d===a.value-1)if(Me(i,"update:geometryInstances"))t.emit("update:geometryInstances",o.value);else{const f=i.cesiumObject;f.geometryInstances=d===0?u:o.value}return!0},l=u=>{const d=o.value.indexOf(u);return o.value.splice(d,1),!0};return on(zi,(()=>Mn(n.getServices(),{get primitive(){return i.cesiumObject}}))()),Object.assign(i.proxy,{__updateGeometryInstances:s,__removeGeometryInstances:l,__childCount:a}),{transformProps:n.transformProps,unwatchFns:n.unwatchFns,setPropsWatcher:n.setPropsWatcher}}const Ca=3.141592653589793*3e3/180,Dt=3.141592653589793,wa=6378245,_a=.006693421622965943,Ul=function(n,r){var n=+n,r=+r;const a=n-.0065,o=r-.006,s=Math.sqrt(a*a+o*o)-2e-5*Math.sin(o*Ca),l=Math.atan2(o,a)-3e-6*Math.cos(a*Ca),c=s*Math.cos(l),u=s*Math.sin(l);return[c,u]},Hl=function(r,n){var n=+n,r=+r;const a=Math.sqrt(r*r+n*n)+2e-5*Math.sin(n*Ca),o=Math.atan2(n,r)+3e-6*Math.cos(r*Ca),s=a*Math.cos(o)+.0065,l=a*Math.sin(o)+.006;return[s,l]},tm=function(r,n){var n=+n,r=+r;if(rm(r,n))return[r,n];{let a=im(r-105,n-35),o=nm(r-105,n-35);const s=n/180*Dt;let l=Math.sin(s);l=1-_a*l*l;const c=Math.sqrt(l);a=a*180/(wa*(1-_a)/(l*c)*Dt),o=o*180/(wa/c*Math.cos(s)*Dt);const u=n+a;return[r+o,u]}},Wl=function(r,n){var n=+n,r=+r;if(rm(r,n))return[r,n];{let a=im(r-105,n-35),o=nm(r-105,n-35);const s=n/180*Dt;let l=Math.sin(s);l=1-_a*l*l;const c=Math.sqrt(l);a=a*180/(wa*(1-_a)/(l*c)*Dt),o=o*180/(wa/c*Math.cos(s)*Dt);const u=n+a,d=r+o;return[r*2-d,n*2-u]}};var im=function(r,n){var n=+n,r=+r;let a=-100+2*r+3*n+.2*n*n+.1*r*n+.2*Math.sqrt(Math.abs(r));return a+=(20*Math.sin(6*r*Dt)+20*Math.sin(2*r*Dt))*2/3,a+=(20*Math.sin(n*Dt)+40*Math.sin(n/3*Dt))*2/3,a+=(160*Math.sin(n/12*Dt)+320*Math.sin(n*Dt/30))*2/3,a},nm=function(r,n){var n=+n,r=+r;let a=300+r+2*n+.1*r*r+.1*r*n+.1*Math.sqrt(Math.abs(r));return a+=(20*Math.sin(6*r*Dt)+20*Math.sin(2*r*Dt))*2/3,a+=(20*Math.sin(r*Dt)+40*Math.sin(r/3*Dt))*2/3,a+=(150*Math.sin(r/12*Dt)+300*Math.sin(r/30*Dt))*2/3,a},rm=function(r,n){var n=+n,r=+r;return!(r>73.66&&r<135.05&&n>3.86&&n<53.55)},om=Object.freeze({__proto__:null,bd09togcj02:Ul,gcj02tobd09:Hl,wgs84togcj02:tm,gcj02towgs84:Wl});function tt(e,t,i){i.cesiumEvents=["errorEvent"];const n=Be(e,t,i);if(n===void 0)return;const{emit:r}=t;return i.mount=async()=>{var a,o,s,l;const{viewer:c}=n.$services;if(i.cesiumClass.indexOf("ImageryProvider")!==-1){i.renderByParent=!0;const u=i.cesiumObject;if((a=u==null?void 0:u.readyPromise)==null||a.then(()=>{Me(i,"readyPromise")&&r("readyPromise",u,c,i.proxy)}),e.projectionTransforms&&e.projectionTransforms.from!==e.projectionTransforms.to&&!(((o=i.proxy)==null?void 0:o.$options.name)==="VcImageryProviderBaidu"||((s=i.proxy)==null?void 0:s.$options.name)==="VcImageryProviderTianditu"&&u._epsgCode==="4490")){const{WebMercatorTilingScheme:f,Cartographic:v,Math:C}=Cesium,b=new f,_=b.projection,M=_.project,g=_.unproject;let E,T;e.projectionTransforms.to.toUpperCase()==="WGS84"?(E="wgs84togcj02",T="gcj02towgs84"):e.projectionTransforms.to.toUpperCase()==="GCJ02"&&(E="gcj02towgs84",T="wgs84togcj02"),E&&T&&(_.project=function(A,R){return R=R||new Cesium.Cartesian3,R=om[E](C.toDegrees(A.longitude),C.toDegrees(A.latitude)),M.call(this,new v(C.toRadians(R==null?void 0:R[0]),C.toRadians(R==null?void 0:R[1])))},_.unproject=function(A,R){R=R||new v;const I=g.call(this,A);return R=om[T](C.toDegrees(I.longitude),C.toDegrees(I.latitude)),new v(C.toRadians(R==null?void 0:R[0]),C.toRadians(R==null?void 0:R[1]))},u._tilingScheme=b)}const d=xt(i).proxy;return d&&((l=d.__updateProvider)==null?void 0:l.call(d,u))}else{const u=i.cesiumObject;return u.readyPromise.then(()=>{Me(i,"readyPromise")&&r("readyPromise",u,c,i.proxy)}),c.terrainProvider=u,!0}},i.unmount=async()=>{var a;const{viewer:o}=n.$services;if(i.cesiumClass.indexOf("ImageryProvider")!==-1){const s=xt(i).proxy;return s&&((a=s.__updateProvider)==null?void 0:a.call(s,void 0))}else{const s=new Cesium.EllipsoidTerrainProvider;return s.readyPromise.then(()=>{Me(i,"readyPromise")&&r("readyPromise",s,o,i.proxy)}),o.terrainProvider=s,!0}},{transformProps:n.transformProps,unwatchFns:n.unwatchFns,setPropsWatcher:n.setPropsWatcher}}function ql(e){var t,i;const n=re(),r=n.parent==null?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides;(!r||!(zi in r))&&!e&&(e="cesiumContainer");const a=Uo();if(n)if(e){const o=(i=(t=n.appContext.config.globalProperties)==null?void 0:t.$VueCesium)==null?void 0:i[e];return o||a.warn(`Failed to get $vc, reason: vc-viewer with containerId: ${e} was not found.`),o}else return Po(zi);else a.warn("VueCesium useVueCesium() can only be used inside setup().")}var XP={cesiumPath:String,animation:{type:Boolean,default:!1},baseLayerPicker:{type:Boolean,default:!1},fullscreenButton:{type:Boolean,default:!1},vrButton:{type:Boolean,default:!1},geocoder:{type:[Boolean,Array],default:!1},homeButton:{type:Boolean,default:!1},infoBox:{type:Boolean,default:!0},sceneModePicker:{type:Boolean,default:!1},selectionIndicator:{type:Boolean,default:!0},timeline:{type:Boolean,default:!1},navigationHelpButton:{type:Boolean,default:!1},navigationInstructionsInitiallyVisible:{type:Boolean,default:!1},scene3DOnly:{type:Boolean,default:!1},shouldAnimate:{type:Boolean,default:!1},clockViewModel:Object,selectedImageryProviderViewModel:Object,imageryProviderViewModels:Array,selectedTerrainProviderViewModel:Object,terrainProviderViewModels:Array,imageryProvider:Object,terrainProvider:Object,skyBox:{type:[Object,Boolean],default:()=>{}},skyAtmosphere:{type:[Object,Boolean],default:()=>{}},fullscreenElement:{type:[String,Element]},useDefaultRenderLoop:{type:Boolean,default:!0},targetFrameRate:Number,showRenderLoopErrors:{type:Boolean,default:!0},useBrowserRecommendedResolution:{type:Boolean,default:!0},automaticallyTrackDataSourceClocks:{type:Boolean,default:!0},contextOptions:Object,sceneMode:{type:Number,default:3},mapProjection:Object,globe:{type:[Object,Boolean],default:()=>{}},orderIndependentTranslucency:{type:Boolean,default:!0},creditContainer:[String,Element],creditViewport:[String,Element],dataSources:Object,terrainExaggeration:{type:Number,default:1},shadows:{type:Boolean,default:!1},terrainShadows:{type:Number,default:3},mapMode2D:{type:Number,default:1},projectionPicker:{type:Boolean,default:!1},requestRenderMode:{type:Boolean,default:!1},maximumRenderTimeChange:{type:Number,default:0},debugShowFramesPerSecond:{type:Boolean,default:!1},showCredit:{type:Boolean,default:!0},accessToken:String,camera:{type:Object,default:()=>({position:{lng:105,lat:29.999999999999993,height:19059568497290563e-9},heading:360,pitch:-90,roll:0})},navigation:{type:Boolean,default:!1},TZCode:{type:String},UTCOffset:{type:Number},removeCesiumScript:{type:Boolean,default:!0},autoSortImageryLayers:{type:Boolean,default:!0},enableMouseEvent:{type:Boolean,default:!0},skeleton:{type:[Boolean,Object],default:()=>({dark:!1,animation:"wave",square:!0,bordered:!0,color:void 0})},touchHoldArg:{type:String,default:"1000"},viewerCreator:Function,mars3dConfig:Object,containerId:String};function YP(){return{"font-awesome":["https://unpkg.com/font-awesome@latest/css/font-awesome.min.css"],haoutil:["https://unpkg.com/haoutil@latest/dist/haoutil-src.js"],turf:["https://unpkg.com/@turf/turf@latest/turf.min.js"],"mars3d-space":["https://unpkg.com/mars3d-space@latest/dist/mars3d-space.js"],"mars3d-echarts":["https://unpkg.com/echarts@latest/dist/echarts.min.js","https://unpkg.com/echarts-gl@latest/dist/echarts-gl.min.js","https://unpkg.com/mars3d-echarts@latest/dist/mars3d-echarts.js"],"mars3d-mapv":["https://unpkg.com/mapv@latest/build/mapv.min.js","https://unpkg.com/mars3d-mapv@latest/dist/mars3d-mapv.js"],"mars3d-heatmap":["https://unpkg.com/heatmapjs@latest/heatmap.min.js","https://unpkg.com/mars3d-heatmap@latest/dist/mars3d-heatmap.js"],"mars3d-wind":["https://unpkg.com/netcdfjs@latest/lib/index.js","https://unpkg.com/mars3d-wind@latest/dist/mars3d-wind.js"],"mars3d-tdt":["https://unpkg.com/mars3d-tdt@latest/dist/mars3d-tdt.js"],"mars3d-widget":["https://unpkg.com/mars3d-widget@latest/dist/mars3d-widget.js"],mars3d:["https://unpkg.com/mars3d-cesium@latest/Build/Cesium/Widgets/widgets.css","https://unpkg.com/mars3d-cesium@latest/Build/Cesium/Cesium.js","https://unpkg.com/mars3d@latest/dist/mars3d.css","https://unpkg.com/mars3d@latest/dist/mars3d.js"]}}class am{constructor(){this.states=new Cesium.ManagedArray,this.count=0}hidePrimitiveCollection(t){const{PrimitiveCollection:i,Cesium3DTileset:n,Model:r}=Cesium,a=t.length;for(let o=0;o<a;o++){const s=t.get(o);s instanceof i?this.hidePrimitiveCollection(s):(this.states.push(s.show),s instanceof n||s instanceof r||(s.show=!1))}}restorePrimitiveCollection(t){const{PrimitiveCollection:i}=Cesium,n=t.length;for(let r=0;r<n;r++){const a=t.get(r);a instanceof i?this.restorePrimitiveCollection(a):a.show=this.states.get(this.count++)}}hide(t){this.states.length=0,this.hidePrimitiveCollection(t.primitives),this.hidePrimitiveCollection(t.groundPrimitives)}restore(t){this.count=0,this.restorePrimitiveCollection(t.primitives),this.restorePrimitiveCollection(t.groundPrimitives)}}var Ee={BeforeDraw:0,Drawing:1,AfterDraw:2};const Ot=Object.freeze({METERS:"METERS",CENTIMETERS:"CENTIMETERS",KILOMETERS:"KILOMETERS",FEET:"FEET",US_SURVEY_FEET:"US_SURVEY_FEET",INCHES:"INCHES",YARDS:"YARDS",MILES:"MILES"}),ft=Object.freeze({SQUARE_METERS:"SQUARE_METERS",SQUARE_CENTIMETERS:"SQUARE_CENTIMETERS",SQUARE_KILOMETERS:"SQUARE_KILOMETERS",SQUARE_FEET:"SQUARE_FEET",SQUARE_INCHES:"SQUARE_INCHES",SQUARE_YARDS:"SQUARE_YARDS",SQUARE_MILES:"SQUARE_MILES",ACRES:"ACRES",HECTARES:"HECTARES"}),jt=Object.freeze({CUBIC_METERS:"CUBIC_METERS",CUBIC_CENTIMETERS:"CUBIC_CENTIMETERS",CUBIC_KILOMETERS:"CUBIC_KILOMETERS",CUBIC_FEET:"CUBIC_FEET",CUBIC_INCHES:"CUBIC_INCHES",CUBIC_YARDS:"CUBIC_YARDS",CUBIC_MILES:"CUBIC_MILES"}),pt=Object.freeze({DEGREES:"DEGREES",RADIANS:"RADIANS",DEGREES_MINUTES_SECONDS:"DEGREES_MINUTES_SECONDS",GRADE:"GRADE",RATIO:"RATIO"}),ni=class{constructor(e){e=Xn(e,{}),this.distanceUnits=Xn(e.distanceUnits,Ot.METERS),this.areaUnits=Xn(e.areaUnits,ft.SQUARE_METERS),this.volumeUnits=Xn(e.volumeUnits,jt.CUBIC_METERS),this.angleUnits=Xn(e.angleUnits,pt.DEGREES),this.slopeUnits=Xn(e.slopeUnits,pt.DEGREES)}static distanceToString(e,t,i,n){return e=ni.convertDistance(e,Ot.METERS,t),ar(e,i,n)+ni.getDistanceUnitSpacing(t)+ni.getDistanceUnitSymbol(t)}static areaToString(e,t,i,n){return e=ni.convertArea(e,ft.SQUARE_METERS,t),ar(e,i,n)+ni.getAreaUnitSpacing(t)+ni.getAreaUnitSymbol(t)}static angleToString(e,t,i,n){const{Math:r}=Cesium;if(t===pt.DEGREES||t===pt.RADIANS||t===pt.GRADE)return e=um(e,t),ar(e,i,n)+ni.getAngleUnitSpacing(t)+ni.getAngleUnitSymbol(t);if(t===pt.DEGREES_MINUTES_SECONDS){const a=r.toDegrees(e),o=a<0?"-":"",s=Math.floor(a),l=60*(a-s),c=Math.floor(l);return o+s+"\xB0 "+c+"' "+ar(60*(l-c),void 0,n)+'"'}t===pt.RATIO}static volumeToString(e,t,i,n){return e=ni.convertArea(e,jt.CUBIC_METERS,t),ar(e,i,n)+ni.getVolumeUnitSpacing(t)+ni.getVolumeUnitSymbol(t)}static getDistanceUnitSpacing(e){return" "}static getAreaUnitSpacing(e){return" "}static getAngleUnitSpacing(e){return e===pt.RADIANS?" ":""}static getVolumeUnitSpacing(e){return" "}static getDistanceUnitSymbol(e){switch(e){case Ot.METERS:return"m";case Ot.CENTIMETERS:return"cm";case Ot.KILOMETERS:return"km";case Ot.FEET:case Ot.US_SURVEY_FEET:return"ft";case Ot.INCHES:return"in";case Ot.YARDS:return"yd";case Ot.MILES:return"mi";default:return}}static getAreaUnitSymbol(e){switch(e){case ft.SQUARE_METERS:return"m\xB2";case ft.SQUARE_CENTIMETERS:return"cm\xB2";case ft.SQUARE_KILOMETERS:return"km\xB2";case ft.SQUARE_FEET:return"sq ft";case ft.SQUARE_INCHES:return"sq in";case ft.SQUARE_YARDS:return"sq yd";case ft.SQUARE_MILES:return"sq mi";case ft.ACRES:return"ac";case ft.HECTARES:return"ha";default:return}}static getVolumeUnitSymbol(e){switch(e){case jt.CUBIC_METERS:return"m\xB3";case jt.CUBIC_CENTIMETERS:return"cm\xB3";case jt.CUBIC_KILOMETERS:return"km\xB3";case jt.CUBIC_FEET:return"cu ft";case jt.CUBIC_INCHES:return"cu in";case jt.CUBIC_YARDS:return"cu yd";case jt.CUBIC_MILES:return"cu mi";default:return}}static getAngleUnitSymbol(e){return e===pt.DEGREES?"\xB0":e===pt.RADIANS?"rad":e===pt.GRADE?"%":void 0}static convertDistance(e,t,i){return t===i?e:e*sm(t)*(1/sm(i))}static convertArea(e,t,i){return t===i?e:e*lm(t)*(1/lm(i))}static convertVolume(e,t,i){return t===i?e:e*cm(t)*(1/cm(i))}static convertAngle(e,t,i){return t===i?e:um(JP(e,t),i)}static longitudeToString(e,t,i,n){return ni.angleToString(Math.abs(e),t,i,n)+" "+(e<0?"W":"E")}static latitudeToString(e,t,i,n){return ni.angleToString(Math.abs(e),t,i,n)+" "+(e<0?"S":"N")}};let it=ni;it.numberToString=function(e,t,i){return ar(e,t,i)};function sm(e){switch(e){case Ot.METERS:return 1;case Ot.CENTIMETERS:return .01;case Ot.KILOMETERS:return 1e3;case Ot.FEET:return .3048;case Ot.US_SURVEY_FEET:return 1200/3937;case Ot.INCHES:return .254;case Ot.YARDS:return .9144;case Ot.MILES:return 1609.344;default:return 1}}function lm(e){switch(e){case ft.SQUARE_METERS:return 1;case ft.SQUARE_CENTIMETERS:return 1e-4;case ft.SQUARE_KILOMETERS:return 1e6;case ft.SQUARE_FEET:return .09290304;case ft.SQUARE_INCHES:return 64516e-8;case ft.SQUARE_YARDS:return .83612736;case ft.SQUARE_MILES:return 2589988110336e-6;case ft.ACRES:return 4046.85642232;case ft.HECTARES:return 1e4;default:return 1}}function cm(e){switch(e){case jt.CUBIC_METERS:return 1;case jt.CUBIC_CENTIMETERS:return 1e-6;case jt.CUBIC_KILOMETERS:return 1e9;case jt.CUBIC_FEET:return .09290304*.3048;case jt.CUBIC_INCHES:return 16387064e-12;case jt.CUBIC_YARDS:return .764554857984;case jt.CUBIC_MILES:return 416818182544058e-5;default:return 1}}function JP(e,t){const{defined:i,Math:n,RuntimeError:r}=Cesium;if(t===pt.RADIANS)return e;if(t===pt.DEGREES)return n.toRadians(e);if(t===pt.GRADE)return e===Number.POSITIVE_INFINITY?n.PI_OVER_TWO:Math.atan(e/100);if(t===pt.RATIO)return Math.atan(e);if(t===pt.DEGREES_MINUTES_SECONDS){const o=/(-?)(\d+)\s*°\s*(\d+)\s*'\s*([\d.,]+)"\s*([WENS]?)/i.exec(e)||[];if(!i(o))throw new r("Could not convert angle to radians: "+e);let s=0<o[1].length?-1:1;const l=parseInt(o[2]),c=parseInt(o[3]),u=parseFloat(o[4]);let d=o[5];d.length===1&&((d=d.toUpperCase())!=="W"&&d!=="S"||(s*=-1));const m=s*(l+c/60+u/3600);return n.toRadians(m)}}function um(e,t){const{Math:i}=Cesium;if(t===pt.RADIANS)return e;if(t===pt.DEGREES)return i.toDegrees(e);if(t===pt.GRADE)return i.clamp(e,0,i.PI_OVER_TWO)===i.PI_OVER_TWO?Number.POSITIVE_INFINITY:100*Math.tan(e);if(t===pt.RATIO)return Math.sin(e)/Math.cos(e)}function ar(e,t,i){const n=KP(i,e,t),r=e.toLocaleString(t,n),a=-0,o=0;return r===a.toLocaleString(t,n)?o.toLocaleString(t,n):r}function KP(e,t,i){let n={minimumFractionDigits:0,maximumFractionDigits:0};return e=Cesium.defaultValue(e,2),typeof e=="number"?(n.minimumFractionDigits=e,n.maximumFractionDigits=e):n=typeof e=="function"?e(t,i):e,n}class Zl{constructor(t){const{defined:i,defaultValue:n,createGuid:r,BoundingSphere:a,Ellipsoid:o,ClassificationType:s,ArcType:l}=Cesium;t=n(t,{}),this.show=n(t.show,!0),this._id=i(t.id)?t.id:r(),this._ellipsoid=n(t.ellipsoid,o.WGS84),this._appearance=n(t.appearance,new Cesium.MaterialAppearance),this._depthFailAppearance=t.depthFailAppearance,this._positions=n(t.positions,[]),this._polygonHierarchy=t.polygonHierarchy,this._clampToGround=n(t.clampToGround,!1),this._classificationType=n(t.classificationType,s.BOTH),this._arcType=n(t.arcType,l.RHUMB),this._allowPicking=n(t.allowPicking,!0),this._asynchronous=n(t.asynchronous,!1),this._boundingSphere=new a,this._primitive=void 0,this._update=!0}get positions(){return this._positions}set positions(t){this._positions=t,this._update=!0}get polygonHierarchy(){return this._polygonHierarchy}set polygonHierarchy(t){this._polygonHierarchy=t,this._update=!0}get appearance(){return this._appearance}set appearance(t){this._appearance=t,this._primitive!==void 0&&(this._primitive.appearance=t)}get depthFailAppearance(){return this._depthFailAppearance}set depthFailAppearance(t){this._depthFailAppearance=t,this._primitive!==void 0&&this._primitive instanceof Cesium.Primitive&&(this._primitive.depthFailAppearance=t)}get id(){return this._id}set id(t){this._id=t}get boundingVolume(){return this._boundingSphere}get ellipsoid(){return this._ellipsoid}get clampToGround(){return this._clampToGround}set clampToGround(t){this._clampToGround=t}get classificationType(){return this._classificationType}set classificationType(t){this._classificationType=t,this._update=!0}get allowPicking(){return this._allowPicking}set allowPicking(t){this._allowPicking=t}get asynchronous(){return this._asynchronous}set asynchronous(t){this._asynchronous=t}async update(t){if(this.show){const i=this._polygonHierarchy?this._polygonHierarchy.positions:this._positions;if(i.length<3)this._primitive&&this._primitive.destroy(),this._primitive=void 0;else{if(this._update){this._update=!1;let n;this._clampToGround?n=this._createGroundPolygon():n=this._createPolygon(),n.then(r=>{this._primitive&&this._primitive.destroy(),this._primitive=void 0,this._primitive=r,this._primitive._vcParent=this,this._boundingSphere=Cesium.BoundingSphere.fromPoints(i,this._boundingSphere)})}this._primitive&&this._primitive.update(t)}}}async _createPolygon(){const{Primitive:t,GeometryInstance:i,CoplanarPolygonGeometry:n,Cartesian3:r}=Cesium;return new t({geometryInstances:new i({geometry:this._polygonHierarchy?new n({polygonHierarchy:this._polygonHierarchy,ellipsoid:this._ellipsoid}):n.fromPositions({positions:this._positions.map(function(a){return r.clone(a)}),ellipsoid:this._ellipsoid}),id:this._id}),appearance:this._appearance,depthFailAppearance:this._depthFailAppearance,allowPicking:this._allowPicking,asynchronous:this._asynchronous})}async _createGroundPolygon(){const{GroundPrimitive:t,GeometryInstance:i,PolygonGeometry:n,Cartesian3:r}=Cesium;return await Cesium.GroundPrimitive.initializeTerrainHeights(),new t({geometryInstances:new i({geometry:this._polygonHierarchy?new n({polygonHierarchy:this._polygonHierarchy,ellipsoid:this._ellipsoid,arcType:this._arcType}):n.fromPositions({positions:this._positions.map(function(a){return r.clone(a)}),ellipsoid:this._ellipsoid,arcType:this._arcType}),id:this._id}),appearance:this._appearance,allowPicking:this._allowPicking,asynchronous:this._asynchronous,classificationType:this._classificationType})}isDestroyed(){return!1}destroy(){return this._primitive&&this._primitive.destroy(),this._primitive=void 0,Cesium.destroyObject(this)}}class Ql{constructor(t){const{SampledPositionProperty:i,Entity:n,ExtrapolationType:r,VelocityOrientationProperty:a,CallbackProperty:o}=Cesium;this._lastTime=void 0,this._sampledPosition=new i,this._sampledPosition.forwardExtrapolationType=t.forwardExtrapolationType||r.HOLD,this._sampledPosition.backwardExtrapolationType=t.backwardExtrapolationType||r.HOLD,this._cache=[],this._maxCacheSize=t.maxCacheSize||10;const s=new n(t);if(s.position=this._sampledPosition,!Cesium.defined(t.orientation)){const l=new a(this._sampledPosition);let c;s.orientation=new o((u,d)=>{const m=l.getValue(u);if(m)c=m;else return c;return m},!1)}this._entity=s,this._velocityVectorProperty=new Cesium.VelocityVectorProperty(this._sampledPosition,!1)}get id(){return this._entity.id}set id(t){this._entity.id=t}set maxCacheSize(t){this._maxCacheSize=t}get maxCacheSize(){return this._maxCacheSize}get position(){return this._sampledPosition.getValue(Cesium.JulianDate.now())}_removePosition(){if(this._cache.length>this._maxCacheSize){const t=Cesium.JulianDate.addSeconds(this._cache[0],-.2,new Cesium.JulianDate),i=Cesium.JulianDate.addSeconds(this._cache[this._cache.length-this._maxCacheSize],-.2,new Cesium.JulianDate);this._sampledPosition.removeSamples(new Cesium.TimeInterval({start:t,stop:i})),this._cache.splice(0,this._cache.length-this._maxCacheSize)}}addPosition(t,i){this._removePosition();let n;if(typeof i=="number"){const r=Cesium.JulianDate.now();n=Cesium.JulianDate.addSeconds(r,i,new Cesium.JulianDate),Cesium.destroyObject(r)}else n=ln(i);return this._sampledPosition.addSample(n,Qe(t)),this._lastTime=n,this._cache.push(this._lastTime),n}}const eM={position:0,normal:1};class dm{constructor(t){const{defaultValue:i,Matrix4:n,Math:r,Color:a,BoundingSphere:o}=Cesium;this.modelMatrix=i(t.modelMatrix,new n),this.fovH=i(t.fovH,r.toRadians(60)),this.fovV=i(t.fovV,r.toRadians(30)),this.segmentH=i(t.segmentH,16),this.segmentV=i(t.segmentV,8),this.subSegmentH=i(t.subSegmentH,3),this.subSegmentV=i(t.subSegmentV,3),this._faceColor=i(t.faceColor,new a(1,1,1,.1)),this._lineColor=i(t.lineColor,new a(1,1,1,.4)),this.show=i(t.show,!0),this._modelMatrix=n.clone(n.IDENTITY),this._fovH=0,this._fovV=0,this._segmentH=1,this._segmentV=1,this._subSegmentH=1,this._subSegmentV=1,this._boundingSphere=new o,this._initBoundingSphere=void 0,this._command=void 0}get faceColor(){return this._faceColor}set faceColor(t){this._faceColor=t}get lineColor(){return this._lineColor}set lineColor(t){this._lineColor=t}update(t){if(this.show&&t.passes.render){const{clone:i,Matrix4:n,defined:r,BoundingSphere:a}=Cesium;this.fovH===this._fovH&&this.fovV===this._fovV&&this.segmentH===this._segmentH&&this.segmentV===this._segmentV&&this.subSegmentH===this._subSegmentH&&this.subSegmentV===this._subSegmentV||(this._fovH=this.fovH,this._fovV=this.fovV,this._segmentH=this.segmentH,this._segmentV=this.segmentV,this._subSegmentH=this.subSegmentH,this._subSegmentV=this.subSegmentV,this._modelMatrix=i(n.IDENTITY),this._destroyVideoMemory()),this.fovH!==this._fovH&&this.fovV!==this._fovV&&this.segmentH!==this._segmentH&&this.segmentV!==this._segmentV&&this.subSegmentH!==this._subSegmentH&&this.subSegmentV!==this._subSegmentV&&(this._fovH=this.fovH,this._fovV=this.fovV,this._segmentH=this.segmentH,this._segmentV=this.segmentV,this._subSegmentH=this.subSegmentH,this._subSegmentV=this.subSegmentV,this._modelMatrix=i(n.IDENTITY),this._destroyVideoMemory()),r(this._command)||this._createCommand(t.context),n.equals(this.modelMatrix,this._modelMatrix)||(n.clone(this.modelMatrix,this._modelMatrix),this._command.modelMatrix=n.IDENTITY,this._command.modelMatrix=this._modelMatrix,this._command.boundingVolume=a.transform(this._initBoundingSphere,this._modelMatrix,this._boundingSphere),this._lineCommand.modelMatrix=n.IDENTITY,this._lineCommand.modelMatrix=this._modelMatrix,this._lineCommand.boundingVolume=a.transform(this._initBoundingSphere,this._modelMatrix,this._boundingSphere)),this._command&&t.commandList.push(this._command),this._lineCommand&&t.commandList.push(this._lineCommand)}}isDestroyed(){return!1}destroy(){this._destroyVideoMemory(),Cesium.destroyObject(this)}_createCommand(t){const{Appearance:i,RenderState:n,ShaderSource:r,ShaderProgram:a,BufferUsage:o,IndexDatatype:s,VertexArray:l,ComponentDatatype:c,BoundingSphere:u,DrawCommand:d,PrimitiveType:m,Pass:f,Matrix4:v}=Cesium,C=this,b=this._subSegmentH*this._segmentH,_=this._subSegmentV*this._segmentV,M=hm(this._fovH,this._fovV,b,_),g=hm(this._fovH,this._fovV,b,_),E=tM(b,_),T=iM(this._segmentH,this._segmentV,this._subSegmentH,this._subSegmentV),A=i.getDefaultRenderState(!0,!1,void 0),R=n.fromCache(A),I=new r({sources:[`
// \u4F7F\u7528double\u7C7B\u578B\u7684position\u8FDB\u884C\u8BA1\u7B97
// attribute vec3 position3DHigh;
// attribute vec3 position3DLow;
attribute vec3 position;
attribute vec3 normal;
// attribute vec2 st;
// attribute float batchId;
varying vec3 v_positionEC;
varying vec3 v_normalEC;
// varying vec2 v_st;
void main()
{
// \u4F7F\u7528double\u7C7B\u578B\u7684position\u8FDB\u884C\u8BA1\u7B97
// vec4 p = czm_translateRelativeToEye(position3DHigh, position3DLow);
// v_positionEC = (czm_modelViewRelativeToEye * p).xyz;
// position in eye coordinates
// v_normalEC = czm_normal * normal;
// normal in eye coordinates
// v_st = st;
// gl_Position = czm_modelViewProjectionRelativeToEye * p;
v_positionEC = (czm_modelView * vec4(position, 1.0)).xyz;
// position in eye coordinates
v_normalEC = czm_normal * normal;
// normal in eye coordinates
// v_st = st;
gl_Position = czm_modelViewProjection * vec4(position, 1.0);
}
`]}),j=new r({sources:[`
varying vec3 v_positionEC;
varying vec3 v_normalEC;
// varying vec2 v_st;
// uniform sampler2D myImage;
uniform vec4 vcColor;
void main()
{
vec3 positionToEyeEC = -v_positionEC;
vec3 normalEC = normalize(v_normalEC);
#ifdef FACE_FORWARD
normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);
#endif
czm_materialInput materialInput;
materialInput.normalEC = normalEC;
materialInput.positionToEyeEC = positionToEyeEC;
// materialInput.st = v_st;
//czm_material material = czm_getMaterial(materialInput);
czm_material material = czm_getDefaultMaterial(materialInput);
// material.diffuse = texture2D(myImage, materialInput.st).rgb;
material.diffuse = vcColor.rgb;
material.alpha = vcColor.a;
#ifdef FLAT
gl_FragColor = vec4(material.diffuse + material.emission, material.alpha);
#else
gl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
#endif
}
`]}),W={vcColor:function(){return C._faceColor}},$={vcColor:function(){return C._lineColor}},k=a.fromCache({context:t,vertexShaderSource:I,fragmentShaderSource:j,attributeLocations:eM});this._shaderprogram=k;const h=Cesium.Buffer.createVertexBuffer({context:t,typedArray:M,usage:o.STATIC_DRAW}),p=Cesium.Buffer.createVertexBuffer({context:t,typedArray:g,usage:o.STATIC_DRAW}),y=Cesium.Buffer.createIndexBuffer({context:t,typedArray:E,usage:o.STATIC_DRAW,indexDatatype:s.UNSIGNED_SHORT}),O=Cesium.Buffer.createIndexBuffer({context:t,typedArray:T,usage:o.STATIC_DRAW,indexDatatype:s.UNSIGNED_SHORT}),x=new l({context:t,attributes:[{index:0,vertexBuffer:h,componentsPerAttribute:3,componentDatatype:c.FLOAT},{index:1,vertexBuffer:p,componentsPerAttribute:3,componentDatatype:c.FLOAT}],indexBuffer:y}),w=new l({context:t,attributes:[{index:0,vertexBuffer:h,componentsPerAttribute:3,componentDatatype:c.FLOAT},{index:1,vertexBuffer:p,componentsPerAttribute:3,componentDatatype:c.FLOAT}],indexBuffer:O});this._initBoundingSphere=u.fromVertices(M),this._command=new d({vertexArray:x,primitiveType:m.TRIANGLES,renderState:R,shaderProgram:k,uniformMap:W,owner:this,pass:f.TRANSLUCENT,modelMatrix:new v,boundingVolume:new u,cull:!0}),this._lineCommand=new d({vertexArray:w,primitiveType:m.LINES,renderState:R,shaderProgram:k,uniformMap:$,owner:this,pass:f.TRANSLUCENT,modelMatrix:new v,boundingVolume:new u,cull:!0})}_destroyVideoMemory(){const{defined:t}=Cesium;this._shaderprogram=this._shaderprogram&&this._shaderprogram.destroy(),t(this._command)&&(this._command.vertexArray.destroy(),this._command=void 0),t(this._lineCommand)&&(this._lineCommand.vertexArray.destroy(),this._lineCommand=void 0)}}function hm(e,t,i,n){const r=new Float32Array((i+1)*(n+1)*3+3);for(let a=0;a<i+1;a++)for(let o=0;o<n+1;o++){const s=e*(a/i-.5),l=t*(o/n-.5),c=[Math.cos(-s)*Math.cos(-l),Math.sin(-s)*Math.cos(-l),Math.sin(l)];r[3*(o*(i+1)+a)+0]=c[0],r[3*(o*(i+1)+a)+1]=c[1],r[3*(o*(i+1)+a)+2]=c[2]}return r[(i+1)*(n+1)*3+0]=0,r[(i+1)*(n+1)*3+1]=0,r[(i+1)*(n+1)*3+2]=0,r}function tM(e,t){const i=e*t*6,n=new Uint16Array(i);for(let r=0;r<e;r++)for(let a=0;a<t;a++){const o=a*(1+e)+r,s=a*(1+e)+r+1,l=(a+1)*(1+e)+r,c=(a+1)*(1+e)+r+1,u=6*(a*e+r);n[0+u]=o,n[1+u]=s,n[2+u]=c,n[3+u]=o,n[4+u]=c,n[5+u]=l}return n}function iM(e,t,i,n){const r=e*i,a=t*n,o=new Uint16Array((e+1)*(2*a)+(t+1)*(2*r)+8);for(let c=0;c<e+1;c++)for(let u=0;u<a;u++){const d=c*i;o[2*(c*a+u)+0]=u*(1+r)+d,o[2*(c*a+u)+1]=(u+1)*(1+r)+d}const s=(e+1)*(2*a);for(let c=0;c<t;c++)for(let u=0;u<r;u++){const d=c*n;o[s+2*(u+c*r)]=d*(1+r)+u,o[s+2*(u+c*r)+1]=d*(1+r)+u+1}const l=(e+1)*(2*a)+(t+1)*(2*r);return o[l]=0,o[l+1]=(1+r)*(1+a),o[l+2]=r,o[l+3]=(1+r)*(1+a),o[l+4]=(1+r)*a,o[l+5]=(1+r)*(1+a),o[l+6]=(1+r)*(1+a)-1,o[l+7]=(1+r)*(1+a),o}let xa=!1;class mm{static extend(t){if(xa)return;const{Rectangle:i}=Cesium;i.prototype.expand=function(n,r,a){return a=a&&a instanceof i?a:this.clone(),n=a.width*(1-n)/2,r=a.height*(1-r)/2,a.west+=n,a.south+=r,a.east-=n,a.north-=r,a.west=a.west<-Math.PI?-Math.PI:a.west,a.east=a.east>Math.PI?Math.PI:a.east,a.north=a.north>Math.PI/2?Math.PI/2:a.north,a.south=a.south<-Math.PI/2?-Math.PI/2:a.south,a},xa=!0}static revoke(t){if(!xa)return;const{Rectangle:i}=Cesium;i.prototype.expand=void 0,xa=!1}}let Ea=!1,Xl;class fm{static extend(t){if(Ea)return;const i=Cesium.ShadowMapShader;Xl=i.createShadowReceiveFragmentShader,i.createShadowReceiveFragmentShader=function(n,r,a,o,s){return n=Xl.bind(this)(n,r,a,o,s),r._isSpotLight&&(n.sources[0]=`
uniform vec4 shadowMap_viewshedVisibleColor;
uniform vec4 shadowMap_viewshedInvisibleColor;
${n.sources[0]}
`,n.sources[n.sources.length-1]=n.sources[n.sources.length-1].replace("gl_FragColor.rgb *= visibility;",`
float _depth = shadowPosition.z - shadowParameters.depthBias;
float _visibility = czm_shadowDepthCompare(shadowMap_texture, shadowPosition.xy, _depth);
gl_FragColor.rgb *= (_visibility < 0.999 ? shadowMap_viewshedInvisibleColor.rgb :shadowMap_viewshedVisibleColor.rgb);
`),n.sources[n.sources.length-1]=n.sources[n.sources.length-1].replace("vec3 directionEC = normalize(positionEC.xyz - shadowMap_lightPositionEC.xyz);","vec3 directionEC = normalize(positionEC.xyz - shadowMap_lightPositionEC.xyz);if (distance(positionEC.xyz, shadowMap_lightPositionEC.xyz) > shadowMap_lightPositionEC.w) { return; }")),n},Ea=!0}static revoke(t){if(!Ea)return;const i=Cesium.ShadowMapShader;i.createShadowReceiveFragmentShader=Xl,Ea=!1}}class pm{constructor(t,i){const{defined:n,DeveloperError:r,PerspectiveFrustum:a,Math:o,Camera:s,ShadowMap:l,ShadowMode:c,Event:u,Cartesian3:d,defaultValue:m,Color:f}=Cesium;if(!n(t))throw new r("scene is required.");this._scene=t,this._frustum=new a,this._frustum.fov=o.PI/3,this._frustum.aspectRatio=3,this._frustum.near=1,this._frustum.far=400,this._spotLightCamera=new s(this._scene),this._frustum.clone(this._spotLightCamera.frustum),this._viewshedShadowMap=new l({context:this._scene.context,lightCamera:this._spotLightCamera,cascadesEnabled:!1}),i=i||{},this._scene.globe.shadows=c.ENABLED,this._viewshedShadowMap._terrainBias.depthBias=0,this._debugCameraPrimitive=new dm({}),this._enabledChangedEvent=new u,this._position=new d,this._offsetHeight=m(i.offsetHeight,1.8),this._visibleColor=m(i.visibleColor,new f(0,1,0,1)),this._invisibleColor=m(i.invisibleColor,new f(1,0,0,1)),this._viewshedShadowMap._viewshedColors={visible:this._visibleColor,invisible:this._invisibleColor},this._showGridLine=i.showGridLine,this._debugCameraPrimitive.show=this._showGridLine,this._debugCameraPrimitive.lineColor=m(i.lineColor,new f(1,1,1,.4)),this._debugCameraPrimitive.faceColor=m(i.faceColor,new f(1,1,1,.1))}get frustum(){return this._frustum}get fovH(){return this._fovH}set fovH(t){if(isNaN(t)||t===void 0||t==null||t<0||t>=Math.PI)throw new Error("fovH must be in the range [0, PI).");this._fovH=Number(t),this.frustum.aspectRatio=Math.tan(.5*this._fovH)/Math.tan(.5*this._fovV),this.frustum.fov=this._fovH>this._fovV?this._fovH:this._fovV}get fovV(){return this._fovV}set fovV(t){if(isNaN(t)||t===void 0||t==null||t<0||t>=Math.PI)throw new Error("fovV must be in the range [0, PI).");this._fovV=Number(t),this.frustum.aspectRatio=Math.tan(.5*this._fovH)/Math.tan(.5*this._fovV),this.frustum.fov=this._fovH>this._fovV?this._fovH:this._fovV}get near(){return this.frustum.near}set near(t){this.frustum.near!==t&&(this.frustum.near=t)}get far(){return this.far.near}set far(t){this.frustum.far!==t&&(this.frustum.far=t)}get position(){return this._position}set position(t){t instanceof Cesium.Cartesian3&&this.setView({destination:t.clone(),orientation:{heading:this._spotLightCamera.heading,pitch:this._spotLightCamera.pitch,roll:this._spotLightCamera.roll}})}get offsetHeight(){return this._offsetHeight}set offsetHeight(t){if(isNaN(t)||t==null||t==null)throw new Error("Unacceptable offset.");this._offsetHeight=Number(t),this.setView({destination:this._position,orientation:{heading:this._spotLightCamera.heading,pitch:this._spotLightCamera.pitch,roll:this._spotLightCamera.roll}})}get heading(){return this._spotLightCamera.heading}set heading(t){this._spotLightCamera.heading!==t&&this._spotLightCamera.setView({destination:this._spotLightCamera.positionWC,orientation:{heading:t,pitch:this._spotLightCamera.pitch,roll:this._spotLightCamera.roll}})}get pitch(){return this._spotLightCamera.pitch}set pitch(t){this._spotLightCamera.pitch!==t&&this._spotLightCamera.setView({destination:this._spotLightCamera.positionWC,orientation:{heading:this._spotLightCamera.heading,pitch:t,roll:this._spotLightCamera.roll}})}get roll(){return this._spotLightCamera.roll}set roll(t){this._spotLightCamera.roll!==t&&this._spotLightCamera.setView({destination:this._spotLightCamera.positionWC,orientation:{heading:this._spotLightCamera.heading,pitch:this._spotLightCamera.pitch,roll:t}})}get shadowMap(){return this._viewshedShadowMap}get lightCamera(){return this._spotLightCamera}get enabled(){return this._viewshedShadowMap.enabled}set enabled(t){this._viewshedShadowMap.enabled!==t&&(t?(this._viewshedShadowMap.enabled=!0,this._viewshedShadowMap._pointLightRadius=this._spotLightCamera.frustum.far):this._viewshedShadowMap.enabled=!1,this._enabledChangedEvent.raiseEvent(t))}get enabledChangedEvent(){return this._enabledChangedEvent}get visibleColor(){return this._visibleColor}set visibleColor(t){this._visibleColor=t,this._viewshedShadowMap._viewshedColors.visible=t}get invisibleColor(){return this._invisibleColor}set invisibleColor(t){this._invisibleColor=t,this._viewshedShadowMap._viewshedColors.invisible=t}get showGridLine(){return this._showGridLine}set showGridLine(t){this._showGridLine=t,this._debugCameraPrimitive.show=t}get faceColor(){return this._debugCameraPrimitive.faceColor}set faceColor(t){this._debugCameraPrimitive.faceColor=t}get lineColor(){return this._debugCameraPrimitive.lineColor}set lineColor(t){this._debugCameraPrimitive.lineColor=t}update(t){if(this._viewshedShadowMap.enabled){const{ShadowMode:i,Matrix3:n,Matrix4:r,Math:a}=Cesium;if(this._scene.globe.shadows!==i.ENABLED&&(this._scene.globe.shadows=i.ENABLED),t.shadowMaps.unshift(this._viewshedShadowMap),this._frustum.equals(this._spotLightCamera.frustum)||(this._frustum.clone(this._spotLightCamera.frustum),this._viewshedShadowMap._pointLightRadius=this._frustum.far,this.shadowMap._boundingSphere.radius=Math.random()),this._debugCameraPrimitive.show){const o=this._debugCameraPrimitive.modelMatrix;r.clone(this._spotLightCamera.inverseViewMatrix,o);const s=n.fromRotationZ(.5*a.PI),l=n.fromRotationY(.5*a.PI),c=new n;n.multiply(s,l,c),r.multiplyByMatrix3(o,c,o),r.multiplyByUniformScale(o,this._spotLightCamera.frustum.far,o);const u=this._spotLightCamera.frustum;this._debugCameraPrimitive.fovV=u.aspectRatio<=1?u.fov:2*Math.atan(Math.tan(.5*u.fov)/u.aspectRatio),this._debugCameraPrimitive.fovH=1<u.aspectRatio?u.fov:2*Math.atan(Math.tan(.5*u.fov)*u.aspectRatio),this._debugCameraPrimitive.segmentH=parseInt(String(this._debugCameraPrimitive.fovH/(Math.PI/30)))||1,this._debugCameraPrimitive.segmentV=parseInt(String(this._debugCameraPrimitive.fovV/(Math.PI/30)))||1,this._debugCameraPrimitive.update(t)}}}setView(t){t=t||{};const i=t.destination;if(i instanceof Cesium.Cartesian3){this._position=i.clone();const n=this._offsetHeight,r=Cesium.Cartographic.fromCartesian(i,this._scene.globe.ellipsoid);if(r){r.height=r.height+n;const a=Cesium.Cartesian3.fromRadians(r.longitude,r.latitude,r.height,this._scene.globe.ellipsoid);t.destination=a}}this._spotLightCamera.setView(t)}isDestroyed(){return!1}destroy(){this._debugCameraPrimitive&&this._debugCameraPrimitive.destroy(),this._viewshedShadowMap&&this._viewshedShadowMap.destroy(),Cesium.destroyObject(this)}}const vm=[mm,fm];function nM(){return{invokeExtensions:i=>{vm.forEach(n=>{n.extend(i)})},revokeExtensions:i=>{vm.forEach(n=>{n.revoke(i)})}}}const gm=XP;function rM(e,t,i){let n,r;const a=new Promise((x,w)=>{n=x,r=w}),o=ie(null),s=ie(!1),l=dh(),{emit:c}=t,u=$o(),d=Uo(i);i.mounted=!1,i.vcMitt=l,i.cesiumClass="Viewer",i.children=[];const m=Fl(e,i,d),f=Pe({toolbarContainerRC:void 0,timelineContainerRC:void 0,animationContainerRC:void 0,bottomContainerRC:void 0});let v=[];d.debug("viewer creating");const{t:C}=Ct(),{invokeExtensions:b,revokeExtensions:_}=nM();fe(()=>e.selectionIndicator,x=>{const{viewer:w,viewerElement:D}=i,{defined:S,SelectionIndicator:B}=Cesium;let F;if(S(w.selectionIndicator)&&!w.selectionIndicator.isDestroyed()&&!x)F=w.selectionIndicator.container,D==null||D.removeChild(F),w.selectionIndicator.destroy(),w._selectionIndicator=void 0;else if(!S(w.selectionIndicator)||w.selectionIndicator.isDestroyed()){F=document.createElement("div"),F.className="cesium-viewer-selectionIndicatorContainer",D==null||D.appendChild(F);const G=new B(F,w.scene);w._selectionIndicator=G}w.viewerWidgetResized.raiseEvent({type:"selectionIndicator",status:x?"added":"removed",target:F})}),fe(()=>e.infoBox,x=>{var w,D;const{viewer:S,viewerElement:B}=i,{defined:F,InfoBox:G}=Cesium,q=["cameraClicked","closeClicked"];let U;if(F(S.infoBox)&&!S.infoBox.isDestroyed()&&!x){const K=S.infoBox.viewModel;K&&m.bindEvents(K,q,!1),U=S.infoBox.container,B==null||B.removeChild(U),S.infoBox.destroy(),S._infoBox=void 0}else if(!F(S.infoBox)||S.infoBox.isDestroyed()){U=document.createElement("div"),U.className="cesium-viewer-infoBoxContainer",B==null||B.appendChild(U);const K=new G(U),N=K.viewModel;S._onInfoBoxCameraClicked&&((w=S._eventHelper)==null||w.add(N.cameraClicked,S._onInfoBoxCameraClicked,S)),S._onInfoBoxClockClicked&&((D=S._eventHelper)==null||D.add(N.closeClicked,S._onInfoBoxClockClicked,S)),N&&m.bindEvents(N,q,!0),S._infoBox=K}S.forceResize(),S.viewerWidgetResized.raiseEvent({type:"infoBox",status:x?"added":"removed",target:U})}),fe(()=>e.geocoder,x=>{var w;const{viewer:D}=i,S=D._toolbar,{defined:B,Geocoder:F}=Cesium;let G;if(B(D.geocoder)&&!D.geocoder.isDestroyed()&&!x)G=D.geocoder.container,S==null||S.removeChild(G),D.geocoder.destroy(),D._geocoder=void 0;else if(!B(D.geocoder)||D.geocoder.isDestroyed()){G=document.createElement("div"),G.className="cesium-viewer-geocoderContainer",S==null||S.appendChild(G);const q=new F({container:G,geocoderServices:B(e.geocoder)&&typeof e.geocoder!="boolean"?Array.isArray(e.geocoder)?e.geocoder:[e.geocoder]:void 0,scene:D.scene});D._clearObjects&&((w=D._eventHelper)==null||w.add(q.viewModel.search.beforeExecute,D._clearObjects,D)),D._geocoder=q,y(S,G)}D.viewerWidgetResized.raiseEvent({type:"geocoder",status:x?"added":"removed",target:G})}),fe(()=>e.homeButton,x=>{var w,D;const{viewer:S}=i,B=S._toolbar,{defined:F,HomeButton:G}=Cesium;if(F(S.homeButton)&&!S.homeButton.isDestroyed()&&!x)S.homeButton.destroy(),S._homeButton=void 0;else if(!F(S.homeButton)||S.homeButton.isDestroyed()){const q=new G(B,S.scene);F(S.geocoder)&&((w=S._eventHelper)==null||w.add(q.viewModel.command.afterExecute,function(){const U=S.geocoder.viewModel;U.searchText="",U.isSearchInProgress&&U.search()})),S._clearTrackedObject&&((D=S._eventHelper)==null||D.add(q.viewModel.command.beforeExecute,S._clearTrackedObject,S)),S._homeButton=q,y(B,q)}S.viewerWidgetResized.raiseEvent({type:"homeButton",status:x?"added":"removed",target:B})}),fe(()=>e.sceneModePicker,x=>{const{viewer:w}=i,D=w._toolbar,{defined:S,DeveloperError:B,SceneModePicker:F}=Cesium;if(S(w.sceneModePicker)&&!w.sceneModePicker.isDestroyed()&&!x)w.sceneModePicker.destroy(),w._sceneModePicker=void 0;else if(!S(w.sceneModePicker)||w.sceneModePicker.isDestroyed()){if(e.sceneModePicker&&e.scene3DOnly)throw new B("options.sceneModePicker is not available when options.scene3DOnly is set to true.");if(!e.scene3DOnly&&e.sceneModePicker){const G=new F(D,w.scene);w._sceneModePicker=G,y(D,G)}}w.viewerWidgetResized.raiseEvent({type:"sceneModePicker",status:x?"added":"removed",target:D})}),fe(()=>e.projectionPicker,x=>{const{viewer:w}=i,D=w._toolbar,{defined:S,ProjectionPicker:B}=Cesium;if(S(w.projectionPicker)&&!w.projectionPicker.isDestroyed()&&!x)w.projectionPicker.destroy(),w._projectionPicker=void 0;else if(!S(w.projectionPicker)||w.projectionPicker.isDestroyed()){const F=new B(D,w.scene);w._projectionPicker=F,y(D,F)}w.viewerWidgetResized.raiseEvent({type:"projectionPicker",status:x?"added":"removed",target:D})}),fe(()=>e.baseLayerPicker,x=>{const{viewer:w}=i,D=w._toolbar,{defined:S,buildModuleUrl:B,DeveloperError:F,defaultValue:G,createDefaultImageryProviderViewModels:q,createDefaultTerrainProviderViewModels:U,BaseLayerPicker:K}=Cesium;if(S(w.baseLayerPicker)&&!w.baseLayerPicker.isDestroyed()&&!x){w.baseLayerPicker.destroy(),w._baseLayerPicker=void 0,w.imageryLayers.remove(w.imageryLayers.get(w.imageryLayers.length-1));const N=B("Assets/Textures/NaturalEarthII"),L=w.imageryLayers.addImageryProvider(new Cesium.TileMapServiceImageryProvider({url:N}));w.imageryLayers.lowerToBottom(L)}else if(!S(w.baseLayerPicker)||w.baseLayerPicker.isDestroyed()){const N=(!Cesium.defined(w.scene.globe)||e.globe!==!1)&&(!Cesium.defined(w.baseLayerPicker)||e.baseLayerPicker!==!1);if(N&&S(e.imageryProvider))throw new F(`options.imageryProvider is not available when using the BaseLayerPicker widget.
Either specify options.selectedImageryProviderViewModel instead or set options.baseLayerPicker to false.`);if(!N&&S(e.selectedImageryProviderViewModel))throw new F(`options.selectedImageryProviderViewModel is not available when not using the BaseLayerPicker widget.
Either specify options.imageryProvider instead or set options.baseLayerPicker to true.`);if(N&&S(e.terrainProvider))throw new F(`options.terrainProvider is not available when using the BaseLayerPicker widget.
Either specify options.selectedTerrainProviderViewModel instead or set options.baseLayerPicker to false.`);if(!N&&S(e.selectedTerrainProviderViewModel))throw new F(`options.selectedTerrainProviderViewModel is not available when not using the BaseLayerPicker widget.
Either specify options.terrainProvider instead or set options.baseLayerPicker to true.`);if(N){const L=G(e.imageryProviderViewModels,q()),H=G(e.terrainProviderViewModels,U()),z=new K(D,{globe:w.scene.globe,imageryProviderViewModels:L,selectedImageryProviderViewModel:L[0],terrainProviderViewModels:H,selectedTerrainProviderViewModel:H[0]}),Q=D==null?void 0:D.getElementsByClassName("cesium-baseLayerPicker-dropDown"),Z=Q==null?void 0:Q[0];w._baseLayerPickerDropDown=Z,w._baseLayerPicker=z,w.imageryLayers.raiseToTop(w.imageryLayers.get(0)),y(D,z)}}w.viewerWidgetResized.raiseEvent({type:"baseLayerPicker",status:x?"added":"removed",target:D})}),fe(()=>e.navigationHelpButton,x=>{const{viewer:w}=i,D=w._toolbar,{defined:S,defaultValue:B,NavigationHelpButton:F}=Cesium;if(S(w.navigationHelpButton)&&!w.navigationHelpButton.isDestroyed()&&!x)w.navigationHelpButton.destroy(),w._navigationHelpButton=void 0;else if(!S(w.navigationHelpButton)||w.navigationHelpButton.isDestroyed()){let G=!0;try{if(S(window.localStorage)){const U=window.localStorage.getItem("cesium-hasSeenNavHelp");S(U)&&Boolean(U)?G=!1:window.localStorage.setItem("cesium-hasSeenNavHelp","true")}}catch(U){}const q=new F({container:D,instructionsInitiallyVisible:B(e.navigationInstructionsInitiallyVisible,G)});w._navigationHelpButton=q,y(D,q)}w.viewerWidgetResized.raiseEvent({type:"navigationHelpButton",status:x?"added":"removed",target:D})}),fe(()=>e.animation,x=>{const{viewer:w,viewerElement:D}=i,{defined:S,Animation:B,AnimationViewModel:F}=Cesium;let G;if(S(w.animation)&&!w.animation.isDestroyed()&&!x)G=w.animation.container,D==null||D.removeChild(G),w.animation.destroy(),w._animation=void 0;else if(!S(w.animation)||w.animation.isDestroyed()){G=document.createElement("div"),G.className="cesium-viewer-animationContainer",D==null||D.appendChild(G);const q=new B(G,new F(w.clockViewModel));q.viewModel.dateFormatter=$,q.viewModel.timeFormatter=k,w._animation=q}w.forceResize(),w.viewerWidgetResized.raiseEvent({type:"animation",status:x?"added":"removed",target:G})}),fe(()=>e.timeline,x=>{var w;const{viewer:D,viewerElement:S}=i,{defined:B,Timeline:F}=Cesium;let G;if(B(D.timeline)&&!D.timeline.isDestroyed()&&!x)G=D.timeline.container,S==null||S.removeChild(G),D.timeline.destroy(),D._timeline=void 0;else if(!B(D.timeline)||D.timeline.isDestroyed()){G=document.createElement("div"),G.className="cesium-viewer-timelineContainer",S==null||S.appendChild(G);const q=new F(G,D.clock);q.makeLabel=U=>$(U),(w=q.addEventListener)==null||w.call(q,"settime",h,!1),q.zoomTo(D.clock.startTime,D.clock.stopTime),D._timeline=q}D.forceResize(),D.viewerWidgetResized.raiseEvent({type:"timeline",status:x?"added":"removed",target:G})}),fe(()=>e.fullscreenButton,x=>{const{viewer:w,viewerElement:D}=i,{defined:S,FullscreenButton:B}=Cesium;let F;if(S(w.fullscreenButton)&&!w.fullscreenButton.isDestroyed()&&!x)F=w.fullscreenButton.container,D==null||D.removeChild(F),w.fullscreenButton.destroy(),w._fullscreenButton=void 0;else if(!S(w.fullscreenButton)||w.fullscreenButton.isDestroyed()){F=document.createElement("div"),F.className="cesium-viewer-fullscreenContainer",D==null||D.appendChild(F);const G=new B(F,D);w._fullscreenButton=G}w.forceResize(),w.viewerWidgetResized.raiseEvent({type:"fullscreenButton",status:x?"added":"removed",target:F})}),fe(()=>e.fullscreenElement,x=>{const{viewer:w}=i,{defined:D}=Cesium;!D(w.fullscreenButton)||D(x)&&(w.fullscreenButton.viewModel.fullscreenElement=x)}),fe(()=>e.vrButton,x=>{const{viewer:w,viewerElement:D}=i,{defined:S,VRButton:B}=Cesium;let F;if(S(w.vrButton)&&!w.vrButton.isDestroyed()&&!x)F=w.vrButton.container,D==null||D.removeChild(F),w.vrButton.destroy(),w._vrButton=void 0;else if(!S(w.vrButton)||w.vrButton.isDestroyed()){F=document.createElement("div"),F.className="cesium-viewer-vrContainer",D==null||D.appendChild(F);const G=new B(F,w.scene,D),q=G.viewModel.command;G.viewModel._command=function(U){q(),p(w,U.isVRMode)},w._vrButton=G}w.forceResize(),w.viewerWidgetResized.raiseEvent({type:"fullscreenButton",status:x?"added":"removed",target:F})}),fe(()=>e.useDefaultRenderLoop,x=>{i.viewer.useDefaultRenderLoop=x}),fe(()=>e.sceneMode,x=>{const{SceneMode:w}=Cesium;(w.COLUMBUS_VIEW===x||w.MORPHING===x||w.SCENE2D===x||w.SCENE3D===x)&&(i.viewer.scene.mode=x)}),fe(()=>e.shouldAnimate,x=>{i.viewer.clock.shouldAnimate=x}),fe(()=>e.terrainExaggeration,x=>{i.viewer._terrainExaggeration=x}),fe(()=>e.shadows,x=>{i.viewer.scene.shadowMap.enabled=x}),fe(()=>e.terrainProvider,x=>{x&&(i.viewer.terrainProvider=x)}),fe(()=>e.camera,x=>{Gs(i.viewer,x)},{deep:!0}),fe(()=>e.imageryProvider,(x,w)=>{const{viewer:D}=i,{defined:S}=Cesium;if(S(x)){for(let B=0;B<D.imageryLayers.length;B++)D.imageryLayers.get(B).imageryProvider===w&&D.imageryLayers.remove(D.imageryLayers[B]);x&&D.imageryLayers.addImageryProvider(x)}}),fe(()=>e.showCredit,x=>{const{viewer:w}=i;w.cesiumWidget.creditContainer.style.display=x?"inline":"none",w.viewerWidgetResized.raiseEvent({type:"credit",status:x?"added":"removed",target:w.cesiumWidget.creditContainer})}),fe(()=>e.debugShowFramesPerSecond,x=>{const{viewer:w}=i;w.scene.debugShowFramesPerSecond=x});const M=async function(){d.debug("beforeLoad - viewer"),Me(i,"beforeLoad")&&c("beforeLoad",i),u.value.__scriptPromise=u.value.__scriptPromise||A(),await u.value.__scriptPromise},g=async function(){var x,w,D;if(d.debug("loading-viewer"),i.mounted||(await M(),typeof Cesium=="undefined"))return!1;const{Ion:S,buildModuleUrl:B,TileMapServiceImageryProvider:F,Viewer:G,defined:q,Math:U,Event:K}=Cesium,N=e.accessToken?e.accessToken:u.value.accessToken;S.defaultAccessToken=N;const L=B("Assets/Textures/NaturalEarthII"),H={};e&&Object.keys(e).forEach(X=>{e[X]===void 0||e[X]===null||(H[X]=e[X])}),H.imageryProvider=Go(H.imageryProvider)?new F({url:L}):H.imageryProvider,H.fullscreenElement=Go(H.fullscreenElement)?oe(o):H.fullscreenElement;let z;e.viewerCreator?z=e.viewerCreator(i,oe(o),H):globalThis.mars3d?(i.map=new mars3d.Map(oe(o).id,{scene:H,control:H}),z=(x=i.map)==null?void 0:x._viewer):globalThis.DC?(i.dcViewer=new DC.Viewer(oe(o).id,H),z=(w=i.dcViewer)==null?void 0:w.delegate):globalThis.XE?(i.earth=new globalThis.XE.Earth(oe(o),H),z=(D=i.earth)==null?void 0:D.czm.viewer):z=new G(oe(o),H),b(z),i.Cesium=Cesium,i.viewer=z,i.viewerElement=z._element,i.mounted=!0,Cesium.VERSION>="1.83"&&(z.scene.globe.terrainExaggeration=H.terrainExaggeration),q(H.camera)&&Gs(z,H.camera),Me(i,"update:camera")&&z.camera.changed.addEventListener(()=>{const X=z.camera.positionCartographic;let ee;je(H.camera.position,"lng")?ee={position:{lng:U.toDegrees(X.longitude),lat:U.toDegrees(X.latitude),height:X.height},heading:U.toDegrees(z.camera.heading||360),pitch:U.toDegrees(z.camera.pitch||-90),roll:U.toDegrees(z.camera.roll||0)}:ee={position:{x:z.camera.position.x,y:z.camera.position.y,z:z.camera.position.z},heading:z.camera.heading||2*Math.PI,pitch:z.camera.pitch||-Math.PI/2,roll:z.camera.roll||0},c("update:camera",ee)}),q(z.animation)&&(z.animation.viewModel.dateFormatter=$,z.animation.viewModel.timeFormatter=k),q(z.timeline)&&(z.timeline.makeLabel=X=>$(X),z.timeline.zoomTo(z.clock.startTime,z.clock.stopTime)),!e.showCredit&&(z.cesiumWidget.creditContainer.style.display="none"),e.debugShowFramesPerSecond&&(z.scene.debugShowFramesPerSecond=!0),z.viewerWidgetResized=z.viewerWidgetResized||new K,z.viewerWidgetResized.addEventListener(j),z.imageryLayers.layerAdded.addEventListener(W),m.registerEvents(!0);const Z={Cesium,viewer:z,vm:i.proxy};return globalThis.XE?Object.assign(Z,{earth:i.earth}):globalThis.mars3d?Object.assign(Z,{map:i.map}):globalThis.DC&&Object.assign(Z,{dcViewer:i.dcViewer}),Me(i,"ready")&&c("ready",Z),l==null||l.emit("ready",Z),De(()=>{z.resize(),j({type:"viewer",status:"added",target:z.container}),s.value=!0}),d.debug("loaded-viewer"),Object.assign(i.proxy,{cesiumObject:z}),Z},E=async function(){if(!i.mounted)return!1;d.debug("viewer---unloading");let x;u.value.__viewerUnloadingPromise=new Promise((q,U)=>{x=q});for(let q=0;q<i.children.length;q++)await i.children[q].proxy.unload();i.children.length=0;const{viewer:w,earth:D,map:S,dcViewer:B}=i;globalThis.Cesium&&(w.imageryLayers.layerAdded.removeEventListener(W),m.registerEvents(!1));const{removeCesiumScript:F}=e;if(w._vcPickScreenSpaceEventHandler&&w._vcPickScreenSpaceEventHandler.destroy(),w._vcViewerScreenSpaceEventHandler&&w._vcViewerScreenSpaceEventHandler.destroy(),w._vcPickScreenSpaceEventHandler=void 0,w._vcViewerScreenSpaceEventHandler=void 0,F&&_(w),delete i.appContext.config.globalProperties.$VueCesium[w.container.id],globalThis.XE?D&&D.destroy():globalThis.mars3d?S&&S.destroy():globalThis.DC?B&&B.destroy():w&&w.destroy(),i.viewer=void 0,i.mounted=!1,F&&globalThis.Cesium){const q=document.getElementsByTagName("script"),U=[];for(const N of q)N.src.indexOf("/Cesium.js")>-1&&U.push(N),N.src.indexOf("/Workers/zlib.min.js")>-1&&U.push(N),globalThis.XE&&(N.src.indexOf("/rxjs.umd.min.js")>-1&&U.push(N),N.src.indexOf("/XbsjCesium.js")>-1&&U.push(N),N.src.indexOf("/viewerCesiumNavigationMixin.js")>-1&&U.push(N),N.src.indexOf("/XbsjEarth.js")>-1&&U.push(N)),v.includes(N.src)&&!U.includes(N)&&U.push(N);const K=document.getElementsByTagName("link");for(const N of K)N.href.includes("Widgets/widgets.css")&&!U.includes(N)&&U.push(N),v.includes(N.href)&&!U.includes(N)&&U.push(N);U.forEach(N=>{N.parentNode&&N.parentNode.removeChild(N)}),globalThis.Cesium&&(globalThis.Cesium=void 0),globalThis.XbsjCesium&&(globalThis.XbsjCesium=void 0),globalThis.XbsjEarth&&(globalThis.XbsjEarth=void 0),globalThis.XE&&(globalThis.XE=void 0),globalThis.mars3d&&(globalThis.mars3d=void 0),globalThis.DC&&(globalThis.DC=void 0),globalThis.DcCore&&(globalThis.DcCore=void 0),u.value.__scriptPromise=void 0,v=[]}return Me(i,"destroyed")&&c("destroyed",i),d.debug("viewer---unloaded"),x(!0),u.value.__viewerUnloadingPromise=void 0,s.value=!1,!0},T=function(){return E().then(()=>g())},A=async function(){if(d.debug("getCesiumScript"),globalThis.Cesium)return Promise.resolve(globalThis.Cesium);{const x=e.cesiumPath?e.cesiumPath:u.value.cesiumPath,w=xP(x),D=u.value.mars3dConfig||e.mars3dConfig;if(D){const F=D.libs||YP(),q=(D.include||"mars3d").trim().split(","),U={};for(let K=0,N=q.length;K<N;K++){const L=q[K];U[L]||(U[L]=!0,v.push(...F[L]))}}else x.includes("dc.base")?(v.push(x),v.push(x.replace("dc.base","dc.core")),v.push(x.replace("dc.base","dc.core").replace(".js",".css"))):x.includes("/XbsjEarth.js")?v.push(x):(v.push(x),v.push(`${w}/Widgets/widgets.css`));const S=v;if(D){const F=v.find(G=>G.includes("Cesium.js"));await R(F),S.splice(S.indexOf(F),1)}const B=[];return S.forEach(F=>{new RegExp("\\.css").test(F)?B.push(I(F)):B.push(R(F))}),Promise.all(B).then(()=>{if(globalThis.Cesium)return Me(i,"cesiumReady")&&c("cesiumReady",globalThis.Cesium),globalThis.Cesium;if(globalThis.XE)return globalThis.XE.ready().then(()=>(Me(i,"cesiumReady")&&c("cesiumReady",globalThis.Cesium),globalThis.Cesium));if(globalThis.DC)return globalThis.DC.use(globalThis.DcCore.default||globalThis.DcCore),globalThis.DC.baseUrl=`${w}/resources/`,globalThis.DC.ready(()=>(globalThis.Cesium=DC.Namespace.Cesium,Me(i,"cesiumReady")&&c("cesiumReady",globalThis.DC),globalThis.Cesium)),globalThis.Cesium;r(new Error("VueCesium ERROR: Error loading CesiumJS!"))})}},R=x=>{const w=document.createElement("script");return w.async=!0,w.src=x,document.body.appendChild(w),new Promise((D,S)=>{w.onload=()=>{D(!0)}})},I=x=>{const w=document.createElement("link");return w.rel="stylesheet",w.href=x,document.head.appendChild(w),new Promise((D,S)=>{w.onload=()=>{D(!0)}})},j=x=>{var w,D;const{viewer:S}=i,B=S._toolbar;B!==void 0&&getComputedStyle(B).visibility!=="hidden"&&getComputedStyle(B).display!=="none"?f.toolbarContainerRC=B.getBoundingClientRect():f.toolbarContainerRC=void 0;const F=S.bottomContainer;F!==void 0&&getComputedStyle(F).visibility!=="hidden"&&getComputedStyle(F).display!=="none"?f.bottomContainerRC=F.getBoundingClientRect():f.bottomContainerRC=void 0;const G=(w=S.timeline)==null?void 0:w.container;G!==void 0&&getComputedStyle(G).visibility!=="hidden"&&getComputedStyle(G).display!=="none"?f.timelineContainerRC=G.getBoundingClientRect():f.timelineContainerRC=void 0;const q=(D=S.animation)==null?void 0:D.container;q!==void 0&&getComputedStyle(q).visibility!=="hidden"&&getComputedStyle(q).display!=="none"?f.animationContainerRC=q.getBoundingClientRect():f.animationContainerRC=void 0,S.resize(),Me(i,"viewerWidgetResized")&&c("viewerWidgetResized",x)},W=x=>{const w=i.viewer,{autoSortImageryLayers:D}=e;w.baseLayerPicker&&w.imageryLayers.raiseToTop(x);const{defined:S}=Cesium;D&&(x.sortOrder=S(x.sortOrder)?x.sortOrder:9999,w.imageryLayers._layers.sort((B,F)=>B.sortOrder-F.sortOrder),w.imageryLayers._update())},$=function(x,w,D){const{JulianDate:S}=Cesium;let B;if(e.UTCOffset){x=S.addMinutes(x,e.UTCOffset,new S);const U=new Date().getTimezoneOffset()-e.UTCOffset;B=U===0?"UTC":"UTC+"+-(U/60)}else B=new Date().getTimezoneOffset()===0?"UTC":"UTC+"+-(new Date().getTimezoneOffset()/60);const F=S.toDate(x),G=F.toLocaleString(C("name"),{hour:"numeric",minute:"numeric",second:"numeric",hour12:!1}).replace(/,/g,""),q=F.toLocaleString(C("name"),{year:"numeric",month:"short",day:"numeric"}).replace(/,/g,"");return!D&&(w||F.getHours()+F.getMinutes()===0)?q:(e.TZCode&&(B=e.TZCode),D?`${G} ${B}`:`${q} ${G} ${B}`)},k=function(x,w){return $(x,w,!0)},h=function(x){const w=x.clock;w.currentTime=x.timeJulian,w.shouldAnimate=!1},p=function(x,w){const D=x._geocoder,S=x._homeButton,B=x._sceneModePicker,F=x._projectionPicker,G=x._baseLayerPicker,q=x._animation,U=x._timeline,K=x._fullscreenButton,N=x._infoBox,L=x._selectionIndicator,H=w?"hidden":"visible",{defined:z}=Cesium;if(z(D)&&(D.container.style.visibility=H),z(S)&&(S.container.style.visibility=H),z(B)&&(B.container.style.visibility=H),z(F)&&(F.container.style.visibility=H),z(G)&&(G.container.style.visibility=H),z(q)&&(q.container.style.visibility=H),z(U)&&(U.container.style.visibility=H),z(K)&&K.viewModel.isFullscreenEnabled&&(K.container.style.visibility=H),z(N)&&(N.container.style.visibility=H),z(L)&&(L.container.style.visibility=H),x._container){const Q=w||!z(K)?0:K.container.clientWidth;x._vrButton.container.style.right=Q+"px",x.forceResize()}},y=function(x,w){Array.prototype.slice.call(x.children).forEach(S=>{switch(S.className){case"cesium-viewer-geocoderContainer":S.customIndex=1;break;case"cesium-button cesium-toolbar-button cesium-home-button":S.customIndex=2;break;case"cesium-sceneModePicker-wrapper cesium-toolbar-button":S.customIndex=3;break;case"cesium-projectionPicker-wrapper cesium-toolbar-button":S.customIndex=4;break;case"cesium-button cesium-toolbar-button":case"cesium-baseLayerPicker-dropDown":S.customIndex=5;break;case"cesium-navigationHelpButton-wrapper":S.customIndex=6;break}});const D=[];Array.prototype.slice.call(x.children).forEach(S=>{D.push(S)}),D.sort(function(S,B){return S.customIndex-B.customIndex});for(let S=0;S<D.length;S++)x.appendChild(D[S])},O=function(){return Mn({},{get layout(){return f},get vm(){return i},get Cesium(){return i.Cesium},get viewer(){return i.viewer},get dataSources(){var x;return(x=i.viewer)==null?void 0:x.dataSources},get entities(){var x;return(x=i.viewer)==null?void 0:x.entities},get imageryLayers(){var x;return(x=i.viewer)==null?void 0:x.imageryLayers},get primitives(){var x;return(x=i.viewer)==null?void 0:x.scene.primitives},get groundPrimitives(){var x;return(x=i.viewer)==null?void 0:x.scene.groundPrimitives},get postProcessStages(){var x;return(x=i.viewer)==null?void 0:x.postProcessStages},get creatingPromise(){return a}})};return Object.defineProperties(i,{cesiumObject:{enumerable:!0,get:()=>i.viewer}}),Sr(async()=>{var x;try{d.debug("viewer - onMounted"),await((x=u.value)==null?void 0:x.__viewerUnloadingPromise),g().then(w=>{n(w)}).catch(w=>{c("unready",w),r(w)})}catch(w){c("unready",w),r(w)}}),ot(()=>{d.debug("viewer - onUnmounted"),E().then(()=>{l.all.clear()})}),{isReady:s,load:g,unload:E,reload:T,getServices:O,viewerRef:o,creatingPromise:a}}const ym=[{name:"imageryLayers",events:["layerAdded","layerMoved","layerRemoved","layerShownOrHidden"]},{name:"dataSources",events:["dataSourceAdded","dataSourceMoved","dataSourceRemoved"]},{name:"entities",events:["collectionChanged"]},{name:"scene",events:["morphComplete","morphStart","postRender","postUpdate","preRender","preUpdate","renderError","terrainProviderChanged"]},{name:"camera",events:["changed","moveEnd","moveStart"]},{name:"clock",events:["onStop","onTick"]},{name:"terrainProvider",events:["errorEvent"]},{name:["infoBox","viewModel"],events:["cameraClicked","closeClicked"]},{name:["scene","globe"],events:["imageryLayersUpdatedEvent","terrainProviderChanged","tileLoadProgressEvent"]}],oM=kl.map(e=>Sd(e)),aM=["beforeLoad","cesiumReady","ready","destroyed","update:camera","viewerWidgetResized",...kl,...oM,...Wh];ym.reduce((e,t)=>e.concat(t.events),aM);const Yl={xs:18,sm:24,md:32,lg:38,xl:46},bm={size:String};function Cm(e,t=Yl){return ye(()=>e.size!==void 0?{fontSize:e.size in t?`${t[e.size]}px`:e.size}:null)}function Ke(e,t){return e!==void 0?e():t}function gi(e,t){return e!==void 0?t.concat(e()):t}function sM(e,t,i,n,r,a){t.key=n+r;const o=P(e,t,i);return r===!0?_u(o,a()):o}const wm={...bm,tag:{type:String,default:"i"},name:String,color:String,hoverColor:String,left:Boolean,right:Boolean};var sr=te({name:"VcIcon",props:wm,setup(e,{slots:t}){const i=Cm(e),n=ye(()=>{const o=i.value;if(!!o)return e.color&&(o.color=e.color),e.hoverColor&&(o["--hover-color"]=e.hoverColor),o}),r=ye(()=>"vc-icon"+(e.left===!0?" on-left":"")+(e.right===!0?" on-right":"")+(e.color!==void 0?` text-${e.color}`:"")),a=ye(()=>{let o,s=e.name;if(!s)return{none:!0,cls:r.value};if(s.startsWith("M")===!0){const[c,u]=s.split("|");return{svg:!0,cls:r.value,nodes:c.split("&&").map(d=>{const[m,f,v]=d.split("@@");return P("path",{style:f,d:m,transform:v})}),viewBox:u!==void 0?u:"0 0 24 24"}}if(s.startsWith("img:")===!0)return{img:!0,cls:r.value,src:s.substring(4)};if(s.startsWith("svguse:")===!0){const[c,u]=s.split("|");return{svguse:!0,cls:r.value,src:c.substring(7),viewBox:u!==void 0?u:"0 0 24 24"}}let l=" ";return/^[l|f]a[s|r|l|b|d]{0,1} /.test(s)||s.startsWith("icon-")===!0?o=s:s.startsWith("bt-")===!0?o=`bt ${s}`:s.startsWith("eva-")===!0?o=`eva ${s}`:/^ion-(md|ios|logo)/.test(s)===!0?o=`ionicons ${s}`:s.startsWith("ion-")===!0?o=`ionicons ion-md${s.substr(3)}`:s.startsWith("mdi-")===!0?o=`mdi ${s}`:s.startsWith("iconfont ")===!0?o=`${s}`:s.startsWith("ti-")===!0?o=`themify-icon ${s}`:s.startsWith("vc-")===!0?o=`vc-icons ${s}`:(o="notranslate material-icons",s.startsWith("o_")===!0?(s=s.substring(2),o+="-outlined"):s.startsWith("r_")===!0?(s=s.substring(2),o+="-round"):s.startsWith("s_")===!0&&(s=s.substring(2),o+="-sharp"),l=s),{cls:o+" "+r.value,content:l}});return()=>{const o={class:a.value.cls,style:n.value,"aria-hidden":"true",role:"presentation",viewBox:"",src:""};return a.value.none===!0?P(e.tag,o,Ke(t.default)):a.value.img===!0?(o.src=a.value.src,o.style&&(o.style.width=o.style.fontSize,o.style.height=o.style.fontSize),P("img",o)):a.value.svg===!0?(o.viewBox=a.value.viewBox,o["aria-hidden"]="true",o.style&&(o.style.width=o.style.fontSize,o.style.height=o.style.fontSize),P("svg",o,gi(t.default,a.value.nodes))):a.value.svguse===!0?(o.viewBox=a.value.viewBox,o["aria-hidden"]="true",o.style&&(o.style.width=o.style.fontSize,o.style.height=o.style.fontSize),P("svg",o,gi(t.default,[P("use",{"xlink:href":a.value.src})]))):P(e.tag,o,gi(t.default,[a.value.content]))}}});const yi={size:{type:[Number,String],default:"1em"},color:String};function bi(e){return{cSize:ye(()=>e.size in Yl?`${Yl[e.size]}px`:e.size),classes:ye(()=>"vc-spinner"+(e.color?` text-${e.color}`:""))}}const lM=[P("g",{transform:"translate(1 1)","stroke-width":"2",fill:"none","fill-rule":"evenodd"},[P("circle",{cx:"5",cy:"50",r:"5"},[P("animate",{attributeName:"cy",begin:"0s",dur:"2.2s",values:"50;5;50;50",calcMode:"linear",repeatCount:"indefinite"}),P("animate",{attributeName:"cx",begin:"0s",dur:"2.2s",values:"5;27;49;5",calcMode:"linear",repeatCount:"indefinite"})]),P("circle",{cx:"27",cy:"5",r:"5"},[P("animate",{attributeName:"cy",begin:"0s",dur:"2.2s",from:"5",to:"5",values:"5;50;50;5",calcMode:"linear",repeatCount:"indefinite"}),P("animate",{attributeName:"cx",begin:"0s",dur:"2.2s",from:"27",to:"27",values:"27;49;5;27",calcMode:"linear",repeatCount:"indefinite"})]),P("circle",{cx:"49",cy:"50",r:"5"},[P("animate",{attributeName:"cy",begin:"0s",dur:"2.2s",values:"50;50;5;50",calcMode:"linear",repeatCount:"indefinite"}),P("animate",{attributeName:"cx",from:"49",to:"49",begin:"0s",dur:"2.2s",values:"49;5;27;49",calcMode:"linear",repeatCount:"indefinite"})])])];var Jl=te({name:"VcSpinnerBall",props:yi,setup(e){const{cSize:t,classes:i}=bi(e);return()=>P("svg",{class:i.value,stroke:"currentColor",width:t.value,height:t.value,viewBox:"0 0 57 57",xmlns:"http://www.w3.org/2000/svg"},lM)}});const cM=[P("rect",{y:"10",width:"15",height:"120",rx:"6"},[P("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),P("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),P("rect",{x:"30",y:"10",width:"15",height:"120",rx:"6"},[P("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),P("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),P("rect",{x:"60",width:"15",height:"140",rx:"6"},[P("animate",{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),P("animate",{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),P("rect",{x:"90",y:"10",width:"15",height:"120",rx:"6"},[P("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),P("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),P("rect",{x:"120",y:"10",width:"15",height:"120",rx:"6"},[P("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),P("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})])];var Kl=te({name:"VcSpinnerBars",props:yi,setup(e){const{cSize:t,classes:i}=bi(e);return()=>P("svg",{class:i.value,fill:"currentColor",width:t.value,height:t.value,viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg"},cM)}});const uM=[P("circle",{cx:"15",cy:"15",r:"15"},[P("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),P("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})]),P("circle",{cx:"60",cy:"15",r:"9","fill-opacity":".3"},[P("animate",{attributeName:"r",from:"9",to:"9",begin:"0s",dur:"0.8s",values:"9;15;9",calcMode:"linear",repeatCount:"indefinite"}),P("animate",{attributeName:"fill-opacity",from:".5",to:".5",begin:"0s",dur:"0.8s",values:".5;1;.5",calcMode:"linear",repeatCount:"indefinite"})]),P("circle",{cx:"105",cy:"15",r:"15"},[P("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),P("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})])];var ec=te({name:"VcSpinnerDots",props:yi,setup(e){const{cSize:t,classes:i}=bi(e);return()=>P("svg",{class:i.value,fill:"currentColor",width:t.value,height:t.value,viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg"},uM)}});const dM=[P("g",{transform:"translate(-20,-20)"},[P("path",{d:"M79.9,52.6C80,51.8,80,50.9,80,50s0-1.8-0.1-2.6l-5.1-0.4c-0.3-2.4-0.9-4.6-1.8-6.7l4.2-2.9c-0.7-1.6-1.6-3.1-2.6-4.5 L70,35c-1.4-1.9-3.1-3.5-4.9-4.9l2.2-4.6c-1.4-1-2.9-1.9-4.5-2.6L59.8,27c-2.1-0.9-4.4-1.5-6.7-1.8l-0.4-5.1C51.8,20,50.9,20,50,20 s-1.8,0-2.6,0.1l-0.4,5.1c-2.4,0.3-4.6,0.9-6.7,1.8l-2.9-4.1c-1.6,0.7-3.1,1.6-4.5,2.6l2.1,4.6c-1.9,1.4-3.5,3.1-5,4.9l-4.5-2.1 c-1,1.4-1.9,2.9-2.6,4.5l4.1,2.9c-0.9,2.1-1.5,4.4-1.8,6.8l-5,0.4C20,48.2,20,49.1,20,50s0,1.8,0.1,2.6l5,0.4 c0.3,2.4,0.9,4.7,1.8,6.8l-4.1,2.9c0.7,1.6,1.6,3.1,2.6,4.5l4.5-2.1c1.4,1.9,3.1,3.5,5,4.9l-2.1,4.6c1.4,1,2.9,1.9,4.5,2.6l2.9-4.1 c2.1,0.9,4.4,1.5,6.7,1.8l0.4,5.1C48.2,80,49.1,80,50,80s1.8,0,2.6-0.1l0.4-5.1c2.3-0.3,4.6-0.9,6.7-1.8l2.9,4.2 c1.6-0.7,3.1-1.6,4.5-2.6L65,69.9c1.9-1.4,3.5-3,4.9-4.9l4.6,2.2c1-1.4,1.9-2.9,2.6-4.5L73,59.8c0.9-2.1,1.5-4.4,1.8-6.7L79.9,52.6 z M50,65c-8.3,0-15-6.7-15-15c0-8.3,6.7-15,15-15s15,6.7,15,15C65,58.3,58.3,65,50,65z",fill:"currentColor"},[P("animateTransform",{attributeName:"transform",type:"rotate",from:"90 50 50",to:"0 50 50",dur:"1s",repeatCount:"indefinite"})])]),P("g",{transform:"translate(20,20) rotate(15 50 50)"},[P("path",{d:"M79.9,52.6C80,51.8,80,50.9,80,50s0-1.8-0.1-2.6l-5.1-0.4c-0.3-2.4-0.9-4.6-1.8-6.7l4.2-2.9c-0.7-1.6-1.6-3.1-2.6-4.5 L70,35c-1.4-1.9-3.1-3.5-4.9-4.9l2.2-4.6c-1.4-1-2.9-1.9-4.5-2.6L59.8,27c-2.1-0.9-4.4-1.5-6.7-1.8l-0.4-5.1C51.8,20,50.9,20,50,20 s-1.8,0-2.6,0.1l-0.4,5.1c-2.4,0.3-4.6,0.9-6.7,1.8l-2.9-4.1c-1.6,0.7-3.1,1.6-4.5,2.6l2.1,4.6c-1.9,1.4-3.5,3.1-5,4.9l-4.5-2.1 c-1,1.4-1.9,2.9-2.6,4.5l4.1,2.9c-0.9,2.1-1.5,4.4-1.8,6.8l-5,0.4C20,48.2,20,49.1,20,50s0,1.8,0.1,2.6l5,0.4 c0.3,2.4,0.9,4.7,1.8,6.8l-4.1,2.9c0.7,1.6,1.6,3.1,2.6,4.5l4.5-2.1c1.4,1.9,3.1,3.5,5,4.9l-2.1,4.6c1.4,1,2.9,1.9,4.5,2.6l2.9-4.1 c2.1,0.9,4.4,1.5,6.7,1.8l0.4,5.1C48.2,80,49.1,80,50,80s1.8,0,2.6-0.1l0.4-5.1c2.3-0.3,4.6-0.9,6.7-1.8l2.9,4.2 c1.6-0.7,3.1-1.6,4.5-2.6L65,69.9c1.9-1.4,3.5-3,4.9-4.9l4.6,2.2c1-1.4,1.9-2.9,2.6-4.5L73,59.8c0.9-2.1,1.5-4.4,1.8-6.7L79.9,52.6 z M50,65c-8.3,0-15-6.7-15-15c0-8.3,6.7-15,15-15s15,6.7,15,15C65,58.3,58.3,65,50,65z",fill:"currentColor"},[P("animateTransform",{attributeName:"transform",type:"rotate",from:"0 50 50",to:"90 50 50",dur:"1s",repeatCount:"indefinite"})])])];var tc=te({name:"VcSpinnerGears",props:yi,setup(e){const{cSize:t,classes:i}=bi(e);return()=>P("svg",{class:i.value,width:t.value,height:t.value,viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",xmlns:"http://www.w3.org/2000/svg"},dM)}});const hM=[P("g",[P("path",{fill:"none",stroke:"currentColor","stroke-width":"5","stroke-miterlimit":"10",d:"M58.4,51.7c-0.9-0.9-1.4-2-1.4-2.3s0.5-0.4,1.4-1.4 C70.8,43.8,79.8,30.5,80,15.5H70H30H20c0.2,15,9.2,28.1,21.6,32.3c0.9,0.9,1.4,1.2,1.4,1.5s-0.5,1.6-1.4,2.5 C29.2,56.1,20.2,69.5,20,85.5h10h40h10C79.8,69.5,70.8,55.9,58.4,51.7z"}),P("clipPath",{id:"uil-hourglass-clip1"},[P("rect",{x:"15",y:"20",width:" 70",height:"25"},[P("animate",{attributeName:"height",from:"25",to:"0",dur:"1s",repeatCount:"indefinite",values:"25;0;0",keyTimes:"0;0.5;1"}),P("animate",{attributeName:"y",from:"20",to:"45",dur:"1s",repeatCount:"indefinite",values:"20;45;45",keyTimes:"0;0.5;1"})])]),P("clipPath",{id:"uil-hourglass-clip2"},[P("rect",{x:"15",y:"55",width:" 70",height:"25"},[P("animate",{attributeName:"height",from:"0",to:"25",dur:"1s",repeatCount:"indefinite",values:"0;25;25",keyTimes:"0;0.5;1"}),P("animate",{attributeName:"y",from:"80",to:"55",dur:"1s",repeatCount:"indefinite",values:"80;55;55",keyTimes:"0;0.5;1"})])]),P("path",{d:"M29,23c3.1,11.4,11.3,19.5,21,19.5S67.9,34.4,71,23H29z","clip-path":"url(#uil-hourglass-clip1)",fill:"currentColor"}),P("path",{d:"M71.6,78c-3-11.6-11.5-20-21.5-20s-18.5,8.4-21.5,20H71.6z","clip-path":"url(#uil-hourglass-clip2)",fill:"currentColor"}),P("animateTransform",{attributeName:"transform",type:"rotate",from:"0 50 50",to:"180 50 50",repeatCount:"indefinite",dur:"1s",values:"0 50 50;0 50 50;180 50 50",keyTimes:"0;0.7;1"})])];var ic=te({name:"VcSpinnerHourglass",props:yi,setup(e){const{cSize:t,classes:i}=bi(e);return()=>P("svg",{class:i.value,width:t.value,height:t.value,viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",xmlns:"http://www.w3.org/2000/svg"},hM)}});const mM=[P("g",{"stroke-width":"4","stroke-linecap":"round"},[P("line",{y1:"17",y2:"29",transform:"translate(32,32) rotate(180)"},[P("animate",{attributeName:"stroke-opacity",dur:"750ms",values:"1;.85;.7;.65;.55;.45;.35;.25;.15;.1;0;1",repeatCount:"indefinite"})]),P("line",{y1:"17",y2:"29",transform:"translate(32,32) rotate(210)"},[P("animate",{attributeName:"stroke-opacity",dur:"750ms",values:"0;1;.85;.7;.65;.55;.45;.35;.25;.15;.1;0",repeatCount:"indefinite"})]),P("line",{y1:"17",y2:"29",transform:"translate(32,32) rotate(240)"},[P("animate",{attributeName:"stroke-opacity",dur:"750ms",values:".1;0;1;.85;.7;.65;.55;.45;.35;.25;.15;.1",repeatCount:"indefinite"})]),P("line",{y1:"17",y2:"29",transform:"translate(32,32) rotate(270)"},[P("animate",{attributeName:"stroke-opacity",dur:"750ms",values:".15;.1;0;1;.85;.7;.65;.55;.45;.35;.25;.15",repeatCount:"indefinite"})]),P("line",{y1:"17",y2:"29",transform:"translate(32,32) rotate(300)"},[P("animate",{attributeName:"stroke-opacity",dur:"750ms",values:".25;.15;.1;0;1;.85;.7;.65;.55;.45;.35;.25",repeatCount:"indefinite"})]),P("line",{y1:"17",y2:"29",transform:"translate(32,32) rotate(330)"},[P("animate",{attributeName:"stroke-opacity",dur:"750ms",values:".35;.25;.15;.1;0;1;.85;.7;.65;.55;.45;.35",repeatCount:"indefinite"})]),P("line",{y1:"17",y2:"29",transform:"translate(32,32) rotate(0)"},[P("animate",{attributeName:"stroke-opacity",dur:"750ms",values:".45;.35;.25;.15;.1;0;1;.85;.7;.65;.55;.45",repeatCount:"indefinite"})]),P("line",{y1:"17",y2:"29",transform:"translate(32,32) rotate(30)"},[P("animate",{attributeName:"stroke-opacity",dur:"750ms",values:".55;.45;.35;.25;.15;.1;0;1;.85;.7;.65;.55",repeatCount:"indefinite"})]),P("line",{y1:"17",y2:"29",transform:"translate(32,32) rotate(60)"},[P("animate",{attributeName:"stroke-opacity",dur:"750ms",values:".65;.55;.45;.35;.25;.15;.1;0;1;.85;.7;.65",repeatCount:"indefinite"})]),P("line",{y1:"17",y2:"29",transform:"translate(32,32) rotate(90)"},[P("animate",{attributeName:"stroke-opacity",dur:"750ms",values:".7;.65;.55;.45;.35;.25;.15;.1;0;1;.85;.7",repeatCount:"indefinite"})]),P("line",{y1:"17",y2:"29",transform:"translate(32,32) rotate(120)"},[P("animate",{attributeName:"stroke-opacity",dur:"750ms",values:".85;.7;.65;.55;.45;.35;.25;.15;.1;0;1;.85",repeatCount:"indefinite"})]),P("line",{y1:"17",y2:"29",transform:"translate(32,32) rotate(150)"},[P("animate",{attributeName:"stroke-opacity",dur:"750ms",values:"1;.85;.7;.65;.55;.45;.35;.25;.15;.1;0;1",repeatCount:"indefinite"})])])];var nc=te({name:"VcSpinnerIos",props:yi,setup(e){const{cSize:t,classes:i}=bi(e);return()=>P("svg",{class:i.value,width:t.value,height:t.value,stroke:"currentColor",fill:"currentColor",viewBox:"0 0 64 64"},mM)}});const fM=[P("circle",{cx:"50",cy:"50",r:"44",fill:"none","stroke-width":"4","stroke-opacity":".5",stroke:"currentColor"}),P("circle",{cx:"8",cy:"54",r:"6",fill:"currentColor","stroke-width":"3",stroke:"currentColor"},[P("animateTransform",{attributeName:"transform",type:"rotate",from:"0 50 48",to:"360 50 52",dur:"2s",repeatCount:"indefinite"})])];var rc=te({name:"VcSpinnerOrbit",props:yi,setup(e){const{cSize:t,classes:i}=bi(e);return()=>P("svg",{class:i.value,width:t.value,height:t.value,viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",xmlns:"http://www.w3.org/2000/svg"},fM)}});const pM=[P("g",{transform:"translate(1 1)","stroke-width":"2",fill:"none","fill-rule":"evenodd"},[P("circle",{"stroke-opacity":".5",cx:"18",cy:"18",r:"18"}),P("path",{d:"M36 18c0-9.94-8.06-18-18-18"},[P("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})])])];var oc=te({name:"VcSpinnerOval",props:yi,setup(e){const{cSize:t,classes:i}=bi(e);return()=>P("svg",{class:i.value,stroke:"currentColor",width:t.value,height:t.value,viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg"},pM)}});const vM=[P("g",{fill:"none","fill-rule":"evenodd","stroke-width":"2"},[P("circle",{cx:"22",cy:"22",r:"1"},[P("animate",{attributeName:"r",begin:"0s",dur:"1.8s",values:"1; 20",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.165, 0.84, 0.44, 1",repeatCount:"indefinite"}),P("animate",{attributeName:"stroke-opacity",begin:"0s",dur:"1.8s",values:"1; 0",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.3, 0.61, 0.355, 1",repeatCount:"indefinite"})]),P("circle",{cx:"22",cy:"22",r:"1"},[P("animate",{attributeName:"r",begin:"-0.9s",dur:"1.8s",values:"1; 20",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.165, 0.84, 0.44, 1",repeatCount:"indefinite"}),P("animate",{attributeName:"stroke-opacity",begin:"-0.9s",dur:"1.8s",values:"1; 0",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.3, 0.61, 0.355, 1",repeatCount:"indefinite"})])])];var ac=te({name:"VcSpinnerPuff",props:yi,setup(e){const{cSize:t,classes:i}=bi(e);return()=>P("svg",{class:i.value,stroke:"currentColor",width:t.value,height:t.value,viewBox:"0 0 44 44",xmlns:"http://www.w3.org/2000/svg"},vM)}});const gM=[P("g",{fill:"none","fill-rule":"evenodd",transform:"translate(1 1)","stroke-width":"2"},[P("circle",{cx:"22",cy:"22",r:"6"},[P("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),P("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),P("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]),P("circle",{cx:"22",cy:"22",r:"6"},[P("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),P("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),P("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]),P("circle",{cx:"22",cy:"22",r:"8"},[P("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"})])])];var sc=te({name:"VcSpinnerRings",props:yi,setup(e){const{cSize:t,classes:i}=bi(e);return()=>P("svg",{class:i.value,stroke:"currentColor",width:t.value,height:t.value,viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg"},gM)}});const yM=[P("defs",[P("linearGradient",{x1:"8.042%",y1:"0%",x2:"65.682%",y2:"23.865%",id:"a"},[P("stop",{"stop-color":"currentColor","stop-opacity":"0",offset:"0%"}),P("stop",{"stop-color":"currentColor","stop-opacity":".631",offset:"63.146%"}),P("stop",{"stop-color":"currentColor",offset:"100%"})])]),P("g",{transform:"translate(1 1)",fill:"none","fill-rule":"evenodd"},[P("path",{d:"M36 18c0-9.94-8.06-18-18-18",stroke:"url(#a)","stroke-width":"2"},[P("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"0.9s",repeatCount:"indefinite"})]),P("circle",{fill:"currentColor",cx:"36",cy:"18",r:"1"},[P("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"0.9s",repeatCount:"indefinite"})])])];var lc=te({name:"VcSpinnerTail",props:yi,setup(e){const{cSize:t,classes:i}=bi(e);return()=>P("svg",{class:i.value,width:t.value,height:t.value,viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg"},yM)}}),Oa=te({name:"VcSpinner",props:{...yi,thickness:{type:Number,default:5}},setup(e){const{cSize:t,classes:i}=bi(e);return()=>P("svg",{class:i.value+" vc-spinner-mat",width:t.value,height:t.value,viewBox:"25 25 50 50"},[P("circle",{class:"path",cx:"50",cy:"50",r:"20",fill:"none",stroke:"currentColor","stroke-width":e.thickness,"stroke-miterlimit":"10"})])}});const _m={left:"start",center:"center",right:"end",between:"between",around:"around",evenly:"evenly",stretch:"stretch"},bM=Object.keys(_m),CM={align:{type:String,validator:e=>bM.includes(e)}};function wM(e){return ye(()=>{const t=e.align===void 0?e.vertical===!0?"stretch":"left":e.align;return`${e.vertical===!0?"items":"justify"}-${_m[t]}`})}const xm={none:0,xs:4,sm:8,md:16,lg:24,xl:32},_M={xs:8,sm:10,md:14,lg:20,xl:24},xM={...bm,type:{type:String,default:"button"},label:[Number,String],icon:String,iconRight:String,round:Boolean,outline:Boolean,flat:Boolean,unelevated:Boolean,rounded:Boolean,push:Boolean,glossy:Boolean,size:String,fab:Boolean,fabMini:Boolean,padding:String,color:String,textColor:String,noCaps:Boolean,noWrap:Boolean,dense:Boolean,tabindex:[Number,String],ripple:{type:[Boolean,Object],default:!0},align:{...CM.align,default:"center"},stack:Boolean,stretch:Boolean,loading:{type:Boolean,default:null},disable:Boolean};function EM(e){const t=Cm(e,_M),i=wM(e),n=ye(()=>{const d=e.fab===!1&&e.fabMini===!1?t.value:{};return e.padding!==void 0?Object.assign({},d,{padding:e.padding.split(/\s+/).map(m=>m in xm?xm[m]+"px":m).join(" "),minWidth:"0",minHeight:"0"}):d}),r=ye(()=>e.rounded===!0||e.fab===!0||e.fabMini===!0),a=ye(()=>e.disable!==!0&&e.loading!==!0),o=ye(()=>a.value===!0?e.tabindex||0:-1),s=ye(()=>e.flat===!0?"flat":e.outline===!0?"outline":e.push===!0?"push":e.unelevated===!0?"unelevated":"standard"),l=ye(()=>{const d={tabindex:o.value};return e.type!=="a"&&(d.type=e.type),d.role=e.type==="a"?"link":"button",e.loading===!0&&e.percentage!==void 0&&Object.assign(d,{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":e.percentage}),e.disable===!0&&(d.disabled="",d["aria-disabled"]="true"),d}),c=ye(()=>{let d;return e.color!==void 0?e.flat===!0||e.outline===!0?d=`text-${e.textColor||e.color}`:d=`bg-${e.color} text-${e.textColor||"white"}`:e.textColor&&(d=`text-${e.textColor}`),`vc-btn--${s.value} vc-btn--${e.round===!0?"round":`rectangle${r.value===!0?" vc-btn--rounded":""}`}`+(d!==void 0?" "+d:"")+(a.value===!0?" vc-btn--actionable vc-focusable vc-hoverable":e.disable===!0?" disabled":"")+(e.fab===!0?" vc-btn--fab":e.fabMini===!0?" vc-btn--fab-mini":"")+(e.noCaps===!0?" vc-btn--no-uppercase":"")+(e.dense===!0?" vc-btn--dense":"")+(e.stretch===!0?" no-border-radius self-stretch":"")+(e.glossy===!0?" glossy":"")}),u=ye(()=>i.value+(e.stack===!0?" column":" row")+(e.noWrap===!0?" no-wrap text-no-wrap":"")+(e.loading===!0?" vc-btn__content--hidden":""));return{classes:c,style:n,innerClasses:u,attributes:l,isActionable:a}}const cc=At().isIOS||navigator.vendor.toLowerCase().indexOf("apple")>-1?()=>document:e=>e,{passiveCapture:Ci}=nr;let lr,cr,ur;const Em={...xM,percentage:{type:Number,default:0},darkPercentage:Boolean};var Pa=te({name:"VcBtn",props:Em,emits:["click","keydown","touchstart","mousedown","keyup"],setup(e,{slots:t,emit:i}){var n;const r=(n=re())==null?void 0:n.proxy,{classes:a,style:o,innerClasses:s,attributes:l,isActionable:c}=EM(e),u=ie(null),d=ie(null);let m=null,f,v;const C=ye(()=>e.label!==void 0&&e.label!==null&&e.label!==""),b=ye(()=>e.ripple===!1?!1:{keyCodes:13,...e.ripple===!0?{}:e.ripple}),_=ye(()=>{const k=Math.max(0,Math.min(100,e.percentage));return k>0?{transition:"transform 0.6s",transform:`translateX(${k-100}%)`}:{}}),M=ye(()=>e.loading===!0?{onMousedown:$,onTouchstart:$,onClick:$,onKeydown:$,onKeyup:$}:c.value===!0?{onClick:T,onKeydown:A,onMousedown:I,onTouchstart:R}:{}),g=ye(()=>[[Jh,b.value,void 0,{center:e.round}]]),E=ye(()=>({ref:u,class:"vc-btn vc-btn-item non-selectable no-outline "+a.value,style:o.value,...l.value,...M.value}));function T(k){var h;if(k!==void 0){if(k.defaultPrevented===!0)return;const y=document.activeElement;if(e.type==="submit"&&y!==document.body&&((h=u.value)==null?void 0:h.contains(y))===!1&&(y==null?void 0:y.contains(u.value))===!1){u.value.focus();const O=()=>{document.removeEventListener("keydown",un,!0),document.removeEventListener("keyup",O,Ci),u.value!==null&&u.value.removeEventListener("blur",O,Ci)};document.addEventListener("keydown",un,!0),document.addEventListener("keyup",O,Ci),u.value.addEventListener("blur",O,Ci)}}i("click",k,()=>{})}function A(k){var h,p,y;to(k,[13,32])===!0&&(un(k),cr!==u.value&&(cr!==null&&W(),(h=u.value)==null||h.focus(),cr=u.value,(p=u.value)==null||p.classList.add("vc-btn--active"),document.addEventListener("keyup",j,!0),(y=u.value)==null||y.addEventListener("blur",j,Ci))),i("keydown",k)}function R(k){lr!==u.value&&(lr!==null&&W(),lr=u.value,m=cc(k.target),m==null||m.addEventListener("touchcancel",j,Ci),m==null||m.addEventListener("touchend",j,Ci)),f=!0,clearTimeout(v),v=setTimeout(()=>{f=!1},200),i("touchstart",k)}function I(k){var h;ur!==u.value&&(ur!==null&&W(),ur=u.value,(h=u.value)==null||h.classList.add("vc-btn--active"),document.addEventListener("mouseup",j,Ci)),k.qSkipRipple=f===!0,i("mousedown",k)}function j(k){var h;if(!(k!==void 0&&k.type==="blur"&&document.activeElement===u.value)){if(k!==void 0&&k.type==="keyup"){if(cr===u.value&&to(k,[13,32])===!0){const p=new MouseEvent("click",k);p.qKeyEvent=!0,k.defaultPrevented===!0&&$l(p),k.cancelBubble===!0&&Qh(p),(h=u.value)==null||h.dispatchEvent(p),un(k),k.qKeyEvent=!0}i("keyup",k)}W()}}function W(k){const h=d.value;k!==!0&&(lr===u.value||ur===u.value)&&h!==null&&h!==document.activeElement&&(h.setAttribute("tabindex","-1"),h.focus()),lr===u.value&&(m!==null&&(m.removeEventListener("touchcancel",j,Ci),m.removeEventListener("touchend",j,Ci)),lr=m=null),ur===u.value&&(document.removeEventListener("mouseup",j,Ci),ur=null),cr===u.value&&(document.removeEventListener("keyup",j,!0),u.value!==null&&u.value.removeEventListener("blur",j,Ci),cr=null),u.value!==null&&u.value.classList.remove("vc-btn--active")}function $(k){un(k),k.qSkipRipple=!0}return wn(()=>{W(!0)}),Object.assign(r,{click:T}),()=>{let k=[];e.icon!==void 0&&k.push(P(sr,{name:e.icon,left:e.stack===!1&&C.value===!0,role:"img","aria-hidden":"true"})),C.value===!0&&k.push(P("span",{class:"block"},[e.label])),k=gi(t.default,k),e.iconRight!==void 0&&e.round===!1&&k.push(P(sr,{name:e.iconRight,right:e.stack===!1&&C.value===!0,role:"img","aria-hidden":"true"}));const h=[P("span",{class:"vc-focus-helper",ref:d})];return e.loading===!0&&e.percentage!==void 0&&h.push(P("span",{class:"vc-btn__progress absolute-full overflow-hidden"},[P("span",{class:"vc-btn__progress-indicator fit block"+(e.darkPercentage===!0?" vc-btn__progress--dark":""),style:_.value})])),h.push(P("span",{class:"vc-btn__content text-center col items-center vc-anchor--skip "+s.value},k)),e.loading!==null&&h.push(P(xu,{name:"vc-transition--fade"},()=>e.loading===!0?[P("span",{key:"loading",class:"absolute-full flex flex-center"},t.loading!==void 0?t.loading():[P(Oa)])]:null)),sM("button",E.value,h,"ripple",e.disable!==!0&&e.ripple!==!1,()=>g.value)}}});const OM={target:{type:[Boolean,String],default:!0},noParentEvent:Boolean,contextMenu:Boolean};function PM({showing:e,avoidEmit:t,configureAnchorEl:i}){const{props:n,proxy:r,emit:a}=re(),o=ie(null);let s;function l(f){return o.value===null?!1:f===void 0||f.touches===void 0||f.touches.length<=1}const c={};i===void 0&&(Object.assign(c,{hide(f){r.hide(f)},toggle(f){r.toggle(f)},toggleKey(f){to(f,13)===!0&&r.toggle(f)},contextClick(f){r.hide(f),De(()=>{r.show(f)}),$l(f)},mobilePrevent:$l,mobileTouch(f){var v;if(c.mobileCleanup(f),l(f)!==!0)return;r.hide(f),(v=o.value)==null||v.classList.add("non-selectable");const C=cc(f.target);Xt(c,"anchor",[[C,"touchmove","mobileCleanup","passive"],[C,"touchend","mobileCleanup","passive"],[C,"touchcancel","mobileCleanup","passive"],[o.value,"contextmenu","mobilePrevent","notPassive"]]),s=setTimeout(()=>{r.show(f)},300)},mobileCleanup(f){o.value.classList.remove("non-selectable"),clearTimeout(s),e.value===!0&&f!==void 0&&Yi()}}),i=function(f=n.contextMenu){if(n.noParentEvent===!0||o.value===null)return;let v;f===!0?At().isPhone===!0?v=[[o.value,"touchstart","mobileTouch","passive"]]:v=[[o.value,"click","hide","passive"],[o.value,"contextmenu","contextClick","notPassive"]]:v=[[o.value,"click","toggle","passive"],[o.value,"keyup","toggleKey","passive"]],Xt(c,"anchor",v)});function u(){ji(c,"anchor")}function d(f){for(o.value=f;o.value.classList.contains("vc-anchor--skip");)o.value=o.value.parentNode;i()}function m(){if(n.target===!1||n.target==="")o.value=null;else if(n.target===!0)d(r==null?void 0:r.$el.parentNode);else{let f=n.target;if(typeof n.target=="string")try{f=document.querySelector(n.target)}catch(v){f=void 0}f!=null?(o.value=f.$el||f,i()):(o.value=null,console.error(`Anchor: target "${n.target}" not found`))}}return fe(()=>n.contextMenu,f=>{o.value!==null&&(u(),i(f))}),fe(()=>n.target,()=>{o.value!==null&&u(),m()}),fe(()=>n.noParentEvent,f=>{o.value!==null&&(f===!0?u():i())}),Sr(()=>{m(),t!==!0&&n.modelValue===!0&&o.value===null&&a("update:modelValue",!1)}),wn(()=>{clearTimeout(s),u()}),{anchorEl:o,canShow:l,anchorEvents:c}}function MM(e,t){const i=ie(null);let n;function r(s,l){const c=`${l!==void 0?"add":"remove"}EventListener`,u=l!==void 0?l:n;s!==window&&s[c]("scroll",u,nr.passive),window[c]("scroll",u,nr.passive),n=l}function a(){i.value!==null&&(r(i.value),i.value=null)}const o=fe(()=>e.noParentEvent,()=>{i.value!==null&&(a(),t())});return wn(o),{localScrollTarget:i,unconfigureScrollTarget:a,changeScrollEvent:r}}const Om={modelValue:{type:Boolean,default:null}},Pm=["update:modelValue","before-show","show","before-hide","hide"];function Mm({showing:e,canShow:t=void 0,hideOnRouteChange:i=void 0,handleShow:n=void 0,handleHide:r=void 0,processOnMount:a=void 0}){const o=re(),{props:s,emit:l,proxy:c}=o;let u;function d(M){(e==null?void 0:e.value)===!0?v(M):m(M)}function m(M){if(s.disable===!0||t!==void 0&&t(M)!==!0)return;const g=ks(o,"onUpdate:modelValue")===!0;g===!0&&(l("update:modelValue",!0),u=M,De(()=>{u===M&&(u=void 0)})),(s.modelValue===null||g===!1)&&f(M)}function f(M){(e==null?void 0:e.value)!==!0&&(e&&(e.value=!0),l("before-show",M),!(M&&M.cancel===!0)&&(n!==void 0?n(M):l("show",M)))}function v(M){if(s.disable===!0)return;const g=ks(o,"onUpdate:modelValue")===!0;g===!0&&(l("update:modelValue",!1),u=M,De(()=>{u===M&&(u=void 0)})),(s.modelValue===null||g===!1)&&C(M)}function C(M){(e==null?void 0:e.value)!==!1&&(e&&(e.value=!1),l("before-hide",M),r!==void 0?r(M):l("hide",M))}function b(M){s.disable===!0&&M===!0?ks(o,"onUpdate:modelValue")===!0&&l("update:modelValue",!1):M===!0!==(e==null?void 0:e.value)&&(M===!0?f:C)(u)}fe(()=>s.modelValue,b),i!==void 0&&AP(o)===!0&&fe(()=>c.$route,()=>{i.value===!0&&(e==null?void 0:e.value)===!0&&v()}),a===!0&&Sr(()=>{b(s.modelValue)});const _={show:m,hide:v,toggle:d};return Object.assign(c,_),_}let SM=document.body;function TM(e){const t=document.createElement("div");return e!==void 0&&(t.id=e),SM.appendChild(t),t}function AM(e){e.remove()}const uc=[];function DM(e){for(e=e.parent;e!=null;){if(e.type.name==="VcGlobalDialog")return!0;if(e.type.name==="VcDialog"||e.type.name==="VcMenu")return!1;e=e.parent}return!1}function Sm(e,t,i,n){var r,a,o,s;let l=null;((a=(r=e.props)==null?void 0:r.teleport)==null?void 0:a.to)&&(l=(s=(o=e.props)==null?void 0:o.teleport)==null?void 0:s.to);const c=n===!0&&DM(e),u=ie(!1);function d(){c===!1&&l===null&&(l=TM()),u.value=!0,uc.push(e.proxy)}function m(){var f,v;u.value=!1;const C=uc.indexOf(e.proxy);C>-1&&uc.splice(C,1),l!==null&&!((v=(f=e.props)==null?void 0:f.teleport)==null?void 0:v.to)&&(AM(l),l=null)}return ot(m),Object.assign(e.proxy,{__vcPortalInnerRef:t}),{showPortal:d,hidePortal:m,portalIsActive:u,renderPortal:()=>c===!0?i():u.value===!0?[P(r1,{to:l},i())]:void 0}}const IM={transitionShow:{type:String,default:"fade"},transitionHide:{type:String,default:"fade"},transitionDuration:{type:[String,Number],default:300}};function RM(e,t){const i=ie(t.value);return fe(t,n=>{De(()=>{i.value=n})}),{transition:ye(()=>"vc-transition--"+(i.value===!0?e.transitionHide:e.transitionShow)),transitionStyle:ye(()=>`--vc-transition-duration: ${e.transitionDuration}ms`)}}function LM(){let e;return wn(()=>{e=void 0}),{registerTick(t){e=t},removeTick(){e=void 0},prepareTick(){if(e!==void 0){const t=e;De(()=>{e===t&&(e(),e=void 0)})}}}}const BM=[null,document,document.body,document.scrollingElement,document.documentElement];function jM(e,t){let i=HP(t);if(i===void 0){if(e==null)return window;i=e.closest(".scroll,.scroll-y,.overflow-auto")}return BM.includes(i)?window:i}let Ma;function FM(){if(Ma!==void 0)return Ma;const e=document.createElement("p"),t=document.createElement("div");Vl(e,{width:"100%",height:"200px"}),Vl(t,{position:"absolute",top:"0px",left:"0px",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),t.appendChild(e),document.body.appendChild(t);const i=e.offsetWidth;t.style.overflow="scroll";let n=e.offsetWidth;return i===n&&(n=t.clientWidth),t.remove(),Ma=i-n,Ma}let Tm,Am;function Dm(e){const t=e.split(" ");return t.length!==2?!1:["top","center","bottom"].includes(t[0])!==!0?(console.error("Anchor/Self position must start with one of top/center/bottom"),!1):["left","middle","right","start","end"].includes(t[1])!==!0?(console.error("Anchor/Self position must end with one of left/middle/right/start/end"),!1):!0}function kM(e){return e?!(e.length!==2||typeof e[0]!="number"||typeof e[1]!="number"):!0}const dc={"start#ltr":"left","start#rtl":"right","end#ltr":"right","end#rtl":"left"};["left","middle","right"].forEach(e=>{dc[`${e}#ltr`]=e,dc[`${e}#rtl`]=e});function Im(e,t){const i=e.split(" ");return{vertical:i[0],horizontal:dc[`${i[1]}#${t===!0?"rtl":"ltr"}`]}}function NM(e,t){let{top:i,left:n,right:r,bottom:a,width:o,height:s}=e.getBoundingClientRect();return t!==void 0&&(i-=t[1],n-=t[0],a+=t[1],r+=t[0],o+=t[0],s+=t[1]),{top:i,left:n,right:r,bottom:a,width:o,height:s,middle:n+(r-n)/2,center:i+(a-i)/2}}function zM(e){return{top:0,center:e.offsetHeight/2,bottom:e.offsetHeight,left:0,middle:e.offsetWidth/2,right:e.offsetWidth}}function VM(e){if(At().isIOS===!0&&window.visualViewport!==void 0){const s=document.body.style,{offsetLeft:l,offsetTop:c}=window.visualViewport;l!==Tm&&(s.setProperty("--vc-pe-left",l+"px"),Tm=l),c!==Am&&(s.setProperty("--vc-pe-top",c+"px"),Am=c)}let t={};const{scrollLeft:i,scrollTop:n}=e.el;if(e.absoluteOffset===void 0)t=NM(e.anchorEl,e.cover===!0?[0,0]:e.offset);else{const{top:s,left:l}=e.anchorEl.getBoundingClientRect(),c=s+e.absoluteOffset.top,u=l+e.absoluteOffset.left;t={top:c,left:u,width:1,height:1,right:u+1,center:c,middle:u,bottom:c+1}}let r={maxHeight:e.maxHeight,maxWidth:e.maxWidth,visibility:"visible"};(e.fit===!0||e.cover===!0)&&(r.minWidth=t.width+"px",e.cover===!0&&(r.minHeight=t.height+"px")),Object.assign(e.el.style,r);const a=zM(e.el),o={top:t[e.anchorOrigin.vertical]-a[e.selfOrigin.vertical],left:t[e.anchorOrigin.horizontal]-a[e.selfOrigin.horizontal]};$M(o,t,a,e.anchorOrigin,e.selfOrigin),r={top:o.top+"px",left:o.left+"px"},o.maxHeight!==void 0&&(r.maxHeight=o.maxHeight+"px",t.height>o.maxHeight&&(r.minHeight=r.maxHeight)),o.maxWidth!==void 0&&(r.maxWidth=o.maxWidth+"px",t.width>o.maxWidth&&(r.minWidth=r.maxWidth)),Object.assign(e.el.style,r),e.el.scrollTop!==n&&(e.el.scrollTop=n),e.el.scrollLeft!==i&&(e.el.scrollLeft=i)}function $M(e,t,i,n,r){const a=i.bottom,o=i.right,s=FM(),l=window.innerHeight-s,c=document.body.clientWidth;if(e.top<0||e.top+a>l)if(r.vertical==="center")e.top=t[n.vertical]>l/2?Math.max(0,l-a):0,e.maxHeight=Math.min(a,l);else if(t[n.vertical]>l/2){const u=Math.min(l,n.vertical==="center"?t.center:n.vertical===r.vertical?t.bottom:t.top);e.maxHeight=Math.min(a,u),e.top=Math.max(0,u-a)}else e.top=Math.max(0,n.vertical==="center"?t.center:n.vertical===r.vertical?t.top:t.bottom),e.maxHeight=Math.min(a,l-e.top);if(e.left<0||e.left+o>c)if(e.maxWidth=Math.min(o,c),r.horizontal==="middle")e.left=t[n.horizontal]>c/2?Math.max(0,c-o):0;else if(t[n.horizontal]>c/2){const u=Math.min(c,n.horizontal==="middle"?t.middle:n.horizontal===r.horizontal?t.right:t.left);e.maxWidth=Math.min(o,u),e.left=Math.max(0,u-e.maxWidth)}else e.left=Math.max(0,n.horizontal==="middle"?t.middle:n.horizontal===r.horizontal?t.left:t.right),e.maxWidth=Math.min(o,c-e.left)}const Rm={...OM,...Om,...IM,maxHeight:{type:String,default:null},maxWidth:{type:String,default:null},transitionShow:{type:String,default:"jump-down"},transitionHide:{type:String,default:"jump-up"},anchor:{type:String,default:"bottom middle",validator:Dm},self:{type:String,default:"top middle",validator:Dm},offset:{type:Array,default:()=>[14,14],validator:kM},scrollTarget:String,delay:{type:Number,default:0},hideDelay:{type:Number,default:0},persistent:{type:Boolean}};var Lm=te({name:"VcTooltip",inheritAttrs:!1,props:Rm,emits:[...Pm],setup(e,{slots:t,emit:i,attrs:n}){let r,a;const o=re(),s=ie(null),l=ie(!1),c=ye(()=>Im(e.anchor,!0)),u=ye(()=>Im(e.self,!0)),d=ye(()=>e.persistent!==!0),{registerTick:m,removeTick:f,prepareTick:v}=LM(),{registerTimeout:C,removeTimeout:b}=Nl(),{transition:_,transitionStyle:M}=RM(e,l),{localScrollTarget:g,changeScrollEvent:E,unconfigureScrollTarget:T}=MM(e,B),{anchorEl:A,canShow:R,anchorEvents:I}=PM({showing:l,configureAnchorEl:S,avoidEmit:void 0}),{show:j,hide:W}=Mm({showing:l,canShow:R,handleShow:p,handleHide:y,hideOnRouteChange:d,processOnMount:!0});Object.assign(I,{delayShow:w,delayHide:D});const{showPortal:$,hidePortal:k,renderPortal:h}=Sm(o,s,G);function p(q){f(),b(),$(),m(()=>{a=new MutationObserver(()=>x()),a.observe(s.value,{attributes:!1,childList:!0,characterData:!0,subtree:!0}),x(),B()}),v(),r===void 0&&(r=fe(()=>e.self+"|"+e.anchor,x)),C(()=>{i("show",q)},e.transitionDuration)}function y(q){f(),b(),O(),C(()=>{k(),i("hide",q)},e.transitionDuration)}function O(){a!==void 0&&(a.disconnect(),a=void 0),r!==void 0&&(r(),r=void 0),T(),ji(I,"tooltipTemp")}function x(){const q=s.value;A.value===void 0||!q||VM({el:q,offset:e.offset,anchorEl:A.value,anchorOrigin:c.value,selfOrigin:u.value,maxHeight:e.maxHeight,maxWidth:e.maxWidth})}function w(q){if(At().isPhone===!0){Yi(),document.body.classList.add("non-selectable");const U=cc(A.value),K=["touchmove","touchcancel","touchend","click"].map(N=>[U,N,"__delayHide","passiveCapture"]);Xt(I,"tooltipTemp",K)}C(()=>{j(q)},e.delay)}function D(q){b(),At().isPhone===!0&&(ji(I,"tooltipTemp"),Yi(),setTimeout(()=>{document.body.classList.remove("non-selectable")},10)),C(()=>{W(q)},e.hideDelay)}function S(){if(e.noParentEvent===!0||A.value===void 0)return;const q=At().isPhone===!0?[[A.value,"touchstart","delayShow","passive"]]:[[A.value,"mouseenter","delayShow","passive"],[A.value,"mouseleave","delayHide","passive"]];Xt(I,"anchor",q)}function B(){if(A.value!==void 0||e.scrollTarget!==void 0){g.value=jM(A.value,e.scrollTarget);const q=e.noParentEvent===!0?x:W;E(g.value,q)}}function F(){return l.value===!0?P("div",{...n,ref:s,class:["vc-tooltip vc-tooltip--style vc-position-engine no-pointer-events",n.class],style:M.value,role:"complementary"},Ke(t.default)):null}function G(){return P(xu,{name:_.value,appear:!0},F)}return wn(O),Object.assign(o==null?void 0:o.proxy,{updatePosition:x}),h}});function GM(e,t,i){return i<=t?t:Math.min(i,Math.max(t,e))}const hc=XMLHttpRequest,Bm=hc.prototype.open,UM=["top","right","bottom","left"];let Sa=[],io=0;function HM({p:e,pos:t,active:i,horiz:n,reverse:r,dir:a}){let o=1,s=1;return n===!0?(r===!0&&(o=-1),t==="bottom"&&(s=-1),{transform:`translate3d(${o*(e-100)}%,${i?0:s*-200}%,0)`}):(r===!0&&(s=-1),t==="right"&&(o=-1),{transform:`translate3d(${i?0:a*o*-200}%,${s*(e-100)}%,0)`})}function WM(e,t){return typeof t!="number"&&(e<25?t=Math.random()*3+3:e<65?t=Math.random()*3:e<85?t=Math.random()*2:e<99?t=.6:t=0),GM(e+t,0,100)}function qM(e){io++,Sa.push(e),!(io>1)&&(hc.prototype.open=function(t,i){const n=[],r=()=>{Sa.forEach(o=>{(o.hijackFilter.value===null||o.hijackFilter.value(i)===!0)&&(o.start(),n.push(o.stop))})},a=()=>{n.forEach(o=>{o()})};this.addEventListener("loadstart",r,{once:!0}),this.addEventListener("loadend",a,{once:!0}),Bm.apply(this,arguments)})}function ZM(e){Sa=Sa.filter(t=>t.start!==e),io=Math.max(0,io-1),io===0&&(hc.prototype.open=Bm)}const jm={position:{type:String,default:"top",validator:e=>UM.includes(e)},size:{type:String,default:"2px"},color:String,skipHijack:Boolean,reverse:Boolean,positioning:{type:String,default:"absolute",validator:e=>["absolute","fixed"].includes(e)},hijackFilter:Function};var Fm=te({name:"VcAjaxBar",props:jm,emits:["start","stop"],setup(e,{emit:t}){const{proxy:i}=re(),n=ie(0),r=ie(!1),a=ie(!0);let o=0,s,l;const c=ye(()=>`vc-loading-bar vc-loading-bar--${e.position}`+(e.color!==void 0?` bg-${e.color}`:"")+(a.value===!0?"":" no-transition")),u=ye(()=>e.position==="top"||e.position==="bottom"),d=ye(()=>u.value===!0?"height":"width"),m=ye(()=>{const g=r.value,E=HM({p:n.value,pos:e.position,active:g,horiz:u.value,reverse:e.reverse,dir:1});return E[d.value]=e.size,E.opacity=g?1:0,E.position=e.positioning==="absolute"?"absolute":"fixed",E.backgroundColor=e.color,E}),f=ye(()=>r.value===!0?{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":n.value}:{"aria-hidden":"true"});function v(g=300){const E=l;return l=Math.max(0,g)||0,o++,o>1?(E===0&&g>0?_():E>0&&g<=0&&clearTimeout(s),o):(clearTimeout(s),t("start"),n.value=0,s=setTimeout(()=>{a.value=!0,g>0&&_()},r.value===!0?500:1),r.value!==!0&&(r.value=!0,a.value=!1),o)}function C(g){return o>0&&(n.value=WM(n.value,g)),o}function b(){if(o=Math.max(0,o-1),o>0)return o;clearTimeout(s),t("stop");const g=()=>{a.value=!0,n.value=100,s=setTimeout(()=>{r.value=!1},1e3)};n.value===0?s=setTimeout(g,1):g()}function _(){n.value<100&&(s=setTimeout(()=>{C(),_()},l))}let M;return Sr(()=>{e.skipHijack!==!0&&(M=!0,qM({start:v,stop:b,hijackFilter:ye(()=>e.hijackFilter||null)}))}),wn(()=>{clearTimeout(s),M===!0&&ZM(v)}),Object.assign(i,{start:v,stop:b,increment:C}),()=>P("div",{class:c.value,style:m.value,...f.value})}});const QM={dark:{type:Boolean,default:null}};function XM(e){return ye(()=>e.dark)}const km=["text","rect","circle","VcBtn","VcBadge","VcChip","VcToolbar","VcCheckbox","VcRadio","VcToggle","VcSlider","VcRange","VcInput","VcAvatar"],Nm=["wave","pulse","pulse-x","pulse-y","fade","blink","none"],zm={...QM,tag:{type:String,default:"div"},type:{type:String,validator:e=>km.includes(e),default:"rect"},animation:{type:String,validator:e=>Nm.includes(e),default:"wave"},square:Boolean,bordered:Boolean,size:String,width:String,height:String};var Vm=te({name:"VcSkeleton",props:zm,setup(e,{slots:t}){const i=XM(e),n=ye(()=>e.size!==void 0?{width:e.size,height:e.size}:{width:e.width,height:e.height}),r=ye(()=>`vc-skeleton vc-skeleton--${i.value===!0?"dark":"light"} vc-skeleton--type-${e.type}`+(e.animation!=="none"?` vc-skeleton--anim vc-skeleton--anim-${e.animation}`:"")+(e.square===!0?" vc-skeleton--square":"")+(e.bordered===!0?" vc-skeleton--bordered":""));return()=>P(e.tag,{class:r.value,style:n.value},Ke(t.default))}});const YM=["top","right","bottom","left"],$m={type:{type:String,default:"a"},outline:Boolean,push:Boolean,flat:Boolean,unelevated:Boolean,color:String,textColor:String,glossy:Boolean,square:Boolean,padding:String,size:String,label:{type:[String,Number],default:""},labelPosition:{type:String,default:"right",validator:e=>YM.includes(e)},externalLabel:Boolean,hideLabel:{type:Boolean},labelClass:[Array,String,Object],labelStyle:[Array,String,Object],disable:Boolean,tabindex:[Number,String]};function Gm(e,t){return{formClass:ye(()=>`vc-fab--form-${e.square===!0?"square":"rounded"}`),stacked:ye(()=>e.externalLabel===!1&&["top","bottom"].includes(e.labelPosition)),labelProps:ye(()=>{if(e.externalLabel===!0){const i=e.hideLabel===null?t.value===!1:e.hideLabel;return{action:"push",data:{class:[e.labelClass,`vc-fab__label vc-tooltip--style vc-fab__label--external vc-fab__label--external-${e.labelPosition}`+(i===!0?" vc-fab__label--external-hidden":"")],style:e.labelStyle}}}return{action:["left","top"].includes(e.labelPosition)?"unshift":"push",data:{class:[e.labelClass,`vc-fab__label vc-fab__label--internal vc-fab__label--internal-${e.labelPosition}`+(e.hideLabel===!0?" vc-fab__label--internal-hidden":"")],style:e.labelStyle}}})}}const JM=["up","right","down","left"],KM=["left","center","right"],e5={...$m,...Om,icon:String,activeIcon:String,hideActionOnClick:{type:Boolean,default:!0},hideIcon:Boolean,hideLabel:{type:Boolean,default:!0},direction:{type:String,default:"right",validator:e=>JM.includes(e)},persistent:Boolean,stacked:Boolean,verticalActionsAlign:{type:String,default:"center",validator:e=>KM.includes(e)}};var t5=e5;const Um=t5;var Hm=te({name:"VcFab",props:Um,emits:Pm,setup(e,{slots:t}){const i=ie(null),n=ie(e.modelValue===!0),{formClass:r,labelProps:a}=Gm(e,n),o=ye(()=>e.persistent!==!0),{hide:s,toggle:l}=Mm({showing:n,hideOnRouteChange:o}),c=ye(()=>({opened:n.value})),u=ye(()=>`vc-fab z-fab row inline justify-center vc-fab--align-${e.verticalActionsAlign} ${r.value}`+(n.value===!0?" vc-fab--opened":" vc-fab--closed")),d=ye(()=>`vc-fab__actions flex no-wrap inline vc-fab__actions--${e.direction} vc-fab__actions--${n.value===!0?"opened":"closed"}`),m=ye(()=>`vc-fab__icon-holder vc-fab__icon-holder--${n.value===!0?"opened":"closed"}`);function f(C,b){const _=t[C],M=`q-fab__${C} absolute-full`;return _===void 0?P(sr,{class:M,name:e[C]}):P("div",{class:M},_(c.value))}function v(){const C=[];return e.hideIcon!==!0&&C.push(P("div",{class:m.value},[f("icon"),f("active-icon")])),(e.label!==""||t.label!==void 0)&&C[a.value.action](P("div",a.value.data,t.label!==void 0?t.label(c.value):[e.label])),gi(t.tooltip,C)}return on(Ou,{showing:n,onChildClick(C){e.hideActionOnClick&&s(C),i.value!==null&&i.value.$el.focus()}}),()=>P("div",{class:u.value},[P(Pa,{ref:i,class:r.value,...e,noWrap:!0,stack:e.stacked,align:void 0,icon:void 0,label:void 0,noCaps:!0,fab:!0,flat:e.flat,size:e.size,"aria-expanded":n.value===!0?"true":"false","aria-haspopup":"true",onClick:l},v),P("div",{class:d.value},Ke(t.default))])}});const Wm={start:"self-end",center:"self-center",end:"self-start"},i5=Object.keys(Wm),n5={...$m,icon:{type:String,default:""},stacked:Boolean,anchor:{type:String,validator:e=>i5.includes(e)},to:[String,Object],replace:Boolean};var r5=n5;const qm=r5;var Zm=te({name:"VcFabAction",props:qm,emits:["click"],setup(e,{slots:t,emit:i}){const n=Po(Ou),{formClass:r,labelProps:a}=Gm(e,n==null?void 0:n.showing),o=ye(()=>{let d;return e.anchor&&(d=Wm[e.anchor]),r.value+(d!==void 0?` ${d}`:"")}),s=ye(()=>{var d;return e.disable===!0||((d=n==null?void 0:n.showing)==null?void 0:d.value)!==!0});function l(d){var m;(m=n==null?void 0:n.onChildClick)==null||m.call(n,d),i("click",d)}function c(){const d=[];return e.icon!==""&&d.push(P(sr,{name:e.icon})),e.label!==""&&d[a.value.action](P("div",a.value.data,[e.label])),gi(t.default,d)}const u=re();return Object.assign(u==null?void 0:u.proxy,{click:l}),()=>P(Pa,{class:o.value,...e,noWrap:!0,stack:e.stacked,icon:void 0,label:void 0,noCaps:!0,fabMini:!0,disable:s.value,size:e.size,onClick:l},c)}});const o5=[Pa,sr,Jl,Kl,ec,tc,ic,nc,rc,oc,ac,sc,lc,Oa,Lm,Fm,Vm,Hm,Zm];o5.forEach(e=>{e.install=t=>{t.component(e.name,e)}});const ri=Pa,hn=sr,Qm=Jl,Ta=Kl,Xm=ec,Ym=tc,Jm=ic,mc=nc,fc=rc,pc=oc,vc=ac,Km=sc,gc=lc,ef=Oa,Pt=Lm,tf=Fm,yc=Vm,bc=Hm,Aa=Zm,Ce={beforeLoad:e=>!0,ready:e=>!0,unready:e=>!0,destroyed:e=>!0},no={mousedown:e=>!0,mouseup:e=>!0,click:e=>!0,clickout:e=>!0,dblclick:e=>!0,mousemove:e=>!0,mouseover:e=>!0,mouseout:e=>!0},ro={...Ce,definitionChanged:e=>!0},nt={...Ce,errorEvent:e=>!0,readyPromise:(e,t,i)=>!0},mn={...Ce,...no,readyPromise:(e,t,i)=>!0,"update:geometryInstances":e=>!0},wi={...Ce,...no},oo={...Ce,...no,definitionChanged:e=>!0,clusterEvent:(e,t)=>!0,collectionChanged:(e,t,i,n)=>!0,changedEvent:e=>!0,errorEvent:(e,t)=>!0,loadingEvent:(e,t)=>!0,refreshEvent:(e,t)=>!0,unsupportedNodeEvent:(e,t,i,n,r,a,o)=>!0},vt={...Ce,activeEvt:(e,t)=>!0,drawEvt:(e,t)=>!0,editorEvt:(e,t)=>!0,mouseEvt:(e,t)=>!0},a5={...Ce,cesiumReady:e=>!0,viewerWidgetResized:e=>!0,selectedEntityChanged:e=>!0,trackedEntityChanged:e=>!0,layerAdded:(e,t)=>!0,layerMoved:(e,t,i)=>!0,layerRemoved:(e,t)=>!0,layerShownOrHidden:(e,t,i)=>!0,dataSourceAdded:(e,t)=>!0,dataSourceMoved:(e,t,i)=>!0,dataSourceRemoved:(e,t)=>!0,collectionChanged:(e,t,i,n)=>!0,morphComplete:(e,t,i,n)=>!0,morphStart:(e,t,i,n)=>!0,postRender:(e,t)=>!0,preRender:(e,t)=>!0,postUpdate:(e,t)=>!0,preUpdate:(e,t)=>!0,renderError:(e,t)=>!0,terrainProviderChanged:e=>!0,changed:e=>!0,moveEnd:()=>!0,moveStart:()=>!0,onStop:e=>!0,onTick:e=>!0,errorEvent:e=>!0,cameraClicked:e=>!0,closeClicked:e=>!0,leftClick:e=>!0,leftDoubleClick:e=>!0,leftDown:e=>!0,leftUp:e=>!0,middleClick:e=>!0,middleDown:e=>!0,middleUp:e=>!0,mouseMove:e=>!0,pinchStart:e=>!0,pinchMove:e=>!0,pinchEnd:()=>!0,rightClick:e=>!0,rightDown:e=>!0,rightUp:e=>!0,wheel:e=>!0,imageryLayersUpdatedEvent:()=>!0,tileLoadProgressEvent:e=>!0,touchEnd:e=>!0};var Da=te({name:"VcViewer",props:gm,emits:a5,setup(e,t){const i=re();i.cesiumEvents=["selectedEntityChanged","trackedEntityChanged"],i.cesiumMembersEvents=ym;const n=rM(e,t,i),r=ye(()=>e.containerId||t.attrs.id||"cesiumContainer");on(zi,n.getServices()),i.appContext.config.globalProperties.$VueCesium=i.appContext.config.globalProperties.$VueCesium||{},i.appContext.config.globalProperties.$VueCesium[r.value]=n.getServices(),Object.assign(i.proxy,{creatingPromise:n.creatingPromise,load:n.load,unload:n.unload,reload:n.reload,cesiumObject:i.cesiumObject,getCesiumObject:()=>i.cesiumObject});const a=o=>{t.emit("touchEnd",o)};return()=>{var o;const s=[];return Ye(e.skeleton)&&!n.isReady.value?s.push(P(yc,{...e.skeleton,style:{background:e.skeleton.color,width:"100%",height:"100%"}})):s.push(ne("v-if")),s.push(ne("vc-viewer"),_u(P("div",{ref:n.viewerRef,class:ae(((o=i.proxy)==null?void 0:o.$options.name)||""),id:r.value,style:t.attrs.style||{width:"100%",height:"100%"}},Ke(t.slots.default)),[[ba,a,e.touchHoldArg]])),s}}});Da.install=(e,t)=>{e.component(Da.name,Da)};const nf=Da,rf=nf,fn={position:{type:String,default:"top-right",validator:e=>["top-right","top-left","bottom-right","bottom-left","top","right","bottom","left"].includes(e)},offset:{type:Array,validator:e=>e.length===2}};function di(e,t){const i=ye(()=>{const c=e.position;return{top:c.indexOf("top")>-1,right:c.indexOf("right")>-1,bottom:c.indexOf("bottom")>-1,left:c.indexOf("left")>-1,vertical:c==="top"||c==="bottom",horizontal:c==="left"||c==="right"}}),n=ie(0),r=ie(0),a=ie(0),o=ie(0),s=ye(()=>{let c=0,u=0;const d=i.value,m=1;d.top===!0&&n.value!==0?u=`${n.value}px`:d.bottom===!0&&o.value!==0&&(u=`${-o.value}px`),d.left===!0&&a.value!==0?c=`${m*a.value}px`:d.right===!0&&r.value!==0&&(c=`${-m*r.value}px`);const f={transform:`translate(${c}, ${u})`};return e.offset&&(f.margin=`${e.offset[1]}px ${e.offset[0]}px`),d.vertical===!0?(a.value!==0&&(f.right=`${a.value}px`),r.value!==0&&(f.left=`${r.value}px`)):d.horizontal===!0&&(n.value!==0&&(f.top=`${n.value}px`),o.value!==0&&(f.bottom=`${o.value}px`)),typeof e.teleportToViewer=="undefined"||e.teleportToViewer?f:{}}),l=ye(()=>typeof e.teleportToViewer=="undefined"||e.teleportToViewer?`absolute absolute-${e.position}`:"relative-position");return{attach:i,style:s,classes:l}}const Cc={enableCompassOuterRing:{type:Boolean,default:!0},duration:{type:Number,default:1.5},...fn,outerOptions:{type:Object,default:()=>({icon:"vc-icons-compass-outer",size:"96px",color:"#3f4854",background:"transparent",tooltip:{delay:1e3,anchor:"bottom middle",offset:[0,20],tip:void 0}})},innerOptions:{type:Object,default:()=>({icon:"vc-icons-compass-inner",size:"24px",color:"#3f4854",background:"#fff",tooltip:{delay:1e3,anchor:"bottom middle",offset:[0,20],tip:void 0}})},markerOptions:{type:Object,default:()=>({icon:"vc-icons-compass-rotation-marker",size:"96px",color:"#1976D2"})},customClass:{type:String,default:""},teleportToViewer:{type:Boolean,default:!0}},wc=vi(Cc);class s5{static createTween(t,i){const{Cartesian2:n,Cartesian3:r,defaultValue:a,defined:o,DeveloperError:s,EasingFunction:l,Math:c,SceneMode:u}=Cesium;i=a(i,{});let d=i.destination;if(!o(t))throw new s("scene is required.");if(!o(d))throw new s("destination is required.");const m=t.mode;if(m===u.MORPHING)return xc();const f=a(i.convert,!0),v=t.mapProjection,C=v.ellipsoid,b=i.maximumHeight,_=i.flyOverLongitude,M=i.flyOverLongitudeWeight,g=i.pitchAdjustHeight;let E=i.easingFunction;f&&m!==u.SCENE3D&&(C.cartesianToCartographic(d,sf),d=v.project(sf,y5));const T=t.camera,A=i.endTransform;o(A)&&T._setTransform(A);let R=i.duration;o(R)||(R=Math.ceil(r.distance(T.position,d)/1e6)+2,R=Math.min(R,3));const I=a(i.heading,0),j=a(i.pitch,-c.PI_OVER_TWO),W=a(i.roll,0),$=t.screenSpaceCameraController;$.enableInputs=!1;const k=lf($,i.complete),h=lf($,i.cancel),p=T.frustum;let y=t.mode===u.SCENE2D;if(y=y&&n.equalsEpsilon(T.position,d,c.EPSILON6),y=y&&c.equalsEpsilon(Math.max(p.right-p.left,p.top-p.bottom),d.z,c.EPSILON6),y=y||t.mode!==u.SCENE2D&&r.equalsEpsilon(d,T.position,c.EPSILON10),y=y&&c.equalsEpsilon(c.negativePiToPi(I),c.negativePiToPi(T.heading),c.EPSILON10)&&c.equalsEpsilon(c.negativePiToPi(j),c.negativePiToPi(T.pitch),c.EPSILON10)&&c.equalsEpsilon(c.negativePiToPi(W),c.negativePiToPi(T.roll),c.EPSILON10),y)return xc(k,h);const O=new Array(4);if(O[u.SCENE2D]=g5,O[u.SCENE3D]=v5,O[u.COLUMBUS_VIEW]=d5,R<=0)return xc(function(){O[m](t,1,d,I,j,W,b,_,M,g)({time:1}),typeof k=="function"&&k()},h);const x=O[m](t,R,d,I,j,W,b,_,M,g);if(!o(E)){const w=T.positionCartographic.height,D=m===u.SCENE3D?C.cartesianToCartographic(d).height:d.z;w>D&&w>11500?E=l.CUBIC_OUT:E=l.QUINTIC_IN_OUT}return{duration:R,easingFunction:E,startObject:{time:0},stopObject:{time:R},update:x,complete:k,cancel:h}}}function l5(e,t,i){const{PerspectiveFrustum:n,PerspectiveOffCenterFrustum:r}=Cesium;let a,o,s;if(e instanceof n){const l=Math.tan(.5*e.fovy);return a=e.near,o=e.near*l,s=e.aspectRatio*o,Math.max(t*a/s,i*a/o)}else if(e instanceof r)return a=e.near,o=e.top,s=e.right,Math.max(t*a/s,i*a/o);return Math.max(t,i)}const c5={},of={};function u5(e,t,i,n){const{defined:r,Math:a}=Cesium;if(r(n)&&i(.5)>n){const o=i(0),s=i(1),l=i(.5),c=l-o,u=l-s;return function(d){const m=i(d);if(d<=.5){const v=(m-o)/c;return a.lerp(e,-a.PI_OVER_TWO,v)}const f=(m-s)/u;return a.lerp(-a.PI_OVER_TWO,t,1-f)}}return function(o){return a.lerp(e,t,o)}}function _c(e,t,i,n,r){const{Cartesian3:a,defined:o,Math:s}=Cesium;let l=r;const c=Math.max(i,n);if(!o(l)){const u=e.position,d=t,m=e.up,f=e.right,v=e.frustum,C=a.subtract(u,d,c5),b=a.magnitude(a.multiplyByScalar(m,a.dot(C,m),of)),_=a.magnitude(a.multiplyByScalar(f,a.dot(C,f),of));l=Math.min(l5(v,b,_)*.2,1e9)}if(c<l){const m=-Math.pow((l-i)*1e6,.125),f=Math.pow((l-n)*1e6,1/8);return function(v){const C=v*(f-m)+m;return-Math.pow(C,8)/1e6+l}}return function(u){return s.lerp(i,n,u)}}function ao(e,t){const{Math:i}=Cesium;return i.equalsEpsilon(e,i.TWO_PI,i.EPSILON11)&&(e=0),t>e+Math.PI?e+=i.TWO_PI:t<e-Math.PI&&(e-=i.TWO_PI),e}const af={};function d5(e,t,i,n,r,a,o){const{Cartesian2:s,Cartesian3:l,Math:c}=Cesium,u=e.camera,d=l.clone(u.position,af),m=u.pitch,f=ao(u.heading,n),v=ao(u.roll,a),C=_c(u,i,d.z,i.z,o);function b(_){const M=_.time/t;u.setView({orientation:{heading:c.lerp(f,n,M),pitch:c.lerp(m,r,M),roll:c.lerp(v,a,M)}}),s.lerp(d,i,M,u.position),u.position.z=C(M)}return b}function h5(e,t){const{Math:i}=Cesium;e.longitude<t.longitude?e.longitude+=i.TWO_PI:t.longitude+=i.TWO_PI}function m5(e,t){const{Math:i}=Cesium,n=e.longitude-t.longitude;n<-i.PI?e.longitude+=i.TWO_PI:n>i.PI&&(t.longitude+=i.TWO_PI)}const f5={},p5={};function v5(e,t,i,n,r,a,o,s,l,c){const{Cartesian3:u,Cartographic:d,defined:m,Math:f}=Cesium,v=e.camera,b=e.mapProjection.ellipsoid,_=d.clone(v.positionCartographic,f5),M=v.pitch,g=ao(v.heading,n),E=ao(v.roll,a),T=b.cartesianToCartographic(i,p5);_.longitude=f.zeroToTwoPi(_.longitude),T.longitude=f.zeroToTwoPi(T.longitude);let A=!1;if(m(s)){const W=f.zeroToTwoPi(s),$=Math.min(_.longitude,T.longitude),k=Math.max(_.longitude,T.longitude),h=W>=$&&W<=k;if(m(l)){const p=Math.abs(_.longitude-T.longitude),y=f.TWO_PI-p;(h?p:y)<(h?y:p)*l&&!h&&(A=!0)}else h||(A=!0)}A?h5(_,T):m5(_,T);const R=_c(v,i,_.height,T.height,o),I=u5(M,r,R,c);function j(){const W=_.longitude,$=T.longitude,k=_.latitude,h=T.latitude;return function(y){const O=y.time/t,x=u.fromRadians(f.lerp(W,$,O),f.lerp(k,h,O),R(O),e.globe.ellipsoid);v.setView({destination:x,orientation:{heading:f.lerp(g,n,O),pitch:I(O),roll:f.lerp(E,a,O)}})}}return j()}function g5(e,t,i,n,r,a,o){const{Cartesian2:s,Cartesian3:l,Math:c}=Cesium,u=e.camera,d=l.clone(u.position,af),m=ao(u.heading,n),f=u.frustum.right-u.frustum.left,v=_c(u,i,f,i.z,o);function C(b){const _=b.time/t;u.setView({orientation:{heading:c.lerp(m,n,_)}}),s.lerp(d,i,_,u.position);const M=v(_),g=u.frustum,E=g.top/g.right,T=(M-(g.right-g.left))*.5;g.right+=T,g.left-=T,g.top=E*g.right,g.bottom=-g.top}return C}const sf={},y5={};function xc(e,t){return{startObject:{},stopObject:{},duration:0,complete:e,cancel:t}}function lf(e,t){function i(){typeof t=="function"&&t(),e.enableInputs=!0}return i}var cf=s5;function b5(e,{emit:t},i){const n={},r={},a={},o={};let s,l,c,u,d;const m=ie(0),f=ie(0),v=ie(0);let C=0,b={},_=!1,M,g,E=0,T={},A=0;const R=ie(null),I=ie(null),j=w=>{var D,S;w.stopPropagation&&w.stopPropagation(),w.preventDefault&&w.preventDefault(),(D=oe(R))==null||D.hide(),(S=oe(I))==null||S.hide();const{SceneMode:B,Cartesian2:F}=Cesium;if(i.viewer.scene.mode===B.MORPHING)return!0;const q=w.currentTarget,U=q.getBoundingClientRect(),K=U.width/2,N=new F((U.right-U.left)/2,(U.bottom-U.top)/2);let L;w instanceof MouseEvent?L=new F(w.clientX-U.left,w.clientY-U.top):w instanceof TouchEvent&&(L=new F(w.changedTouches[0].clientX-U.left,w.changedTouches[0].clientY-U.top));const H=F.subtract(L,N,n),Q=F.magnitude(H)/K;if(Q<50/145)h(q,H);else if(Q<1)p(q,H);else return!0},W=w=>{const{Cartesian2:D,Cartesian3:S,defined:B,Ellipsoid:F,Matrix4:G,Ray:q,SceneMode:U,Transforms:K}=Cesium,{viewer:N}=i,L=N.scene,H=L.camera,z=L.screenSpaceCameraController;if(L.mode===U.MORPHING||!z.enableInputs)return!0;if(L.mode===U.COLUMBUS_VIEW&&!z.enableTranslate||(L.mode===U.SCENE3D||L.mode===U.COLUMBUS_VIEW)&&(!z.enableLook||L.mode===U.SCENE3D&&!z.enableRotate))return;const Q=new D;Q.x=L.canvas.clientWidth/2,Q.y=L.canvas.clientHeight/2;const Z=new q,J=H.getPickRay(Q,Z),X=L.globe.pick(J,L,o);if(!Pn(X)||!B(X)){N.camera.flyHome();return}const ee=Me(i,"compassEvt");ee&&t("compassEvt",{type:"reset",camera:N.camera,status:"start",target:w.currentTarget});const Y=K.eastNorthUpToFixedFrame(X,N.scene.globe.ellipsoid),le=S.subtract(X,H.position,new S),ce=cf.createTween(L,{destination:G.multiplyByPoint(Y,new S(0,0,S.magnitude(le)),new S),direction:G.multiplyByPointAsVector(Y,new S(0,0,-1),new S),up:G.multiplyByPointAsVector(Y,new S(0,1,0),new S),duration:e.duration,complete:()=>{ee&&t("compassEvt",{type:"reset",camera:N.camera,status:"end",target:w.currentTarget})},cancel:()=>{ee&&t("compassEvt",{type:"reset",camera:N.camera,status:"cancel",target:w.currentTarget})}});L.tweens.add(ce)},$=()=>{v.value=0,f.value=0},k=()=>{const{defined:w}=Cesium;w(i.viewer)?(s&&(s(),s=void 0),s=i.viewer.scene.postRender.addEventListener(function(){m.value!==i.viewer.scene.camera.heading&&(m.value=i.viewer.scene.camera.heading)})):s&&(s(),s=void 0)},h=(w,D)=>{const{Cartesian2:S,Cartesian3:B,defined:F,getTimestamp:G,Math:q,Matrix4:U,Ray:K,SceneMode:N,Transforms:L}=Cesium;let H=i.viewer.scene,z=H.camera;const Q=H.screenSpaceCameraController;if(H.mode===N.MORPHING||!Q.enableInputs)return;switch(H.mode){case N.COLUMBUS_VIEW:if(Q.enableLook)break;if(!Q.enableTranslate||!Q.enableTilt)return;break;case N.SCENE3D:if(Q.enableLook)break;if(!Q.enableTilt||!Q.enableRotate)return;break;case Cesium.SceneMode.SCENE2D:if(!Q.enableTranslate)return;break}const Z=Me(i,"compassEvt");Z&&t("compassEvt",{type:"orbit",camera:H.camera,status:"start",target:w}),document.removeEventListener("mousemove",c,!1),document.removeEventListener("mouseup",u,!1),document.removeEventListener("touchmove",c,!1),document.removeEventListener("touchend",u,!1),F(d)&&i.viewer.clock.onTick.removeEventListener(d),c=void 0,u=void 0,d=void 0,C=G();const J=new S;J.x=H.canvas.clientWidth/2,J.y=H.canvas.clientHeight/2;const X=new K,ee=z.getPickRay(J,X),Y=H.globe.pick(ee,H,o);F(Y)?(b=L.eastNorthUpToFixedFrame(Y||new Cesium.Cartesian3,H.globe.ellipsoid,a),_=!1):(b=L.eastNorthUpToFixedFrame(z.positionWC,H.globe.ellipsoid,a),_=!0),d=function(ce){const me=G(),de=me-C,ge=(v.value-.5)*2.5/1e3,be=de*ge,ve=f.value+q.PI_OVER_TWO,ue=Math.cos(ve)*be,xe=Math.sin(ve)*be;H=i.viewer.scene,z=H.camera;const V=U.clone(z.transform,r);z.lookAtTransform(b),_?(z.look(B.UNIT_Z,-ue),z.look(z.right,-xe)):(z.rotateLeft(ue),z.rotateUp(xe)),z.lookAtTransform(V),C=me};function le(ce,me){const de=Math.atan2(-ce.y,ce.x);f.value=q.zeroToTwoPi(de-q.PI_OVER_TWO);const ge=S.magnitude(ce),be=me/2,ve=Math.min(ge/be,1),ue=.5*ve*ve+.5;v.value=ue}c=function(ce){const me=w.getBoundingClientRect(),de=new S((me.right-me.left)/2,(me.bottom-me.top)/2);let ge;ce instanceof MouseEvent?ge=new S(ce.clientX-me.left,ce.clientY-me.top):ce instanceof TouchEvent&&(ge=new S(ce.changedTouches[0].clientX-me.left,ce.changedTouches[0].clientY-me.top));const be=S.subtract(ge,de,n);le(be,me.width),Z&&t("compassEvt",{type:"orbit",camera:H.camera,status:"changing",target:w})},u=function(ce){document.removeEventListener("mousemove",c,!1),document.removeEventListener("mouseup",u,!1),document.removeEventListener("touchmove",c,!1),document.removeEventListener("touchend",u,!1),F(d)&&i.viewer.clock.onTick.removeEventListener(d),c=void 0,u=void 0,d=void 0,$(),Z&&t("compassEvt",{type:"orbit",camera:H.camera,status:"end",target:w})},document.addEventListener("mousemove",c,!1),document.addEventListener("mouseup",u,!1),document.addEventListener("touchmove",c,!1),document.addEventListener("touchend",u,!1),l=i.viewer.clock.onTick.addEventListener(d),le(D,w.getBoundingClientRect().width)},p=(w,D)=>{if(!e.enableCompassOuterRing)return;const S=i.viewer.scene;let B=S.camera;const F=S.screenSpaceCameraController;if(S.mode===Cesium.SceneMode.MORPHING||S.mode===Cesium.SceneMode.SCENE2D||!F.enableInputs||!F.enableLook&&(S.mode===Cesium.SceneMode.COLUMBUS_VIEW||S.mode===Cesium.SceneMode.SCENE3D&&!F.enableRotate))return;document.removeEventListener("mousemove",g,!1),document.removeEventListener("touchmove",g,!1),document.removeEventListener("mouseup",M,!1),document.removeEventListener("touchend",M,!1);const{Cartesian2:G,Cartesian3:q,defined:U,Math:K,Matrix4:N,Ray:L,Transforms:H}=Cesium;g=void 0,M=void 0;const z=Me(i,"compassEvt");z&&t("compassEvt",{type:"rotate",camera:S.camera,status:"start",target:w}),E=Math.atan2(-D.y,D.x);const Q=new G;Q.x=S.canvas.clientWidth/2,Q.y=S.canvas.clientHeight/2;const Z=new L,J=B.getPickRay(Q,Z),X=S.globe.pick(J,S,o);U(X)?T=H.eastNorthUpToFixedFrame(X||new q,S.globe.ellipsoid,a):T=H.eastNorthUpToFixedFrame(B.positionWC,S.globe.ellipsoid,a);let ee=N.clone(B.transform,r);B.lookAtTransform(T),A=Math.atan2(B.position.y,B.position.x),q.magnitude(new q(B.position.x,B.position.y,0)),B.lookAtTransform(ee),g=function(Y){const le=w.getBoundingClientRect(),ce=new G((le.right-le.left)/2,(le.bottom-le.top)/2);let me;Y instanceof MouseEvent?me=new G(Y.clientX-le.left,Y.clientY-le.top):Y instanceof TouchEvent&&(me=new G(Y.changedTouches[0].clientX-le.left,Y.changedTouches[0].clientY-le.top));const de=G.subtract(me,ce,n),be=Math.atan2(-de.y,de.x)-E,ve=K.zeroToTwoPi(A-be);B=i.viewer.scene.camera,ee=N.clone(B.transform,r),B.lookAtTransform(T);const ue=Math.atan2(B.position.y,B.position.x);B.rotateRight(ve-ue),B.lookAtTransform(ee),z&&t("compassEvt",{type:"rotate",camera:S.camera,status:"changing",target:w})},M=function(Y){document.removeEventListener("mousemove",g,!1),document.removeEventListener("touchmove",g,!1),document.removeEventListener("mouseup",M,!1),document.removeEventListener("touchend",M,!1),g=void 0,M=void 0,z&&t("compassEvt",{type:"rotate",camera:S.camera,status:"end",target:w})},document.addEventListener("mousemove",g,!1),document.addEventListener("touchmove",g,!1),document.addEventListener("mouseup",M,!1),document.addEventListener("touchend",M,!1)};return{heading:m,orbitCursorAngle:f,orbitCursorOpacity:v,handleDoubleClick:W,handleMouseDown:j,resetRotater:$,onTooltipBeforeShow:w=>{(g!==void 0||c!==void 0)&&(w.cancel=!0)},viewerChange:k,load:async w=>(i.viewer=w,k(),!0),unload:async()=>(document.removeEventListener("mousemove",c,!1),document.removeEventListener("mouseup",u,!1),document.removeEventListener("touchmove",c,!1),document.removeEventListener("touchend",u,!1),l&&l(),s&&s(),!0),iconOuterTooltipRef:R,iconInnerTooltipRef:I}}const C5={...Ce,compassEvt:e=>!0},uf=Cc;var Ec=te({name:"VcCompass",props:uf,emits:C5,setup(e,t){var i;const n=re();n.cesiumClass="VcCompass";const r=Be(e,t,n);if(r===void 0)return;const{t:a}=Ct(),o=xt(n),{$services:s}=r,l=b5(e,t,n),c=di(e),u=ie(null),d=ie(null),m=((i=o.proxy)==null?void 0:i.$options.name)==="VcNavigation",f=ie(m),v=Pe({});fe(()=>e,A=>{De(()=>{!n.mounted||T()})},{deep:!0});const C=ye(()=>Object.assign({},wc.innerOptions,e.innerOptions)),b=ye(()=>Object.assign({},wc.outerOptions,e.outerOptions)),_=ye(()=>Object.assign({},wc.markerOptions,e.markerOptions)),M=ye(()=>({transform:"translate(-50%,-50%) rotate(-"+l.heading.value+"rad)",WebkitTransform:"translate(-50%,-50%) rotate(-"+l.heading.value+"rad)",opacity:void 0,background:b.value.background,color:b.value.color})),g=ye(()=>({transform:"rotate(-"+l.orbitCursorAngle.value+"rad)",WebkitTransform:"rotate(-"+l.orbitCursorAngle.value+"rad)",opacity:l.orbitCursorOpacity.value,color:_.value.color})),E=ye(()=>({background:C.value.background,color:C.value.color}));n.createCesiumObject=async()=>{f.value=!0;const{viewer:A}=s;return new Promise((R,I)=>{De(()=>{!m&&e.teleportToViewer&&A._element.appendChild(oe(u)),R(oe(u))})})},n.mount=async()=>{var A;T();const{viewer:R}=s;return(A=R.viewerWidgetResized)==null||A.raiseEvent({type:n.cesiumClass,status:"mounted",target:oe(u)}),l.load(s.viewer)},n.unmount=async()=>{var A;const{viewer:R}=s,I=R._element;return m||I.contains(oe(u))&&I.removeChild(oe(u)),(A=R.viewerWidgetResized)==null||A.raiseEvent({type:n.cesiumClass,status:"unmounted",target:oe(u)}),l.unload()};const T=()=>{var A;const R=c.style.value,I=(A=oe(d))==null?void 0:A.$el;if(I!==void 0){const j=I.getBoundingClientRect();R.width=`${j.width}px`,R.height=`${j.height}px`}if(typeof e.teleportToViewer=="undefined"||e.teleportToViewer){v.left=R.left,v.top=R.top,v.transform=R.transform;const j=c.attach.value;I!==void 0&&((j.bottom||j.top)&&!j.left&&!j.right&&(R.left="50%",R.transform="translate(-50%, 0)"),(j.left||j.right)&&!j.top&&!j.bottom&&(R.top="50%",R.transform="translate(0, -50%)"))}Object.assign(v,R)};return()=>{if(f.value){let A=[];return A=gi(t.slots.default,A),A.push(P(ri,{ref:d,class:"vc-compass-outerRing absolute-center",style:M.value,size:b.value.size,dense:!0,round:!0,disabled:!e.enableCompassOuterRing},()=>[P(hn,{size:b.value.size,name:b.value.icon}),b.value.tooltip?P(Pt,{ref:l.iconOuterTooltipRef,...b.value.tooltip,onBeforeShow:l.onTooltipBeforeShow},()=>P("strong",{},b.value.tooltip.tip||a("vc.navigation.compass.outerTip"))):ne("v-if")])),A.push(P(ri,{class:"vc-compass-innerRing absolute-center",style:E.value,size:C.value.size,dense:!0,round:!0},()=>[P(hn,{size:C.value.size,name:C.value.icon}),C.value.tooltip?P(Pt,{ref:l.iconInnerTooltipRef,...C.value.tooltip,onBeforeShow:l.onTooltipBeforeShow},()=>P("strong",{},C.value.tooltip.tip||a("vc.navigation.compass.innerTip"))):ne("v-if")])),A.push(g.value.opacity?P(ri,{class:"vc-compass-rotation-marker absolute-center",dense:!0,round:!0},()=>[P(hn,{size:_.value.size,name:_.value.icon,style:g.value})]):ne("v-if")),P("div",{ref:u,class:`vc-compass ${c.classes.value} ${e.customClass}`,style:v,onDblclick:l.handleDoubleClick,onMousedown:l.handleMouseDown,onMouseup:l.resetRotater,onTouchend:l.resetRotater,onTouchstart:l.handleMouseDown},A)}else return ne("v-if")}}});const Oc={enableResetButton:{type:Boolean,default:!0},zoomAmount:{type:Number,default:2},duration:{type:Number,default:.5},durationReset:{type:Number},defaultResetView:{type:Object,default:()=>({position:{lng:105,lat:30,height:190595685e-1}})},overrideViewerCamera:{type:Boolean,default:!1},...fn,background:{type:String,default:"#3f4854"},border:{type:String,default:"solid 1px rgba(255, 255, 255, 0.2)"},borderRadius:{type:String,default:"100px"},direction:{type:String,default:"vertical",validator:e=>["vertical","horizontal"].includes(e)},zoomInOptions:{type:Object,default:()=>({icon:"vc-icons-zoom-in",size:"24px",color:"#fff",background:"transparent",round:!0,flat:!0,label:void 0,stack:!1,tooltip:{delay:500,anchor:"bottom middle",offset:[0,20],tip:void 0}})},zoomOutOptions:{type:Object,default:()=>({icon:"vc-icons-zoom-out",size:"24px",color:"#fff",background:"transparent",round:!0,flat:!0,label:void 0,stack:!1,tooltip:{delay:500,anchor:"bottom middle",offset:[0,20],tip:void 0}})},zoomResetOptions:{type:Object,default:()=>({icon:"vc-icons-reset",size:"24px",color:"#fff",background:"transparent",round:!0,flat:!0,label:void 0,stack:!1,tooltip:{delay:500,anchor:"bottom middle",offset:[0,20],tip:void 0}})},customClass:{type:String,default:""},teleportToViewer:{type:Boolean,default:!0}},Pc=vi(Oc);function w5(e,{emit:t},i,n){const r=ie(null),a=ie(null),o=ie(null),s=m=>{c(1/e.zoomAmount,m)},l=m=>{c(e.zoomAmount,m)},c=(m,f)=>{var v,C;(v=oe(r))==null||v.hide(),(C=oe(a))==null||C.hide();const{Cartesian3:b,defined:_,IntersectionTests:M,Ray:g,SceneMode:E}=Cesium,{viewer:T}=n;if(_(T)){const A=T.scene,R=A.screenSpaceCameraController;if(!R.enableInputs||!R.enableZoom||A.mode===E.COLUMBUS_VIEW&&!R.enableTranslate)return;const I=A.camera;let j;switch(A.mode){case E.MORPHING:break;case E.SCENE2D:{I.zoomIn(I.positionCartographic.height*(1-m));break}default:{let W;if(_(T.trackedEntity)?W=new Cesium.Cartesian3:W=d(T.scene),Cesium.defined(W))j={direction:I.direction,up:I.up};else{const D=new g(I.worldToCameraCoordinatesPoint(A.globe.ellipsoid.cartographicToCartesian(I.positionCartographic)),I.directionWC);W=M.grazingAltitudeLocation(D,A.globe.ellipsoid),j={heading:I.heading,pitch:I.pitch,roll:I.roll}}const $=new b,k=b.subtract(I.position,W,$),h=b.multiplyByScalar(k,m,k),p=b.add(W,h,W),y=m<1?"zoomIn":"zoomOut",O=f.currentTarget,x=Ws(I.positionCartographic.height).toFixed(0),w=Me(i,"zoomEvt");w&&t("zoomEvt",{type:y,camera:T.camera,status:"start",target:O,level:x}),Cesium.defined(T.trackedEntity)||A.mode===E.COLUMBUS_VIEW?I.position=p:I.flyTo({destination:p,orientation:j,duration:e.duration,convert:!1,complete:()=>{w&&t("zoomEvt",{type:y,camera:T.camera,status:"end",target:O,level:x})},cancel:()=>{w&&t("zoomEvt",{type:y,camera:T.camera,status:"cancel",target:O,level:x})}})}}}},u=m=>{var f;(f=oe(o))==null||f.hide();const{viewer:v}=n;if(!!v.scene.screenSpaceCameraController.enableInputs)if(Cesium.defined(v.trackedEntity)){const _=v.trackedEntity;v.trackedEntity=void 0,v.trackedEntity=_}else{const _=Me(i,"zoomEvt"),M=m.currentTarget,g=Ws(v.camera.positionCartographic.height).toFixed(0);_&&t("zoomEvt",{type:"zoomReset",camera:v.camera,status:"start",target:M,level:g});const E=()=>{_&&t("zoomEvt",{type:"zoomReset",camera:v.camera,status:"end",target:M,level:g})},T=()=>{_&&t("zoomEvt",{type:"zoomReset",camera:v.camera,status:"cancel",target:M,level:g})},A=e.defaultResetView,R={duration:e.durationReset,complete:E,cancel:T};kP(v,A,R)}},d=m=>{const{defined:f,IntersectionTests:v,Ray:C}=Cesium,b=new C(m.camera.positionWC,m.camera.directionWC),_=v.rayEllipsoid(b,m.globe.ellipsoid);return f(_)?C.getPoint(b,_.start):v.grazingAltitudeLocation(b,m.globe.ellipsoid)};return{zoomIn:s,zoomOut:l,zoomReset:u,zoomInTooltipRef:r,zoomOutTooltipRef:a,resetTooltipRef:o}}const _5={...Ce,zoomEvt:e=>!0},df=Oc;var Mc=te({name:"VcZoomControl",props:df,emits:_5,setup(e,t){var i;const n=re();n.cesiumClass="VcZoomControl",n.cesiumEvents=[];const r=Be(e,t,n);if(r===void 0)return;const{t:a}=Ct(),{$services:o}=r,s=w5(e,t,n,o),l=di(e),c=ie(null),u=ie(null),d=ie(null),m=ie(null),v=((i=xt(n).proxy)==null?void 0:i.$options.name)==="VcNavigation",C=ie(v),b=Pe({});fe(()=>e,A=>{De(()=>{!n.mounted||E()})},{deep:!0});const _=ye(()=>Object.assign({},Pc.zoomOutOptions,e.zoomOutOptions)),M=ye(()=>Object.assign({},Pc.zoomInOptions,e.zoomInOptions)),g=ye(()=>Object.assign({},Pc.zoomResetOptions,e.zoomResetOptions));n.createCesiumObject=async()=>new Promise((A,R)=>{C.value=!0,De(()=>{const{viewer:I}=o;if(e.overrideViewerCamera){const j=e.defaultResetView;Gs(I,j)}!v&&e.teleportToViewer&&I._element.appendChild(oe(c)),A(oe(c))})}),n.mount=async()=>{var A;E();const{viewer:R}=o;return(A=R.viewerWidgetResized)==null||A.raiseEvent({type:n.cesiumClass,status:"mounted",target:oe(c)}),!0},n.unmount=async()=>{var A;const{viewer:R}=o;if(!v){const I=R._element;I.contains(oe(c))&&I.removeChild(oe(c))}return(A=R.viewerWidgetResized)==null||A.raiseEvent({type:n.cesiumClass,status:"unmounted",target:oe(c)}),!0};const E=()=>{var A,R,I;const j=l.style.value;if(b.left=j.left,b.top=j.top,b.transform=j.transform,j.flexDirection=e.direction==="vertical"?"column":"row",j.background=e.background,j.borderRadius=e.borderRadius,j.border=e.border,!v){const W=(A=oe(u))==null?void 0:A.$el,$=(R=oe(d))==null?void 0:R.$el,k=(I=oe(m))==null?void 0:I.$el;let h=0,p=0;if(W!==void 0){const y=W.getBoundingClientRect();e.direction==="horizontal"?(h+=y.width,p=y.height>p?y.height:p):(p+=y.height,h=y.width>h?y.width:h)}if($!==void 0){const y=$.getBoundingClientRect();e.direction==="horizontal"?(h+=y.width,p=y.height>p?y.height:p):(p+=y.height,h=y.width>h?y.width:h)}if(k!==void 0){const y=k.getBoundingClientRect();e.direction==="horizontal"?(h+=y.width,p=y.height>p?y.height:p):(p+=y.height,h=y.width>h?y.width:h)}if(j.width=`${h+4}px`,j.height=`${p+4}px`,typeof e.teleportToViewer=="undefined"||e.teleportToViewer){const y=l.attach.value;(y.bottom||y.top)&&!y.left&&!y.right&&(j.left="50%",j.transform="translate(-50%, 0)"),(y.left||y.right)&&!y.top&&!y.bottom&&(j.top="50%",j.transform="translate(0, -50%)")}}Object.assign(b,j)},T=(A,R)=>{var I,j,W;let $,k,h,p;R==="zoomIn"?($=u,k=s.zoomInTooltipRef,h=((I=A.tooltip)==null?void 0:I.tip)||a("vc.navigation.zoomCotrol.zoomInTip"),p=s.zoomIn):R==="zoomOut"?($=m,k=s.zoomOutTooltipRef,h=((j=A.tooltip)==null?void 0:j.tip)||a("vc.navigation.zoomCotrol.zoomOutTip"),p=s.zoomOut):R==="zoomReset"&&($=d,k=s.resetTooltipRef,h=((W=A.tooltip)==null?void 0:W.tip)||a("vc.navigation.zoomCotrol.zoomResetTip"),p=s.zoomReset);const y=[];return y.push(P(hn,{name:A.icon,size:A.size})),y.push(P("div",null,A.label)),A.tooltip?y.push(P(Pt,{ref:k,...A.tooltip},()=>P("strong",null,h))):y.push(ne("v-if")),P(ri,{class:`vc-${ae(R)}`,ref:$,size:A.size,flat:A.flat,stack:A.stack,round:A.round,dense:!0,style:{color:A.color,background:A.background},onClick:p},()=>gi(t.slots.default,y))};return Object.assign(n.proxy,{zoomIn:()=>s.zoomIn,zoomOut:()=>s.zoomOut,zoomReset:()=>s.zoomReset}),()=>{if(C.value){const A=[];return A.push(P("li",null,T(M.value,"zoomIn"))),e.enableResetButton?A.push(P("li",null,T(g.value,"zoomReset"))):A.push(ne("v-if")),A.push(P("li",null,T(_.value,"zoomOut"))),P("div",{ref:c,class:`vc-zoom-control ${l.classes.value} ${e.customClass}`,style:b},P("ul",{class:"vc-list"},A))}else return ne("v-if")}}});const x5=te({name:"VcPrintView",props:{options:Object},setup(e){const t=ie(!1),i=ie(!1),n=re();n.cesiumClass="VcPrintView";const{t:r}=Ct(),a=()=>{var l,c;if(t.value)return;const u=(l=e.options)==null?void 0:l.printWindow.document.getElementsByTagName("img");if(u.length===0)return;let d=!0;for(let m=0;d&&m<u.length;++m)d=u[m].complete;d&&(s(),t.value=d,t.value&&!i.value&&(((c=e.options)==null?void 0:c.readyCallback)&&e.options.readyCallback(e.options.printWindow),i.value=!0))};let o;const s=()=>{o&&o()};return Sr(()=>{var l;const c=(l=e.options)==null?void 0:l.printWindow,u=window,d=c==null?void 0:c.setInterval(a,200),m=u.setInterval(a,200);o=()=>{c.clearInterval(d),u.clearInterval(m),o=void 0}}),ot(()=>{s()}),()=>{var l,c,u,d,m,f;const v=[];if(v.push(P("p",{},P("img",{src:(l=e.options)==null?void 0:l.image,alt:r("vc.navigation.screenshot"),class:"vc-map-image"}))),((c=e.options)==null?void 0:c.credits.length)&&((u=e.options)==null?void 0:u.showCredit)?v.push(P("h1",{},r("vc.navigation.credit"))):v.push(ne("v-if")),((d=e.options)==null?void 0:d.credits.length)&&((m=e.options)==null?void 0:m.showCredit)){const C=[];(f=e.options)==null||f.credits.forEach(b=>{C.push(P("li",{innerHTML:b}))}),v.push(P("ul",{},C))}else v.push(ne("v-if"));return P("div",{},v)}}});var E5=x5;const O5=`
.background {
width: 100%;
fill: rgba(255, 255, 255, 1.0);
}
.map-image {
max-width: 95vw;
max-height: 95vh;
}
.layer-legends {
display: inline;
float: left;
padding-left: 20px;
padding-right: 20px;
}
.layer-title {
font-weight: bold;
}
h1, h2, h3 {
clear: both;
}
`,P5=e=>{const{printWindow:t=window.open(),closeCallback:i,title:n}=e;i&&t.addEventListener("unload",()=>{i(t)}),t.document.open(),t.document.close(),t.document.head.innerHTML=`
<meta charset="UTF-8">
<title>${e.title}</title>
<style>${O5}</style>
`,t.document.body.innerHTML='<div id="print"></div>',e.printWindow=e.printWindow||t,o1(E5,{options:e}).mount(t.document.getElementById("print"))};var M5=P5,hf={showCredit:{type:Boolean,default:!0},printAutomatically:{type:Boolean,default:!1},showPrintView:{type:Boolean,default:!0},downloadAutomatically:{type:Boolean,default:!1},...fn,icon:{type:String,default:"vc-icons-capture"},size:{type:String,default:"24px"},color:{type:String,default:"#3f4854"},background:{type:String,default:"#fff"},round:{type:Boolean,default:!0},flat:{type:Boolean,default:!1},label:String,stack:{type:Boolean,default:!1},tooltip:{type:[Boolean,Object],default:()=>({delay:500,anchor:"bottom middle",offset:[0,20],tip:void 0})},screenshotName:String,customClass:{type:String,default:""},teleportToViewer:{type:Boolean,default:!0}};function S5(e){const t=or();let i=0;const n=setTimeout(function(){t.reject(!1)},1e4);function r(){clearTimeout(n)}function a(){i<=0&&t.resolve()}return e.matchMedia&&e.matchMedia("print").addListener(function(s){r(),s.matches?++i:(--i,a())}),e.onbeforeprint=function(){r(),++i},e.onafterprint=function(){r(),--i,a()},e.document.execCommand("print",!0,null)||e.print(),t.promise}const T5={...Ce,printEvt:e=>!0},mf=hf;var Sc=te({name:"VcPrint",props:mf,emits:T5,setup(e,t){var i;const n=re();n.cesiumClass="VcPrint",n.cesiumEvents=[];const r=Be(e,t,n);if(r===void 0)return;const{t:a}=Ct(),{$services:o}=r,s=ie(null),l=ie(null),c=ie(null),u=di(e),d=ie(!1),f=((i=xt(n).proxy)==null?void 0:i.$options.name)==="VcNavigation",v=ie(f),C=Pe({});fe(()=>e,R=>{De(()=>{!n.mounted||b()})},{deep:!0}),n.createCesiumObject=async()=>new Promise((R,I)=>{v.value=!0,De(()=>{const{viewer:j}=o;!f&&e.teleportToViewer&&j._element.appendChild(oe(s)),R(oe(s))})}),n.mount=async()=>{var R;b();const{viewer:I}=o;return(R=I.viewerWidgetResized)==null||R.raiseEvent({type:n.cesiumClass,status:"mounted",target:oe(s)}),!0},n.unmount=async()=>{var R;const I=o.viewer._element;f||I.contains(oe(s))&&I.removeChild(oe(s));const{viewer:j}=o;return(R=j.viewerWidgetResized)==null||R.raiseEvent({type:n.cesiumClass,status:"unmounted",target:oe(s)}),!0};const b=()=>{var R;const I=u.style.value;if(C.left=I.left,C.top=I.top,C.transform=I.transform,!f){const j=u.attach.value;((R=oe(c))==null?void 0:R.$el)!==void 0&&(typeof e.teleportToViewer=="undefined"||e.teleportToViewer)&&((j.bottom||j.top)&&!j.left&&!j.right&&(I.left="50%",I.transform="translate(-50%, 0)"),(j.left||j.right)&&!j.top&&!j.bottom&&(I.top="50%",I.transform="translate(0, -50%)"))}Object.assign(C,I)},_=()=>{var R;(R=oe(l))==null||R.hide();const{viewer:I}=o;FP(I).then(j=>{if(e.downloadAutomatically){const $=document.createElement("a");$.download=e.screenshotName||a("vc.navigation.print.screenshot"),$.style.display="none",$.href=j,document.body.appendChild($),$.click(),document.body.removeChild($)}(e.printAutomatically||e.showPrintView)&&(e.showPrintView?g(j):e.printAutomatically&&M(j)),Me(n,"printEvt")&&t.emit("printEvt",{type:"capture",image:j,status:"end"})})},M=R=>{E(!0,!0,R)},g=R=>{E(!1,!1,R)},E=(R,I,j)=>{d.value=!0;let W;R&&(W=document.createElement("iframe"),document.body.appendChild(W));const{viewer:$}=o;M5({image:j,showCredit:e.showCredit,credits:T($),printWindow:W?W.contentWindow:void 0,title:a("vc.navigation.print.printViewTitle"),readyCallback:k=>{I&&S5(k).catch(h=>{r.logger.warn(h)}).then(()=>{W&&document.body.removeChild(W),R&&(d.value=!1)})},closeCallback:k=>{R&&(d.value=!1)}}),R||(d.value=!1)},T=R=>R.scene.frameState.creditDisplay._currentFrameCredits.screenCredits.values.concat(R.scene.frameState.creditDisplay._currentFrameCredits.lightboxCredits.values).map(j=>j.html),A=R=>{d.value&&(R.cancel=!0)};return()=>{if(v.value){const R=[];R.push(P(hn,{name:e.icon,size:e.size})),R.push(P("div",null,e.label)),Ye(e.tooltip)?R.push(P(Pt,{ref:l,onBeforeShow:A,...e.tooltip},()=>P("strong",null,Ye(e.tooltip)&&e.tooltip.tip||a("vc.navigation.print.printTip")))):R.push(ne("v-if"));const I=[P(ri,{ref:c,size:e.size,disabled:d.value,flat:e.flat,stack:e.stack,round:e.round,style:{color:e.color,background:e.background},dense:!0,onClick:_},()=>R)];return P("div",{ref:s,class:`vc-print ${u.classes.value} ${e.customClass}`,style:C},I)}else return ne("v-if")}}}),pn=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},ff={exports:{}};(function(e,t){(function(i,n){e.exports=n()})(pn,function(){function i(d){var m=[];return d.AMapUI&&m.push(n(d.AMapUI)),d.Loca&&m.push(r(d.Loca)),Promise.all(m)}function n(d){return new Promise(function(m,f){var v=[];if(d.plugins)for(var C=0;C<d.plugins.length;C+=1)o.AMapUI.plugins.indexOf(d.plugins[C])==-1&&v.push(d.plugins[C]);if(s.AMapUI===a.failed)f("\u524D\u6B21\u8BF7\u6C42 AMapUI \u5931\u8D25");else if(s.AMapUI===a.notload){s.AMapUI=a.loading,o.AMapUI.version=d.version||o.AMapUI.version,C=o.AMapUI.version;var b=document.body||document.head,_=document.createElement("script");_.type="text/javascript",_.src="https://webapi.amap.com/ui/"+C+"/main.js",_.onerror=function(M){s.AMapUI=a.failed,f("\u8BF7\u6C42 AMapUI \u5931\u8D25")},_.onload=function(){if(s.AMapUI=a.loaded,v.length)window.AMapUI.loadUI(v,function(){for(var M=0,g=v.length;M<g;M++){var E=v[M].split("/").slice(-1)[0];window.AMapUI[E]=arguments[M]}for(m();l.AMapUI.length;)l.AMapUI.splice(0,1)[0]()});else for(m();l.AMapUI.length;)l.AMapUI.splice(0,1)[0]()},b.appendChild(_)}else s.AMapUI===a.loaded?d.version&&d.version!==o.AMapUI.version?f("\u4E0D\u5141\u8BB8\u591A\u4E2A\u7248\u672C AMapUI \u6DF7\u7528"):v.length?window.AMapUI.loadUI(v,function(){for(var M=0,g=v.length;M<g;M++){var E=v[M].split("/").slice(-1)[0];window.AMapUI[E]=arguments[M]}m()}):m():d.version&&d.version!==o.AMapUI.version?f("\u4E0D\u5141\u8BB8\u591A\u4E2A\u7248\u672C AMapUI \u6DF7\u7528"):l.AMapUI.push(function(M){M?f(M):v.length?window.AMapUI.loadUI(v,function(){for(var g=0,E=v.length;g<E;g++){var T=v[g].split("/").slice(-1)[0];window.AMapUI[T]=arguments[g]}m()}):m()})})}function r(d){return new Promise(function(m,f){if(s.Loca===a.failed)f("\u524D\u6B21\u8BF7\u6C42 Loca \u5931\u8D25");else if(s.Loca===a.notload){s.Loca=a.loading,o.Loca.version=d.version||o.Loca.version;var v=o.Loca.version,C=o.AMap.version.startsWith("2"),b=v.startsWith("2");if(C&&!b||!C&&b)f("JSAPI \u4E0E Loca \u7248\u672C\u4E0D\u5BF9\u5E94\uFF01\uFF01");else{C=o.key,b=document.body||document.head;var _=document.createElement("script");_.type="text/javascript",_.src="https://webapi.amap.com/loca?v="+v+"&key="+C,_.onerror=function(M){s.Loca=a.failed,f("\u8BF7\u6C42 AMapUI \u5931\u8D25")},_.onload=function(){for(s.Loca=a.loaded,m();l.Loca.length;)l.Loca.splice(0,1)[0]()},b.appendChild(_)}}else s.Loca===a.loaded?d.version&&d.version!==o.Loca.version?f("\u4E0D\u5141\u8BB8\u591A\u4E2A\u7248\u672C Loca \u6DF7\u7528"):m():d.version&&d.version!==o.Loca.version?f("\u4E0D\u5141\u8BB8\u591A\u4E2A\u7248\u672C Loca \u6DF7\u7528"):l.Loca.push(function(M){M?f(M):f()})})}if(!window)throw Error("AMap JSAPI can only be used in Browser.");var a;(function(d){d.notload="notload",d.loading="loading",d.loaded="loaded",d.failed="failed"})(a||(a={}));var o={key:"",AMap:{version:"1.4.15",plugins:[]},AMapUI:{version:"1.1",plugins:[]},Loca:{version:"1.3.2"}},s={AMap:a.notload,AMapUI:a.notload,Loca:a.notload},l={AMap:[],AMapUI:[],Loca:[]},c=[],u=function(d){typeof d=="function"&&(s.AMap===a.loaded?d(window.AMap):c.push(d))};return{load:function(d){return new Promise(function(m,f){if(s.AMap==a.failed)f("");else if(s.AMap==a.notload){var v=d.key,C=d.version,b=d.plugins;v?(window.AMap&&location.host!=="lbs.amap.com"&&f("\u7981\u6B62\u591A\u79CDAPI\u52A0\u8F7D\u65B9\u5F0F\u6DF7\u7528"),o.key=v,o.AMap.version=C||o.AMap.version,o.AMap.plugins=b||o.AMap.plugins,s.AMap=a.loading,C=document.body||document.head,window.___onAPILoaded=function(M){if(delete window.___onAPILoaded,M)s.AMap=a.failed,f(M);else for(s.AMap=a.loaded,i(d).then(function(){m(window.AMap)}).catch(f);c.length;)c.splice(0,1)[0]()},b=document.createElement("script"),b.type="text/javascript",b.src="https://webapi.amap.com/maps?callback=___onAPILoaded&v="+o.AMap.version+"&key="+v+"&plugin="+o.AMap.plugins.join(","),b.onerror=function(M){s.AMap=a.failed,f(M)},C.appendChild(b)):f("\u8BF7\u586B\u5199key")}else if(s.AMap==a.loaded)if(d.key&&d.key!==o.key)f("\u591A\u4E2A\u4E0D\u4E00\u81F4\u7684 key");else if(d.version&&d.version!==o.AMap.version)f("\u4E0D\u5141\u8BB8\u591A\u4E2A\u7248\u672C JSAPI \u6DF7\u7528");else{if(v=[],d.plugins)for(C=0;C<d.plugins.length;C+=1)o.AMap.plugins.indexOf(d.plugins[C])==-1&&v.push(d.plugins[C]);v.length?window.AMap.plugin(v,function(){i(d).then(function(){m(window.AMap)}).catch(f)}):i(d).then(function(){m(window.AMap)}).catch(f)}else if(d.key&&d.key!==o.key)f("\u591A\u4E2A\u4E0D\u4E00\u81F4\u7684 key");else if(d.version&&d.version!==o.AMap.version)f("\u4E0D\u5141\u8BB8\u591A\u4E2A\u7248\u672C JSAPI \u6DF7\u7528");else{var _=[];if(d.plugins)for(C=0;C<d.plugins.length;C+=1)o.AMap.plugins.indexOf(d.plugins[C])==-1&&_.push(d.plugins[C]);u(function(){_.length?window.AMap.plugin(_,function(){i(d).then(function(){m(window.AMap)}).catch(f)}):i(d).then(function(){m(window.AMap)}).catch(f)})}})},reset:function(){delete window.AMap,delete window.AMapUI,delete window.Loca,o={key:"",AMap:{version:"1.4.15",plugins:[]},AMapUI:{version:"1.1",plugins:[]},Loca:{version:"1.3.2"}},s={AMap:a.notload,AMapUI:a.notload,Loca:a.notload},l={AMap:[],AMapUI:[],Loca:[]}}}})})(ff);var A5=ff.exports,pf={geolocation:{type:Object,default:()=>({enableHighAccuracy:!0,timeout:5e3,maximumAge:0})},amap:Object,id:{type:String,default:"My Location"},pointColor:{type:[Array,Object,String],default:"#08ABD5"},pixelSize:{type:Number,default:25/2},outlineWidth:{type:Number,default:3},outlineColor:{type:[Array,Object,String],default:"#ffffff"},level:{type:Number,default:6},duration:{type:Number,default:3},factor:{type:Number,default:.01},maximumHeight:Number,hpr:{type:Array,default:()=>[0,0,3e3]},customAPI:Function,description:Function,...fn,icon:{type:String,default:"vc-icons-geolocation"},size:{type:String,default:"24px"},color:{type:String,default:"#3f4854"},background:{type:String,default:"#fff"},round:{type:Boolean,default:!0},flat:{type:Boolean,default:!1},label:String,stack:{type:Boolean,default:!1},tooltip:{type:[Boolean,Object],default:()=>({delay:500,anchor:"bottom middle",offset:[0,20],tip:void 0})},loadingType:{type:String,default:"puff"},customClass:{type:String,default:""},teleportToViewer:{type:Boolean,default:!0}};const D5={...Ce,locationEvt:e=>!0},vf=pf;var Tc=te({name:"VcMyLocation",props:vf,emits:D5,setup(e,t){var i;const n=re();n.cesiumClass="VcMyLocation",n.cesiumEvents=[];const r=Be(e,t,n);if(r===void 0)return;const{$services:a}=r,{t:o}=Ct(),s=ie(null),l=ie(null),c=ie(null),u=ie(!1),d=di(e),f=((i=xt(n).proxy)==null?void 0:i.$options.name)==="VcNavigation",v=ie(f),C=Pe({});let b,_;fe(()=>e,W=>{De(()=>{!n.mounted||g()})},{deep:!0});const M=ye(()=>u.value?o("vc.navigation.myLocation.positioning"):Ye(e.tooltip)&&e.tooltip.tip||o("vc.navigation.myLocation.myLocationTip"));n.createCesiumObject=async()=>{v.value=!0;const{viewer:W}=a,{CustomDataSource:$}=Cesium,k=W.dataSources.getByName("__vc-myLocation__");k.length?b=k[0]:W.dataSources.add(new $("__vc-myLocation__")).then(y=>{b=y});let h;if(e.amap&&e.amap.key){const y=e.amap.options;h=new Promise((O,x)=>{var w,D;A5.load({key:(w=e.amap)==null?void 0:w.key,version:(D=e.amap)==null?void 0:D.version,plugins:["AMap.Geolocation"]}).then(S=>{_=new S.Geolocation(y),O(_)}).catch(S=>{r.logger.error(S),x(S)})})}const p=new Promise((y,O)=>{De(()=>{!f&&e.teleportToViewer&&a.viewer._element.appendChild(oe(s)),y(oe(s))})});return Promise.all([p,h]).then(y=>y[0])},n.mount=async()=>{var W;g();const{viewer:$}=a;return(W=$.viewerWidgetResized)==null||W.raiseEvent({type:n.cesiumClass,status:"mounted",target:oe(s)}),!0},n.unmount=async()=>{var W;const{viewer:$}=a;if(_){const h=document.getElementsByTagName("script"),p=[];for(const y of h)y.src.indexOf("/webapi.amap.com/maps")>-1&&p.push(y);p.forEach(y=>{document.getElementsByTagName("body")[0].removeChild(y)})}const k=a.viewer._element;return f||k.contains(oe(s))&&k.removeChild(oe(s)),(W=$.viewerWidgetResized)==null||W.raiseEvent({type:n.cesiumClass,status:"unmounted",target:oe(s)}),$.dataSources.remove(b,!0)};const g=()=>{var W;const $=d.style.value;if(C.left=$.left,C.top=$.top,C.transform=$.transform,!f){const k=d.attach.value;((W=oe(c))==null?void 0:W.$el)!==void 0&&(typeof e.teleportToViewer=="undefined"||e.teleportToViewer)&&((k.bottom||k.top)&&!k.left&&!k.right&&($.left="50%",$.transform="translate(-50%, 0)"),(k.left||k.right)&&!k.top&&!k.bottom&&($.top="50%",$.transform="translate(0, -50%)"))}Object.assign(C,$)},E=()=>{var W;if((W=oe(l))==null||W.hide(),u.value=!0,bt(e.customAPI)){const $=e.customAPI(R);T($)}else _&&e.amap&&e.amap.key?_.getCurrentPosition(($,k)=>{var h;if($==="complete"){let p=[k.position.lng,k.position.lat];((h=e.amap)==null?void 0:h.transformToWGS84)&&(p=Wl(p[0],p[1])),T({lng:p[0],lat:p[1],address:k.formattedAddress},k)}else R(o("vc.navigation.myLocation.fail"),k.message)}):e.geolocation?navigator.geolocation.getCurrentPosition($=>{T({lng:$.coords.longitude,lat:$.coords.latitude},$)},R,{enableHighAccuracy:e.geolocation.enableHighAccuracy,timeout:e.geolocation.timeout,maximumAge:e.geolocation.maximumAge}):R(o("vc.navigation.myLocation.fail"))},T=(W,$)=>{var k;const h=W.lng,p=W.lat,y=W.address,{Rectangle:O,sampleTerrain:x,defined:w,SceneMode:D}=Cesium,{viewer:S}=a;b.entities.removeAll();const B=b.entities.add({id:e.id,position:Qe([h,p],S.scene.globe.ellipsoid),point:{color:Te(e.pointColor),pixelSize:e.pixelSize,outlineWidth:e.outlineWidth,outlineColor:Te(e.outlineColor)},properties:{...$},description:((k=e.description)==null?void 0:k.call(this,W,$))||A({[o("vc.navigation.myLocation.lng")]:h,[o("vc.navigation.myLocation.lat")]:p,[o("vc.navigation.myLocation.address")]:y})}),F=Me(n,"locationEvt");F&&t.emit("locationEvt",{type:"location",position:W,detail:$,entity:B});const G={duration:e.duration};if(w(e.maximumHeight)&&(G.maximumHeight=e.maximumHeight),w(e.hpr)&&Ze(e.hpr)&&(G.offset=new Cesium.HeadingPitchRange(e.hpr[0],e.hpr[1],e.hpr[2])),S.scene.mode===D.SCENE2D||S.scene.mode===D.COLUMBUS_VIEW)return S.flyTo(B,G).then(()=>{u.value=!1,F&&t.emit("locationEvt",{type:"zoomIn",camera:S.camera,status:"end"})});const q=e.factor,U=O.fromDegrees(h-q,p-q,h+q,p+q),K=S.scene.camera,N=K.getRectangleCameraCoordinates(U),L=S.scene.globe.ellipsoid.cartesianToCartographic(N),H=S.scene.globe.terrainProvider,z=e.level,Q=[O.center(U)];return x(H,z,Q).then(function(Z){const J={longitude:L.longitude,latitude:L.latitude,height:L.height+Z[0].height},X=S.scene.globe.ellipsoid.cartographicToCartesian(J);F&&t.emit("locationEvt",{type:"zoomIn",camera:S.camera,status:"start"}),K.flyTo({duration:e.duration,destination:X,complete:()=>{u.value=!1,F&&t.emit("locationEvt",{type:"zoomIn",camera:S.camera,status:"end"})},cancel:()=>{u.value=!1,F&&t.emit("locationEvt",{type:"zoomIn",camera:S.camera,status:"cancel"})}})})},A=(W,$)=>{let k="";W instanceof Cesium.PropertyBag&&(W=W.getValue(Cesium.JulianDate.now()));for(let h in W)if(Object.prototype.hasOwnProperty.call(W,h)){if(h===$)continue;let p=W[h];typeof p=="object"&&(p=A(p)),h=h.replace(/_/g," "),Cesium.defined(p)&&(k+="<tr><th>"+h+"</th><td>"+p+"</td></tr>")}return k.length>0&&(k='<table class="cesium-infoBox-defaultTable"><tbody>'+k+"</tbody></table>"),k},R=(...W)=>{u.value=!1,r.logger.error(...W)},I=()=>{switch(e.loadingType){case"bars":return Ta;case"ios":return mc;case"orbit":return fc;case"oval":return pc;case"puff":return vc;case"tail":return gc;default:return Ta}},j=W=>{u.value&&(W.cancel=!0)};return()=>{if(v.value){const W=[];return W.push(P(hn,{name:e.icon,size:e.size})),W.push(P("div",null,e.label)),Ye(e.tooltip)?W.push(P(Pt,{ref:l,onBeforeShow:j,...e.tooltip},()=>P("strong",null,M.value))):W.push(ne("v-if")),P("div",{ref:s,class:`vc-my-location ${d.classes.value} ${e.customClass}`,style:C},[P(ri,{ref:c,size:e.size,flat:e.flat,stack:e.stack,round:e.round,loading:u.value,dense:!0,style:{color:e.color,background:e.background},onClick:E},{default:()=>W,loading:()=>P(I())})])}else return ne("v-if")}}});function I5(e,t,i){const n={latitude:"",longitude:"",elevation:""},{defaultValue:r,defined:a}=Cesium,o=r(i,{}),s=r(o.decimal,5);return o.rangeType===0?(n.latitude=Math.abs(t).toFixed(s)+"\xB0"+(t<0?"S":"N"),n.longitude=Math.abs(e).toFixed(s)+"\xB0"+(e<0?"W":"E")):o.rangeType===1?(n.latitude=t.toFixed(s)+"\xB0",n.longitude=e.toFixed(s)+"\xB0"):o.rangeType===2&&(n.latitude=t.toFixed(s)+"\xB0",n.longitude=(e<0?360+e:e).toFixed(s)+"\xB0"),a(o.height)?n.elevation=Math.round(o.height)+(a(o.errorBar)?"\xB1"+Math.round(o.errorBar):"")+"m":n.elevation="",n}function R5(e){e("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),e("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),e("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),e.WGS84=e["EPSG:4326"],e["EPSG:3785"]=e["EPSG:3857"],e.GOOGLE=e["EPSG:3857"],e["EPSG:900913"]=e["EPSG:3857"],e["EPSG:102113"]=e["EPSG:3857"]}var Vn=1,$n=2,Ia=3,L5=4,Ac=5,gf=6378137,B5=6356752314e-3,yf=.0066943799901413165,so=484813681109536e-20,pe=Math.PI/2,j5=.16666666666666666,F5=.04722222222222222,k5=.022156084656084655,_e=1e-10,Ft=.017453292519943295,Fi=57.29577951308232,$e=Math.PI/4,lo=Math.PI*2,gt=3.14159265359,oi={};oi.greenwich=0,oi.lisbon=-9.131906111111,oi.paris=2.337229166667,oi.bogota=-74.080916666667,oi.madrid=-3.687938888889,oi.rome=12.452333333333,oi.bern=7.439583333333,oi.jakarta=106.807719444444,oi.ferro=-17.666666666667,oi.brussels=4.367975,oi.stockholm=18.058277777778,oi.athens=23.7163375,oi.oslo=10.722916666667;var N5={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},bf=/[\s_\-\/\(\)]/g;function vn(e,t){if(e[t])return e[t];for(var i=Object.keys(e),n=t.toLowerCase().replace(bf,""),r=-1,a,o;++r<i.length;)if(a=i[r],o=a.toLowerCase().replace(bf,""),o===n)return e[a]}function Dc(e){var t={},i=e.split("+").map(function(s){return s.trim()}).filter(function(s){return s}).reduce(function(s,l){var c=l.split("=");return c.push(!0),s[c[0].toLowerCase()]=c[1],s},{}),n,r,a,o={proj:"projName",datum:"datumCode",rf:function(s){t.rf=parseFloat(s)},lat_0:function(s){t.lat0=s*Ft},lat_1:function(s){t.lat1=s*Ft},lat_2:function(s){t.lat2=s*Ft},lat_ts:function(s){t.lat_ts=s*Ft},lon_0:function(s){t.long0=s*Ft},lon_1:function(s){t.long1=s*Ft},lon_2:function(s){t.long2=s*Ft},alpha:function(s){t.alpha=parseFloat(s)*Ft},gamma:function(s){t.rectified_grid_angle=parseFloat(s)},lonc:function(s){t.longc=s*Ft},x_0:function(s){t.x0=parseFloat(s)},y_0:function(s){t.y0=parseFloat(s)},k_0:function(s){t.k0=parseFloat(s)},k:function(s){t.k0=parseFloat(s)},a:function(s){t.a=parseFloat(s)},b:function(s){t.b=parseFloat(s)},r_a:function(){t.R_A=!0},zone:function(s){t.zone=parseInt(s,10)},south:function(){t.utmSouth=!0},towgs84:function(s){t.datum_params=s.split(",").map(function(l){return parseFloat(l)})},to_meter:function(s){t.to_meter=parseFloat(s)},units:function(s){t.units=s;var l=vn(N5,s);l&&(t.to_meter=l.to_meter)},from_greenwich:function(s){t.from_greenwich=s*Ft},pm:function(s){var l=vn(oi,s);t.from_greenwich=(l||parseFloat(s))*Ft},nadgrids:function(s){s==="@null"?t.datumCode="none":t.nadgrids=s},axis:function(s){var l="ewnsud";s.length===3&&l.indexOf(s.substr(0,1))!==-1&&l.indexOf(s.substr(1,1))!==-1&&l.indexOf(s.substr(2,1))!==-1&&(t.axis=s)},approx:function(){t.approx=!0}};for(n in i)r=i[n],n in o?(a=o[n],typeof a=="function"?a(r):t[a]=r):t[n]=r;return typeof t.datumCode=="string"&&t.datumCode!=="WGS84"&&(t.datumCode=t.datumCode.toLowerCase()),t}var co=1,Cf=2,wf=3,Ra=4,_f=5,Ic=-1,z5=/\s/,V5=/[A-Za-z]/,$5=/[A-Za-z84]/,La=/[,\]]/,xf=/[\d\.E\-\+]/;function Ji(e){if(typeof e!="string")throw new Error("not a string");this.text=e.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=co}Ji.prototype.readCharicter=function(){var e=this.text[this.place++];if(this.state!==Ra)for(;z5.test(e);){if(this.place>=this.text.length)return;e=this.text[this.place++]}switch(this.state){case co:return this.neutral(e);case Cf:return this.keyword(e);case Ra:return this.quoted(e);case _f:return this.afterquote(e);case wf:return this.number(e);case Ic:return}},Ji.prototype.afterquote=function(e){if(e==='"'){this.word+='"',this.state=Ra;return}if(La.test(e)){this.word=this.word.trim(),this.afterItem(e);return}throw new Error(`havn't handled "`+e+'" in afterquote yet, index '+this.place)},Ji.prototype.afterItem=function(e){if(e===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=co;return}if(e==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=co,this.currentObject=this.stack.pop(),this.currentObject||(this.state=Ic);return}},Ji.prototype.number=function(e){if(xf.test(e)){this.word+=e;return}if(La.test(e)){this.word=parseFloat(this.word),this.afterItem(e);return}throw new Error(`havn't handled "`+e+'" in number yet, index '+this.place)},Ji.prototype.quoted=function(e){if(e==='"'){this.state=_f;return}this.word+=e},Ji.prototype.keyword=function(e){if($5.test(e)){this.word+=e;return}if(e==="["){var t=[];t.push(this.word),this.level++,this.root===null?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,this.state=co;return}if(La.test(e)){this.afterItem(e);return}throw new Error(`havn't handled "`+e+'" in keyword yet, index '+this.place)},Ji.prototype.neutral=function(e){if(V5.test(e)){this.word=e,this.state=Cf;return}if(e==='"'){this.word="",this.state=Ra;return}if(xf.test(e)){this.word=e,this.state=wf;return}if(La.test(e)){this.afterItem(e);return}throw new Error(`havn't handled "`+e+'" in neutral yet, index '+this.place)},Ji.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(this.state===Ic)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function G5(e){var t=new Ji(e);return t.output()}function Ef(e,t,i){Array.isArray(t)&&(i.unshift(t),t=null);var n=t?{}:e,r=i.reduce(function(a,o){return dr(o,a),a},n);t&&(e[t]=r)}function dr(e,t){if(!Array.isArray(e)){t[e]=!0;return}var i=e.shift();if(i==="PARAMETER"&&(i=e.shift()),e.length===1){if(Array.isArray(e[0])){t[i]={},dr(e[0],t[i]);return}t[i]=e[0];return}if(!e.length){t[i]=!0;return}if(i==="TOWGS84"){t[i]=e;return}if(i==="AXIS"){i in t||(t[i]=[]),t[i].push(e);return}Array.isArray(i)||(t[i]={});var n;switch(i){case"UNIT":case"PRIMEM":case"VERT_DATUM":t[i]={name:e[0].toLowerCase(),convert:e[1]},e.length===3&&dr(e[2],t[i]);return;case"SPHEROID":case"ELLIPSOID":t[i]={name:e[0],a:e[1],rf:e[2]},e.length===4&&dr(e[3],t[i]);return;case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"EDATUM":case"ENGINEERINGDATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":case"COMPD_CS":case"COMPOUNDCRS":case"ENGINEERINGCRS":case"ENGCRS":case"FITTED_CS":case"LOCAL_DATUM":case"DATUM":e[0]=["name",e[0]],Ef(t,i,e);return;default:for(n=-1;++n<e.length;)if(!Array.isArray(e[n]))return dr(e,t[i]);return Ef(t,i,e)}}var U5=.017453292519943295;function H5(e,t){var i=t[0],n=t[1];!(i in e)&&n in e&&(e[i]=e[n],t.length===3&&(e[i]=t[2](e[i])))}function Ki(e){return e*U5}function W5(e){if(e.type==="GEOGCS"?e.projName="longlat":e.type==="LOCAL_CS"?(e.projName="identity",e.local=!0):typeof e.PROJECTION=="object"?e.projName=Object.keys(e.PROJECTION)[0]:e.projName=e.PROJECTION,e.AXIS){for(var t="",i=0,n=e.AXIS.length;i<n;++i){var r=[e.AXIS[i][0].toLowerCase(),e.AXIS[i][1].toLowerCase()];r[0].indexOf("north")!==-1||(r[0]==="y"||r[0]==="lat")&&r[1]==="north"?t+="n":r[0].indexOf("south")!==-1||(r[0]==="y"||r[0]==="lat")&&r[1]==="south"?t+="s":r[0].indexOf("east")!==-1||(r[0]==="x"||r[0]==="lon")&&r[1]==="east"?t+="e":(r[0].indexOf("west")!==-1||(r[0]==="x"||r[0]==="lon")&&r[1]==="west")&&(t+="w")}t.length===2&&(t+="u"),t.length===3&&(e.axis=t)}e.UNIT&&(e.units=e.UNIT.name.toLowerCase(),e.units==="metre"&&(e.units="meter"),e.UNIT.convert&&(e.type==="GEOGCS"?e.DATUM&&e.DATUM.SPHEROID&&(e.to_meter=e.UNIT.convert*e.DATUM.SPHEROID.a):e.to_meter=e.UNIT.convert));var a=e.GEOGCS;e.type==="GEOGCS"&&(a=e),a&&(a.DATUM?e.datumCode=a.DATUM.name.toLowerCase():e.datumCode=a.name.toLowerCase(),e.datumCode.slice(0,2)==="d_"&&(e.datumCode=e.datumCode.slice(2)),(e.datumCode==="new_zealand_geodetic_datum_1949"||e.datumCode==="new_zealand_1949")&&(e.datumCode="nzgd49"),(e.datumCode==="wgs_1984"||e.datumCode==="world_geodetic_system_1984")&&(e.PROJECTION==="Mercator_Auxiliary_Sphere"&&(e.sphere=!0),e.datumCode="wgs84"),e.datumCode.slice(-6)==="_ferro"&&(e.datumCode=e.datumCode.slice(0,-6)),e.datumCode.slice(-8)==="_jakarta"&&(e.datumCode=e.datumCode.slice(0,-8)),~e.datumCode.indexOf("belge")&&(e.datumCode="rnb72"),a.DATUM&&a.DATUM.SPHEROID&&(e.ellps=a.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),e.ellps.toLowerCase().slice(0,13)==="international"&&(e.ellps="intl"),e.a=a.DATUM.SPHEROID.a,e.rf=parseFloat(a.DATUM.SPHEROID.rf,10)),a.DATUM&&a.DATUM.TOWGS84&&(e.datum_params=a.DATUM.TOWGS84),~e.datumCode.indexOf("osgb_1936")&&(e.datumCode="osgb36"),~e.datumCode.indexOf("osni_1952")&&(e.datumCode="osni52"),(~e.datumCode.indexOf("tm65")||~e.datumCode.indexOf("geodetic_datum_of_1965"))&&(e.datumCode="ire65"),e.datumCode==="ch1903+"&&(e.datumCode="ch1903"),~e.datumCode.indexOf("israel")&&(e.datumCode="isr93")),e.b&&!isFinite(e.b)&&(e.b=e.a);function o(c){var u=e.to_meter||1;return c*u}var s=function(c){return H5(e,c)},l=[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",Ki],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",Ki],["x0","false_easting",o],["y0","false_northing",o],["long0","central_meridian",Ki],["lat0","latitude_of_origin",Ki],["lat0","standard_parallel_1",Ki],["lat1","standard_parallel_1",Ki],["lat2","standard_parallel_2",Ki],["azimuth","Azimuth"],["alpha","azimuth",Ki],["srsCode","name"]];l.forEach(s),!e.long0&&e.longc&&(e.projName==="Albers_Conic_Equal_Area"||e.projName==="Lambert_Azimuthal_Equal_Area")&&(e.long0=e.longc),!e.lat_ts&&e.lat1&&(e.projName==="Stereographic_South_Pole"||e.projName==="Polar Stereographic (variant B)")&&(e.lat0=Ki(e.lat1>0?90:-90),e.lat_ts=e.lat1)}function Of(e){var t=G5(e),i=t.shift(),n=t.shift();t.unshift(["name",n]),t.unshift(["type",i]);var r={};return dr(t,r),W5(r),r}function Yt(e){var t=this;if(arguments.length===2){var i=arguments[1];typeof i=="string"?i.charAt(0)==="+"?Yt[e]=Dc(arguments[1]):Yt[e]=Of(arguments[1]):Yt[e]=i}else if(arguments.length===1){if(Array.isArray(e))return e.map(function(n){Array.isArray(n)?Yt.apply(t,n):Yt(n)});if(typeof e=="string"){if(e in Yt)return Yt[e]}else"EPSG"in e?Yt["EPSG:"+e.EPSG]=e:"ESRI"in e?Yt["ESRI:"+e.ESRI]=e:"IAU2000"in e?Yt["IAU2000:"+e.IAU2000]=e:console.log(e);return}}R5(Yt);function q5(e){return typeof e=="string"}function Z5(e){return e in Yt}var Q5=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function X5(e){return Q5.some(function(t){return e.indexOf(t)>-1})}var Y5=["3857","900913","3785","102113"];function J5(e){var t=vn(e,"authority");if(!!t){var i=vn(t,"epsg");return i&&Y5.indexOf(i)>-1}}function K5(e){var t=vn(e,"extension");if(!!t)return vn(t,"proj4")}function eS(e){return e[0]==="+"}function tS(e){if(q5(e)){if(Z5(e))return Yt[e];if(X5(e)){var t=Of(e);if(J5(t))return Yt["EPSG:3857"];var i=K5(t);return i?Dc(i):t}if(eS(e))return Dc(e)}else return e}function Pf(e,t){e=e||{};var i,n;if(!t)return e;for(n in t)i=t[n],i!==void 0&&(e[n]=i);return e}function ki(e,t,i){var n=e*t;return i/Math.sqrt(1-n*n)}function uo(e){return e<0?-1:1}function Oe(e){return Math.abs(e)<=gt?e:e-uo(e)*lo}function Ii(e,t,i){var n=e*i,r=.5*e;return n=Math.pow((1-n)/(1+n),r),Math.tan(.5*(pe-t))/n}function ho(e,t){for(var i=.5*e,n,r,a=pe-2*Math.atan(t),o=0;o<=15;o++)if(n=e*Math.sin(a),r=pe-2*Math.atan(t*Math.pow((1-n)/(1+n),i))-a,a+=r,Math.abs(r)<=1e-10)return a;return-9999}function iS(){var e=this.b/this.a;this.es=1-e*e,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=ki(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function nS(e){var t=e.x,i=e.y;if(i*Fi>90&&i*Fi<-90&&t*Fi>180&&t*Fi<-180)return null;var n,r;if(Math.abs(Math.abs(i)-pe)<=_e)return null;if(this.sphere)n=this.x0+this.a*this.k0*Oe(t-this.long0),r=this.y0+this.a*this.k0*Math.log(Math.tan($e+.5*i));else{var a=Math.sin(i),o=Ii(this.e,i,a);n=this.x0+this.a*this.k0*Oe(t-this.long0),r=this.y0-this.a*this.k0*Math.log(o)}return e.x=n,e.y=r,e}function rS(e){var t=e.x-this.x0,i=e.y-this.y0,n,r;if(this.sphere)r=pe-2*Math.atan(Math.exp(-i/(this.a*this.k0)));else{var a=Math.exp(-i/(this.a*this.k0));if(r=ho(this.e,a),r===-9999)return null}return n=Oe(this.long0+t/(this.a*this.k0)),e.x=n,e.y=r,e}var oS=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"],aS={init:iS,forward:nS,inverse:rS,names:oS};function sS(){}function Mf(e){return e}var lS=["longlat","identity"],cS={init:sS,forward:Mf,inverse:Mf,names:lS},uS=[aS,cS],Ba={},ja=[];function Sf(e,t){var i=ja.length;return e.names?(ja[i]=e,e.names.forEach(function(n){Ba[n.toLowerCase()]=i}),this):(console.log(t),!0)}function dS(e){if(!e)return!1;var t=e.toLowerCase();if(typeof Ba[t]!="undefined"&&ja[Ba[t]])return ja[Ba[t]]}function hS(){uS.forEach(Sf)}var mS={start:hS,add:Sf,get:dS},Ie={};Ie.MERIT={a:6378137,rf:298.257,ellipseName:"MERIT 1983"},Ie.SGS85={a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},Ie.GRS80={a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},Ie.IAU76={a:6378140,rf:298.257,ellipseName:"IAU 1976"},Ie.airy={a:6377563396e-3,b:635625691e-2,ellipseName:"Airy 1830"},Ie.APL4={a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},Ie.NWL9D={a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},Ie.mod_airy={a:6377340189e-3,b:6356034446e-3,ellipseName:"Modified Airy"},Ie.andrae={a:637710443e-2,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},Ie.aust_SA={a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},Ie.GRS67={a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},Ie.bessel={a:6377397155e-3,rf:299.1528128,ellipseName:"Bessel 1841"},Ie.bess_nam={a:6377483865e-3,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},Ie.clrk66={a:63782064e-1,b:63565838e-1,ellipseName:"Clarke 1866"},Ie.clrk80={a:6378249145e-3,rf:293.4663,ellipseName:"Clarke 1880 mod."},Ie.clrk58={a:6378293645208759e-9,rf:294.2606763692654,ellipseName:"Clarke 1858"},Ie.CPM={a:63757387e-1,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},Ie.delmbr={a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},Ie.engelis={a:637813605e-2,rf:298.2566,ellipseName:"Engelis 1985"},Ie.evrst30={a:6377276345e-3,rf:300.8017,ellipseName:"Everest 1830"},Ie.evrst48={a:6377304063e-3,rf:300.8017,ellipseName:"Everest 1948"},Ie.evrst56={a:6377301243e-3,rf:300.8017,ellipseName:"Everest 1956"},Ie.evrst69={a:6377295664e-3,rf:300.8017,ellipseName:"Everest 1969"},Ie.evrstSS={a:6377298556e-3,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},Ie.fschr60={a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},Ie.fschr60m={a:6378155,rf:298.3,ellipseName:"Fischer 1960"},Ie.fschr68={a:6378150,rf:298.3,ellipseName:"Fischer 1968"},Ie.helmert={a:6378200,rf:298.3,ellipseName:"Helmert 1906"},Ie.hough={a:6378270,rf:297,ellipseName:"Hough"},Ie.intl={a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},Ie.kaula={a:6378163,rf:298.24,ellipseName:"Kaula 1961"},Ie.lerch={a:6378139,rf:298.257,ellipseName:"Lerch 1979"},Ie.mprts={a:6397300,rf:191,ellipseName:"Maupertius 1738"},Ie.new_intl={a:63781575e-1,b:63567722e-1,ellipseName:"New International 1967"},Ie.plessis={a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},Ie.krass={a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},Ie.SEasia={a:6378155,b:63567733205e-4,ellipseName:"Southeast Asia"},Ie.walbeck={a:6376896,b:63558348467e-4,ellipseName:"Walbeck"},Ie.WGS60={a:6378165,rf:298.3,ellipseName:"WGS 60"},Ie.WGS66={a:6378145,rf:298.25,ellipseName:"WGS 66"},Ie.WGS7={a:6378135,rf:298.26,ellipseName:"WGS 72"};var fS=Ie.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};Ie.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};function pS(e,t,i,n){var r=e*e,a=t*t,o=(r-a)/r,s=0;n?(e*=1-o*(j5+o*(F5+o*k5)),r=e*e,o=0):s=Math.sqrt(o);var l=(r-a)/a;return{es:o,e:s,ep2:l}}function vS(e,t,i,n,r){if(!e){var a=vn(Ie,n);a||(a=fS),e=a.a,t=a.b,i=a.rf}return i&&!t&&(t=(1-1/i)*e),(i===0||Math.abs(e-t)<_e)&&(r=!0,t=e),{a:e,b:t,rf:i,sphere:r}}var It={};It.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},It.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},It.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},It.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},It.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},It.potsdam={towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},It.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},It.hermannskogel={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},It.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},It.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},It.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},It.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},It.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},It.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},It.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},It.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},It.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};function gS(e,t,i,n,r,a,o){var s={};return e===void 0||e==="none"?s.datum_type=Ac:s.datum_type=L5,t&&(s.datum_params=t.map(parseFloat),(s.datum_params[0]!==0||s.datum_params[1]!==0||s.datum_params[2]!==0)&&(s.datum_type=Vn),s.datum_params.length>3&&(s.datum_params[3]!==0||s.datum_params[4]!==0||s.datum_params[5]!==0||s.datum_params[6]!==0)&&(s.datum_type=$n,s.datum_params[3]*=so,s.datum_params[4]*=so,s.datum_params[5]*=so,s.datum_params[6]=s.datum_params[6]/1e6+1)),o&&(s.datum_type=Ia,s.grids=o),s.a=i,s.b=n,s.es=r,s.ep2=a,s}var Tf={};function yS(e,t){var i=new DataView(t),n=wS(i),r=_S(i,n);r.nSubgrids>1&&console.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored");var a=xS(i,r,n),o={header:r,subgrids:a};return Tf[e]=o,o}function bS(e){if(e===void 0)return null;var t=e.split(",");return t.map(CS)}function CS(e){if(e.length===0)return null;var t=e[0]==="@";return t&&(e=e.slice(1)),e==="null"?{name:"null",mandatory:!t,grid:null,isNull:!0}:{name:e,mandatory:!t,grid:Tf[e]||null,isNull:!1}}function hr(e){return e/3600*Math.PI/180}function wS(e){var t=e.getInt32(8,!1);return t===11?!1:(t=e.getInt32(8,!0),t!==11&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}function _S(e,t){return{nFields:e.getInt32(8,t),nSubgridFields:e.getInt32(24,t),nSubgrids:e.getInt32(40,t),shiftType:Rc(e,56,56+8).trim(),fromSemiMajorAxis:e.getFloat64(120,t),fromSemiMinorAxis:e.getFloat64(136,t),toSemiMajorAxis:e.getFloat64(152,t),toSemiMinorAxis:e.getFloat64(168,t)}}function Rc(e,t,i){return String.fromCharCode.apply(null,new Uint8Array(e.buffer.slice(t,i)))}function xS(e,t,i){for(var n=176,r=[],a=0;a<t.nSubgrids;a++){var o=OS(e,n,i),s=PS(e,n,o,i),l=Math.round(1+(o.upperLongitude-o.lowerLongitude)/o.longitudeInterval),c=Math.round(1+(o.upperLatitude-o.lowerLatitude)/o.latitudeInterval);r.push({ll:[hr(o.lowerLongitude),hr(o.lowerLatitude)],del:[hr(o.longitudeInterval),hr(o.latitudeInterval)],lim:[l,c],count:o.gridNodeCount,cvs:ES(s)})}return r}function ES(e){return e.map(function(t){return[hr(t.longitudeShift),hr(t.latitudeShift)]})}function OS(e,t,i){return{name:Rc(e,t+8,t+16).trim(),parent:Rc(e,t+24,t+24+8).trim(),lowerLatitude:e.getFloat64(t+72,i),upperLatitude:e.getFloat64(t+88,i),lowerLongitude:e.getFloat64(t+104,i),upperLongitude:e.getFloat64(t+120,i),latitudeInterval:e.getFloat64(t+136,i),longitudeInterval:e.getFloat64(t+152,i),gridNodeCount:e.getInt32(t+168,i)}}function PS(e,t,i,n){for(var r=t+176,a=16,o=[],s=0;s<i.gridNodeCount;s++){var l={latitudeShift:e.getFloat32(r+s*a,n),longitudeShift:e.getFloat32(r+s*a+4,n),latitudeAccuracy:e.getFloat32(r+s*a+8,n),longitudeAccuracy:e.getFloat32(r+s*a+12,n)};o.push(l)}return o}function Ni(e,t){if(!(this instanceof Ni))return new Ni(e);t=t||function(c){if(c)throw c};var i=tS(e);if(typeof i!="object"){t(e);return}var n=Ni.projections.get(i.projName);if(!n){t(e);return}if(i.datumCode&&i.datumCode!=="none"){var r=vn(It,i.datumCode);r&&(i.datum_params=i.datum_params||(r.towgs84?r.towgs84.split(","):null),i.ellps=r.ellipse,i.datumName=r.datumName?r.datumName:i.datumCode)}i.k0=i.k0||1,i.axis=i.axis||"enu",i.ellps=i.ellps||"wgs84",i.lat1=i.lat1||i.lat0;var a=vS(i.a,i.b,i.rf,i.ellps,i.sphere),o=pS(a.a,a.b,a.rf,i.R_A),s=bS(i.nadgrids),l=i.datum||gS(i.datumCode,i.datum_params,a.a,a.b,o.es,o.ep2,s);Pf(this,i),Pf(this,n),this.a=a.a,this.b=a.b,this.rf=a.rf,this.sphere=a.sphere,this.es=o.es,this.e=o.e,this.ep2=o.ep2,this.datum=l,this.init(),t(null,this)}Ni.projections=mS,Ni.projections.start();function MS(e,t){return e.datum_type!==t.datum_type||e.a!==t.a||Math.abs(e.es-t.es)>5e-11?!1:e.datum_type===Vn?e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]:e.datum_type===$n?e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]&&e.datum_params[3]===t.datum_params[3]&&e.datum_params[4]===t.datum_params[4]&&e.datum_params[5]===t.datum_params[5]&&e.datum_params[6]===t.datum_params[6]:!0}function Af(e,t,i){var n=e.x,r=e.y,a=e.z?e.z:0,o,s,l,c;if(r<-pe&&r>-1.001*pe)r=-pe;else if(r>pe&&r<1.001*pe)r=pe;else{if(r<-pe)return{x:-1/0,y:-1/0,z:e.z};if(r>pe)return{x:1/0,y:1/0,z:e.z}}return n>Math.PI&&(n-=2*Math.PI),s=Math.sin(r),c=Math.cos(r),l=s*s,o=i/Math.sqrt(1-t*l),{x:(o+a)*c*Math.cos(n),y:(o+a)*c*Math.sin(n),z:(o*(1-t)+a)*s}}function Df(e,t,i,n){var r=1e-12,a=r*r,o=30,s,l,c,u,d,m,f,v,C,b,_,M,g,E=e.x,T=e.y,A=e.z?e.z:0,R,I,j;if(s=Math.sqrt(E*E+T*T),l=Math.sqrt(E*E+T*T+A*A),s/i<r){if(R=0,l/i<r)return I=pe,j=-n,{x:e.x,y:e.y,z:e.z}}else R=Math.atan2(T,E);c=A/l,u=s/l,d=1/Math.sqrt(1-t*(2-t)*u*u),v=u*(1-t)*d,C=c*d,g=0;do g++,f=i/Math.sqrt(1-t*C*C),j=s*v+A*C-f*(1-t*C*C),m=t*f/(f+j),d=1/Math.sqrt(1-m*(2-m)*u*u),b=u*(1-m)*d,_=c*d,M=_*v-b*C,v=b,C=_;while(M*M>a&&g<o);return I=Math.atan(_/Math.abs(b)),{x:R,y:I,z:j}}function SS(e,t,i){if(t===Vn)return{x:e.x+i[0],y:e.y+i[1],z:e.z+i[2]};if(t===$n){var n=i[0],r=i[1],a=i[2],o=i[3],s=i[4],l=i[5],c=i[6];return{x:c*(e.x-l*e.y+s*e.z)+n,y:c*(l*e.x+e.y-o*e.z)+r,z:c*(-s*e.x+o*e.y+e.z)+a}}}function TS(e,t,i){if(t===Vn)return{x:e.x-i[0],y:e.y-i[1],z:e.z-i[2]};if(t===$n){var n=i[0],r=i[1],a=i[2],o=i[3],s=i[4],l=i[5],c=i[6],u=(e.x-n)/c,d=(e.y-r)/c,m=(e.z-a)/c;return{x:u+l*d-s*m,y:-l*u+d+o*m,z:s*u-o*d+m}}}function Fa(e){return e===Vn||e===$n}function AS(e,t,i){if(MS(e,t)||e.datum_type===Ac||t.datum_type===Ac)return i;var n=e.a,r=e.es;if(e.datum_type===Ia){var a=If(e,!1,i);if(a!==0)return;n=gf,r=yf}var o=t.a,s=t.b,l=t.es;if(t.datum_type===Ia&&(o=gf,s=B5,l=yf),r===l&&n===o&&!Fa(e.datum_type)&&!Fa(t.datum_type))return i;if(i=Af(i,r,n),Fa(e.datum_type)&&(i=SS(i,e.datum_type,e.datum_params)),Fa(t.datum_type)&&(i=TS(i,t.datum_type,t.datum_params)),i=Df(i,l,o,s),t.datum_type===Ia){var c=If(t,!0,i);if(c!==0)return}return i}function If(e,t,i){if(e.grids===null||e.grids.length===0)return console.log("Grid shift grids not found"),-1;for(var n={x:-i.x,y:i.y},r={x:Number.NaN,y:Number.NaN},a=[],o=0;o<e.grids.length;o++){var s=e.grids[o];if(a.push(s.name),s.isNull){r=n;break}if(s.grid===null){if(s.mandatory)return console.log("Unable to find mandatory grid '"+s.name+"'"),-1;continue}var l=s.grid.subgrids[0],c=(Math.abs(l.del[1])+Math.abs(l.del[0]))/1e4,u=l.ll[0]-c,d=l.ll[1]-c,m=l.ll[0]+(l.lim[0]-1)*l.del[0]+c,f=l.ll[1]+(l.lim[1]-1)*l.del[1]+c;if(!(d>n.y||u>n.x||f<n.y||m<n.x)&&(r=DS(n,t,l),!isNaN(r.x)))break}return isNaN(r.x)?(console.log("Failed to find a grid shift table for location '"+-n.x*Fi+" "+n.y*Fi+" tried: '"+a+"'"),-1):(i.x=-r.x,i.y=r.y,0)}function DS(e,t,i){var n={x:Number.NaN,y:Number.NaN};if(isNaN(e.x))return n;var r={x:e.x,y:e.y};r.x-=i.ll[0],r.y-=i.ll[1],r.x=Oe(r.x-Math.PI)+Math.PI;var a=Rf(r,i);if(t){if(isNaN(a.x))return n;a.x=r.x-a.x,a.y=r.y-a.y;var o=9,s=1e-12,l,c;do{if(c=Rf(a,i),isNaN(c.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}l={x:r.x-(c.x+a.x),y:r.y-(c.y+a.y)},a.x+=l.x,a.y+=l.y}while(o--&&Math.abs(l.x)>s&&Math.abs(l.y)>s);if(o<0)return console.log("Inverse grid shift iterator failed to converge."),n;n.x=Oe(a.x+i.ll[0]),n.y=a.y+i.ll[1]}else isNaN(a.x)||(n.x=e.x+a.x,n.y=e.y+a.y);return n}function Rf(e,t){var i={x:e.x/t.del[0],y:e.y/t.del[1]},n={x:Math.floor(i.x),y:Math.floor(i.y)},r={x:i.x-1*n.x,y:i.y-1*n.y},a={x:Number.NaN,y:Number.NaN},o;if(n.x<0||n.x>=t.lim[0]||n.y<0||n.y>=t.lim[1])return a;o=n.y*t.lim[0]+n.x;var s={x:t.cvs[o][0],y:t.cvs[o][1]};o++;var l={x:t.cvs[o][0],y:t.cvs[o][1]};o+=t.lim[0];var c={x:t.cvs[o][0],y:t.cvs[o][1]};o--;var u={x:t.cvs[o][0],y:t.cvs[o][1]},d=r.x*r.y,m=r.x*(1-r.y),f=(1-r.x)*(1-r.y),v=(1-r.x)*r.y;return a.x=f*s.x+m*l.x+v*u.x+d*c.x,a.y=f*s.y+m*l.y+v*u.y+d*c.y,a}function Lf(e,t,i){var n=i.x,r=i.y,a=i.z||0,o,s,l,c={};for(l=0;l<3;l++)if(!(t&&l===2&&i.z===void 0))switch(l===0?(o=n,"ew".indexOf(e.axis[l])!==-1?s="x":s="y"):l===1?(o=r,"ns".indexOf(e.axis[l])!==-1?s="y":s="x"):(o=a,s="z"),e.axis[l]){case"e":c[s]=o;break;case"w":c[s]=-o;break;case"n":c[s]=o;break;case"s":c[s]=-o;break;case"u":i[s]!==void 0&&(c.z=o);break;case"d":i[s]!==void 0&&(c.z=-o);break;default:return null}return c}function Bf(e){var t={x:e[0],y:e[1]};return e.length>2&&(t.z=e[2]),e.length>3&&(t.m=e[3]),t}function IS(e){jf(e.x),jf(e.y)}function jf(e){if(typeof Number.isFinite=="function"){if(Number.isFinite(e))return;throw new TypeError("coordinates must be finite numbers")}if(typeof e!="number"||e!==e||!isFinite(e))throw new TypeError("coordinates must be finite numbers")}function RS(e,t){return(e.datum.datum_type===Vn||e.datum.datum_type===$n)&&t.datumCode!=="WGS84"||(t.datum.datum_type===Vn||t.datum.datum_type===$n)&&e.datumCode!=="WGS84"}function ka(e,t,i,n){var r;if(Array.isArray(i)&&(i=Bf(i)),IS(i),e.datum&&t.datum&&RS(e,t)&&(r=new Ni("WGS84"),i=ka(e,r,i,n),e=r),n&&e.axis!=="enu"&&(i=Lf(e,!1,i)),e.projName==="longlat")i={x:i.x*Ft,y:i.y*Ft,z:i.z||0};else if(e.to_meter&&(i={x:i.x*e.to_meter,y:i.y*e.to_meter,z:i.z||0}),i=e.inverse(i),!i)return;if(e.from_greenwich&&(i.x+=e.from_greenwich),i=AS(e.datum,t.datum,i),!!i)return t.from_greenwich&&(i={x:i.x-t.from_greenwich,y:i.y,z:i.z||0}),t.projName==="longlat"?i={x:i.x*Fi,y:i.y*Fi,z:i.z||0}:(i=t.forward(i),t.to_meter&&(i={x:i.x/t.to_meter,y:i.y/t.to_meter,z:i.z||0})),n&&t.axis!=="enu"?Lf(t,!0,i):i}var Ff=Ni("WGS84");function Lc(e,t,i,n){var r,a,o;return Array.isArray(i)?(r=ka(e,t,i,n)||{x:NaN,y:NaN},i.length>2?typeof e.name!="undefined"&&e.name==="geocent"||typeof t.name!="undefined"&&t.name==="geocent"?typeof r.z=="number"?[r.x,r.y,r.z].concat(i.splice(3)):[r.x,r.y,i[2]].concat(i.splice(3)):[r.x,r.y].concat(i.splice(2)):[r.x,r.y]):(a=ka(e,t,i,n),o=Object.keys(i),o.length===2||o.forEach(function(s){if(typeof e.name!="undefined"&&e.name==="geocent"||typeof t.name!="undefined"&&t.name==="geocent"){if(s==="x"||s==="y"||s==="z")return}else if(s==="x"||s==="y")return;a[s]=i[s]}),a)}function kf(e){return e instanceof Ni?e:e.oProj?e.oProj:Ni(e)}function hi(e,t,i){e=kf(e);var n=!1,r;return typeof t=="undefined"?(t=e,e=Ff,n=!0):(typeof t.x!="undefined"||Array.isArray(t))&&(i=t,t=e,e=Ff,n=!0),t=kf(t),i?Lc(e,t,i):(r={forward:function(a,o){return Lc(e,t,a,o)},inverse:function(a,o){return Lc(t,e,a,o)}},n&&(r.oProj=t),r)}var Nf=6,zf="AJSAJS",Vf="AFAFAF",mr=65,ai=73,_i=79,mo=86,fo=90,LS={forward:$f,inverse:BS,toPoint:Gf};function $f(e,t){return t=t||5,kS(jS({lat:e[1],lon:e[0]}),t)}function BS(e){var t=jc(Wf(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat,t.lon,t.lat]:[t.left,t.bottom,t.right,t.top]}function Gf(e){var t=jc(Wf(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function Bc(e){return e*(Math.PI/180)}function Uf(e){return 180*(e/Math.PI)}function jS(e){var t=e.lat,i=e.lon,n=6378137,r=.00669438,a=.9996,o,s,l,c,u,d,m,f=Bc(t),v=Bc(i),C,b;b=Math.floor((i+180)/6)+1,i===180&&(b=60),t>=56&&t<64&&i>=3&&i<12&&(b=32),t>=72&&t<84&&(i>=0&&i<9?b=31:i>=9&&i<21?b=33:i>=21&&i<33?b=35:i>=33&&i<42&&(b=37)),o=(b-1)*6-180+3,C=Bc(o),s=r/(1-r),l=n/Math.sqrt(1-r*Math.sin(f)*Math.sin(f)),c=Math.tan(f)*Math.tan(f),u=s*Math.cos(f)*Math.cos(f),d=Math.cos(f)*(v-C),m=n*((1-r/4-3*r*r/64-5*r*r*r/256)*f-(3*r/8+3*r*r/32+45*r*r*r/1024)*Math.sin(2*f)+(15*r*r/256+45*r*r*r/1024)*Math.sin(4*f)-35*r*r*r/3072*Math.sin(6*f));var _=a*l*(d+(1-c+u)*d*d*d/6+(5-18*c+c*c+72*u-58*s)*d*d*d*d*d/120)+5e5,M=a*(m+l*Math.tan(f)*(d*d/2+(5-c+9*u+4*u*u)*d*d*d*d/24+(61-58*c+c*c+600*u-330*s)*d*d*d*d*d*d/720));return t<0&&(M+=1e7),{northing:Math.round(M),easting:Math.round(_),zoneNumber:b,zoneLetter:FS(t)}}function jc(e){var t=e.northing,i=e.easting,n=e.zoneLetter,r=e.zoneNumber;if(r<0||r>60)return null;var a=.9996,o=6378137,s=.00669438,l,c=(1-Math.sqrt(1-s))/(1+Math.sqrt(1-s)),u,d,m,f,v,C,b,_,M,g=i-5e5,E=t;n<"N"&&(E-=1e7),b=(r-1)*6-180+3,l=s/(1-s),C=E/a,_=C/(o*(1-s/4-3*s*s/64-5*s*s*s/256)),M=_+(3*c/2-27*c*c*c/32)*Math.sin(2*_)+(21*c*c/16-55*c*c*c*c/32)*Math.sin(4*_)+151*c*c*c/96*Math.sin(6*_),u=o/Math.sqrt(1-s*Math.sin(M)*Math.sin(M)),d=Math.tan(M)*Math.tan(M),m=l*Math.cos(M)*Math.cos(M),f=o*(1-s)/Math.pow(1-s*Math.sin(M)*Math.sin(M),1.5),v=g/(u*a);var T=M-u*Math.tan(M)/f*(v*v/2-(5+3*d+10*m-4*m*m-9*l)*v*v*v*v/24+(61+90*d+298*m+45*d*d-252*l-3*m*m)*v*v*v*v*v*v/720);T=Uf(T);var A=(v-(1+2*d+m)*v*v*v/6+(5-2*m+28*d-3*m*m+8*l+24*d*d)*v*v*v*v*v/120)/Math.cos(M);A=b+Uf(A);var R;if(e.accuracy){var I=jc({northing:e.northing+e.accuracy,easting:e.easting+e.accuracy,zoneLetter:e.zoneLetter,zoneNumber:e.zoneNumber});R={top:I.lat,right:I.lon,bottom:T,left:A}}else R={lat:T,lon:A};return R}function FS(e){var t="Z";return 84>=e&&e>=72?t="X":72>e&&e>=64?t="W":64>e&&e>=56?t="V":56>e&&e>=48?t="U":48>e&&e>=40?t="T":40>e&&e>=32?t="S":32>e&&e>=24?t="R":24>e&&e>=16?t="Q":16>e&&e>=8?t="P":8>e&&e>=0?t="N":0>e&&e>=-8?t="M":-8>e&&e>=-16?t="L":-16>e&&e>=-24?t="K":-24>e&&e>=-32?t="J":-32>e&&e>=-40?t="H":-40>e&&e>=-48?t="G":-48>e&&e>=-56?t="F":-56>e&&e>=-64?t="E":-64>e&&e>=-72?t="D":-72>e&&e>=-80&&(t="C"),t}function kS(e,t){var i="00000"+e.easting,n="00000"+e.northing;return e.zoneNumber+e.zoneLetter+NS(e.easting,e.northing,e.zoneNumber)+i.substr(i.length-5,t)+n.substr(n.length-5,t)}function NS(e,t,i){var n=Hf(i),r=Math.floor(e/1e5),a=Math.floor(t/1e5)%20;return zS(r,a,n)}function Hf(e){var t=e%Nf;return t===0&&(t=Nf),t}function zS(e,t,i){var n=i-1,r=zf.charCodeAt(n),a=Vf.charCodeAt(n),o=r+e-1,s=a+t,l=!1;o>fo&&(o=o-fo+mr-1,l=!0),(o===ai||r<ai&&o>ai||(o>ai||r<ai)&&l)&&o++,(o===_i||r<_i&&o>_i||(o>_i||r<_i)&&l)&&(o++,o===ai&&o++),o>fo&&(o=o-fo+mr-1),s>mo?(s=s-mo+mr-1,l=!0):l=!1,(s===ai||a<ai&&s>ai||(s>ai||a<ai)&&l)&&s++,(s===_i||a<_i&&s>_i||(s>_i||a<_i)&&l)&&(s++,s===ai&&s++),s>mo&&(s=s-mo+mr-1);var c=String.fromCharCode(o)+String.fromCharCode(s);return c}function Wf(e){if(e&&e.length===0)throw"MGRSPoint coverting from nothing";for(var t=e.length,i=null,n="",r,a=0;!/[A-Z]/.test(r=e.charAt(a));){if(a>=2)throw"MGRSPoint bad conversion from: "+e;n+=r,a++}var o=parseInt(n,10);if(a===0||a+3>t)throw"MGRSPoint bad conversion from: "+e;var s=e.charAt(a++);if(s<="A"||s==="B"||s==="Y"||s>="Z"||s==="I"||s==="O")throw"MGRSPoint zone letter "+s+" not handled: "+e;i=e.substring(a,a+=2);for(var l=Hf(o),c=VS(i.charAt(0),l),u=$S(i.charAt(1),l);u<GS(s);)u+=2e6;var d=t-a;if(d%2!==0)throw`MGRSPoint has to have an even number
of digits after the zone letter and two 100km letters - front
half for easting meters, second half for
northing meters`+e;var m=d/2,f=0,v=0,C,b,_,M,g;return m>0&&(C=1e5/Math.pow(10,m),b=e.substring(a,a+m),f=parseFloat(b)*C,_=e.substring(a+m),v=parseFloat(_)*C),M=f+c,g=v+u,{easting:M,northing:g,zoneLetter:s,zoneNumber:o,accuracy:C}}function VS(e,t){for(var i=zf.charCodeAt(t-1),n=1e5,r=!1;i!==e.charCodeAt(0);){if(i++,i===ai&&i++,i===_i&&i++,i>fo){if(r)throw"Bad character: "+e;i=mr,r=!0}n+=1e5}return n}function $S(e,t){if(e>"V")throw"MGRSPoint given invalid Northing "+e;for(var i=Vf.charCodeAt(t-1),n=0,r=!1;i!==e.charCodeAt(0);){if(i++,i===ai&&i++,i===_i&&i++,i>mo){if(r)throw"Bad character: "+e;i=mr,r=!0}n+=1e5}return n}function GS(e){var t;switch(e){case"C":t=11e5;break;case"D":t=2e6;break;case"E":t=28e5;break;case"F":t=37e5;break;case"G":t=46e5;break;case"H":t=55e5;break;case"J":t=64e5;break;case"K":t=73e5;break;case"L":t=82e5;break;case"M":t=91e5;break;case"N":t=0;break;case"P":t=8e5;break;case"Q":t=17e5;break;case"R":t=26e5;break;case"S":t=35e5;break;case"T":t=44e5;break;case"U":t=53e5;break;case"V":t=62e5;break;case"W":t=7e6;break;case"X":t=79e5;break;default:t=-1}if(t>=0)return t;throw"Invalid zone letter: "+e}function fr(e,t,i){if(!(this instanceof fr))return new fr(e,t,i);if(Array.isArray(e))this.x=e[0],this.y=e[1],this.z=e[2]||0;else if(typeof e=="object")this.x=e.x,this.y=e.y,this.z=e.z||0;else if(typeof e=="string"&&typeof t=="undefined"){var n=e.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0}else this.x=e,this.y=t,this.z=i||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}fr.fromMGRS=function(e){return new fr(Gf(e))},fr.prototype.toMGRS=function(e){return $f([this.x,this.y],e)};var US=1,HS=.25,qf=.046875,Zf=.01953125,Qf=.01068115234375,WS=.75,qS=.46875,ZS=.013020833333333334,QS=.007120768229166667,XS=.3645833333333333,YS=.005696614583333333,JS=.3076171875;function Xf(e){var t=[];t[0]=US-e*(HS+e*(qf+e*(Zf+e*Qf))),t[1]=e*(WS-e*(qf+e*(Zf+e*Qf)));var i=e*e;return t[2]=i*(qS-e*(ZS+e*QS)),i*=e,t[3]=i*(XS-e*YS),t[4]=i*e*JS,t}function Na(e,t,i,n){return i*=t,t*=t,n[0]*e-i*(n[1]+t*(n[2]+t*(n[3]+t*n[4])))}var KS=20;function Yf(e,t,i){for(var n=1/(1-t),r=e,a=KS;a;--a){var o=Math.sin(r),s=1-t*o*o;if(s=(Na(r,o,Math.cos(r),i)-e)*(s*Math.sqrt(s))*n,r-=s,Math.abs(s)<_e)return r}return r}function e3(){this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.es&&(this.en=Xf(this.es),this.ml0=Na(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function t3(e){var t=e.x,i=e.y,n=Oe(t-this.long0),r,a,o,s=Math.sin(i),l=Math.cos(i);if(this.es){var u=l*n,d=Math.pow(u,2),m=this.ep2*Math.pow(l,2),f=Math.pow(m,2),v=Math.abs(l)>_e?Math.tan(i):0,C=Math.pow(v,2),b=Math.pow(C,2);r=1-this.es*Math.pow(s,2),u=u/Math.sqrt(r);var _=Na(i,s,l,this.en);a=this.a*(this.k0*u*(1+d/6*(1-C+m+d/20*(5-18*C+b+14*m-58*C*m+d/42*(61+179*b-b*C-479*C)))))+this.x0,o=this.a*(this.k0*(_-this.ml0+s*n*u/2*(1+d/12*(5-C+9*m+4*f+d/30*(61+b-58*C+270*m-330*C*m+d/56*(1385+543*b-b*C-3111*C))))))+this.y0}else{var c=l*Math.sin(n);if(Math.abs(Math.abs(c)-1)<_e)return 93;if(a=.5*this.a*this.k0*Math.log((1+c)/(1-c))+this.x0,o=l*Math.cos(n)/Math.sqrt(1-Math.pow(c,2)),c=Math.abs(o),c>=1){if(c-1>_e)return 93;o=0}else o=Math.acos(o);i<0&&(o=-o),o=this.a*this.k0*(o-this.lat0)+this.y0}return e.x=a,e.y=o,e}function i3(e){var t,i,n,r,a=(e.x-this.x0)*(1/this.a),o=(e.y-this.y0)*(1/this.a);if(this.es)if(t=this.ml0+o/this.k0,i=Yf(t,this.es,this.en),Math.abs(i)<pe){var d=Math.sin(i),m=Math.cos(i),f=Math.abs(m)>_e?Math.tan(i):0,v=this.ep2*Math.pow(m,2),C=Math.pow(v,2),b=Math.pow(f,2),_=Math.pow(b,2);t=1-this.es*Math.pow(d,2);var M=a*Math.sqrt(t)/this.k0,g=Math.pow(M,2);t=t*f,n=i-t*g/(1-this.es)*.5*(1-g/12*(5+3*b-9*v*b+v-4*C-g/30*(61+90*b-252*v*b+45*_+46*v-g/56*(1385+3633*b+4095*_+1574*_*b)))),r=Oe(this.long0+M*(1-g/6*(1+2*b+v-g/20*(5+28*b+24*_+8*v*b+6*v-g/42*(61+662*b+1320*_+720*_*b))))/m)}else n=pe*uo(o),r=0;else{var s=Math.exp(a/this.k0),l=.5*(s-1/s),c=this.lat0+o/this.k0,u=Math.cos(c);t=Math.sqrt((1-Math.pow(u,2))/(1+Math.pow(l,2))),n=Math.asin(t),o<0&&(n=-n),l===0&&u===0?r=0:r=Oe(Math.atan2(l,u)+this.long0)}return e.x=r,e.y=n,e}var n3=["Fast_Transverse_Mercator","Fast Transverse Mercator"],za={init:e3,forward:t3,inverse:i3,names:n3};function Jf(e){var t=Math.exp(e);return t=(t-1/t)/2,t}function Va(e,t){e=Math.abs(e),t=Math.abs(t);var i=Math.max(e,t),n=Math.min(e,t)/(i||1);return i*Math.sqrt(1+Math.pow(n,2))}function r3(e){var t=1+e,i=t-1;return i===0?e:e*Math.log(t)/i}function o3(e){var t=Math.abs(e);return t=r3(t*(1+t/(Va(1,t)+1))),e<0?-t:t}function Fc(e,t){for(var i=2*Math.cos(2*t),n=e.length-1,r=e[n],a=0,o;--n>=0;)o=-a+i*r+e[n],a=r,r=o;return t+o*Math.sin(2*t)}function a3(e,t){for(var i=2*Math.cos(t),n=e.length-1,r=e[n],a=0,o;--n>=0;)o=-a+i*r+e[n],a=r,r=o;return Math.sin(t)*o}function s3(e){var t=Math.exp(e);return t=(t+1/t)/2,t}function Kf(e,t,i){for(var n=Math.sin(t),r=Math.cos(t),a=Jf(i),o=s3(i),s=2*r*o,l=-2*n*a,c=e.length-1,u=e[c],d=0,m=0,f=0,v,C;--c>=0;)v=m,C=d,m=u,d=f,u=-v+s*m-l*d+e[c],f=-C+l*m+s*d;return s=n*o,l=r*a,[s*u-l*f,s*f+l*u]}function l3(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(za.init.apply(this),this.forward=za.forward,this.inverse=za.inverse),this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var e=this.es/(1+Math.sqrt(1-this.es)),t=e/(2-e),i=t;this.cgb[0]=t*(2+t*(-2/3+t*(-2+t*(116/45+t*(26/45+t*(-2854/675)))))),this.cbg[0]=t*(-2+t*(2/3+t*(4/3+t*(-82/45+t*(32/45+t*(4642/4725)))))),i=i*t,this.cgb[1]=i*(7/3+t*(-8/5+t*(-227/45+t*(2704/315+t*(2323/945))))),this.cbg[1]=i*(5/3+t*(-16/15+t*(-13/9+t*(904/315+t*(-1522/945))))),i=i*t,this.cgb[2]=i*(56/15+t*(-136/35+t*(-1262/105+t*(73814/2835)))),this.cbg[2]=i*(-26/15+t*(34/21+t*(8/5+t*(-12686/2835)))),i=i*t,this.cgb[3]=i*(4279/630+t*(-332/35+t*(-399572/14175))),this.cbg[3]=i*(1237/630+t*(-12/5+t*(-24832/14175))),i=i*t,this.cgb[4]=i*(4174/315+t*(-144838/6237)),this.cbg[4]=i*(-734/315+t*(109598/31185)),i=i*t,this.cgb[5]=i*(601676/22275),this.cbg[5]=i*(444337/155925),i=Math.pow(t,2),this.Qn=this.k0/(1+t)*(1+i*(1/4+i*(1/64+i/256))),this.utg[0]=t*(-.5+t*(2/3+t*(-37/96+t*(1/360+t*(81/512+t*(-96199/604800)))))),this.gtu[0]=t*(.5+t*(-2/3+t*(5/16+t*(41/180+t*(-127/288+t*(7891/37800)))))),this.utg[1]=i*(-1/48+t*(-1/15+t*(437/1440+t*(-46/105+t*(1118711/3870720))))),this.gtu[1]=i*(13/48+t*(-3/5+t*(557/1440+t*(281/630+t*(-1983433/1935360))))),i=i*t,this.utg[2]=i*(-17/480+t*(37/840+t*(209/4480+t*(-5569/90720)))),this.gtu[2]=i*(61/240+t*(-103/140+t*(15061/26880+t*(167603/181440)))),i=i*t,this.utg[3]=i*(-4397/161280+t*(11/504+t*(830251/7257600))),this.gtu[3]=i*(49561/161280+t*(-179/168+t*(6601661/7257600))),i=i*t,this.utg[4]=i*(-4583/161280+t*(108847/3991680)),this.gtu[4]=i*(34729/80640+t*(-3418889/1995840)),i=i*t,this.utg[5]=i*(-20648693/638668800),this.gtu[5]=i*(212378941/319334400);var n=Fc(this.cbg,this.lat0);this.Zb=-this.Qn*(n+a3(this.gtu,2*n))}function c3(e){var t=Oe(e.x-this.long0),i=e.y;i=Fc(this.cbg,i);var n=Math.sin(i),r=Math.cos(i),a=Math.sin(t),o=Math.cos(t);i=Math.atan2(n,o*r),t=Math.atan2(a*r,Va(n,r*o)),t=o3(Math.tan(t));var s=Kf(this.gtu,2*i,2*t);i=i+s[0],t=t+s[1];var l,c;return Math.abs(t)<=2.623395162778?(l=this.a*(this.Qn*t)+this.x0,c=this.a*(this.Qn*i+this.Zb)+this.y0):(l=1/0,c=1/0),e.x=l,e.y=c,e}function u3(e){var t=(e.x-this.x0)*(1/this.a),i=(e.y-this.y0)*(1/this.a);i=(i-this.Zb)/this.Qn,t=t/this.Qn;var n,r;if(Math.abs(t)<=2.623395162778){var a=Kf(this.utg,2*i,2*t);i=i+a[0],t=t+a[1],t=Math.atan(Jf(t));var o=Math.sin(i),s=Math.cos(i),l=Math.sin(t),c=Math.cos(t);i=Math.atan2(o*c,Va(l,c*s)),t=Math.atan2(l,c*s),n=Oe(t+this.long0),r=Fc(this.cgb,i)}else n=1/0,r=1/0;return e.x=n,e.y=r,e}var d3=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","tmerc"],$a={init:l3,forward:c3,inverse:u3,names:d3};function h3(e,t){if(e===void 0){if(e=Math.floor((Oe(t)+Math.PI)*30/Math.PI)+1,e<0)return 0;if(e>60)return 60}return e}var m3="etmerc";function f3(){var e=h3(this.zone,this.long0);if(e===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(e)-183)*Ft,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,$a.init.apply(this),this.forward=$a.forward,this.inverse=$a.inverse}var p3=["Universal Transverse Mercator System","utm"],v3={init:f3,names:p3,dependsOn:m3};function kc(e,t){return Math.pow((1-e)/(1+e),t)}var g3=20;function y3(){var e=Math.sin(this.lat0),t=Math.cos(this.lat0);t*=t,this.rc=Math.sqrt(1-this.es)/(1-this.es*e*e),this.C=Math.sqrt(1+this.es*t*t/(1-this.es)),this.phic0=Math.asin(e/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+$e)/(Math.pow(Math.tan(.5*this.lat0+$e),this.C)*kc(this.e*e,this.ratexp))}function b3(e){var t=e.x,i=e.y;return e.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*i+$e),this.C)*kc(this.e*Math.sin(i),this.ratexp))-pe,e.x=this.C*t,e}function C3(e){for(var t=1e-14,i=e.x/this.C,n=e.y,r=Math.pow(Math.tan(.5*n+$e)/this.K,1/this.C),a=g3;a>0&&(n=2*Math.atan(r*kc(this.e*Math.sin(e.y),-.5*this.e))-pe,!(Math.abs(n-e.y)<t));--a)e.y=n;return a?(e.x=i,e.y=n,e):null}var w3=["gauss"],Nc={init:y3,forward:b3,inverse:C3,names:w3};function _3(){Nc.init.apply(this),!!this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))}function x3(e){var t,i,n,r;return e.x=Oe(e.x-this.long0),Nc.forward.apply(this,[e]),t=Math.sin(e.y),i=Math.cos(e.y),n=Math.cos(e.x),r=this.k0*this.R2/(1+this.sinc0*t+this.cosc0*i*n),e.x=r*i*Math.sin(e.x),e.y=r*(this.cosc0*t-this.sinc0*i*n),e.x=this.a*e.x+this.x0,e.y=this.a*e.y+this.y0,e}function E3(e){var t,i,n,r,a;if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,a=Math.sqrt(e.x*e.x+e.y*e.y)){var o=2*Math.atan2(a,this.R2);t=Math.sin(o),i=Math.cos(o),r=Math.asin(i*this.sinc0+e.y*t*this.cosc0/a),n=Math.atan2(e.x*t,a*this.cosc0*i-e.y*this.sinc0*t)}else r=this.phic0,n=0;return e.x=n,e.y=r,Nc.inverse.apply(this,[e]),e.x=Oe(e.x+this.long0),e}var O3=["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"],P3={init:_3,forward:x3,inverse:E3,names:O3};function M3(e,t,i){return t*=i,Math.tan(.5*(pe+e))*Math.pow((1-t)/(1+t),.5*i)}function S3(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=_e&&(this.k0=.5*(1+uo(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=_e&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=_e&&(this.k0=.5*this.cons*ki(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/Ii(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=ki(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-pe,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function T3(e){var t=e.x,i=e.y,n=Math.sin(i),r=Math.cos(i),a,o,s,l,c,u,d=Oe(t-this.long0);return Math.abs(Math.abs(t-this.long0)-Math.PI)<=_e&&Math.abs(i+this.lat0)<=_e?(e.x=NaN,e.y=NaN,e):this.sphere?(a=2*this.k0/(1+this.sinlat0*n+this.coslat0*r*Math.cos(d)),e.x=this.a*a*r*Math.sin(d)+this.x0,e.y=this.a*a*(this.coslat0*n-this.sinlat0*r*Math.cos(d))+this.y0,e):(o=2*Math.atan(this.ssfn_(i,n,this.e))-pe,l=Math.cos(o),s=Math.sin(o),Math.abs(this.coslat0)<=_e?(c=Ii(this.e,i*this.con,this.con*n),u=2*this.a*this.k0*c/this.cons,e.x=this.x0+u*Math.sin(t-this.long0),e.y=this.y0-this.con*u*Math.cos(t-this.long0),e):(Math.abs(this.sinlat0)<_e?(a=2*this.a*this.k0/(1+l*Math.cos(d)),e.y=a*s):(a=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*s+this.cosX0*l*Math.cos(d))),e.y=a*(this.cosX0*s-this.sinX0*l*Math.cos(d))+this.y0),e.x=a*l*Math.sin(d)+this.x0,e))}function A3(e){e.x-=this.x0,e.y-=this.y0;var t,i,n,r,a,o=Math.sqrt(e.x*e.x+e.y*e.y);if(this.sphere){var s=2*Math.atan(o/(2*this.a*this.k0));return t=this.long0,i=this.lat0,o<=_e?(e.x=t,e.y=i,e):(i=Math.asin(Math.cos(s)*this.sinlat0+e.y*Math.sin(s)*this.coslat0/o),Math.abs(this.coslat0)<_e?this.lat0>0?t=Oe(this.long0+Math.atan2(e.x,-1*e.y)):t=Oe(this.long0+Math.atan2(e.x,e.y)):t=Oe(this.long0+Math.atan2(e.x*Math.sin(s),o*this.coslat0*Math.cos(s)-e.y*this.sinlat0*Math.sin(s))),e.x=t,e.y=i,e)}else if(Math.abs(this.coslat0)<=_e){if(o<=_e)return i=this.lat0,t=this.long0,e.x=t,e.y=i,e;e.x*=this.con,e.y*=this.con,n=o*this.cons/(2*this.a*this.k0),i=this.con*ho(this.e,n),t=this.con*Oe(this.con*this.long0+Math.atan2(e.x,-1*e.y))}else r=2*Math.atan(o*this.cosX0/(2*this.a*this.k0*this.ms1)),t=this.long0,o<=_e?a=this.X0:(a=Math.asin(Math.cos(r)*this.sinX0+e.y*Math.sin(r)*this.cosX0/o),t=Oe(this.long0+Math.atan2(e.x*Math.sin(r),o*this.cosX0*Math.cos(r)-e.y*this.sinX0*Math.sin(r)))),i=-1*ho(this.e,Math.tan(.5*(pe+a)));return e.x=t,e.y=i,e}var D3=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],I3={init:S3,forward:T3,inverse:A3,names:D3,ssfn_:M3};function R3(){var e=this.lat0;this.lambda0=this.long0;var t=Math.sin(e),i=this.a,n=this.rf,r=1/n,a=2*r-Math.pow(r,2),o=this.e=Math.sqrt(a);this.R=this.k0*i*Math.sqrt(1-a)/(1-a*Math.pow(t,2)),this.alpha=Math.sqrt(1+a/(1-a)*Math.pow(Math.cos(e),4)),this.b0=Math.asin(t/this.alpha);var s=Math.log(Math.tan(Math.PI/4+this.b0/2)),l=Math.log(Math.tan(Math.PI/4+e/2)),c=Math.log((1+o*t)/(1-o*t));this.K=s-this.alpha*l+this.alpha*o/2*c}function L3(e){var t=Math.log(Math.tan(Math.PI/4-e.y/2)),i=this.e/2*Math.log((1+this.e*Math.sin(e.y))/(1-this.e*Math.sin(e.y))),n=-this.alpha*(t+i)+this.K,r=2*(Math.atan(Math.exp(n))-Math.PI/4),a=this.alpha*(e.x-this.lambda0),o=Math.atan(Math.sin(a)/(Math.sin(this.b0)*Math.tan(r)+Math.cos(this.b0)*Math.cos(a))),s=Math.asin(Math.cos(this.b0)*Math.sin(r)-Math.sin(this.b0)*Math.cos(r)*Math.cos(a));return e.y=this.R/2*Math.log((1+Math.sin(s))/(1-Math.sin(s)))+this.y0,e.x=this.R*o+this.x0,e}function B3(e){for(var t=e.x-this.x0,i=e.y-this.y0,n=t/this.R,r=2*(Math.atan(Math.exp(i/this.R))-Math.PI/4),a=Math.asin(Math.cos(this.b0)*Math.sin(r)+Math.sin(this.b0)*Math.cos(r)*Math.cos(n)),o=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(r))),s=this.lambda0+o/this.alpha,l=0,c=a,u=-1e3,d=0;Math.abs(c-u)>1e-7;){if(++d>20)return;l=1/this.alpha*(Math.log(Math.tan(Math.PI/4+a/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(c))/2)),u=c,c=2*Math.atan(Math.exp(l))-Math.PI/2}return e.x=s,e.y=c,e}var j3=["somerc"],F3={init:R3,forward:L3,inverse:B3,names:j3},pr=1e-7;function k3(e){var t=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],i=typeof e.PROJECTION=="object"?Object.keys(e.PROJECTION)[0]:e.PROJECTION;return"no_uoff"in e||"no_off"in e||t.indexOf(i)!==-1}function N3(){var e,t,i,n,r,a,o,s,l,c,u=0,d,m=0,f=0,v=0,C=0,b=0,_=0;this.no_off=k3(this),this.no_rot="no_rot"in this;var M=!1;"alpha"in this&&(M=!0);var g=!1;if("rectified_grid_angle"in this&&(g=!0),M&&(_=this.alpha),g&&(u=this.rectified_grid_angle*Ft),M||g)m=this.longc;else if(f=this.long1,C=this.lat1,v=this.long2,b=this.lat2,Math.abs(C-b)<=pr||(e=Math.abs(C))<=pr||Math.abs(e-pe)<=pr||Math.abs(Math.abs(this.lat0)-pe)<=pr||Math.abs(Math.abs(b)-pe)<=pr)throw new Error;var E=1-this.es;t=Math.sqrt(E),Math.abs(this.lat0)>_e?(s=Math.sin(this.lat0),i=Math.cos(this.lat0),e=1-this.es*s*s,this.B=i*i,this.B=Math.sqrt(1+this.es*this.B*this.B/E),this.A=this.B*this.k0*t/e,n=this.B*t/(i*Math.sqrt(e)),r=n*n-1,r<=0?r=0:(r=Math.sqrt(r),this.lat0<0&&(r=-r)),this.E=r+=n,this.E*=Math.pow(Ii(this.e,this.lat0,s),this.B)):(this.B=1/t,this.A=this.k0,this.E=n=r=1),M||g?(M?(d=Math.asin(Math.sin(_)/n),g||(u=_)):(d=u,_=Math.asin(n*Math.sin(d))),this.lam0=m-Math.asin(.5*(r-1/r)*Math.tan(d))/this.B):(a=Math.pow(Ii(this.e,C,Math.sin(C)),this.B),o=Math.pow(Ii(this.e,b,Math.sin(b)),this.B),r=this.E/a,l=(o-a)/(o+a),c=this.E*this.E,c=(c-o*a)/(c+o*a),e=f-v,e<-Math.pi?v-=lo:e>Math.pi&&(v+=lo),this.lam0=Oe(.5*(f+v)-Math.atan(c*Math.tan(.5*this.B*(f-v))/l)/this.B),d=Math.atan(2*Math.sin(this.B*Oe(f-this.lam0))/(r-1/r)),u=_=Math.asin(n*Math.sin(d))),this.singam=Math.sin(d),this.cosgam=Math.cos(d),this.sinrot=Math.sin(u),this.cosrot=Math.cos(u),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.A*this.B,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(n*n-1)/Math.cos(_))),this.lat0<0&&(this.u_0=-this.u_0)),r=.5*d,this.v_pole_n=this.ArB*Math.log(Math.tan($e-r)),this.v_pole_s=this.ArB*Math.log(Math.tan($e+r))}function z3(e){var t={},i,n,r,a,o,s,l,c;if(e.x=e.x-this.lam0,Math.abs(Math.abs(e.y)-pe)>_e){if(o=this.E/Math.pow(Ii(this.e,e.y,Math.sin(e.y)),this.B),s=1/o,i=.5*(o-s),n=.5*(o+s),a=Math.sin(this.B*e.x),r=(i*this.singam-a*this.cosgam)/n,Math.abs(Math.abs(r)-1)<_e)throw new Error;c=.5*this.ArB*Math.log((1-r)/(1+r)),s=Math.cos(this.B*e.x),Math.abs(s)<pr?l=this.A*e.x:l=this.ArB*Math.atan2(i*this.cosgam+a*this.singam,s)}else c=e.y>0?this.v_pole_n:this.v_pole_s,l=this.ArB*e.y;return this.no_rot?(t.x=l,t.y=c):(l-=this.u_0,t.x=c*this.cosrot+l*this.sinrot,t.y=l*this.cosrot-c*this.sinrot),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t}function V3(e){var t,i,n,r,a,o,s,l={};if(e.x=(e.x-this.x0)*(1/this.a),e.y=(e.y-this.y0)*(1/this.a),this.no_rot?(i=e.y,t=e.x):(i=e.x*this.cosrot-e.y*this.sinrot,t=e.y*this.cosrot+e.x*this.sinrot+this.u_0),n=Math.exp(-this.BrA*i),r=.5*(n-1/n),a=.5*(n+1/n),o=Math.sin(this.BrA*t),s=(o*this.cosgam+r*this.singam)/a,Math.abs(Math.abs(s)-1)<_e)l.x=0,l.y=s<0?-pe:pe;else{if(l.y=this.E/Math.sqrt((1+s)/(1-s)),l.y=ho(this.e,Math.pow(l.y,1/this.B)),l.y===1/0)throw new Error;l.x=-this.rB*Math.atan2(r*this.cosgam-o*this.singam,Math.cos(this.BrA*t))}return l.x+=this.lam0,l}var $3=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"],G3={init:N3,forward:z3,inverse:V3,names:$3};function U3(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<_e)){var e=this.b/this.a;this.e=Math.sqrt(1-e*e);var t=Math.sin(this.lat1),i=Math.cos(this.lat1),n=ki(this.e,t,i),r=Ii(this.e,this.lat1,t),a=Math.sin(this.lat2),o=Math.cos(this.lat2),s=ki(this.e,a,o),l=Ii(this.e,this.lat2,a),c=Ii(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>_e?this.ns=Math.log(n/s)/Math.log(r/l):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=n/(this.ns*Math.pow(r,this.ns)),this.rh=this.a*this.f0*Math.pow(c,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function H3(e){var t=e.x,i=e.y;Math.abs(2*Math.abs(i)-Math.PI)<=_e&&(i=uo(i)*(pe-2*_e));var n=Math.abs(Math.abs(i)-pe),r,a;if(n>_e)r=Ii(this.e,i,Math.sin(i)),a=this.a*this.f0*Math.pow(r,this.ns);else{if(n=i*this.ns,n<=0)return null;a=0}var o=this.ns*Oe(t-this.long0);return e.x=this.k0*(a*Math.sin(o))+this.x0,e.y=this.k0*(this.rh-a*Math.cos(o))+this.y0,e}function W3(e){var t,i,n,r,a,o=(e.x-this.x0)/this.k0,s=this.rh-(e.y-this.y0)/this.k0;this.ns>0?(t=Math.sqrt(o*o+s*s),i=1):(t=-Math.sqrt(o*o+s*s),i=-1);var l=0;if(t!==0&&(l=Math.atan2(i*o,i*s)),t!==0||this.ns>0){if(i=1/this.ns,n=Math.pow(t/(this.a*this.f0),i),r=ho(this.e,n),r===-9999)return null}else r=-pe;return a=Oe(l/this.ns+this.long0),e.x=a,e.y=r,e}var q3=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc"],Z3={init:U3,forward:H3,inverse:W3,names:q3};function Q3(){this.a=6377397155e-3,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.7417649320975901-.308341501185665),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq}function X3(e){var t,i,n,r,a,o,s,l=e.x,c=e.y,u=Oe(l-this.long0);return t=Math.pow((1+this.e*Math.sin(c))/(1-this.e*Math.sin(c)),this.alfa*this.e/2),i=2*(Math.atan(this.k*Math.pow(Math.tan(c/2+this.s45),this.alfa)/t)-this.s45),n=-u*this.alfa,r=Math.asin(Math.cos(this.ad)*Math.sin(i)+Math.sin(this.ad)*Math.cos(i)*Math.cos(n)),a=Math.asin(Math.cos(i)*Math.sin(n)/Math.cos(r)),o=this.n*a,s=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(r/2+this.s45),this.n),e.y=s*Math.cos(o)/1,e.x=s*Math.sin(o)/1,this.czech||(e.y*=-1,e.x*=-1),e}function Y3(e){var t,i,n,r,a,o,s,l,c=e.x;e.x=e.y,e.y=c,this.czech||(e.y*=-1,e.x*=-1),o=Math.sqrt(e.x*e.x+e.y*e.y),a=Math.atan2(e.y,e.x),r=a/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/o,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),t=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(r)),i=Math.asin(Math.cos(n)*Math.sin(r)/Math.cos(t)),e.x=this.long0-i/this.alfa,s=t,l=0;var u=0;do e.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(t/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(s))/(1-this.e*Math.sin(s)),this.e/2))-this.s45),Math.abs(s-e.y)<1e-10&&(l=1),s=e.y,u+=1;while(l===0&&u<15);return u>=15?null:e}var J3=["Krovak","krovak"],K3={init:Q3,forward:X3,inverse:Y3,names:J3};function Jt(e,t,i,n,r){return e*r-t*Math.sin(2*r)+i*Math.sin(4*r)-n*Math.sin(6*r)}function po(e){return 1-.25*e*(1+e/16*(3+1.25*e))}function vo(e){return .375*e*(1+.25*e*(1+.46875*e))}function go(e){return .05859375*e*e*(1+.75*e)}function yo(e){return e*e*e*(35/3072)}function vr(e,t,i){var n=t*i;return e/Math.sqrt(1-n*n)}function gr(e){return Math.abs(e)<pe?e:e-uo(e)*Math.PI}function Ga(e,t,i,n,r){var a,o;a=e/t;for(var s=0;s<15;s++)if(o=(e-(t*a-i*Math.sin(2*a)+n*Math.sin(4*a)-r*Math.sin(6*a)))/(t-2*i*Math.cos(2*a)+4*n*Math.cos(4*a)-6*r*Math.cos(6*a)),a+=o,Math.abs(o)<=1e-10)return a;return NaN}function eT(){this.sphere||(this.e0=po(this.es),this.e1=vo(this.es),this.e2=go(this.es),this.e3=yo(this.es),this.ml0=this.a*Jt(this.e0,this.e1,this.e2,this.e3,this.lat0))}function tT(e){var t,i,n=e.x,r=e.y;if(n=Oe(n-this.long0),this.sphere)t=this.a*Math.asin(Math.cos(r)*Math.sin(n)),i=this.a*(Math.atan2(Math.tan(r),Math.cos(n))-this.lat0);else{var a=Math.sin(r),o=Math.cos(r),s=vr(this.a,this.e,a),l=Math.tan(r)*Math.tan(r),c=n*Math.cos(r),u=c*c,d=this.es*o*o/(1-this.es),m=this.a*Jt(this.e0,this.e1,this.e2,this.e3,r);t=s*c*(1-u*l*(1/6-(8-l+8*d)*u/120)),i=m-this.ml0+s*a/o*u*(.5+(5-l+6*d)*u/24)}return e.x=t+this.x0,e.y=i+this.y0,e}function iT(e){e.x-=this.x0,e.y-=this.y0;var t=e.x/this.a,i=e.y/this.a,n,r;if(this.sphere){var a=i+this.lat0;n=Math.asin(Math.sin(a)*Math.cos(t)),r=Math.atan2(Math.tan(t),Math.cos(a))}else{var o=this.ml0/this.a+i,s=Ga(o,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(s)-pe)<=_e)return e.x=this.long0,e.y=pe,i<0&&(e.y*=-1),e;var l=vr(this.a,this.e,Math.sin(s)),c=l*l*l/this.a/this.a*(1-this.es),u=Math.pow(Math.tan(s),2),d=t*this.a/l,m=d*d;n=s-l*Math.tan(s)/c*d*d*(.5-(1+3*u)*d*d/24),r=d*(1-m*(u/3+(1+3*u)*u*m/15))/Math.cos(s)}return e.x=Oe(r+this.long0),e.y=gr(n),e}var nT=["Cassini","Cassini_Soldner","cass"],rT={init:eT,forward:tT,inverse:iT,names:nT};function gn(e,t){var i;return e>1e-7?(i=e*t,(1-e*e)*(t/(1-i*i)-.5/e*Math.log((1-i)/(1+i)))):2*t}var oT=1,aT=2,sT=3,lT=4;function cT(){var e=Math.abs(this.lat0);if(Math.abs(e-pe)<_e?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(e)<_e?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0){var t;switch(this.qp=gn(this.e,1),this.mmf=.5/(1-this.es),this.apa=yT(this.es),this.mode){case this.N_POLE:this.dd=1;break;case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=gn(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd;break}}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function uT(e){var t,i,n,r,a,o,s,l,c,u,d=e.x,m=e.y;if(d=Oe(d-this.long0),this.sphere){if(a=Math.sin(m),u=Math.cos(m),n=Math.cos(d),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(i=this.mode===this.EQUIT?1+u*n:1+this.sinph0*a+this.cosph0*u*n,i<=_e)return null;i=Math.sqrt(2/i),t=i*u*Math.sin(d),i*=this.mode===this.EQUIT?a:this.cosph0*a-this.sinph0*u*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(m+this.lat0)<_e)return null;i=$e-m*.5,i=2*(this.mode===this.S_POLE?Math.cos(i):Math.sin(i)),t=i*Math.sin(d),i*=n}}else{switch(s=0,l=0,c=0,n=Math.cos(d),r=Math.sin(d),a=Math.sin(m),o=gn(this.e,a),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(s=o/this.qp,l=Math.sqrt(1-s*s)),this.mode){case this.OBLIQ:c=1+this.sinb1*s+this.cosb1*l*n;break;case this.EQUIT:c=1+l*n;break;case this.N_POLE:c=pe+m,o=this.qp-o;break;case this.S_POLE:c=m-pe,o=this.qp+o;break}if(Math.abs(c)<_e)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:c=Math.sqrt(2/c),this.mode===this.OBLIQ?i=this.ymf*c*(this.cosb1*s-this.sinb1*l*n):i=(c=Math.sqrt(2/(1+l*n)))*s*this.ymf,t=this.xmf*c*l*r;break;case this.N_POLE:case this.S_POLE:o>=0?(t=(c=Math.sqrt(o))*r,i=n*(this.mode===this.S_POLE?c:-c)):t=i=0;break}}return e.x=this.a*t+this.x0,e.y=this.a*i+this.y0,e}function dT(e){e.x-=this.x0,e.y-=this.y0;var t=e.x/this.a,i=e.y/this.a,n,r,a,o,s,l,c;if(this.sphere){var u=0,d,m=0;if(d=Math.sqrt(t*t+i*i),r=d*.5,r>1)return null;switch(r=2*Math.asin(r),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(m=Math.sin(r),u=Math.cos(r)),this.mode){case this.EQUIT:r=Math.abs(d)<=_e?0:Math.asin(i*m/d),t*=m,i=u*d;break;case this.OBLIQ:r=Math.abs(d)<=_e?this.lat0:Math.asin(u*this.sinph0+i*m*this.cosph0/d),t*=m*this.cosph0,i=(u-Math.sin(r)*this.sinph0)*d;break;case this.N_POLE:i=-i,r=pe-r;break;case this.S_POLE:r-=pe;break}n=i===0&&(this.mode===this.EQUIT||this.mode===this.OBLIQ)?0:Math.atan2(t,i)}else{if(c=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(t/=this.dd,i*=this.dd,l=Math.sqrt(t*t+i*i),l<_e)return e.x=this.long0,e.y=this.lat0,e;o=2*Math.asin(.5*l/this.rq),a=Math.cos(o),t*=o=Math.sin(o),this.mode===this.OBLIQ?(c=a*this.sinb1+i*o*this.cosb1/l,s=this.qp*c,i=l*this.cosb1*a-i*this.sinb1*o):(c=i*o/l,s=this.qp*c,i=l*a)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(i=-i),s=t*t+i*i,!s)return e.x=this.long0,e.y=this.lat0,e;c=1-s/this.qp,this.mode===this.S_POLE&&(c=-c)}n=Math.atan2(t,i),r=bT(Math.asin(c),this.apa)}return e.x=Oe(this.long0+n),e.y=r,e}var hT=.3333333333333333,mT=.17222222222222222,fT=.10257936507936508,pT=.06388888888888888,vT=.0664021164021164,gT=.016415012942191543;function yT(e){var t,i=[];return i[0]=e*hT,t=e*e,i[0]+=t*mT,i[1]=t*pT,t*=e,i[0]+=t*fT,i[1]+=t*vT,i[2]=t*gT,i}function bT(e,t){var i=e+e;return e+t[0]*Math.sin(i)+t[1]*Math.sin(i+i)+t[2]*Math.sin(i+i+i)}var CT=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],wT={init:cT,forward:uT,inverse:dT,names:CT,S_POLE:oT,N_POLE:aT,EQUIT:sT,OBLIQ:lT};function yn(e){return Math.abs(e)>1&&(e=e>1?1:-1),Math.asin(e)}function _T(){Math.abs(this.lat1+this.lat2)<_e||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=ki(this.e3,this.sin_po,this.cos_po),this.qs1=gn(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=ki(this.e3,this.sin_po,this.cos_po),this.qs2=gn(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=gn(this.e3,this.sin_po,this.cos_po),Math.abs(this.lat1-this.lat2)>_e?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function xT(e){var t=e.x,i=e.y;this.sin_phi=Math.sin(i),this.cos_phi=Math.cos(i);var n=gn(this.e3,this.sin_phi,this.cos_phi),r=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,a=this.ns0*Oe(t-this.long0),o=r*Math.sin(a)+this.x0,s=this.rh-r*Math.cos(a)+this.y0;return e.x=o,e.y=s,e}function ET(e){var t,i,n,r,a,o;return e.x-=this.x0,e.y=this.rh-e.y+this.y0,this.ns0>=0?(t=Math.sqrt(e.x*e.x+e.y*e.y),n=1):(t=-Math.sqrt(e.x*e.x+e.y*e.y),n=-1),r=0,t!==0&&(r=Math.atan2(n*e.x,n*e.y)),n=t*this.ns0/this.a,this.sphere?o=Math.asin((this.c-n*n)/(2*this.ns0)):(i=(this.c-n*n)/this.ns0,o=this.phi1z(this.e3,i)),a=Oe(r/this.ns0+this.long0),e.x=a,e.y=o,e}function OT(e,t){var i,n,r,a,o,s=yn(.5*t);if(e<_e)return s;for(var l=e*e,c=1;c<=25;c++)if(i=Math.sin(s),n=Math.cos(s),r=e*i,a=1-r*r,o=.5*a*a/n*(t/(1-l)-i/a+.5/e*Math.log((1-r)/(1+r))),s=s+o,Math.abs(o)<=1e-7)return s;return null}var PT=["Albers_Conic_Equal_Area","Albers","aea"],MT={init:_T,forward:xT,inverse:ET,names:PT,phi1z:OT};function ST(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function TT(e){var t,i,n,r,a,o,s,l,c=e.x,u=e.y;return n=Oe(c-this.long0),t=Math.sin(u),i=Math.cos(u),r=Math.cos(n),o=this.sin_p14*t+this.cos_p14*i*r,a=1,o>0||Math.abs(o)<=_e?(s=this.x0+this.a*a*i*Math.sin(n)/o,l=this.y0+this.a*a*(this.cos_p14*t-this.sin_p14*i*r)/o):(s=this.x0+this.infinity_dist*i*Math.sin(n),l=this.y0+this.infinity_dist*(this.cos_p14*t-this.sin_p14*i*r)),e.x=s,e.y=l,e}function AT(e){var t,i,n,r,a,o;return e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,(t=Math.sqrt(e.x*e.x+e.y*e.y))?(r=Math.atan2(t,this.rc),i=Math.sin(r),n=Math.cos(r),o=yn(n*this.sin_p14+e.y*i*this.cos_p14/t),a=Math.atan2(e.x*i,t*this.cos_p14*n-e.y*this.sin_p14*i),a=Oe(this.long0+a)):(o=this.phic0,a=0),e.x=a,e.y=o,e}var DT=["gnom"],IT={init:ST,forward:TT,inverse:AT,names:DT};function RT(e,t){var i=1-(1-e*e)/(2*e)*Math.log((1-e)/(1+e));if(Math.abs(Math.abs(t)-i)<1e-6)return t<0?-1*pe:pe;for(var n=Math.asin(.5*t),r,a,o,s,l=0;l<30;l++)if(a=Math.sin(n),o=Math.cos(n),s=e*a,r=Math.pow(1-s*s,2)/(2*o)*(t/(1-e*e)-a/(1-s*s)+.5/e*Math.log((1-s)/(1+s))),n+=r,Math.abs(r)<=1e-10)return n;return NaN}function LT(){this.sphere||(this.k0=ki(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function BT(e){var t=e.x,i=e.y,n,r,a=Oe(t-this.long0);if(this.sphere)n=this.x0+this.a*a*Math.cos(this.lat_ts),r=this.y0+this.a*Math.sin(i)/Math.cos(this.lat_ts);else{var o=gn(this.e,Math.sin(i));n=this.x0+this.a*this.k0*a,r=this.y0+this.a*o*.5/this.k0}return e.x=n,e.y=r,e}function jT(e){e.x-=this.x0,e.y-=this.y0;var t,i;return this.sphere?(t=Oe(this.long0+e.x/this.a/Math.cos(this.lat_ts)),i=Math.asin(e.y/this.a*Math.cos(this.lat_ts))):(i=RT(this.e,2*e.y*this.k0/this.a),t=Oe(this.long0+e.x/(this.a*this.k0))),e.x=t,e.y=i,e}var FT=["cea"],kT={init:LT,forward:BT,inverse:jT,names:FT};function NT(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)}function zT(e){var t=e.x,i=e.y,n=Oe(t-this.long0),r=gr(i-this.lat0);return e.x=this.x0+this.a*n*this.rc,e.y=this.y0+this.a*r,e}function VT(e){var t=e.x,i=e.y;return e.x=Oe(this.long0+(t-this.x0)/(this.a*this.rc)),e.y=gr(this.lat0+(i-this.y0)/this.a),e}var $T=["Equirectangular","Equidistant_Cylindrical","eqc"],GT={init:NT,forward:zT,inverse:VT,names:$T},ep=20;function UT(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=po(this.es),this.e1=vo(this.es),this.e2=go(this.es),this.e3=yo(this.es),this.ml0=this.a*Jt(this.e0,this.e1,this.e2,this.e3,this.lat0)}function HT(e){var t=e.x,i=e.y,n,r,a,o=Oe(t-this.long0);if(a=o*Math.sin(i),this.sphere)Math.abs(i)<=_e?(n=this.a*o,r=-1*this.a*this.lat0):(n=this.a*Math.sin(a)/Math.tan(i),r=this.a*(gr(i-this.lat0)+(1-Math.cos(a))/Math.tan(i)));else if(Math.abs(i)<=_e)n=this.a*o,r=-1*this.ml0;else{var s=vr(this.a,this.e,Math.sin(i))/Math.tan(i);n=s*Math.sin(a),r=this.a*Jt(this.e0,this.e1,this.e2,this.e3,i)-this.ml0+s*(1-Math.cos(a))}return e.x=n+this.x0,e.y=r+this.y0,e}function WT(e){var t,i,n,r,a,o,s,l,c;if(n=e.x-this.x0,r=e.y-this.y0,this.sphere)if(Math.abs(r+this.a*this.lat0)<=_e)t=Oe(n/this.a+this.long0),i=0;else{o=this.lat0+r/this.a,s=n*n/this.a/this.a+o*o,l=o;var u;for(a=ep;a;--a)if(u=Math.tan(l),c=-1*(o*(l*u+1)-l-.5*(l*l+s)*u)/((l-o)/u-1),l+=c,Math.abs(c)<=_e){i=l;break}t=Oe(this.long0+Math.asin(n*Math.tan(l)/this.a)/Math.sin(i))}else if(Math.abs(r+this.ml0)<=_e)i=0,t=Oe(this.long0+n/this.a);else{o=(this.ml0+r)/this.a,s=n*n/this.a/this.a+o*o,l=o;var d,m,f,v,C;for(a=ep;a;--a)if(C=this.e*Math.sin(l),d=Math.sqrt(1-C*C)*Math.tan(l),m=this.a*Jt(this.e0,this.e1,this.e2,this.e3,l),f=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),v=m/this.a,c=(o*(d*v+1)-v-.5*d*(v*v+s))/(this.es*Math.sin(2*l)*(v*v+s-2*o*v)/(4*d)+(o-v)*(d*f-2/Math.sin(2*l))-f),l-=c,Math.abs(c)<=_e){i=l;break}d=Math.sqrt(1-this.es*Math.pow(Math.sin(i),2))*Math.tan(i),t=Oe(this.long0+Math.asin(n*d/this.a)/Math.sin(i))}return e.x=t,e.y=i,e}var qT=["Polyconic","poly"],ZT={init:UT,forward:HT,inverse:WT,names:qT};function QT(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function XT(e){var t,i=e.x,n=e.y,r=n-this.lat0,a=i-this.long0,o=r/so*1e-5,s=a,l=1,c=0;for(t=1;t<=10;t++)l=l*o,c=c+this.A[t]*l;var u=c,d=s,m=1,f=0,v,C,b=0,_=0;for(t=1;t<=6;t++)v=m*u-f*d,C=f*u+m*d,m=v,f=C,b=b+this.B_re[t]*m-this.B_im[t]*f,_=_+this.B_im[t]*m+this.B_re[t]*f;return e.x=_*this.a+this.x0,e.y=b*this.a+this.y0,e}function YT(e){var t,i=e.x,n=e.y,r=i-this.x0,a=n-this.y0,o=a/this.a,s=r/this.a,l=1,c=0,u,d,m=0,f=0;for(t=1;t<=6;t++)u=l*o-c*s,d=c*o+l*s,l=u,c=d,m=m+this.C_re[t]*l-this.C_im[t]*c,f=f+this.C_im[t]*l+this.C_re[t]*c;for(var v=0;v<this.iterations;v++){var C=m,b=f,_,M,g=o,E=s;for(t=2;t<=6;t++)_=C*m-b*f,M=b*m+C*f,C=_,b=M,g=g+(t-1)*(this.B_re[t]*C-this.B_im[t]*b),E=E+(t-1)*(this.B_im[t]*C+this.B_re[t]*b);C=1,b=0;var T=this.B_re[1],A=this.B_im[1];for(t=2;t<=6;t++)_=C*m-b*f,M=b*m+C*f,C=_,b=M,T=T+t*(this.B_re[t]*C-this.B_im[t]*b),A=A+t*(this.B_im[t]*C+this.B_re[t]*b);var R=T*T+A*A;m=(g*T+E*A)/R,f=(E*T-g*A)/R}var I=m,j=f,W=1,$=0;for(t=1;t<=9;t++)W=W*I,$=$+this.D[t]*W;var k=this.lat0+$*so*1e5,h=this.long0+j;return e.x=h,e.y=k,e}var JT=["New_Zealand_Map_Grid","nzmg"],KT={init:QT,forward:XT,inverse:YT,names:JT};function eA(){}function tA(e){var t=e.x,i=e.y,n=Oe(t-this.long0),r=this.x0+this.a*n,a=this.y0+this.a*Math.log(Math.tan(Math.PI/4+i/2.5))*1.25;return e.x=r,e.y=a,e}function iA(e){e.x-=this.x0,e.y-=this.y0;var t=Oe(this.long0+e.x/this.a),i=2.5*(Math.atan(Math.exp(.8*e.y/this.a))-Math.PI/4);return e.x=t,e.y=i,e}var nA=["Miller_Cylindrical","mill"],rA={init:eA,forward:tA,inverse:iA,names:nA},oA=20;function aA(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=Xf(this.es)}function sA(e){var t,i,n=e.x,r=e.y;if(n=Oe(n-this.long0),this.sphere){if(!this.m)r=this.n!==1?Math.asin(this.n*Math.sin(r)):r;else for(var a=this.n*Math.sin(r),o=oA;o;--o){var s=(this.m*r+Math.sin(r)-a)/(this.m+Math.cos(r));if(r-=s,Math.abs(s)<_e)break}t=this.a*this.C_x*n*(this.m+Math.cos(r)),i=this.a*this.C_y*r}else{var l=Math.sin(r),c=Math.cos(r);i=this.a*Na(r,l,c,this.en),t=this.a*n*c/Math.sqrt(1-this.es*l*l)}return e.x=t,e.y=i,e}function lA(e){var t,i,n,r;return e.x-=this.x0,n=e.x/this.a,e.y-=this.y0,t=e.y/this.a,this.sphere?(t/=this.C_y,n=n/(this.C_x*(this.m+Math.cos(t))),this.m?t=yn((this.m*t+Math.sin(t))/this.n):this.n!==1&&(t=yn(Math.sin(t)/this.n)),n=Oe(n+this.long0),t=gr(t)):(t=Yf(e.y/this.a,this.es,this.en),r=Math.abs(t),r<pe?(r=Math.sin(t),i=this.long0+e.x*Math.sqrt(1-this.es*r*r)/(this.a*Math.cos(t)),n=Oe(i)):r-_e<pe&&(n=this.long0)),e.x=n,e.y=t,e}var cA=["Sinusoidal","sinu"],uA={init:aA,forward:sA,inverse:lA,names:cA};function dA(){}function hA(e){for(var t=e.x,i=e.y,n=Oe(t-this.long0),r=i,a=Math.PI*Math.sin(i);;){var o=-(r+Math.sin(r)-a)/(1+Math.cos(r));if(r+=o,Math.abs(o)<_e)break}r/=2,Math.PI/2-Math.abs(i)<_e&&(n=0);var s=.900316316158*this.a*n*Math.cos(r)+this.x0,l=1.4142135623731*this.a*Math.sin(r)+this.y0;return e.x=s,e.y=l,e}function mA(e){var t,i;e.x-=this.x0,e.y-=this.y0,i=e.y/(1.4142135623731*this.a),Math.abs(i)>.999999999999&&(i=.999999999999),t=Math.asin(i);var n=Oe(this.long0+e.x/(.900316316158*this.a*Math.cos(t)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),i=(2*t+Math.sin(2*t))/Math.PI,Math.abs(i)>1&&(i=1);var r=Math.asin(i);return e.x=n,e.y=r,e}var fA=["Mollweide","moll"],pA={init:dA,forward:hA,inverse:mA,names:fA};function vA(){Math.abs(this.lat1+this.lat2)<_e||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=po(this.es),this.e1=vo(this.es),this.e2=go(this.es),this.e3=yo(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=ki(this.e,this.sinphi,this.cosphi),this.ml1=Jt(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<_e?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=ki(this.e,this.sinphi,this.cosphi),this.ml2=Jt(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=Jt(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function gA(e){var t=e.x,i=e.y,n;if(this.sphere)n=this.a*(this.g-i);else{var r=Jt(this.e0,this.e1,this.e2,this.e3,i);n=this.a*(this.g-r)}var a=this.ns*Oe(t-this.long0),o=this.x0+n*Math.sin(a),s=this.y0+this.rh-n*Math.cos(a);return e.x=o,e.y=s,e}function yA(e){e.x-=this.x0,e.y=this.rh-e.y+this.y0;var t,i,n,r;this.ns>=0?(i=Math.sqrt(e.x*e.x+e.y*e.y),t=1):(i=-Math.sqrt(e.x*e.x+e.y*e.y),t=-1);var a=0;if(i!==0&&(a=Math.atan2(t*e.x,t*e.y)),this.sphere)return r=Oe(this.long0+a/this.ns),n=gr(this.g-i/this.a),e.x=r,e.y=n,e;var o=this.g-i/this.a;return n=Ga(o,this.e0,this.e1,this.e2,this.e3),r=Oe(this.long0+a/this.ns),e.x=r,e.y=n,e}var bA=["Equidistant_Conic","eqdc"],CA={init:vA,forward:gA,inverse:yA,names:bA};function wA(){this.R=this.a}function _A(e){var t=e.x,i=e.y,n=Oe(t-this.long0),r,a;Math.abs(i)<=_e&&(r=this.x0+this.R*n,a=this.y0);var o=yn(2*Math.abs(i/Math.PI));(Math.abs(n)<=_e||Math.abs(Math.abs(i)-pe)<=_e)&&(r=this.x0,i>=0?a=this.y0+Math.PI*this.R*Math.tan(.5*o):a=this.y0+Math.PI*this.R*-Math.tan(.5*o));var s=.5*Math.abs(Math.PI/n-n/Math.PI),l=s*s,c=Math.sin(o),u=Math.cos(o),d=u/(c+u-1),m=d*d,f=d*(2/c-1),v=f*f,C=Math.PI*this.R*(s*(d-v)+Math.sqrt(l*(d-v)*(d-v)-(v+l)*(m-v)))/(v+l);n<0&&(C=-C),r=this.x0+C;var b=l+d;return C=Math.PI*this.R*(f*b-s*Math.sqrt((v+l)*(l+1)-b*b))/(v+l),i>=0?a=this.y0+C:a=this.y0-C,e.x=r,e.y=a,e}function xA(e){var t,i,n,r,a,o,s,l,c,u,d,m,f;return e.x-=this.x0,e.y-=this.y0,d=Math.PI*this.R,n=e.x/d,r=e.y/d,a=n*n+r*r,o=-Math.abs(r)*(1+a),s=o-2*r*r+n*n,l=-2*o+1+2*r*r+a*a,f=r*r/l+(2*s*s*s/l/l/l-9*o*s/l/l)/27,c=(o-s*s/3/l)/l,u=2*Math.sqrt(-c/3),d=3*f/c/u,Math.abs(d)>1&&(d>=0?d=1:d=-1),m=Math.acos(d)/3,e.y>=0?i=(-u*Math.cos(m+Math.PI/3)-s/3/l)*Math.PI:i=-(-u*Math.cos(m+Math.PI/3)-s/3/l)*Math.PI,Math.abs(n)<_e?t=this.long0:t=Oe(this.long0+Math.PI*(a-1+Math.sqrt(1+2*(n*n-r*r)+a*a))/2/n),e.x=t,e.y=i,e}var EA=["Van_der_Grinten_I","VanDerGrinten","vandg"],OA={init:wA,forward:_A,inverse:xA,names:EA};function PA(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)}function MA(e){var t=e.x,i=e.y,n=Math.sin(e.y),r=Math.cos(e.y),a=Oe(t-this.long0),o,s,l,c,u,d,m,f,v,C,b,_,M,g,E,T,A,R,I,j,W,$,k;return this.sphere?Math.abs(this.sin_p12-1)<=_e?(e.x=this.x0+this.a*(pe-i)*Math.sin(a),e.y=this.y0-this.a*(pe-i)*Math.cos(a),e):Math.abs(this.sin_p12+1)<=_e?(e.x=this.x0+this.a*(pe+i)*Math.sin(a),e.y=this.y0+this.a*(pe+i)*Math.cos(a),e):(R=this.sin_p12*n+this.cos_p12*r*Math.cos(a),T=Math.acos(R),A=T?T/Math.sin(T):1,e.x=this.x0+this.a*A*r*Math.sin(a),e.y=this.y0+this.a*A*(this.cos_p12*n-this.sin_p12*r*Math.cos(a)),e):(o=po(this.es),s=vo(this.es),l=go(this.es),c=yo(this.es),Math.abs(this.sin_p12-1)<=_e?(u=this.a*Jt(o,s,l,c,pe),d=this.a*Jt(o,s,l,c,i),e.x=this.x0+(u-d)*Math.sin(a),e.y=this.y0-(u-d)*Math.cos(a),e):Math.abs(this.sin_p12+1)<=_e?(u=this.a*Jt(o,s,l,c,pe),d=this.a*Jt(o,s,l,c,i),e.x=this.x0+(u+d)*Math.sin(a),e.y=this.y0+(u+d)*Math.cos(a),e):(m=n/r,f=vr(this.a,this.e,this.sin_p12),v=vr(this.a,this.e,n),C=Math.atan((1-this.es)*m+this.es*f*this.sin_p12/(v*r)),b=Math.atan2(Math.sin(a),this.cos_p12*Math.tan(C)-this.sin_p12*Math.cos(a)),b===0?I=Math.asin(this.cos_p12*Math.sin(C)-this.sin_p12*Math.cos(C)):Math.abs(Math.abs(b)-Math.PI)<=_e?I=-Math.asin(this.cos_p12*Math.sin(C)-this.sin_p12*Math.cos(C)):I=Math.asin(Math.sin(a)*Math.cos(C)/Math.sin(b)),_=this.e*this.sin_p12/Math.sqrt(1-this.es),M=this.e*this.cos_p12*Math.cos(b)/Math.sqrt(1-this.es),g=_*M,E=M*M,j=I*I,W=j*I,$=W*I,k=$*I,T=f*I*(1-j*E*(1-E)/6+W/8*g*(1-2*E)+$/120*(E*(4-7*E)-3*_*_*(1-7*E))-k/48*g),e.x=this.x0+T*Math.sin(b),e.y=this.y0+T*Math.cos(b),e))}function SA(e){e.x-=this.x0,e.y-=this.y0;var t,i,n,r,a,o,s,l,c,u,d,m,f,v,C,b,_,M,g,E,T,A,R,I;return this.sphere?(t=Math.sqrt(e.x*e.x+e.y*e.y),t>2*pe*this.a?void 0:(i=t/this.a,n=Math.sin(i),r=Math.cos(i),a=this.long0,Math.abs(t)<=_e?o=this.lat0:(o=yn(r*this.sin_p12+e.y*n*this.cos_p12/t),s=Math.abs(this.lat0)-pe,Math.abs(s)<=_e?this.lat0>=0?a=Oe(this.long0+Math.atan2(e.x,-e.y)):a=Oe(this.long0-Math.atan2(-e.x,e.y)):a=Oe(this.long0+Math.atan2(e.x*n,t*this.cos_p12*r-e.y*this.sin_p12*n))),e.x=a,e.y=o,e)):(l=po(this.es),c=vo(this.es),u=go(this.es),d=yo(this.es),Math.abs(this.sin_p12-1)<=_e?(m=this.a*Jt(l,c,u,d,pe),t=Math.sqrt(e.x*e.x+e.y*e.y),f=m-t,o=Ga(f/this.a,l,c,u,d),a=Oe(this.long0+Math.atan2(e.x,-1*e.y)),e.x=a,e.y=o,e):Math.abs(this.sin_p12+1)<=_e?(m=this.a*Jt(l,c,u,d,pe),t=Math.sqrt(e.x*e.x+e.y*e.y),f=t-m,o=Ga(f/this.a,l,c,u,d),a=Oe(this.long0+Math.atan2(e.x,e.y)),e.x=a,e.y=o,e):(t=Math.sqrt(e.x*e.x+e.y*e.y),b=Math.atan2(e.x,e.y),v=vr(this.a,this.e,this.sin_p12),_=Math.cos(b),M=this.e*this.cos_p12*_,g=-M*M/(1-this.es),E=3*this.es*(1-g)*this.sin_p12*this.cos_p12*_/(1-this.es),T=t/v,A=T-g*(1+g)*Math.pow(T,3)/6-E*(1+3*g)*Math.pow(T,4)/24,R=1-g*A*A/2-T*A*A*A/6,C=Math.asin(this.sin_p12*Math.cos(A)+this.cos_p12*Math.sin(A)*_),a=Oe(this.long0+Math.asin(Math.sin(b)*Math.sin(A)/Math.cos(C))),I=Math.sin(C),o=Math.atan2((I-this.es*R*this.sin_p12)*Math.tan(C),I*(1-this.es)),e.x=a,e.y=o,e))}var TA=["Azimuthal_Equidistant","aeqd"],AA={init:PA,forward:MA,inverse:SA,names:TA};function DA(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function IA(e){var t,i,n,r,a,o,s,l,c=e.x,u=e.y;return n=Oe(c-this.long0),t=Math.sin(u),i=Math.cos(u),r=Math.cos(n),o=this.sin_p14*t+this.cos_p14*i*r,a=1,(o>0||Math.abs(o)<=_e)&&(s=this.a*a*i*Math.sin(n),l=this.y0+this.a*a*(this.cos_p14*t-this.sin_p14*i*r)),e.x=s,e.y=l,e}function RA(e){var t,i,n,r,a,o,s;return e.x-=this.x0,e.y-=this.y0,t=Math.sqrt(e.x*e.x+e.y*e.y),i=yn(t/this.a),n=Math.sin(i),r=Math.cos(i),o=this.long0,Math.abs(t)<=_e?(s=this.lat0,e.x=o,e.y=s,e):(s=yn(r*this.sin_p14+e.y*n*this.cos_p14/t),a=Math.abs(this.lat0)-pe,Math.abs(a)<=_e?(this.lat0>=0?o=Oe(this.long0+Math.atan2(e.x,-e.y)):o=Oe(this.long0-Math.atan2(-e.x,e.y)),e.x=o,e.y=s,e):(o=Oe(this.long0+Math.atan2(e.x*n,t*this.cos_p14*r-e.y*this.sin_p14*n)),e.x=o,e.y=s,e))}var LA=["ortho"],BA={init:DA,forward:IA,inverse:RA,names:LA},at={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},Ge={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function jA(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=pe-$e/2?this.face=at.TOP:this.lat0<=-(pe-$e/2)?this.face=at.BOTTOM:Math.abs(this.long0)<=$e?this.face=at.FRONT:Math.abs(this.long0)<=pe+$e?this.face=this.long0>0?at.RIGHT:at.LEFT:this.face=at.BACK,this.es!==0&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function FA(e){var t={x:0,y:0},i,n,r,a,o,s,l={value:0};if(e.x-=this.long0,this.es!==0?i=Math.atan(this.one_minus_f_squared*Math.tan(e.y)):i=e.y,n=e.x,this.face===at.TOP)a=pe-i,n>=$e&&n<=pe+$e?(l.value=Ge.AREA_0,r=n-pe):n>pe+$e||n<=-(pe+$e)?(l.value=Ge.AREA_1,r=n>0?n-gt:n+gt):n>-(pe+$e)&&n<=-$e?(l.value=Ge.AREA_2,r=n+pe):(l.value=Ge.AREA_3,r=n);else if(this.face===at.BOTTOM)a=pe+i,n>=$e&&n<=pe+$e?(l.value=Ge.AREA_0,r=-n+pe):n<$e&&n>=-$e?(l.value=Ge.AREA_1,r=-n):n<-$e&&n>=-(pe+$e)?(l.value=Ge.AREA_2,r=-n-pe):(l.value=Ge.AREA_3,r=n>0?-n+gt:-n-gt);else{var c,u,d,m,f,v,C;this.face===at.RIGHT?n=yr(n,+pe):this.face===at.BACK?n=yr(n,+gt):this.face===at.LEFT&&(n=yr(n,-pe)),m=Math.sin(i),f=Math.cos(i),v=Math.sin(n),C=Math.cos(n),c=f*C,u=f*v,d=m,this.face===at.FRONT?(a=Math.acos(c),r=Ua(a,d,u,l)):this.face===at.RIGHT?(a=Math.acos(u),r=Ua(a,d,-c,l)):this.face===at.BACK?(a=Math.acos(-c),r=Ua(a,d,-u,l)):this.face===at.LEFT?(a=Math.acos(-u),r=Ua(a,d,c,l)):(a=r=0,l.value=Ge.AREA_0)}return s=Math.atan(12/gt*(r+Math.acos(Math.sin(r)*Math.cos($e))-pe)),o=Math.sqrt((1-Math.cos(a))/(Math.cos(s)*Math.cos(s))/(1-Math.cos(Math.atan(1/Math.cos(r))))),l.value===Ge.AREA_1?s+=pe:l.value===Ge.AREA_2?s+=gt:l.value===Ge.AREA_3&&(s+=1.5*gt),t.x=o*Math.cos(s),t.y=o*Math.sin(s),t.x=t.x*this.a+this.x0,t.y=t.y*this.a+this.y0,e.x=t.x,e.y=t.y,e}function kA(e){var t={lam:0,phi:0},i,n,r,a,o,s,l,c,u,d={value:0};if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,n=Math.atan(Math.sqrt(e.x*e.x+e.y*e.y)),i=Math.atan2(e.y,e.x),e.x>=0&&e.x>=Math.abs(e.y)?d.value=Ge.AREA_0:e.y>=0&&e.y>=Math.abs(e.x)?(d.value=Ge.AREA_1,i-=pe):e.x<0&&-e.x>=Math.abs(e.y)?(d.value=Ge.AREA_2,i=i<0?i+gt:i-gt):(d.value=Ge.AREA_3,i+=pe),u=gt/12*Math.tan(i),o=Math.sin(u)/(Math.cos(u)-1/Math.sqrt(2)),s=Math.atan(o),r=Math.cos(i),a=Math.tan(n),l=1-r*r*a*a*(1-Math.cos(Math.atan(1/Math.cos(s)))),l<-1?l=-1:l>1&&(l=1),this.face===at.TOP)c=Math.acos(l),t.phi=pe-c,d.value===Ge.AREA_0?t.lam=s+pe:d.value===Ge.AREA_1?t.lam=s<0?s+gt:s-gt:d.value===Ge.AREA_2?t.lam=s-pe:t.lam=s;else if(this.face===at.BOTTOM)c=Math.acos(l),t.phi=c-pe,d.value===Ge.AREA_0?t.lam=-s+pe:d.value===Ge.AREA_1?t.lam=-s:d.value===Ge.AREA_2?t.lam=-s-pe:t.lam=s<0?-s-gt:-s+gt;else{var m,f,v;m=l,u=m*m,u>=1?v=0:v=Math.sqrt(1-u)*Math.sin(s),u+=v*v,u>=1?f=0:f=Math.sqrt(1-u),d.value===Ge.AREA_1?(u=f,f=-v,v=u):d.value===Ge.AREA_2?(f=-f,v=-v):d.value===Ge.AREA_3&&(u=f,f=v,v=-u),this.face===at.RIGHT?(u=m,m=-f,f=u):this.face===at.BACK?(m=-m,f=-f):this.face===at.LEFT&&(u=m,m=f,f=-u),t.phi=Math.acos(-v)-pe,t.lam=Math.atan2(f,m),this.face===at.RIGHT?t.lam=yr(t.lam,-pe):this.face===at.BACK?t.lam=yr(t.lam,-gt):this.face===at.LEFT&&(t.lam=yr(t.lam,+pe))}if(this.es!==0){var C,b,_;C=t.phi<0?1:0,b=Math.tan(t.phi),_=this.b/Math.sqrt(b*b+this.one_minus_f_squared),t.phi=Math.atan(Math.sqrt(this.a*this.a-_*_)/(this.one_minus_f*_)),C&&(t.phi=-t.phi)}return t.lam+=this.long0,e.x=t.lam,e.y=t.phi,e}function Ua(e,t,i,n){var r;return e<_e?(n.value=Ge.AREA_0,r=0):(r=Math.atan2(t,i),Math.abs(r)<=$e?n.value=Ge.AREA_0:r>$e&&r<=pe+$e?(n.value=Ge.AREA_1,r-=pe):r>pe+$e||r<=-(pe+$e)?(n.value=Ge.AREA_2,r=r>=0?r-gt:r+gt):(n.value=Ge.AREA_3,r+=pe)),r}function yr(e,t){var i=e+t;return i<-gt?i+=lo:i>+gt&&(i-=lo),i}var NA=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"],zA={init:jA,forward:FA,inverse:kA,names:NA},zc=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-986701e-12],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,18736e-12],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,934959e-12],[.7986,-.00755338,-500009e-10,935324e-12],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],bo=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-126793e-14,422642e-15],[.124,.0124,507171e-14,-160604e-14],[.186,.0123999,-190189e-13,600152e-14],[.248,.0124002,710039e-13,-224e-10],[.31,.0123992,-264997e-12,835986e-13],[.372,.0124029,988983e-12,-311994e-12],[.434,.0123893,-369093e-11,-435621e-12],[.4958,.0123198,-102252e-10,-345523e-12],[.5571,.0121916,-154081e-10,-582288e-12],[.6176,.0119938,-241424e-10,-525327e-12],[.6769,.011713,-320223e-10,-516405e-12],[.7346,.0113541,-397684e-10,-609052e-12],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-140374e-14],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],tp=.8487,ip=1.3523,np=Fi/5,VA=1/np,br=18,Ha=function(e,t){return e[0]+t*(e[1]+t*(e[2]+t*e[3]))},$A=function(e,t){return e[1]+t*(2*e[2]+t*3*e[3])};function GA(e,t,i,n){for(var r=t;n;--n){var a=e(r);if(r-=a,Math.abs(a)<i)break}return r}function UA(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function HA(e){var t=Oe(e.x-this.long0),i=Math.abs(e.y),n=Math.floor(i*np);n<0?n=0:n>=br&&(n=br-1),i=Fi*(i-VA*n);var r={x:Ha(zc[n],i)*t,y:Ha(bo[n],i)};return e.y<0&&(r.y=-r.y),r.x=r.x*this.a*tp+this.x0,r.y=r.y*this.a*ip+this.y0,r}function WA(e){var t={x:(e.x-this.x0)/(this.a*tp),y:Math.abs(e.y-this.y0)/(this.a*ip)};if(t.y>=1)t.x/=zc[br][0],t.y=e.y<0?-pe:pe;else{var i=Math.floor(t.y*br);for(i<0?i=0:i>=br&&(i=br-1);;)if(bo[i][0]>t.y)--i;else if(bo[i+1][0]<=t.y)++i;else break;var n=bo[i],r=5*(t.y-n[0])/(bo[i+1][0]-n[0]);r=GA(function(a){return(Ha(n,a)-t.y)/$A(n,a)},r,_e,100),t.x/=Ha(zc[i],r),t.y=(5*i+r)*Ft,e.y<0&&(t.y=-t.y)}return t.x=Oe(t.x+this.long0),t}var qA=["Robinson","robin"],ZA={init:UA,forward:HA,inverse:WA,names:qA};function QA(){this.name="geocent"}function XA(e){var t=Af(e,this.es,this.a);return t}function YA(e){var t=Df(e,this.es,this.a,this.b);return t}var JA=["Geocentric","geocentric","geocent","Geocent"],KA={init:QA,forward:XA,inverse:YA,names:JA},$t={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},Co={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};function e6(){if(Object.keys(Co).forEach(function(i){if(typeof this[i]=="undefined")this[i]=Co[i].def;else{if(Co[i].num&&isNaN(this[i]))throw new Error("Invalid parameter value, must be numeric "+i+" = "+this[i]);Co[i].num&&(this[i]=parseFloat(this[i]))}Co[i].degrees&&(this[i]=this[i]*Ft)}.bind(this)),Math.abs(Math.abs(this.lat0)-pe)<_e?this.mode=this.lat0<0?$t.S_POLE:$t.N_POLE:Math.abs(this.lat0)<_e?this.mode=$t.EQUIT:(this.mode=$t.OBLIQ,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var e=this.tilt,t=this.azi;this.cg=Math.cos(t),this.sg=Math.sin(t),this.cw=Math.cos(e),this.sw=Math.sin(e)}function t6(e){e.x-=this.long0;var t=Math.sin(e.y),i=Math.cos(e.y),n=Math.cos(e.x),r,a;switch(this.mode){case $t.OBLIQ:a=this.sinph0*t+this.cosph0*i*n;break;case $t.EQUIT:a=i*n;break;case $t.S_POLE:a=-t;break;case $t.N_POLE:a=t;break}switch(a=this.pn1/(this.p-a),r=a*i*Math.sin(e.x),this.mode){case $t.OBLIQ:a*=this.cosph0*t-this.sinph0*i*n;break;case $t.EQUIT:a*=t;break;case $t.N_POLE:a*=-(i*n);break;case $t.S_POLE:a*=i*n;break}var o,s;return o=a*this.cg+r*this.sg,s=1/(o*this.sw*this.h1+this.cw),r=(r*this.cg-a*this.sg)*this.cw*s,a=o*s,e.x=r*this.a,e.y=a*this.a,e}function i6(e){e.x/=this.a,e.y/=this.a;var t={x:e.x,y:e.y},i,n,r;r=1/(this.pn1-e.y*this.sw),i=this.pn1*e.x*r,n=this.pn1*e.y*this.cw*r,e.x=i*this.cg+n*this.sg,e.y=n*this.cg-i*this.sg;var a=Va(e.x,e.y);if(Math.abs(a)<_e)t.x=0,t.y=e.y;else{var o,s;switch(s=1-a*a*this.pfact,s=(this.p-Math.sqrt(s))/(this.pn1/a+a/this.pn1),o=Math.sqrt(1-s*s),this.mode){case $t.OBLIQ:t.y=Math.asin(o*this.sinph0+e.y*s*this.cosph0/a),e.y=(o-this.sinph0*Math.sin(t.y))*a,e.x*=s*this.cosph0;break;case $t.EQUIT:t.y=Math.asin(e.y*s/a),e.y=o*a,e.x*=s;break;case $t.N_POLE:t.y=Math.asin(o),e.y=-e.y;break;case $t.S_POLE:t.y=-Math.asin(o);break}t.x=Math.atan2(e.x,e.y)}return e.x=t.x+this.long0,e.y=t.y,e}var n6=["Tilted_Perspective","tpers"],r6={init:e6,forward:t6,inverse:i6,names:n6};function o6(e){e.Proj.projections.add(za),e.Proj.projections.add($a),e.Proj.projections.add(v3),e.Proj.projections.add(P3),e.Proj.projections.add(I3),e.Proj.projections.add(F3),e.Proj.projections.add(G3),e.Proj.projections.add(Z3),e.Proj.projections.add(K3),e.Proj.projections.add(rT),e.Proj.projections.add(wT),e.Proj.projections.add(MT),e.Proj.projections.add(IT),e.Proj.projections.add(kT),e.Proj.projections.add(GT),e.Proj.projections.add(ZT),e.Proj.projections.add(KT),e.Proj.projections.add(rA),e.Proj.projections.add(uA),e.Proj.projections.add(pA),e.Proj.projections.add(CA),e.Proj.projections.add(OA),e.Proj.projections.add(AA),e.Proj.projections.add(BA),e.Proj.projections.add(zA),e.Proj.projections.add(ZA),e.Proj.projections.add(KA),e.Proj.projections.add(r6)}hi.defaultDatum="WGS84",hi.Proj=Ni,hi.WGS84=new hi.Proj("WGS84"),hi.Point=fr,hi.toPoint=Bf,hi.defs=Yt,hi.nadgrid=yS,hi.transform=ka,hi.mgrs=LS,hi.version="__VERSION__",o6(hi);function a6(e,t,i,n,r){const a=1+Math.floor((e+180)/6),o=i+" +zone="+a+(t<0?" +south":""),s=hi(n,o,[e,t]);return{utmZone:a+(t<0?"S":"N"),north:s[1].toFixed(2)+r,east:s[0].toFixed(2)+r}}class s6{constructor(t){this.gridFileUrl=t,this.data=void 0,this.minimumHeight=-106.99,this.maximumHeight=85.39}isSupported(){return typeof Int16Array!="undefined"&&typeof Uint8Array!="undefined"}getHeight(t,i){return rp(this).then(function(n){return op(n,t,i)})}getHeights(t){return rp(this).then(function(i){for(let n=0;n<t.length;++n){const r=t[n];r.height=op(i,r.longitude,r.latitude)}return t})}}async function rp(e){const{defined:t}=Cesium;t(e.data)||(e.data=l6(e.gridFileUrl));let i=e.data;if(e.data instanceof Promise&&(i=await e.data),!(e.data instanceof Int16Array)){const n=new Uint8Array(i);for(let r=0;r<n.length;r+=2){const a=n[r];n[r]=n[r+1],n[r+1]=a}e.data=new Int16Array(i)}return e.data}function op(e,t,i){const{Math:n}=Cesium;let r=720*(n.PI_OVER_TWO-i)/Math.PI;r<0?r=0:r>720&&(r=720),t=n.zeroToTwoPi(t);let a=1440*t/n.TWO_PI;a<0?a=0:a>1440&&(a=1440);const o=a|0,s=r|0,l=a-o,c=r-s,u=1-l,d=1-c,m=Wa(e,s,o),f=Wa(e,s,o+1),v=Wa(e,s+1,o),C=Wa(e,s+1,o+1);return(m*u*d+f*l*d+v*u*c+C*l*c)/100}function Wa(e,t,i){return t>720?t=720:t<0&&(t=0),i>1439?i-=1440:i<0&&(i+=1440),e[t*1440+i]}function l6(e){const{Resource:t}=Cesium;return t.createIfNeeded(e).fetchArrayBuffer()}var c6=s6;class u6{constructor(t){const{Cartographic:i,knockout:n}=Cesium,r=t.gridFileUrl;r&&(this.geoidModel=new c6(r)),this.proj4Projection=t.proj4Projection,this.projectionUnits=t.projectionUnits,this.proj4longlat=t.proj4longlat,this.lastHeightSamplePosition=new i,this.accurateSamplingDebounceTime=250,this.tileRequestInFlight=void 0,this.elevation="",this.utmZone="",this.latitude="",this.longitude="",this.north="",this.east="",this.useProjection=!1,this.debounceSampleAccurateHeight=tP(this.sampleAccurateHeight,this.accurateSamplingDebounceTime),this.decimal=t.decimal||5,this.rangeType=t.rangeType||0,n.track(this,["elevation","utmZone","latitude","longitude","north","east","useProjection"])}toggleUseProjection(){this.useProjection=!this.useProjection}updateCoordinatesFromCesium(t,i){const{Cartographic:n,defined:r,EllipsoidTerrainProvider:a,Intersections2D:o,SceneMode:s}=Cesium,l=t.scene,u=l.camera.getPickRay(i),d=l.globe,m=d.pickTriangle(u,l);if(r(m)){const f=d.ellipsoid,v=f.cartesianToCartographic(m.v0),C=f.cartesianToCartographic(m.v1),b=f.cartesianToCartographic(m.v2),_=f.cartesianToCartographic(l.mode===s.SCENE3D?m.intersection:l.globe.pick(u,l));let M;if(d.terrainProvider instanceof a)_.height=void 0;else{const E=o.computeBarycentricCoordinates(_.longitude,_.latitude,v.longitude,v.latitude,C.longitude,C.latitude,b.longitude,b.latitude);if(E.x>=-1e-15&&E.y>=-1e-15&&E.z>=-1e-15){const $=E.x*v.height+E.y*C.height+E.z*b.height;_.height=$}const T=d.terrainProvider.getLevelMaximumGeometricError(m.tile.level),A=_.height,R=Math.max(m.tile.data.tileBoundingRegion.minimumHeight,A-T),I=Math.min(m.tile.data.tileBoundingRegion.maximumHeight,A+T),j=R-(this.geoidModel?this.geoidModel.minimumHeight:0),W=I+(this.geoidModel?this.geoidModel.maximumHeight:0);M=Math.max(Math.abs(A-j),Math.abs(W-A))}n.clone(_,this.lastHeightSamplePosition);const g=d.terrainProvider;this.cartographicToFields(_,M),g instanceof a||this.debounceSampleAccurateHeight(g,_)}else this.elevation="",this.utmZone="",this.latitude="",this.longitude="",this.north="",this.east=""}cartographicToFields(t,i){const{Math:n}=Cesium,r=n.toDegrees(t.latitude),a=n.toDegrees(t.longitude);if(this.useProjection){const s=a6(a,r,this.proj4Projection,this.proj4longlat,this.projectionUnits);this.utmZone=s.utmZone,this.north=s.north,this.east=s.east}const o=I5(a,r,{height:t.height,errorBar:i,decimal:this.decimal,rangeType:this.rangeType});this.latitude=o.latitude,this.longitude=o.longitude,this.elevation=o.elevation}sampleAccurateHeight(t,i){const{Cartographic:n,sampleTerrainMostDetailed:r,when:a}=Cesium;if(this.tileRequestInFlight){this.debounceSampleAccurateHeight.cancel(),this.debounceSampleAccurateHeight(t,i);return}const o=n.clone(i),s=this.geoidModel?this.geoidModel.getHeight(i.longitude,i.latitude):void 0,l=r(t,[o]);this.tileRequestInFlight=Promise.all([s,l]).then(c=>{const u=c[0]||0;this.tileRequestInFlight=void 0,n.equals(i,this.lastHeightSamplePosition)&&(i.height=o.height-u,this.cartographicToFields(i))}).catch(()=>{this.tileRequestInFlight=void 0})}}const d6=[],h6={start:0,stop:0},m6={},f6={},p6={};function v6(){const{Globe:e,GlobeSurfaceTile:t,BoundingSphere:i,defaultValue:n,Cartesian3:r,defined:a,DeveloperError:o,IntersectionTests:s,SceneMode:l}=Cesium;e.prototype.pickTriangle=e.prototype.pickTriangle||function(c,u,d,m){if(!a(c))throw new o("ray is required");if(!a(u))throw new o("scene is required");d=n(d,!0);const f=u.mode,v=u.mapProjection,C=d6;C.length=0;const b=this._surface._tilesToRender;let _=b.length,M,g;for(g=0;g<_;++g){M=b[g];const T=M.data;if(!a(T))continue;const A=T.pickBoundingSphere;f!==l.SCENE3D?(i.fromRectangleWithHeights2D(M.rectangle,v,T.minimumHeight,T.maximumHeight,A),r.fromElements(A.center.z,A.center.x,A.center.y,A.center)):i.clone(T.boundingSphere3D,A);const R=s.raySphere(c,A,h6);a(R)&&C.push(M)}C.sort(g6(c.origin));let E;for(_=C.length,g=0;g<_;++g)if(E=C[g].data.pickTriangle(c,u.mode,u.mapProjection,d,m),a(E)){E.tile=C[g];break}return E},t.prototype.pickTriangle=t.prototype.pickTriangle||function(c,u,d,m){const f=this.renderedMesh;if(!a(f))return;const v=f.vertices,C=f.indices,b=f.encoding,_=C.length;for(let M=0;M<_;M+=3){const g=C[M],E=C[M+1],T=C[M+2],A=Vc(b,u,d,v,g,m6),R=Vc(b,u,d,v,E,f6),I=Vc(b,u,d,v,T,p6),j=s.rayTriangle(c,A,R,I,m,new r);if(a(j))return{intersection:j,v0:A,v1:R,v2:I}}}}function g6(e){const{BoundingSphere:t}=Cesium;return function(i,n){const r=t.distanceSquaredTo(i.data.pickBoundingSphere,e),a=t.distanceSquaredTo(n.data.pickBoundingSphere,e);return r-a}}function Vc(e,t,i,n,r,a){e.decodePosition(n,r,a);const{Cartesian3:o,defined:s,SceneMode:l}=Cesium;if(s(t)&&t!==l.SCENE3D){const u=i.ellipsoid.cartesianToCartographic(a);i.project(u,a),o.fromElements(a.z,a.x,a.y,a)}return a}var y6=u6,ap={gridFileUrl:{type:String,default:"https://zouyaoji.top/vue-cesium/SampleData/WW15MGH.DAC"},proj4Projection:{type:String,default:"+proj=utm +ellps=GRS80 +units=m +no_defs"},projectionUnits:{type:String,default:"m"},proj4longlat:{type:String,default:"+proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees +no_defs"},position:{type:String,default:"bottom-right",validator:e=>["top-right","top-left","bottom-right","bottom-left","top","right","bottom","left"].includes(e)},offset:{type:Array,validator:e=>e.length===2},color:{type:String,default:"#fff"},decimal:{type:Number,default:6},rangeType:{type:Number,default:0},background:{type:String,default:"#3f4854"},showCameraInfo:{type:Boolean,default:!0},showMouseInfo:{type:Boolean,default:!0},showPerformanceInfo:{type:Boolean,default:!0},useProjection:{type:Boolean,default:!0},tooltip:{type:[Boolean,Object],default:()=>({delay:500,anchor:"bottom middle",offset:[0,20],tip:void 0})},customClass:{type:String,default:""},teleportToViewer:{type:Boolean,default:!0}};const b6={...Ce,statusBarEvt:e=>!0},sp=ap;var $c=te({name:"VcStatusBar",props:sp,emits:b6,setup(e,t){var i;const n=re();n.cesiumClass="VcStatusBar",n.cesiumEvents=[];const r=Be(e,t,n);if(r===void 0)return;const a=xt(n),{$services:o}=r,s=ie(null),l=ie(null),{t:c}=Ct();let u=-1,d=-1;const m=Pe({heading:"NaN",pitch:"NaN",roll:"NaN",height:"NaN",level:"NaN"}),f=Pe({fps:"NaN",ms:"NaN"}),v=ie(),C=di(e),b=((i=a.proxy)==null?void 0:i.$options.name)==="VcNavigation",_=ie(b),M=Pe({});fe(()=>e,I=>{De(()=>{!n.mounted||g()})},{deep:!0}),n.createCesiumObject=async()=>{_.value=!0;const{viewer:I}=o,j=I._element;return e.showMouseInfo&&(v.value=new y6({gridFileUrl:e.gridFileUrl,proj4Projection:e.proj4Projection,projectionUnits:e.projectionUnits,proj4longlat:e.proj4longlat,decimal:e.decimal,rangeType:e.rangeType}),j.addEventListener("wheel",A,!1),j.addEventListener("mousemove",A,!1),j.addEventListener("touchmove",A,!1),v6()),e.showCameraInfo&&(I.camera.changed.addEventListener(T),T()),e.showPerformanceInfo&&(I.scene.debugShowFramesPerSecond=!0,I.scene.postRender.addEventListener(E)),new Promise((W,$)=>{De(()=>{var k,h,p;!b&&e.teleportToViewer?(I._element.appendChild((k=oe(s))==null?void 0:k.$el),W((h=oe(s))==null?void 0:h.$el)):W((p=oe(s))==null?void 0:p.$el)})})},n.mount=async()=>{var I,j;g();const{viewer:W}=o;return(j=W.viewerWidgetResized)==null||j.raiseEvent({type:n.cesiumClass,status:"mounted",target:(I=oe(s))==null?void 0:I.$el}),!0},n.unmount=async()=>{var I,j,W,$;const{viewer:k}=o,h=k._element;return e.showMouseInfo&&(v.value=void 0,h.removeEventListener("wheel",A),h.removeEventListener("mousemove",A),h.removeEventListener("touchmove",A)),e.showCameraInfo&&k.camera.changed.removeEventListener(T),e.showPerformanceInfo&&(k.scene._performanceDisplay&&(k.scene._performanceDisplay._container.style.display="block"),k.scene.postRender.removeEventListener(E)),b||h.contains((I=oe(s))==null?void 0:I.$el)&&h.removeChild((j=oe(s))==null?void 0:j.$el),($=k.viewerWidgetResized)==null||$.raiseEvent({type:n.cesiumClass,status:"unmounted",target:(W=oe(s))==null?void 0:W.$el}),!0};const g=()=>{const I=C.style.value;if(M.left=I.left,M.top=I.top,M.transform=I.transform,I.background=e.background,I.color=e.color,typeof e.teleportToViewer=="undefined"||e.teleportToViewer){const j=C.attach.value;(j.bottom||j.top)&&!j.left&&!j.right&&(I.left="50%",I.transform="translate(-50%, 0)"),(j.left||j.right)&&!j.top&&!j.bottom&&(I.top="50%",I.transform="translate(0, -50%)")}Object.assign(M,I)},E=Gl(I=>{var j,W;f.fps=(j=I._performanceDisplay)==null?void 0:j._fpsText.nodeValue,f.ms=(W=I._performanceDisplay)==null?void 0:W._msText.nodeValue,I._performanceDisplay._container.style.display="none"},500),T=()=>{const{viewer:I}=o,{Math:j}=Cesium;m.heading=j.toDegrees(I.camera.heading).toFixed(1),m.pitch=j.toDegrees(I.camera.pitch).toFixed(1),m.roll=j.toDegrees(I.camera.roll).toFixed(1),m.height=I.camera.positionCartographic.height.toFixed(2),m.level=Ws(Number(m.height)).toFixed(0)},A=I=>{var j;const{Cartesian2:W,SceneMode:$}=Cesium,{viewer:k}=o;if(k.scene.mode===$.MORPHING)return;const h=I.type==="mousemove"||I.type==="wheel"?I.clientX:I.changedTouches[0].clientX,p=I.type==="mousemove"||I.type==="wheel"?I.clientY:I.changedTouches[0].clientY;if(h===u&&p===d)return;u=h,d=p;const y=k._element;if(k){if(e.showMouseInfo){const x=y.getBoundingClientRect(),w=new W(h-x.left,p-x.top);(j=v.value)==null||j.updateCoordinatesFromCesium(k,w)}Me(n,"statusBarEvt")&&t.emit("statusBarEvt",{type:"statusBar",mouseCoordsInfo:v.value,cameraInfo:m,performanceInfo:f})}},R=()=>{var I,j;!e.useProjection||((I=oe(l))==null||I.hide(),e.showMouseInfo&&((j=v.value)==null||j.toggleUseProjection()))};return Object.assign(n.proxy,{getMouseCoordsInfo:()=>v.value,getCameraInfo:()=>m,getPerformanceInfo:()=>f}),()=>{var I,j,W,$,k,h,p,y;if(_.value){const O=[];return e.showMouseInfo?(((I=v.value)==null?void 0:I.useProjection)?O.push(P("div",{class:"vc-section-short ellipsis"},[P("span",{...t.attrs},c("vc.navigation.statusBar.zone")),P("span",null,($=v.value)==null?void 0:$.utmZone)]),P("div",{class:"vc-section ellipsis"},[P("span",{...t.attrs},c("vc.navigation.statusBar.e")),P("span",null,(k=v.value)==null?void 0:k.east)]),P("div",{class:"vc-section ellipsis"},[P("span",{...t.attrs},c("vc.navigation.statusBar.n")),P("span",null,(h=v.value)==null?void 0:h.north)])):O.push(P("div",{class:"vc-section ellipsis"},[P("span",{...t.attrs},c("vc.navigation.statusBar.lng")),P("span",{},(j=v.value)==null?void 0:j.longitude)]),P("div",{class:"vc-section ellipsis"},[P("span",{},c("vc.navigation.statusBar.lat")),P("span",{},(W=v.value)==null?void 0:W.latitude)])),((p=v.value)==null?void 0:p.elevation)?O.push(P("div",{class:"vc-section ellipsis"},[P("span",{...t.attrs},c("vc.navigation.statusBar.elev")),P("span",{},(y=v.value)==null?void 0:y.elevation)])):O.push(ne("v-if"))):O.push(ne("v-if")),e.showCameraInfo?O.push(P("div",{class:"vc-section-short-mini ellipsis"},[P("span",{...t.attrs},c("vc.navigation.statusBar.level")),P("span",null,m.level)]),P("div",{class:"vc-section-short ellipsis"},[P("span",{...t.attrs},c("vc.navigation.statusBar.heading")),P("span",null,`${m.heading}\xB0`)]),P("div",{class:"vc-section-short ellipsis"},[P("span",{...t.attrs},c("vc.navigation.statusBar.pitch")),P("span",null,`${m.pitch}\xB0`)]),P("div",{class:"vc-section-short ellipsis"},[P("span",{...t.attrs},c("vc.navigation.statusBar.roll")),P("span",null,`${m.roll}\xB0`)]),P("div",{class:"vc-section ellipsis"},[P("span",{...t.attrs},c("vc.navigation.statusBar.cameraHeight")),P("span",null,`${m.height}m`)])):O.push(ne("v-if")),e.showPerformanceInfo?O.push(P("div",{class:"vc-section-short-mini ellipsis"},[P("span",null,f.ms)]),P("div",{class:"vc-section-short-mini ellipsis"},[P("span",null,f.fps)])):O.push(ne("v-if")),Ye(e.tooltip)&&e.showMouseInfo&&e.useProjection?O.push(P(Pt,{ref:l,...e.tooltip},()=>P("strong",null,Ye(e.tooltip)&&e.tooltip.tip||c("vc.navigation.statusBar.tip")))):O.push(ne("v-if")),P(ri,{ref:s,class:`vc-status-bar ${C.classes.value} ${e.customClass}`,style:M,noCaps:!0,onClick:R},()=>O)}else return ne("v-if")}}}),lp={position:{type:String,default:"bottom-right",validator:e=>["top-right","top-left","bottom-right","bottom-left","top","right","bottom","left"].includes(e)},offset:{type:Array,validator:e=>e.length===2},color:{type:String,default:"#fff"},background:{type:String,default:"#3f4854"},width:{type:Number,default:100},barBackground:{type:String,default:"#fff"},customClass:{type:String,default:""},teleportToViewer:{type:Boolean,default:!0}};const C6={...Ce,distanceLegendEvt:e=>!0},cp=lp;var Gc=te({name:"VcDistanceLegend",props:cp,emits:C6,setup(e,t){var i;const n=re();n.cesiumClass="VcDistanceLegend",n.cesiumEvents=[];const r=Be(e,t,n);if(r===void 0)return;const a=xt(n),{$services:o}=r,s=ie(null),l=ie(""),c=di(e),u=((i=a.proxy)==null?void 0:i.$options.name)==="VcNavigation",d=ie(u),m=Pe({});let f=0;const v=ie(0);let C=0;fe(()=>e,g=>{De(()=>{!n.mounted||_()})},{deep:!0});const b=ye(()=>({width:`${v.value}px`,left:`${5+(e.width+15-v.value)/2}px`,height:"2px",background:e.barBackground}));n.createCesiumObject=async()=>(d.value=!0,l.value="",new Promise((g,E)=>{De(()=>{var T,A,R;const{viewer:I}=o;!u&&e.teleportToViewer?(I._element.appendChild((T=oe(s))==null?void 0:T.$el),g((A=oe(s))==null?void 0:A.$el)):g((R=oe(s))==null?void 0:R.$el),I.scene.postRender.addEventListener(M)})})),n.mount=async()=>{var g,E;_();const{viewer:T}=o;return(E=T.viewerWidgetResized)==null||E.raiseEvent({type:n.cesiumClass,status:"mounted",target:(g=oe(s))==null?void 0:g.$el}),!0},n.unmount=async()=>{var g,E,T,A;const{viewer:R}=o;R.scene.postRender.removeEventListener(M);const I=R._element;return u||I.contains((g=oe(s))==null?void 0:g.$el)&&I.removeChild((E=oe(s))==null?void 0:E.$el),(A=R.viewerWidgetResized)==null||A.raiseEvent({type:n.cesiumClass,status:"unmounted",target:(T=oe(s))==null?void 0:T.$el}),!0};const _=()=>{const g=c.style.value;if(m.left=g.left,m.top=g.top,m.transform=g.transform,g.background=e.background,g.color=e.color,typeof e.teleportToViewer=="undefined"||e.teleportToViewer){const E=c.attach.value;(E.bottom||E.top)&&!E.left&&!E.right&&(g.left="50%",g.transform="translate(-50%, 0)"),(E.left||E.right)&&!E.top&&!E.bottom&&(g.top="50%",g.transform="translate(0, -50%)")}g.width=`${e.width}px`,Object.assign(m,g)},M=Gl(g=>{const{Cartesian2:E,defined:T,getTimestamp:A,EllipsoidGeodesic:R}=Cesium,I=A();if(I<f+250)return;f=I;const j=new R,W=g.canvas.clientWidth,$=g.canvas.clientHeight,k=g.camera.getPickRay(new E(W/2|0,$-1)),h=g.camera.getPickRay(new E(1+W/2|0,$-1)),p=g.globe,y=p.pick(k,g),O=p.pick(h,g);if(!T(y)||!T(O)){v.value=0,l.value="";return}const x=p.ellipsoid.cartesianToCartographic(y),w=p.ellipsoid.cartesianToCartographic(O);j.setEndPoints(x,w);const D=j.surfaceDistance,S=e.width-10;let B;for(let F=Uc.length-1;!T(B)&&F>=0;--F)Uc[F]/D<S&&(B=Uc[F],C!==B&&(C=B,Me(n,"distanceLegendEvt")&&t.emit("distanceLegendEvt",{type:"distanceLegend",distance:C,status:"changed"})));if(T(B)){let F;C>=1e3?F=(B/1e3).toString()+" km":F=B.toString()+" m",v.value=B/D|0,l.value=F}else v.value=0,l.value=""},500);return()=>d.value&&l.value!==void 0?P(ri,{ref:s,class:`vc-distance-legend ${c.classes.value} ${e.customClass}`,style:m,stack:!0,noCaps:!0},()=>[P("label",null,l.value),P("div",{style:b.value,class:"vc-bar"})]):ne("v-if")}});const Uc=[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],up={...fn,compassOpts:{type:[Object,Boolean],default:()=>vi(Cc,["position","offset"])},zoomOpts:{type:[Object,Boolean],default:()=>vi(Oc,["position","offset"])},printOpts:{type:[Object,Boolean],default:()=>vi(hf,["position","offset"])},locationOpts:{type:[Object,Boolean],default:()=>vi(pf,["position","offset"])},otherOpts:{type:[Object,Boolean],default:()=>({position:"bottom-right",offset:[2,3],statusBarOpts:vi(ap,["position","offset"]),distancelegendOpts:vi(lp,["position","offset"])})},customClass:{type:String,default:""},teleportToViewer:{type:Boolean,default:!0}},wo=vi(up),w6={...Ce,zoomEvt:e=>!0,compassEvt:e=>!0,locationEvt:e=>!0,printEvt:e=>!0,statusBarEvt:e=>!0,distanceLegendEvt:e=>!0},dp=up;var hp=te({name:"VcNavigation",inheritAttrs:!1,props:dp,emits:w6,setup(e,t){const i=re();i.cesiumClass="VcNavigation";const n=Be(e,t,i);if(n===void 0)return;const r=ie(!1),{$services:a}=n,o=di(e),s=di(e.otherOpts||{position:"bottom-right"}),l=ie(null),c=ie(null),u=ie(null),d=ie(null),m=ie(null),f=ie(null),v=ie(null),C=ie(null),b=Pe({}),_=Pe({}),{emit:M}=t;fe(()=>e,()=>{De(()=>{var O,x,w,D,S,B;y(),(O=oe(u))==null||O.reload(),(x=oe(d))==null||x.reload(),(w=oe(f))==null||w.reload(),(D=oe(m))==null||D.reload(),(S=oe(v))==null||S.reload(),(B=oe(C))==null||B.reload()})},{deep:!0});const g=ye(()=>Object.assign({},wo.compassOpts,e.compassOpts)),E=ye(()=>Object.assign({},wo.zoomOpts,e.zoomOpts)),T=ye(()=>Object.assign({},wo.printOpts,e.printOpts)),A=ye(()=>Object.assign({},wo.locationOpts,e.locationOpts)),R=ye(()=>Object.assign({},wo.otherOpts,e.otherOpts)),I=O=>{Me(i,"compassEvt")&&M("compassEvt",O)},j=O=>{Me(i,"zoomEvt")&&M("zoomEvt",O)},W=O=>{Me(i,"printEvt")&&M("printEvt",O)},$=O=>{Me(i,"locationEvt")&&M("locationEvt",O)},k=O=>{Me(i,"statusBarEvt")&&M("statusBarEvt",O)},h=O=>{Me(i,"distanceLegendEvt")&&M("distanceLegendEvt",O)};i.createCesiumObject=async()=>{var O;r.value=!0;const{viewer:x}=a;return(O=x.viewerWidgetResized)==null||O.addEventListener(p),new Promise((w,D)=>{De(()=>{const S=x._element;e.teleportToViewer&&(S.appendChild(oe(l)),oe(c)&&S.appendChild(oe(c))),w([oe(l),oe(c)])})})},i.mount=async()=>{var O;y();const{viewer:x}=a;return(O=x.viewerWidgetResized)==null||O.raiseEvent({type:i.cesiumClass,status:"mounted",target:oe(l)}),!0},i.unmount=async()=>{var O,x;const{viewer:w}=a,D=w._element;return D.contains(oe(l))&&D.removeChild(oe(l)),D.contains(oe(c))&&D.removeChild(oe(c)),(O=w.viewerWidgetResized)==null||O.removeEventListener(p),(x=w.viewerWidgetResized)==null||x.raiseEvent({type:i.cesiumClass,status:"unmounted",target:oe(l)}),!0};const p=()=>{De(()=>{y()})},y=()=>{var O,x,w,D,S;const B=(O=oe(u))==null?void 0:O.$el;let F=0,G=0;if(B!==void 0){const J=getComputedStyle(B.parentNode).margin;G=parseInt(J),F+=B.getBoundingClientRect().height+G*2}const q=(x=oe(d))==null?void 0:x.$el;q!==void 0&&(F+=q.getBoundingClientRect().height+G*2);const U=(w=oe(m))==null?void 0:w.$el;U!==void 0&&(F+=U.getBoundingClientRect().height+G*2);const K=(D=oe(f))==null?void 0:D.$el;K!==void 0&&(F+=K.getBoundingClientRect().height+G*2);const N=o.style.value,L=o.attach.value;b.left=N.left,b.top=N.top,b.transform=N.transform,(typeof e.teleportToViewer=="undefined"||e.teleportToViewer)&&((L.bottom||L.top)&&!L.left&&!L.right&&(N.left="50%",N.transform="translate(-50%, 0)"),(L.left||L.right)&&!L.top&&!L.bottom&&(N.top="50%",N.transform="translate(0, -50%)")),Object.assign(b,N,{height:`${F}px`});const H=s.style.value,z=s.attach.value;_.left=H.left,_.top=H.top,_.transform=H.transform,(typeof e.teleportToViewer=="undefined"||e.teleportToViewer)&&((z.bottom||z.top)&&!z.left&&!z.right&&(H.left="50%",H.transform="translate(-50%, 0)"),(z.left||z.right)&&!z.top&&!z.bottom&&(H.top="50%",H.transform="translate(0, -50%)"));let Q=0;const Z=(S=oe(v))==null?void 0:S.$el;Z!==void 0&&(Q+=Z.getBoundingClientRect().height),Object.assign(_,H,{height:`${Q}px`})};return()=>{if(r.value){const O=[];g.value&&e.compassOpts!==!1?O.push(P("div",{class:"vc-navigation-control"},[P(Ec,{ref:u,...g.value,onCompassEvt:I})])):O.push(ne("v-if")),E.value&&e.zoomOpts!==!1?O.push(P("div",{class:"vc-navigation-control"},[P(Mc,{ref:d,...E.value,onZoomEvt:j})])):O.push(ne("v-if")),T.value&&e.printOpts!==!1?O.push(P("div",{class:"vc-navigation-control"},[P(Sc,{ref:m,...T.value,onPrintEvt:W})])):O.push(ne("v-if")),A.value&&e.locationOpts!==!1?O.push(P("div",{class:"vc-navigation-control"},[P(Tc,{ref:f,...A.value,onLocationEvt:$})])):O.push(ne("v-if"));let x=[P("div",{class:"vc-navigation-controls"},O)];x=gi(t.slots.default,x);const w=[];return w.push(P("div",{ref:l,class:`vc-navigation ${o.classes.value} ${e.customClass}`,style:b},x)),e.otherOpts!==!1&&w.push(P("div",{ref:c,class:"vc-location-other-controls "+s.classes.value,style:_},[P($c,{ref:v,...R.value.statusBarOpts,onStatusBarEvt:k}),P(Gc,{ref:C,...R.value.distancelegendOpts,onDistanceLegendEvt:h})])),w}else return ne("v-if")}}});function _6(e,{emit:t},i){const n={},r={},a={},o={};let s,l,c,u;const d=ie(0);let m,f,v=0,C={},b=0,_,M,g,E={},T=0;const A=ie(56),R=ie(3);let I;const j=ie(null),W=B=>{var F;B.stopPropagation&&B.stopPropagation(),B.preventDefault&&B.preventDefault(),(F=oe(j))==null||F.hide();const{Cartesian2:G,SceneMode:q,Math:U}=Cesium;if(i.viewer.scene.mode===q.MORPHING)return!0;const N=B.currentTarget,L=B.currentTarget.getBoundingClientRect(),H=new G((L.right-L.left)/2,(L.bottom-L.top)/2);let z;B instanceof MouseEvent?(z=new G(B.clientX-L.left,B.clientY-L.top),I=new G(B.clientX,B.clientY)):B instanceof TouchEvent&&(z=new G(B.changedTouches[0].clientX-L.left,B.changedTouches[0].clientY-L.top),I=new G(B.changedTouches[0].clientX,B.changedTouches[0].clientY));const Q=G.subtract(z,H,n),Z=G.magnitude(Q);if(Z>30&&Z<45)y(N,Q);else if(!(Z>50&&Z<70))p(N,Q);else{const J=U.PI_OVER_TWO-Math.atan2(-Q.y,Q.x);J>=0&&J<=U.PI_OVER_TWO&&O(N,Q)}},$=B=>{const{Cartesian2:F,Math:G}=Cesium,q=B.currentTarget.getBoundingClientRect(),U=new F((q.right-q.left)/2,(q.bottom-q.top)/2),K=B.type==="mouseup"?new F(B.clientX-q.left,B.clientY-q.top):new F(B.changedTouches[0].clientX-q.left,B.changedTouches[0].clientY-q.top),N=F.subtract(K,U,n),L=F.magnitude(N);if(L>30&&L<45){const H=G.toDegrees(Math.atan2(-N.y,N.x)),z=B.type==="mouseup"?new F(B.clientX,B.clientY):new F(B.changedTouches[0].clientX,B.changedTouches[0].clientY),Q=z.x-I.x,Z=z.y-I.y;if(Math.sqrt(Q*Q+Z*Z)>5)return;const X=G.toDegrees(d.value),ee=Math.abs(H-X),Y=i.viewer.scene;(H>0&&X>0&&X<90&&ee>80&&ee<100||ee>260&&ee<280)&&Y.camera.flyTo({destination:Y.camera.position,orientation:{heading:0,pitch:Y.camera.pitch}})}},k=B=>{const{Cartesian2:F,Cartesian3:G,defined:q,Matrix4:U,Ray:K,SceneMode:N,Transforms:L}=Cesium,{viewer:H}=i,z=H.scene,Q=z.camera,Z=z.screenSpaceCameraController;if(z.mode===N.MORPHING||!Z.enableInputs)return!0;if(z.mode===N.COLUMBUS_VIEW&&!Z.enableTranslate||(z.mode===N.SCENE3D||z.mode===N.COLUMBUS_VIEW)&&(!Z.enableLook||z.mode===N.SCENE3D&&!Z.enableRotate))return;const J=new F;J.x=z.canvas.clientWidth/2,J.y=z.canvas.clientHeight/2;const X=new K,ee=Q.getPickRay(J,X),Y=z.globe.pick(ee,z,o);if(!q(Y)){H.camera.flyHome();return}const le=Me(i,"compassEvt");le&&t("compassEvt",{type:"reset",camera:H.camera,status:"start",target:B.currentTarget});const ce=L.eastNorthUpToFixedFrame(Y||new G,H.scene.globe.ellipsoid),me=G.subtract(Y||new G,Q.position,new G),de=cf.createTween(z,{destination:U.multiplyByPoint(ce,new G(0,0,G.magnitude(me)),new G),direction:U.multiplyByPointAsVector(ce,new G(0,0,-1),new G),up:U.multiplyByPointAsVector(ce,new G(0,1,0),new G),duration:e.duration,complete:()=>{le&&t("compassEvt",{type:"reset",camera:H.camera,status:"end",target:B.currentTarget})},cancel:()=>{le&&t("compassEvt",{type:"reset",camera:H.camera,status:"cancel",target:B.currentTarget})}});z.tweens.add(de)},h=()=>{const{defined:B}=Cesium;B(i.viewer)?(s&&(s(),s=void 0),s=i.viewer.scene.postRender.addEventListener(function(){d.value!==i.viewer.scene.camera.heading&&(d.value=i.viewer.scene.camera.heading)})):s&&(s(),s=void 0)},p=(B,F)=>{const{defined:G,getTimestamp:q,SceneMode:U,Math:K,ScreenSpaceEventType:N}=Cesium,L=i.viewer.scene,H=L.screenSpaceCameraController;if(L.mode===U.MORPHING||!H.enableInputs)return;switch(L.mode){case U.COLUMBUS_VIEW:if(H.enableLook)break;if(!H.enableTranslate||!H.enableTilt)return;break;case U.SCENE3D:if(H.enableLook)break;if(!H.enableTilt||!H.enableRotate)return;break;case Cesium.SceneMode.SCENE2D:if(!H.enableTranslate)return;break}_.removeInputAction(N.LEFT_UP),G(u)&&i.viewer.clock.onTick.removeEventListener(u),c=void 0,u=void 0,q();let z=K.PI_OVER_TWO-Math.atan2(-F.y,F.x);const Q=Math.PI/4;let Z=0;const J={LEFT:1,RIGHT:2,UP:3,DOWN:4};Z=z>=-Q&&Q>=z?J.DOWN:z>=Q&&3*Q>=z?J.RIGHT:z>=3*Q&&5*Q>=z?J.UP:J.LEFT;const X=Me(i,"compassEvt");let ee="rotateEast";switch(Z){case J.LEFT:ee="rotateWest";break;case J.RIGHT:ee="rotateEast";break;case J.UP:ee="rotateNorth";break;case J.DOWN:ee="rotateSouth"}X&&t("compassEvt",{type:ee,camera:L.camera,status:"start",target:B}),u=function(Y){const le=i.viewer.scene,ce=le.camera;switch(q(),z=20*Math.abs(ce.positionCartographic.height/6378317)*5e-4,Z){case J.LEFT:ce.rotateLeft(z);break;case J.RIGHT:ce.rotateRight(z);break;case J.UP:ce.rotate(ce.right,-z);break;case J.DOWN:ce.rotate(ce.right,z)}X&&t("compassEvt",{type:ee,camera:le.camera,status:"changing",target:B})},c=function(Y){_.removeInputAction(N.LEFT_UP),G(u)&&i.viewer.clock.onTick.removeEventListener(u),c=void 0,u=void 0,X&&t("compassEvt",{type:ee,camera:L.camera,status:"end",target:B})},_.setInputAction(c,N.LEFT_UP),l=i.viewer.clock.onTick.addEventListener(u)},y=(B,F)=>{if(!e.enableCompassOuterRing)return;const G=i.viewer.scene;let q=G.camera;const U=G.screenSpaceCameraController;if(G.mode===Cesium.SceneMode.MORPHING||G.mode===Cesium.SceneMode.SCENE2D||!U.enableInputs||!U.enableLook&&(G.mode===Cesium.SceneMode.COLUMBUS_VIEW||G.mode===Cesium.SceneMode.SCENE3D&&!U.enableRotate))return;document.removeEventListener("mousemove",f,!1),document.removeEventListener("touchmove",f,!1),document.removeEventListener("mouseup",m,!1),document.removeEventListener("touchend",m,!1);const{Cartesian2:K,Cartesian3:N,defined:L,Math:H,Matrix4:z,Ray:Q,Transforms:Z}=Cesium;f=void 0,m=void 0;const J=Me(i,"compassEvt");J&&t("compassEvt",{type:"rotate",camera:G.camera,status:"start",target:B}),v=Math.atan2(-F.y,F.x);const X=new K;X.x=G.canvas.clientWidth/2,X.y=G.canvas.clientHeight/2;const ee=new Q,Y=q.getPickRay(X,ee),le=G.globe.pick(Y,G,o);L(le)?C=Z.eastNorthUpToFixedFrame(le||new N,G.globe.ellipsoid,a):C=Z.eastNorthUpToFixedFrame(q.positionWC,G.globe.ellipsoid,a);let ce=z.clone(q.transform,r);q.lookAtTransform(C),b=Math.atan2(q.position.y,q.position.x),N.magnitude(new N(q.position.x,q.position.y,0)),q.lookAtTransform(ce),f=function(me){const de=B.getBoundingClientRect(),ge=new K((de.right-de.left)/2,(de.bottom-de.top)/2);let be;me instanceof MouseEvent?be=new K(me.clientX-de.left,me.clientY-de.top):me instanceof TouchEvent&&(be=new K(me.changedTouches[0].clientX-de.left,me.changedTouches[0].clientY-de.top));const ve=K.subtract(be,ge,n),xe=Math.atan2(-ve.y,ve.x)-v,V=H.zeroToTwoPi(b-xe);q=i.viewer.scene.camera,ce=z.clone(q.transform,r),q.lookAtTransform(C);const se=Math.atan2(q.position.y,q.position.x);q.rotateRight(V-se),q.lookAtTransform(ce),J&&t("compassEvt",{type:"rotate",camera:G.camera,status:"changing",target:B})},m=function(me){document.removeEventListener("mousemove",f,!1),document.removeEventListener("touchmove",f,!1),document.removeEventListener("mouseup",m,!1),document.removeEventListener("touchend",m,!1),f=void 0,m=void 0,J&&t("compassEvt",{type:"rotate",camera:G.camera,status:"end",target:B})},document.addEventListener("mousemove",f,!1),document.addEventListener("touchmove",f,!1),document.addEventListener("mouseup",m,!1),document.addEventListener("touchend",m,!1)},O=(B,F)=>{const{Cartesian2:G,defined:q,Math:U,Matrix4:K,ScreenSpaceEventType:N,Transforms:L}=Cesium;_.removeInputAction(N.MOUSE_MOVE),_.removeInputAction(N.LEFT_UP),M=void 0,g=void 0,T=U.PI_OVER_TWO-Math.atan2(-F.y,F.x),T=T<0?0:T,T=T>U.PI_OVER_TWO?U.PI_OVER_TWO:T;const H=i.viewer.scene,z=H.camera,Q=new G;Q.x=H.canvas.clientWidth/2,Q.y=H.canvas.clientHeight/2;let Z=z.pickEllipsoid(Q,H.globe.ellipsoid);if(!q(Z))for(;Q.y<H.canvas.clientHeight;)Q.y+=5,Z=z.pickEllipsoid(Q,H.globe.ellipsoid);const J=Me(i,"compassEvt");J&&t("compassEvt",{type:"tilt",camera:H.camera,status:"start",target:B}),Pn(Z)&&q(Z)&&(E=L.eastNorthUpToFixedFrame(Z,H.globe.ellipsoid)),M=X=>{const ee=B.getBoundingClientRect(),Y=new Cesium.Cartesian2((ee.right-ee.left)/2,(ee.bottom-ee.top)/2),le=G.clone(X.endPosition),ce=G.subtract(le,Y,n);let me=U.PI_OVER_TWO-Math.atan2(-ce.y,ce.x);me=me<0?0:me,me=me>U.PI_OVER_TWO?U.PI_OVER_TWO:me;const de=i.viewer.scene.camera,ge=K.clone(de.transform,r);de.lookAtTransform(E);const be=me-T;de.rotateUp(be),T=me,de.lookAtTransform(ge);let ve=Math.ceil(me/(Math.PI/40));ve=ve>19?19:ve;const ue=Hc()[ve];A.value=ue.x,R.value=ue.y,J&&t("compassEvt",{type:"tilt",camera:H.camera,status:"changing",target:B})},g=function(X){_.removeInputAction(N.MOUSE_MOVE),_.removeInputAction(N.LEFT_UP),M=void 0,g=void 0,J&&t("compassEvt",{type:"tilt",camera:H.camera,status:"end",target:B})},_.setInputAction(M,N.MOUSE_MOVE),_.setInputAction(g,N.LEFT_UP)},x=B=>{f!==void 0&&(B.cancel=!0)},w=()=>{const{Math:B}=Cesium,F=B.PI_OVER_TWO+i.viewer.scene.camera.pitch,G=Math.PI/2/20;let q=Math.floor(F/G);q=q>19?19:q,q=q<0?0:q,A.value=Hc()[q].x,R.value=Hc()[q].y};return{heading:d,handleDoubleClick:k,handleMouseDown:W,handleMouseUp:$,onTooltipBeforeShow:x,viewerChange:h,load:async(B,F)=>(i.viewer=B,d.value=B.scene.camera.heading,h(),_=new Cesium.ScreenSpaceEventHandler(F),w(),!0),unload:async()=>(document.removeEventListener("mousemove",f,!1),document.removeEventListener("touchmove",f,!1),document.removeEventListener("mouseup",m,!1),document.removeEventListener("touchend",m,!1),l&&l(),s&&s(),_==null||_.destroy(),!0),tiltbarLeft:A,tiltbarTop:R,tooltipRef:j}}function Hc(){return[{x:56,y:3},{x:59,y:4},{x:64,y:5},{x:69,y:6},{x:74,y:7},{x:79,y:9},{x:84,y:12},{x:89,y:15},{x:92,y:19},{x:94,y:20},{x:99,y:25},{x:104,y:34},{x:106,y:40},{x:107,y:44},{x:107,y:46},{x:107,y:48},{x:107,y:50},{x:107,y:52},{x:107,y:54},{x:107,y:56}]}const mp={enableCompassOuterRing:{type:Boolean,default:!0},duration:{type:Number,default:1.5},tooltip:{type:[Boolean,Object],default:()=>({delay:500,anchor:"bottom middle",offset:[0,20],tip:void 0})},autoHidden:{type:Boolean,default:!0},...fn},x6={...Ce,compassEvt:e=>!0};var Wc=te({name:"VcCompassSm",props:mp,emits:x6,setup(e,t){var i;const n=re();n.cesiumClass="VcCompassSm";const r=Be(e,t,n);if(r===void 0)return;const{t:a}=Ct(),o=xt(n),{$services:s}=r,l=_6(e,t,n),c=di(e),u=ie(null),d=ie(null),m=((i=o.proxy)==null?void 0:i.$options.name)==="VcNavigationSm",f=ie(m),v=Pe({});fe(()=>e,g=>{De(()=>{!n.mounted||M()})},{deep:!0});const C=ye(()=>({left:l.tiltbarLeft.value+"px",top:l.tiltbarTop.value+"px",visibility:e.autoHidden?"hidden":"visible"})),b=ye(()=>({visibility:e.autoHidden?"hidden":"visible"})),_=ye(()=>({transform:"rotate(-"+l.heading.value+"rad)",WebkitTransform:"rotate(-"+l.heading.value+"rad)"}));n.createCesiumObject=async()=>{f.value=!0;const{viewer:g}=s;return new Promise((E,T)=>{De(()=>{m||g._element.appendChild(oe(u)),E(oe(u))})})},n.mount=async()=>{var g;M();const{viewer:E}=s;return(g=E.viewerWidgetResized)==null||g.raiseEvent({type:n.cesiumClass,status:"mounted",target:oe(u)}),l.load(s.viewer,oe(u))},n.unmount=async()=>{var g;const{viewer:E}=s,T=E._element;return m||T.contains(oe(u))&&T.removeChild(oe(u)),(g=E.viewerWidgetResized)==null||g.raiseEvent({type:n.cesiumClass,status:"unmounted",target:oe(u)}),l.unload()};const M=()=>{const g=c.style.value;v.left=g.left,v.top=g.top,v.transform=g.transform;const E=c.attach.value,T=oe(d);if(T!==void 0){const A=T==null?void 0:T.getBoundingClientRect();g.width=`${A==null?void 0:A.width}px`,g.height=`${A==null?void 0:A.height}px`,(E.bottom||E.top)&&!E.left&&!E.right&&(g.left="50%",g.transform="translate(-50%, 0)"),(E.left||E.right)&&!E.top&&!E.bottom&&(g.top="50%",g.transform="translate(0, -50%)")}Object.assign(v,g)};return()=>{if(f.value){let g=[];return g=gi(t.slots.default,g),g.push(P("div",{class:"vc-compass-tilt-sm",style:b.value})),g.push(P("div",{class:"vc-compass-tiltbar-sm",style:C.value})),g.push(P("div",{class:"vc-compass-arrows-sm",style:b.value})),g.push(P("div",{ref:d,class:"vc-compass-outer-ring-sm",style:_.value},e.tooltip?P(Pt,{ref:l.tooltipRef,...e.tooltip,onBeforeShow:l.onTooltipBeforeShow},()=>P("strong",{},e.tooltip.tip||a("vc.navigationSm.compass.outerTip"))):ne("v-if"))),g.push(P("div",{class:"vc-arrows-e-sm",style:b.value})),g.push(P("div",{class:"vc-arrows-n-sm",style:b.value})),g.push(P("div",{class:"vc-arrows-s-sm",style:b.value})),g.push(P("div",{class:"vc-arrows-w-sm",style:b.value})),P("div",{ref:u,class:"vc-compass-sm "+c.classes.value,style:v,onDblclick:l.handleDoubleClick,onMousedown:l.handleMouseDown,onMouseup:l.handleMouseUp,onTouchend:l.handleMouseUp,onTouchstart:l.handleMouseDown},g)}else return ne("v-if")}}});function E6(e,{emit:t},i,n){const r=ie(65),a=ie(null),o=ie(null),s=ie(null);let l,c,u,d,m,f,v,C,b,_,M,g;const E=k=>{var h,p,y;const{defined:O,getTimestamp:x,SceneMode:w,ScreenSpaceEventType:D}=Cesium,{viewer:S}=n;(h=oe(a))==null||h.hide(),(p=oe(o))==null||p.hide(),(y=oe(s))==null||y.hide(),l.removeInputAction(D.LEFT_UP),O(c)&&S.clock.onTick.removeEventListener(c),u=void 0,c=void 0,x();const F=S.scene.camera;c=()=>{S.scene.mode===w.COLUMBUS_VIEW?F.zoomIn():R(1)},u=()=>{l.removeInputAction(D.LEFT_UP),O(c)&&S.clock.onTick.removeEventListener(c),u=void 0,c=void 0},l.setInputAction(u,D.LEFT_UP),d=S.clock.onTick.addEventListener(c)},T=k=>{var h,p,y;(h=oe(a))==null||h.hide(),(p=oe(o))==null||p.hide(),(y=oe(s))==null||y.hide();const{defined:O,getTimestamp:x,SceneMode:w,ScreenSpaceEventType:D}=Cesium,{viewer:S}=n;l.removeInputAction(D.LEFT_UP),O(m)&&S.clock.onTick.removeEventListener(m),f=void 0,m=void 0,x();const F=S.scene.camera;m=()=>{S.scene.mode===w.COLUMBUS_VIEW?F.zoomOut():R(-1)},f=()=>{l.removeInputAction(D.LEFT_UP),O(m)&&S.clock.onTick.removeEventListener(m),f=void 0,m=void 0},l.setInputAction(f,D.LEFT_UP),v=S.clock.onTick.addEventListener(m)},A=k=>{var h,p,y;(h=oe(a))==null||h.hide(),(p=oe(o))==null||p.hide(),(y=oe(s))==null||y.hide();const{Cartesian2:O,defined:x,SceneMode:w}=Cesium,{viewer:D}=n;document.removeEventListener("mousemove",C,!1),document.removeEventListener("touchmove",C,!1),document.removeEventListener("mouseup",b,!1),document.removeEventListener("touchend",b,!1),x(_)&&D.clock.onTick.removeEventListener(_),b=void 0,_=void 0;const B=D.scene.camera;_=()=>{const F=r.value-65;F>0?D.scene.mode===w.COLUMBUS_VIEW?B.zoomOut():R(-1):F<0&&(D.scene.mode===w.COLUMBUS_VIEW?B.zoomIn():R(1))},C=F=>{const G=r.value,q=F.target.parentElement.getBoundingClientRect(),U=g.getBoundingClientRect(),K=new Cesium.Cartesian2;K.x=F.type==="touchmove"?F.changedTouches[0].clientX-U.left:F.clientX-U.left,K.y=F.type==="touchmove"?F.changedTouches[0].clientY-U.top:F.clientY-U.top;let L=new O(q.width-K.x,q.height-K.y).y-16;L=L<0?0:L,L=L>120?120:L,r.value=120-L,r.value-G>0?D.scene.mode===w.COLUMBUS_VIEW?B.zoomOut():R(-1):D.scene.mode===w.COLUMBUS_VIEW?B.zoomIn():R(1)},b=()=>{document.removeEventListener("mousemove",C,!1),document.removeEventListener("touchmove",C,!1),document.removeEventListener("mouseup",b,!1),document.removeEventListener("touchend",b,!1),x(_)&&D.clock.onTick.removeEventListener(_),b=void 0,C=void 0,_=void 0,r.value=65},document.addEventListener("mousemove",C,!1),document.addEventListener("touchmove",C,!1),document.addEventListener("mouseup",b,!1),document.addEventListener("touchend",b,!1),M=D.clock.onTick.addEventListener(_)},R=k=>{const{Cartesian2:h,Cartesian3:p,defined:y,Ellipsoid:O,Math:x}=Cesium,{viewer:w}=n,D=w.scene,S=D.camera,B=D.canvas,F=new h;F.x=B.clientWidth/2,F.y=B.clientHeight/2;const G=I(F);if(y(G)){const q=p.distance(S.position,G);let U=.0618*k*.2;U=q>300?U:2*U;const K=q*U,N=new p;p.subtract(G,S.position,N);const L=p.clone(S.right),H=p.dot(N,L),z=new p;p.multiplyByScalar(L,H,z),p.subtract(N,z,N),p.normalize(N,N),S.move(N,K);const Q=new p;p.normalize(G,Q);const Z=S.pickEllipsoid(F,w.scene.globe.ellipsoid);if(Pn(Z)&&y(Z)&&!isNaN(Z.x)&&!isNaN(Z.y)&&!isNaN(Z.z)&&!(S.positionCartographic.height<0)){p.normalize(Z,Z);const J=p.angleBetween(Q,Z);if(!x.equalsEpsilon(J,0,x.EPSILON10)){const X=p.cross(Q,Z,new p);S.rotate(X,J),Me(i,"zoomEvt")&&t("zoomEvt",{type:k===1?"zoomIn":"zoomOut",camera:w.camera,status:"end"})}}}},I=k=>{const{defined:h,Cartesian3:p}=Cesium,{viewer:y}=n,O=y.scene,x=O.globe,w=O.camera;if(h(x)){let D;O.pickPositionSupported&&(D=O.pickPositionWorldCoordinates(k));const S=w.getPickRay(k),B=x.pick(S,O),F=h(D)?p.distance(D,w.positionWC):Number.POSITIVE_INFINITY;return(Pn(B)&&h(B)?p.distance(B,w.positionWC):Number.POSITIVE_INFINITY)>F?D:B}};return{handleZoomInMouseDown:E,handleZoomOutMouseDown:T,handleZoomBarScrollMouseDown:A,load:k=>(g=k,l=new Cesium.ScreenSpaceEventHandler(k),!0),unload:()=>(document.removeEventListener("mousemove",C,!1),document.removeEventListener("touchmove",C,!1),document.removeEventListener("mouseup",b,!1),document.removeEventListener("touchend",b,!1),d==null||d(),v==null||v(),M==null||M(),l==null||l.destroy(),!0),zoombarTop:r,zoomInTooltipRef:a,zoomOutTooltipRef:o,zoomBarTooltipRef:s,onTooltipBeforeShow:k=>{(C!==void 0||c!==void 0||m!==void 0)&&(k.cancel=!0)}}}const fp={...fn,autoHidden:{type:Boolean,default:!1},tooltip:{type:Object,default:()=>({delay:1e3,anchor:"bottom middle",offset:[0,20],zoomInTip:void 0,zoomOutTip:void 0,zoomBarTip:void 0})}},O6={...Ce,zoomEvt:e=>!0};var qc=te({name:"VcZoomControlSm",props:fp,emits:O6,setup(e,t){var i;const n=re();n.cesiumClass="VcZoomControlSm",n.cesiumEvents=[];const r=ie(null),a=ie(null),o=ie(null),s=ie(null),c=((i=xt(n).proxy)==null?void 0:i.$options.name)==="VcNavigationSm",u=ie(c),d=Pe({}),m=Be(e,t,n);if(m===void 0)return;const{t:f}=Ct(),{$services:v}=m,C=di(e),b=E6(e,t,n,v);fe(()=>e,g=>{De(()=>{!n.mounted||M()})},{deep:!0});const _=ye(()=>({top:b.zoombarTop.value+"px"}));n.createCesiumObject=async()=>new Promise((g,E)=>{u.value=!0,De(()=>{const T=oe(r),{viewer:A}=v;if(c)g(T);else{const R=A._element;Pn(T)&&(R==null||R.appendChild(T)),g(T)}})}),n.mount=async()=>{var g;M();const{viewer:E}=v;return(g=E.viewerWidgetResized)==null||g.raiseEvent({type:n.cesiumClass,status:"mounted",target:oe(r)}),b.load(oe(r))},n.unmount=async()=>{var g;const{viewer:E}=v;if(!c){const T=E._element,A=oe(r);Pn(A)&&(T==null?void 0:T.contains(A))&&T.removeChild(A)}return(g=E.viewerWidgetResized)==null||g.raiseEvent({type:n.cesiumClass,status:"unmounted",target:oe(r)}),b.unload()};const M=()=>{const g=C.style.value;if(d.left=g.left,d.top=g.top,d.transform=g.transform,d.visibility=e.autoHidden?"hidden":"visible",!c){const E=C.attach.value;(E.bottom||E.top)&&!E.left&&!E.right&&(g.left="50%",g.transform="translate(-50%, 0)"),(E.left||E.right)&&!E.top&&!E.bottom&&(g.top="50%",g.transform="translate(0, -50%)")}Object.assign(d,g)};return()=>{if(u.value){let g=[];return g=gi(t.slots.default,g),g.push(P("div",{ref:a,class:"vc-zoomin-sm",onMousedown:b.handleZoomInMouseDown,onTouchstart:b.handleZoomInMouseDown},e.tooltip?P(Pt,{ref:b.zoomInTooltipRef,...e.tooltip,onBeforeShow:b.onTooltipBeforeShow},()=>P("strong",{},e.tooltip.zoomInTip||f("vc.navigationSm.zoomCotrol.zoomInTip"))):ne("v-if"))),g.push(P("div",{ref:s,class:"vc-zoomout-sm",onMousedown:b.handleZoomOutMouseDown,onTouchstart:b.handleZoomOutMouseDown},e.tooltip?P(Pt,{ref:b.zoomInTooltipRef,...e.tooltip,onBeforeShow:b.onTooltipBeforeShow},()=>P("strong",{},e.tooltip.zoomOutTip||f("vc.navigationSm.zoomCotrol.zoomOutTip"))):ne("v-if"))),g.push(P("div",{ref:o,class:"vc-zoombar-sm",style:_.value,onMousedown:b.handleZoomBarScrollMouseDown,onTouchstart:b.handleZoomBarScrollMouseDown},e.tooltip?P(Pt,{ref:b.zoomInTooltipRef,...e.tooltip,onBeforeShow:b.onTooltipBeforeShow},()=>P("strong",{},e.tooltip.zoomBarTip||f("vc.navigationSm.zoomCotrol.zoomBarTip"))):ne("v-if"))),P("div",{ref:r,class:"vc-zoom-control-sm "+C.classes.value,style:d},g)}else return ne("v-if")}}});const pp={enableCompassOuterRing:!0,duration:1.5,autoHidden:!0,tooltip:{delay:1e3,anchor:"bottom middle",offset:[0,20],tip:void 0}},vp={autoHidden:!0,tooltip:{delay:1e3,anchor:"bottom middle",offset:[0,20],tip:void 0}},gp={...fn,compassOpts:{type:[Boolean,Object],default:()=>pp},zoomOpts:{type:[Boolean,Object],default:()=>vp}},P6={...Ce,zoomEvt:e=>!0,compassEvt:e=>!0};var yp=te({name:"VcNavigationSm",inheritAttrs:!1,props:gp,emits:P6,setup(e,t){const i=re();i.cesiumClass="VcNavigationSm";const n=Be(e,t,i);if(n===void 0)return;const r=ie(!1),{$services:a}=n,o=di(e),s=ie(null),l=ie(null),c=ie(null),u=Pe({}),{emit:d}=t;fe(()=>e,()=>{De(()=>{var M,g;_(),(M=oe(l))==null||M.reload(),(g=oe(c))==null||g.reload()})},{deep:!0});const m=ye(()=>Object.assign({},pp,e.compassOpts)),f=ye(()=>Object.assign({},vp,e.zoomOpts)),v=M=>{Me(i,"compassEvt")&&d("compassEvt",M)},C=M=>{Me(i,"zoomEvt")&&d("zoomEvt",M)};i.createCesiumObject=async()=>{var M;r.value=!0;const{viewer:g}=a;return(M=g.viewerWidgetResized)==null||M.addEventListener(b),new Promise((E,T)=>{De(()=>{g._element.appendChild(oe(s)),E(oe(s))})})},i.mount=async()=>{var M;_();const{viewer:g}=a;return(M=g.viewerWidgetResized)==null||M.raiseEvent({type:i.cesiumClass,status:"mounted",target:oe(s)}),!0},i.unmount=async()=>{var M,g;const{viewer:E}=a,T=E._element;return T.contains(oe(s))&&T.removeChild(oe(s)),(M=E.viewerWidgetResized)==null||M.removeEventListener(b),(g=E.viewerWidgetResized)==null||g.raiseEvent({type:i.cesiumClass,status:"unmounted",target:oe(s)}),!0};const b=()=>{De(()=>{_()})},_=()=>{const M=o.style.value,g=o.attach.value;u.left=M.left,u.top=M.top,u.transform=M.transform,(g.bottom||g.top)&&!g.left&&!g.right&&(M.left="50%",M.transform="translate(-50%, 0)"),(g.left||g.right)&&!g.top&&!g.bottom&&(M.top="50%",M.transform="translate(0, -50%)"),Object.assign(u,M)};return()=>{if(r.value){let M=[];return M=gi(t.slots.default,M),m.value&&e.compassOpts!==!1&&M.push(P(Wc,{ref:l,onCompassEvt:v,...m.value})),f.value&&e.zoomOpts!==!1&&M.push(P(qc,{ref:c,onZoomEvt:C,...f.value})),P("div",{ref:s,class:"vc-navigation-sm "+o.classes.value,style:u},M)}else return ne("v-if")}}});const bp={position:{type:String,default:"bottom-right",validator:e=>["top-right","top-left","bottom-right","bottom-left"].includes(e)},offset:{type:Array,validator:e=>e.length===2},width:{type:String,default:"150px"},height:{type:String,default:"150px"},border:{type:String,default:"solid 4px rgb(255, 255, 255)"},borderRadius:{type:String},toggleOpts:{type:Object},viewerOpts:{type:Object},centerRectColor:{type:[Object,Array,String],default:"#ff000080"},widthFactor:{type:Number,default:2},heightFactor:{type:Number,default:2},modelValue:{type:Boolean,default:!0}};var Cp=te({name:"VcOverviewMap",props:bp,emits:{...Ce,"update:modelValue":e=>!0},setup(e,t){const i=re();i.cesiumClass="VcOverviewMap",i.cesiumEvents=[];const n=Be(e,t,i);if(n===void 0)return;const{t:r}=Ct(),{$services:a}=n,o=ie(null),s=ie(null),l=Pe({}),c=ie(null),u=ie(null),d=di(e),m=ie(e.modelValue);let f=[],v,C;const b=ye(()=>Object.assign({},{color:"#fff",background:"#3f4854",icon:"vc-icons-overview-toggle",size:"15px",tooltip:{delay:500,anchor:"bottom middle",offset:[0,20],tip:void 0}},e.toggleOpts)),_=ye(()=>Object.assign({},{removeCesiumScript:!1,showCredit:!1,sceneMode:2,containerId:"vc-overview-map"},e.viewerOpts));i.createCesiumObject=async()=>{const{viewer:I}=a;return I._element.appendChild(oe(o)),[oe(o),oe(u)]},i.mount=async()=>{E();const{viewer:I}=a;return I.clock.onTick.addEventListener(M),!0},i.unmount=async()=>{const{viewer:I}=a,j=I._element;return I.clock.onTick.removeEventListener(M),j.contains(oe(o))&&j.removeChild(oe(o)),!0};const M=()=>{if(v){const{viewer:I}=a,j=I.camera.computeViewRectangle(),{defined:W}=Cesium;if(!W(j))return;const $=j.expand(e.widthFactor,e.heightFactor);v.camera.flyTo({destination:$.clone(),orientation:{heading:I.camera.heading,pitch:I.camera.pitch,roll:I.camera.roll},duration:0});const{Cartesian3:k,SceneTransforms:h}=Cesium,p=k.fromRadians(j.west,j.north),y=k.fromRadians(j.east,j.north),O=k.fromRadians(j.west,j.south),x=k.fromRadians(j.east,j.south),w=v.scene,D=h.wgs84ToWindowCoordinates(w,p),S=h.wgs84ToWindowCoordinates(w,y),B=h.wgs84ToWindowCoordinates(w,O),F=h.wgs84ToWindowCoordinates(w,x);if(!W(D)||!W(S)||!W(B)||!W(F))return;const G=S.x-D.x,q=B.y-D.y,U=(D.x+S.x)/2-G/2,K=(D.y+B.y)/2-q/2;if(G<=0||q<=0)return;const N=new Cesium.BoundingRectangle(U,K,G,q);C.rectangle=N,C.material.uniforms.color=Te(e.centerRectColor),C.show=!0}},g=I=>{const{viewer:j}=I;v=j;const W=j.scene.screenSpaceCameraController;W.enableRotate=!1,W.enableTranslate=!1,W.enableZoom=!1,W.enableTilt=!1,W.enableLook=!1,v.scene.highDynamicRange=!1,v.scene.globe.enableLighting=!1,v.scene.globe.showWaterEffect=!1,v.scene.globe.depthTestAgainstTerrain=!1,v.scene.skyAtmosphere.show=!1,v.scene.fog.enabled=!1,v.scene.skyBox.show=!1,v.scene.sun.show=!1,v.scene.moon.show=!1,v.scene.highDynamicRange=!1,v.scene.globe.showGroundAtmosphere=!1,C=new Cesium.ViewportQuad(new Cesium.BoundingRectangle(150,100,100,50)),C.show=!1,v.scene.primitives.add(C)},E=()=>{var I;const j=d.style.value;if(l.left=j.left,l.top=j.top,l.transform=j.transform,l["pointer-events"]="none",j.borderRadius=e.borderRadius,j.border=e.border,m.value)j.width=e.width,j.height=e.height;else{const $=/(\d+)/g.exec(e.border),k=($==null?void 0:$.length)?parseFloat($[0]):0,h=getComputedStyle((I=oe(s))==null?void 0:I.$el);j.width=`${parseFloat(h.width)+parseFloat(h.padding)+k}px`,j.height=`${parseFloat(h.height)+parseFloat(h.padding)+k}px`}Object.assign(l,j)},T=()=>{m.value?A():R(),m.value=!m.value,t.emit("update:modelValue",m.value)},A=()=>{var I;const W=/(\d+)/g.exec(e.border),$=(W==null?void 0:W.length)?parseFloat(W[0]):0,k=getComputedStyle((I=oe(s))==null?void 0:I.$el);l.width=`${parseFloat(k.width)+parseFloat(k.padding)+$}px`,l.height=`${parseFloat(k.height)+parseFloat(k.padding)+$}px`},R=()=>{l.width=e.width,l.height=e.height};return ot(()=>{f.forEach(I=>I()),f=[]}),()=>{const I=[];return I.push(P(ri,{ref:s,class:"toggle toggle-"+e.position+(m.value?"":" minimized "),flat:!0,dense:!0,icon:b.value.icon,size:b.value.size,style:{color:b.value.color,background:b.value.background,"pointer-events":"auto"},onClick:T},()=>b.value.tooltip?P(Pt,{ref:c,...b.value.tooltip},()=>P("strong",{},b.value.tooltip.tip||r(`vc.overview.${m.value?"hidden":"show"}`))):ne("v-if"))),I.push(P(nf,{ref:u,..._.value,onReady:g},()=>Ke(t.slots.default))),P("div",{ref:o,class:"vc-overview-map "+d.classes.value,style:l},I)}}});class Oo{constructor(t){this.id=t.id||Cesium.createGuid()}static getBoundingSphere(t,i){var n,r,a,o;const{Primitive:s,ClassificationPrimitive:l,GroundPolylinePrimitive:c,GroundPrimitive:u,Polyline:d}=Cesium;let m;return t instanceof l||t instanceof c?m=(r=(n=t._primitive)==null?void 0:n._boundingSphereWC)==null?void 0:r[0]:t instanceof s?m=(a=t._boundingSphereWC)==null?void 0:a[0]:t instanceof u?m=(o=t._boundingVolumes)==null?void 0:o[0]:t instanceof d?m=t._boundingVolumeWC:t instanceof Cesium.Entity&&(m=new Cesium.BoundingSphere,i.dataSourceDisplay.getBoundingSphere(t,!0,m)),m}static fromPickedFeature(t,i,n,r){var a,o,s,l,c;const u=new Oo({id:t.id});if(t.position)u.position=t.position;else if(t instanceof Cesium.Model)u.position=Cesium.Matrix4.getTranslation(t.modelMatrix,new Cesium.Cartesian3);else if(t instanceof Cesium.Cesium3DTileset){let d=i.content.tile.boundingSphere.center,m=(a=i==null?void 0:i.getProperty)==null?void 0:a.call(i,"position");Cesium.defined(m)&&(typeof m=="string"&&(m=JSON.parse(m)),d=Qe(m)),u.position=d}else u.position=(o=Oo.getBoundingSphere(t,n))==null?void 0:o.center;return u.cesiumObject=t,u.pickedFeature=i,u.windowPosition=r,u.description=(t==null?void 0:t.description)||((s=t==null?void 0:t.description)==null?void 0:s.getValue()),u.properties=(t==null?void 0:t.properties)||((l=t==null?void 0:t.properties)==null?void 0:l.getValue())||((c=t==null?void 0:t.feature)==null?void 0:c.properties),u}static fromImageryLayerFeature(t,i){const n=new Oo({id:t.name});return n.name=t.name,n.description=t.description,n.properties=t.properties,n.data=t.data,n.imageryLayer=t.imageryLayer,n.position=i.scene.globe.ellipsoid.cartographicToCartesian(t.position),n.coords=t.coords,n}}var Cr=Oo;class M6{constructor(){const{knockout:t}=Cesium;this.allFeaturesAvailablePromise=void 0,this.isLoading=!0,this.pickPosition=void 0,this.features=[],this.error=void 0,this.providerCoords=void 0,t.track(this,["isLoading","features","error"])}}var S6=M6;function T6(e,t,i){const n="-1000px",r=ie(n),a=ie(n),o="",s=1,l=ie(),c=ie();let u,d;const m=ie(null),f=ie(null);let v=[],C=!1;const b=Pe({top:a.value,left:r.value,transform:o,opacity:s});v.push(fe(f,$=>{var k,h,p;const y=$,{defined:O}=Cesium;if(O(y)&&O(y==null?void 0:y.position)){const{viewer:x}=i;l.value=(y==null?void 0:y.position)instanceof Cesium.Cartesian3?y==null?void 0:y.position:(k=y==null?void 0:y.position)==null?void 0:k.getValue(x.clock.currentTime),I(),(h=e.proxy)==null||h.$emit("pickEvt",y)}else j(),(p=e.proxy)==null||p.$emit("pickEvt",y);R()})),v.push(fe(m,$=>{const{defined:k,Entity:h}=Cesium,p=$;if(!k(p))f.value=void 0;else{const y=new h({id:"__Vc__Pick__Location__"});y.position=p.pickPosition,f.value=y}De(()=>{k(p.allFeaturesAvailablePromise)&&p.allFeaturesAvailablePromise.then(()=>{var y,O,x;const w=p.features.filter(D=>k(D));f.value=w.filter(_)[0],!k(f.value)&&w.length>0&&(f.value=w[0],C&&f.value instanceof Cr&&((x=(O=(y=f.value)==null?void 0:y.pickedFeature)==null?void 0:O.primitive)==null?void 0:x.position)&&(f.value.position=f.value.pickedFeature.primitive.position))})})}));const _=$=>{const{defined:k}=Cesium;return k($.properties)||k($.description)},M=$=>{const{defined:k}=Cesium,{viewer:h}=i,p=h.scene,y=p.camera.getPickRay($);let O=p.globe.pick(y,p);if(!k(O)&&(O=p.pickPosition($),!k(O)))return;const x=p.globe.ellipsoid.cartesianToCartographic(O||new Cesium.Cartesian3),w=E($),D=T(),S=t.allowFeatureInfoRequests?p.imageryLayers.pickImageryLayerFeatures(y,p):Promise.resolve(),B=g(D,O,w,[S],void 0,x.height,!1,h);m.value=B},g=($,k,h,p,y,O,x,w)=>{const{defined:D,defaultValue:S}=Cesium;x=S(x,!1);const B=new S6;return B.providerCoords=$,B.pickPosition=k,B.allFeaturesAvailablePromise=Promise.all(p).then(function(F){B.isLoading=!1,B.features=F.reduce(function(G,q,U){if(!D(q))return G;const K=q.map(function(N){return D(y)&&(N.imageryLayer=y[U]),D(N.position)||(N.position=w.scene.globe.ellipsoid.cartesianToCartographic(k)),(!D(N.position.height)||N.position.height===0)&&(N.position.height=O),Cr.fromImageryLayerFeature(N,w)}.bind(this));return G.concat(K)}.bind(this),S(h,[]))}).catch(function(){B.isLoading=!1,B.error="An unknown error occurred while picking features."}),B},E=$=>{var k,h;const p=[],{defined:y}=Cesium,{viewer:O}=i,w=O.scene.drillPick($,t.limit);for(let D=0;D<w.length;++D){const S=w[D];let B=S.id;!y(B)&&y(S.primitive)&&(B=S.primitive);const F=(h=(k=S==null?void 0:S.primitive)==null?void 0:k._catalogItem)!=null?h:B==null?void 0:B._catalogItem;if(typeof(F==null?void 0:F.getFeaturesFromPickResult)=="function"){const G=F.getFeaturesFromPickResult.bind(F)($,S);G&&(Array.isArray(G)?p.push(...G):p.push(G))}else{const G=S;if(G.id)if(Ze(G.id)&&G.id[0]instanceof Cesium.Entity){C=!0,G.id.forEach(q=>{const U=Cr.fromPickedFeature(q,G,O,$);p.push(U)});continue}else if(G.id instanceof Cesium.Entity){const q=Cr.fromPickedFeature(G.id,G,O,$);p.push(q),C=!1;continue}else C=!1;if(G.primitive){const q=Cr.fromPickedFeature(G.primitive,G,O,$);p.push(q)}else if(G.collection){const q=Cr.fromPickedFeature(G.collection,G,O,$);p.push(q)}}}return p},T=()=>{const $={},{viewer:k}=i,h=k.scene,p=function(y,O,x,w,D,S,B){if(O){const F=O.call(y,x,w,D,S,B);return y.url&&($[y.url]={x,y:w,level:D}),y.pickFeatures=O,F}return Promise.reject(!1)};for(let y=0;y<h.imageryLayers.length;y++){const O=h.imageryLayers.get(y).imageryProvider;O.pickFeatures=p.bind(void 0,O,O.pickFeatures)}return $},A=($,k)=>{const{viewer:h}=i;return Cesium.SceneTransforms.wgs84ToWindowCoordinates(h.scene,$,k)},R=()=>{const{defined:$,Cartesian2:k}=Cesium;if(t.show&&$(l.value)){const h=A(l.value,new k);if($(h)){const{viewer:p}=i,y=p.container,O=y.clientWidth,x=y.clientHeight,w=t.width,D=w*.5;h.x=Math.min(Math.max(h.x,-w),O+w)-D,h.y=Math.min(Math.max(h.y,-w),x+w)-D,b.left=Math.floor(h.x+.25)+"px",b.top=Math.floor(h.y+.25)+"px"}}},I=()=>{const{viewer:$}=i,{defined:k,EasingFunction:h}=Cesium;if(k(u)){if(d)return;u.cancelTween(),u=void 0}d=!0,u=$.scene.tweens.add({startObject:{scale:2,opacity:0,rotate:-180},stopObject:{scale:1,opacity:1,rotate:0},duration:.8,easingFunction:h.EXPONENTIAL_OUT,update:function(p){b.opacity=p.opacity,b.transform="scale("+p.scale+") rotate("+p.rotate+"deg)"},complete:function(){u=void 0},cancel:function(){u=void 0}})},j=()=>{const{viewer:$}=i,{defined:k,EasingFunction:h}=Cesium;if(k(u)){if(!d)return;u.cancelTween(),u=void 0}d=!1,u=$.scene.tweens.add({startObject:{scale:1,opacity:1},stopObject:{scale:1.5,opacity:0},duration:.8,easingFunction:h.EXPONENTIAL_OUT,update:function(p){b.opacity=p.opacity,b.transform="scale("+p.scale+") rotate(0deg)"},complete:function(){u=void 0},cancel:function(){u=void 0}})},W=()=>{R()};return ot(()=>{v.forEach($=>$()),v=[]}),Object.assign(e.proxy,{selectedFeature:f,position:l,computeScreenSpacePosition:A,update:R,animateAppear:I,animateDepart:j,getPickedFeatures:()=>m}),{pickFromScreenPosition:M,rootRef:c,rootStyle:b,onPostRender:W}}const wp={show:{type:Boolean,default:!0},width:{type:Number,default:50},height:{type:Number,default:50},allowFeatureInfoRequests:{type:Boolean,default:!0},limit:{type:Number,default:25}},A6={...Ce,pickEvt:e=>!0};var _p=te({name:"VcSelectionIndicator",props:wp,emits:A6,setup(e,t){const i=re();i.cesiumClass="VcSelectionIndicator",i.cesiumEvents=[];const n=Be(e,t,i);if(n===void 0)return;const{$services:r}=n;let a;const o=T6(i,e,r);return i.createCesiumObject=async()=>{const{viewer:s}=r;return s._element.appendChild(oe(o.rootRef)),oe(o.rootRef)},i.mount=async()=>{const{viewer:s}=r,{ScreenSpaceEventHandler:l,ScreenSpaceEventType:c}=Cesium;return a=new l(s.canvas),a.setInputAction(u=>{o.pickFromScreenPosition(u.position)},c.LEFT_CLICK),s.scene.postRender.addEventListener(o.onPostRender),!0},i.unmount=async()=>{const{viewer:s}=r,l=s._element;return l.contains(oe(o.rootRef))&&l.removeChild(oe(o.rootRef)),s.scene.postRender.removeEventListener(o.onPostRender),a.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK),a.destroy(),a=void 0,!0},()=>P("div",{ref:o.rootRef,class:"vc-selection-indicator",style:o.rootStyle},P("img",{src:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxNzZweCIgaGVpZ2h0PSIxNzZweCIgdmlld0JveD0iMCAwIDE3NiAxNzYiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPg0KICAgIDwhLS0gR2VuZXJhdG9yOiBTa2V0Y2ggMy4xLjEgKDg3NjEpIC0gaHR0cDovL3d3dy5ib2hlbWlhbmNvZGluZy5jb20vc2tldGNoIC0tPg0KICAgIDx0aXRsZT5Mb2NhdGlvblRhcmdldCArIFBhdGg8L3RpdGxlPg0KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPg0KICAgIDxkZWZzPg0KICAgICAgICA8ZmlsdGVyIHg9Ii01MCUiIHk9Ii01MCUiIHdpZHRoPSIyMDAlIiBoZWlnaHQ9IjIwMCUiIGZpbHRlclVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgaWQ9ImZpbHRlci0xIj4NCiAgICAgICAgICAgIDxmZU9mZnNldCBkeD0iMCIgZHk9IjAiIGluPSJTb3VyY2VBbHBoYSIgcmVzdWx0PSJzaGFkb3dPZmZzZXRPdXRlcjEiPjwvZmVPZmZzZXQ+DQogICAgICAgICAgICA8ZmVHYXVzc2lhbkJsdXIgc3RkRGV2aWF0aW9uPSIyIiBpbj0ic2hhZG93T2Zmc2V0T3V0ZXIxIiByZXN1bHQ9InNoYWRvd0JsdXJPdXRlcjEiPjwvZmVHYXVzc2lhbkJsdXI+DQogICAgICAgICAgICA8ZmVDb2xvck1hdHJpeCB2YWx1ZXM9IjAgMCAwIDAgMCAgIDAgMCAwIDAgMCAgIDAgMCAwIDAgMCAgMCAwIDAgMC41MjY0NDY0NDUgMCIgaW49InNoYWRvd0JsdXJPdXRlcjEiIHR5cGU9Im1hdHJpeCIgcmVzdWx0PSJzaGFkb3dNYXRyaXhPdXRlcjEiPjwvZmVDb2xvck1hdHJpeD4NCiAgICAgICAgICAgIDxmZU1lcmdlPg0KICAgICAgICAgICAgICAgIDxmZU1lcmdlTm9kZSBpbj0ic2hhZG93TWF0cml4T3V0ZXIxIj48L2ZlTWVyZ2VOb2RlPg0KICAgICAgICAgICAgICAgIDxmZU1lcmdlTm9kZSBpbj0iU291cmNlR3JhcGhpYyI+PC9mZU1lcmdlTm9kZT4NCiAgICAgICAgICAgIDwvZmVNZXJnZT4NCiAgICAgICAgPC9maWx0ZXI+DQogICAgICAgIDxmaWx0ZXIgeD0iLTUwJSIgeT0iLTUwJSIgd2lkdGg9IjIwMCUiIGhlaWdodD0iMjAwJSIgZmlsdGVyVW5pdHM9Im9iamVjdEJvdW5kaW5nQm94IiBpZD0iZmlsdGVyLTIiPg0KICAgICAgICAgICAgPGZlT2Zmc2V0IGR4PSIwIiBkeT0iMCIgaW49IlNvdXJjZUFscGhhIiByZXN1bHQ9InNoYWRvd09mZnNldE91dGVyMSI+PC9mZU9mZnNldD4NCiAgICAgICAgICAgIDxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249IjIiIGluPSJzaGFkb3dPZmZzZXRPdXRlcjEiIHJlc3VsdD0ic2hhZG93Qmx1ck91dGVyMSI+PC9mZUdhdXNzaWFuQmx1cj4NCiAgICAgICAgICAgIDxmZUNvbG9yTWF0cml4IHZhbHVlcz0iMCAwIDAgMCAwICAgMCAwIDAgMCAwICAgMCAwIDAgMCAwICAwIDAgMCAwLjUyNjQ0NjQ0NSAwIiBpbj0ic2hhZG93Qmx1ck91dGVyMSIgdHlwZT0ibWF0cml4IiByZXN1bHQ9InNoYWRvd01hdHJpeE91dGVyMSI+PC9mZUNvbG9yTWF0cml4Pg0KICAgICAgICAgICAgPGZlTWVyZ2U+DQogICAgICAgICAgICAgICAgPGZlTWVyZ2VOb2RlIGluPSJzaGFkb3dNYXRyaXhPdXRlcjEiPjwvZmVNZXJnZU5vZGU+DQogICAgICAgICAgICAgICAgPGZlTWVyZ2VOb2RlIGluPSJTb3VyY2VHcmFwaGljIj48L2ZlTWVyZ2VOb2RlPg0KICAgICAgICAgICAgPC9mZU1lcmdlPg0KICAgICAgICA8L2ZpbHRlcj4NCiAgICA8L2RlZnM+DQogICAgPGcgaWQ9IlBhZ2UtMSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+DQogICAgICAgIDxnIGlkPSJBcnRib2FyZC0xIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtNjkxLjAwMDAwMCwgLTQ5OC4wMDAwMDApIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZT0iI0ZGRkZGRiI+DQogICAgICAgICAgICA8ZyBpZD0iTG9jYXRpb25UYXJnZXQtKy1QYXRoIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg2OTkuMDAwMDAwLCA1MDYuMDAwMDAwKSI+DQogICAgICAgICAgICAgICAgPHBhdGggZD0iTTgwLDE0NCBDMTE1LjM0NjIyNCwxNDQgMTQ0LDExNS4zNDYyMjQgMTQ0LDgwIEMxNDQsNDQuNjUzNzc2IDExNS4zNDYyMjQsMTYgODAsMTYgQzQ0LjY1Mzc3NiwxNiAxNiw0NC42NTM3NzYgMTYsODAgQzE2LDExNS4zNDYyMjQgNDQuNjUzNzc2LDE0NCA4MCwxNDQgWiBNMTYwLDgwIEwxNDQsODAgTTE2LDgwIEwwLDgwIE03OS42LC0wLjQgTDc5LjYsMTUuNiBNNzguOCwxNDQgTDc4LjgsMTYwIiBpZD0iTG9jYXRpb25UYXJnZXQiIHN0cm9rZS13aWR0aD0iNyIgZmlsdGVyPSJ1cmwoI2ZpbHRlci0xKSI+PC9wYXRoPg0KICAgICAgICAgICAgICAgIDxjaXJjbGUgaWQ9IlBhdGgiIHN0cm9rZS13aWR0aD0iMiIgb3BhY2l0eT0iMC4yNTIyMTU0ODUiIGZpbHRlcj0idXJsKCNmaWx0ZXItMikiIGN4PSI4MCIgY3k9IjgwIiByPSI2Ij48L2NpcmNsZT4NCiAgICAgICAgICAgIDwvZz4NCiAgICAgICAgPC9nPg0KICAgIDwvZz4NCjwvc3ZnPg==",width:e.width,height:e.height}))}});const D6=[Ec,Mc,Sc,Tc,$c,Gc,hp,Wc,qc,yp,Cp,_p];D6.forEach(e=>{e.install=t=>{t.component(e.name,e)}});const xp=Ec,Ep=Mc,Op=Sc,Pp=Tc,Mp=$c,Sp=Gc,Tp=hp,Ap=Wc,Dp=qc,Ip=yp,Rp=Cp,Lp=_p,ct={externalLabel:!1,label:"",labelPosition:"right",hideLabel:!1,tabindex:void 0,disable:!1,outline:!1,push:!1,flat:!1,unelevated:!1,color:"primary",textColor:void 0,glossy:!1,labelClass:void 0,labelStyle:void 0,square:!1,tooltip:{delay:500,anchor:"bottom middle",offset:[0,20],tip:void 0}},Gn={show:!0,enableMouseEvent:!0,asynchronous:!1,classificationType:2,appearance:{type:"PolylineMaterialAppearance",options:{material:{fabric:{type:"Color",uniforms:{color:"#51ff00"}}}}},depthFailAppearance:{type:"PolylineMaterialAppearance",options:{material:{fabric:{type:"PolylineDash",uniforms:{color:[255,0,0,127]}}}}}},bn={show:!0,color:"rgb(255,229,0)",pixelSize:8,outlineColor:"black",outlineWidth:1,disableDepthTestDistance:Number.POSITIVE_INFINITY},I6={show:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY,verticalOrigin:1,image:""},wr={width:2,arcType:0,ellipsoid:void 0},R6={show:!0,enableMouseEvent:!0,asynchronous:!1,classificationType:2,appearance:{type:"MaterialAppearance",options:{material:{fabric:{type:"Color",uniforms:{color:[255,165,0,125]}}},faceForward:!0,renderState:{cull:{enabled:!1},depthTest:{enabled:!1}}}}},ut={show:!0,font:"16px Arial Microsoft YaHei sans-serif",scale:1,fillColor:"white",showBackground:!0,backgroundColor:{x:.165,y:.165,z:.165,w:.8},backgroundPadding:[7,5],horizontalOrigin:0,verticalOrigin:1,pixelOffset:[0,-9],disableDepthTestDistance:Number.POSITIVE_INFINITY},wt={icon:"vc-icons-move",size:"24px",color:"#1296db",background:"#fff",round:!0,flat:!1,label:void 0,stack:!1,dense:!0,tooltip:{delay:1e3,anchor:"bottom middle",offset:[0,20]}},qa={show:!0,drawtip:{show:!0,pixelOffset:[32,32]},pointOpts:bn,editorOpts:{delay:1e3,hideDelay:1e3,pixelOffset:[16,-8],move:Object.assign({},wt),remove:Object.assign({},wt,{icon:"vc-icons-remove"})},heightReference:1,disableDepthTest:!1,showLabel:!1,labelOpts:Object.assign({},ut,{horizontalOrigin:1,verticalOrigin:0,pixelOffset:[10,0]})},Zc={show:!0,showComponentLines:!1,drawtip:{show:!0,pixelOffset:[32,32]},pointOpts:bn,polylineOpts:wr,primitiveOpts:Gn,editorOpts:{pixelOffset:[16,-8],delay:1e3,hideDelay:1e3,move:Object.assign({},wt),removeAll:Object.assign({},wt,{icon:"vc-icons-delete"})},disableDepthTest:!1},Bp={show:!0,drawtip:{show:!0,pixelOffset:[32,32]},pointOpts:bn,polylineOpts:wr,primitiveOpts:Gn,editorOpts:{pixelOffset:[16,-8],delay:1e3,hideDelay:1e3,move:Object.assign({},wt),insert:Object.assign({},wt,{icon:"vc-icons-insert"}),remove:Object.assign({},wt,{icon:"vc-icons-remove"}),removeAll:Object.assign({},wt,{icon:"vc-icons-delete"})},loop:!1,disableDepthTest:!1,showLabel:!1,showAngleLabel:!1,showDistanceLabel:!1,labelOpts:ut,labelsOpts:Object.assign({},ut,{scale:.8,horizontalOrigin:1,verticalOrigin:-1,pixelOffset:[5,5]})},Za={show:!0,drawtip:{show:!0,pixelOffset:[32,32]},pointOpts:bn,polylineOpts:wr,primitiveOpts:Object.assign({},Gn,{depthFailAppearance:{type:"PolylineMaterialAppearance",options:{material:{fabric:{type:"Color",uniforms:{color:"#51ff00"}}}}}}),polygonOpts:R6,editorOpts:{pixelOffset:[16,-8],delay:1e3,hideDelay:1e3,move:Object.assign({},wt),insert:Object.assign({},wt,{icon:"vc-icons-insert"}),remove:Object.assign({},wt,{icon:"vc-icons-remove"}),removeAll:Object.assign({},wt,{icon:"vc-icons-delete"})},loop:!0,disableDepthTest:!0,showDistanceLabel:!1,showLabel:!1,showAngleLabel:!1,labelOpts:ut,labelsOpts:Object.assign({},ut,{scale:.8,horizontalOrigin:1,verticalOrigin:-1,pixelOffset:[5,5]})},Qc=Object.assign({},Za,{pointOpts:Object.assign({},bn,{show:!1}),editorOpts:{pixelOffset:[16,-8],delay:1e3,hideDelay:1e3,move:Object.assign({},wt),removeAll:Object.assign({},wt,{icon:"vc-icons-delete"})},edge:4,loop:!1,disableDepthTest:!1,showLabel:!1,showAngleLabel:!1,showDistanceLabel:!1,labelOpts:ut,labelsOpts:Object.assign({},ut,{scale:.8,horizontalOrigin:1,verticalOrigin:-1,pixelOffset:[5,5],text:"1dsa"})}),L6=Object.assign({},Qc,{edge:360}),B6=Object.assign({},Qc,{edge:6,loop:!0}),j6=Object.assign({},ct,{icon:"vc-icons-clear",color:"red"}),jp=Object.assign({},ct,{icon:"vc-icons-drawing-regular"}),Fp=Object.assign({},ct,{icon:"vc-icons-drawing-circle"}),kt={...et,show:Boolean,editable:Boolean,drawtip:Object,pointOpts:Object,editorOpts:Object,mode:Number,preRenderDatas:Array,disableDepthTest:Boolean},Xc={...Ae,position:{type:String,default:"bottom-left",validator:e=>["top-right","top-left","bottom-right","bottom-left","top","right","bottom","left"].includes(e)},offset:{type:Array,validator:e=>e.length===2},mode:{type:Number,default:1},activeColor:{type:String,default:"positive"},editable:{type:Boolean},clampToGround:{type:Boolean},clearActionOpts:{type:Object,default:()=>j6}},F6=Object.assign({},ct,{icon:"vc-icons-measure-distance"}),kp=Object.assign({},Zc,{labelOpts:Object.assign({},ut,{horizontalOrigin:1,verticalOrigin:-1,pixelOffset:[10,10]}),measureUnits:new it,decimals:{distance:2,angle:2},locale:void 0,autoUpdateLabelPosition:!0}),k6=Object.assign({},ct,{icon:"vc-icons-measure-component-distance"}),N6=Object.assign({},kp,{showComponentLines:!0,xLabelOpts:ut,xAngleLabelOpts:Object.assign({},ut,{horizontalOrigin:1,verticalOrigin:0,pixelOffset:[9,0]}),yLabelOpts:Object.assign({},ut,{horizontalOrigin:-1,pixelOffset:[-9,0]}),yAngleLabelOpts:Object.assign({},ut,{verticalOrigin:-1,pixelOffset:[0,9]})}),z6=Object.assign({},ct,{icon:"vc-icons-measure-polyline-distance"}),Np=Object.assign({},Bp,{measureUnits:new it,labelOpts:ut,labelsOpts:Object.assign({},ut,{scale:.8,horizontalOrigin:1,verticalOrigin:-1,pixelOffset:[5,5]}),decimals:{distance:2,angle:2},showLabel:!0,showAngleLabel:!0,showDistanceLabel:!0,locale:void 0,loop:!1,autoUpdateLabelPosition:!0}),V6=Object.assign({},ct,{icon:"vc-icons-measure-horizontal-distance"}),$6=Object.assign({},Np,{dashLineOpts:{width:2},dashLinePrimitiveOpts:Object.assign({},Gn,{appearance:{type:"PolylineMaterialAppearance",options:{material:{fabric:{type:"PolylineDash",uniforms:{color:[255,255,0,255]}}}}},depthFailAppearance:{type:"PolylineMaterialAppearance",options:{material:{fabric:{type:"PolylineDash",uniforms:{color:[255,255,0,255]}}}}}}),labelOpts:Object.assign({},ut,{horizontalOrigin:1,verticalOrigin:1,pixelOffset:[10,-10]}),labelsOpts:Object.assign({},ut,{scale:.8,horizontalOrigin:1,verticalOrigin:-1,pixelOffset:[5,5]}),showDashedLine:!0}),G6=Object.assign({},ct,{icon:"vc-icons-measure-vertical-distance"}),U6=Object.assign({},Zc,{labelOpts:Object.assign({},ut,{horizontalOrigin:1,verticalOrigin:-1,pixelOffset:[10,10]}),measureUnits:new it,decimals:{distance:2,angle:2},locale:void 0,autoUpdateLabelPosition:!0}),H6=Object.assign({},ct,{icon:"vc-icons-measure-height-from-terrain"}),W6=Object.assign({},qa,{polylineOpts:wr,labelOpts:Object.assign({},ut,{horizontalOrigin:1,verticalOrigin:-1,pixelOffset:[10,10]}),editorOpts:{pixelOffset:[16,-8],delay:1e3,hideDelay:1e3,move:Object.assign({},wt),removeAll:Object.assign({},wt,{icon:"vc-icons-delete"})},measureUnits:new it,decimals:{distance:2},locale:void 0,primitiveOpts:Gn}),q6=Object.assign({},ct,{icon:"vc-icons-measure-area"}),zp=Object.assign({},Za,{labelOpts:ut,labelsOpts:Object.assign({},ut,{scale:.8,horizontalOrigin:1,verticalOrigin:-1,pixelOffset:[5,5]}),showDistanceLabel:!0,showAngleLabel:!0,showLabel:!0,measureUnits:new it,decimals:{area:2,distance:2,angle:2},loop:!0,locale:void 0,autoUpdateLabelPosition:!0}),Z6=Object.assign({},ct,{icon:"vc-icons-measure-point-coordinates"}),Q6=Object.assign({},qa,{heightReference:1,measureUnits:new it,drawtip:{show:!0,pixelOffset:[32,48]},labelOpts:Object.assign({},ut,{horizontalOrigin:1,verticalOrigin:0,pixelOffset:[10,0]}),decimals:{lng:6,lat:6,height:2,slope:3},locale:void 0,showLabel:!0}),X6=Object.assign({},ct,{icon:"vc-icons-drawing-rectangle"}),Yc=Object.assign({},zp,{pointOpts:Object.assign({},bn,{show:!1}),drawtip:{show:!0,pixelOffset:[32,32]},editorOpts:{pixelOffset:[16,-8],delay:1e3,hideDelay:1e3,move:Object.assign({},wt),removeAll:Object.assign({},wt,{icon:"vc-icons-delete"})},edge:4,loop:!1,showAngleLabel:!1}),Y6=Object.assign({},Yc,{edge:6,loop:!0}),J6=Object.assign({},Yc,{edge:360,loop:!0,showDistanceLabel:!1,showAngleLabel:!1}),K6=Object.assign({},ct,{direction:"right",icon:"vc-icons-measurement-button",activeIcon:"vc-icons-measurement-button",verticalActionsAlign:"center",hideIcon:!1,persistent:!1,modelValue:!0,hideActionOnClick:!1,color:"info"}),Vp=["distance","component-distance","polyline","horizontal","vertical","height","area","point","rectangle","regular","circle"],e4=e=>{let t=!0;return e.forEach(i=>{Vp.includes(i)||(console.error(`VueCesium: unknown measurement type: ${i}`),t=!1)}),t},Jc={...Xc,measurements:{type:Array,default:()=>Vp,validator:e4},mainFabOpts:{type:Object,default:()=>K6},distanceActionOpts:{type:Object,default:()=>F6},distanceMeasurementOpts:{type:Object,default:()=>kp},componentDistanceActionOpts:{type:Object,default:()=>k6},componentDistanceMeasurementOpts:{type:Object,default:()=>N6},polylineActionOpts:{type:Object,default:()=>z6},polylineMeasurementOpts:{type:Object,default:()=>Np},horizontalActionOpts:{type:Object,default:()=>V6},horizontalMeasurementOpts:{type:Object,default:()=>$6},verticalActionOpts:{type:Object,default:()=>G6},verticalMeasurementOpts:{type:Object,default:()=>U6},heightActionOpts:{type:Object,default:()=>H6},heightMeasurementOpts:{type:Object,default:()=>W6},areaActionOpts:{type:Object,default:()=>q6},areaMeasurementOpts:{type:Object,default:()=>zp},pointActionOpts:{type:Object,default:()=>Z6},pointMeasurementOpts:{type:Object,default:()=>Q6},rectangleActionOpts:{type:Object,default:()=>X6},rectangleMeasurementOpts:{type:Object,default:()=>Yc},regularActionOpts:{type:Object,default:()=>jp},regularMeasurementOpts:{type:Object,default:()=>Y6},circleActionOpts:{type:Object,default:()=>Fp},circleMeasurementOpts:{type:Object,default:()=>J6}},rt=vi(Jc),$p={...Tn,...Yn,...Ae,autoHidden:{type:Boolean,default:!0},customClass:String,teleport:Object},t4={...Ce,mouseenter:e=>!0,mouseleave:e=>!0,click:e=>!0};var Gp=te({name:"VcOverlayHtml",props:$p,emits:t4,setup(e,t){const i=re();i.cesiumClass="VcOverlayHtml",i.cesiumEvents=[];const n=Be(e,t,i);if(n===void 0)return;const{$services:r}=n,a=ie(!1),o=ie(null),s=Pe({}),l=ie(null),c=ie(null),u=ie(null);let d=[];d.push(fe(()=>e.position,T=>{c.value=Qe(T,r.viewer.scene.globe.ellipsoid)})),d.push(fe(()=>e.pixelOffset,T=>{l.value=mt(T)})),d.push(fe(()=>e.show,T=>{s.display=T?"block":"none"})),i.createCesiumObject=async()=>oe(o),i.mount=async()=>{const{viewer:T}=r;return a.value=!0,M(),l.value=mt(e.pixelOffset),c.value=Qe(e.position,T.scene.globe.ellipsoid),T.scene.preRender.addEventListener(m),!0},i.unmount=async()=>{const{viewer:T}=r;return T.scene.preRender.removeEventListener(m),a.value=!1,g(),!0};const m=()=>{const{viewer:T}=r;if(c.value){const A=T.scene.cartesianToCanvasCoordinates(c.value,{});if(Cesium.defined(A)&&!Cesium.Cartesian2.equals(u.value,A))if(s.left=A.x+l.value.x+"px",s.top=A.y+l.value.y+"px",e.autoHidden){const R=T.camera.position,I=T.scene.globe.ellipsoid.cartesianToCartographic(R);if(Cesium.defined(I)){let j=I.height;j+=1*T.scene.globe.ellipsoid.maximumRadius,Cesium.Cartesian3.distance(R,c.value)>j||!e.show?s.display="none":s.display="block"}}else s.display="block";u.value=A}};ot(()=>{d.forEach(T=>T()),d=[]});const f=()=>a.value?P("div",{ref:o,class:`vc-html-container${e.customClass?" "+e.customClass:""}`,style:s,onMouseenter:C,onMouseleave:b,onClick:v},Ke(t.slots.default)):ne("v-if"),v=T=>{t.emit("click",T)},C=T=>{t.emit("mouseenter",T)},b=T=>{t.emit("mouseleave",T)},_=()=>f(),{showPortal:M,hidePortal:g,renderPortal:E}=Sm(i,o,_);return e.teleport&&e.teleport.to&&!e.teleport.disabled?E:()=>f()}}),Up={exports:{}};(function(e){(function(t,i,n){e.exports?e.exports=n():i[t]=n()})("h337",pn,function(){var t={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:{}},i=function(){var c=function(m){this._coordinator={},this._data=[],this._radi=[],this._min=10,this._max=1,this._xField=m.xField||m.defaultXField,this._yField=m.yField||m.defaultYField,this._valueField=m.valueField||m.defaultValueField,m.radius&&(this._cfgRadius=m.radius)},u=t.defaultRadius;return c.prototype={_organiseData:function(d,m){var f=d[this._xField],v=d[this._yField],C=this._radi,b=this._data,_=this._max,M=this._min,g=d[this._valueField]||1,E=d.radius||this._cfgRadius||u;b[f]||(b[f]=[],C[f]=[]),b[f][v]?b[f][v]+=g:(b[f][v]=g,C[f][v]=E);var T=b[f][v];return T>_?(m?this.setDataMax(T):this._max=T,!1):T<M?(m?this.setDataMin(T):this._min=T,!1):{x:f,y:v,value:g,radius:E,min:M,max:_}},_unOrganizeData:function(){var d=[],m=this._data,f=this._radi;for(var v in m)for(var C in m[v])d.push({x:v,y:C,radius:f[v][C],value:m[v][C]});return{min:this._min,max:this._max,data:d}},_onExtremaChange:function(){this._coordinator.emit("extremachange",{min:this._min,max:this._max})},addData:function(){if(arguments[0].length>0)for(var d=arguments[0],m=d.length;m--;)this.addData.call(this,d[m]);else{var f=this._organiseData(arguments[0],!0);f&&(this._data.length===0&&(this._min=this._max=f.value),this._coordinator.emit("renderpartial",{min:this._min,max:this._max,data:[f]}))}return this},setData:function(d){var m=d.data,f=m.length;this._data=[],this._radi=[];for(var v=0;v<f;v++)this._organiseData(m[v],!1);return this._max=d.max,this._min=d.min||0,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},removeData:function(){},setDataMax:function(d){return this._max=d,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},setDataMin:function(d){return this._min=d,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},setCoordinator:function(d){this._coordinator=d},_getInternalData:function(){return{max:this._max,min:this._min,data:this._data,radi:this._radi}},getData:function(){return this._unOrganizeData()}},c}(),n=function(){var c=function(f){var v=f.gradient||f.defaultGradient,C=document.createElement("canvas"),b=C.getContext("2d");C.width=256,C.height=1;var _=b.createLinearGradient(0,0,256,1);for(var M in v)_.addColorStop(M,v[M]);return b.fillStyle=_,b.fillRect(0,0,256,1),b.getImageData(0,0,256,1).data},u=function(f,v){var C=document.createElement("canvas"),b=C.getContext("2d"),_=f,M=f;if(C.width=C.height=f*2,v==1)b.beginPath(),b.arc(_,M,f,0,2*Math.PI,!1),b.fillStyle="rgba(0,0,0,1)",b.fill();else{var g=b.createRadialGradient(_,M,f*v,_,M,f);g.addColorStop(0,"rgba(0,0,0,1)"),g.addColorStop(1,"rgba(0,0,0,0)"),b.fillStyle=g,b.fillRect(0,0,2*f,2*f)}return C},d=function(M){for(var v=[],C=M.min,b=M.max,_=M.radi,M=M.data,g=Object.keys(M),E=g.length;E--;)for(var T=g[E],A=Object.keys(M[T]),R=A.length;R--;){var I=A[R],j=M[T][I],W=_[T][I];v.push({x:T,y:I,value:j,radius:W})}return{min:C,max:b,data:v}};function m(f){var v=f.container,C=this.shadowCanvas=document.createElement("canvas"),b=this.canvas=f.canvas||document.createElement("canvas");this._renderBoundaries=[1e4,1e4,0,0];var _=getComputedStyle(f.container)||{};b.className="heatmap-canvas",this._width=b.width=C.width=f.width||+_.width.replace(/px/,""),this._height=b.height=C.height=f.height||+_.height.replace(/px/,""),this.shadowCtx=C.getContext("2d"),this.ctx=b.getContext("2d"),b.style.cssText=C.style.cssText="position:absolute;left:0;top:0;",v.style.position="relative",v.appendChild(b),this._palette=c(f),this._templates={},this._setStyles(f)}return m.prototype={renderPartial:function(f){f.data.length>0&&(this._drawAlpha(f),this._colorize())},renderAll:function(f){this._clear(),f.data.length>0&&(this._drawAlpha(d(f)),this._colorize())},_updateGradient:function(f){this._palette=c(f)},updateConfig:function(f){f.gradient&&this._updateGradient(f),this._setStyles(f)},setDimensions:function(f,v){this._width=f,this._height=v,this.canvas.width=this.shadowCanvas.width=f,this.canvas.height=this.shadowCanvas.height=v},_clear:function(){this.shadowCtx.clearRect(0,0,this._width,this._height),this.ctx.clearRect(0,0,this._width,this._height)},_setStyles:function(f){this._blur=f.blur==0?0:f.blur||f.defaultBlur,f.backgroundColor&&(this.canvas.style.backgroundColor=f.backgroundColor),this._width=this.canvas.width=this.shadowCanvas.width=f.width||this._width,this._height=this.canvas.height=this.shadowCanvas.height=f.height||this._height,this._opacity=(f.opacity||0)*255,this._maxOpacity=(f.maxOpacity||f.defaultMaxOpacity)*255,this._minOpacity=(f.minOpacity||f.defaultMinOpacity)*255,this._useGradientOpacity=!!f.useGradientOpacity},_drawAlpha:function(b){for(var v=this._min=b.min,C=this._max=b.max,b=b.data||[],_=b.length,M=1-this._blur;_--;){var g=b[_],E=g.x,T=g.y,A=g.radius,R=Math.min(g.value,C),I=E-A,j=T-A,W=this.shadowCtx,$;this._templates[A]?$=this._templates[A]:this._templates[A]=$=u(A,M);var k=(R-v)/(C-v);W.globalAlpha=k<.01?.01:k,W.drawImage($,I,j),I<this._renderBoundaries[0]&&(this._renderBoundaries[0]=I),j<this._renderBoundaries[1]&&(this._renderBoundaries[1]=j),I+2*A>this._renderBoundaries[2]&&(this._renderBoundaries[2]=I+2*A),j+2*A>this._renderBoundaries[3]&&(this._renderBoundaries[3]=j+2*A)}},_colorize:function(){var f=this._renderBoundaries[0],v=this._renderBoundaries[1],C=this._renderBoundaries[2]-f,b=this._renderBoundaries[3]-v,_=this._width,M=this._height,g=this._opacity,E=this._maxOpacity,T=this._minOpacity,A=this._useGradientOpacity;f<0&&(f=0),v<0&&(v=0),f+C>_&&(C=_-f),v+b>M&&(b=M-v);for(var R=this.shadowCtx.getImageData(f,v,C,b),I=R.data,j=I.length,W=this._palette,$=3;$<j;$+=4){var k=I[$],h=k*4;if(!!h){var p;g>0?p=g:k<E?k<T?p=T:p=k:p=E,I[$-3]=W[h],I[$-2]=W[h+1],I[$-1]=W[h+2],I[$]=A?W[h+3]:p}}this.ctx.putImageData(R,f,v),this._renderBoundaries=[1e3,1e3,0,0]},getValueAt:function(f){var v,C=this.shadowCtx,b=C.getImageData(f.x,f.y,1,1),_=b.data[3],M=this._max,g=this._min;return v=Math.abs(M-g)*(_/255)>>0,v},getDataURL:function(){return this.canvas.toDataURL()}},m}(),r=function(){var c=!1;return t.defaultRenderer==="canvas2d"&&(c=n),c}(),a={merge:function(){for(var l={},c=arguments.length,u=0;u<c;u++){var d=arguments[u];for(var m in d)l[m]=d[m]}return l}},o=function(){var c=function(){function f(){this.cStore={}}return f.prototype={on:function(v,C,b){var _=this.cStore;_[v]||(_[v]=[]),_[v].push(function(M){return C.call(b,M)})},emit:function(v,C){var b=this.cStore;if(b[v])for(var _=b[v].length,M=0;M<_;M++){var g=b[v][M];g(C)}}},f}(),u=function(m){var f=m._renderer,v=m._coordinator,C=m._store;v.on("renderpartial",f.renderPartial,f),v.on("renderall",f.renderAll,f),v.on("extremachange",function(b){m._config.onExtremaChange&&m._config.onExtremaChange({min:b.min,max:b.max,gradient:m._config.gradient||m._config.defaultGradient})}),C.setCoordinator(v)};function d(){var m=this._config=a.merge(t,arguments[0]||{});if(this._coordinator=new c,m.plugin){var f=m.plugin;if(t.plugins[f]){var v=t.plugins[f];this._renderer=new v.renderer(m),this._store=new v.store(m)}else throw new Error("Plugin '"+f+"' not found. Maybe it was not registered.")}else this._renderer=new r(m),this._store=new i(m);u(this)}return d.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(m){return this._config=a.merge(this._config,m),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(m){return this._store.getValueAt?this._store.getValueAt(m):this._renderer.getValueAt?this._renderer.getValueAt(m):null}},d}(),s={create:function(l){return new o(l)},register:function(l,c){t.plugins[l]=c}};return s})})(Up);var i4=Up.exports;const Hp={id:String,name:String,availability:Object,...Ae,description:[String,Object],...Tn,orientation:Object,...Ch,parent:Object,billboard:Object,box:Object,corridor:Object,cylinder:Object,ellipse:Object,ellipsoid:Object,label:Object,model:Object,tileset:Object,path:Object,plane:Object,point:Object,polygon:Object,polyline:Object,properties:Object,polylineVolume:Object,rectangle:Object,wall:Object,...et},n4={...Ce,...no,definitionChanged:e=>!0,"update:billboard":e=>!0,"update:box":e=>!0,"update:corridor":e=>!0,"update:cylinder":e=>!0,"update:ellipse":e=>!0,"update:ellipsoid":e=>!0,"update:label":e=>!0,"update:model":e=>!0,"update:path":e=>!0,"update:plane":e=>!0,"update:point":e=>!0,"update:polygon":e=>!0,"update:polyline":e=>!0,"update:polylineVolume":e=>!0,"update:rectangle":e=>!0,"update:tileset":e=>!0,"update:wall":e=>!0};var Qa=te({name:"VcEntity",props:Hp,emits:n4,setup(e,t){const i=re();i.cesiumClass="Entity",i.cesiumEvents=["definitionChanged"];const n=Be(e,t,i);if(n===void 0)return;const{$services:r}=n,{emit:a}=t;i.mount=async()=>{var s;const l=(s=r==null?void 0:r.entities)==null?void 0:s.add(i.cesiumObject);return r==null?void 0:r.entities.contains(l)},i.unmount=async()=>{var s;return(s=r==null?void 0:r.entities)==null?void 0:s.remove(i.cesiumObject)};const o=(s,l)=>(Me(i,l)?a(l,s):i.cesiumObject&&(i.cesiumObject[l.substring(7)]=s),s&&(s._vcParent=i.cesiumObject),!0);return Object.assign(i.proxy,{__updateGraphics:o}),()=>{var s,l;return t.slots.default?P("i",{class:ae(((s=i.proxy)==null?void 0:s.$options.name)||""),style:{display:"none !important"}},Ke(t.slots.default)):ne(ae(((l=i.proxy)==null?void 0:l.$options.name)||""))}}});Qa.install=e=>{e.component(Qa.name,Qa)};const Wp=Qa;var qp=Wp;const r4=Wp;var o4={imageryProvider:Object,...St,alpha:{type:[Number,Function],default:1},nightAlpha:{type:[Number,Function],default:1},dayAlpha:{type:[Number,Function],default:1},brightness:{type:[Number,Function],default:1},contrast:{type:[Number,Function],default:1},hue:{type:[Number,Function],default:0},saturation:{type:[Number,Function],default:1},gamma:{type:[Number,Function],default:1},splitDirection:{type:[Number,Function],default:0},minificationFilter:Number,magnificationFilter:Number,...Ae,maximumAnisotropy:Number,minimumTerrainLevel:Number,maximumTerrainLevel:Number,...Ah,...Dh,colorToAlphaThreshold:{type:Number,default:.004},sortOrder:Number};const a4={...Ce,"update:imageryProvider":e=>!0},Zp=o4;var Xa=te({name:"VcLayerImagery",props:Zp,emits:a4,setup(e,t){const i=re();i.cesiumClass="ImageryLayer",i.cesiumEvents=[];const n=Be(e,t,i);if(n===void 0)return;const{$services:r}=n,{emit:a}=t;i.createCesiumObject=async()=>{const s=n.transformProps(e),l=e.imageryProvider||{};return new Cesium.ImageryLayer(l,s)},i.mount=async()=>{const{viewer:s}=r,l=i.cesiumObject;return l.sortOrder=e.sortOrder,s.imageryLayers.add(l),!s.isDestroyed()&&s.imageryLayers.contains(l)},i.unmount=async()=>{const{viewer:s}=r,l=i.cesiumObject;return!s.isDestroyed()&&s.imageryLayers.remove(l)};const o=s=>{var l;if(ci(s))return(l=i.unmount)==null?void 0:l.call(i);{const c=i.cesiumObject;c._imageryProvider=s,Me(i,"update:imageryProvider")&&a("update:imageryProvider",s)}return!0};return Object.assign(i.proxy,{__updateProvider:o}),()=>{var s,l;return t.slots.default?P("i",{class:ae(((s=i.proxy)==null?void 0:s.$options.name)||""),style:{display:"none !important"}},Ke(t.slots.default)):ne(ae(((l=i.proxy)==null?void 0:l.$options.name)||"v-if"))}}});Xa.install=e=>{e.component(Xa.name,Xa)};const Qp=Xa;var Xp=Qp;const s4=Qp,Yp={...Qr,...ir,...Ae,...va,...Zr,...Xr,...qr,...jn,...Fn,...Si,...Di,...pa,...et};var Jp=te({name:"VcPrimitiveClassification",props:Yp,emits:mn,setup(e,t){var i;const n=re();n.cesiumClass="ClassificationPrimitive",dn(e,t,n);const r=((i=n.proxy)==null?void 0:i.$options.name)||"";return()=>t.slots.default?P("i",{class:ae(r),style:{display:"none !important"}},Ke(t.slots.default)):ne(ae(r))}});const Kp={...Qr,...ir,...Ae,...va,...Zr,...Xr,...qr,...jn,...Fn,...Si,...Di,...pa,...et};var ev=te({name:"VcPrimitiveGround",props:Kp,emits:mn,setup(e,t){var i;const n=re();n.cesiumClass="GroundPrimitive",dn(e,t,n);const r=((i=n.proxy)==null?void 0:i.$options.name)||"";return()=>t.slots.default?P("i",{class:ae(r),style:{display:"none !important"}},Ke(t.slots.default)):ne(ae(r))}});const tv={...Qr,...ir,...Ae,...Zr,...Xr,...qr,...jn,...Fn,...Si,...Di,...pa,...et};var iv=te({name:"VcPrimitiveGroundPolyline",props:tv,emits:mn,setup(e,t){var i;const n=re();n.cesiumClass="GroundPolylinePrimitive",dn(e,t,n);const r=((i=n.proxy)==null?void 0:i.$options.name)||"";return()=>t.slots.default?P("i",{class:ae(r),style:{display:"none !important"}},Ke(t.slots.default)):ne(ae(r))}});const nv={...Ti,basePath:String,...Ae,...Bi,...Dn,...nl,...rl,...cn,...jn,...ol,...Fn,...al,...Vt,...Di,...Pl,...Wt,...Yr,...lt,...Wi,...cl,...ul,...sl,...ll,...ca,dequantizeInShader:{type:Boolean,default:!0},...la,...dl,...Dl,...Il,...Rl,...Et,...Ll,showOutline:{type:Boolean,default:!0},...et};var rv=te({name:"VcPrimitiveModel",props:nv,emits:mn,setup(e,t){const i=re();i.cesiumClass="Model";const n=dn(e,t,i);return i.createCesiumObject=async()=>{const r=n==null?void 0:n.transformProps(e);return Cesium.Model.fromGltf(r)},()=>{var r;return ne(ae(((r=i.proxy)==null?void 0:r.$options.name)||""))}}});const ov={...Qr,...ir,...El,...Ae,...Bi,...va,...Zr,...Xr,...qr,...jn,cull:{type:Boolean,default:!0},...Fn,...Di,...Vt,...et};var av=te({name:"VcPrimitive",props:ov,emits:mn,setup(e,t){var i;const n=re();n.cesiumClass="Primitive",dn(e,t,n);const r=((i=n.proxy)==null?void 0:i.$options.name)||"";return()=>{var a;return t.slots.default?P("i",{class:ae(r),style:{display:"none !important"}},Ke(t.slots.default)):ne(ae(((a=n.proxy)==null?void 0:a.$options.name)||""))}}});const l4={...mn,allTilesLoaded:()=>!0,initialTilesLoaded:()=>!0,loadProgress:(e,t)=>!0,tileFailed:(e,t)=>!0,tileLoad:e=>!0,tileUnload:e=>!0,tileVisible:e=>!0},sv={url:[String,Object],...Ae,...Bi,...Vt,...pl,maximumMemoryUsage:{type:Number,default:512},cullWithChildrenBounds:{type:Boolean,default:!0},cullRequestsWhileMoving:{type:Boolean,default:!0},cullRequestsWhileMovingMultiplier:{type:Number,default:60},preloadWhenHidden:{type:Boolean,default:!1},preloadFlightDestinations:{type:Boolean,default:!0},preferLeaves:{type:Boolean,default:!1},dynamicScreenSpaceError:{type:Boolean,default:!1},dynamicScreenSpaceErrorDensity:{type:Number,default:.00278},dynamicScreenSpaceErrorFactor:{type:Number,default:4},dynamicScreenSpaceErrorHeightFalloff:{type:Number,default:.25},progressiveResolutionHeightFraction:{type:Number,default:.3},foveatedScreenSpaceError:{type:Boolean,default:!0},foveatedConeSize:{type:Number,default:.1},foveatedMinimumScreenSpaceErrorRelaxation:{type:Number,default:0},foveatedInterpolationCallback:Function,foveatedTimeDelay:{type:Number,default:.2},skipLevelOfDetail:{type:Boolean,default:!1},baseScreenSpaceError:{type:Number,default:1024},skipScreenSpaceErrorFactor:{type:Number,default:16},skipLevels:{type:Number,default:1},immediatelyLoadDesiredLevelOfDetail:{type:Boolean,default:!1},loadSiblings:{type:Boolean,default:!1},...ca,...Si,...Re,pointCloudShading:Object,...la,...Fh,...Dl,...Il,...Rl,...Ll,showOutline:{type:Boolean,default:!0},vectorClassificationOnly:{type:Boolean,default:!1},vectorKeepDecodedPositions:{type:Boolean,default:!1},featureIdIndex:{type:Number,default:0},instanceFeatureIdIndex:{type:Number,default:0},showCreditsOnScreen:{type:Boolean,default:!1},debugHeatmapTilePropertyName:String,debugFreezeFrame:{type:Boolean,default:!1},debugColorizeTiles:{type:Boolean,default:!1},...Pl,...Di,debugShowContentBoundingVolume:{type:Boolean,default:!1},debugShowViewerRequestVolume:{type:Boolean,default:!1},debugShowGeometricError:{type:Boolean,default:!1},debugShowRenderingStatistics:{type:Boolean,default:!1},debugShowMemoryUsage:{type:Boolean,default:!1},debugShowUrl:{type:Boolean,default:!1},...et,enableModelExperimental:{type:Boolean,default:!1},customShader:{type:Object},properties:{type:Array},fragmentShader:String,replaceFS:Boolean};var lv=te({name:"VcPrimitiveTileset",props:sv,emits:l4,setup(e,t){const i=re();i.cesiumClass="Cesium3DTileset",i.cesiumEvents=["allTilesLoaded","initialTilesLoaded","loadProgress","tileFailed","tileLoad","tileUnload","tileVisible"],dn(e,t,i),i.proxy.creatingPromise.then(r=>{const a=r.cesiumObject;i.removeCallbacks.push(a.tileVisible.addEventListener(n))});const n=r=>{const a=r.content,o=a._model;for(let s=0;s<a.featuresLength;s++){const l=a.getFeature(s);e.properties&&e.properties.length&&e.properties.forEach(c=>{l.hasProperty(c.key)&&l.getProperty(c.key)===c.keyValue&&l.setProperty(c.propertyName,c.propertyValue)})}e.fragmentShader&&o&&o._sourcePrograms&&o._rendererResources&&(Object.keys(o._sourcePrograms).forEach(s=>{const l=o._sourcePrograms[s],c=o._rendererResources.sourceShaders;if(e.replaceFS)c[l.fragmentShader]=e.fragmentShader;else{const u=c[l.fragmentShader];c[l.fragmentShader]=u.replace(`gl_FragColor = vec4(color, 1.0);
}`,`gl_FragColor = vec4(color, 1.0);
${e.fragmentShader}
}
`)}}),o._shouldRegenerateShaders=!0)};return()=>{var r;return ne(ae(((r=i.proxy)==null?void 0:r.$options.name)||""))}}});const c4={...mn,complete:e=>!0},cv={...Ae,updateCallback:Function,emitter:Object,...Bi,emitterModelMatrix:Object,emissionRate:{type:Number,default:5},bursts:Array,loop:{type:Boolean,default:!0},scale:{type:Number,default:1},startScale:Number,endScale:Number,...Wi,...Ih,...Rh,...Wo,...jh,...Lh,...Bh,...qo,speed:{type:Number,default:1},minimumSpeed:Number,maximumSpeed:Number,lifetime:{type:Number,default:Number.MAX_VALUE},particleLife:{type:Number,default:5},minimumParticleLife:Number,maximumParticleLife:Number,mass:{type:Number,default:1},minimumMass:Number,maximumMass:Number,...et};var uv=te({name:"VcPrimitiveParticle",props:cv,emits:c4,setup(e,t){const i=re();return i.cesiumClass="ParticleSystem",i.cesiumEvents=["complete"],dn(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||""))}}}),u4=`
uniform sampler2D colorTexture;
uniform vec4 u_color1;
uniform vec4 u_color2;
uniform float u_isShed;
uniform sampler2D shadowMap_depthTexture;
uniform mat4 shadowMap_matrix;
uniform vec4 shadowMap_lightPositionEC;
uniform vec3 shadowMap_lightDirectionEC;
uniform float u_radius;
uniform vec4 shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness;
uniform vec4 shadowMap_texelSizeDepthBiasAndNormalShadingSmooth;
uniform float czzj;
uniform float dis;
uniform float spzj;
uniform float mixNum;
uniform vec3 shadowMap_lightUp;
uniform vec3 shadowMap_lightDir;
uniform vec3 shadowMap_lightRight;
varying vec2 v_textureCoordinates;
vec4 toEye(in vec2 uv, in float depth){
vec2 xy = vec2((uv.x * 2.0 - 1.0),(uv.y * 2.0 - 1.0));
vec4 posInCamera = czm_inverseProjection * vec4(xy, depth, 1.0);
posInCamera =posInCamera / posInCamera.w;
return posInCamera;
}
float getDepth(in vec4 depth){
float z_window = czm_unpackDepth(depth);
z_window = czm_reverseLogDepth(z_window);
float n_range = czm_depthRange.near;
float f_range = czm_depthRange.far;
return (2.0 * z_window - n_range - f_range) / (f_range - n_range);
}
float _czm_sampleShadowMap(sampler2D shadowMap, vec2 uv){
return texture2D(shadowMap, uv).r;
}
float _czm_shadowDepthCompare(sampler2D shadowMap, vec2 uv, float depth){
return step(depth, _czm_sampleShadowMap(shadowMap, uv));
}
float _czm_shadowVisibility(sampler2D shadowMap, czm_shadowParameters shadowParameters){
float depthBias = shadowParameters.depthBias;
float depth = shadowParameters.depth;
float nDotL = shadowParameters.nDotL;
float normalShadingSmooth = shadowParameters.normalShadingSmooth;
float darkness = shadowParameters.darkness;
vec2 uv = shadowParameters.texCoords;
depth -= depthBias;
vec2 texelStepSize = shadowParameters.texelStepSize;
float radius = 1.0;
float dx0 = -texelStepSize.x * radius;
float dy0 = -texelStepSize.y * radius;
float dx1 = texelStepSize.x * radius;
float dy1 = texelStepSize.y * radius;
float visibility =
(
_czm_shadowDepthCompare(shadowMap, uv, depth)
+_czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy0), depth) +
_czm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy0), depth) +
_czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy0), depth) +
_czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, 0.0), depth) +
_czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, 0.0), depth) +
_czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy1), depth) +
_czm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy1), depth) +
_czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy1), depth)
) * (1.0 / 9.0)
;
return visibility;
}
vec3 pointProjectOnPlane(in vec3 planeNormal, in vec3 planeOrigin, in vec3 point){
vec3 v01 = point -planeOrigin;
float d = dot(planeNormal, v01) ;
return (point - planeNormal * d);
}
float ptm(vec3 pt){
return sqrt(pt.x*pt.x + pt.y*pt.y + pt.z*pt.z);
}
void main()
{
const float PI = 3.141592653589793;
vec4 color = texture2D(colorTexture, v_textureCoordinates);
gl_FragColor = color;
if ( u_isShed < 0.5 )
return;
vec4 currD = texture2D(czm_globeDepthTexture, v_textureCoordinates);
if( currD.r >= 1.0 )
return;
float depth = getDepth(currD);
vec4 positionEC = toEye(v_textureCoordinates, depth);
vec3 normalEC = vec3(1.0);
czm_shadowParameters shadowParameters;
shadowParameters.texelStepSize = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.xy;
shadowParameters.depthBias = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.z;
shadowParameters.normalShadingSmooth = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.w;
shadowParameters.darkness = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.w;
shadowParameters.depthBias *= max(depth * 0.01, 1.0);
vec3 directionEC = normalize(positionEC.xyz - shadowMap_lightPositionEC.xyz);
float nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0);
vec4 shadowPosition = shadowMap_matrix * positionEC;
shadowPosition /= shadowPosition.w;
if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0))))
return;
vec4 lw = czm_inverseView* vec4(shadowMap_lightPositionEC.xyz, 1.0);
vec4 vw = czm_inverseView* vec4(positionEC.xyz, 1.0);
if(distance(lw.xyz,vw.xyz)> u_radius)
return;
shadowParameters.texCoords = shadowPosition.xy;
shadowParameters.depth = shadowPosition.z;
shadowParameters.nDotL = nDotL;
float visibility = _czm_shadowVisibility(shadowMap_depthTexture, shadowParameters);
if(visibility > 0.3 ){
gl_FragColor = mix(color,vec4(u_color1.rgb, 1.0),mixNum);
}
else{
if(abs(shadowPosition.z-0.0)<0.01){
return;
}
gl_FragColor = mix(color,vec4(u_color2.rgb, 1.0),mixNum);
}
}
`;const dv={...Yr,fovH:{type:Number,default:90},fovV:{type:Number,default:60},offsetHeight:{type:Number,default:1.8},visibleColor:{type:[Object,Array,String],default:"#00ff00"},invisibleColor:{type:[Object,Array,String],default:"#ff0000"},showGridLine:{type:Boolean,default:!0},lineColor:{type:[Object,Array,String],default:"rgba(255,255,255,0.4)"},faceColor:{type:[Object,Array,String],default:"rgba(255,255,255,0.1)"},show:{type:Boolean,default:!0},startPosition:{type:Object},endPosition:{type:Object},fragmentShader:{type:String,default:u4},uniforms:Object};var d4=te({name:"VcViewshed",props:dv,emits:Ce,setup(e,t){const i=re();i.cesiumClass="VcViewshed";const n=Be(e,t,i);if(n===void 0)return;const r=[];let a;r.push(fe([()=>e.startPosition,()=>e.endPosition],([s,l])=>{!i.mounted||o(s,l)},{deep:!0})),r.push(fe(()=>e.fovH,s=>{if(!i.mounted)return;const l=i.cesiumObject;l.fovH=s})),r.push(fe(()=>e.fovV,s=>{if(!i.mounted)return;const l=i.cesiumObject;l.fovV=s})),r.push(fe(()=>e.fovV,s=>{if(!i.mounted)return;const l=i.cesiumObject;l.fovV=s})),r.push(fe(()=>e.offsetHeight,s=>{if(!i.mounted)return;const l=i.cesiumObject;l.offsetHeight=s})),r.push(fe(()=>e.visibleColor,s=>{if(!i.mounted)return;const l=i.cesiumObject;l.visibleColor=Te(s)})),r.push(fe(()=>e.invisibleColor,s=>{if(!i.mounted)return;const l=i.cesiumObject;l.invisibleColor=Te(s)})),r.push(fe(()=>e.showGridLine,s=>{if(!i.mounted)return;const l=i.cesiumObject;l.showGridLine=s})),r.push(fe(()=>e.show,s=>{if(!i.mounted)return;const l=i.cesiumObject;l.enabled=s})),ot(()=>{r.forEach(s=>s()),r.length=0}),i.createCesiumObject=async()=>{const s=n.$services.viewer,l=new pm(s.scene,{fovH:120,fovV:60,offsetHeight:1.8,visibleColor:Te(e.visibleColor),invisibleColor:Te(e.invisibleColor),showGridLine:e.showGridLine});return l._viewshedShadowMap.cascadesEnabled=!1,l._viewshedShadowMap.softShadows=!1,l._viewshedShadowMap.normalOffset=!1,l._viewshedShadowMap.fromLightSource=!1,l._viewshedShadowMap.enabled=!1,l.fovH=Cesium.Math.toRadians(e.fovH),l.fovV=Cesium.Math.toRadians(e.fovV),l.offsetHeight=e.offsetHeight,l.showGridLine=e.showGridLine,l.enabled=e.show,l.lineColor=Te(e.lineColor),l.faceColor=Te(e.faceColor),l},i.mount=async()=>{const s=n.$services.viewer,l=i.cesiumObject,{Cartesian4:c,PostProcessStage:u,Cartesian2:d}=Cesium;o(e.startPosition,e.endPosition),a=new u({fragmentShader:e.fragmentShader,uniforms:e.uniforms||{u_color1:function(){return l.visibleColor},u_color2:function(){return l.invisibleColor},u_isShed:function(){return l.shadowMap.enabled},u_radius:function(){return l.lightCamera.frustum.far},shadowMap_depthTexture:function(){return l.shadowMap.enabled?l.shadowMap._shadowMapTexture:s.scene.context.defaultTexture},shadowMap_matrix:function(){return l.shadowMap._shadowMapMatrix},shadowMap_cascadeSplits:function(){return l.shadowMap._cascadeSplits},shadowMap_cascadeMatrices:function(){return l.shadowMap._cascadeMatrices},shadowMap_lightDirectionEC:function(){return l.shadowMap._lightDirectionEC},shadowMap_lightPositionEC:function(){return l.shadowMap._lightPositionEC},shadowMap_cascadeDistances:function(){return l.shadowMap._cascadeDistances},shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness:function(){const f=l.shadowMap._pointBias;return c.fromElements(f.normalOffsetScale,l.shadowMap._distance,l.shadowMap.maximumDistance,0,new c)},shadowMap_texelSizeDepthBiasAndNormalShadingSmooth:function(){const f=l.shadowMap._pointBias,v=new d;return v.x=1/l.shadowMap._textureSize.x,v.y=1/l.shadowMap._textureSize.y,c.fromElements(v.x,v.y,f.depthBias,f.normalShadingSmooth,new c)},czzj:function(){return l.lightCamera.frustum.fov},spzj:function(){return l.lightCamera.frustum.fov},mixNum:function(){return .5},shadowMap_lightUp:function(){return l.lightCamera.up},shadowMap_lightDir:function(){return l.lightCamera.direction},shadowMap_lightRight:function(){return l.lightCamera.right}}}),s.scene.postProcessStages.add(a);const m=n.$services.primitives;return m&&m.add(l)},i.unmount=async()=>{const s=n.$services.viewer;a&&s.scene.postProcessStages.remove(a);const l=n.$services.primitives,c=i.cesiumObject;return l&&l.remove(c)};const o=(s,l)=>{const c=i.cesiumObject,{Cartesian3:u}=Cesium;let d=u.subtract(l,s,new u);const m=u.magnitudeSquared(d),f=u.distance(l,s);if(m<.01||c.frustum.near>f)c.enabled=!1;else{c.enabled=!0,d=u.normalize(d,d);const v=u.normalize(l,new u);c.setView({destination:s,orientation:{direction:d,up:v}}),c.frustum.far=Math.max(f,1.1)}};return()=>{var s;return ne(ae(((s=i.proxy)==null?void 0:s.$options.name)||""))}}});const h4=[Jp,ev,iv,rv,av,lv,uv];h4.forEach(e=>{e.install=t=>{t.component(e.name,e)}});const Kc=Jp,eu=ev,Ya=iv,hv=rv,Un=av,mv=lv,fv=uv,pv=d4,vv={...Ae,...St,min:{type:Number,default:0},max:{type:Number,default:100},data:Array,options:Object,type:{type:String,default:"primitive"},segments:{type:Array,default:()=>[]},projection:{type:String,default:"3857"}};var gv=te({name:"VcOverlayHeatmap",props:vv,emits:Ce,setup(e,t){var i;const n=re();n.cesiumClass="VcOverlayHeatmap",n.cesiumEvents=[];const r=Be(e,t,n);if(r===void 0)return;const a=ie(null),o=ie(null),s={minCanvasSize:700,maxCanvasSize:2e3,radiusFactor:60,spacingFactor:1.5,maxOpacity:.8,minOpacity:.1,blur:.85,gradient:{".3":"blue",".65":"yellow",".8":"orange",".95":"red"},xField:"x",yField:"y",valueField:"value",container:void 0},l=ie(null),c=ie(null),u=ie(null),d=ie(null),m=ie(null),f=ie(!1),v=ie(null);(i=xt(n).proxy.creatingPromise)==null||i.then(()=>{f.value=!0});const b=ye(()=>Object.assign({},s,e.options));let _=[];_.push(fe(()=>u,T=>{c.value.fabric.uniforms.image=T.value,m.value.options.material.fabric.uniforms.image=T.value},{deep:!0})),_.push(fe(()=>e.data,(T,A)=>{if(!n.mounted)return;const R=n.cesiumObject;Array.isArray(T)&&Array.isArray(A)?(E(T,R),u.value=R.getDataURL()):r.reload()},{deep:!0})),_.push(fe(()=>[e.max,e.min],T=>{const A=n.cesiumObject;A.setDataMax(T[0]||0),A.setDataMin(T[1]||0),u.value=A.getDataURL()})),_.push(fe(()=>[e.type,e.projection,e.rectangle],T=>{r.reload()})),_.push(fe(()=>e.options,T=>{const A=n.cesiumObject;A.configure(T),u.value=A.getDataURL()},{deep:!0})),n.createCesiumObject=async()=>{const{WebMercatorProjection:T,GeographicProjection:A}=Cesium;o.value=e.projection==="3857"?new T:new A;const R=M();v.value=g(e.rectangle);const I=document.createElement("div");if(Cesium.defined(R)&&I.setAttribute("id",R),I.setAttribute("style","width: "+v.value.width+"px; height: "+v.value.height+"px; margin: 0px; display: none;"),document.body.appendChild(I),b.value.container=I,e.segments.length){b.value.gradient={};const W=e.max-e.min;for(let $=0;$<e.segments.length;$++)b.value.gradient[`${(e.segments[$][0]-e.min)/W}`]=Te(e.segments[$][1]).toCssColorString()}const j=i4.create(b.value);return I.children[0].setAttribute("id",R+"-hm"),Array.isArray(e.data)&&(E(e.data,j),c.value={fabric:{type:"Image",uniforms:{image:u.value,transparent:!0}}},m.value={type:"MaterialAppearance",options:{material:{fabric:{type:"Image",uniforms:{image:u.value}}}}}),j},n.unmount=async()=>(document.body.removeChild(n.cesiumObject._config.container),!0);const M=T=>{let A="";const R="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let I=0;I<(T||8);I++)A+=R.charAt(Math.floor(Math.random()*R.length));return A},g=T=>{const A=Sn(T),R=o.value.project(new Cesium.Cartographic(A.west,A.south)),I=o.value.project(new Cesium.Cartographic(A.east,A.north)),j={north:I.y,east:I.x,south:R.y,west:R.x};let W=j.east>0&&j.west<0?j.east+Math.abs(j.west):Math.abs(j.east-j.west),$=j.north>0&&j.south<0?j.north+Math.abs(j.south):Math.abs(j.north-j.south),k=1;W>$&&W>b.value.maxCanvasSize?(k=W/b.value.maxCanvasSize,$/k<b.value.minCanvasSize&&(k=$/b.value.minCanvasSize)):$>W&&$>b.value.maxCanvasSize?(k=$/b.value.maxCanvasSize,$/k<b.value.minCanvasSize&&(k=W/b.value.minCanvasSize)):W<$&&W<b.value.minCanvasSize?(k=W/b.value.minCanvasSize,$/k>b.value.maxCanvasSize&&(k=$/b.value.maxCanvasSize)):$<W&&$<b.value.minCanvasSize&&(k=$/b.value.minCanvasSize,W/k>b.value.maxCanvasSize&&(k=W/b.value.maxCanvasSize)),W=W/k,$=$/k,Cesium.defined(b.value.radius)||(b.value.radius=W>$?W/b.value.radiusFactor:$/b.value.radiusFactor);const h=(b.value.radius||1)*b.value.spacingFactor,p=j.west,y=j.south;W=Math.round(W+h*2),$=Math.round($+h*2),j.west-=h*k,j.east+=h*k,j.south-=h*k,j.north+=h*k;const O=o.value.unproject(new Cesium.Cartesian3(j.west,j.south)),x=o.value.unproject(new Cesium.Cartesian3(j.east,j.north)),w={north:Cesium.Math.toDegrees(x.latitude),east:Cesium.Math.toDegrees(x.longitude),south:Cesium.Math.toDegrees(O.latitude),west:Cesium.Math.toDegrees(O.longitude)};return l.value=w,{height:$,width:W,factor:k,xoffset:p,yoffset:y,spacing:h}},E=(T,A)=>{if(console.log("setData"),T){const{height:R,xoffset:I,yoffset:j,factor:W,spacing:$}=v.value,k=b.value.xField||"x",h=b.value.yField||"y",p=b.value.valueField||"value",y=[];for(let O=0;O<T.length;O++){const x=T[O];Cesium.defined(x.id)||(x.id=O);const w=o.value.project(Cesium.Cartographic.fromDegrees(x[k],x[h])),D={[k]:Math.round((w.x-I)/W+$),[h]:Math.round((w.y-j)/W+$),[p]:void 0};D[h]=R-D[h],(x[p]||x[p]===0)&&(D[p]=x[p]),!(D[p]>e.max||D[p]<e.min)&&y.push(D)}A.setData({min:e.min,max:e.max,data:y}),u.value=A.getDataURL()}};return ot(()=>{_.forEach(T=>T()),_=[]}),Object.assign(n.proxy,{rootRef:a,childRef:d}),()=>{if(f.value){const T=[];return e.type==="entity"&&u.value?T.push(P(qp,{ref:d,show:e.show,rectangle:{coordinates:l.value,material:c.value}})):e.type==="primitive"?T.push(P(eu,{ref:d,show:e.show,appearance:m.value,releaseGeometryInstances:!1,geometryInstances:new Cesium.GeometryInstance({geometry:new Cesium.RectangleGeometry({rectangle:Sn(l.value)})})})):e.type==="imagery-layer"&&u.value&&T.push(P(Xp,{ref:d,show:e.show,imageryProvider:new Cesium.SingleTileImageryProvider({url:u.value,rectangle:Sn(l.value)})})),P("i",{ref:a,class:"vc-overlay-heatmap",style:"display: none !important"},T)}else return ne("v-if")}}});function yv(){const e=Cesium.GeometryAttributes;return new Cesium.Geometry({attributes:new e({position:new Cesium.GeometryAttribute({componentDatatype:Cesium.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:new Float32Array([-1,-1,0,1,-1,0,1,1,0,-1,1,0])}),st:new Cesium.GeometryAttribute({componentDatatype:Cesium.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:new Float32Array([0,0,1,0,1,1,0,1])})}),indices:new Uint32Array([3,2,0,0,2,1])})}function mi(e,t){if(Cesium.defined(t)){const n={};n.arrayBufferView=t,e.source=n}return new Cesium.Texture(e)}function tu(e,t,i){return new Cesium.Framebuffer({context:e,colorTextures:[t],depthTexture:i})}function iu(e){const n={viewport:e.viewport,depthTest:e.depthTest,depthMask:e.depthMask,blending:e.blending};return Cesium.Appearance.getDefaultRenderState(!0,!1,n)}function m4(e){const t={},i=Cesium.Math.mod(e.west,Cesium.Math.TWO_PI),n=Cesium.Math.mod(e.east,Cesium.Math.TWO_PI),r=e.width;let a,o;r>Cesium.Math.THREE_PI_OVER_TWO?(a=0,o=Cesium.Math.TWO_PI):n-i<r?(a=i,o=i+r):(a=i,o=n),t.lon={min:Cesium.Math.toDegrees(a),max:Cesium.Math.toDegrees(o)};const s=e.south,l=e.north,c=e.height,u=c>Cesium.Math.PI/12?c/2:0;let d=Cesium.Math.clampToLatitudeRange(s-u),m=Cesium.Math.clampToLatitudeRange(l+u);return d<-Cesium.Math.PI_OVER_THREE&&(d=-Cesium.Math.PI_OVER_TWO),m>Cesium.Math.PI_OVER_THREE&&(m=Cesium.Math.PI_OVER_TWO),t.lat={min:Cesium.Math.toDegrees(d),max:Cesium.Math.toDegrees(m)},t}var f4=`
// the size of UV textures: width = lon, height = lat*lev
uniform sampler2D U; // eastward wind
uniform sampler2D V; // northward wind
uniform sampler2D currentParticlesPosition; // (lon, lat, lev)
uniform vec3 dimension; // (lon, lat, lev)
uniform vec3 minimum; // minimum of each dimension
uniform vec3 maximum; // maximum of each dimension
uniform vec3 interval; // interval of each dimension
// used to calculate the wind norm
uniform vec2 uSpeedRange; // (min, max);
uniform vec2 vSpeedRange;
uniform float pixelSize;
uniform float speedFactor;
float speedScaleFactor = speedFactor * pixelSize;
varying vec2 v_textureCoordinates;
vec2 mapPositionToNormalizedIndex2D(vec3 lonLatLev) {
// ensure the range of longitude and latitude
lonLatLev.x = mod(lonLatLev.x, 360.0);
lonLatLev.y = clamp(lonLatLev.y, -90.0, 90.0);
vec3 index3D = vec3(0.0);
index3D.x = (lonLatLev.x - minimum.x) / interval.x;
index3D.y = (lonLatLev.y - minimum.y) / interval.y;
index3D.z = (lonLatLev.z - minimum.z) / interval.z;
// the st texture coordinate corresponding to (col, row) index
// example
// data array is [0, 1, 2, 3, 4, 5], width = 3, height = 2
// the content of texture will be
// t 1.0
// | 3 4 5
// |
// | 0 1 2
// 0.0------1.0 s
vec2 index2D = vec2(index3D.x, index3D.z * dimension.y + index3D.y);
vec2 normalizedIndex2D = vec2(index2D.x / dimension.x, index2D.y / (dimension.y * dimension.z));
return normalizedIndex2D;
}
float getWindComponent(sampler2D componentTexture, vec3 lonLatLev) {
vec2 normalizedIndex2D = mapPositionToNormalizedIndex2D(lonLatLev);
float result = texture2D(componentTexture, normalizedIndex2D).r;
return result;
}
float interpolateTexture(sampler2D componentTexture, vec3 lonLatLev) {
float lon = lonLatLev.x;
float lat = lonLatLev.y;
float lev = lonLatLev.z;
float lon0 = floor(lon / interval.x) * interval.x;
float lon1 = lon0 + 1.0 * interval.x;
float lat0 = floor(lat / interval.y) * interval.y;
float lat1 = lat0 + 1.0 * interval.y;
float lon0_lat0 = getWindComponent(componentTexture, vec3(lon0, lat0, lev));
float lon1_lat0 = getWindComponent(componentTexture, vec3(lon1, lat0, lev));
float lon0_lat1 = getWindComponent(componentTexture, vec3(lon0, lat1, lev));
float lon1_lat1 = getWindComponent(componentTexture, vec3(lon1, lat1, lev));
float lon_lat0 = mix(lon0_lat0, lon1_lat0, lon - lon0);
float lon_lat1 = mix(lon0_lat1, lon1_lat1, lon - lon0);
float lon_lat = mix(lon_lat0, lon_lat1, lat - lat0);
return lon_lat;
}
vec3 linearInterpolation(vec3 lonLatLev) {
// https://en.wikipedia.org/wiki/Bilinear_interpolation
float u = interpolateTexture(U, lonLatLev);
float v = interpolateTexture(V, lonLatLev);
float w = 0.0;
return vec3(u, v, w);
}
vec2 lengthOfLonLat(vec3 lonLatLev) {
// unit conversion: meters -> longitude latitude degrees
// see https://en.wikipedia.org/wiki/Geographic_coordinate_system#Length_of_a_degree for detail
// Calculate the length of a degree of latitude and longitude in meters
float latitude = radians(lonLatLev.y);
float term1 = 111132.92;
float term2 = 559.82 * cos(2.0 * latitude);
float term3 = 1.175 * cos(4.0 * latitude);
float term4 = 0.0023 * cos(6.0 * latitude);
float latLength = term1 - term2 + term3 - term4;
float term5 = 111412.84 * cos(latitude);
float term6 = 93.5 * cos(3.0 * latitude);
float term7 = 0.118 * cos(5.0 * latitude);
float longLength = term5 - term6 + term7;
return vec2(longLength, latLength);
}
vec3 convertSpeedUnitToLonLat(vec3 lonLatLev, vec3 speed) {
vec2 lonLatLength = lengthOfLonLat(lonLatLev);
float u = speed.x / lonLatLength.x;
float v = speed.y / lonLatLength.y;
float w = 0.0;
vec3 windVectorInLonLatLev = vec3(u, v, w);
return windVectorInLonLatLev;
}
vec3 calculateSpeedByRungeKutta2(vec3 lonLatLev) {
// see https://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods#Second-order_methods_with_two_stages for detail
const float h = 0.5;
vec3 y_n = lonLatLev;
vec3 f_n = linearInterpolation(lonLatLev);
vec3 midpoint = y_n + 0.5 * h * convertSpeedUnitToLonLat(y_n, f_n) * speedScaleFactor;
vec3 speed = h * linearInterpolation(midpoint) * speedScaleFactor;
return speed;
}
float calculateWindNorm(vec3 speed) {
vec3 percent = vec3(0.0);
percent.x = (speed.x - uSpeedRange.x) / (uSpeedRange.y - uSpeedRange.x);
percent.y = (speed.y - vSpeedRange.x) / (vSpeedRange.y - vSpeedRange.x);
float norm = length(percent);
return norm;
}
void main() {
// texture coordinate must be normalized
vec3 lonLatLev = texture2D(currentParticlesPosition, v_textureCoordinates).rgb;
vec3 speed = calculateSpeedByRungeKutta2(lonLatLev);
vec3 speedInLonLat = convertSpeedUnitToLonLat(lonLatLev, speed);
vec4 particleSpeed = vec4(speedInLonLat, calculateWindNorm(speed / speedScaleFactor));
gl_FragColor = particleSpeed;
}
`;const p4=`
uniform sampler2D currentParticlesPosition; // (lon, lat, lev)
uniform sampler2D particlesSpeed; // (u, v, w, norm) Unit converted to degrees of longitude and latitude
varying vec2 v_textureCoordinates;
void main() {
// texture coordinate must be normalized
vec3 lonLatLev = texture2D(currentParticlesPosition, v_textureCoordinates).rgb;
vec3 speed = texture2D(particlesSpeed, v_textureCoordinates).rgb;
vec3 nextParticle = lonLatLev + speed;
gl_FragColor = vec4(nextParticle, 0.0);
}
`;var v4=p4;const g4=`
uniform sampler2D nextParticlesPosition;
uniform sampler2D particlesSpeed; // (u, v, w, norm)
// range (min, max)
uniform vec2 lonRange;
uniform vec2 latRange;
uniform float randomCoefficient; // use to improve the pseudo-random generator
uniform float dropRate; // drop rate is a chance a particle will restart at random position to avoid degeneration
uniform float dropRateBump;
varying vec2 v_textureCoordinates;
// pseudo-random generator
const vec3 randomConstants = vec3(12.9898, 78.233, 4375.85453);
const vec2 normalRange = vec2(0.0, 1.0);
float rand(vec2 seed, vec2 range) {
vec2 randomSeed = randomCoefficient * seed;
float temp = dot(randomConstants.xy, randomSeed);
temp = fract(sin(temp) * (randomConstants.z + temp));
return temp * (range.y - range.x) + range.x;
}
vec3 generateRandomParticle(vec2 seed, float lev) {
// ensure the longitude is in [0, 360]
float randomLon = mod(rand(seed, lonRange), 360.0);
float randomLat = rand(-seed, latRange);
return vec3(randomLon, randomLat, lev);
}
bool particleOutbound(vec3 particle) {
return particle.y < -90.0 || particle.y > 90.0;
}
void main() {
vec3 nextParticle = texture2D(nextParticlesPosition, v_textureCoordinates).rgb;
vec4 nextSpeed = texture2D(particlesSpeed, v_textureCoordinates);
float speedNorm = nextSpeed.a;
float particleDropRate = dropRate + dropRateBump * speedNorm;
vec2 seed1 = nextParticle.xy + v_textureCoordinates;
vec2 seed2 = nextSpeed.xy + v_textureCoordinates;
vec3 randomParticle = generateRandomParticle(seed1, nextParticle.z);
float randomNumber = rand(seed2, normalRange);
if (randomNumber < particleDropRate || particleOutbound(nextParticle)) {
gl_FragColor = vec4(randomParticle, 1.0); // 1.0 means this is a random particle
} else {
gl_FragColor = vec4(nextParticle, 0.0);
}
}
`;var y4=g4;class b4{constructor(t){this.commandType=t.commandType,this.geometry=t.geometry,this.attributeLocations=t.attributeLocations,this.primitiveType=t.primitiveType,this.uniformMap=t.uniformMap,this.vertexShaderSource=t.vertexShaderSource,this.fragmentShaderSource=t.fragmentShaderSource,this.rawRenderState=t.rawRenderState,this.framebuffer=t.framebuffer,this.outputTexture=t.outputTexture,this.autoClear=Cesium.defaultValue(t.autoClear,!1),this.preExecute=t.preExecute,this.show=!0,this.commandToExecute=void 0,this.clearCommand=void 0,this.autoClear&&(this.clearCommand=new Cesium.ClearCommand({color:new Cesium.Color(0,0,0,0),depth:1,framebuffer:this.framebuffer,pass:Cesium.Pass.OPAQUE}))}createCommand(t){switch(this.commandType){case"Draw":{const i=Cesium.VertexArray.fromGeometry({context:t,geometry:this.geometry,attributeLocations:this.attributeLocations,bufferUsage:Cesium.BufferUsage.STATIC_DRAW}),n=Cesium.ShaderProgram.fromCache({context:t,attributeLocations:this.attributeLocations,vertexShaderSource:this.vertexShaderSource,fragmentShaderSource:this.fragmentShaderSource}),r=Cesium.RenderState.fromCache(this.rawRenderState);return new Cesium.DrawCommand({owner:this,vertexArray:i,primitiveType:this.primitiveType,uniformMap:this.uniformMap,modelMatrix:Cesium.Matrix4.IDENTITY,shaderProgram:n,framebuffer:this.framebuffer,renderState:r,pass:Cesium.Pass.OPAQUE})}case"Compute":return new Cesium.ComputeCommand({owner:this,fragmentShaderSource:this.fragmentShaderSource,uniformMap:this.uniformMap,outputTexture:this.outputTexture,persists:!0})}}setGeometry(t,i){this.geometry=i;const n=Cesium.VertexArray.fromGeometry({context:t,geometry:this.geometry,attributeLocations:this.attributeLocations,bufferUsage:Cesium.BufferUsage.STATIC_DRAW});this.commandToExecute.vertexArray=n}update(t){!this.show||(Cesium.defined(this.commandToExecute)||(this.commandToExecute=this.createCommand(t.context)),Cesium.defined(this.preExecute)&&this.preExecute(),Cesium.defined(this.clearCommand)&&t.commandList.push(this.clearCommand),t.commandList.push(this.commandToExecute))}isDestroyed(){return!1}destroy(){return Cesium.defined(this.commandToExecute)&&(this.commandToExecute.shaderProgram=this.commandToExecute.shaderProgram&&this.commandToExecute.shaderProgram.destroy()),Cesium.destroyObject(this)}}var _r=b4;class C4{constructor(t,i,n,r){this.data=i,this.createWindTextures(t,i),this.createParticlesTextures(t,n,r),this.createComputingPrimitives(i,n,r)}createWindTextures(t,i){const n={context:t,width:i.dimensions.lon,height:i.dimensions.lat*i.dimensions.lev,pixelFormat:Cesium.PixelFormat.LUMINANCE,pixelDatatype:Cesium.PixelDatatype.FLOAT,flipY:!1,sampler:new Cesium.Sampler({minificationFilter:Cesium.TextureMinificationFilter.NEAREST,magnificationFilter:Cesium.TextureMagnificationFilter.NEAREST})};this.windTextures={U:mi(n,i.U.array),V:mi(n,i.V.array)}}createParticlesTextures(t,i,n){const r={context:t,width:i.particlesTextureSize,height:i.particlesTextureSize,pixelFormat:Cesium.PixelFormat.RGBA,pixelDatatype:Cesium.PixelDatatype.FLOAT,flipY:!1,sampler:new Cesium.Sampler({minificationFilter:Cesium.TextureMinificationFilter.NEAREST,magnificationFilter:Cesium.TextureMagnificationFilter.NEAREST})},a=this.randomizeParticles(i.maxParticles,n),o=new Float32Array(4*i.maxParticles).fill(0);this.particlesTextures={previousParticlesPosition:mi(r,a),currentParticlesPosition:mi(r,a),nextParticlesPosition:mi(r,a),postProcessingPosition:mi(r,a),particlesSpeed:mi(r,o)}}randomizeParticles(t,i){const n=new Float32Array(4*t);for(let r=0;r<t;r++)n[4*r]=Cesium.Math.randomBetween(i.lonRange.x,i.lonRange.y),n[4*r+1]=Cesium.Math.randomBetween(i.latRange.x,i.latRange.y),n[4*r+2]=Cesium.Math.randomBetween(this.data.lev.min,this.data.lev.max),n[4*r+3]=0;return n}destroyParticlesTextures(){Object.keys(this.particlesTextures).forEach(t=>{this.particlesTextures[t].destroy()})}createComputingPrimitives(t,i,n){const r=new Cesium.Cartesian3(t.dimensions.lon,t.dimensions.lat,t.dimensions.lev),a=new Cesium.Cartesian3(t.lon.min,t.lat.min,t.lev.min),o=new Cesium.Cartesian3(t.lon.max,t.lat.max,t.lev.max),s=new Cesium.Cartesian3((o.x-a.x)/(r.x-1),(o.y-a.y)/(r.y-1),r.z>1?(o.z-a.z)/(r.z-1):1),l=new Cesium.Cartesian2(t.U.min,t.U.max),c=new Cesium.Cartesian2(t.V.min,t.V.max),u=this;this.primitives={calculateSpeed:new _r({commandType:"Compute",uniformMap:{U:function(){return u.windTextures.U},V:function(){return u.windTextures.V},currentParticlesPosition:function(){return u.particlesTextures.currentParticlesPosition},dimension:function(){return r},minimum:function(){return a},maximum:function(){return o},interval:function(){return s},uSpeedRange:function(){return l},vSpeedRange:function(){return c},pixelSize:function(){return n.pixelSize},speedFactor:function(){return i.speedFactor}},fragmentShaderSource:new Cesium.ShaderSource({sources:[f4]}),outputTexture:this.particlesTextures.particlesSpeed,preExecute:function(){const d=u.particlesTextures.previousParticlesPosition;u.particlesTextures.previousParticlesPosition=u.particlesTextures.currentParticlesPosition,u.particlesTextures.currentParticlesPosition=u.particlesTextures.postProcessingPosition,u.particlesTextures.postProcessingPosition=d,u.primitives.calculateSpeed.commandToExecute.outputTexture=u.particlesTextures.particlesSpeed}}),updatePosition:new _r({commandType:"Compute",uniformMap:{currentParticlesPosition:function(){return u.particlesTextures.currentParticlesPosition},particlesSpeed:function(){return u.particlesTextures.particlesSpeed}},fragmentShaderSource:new Cesium.ShaderSource({sources:[v4]}),outputTexture:this.particlesTextures.nextParticlesPosition,preExecute:function(){u.primitives.updatePosition.commandToExecute.outputTexture=u.particlesTextures.nextParticlesPosition}}),postProcessingPosition:new _r({commandType:"Compute",uniformMap:{nextParticlesPosition:function(){return u.particlesTextures.nextParticlesPosition},particlesSpeed:function(){return u.particlesTextures.particlesSpeed},lonRange:function(){return n.lonRange},latRange:function(){return n.latRange},randomCoefficient:function(){return Math.random()},dropRate:function(){return i.dropRate},dropRateBump:function(){return i.dropRateBump}},fragmentShaderSource:new Cesium.ShaderSource({sources:[y4]}),outputTexture:this.particlesTextures.postProcessingPosition,preExecute:function(){u.primitives.postProcessingPosition.commandToExecute.outputTexture=u.particlesTextures.postProcessingPosition}})}}}var bv=C4;const w4=`
attribute vec2 st;
// it is not normal itself, but used to control lines drawing
attribute vec3 normal; // (point to use, offset sign, not used component)
uniform sampler2D previousParticlesPosition;
uniform sampler2D currentParticlesPosition;
uniform sampler2D postProcessingPosition;
uniform float particleHeight;
uniform float aspect;
uniform float pixelSize;
uniform float lineWidth;
struct adjacentPoints {
vec4 previous;
vec4 current;
vec4 next;
};
vec3 convertCoordinate(vec3 lonLatLev) {
// WGS84 (lon, lat, lev) -> ECEF (x, y, z)
// read https://en.wikipedia.org/wiki/Geographic_coordinate_conversion#From_geodetic_to_ECEF_coordinates for detail
// WGS 84 geometric constants
float a = 6378137.0; // Semi-major axis
float b = 6356752.3142; // Semi-minor axis
float e2 = 6.69437999014e-3; // First eccentricity squared
float latitude = radians(lonLatLev.y);
float longitude = radians(lonLatLev.x);
float cosLat = cos(latitude);
float sinLat = sin(latitude);
float cosLon = cos(longitude);
float sinLon = sin(longitude);
float N_Phi = a / sqrt(1.0 - e2 * sinLat * sinLat);
float h = particleHeight; // it should be high enough otherwise the particle may not pass the terrain depth test
vec3 cartesian = vec3(0.0);
cartesian.x = (N_Phi + h) * cosLat * cosLon;
cartesian.y = (N_Phi + h) * cosLat * sinLon;
cartesian.z = ((b * b) / (a * a) * N_Phi + h) * sinLat;
return cartesian;
}
vec4 calculateProjectedCoordinate(vec3 lonLatLev) {
// the range of longitude in Cesium is [-180, 180] but the range of longitude in the NetCDF file is [0, 360]
// [0, 180] is corresponding to [0, 180] and [180, 360] is corresponding to [-180, 0]
lonLatLev.x = mod(lonLatLev.x + 180.0, 360.0) - 180.0;
vec3 particlePosition = convertCoordinate(lonLatLev);
vec4 projectedCoordinate = czm_modelViewProjection * vec4(particlePosition, 1.0);
return projectedCoordinate;
}
vec4 calculateOffsetOnNormalDirection(vec4 pointA, vec4 pointB, float offsetSign) {
vec2 aspectVec2 = vec2(aspect, 1.0);
vec2 pointA_XY = (pointA.xy / pointA.w) * aspectVec2;
vec2 pointB_XY = (pointB.xy / pointB.w) * aspectVec2;
float offsetLength = lineWidth / 2.0;
vec2 direction = normalize(pointB_XY - pointA_XY);
vec2 normalVector = vec2(-direction.y, direction.x);
normalVector.x = normalVector.x / aspect;
normalVector = offsetLength * normalVector;
vec4 offset = vec4(offsetSign * normalVector, 0.0, 0.0);
return offset;
}
vec4 calculateOffsetOnMiterDirection(adjacentPoints projectedCoordinates, float offsetSign) {
vec2 aspectVec2 = vec2(aspect, 1.0);
vec4 PointA = projectedCoordinates.previous;
vec4 PointB = projectedCoordinates.current;
vec4 PointC = projectedCoordinates.next;
vec2 pointA_XY = (PointA.xy / PointA.w) * aspectVec2;
vec2 pointB_XY = (PointB.xy / PointB.w) * aspectVec2;
vec2 pointC_XY = (PointC.xy / PointC.w) * aspectVec2;
vec2 AB = normalize(pointB_XY - pointA_XY);
vec2 BC = normalize(pointC_XY - pointB_XY);
vec2 normalA = vec2(-AB.y, AB.x);
vec2 tangent = normalize(AB + BC);
vec2 miter = vec2(-tangent.y, tangent.x);
float offsetLength = lineWidth / 2.0;
float projection = dot(miter, normalA);
vec4 offset = vec4(0.0);
// avoid to use values that are too small
if (projection > 0.1) {
float miterLength = offsetLength / projection;
offset = vec4(offsetSign * miter * miterLength, 0.0, 0.0);
offset.x = offset.x / aspect;
} else {
offset = calculateOffsetOnNormalDirection(PointB, PointC, offsetSign);
}
return offset;
}
void main() {
vec2 particleIndex = st;
vec3 previousPosition = texture2D(previousParticlesPosition, particleIndex).rgb;
vec3 currentPosition = texture2D(currentParticlesPosition, particleIndex).rgb;
vec3 nextPosition = texture2D(postProcessingPosition, particleIndex).rgb;
float isAnyRandomPointUsed = texture2D(postProcessingPosition, particleIndex).a +
texture2D(currentParticlesPosition, particleIndex).a +
texture2D(previousParticlesPosition, particleIndex).a;
adjacentPoints projectedCoordinates;
if (isAnyRandomPointUsed > 0.0) {
projectedCoordinates.previous = calculateProjectedCoordinate(previousPosition);
projectedCoordinates.current = projectedCoordinates.previous;
projectedCoordinates.next = projectedCoordinates.previous;
} else {
projectedCoordinates.previous = calculateProjectedCoordinate(previousPosition);
projectedCoordinates.current = calculateProjectedCoordinate(currentPosition);
projectedCoordinates.next = calculateProjectedCoordinate(nextPosition);
}
int pointToUse = int(normal.x);
float offsetSign = normal.y;
vec4 offset = vec4(0.0);
// render lines with triangles and miter joint
// read https://blog.scottlogic.com/2019/11/18/drawing-lines-with-webgl.html for detail
if (pointToUse == -1) {
offset = pixelSize * calculateOffsetOnNormalDirection(projectedCoordinates.previous, projectedCoordinates.current, offsetSign);
gl_Position = projectedCoordinates.previous + offset;
} else {
if (pointToUse == 0) {
offset = pixelSize * calculateOffsetOnMiterDirection(projectedCoordinates, offsetSign);
gl_Position = projectedCoordinates.current + offset;
} else {
if (pointToUse == 1) {
offset = pixelSize * calculateOffsetOnNormalDirection(projectedCoordinates.current, projectedCoordinates.next, offsetSign);
gl_Position = projectedCoordinates.next + offset;
} else {
}
}
}
}
`;var _4=w4;const x4=`
void main() {
const vec4 white = vec4(1.0);
gl_FragColor = white;
}
`;var E4=x4;const O4=`
attribute vec3 position;
attribute vec2 st;
varying vec2 textureCoordinate;
void main() {
textureCoordinate = st;
gl_Position = vec4(position, 1.0);
}
`;var Cv=O4;const P4=`
uniform sampler2D segmentsColorTexture;
uniform sampler2D segmentsDepthTexture;
uniform sampler2D currentTrailsColor;
uniform sampler2D trailsDepthTexture;
uniform float fadeOpacity;
varying vec2 textureCoordinate;
void main() {
vec4 pointsColor = texture2D(segmentsColorTexture, textureCoordinate);
vec4 trailsColor = texture2D(currentTrailsColor, textureCoordinate);
trailsColor = floor(fadeOpacity * 255.0 * trailsColor) / 255.0; // make sure the trailsColor will be strictly decreased
float pointsDepth = texture2D(segmentsDepthTexture, textureCoordinate).r;
float trailsDepth = texture2D(trailsDepthTexture, textureCoordinate).r;
float globeDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, textureCoordinate));
gl_FragColor = vec4(0.0);
if (pointsDepth < globeDepth) {
gl_FragColor = gl_FragColor + pointsColor;
}
if (trailsDepth < globeDepth) {
gl_FragColor = gl_FragColor + trailsColor;
}
gl_FragDepthEXT = min(pointsDepth, trailsDepth);
}
`;var M4=P4;const S4=`
uniform sampler2D trailsColorTexture;
uniform sampler2D trailsDepthTexture;
varying vec2 textureCoordinate;
void main() {
vec4 trailsColor = texture2D(trailsColorTexture, textureCoordinate);
float trailsDepth = texture2D(trailsDepthTexture, textureCoordinate).r;
float globeDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, textureCoordinate));
if (trailsDepth < globeDepth) {
gl_FragColor = trailsColor;
} else {
gl_FragColor = vec4(0.0);
}
}
`;var T4=S4;class A4{constructor(t,i,n,r,a){this.createRenderingTextures(t,i),this.createRenderingFramebuffers(t),this.createRenderingPrimitives(t,n,r,a)}createRenderingTextures(t,i){const n={context:t,width:t.drawingBufferWidth,height:t.drawingBufferHeight,pixelFormat:Cesium.PixelFormat.RGBA,pixelDatatype:Cesium.PixelDatatype.UNSIGNED_BYTE},r={context:t,width:t.drawingBufferWidth,height:t.drawingBufferHeight,pixelFormat:Cesium.PixelFormat.DEPTH_COMPONENT,pixelDatatype:Cesium.PixelDatatype.UNSIGNED_INT};this.textures={segmentsColor:mi(n),segmentsDepth:mi(r),currentTrailsColor:mi(n),currentTrailsDepth:mi(r),nextTrailsColor:mi(n),nextTrailsDepth:mi(r)}}createRenderingFramebuffers(t){this.framebuffers={segments:tu(t,this.textures.segmentsColor,this.textures.segmentsDepth),currentTrails:tu(t,this.textures.currentTrailsColor,this.textures.currentTrailsDepth),nextTrails:tu(t,this.textures.nextTrailsColor,this.textures.nextTrailsDepth)}}createSegmentsGeometry(t){const n=[];for(let f=0;f<t.particlesTextureSize;f++)for(let v=0;v<t.particlesTextureSize;v++)for(let C=0;C<6;C++)n.push(f/t.particlesTextureSize),n.push(v/t.particlesTextureSize);const r=new Float32Array(n),a=[],o=[-1,0,1],s=[-1,1];for(let f=0;f<t.maxParticles;f++)for(let v=0;v<o.length;v++)for(let C=0;C<s.length;C++)a.push(o[v]),a.push(s[C]),a.push(0);const l=new Float32Array(a),c=12*t.maxParticles,u=new Uint32Array(c);for(let f=0,v=0,C=0;f<t.maxParticles;f++)u[v++]=C+0,u[v++]=C+1,u[v++]=C+2,u[v++]=C+2,u[v++]=C+1,u[v++]=C+3,u[v++]=C+2,u[v++]=C+4,u[v++]=C+3,u[v++]=C+4,u[v++]=C+3,u[v++]=C+5,C+=6;const d=Cesium.GeometryAttributes;return new Cesium.Geometry({attributes:new d({st:new Cesium.GeometryAttribute({componentDatatype:Cesium.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:r}),normal:new Cesium.GeometryAttribute({componentDatatype:Cesium.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:l})}),indices:u})}createRenderingPrimitives(t,i,n,r){const a=this;this.primitives={segments:new _r({commandType:"Draw",attributeLocations:{st:0,normal:1},geometry:this.createSegmentsGeometry(i),primitiveType:Cesium.PrimitiveType.TRIANGLES,uniformMap:{previousParticlesPosition:function(){return r.particlesTextures.previousParticlesPosition},currentParticlesPosition:function(){return r.particlesTextures.currentParticlesPosition},postProcessingPosition:function(){return r.particlesTextures.postProcessingPosition},aspect:function(){return t.drawingBufferWidth/t.drawingBufferHeight},pixelSize:function(){return n.pixelSize},lineWidth:function(){return i.lineWidth},particleHeight:function(){return i.particleHeight}},vertexShaderSource:new Cesium.ShaderSource({sources:[_4]}),fragmentShaderSource:new Cesium.ShaderSource({sources:[E4]}),rawRenderState:iu({viewport:void 0,depthTest:{enabled:!0},depthMask:!0}),framebuffer:this.framebuffers.segments,autoClear:!0}),trails:new _r({commandType:"Draw",attributeLocations:{position:0,st:1},geometry:yv(),primitiveType:Cesium.PrimitiveType.TRIANGLES,uniformMap:{segmentsColorTexture:function(){return a.textures.segmentsColor},segmentsDepthTexture:function(){return a.textures.segmentsDepth},currentTrailsColor:function(){return a.framebuffers.currentTrails.getColorTexture(0)},trailsDepthTexture:function(){return a.framebuffers.currentTrails.depthTexture},fadeOpacity:function(){return i.fadeOpacity}},vertexShaderSource:new Cesium.ShaderSource({defines:["DISABLE_GL_POSITION_LOG_DEPTH"],sources:[Cv]}),fragmentShaderSource:new Cesium.ShaderSource({defines:["DISABLE_LOG_DEPTH_FRAGMENT_WRITE"],sources:[M4]}),rawRenderState:iu({viewport:void 0,depthTest:{enabled:!0,func:Cesium.DepthFunction.ALWAYS},depthMask:!0}),framebuffer:this.framebuffers.nextTrails,autoClear:!0,preExecute:function(){const o=a.framebuffers.currentTrails;a.framebuffers.currentTrails=a.framebuffers.nextTrails,a.framebuffers.nextTrails=o,a.primitives.trails.commandToExecute.framebuffer=a.framebuffers.nextTrails,a.primitives.trails.clearCommand.framebuffer=a.framebuffers.nextTrails}}),screen:new _r({commandType:"Draw",attributeLocations:{position:0,st:1},geometry:yv(),primitiveType:Cesium.PrimitiveType.TRIANGLES,uniformMap:{trailsColorTexture:function(){return a.framebuffers.nextTrails.getColorTexture(0)},trailsDepthTexture:function(){return a.framebuffers.nextTrails.depthTexture}},vertexShaderSource:new Cesium.ShaderSource({defines:["DISABLE_GL_POSITION_LOG_DEPTH"],sources:[Cv]}),fragmentShaderSource:new Cesium.ShaderSource({defines:["DISABLE_LOG_DEPTH_FRAGMENT_WRITE"],sources:[T4]}),rawRenderState:iu({viewport:void 0,depthTest:{enabled:!1},depthMask:!0,blending:{enabled:!0}}),framebuffer:void 0})}}}var wv=A4;class D4{constructor(t,i,n,r){this.context=t,this.data=i,this.particleSystemOptions=n,this.viewerParameters=r,this.particlesComputing=new bv(this.context,this.data,this.particleSystemOptions,this.viewerParameters),this.particlesRendering=new wv(this.context,this.data,this.particleSystemOptions,this.viewerParameters,this.particlesComputing)}canvasResize(t){this.particlesComputing.destroyParticlesTextures(),Object.keys(this.particlesComputing.windTextures).forEach(i=>{this.particlesComputing.windTextures[i].destroy()}),Object.keys(this.particlesRendering.framebuffers).forEach(i=>{this.particlesRendering.framebuffers[i].destroy()}),this.context=t,this.particlesComputing=new bv(this.context,this.data,this.particleSystemOptions,this.viewerParameters),this.particlesRendering=new wv(this.context,this.data,this.particleSystemOptions,this.viewerParameters,this.particlesComputing)}clearFramebuffers(){const t=new Cesium.ClearCommand({color:new Cesium.Color(0,0,0,0),depth:1,framebuffer:void 0,pass:Cesium.Pass.OPAQUE});Object.keys(this.particlesRendering.framebuffers).forEach(i=>{t.framebuffer=this.particlesRendering.framebuffers[i],t.execute(this.context)})}refreshParticles(t){if(this.clearFramebuffers(),this.particlesComputing.destroyParticlesTextures(),this.particlesComputing.createParticlesTextures(this.context,this.particleSystemOptions,this.viewerParameters),t){const i=this.particlesRendering.createSegmentsGeometry(this.particleSystemOptions);this.particlesRendering.primitives.segments.geometry=i;const n=Cesium.VertexArray.fromGeometry({context:this.context,geometry:i,attributeLocations:this.particlesRendering.primitives.segments.attributeLocations,bufferUsage:Cesium.BufferUsage.STATIC_DRAW});this.particlesRendering.primitives.segments.commandToExecute.vertexArray=n}}applyParticleSystemOptions(t){let i=!1;this.particleSystemOptions.maxParticles!==t.maxParticles&&(i=!0),Object.keys(t).forEach(n=>{this.particleSystemOptions[n]=t[n]}),this.refreshParticles(i)}applyViewerParameters(t){Object.keys(t).forEach(i=>{this.viewerParameters[i]=t[i]}),this.refreshParticles(!1)}}var I4=D4;const R4=Math.PI,L4=2*R4,Ja=L4/360;function _v(e,t){const i=e-t*Math.floor(e/t);return i===t?0:i}function Ka(e){return typeof e=="string"&&e.indexOf("/")>=0&&(e=e.split("/")),PP(e)&&e.length===2?e[0]/e[1]:+e}function B4(e,t){const i=Math.floor(e.size),n=Math.floor(t.size),r=i*n,a=Ka(e.delta),o=Ka(t.delta),s=Ka(e.start),l=Ka(t.start),c=s+a*(i-1),u=l+o*(n-1);(s-a/2)*Ja,(c+a/2)*Ja,(l-o/2)*Ja,(u+o/2)*Ja;const d=Math.floor(i*a)>=360;function m(){return{width:i,height:n}}function f(){return d}function v(_,M){for(let g=M||0;g<r;g++){const E=g%i,T=Math.floor(g/i),A=s+E*a,R=l+T*o;if(_(A,R,g))return g+1}return NaN}function C(_,M){if(_===_&&M===M){const g=_v(_-s,360)/a,E=(M-l)/o,T=Math.round(g),A=Math.round(E);if(0<=A&&A<n&&0<=T&&(T<i||T===i&&d)){const R=A*i+T;return T===i?R-i:R}}return NaN}function b(_,M){if(_===_&&M===M){const g=_v(_-s,360)/a,E=(M-l)/o,T=Math.floor(g),A=Math.floor(E),R=T+1,I=A+1,j=g-T,W=E-A;if(0<=A&&I<n&&0<=T&&(R<i||R===i&&d)){const $=A*i+T;let k=$+1;const h=$+i;let p=h+1;return R===i&&(k-=i,p-=i),[$,k,h,p,j,W]}}return[NaN,NaN,NaN,NaN,NaN,NaN]}return{dimensions:m,isCylindrical:f,forEach:v,closest:C,closest4:b}}const xv={show:{type:Boolean,default:!0},data:{type:Object,required:!0},options:{type:Object,default:()=>({maxParticles:64*64,particleHeight:100,fadeOpacity:.996,dropRate:.003,dropRateBump:.01,speedFactor:1,lineWidth:4})},viewerParameters:Object};var Ev=te({name:"VcOverlayWindmap",props:xv,emits:Ce,setup(e,t){const i=re();i.cesiumClass="VcOverlayHtml",i.cesiumEvents=[];const n=Be(e,t,i);if(n===void 0)return;const{$services:r}=n;let a,o,s,l;const c=ye(()=>{const E=Math.ceil(Math.sqrt(e.options.maxParticles)),T=E*E;return{particlesTextureSize:E,maxParticles:T,particleHeight:e.options.particleHeight,fadeOpacity:e.options.fadeOpacity,dropRate:e.options.dropRate,dropRateBump:e.options.dropRateBump,speedFactor:e.options.speedFactor,lineWidth:e.options.lineWidth}});let u=[];u.push(fe(()=>e.show,E=>{s.show=E})),u.push(fe(()=>e.data,E=>{i.proxy.reload()})),u.push(fe(()=>c.value,E=>{const T=i.cesiumObject;!T||T.applyParticleSystemOptions(E)},{deep:!0})),u.push(fe(()=>e.viewerParameters,E=>{M(),i.cesiumObject.applyViewerParameters(a)},{deep:!0})),i.createCesiumObject=async()=>{const{viewer:E}=r;s=new Cesium.PrimitiveCollection,o=new Cesium.BoundingSphere(Cesium.Cartesian3.ZERO,.99*6378137),a={lonRange:new Cesium.Cartesian2,latRange:new Cesium.Cartesian2,pixelSize:0};const T={start:e.data.lon.array[0],delta:e.data.lon.delta,size:e.data.lon.array.length},A={start:e.data.lat.array[0],delta:e.data.lat.delta,size:e.data.lat.array.length};return l=B4(T,A),M(),new I4(E.scene.context,e.data,c.value,a)},i.mount=async()=>{const{viewer:E}=r;E.scene.primitives.add(s);const T=E.scene,A=T.camera;return d(),A.moveStart.addEventListener(f),A.moveEnd.addEventListener(v),window.addEventListener("resize",b),T.preRender.addEventListener(_),!0},i.unmount=async()=>{m();const{viewer:E}=r,T=E.scene,A=T.camera;return m(),E.scene.primitives.remove(s),A.moveStart.removeEventListener(f),A.moveEnd.removeEventListener(v),window.removeEventListener("resize",b),T.preRender.removeEventListener(_),!0};const d=()=>{const E=i.cesiumObject;s.add(E.particlesComputing.primitives.calculateSpeed),s.add(E.particlesComputing.primitives.updatePosition),s.add(E.particlesComputing.primitives.postProcessingPosition),s.add(E.particlesRendering.primitives.segments),s.add(E.particlesRendering.primitives.trails),s.add(E.particlesRendering.primitives.screen)},m=()=>{const E=i.cesiumObject;s.remove(E.particlesComputing.primitives.calculateSpeed),s.remove(E.particlesComputing.primitives.updatePosition),s.remove(E.particlesComputing.primitives.postProcessingPosition),s.remove(E.particlesRendering.primitives.segments),s.remove(E.particlesRendering.primitives.trails),s.remove(E.particlesRendering.primitives.screen)},f=()=>{s.show=!1},v=()=>{M(),i.cesiumObject.applyViewerParameters(a),s.show=!0};let C=!1;const b=()=>{C=!0,s.show=!1,s.removeAll()},_=()=>{if(C){const{viewer:E}=r,T=E.scene;i.cesiumObject.canvasResize(T.context),C=!1,d(),s.show=!0}},M=()=>{const{viewer:E}=r,T=E.scene,A=T.camera;if(Cesium.defined(e.viewerParameters)&&Cesium.defined(e.viewerParameters.latRange)&&Cesium.defined(e.viewerParameters.lonRange))a.lonRange=mt(e.viewerParameters.lonRange),a.latRange=mt(e.viewerParameters.latRange);else{const I=A.computeViewRectangle(T.globe.ellipsoid),j=m4(I);a.lonRange.x=j.lon.min,a.lonRange.y=j.lon.max,a.latRange.x=j.lat.min,a.latRange.y=j.lat.max}const R=Cesium.defined(e.viewerParameters)&&Cesium.defined(e.viewerParameters.pixelSize)?e.viewerParameters.pixelSize:A.getPixelSize(o,T.drawingBufferWidth,T.drawingBufferHeight);R>0&&(a.pixelSize=R)},g=(E,T)=>{const A=l.closest(E,T);if(Cesium.defined(A))return[e.data.U.array[A],e.data.V.array[A]]};return ot(()=>{u.forEach(E=>E()),u=[]}),Object.assign(i.proxy,{getNearestUV:g}),()=>{var E;return ne(ae(((E=i.proxy)==null?void 0:E.$options.name)||"v-if"))}}});const Ov={...Ae,name:{type:String,default:"__vc__overlay__dynamic__"},startTime:{type:[Object,String,Date]},stopTime:{type:[Object,String,Date]},currentTime:{type:[Object,String,Date]},clockRange:{type:Number,default:0},clockStep:{type:Number,default:1},shouldAnimate:{type:Boolean,default:!0},canAnimate:{type:Boolean,default:!0},multiplier:{type:Number,default:1},dynamicOverlays:{type:Array,default:()=>[]},defaultInterval:{type:Number,default:3},stopArrivedFlag:{type:String,default:"time"},positionPrecision:{type:Number,default:1e-7},timePrecision:{type:Number,default:.01}},j4={...Ce,"update:currentTime":e=>!0,"update:shouldAnimate":e=>!0,"update:canAnimate":e=>!0,"update:clockRange":e=>!0,"update:clockStep":e=>!0,"update:multiplier":e=>!0,"update:startTime":e=>!0,"update:stopTime":e=>!0,onStop:e=>!0,stopArrived:(e,t,i,n)=>!0};var Pv=te({name:"VcOverlayDynamic",props:Ov,emits:j4,setup(e,t){const i=re();i.cesiumClass="VcOverlayDynamic",i.cesiumEvents=[];const n=Be(e,t,i);if(n===void 0)return;const{$services:r}=n,a=ie([]),o=ie({}),{emit:s}=t,l=ie(null),c=ie(null);let u,d=[];d.push(fe(()=>e.show,g=>{const E=i.cesiumObject;E&&(E.show=g)})),d.push(fe(()=>e.name,g=>{const E=i.cesiumObject;E&&(E.name=g)})),d.push(fe(()=>e.startTime,g=>{const{viewer:E}=r;Cesium.defined(E)&&g&&(E.clock.startTime=ln(g))})),d.push(fe(()=>e.stopTime,g=>{const{viewer:E}=r;Cesium.defined(E)&&g&&(E.clock.stopTime=ln(g))})),d.push(fe(()=>e.currentTime,g=>{const{viewer:E}=r;Cesium.defined(E)&&g&&(E.clock.currentTime=ln(g))})),d.push(fe(()=>e.multiplier,g=>{const{viewer:E}=r;Cesium.defined(E)&&(E.clock.multiplier=g)})),d.push(fe(()=>e.clockStep,g=>{const{viewer:E}=r;Cesium.defined(E)&&(E.clock.clockStep=g)})),d.push(fe(()=>e.clockRange,g=>{const{viewer:E}=r;Cesium.defined(E)&&(E.clock.clockRange=g)})),d.push(fe(()=>e.canAnimate,g=>{const{viewer:E}=r;Cesium.defined(E)&&(E.clock.canAnimate=g)})),d.push(fe(()=>e.shouldAnimate,g=>{const{viewer:E}=r;Cesium.defined(E)&&(E.clock.shouldAnimate=g)})),d.push(fe(()=>an(e.dynamicOverlays),(g,E)=>{if(!i.mounted)return;const T=i.cesiumObject;if(g.length===E.length){const A=[];for(let R=0;R<g.length;R++){const I=g[R],j=E[R],W=($,k)=>{if($!=="nodeTransformations"&&$!=="_definitionChanged")return k};JSON.stringify(I,W)!==JSON.stringify(j,W)&&A.push({newOptions:I,oldOptions:j})}A.forEach(R=>{const I=T.entities.getById(R.oldOptions.id);if(Cesium.defined(I)){if(R.oldOptions.id===R.newOptions.id)I&&Object.keys(R.newOptions).forEach(W=>{R.oldOptions[W]!==R.newOptions[W]&&(I[W]=n.transformProp(W,R.newOptions[W]))});else if(I){T.entities.remove(I),ah(a.value,$=>$.id===I.id);const W=R.newOptions;f(T,[W])}const j=oh(a.value,W=>W.id===I.id);if(Cesium.defined(j)){const W=R.oldOptions.sampledPositions,$=R.newOptions.sampledPositions,k=Mt($,W,"id");Mt(W,$,"id").forEach(p=>{p.time&&j._sampledPosition.removeSample(p.time)}),k.forEach(p=>{p.time?j.addPosition(p.position,p.time):p.interval&&j.addPosition(p.position,p.interval||e.defaultInterval)})}}})}else{const A=Mt(g,E,"id"),R=Mt(E,g,"id"),I=[];for(let j=0;j<R.length;j++){const W=T.entities.getById(R[j].id);I.push(W)}I.forEach(j=>{T.entities.remove(j),ah(a.value,W=>W.id===j.id)}),f(T,A)}},{deep:!0})),i.createCesiumObject=async()=>new Cesium.CustomDataSource(e.name);const m=g=>{let E=Me(i,"update:currentTime");e.currentTime!==g.currentTime&&E&&s("update:currentTime",g.currentTime),E=Me(i,"update:shouldAnimate"),e.shouldAnimate!==g.shouldAnimate&&E&&s("update:shouldAnimate",g.shouldAnimate),E=Me(i,"update:canAnimate"),e.canAnimate!==g.canAnimate&&E&&s("update:canAnimate",g.canAnimate),E=Me(i,"update:clockRange"),e.clockRange!==g.clockRange&&E&&s("update:clockRange",g.clockRange),E=Me(i,"update:clockStep"),e.clockStep!==g.clockStep&&E&&s("update:clockStep",g.clockStep),E=Me(i,"update:multiplier"),e.multiplier!==g.multiplier&&E&&s("update:multiplier",g.multiplier),E=Me(i,"update:startTime"),e.startTime!==g.startTime&&E&&s("update:startTime",g.startTime),E=Me(i,"update:stopTime"),e.stopTime!==g.stopTime&&E&&s("update:stopTime",g.stopTime),v(g);const{JulianDate:T,Cartesian3:A}=Cesium;if(E=Me(i,"stopArrived"),E&&e.shouldAnimate)for(let R=0;R<a.value.length;R++){const I=a.value[R],j=I._sampledPosition.getValue(g.currentTime),W=e.dynamicOverlays[R];for(let $=0;$<W.sampledPositions.length;$++){const k=W.sampledPositions[$],h=Qe(k.position),p=ln(k.time),y=A.equalsEpsilon(j,h,e.positionPrecision),O=T.equalsEpsilon(g.currentTime,p,e.timePrecision);let x=!1;switch(e.stopArrivedFlag){case"time":x=O;break;case"position":x=y;break;case"both":x=O&&y;break;case"or":x=O||y;break}if(x){s("stopArrived",I,k,u,g);break}}}},f=(g,E)=>{for(let T=0;T<E.length;T++){const A=E[T],R=n.transformProps(A),I=new Ql(R);a.value.push(I);const j=g.entities.add(I._entity);R.sampledPositions.forEach(W=>{W.time?I.addPosition(W.position,W.time):W.interval&&(W.time=I.addPosition(W.position,W.interval||e.defaultInterval))}),A.id!==j.id&&(A.id=j.id),sn(j,R,["id"])}};i.mount=async()=>{const{viewer:g}=r,E=i.cesiumObject;return E.show=e.show,f(E,e.dynamicOverlays),g.dataSources.add(E).then(()=>{o.value.startTime=g.clock.startTime,o.value.stopTime=g.clock.stopTime,o.value.currentTime=g.clock.currentTime,o.value.multiplier=g.clock.multiplier,o.value.clockStep=g.clock.clockStep,o.value.clockRange=g.clock.clockRange,o.value.canAnimate=g.clock.canAnimate,o.value.shouldAnimate=g.clock.shouldAnimate,e.startTime&&(g.clock.startTime=ln(e.startTime)),e.stopTime&&(g.clock.stopTime=ln(e.stopTime)),e.currentTime&&(g.clock.currentTime=ln(e.currentTime)),g.clock.multiplier=e.multiplier,g.clock.clockStep=e.clockStep,g.clock.clockRange=e.clockRange,g.clock.canAnimate=!1,g.clock.shouldAnimate=e.shouldAnimate,g.clock.onTick.addEventListener(m);const T=Me(i,"onStop");return T&&g.clock.onStop.addEventListener(T),!0})},i.unmount=async()=>{const{viewer:g}=r,E=i.cesiumObject;g.dataSources.remove(E,!0),g.clock.startTime=o.value.startTime,g.clock.stopTime=o.value.stopTime,g.clock.multiplier=o.value.multiplier,g.clock.clockStep=o.value.clockStep,g.clock.clockRange=o.value.clockRange,g.clock.canAnimate=o.value.canAnimate,g.clock.shouldAnimate=o.value.shouldAnimate,a.value.length=0,g.clock.onTick.removeEventListener(m);const T=Me(i,"onStop");return T&&g.clock.onStop.removeEventListener(T),l.value&&(g.trackedEntity=void 0),!0};const v=g=>{var E,T,A,R,I,j,W,$;if(c.value&&l.value){const{viewer:k}=r;if(Cesium.JulianDate.greaterThan(g.currentTime,g.stopTime)){l.value=null;return}const h=l.value._sampledPosition.getValue(g.currentTime);let p=new Cesium.HeadingPitchRange;switch(c.value.mode){case"TP":p.heading=0,p.pitch=((T=(E=c.value)==null?void 0:E.offset)==null?void 0:T.pitch)||Cesium.Math.toRadians(-90),p.range=((R=(A=c.value)==null?void 0:A.offset)==null?void 0:R.range)||1e3;break;case"FP":{const y=Cesium.JulianDate.addSeconds(g.currentTime,.016666666666666666,new Cesium.JulianDate),O=l.value._sampledPosition.getValue(y)||h;h.equals(O)&&u?p=u:(p.heading=Cesium.Math.toRadians(gh(h,O)),p.pitch=(((j=(I=c.value)==null?void 0:I.offset)==null?void 0:j.pitch)||Cesium.Math.toRadians(-45))+yh(h,O),p.range=(($=(W=c.value)==null?void 0:W.offset)==null?void 0:$.range)||500);break}case"CUSTOM":p=Hs(c.value.offset)}u=p,k.camera.lookAt(h,p)}},C=(g,E)=>{var T;const{viewer:A}=r;if(E=E||{mode:c.value===null?"FP":"FREE"},E.mode==="FREE"){A.camera.lookAtTransform(Cesium.Matrix4.IDENTITY),l.value&&(A.trackedEntity=void 0,l.value=null,c.value=null);return}l.value=b(g),A.trackedEntity=Tr(l.value._entity),E.mode==="TRACKED"?(((T=E==null?void 0:E.viewFrom)==null?void 0:T.length)&&(A.trackedEntity.viewFrom=new Cesium.Cartesian3(E.viewFrom[0],E.viewFrom[1],E.viewFrom[2])),c.value=null):c.value=E},b=g=>g instanceof Ql?g:typeof g=="string"?oh(a.value,E=>E.id===g):typeof g=="number"?a.value[g]:a.value[0],_=(g,E)=>{const{viewer:T}=r;l.value&&(T.trackedEntity=void 0,l.value=null);let A;if(Cesium.defined(g))if(Array.isArray(g))if(g.length){const R=[];g.forEach(I=>{const j=Tr(b(I)._entity);R.push(j)}),A=R}else A=i.cesiumObject;else A=Tr(b(g)._entity);else A=i.cesiumObject;return E=E||{duration:3},Cesium.defined(E.offset)&&(E.offset=Hs(E.offset)),T.flyTo(A,E)},M=(g,E)=>{const{viewer:T}=r;l.value&&(T.trackedEntity=void 0,l.value=null);let A;if(Cesium.defined(g))if(Array.isArray(g))if(g.length){const R=[];g.forEach(I=>{const j=Tr(b(I)._entity);R.push(j)}),A=R}else A=i.cesiumObject;else A=Tr(b(g)._entity);else A=i.cesiumObject;return T.zoomTo(A,Cesium.defined(E)?Hs(E):void 0)};return ot(()=>{d.forEach(g=>g()),d=[]}),Object.assign(i.proxy,{getOverlays:()=>a.value,getOverlay:b,trackOverlay:C,zoomToOverlay:M,flyToOverlay:_}),()=>{var g;return ne(ae(((g=i.proxy)==null?void 0:g.$options.name)||""))}}});const F4=[Gp,gv,Ev,Pv];F4.forEach(e=>{e.install=t=>{t.component(e.name,e)}});const Cn=Gp,Mv=gv,Sv=Ev,Tv=Pv,Av={...Yr,...ga,...Ae,...et,...Bi,...Di,billboards:{type:Array,default:()=>[]}};var Dv=te({name:"VcCollectionBillboard",props:Av,emits:wi,setup(e,t){const i=re();i.cesiumClass="BillboardCollection";const n=zn(e,t,i);let r=[];r.push(fe(()=>an(e.billboards),(o,s)=>{if(!i.mounted)return;const l=i.cesiumObject;if(o.length===s.length){const c=[];for(let u=0;u<o.length;u++){const d=o[u],m=s[u];JSON.stringify(d)!==JSON.stringify(m)&&c.push({newOptions:d,oldOptions:m})}c.forEach(u=>{const d=l._billboards.find(m=>m.id===u.oldOptions.id);d&&Object.keys(u.newOptions).forEach(m=>{u.oldOptions[m]!==u.newOptions[m]&&(d[m]=n==null?void 0:n.transformProp(m,u.newOptions[m]))})})}else{const c=Mt(o,s,"id"),u=Mt(s,o,"id"),d=[];for(let m=0;m<u.length;m++){const f=l._billboards.find(v=>v.id===u[m].id);f&&d.push(f)}d.forEach(m=>{l.remove(m)}),a(l,c)}},{deep:!0})),i.alreadyListening.push("billboards");const a=(o,s)=>{for(let l=0;l<s.length;l++){const c=s[l];c.id=Cesium.defined(c.id)?c.id:Cesium.createGuid();const u=n==null?void 0:n.transformProps(c),d=o.add(u);sn(d,u)}};return i.createCesiumObject=async()=>{const o=n==null?void 0:n.transformProps(e),s=new Cesium.BillboardCollection(o);return a(s,e.billboards),s},ot(()=>{r.forEach(o=>o()),r=[]}),()=>{var o,s;return t.slots.default?P("i",{class:ae(((o=i.proxy)==null?void 0:o.$options.name)||""),style:{display:"none !important"}},Ke(t.slots.default)):ne(ae(((s=i.proxy)==null?void 0:s.$options.name)||""))}}});const Iv={...Zs,...Wi,...An,...lt,...zr,...Lt,...Wt,...Vr,...cn,...Wo,...Yn,...$r,...Tn,...qi,...Dn,...In,...Ae,...qo,...Rn,...Gr,...Oi,...et};var Rv=te({name:"VcBillboard",props:Iv,emits:wi,setup(e,t){const i=re();return i.cesiumClass="Billboard",Nn(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const Lv={brightness:{type:Number,default:1},...Wi,maximumSize:{type:Object,watcherOptions:{cesiumObjectBuilder:Qe}},...Tn,scale:{type:Object,watcherOptions:{cesiumObjectBuilder:mt}},...Ae,slice:{type:Number,default:-1}};var es=te({name:"VcCumulusCloud",props:Lv,emits:wi,setup(e,t){const i=re();return i.cesiumClass="CumulusCloud",Nn(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const Bv={...Ae,noiseDetail:{type:Number,default:16},noiseOffset:{type:Object},debugBillboards:{type:Boolean,default:!1},debugEllipsoids:{type:Boolean,default:!1},clouds:{type:Array,default:()=>[]}};var jv=te({name:"VcCollectionCloud",props:Bv,emits:Ce,setup(e,t){var i;const n=re();n.cesiumClass="CloudCollection";const r=zn(e,t,n);if(r===void 0)return;n.alreadyListening.push("clouds");let a=[];a.push(fe(()=>an(e.clouds),(l,c)=>{if(!n.mounted)return;const u=n.cesiumObject;if(l.length===c.length){const d=[];for(let m=0;m<l.length;m++){const f=l[m],v=c[m];JSON.stringify(f)!==JSON.stringify(v)&&d.push({newOptions:f,oldOptions:v})}d.forEach(m=>{const f=u._clouds.find(v=>v.id===m.oldOptions.id);f&&Object.keys(m.newOptions).forEach(v=>{m.oldOptions[v]!==m.newOptions[v]&&(f[v]=r.transformProp(v,m.newOptions[v]))})})}else{const d=Mt(l,c,"id"),m=Mt(c,l,"id"),f=[];for(let v=0;v<m.length;v++){const C=u._clouds.find(b=>b.id===m[v].id);C&&f.push(C)}f.forEach(v=>{u.remove(v)}),o(u,d)}},{deep:!0}));const o=(l,c)=>{for(let u=0;u<c.length;u++){const d=c[u];d.id=Cesium.defined(d.id)?d.id:Cesium.createGuid();const m=r.transformProps(d,es.props),f=l.add(m);sn(f,m)}};n.createCesiumObject=async()=>{const l=r.transformProps(e,es.props),c=new Cesium.CloudCollection(l);return o(c,e.clouds),c},ot(()=>{a.forEach(l=>l()),a=[]});const s=((i=n.proxy)==null?void 0:i.$options.name)||"";return()=>t.slots.default?P("i",{class:ae(s),style:{display:"none !important"}},Ke(t.slots.default)):ne(ae(s))}});const Fv={...Bi,...Di,...Yr,...ga,...Ae,...et,labels:{type:Array,default:()=>[]}};var kv=te({name:"VcCollectionLabel",props:Fv,emits:wi,setup(e,t){var i;const n=re();n.cesiumClass="LabelCollection";const r=zn(e,t,n);if(r===void 0)return;n.alreadyListening.push("labels");let a=[];a.push(fe(()=>an(e.labels),(l,c)=>{if(!n.mounted)return;const u=n.cesiumObject;if(l.length===c.length){const d=[];for(let m=0;m<l.length;m++){const f=l[m],v=c[m];JSON.stringify(f)!==JSON.stringify(v)&&d.push({newOptions:f,oldOptions:v})}d.forEach(m=>{const f=u._labels.find(v=>v.id===m.oldOptions.id);f&&Object.keys(m.newOptions).forEach(v=>{m.oldOptions[v]!==m.newOptions[v]&&(f[v]=r.transformProp(v,m.newOptions[v]))})})}else{const d=Mt(l,c,"id"),m=Mt(c,l,"id"),f=[];for(let v=0;v<m.length;v++){const C=u._labels.find(b=>b.id===m[v].id);C&&f.push(C)}f.forEach(v=>{u.remove(v)}),o(u,d)}},{deep:!0}));const o=(l,c)=>{for(let u=0;u<c.length;u++){const d=c[u];d.id=Cesium.defined(d.id)?d.id:Cesium.createGuid();const m=r.transformProps(d),f=l.add(m);sn(f,m)}};n.createCesiumObject=async()=>{const l=r.transformProps(e),c=new Cesium.LabelCollection(l);return o(c,e.labels),c},ot(()=>{a.forEach(l=>l()),a=[]});const s=((i=n.proxy)==null?void 0:i.$options.name)||"";return()=>t.slots.default?P("i",{class:ae(s),style:{display:"none !important"}},Ke(t.slots.default)):ne(ae(s))}});const Nv={...Ks,...el,...An,...lt,...zr,...tl,...Xs,...Wt,...Vr,...cn,...qt,...Zt,...Yn,...$r,...Tn,...Dn,...In,...Ae,...Js,...Ys,...Qs,totalScale:{type:Number,default:1},...Rn,...Gr,...et};var zv=te({name:"VcLabel",props:Nv,emits:wi,setup(e,t){const i=re();return i.cesiumClass="Label",Nn(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const Vv={...Bi,...Di,...ga,...Ae,...et,points:{type:Array,default:()=>[]}};var $v=te({name:"VcCollectionPoint",props:Vv,emits:wi,setup(e,t){const i=re();i.cesiumClass="PointPrimitiveCollection";const n=zn(e,t,i);if(n===void 0)return;i.alreadyListening.push("points");let r=[];r.push(fe(()=>an(e.points),(o,s)=>{if(!i.mounted)return;const l=i.cesiumObject;if(o.length===s.length){const c=[];for(let u=0;u<o.length;u++){const d=o[u],m=s[u];JSON.stringify(d)!==JSON.stringify(m)&&c.push({newOptions:d,oldOptions:m})}c.forEach(u=>{const d=l._pointPrimitives.find(m=>m&&m.id===u.oldOptions.id);d&&Object.keys(u.newOptions).forEach(m=>{u.oldOptions[m]!==u.newOptions[m]&&(d[m]=n.transformProp(m,u.newOptions[m]))})})}else{const c=Mt(o,s,"id"),u=Mt(s,o,"id"),d=[];for(let m=0;m<u.length;m++){const f=l._pointPrimitives.find(v=>v.id===u[m].id);f&&d.push(f)}d.forEach(m=>{l.remove(m)}),a(l,c)}},{deep:!0}));const a=(o,s)=>{for(let l=0;l<s.length;l++){const c=s[l];c.id=Cesium.defined(c.id)?c.id:Cesium.createGuid();const u=n.transformProps(c),d=o.add(u);sn(d,u)}};return i.createCesiumObject=async()=>{const o=n.transformProps(e),s=new Cesium.PointPrimitiveCollection(o);return a(s,e.points),s},ot(()=>{r.forEach(o=>o()),r=[]}),()=>{var o,s;return t.slots.default?P("i",{class:ae(((o=i.proxy)==null?void 0:o.$options.name)||""),style:{display:"none !important"}},Ke(t.slots.default)):ne(ae(((s=i.proxy)==null?void 0:s.$options.name)||""))}}});const Gv={...Wi,...An,...lt,...cn,...qt,...Zt,...hl,...Tn,...In,...Ae,...Rn,...et};var Uv=te({name:"VcPoint",props:Gv,emits:wi,setup(e,t){const i=re();return i.cesiumClass="PointPrimitive",Nn(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const k4={...Bi,...Di,...Ae,...et,polylines:{type:Array,default:()=>[]}};var Hv=te({name:"VcCollectionPolyline",props:k4,emits:wi,setup(e,t){var i;const n=re();n.cesiumClass="PolylineCollection";const r=zn(e,t,n);if(r===void 0)return;n.alreadyListening.push("polylines");let a=[];a.push(fe(()=>an(e.polylines),(l,c)=>{if(!n.mounted)return;const u=n.cesiumObject;if(l.length===c.length){const d=[];for(let m=0;m<l.length;m++){const f=l[m],v=c[m];JSON.stringify(f)!==JSON.stringify(v)&&d.push({newOptions:f,oldOptions:v})}d.forEach(m=>{const f=u._polylines.find(v=>v.id===m.oldOptions.id);f&&Object.keys(m.newOptions).forEach(v=>{m.oldOptions[v]!==m.newOptions[v]&&(f[v]=r.transformProp(v,m.newOptions[v]))})})}else{const d=Mt(l,c,"id"),m=Mt(c,l,"id"),f=[];for(let v=0;v<m.length;v++){const C=u._polylines.find(b=>b.id===m[v].id);C&&f.push(C)}f.forEach(v=>{u.remove(v)}),o(u,d)}},{deep:!0}));const o=(l,c)=>{for(let u=0;u<c.length;u++){const d=c[u];d.id=Cesium.defined(d.id)?d.id:Cesium.createGuid();const m=r.transformProps(d),f=l.add(m);sn(f,m)}};n.createCesiumObject=async()=>{const l=r.transformProps(e),c=new Cesium.PolylineCollection(l);return o(c,e.polylines),c},ot(()=>{a.forEach(l=>l()),a=[]});const s=((i=n.proxy)==null?void 0:i.$options.name)||"";return()=>t.slots.default?P("i",{class:ae(s),style:{display:"none !important"}},Ke(t.slots.default)):ne(ae(s))}});const Wv={...lt,...cn,...Ol,...ei,...ti,...Ae,...Oi,...et};var qv=te({name:"VcPolyline",props:Wv,emits:wi,setup(e,t){const i=re();return i.cesiumClass="Polyline",Nn(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const Zv={...Ae,destroyPrimitives:{type:Boolean,default:!0},...et,polygons:{type:Array,default:()=>[]}};var Qv=te({name:"VcCollectionPrimitive",props:Zv,emits:wi,setup(e,t){var i;const n=re();n.cesiumClass="PrimitiveCollection";const r=zn(e,t,n);if(r===void 0)return;n.alreadyListening.push("polygons");let a=[];a.push(fe(()=>an(e.polygons),(l,c)=>{if(!n.mounted)return;const u=n.cesiumObject;if(l.length===c.length){const d=[];for(let m=0;m<l.length;m++){const f=l[m],v=c[m];JSON.stringify(f)!==JSON.stringify(v)&&d.push({newOptions:f,oldOptions:v})}d.forEach(m=>{const f=u._primitives.find(v=>v._id===m.oldOptions.id);f&&Object.keys(m.newOptions).forEach(v=>{m.oldOptions[v]!==m.newOptions[v]&&(f[v]=r.transformProp(v,m.newOptions[v]))})})}else{const d=Mt(l,c,"id"),m=Mt(c,l,"id"),f=[];for(let v=0;v<m.length;v++){const C=u._primitives.find(b=>b.id===m[v].id);C&&f.push(C)}f.forEach(v=>{u.remove(v)}),o(u,d)}},{deep:!0}));const o=(l,c)=>{for(let u=0;u<c.length;u++){const d=c[u];d.id=Cesium.defined(d.id)?d.id:Cesium.createGuid();const m=r.transformProps(d),f=new Zl(m);f._vcParent=l,sn(f,m),l.add(f)}};n.createCesiumObject=async()=>{const l=r.transformProps(e),c=new Cesium.PrimitiveCollection(l);return o(c,e.polygons),c},ot(()=>{a.forEach(l=>l()),a=[]});const s=((i=n.proxy)==null?void 0:i.$options.name)||"";return()=>t.slots.default?P("i",{class:ae(s),style:{display:"none !important"}},Ke(t.slots.default)):ne(ae(s))}});const Xv={...ti,...kn,...ir,...El,...Ae,...cn,...Zi,...Si,...Hr,...Re,...jn,...Fn,...et};var Yv=te({name:"VcPolygon",props:Xv,emits:wi,setup(e,t){const i=re();i.cesiumClass="PolygonPrimitive";const n=Nn(e,t,i);if(n===void 0)return;let r=[];return r.push(fe(()=>e.clampToGround,a=>{const o=i.cesiumObject;o&&(o.clampToGround=a)})),r.push(fe(()=>e.positions,a=>{const o=i.cesiumObject;o&&(o.positions=Hi(a))})),r.push(fe(()=>e.polygonHierarchy,a=>{const o=i.cesiumObject;o&&(o.polygonHierarchy=zs(a))})),r.push(fe(()=>e.appearance,a=>{const o=i.cesiumObject;o&&(o.appearance=Ho.call(i,a))})),r.push(fe(()=>e.depthFailAppearance,a=>{const o=i.cesiumObject;o&&(o.depthFailAppearance=Ho.call(i,a))})),r.push(fe(()=>e.show,a=>{const o=i.cesiumObject;o&&(o.show=a)})),r.push(fe(()=>e.classificationType,a=>{const o=i.cesiumObject;o&&(o.classificationType=a)})),i.createCesiumObject=async()=>{const a=n.transformProps(e);return new Zl(a)},i.mount=async()=>{const a=n.$services.primitives,o=i.cesiumObject;return o._vcParent=a,a&&a.add(o)},i.unmount=async()=>{const a=n.$services.primitives,o=i.cesiumObject;return a&&!a.isDestroyed()&&a.remove(o)},ot(()=>{r.forEach(a=>a()),r=[]}),()=>{var a;return ne(ae(((a=i.proxy)==null?void 0:a.$options.name)||""))}}});const N4=[Dv,jv,kv,$v,Hv,Qv,es,Rv,zv,Uv,qv,Yv];N4.forEach(e=>{e.install=t=>{t.component(e.name,e)}});const nu=Dv,Jv=jv,_o=kv,xo=$v,Kv=Hv,xr=Qv,eg=Rv,tg=es,ig=zv,ng=Uv,rg=qv,ts=Yv,og={geometry:Object,...Bi,...cn,attributes:Object},z4={...Ce,"update:geometry":e=>!0};var is=te({name:"VcGeometryInstance",props:og,emits:z4,setup(e,t){const i=re();i.renderByParent=!0,i.cesiumClass="GeometryInstance",i.cesiumEvents=[];const n=Be(e,t,i);if(n===void 0)return;const{emit:r}=t,a=ie(0);i.createCesiumObject=async()=>{const l=n.transformProps(e);return l.geometry||(l.geometry=new Cesium.Geometry({attributes:new Cesium.GeometryAttributes})),new Cesium.GeometryInstance(l)},i.mount=async()=>{var l;const c=xt(i).proxy;c.__childCount!==void 0&&(a.value=c.__childCount.value||0,c.__childCount.value+=1);const u=i.cesiumObject;return(l=c.__updateGeometryInstances)==null||l.call(c,u,a.value),!0},i.unmount=async()=>{var l;const c=i.cesiumObject,u=xt(i).proxy;return(l=u.__removeGeometryInstances)==null||l.call(u,c),!0};const o=l=>{if(Me(i,"update:geometry"))r("update:geometry",l);else{const u=i.cesiumObject;u.geometry=l}return!0};return on(zi,(()=>Mn(n.getServices(),{get geometryInstance(){return i.cesiumObject}}))()),Object.assign(i.proxy,{__updateGeometry:o}),()=>{var l,c;return t.slots.default?P("i",{class:ae(((l=i.proxy)==null?void 0:l.$options.name)||""),style:{display:"none !important"}},Ke(t.slots.default)):ne(ae(((c=i.proxy)==null?void 0:c.$options.name)||"v-if"))}}});is.install=e=>{e.component(is.name,is)};const ag=is;var V4=ag;const Hn=ag,sg={...Zo,...Bt};var lg=te({name:"VcGeometryBox",props:sg,emits:Ce,setup(e,t){const i=re();i.cesiumClass="BoxGeometry";const n=Ne(e,t,i);return i.createCesiumObject=async()=>{const r=n==null?void 0:n.transformProps(e);return Cesium.BoxGeometry.fromDimensions(r)},()=>{var r;return ne(ae(((r=i.proxy)==null?void 0:r.$options.name)||""))}}});const cg={...Zo};var ug=te({name:"VcGeometryBoxOutline",props:cg,emits:Ce,setup(e,t){const i=re();i.cesiumClass="BoxOutlineGeometry";const n=Ne(e,t,i);return i.createCesiumObject=async()=>{const r=n==null?void 0:n.transformProps(e);return Cesium.BoxOutlineGeometry.fromDimensions(r)},()=>{var r;return ne(ae(((r=i.proxy)==null?void 0:r.$options.name)||"v-if"))}}});const dg={...Jr,...Kr,...Re,...Lt,...Je,...Bt,...Qt,...Li};var hg=te({name:"VcGeometryCircle",props:dg,emits:Ce,setup(e,t){const i=re();return i.cesiumClass="CircleGeometry",Ne(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const mg={...Jr,...Kr,...Re,...Lt,...Je,...Qt,...Kn};var fg=te({name:"VcGeometryCircleOutline",props:mg,emits:Ce,setup(e,t){const i=re();return i.cesiumClass="CircleOutlineGeometry",Ne(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const pg={...kn,...Re,...Bt,...Li};var vg=te({name:"VcGeometryPolygonCoplanar",props:pg,emits:Ce,setup(e,t){const i=re();return i.cesiumClass="CoplanarPolygonGeometry",Ne(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const gg={...kn};var yg=te({name:"VcGeometryPolygonCoplanarOutline",props:gg,emits:Ce,setup(e,t){const i=re();return i.cesiumClass="CoplanarPolygonOutlineGeometry",Ne(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const bg={...ti,...Oi,...Re,...Je,...Lt,...Qt,...Bt,...Ln};var Cg=te({name:"VcGeometryCorridor",props:bg,emits:Ce,setup(e,t){const i=re();return i.cesiumClass="CorridorGeometry",Ne(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const wg={...ti,...Oi,...Re,...Je,...Lt,...Qt,...Ln};var _g=te({name:"VcGeometryCorridorOutline",props:wg,emits:Ce,setup(e,t){const i=re();return i.cesiumClass="CorridorOutlineGeometry",Ne(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const xg={...Qo,...Xo,...Yo,...Jo,...Bt};var Eg=te({name:"VcGeometryCylinder",props:xg,emits:Ce,setup(e,t){const i=re();return i.cesiumClass="CylinderGeometry",Ne(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Og={...Qo,...Xo,...Yo,...Jo,...Kn};var Pg=te({name:"VcGeometryCylinderOutline",props:Og,emits:Ce,setup(e,t){const i=re();return i.cesiumClass="CylinderOutlineGeometry",Ne(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Mg={...Jr,...Ko,...ea,...Re,...Lt,...Qt,...qi,...Li,...Je,...Bt};var Sg=te({name:"VcGeometryEllipse",props:Mg,emits:Ce,setup(e,t){const i=re();return i.cesiumClass="EllipseGeometry",Ne(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Tg={...Jr,...Ko,...ea,...Re,...Lt,...Qt,...qi,...Li,...Je,...Kn};var Ag=te({name:"VcGeometryEllipseOutline",props:Tg,emits:Ce,setup(e,t){const i=re();return i.cesiumClass="EllipseOutlineGeometry",Ne(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Dg={...ta,...ia,...na,...ra,...oa,...aa,...er,...tr,...Bt};var Ig=te({name:"VcGeometryEllipsoid",props:Dg,emits:Ce,setup(e,t){const i=re();return i.cesiumClass="EllipsoidGeometry",Ne(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const $4={...ta,...ia,...na,...ra,...oa,...aa,...er,...tr,...sa};var Rg=te({name:"VcGeometryEllipsoidOutline",props:$4,emits:Ce,setup(e,t){const i=re();return i.cesiumClass="EllipsoidOutlineGeometry",Ne(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Lg={...Ml,...Sl,...qs,...Bt};var Bg=te({name:"VcGeometryFrustum",props:Lg,emits:Ce,setup(e,t){const i=re();return i.cesiumClass="FrustumGeometry",Ne(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const jg={...Ml,...Sl,...qs};var Fg=te({name:"VcGeometryFrustumOutline",props:jg,emits:Ce,setup(e,t){const i=re();return i.cesiumClass="FrustumOutlineGeometry",Ne(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const kg={...ti,...Oi,...Je,...Ol,...Zi};var Ng=te({name:"VcGeometryGroundPolyline",props:kg,emits:Ce,setup(e,t){const i=re();return i.cesiumClass="GroundPolylineGeometry",Ne(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const zg={...Bt};var Vg=te({name:"VcGeometryPlane",props:zg,emits:Ce,setup(e,t){const i=re();return i.cesiumClass="PlaneGeometry",Ne(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}}),$g=te({name:"VcGeometryPlaneOutline",emits:Ce,setup(e,t){const i=re();return i.cesiumClass="PlaneOutlineGeometry",Ne(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Gg={...kn,...Lt,...Qt,...Bt,...Li,...Re,...Je,...ua,...ml,...fl,...Zi};var Ug=te({name:"VcGeometryPolygon",props:Gg,emits:Ce,setup(e,t){const i=re();return i.cesiumClass="PolygonGeometry",Ne(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Hg={...kn,...Lt,...Qt,...Bt,...Re,...Je,...ua,...Zi};var Wg=te({name:"VcGeometryPolygonOutline",props:Hg,emits:Ce,setup(e,t){const i=re();return i.cesiumClass="PolygonOutlineGeometry",Ne(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const qg={...ti,...Oi,...Bl,colorsPerVertex:{type:Boolean,default:!1},...Zi,...Je,...Bt,...Re};var Zg=te({name:"VcGeometryPolyline",props:qg,emits:Ce,setup(e,t){const i=re();return i.cesiumClass="PolylineGeometry",Ne(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Qg={...Al,...Tl,...Re,...Je,...Bt,...Ln};var Xg=te({name:"VcGeometryPolylineVolume",props:Qg,emits:Ce,setup(e,t){const i=re();return i.cesiumClass="PolylineVolumeGeometry",Ne(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Yg={...Al,...Tl,...Re,...Je,...Ln};var Jg=te({name:"VcGeometryPolylineVolumeOutline",props:Yg,emits:Ce,setup(e,t){const i=re();return i.cesiumClass="PolylineVolumeOutlineGeometry",Ne(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Kg={...St,...Bt,...Re,...Je,...Lt,...qi,...Li,...Qt};var e0=te({name:"VcGeometryRectangle",props:Kg,emits:Ce,setup(e,t){const i=re();return i.cesiumClass="RectangleGeometry",Ne(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const t0={...St,...Re,...Je,...Lt,...qi,...Qt};var i0=te({name:"VcGeometryRectangleOutline",props:t0,emits:Ce,setup(e,t){const i=re();return i.cesiumClass="RectangleOutlineGeometry",Ne(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const n0={...ti,...Bl,colorsPerVertex:{type:Boolean,default:!1},...Zi,...Je,...Re};var r0=te({name:"VcGeometrySimplePolyline",props:n0,emits:Ce,setup(e,t){const i=re();return i.cesiumClass="SimplePolylineGeometry",Ne(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const o0={...Kr,...er,...tr,...Bt};var a0=te({name:"VcGeometrySphere",props:o0,emits:Ce,setup(e,t){const i=re();return i.cesiumClass="SphereGeometry",Ne(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const s0={...Kr,...er,...tr,...sa};var l0=te({name:"VcGeometrySphereOutline",props:s0,emits:Ce,setup(e,t){const i=re();return i.cesiumClass="SphereOutlineGeometry",Ne(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const c0={...ti,...Je,...ha,...da,...Re,...Bt};var u0=te({name:"VcGeometryWall",props:c0,emits:Ce,setup(e,t){const i=re();return i.cesiumClass="WallGeometry",Ne(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const d0={...ti,...Je,...ha,...da,...Re};var h0=te({name:"VcGeometryWallOutline",props:d0,emits:Ce,setup(e,t){const i=re();return i.cesiumClass="WallOutlineGeometry",Ne(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const G4=[lg,ug,hg,fg,vg,yg,Cg,_g,Eg,Pg,Sg,Ag,Ig,Rg,Bg,Fg,Ng,Vg,$g,Ug,Wg,Zg,Xg,Jg,e0,i0,r0,a0,l0,u0,h0];G4.forEach(e=>{e.install=t=>{t.component(e.name,e)}});const m0=lg,f0=ug,p0=hg,v0=fg,g0=vg,y0=yg,b0=Cg,C0=_g,w0=Eg,_0=Pg,x0=Sg,E0=Ag,O0=Ig,P0=Rg,M0=Bg,S0=Fg,ns=Ng,T0=Vg,A0=$g,ru=Ug,D0=Wg,Wn=Zg,I0=Xg,R0=Jg,L0=e0,B0=i0,j0=r0,F0=a0,k0=l0,N0=u0,z0=h0;function ou(e,t,i,n,r){i.cesiumClass=n,i.cesiumEvents=[];const{t:a}=Ct(),{emit:o}=t,s=ae(n).split("-");n==="VcMeasurementDistance"&&e.showComponentLines&&(s[2]="component-distance"),(n==="VcDrawingRegular"||n==="VcMeasurementRegular")&&(e.edge===4&&(s[2]="rectangle"),e.edge===360&&(s[2]="circle"));let l=s[2];s[3]&&(l=`${s[2]}-${s[3]}`);const c=ie(""),u=ye(()=>({drawingTipStart:e.drawtip.drawingTipStart||a(`${s[0]}.${s[1]}.${s[2]}.drawingTipStart`),drawingTipEnd:e.drawtip.drawingTipEnd||a(`${s[0]}.${s[1]}.${s[2]}.drawingTipEnd`),drawingTipEditing:e.drawtip.drawingTipEditing||a(`${s[0]}.${s[1]}.${s[2]}.drawingTipEditing`)})),d=ie(Ee.BeforeDraw),m=ie(!1),f=ie([0,0,0]),v=ie(!1),C=ie([0,0,0]),b=ie(null),_=ie(null),M=ie(null),g=ie(""),{registerTimeout:E,removeTimeout:T}=Nl();return i.createCesiumObject=async()=>M,{drawingType:l,drawTip:c,drawTipOpts:u,drawStatus:d,canShowDrawTip:m,drawTipPosition:f,showEditor:v,editorPosition:C,mouseoverPoint:b,editingPoint:_,primitiveCollectionRef:M,editorType:g,onMouseoverPoints:p=>{var y,O;const{drawingHandlerActive:x,viewer:w}=r;e.editable&&d.value!==Ee.Drawing&&x&&(p.pickedFeature.primitive.pixelSize=((y=e.pointOpts)==null?void 0:y.pixelSize)*1.5,T(),E(()=>{b.value=p.pickedFeature.primitive,C.value=p.pickedFeature.primitive.position,v.value=!0,m.value=!1,f.value=[0,0,0]},(O=e.editorOpts)==null?void 0:O.delay)),o("mouseEvt",{type:p.type,name:l,target:p},w)},onMouseoutPoints:p=>{var y,O;const{viewer:x,selectedDrawingActionInstance:w}=r;e.editable&&(p.pickedFeature.primitive.pixelSize=((y=e.pointOpts)==null?void 0:y.pixelSize)*1,T(),E(()=>{C.value=[0,0,0],b.value=void 0,v.value=!1},(O=e.editorOpts)==null?void 0:O.hideDelay),w&&(m.value=!0)),o("mouseEvt",{type:p.type,name:l,target:p},x)},onMouseenterEditor:p=>{T()},onMouseleaveEditor:p=>{var y;T(),E(()=>{var O;C.value=[0,0,0],b.value.pixelSize=((O=e.pointOpts)==null?void 0:O.pixelSize)*1,b.value=void 0,v.value=!1},(y=e.editorOpts)==null?void 0:y.hideDelay)},onPrimitiveCollectionReady:p=>{p.cesiumObject._vcId=n},onVcCollectionPointReady:function(p){const{cesiumObject:y}=p,O=y.update;y.update=function(x){const w=x.commandList.length;O.call(this,x);const D=x.commandList.length;for(let S=w;S<D;++S)x.commandList[S].pass=Cesium.Pass.TRANSLUCENT,x.commandList[S].renderState=Cesium.RenderState.fromCache({depthTest:{enabled:!1},depthMask:!1})}},onVcPrimitiveReady:p=>{if(e.disableDepthTest)return;const y=p.cesiumObject,O=y.update;y.update=function(x){const w=x.commandList.length;O.call(this,x);const D=x.commandList.length;for(let S=w;S<D;++S)x.commandList[S].pass===Cesium.Pass.TRANSLUCENT&&(x.commandList[S].pass=Cesium.Pass.OPAQUE,x.commandList[S].renderState=Cesium.RenderState.fromCache({depthTest:{enabled:!1},depthMask:!1,blending:Cesium.BlendingState.ALPHA_BLEND}))}},onVcCollectionLabelReady:p=>{if(e.disableDepthTest)return;const y=p.cesiumObject,O=y.update;y.update=function(x){const w=x.commandList.length;O.call(this,x);const D=x.commandList.length;for(let S=w;S<D;++S)x.commandList[S].pass=Cesium.Pass.OVERLAY,x.commandList[S].renderState=Cesium.RenderState.fromCache({depthTest:{enabled:!1},depthMask:!1,blending:Cesium.BlendingState.ALPHA_BLEND})}}}}function en(e,t,i){const n=re(),r=Be(e,t,n);if(r===void 0)return;const{t:a}=Ct(),o=r.$services,{emit:s}=t,{drawingType:l,drawTip:c,drawTipOpts:u,drawStatus:d,canShowDrawTip:m,drawTipPosition:f,showEditor:v,editorPosition:C,mouseoverPoint:b,editingPoint:_,primitiveCollectionRef:M,editorType:g,onMouseoverPoints:E,onMouseoutPoints:T,onMouseenterEditor:A,onMouseleaveEditor:R,onPrimitiveCollectionReady:I,onVcCollectionPointReady:j,onVcCollectionLabelReady:W,onVcPrimitiveReady:$}=ou(e,t,n,i,o),k=ie([]);e.preRenderDatas&&e.preRenderDatas.length&&e.preRenderDatas.forEach(N=>{const L={positions:Hi(N),show:!0,drawStatus:Ee.AfterDraw,distance:0,labels:[],pointOpts:{},labelOpts:{},labelsOpts:{},polylineOpts:{},primitiveOpts:{},polygonOpts:{}};i==="VcMeasurementVertical"&&Object.assign(L,{draggingPlane:new Cesium.Plane(Cesium.Cartesian3.UNIT_X,0),surfaceNormal:new Cesium.Cartesian3}),k.value.push(L)});let h;const p=ye(()=>{const N=[],{Cartesian3:L,Cartographic:H,Rectangle:z,createGuid:Q,defined:Z,Math:J,Ray:X}=Cesium,{viewer:ee}=o;return k.value.forEach(Y=>{var le,ce,me,de,ge,be,ve,ue,xe,V,se,he,we,Se,yt,Ht,Le,Ue,si;const _t=Y.positions[0],dt=Y.positions[1];if(L.equals(_t,dt))return;const ht=Pe([]),He=((le=e.polylineOpts)==null?void 0:le.arcType)===0?L.distance(_t,dt):Us(_t,dt,o.viewer.scene.globe.ellipsoid),ze=L.midpoint(_t,dt,{}),nn=gh(_t,dt),i1=yh(_t,dt);Y.points=Y.positions.map(st=>({position:st}));const We={...Y,distance:He,heading:nn,pitch:i1},gu=Object.assign({},e.labelOpts,We.labelOpts);if(i==="VcDrawingRectangle"||i==="VcMeasurementRectangle"){const st=H.fromCartesian(_t,ee.scene.globe.ellipsoid),ke=H.fromCartesian(dt,ee.scene.globe.ellipsoid),Kt=st.height;!e.clampToGround&&(ke.height=Kt);const Ve=z.fromCartesianArray(Y.positions,ee.scene.globe.ellipsoid),li=[Ve.west,Ve.north,Kt,Ve.east,Ve.north,Kt,Ve.east,Ve.south,Kt,Ve.west,Ve.south,Kt,Ve.west,Ve.north,Kt],zt=L.fromRadiansArrayHeights(li,ee.scene.globe.ellipsoid);Object.assign(We,{polygonPositions:zt,height:Kt})}else if(i==="VcDrawingRegular"||i==="VcMeasurementRegular"){const st=Y.positions[0],ke=Y.positions[1],Kt=NP(st,ke,ee.scene);if(!ci(Kt)&&Z(Kt)){const Ve=[],li=H.fromCartesian(st,ee.scene.globe.ellipsoid),zt=H.fromCartesian(ke,ee.scene.globe.ellipsoid);!e.clampToGround&&(zt.height=li.height),Ve.push(H.toCartesian(zt,ee.scene.globe.ellipsoid));for(let rn=0;rn<(e.edge||4)-1;rn++){const ls=zP(st,Kt.heading+=Math.PI*2/(e.edge||4),He,ee.scene.globe.ellipsoid);Ve.push(ls)}Object.assign(We,{polygonPositions:Ve,height:li.height})}}else if(i==="VcAnalysisViewshed")Object.assign(We.viewshedOpts,{startPosition:_t,endPosition:dt});else if(i==="VcAnalysisSightline")if(e.sightlineType==="segment"){const st=[];st.push(_t);const ke=[];M.value.cesiumObject._primitives.forEach(zt=>{zt instanceof Cesium.PointPrimitiveCollection&&ke.push(...zt._pointPrimitives),zt instanceof Cesium.Primitive&&ke.push(zt)});const Ve=bh(_t,dt,o.viewer,ke);Z(Ve)&&st.push(Ve),st.push(dt);let li=0;for(let zt=0;zt<st.length-1;zt++){const rn=L.distance(st[zt],st[zt+1]);li=li+rn}Object.assign(We,{positions:st,distance:li})}else e.sightlineType==="circle";else ht.push({position:ze,id:Q(),text:it.distanceToString(He,(ce=e.measureUnits)==null?void 0:ce.distanceUnits,e.locale,(me=e.decimals)==null?void 0:me.distance),...gu});if(We.polygonPositions&&We.polygonPositions.length){const st=Object.assign({},e.labelsOpts,We.labelsOpts),ke=We.polygonPositions.slice();e.loop&&ke.length>2&&ke.push(ke[0]);for(let Ve=0;Ve<ke.length-1;Ve++){let li=0;if(((de=e.polylineOpts)==null?void 0:de.arcType)===0?li=Us(ke[Ve],ke[Ve+1],o.viewer.scene.globe.ellipsoid):li=L.distance(ke[Ve],ke[Ve+1]),li>0&&ke.length>2&&e.showDistanceLabel&&ht.push({text:it.distanceToString(li,(ge=e.measureUnits)==null?void 0:ge.distanceUnits,e.locale,(be=e.decimals)==null?void 0:be.distance),position:L.midpoint(ke[Ve],ke[Ve+1],{}),id:Q(),...st}),ke.length>2&&e.showAngleLabel&&(Ve>0||e.loop)){const zt=ke[Ve===0?ke.length-2:Ve-1],rn=ke[Ve],ls=ke[Ve+1],yu=L.subtract(zt,rn,{}),bu=L.subtract(ls,rn,{});let Cu=0;L.ZERO.equals(yu)||L.ZERO.equals(bu)||(Cu=L.angleBetween(yu,bu)),ht.push({text:it.angleToString(Cu,(ve=e.measureUnits)==null?void 0:ve.angleUnits,e.locale,(ue=e.decimals)==null?void 0:ue.angle),position:rn,id:Q(),...st})}}const Kt=vh(ke);e.showLabel&&ht.push({text:it.areaToString(Kt,(xe=e.measureUnits)==null?void 0:xe.areaUnits,e.locale,(V=e.decimals)==null?void 0:V.area),position:Y.positions[0],id:Q(),...gu})}e.showComponentLines&&(Object.assign(We,{xyPolylinePositions:[new L,new L,new L],xyBoxPositions:[new L,new L,new L],xDistance:0,yDistance:0,xAngle:0,yAngle:0}),O(We),ht.push({position:We.xLabelPosition,id:Q(),text:it.distanceToString(We.xDistance||0,(se=e.measureUnits)==null?void 0:se.distanceUnits,e.locale,(he=e.decimals)==null?void 0:he.distance),...e.xLabelOpts}),ht.push({position:We.yLabelPosition,id:Q(),text:it.distanceToString(We.yDistance||0,(we=e.measureUnits)==null?void 0:we.distanceUnits,e.locale,(Se=e.decimals)==null?void 0:Se.distance),...e.yLabelOpts}),ht.push({position:We.xAnglePosition,id:Q(),text:it.angleToString(We.xAngle||0,(yt=e.measureUnits)==null?void 0:yt.angleUnits,e.locale,(Ht=e.decimals)==null?void 0:Ht.angle),...e.xAngleLabelOpts}),ht.push({position:We.yAnglePosition,id:Q(),text:it.angleToString(We.yAngle||0,(Le=e.measureUnits)==null?void 0:Le.angleUnits,e.locale,(Ue=e.decimals)==null?void 0:Ue.angle),...e.yAngleLabelOpts})),Object.assign(We,{labels:ht}),We.positionsDegreesArray=We.positions.map(st=>{const ke=Cesium.Cartographic.fromCartesian(st,ee.scene.globe.ellipsoid);return[J.toDegrees(ke.longitude),J.toDegrees(ke.latitude),ke.height]}),((si=We==null?void 0:We.polygonPositions)==null?void 0:si.length)&&(We.polygonPositionsDegreesArray=We.polygonPositions.map(st=>{const ke=Cesium.Cartographic.fromCartesian(st,ee.scene.globe.ellipsoid);return[J.toDegrees(ke.longitude),J.toDegrees(ke.latitude),ke.height]})),N.push(We)}),N});n.createCesiumObject=async()=>M,n.mount=async()=>{const{viewer:N}=o;return e.autoUpdateLabelPosition&&(i==="VcMeasurementDistance"&&N.scene.preRender.addEventListener(w),(i==="VcMeasurementRegular"||i==="VcMeasurementRectangle"||i==="VcDrawingRegular"||i==="VcDrawingRectangle")&&N.scene.preRender.addEventListener(x)),!0},n.unmount=async()=>{const{viewer:N}=o;return e.autoUpdateLabelPosition&&(i==="VcMeasurementDistance"&&N.scene.preRender.removeEventListener(w),(i==="VcMeasurementRegular"||i==="VcMeasurementRectangle"||i==="VcDrawingRegular"||i==="VcDrawingRectangle")&&N.scene.preRender.removeEventListener(x)),!0};const y=(N,L)=>{const{defined:H,SceneMode:z,Cartesian3:Q,IntersectionTests:Z,Plane:J,SceneTransforms:X,Ray:ee}=Cesium,{viewer:Y}=o,le=Y.scene,ce=le.camera,me=ce.direction,de=le.frameState.mapProjection.ellipsoid,ge=N.positions,be=ge[0];let ve=be,ue=ge[1],xe=N.draggingPlane,V=N.surfaceNormal,se=V;if(le.mode===z.COLUMBUS_VIEW){se=Q.UNIT_X;const Se=de.cartesianToCartographic(be,{});ve=le.mapProjection.project(Se,{}),Q.fromElements(ve.z,ve.x,ve.y,ve)}let he=Q.cross(se,me,{});he=Q.cross(se,he,he),he=Q.normalize(he,he),xe=J.fromPointNormal(ve,he,xe);const we=ce.getPickRay(L,new ee);if(ue=Z.rayPlane(we,xe,{}),H(ue)){if(le.mode===z.COLUMBUS_VIEW){ue=Q.fromElements(ue.y,ue.z,ue.x,ue);const yt=le.mapProjection.unproject(ue,{});ue=de.cartographicToCartesian(yt,ue)}X.wgs84ToWindowCoordinates(le,ge[0],{}).y<L.y&&(V=Q.negate(V,{}));let Se=Q.subtract(ue,be,{});return Se=Q.projectVector(Se,V,Se),ue=Q.add(be,Se,ue),ue}},O=N=>{const{Cartesian3:L,Math:H,defined:z}=Cesium,{viewer:Q}=o,Z=Q.scene.frameState.mapProjection.ellipsoid,J=N.positions[0],X=N.positions[1],ee=Z.cartesianToCartographic(J,{});if(!z(ee))return;const Y=Z.cartesianToCartographic(X,{}),le=ee.height,ce=Y.height;let me,de,ge,be;le<ce?(me=J,de=X,be=ce,ge=le):(me=X,de=J,be=le,ge=ce);const ve=N.xyPolylinePositions;if(ve===void 0)return;ve[0]=me,ve[2]=de;let ue=Z.geodeticSurfaceNormal(me,{});ue=L.multiplyByScalar(ue,be-ge,ue);const xe=L.add(me,ue,ve[1]);if(!(L.equalsEpsilon(xe,de,H.EPSILON10)&&L.equalsEpsilon(xe,me,H.EPSILON10))){let V=L.subtract(de,xe,{}),se=L.subtract(me,xe,{});const he=Math.min(L.magnitude(V),L.magnitude(se)),we=15<he?.15*he:.25*he;V=L.normalize(V,V),se=L.normalize(se,se),V=L.multiplyByScalar(V,we,V),se=L.multiplyByScalar(se,we,se);const Se=N.xyBoxPositions;if(Se===void 0)return;L.add(xe,V,Se[0]),L.add(Se[0],se,Se[1]),L.add(xe,se,Se[2]),N.xLabelPosition=L.midpoint(xe,de,{}),N.yLabelPosition=L.midpoint(me,xe,{}),N.xAnglePosition=de,N.yAnglePosition=me;const yt=L.subtract(xe,de,{}),Ht=L.subtract(xe,me,{});let Le=L.subtract(de,me,{});N.yAngle=L.angleBetween(Ht,Le),Le=L.negate(Le,Le),N.xAngle=L.angleBetween(yt,Le),N.xDistance=L.magnitude(yt),N.yDistance=L.magnitude(Ht)}},x=()=>{p.value.forEach((N,L)=>{var H;const z=N.polygonPositions;if(!(z.length<2)){const{defined:Q,SceneTransforms:Z,Cartesian2:J,HorizontalOrigin:X}=Cesium,{viewer:ee}=o,Y=ee.scene;let le=N.positions[0];const ce=Z.wgs84ToWindowCoordinates(Y,le,{});let me=Q(ce)?J.clone(ce,{}):J.fromElements(Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,{}),de=me.y;const ve=((H=M.value)==null?void 0:H.cesiumObject)._primitives.filter(xe=>xe instanceof Cesium.LabelCollection)[L]._labels,ue=ve[ve.length-1];if(!ue)return;for(let xe=1;xe<z.length;xe++){const V=Z.wgs84ToWindowCoordinates(Y,z[xe],{});if(Q(V)){const se=(me.y-V.y)/(V.x-me.x),he=ve[xe-1];he&&he!==ue&&(he.horizontalOrigin=0<se?X.LEFT:X.RIGHT),V.y<de&&(de=V.y,le=z[xe]),me=J.clone(V,me)}N.drawStatus===Ee.AfterDraw&&(ue.position=le)}}})},w=()=>{p.value.forEach((N,L)=>{var H,z,Q;const{defined:Z,SceneTransforms:J,HorizontalOrigin:X}=Cesium,{viewer:ee}=o,Y=ee.scene,le=(H=M.value)==null?void 0:H.cesiumObject,ce=N.positions,me=ce[0],de=ce[1],ge=J.wgs84ToWindowCoordinates(Y,me,{}),be=J.wgs84ToWindowCoordinates(Y,de,{});if(Z(ge)&&Z(be)){const ve=le._primitives.filter(ue=>ue instanceof Cesium.LabelCollection);if(ve.length){const ue=ve[L].get(0);let xe,V,se,he;e.showComponentLines&&(xe=ve[L].get(2),V=ve[L].get(3),se=mt((z=e.yLabelOpts)==null?void 0:z.pixelOffset),he=mt((Q=e.xAngleLabelOpts)==null?void 0:Q.pixelOffset)),(ge.y-be.y)/(be.x-ge.x)>0?(!ci(xe)&&!ci(se)&&(se.x=-9,xe.pixelOffset=se,xe.horizontalOrigin=X.RIGHT),!ci(V)&&!ci(he)&&(he.x=12,V.pixelOffset=he,V.horizontalOrigin=X.LEFT),ue.horizontalOrigin=X.LEFT):(!ci(xe)&&!ci(se)&&(se.x=9,xe.pixelOffset=se,xe.horizontalOrigin=X.LEFT),!ci(V)&&!ci(he)&&(he.x=-12,V.pixelOffset=he,V.horizontalOrigin=X.RIGHT),ue.horizontalOrigin=X.RIGHT)}}})},D=(N,L)=>{const{defined:H,defaultValue:z,Cartesian3:Q}=Cesium,{viewer:Z}=o,J=Z.scene,X=N.positions;X[0]=L;const ee=J.frameState.mapProjection.ellipsoid,Y=ee.cartesianToCartographic(L,{}),le=J.globe;Y.height=H(le)?z(le.getHeight(Y),0):0,X[1]=ee.cartographicToCartesian(Y,{}),N.distance=Q.distance(X[0],X[1]),N.labelPosition=Q.midpoint(X[0],X[1],{})},S=()=>{const{Cartesian3:N,Plane:L}=Cesium,H={positions:[new N,new N],show:!1,drawStatus:Ee.BeforeDraw,distance:0,labels:[],pointOpts:{},labelOpts:{},labelsOpts:{},polylineOpts:{},primitiveOpts:{},polygonOpts:{}};i==="VcMeasurementVertical"&&Object.assign(H,{draggingPlane:new L(N.UNIT_X,0),surfaceNormal:new N}),k.value.push(H),d.value=Ee.BeforeDraw,m.value=!0,c.value=u.value.drawingTipStart},B=(N=!0)=>{N&&d.value===Ee.Drawing&&k.value.pop();const L=_.value?_.value._vcPolylineIndx:k.value.length-1,H=k.value[L];H&&(H.drawStatus=Ee.AfterDraw),d.value=Ee.AfterDraw,m.value=!1,f.value=[0,0,0]},F=(N,L)=>{var H;const{viewer:z,drawingFabInstance:Q,selectedDrawingActionInstance:Z,getWorldPosition:J}=o,X=Q==null?void 0:Q.proxy;if(L.button===2&&L.ctrl){const ve=X.getDrawingActionInstance(l);X.toggleAction(ve),De(()=>{s("drawEvt",{name:l,finished:!0,windowPoistion:N,type:"cancel"},z)});return}d.value===Ee.AfterDraw&&S();const ee=_.value?_.value._vcPolylineIndx:k.value.length-1,Y=k.value[ee],le=Y.positions;if(L.button===2&&_.value){X.editingActionName=void 0,Y.positions[_.value._index]=h,d.value=Ee.AfterDraw,Y.drawStatus=Ee.AfterDraw,_.value=void 0,c.value=u.value.drawingTipStart,i==="VcMeasurementHeight"&&D(Y,h),De(()=>{s("drawEvt",Object.assign({name:l,index:ee,renderDatas:k,finished:!0,windowPoistion:N,type:"cancel"},p.value[ee]),z)});return}if(L.button!==0)return;const{defined:ce}=Cesium;let me="new",de,ge=!1;const be=z.scene;if(d.value===Ee.BeforeDraw){const ve=J(be,N,{});if(!ce(ve))return;if(le[0]=ve,le[1]=ve,Y.show=!0,d.value=Ee.Drawing,Y.drawStatus=Ee.Drawing,c.value=u.value.drawingTipEnd,de=ve,ge=!1,i==="VcMeasurementVertical"){const ue=be.frameState.mapProjection.ellipsoid;Y.surfaceNormal=ue.geodeticSurfaceNormal(ve,Y.surfaceNormal)}i==="VcMeasurementHeight"&&(D(Y,ve),ge=!0,Y.drawStatus=Ee.AfterDraw,d.value=Ee.AfterDraw,c.value=u.value.drawingTipStart,e.mode===1&&X.toggleAction(Z)),i==="VcAnalysisViewshed"&&(Y.viewshedOpts={...e.viewshedOpts})}else{if(Y.drawStatus=Ee.AfterDraw,d.value=Ee.AfterDraw,_.value){if(At().hasTouch===!0){const ve=J(be,N,{});ce(ve)&&(Y.positions.splice(_.value._index,1,ve),_.value.pixelSize=((H=e.pointOpts)==null?void 0:H.pixelSize)*1)}_.value=void 0,X.editingActionName=void 0,m.value=!1,f.value=[0,0,0],me=g.value,Z&&(c.value=u.value.drawingTipStart,m.value=!0)}else{if(At().hasTouch===!0){const ve=J(be,N,{});if(ce(ve)){const ue=Y.positions;ue[1]=ve}}e.mode===1&&X.toggleAction(Z)}ge=!0,de=Y.positions[1]}De(()=>{s("drawEvt",Object.assign({index:ee,renderDatas:k,name:l,finished:ge,position:de,windowPoistion:N,type:me},p.value[ee]),z)})},G=N=>{const{viewer:L,getWorldPosition:H}=o,z=L.scene,Q=H(z,N,{}),{defined:Z,Cartographic:J}=Cesium;if(!Z(Q)||(f.value=Q,d.value!==Ee.Drawing)||i==="VcMeasurementVertical"&&z.mode===Cesium.SceneMode.SCENE2D)return;const X=_.value?_.value._vcPolylineIndx:k.value.length-1,ee=k.value[X];if(i==="VcMeasurementVertical"){const Y=y(ee,N);if(!ci(Y)){const le=ee.positions.slice();le[_.value?_.value._index:1]=Y,ee.positions=le}}else if(i==="VcMeasurementHeight")D(ee,Q);else if(i==="VcDrawingRectangle"||i==="VcDrawingRegular"||i==="VcMeasurementRegular"||i==="VcMeasurementRectangle"){const Y=ee.positions,le=Y[0],ce=J.fromCartesian(le,L.scene.globe.ellipsoid),me=J.fromCartesian(Q,L.scene.globe.ellipsoid);!e.clampToGround&&(me.height=ce.height),Y[_.value?_.value._index:1]=J.toCartesian(me,L.scene.globe.ellipsoid)}else if(i==="VcAnalysisSightline"){const Y=ee.positions;if(_.value){const le=_.value._index>0?1:0;Y[le]=Q}else Y[1]=Q}else{const Y=ee.positions.slice();Y[_.value?_.value._index:1]=Q,ee.positions=Y}De(()=>{s("drawEvt",Object.assign({index:X,renderDatas:k,name:l,finished:!1,position:ee.positions[1],windowPoistion:N,type:_.value?g:"new"},p.value[X]),L)})},q=N=>{var L,H,z;if(C.value=[0,0,0],v.value=!1,!e.editable)return;g.value=N;const{viewer:Q,drawingFabInstance:Z}=o;if(N==="move"){c.value=u.value.drawingTipEditing,d.value=Ee.Drawing,_.value=b.value,h=k.value[_.value._vcPolylineIndx].positions[_.value._index],m.value=!0;const J=Z==null?void 0:Z.proxy;J.editingActionName=l}else if(N==="remove"){const J=b.value._vcPolylineIndx;k.value[J].positions.splice(b.value._index,1)}else if(N==="removeAll"){const J=b.value._vcPolylineIndx;k.value.splice(J,1)}else{const J=b.value._vcPolylineIndx,X=k.value[J];(z=(H=(L=e.editorOpts)==null?void 0:L[N])==null?void 0:H.callback)==null||z.call(H,J,X)}s("editorEvt",{type:N,renderDatas:k,name:l,index:b.value._vcPolylineIndx},Q)},K={computedRenderDatas:p,renderDatas:k,startNew:S,stop:B,clear:()=>{k.value=[],B()},handleMouseClick:F,handleMouseMove:G};return Object.assign(n.proxy,K),()=>{var N,L,H;const{createGuid:z}=Cesium,Q=[];if(p.value.forEach((Z,J)=>{var X;const ee=i==="VcDrawingRectangle"||i==="VcDrawingRegular"||i==="VcMeasurementRegular"||i==="VcMeasurementRectangle",Y=ee?(X=Z.polygonPositions)==null?void 0:X.slice():Z.positions;ee&&(Y==null||Y.push(Y[0]));const le=Object.assign({},e.polylineOpts,Z.polylineOpts);e.clampToGround&&delete le.arcType;const ce=Object.assign({},e.primitiveOpts,Z.primitiveOpts);if((Y==null?void 0:Y.length)&&(Y==null?void 0:Y.length)>1&&(Q.push(P(e.clampToGround?Ya:Un,{...ce,show:Z.show&&ce.show||e.editable||Z.drawStatus===Ee.Drawing,onReady:de=>{var ge;(ge=ce==null?void 0:ce.onReady)==null||ge.call(ce,de),de.cesiumObject._vcPolylineIndex=J}},()=>P(Hn,{id:z()},()=>P(e.clampToGround?ns:Wn,{positions:Y,...le})))),i==="VcAnalysisViewshed"&&Q.push(P(pv,{...Z.viewshedOpts}))),Z.polygonPositions&&Z.polygonPositions.length>2){const de=Object.assign({},e==null?void 0:e.polygonOpts,Z==null?void 0:Z.polygonOpts);de.clampToGround=e.clampToGround,Q.push(P(ts,{positions:Y,show:Z.show&&(de==null?void 0:de.show),...de,onReady:ge=>{var be;$(ge),(be=de==null?void 0:de.onReady)==null||be.call(de,ge),ge.cesiumObject._vcPolylineIndex=J}}))}Z.xyPolylinePositions&&Z.xyPolylinePositions.length>1&&Q.push(P(Un,{show:Z.show&&ce||e.editable||Z.drawStatus===Ee.Drawing,...ce,onReady:de=>{var ge;(ge=ce==null?void 0:ce.onReady)==null||ge.call(ce,de),de.cesiumObject._vcPolylineIndex=J}},()=>P(Hn,{id:z()},()=>P(Wn,{positions:Z.xyPolylinePositions,...le})))),Z.xyBoxPositions&&Z.xyBoxPositions.length>1&&Q.push(P(Un,{show:Z.show&&ce||e.editable||Z.drawStatus===Ee.Drawing,...ce},()=>P(Hn,{id:z()},()=>P(Wn,{positions:Z.xyBoxPositions,...le}))));const me=Object.assign({},e.pointOpts,Z.pointOpts);Q.push(P(xo,{enableMouseEvent:e.enableMouseEvent,show:Z.show,points:Z.points.map((de,ge)=>{const be=de.position,ve=Object.assign({},me,de);return{position:be,id:z(),_vcPolylineIndx:J,...ve,show:((ve==null?void 0:ve.show)||e.editable||Z.drawStatus===Ee.Drawing)&&(i==="VcAnalysisSightline"&&Z.positions.length===3?ge!==1:!0)}}),onMouseover:E,onMouseout:T,onReady:j})),Q.push(P(_o,{enableMouseEvent:e.enableMouseEvent,show:Z.show,labels:Z.labels,onReady:W}))}),((N=e.drawtip)==null?void 0:N.show)&&m.value){const{viewer:Z}=o;Q.push(P(Cn,{position:f.value,pixelOffset:(L=e.drawtip)==null?void 0:L.pixelOffset,teleport:{to:Z.container}},()=>P("div",{class:"vc-drawtip vc-tooltip--style"},c.value)))}if(v.value){const Z=[];if(b.value){const X=e.editorOpts;for(const ee in X)if(!Array.isArray(X[ee])&&typeof X[ee]!="number"){const Y={...X[ee]};delete Y.color,Z.push(P(ri,{style:{color:X[ee].color,background:X[ee].background},...Y,onclick:q.bind(void 0,ee)},()=>P(Pt,{...X[ee].tooltip},()=>{var le;return P("strong",null,((le=X[ee].tooltip)==null?void 0:le.tip)||a(`vc.measurement.editor.${ee}`))})))}}const{viewer:J}=o;Q.push(P(Cn,{position:C.value,pixelOffset:(H=e.editorOpts)==null?void 0:H.pixelOffset,teleport:{to:J.container},onMouseenter:A,onMouseleave:R},()=>P("div",{class:"vc-editor"},Z)))}return P(xr,{ref:M,show:e.show,onReady:I},()=>Q)}}var V0=te({name:"VcMeasurementDistance",props:{...kt,showComponentLines:{type:Boolean,default:!1},measureUnits:Object,polylineOpts:Object,primitiveOpts:Object,labelOpts:Object,xLabelOpts:Object,xAngleLabelOpts:Object,yLabelOpts:Object,yAngleLabelOpts:Object,locale:String,decimals:Object,autoUpdateLabelPosition:Boolean},emits:vt,setup(e,t){return en(e,t,"VcMeasurementDistance")}});function Er(e,t,i){const n=re(),r=Be(e,t,n);if(r===void 0)return;const{t:a}=Ct(),o=r.$services,{emit:s}=t,{drawingType:l,drawTip:c,drawTipOpts:u,drawStatus:d,canShowDrawTip:m,drawTipPosition:f,showEditor:v,editorPosition:C,mouseoverPoint:b,editingPoint:_,primitiveCollectionRef:M,editorType:g,onMouseoverPoints:E,onMouseoutPoints:T,onMouseenterEditor:A,onMouseleaveEditor:R,onPrimitiveCollectionReady:I,onVcCollectionPointReady:j,onVcCollectionLabelReady:W,onVcPrimitiveReady:$}=ou(e,t,n,i,o);let k,h;const p=10,y=ie([]);e.preRenderDatas&&e.preRenderDatas.length&&e.preRenderDatas.forEach(L=>{const H={show:!0,positions:Hi(L),tempPositions:[],drawStatus:Ee.AfterDraw,loop:e.loop,distance:0,area:0,distances:[],labels:[],angles:[],polylineOpts:{},pointOpts:{},labelOpts:{},labelsOpts:{},primitiveOpts:{},polygonOpts:{}};y.value.push(H)});const O=ye(()=>{const{Cartesian3:L,createGuid:H,defined:z,Math:Q}=Cesium,Z=[],{viewer:J}=o;return y.value.forEach((X,ee)=>{var Y,le,ce,me,de,ge,be,ve,ue;const xe=Pe([]),V=[],se=[];let he=0;const we=[];X.points=X.positions.map(yt=>({position:yt}));const Se=X.positions.slice();if(i==="VcAnalysisSightline"){const yt=Se.shift();yt&&Se.forEach(Le=>{const Ue=[];Ue.push(yt);const si=[];M.value.cesiumObject._primitives.forEach(ze=>{ze instanceof Cesium.PointPrimitiveCollection&&si.push(...ze._pointPrimitives),ze instanceof Cesium.Primitive&&si.push(ze)});const dt=bh(yt,Le,o.viewer,si);z(dt)&&Ue.push(dt),Ue.push(Le);let ht=0;const He=[];for(let ze=0;ze<Ue.length-1;ze++){const nn=L.distance(Ue[ze],Ue[ze+1]);He.push(nn),ht=ht+nn}Z.push({...X,positions:Ue,distance:ht,distances:He})})}else{e.loop&&Se.length>2&&Se.push(Se[0]);for(let Le=0;Le<Se.length-1;Le++){let Ue=0;((Y=e.polylineOpts)==null?void 0:Y.arcType)===0?Ue=Us(Se[Le],Se[Le+1],o.viewer.scene.globe.ellipsoid):Ue=L.distance(Se[Le],Se[Le+1]),V.push(Ue),he=he+Ue;const si=Object.assign({},e.labelsOpts,X.labelsOpts);if(Ue>0&&Se.length>2&&e.showDistanceLabel&&xe.push({text:it.distanceToString(Ue,(le=e.measureUnits)==null?void 0:le.distanceUnits,e.locale,(ce=e.decimals)==null?void 0:ce.distance),position:L.midpoint(Se[Le],Se[Le+1],{}),id:H(),...si}),Se.length>2&&e.showAngleLabel&&(Le>0||e.loop)){const _t=Se[Le===0?Se.length-2:Le-1],dt=Se[Le],ht=Se[Le+1],He=L.subtract(_t,dt,{}),ze=L.subtract(ht,dt,{});let nn=0;L.ZERO.equals(He)||L.ZERO.equals(ze)||(nn=L.angleBetween(He,ze)),se.push(nn),xe.push({text:it.angleToString(nn,(me=e.measureUnits)==null?void 0:me.angleUnits,e.locale,(de=e.decimals)==null?void 0:de.angle),position:dt,id:H(),...si})}e.showDashedLine&&(we.push({positions:[Se[Le],x(Se[Le])]}),Le===Se.length-2&&we.push({positions:[Se[Le+1],x(Se[Le+1])]}))}const yt=vh(Se),Ht=Object.assign({},e.labelOpts,X.labelOpts);e.showLabel&&(i.includes("Area")?xe.push({text:it.areaToString(yt,(ge=e.measureUnits)==null?void 0:ge.areaUnits,e.locale,(be=e.decimals)==null?void 0:be.area),position:Se[Se.length-1],id:H(),...Ht}):xe.push({text:it.distanceToString(he,(ve=e.measureUnits)==null?void 0:ve.distanceUnits,e.locale,(ue=e.decimals)==null?void 0:ue.distance),position:Se[Se.length-1],id:H(),...Ht})),X.positionsDegreesArray=X.positions.map(Le=>{const Ue=Cesium.Cartographic.fromCartesian(Le,J.scene.globe.ellipsoid);return[Q.toDegrees(Ue.longitude),Q.toDegrees(Ue.latitude),Ue.height]}),Z.push({...X,labels:xe,distance:he,distances:V,area:yt,angles:se,dashedLines:we})}}),Z});n.mount=async()=>{const{viewer:L}=o;return e.autoUpdateLabelPosition&&L.scene.preRender.addEventListener(w),!0},n.unmount=async()=>{const{viewer:L}=o;return e.autoUpdateLabelPosition&&L.scene.preRender.removeEventListener(w),!0};const x=L=>{const{defined:H,defaultValue:z}=Cesium,{viewer:Q}=o,Z=Q.scene,J=Z.globe,X=Z.frameState.mapProjection.ellipsoid,ee=X.cartesianToCartographic(L);return ee.height=H(J)?z(J.getHeight(ee),0):0,X.cartographicToCartesian(ee)},w=()=>{O.value.forEach((L,H)=>{var z;const Q=L.positions;if(!(Q.length<2)){const{defined:Z,SceneTransforms:J,Cartesian2:X,HorizontalOrigin:ee}=Cesium,{viewer:Y}=o,le=Y.scene;let ce=Q[0];const me=J.wgs84ToWindowCoordinates(le,ce,{});let de=Z(me)?X.clone(me,{}):X.fromElements(Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,{}),ge=de.y;const ue=((z=M.value)==null?void 0:z.cesiumObject)._primitives.filter(V=>V instanceof Cesium.LabelCollection)[H]._labels,xe=ue[ue.length-1];for(let V=1;V<Q.length;V++){const se=J.wgs84ToWindowCoordinates(le,Q[V],{});if(Z(se)){const he=(de.y-se.y)/(se.x-de.x);ue[V-1]!==xe&&(ue[V-1].horizontalOrigin=0<he?ee.LEFT:ee.RIGHT),se.y<ge&&(ge=se.y,ce=Q[V]),de=X.clone(se,de)}L.drawStatus===Ee.AfterDraw&&(xe.position=ce)}}})},D=()=>{const L={show:!1,positions:[],tempPositions:[],drawStatus:Ee.BeforeDraw,loop:e.loop,distance:0,area:0,distances:[],labels:[],angles:[],polylineOpts:{},pointOpts:{},labelOpts:{},labelsOpts:{},primitiveOpts:{},polygonOpts:{}};if(i==="VcMeasurementHorizontal"){const{Cartesian3:H,Plane:z}=Cesium;Object.assign(L,{dashedLines:[],heightPlane:new z(H.UNIT_X,0),heightPlaneCV:new z(H.UNIT_X,0),height:0,firstMove:!1,tempNextPos:new H})}d.value=Ee.BeforeDraw,y.value.push(L),m.value=!0,c.value=u.value.drawingTipStart},S=(L=!0)=>{L&&d.value===Ee.Drawing&&y.value.pop();const H=_.value?_.value._vcPolylineIndex:y.value.length-1,z=y.value[H];z&&(z.positions=z.tempPositions,z.drawStatus=Ee.AfterDraw),d.value=Ee.AfterDraw,m.value=!1,f.value=[0,0,0]},B=(L,H)=>{var z;const{viewer:Q,drawingFabInstance:Z,getWorldPosition:J,selectedDrawingActionInstance:X}=o,ee=Z==null?void 0:Z.proxy;if(H.button===2&&H.ctrl){const se=ee.getDrawingActionInstance(l);ee.toggleAction(se),De(()=>{s("drawEvt",{name:l,finished:!0,windowPoistion:L,type:"cancel"},Q)});return}d.value===Ee.AfterDraw&&D();const{defined:Y,Cartesian2:le,Plane:ce,Cartesian3:me}=Cesium,de=_.value?_.value._vcPolylineIndex:y.value.length-1,ge=y.value[de],be=ge.tempPositions;if(H.button===2&&_.value){g.value==="insert"?ge.positions.splice(_.value._index,1):ge.positions[_.value._index]=h,d.value=Ee.AfterDraw,ge.drawStatus=Ee.AfterDraw,_.value=void 0,c.value=u.value.drawingTipStart,ee.editingActionName=void 0,m.value=Y(X),De(()=>{s("drawEvt",Object.assign({index:de,name:l,renderDatas:y,finished:!0,windowPoistion:L,type:"cancel"},O.value[de]),Q)});return}if(k=k||new Cesium.Cartesian2(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),le.magnitude(le.subtract(k,L,{}))<p||(H.button===2&&d.value===Ee.Drawing&&be.length>1&&(be.pop(),F(L)),H.button!==0))return;const ve=Q.scene,ue=J(ve,L,{});if(!Y(ue))return;let xe=!1,V="new";if(i==="VcMeasurementHorizontal"){if(_.value)d.value=Ee.AfterDraw,_.value=void 0,xe=!0,V=g.value,c.value=u.value.drawingTipStart;else if(be.length===0){const se=ve.frameState.mapProjection.ellipsoid;be.push(ue),ge.positions=be,ge.heightPlane=ce.fromPointNormal(ue,se.geodeticSurfaceNormal(ue,{}),ge.heightPlane);const he=se.cartesianToCartographic(ue,{}),we=ve.mapProjection.project(he,{}),Se=me.fromElements(we.z,we.x,we.y,we);ge.heightPlaneCV=ce.fromPointNormal(Se,me.UNIT_X,ge.heightPlaneCV),ge.height=he.height,ge.firstMove=!0,ge.drawStatus=Ee.Drawing,ge.show=!0,d.value=Ee.Drawing}else be.push(ge.tempNextPos),ge.positions=be,ge.firstMove=!0;c.value=u.value.drawingTipEnd}else{if(_.value){if(At().hasTouch===!0){const se=J(ve,L,{});Y(se)&&(ge.positions.splice(_.value._index,1,se),_.value.pixelSize=((z=e.pointOpts)==null?void 0:z.pixelSize)*1)}d.value=Ee.AfterDraw,_.value=void 0,xe=!0,V=g.value,c.value=u.value.drawingTipStart}else be.push(ue),ge.positions=be,ge.show=!0,ge.drawStatus=Ee.Drawing,d.value=Ee.Drawing,m.value=!0,c.value=u.value.drawingTipEnd;V!=="new"&&(ee.editingActionName=void 0,m.value=Y(X))}le.clone(L,k),De(()=>{s("drawEvt",Object.assign({index:de,name:l,renderDatas:y,finished:xe,position:i==="VcMeasurementHorizontal"?ge.positions[ge.positions.length-1]:ue,windowPoistion:L,type:V},O.value[de]),Q)})},F=(L,H)=>{const{viewer:z,getWorldPosition:Q}=o,Z=z.scene,J=Q(Z,L,{}),{defined:X}=Cesium;if(!X(J)||(f.value=J,d.value!==Ee.Drawing))return;const ee=_.value?_.value._vcPolylineIndex:y.value.length-1,Y=y.value[ee];let le="new";if(i==="VcMeasurementHorizontal"){const{SceneMode:ce,IntersectionTests:me,Cartesian3:de}=Cesium,ge=Z.frameState.mapProjection.ellipsoid,be=Y.positions,ve=Z.camera.getPickRay(L);let ue,xe;if(Z.mode===ce.SCENE3D&&Y.heightPlane)ue=me.rayPlane(ve,Y.heightPlane);else if(Z.mode===ce.COLUMBUS_VIEW&&Y.heightPlaneCV)ue=me.rayPlane(ve,Y.heightPlaneCV),ue=de.fromElements(ue.y,ue.z,ue.x,ue),xe=Z.mapProjection.unproject(ue),ue=ge.cartographicToCartesian(xe);else if(ue=Z.camera.pickEllipsoid(L,ge),X(ue)){const V=ge.cartesianToCartographic(ue);V.height=Y.height||0,ue=ge.cartographicToCartesian(V,ue)}if(!X(ue))return;if(!Y.firstMove&&(H==null?void 0:H.shift)){const V=be[be.length-2],se=Y.tempNextPos,he=de.subtract(se,V,{});let we=de.subtract(ue,V,{});we=de.projectVector(we,he,we),ue=de.add(V,we,ue)}if(_.value)Y.positions.splice(_.value._index,1,ue),le=g.value;else{const V=Y.tempPositions.slice();V.push(ue),Y.positions=V,Y.firstMove=!1,Y.tempNextPos=Object.assign(ue),c.value=u.value.drawingTipEnd}}else if(_.value)Y.positions.splice(_.value._index,1,J),le=g.value;else{const ce=Y.tempPositions.slice();ce.push(J),Y.positions=ce}De(()=>{s("drawEvt",Object.assign({index:ee,name:l,renderDatas:y,finished:!1,position:i==="VcMeasurementHorizontal"?Y.positions[Y.positions.length-1]:J,windowPoistion:L,type:le},O.value[ee]),z)})},G=L=>{const{drawingFabInstance:H,selectedDrawingActionInstance:z,viewer:Q}=o;if(d.value===Ee.Drawing){const Z=_.value?_.value._vcPolylineIndex:y.value.length-1,J=y.value[Z];S(!1),c.value=u.value.drawingTipStart,De(()=>{s("drawEvt",Object.assign({index:Z,name:l,renderDatas:y,finished:!0,position:J.positions[J.positions.length-1],windowPoistion:L,type:"new"},O.value[Z]),Q),e.mode===1&&(H==null?void 0:H.proxy).toggleAction(z)})}},q=()=>{let L=_.value._vcPolylineIndex,H=_.value._index;if(i==="VcAnalysisSightline")for(let z=0;z<y.value.length;z++){const Q=y.value[z];for(let Z=0;Z<Q.positions.length;Z++){const J=Q.positions[Z];_.value.position.equals(J)&&(L=z,H=Z)}}return[L,H]},U=L=>{var H,z,Q;if(C.value=[0,0,0],v.value=!1,!e.editable)return;const{viewer:Z,drawingFabInstance:J}=o,X=J==null?void 0:J.proxy;if(g.value=L,L==="move"){c.value=u.value.drawingTipEditing,d.value=Ee.Drawing,_.value=b.value,m.value=!0;const ee=q();_.value._vcPolylineIndex=ee[0],_.value._index=ee[1],h=y.value[ee[0]].positions[ee[1]],X.editingActionName=l}else if(L==="insert"){const ee=b.value._vcPolylineIndex;y.value[ee].positions.splice(b.value._index,0,b.value.position),_.value=b.value,m.value=!0,d.value=Ee.Drawing,c.value=u.value.drawingTipEditing,X.editingActionName=l}else if(L==="remove"){const ee=b.value._vcPolylineIndex,Y=y.value[ee];Y.positions.length>2&&Y.positions.splice(b.value._index,1)}else if(L==="removeAll"){const ee=b.value._vcPolylineIndex;y.value.splice(ee,1)}else{const ee=b.value._vcPolylineIndex,Y=y.value[ee];(Q=(z=(H=e.editorOpts)==null?void 0:H[L])==null?void 0:z.callback)==null||Q.call(z,ee,Y)}s("editorEvt",{type:L,renderDatas:y,name:l,index:b.value._vcPolylineIndex},Z)},N={computedRenderDatas:O,renderDatas:y,startNew:D,stop:S,clear:()=>{y.value=[],S()},handleMouseClick:B,handleMouseMove:F,handleDoubleClick:G};return Object.assign(n.proxy,N),()=>{var L,H;const{createGuid:z,Cartesian3:Q}=Cesium,Z=[],J=[];if(O.value.forEach((X,ee)=>{var Y,le;const ce=X.positions.slice();if(ce.length>1){X.loop&&ce.push(ce[0]);const be=Object.assign({},e.polylineOpts,X.polylineOpts);e.clampToGround&&delete be.arcType;const ve=Object.assign({},e.primitiveOpts,X.primitiveOpts);Z.push(P(e.clampToGround?Ya:Un,{show:X.show&&ve.show||e.editable||X.drawStatus===Ee.Drawing,...ve,onReady:ue=>{var xe;(xe=ve==null?void 0:ve.onReady)==null||xe.call(ve,ue),ue.cesiumObject._vcPolylineIndex=ee}},()=>P(Hn,{id:z()},()=>P(e.clampToGround?ns:Wn,{positions:ce,...be}))))}const me=Object.assign({},e.dashLineOpts,X.dashLineOpts),de=Object.assign({},e.dashLinePrimitiveOpts,X.dashLinePrimitiveOpts);(Y=X.dashedLines)==null||Y.forEach(be=>{Z.push(P(Un,{show:X.show&&e.dashLinePrimitiveOpts.show||e.editable||X.drawStatus===Ee.Drawing,...de},()=>P(Hn,{id:z()},()=>P(Wn,{positions:be.positions,...me}))))});const ge=Object.assign({},e.pointOpts,X.pointOpts);if(Z.push(P(xo,{enableMouseEvent:e.enableMouseEvent,show:X.show,points:X.points.map((be,ve)=>{var ue;const xe=be.position;let V=!1;for(let we=0;we<J.length;we++)Q.equals(xe,J[we])&&(V=!0);const se=(((ue=e.pointOpts)==null?void 0:ue.show)||e.editable||X.drawStatus===Ee.Drawing)&&(i==="VcAnalysisSightline"&&X.positions.length===3?ve!==1:!0)&&!V;i==="VcAnalysisSightline"&&J.push(xe);const he=Object.assign({},ge,be);return{position:xe,id:z(),_vcPolylineIndex:ee,show:se,...he}}),onMouseover:E,onMouseout:T,onReady:j})),Z.push(P(_o,{enableMouseEvent:e.enableMouseEvent,show:X.show,labels:X.labels,onReady:W})),ce.length>2&&(i.includes("Polygon")||i.includes("Area"))){const be=Object.assign({},e.polygonOpts,X.polygonOpts);Z.push(P(ts,{positions:ce,clampToGround:e.clampToGround,show:X.show&&((le=e.polygonOpts)==null?void 0:le.show),...be,onReady:ve=>{var ue;$(ve),(ue=be==null?void 0:be.onReady)==null||ue.call(be,ve),ve.cesiumObject._vcPolylineIndex=ee}}))}}),((L=e.drawtip)==null?void 0:L.show)&&m.value){const{viewer:X}=o;Z.push(P(Cn,{position:f.value,pixelOffset:e.drawtip.pixelOffset,teleport:{to:X.container}},()=>P("div",{class:"vc-drawtip vc-tooltip--style"},c.value)))}if(v.value){const X=[];if(b.value){const Y=e.editorOpts;for(const le in Y)if(!Array.isArray(Y[le])&&typeof Y[le]!="number"){const ce={...Y[le]};delete ce.color,X.push(P(ri,{style:{color:Y[le].color,background:Y[le].background},...ce,onclick:U.bind("polyline",le)},()=>P(Pt,{...Y[le].tooltip},()=>{var me;return P("strong",null,((me=Y[le].tooltip)==null?void 0:me.tip)||a(`vc.drawing.editor.${le}`))})))}}const{viewer:ee}=o;Z.push(P(Cn,{position:C.value,pixelOffset:(H=e.editorOpts)==null?void 0:H.pixelOffset,teleport:{to:ee.container},onMouseenter:A,onMouseleave:R},()=>P("div",{class:"vc-editor"},X)))}return P(xr,{ref:M,show:e.show,onReady:I},()=>Z)}}var $0=te({name:"VcMeasurementPolyline",props:{...kt,polylineOpts:Object,primitiveOpts:Object,loop:Boolean,clampToGround:Boolean,measureUnits:Object,labelOpts:Object,labelsOpts:Object,locale:String,decimals:Object,showLabel:Boolean,showAngleLabel:Boolean,showDistanceLabel:Boolean,autoUpdateLabelPosition:Boolean},emits:vt,setup(e,t){return Er(e,t,"VcMeasurementPolyline")}}),G0=te({name:"VcMeasurementHorizontal",props:{...kt,measureUnits:Object,polylineOpts:Object,primitiveOpts:Object,dashLineOpts:Object,dashLinePrimitiveOpts:Object,labelOpts:Object,labelsOpts:Object,locale:String,decimals:Object,showLabel:Boolean,showAngleLabel:Boolean,showDashedLine:Boolean,showDistanceLabel:Boolean,autoUpdateLabelPosition:Boolean},emits:vt,setup(e,t){return Er(e,t,"VcMeasurementHorizontal")}}),U0=te({name:"VcMeasurementVertical",props:{...kt,measureUnits:Object,polylineOpts:Object,primitiveOpts:Object,labelOpts:Object,locale:String,decimals:Object,autoUpdateLabelPosition:Boolean},emits:vt,setup(e,t){return en(e,t,"VcMeasurementVertical")}}),H0=te({name:"VcMeasurementHeight",props:{...kt,measureUnits:Object,polylineOpts:Object,primitiveOpts:Object,labelOpts:Object,locale:String,decimals:Object,autoUpdateLabelPosition:Boolean},emits:vt,setup(e,t){return en(e,t,"VcMeasurementHeight")}});function au(e,t,i){const n=re(),r=Be(e,t,n);if(r===void 0)return;const{t:a}=Ct(),o=r.$services,{emit:s}=t,{drawingType:l,drawTip:c,drawTipOpts:u,drawStatus:d,canShowDrawTip:m,drawTipPosition:f,showEditor:v,editorPosition:C,mouseoverPoint:b,editingPoint:_,primitiveCollectionRef:M,editorType:g,onMouseoverPoints:E,onMouseoutPoints:T,onMouseenterEditor:A,onMouseleaveEditor:R,onPrimitiveCollectionReady:I,onVcCollectionPointReady:j,onVcCollectionLabelReady:W}=ou(e,t,n,i,o),$=ie([]);let k,h=[];i==="VcDrawingPin"&&e.billboardOpts.image===""&&(e.billboardOpts.image=Cesium.buildModuleUrl("Assets/Textures/pin.svg")),h.push(fe(()=>e.editable,U=>{const{drawingFabInstance:K,selectedDrawingActionInstance:N}=o;U&&(N==null?void 0:N.name)===l&&(K==null?void 0:K.proxy).toggleAction(N)}));const p=(U,K,N)=>{const L=Cesium.Cartographic.fromCartesian(U,N.globe.ellipsoid),H=[Cesium.Math.toDegrees(L.longitude),Cesium.Math.toDegrees(L.latitude),L.height];K.positionDegrees=H},y=()=>{const{Cartesian3:U}=Cesium,K={drawStatus:Ee.Drawing,show:!1,position:new U,lng:0,lat:0,height:0,slope:0,pointOpts:{},labelOpts:{},billboardOpts:{}};$.value.push(K),d.value=Ee.Drawing,m.value=!0,c.value=u.value.drawingTipStart},O=(U=!0)=>{U&&d.value===Ee.Drawing&&$.value.pop();const K=_.value?_.value._vcPolylineIndx:$.value.length-1,N=$.value[K];N&&(N.drawStatus=Ee.AfterDraw),d.value=Ee.AfterDraw,m.value=!1,f.value=[0,0,0]},x=(U,K)=>{const{viewer:N,drawingFabInstance:L,getWorldPosition:H,selectedDrawingActionInstance:z}=o,Q=L==null?void 0:L.proxy;if(K.button===2&&K.ctrl){const Y=Q==null?void 0:Q.getDrawingActionInstance(l);Q==null||Q.toggleAction(Y),De(()=>{s("drawEvt",{name:l,finished:!0,windowPoistion:U,type:"cancel"},N)});return}const Z=_.value?_.value._vcPolylineIndx:$.value.length-1,J=$.value[Z];if(K.button===2&&_.value){Q.editingActionName=void 0,$.value[Z]=k,d.value=Ee.AfterDraw,$.value[Z].drawStatus=Ee.AfterDraw,_.value=void 0,c.value=u.value.drawingTipStart,De(()=>{s("drawEvt",{name:l,index:Z,renderDatas:$,finished:!0,windowPoistion:U,type:"cancel"},N)});return}if(K.button!==0)return;const{defined:X}=Cesium;let ee="new";if(d.value===Ee.BeforeDraw){const Y=N.scene,le=H(Y,U,{});if(!X(le))return;J.position=le,J.show=!0,J.drawStatus=Ee.AfterDraw,d.value=Ee.AfterDraw,c.value=u.value.drawingTipStart,De(()=>{s("drawEvt",{index:Z,renderDatas:$,name:l,finished:!0,position:le,windowPoistion:U,type:ee},N)})}else{d.value=Ee.AfterDraw,J.drawStatus=Ee.AfterDraw;const Y=N.scene;if(At().hasTouch===!0){const le=H(Y,U,{});p(le,J,Y),X(le)&&(J.position=le,J.show=!0)}_.value?(_.value=void 0,Q.editingActionName=void 0,m.value=!1,ee=g.value):e.mode===1&&De(()=>{Q.toggleAction(z)}),z&&(c.value=u.value.drawingTipStart,m.value=!0),De(()=>{s("drawEvt",{index:Z,renderDatas:$,name:l,finished:!0,position:$.value[Z].position,positionDegrees:$.value[Z].positionDegrees,windowPoistion:U,type:ee},N)})}},w=U=>{const{viewer:K,getWorldPosition:N}=o,L=K.scene,{defined:H,SceneMode:z}=Cesium;if(L.mode!==z.MORPHING){const Q=N(L,U,{});if(!H(Q)||(f.value=Q,d.value===Ee.AfterDraw&&y(),d.value!==Ee.Drawing))return;const Z=_.value?_.value._vcPolylineIndx:$.value.length-1,J=$.value[Z];J.position=Q,p(Q,J,L),D(J,U);const X=_.value?g.value:"new";De(()=>{s("drawEvt",{index:Z,renderDatas:$,name:l,finished:!1,position:Q,positionDegrees:J.positionDegrees,windowPoistion:U,type:X},K)})}},D=(U,K)=>{const{viewer:N}=o,L=N.scene,{defined:H,defaultValue:z,Math:Q,SceneMode:Z}=Cesium,X=L.frameState.mapProjection.ellipsoid.cartesianToCartographic(U.position,{}),ee=L.globe;let Y=H(ee)?z(ee.getHeight(X),0):0;Y=e.heightReference===0?X.height:X.height-Y,Q.equalsEpsilon(Y,0,Q.EPSILON3)&&(Y=0);let le=0;L.mode!==Z.SCENE2D&&(K||(K=L.cartesianToCanvasCoordinates(U.position,{})),le=S(L,K)),U.show=!0,U.lng=X.longitude,U.lat=X.latitude,U.height=Y,U.slope=le},S=(U,K)=>{const{getWorldPosition:N}=o,{defined:L,Cartesian2:H,Cartesian3:z,Math:Q}=Cesium,Z=N(U,K,{});if(L(Z)){const J=U.camera.position,X=z.distance(Z,J),ee=[new z,new z,new z,new z,new z],Y=new z,le=new z;if(!(1e4<X)){const ce=ee[0],me=ee[1],de=ee[2],ge=ee[3];let be=U.frameState.mapProjection.ellipsoid.geodeticSurfaceNormal(Z,Y);be=z.negate(be,be);const ve=H.clone(K,ee[0]);ve.x-=2,ve.y-=2;const ue=H.clone(K,ee[1]);ue.x-=2,ue.y+=2;const xe=H.clone(K,ee[2]);xe.x+=2,xe.y+=2;const V=H.clone(K,ee[3]);V.x+=2,V.y-=2;const se=N(U,ve,ce),he=N(U,ue,me),we=N(U,xe,de),Se=N(U,V,ge);let yt,Ht,Le,Ue,si,_t,dt,ht;L(se)&&(yt=z.subtract(se,Z,ce),Ht=z.magnitude(yt)/X<=.05?z.normalize(yt,ce):void 0),L(he)&&(Le=z.subtract(he,Z,me),Ue=z.magnitude(Le)/X<=.05?z.normalize(Le,me):void 0),L(we)&&(si=z.subtract(we,Z,de),_t=z.magnitude(si)/X<=.05?z.normalize(si,de):void 0),L(Se)&&(dt=z.subtract(Se,Z,ge),ht=z.magnitude(dt)/X<=.05?z.normalize(dt,ge):void 0);let He=z.clone(z.ZERO,le),ze=ee[4];if(L(Ht)&&L(Ue)&&(ze=z.normalize(z.cross(Ht,Ue,ze),ze),He=z.add(He,ze,He)),L(Ue)&&L(_t)&&(ze=z.normalize(z.cross(Ue,_t,ze),ze),He=z.add(He,ze,He)),L(_t)&&L(ht)&&(ze=z.normalize(z.cross(_t,ht,ze),ze),He=z.add(He,ze,He)),L(ht)&&L(Ht)&&(ze=z.normalize(z.cross(ht,Ht,ze),ze),He=z.add(He,ze,He)),!He.equals(z.ZERO))return He=z.normalize(He,He),Q.asinClamped(Math.abs(Math.sin(z.angleBetween(He,be))))}}return 0},B=U=>{var K,N,L;if(C.value=[0,0,0],v.value=!1,!e.editable)return;g.value=U;const{viewer:H,drawingFabInstance:z}=o,Q=z==null?void 0:z.proxy;if(U==="move")c.value=u.value.drawingTipEditing,d.value=Ee.Drawing,_.value=b.value,m.value=!0,k=Object.assign({},$.value[_.value._vcPolylineIndx]),Q.editingActionName=l;else if(U==="remove"){const Z=b.value._vcPolylineIndx;$.value.splice(Z,1)}else{const Z=b.value._vcPolylineIndx,J=$.value[Z];(L=(N=(K=e.editorOpts)==null?void 0:K[U])==null?void 0:N.callback)==null||L.call(N,Z,J)}s("editorEvt",{type:U,name:l,renderDatas:$,index:b.value._vcPolylineIndx},H)},F=()=>{$.value=[],O()},G=U=>{var K,N,L,H,z,Q,Z,J;const{viewer:X}=o,Y=X.scene.frameState.mapProjection.ellipsoid.cartesianToCartographic(U.position,{});return Cesium.defined(Y)?`${a("vc.measurement.point.lng")}${it.angleToString(Y.longitude,(K=e.measureUnits)==null?void 0:K.angleUnits,e.locale,(N=e.decimals)==null?void 0:N.lng)}
${a("vc.measurement.point.lat")}${it.angleToString(Y.latitude,(L=e.measureUnits)==null?void 0:L.angleUnits,e.locale,(H=e.decimals)==null?void 0:H.lat)}
${a("vc.measurement.point.height")}${it.distanceToString(U.height,(z=e.measureUnits)==null?void 0:z.distanceUnits,e.locale,(Q=e.decimals)==null?void 0:Q.height)}
${a("vc.measurement.point.slope")}${it.angleToString(U.slope,(Z=e.measureUnits)==null?void 0:Z.slopeUnits,e.locale,(J=e.decimals)==null?void 0:J.slope)}`:""};if(e.preRenderDatas&&e.preRenderDatas.length){const{viewer:U}=o;e.preRenderDatas.forEach(K=>{const N={drawStatus:Ee.AfterDraw,show:!0,position:Qe(K),lng:0,lat:0,height:0,slope:0,pointOpts:{},labelOpts:{},billboardOpts:{}},L=Cesium.Cartographic.fromCartesian(N.position,U.scene.globe.ellipsoid);N.positionDegrees=[Cesium.Math.toDegrees(L.longitude),Cesium.Math.toDegrees(L.latitude),L.height],D(N),$.value.push(N)})}ot(()=>{h.forEach(U=>U()),h=[]});const q={renderDatas:$,startNew:y,stop:O,clear:F,handleMouseClick:x,handleMouseMove:w};return Object.assign(n.proxy,q),()=>{var U,K,N;const{createGuid:L}=Cesium,H=[],z=[],Q=[],Z=[];if($.value.forEach((J,X)=>{var ee;const Y=Object.assign({},e.pointOpts,J.pointOpts);z.push({position:J.position,id:L(),_vcPolylineIndx:X,...Y,show:J.show&&((ee=e.pointOpts)==null?void 0:ee.show)||e.editable||J.drawStatus===Ee.Drawing});const le=Object.assign({},e.labelOpts,J.labelOpts);if(e.showLabel)if(i==="VcDrawingPin"){const ce=Object.assign({},e.billboardOpts,J.billboardOpts);Z.push({position:J.position,id:L(),_vcPolylineIndx:X,...ce}),le.text&&Q.push({position:J.position,id:L(),...le})}else Q.push({position:J.position,id:L(),text:G(J),...le})}),H.push(P(xo,{enableMouseEvent:e.enableMouseEvent,points:z,onMouseover:E,onMouseout:T,onReady:j})),H.push(P(_o,{enableMouseEvent:e.enableMouseEvent,labels:Q,onReady:W})),i==="VcDrawingPin"&&H.push(P(nu,{enableMouseEvent:e.enableMouseEvent,billboards:Z})),((U=e.drawtip)==null?void 0:U.show)&&m.value){const{viewer:J}=o;H.push(P(Cn,{position:f.value,pixelOffset:(K=e.drawtip)==null?void 0:K.pixelOffset,teleport:{to:J.container}},()=>P("div",{class:"vc-drawtip vc-tooltip--style"},c.value)))}if(v.value){const J=[];if(b.value){const ee=e.editorOpts;for(const Y in ee)if(!Array.isArray(ee[Y])&&typeof ee[Y]!="number"){const le={...ee[Y]};delete le.color,J.push(P(ri,{style:{color:ee[Y].color,background:ee[Y].background},...le,onclick:B.bind(void 0,Y)},()=>P(Pt,{...ee[Y].tooltip},()=>{var ce;return P("strong",null,((ce=ee[Y].tooltip)==null?void 0:ce.tip)||a(`vc.drawing.editor.${Y}`))})))}}const{viewer:X}=o;H.push(P(Cn,{position:C.value,pixelOffset:(N=e.editorOpts)==null?void 0:N.pixelOffset,teleport:{to:X.container},onMouseenter:A,onMouseleave:R},()=>P("div",{class:"vc-editor"},J)))}return P(xr,{ref:M,show:e.show,onReady:I},()=>H)}}var W0=te({name:"VcMeasurementPoint",props:{...kt,measureUnits:Object,labelOpts:Object,locale:String,decimals:Object,heightReference:Number,showLabel:Boolean},emits:vt,setup(e,t){return au(e,t,"VcMeasurementPoint")}}),q0=te({name:"VcMeasurementArea",props:{...kt,measureUnits:Object,polylineOpts:Object,primitiveOpts:Object,polygonOpts:Object,labelOpts:Object,labelsOpts:Object,locale:String,decimals:Object,showDistanceLabel:Boolean,showAngleLabel:Boolean,showLabel:Boolean,loop:Boolean,clampToGround:Boolean,autoUpdateLabelPosition:Boolean},emits:vt,setup(e,t){return Er(e,t,"VcMeasurementArea")}}),Z0=te({name:"VcMeasurementRectangle",props:{...kt,measureUnits:Object,polylineOpts:Object,primitiveOpts:Object,polygonOpts:Object,labelOpts:Object,labelsOpts:Object,clampToGround:Boolean,edge:Number,locale:String,decimals:Object,showLabel:Boolean,showDistanceLabel:Boolean,showAngleLabel:Boolean,loop:Boolean,autoUpdateLabelPosition:Boolean},emits:vt,setup(e,t){return en(e,t,"VcMeasurementRectangle")}}),Q0=te({name:"VcMeasurementRegular",props:{...kt,polylineOpts:Object,primitiveOpts:Object,polygonOpts:Object,labelOpts:Object,labelsOpts:Object,clampToGround:Boolean,edge:Number,measureUnits:Object,locale:String,decimals:Object,showLabel:Boolean,showDistanceLabel:Boolean,showAngleLabel:Boolean,loop:Boolean,autoUpdateLabelPosition:Boolean},emits:vt,setup(e,t){return en(e,t,"VcMeasurementRegular")}});function su(e,t,i,n,r,a,o){i.cesiumEvents=[];const s=Be(e,t,i);if(s===void 0)return;const{t:l}=Ct(),{$services:c}=s,{emit:u}=t,d=ie(!1),m=Pe({}),f=di(e),v=ie(null),C=ie(null),b=ie(!1),_=ie(null);let M,g;const E=(F,G)=>{var q,U;const K=g==null?void 0:g.cmpRef.value;(q=K==null?void 0:K.handleMouseClick)==null||q.call(K,F.position,G);let N;const L=i.proxy;if(L.editingActionName&&(N=y(L.editingActionName)),N&&N!==g){const H=N.cmpRef.value;(U=H==null?void 0:H.handleMouseClick)==null||U.call(H,F.position,G)}},T=(F,G)=>{var q,U;const K=g==null?void 0:g.cmpRef.value;(q=K==null?void 0:K.handleMouseMove)==null||q.call(K,F.endPosition,G);let N;const L=i.proxy;if(L.editingActionName&&(N=y(L.editingActionName)),N&&N!==g){const H=N.cmpRef.value;(U=H==null?void 0:H.handleMouseMove)==null||U.call(H,F.endPosition,G)}},A=(F,G)=>{var q,U;const K=g==null?void 0:g.cmpRef.value;(q=K==null?void 0:K.handleDoubleClick)==null||q.call(K,F.position,G);let N;const L=i.proxy;if(L.editingActionName&&(N=y(L.editingActionName)),N&&N!==g){const H=N.cmpRef.value;(U=H==null?void 0:H.handleDoubleClick)==null||U.call(H,F.position,G)}},{activate:R,deactivate:I,destroy:j,isActive:W}=em(c,{handleMouseClick:E,handleMouseMove:T,handleDoubleClick:A});i.createCesiumObject=async()=>(d.value=!0,M=new am,n.value),i.mount=async()=>(k(),b.value=!0,R(),!0),i.unmount=async()=>(g&&(p(g),g=void 0),I(),j(),b.value=!1,!0);const $=(F,G,q)=>{const{Cesium3DTileFeature:U,Cesium3DTileset:K,Cartesian3:N,defined:L,Model:H,Ray:z}=Cesium;if(Cesium.SuperMapVersion)return F.pickPosition(G);let Q;const Z={},J=new z;if(F.pickPositionSupported){M.hide(F);const X=F.pick(G,1,1);if(M.restore(F),L(X)&&(X instanceof U||X.primitive instanceof K||X.primitive instanceof H||Cesium.S3MTilesLayer&&X.primitive instanceof Cesium.S3MTilesLayer)&&(Q=F.pickPosition(G,Z),L(Q)))return N.clone(Q,q)}if(L(F.globe)){const X=F.camera.getPickRay(G,J);return Q=F.globe.pick(X,F,Z),L(Q)?N.clone(Q,q):void 0}},k=()=>{var F;const G=f.style.value;m.left=G.left,m.top=G.top,m.transform=G.transform;const q=f.attach.value,U=(F=oe(C))==null?void 0:F.$el;if(U!==void 0){const K=U.getBoundingClientRect();G.width=`${K.width}px`,G.height=`${K.height}px`,(q.bottom||q.top)&&!q.left&&!q.right&&(G.left="50%",G.transform="translate(-50%, 0)"),(q.left||q.right)&&!q.top&&!q.bottom&&(G.top="50%",G.transform="translate(0, -50%)")}Object.assign(m,G)},h=ie(null),p=F=>{var G;const{viewer:q}=c;if(pi(F)&&(F=y(F)),!F){s.logger.error("Invalid drawingActionOption or drawingActionOption name");return}const U=O(F.name);if(U!==-1){if(g!==void 0){g.actionOpts.color=h.value||"";const K=g.cmpRef.value;(G=K.stop)==null||G.call(K),g.isActive=!1,u("activeEvt",{type:g.name,option:g,isActive:!1},q)}(g==null?void 0:g.name)===(F==null?void 0:F.name)?(g=void 0,n.value[U].actionOpts.color=h.value||"red"):De(()=>{n.value[U].cmpRef.value.startNew(),h.value=n.value[U].actionOpts.color,n.value[U].actionOpts.color=e.activeColor,n.value[U].isActive=!0,g=n.value[U],u("activeEvt",{type:g.name,option:g,isActive:!0},q)})}},y=F=>n.value.find(G=>G.name===F),O=F=>n.value.findIndex(G=>G.name===F),x=F=>{F?R():(g&&p(g),I()),r.modelValue=F,u("fabUpdated",F)},w=()=>{n.value.forEach(F=>{var G;(G=F.cmpRef.value)==null||G.clear()}),g&&p(g)},D=()=>Mn(s.getServices(),{get drawingFabInstance(){return i},get selectedDrawingActionInstance(){return g},get getWorldPosition(){return $},get drawingHandlerActive(){return W}}),S=({cesiumObject:F})=>{F._vcId=o};return on(zi,D()),Object.assign(i.proxy,{clearAll:w,deactivate:I,activate:R,toggleAction:p,getFabRef:()=>C.value,getDrawingActionInstance:y,getDrawingActionInstances:()=>n.value,getSelectedDrawingActionInstance:()=>g}),{renderContent:()=>{if(d.value){const F=[],G=[];n.value.forEach(U=>{F.push(P(Aa,{ref:U.actionRef,style:U.actionStyle,class:U.actionClass,...U.actionOpts,onClick:()=>{p(U)}},()=>P(Pt,{...U.actionOpts.tooltip},()=>P("strong",null,U.tip)))),U.cmp&&G.push(P(U.cmp,{ref:U.cmpRef,editable:e.editable,clampToGround:e.clampToGround,mode:e.mode,onDrawEvt:(K,N)=>{u("drawEvt",K,N)},onEditorEvt:(K,N)=>{u("editorEvt",K,N)},onMouseEvt:(K,N)=>{u("mouseEvt",K,N)},...U.cmpOpts}))}),n.value.length&&F.push(P(Aa,{style:{background:a.color,color:a.textColor},class:"vc-draw-button vc-draw-clear",...a,onClick:w},()=>P(Pt,{...a.tooltip},()=>P("strong",null,a.tooltip.tip||l(`vc.${o}.clear.tip`)))));const q=[];return b.value&&q.push(P("div",{ref:v,class:"vc-drawings-container "+f.classes.value,style:m},t.slots.body!==void 0?t.slots.body(n.value):P(bc,{ref:C,class:"vc-draw-button",style:{background:r.color,color:r.textColor},...r,"onUpdate:modelValue":x},{default:()=>F,tooltip:()=>P(Pt,{...r.tooltip},()=>P("strong",null,r.tooltip.tip||(r.modelValue?l("vc.drawing.collapse"):l("vc.drawing.expand"))))}))),q.push(P(xr,{ref:_,show:e.show,onReady:S},()=>G)),q}else return ne("v-if")}}}const U4={...vt,fabUpdated:e=>!0};var rs=te({name:"VcMeasurements",props:Jc,emits:U4,setup(e,t){var i;const n=re();n.cesiumClass="VcMeasurements";const{t:r}=Ct(),a=Pe(Object.assign({},rt.clearActionOpts,e.clearActionOpts)),o=Pe(Object.assign({},rt.mainFabOpts,e.mainFabOpts)),s=Pe(Object.assign({},rt.distanceActionOpts,e.distanceActionOpts)),l=Pe(Object.assign({},rt.distanceMeasurementOpts,e.distanceMeasurementOpts)),c=Pe(Object.assign({},rt.componentDistanceActionOpts,e.componentDistanceActionOpts)),u=Pe(Object.assign({},rt.componentDistanceMeasurementOpts,e.componentDistanceMeasurementOpts)),d=Pe(Object.assign({},rt.polylineActionOpts,e.polylineActionOpts)),m=Pe(Object.assign({},rt.polylineMeasurementOpts,e.polylineMeasurementOpts)),f=Pe(Object.assign({},rt.horizontalActionOpts,e.horizontalActionOpts)),v=Pe(Object.assign({},rt.horizontalMeasurementOpts,e.horizontalMeasurementOpts)),C=Pe(Object.assign({},rt.verticalActionOpts,e.verticalActionOpts)),b=Pe(Object.assign({},rt.verticalMeasurementOpts,e.verticalMeasurementOpts)),_=Pe(Object.assign({},rt.heightActionOpts,e.heightActionOpts)),M=Pe(Object.assign({},rt.heightMeasurementOpts,e.heightMeasurementOpts)),g=Pe(Object.assign({},rt.areaActionOpts,e.areaActionOpts)),E=Pe(Object.assign({},rt.areaMeasurementOpts,e.areaMeasurementOpts)),T=Pe(Object.assign({},rt.pointActionOpts,e.pointActionOpts)),A=Pe(Object.assign({},rt.pointMeasurementOpts,e.pointMeasurementOpts)),R=Pe(Object.assign({},rt.rectangleActionOpts,e.rectangleActionOpts)),I=Pe(Object.assign({},rt.rectangleMeasurementOpts,e.rectangleMeasurementOpts)),j=Pe(Object.assign({},rt.regularActionOpts,e.regularActionOpts)),W=Pe(Object.assign({},rt.regularMeasurementOpts,e.regularMeasurementOpts)),$=Pe(Object.assign({},rt.circleActionOpts,e.circleActionOpts)),k=Pe(Object.assign({},rt.circleMeasurementOpts,e.circleMeasurementOpts)),h={};h.distanceActionOpts=s,h.distanceMeasurementOpts=l,h.componentDistanceActionOpts=c,h.componentDistanceMeasurementOpts=u,h.polylineActionOpts=d,h.polylineMeasurementOpts=m,h.horizontalActionOpts=f,h.horizontalMeasurementOpts=v,h.verticalActionOpts=C,h.verticalMeasurementOpts=b,h.heightActionOpts=_,h.heightMeasurementOpts=M,h.areaActionOpts=g,h.areaMeasurementOpts=E,h.pointActionOpts=T,h.pointMeasurementOpts=A,h.rectangleActionOpts=R,h.rectangleMeasurementOpts=I,h.regularActionOpts=j,h.regularMeasurementOpts=W,h.circleActionOpts=$,h.circleMeasurementOpts=k,h.clearActionOpts=a;const p=ye(()=>e.measurements.map(O=>({name:O,type:"measurement",actionStyle:{background:h[`${Rt(O)}ActionOpts`].color,color:h[`${Rt(O)}ActionOpts`].textColor},actionClass:`vc-measure-${O} vc-measure-button`,actionRef:ie(null),actionOpts:h[`${Rt(O)}ActionOpts`],cmp:y(O),cmpRef:ie(null),cmpOpts:h[`${Rt(O)}MeasurementOpts`],tip:h[`${Rt(O)}ActionOpts`].tooltip.tip||r(`vc.measurement.${O}.tip`),isActive:!1})));function y(O){switch(O){case"distance":case"component-distance":return V0;case"polyline":return $0;case"horizontal":return G0;case"vertical":return U0;case"height":return H0;case"point":return W0;case"area":return q0;case"rectangle":return Z0;case"regular":case"circle":return Q0;default:return}}return(i=su(e,t,n,p,o,a,"measurement"))==null?void 0:i.renderContent}});rs.install=e=>{e.component(rs.name,rs)};const X0=rs;var H4=X0;const W4=X0,q4=Object.assign({},ct,{icon:"vc-icons-drawing-point"}),Z4=Object.assign({},ct,{icon:"vc-icons-drawing-polyline"}),Q4=Object.assign({},ct,{icon:"vc-icons-drawing-polygon"}),X4=Object.assign({},ct,{icon:"vc-icons-drawing-rectangle"}),Y4=Object.assign({},ct,{icon:"vc-icons-drawing-pin"}),J4=Object.assign({},qa,{pointOpts:Object.assign({},bn,{show:!1}),billboardOpts:I6,labelOpts:Object.assign({},ut,{pixelOffset:[0,-30],verticalOrigin:1}),showLabel:!0}),K4=Object.assign({},ct,{direction:"right",icon:"vc-icons-drawing-button",activeIcon:"vc-icons-drawing-button",verticalActionsAlign:"center",hideIcon:!1,persistent:!1,modelValue:!0,hideActionOnClick:!1,color:"info"}),Y0=["pin","point","polyline","polygon","rectangle","regular","circle"],eD=e=>{let t=!0;return e.forEach(i=>{Y0.includes(i)||(console.error(`VueCesium: unknown drawing type: ${i}`),t=!1)}),t},lu={...Xc,drawings:{type:Array,default:()=>Y0,validator:eD},mainFabOpts:{type:Object,default:()=>K4},pinActionOpts:{type:Object,default:()=>Y4},pinDrawingOpts:{type:Object,default:()=>J4},pointActionOpts:{type:Object,default:()=>q4},pointDrawingOpts:{type:Object,default:()=>qa},polylineActionOpts:{type:Object,default:()=>Z4},polylineDrawingOpts:{type:Object,default:()=>Bp},polygonActionOpts:{type:Object,default:()=>Q4},polygonDrawingOpts:{type:Object,default:()=>Za},rectangleActionOpts:{type:Object,default:()=>X4},rectangleDrawingOpts:{type:Object,default:()=>Qc},circleActionOpts:{type:Object,default:()=>Fp},circleDrawingOpts:{type:Object,default:()=>L6},regularActionOpts:{type:Object,default:()=>jp},regularDrawingOpts:{type:Object,default:()=>B6}},Gt=vi(lu);var J0=te({name:"VcDrawingPin",props:{...kt,billboardOpts:Object,labelOpts:Object,heightReference:Number,showLabel:Boolean},emits:vt,setup(e,t){return au(e,t,"VcDrawingPin")}}),K0=te({name:"VcDrawingPoint",props:{...kt,heightReference:Number,labelOpts:Object,showLabel:Boolean},emits:vt,setup(e,t){return au(e,t,"VcDrawingPoint")}}),ey=te({name:"VcDrawingPolyline",props:{...kt,polylineOpts:Object,primitiveOpts:Object,loop:Boolean,clampToGround:Boolean,showLabel:Boolean,showDistanceLabel:Boolean,showAngleLabel:Boolean,labelOpts:Object,labelsOpts:Object,autoUpdateLabelPosition:Boolean},emits:vt,setup(e,t){return Er(e,t,"VcDrawingPolyline")}}),ty=te({name:"VcDrawingPolygon",props:{...kt,polylineOpts:Object,primitiveOpts:Object,polygonOpts:Object,loop:Boolean,clampToGround:Boolean,showLabel:Boolean,showDistanceLabel:Boolean,showAngleLabel:Boolean,labelOpts:Object,labelsOpts:Object,autoUpdateLabelPosition:Boolean},emits:vt,setup(e,t){return Er(e,t,"VcDrawingPolygon")}}),cu=te({name:"VcDrawingRegular",props:{...kt,polylineOpts:Object,polygonOpts:Object,primitiveOpts:Object,clampToGround:Boolean,edge:Number,showLabel:Boolean,showDistanceLabel:Boolean,showAngleLabel:Boolean,labelOpts:Object,labelsOpts:Object,loop:Boolean,autoUpdateLabelPosition:Boolean},emits:vt,setup(e,t){return en(e,t,"VcDrawingRegular")}}),iy=te({name:"VcDrawingRectangle",props:{...kt,polylineOpts:Object,primitiveOpts:Object,polygonOpts:Object,clampToGround:Boolean,showLabel:Boolean,showDistanceLabel:Boolean,showAngleLabel:Boolean,labelOpts:Object,labelsOpts:Object,loop:Boolean,autoUpdateLabelPosition:Boolean},emits:vt,setup(e,t){return en(e,t,"VcDrawingRectangle")}});const tD={...vt,fabUpdated:e=>!0};var os=te({name:"VcDrawings",props:lu,emits:tD,setup(e,t){var i;const n=re();n.cesiumClass="VcDrawings";const{t:r}=Ct(),a={},o=Pe(Object.assign({},Gt.clearActionOpts,e.clearActionOpts)),s=Pe(Object.assign({},Gt.mainFabOpts,e.mainFabOpts)),l=Pe(Object.assign({},Gt.pointActionOpts,e.pointActionOpts)),c=Pe(Object.assign({},Gt.pointDrawingOpts,e.pointDrawingOpts)),u=Pe(Object.assign({},Gt.polylineActionOpts,e.polylineActionOpts)),d=Pe(Object.assign({},Gt.polylineDrawingOpts,e.polylineDrawingOpts)),m=Pe(Object.assign({},Gt.polygonActionOpts,e.polygonActionOpts)),f=Pe(Object.assign({},Gt.polygonDrawingOpts,e.polygonDrawingOpts)),v=Pe(Object.assign({},Gt.rectangleActionOpts,e.rectangleActionOpts)),C=Pe(Object.assign({},Gt.rectangleDrawingOpts,e.rectangleDrawingOpts)),b=Pe(Object.assign({},Gt.circleActionOpts,e.circleActionOpts)),_=Pe(Object.assign({},Gt.circleDrawingOpts,e.circleDrawingOpts)),M=Pe(Object.assign({},Gt.regularActionOpts,e.regularActionOpts)),g=Pe(Object.assign({},Gt.regularDrawingOpts,e.regularDrawingOpts)),E=Pe(Object.assign({},Gt.pinActionOpts,e.pinActionOpts)),T=Pe(Object.assign({},Gt.pinDrawingOpts,e.pinDrawingOpts));a.pointActionOpts=l,a.pointDrawingOpts=c,a.polylineActionOpts=u,a.polylineDrawingOpts=d,a.polygonActionOpts=m,a.polygonDrawingOpts=f,a.rectangleActionOpts=v,a.rectangleDrawingOpts=C,a.circleActionOpts=b,a.circleDrawingOpts=_,a.regularActionOpts=M,a.regularDrawingOpts=g,a.pinActionOpts=E,a.pinDrawingOpts=T,a.clearActionOpts=o;const A=ye(()=>e.drawings.map(I=>({name:I,type:"drawing",actionStyle:{background:a[`${Rt(I)}ActionOpts`].color,color:a[`${Rt(I)}ActionOpts`].textColor},actionClass:`vc-draw-${I} vc-draw-button`,actionRef:ie(null),actionOpts:a[`${Rt(I)}ActionOpts`],cmp:R(I),cmpRef:ie(null),cmpOpts:a[`${Rt(I)}DrawingOpts`],tip:a[`${Rt(I)}ActionOpts`].tooltip.tip||r(`vc.drawing.${Rt(I)}.tip`),isActive:!1})));function R(I){switch(I){case"pin":return J0;case"point":return K0;case"polyline":return ey;case"polygon":return ty;case"rectangle":return C.regular?cu:iy;case"circle":case"regular":return cu;default:return}}return(i=su(e,t,n,A,s,o,"drawing"))==null?void 0:i.renderContent}});os.install=e=>{e.component(os.name,os)};const ny=os;var iD=ny;const nD=ny;class rD{constructor(t){const{Resource:i,defaultValue:n,Credit:r,Event:a}=Cesium;this._url=t.url;const o=i.createIfNeeded(this._url);o.appendForwardSlash(),this._ready=!1,this._resource=o,this._tileDiscardPolicy=t.tileDiscardPolicy,this._tileWidth=256,this._tileHeight=256,this._minimumLevel=t.minimumLevel||0,this._maximumLevel=t.maximumLevel||20,this._tilingScheme=t.tilingScheme||new Cesium.WebMercatorTilingScheme,this._rectangle=t.rectangle||this._tilingScheme.rectangle;let s=t.credit;typeof s=="string"&&(s=new r(s)),this._credit=s,this.enablePickFeatures=n(t.enablePickFeatures,!1),this._hasAlphaChannel=n(t.hasAlphaChannel,!0),this._errorEvent=new a,this._readyPromise=or(),this._ready=!0,this._readyPromise.resolve(!0),this._subdomains=t.subdomains||["01","02","03","04"],this._domain=t.domain||"webst",this._style=t.mapStyle||"6",this._lang=t.lang||"zh_cn",this._scl=t.scl||"1",this._ltype=t.ltype||"0"}get url(){return this._resource._url}get proxy(){return this._resource.proxy}get tileWidth(){if(!this._ready)throw new Cesium.DeveloperError("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}get tileHeight(){if(!this._ready)throw new Cesium.DeveloperError("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}get maximumLevel(){if(!this._ready)throw new Cesium.DeveloperError("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}get minimumLevel(){if(!this.ready)throw new Cesium.DeveloperError("minimumLevel must not be called before the imagery provider is ready.");return this._minimumLevel}get tilingScheme(){if(!this._ready)throw new Cesium.DeveloperError("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}get rectangle(){if(!this.ready)throw new Cesium.DeveloperError("rectangle must not be called before the imagery provider is ready.");return this._rectangle}get tileDiscardPolicy(){if(!this.ready)throw new Cesium.DeveloperError("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._tileDiscardPolicy}get errorEvent(){return this._errorEvent}get ready(){return this._ready}get readyPromise(){return this._readyPromise.promise}get credit(){if(!this.ready)throw new Cesium.DeveloperError("credit must not be called before the imagery provider is ready.");return this._credit}get hasAlphaChannel(){if(!this.ready)throw new Cesium.DeveloperError("hasAlphaChannel must not be called before the imagery provider is ready.");return this._hasAlphaChannel}getTileCredits(t,i,n){if(!this.ready)throw new Cesium.DeveloperError("getTileCredits must not be called before the imagery provider is ready.")}requestImage(t,i,n,r){if(!this.ready)throw new Cesium.DeveloperError("requestImage must not be called before the imagery provider is ready.");return Cesium.ImageryProvider.loadImage(this,oD.call(this,t,i,n,r))}pickFeatures(t,i,n,r,a){}}function oD(e,t,i,n){let r=this._url;const a=this._subdomains;return r=r.replace("{domain}",this._domain).replace("{s}",a[(e+t+i)%a.length]).replace("{lang}",this._lang).replace("{style}",this._style).replace("{scl}",this._scl).replace("{ltype}",this._ltype).replace("{x}",e).replace("{y}",t).replace("{z}",i),this._resource.getDerivedResource({url:r,request:n})}var aD=rD;const ry={url:{type:String,default:"https://{domain}{s}.is.autonavi.com/appmaptile?lang={lang}&size=1&style={style}&scl={scl}<ype={ltype}&x={x}&y={y}&z={z}"},subdomains:{type:Array,default:()=>["01","02","03","04"]},domain:{type:String,default:"webst"},lang:{type:String,default:"zh_cn"},mapStyle:{type:String,default:"6"},scl:{type:String,default:"1"},ltype:{type:String,default:"0"},...Et,...ui,...ii,...St,...Ai,...Bn};var oy=te({name:"VcImageryProviderAmap",props:ry,emits:nt,setup(e,t){const i=re();i.cesiumClass="AMapImageryProvider";const n=tt(e,t,i);if(n!==void 0)return i.createCesiumObject=async()=>{Cesium.AMapImageryProvider=Cesium.AMapImageryProvider||aD,n.unwatchFns.length===0&&n.setPropsWatcher(!0);const r=n.transformProps(e);return new Cesium.AMapImageryProvider(r)},()=>{var r;return ne(ae(((r=i.proxy)==null?void 0:r.$options.name)||""))}}});const ay={url:{type:[String,Object],default:"https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"},...vl,...Wr,usePreCachedTilesIfAvailable:{type:Boolean,default:!0},...gl,...ma,...St,...Ai,...Re,...Et,...Qi,...Xi,...ii};var sy=te({name:"VcImageryProviderArcgis",props:ay,emits:nt,setup(e,t){const i=re();return i.cesiumClass="ArcGisMapServerImageryProvider",tt(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});class ly{constructor(t,i){isNaN(t)&&(t=isNaN(t)?0:t),pi(t)&&(t=parseFloat(t)),isNaN(i)&&(i=isNaN(i)?0:i),pi(i)&&(i=parseFloat(i)),this.lng=t,this.lat=i}equals(t){return t&&this.lat===t.lat&&this.lng===t.lng}}ly.isInRange=function(e){return e&&e.lng<=180&&e.lng>=-180&&e.lat<=74&&e.lat>=-74};var tn=ly;class sD{constructor(t,i){this.x=t||0,this.y=i||0}equals(t){return t&&t.x===this.x&&t.y===this.y}}var cy=sD;const Fe=class{lngLatToMercator(e,t){return Fe.convertLL2MC(e)}lngLatToPoint(e){const t=Fe.convertLL2MC(e);return new cy(t.lng,t.lat)}mercatorToLngLat(e,t){return Fe.convertMC2LL(e)}pointToLngLat(e){const t=new tn(e.x,e.y);return Fe.convertMC2LL(t)}pointToPixel(e,t,i,n,r){if(!e)return;e=this.lngLatToMercator(e,r),i=this.lngLatToMercator(i);const a=this.getZoomUnits(t),o=Math.round((e.lng-i.lng)/a+n.width/2),s=Math.round((i.lat-e.lat)/a+n.height/2);return new cy(o,s)}pixelToPoint(e,t,i,n,r){if(!e)return;const a=this.getZoomUnits(t),o=i.lng+a*(e.x-n.width/2),s=i.lat-a*(e.y-n.height/2),l=new tn(o,s);return this.mercatorToLngLat(l,r)}getZoomUnits(e){return Math.pow(2,18-e)}};let Ut=Fe;Ut.EARTHRADIUS=637099681e-2,Ut.MCBAND=[1289059486e-2,836237787e-2,5591021,348198983e-2,167804312e-2,0],Ut.LLBAND=[75,60,45,30,15,0],Ut.MC2LL=[[1410526172116255e-23,898305509648872e-20,-1.9939833816331,200.9824383106796,-187.2403703815547,91.6087516669843,-23.38765649603339,2.57121317296198,-.03801003308653,173379812e-1],[-7435856389565537e-24,8983055097726239e-21,-.78625201886289,96.32687599759846,-1.85204757529826,-59.36935905485877,47.40033549296737,-16.50741931063887,2.28786674699375,1026014486e-2],[-3030883460898826e-23,898305509983578e-20,.30071316287616,59.74293618442277,7.357984074871,-25.38371002664745,13.45380521110908,-3.29883767235584,.32710905363475,685681737e-2],[-1981981304930552e-23,8983055099779535e-21,.03278182852591,40.31678527705744,.65659298677277,-4.44255534477492,.85341911805263,.12923347998204,-.04625736007561,448277706e-2],[309191371068437e-23,8983055096812155e-21,6995724062e-14,23.10934304144901,-.00023663490511,-.6321817810242,-.00663494467273,.03430082397953,-.00466043876332,25551644e-1],[2890871144776878e-24,8983055095805407e-21,-3068298e-14,7.47137025468032,-353937994e-14,-.02145144861037,-1234426596e-14,.00010322952773,-323890364e-14,826088.5]],Ut.LL2MC=[[-.0015702102444,111320.7020616939,1704480524535203,-10338987376042340,26112667856603880,-35149669176653700,26595700718403920,-10725012454188240,1800819912950474,82.5],[.0008277824516172526,111320.7020463578,6477955746671607e-7,-4082003173641316e-6,1077490566351142e-5,-1517187553151559e-5,1205306533862167e-5,-5124939663577472e-6,9133119359512032e-7,67.5],[.00337398766765,111320.7020202162,4481351045890365e-9,-2339375119931662e-8,7968221547186455e-8,-1159649932797253e-7,9723671115602145e-8,-4366194633752821e-8,8477230501135234e-9,52.5],[.00220636496208,111320.7020209128,51751.86112841131,3796837749470245e-9,992013.7397791013,-122195221711287e-8,1340652697009075e-9,-620943.6990984312,144416.9293806241,37.5],[-.0003441963504368392,111320.7020576856,278.2353980772752,2485758690035394e-9,6070.750963243378,54821.18345352118,9540.606633304236,-2710.55326746645,1405.483844121726,22.5],[-.0003218135878613132,111320.7020701615,.00369383431289,823725.6402795718,.46104986909093,2351.343141331292,1.58060784298199,8.77738589078284,.37238884252424,7.45]],Ut.getDistanceByMC=function(e,t){if(!e||!t||(e=Fe.convertMC2LL(e),!e))return 0;const i=Fe.toRadians(e.lng),n=Fe.toRadians(e.lat);if(t=Fe.convertMC2LL(t),!t)return 0;const r=Fe.toRadians(t.lng),a=Fe.toRadians(t.lat);return Fe.getDistance(i,r,n,a)},Ut.getDistanceByLL=function(e,t){if(!e||!t)return 0;e.lng=Fe.getLoop(e.lng,-180,180),e.lat=Fe.getRange(e.lat,-74,74),t.lng=Fe.getLoop(t.lng,-180,180),t.lat=Fe.getRange(t.lat,-74,74);const i=Fe.toRadians(e.lng),n=Fe.toRadians(e.lat),r=Fe.toRadians(t.lng),a=Fe.toRadians(t.lat);return Fe.getDistance(i,r,n,a)},Ut.convertMC2LL=function(e){let t;const i=new tn(Math.abs(e.lng),Math.abs(e.lat));for(let r=0;r<Fe.MCBAND.length;r++)if(i.lat>=Fe.MCBAND[r]){t=Fe.MC2LL[r];break}const n=Fe.convertor(e,t);return new tn(n==null?void 0:n.lng.toFixed(6),n==null?void 0:n.lat.toFixed(6))},Ut.convertLL2MC=function(e){let t;e.lng=Fe.getLoop(e.lng,-180,180),e.lat=Fe.getRange(e.lat,-74,74);const i=new tn(e.lng,e.lat);for(let r=0;r<Fe.LLBAND.length;r++)if(i.lat>=Fe.LLBAND[r]){t=Fe.LL2MC[r];break}if(!t){for(let r=Fe.LLBAND.length-1;r>=0;r--)if(i.lat<=-Fe.LLBAND[r]){t=Fe.LL2MC[r];break}}const n=Fe.convertor(e,t);return new tn(n==null?void 0:n.lng.toFixed(2),n==null?void 0:n.lat.toFixed(2))},Ut.convertor=function(e,t){if(!e||!t)return;let i=t[0]+t[1]*Math.abs(e.lng);const n=Math.abs(e.lat)/t[9];let r=t[2]+t[3]*n+t[4]*n*n+t[5]*n*n*n+t[6]*n*n*n*n+t[7]*n*n*n*n*n+t[8]*n*n*n*n*n*n;return i*=e.lng<0?-1:1,r*=e.lat<0?-1:1,new tn(i,r)},Ut.getDistance=function(e,t,i,n){return Fe.EARTHRADIUS*Math.acos(Math.sin(i)*Math.sin(n)+Math.cos(i)*Math.cos(n)*Math.cos(t-e))},Ut.toRadians=function(e){return Math.PI*e/180},Ut.toDegrees=function(e){return 180*e/Math.PI},Ut.getRange=function(e,t,i){return t!=null&&(e=Math.max(e,t)),i!=null&&(e=Math.min(e,i)),e},Ut.getLoop=function(e,t,i){for(;e>i;)e-=i-t;for(;e<t;)e+=i-t;return e};var lD=Ut;class cD{constructor(t){const{defaultValue:i,Ellipsoid:n,WebMercatorProjection:r,Cartesian2:a,Cartographic:o,Math:s,Rectangle:l}=Cesium;t=t||{},this._ellipsoid=i(t.ellipsoid,n.WGS84),this._projection=new r(this._ellipsoid);const c=new lD;this._projection.project=function(m,f){return f=f||{},t.projectionTransforms&&t.projectionTransforms.from!==t.projectionTransforms.to&&(t.projectionTransforms.to.toUpperCase()==="WGS84"?(f=tm(s.toDegrees(m.longitude),s.toDegrees(m.latitude)),f=Hl(f[0],f[1])):f=Hl(s.toDegrees(m.longitude),s.toDegrees(m.latitude))),f[0]=Math.min(f[0],180),f[0]=Math.max(f[0],-180),f[1]=Math.min(f[1],74.000022),f[1]=Math.max(f[1],-71.988531),f=c.lngLatToPoint(new tn(f[0],f[1])),new a(f.x,f.y)},this._projection.unproject=function(m,f){return f=f||{},f=c.mercatorToLngLat(new tn(m.x,m.y)),f[0]=(f[0]+180)%360-180,t.projectionTransforms&&t.projectionTransforms.from!==t.projectionTransforms.to&&(t.projectionTransforms.to.toUpperCase()==="WGS84"?(f=Ul(f.lng,f.lat),f=Wl(f[0],f[1])):f=Ul(f.lng,f.lat)),new o(Cesium.Math.toRadians(f[0]),Cesium.Math.toRadians(f[1]))},this._rectangleSouthwestInMeters=new a(-2003772637e-2,-1247410417e-2),this._rectangleNortheastInMeters=new a(2003772637e-2,1247410417e-2);const u=this._projection.unproject(this._rectangleSouthwestInMeters),d=this._projection.unproject(this._rectangleNortheastInMeters);this._rectangle=new l(u.longitude,u.latitude,d.longitude,d.latitude),this.resolutions=[];for(let m=0;m<19;m++)this.resolutions[m]=256*Math.pow(2,18-m)}getNumberOfXTilesAtLevel(t){return 1<<t}getNumberOfYTilesAtLevel(t){return 1<<t}rectangleToNativeRectangle(t,i){const{defined:n,Rectangle:r}=Cesium,a=this._projection,o=a.project(r.southwest(t)),s=a.project(r.northeast(t));return n(i)?(i.west=o.x,i.south=o.y,i.east=s.x,i.north=s.y,i):new r(o.x,o.y,s.x,s.y)}tileXYToNativeRectangle(t,i,n,r){const{defined:a,Rectangle:o}=Cesium,s=this.resolutions[n],l=t*s,c=(t+1)*s,u=((i=-i)+1)*s,d=i*s;return a(r)?(r.west=l,r.south=d,r.east=c,r.north=u,r):new o(l,d,c,u)}tileXYToRectangle(t,i,n,r){const{Cartesian2:a}=Cesium,o=this.tileXYToNativeRectangle(t,i,n,r),s=this._projection,l=s.unproject(new a(o.west,o.south)),c=s.unproject(new a(o.east,o.north));return o.west=l.longitude,o.south=l.latitude,o.east=c.longitude,o.north=c.latitude,o}positionToTileXY(t,i,n){const{Rectangle:r,defined:a,Cartesian2:o}=Cesium,s=this._rectangle;if(!r.contains(s,t))return;const c=this._projection.project(t);if(!a(c))return;const u=this.resolutions[i],d=Math.floor(c.x/u),m=-Math.floor(c.y/u);return a(n)?(n.x=d,n.y=m,n):new o(d,m)}get ellipsoid(){return this._ellipsoid}get rectangle(){return this._rectangle}get projection(){return this._projection}}var uD=cD;class dD{constructor(t){const{Resource:i,defaultValue:n,Credit:r,Event:a}=Cesium;this._subdomains=n(t.subdomains,["0","1","2","3"]),t.url?this._url=t.url:t.mapStyle==="img"?this._url="//maponline{s}.bdimg.com/starpic/u=x={x};y={y};z={z};v=009;type=sate&qt=satepc&app=webearth2&udt={udt}&fm=46&v=009":t.mapStyle==="vec"?this._url="//maponline{s}.bdimg.com/tile/?qt={qt}&x={x}&y={y}&z={z}&styles={styles}&scaler={scale}&udt={udt}&from=jsapi2_0":t.mapStyle==="traffic"?this._url="https://its.map.baidu.com/traffic/TrafficTileService?time={time}&label={labelStyle}&v=016&level={z}&x={x}&y={y}&scaler={scale}":this._url="//api.map.baidu.com/customimage/tile?&x={x}&y={y}&z={z}&udt={udt}&scale={scale}&ak={ak}&customid={mapStyle}";const o=i.createIfNeeded(this._url);o.appendForwardSlash(),this._ready=!1,this._resource=o,this._tileDiscardPolicy=t.tileDiscardPolicy,this._tileWidth=256,this._tileHeight=256,this._minimumLevel=t.minimumLevel||0,this._maximumLevel=t.maximumLevel||18,this._tilingScheme=new uD(t),this._rectangle=n(t.rectangle,this._tilingScheme.rectangle);let s=t.credit;typeof s=="string"&&(s=new r(s)),this._credit=s,this.enablePickFeatures=n(t.enablePickFeatures,!1),this._hasAlphaChannel=n(t.hasAlphaChannel,!0),this._errorEvent=new a,this._readyPromise=or(),this._ready=!0,this._readyPromise.resolve(!0),this._labelStyle=t.labelStyle||"web2D",this._qt=t.qt,this._styles=t.styles,this._scale=t.scale,this._ak=t.ak,this._mapStyle=t.mapStyle}get url(){return this._resource._url}get proxy(){return this._resource.proxy}get tileWidth(){if(!this._ready)throw new Cesium.DeveloperError("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}get tileHeight(){if(!this._ready)throw new Cesium.DeveloperError("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}get maximumLevel(){if(!this._ready)throw new Cesium.DeveloperError("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}get minimumLevel(){if(!this.ready)throw new Cesium.DeveloperError("minimumLevel must not be called before the imagery provider is ready.");return this._minimumLevel}get tilingScheme(){if(!this._ready)throw new Cesium.DeveloperError("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}get rectangle(){if(!this.ready)throw new Cesium.DeveloperError("rectangle must not be called before the imagery provider is ready.");return this._rectangle}get tileDiscardPolicy(){if(!this.ready)throw new Cesium.DeveloperError("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._tileDiscardPolicy}get errorEvent(){return this._errorEvent}get ready(){return this._ready}get readyPromise(){return this._readyPromise.promise}get credit(){if(!this.ready)throw new Cesium.DeveloperError("credit must not be called before the imagery provider is ready.");return this._credit}get hasAlphaChannel(){if(!this.ready)throw new Cesium.DeveloperError("hasAlphaChannel must not be called before the imagery provider is ready.");return this._hasAlphaChannel}getTileCredits(t,i,n){if(!this.ready)throw new Cesium.DeveloperError("getTileCredits must not be called before the imagery provider is ready.")}requestImage(t,i,n,r){if(!this.ready)throw new Cesium.DeveloperError("requestImage must not be called before the imagery provider is ready.");return Cesium.ImageryProvider.loadImage(this,hD.call(this,t,i,n,r))}pickFeatures(t,i,n,r,a){}}function hD(e,t,i,n){let r=this._url;const a=this._subdomains;return r=r.replace("{s}",a[(e+t+i)%a.length]).replace("{qt}",this._qt).replace("{x}",e).replace("{y}",-t).replace("{z}",i).replace("{styles}",this._styles).replace("{scale}",this._scale).replace("{mapStyle}",this._mapStyle).replace("{labelStyle}",this._labelStyle).replace("{time}",String(new Date().getTime())).replace("{udt}",String(new Date().getTime())),this._resource.getDerivedResource({url:r,request:n})}var mD=dD;const uy={...Ti,...St,...Re,...Wr,...Et,...ui,...ii,projectionTransforms:{type:[Boolean,Object],default:()=>({from:"BD09",to:"WGS84"})},scale:{type:String,default:"2"},ak:{type:String,default:"E4805d16520de693a3fe707cdc962045"},subdomains:{type:Array,default:()=>["0","1","2","3"]},mapStyle:{type:String,default:"vec"},qt:{type:String,default:"vtile"},styles:{type:String,default:"pl"}};var dy=te({name:"VcImageryProviderBaidu",props:uy,emits:nt,setup(e,t){const i=re();i.cesiumClass="BaiduMapImageryProvider";const n=tt(e,t,i);if(n!==void 0)return i.createCesiumObject=async()=>{Cesium.BaiduMapImageryProvider=Cesium.BaiduMapImageryProvider||mD,n.unwatchFns.length===0&&n.setPropsWatcher(!0);const r=n.transformProps(e);return new Cesium.BaiduMapImageryProvider(r)},()=>{var r;return ne(ae(((r=i.proxy)==null?void 0:r.$options.name)||""))}}});const hy={url:{type:[String,Object],default:"https://dev.virtualearth.net"},bmKey:String,tileProtocol:String,mapStyle:{type:String,default:"Aerial"},culture:{type:String,default:""},...Re,...Wr};var my=te({name:"VcImageryProviderBing",props:hy,emits:nt,setup(e,t){const i=re();return i.cesiumClass="BingMapsImageryProvider",tt(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const fy={...Ti,...Re,...Wr,...Et,metadata:Object};var py=te({name:"VcImageryProviderGoogle",props:fy,emits:nt,setup(e,t){const i=re();return i.cesiumClass="GoogleEarthEnterpriseImageryProvider",tt(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const vy={...Ai,...Re,cells:{type:Number,default:8},color:{type:[String,Object,Array],default:()=>[1,1,1,.4],watcherOptions:{cesiumObjectBuilder:Te}},...kh,glowWidth:{type:Number,default:6},backgroundColor:{type:[String,Array,Object],default:()=>[0,.5,0,.2],watcherOptions:{cesiumObjectBuilder:Te}},...Qi,...Xi,canvasSize:{type:Number,default:256}};var gy=te({name:"VcImageryProviderGrid",props:vy,emits:nt,setup(e,t){const i=re();return i.cesiumClass="GridImageryProvider",tt(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const fD={};var yy=te({name:"VcImageryProviderIon",props:{assetId:Number,...bl,server:[String,Object]},emits:nt,setup(e,t){const i=re();return i.cesiumClass="IonImageryProvider",tt(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const by={url:{type:[String,Object],default:"https://api.mapbox.com/styles/v1/"},username:{type:String,default:"mapbox"},styleId:String,...bl,tilesize:{type:Number,default:512},scaleFactor:Boolean,...Re,...ui,...ii,...St,...Et};var Cy=te({name:"VcImageryProviderMapbox",props:by,emits:nt,setup(e,t){const i=re();return i.cesiumClass="MapboxStyleImageryProvider",tt(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const wy={url:{type:String,default:"https://a.tile.openstreetmap.org"},...yl,...St,...ui,...ii,...Re,credit:{type:[String,Object],default:"MapQuest, Open Street Map and contributors, CC-BY-SA"}};var _y=te({name:"VcImageryProviderOsm",props:wy,emits:nt,setup(e,t){const i=re();return i.cesiumClass="OpenStreetMapImageryProvider",tt(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const xy={...Ti,...St,...Et,...Re};var Ey=te({name:"VcImageryProviderSingletile",props:xy,emits:nt,setup(e,t){const i=re();return i.cesiumClass="SingleTileImageryProvider",tt(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const Eo={NONE:0,STORING:1,STORED:2,FAILED:3};class pD{constructor(t){if(!Cesium.defined(t.name))throw new Cesium.DeveloperError("options.name is required.");const i=window.indexedDB.open(this.dbname);this.layer=t.layer||null,this.storageType=t.storageType||"arrayBuffer",this.creatingTable=!1,this.cachestatus={},this.dbname=t.name;const n=this;return new Promise((r,a)=>{i.onsuccess=o=>{n.db=o.target.result,n.version=n.db.version,n.cachestatus=n.cachestatus||{},r(n)},i.onupgradeneeded=o=>{n.db=o.target.result,n.version=n.db.version,r(n)},i.onerror=o=>{n.db=null,a("create database fail, error code : "+o.target.errorcode)}})}checkObjectStoreExist(t){return Cesium.defined(this.db)?this.db.objectStoreNames.contains(t):!1}createObjectStore(t){return new Promise((i,n)=>{if(this.creatingTable)n(!1);else{if(this.db.objectStoreNames.contains(t)){n(!1);return}this.creatingTable=!0;const r=parseInt(this.db.version);this.db.close();const a=this,o=window.indexedDB.open(this.dbname,r+1);o.onupgradeneeded=s=>{const l=s.target.result;a.db=l;const c=l.createObjectStore(t,{keyPath:"id"});if(Cesium.defined(c)){c.createIndex("value","value",{unique:!1}),a.creatingTable=!1,a.cachestatus=a.cachestatus||{},a.cachestatus[t]={},a.db.close();const u=window.indexedDB.open(a.dbname);u.onsuccess=d=>{a.db=d.target.result,i(!0)}}else a.creatingTable=!1,i(!1)},o.onsuccess=s=>{s.target.result.close(),i(!0)},o.onerror=s=>{a.creatingTable=!1,n(!1)}}})}putElementInDB(t,i,n){return new Promise((r,a)=>{if(!Cesium.defined(this.db)){a(!1);return}const{cachestatus:o,db:s}=this;if(Cesium.defined(o[t])&&Cesium.defined(o[t][i]&&(o[t][i]===Eo.STORING||o[t][i]===Eo.STORED))){r(!1);return}if(s.objectStoreNames.contains(t)){o[t]=o[t]||{};try{const l=s.transaction([t],"readwrite").objectStore(t).add({id:i,value:n});o[t][i]=Eo.STORING,l.onsuccess=c=>{o[t][i]=Eo.STORED,r(!0)},l.onerror=c=>{o[t][i]=Eo.FAILED,r(!1)}}catch(l){a(null);return}}else this.createObjectStore(t).then(()=>{const l=s.transaction([t],"readwrite").objectStore(t).add({id:i,value:n});l.onsuccess=function(c){r(!0)},l.onerror=function(c){a(!1)}},()=>{a(!1)})})}getElementFromDB(t,i){return new Promise((n,r)=>{const{db:a}=this;if(!Cesium.defined(a)||!a.objectStoreNames.contains(t))return null;try{const l=a.transaction([t]).objectStore(t).get(i);l.onsuccess=c=>Cesium.defined(c.target.result)?n(c.target.result.value):r(null),l.onerror=c=>{r(null)}}catch(o){r(null)}})}updateElementInDB(t,i,n){return new Promise((r,a)=>{const{db:o}=this;if(!Cesium.defined(o)){r(!1);return}if(!o.objectStoreNames.contains(t)){r(!1);return}try{const s=o.transaction([t],"readwrite").objectStore(t).put({id:i,value:n});s.onsuccess=()=>{r(!0)},s.onerror=()=>{r(!1)}}catch(s){r(!1)}})}removeElementFromDB(t,i){return new Promise((n,r)=>{const{db:a}=this;if(!Cesium.defined(a)){n(!1);return}if(!a.objectStoreNames.contains(t)){n(!1);return}try{const o=a.transaction([t],"readwrite").objectStore(t).delete(i);o.onsuccess=()=>{n(!0)},o.onerror=()=>{n(!1)}}catch(o){n(!1)}})}clear(t){return new Promise((i,n)=>{const{db:r}=this;if(!Cesium.defined(r)){i(!1);return}if(!r.objectStoreNames.contains(t)){i(!1);return}try{const a=r.transaction([t],"readwrite").objectStore(t).clear();a.onsuccess=()=>{i(!0)},a.onerror=()=>{i(!1)}}catch(a){i(!1)}})}}var vD=pD;class gD{constructor(t){const{appendForwardSlash:i,Credit:n,defaultValue:r,defined:a,DeveloperError:o,Event:s,Resource:l,Math:c}=Cesium;t=r(t,{});const{url:u}=t;if(!a(u))throw new o("options.url is required.");const d=u.substring(0,u.indexOf("datas"));this.tablename=u.substring(0,u.indexOf("datas/")+6,u.length);const m=this;new vD({name:d+this.tablename}).then(b=>{m._indexedDBScheduler=b}),this._indexedDBSetting={isOpen:!1,clear:()=>{m._indexedDBScheduler.clear(m.tablename)}},this.isSci=!1,this.isTileMap=!1;const v=i(u);if(v.indexOf("rest/maps")>-1)this.isTileMap=!0,this.layersID=t.layersID;else{if(!(v.indexOf("rest/realspace")>-1))throw new o("The url type is not supported!");this.isSci=!0,this.layersID=void 0}this._url=v,this._resource=l.createIfNeeded(v),this._transparent=r(t.transparent,!0),this._name=t.name||"",this._urlTemplate=void 0,this._errorEvent=new s,this._fileExtension="png",this._tileWidth=256,this._tileHeight=256,this._minimumLevel=r(t.minimumLevel,0),this._maximumLevel=t.maximumLevel,this._rectangle=void 0,this._tilingScheme=void 0,this._tileDiscardPolicy=t.tileDiscardPolicy,this._fRatio=r(t.ratio,c.DEGREES_PER_RADIAN/6378137),this._scales=[],this._coordUnit="DEGREE";let C=r(t.credit,new n("MapQuest, SuperMap iServer Imagery"));typeof C=="string"&&(C=new n(C)),this._credit=C,this._ready=!1,this._readyPromise=or(),this._options=t,Py.call(this)}get url(){return this._url}get name(){return this._name}set name(t){this._name=t}get tileWidth(){if(!this._ready)throw new Cesium.DeveloperError("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}get tileHeight(){if(!this._ready)throw new Cesium.DeveloperError("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}get maximumLevel(){if(!this._ready)throw new Cesium.DeveloperError("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}get minimumLevel(){if(!this._ready)throw new Cesium.DeveloperError("minimumLevel must not be called before the imagery provider is ready.");return this._minimumLevel}get tilingScheme(){if(!this._ready)throw new Cesium.DeveloperError("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}get rectangle(){if(!this._ready)throw new Cesium.DeveloperError("rectangle must not be called before the imagery provider is ready.");return this._rectangle}get errorEvent(){return this._errorEvent}get ready(){return this._ready}get credit(){return this._credit}get hasAlphaChannel(){return!0}get readyPromise(){return this._readyPromise.promise}get ratio(){return this._fRatio}set ratio(t){this._fRatio=t}get tileDiscardPolicy(){return this._tileDiscardPolicy}getTileCredits(t,i,n){if(!this.ready)throw new Cesium.DeveloperError("getTileCredits must not be called before the imagery provider is ready.")}requestImage(t,i,n,r){const{defined:a,DeveloperError:o,ImageryProvider:s}=Cesium;if(!this.ready)throw new o("requestImage must not be called before the imagery provider is ready.");const l=bD.call(this,t,i,n),c=this._resource.getDerivedResource({url:l,request:r}),u=this;if(this._indexedDBSetting.isOpen){if(a(this._indexedDBScheduler)){const d=this._indexedDBScheduler.getElementFromDB(this.tablename,l);try{return d.then(m=>{if(a(m)){const f=new Image;return f.src=m,f}return s.loadImage(u,c)})}catch(m){return s.loadImage(u,c)}}}else return s.loadImage(this,c)}pickFeatures(t,i,n,r,a){}}let Oy={};const uu=["1.690163571602655E-9","3.3803271432053056E-9","6.760654286410611E-9","1.3521308572821242E-8","2.7042617145642484E-8","5.408523429128511E-8","1.0817046858256998E-7","2.1634093716513974E-7","4.3268187433028044E-7","8.653637486605571E-7","1.7307274973211203E-6","3.4614549946422405E-6","6.9229099892844565E-6","1.3845819978568952E-5","2.7691639957137904E-5","5.53832799142758E-5","1.107665598285516E-4","2.215331196571032E-4","4.430662393142064E-4","8.861324786284128E-4","1.772264957256826E-3","3.544529914513652E-3"],yD=[1690163571602655e-24,33803271432053056e-25,6760654286410611e-24,13521308572821242e-24,27042617145642484e-24,5408523429128511e-23,10817046858256998e-23,21634093716513974e-23,43268187433028044e-23,8653637486605571e-22,17307274973211203e-22,34614549946422405e-22,69229099892844565e-22,13845819978568952e-21,27691639957137904e-21,553832799142758e-19,.0001107665598285516,.0002215331196571032,.0004430662393142064,.0008861324786284128,.001772264957256826,.003544529914513652];function bD(e,t,i){let n;if(this.isTileMap){if(this._coordUnit==="DEGREE"){const r=uu[i+1]||uu[i];n=this._urlTemplate.replace("{x}",e).replace("{y}",t).replace("{scale}",r)}else if(this._coordUnit==="METER"){const r=uu[i];n=this._urlTemplate.replace("{x}",e).replace("{y}",t).replace("{scale}",r)}}else n=this._urlTemplate.replace("{x}",e).replace("{y}",t).replace("{level}",i).replace("{fileExtension}",this._fileExtension);return n}function Py(){const{Resource:e}=Cesium;if(this.isTileMap){const t=e.fetchJsonp({url:this._options.url+".jsonp",queryParameters:{f:"json"}});try{t.then(i=>{ED.call(this,i)})}catch(i){Sy.call(this)}}else try{e.fetchText({url:this.url+"config"}).then(t=>{wD.call(this,t)})}catch(t){Sy.call(this)}}function CD(e){for(let t=yD.length;t--;)if(e[t]<=e)return t}function wD(e){const t=_D.call(this,e),{defaultValue:i,defined:n,GeographicTilingScheme:r,Math:a,Rectangle:o}=Cesium;this._fileExtension=i(t.fileExtentName,"png"),this._tileWidth=i(t.imageSizeWidth,256),this._tileHeight=i(t.imageSizeHeight,256);const s=t.levels,l=s.length;if(this._minimumLevel=i(s[0],0),this._maximumLevel=i(s[l-1],l-1),n(this._tilingScheme)||(this._tilingScheme=new r({ellipsoid:this._options.ellipsoid})),!n(this._rectangle)&&t.left&&t.right&&t.top&&t.bottom){const f=a.toRadians(t.left),v=a.toRadians(t.right),C=a.toRadians(t.bottom),b=a.toRadians(t.top);this._rectangle=new o(f,C,v,b)}const c=this._tilingScheme;this._rectangle.west<c.rectangle.west&&(this._rectangle.west=c.rectangle.west),this._rectangle.east>c.rectangle.east&&(this._rectangle.east=c.rectangle.east),this._rectangle.south<c.rectangle.south&&(this._rectangle.south=c.rectangle.south),this._rectangle.north>c.rectangle.north&&(this._rectangle.north=c.rectangle.north);const u=c.positionToTileXY(o.southwest(this._rectangle),this._minimumLevel),d=c.positionToTileXY(o.northeast(this._rectangle),this._minimumLevel);(window.Math.abs(d.x-u.x)+1)*(window.Math.abs(d.y-u.y)+1)>4&&(this._minimumLevel=0),this._tilingScheme=c,this._urlTemplate=this._url+"data/index/{y}/{x}.{fileExtension}?level={level}",this._ready=!0,this._readyPromise.resolve(!0)}function _D(e){e=new DOMParser().parseFromString(e,"application/xml");const i="http://www.supermap.com/SuperMapCache/sci3d",n=e.childNodes[0],r=as(n,"Levels",i),a=xD(r,"Level",i)||[],o=[];for(let b=0;b<a.length;b++)o.push(parseInt(a[b].textContent,10));const s=as(n,"Bounds",i),l=Or(s,"Left",i),c=Or(s,"Right",i),u=Or(s,"Top",i),d=Or(s,"Bottom",i),m=My(n,"FileExtentName",i),f=Or(n,"CellWidth",i),v=Or(n,"CellHeight",i),C=My(n,"CacheName",i);return this._name=C||"",{left:l,right:c,top:u,bottom:d,fileExtentName:m,levels:o,imageSizeWidth:f,imageSizeHeight:v}}function My(e,t,i){const n=as(e,t,i);return Cesium.defined(n)?n.textContent.trim():void 0}function Or(e,t,i){const n=as(e,t,i);if(Cesium.defined(n)){const r=parseFloat(n.textContent);return isNaN(r)?void 0:r}}function as(e,t,i){if(Cesium.defined(e)){const n=e.childNodes,r=n.length;for(let a=0;a<r;a++){const o=n[a];if(o.localName===t&&i.indexOf(o.namespaceURI)!==-1)return o}}}function xD(e,t,i){if(Cesium.defined(e)){const n=[],r=e.getElementsByTagNameNS("*",t),a=r.length;for(let o=0;o<a;o++){const s=r[o];s.localName===t&&i.indexOf(s.namespaceURI)!==-1&&n.push(s)}return n}}function ED(e){const{Cartesian3:t,defaultValue:i,defined:n,GeographicTilingScheme:r,Math:a,Rectangle:o,WebMercatorTilingScheme:s}=Cesium,l=e.prjCoordSys.coordUnit;this._coordUnit=l;const c=e.bounds,u=e.visibleScales;if(n(u)&&u.length>1&&n(this._maximumLevel)){const d=u[u.length-1];this._maximumLevel=CD(d)}if(l==="DEGREE")this._tilingScheme=new r,c.left=a.clamp(c.left,-180,180),c.bottom=a.clamp(c.bottom,-90,90),c.right=a.clamp(c.right,-180,180),c.top=a.clamp(c.top,-90,90),this._rectangle=o.fromDegrees(c.left,c.bottom,c.right,c.top),this._urlTemplate=this._url+'tileImage.png?transparent={transparent}&cacheEnabled=true&width=256&height=256&x={x}&y={y}&scale={scale}&redirect=false&overlapDisplayed=false&origin={"x":-180,"y":90}';else{const d=new t(c.left,c.bottom,0);d.x=Math.max(-20037508342789244e-9,d.x),d.y=Math.max(-20037508342789244e-9,d.y);const m=new t(c.right,c.top,0);m.x=Math.min(20037508342789244e-9,m.x),m.y=Math.min(20037508342789244e-9,m.y),this._tilingScheme=new s;const f=this._tilingScheme.projection.unproject(d),v=this._tilingScheme.projection.unproject(m);this._rectangle=new o(f.longitude,f.latitude,v.longitude,v.latitude),this._urlTemplate=this._url+'tileImage.png?transparent={transparent}&cacheEnabled=true&width=256&height=256&x={x}&y={y}&scale={scale}&redirect=false&overlapDisplayed=false&origin={"x":-20037508.342789248 ,"y":20037508.342789095}'}this._urlTemplate=this._urlTemplate.replace("{transparent}",this._transparent),this.layersID&&(this._urlTemplate=this._urlTemplate+"&layersID="+this.layersID),this._rectangle||(this._rectangle=i(this._options.rectangle,this._tilingScheme.rectangle)),this._ready=!0,this._readyPromise.resolve(!0)}function Sy(){const{TileProviderError:e,RuntimeError:t}=Cesium,i="An error occurred while accessing "+this._url+".";Oy=e.handleError(Oy,this,this._errorEvent,i,0,0,0,Py.bind(this)),this._readyPromise.reject(new t(i))}var OD=gD;const Ty={url:String,...ui,...ii,name:String,transparent:{type:Boolean,default:!0},credit:{type:[String,Object],default:"MapQuest, SuperMap iServer Imagery"},...Bn};var Ay=te({name:"VcImageryProviderSupermap",props:Ty,emits:nt,setup(e,t){const i=re();i.cesiumClass="SuperMapImageryProvider";const n=tt(e,t,i);if(n!==void 0)return i.createCesiumObject=async()=>{Cesium.SuperMapImageryProvider=Cesium.SuperMapImageryProvider||OD,n.unwatchFns.length===0&&n.setPropsWatcher(!0);const r=n.transformProps(e);return new Cesium.SuperMapImageryProvider(r)},()=>{var r;return ne(ae(((r=i.proxy)==null?void 0:r.$options.name)||""))}}});const Dy={img:"//p{s}.map.gtimg.com/sateTiles/{z}/{sx}/{sy}/{x}_{reverseY}.jpg&scene=0",terrain:"//p{s}.map.gtimg.com/demTiles/{z}/{sx}/{sy}/{x}_{reverseY}.jpg&scene=0",vector:"//rt{s}.map.gtimg.com/tile?z={z}&x={x}&y={reverseY}&type=vector&styleid={style}&scene=0"};class PD{constructor(t){const{Resource:i,defaultValue:n,Credit:r,Event:a}=Cesium;this._subdomains=t.subdomains||["1","2","3"],this._url=t.url||[t.protocol||"",Dy[t.mapStyle]||Dy.vector].join("");const o=i.createIfNeeded(this._url);o.appendForwardSlash(),this._ready=!1,this._resource=o,this._tileDiscardPolicy=t.tileDiscardPolicy,this._tileWidth=256,this._tileHeight=256,this._minimumLevel=t.minimumLevel||0,this._maximumLevel=t.maximumLevel||20,this._tilingScheme=new Cesium.WebMercatorTilingScheme,this._rectangle=n(t.rectangle,this._tilingScheme.rectangle);let s=t.credit;typeof s=="string"&&(s=new r(s)),this._credit=s,this.enablePickFeatures=n(t.enablePickFeatures,!1),this._hasAlphaChannel=n(t.hasAlphaChannel,!0),this._errorEvent=new a,this._readyPromise=or(),this._ready=!0,this._readyPromise.resolve(!0),this._style=t.styleId}get url(){return this._resource._url}get proxy(){return this._resource.proxy}get tileWidth(){if(!this._ready)throw new Cesium.DeveloperError("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}get tileHeight(){if(!this._ready)throw new Cesium.DeveloperError("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}get maximumLevel(){if(!this._ready)throw new Cesium.DeveloperError("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}get minimumLevel(){if(!this.ready)throw new Cesium.DeveloperError("minimumLevel must not be called before the imagery provider is ready.");return this._minimumLevel}get tilingScheme(){if(!this._ready)throw new Cesium.DeveloperError("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}get rectangle(){if(!this.ready)throw new Cesium.DeveloperError("rectangle must not be called before the imagery provider is ready.");return this._rectangle}get tileDiscardPolicy(){if(!this.ready)throw new Cesium.DeveloperError("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._tileDiscardPolicy}get errorEvent(){return this._errorEvent}get ready(){return this._ready}get readyPromise(){return this._readyPromise.promise}get credit(){if(!this.ready)throw new Cesium.DeveloperError("credit must not be called before the imagery provider is ready.");return this._credit}get hasAlphaChannel(){if(!this.ready)throw new Cesium.DeveloperError("hasAlphaChannel must not be called before the imagery provider is ready.");return this._hasAlphaChannel}getTileCredits(t,i,n){if(!this.ready)throw new Cesium.DeveloperError("getTileCredits must not be called before the imagery provider is ready.")}requestImage(t,i,n,r){if(!this.ready)throw new Cesium.DeveloperError("requestImage must not be called before the imagery provider is ready.");return Cesium.ImageryProvider.loadImage(this,MD.call(this,t,i,n,r))}pickFeatures(t,i,n,r,a){}}function MD(e,t,i,n){let r=this._url;const a=this._subdomains,o=this.tilingScheme.getNumberOfYTilesAtLevel(i)-t-1;return r=r.replace("{s}",a[(e+t+i)%a.length]).replace("{style}",this._style).replace("{x}",e).replace("{y}",-t).replace("{z}",i).replace("{sx}",e>>4).replace("{sy}",(1<<i)-t>>4).replace("{reverseY}",o),this._resource.getDerivedResource({url:r,request:n})}var SD=PD;const Iy={...Ti,subdomains:{type:Array,default:()=>["1","2","3"]},mapStyle:{type:String,default:"vector"},styleId:{type:String,default:"1"},protocol:String,...Et,...ui,...ii,...St,...Ai,...Bn};var Ry=te({name:"VcImageryProviderTencent",props:Iy,emits:nt,setup(e,t){const i=re();i.cesiumClass="TencentImageryProvider";const n=tt(e,t,i);if(n!==void 0)return i.createCesiumObject=async()=>{Cesium.TencentImageryProvider=Cesium.TencentImageryProvider||SD,n.unwatchFns.length===0&&n.setPropsWatcher(!0);const r=n.transformProps(e);return new Cesium.TencentImageryProvider(r)},()=>{var r;return ne(ae(((r=i.proxy)==null?void 0:r.$options.name)||""))}}});const TD={IMG_W:"img_w",IMG_C:"img_c",CIA_W:"cia_w",CIA_C:"cia_c",VEC_W:"vec_w",VEC_C:"vec_c",TER_W:"ter_w",TER_C:"ter_c",CVA_W:"cva_w",CVA_C:"cva_c",CTA_W:"cta_w",CTA_C:"cta_c",EIA_W:"eia_w",EIA_C:"eia_c",EVA_W:"eva_w",EVA_C:"eva_c",IBO_C:"ibo_c",IBO_W:"ibo_w"};var Nt=TD,Ly={exports:{}},du={exports:{}};/*! https://mths.be/punycode v1.4.0 by @mathias */(function(e,t){(function(i){var n=t&&!t.nodeType&&t,r=e&&!e.nodeType&&e,a=typeof pn=="object"&&pn;(a.global===a||a.window===a||a.self===a)&&(i=a);var o,s=2147483647,l=36,c=1,u=26,d=38,m=700,f=72,v=128,C="-",b=/^xn--/,_=/[^\x20-\x7E]/,M=/[\x2E\u3002\uFF0E\uFF61]/g,g={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},E=l-c,T=Math.floor,A=String.fromCharCode,R;function I(S){throw new RangeError(g[S])}function j(S,B){for(var F=S.length,G=[];F--;)G[F]=B(S[F]);return G}function W(S,B){var F=S.split("@"),G="";F.length>1&&(G=F[0]+"@",S=F[1]),S=S.replace(M,".");var q=S.split("."),U=j(q,B).join(".");return G+U}function $(S){for(var B=[],F=0,G=S.length,q,U;F<G;)q=S.charCodeAt(F++),q>=55296&&q<=56319&&F<G?(U=S.charCodeAt(F++),(U&64512)==56320?B.push(((q&1023)<<10)+(U&1023)+65536):(B.push(q),F--)):B.push(q);return B}function k(S){return j(S,function(B){var F="";return B>65535&&(B-=65536,F+=A(B>>>10&1023|55296),B=56320|B&1023),F+=A(B),F}).join("")}function h(S){return S-48<10?S-22:S-65<26?S-65:S-97<26?S-97:l}function p(S,B){return S+22+75*(S<26)-((B!=0)<<5)}function y(S,B,F){var G=0;for(S=F?T(S/m):S>>1,S+=T(S/B);S>E*u>>1;G+=l)S=T(S/E);return T(G+(E+1)*S/(S+d))}function O(S){var B=[],F=S.length,G,q=0,U=v,K=f,N,L,H,z,Q,Z,J,X,ee;for(N=S.lastIndexOf(C),N<0&&(N=0),L=0;L<N;++L)S.charCodeAt(L)>=128&&I("not-basic"),B.push(S.charCodeAt(L));for(H=N>0?N+1:0;H<F;){for(z=q,Q=1,Z=l;H>=F&&I("invalid-input"),J=h(S.charCodeAt(H++)),(J>=l||J>T((s-q)/Q))&&I("overflow"),q+=J*Q,X=Z<=K?c:Z>=K+u?u:Z-K,!(J<X);Z+=l)ee=l-X,Q>T(s/ee)&&I("overflow"),Q*=ee;G=B.length+1,K=y(q-z,G,z==0),T(q/G)>s-U&&I("overflow"),U+=T(q/G),q%=G,B.splice(q++,0,U)}return k(B)}function x(S){var B,F,G,q,U,K,N,L,H,z,Q,Z=[],J,X,ee,Y;for(S=$(S),J=S.length,B=v,F=0,U=f,K=0;K<J;++K)Q=S[K],Q<128&&Z.push(A(Q));for(G=q=Z.length,q&&Z.push(C);G<J;){for(N=s,K=0;K<J;++K)Q=S[K],Q>=B&&Q<N&&(N=Q);for(X=G+1,N-B>T((s-F)/X)&&I("overflow"),F+=(N-B)*X,B=N,K=0;K<J;++K)if(Q=S[K],Q<B&&++F>s&&I("overflow"),Q==B){for(L=F,H=l;z=H<=U?c:H>=U+u?u:H-U,!(L<z);H+=l)Y=L-z,ee=l-z,Z.push(A(p(z+Y%ee,0))),L=T(Y/ee);Z.push(A(p(L,0))),U=y(F,X,G==q),F=0,++G}++F,++B}return Z.join("")}function w(S){return W(S,function(B){return b.test(B)?O(B.slice(4).toLowerCase()):B})}function D(S){return W(S,function(B){return _.test(B)?"xn--"+x(B):B})}if(o={version:"1.3.2",ucs2:{decode:$,encode:k},decode:O,encode:x,toASCII:D,toUnicode:w},n&&r)if(e.exports==n)r.exports=o;else for(R in o)o.hasOwnProperty(R)&&(n[R]=o[R]);else i.punycode=o})(pn)})(du,du.exports);var By={exports:{}};/*!
* URI.js - Mutating URLs
* IPv6 Support
*
* Version: 1.19.11
*
* Author: Rodney Rehm
* Web: http://medialize.github.io/URI.js/
*
* Licensed under
* MIT License http://www.opensource.org/licenses/mit-license
*
*/(function(e){(function(t,i){e.exports?e.exports=i():t.IPv6=i(t)})(pn,function(t){var i=t&&t.IPv6;function n(a){var o=a.toLowerCase(),s=o.split(":"),l=s.length,c=8;s[0]===""&&s[1]===""&&s[2]===""?(s.shift(),s.shift()):s[0]===""&&s[1]===""?s.shift():s[l-1]===""&&s[l-2]===""&&s.pop(),l=s.length,s[l-1].indexOf(".")!==-1&&(c=7);var u;for(u=0;u<l&&s[u]!=="";u++);if(u<c)for(s.splice(u,1,"0000");s.length<c;)s.splice(u,0,"0000");for(var d,m=0;m<c;m++){d=s[m].split("");for(var f=0;f<3&&(d[0]==="0"&&d.length>1);f++)d.splice(0,1);s[m]=d.join("")}var v=-1,C=0,b=0,_=-1,M=!1;for(m=0;m<c;m++)M?s[m]==="0"?b+=1:(M=!1,b>C&&(v=_,C=b)):s[m]==="0"&&(M=!0,_=m,b=1);b>C&&(v=_,C=b),C>1&&s.splice(v,C,""),l=s.length;var g="";for(s[0]===""&&(g=":"),m=0;m<l&&(g+=s[m],m!==l-1);m++)g+=":";return s[l-1]===""&&(g+=":"),g}function r(){return t.IPv6===this&&(t.IPv6=i),this}return{best:n,noConflict:r}})})(By);var jy={exports:{}};/*!
* URI.js - Mutating URLs
* Second Level Domain (SLD) Support
*
* Version: 1.19.11
*
* Author: Rodney Rehm
* Web: http://medialize.github.io/URI.js/
*
* Licensed under
* MIT License http://www.opensource.org/licenses/mit-license
*
*/(function(e){(function(t,i){e.exports?e.exports=i():t.SecondLevelDomains=i(t)})(pn,function(t){var i=t&&t.SecondLevelDomains,n={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(r){var a=r.lastIndexOf(".");if(a<=0||a>=r.length-1)return!1;var o=r.lastIndexOf(".",a-1);if(o<=0||o>=a-1)return!1;var s=n.list[r.slice(a+1)];return s?s.indexOf(" "+r.slice(o+1,a)+" ")>=0:!1},is:function(r){var a=r.lastIndexOf(".");if(a<=0||a>=r.length-1)return!1;var o=r.lastIndexOf(".",a-1);if(o>=0)return!1;var s=n.list[r.slice(a+1)];return s?s.indexOf(" "+r.slice(0,a)+" ")>=0:!1},get:function(r){var a=r.lastIndexOf(".");if(a<=0||a>=r.length-1)return null;var o=r.lastIndexOf(".",a-1);if(o<=0||o>=a-1)return null;var s=n.list[r.slice(a+1)];return!s||s.indexOf(" "+r.slice(o+1,a)+" ")<0?null:r.slice(o+1)},noConflict:function(){return t.SecondLevelDomains===this&&(t.SecondLevelDomains=i),this}};return n})})(jy);/*!
* URI.js - Mutating URLs
*
* Version: 1.19.11
*
* Author: Rodney Rehm
* Web: http://medialize.github.io/URI.js/
*
* Licensed under
* MIT License http://www.opensource.org/licenses/mit-license
*
*/(function(e){(function(t,i){e.exports?e.exports=i(du.exports,By.exports,jy.exports):t.URI=i(t.punycode,t.IPv6,t.SecondLevelDomains,t)})(pn,function(t,i,n,r){var a=r&&r.URI;function o(h,p){var y=arguments.length>=1,O=arguments.length>=2;if(!(this instanceof o))return y?O?new o(h,p):new o(h):new o;if(h===void 0){if(y)throw new TypeError("undefined is not a valid argument for URI");typeof location!="undefined"?h=location.href+"":h=""}if(h===null&&y)throw new TypeError("null is not a valid argument for URI");return this.href(h),p!==void 0?this.absoluteTo(p):this}function s(h){return/^[0-9]+$/.test(h)}o.version="1.19.11";var l=o.prototype,c=Object.prototype.hasOwnProperty;function u(h){return h.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function d(h){return h===void 0?"Undefined":String(Object.prototype.toString.call(h)).slice(8,-1)}function m(h){return d(h)==="Array"}function f(h,p){var y={},O,x;if(d(p)==="RegExp")y=null;else if(m(p))for(O=0,x=p.length;O<x;O++)y[p[O]]=!0;else y[p]=!0;for(O=0,x=h.length;O<x;O++){var w=y&&y[h[O]]!==void 0||!y&&p.test(h[O]);w&&(h.splice(O,1),x--,O--)}return h}function v(h,p){var y,O;if(m(p)){for(y=0,O=p.length;y<O;y++)if(!v(h,p[y]))return!1;return!0}var x=d(p);for(y=0,O=h.length;y<O;y++)if(x==="RegExp"){if(typeof h[y]=="string"&&h[y].match(p))return!0}else if(h[y]===p)return!0;return!1}function C(h,p){if(!m(h)||!m(p)||h.length!==p.length)return!1;h.sort(),p.sort();for(var y=0,O=h.length;y<O;y++)if(h[y]!==p[y])return!1;return!0}function b(h){var p=/^\/+|\/+$/g;return h.replace(p,"")}o._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:o.preventInvalidHostname,duplicateQueryParameters:o.duplicateQueryParameters,escapeQuerySpace:o.escapeQuerySpace}},o.preventInvalidHostname=!1,o.duplicateQueryParameters=!1,o.escapeQuerySpace=!0,o.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,o.idn_expression=/[^a-z0-9\._-]/i,o.punycode_expression=/(xn--)/i,o.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,o.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,o.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/ig,o.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},o.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,o.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,o.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},o.hostProtocols=["http","https"],o.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,o.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},o.getDomAttribute=function(h){if(!(!h||!h.nodeName)){var p=h.nodeName.toLowerCase();if(!(p==="input"&&h.type!=="image"))return o.domAttributes[p]}};function _(h){return escape(h)}function M(h){return encodeURIComponent(h).replace(/[!'()*]/g,_).replace(/\*/g,"%2A")}o.encode=M,o.decode=decodeURIComponent,o.iso8859=function(){o.encode=escape,o.decode=unescape},o.unicode=function(){o.encode=M,o.decode=decodeURIComponent},o.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/ig,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/ig,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},o.encodeQuery=function(h,p){var y=o.encode(h+"");return p===void 0&&(p=o.escapeQuerySpace),p?y.replace(/%20/g,"+"):y},o.decodeQuery=function(h,p){h+="",p===void 0&&(p=o.escapeQuerySpace);try{return o.decode(p?h.replace(/\+/g,"%20"):h)}catch(y){return h}};var g={encode:"encode",decode:"decode"},E,T=function(h,p){return function(y){try{return o[p](y+"").replace(o.characters[h][p].expression,function(O){return o.characters[h][p].map[O]})}catch(O){return y}}};for(E in g)o[E+"PathSegment"]=T("pathname",g[E]),o[E+"UrnPathSegment"]=T("urnpath",g[E]);var A=function(h,p,y){return function(O){var x;y?x=function(B){return o[p](o[y](B))}:x=o[p];for(var w=(O+"").split(h),D=0,S=w.length;D<S;D++)w[D]=x(w[D]);return w.join(h)}};o.decodePath=A("/","decodePathSegment"),o.decodeUrnPath=A(":","decodeUrnPathSegment"),o.recodePath=A("/","encodePathSegment","decode"),o.recodeUrnPath=A(":","encodeUrnPathSegment","decode"),o.encodeReserved=T("reserved","encode"),o.parse=function(h,p){var y;return p||(p={preventInvalidHostname:o.preventInvalidHostname}),h=h.replace(o.leading_whitespace_expression,""),h=h.replace(o.ascii_tab_whitespace,""),y=h.indexOf("#"),y>-1&&(p.fragment=h.substring(y+1)||null,h=h.substring(0,y)),y=h.indexOf("?"),y>-1&&(p.query=h.substring(y+1)||null,h=h.substring(0,y)),h=h.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://"),h=h.replace(/^[/\\]{2,}/i,"//"),h.substring(0,2)==="//"?(p.protocol=null,h=h.substring(2),h=o.parseAuthority(h,p)):(y=h.indexOf(":"),y>-1&&(p.protocol=h.substring(0,y)||null,p.protocol&&!p.protocol.match(o.protocol_expression)?p.protocol=void 0:h.substring(y+1,y+3).replace(/\\/g,"/")==="//"?(h=h.substring(y+3),h=o.parseAuthority(h,p)):(h=h.substring(y+1),p.urn=!0))),p.path=h,p},o.parseHost=function(h,p){h||(h=""),h=h.replace(/\\/g,"/");var y=h.indexOf("/"),O,x;if(y===-1&&(y=h.length),h.charAt(0)==="[")O=h.indexOf("]"),p.hostname=h.substring(1,O)||null,p.port=h.substring(O+2,y)||null,p.port==="/"&&(p.port=null);else{var w=h.indexOf(":"),D=h.indexOf("/"),S=h.indexOf(":",w+1);S!==-1&&(D===-1||S<D)?(p.hostname=h.substring(0,y)||null,p.port=null):(x=h.substring(0,y).split(":"),p.hostname=x[0]||null,p.port=x[1]||null)}return p.hostname&&h.substring(y).charAt(0)!=="/"&&(y++,h="/"+h),p.preventInvalidHostname&&o.ensureValidHostname(p.hostname,p.protocol),p.port&&o.ensureValidPort(p.port),h.substring(y)||"/"},o.parseAuthority=function(h,p){return h=o.parseUserinfo(h,p),o.parseHost(h,p)},o.parseUserinfo=function(h,p){var y=h,O=h.indexOf("\\");O!==-1&&(h=h.replace(/\\/g,"/"));var x=h.indexOf("/"),w=h.lastIndexOf("@",x>-1?x:h.length-1),D;return w>-1&&(x===-1||w<x)?(D=h.substring(0,w).split(":"),p.username=D[0]?o.decode(D[0]):null,D.shift(),p.password=D[0]?o.decode(D.join(":")):null,h=y.substring(w+1)):(p.username=null,p.password=null),h},o.parseQuery=function(h,p){if(!h)return{};if(h=h.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,""),!h)return{};for(var y={},O=h.split("&"),x=O.length,w,D,S,B=0;B<x;B++)w=O[B].split("="),D=o.decodeQuery(w.shift(),p),S=w.length?o.decodeQuery(w.join("="),p):null,D!=="__proto__"&&(c.call(y,D)?((typeof y[D]=="string"||y[D]===null)&&(y[D]=[y[D]]),y[D].push(S)):y[D]=S);return y},o.build=function(h){var p="",y=!1;return h.protocol&&(p+=h.protocol+":"),!h.urn&&(p||h.hostname)&&(p+="//",y=!0),p+=o.buildAuthority(h)||"",typeof h.path=="string"&&(h.path.charAt(0)!=="/"&&y&&(p+="/"),p+=h.path),typeof h.query=="string"&&h.query&&(p+="?"+h.query),typeof h.fragment=="string"&&h.fragment&&(p+="#"+h.fragment),p},o.buildHost=function(h){var p="";if(h.hostname)o.ip6_expression.test(h.hostname)?p+="["+h.hostname+"]":p+=h.hostname;else return"";return h.port&&(p+=":"+h.port),p},o.buildAuthority=function(h){return o.buildUserinfo(h)+o.buildHost(h)},o.buildUserinfo=function(h){var p="";return h.username&&(p+=o.encode(h.username)),h.password&&(p+=":"+o.encode(h.password)),p&&(p+="@"),p},o.buildQuery=function(h,p,y){var O="",x,w,D,S;for(w in h)if(w!=="__proto__"&&c.call(h,w))if(m(h[w]))for(x={},D=0,S=h[w].length;D<S;D++)h[w][D]!==void 0&&x[h[w][D]+""]===void 0&&(O+="&"+o.buildQueryParameter(w,h[w][D],y),p!==!0&&(x[h[w][D]+""]=!0));else h[w]!==void 0&&(O+="&"+o.buildQueryParameter(w,h[w],y));return O.substring(1)},o.buildQueryParameter=function(h,p,y){return o.encodeQuery(h,y)+(p!==null?"="+o.encodeQuery(p,y):"")},o.addQuery=function(h,p,y){if(typeof p=="object")for(var O in p)c.call(p,O)&&o.addQuery(h,O,p[O]);else if(typeof p=="string"){if(h[p]===void 0){h[p]=y;return}else typeof h[p]=="string"&&(h[p]=[h[p]]);m(y)||(y=[y]),h[p]=(h[p]||[]).concat(y)}else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter")},o.setQuery=function(h,p,y){if(typeof p=="object")for(var O in p)c.call(p,O)&&o.setQuery(h,O,p[O]);else if(typeof p=="string")h[p]=y===void 0?null:y;else throw new TypeError("URI.setQuery() accepts an object, string as the name parameter")},o.removeQuery=function(h,p,y){var O,x,w;if(m(p))for(O=0,x=p.length;O<x;O++)h[p[O]]=void 0;else if(d(p)==="RegExp")for(w in h)p.test(w)&&(h[w]=void 0);else if(typeof p=="object")for(w in p)c.call(p,w)&&o.removeQuery(h,w,p[w]);else if(typeof p=="string")y!==void 0?d(y)==="RegExp"?!m(h[p])&&y.test(h[p])?h[p]=void 0:h[p]=f(h[p],y):h[p]===String(y)&&(!m(y)||y.length===1)?h[p]=void 0:m(h[p])&&(h[p]=f(h[p],y)):h[p]=void 0;else throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter")},o.hasQuery=function(h,p,y,O){switch(d(p)){case"String":break;case"RegExp":for(var x in h)if(c.call(h,x)&&p.test(x)&&(y===void 0||o.hasQuery(h,x,y)))return!0;return!1;case"Object":for(var w in p)if(c.call(p,w)&&!o.hasQuery(h,w,p[w]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(d(y)){case"Undefined":return p in h;case"Boolean":var D=Boolean(m(h[p])?h[p].length:h[p]);return y===D;case"Function":return!!y(h[p],p,h);case"Array":if(!m(h[p]))return!1;var S=O?v:C;return S(h[p],y);case"RegExp":return m(h[p])?O?v(h[p],y):!1:Boolean(h[p]&&h[p].match(y));case"Number":y=String(y);case"String":return m(h[p])?O?v(h[p],y):!1:h[p]===y;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},o.joinPaths=function(){for(var h=[],p=[],y=0,O=0;O<arguments.length;O++){var x=new o(arguments[O]);h.push(x);for(var w=x.segment(),D=0;D<w.length;D++)typeof w[D]=="string"&&p.push(w[D]),w[D]&&y++}if(!p.length||!y)return new o("");var S=new o("").segment(p);return(h[0].path()===""||h[0].path().slice(0,1)==="/")&&S.path("/"+S.path()),S.normalize()},o.commonPath=function(h,p){var y=Math.min(h.length,p.length),O;for(O=0;O<y;O++)if(h.charAt(O)!==p.charAt(O)){O--;break}return O<1?h.charAt(0)===p.charAt(0)&&h.charAt(0)==="/"?"/":"":((h.charAt(O)!=="/"||p.charAt(O)!=="/")&&(O=h.substring(0,O).lastIndexOf("/")),h.substring(0,O+1))},o.withinString=function(h,p,y){y||(y={});var O=y.start||o.findUri.start,x=y.end||o.findUri.end,w=y.trim||o.findUri.trim,D=y.parens||o.findUri.parens,S=/[a-z0-9-]=["']?$/i;for(O.lastIndex=0;;){var B=O.exec(h);if(!B)break;var F=B.index;if(y.ignoreHtml){var G=h.slice(Math.max(F-3,0),F);if(G&&S.test(G))continue}for(var q=F+h.slice(F).search(x),U=h.slice(F,q),K=-1;;){var N=D.exec(U);if(!N)break;var L=N.index+N[0].length;K=Math.max(K,L)}if(K>-1?U=U.slice(0,K)+U.slice(K).replace(w,""):U=U.replace(w,""),!(U.length<=B[0].length)&&!(y.ignore&&y.ignore.test(U))){q=F+U.length;var H=p(U,F,q,h);if(H===void 0){O.lastIndex=q;continue}H=String(H),h=h.slice(0,F)+H+h.slice(q),O.lastIndex=F+H.length}}return O.lastIndex=0,h},o.ensureValidHostname=function(h,p){var y=!!h,O=!!p,x=!1;if(O&&(x=v(o.hostProtocols,p)),x&&!y)throw new TypeError("Hostname cannot be empty, if protocol is "+p);if(h&&h.match(o.invalid_hostname_characters)){if(!t)throw new TypeError('Hostname "'+h+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(t.toASCII(h).match(o.invalid_hostname_characters))throw new TypeError('Hostname "'+h+'" contains characters other than [A-Z0-9.-:_]')}},o.ensureValidPort=function(h){if(!!h){var p=Number(h);if(!(s(p)&&p>0&&p<65536))throw new TypeError('Port "'+h+'" is not a valid port')}},o.noConflict=function(h){if(h){var p={URI:this.noConflict()};return r.URITemplate&&typeof r.URITemplate.noConflict=="function"&&(p.URITemplate=r.URITemplate.noConflict()),r.IPv6&&typeof r.IPv6.noConflict=="function"&&(p.IPv6=r.IPv6.noConflict()),r.SecondLevelDomains&&typeof r.SecondLevelDomains.noConflict=="function"&&(p.SecondLevelDomains=r.SecondLevelDomains.noConflict()),p}else r.URI===this&&(r.URI=a);return this},l.build=function(h){return h===!0?this._deferred_build=!0:(h===void 0||this._deferred_build)&&(this._string=o.build(this._parts),this._deferred_build=!1),this},l.clone=function(){return new o(this)},l.valueOf=l.toString=function(){return this.build(!1)._string};function R(h){return function(p,y){return p===void 0?this._parts[h]||"":(this._parts[h]=p||null,this.build(!y),this)}}function I(h,p){return function(y,O){return y===void 0?this._parts[h]||"":(y!==null&&(y=y+"",y.charAt(0)===p&&(y=y.substring(1))),this._parts[h]=y,this.build(!O),this)}}l.protocol=R("protocol"),l.username=R("username"),l.password=R("password"),l.hostname=R("hostname"),l.port=R("port"),l.query=I("query","?"),l.fragment=I("fragment","#"),l.search=function(h,p){var y=this.query(h,p);return typeof y=="string"&&y.length?"?"+y:y},l.hash=function(h,p){var y=this.fragment(h,p);return typeof y=="string"&&y.length?"#"+y:y},l.pathname=function(h,p){if(h===void 0||h===!0){var y=this._parts.path||(this._parts.hostname?"/":"");return h?(this._parts.urn?o.decodeUrnPath:o.decodePath)(y):y}else return this._parts.urn?this._parts.path=h?o.recodeUrnPath(h):"":this._parts.path=h?o.recodePath(h):"/",this.build(!p),this},l.path=l.pathname,l.href=function(h,p){var y;if(h===void 0)return this.toString();this._string="",this._parts=o._parts();var O=h instanceof o,x=typeof h=="object"&&(h.hostname||h.path||h.pathname);if(h.nodeName){var w=o.getDomAttribute(h);h=h[w]||"",x=!1}if(!O&&x&&h.pathname!==void 0&&(h=h.toString()),typeof h=="string"||h instanceof String)this._parts=o.parse(String(h),this._parts);else if(O||x){var D=O?h._parts:h;for(y in D)y!=="query"&&c.call(this._parts,y)&&(this._parts[y]=D[y]);D.query&&this.query(D.query,!1)}else throw new TypeError("invalid input");return this.build(!p),this},l.is=function(h){var p=!1,y=!1,O=!1,x=!1,w=!1,D=!1,S=!1,B=!this._parts.urn;switch(this._parts.hostname&&(B=!1,y=o.ip4_expression.test(this._parts.hostname),O=o.ip6_expression.test(this._parts.hostname),p=y||O,x=!p,w=x&&n&&n.has(this._parts.hostname),D=x&&o.idn_expression.test(this._parts.hostname),S=x&&o.punycode_expression.test(this._parts.hostname)),h.toLowerCase()){case"relative":return B;case"absolute":return!B;case"domain":case"name":return x;case"sld":return w;case"ip":return p;case"ip4":case"ipv4":case"inet4":return y;case"ip6":case"ipv6":case"inet6":return O;case"idn":return D;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return S}return null};var j=l.protocol,W=l.port,$=l.hostname;l.protocol=function(h,p){if(h&&(h=h.replace(/:(\/\/)?$/,""),!h.match(o.protocol_expression)))throw new TypeError('Protocol "'+h+`" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]`);return j.call(this,h,p)},l.scheme=l.protocol,l.port=function(h,p){return this._parts.urn?h===void 0?"":this:(h!==void 0&&(h===0&&(h=null),h&&(h+="",h.charAt(0)===":"&&(h=h.substring(1)),o.ensureValidPort(h))),W.call(this,h,p))},l.hostname=function(h,p){if(this._parts.urn)return h===void 0?"":this;if(h!==void 0){var y={preventInvalidHostname:this._parts.preventInvalidHostname},O=o.parseHost(h,y);if(O!=="/")throw new TypeError('Hostname "'+h+'" contains characters other than [A-Z0-9.-]');h=y.hostname,this._parts.preventInvalidHostname&&o.ensureValidHostname(h,this._parts.protocol)}return $.call(this,h,p)},l.origin=function(h,p){if(this._parts.urn)return h===void 0?"":this;if(h===void 0){var y=this.protocol(),O=this.authority();return O?(y?y+"://":"")+this.authority():""}else{var x=o(h);return this.protocol(x.protocol()).authority(x.authority()).build(!p),this}},l.host=function(h,p){if(this._parts.urn)return h===void 0?"":this;if(h===void 0)return this._parts.hostname?o.buildHost(this._parts):"";var y=o.parseHost(h,this._parts);if(y!=="/")throw new TypeError('Hostname "'+h+'" contains characters other than [A-Z0-9.-]');return this.build(!p),this},l.authority=function(h,p){if(this._parts.urn)return h===void 0?"":this;if(h===void 0)return this._parts.hostname?o.buildAuthority(this._parts):"";var y=o.parseAuthority(h,this._parts);if(y!=="/")throw new TypeError('Hostname "'+h+'" contains characters other than [A-Z0-9.-]');return this.build(!p),this},l.userinfo=function(h,p){if(this._parts.urn)return h===void 0?"":this;if(h===void 0){var y=o.buildUserinfo(this._parts);return y&&y.substring(0,y.length-1)}else return h[h.length-1]!=="@"&&(h+="@"),o.parseUserinfo(h,this._parts),this.build(!p),this},l.resource=function(h,p){var y;return h===void 0?this.path()+this.search()+this.hash():(y=o.parse(h),this._parts.path=y.path,this._parts.query=y.query,this._parts.fragment=y.fragment,this.build(!p),this)},l.subdomain=function(h,p){if(this._parts.urn)return h===void 0?"":this;if(h===void 0){if(!this._parts.hostname||this.is("IP"))return"";var y=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,y)||""}else{var O=this._parts.hostname.length-this.domain().length,x=this._parts.hostname.substring(0,O),w=new RegExp("^"+u(x));if(h&&h.charAt(h.length-1)!=="."&&(h+="."),h.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");return h&&o.ensureValidHostname(h,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(w,h),this.build(!p),this}},l.domain=function(h,p){if(this._parts.urn)return h===void 0?"":this;if(typeof h=="boolean"&&(p=h,h=void 0),h===void 0){if(!this._parts.hostname||this.is("IP"))return"";var y=this._parts.hostname.match(/\./g);if(y&&y.length<2)return this._parts.hostname;var O=this._parts.hostname.length-this.tld(p).length-1;return O=this._parts.hostname.lastIndexOf(".",O-1)+1,this._parts.hostname.substring(O)||""}else{if(!h)throw new TypeError("cannot set domain empty");if(h.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");if(o.ensureValidHostname(h,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=h;else{var x=new RegExp(u(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(x,h)}return this.build(!p),this}},l.tld=function(h,p){if(this._parts.urn)return h===void 0?"":this;if(typeof h=="boolean"&&(p=h,h=void 0),h===void 0){if(!this._parts.hostname||this.is("IP"))return"";var y=this._parts.hostname.lastIndexOf("."),O=this._parts.hostname.substring(y+1);return p!==!0&&n&&n.list[O.toLowerCase()]&&n.get(this._parts.hostname)||O}else{var x;if(h)if(h.match(/[^a-zA-Z0-9-]/))if(n&&n.is(h))x=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(x,h);else throw new TypeError('TLD "'+h+'" contains characters other than [A-Z0-9]');else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");x=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(x,h)}else throw new TypeError("cannot set TLD empty");return this.build(!p),this}},l.directory=function(h,p){if(this._parts.urn)return h===void 0?"":this;if(h===void 0||h===!0){if(!this._parts.path&&!this._parts.hostname)return"";if(this._parts.path==="/")return"/";var y=this._parts.path.length-this.filename().length-1,O=this._parts.path.substring(0,y)||(this._parts.hostname?"/":"");return h?o.decodePath(O):O}else{var x=this._parts.path.length-this.filename().length,w=this._parts.path.substring(0,x),D=new RegExp("^"+u(w));return this.is("relative")||(h||(h="/"),h.charAt(0)!=="/"&&(h="/"+h)),h&&h.charAt(h.length-1)!=="/"&&(h+="/"),h=o.recodePath(h),this._parts.path=this._parts.path.replace(D,h),this.build(!p),this}},l.filename=function(h,p){if(this._parts.urn)return h===void 0?"":this;if(typeof h!="string"){if(!this._parts.path||this._parts.path==="/")return"";var y=this._parts.path.lastIndexOf("/"),O=this._parts.path.substring(y+1);return h?o.decodePathSegment(O):O}else{var x=!1;h.charAt(0)==="/"&&(h=h.substring(1)),h.match(/\.?\//)&&(x=!0);var w=new RegExp(u(this.filename())+"$");return h=o.recodePath(h),this._parts.path=this._parts.path.replace(w,h),x?this.normalizePath(p):this.build(!p),this}},l.suffix=function(h,p){if(this._parts.urn)return h===void 0?"":this;if(h===void 0||h===!0){if(!this._parts.path||this._parts.path==="/")return"";var y=this.filename(),O=y.lastIndexOf("."),x,w;return O===-1?"":(x=y.substring(O+1),w=/^[a-z0-9%]+$/i.test(x)?x:"",h?o.decodePathSegment(w):w)}else{h.charAt(0)==="."&&(h=h.substring(1));var D=this.suffix(),S;if(D)h?S=new RegExp(u(D)+"$"):S=new RegExp(u("."+D)+"$");else{if(!h)return this;this._parts.path+="."+o.recodePath(h)}return S&&(h=o.recodePath(h),this._parts.path=this._parts.path.replace(S,h)),this.build(!p),this}},l.segment=function(h,p,y){var O=this._parts.urn?":":"/",x=this.path(),w=x.substring(0,1)==="/",D=x.split(O);if(h!==void 0&&typeof h!="number"&&(y=p,p=h,h=void 0),h!==void 0&&typeof h!="number")throw new Error('Bad segment "'+h+'", must be 0-based integer');if(w&&D.shift(),h<0&&(h=Math.max(D.length+h,0)),p===void 0)return h===void 0?D:D[h];if(h===null||D[h]===void 0)if(m(p)){D=[];for(var S=0,B=p.length;S<B;S++)!p[S].length&&(!D.length||!D[D.length-1].length)||(D.length&&!D[D.length-1].length&&D.pop(),D.push(b(p[S])))}else(p||typeof p=="string")&&(p=b(p),D[D.length-1]===""?D[D.length-1]=p:D.push(p));else p?D[h]=b(p):D.splice(h,1);return w&&D.unshift(""),this.path(D.join(O),y)},l.segmentCoded=function(h,p,y){var O,x,w;if(typeof h!="number"&&(y=p,p=h,h=void 0),p===void 0){if(O=this.segment(h,p,y),!m(O))O=O!==void 0?o.decode(O):void 0;else for(x=0,w=O.length;x<w;x++)O[x]=o.decode(O[x]);return O}if(!m(p))p=typeof p=="string"||p instanceof String?o.encode(p):p;else for(x=0,w=p.length;x<w;x++)p[x]=o.encode(p[x]);return this.segment(h,p,y)};var k=l.query;return l.query=function(h,p){if(h===!0)return o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof h=="function"){var y=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace),O=h.call(this,y);return this._parts.query=o.buildQuery(O||y,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!p),this}else return h!==void 0&&typeof h!="string"?(this._parts.query=o.buildQuery(h,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!p),this):k.call(this,h,p)},l.setQuery=function(h,p,y){var O=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof h=="string"||h instanceof String)O[h]=p!==void 0?p:null;else if(typeof h=="object")for(var x in h)c.call(h,x)&&(O[x]=h[x]);else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");return this._parts.query=o.buildQuery(O,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof h!="string"&&(y=p),this.build(!y),this},l.addQuery=function(h,p,y){var O=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return o.addQuery(O,h,p===void 0?null:p),this._parts.query=o.buildQuery(O,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof h!="string"&&(y=p),this.build(!y),this},l.removeQuery=function(h,p,y){var O=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return o.removeQuery(O,h,p),this._parts.query=o.buildQuery(O,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof h!="string"&&(y=p),this.build(!y),this},l.hasQuery=function(h,p,y){var O=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return o.hasQuery(O,h,p,y)},l.setSearch=l.setQuery,l.addSearch=l.addQuery,l.removeSearch=l.removeQuery,l.hasSearch=l.hasQuery,l.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},l.normalizeProtocol=function(h){return typeof this._parts.protocol=="string"&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!h)),this},l.normalizeHostname=function(h){return this._parts.hostname&&(this.is("IDN")&&t?this._parts.hostname=t.toASCII(this._parts.hostname):this.is("IPv6")&&i&&(this._parts.hostname=i.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!h)),this},l.normalizePort=function(h){return typeof this._parts.protocol=="string"&&this._parts.port===o.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!h)),this},l.normalizePath=function(h){var p=this._parts.path;if(!p)return this;if(this._parts.urn)return this._parts.path=o.recodeUrnPath(this._parts.path),this.build(!h),this;if(this._parts.path==="/")return this;p=o.recodePath(p);var y,O="",x,w;for(p.charAt(0)!=="/"&&(y=!0,p="/"+p),(p.slice(-3)==="/.."||p.slice(-2)==="/.")&&(p+="/"),p=p.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),y&&(O=p.substring(1).match(/^(\.\.\/)+/)||"",O&&(O=O[0]));x=p.search(/\/\.\.(\/|$)/),x!==-1;){if(x===0){p=p.substring(3);continue}w=p.substring(0,x).lastIndexOf("/"),w===-1&&(w=x),p=p.substring(0,w)+p.substring(x+3)}return y&&this.is("relative")&&(p=O+p.substring(1)),this._parts.path=p,this.build(!h),this},l.normalizePathname=l.normalizePath,l.normalizeQuery=function(h){return typeof this._parts.query=="string"&&(this._parts.query.length?this.query(o.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!h)),this},l.normalizeFragment=function(h){return this._parts.fragment||(this._parts.fragment=null,this.build(!h)),this},l.normalizeSearch=l.normalizeQuery,l.normalizeHash=l.normalizeFragment,l.iso8859=function(){var h=o.encode,p=o.decode;o.encode=escape,o.decode=decodeURIComponent;try{this.normalize()}finally{o.encode=h,o.decode=p}return this},l.unicode=function(){var h=o.encode,p=o.decode;o.encode=M,o.decode=unescape;try{this.normalize()}finally{o.encode=h,o.decode=p}return this},l.readable=function(){var h=this.clone();h.username("").password("").normalize();var p="";if(h._parts.protocol&&(p+=h._parts.protocol+"://"),h._parts.hostname&&(h.is("punycode")&&t?(p+=t.toUnicode(h._parts.hostname),h._parts.port&&(p+=":"+h._parts.port)):p+=h.host()),h._parts.hostname&&h._parts.path&&h._parts.path.charAt(0)!=="/"&&(p+="/"),p+=h.path(!0),h._parts.query){for(var y="",O=0,x=h._parts.query.split("&"),w=x.length;O<w;O++){var D=(x[O]||"").split("=");y+="&"+o.decodeQuery(D[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),D[1]!==void 0&&(y+="="+o.decodeQuery(D[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}p+="?"+y.substring(1)}return p+=o.decodeQuery(h.hash(),!0),p},l.absoluteTo=function(h){var p=this.clone(),y=["protocol","username","password","hostname","port"],O,x,w;if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(h instanceof o||(h=new o(h)),p._parts.protocol||(p._parts.protocol=h._parts.protocol,this._parts.hostname))return p;for(x=0;w=y[x];x++)p._parts[w]=h._parts[w];return p._parts.path?(p._parts.path.substring(-2)===".."&&(p._parts.path+="/"),p.path().charAt(0)!=="/"&&(O=h.directory(),O=O||(h.path().indexOf("/")===0?"/":""),p._parts.path=(O?O+"/":"")+p._parts.path,p.normalizePath())):(p._parts.path=h._parts.path,p._parts.query||(p._parts.query=h._parts.query)),p.build(),p},l.relativeTo=function(h){var p=this.clone().normalize(),y,O,x,w,D;if(p._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(h=new o(h).normalize(),y=p._parts,O=h._parts,w=p.path(),D=h.path(),w.charAt(0)!=="/")throw new Error("URI is already relative");if(D.charAt(0)!=="/")throw new Error("Cannot calculate a URI relative to another relative URI");if(y.protocol===O.protocol&&(y.protocol=null),y.username!==O.username||y.password!==O.password||y.protocol!==null||y.username!==null||y.password!==null)return p.build();if(y.hostname===O.hostname&&y.port===O.port)y.hostname=null,y.port=null;else return p.build();if(w===D)return y.path="",p.build();if(x=o.commonPath(w,D),!x)return p.build();var S=O.path.substring(x.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return y.path=S+y.path.substring(x.length)||"./",p.build()},l.equals=function(h){var p=this.clone(),y=new o(h),O={},x={},w={},D,S,B;if(p.normalize(),y.normalize(),p.toString()===y.toString())return!0;if(D=p.query(),S=y.query(),p.query(""),y.query(""),p.toString()!==y.toString()||D.length!==S.length)return!1;O=o.parseQuery(D,this._parts.escapeQuerySpace),x=o.parseQuery(S,this._parts.escapeQuerySpace);for(B in O)if(c.call(O,B)){if(m(O[B])){if(!C(O[B],x[B]))return!1}else if(O[B]!==x[B])return!1;w[B]=!0}for(B in x)if(c.call(x,B)&&!w[B])return!1;return!0},l.preventInvalidHostname=function(h){return this._parts.preventInvalidHostname=!!h,this},l.duplicateQueryParameters=function(h){return this._parts.duplicateQueryParameters=!!h,this},l.escapeQuerySpace=function(h){return this._parts.escapeQuerySpace=!!h,this},o})})(Ly);var AD=Ly.exports;const Fy={},ky={},hu={},Ny={},mu={},Pr={};class DD{constructor(t){Object.keys(Nt).forEach(c=>{switch(Fy[Nt[c]]=t.protocol+"://{s}.tianditu.gov.cn/"+Nt[c]+"/wmts",ky[Nt[c]]=Nt[c].slice(0,3),hu[Nt[c]]=Nt[c].slice(4),Ny[Nt[c]]="tiles",hu[Nt[c]]==="w"?mu[Nt[c]]="900913":mu[Nt[c]]="4490",Nt[c]){case"img_w":case"img_c":case"cia_w":case"cia_c":case"cta_w":case"cta_c":Pr[Nt[c]]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18"];break;case"vec_w":case"vec_c":case"cva_w":case"cva_c":Pr[Nt[c]]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"];break;case"ter_w":case"ter_c":Pr[Nt[c]]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14"];break;case"eia_w":case"eia_c":case"eva_w":case"eva_c":case"ibo_c":case"ibo_w":Pr[Nt[c]]=["1","2","3","4","5","6","7","8","9","10"];break}});const{Credit:i,defaultValue:n,Event:r,GeographicTilingScheme:a,WebMercatorTilingScheme:o,when:s}=Cesium;t=n(t,{}),this._mapStyle=n(t.mapStyle,Nt.IMG_W),this._url=t.url||n(t.url,Fy[this._mapStyle]),this._token=t.token,this._layer=n(t.layer,ky[this._mapStyle]),this._style=n(t.style,"default"),this._tileMatrixSetID=n(t.tileMatrixSetID,hu[this._mapStyle]),this._tileMatrixLabels=n(t.tileMatrixLabels,Pr[this._mapStyle]),this._format=n(t.format,Ny[this._mapStyle]),this._epsgCode=mu[this._mapStyle],this._tilingScheme=this._epsgCode==="900913"?new o:new a,this._tileWidth=n(t.tileWidth,256),this._tileHeight=n(t.tileHeight,256),this._minimumLevel=n(t.minimumLevel,0),this._maximumLevel=n(t.maximumLevel,Pr[this._mapStyle].length),this._rectangle=n(t.rectangle,this.tilingScheme.rectangle),this._readyPromise=Promise.resolve(!0),this._errorEvent=new r;const l=n(t.credit,"\u5929\u5730\u56FE\u5168\u7403\u5F71\u50CF\u670D\u52A1");this._credit=typeof l=="string"?new i(l):l,this._subdomains=n(t.subdomains,["t0","t1","t2","t3","t4","t5","t6","t7"]),this._tileDiscardPolicy=t.tileDiscardPolicy}requestImage(t,i,n){const r=ID.call(this,t,i,n);return Cesium.ImageryProvider.loadImage(this,r)}pickFeatures(t,i,n,r,a){}get url(){return this._url}get mapStyle(){return this._mapStyle}get tileWidth(){return this._tileWidth}get tileHeight(){return this._tileHeight}get maximumLevel(){return this._maximumLevel}get minimumLevel(){return this._minimumLevel}get tilingScheme(){return this._tilingScheme}get rectangle(){return this._rectangle}get errorEvent(){return this._errorEvent}get ready(){return!0}get readyPromise(){return this._readyPromise}get credit(){return this._credit}get hasAlphaChannel(){return!0}get tileDiscardPolicy(){return this._tileDiscardPolicy}}function ID(e,t,i){var n;const{combine:r,defined:a,defaultValue:o,queryToObject:s,objectToQuery:l}=Cesium,u=Object.freeze({service:"WMTS",version:"1.0.0",request:"GetTile"});this._epsgCode==="900913"&&(i-=1);const d=this._tileMatrixLabels,m=a(d)?d[i]:i.toString(),f=this._subdomains;let v=this._url.replace("{s}",f[(e+t+i)%f.length]);const C=new AD(v);let b=s(o((n=C.query)==null?void 0:n.call(C),""));b=r(u,b),b.tilematrix=m,b.layer=this._layer,b.style=this._style,b.tilerow=t,b.tilecol=e,b.tilematrixset=this._tileMatrixSetID,b.format=this._format;const _=l(b);return v=C.toString()+"?"+_,a(this._proxy)&&(v=this._proxy.getURL(v)),a(this._token)&&(v+="&tk="+this._token),v}var RD=DD;const zy={...Ti,...ui,...ii,...St,mapStyle:{type:String,default:"img_w",validator:e=>["cia_c","cia_w","cta_c","cta_w","cva_c","cva_w","ela_c","ela_w","eva_c","eva_w","img_c","img_w","ter_c","ter_w","vec_c","vec_w","ibo_c","ibo_w"].includes(e)},token:String,protocol:{type:String,default:"https"},credit:{type:[String,Object],default:"\u5929\u5730\u56FE\u5168\u7403\u5F71\u50CF\u670D\u52A1"},...Bn};var Vy=te({name:"VcImageryProviderTianditu",props:zy,emits:nt,setup(e,t){const i=re();i.cesiumClass="TiandituImageryProvider";const n=tt(e,t,i);if(n!==void 0)return i.createCesiumObject=async()=>{Cesium.TiandituImageryProvider=Cesium.TiandituImageryProvider||RD,n.unwatchFns.length===0&&n.setPropsWatcher(!0);const r=n.transformProps(e);return new Cesium.TiandituImageryProvider(r)},()=>{var r;return ne(ae(((r=i.proxy)==null?void 0:r.$options.name)||""))}}});const $y={...Ai,...Re,color:{type:[Object,String,Array],default:"YELLOW"},...Qi,...Xi};var Gy=te({name:"VcImageryProviderTileCoordinates",props:$y,emits:nt,setup(e,t){const i=re();return i.cesiumClass="TileCoordinatesImageryProvider",tt(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const Uy={url:[String,Object],...yl,...Et,...ui,...ii,...St,...Ai,...Re,...Qi,...Xi,flipXY:Boolean,...Bn};var Hy=te({name:"VcImageryProviderTms",props:Uy,emits:nt,setup(e,t){const i=re();return i.cesiumClass="TileMapServiceImageryProvider",tt(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const Wy={...Ti,...Cl,...Et,...ui,...ii,...St,...Ai,...Re,...Qi,...Xi,dir:{type:String,reqiured:!0},scales:{type:Array,default:()=>[1/295829355,1/147914678,1/73957339,1/36978669,1/18489335,1/9244667,1/4622334,1/2311167,1/1155583,1/577792,1/288896,1/144448,1/72224,1/36112,1/18056,1/9026,1/4514]}};var qy=te({name:"VcImageryProviderTiledcache",props:Wy,emits:nt,setup(e,t){const i=re();i.cesiumClass="UrlTemplateImageryProvider";const n=tt(e,t,i);if(n===void 0)return;i.createCesiumObject=async()=>{const a=n.transformProps(e),{Credit:o,defined:s,defaultValue:l,DeveloperError:c,Ellipsoid:u,GeographicTilingScheme:d,Rectangle:m,Resource:f,UrlTemplateImageryProvider:v}=Cesium,{url:C,dir:b,format:_}=a;if(!s(C))throw new c("options.url is required.");if(!s(b))throw new c("options.dir is required.");const M=f.createIfNeeded(C);M.url+=`?dir=${b}&scale={scale}&col={x}&row={y}&format=${_}`;const g=l(a.tilingScheme,new d({ellipsoid:l(a.ellipsoid,u.WGS84),numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:1})),E=l(a.tileWidth,256),T=l(a.tileHeight,256),A=a.maximumLevel,R=l(a.minimumLevel,0),I=l(a.rectangle,g.rectangle),j=g.positionToTileXY(m.southwest(I),R),W=g.positionToTileXY(m.northeast(I),R),$=(Math.abs(W.x-j.x)+1)*(Math.abs(W.y-j.y)+1);if($>4)throw new c("The rectangle and minimumLevel indicate that there are "+$+" tiles at the minimum level. Imagery providers with more than four tiles at the minimum level are not supported.");let k=l(a.credit,"");return typeof k=="string"&&(k=new o(k)),new v({url:M,credit:k,tilingScheme:g,tileWidth:E,tileHeight:T,minimumLevel:R,maximumLevel:A,rectangle:I,customTags:{scale:(h,p,y,O)=>{const x=1/e.scales[O];return r(h,"{scale}",x)}}})};const r=(a,o,s)=>{if(a&&a.urlSchemeZeroPadding&&Object.prototype.hasOwnProperty.call(a.urlSchemeZeroPadding,o)){const l=a.urlSchemeZeroPadding[o];if(typeof l=="string"){const c=l.length;c>1&&(s=s.length>=c?s:new Array(c-s.toString().length+1).join("0")+s)}}return s};return()=>{var a;return ne(ae(((a=i.proxy)==null?void 0:a.$options.name)||""))}}});const Zy={...Ti,pickFeaturesUrl:[String,Object],urlSchemeZeroPadding:Object,...fa,...Et,...ui,...ii,...St,...Ai,...Re,...Qi,...Xi,hasAlphaChannel:{type:Boolean,default:!0},...wl,...ma,customTags:Object,...Bn};var Qy=te({name:"VcImageryProviderUrltemplate",props:Zy,emits:nt,setup(e,t){const i=re();return i.cesiumClass="UrlTemplateImageryProvider",tt(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const Xy={...Ti,...gl,parameters:Object,getFeatureInfoParameters:Object,...ma,...wl,...St,...Ai,...Re,...Qi,...Xi,...ui,...ii,crs:String,srs:String,...Et,...fa,..._l,...xl,getFeatureInfoUrl:[String,Object]};var Yy=te({name:"VcImageryProviderWms",props:Xy,emits:nt,setup(e,t){const i=re();return i.cesiumClass="WebMapServiceImageryProvider",tt(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const Jy={...Ti,...Cl,layer:{type:String,required:!0},wmtsStyle:{type:String,required:!0},tileMatrixSetID:{type:String,required:!0},tileMatrixLabels:Array,..._l,...xl,dimensions:Object,...Qi,...Xi,...Ai,...St,...ui,...ii,...Re,...Et,...fa};var Ky=te({name:"VcImageryProviderWmts",props:Jy,emits:nt,setup(e,t){const i=re();return i.cesiumClass="WebMapTileServiceImageryProvider",tt(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const eb={url:[String,Object],requestVertexNormals:{type:Boolean,default:!1},requestWaterMask:{type:Boolean,default:!1},requestMetadata:{type:Boolean,default:!0},...Re,...Et};var tb=te({name:"VcTerrainProviderCesium",props:eb,emits:nt,setup(e,t){const i=re();i.cesiumClass="CesiumTerrainProvider";const n=tt(e,t,i);if(n!==void 0)return i.createCesiumObject=async()=>{n.unwatchFns.length===0&&n.setPropsWatcher(!0);const r=n.transformProps(e);return Cesium.defined(r.url)?new Cesium.CesiumTerrainProvider(r):Cesium.createWorldTerrain({requestVertexNormals:r.requestVertexNormals,requestWaterMask:r.requestWaterMask})},()=>{var r;return ne(ae(((r=i.proxy)==null?void 0:r.$options.name)||""))}}});const ib={url:{type:[String,Object],default:"https://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer"},...Re,...vl};var nb=te({name:"VcTerrainProviderArcgis",props:ib,emits:nt,setup(e,t){const i=re();return i.cesiumClass="ArcGISTiledElevationTerrainProvider",tt(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const rb={url:{type:[String,Object],default:"https://www.vr-theworld.com/vr-theworld/tiles1.0.0/73/"},...Re,...Et};var ob=te({name:"VcTerrainProviderVrTheworld",props:rb,emits:nt,setup(e,t){const i=re();return i.cesiumClass="VRTheWorldTerrainProvider",tt(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const ab={url:{type:String,default:"https://{s}.tianditu.gov.cn/"},subdomains:{type:Array,default:()=>["t0","t1","t2","t3","t4","t5","t6","t7"]},pluginPath:{type:String,default:"https://api.tianditu.gov.cn/cdn/plugins/cesium/cesiumTdt.js"},dataType:{type:String,default:"int",validator:e=>["int","float"].includes(e)},tileType:{type:String,default:"heightmap",validator:e=>["heightmap","quantized-mesh"].includes(e)},token:String};var sb=te({name:"VcTerrainProviderTianditu",props:ab,emits:nt,setup(e,t){const i=re();i.cesiumClass="GeoTerrainProvider";const n=tt(e,t,i);if(n===void 0)return;const{emit:r}=t,a=ql();let o;return i.createCesiumObject=async()=>new Promise((s,l)=>{o=document.createElement("script"),document.body.appendChild(o),o.src=e.pluginPath,o.onload=()=>{n.unwatchFns.length===0&&n.setPropsWatcher(!0);const c=[];for(let u=0;u<e.subdomains.length;u++){const d=e.url.replace("{s}",e.subdomains[u])+"mapservice/swdx?tk="+e.token;c.push(d)}s(new Cesium.GeoTerrainProvider({urls:c}))}}),i.unmount=async()=>{const s=new Cesium.EllipsoidTerrainProvider;return s.readyPromise.then(()=>{Me(i,"readyPromise")&&r("readyPromise",s,a==null?void 0:a.viewer,i.proxy)}),a&&(a.viewer.terrainProvider=s),o==null||o.parentNode.removeChild(o),!0},()=>{var s;return ne(ae(((s=i.proxy)==null?void 0:s.$options.name)||""))}}});const LD=[oy,sy,dy,my,py,gy,yy,Cy,_y,Ey,Ay,Ry,Vy,Gy,Hy,qy,Qy,Yy,Ky,tb,nb,ob,sb];LD.forEach(e=>{e.install=t=>{t.component(e.name,e)}});const lb=oy,cb=sy,ub=dy,db=my,hb=py,mb=gy,fb=yy,pb=Cy,vb=_y,gb=Ey,yb=Ay,bb=Ry,Cb=Vy,wb=Gy,_b=Hy,xb=qy,Eb=Qy,Ob=Yy,Pb=Ky,Mb=tb,Sb=nb,Tb=ob,Ab=sb,Db={...Ae,...et,entities:{type:Array,default:()=>[]},name:String,destroy:{type:Boolean,default:!1}};var Ib=te({name:"VcDatasourceCustom",props:Db,emits:oo,setup(e,t){const i=re();return i.cesiumClass="CustomDataSource",eo(e,t,i),i.createCesiumObject=async()=>new Cesium.CustomDataSource(e.name),()=>{var n,r;return t.slots.default?P("i",{class:ae(((n=i.proxy)==null?void 0:n.$options.name)||""),style:{display:"none !important"}},Ke(t.slots.default)):ne(ae(((r=i.proxy)==null?void 0:r.$options.name)||""))}}});const Rb={...Ae,...et,entities:{type:Array,default:()=>[]},czml:{type:[String,Object,Array],required:!0},...ya,...Et,destroy:{type:Boolean,default:!1}};var Lb=te({name:"VcDatasourceCzml",props:Rb,emits:oo,setup(e,t){const i=re();i.cesiumClass="CzmlDataSource";const n=eo(e,t,i);if(n!==void 0)return i.createCesiumObject=async()=>{const r=n.transformProps(e);return Cesium.CzmlDataSource.load(e.czml,r)},()=>{var r,a;return t.slots.default?P("i",{class:ae(((r=i.proxy)==null?void 0:r.$options.name)||""),style:{display:"none !important"}},Ke(t.slots.default)):ne(ae(((a=i.proxy)==null?void 0:a.$options.name)||""))}}});const Bb={...Ae,...et,entities:{type:Array,default:()=>[]},...jl,...ya,describe:[Function,Object],markerSize:{type:Number,default:48},markerSymbol:String,markerColor:{type:[Object,String,Array],default:()=>({x:.2549019607843137,y:.4117647058823529,z:.8823529411764706}),watcherOptions:{cesiumObjectBuilder:Te}},stroke:{type:[Object,String,Array],default:()=>({x:1,y:1,z:0}),watcherOptions:{cesiumObjectBuilder:Te}},strokeWidth:{type:Number,default:2},fill:{type:[Object,String,Array],default:()=>({x:1,y:1,z:0,w:.39215686274509803}),watcherOptions:{cesiumObjectBuilder:Te}},...Hr,...Et,destroy:{type:Boolean,default:!1}};var jb=te({name:"VcDatasourceGeojson",props:Bb,emits:oo,setup(e,t){const i=re();i.cesiumClass="GeoJsonDataSource";const n=eo(e,t,i);if(n!==void 0)return i.createCesiumObject=async()=>{const r=n.transformProps(e);return Cesium.GeoJsonDataSource.load(e.data,r)},()=>{var r,a;return t.slots.default?P("i",{class:ae(((r=i.proxy)==null?void 0:r.$options.name)||""),style:{display:"none !important"}},Ke(t.slots.default)):ne(ae(((a=i.proxy)==null?void 0:a.$options.name)||""))}}});const Fb={...Ae,...et,entities:{type:Array,default:()=>[]},...jl,camera:Object,canvas:HTMLCanvasElement,...ya,...Hr,...Re,...Et,destroy:{type:Boolean,default:!1},screenOverlayContainer:[Element,String]};var kb=te({name:"VcDatasourceKml",props:Fb,emits:oo,setup(e,t){const i=re();i.cesiumClass="KmlDataSource";const n=eo(e,t,i),r=ql();return i.createCesiumObject=async()=>{const a=n==null?void 0:n.transformProps(e);return a.camera||(a.camera=r==null?void 0:r.viewer.camera),a.canvas||(a.canvas=r==null?void 0:r.viewer.canvas),Cesium.KmlDataSource.load(e.data||"",a)},()=>{var a,o;return t.slots.default?P("i",{class:ae(((a=i.proxy)==null?void 0:a.$options.name)||""),style:{display:"none !important"}},Ke(t.slots.default)):ne(ae(((o=i.proxy)==null?void 0:o.$options.name)||""))}}});const BD=[Ib,Lb,jb,kb];BD.forEach(e=>{e.install=t=>{t.component(e.name,e)}});const Nb=Ib,zb=Lb,Vb=jb,$b=kb,Gb={...Wo,...Dn,...Yn,...zr,...Vr,...Gr,...Wt,...Wi,...qi,...Zs,...qo,...Oi,...Lt,...In,...Rn,...$r,...An,...Ae,...lt,...wh};var Ub=te({name:"VcGraphicsBillboard",props:Gb,emits:ro,setup(e,t){const i=re();return i.cesiumClass="BillboardGraphics",Tt(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Hb={...Ae,...Zo,...Wt,...Pi,...ei,...Mi,...qt,...Zt,...Vt,...lt};var Wb=te({name:"VcGraphicsBox",props:Hb,emits:ro,setup(e,t){const i=re();return i.cesiumClass="BoxGraphics",Tt(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const jD={...Ae,...ti,...Oi,...Lt,...Wt,...Qt,...Ur,...Ln,...Je,...Pi,...ei,...Mi,...qt,...Zt,...Vt,...lt,...Si,...Jn};var qb=te({name:"VcGraphicsCorridor",props:jD,emits:ro,setup(e,t){const i=re();return i.cesiumClass="CorridorGraphics",Tt(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Zb={...Ae,...Qo,...Xo,...Yo,...Wt,...Pi,...ei,...Mi,...qt,...Zt,...Kn,...Jo,...Vt,...lt};var Qb=te({name:"VcGraphicsCylinder",props:Zb,emits:ro,setup(e,t){const i=re();return i.cesiumClass="CylinderGraphics",Tt(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Xb={...Ae,...Ko,...ea,...Lt,...Wt,...Qt,...Ur,...qi,...Li,...Je,...Pi,...ei,...Mi,...qt,...Zt,...Kn,...Vt,...lt,...Si,...Jn};var Yb=te({name:"VcGraphicsEllipse",props:Xb,emits:Ce,setup(e,t){const i=re();return i.cesiumClass="EllipseGraphics",Tt(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Jb={...Ae,...ta,...ia,...na,...ra,...oa,...aa,...Wt,...Pi,...ei,...Mi,...qt,...Zt,...er,...tr,...sa,...Vt,...lt};var Kb=te({name:"VcGraphicsEllipsoid",props:Jb,emits:Ce,setup(e,t){const i=re();return i.cesiumClass="EllipsoidGraphics",Tt(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const eC={...Ae,...Qs,...Xs,...Ys,...Dn,...Js,...Ks,...el,...Yn,...zr,...Vr,...Gr,...Wt,...tl,...qt,...Zt,...Rn,...$r,...In,...lt,...An};var tC=te({name:"VcGraphicsLabel",props:eC,emits:Ce,setup(e,t){const i=re();return i.cesiumClass="LabelGraphics",Tt(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const iC={...Ae,...il,...Dn,...nl,...rl,...ol,..._h,...al,...Vt,...Wt,...sl,...ll,...Wi,...cl,...ul,...la,...dl,...lt,...xh,...Eh,...ca};var nC=te({name:"VcGraphicsModel",props:iC,emits:Ce,setup(e,t){const i=re();return i.cesiumClass="ModelGraphics",Tt(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const rC={...Ae,leadTime:[Number,Object,Function],trailTime:[Number,Object,Function],...Oi,resolution:{type:[Number,Object,Function],default:60},...ei,...lt};var oC=te({name:"VcGraphicsPath",props:rC,emits:Ce,setup(e,t){const i=re();return i.cesiumClass="PathGraphics",Tt(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const aC={...Ae,...Oh,dimensions:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:mt}},...Pi,...ei,...Mi,...qt,...Zt,...Vt,...lt};var sC=te({name:"VcGraphicsPlane",props:aC,emits:Ce,setup(e,t){const i=re();return i.cesiumClass="PlaneGraphics",Tt(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const lC={...Ae,...hl,...Wt,...Wi,...qt,...Zt,...In,...Rn,...lt,...An};var cC=te({name:"VcGraphicsPoint",props:lC,emits:Ce,setup(e,t){const i=re();return i.cesiumClass="PointGraphics",Tt(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const uC={...Ae,...Ph,...Lt,...Wt,...Qt,...Ur,...Li,...Je,...Pi,...ei,...Mi,...qt,...Zt,...ua,...ml,...fl,...Zi,...Vt,...lt,...Si,...Jn};var dC=te({name:"VcGraphicsPolygon",props:uC,emits:Ce,setup(e,t){const i=re();return i.cesiumClass="PolygonGraphics",Tt(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const hC={...Ae,...ti,...Oi,...Je,...ei,...Mh,...Zi,...Hr,...Vt,...lt,...Si,...Jn};var mC=te({name:"VcGraphicsPolyline",props:hC,emits:Ce,setup(e,t){const i=re();return i.cesiumClass="PolylineGraphics",Tt(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const fC={...Ae,...ti,...Sh,...Ln,...Je,...Pi,...ei,...Mi,...qt,...Zt,...Vt,...lt};var pC=te({name:"VcGraphicsPolylineVolume",props:fC,emits:Ce,setup(e,t){const i=re();return i.cesiumClass="PolylineVolumeGraphics",Tt(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const vC={...Ae,...Th,...Lt,...Wt,...Qt,...Ur,...qi,...Li,...Je,...Pi,...ei,...Mi,...qt,...Zt,...Vt,...lt,...Si,...Jn};var gC=te({name:"VcGraphicsRectangle",props:vC,emits:Ce,setup(e,t){const i=re();return i.cesiumClass="RectangleGraphics",Tt(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const yC={...Ae,...il,...pl};var bC=te({name:"VcGraphicsTileset",props:yC,emits:Ce,setup(e,t){const i=re();return i.cesiumClass="Cesium3DTilesetGraphics",Tt(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const CC={...Ae,...ti,...da,...ha,...Je,...Pi,...ei,...Mi,...qt,...Zt,...Vt,...lt};var wC=te({name:"VcGraphicsWall",props:CC,emits:Ce,setup(e,t){const i=re();return i.cesiumClass="WallGraphics",Tt(e,t,i),()=>{var n;return ne(ae(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const FD=[Ub,Wb,qb,Qb,Yb,Kb,tC,nC,oC,sC,cC,dC,mC,pC,gC,bC,wC];FD.forEach(e=>{e.install=t=>{t.component(e.name,e)}});const _C=Ub,xC=Wb,EC=qb,OC=Qb,PC=Yb,MC=Kb,SC=tC,TC=nC,AC=oC,IC=sC,RC=cC,LC=dC,BC=mC,jC=pC,FC=gC,kC=bC,NC=wC,kD={fragmentShader:String,uniforms:Object,textureScale:{type:Number,default:1},forcePowerOfTwo:{type:Boolean,default:!1},sampleMode:Number,pixelFormat:Number,pixelDatatype:Number,...Nh,...zh,name:String};var ND=kD;const zC=ND;var fu=te({name:"VcPostProcessStage",props:zC,emits:Ce,setup(e,t){const i=re();i.cesiumClass="PostProcessStage",i.cesiumEvents=[];const n=Be(e,t,i);if(n===void 0)return;const{$services:r}=n;return i.mount=async()=>{const{postProcessStages:a}=r,o=a.add(i.cesiumObject);return a.contains(o)},i.unmount=async()=>{const{postProcessStages:a}=r;return a==null?void 0:a.remove(i.cesiumObject)},()=>{var a;return ne(ae(((a=i.proxy)==null?void 0:a.$options.name)||""))}}}),zD=`
uniform sampler2D colorTexture;
uniform sampler2D depthTexture;
varying vec2 v_textureCoordinates;
uniform vec4 u_scanCenterEC;
uniform vec3 u_scanPlaneNormalEC;
uniform vec3 u_scanLineNormalEC;
uniform float u_radius;
uniform vec4 u_scanColor;
vec4 toEye(in vec2 uv, in float depth)
{
vec2 xy = vec2((uv.x * 2.0 - 1.0),(uv.y * 2.0 - 1.0));
vec4 posInCamera =czm_inverseProjection * vec4(xy, depth, 1.0);
posInCamera =posInCamera / posInCamera.w;
return posInCamera;
}
bool isPointOnLineRight(in vec3 ptOnLine, in vec3 lineNormal, in vec3 testPt)
{
vec3 v01 = testPt - ptOnLine;
normalize(v01);
vec3 temp = cross(v01, lineNormal);
float d = dot(temp, u_scanPlaneNormalEC);
return d > 0.5;
}
vec3 pointProjectOnPlane(in vec3 planeNormal, in vec3 planeOrigin, in vec3 point)
{
vec3 v01 = point -planeOrigin;
float d = dot(planeNormal, v01) ;
return (point - planeNormal * d);
}
float distancePointToLine(in vec3 ptOnLine, in vec3 lineNormal, in vec3 testPt)
{
vec3 tempPt = pointProjectOnPlane(lineNormal, ptOnLine, testPt);
return length(tempPt - ptOnLine);
}
float getDepth(in vec4 depth)
{
float z_window = czm_unpackDepth(depth);
z_window = czm_reverseLogDepth(z_window);
float n_range = czm_depthRange.near;
float f_range = czm_depthRange.far;
return (2.0 * z_window - n_range - f_range) / (f_range - n_range);
}
void main()
{
gl_FragColor = texture2D(colorTexture, v_textureCoordinates);
float depth = getDepth( texture2D(depthTexture, v_textureCoordinates));
vec4 viewPos = toEye(v_textureCoordinates, depth);
vec3 prjOnPlane = pointProjectOnPlane(u_scanPlaneNormalEC.xyz, u_scanCenterEC.xyz, viewPos.xyz);
float dis = length(prjOnPlane.xyz - u_scanCenterEC.xyz);
float twou_radius = u_radius * 2.0;
if(dis < u_radius)
{
float f0 = 1.0 -abs(u_radius - dis) / u_radius;
f0 = pow(f0, 64.0);
vec3 lineEndPt = vec3(u_scanCenterEC.xyz) + u_scanLineNormalEC * u_radius;
float f = 0.0;
if(isPointOnLineRight(u_scanCenterEC.xyz, u_scanLineNormalEC.xyz, prjOnPlane.xyz))
{
float dis1= length(prjOnPlane.xyz - lineEndPt);
f = abs(twou_radius -dis1) / twou_radius;
f = pow(f, 3.0);
}
gl_FragColor = mix(gl_FragColor, u_scanColor, f + f0);
}
}
`;function VD(e){return{webgl:i=>{const{viewer:n}=e,r=Cesium.Cartographic.fromCartesian(i.position,n.scene.globe.ellipsoid),a=Cesium.Cartographic.toCartesian(r,n.scene.globe.ellipsoid),o=new Cesium.Cartesian4(a.x,a.y,a.z,1),s=new Cesium.Cartographic(r.longitude,r.latitude,r.height+500),l=Cesium.Cartographic.toCartesian(s,n.scene.globe.ellipsoid),c=new Cesium.Cartesian4(l.x,l.y,l.z,1),u=new Cesium.Cartographic(r.longitude+Cesium.Math.toRadians(.001),r.latitude,r.height),d=Cesium.Cartographic.toCartesian(u,n.scene.globe.ellipsoid),m=new Cesium.Cartesian4(d.x,d.y,d.z,1),f=new Cesium.Quaternion,v=new Cesium.Matrix3,C=new Date().getTime(),b=new Cesium.Cartesian4,_=new Cesium.Cartesian4,M=new Cesium.Cartesian4,g=new Cesium.Cartesian3,E=new Cesium.Cartesian3,T={u_scanCenterEC:function(){return Cesium.Matrix4.multiplyByVector(n.camera.viewMatrix,o,b)},u_scanPlaneNormalEC:function(){const A=Cesium.Matrix4.multiplyByVector(n.camera.viewMatrix,o,b),R=Cesium.Matrix4.multiplyByVector(n.camera.viewMatrix,c,_);return g.x=R.x-A.x,g.y=R.y-A.y,g.z=R.z-A.z,Cesium.Cartesian3.normalize(g,g),g},u_radius:i.radius,u_scanLineNormalEC:function(){const A=Cesium.Matrix4.multiplyByVector(n.camera.viewMatrix,o,b),R=Cesium.Matrix4.multiplyByVector(n.camera.viewMatrix,c,_),I=Cesium.Matrix4.multiplyByVector(n.camera.viewMatrix,m,M);g.x=R.x-A.x,g.y=R.y-A.y,g.z=R.z-A.z,Cesium.Cartesian3.normalize(g,g),E.x=I.x-A.x,E.y=I.y-A.y,E.z=I.z-A.z;const j=(new Date().getTime()-C)%i.interval/i.interval;return Cesium.Quaternion.fromAxisAngle(g,j*Cesium.Math.PI*2,f),Cesium.Matrix3.fromQuaternion(f,v),Cesium.Matrix3.multiplyByVector(v,E,E),Cesium.Cartesian3.normalize(E,E),E},u_scanColor:i.color};return{shaderSource:zD,uniforms:T}}}}var $D=`
uniform sampler2D colorTexture;
uniform sampler2D depthTexture;
varying vec2 v_textureCoordinates;
uniform vec4 u_scanCenterEC;
uniform vec3 u_scanPlaneNormalEC;
uniform float u_radius;
uniform vec4 u_scanColor;
vec4 toEye(in vec2 uv, in float depth)
{
vec2 xy = vec2((uv.x * 2.0 - 1.0),(uv.y * 2.0 - 1.0));
vec4 posInCamera =czm_inverseProjection * vec4(xy, depth, 1.0);
posInCamera =posInCamera / posInCamera.w;
return posInCamera;
}
vec3 pointProjectOnPlane(in vec3 planeNormal, in vec3 planeOrigin, in vec3 point)
{
vec3 v01 = point -planeOrigin;
float d = dot(planeNormal, v01) ;
return (point - planeNormal * d);
}
float getDepth(in vec4 depth)
{
float z_window = czm_unpackDepth(depth);
z_window = czm_reverseLogDepth(z_window);
float n_range = czm_depthRange.near;
float f_range = czm_depthRange.far;
return (2.0 * z_window - n_range - f_range) / (f_range - n_range);
}
void main()
{
gl_FragColor = texture2D(colorTexture, v_textureCoordinates);
float depth = getDepth( texture2D(depthTexture, v_textureCoordinates));
vec4 viewPos = toEye(v_textureCoordinates, depth);
vec3 prjOnPlane = pointProjectOnPlane(u_scanPlaneNormalEC.xyz, u_scanCenterEC.xyz, viewPos.xyz);
float dis = length(prjOnPlane.xyz - u_scanCenterEC.xyz);
if(dis < u_radius)
{
float f = 1.0 -abs(u_radius - dis) / u_radius;
f = pow(f, 4.0);
gl_FragColor = mix(gl_FragColor, u_scanColor, f);
}
}
`;function GD(e){return{webgl:i=>{const{viewer:n}=e,r=Cesium.Cartographic.fromCartesian(i.position,n.scene.globe.ellipsoid),a=Cesium.Cartographic.toCartesian(r,n.scene.globe.ellipsoid),o=new Cesium.Cartesian4(a.x,a.y,a.z,1),s=new Cesium.Cartographic(r.longitude,r.latitude,r.height+500),l=Cesium.Cartographic.toCartesian(s,n.scene.globe.ellipsoid),c=new Cesium.Cartesian4(l.x,l.y,l.z,1),u=new Date().getTime(),d=new Cesium.Cartesian4,m=new Cesium.Cartesian4,f=new Cesium.Cartesian3,v={u_scanCenterEC:function(){return Cesium.Matrix4.multiplyByVector(n.camera.viewMatrix,o,d)},u_scanPlaneNormalEC:function(){const C=Cesium.Matrix4.multiplyByVector(n.camera.viewMatrix,o,d),b=Cesium.Matrix4.multiplyByVector(n.camera.viewMatrix,c,m);return f.x=b.x-C.x,f.y=b.y-C.y,f.z=b.z-C.z,Cesium.Cartesian3.normalize(f,f),f},u_radius:function(){return i.radius*((new Date().getTime()-u)%i.interval)/i.interval},u_scanColor:i.color};return{shaderSource:$D,uniforms:v}}}}const UD={position:[0,0],radius:1500,interval:3500,color:[0,0,0,255]},VC={type:{type:String,default:"radar"},options:Object};var $C=te({name:"VcPostProcessStageScan",props:VC,emits:Ce,setup(e,t){const i=re();i.cesiumClass="VcPostProcessStageScan",i.cesiumEvents=[];const n=Be(e,t,i);if(n===void 0)return;const r=ie(""),a=ie(null),{$services:o}=n,s=VD(o),l=GD(o);let c=[];const u=ye(()=>Object.assign({},UD,e.options));return c.push(fe(()=>u,d=>{i.mounted&&i.proxy.reload()},{deep:!0})),i.createCesiumObject=async()=>{const d=n.transformProps(u.value);let m;return e.type==="radar"?m=s.webgl(d):e.type==="circle"&&(m=l.webgl(d)),r.value=m.shaderSource,a.value=m.uniforms,!0},ot(()=>{c.forEach(d=>d()),c=[]}),()=>P(fu,{fragmentShader:r.value,uniforms:a.value})}});const GC={postProcesses:{type:Array,default:()=>[]}};var UC=te({name:"VcPostProcessStageCollection",props:GC,emits:Ce,setup(e,t){const i=re();i.cesiumClass="PostProcessStageCollection",i.cesiumEvents=[];const n=Be(e,t,i);if(n===void 0)return;const{$services:r}=n,a=[];let o=[];return o.push(fe(()=>e.postProcesses,s=>{var l,c;i.mounted&&((c=(l=i.proxy).reload)==null||c.call(l))},{deep:!0})),i.createCesiumObject=async()=>a,i.mount=async()=>{const{postProcessStages:s}=r;return e.postProcesses.forEach(l=>{const c=n.transformProps(l);a.push(s.add(new Cesium.PostProcessStage(c)))}),!0},i.unmount=async()=>{const{postProcessStages:s}=r;return a.forEach(l=>{s.remove(l)}),a.length=0,!0},ot(()=>{o.forEach(s=>s()),o=[]}),()=>{var s,l;return t.slots.default?P("i",{class:ae(((s=i.proxy)==null?void 0:s.$options.name)||""),style:{display:"none !important"}},Ke(t.slots.default)):ne(ae(((l=i.proxy)==null?void 0:l.$options.name)||""))}}});const HD=[fu,$C,UC];HD.forEach(e=>{e.install=t=>{t.component(e.name,e)}});const HC=fu,WC=$C,qC=UC;var ss=te({name:"VcConfigProvider",props:{locale:{type:Object,default:()=>$h},cesiumPath:{type:String,default:"https://unpkg.com/cesium@latest/Build/Cesium/Cesium.js"},accessToken:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI2OGE2MjZlOC1mMzhiLTRkZjQtOWEwZi1jZTE0MWY0YzhlMTAiLCJpZCI6MjU5LCJpYXQiOjE2NDM3MjU1NzZ9.ptZ5tVXvMmuWRC0WhjtYTg-17nQh14fgxBsx0HJiVXQ"},reloadMode:{type:String,default:"all"}},setup(e,{slots:t}){const i=lh(e);return()=>a1(t,"default",{config:i==null?void 0:i.value})}});ss.install=e=>{e.component(ss.name,ss)};const ZC=ss;var WD=ZC;const qD=ZC,ZD={...Ce,stop:e=>!0};var QC=te({name:"VcAnalysisFlood",props:{minHeight:{type:Number,default:-1},maxHeight:{type:Number,default:8888},speed:{type:Number,default:10},loop:{type:Boolean,default:!1},color:{type:[Object,Array,String],default:"rgba(40,150,200,0.6)"},...kn},emits:ZD,setup(e,t){var i;const n=re();n.cesiumClass="VcAnalysisFlood",n.cesiumEvents=[];const r=Be(e,t,n);if(r===void 0)return;const{emit:a}=t,o=ie(!1);(i=xt(n).proxy.creatingPromise)==null||i.then(()=>{o.value=!0});const l=ie(!1),c=ie(null),u=ie(-1),d=ie(null);let m=!1,f=[];f.push(fe(()=>e.minHeight,M=>{u.value=M})),n.createCesiumObject=async()=>{const{ColorGeometryInstanceAttribute:M}=Cesium;return c.value={color:M.fromColor(Te(e.color))},d.value},n.mount=async()=>{const{viewer:M}=r.$services;return M.clock.onTick.addEventListener(v),!0},n.unmount=async()=>{const{viewer:M}=r.$services;return M.clock.onTick.removeEventListener(v),u.value=-1,l.value=!1,!0};const v=()=>{l.value&&(u.value<=e.maxHeight?(u.value+=e.speed,m=!1):(Me(n,"stop")&&a("stop",d.value),m=!0,e.loop?u.value=e.minHeight:l.value=!1))},C=M=>{u.value=Cesium.defined(M)?M:e.minHeight,l.value=!0},b=()=>{l.value=!l.value,m&&(u.value=e.minHeight)},_=()=>{u.value=-1,l.value=!1};return ot(()=>{f.forEach(M=>M()),f=[]}),Object.assign(n.proxy,{start:C,pause:b,stop:_,getCurrentHeight:()=>u.value}),()=>{if(o.value){const{createGuid:M}=Cesium;return P(Kc,{asynchronous:!1,ref:d},()=>P(Hn,{id:M(),attributes:c.value},()=>P(ru,{extrudedHeight:u.value,polygonHierarchy:e.polygonHierarchy})))}else return ne("v-if")}}});const QD=Object.assign({},ct,{icon:"vc-icons-analysis-sightline"}),XD=Object.assign({},Zc,{polylineOpts:Object.assign({},wr,{colors:["#51ff00","red"]}),primitiveOpts:Object.assign({},Gn,{appearance:{type:"PolylineColorAppearance"},depthFailAppearance:{type:"PolylineColorAppearance"}}),sightlineType:"polyline"}),YD=Object.assign({},ct,{icon:"vc-icons-analysis-viewshed"}),JD=Object.assign({},Za,{pointOpts:Object.assign({},bn,{show:!1}),polylineOpts:Object.assign({},wr,{width:15}),primitiveOpts:Object.assign({},Gn,{show:!1,appearance:{type:"PolylineMaterialAppearance",options:{material:{fabric:{type:"PolylineArrow",uniforms:{color:[255,255,0,255]}}}}},depthFailAppearance:{type:"PolylineMaterialAppearance",options:{material:{fabric:{type:"PolylineArrow",uniforms:{color:[255,255,0,255]}}}}}}),editorOpts:{pixelOffset:[16,-8],delay:1e3,hideDelay:1e3,move:Object.assign({},wt),removeAll:Object.assign({},wt,{icon:"vc-icons-delete"})},viewshedOpts:{fovH:90,fovV:60,offsetHeight:1.8,visibleColor:"#00ff00",invisibleColor:"#ff0000",showGridLine:!0,faceColor:"rgba(255,255,255,0.1)",lineColor:"rgba(255,255,255,0.4)"}}),KD=Object.assign({},ct,{direction:"right",icon:"vc-icons-analysis-button",activeIcon:"vc-icons-analysis-button",verticalActionsAlign:"center",hideIcon:!1,persistent:!1,modelValue:!0,hideActionOnClick:!1,color:"info"}),XC=["sightline","viewshed"],eI=e=>{let t=!0;return e.forEach(i=>{XC.includes(i)||(console.error(`VueCesium: unknown analysis type: ${i}`),t=!1)}),t},pu={...Xc,analyses:{type:Array,default:()=>XC,validator:eI},mainFabOpts:{type:Object,default:()=>KD},sightlineActionOpts:{type:Object,default:()=>QD},sightlineAnalysisOpts:{type:Object,default:()=>XD},viewshedActionOpts:{type:Object,default:()=>YD},viewshedAnalysisOpts:{type:Object,default:()=>JD}},Mr=vi(pu);var YC=te({name:"VcAnalysisSightline",props:{...kt,polylineOpts:Object,polygonOpts:Object,primitiveOpts:Object,sightlineType:{type:String,default:"polyline"}},emits:vt,setup(e,t){if(e.sightlineType==="segment"||e.sightlineType==="circle")return en(e,t,"VcAnalysisSightline");if(e.sightlineType==="polyline")return Er(e,t,"VcAnalysisSightline")}}),JC=te({name:"VcAnalysisViewshed",props:{...kt,polylineOpts:Object,primitiveOpts:Object,viewshedOpts:Object},emits:vt,setup(e,t){return en(e,t,"VcAnalysisViewshed")}});const tI={...vt,fabUpdated:e=>!0};var KC=te({name:"VcAnalyses",props:pu,emits:tI,setup(e,t){var i;const n=re();n.cesiumClass="VcAnalyses";const{t:r}=Ct(),a={},o=Pe(Object.assign({},Mr.clearActionOpts,e.clearActionOpts)),s=Pe(Object.assign({},Mr.mainFabOpts,e.mainFabOpts)),l=Pe(Object.assign({},Mr.sightlineActionOpts,e.sightlineActionOpts)),c=Pe(Object.assign({},Mr.sightlineAnalysisOpts,e.sightlineAnalysisOpts)),u=Pe(Object.assign({},Mr.viewshedActionOpts,e.viewshedActionOpts)),d=Pe(Object.assign({},Mr.viewshedAnalysisOpts,e.viewshedAnalysisOpts));a.sightlineActionOpts=l,a.sightlineAnalysisOpts=c,a.viewshedActionOpts=u,a.viewshedAnalysisOpts=d,a.clearActionOpts=o;const m=ye(()=>e.analyses.map(v=>({name:v,type:"analysis",actionStyle:{background:a[`${Rt(v)}ActionOpts`].color,color:a[`${Rt(v)}ActionOpts`].textColor},actionClass:`vc-analysis-${v} vc-analysis-button`,actionRef:ie(null),actionOpts:a[`${Rt(v)}ActionOpts`],cmp:f(v),cmpRef:ie(null),cmpOpts:a[`${Rt(v)}AnalysisOpts`],tip:a[`${Rt(v)}ActionOpts`].tooltip.tip||r(`vc.analysis.${Rt(v)}.tip`),isActive:!1})));function f(v){switch(v){case"sightline":return YC;case"viewshed":return JC;default:return}}return(i=su(e,t,n,m,s,o,"analysis"))==null?void 0:i.renderContent}});const iI=[QC,KC];iI.forEach(e=>{e.install=t=>{t.component(e.name,e)}});const e1=QC,t1=KC;var nI=[rf,xp,Ep,Op,Pp,Mp,Sp,Tp,Ap,Dp,Ip,Rp,Lp,H4,iD,Xp,lb,cb,ub,db,hb,mb,fb,pb,vb,gb,yb,bb,Cb,wb,_b,xb,Eb,Ob,Pb,Mb,Sb,Tb,Ab,Nb,zb,Vb,$b,qp,_C,xC,EC,OC,PC,MC,SC,TC,AC,IC,RC,LC,BC,jC,FC,kC,NC,Kc,eu,Ya,hv,Un,mv,fv,nu,Jv,_o,xo,Kv,xr,eg,tg,ig,ng,rg,ts,V4,m0,f0,p0,v0,g0,y0,b0,C0,w0,_0,x0,E0,O0,P0,M0,S0,ns,T0,A0,ru,D0,Wn,I0,R0,L0,B0,j0,F0,k0,N0,z0,Cn,Mv,Sv,Tv,HC,WC,qC,ri,hn,Pt,tf,yc,Qm,Ta,Xm,Ym,Jm,mc,fc,pc,vc,Km,gc,ef,bc,Aa,WD,e1,t1],vu=uh([...nI]);const rI=vu.install,oI=vu.version;export{pt as AngleUnits,ft as AreaUnits,dm as DebugCameraPrimitive,Ot as DistanceUnits,Ee as DrawStatus,Ql as DynamicOverlay,it as MeasureUnits,Zl as PolygonPrimitive,mm as RectangleExtend,Jh as Ripple,fm as ShadowMapShaderExtend,Oa as Spinner,Jl as SpinnerBall,Kl as SpinnerBars,ec as SpinnerDots,tc as SpinnerGears,ic as SpinnerHourglass,nc as SpinnerIos,rc as SpinnerOrbit,oc as SpinnerOval,ac as SpinnerPuff,sc as SpinnerRings,lc as SpinnerTail,ba as TouchHold,QP as TouchRepeat,tf as VcAjaxBar,t1 as VcAnalyses,e1 as VcAnalysisFlood,YC as VcAnalysisSightline,JC as VcAnalysisViewshed,eg as VcBillboard,ri as VcBtn,nu as VcCollectionBillboard,Jv as VcCollectionCloud,_o as VcCollectionLabel,xo as VcCollectionPoint,Kv as VcCollectionPolyline,xr as VcCollectionPrimitive,xp as VcCompass,Ap as VcCompassSm,qD as VcConfigProvider,tg as VcCumulusCloud,Nb as VcDatasourceCustom,zb as VcDatasourceCzml,Vb as VcDatasourceGeojson,$b as VcDatasourceKml,Sp as VcDistanceLegend,J0 as VcDrawingPin,K0 as VcDrawingPoint,ty as VcDrawingPolygon,ey as VcDrawingPolyline,iy as VcDrawingRectangle,cu as VcDrawingRegular,nD as VcDrawings,r4 as VcEntity,bc as VcFab,Aa as VcFabAction,m0 as VcGeometryBox,f0 as VcGeometryBoxOutline,p0 as VcGeometryCircle,v0 as VcGeometryCircleOutline,b0 as VcGeometryCorridor,C0 as VcGeometryCorridorOutline,w0 as VcGeometryCylinder,_0 as VcGeometryCylinderOutline,x0 as VcGeometryEllipse,E0 as VcGeometryEllipseOutline,O0 as VcGeometryEllipsoid,P0 as VcGeometryEllipsoidOutline,M0 as VcGeometryFrustum,S0 as VcGeometryFrustumOutline,ns as VcGeometryGroundPolyline,Hn as VcGeometryInstance,T0 as VcGeometryPlane,A0 as VcGeometryPlaneOutline,ru as VcGeometryPolygon,g0 as VcGeometryPolygonCoplanar,y0 as VcGeometryPolygonCoplanarOutline,D0 as VcGeometryPolygonOutline,Wn as VcGeometryPolyline,I0 as VcGeometryPolylineVolume,R0 as VcGeometryPolylineVolumeOutline,L0 as VcGeometryRectangle,B0 as VcGeometryRectangleOutline,j0 as VcGeometrySimplePolyline,F0 as VcGeometrySphere,k0 as VcGeometrySphereOutline,N0 as VcGeometryWall,z0 as VcGeometryWallOutline,_C as VcGraphicsBillboard,xC as VcGraphicsBox,EC as VcGraphicsCorridor,OC as VcGraphicsCylinder,PC as VcGraphicsEllipse,MC as VcGraphicsEllipsoid,SC as VcGraphicsLabel,TC as VcGraphicsModel,AC as VcGraphicsPath,IC as VcGraphicsPlane,RC as VcGraphicsPoint,LC as VcGraphicsPolygon,BC as VcGraphicsPolyline,jC as VcGraphicsPolylineVolume,FC as VcGraphicsRectangle,kC as VcGraphicsTileset,NC as VcGraphicsWall,hn as VcIcon,lb as VcImageryProviderAmap,cb as VcImageryProviderArcgis,ub as VcImageryProviderBaidu,db as VcImageryProviderBing,hb as VcImageryProviderGoogle,mb as VcImageryProviderGrid,fb as VcImageryProviderIon,pb as VcImageryProviderMapbox,vb as VcImageryProviderOsm,gb as VcImageryProviderSingletile,yb as VcImageryProviderSupermap,bb as VcImageryProviderTencent,Cb as VcImageryProviderTianditu,wb as VcImageryProviderTileCoordinates,xb as VcImageryProviderTiledcache,_b as VcImageryProviderTms,Eb as VcImageryProviderUrltemplate,Ob as VcImageryProviderWms,Pb as VcImageryProviderWmts,ig as VcLabel,s4 as VcLayerImagery,q0 as VcMeasurementArea,V0 as VcMeasurementDistance,H0 as VcMeasurementHeight,G0 as VcMeasurementHorizontal,W0 as VcMeasurementPoint,$0 as VcMeasurementPolyline,Z0 as VcMeasurementRectangle,Q0 as VcMeasurementRegular,U0 as VcMeasurementVertical,W4 as VcMeasurements,Pp as VcMyLocation,Tp as VcNavigation,Ip as VcNavigationSm,Tv as VcOverlayDynamic,Mv as VcOverlayHeatmap,Cn as VcOverlayHtml,Sv as VcOverlayWind,Rp as VcOverviewMap,ng as VcPoint,ts as VcPolygon,rg as VcPolyline,HC as VcPostProcessStage,qC as VcPostProcessStageCollection,WC as VcPostProcessStageScan,Un as VcPrimitive,Kc as VcPrimitiveClassification,eu as VcPrimitiveGround,Ya as VcPrimitiveGroundPolyline,hv as VcPrimitiveModel,fv as VcPrimitiveParticle,mv as VcPrimitiveTileset,Op as VcPrint,Lp as VcSelectionIndicator,yc as VcSkeleton,ef as VcSpinner,Qm as VcSpinnerBall,Ta as VcSpinnerBars,Xm as VcSpinnerDots,Ym as VcSpinnerGears,Jm as VcSpinnerHourglass,mc as VcSpinnerIos,fc as VcSpinnerOrbit,pc as VcSpinnerOval,vc as VcSpinnerPuff,Km as VcSpinnerRings,gc as VcSpinnerTail,Mp as VcStatusBar,Sb as VcTerrainProviderArcgis,Mb as VcTerrainProviderCesium,Ab as VcTerrainProviderTianditu,Tb as VcTerrainProviderVrTheworld,Pt as VcTooltip,rf as VcViewer,pv as VcViewshed,Ep as VcZoomControl,Dp as VcZoomControlSm,pm as Viewshed,am as VisibilityState,jt as VolumeUnits,jm as ajaxBarProps,ry as amapImageryProviderProps,pu as analysesProps,ay as arcgisImageryProviderProps,ib as arcgisTerrainProviderProps,uy as baiduImageryProviderProps,Gb as billboarGraphicsProps,Av as billboardCollectionProps,Iv as billboardProps,hy as bingImageryProviderProps,sg as boxGeometryProps,Hb as boxGraphicsProps,cg as boxOutlineGeometryProps,Em as btnProps,Hh as buildLocaleContext,Gh as buildTranslator,eb as cesiumTerrainProviderProps,dg as circleGeometryProps,mg as circleOutlineGeometryProps,Yp as classificationPrimitiveProps,Bv as cloudCollectionProps,Ce as commonEmits,uf as compassProps,mp as compassSmProps,bg as corridorGeometryProps,wg as corridorOutlineGeometryProps,Lv as cumulusCloudProps,Db as customDatasourceProps,xg as cylinderGeometryProps,Zb as cylinderGraphicsProps,Og as cylinderOutlineGeometryProps,Rb as czmlDatasourceProps,oo as datasourceEmits,vu as default,cp as distanceLegendProps,vt as drawingEmit,lu as drawingsProps,Ov as dynamicOverlayProps,Mg as ellipseGeometryProps,Xb as ellipseGraphicsProps,Tg as ellipseOutlineGeometryProps,Dg as ellipsoidGeometryProps,Jb as ellipsoidGraphicsProps,Hp as entityProps,qm as fabActionProps,Um as fabProps,Lg as frustumGeometryProps,jg as frustumOutlineGeometryProps,Bb as geojsonDatasourceProps,og as geometryInstanceProps,fy as googleImageryProviderProps,ro as graphicsEmits,vy as gridImageryProviderProps,kg as groundPolylineGeometryProps,tv as groundPolylinePrimitiveProps,Kp as groundPrimitiveProps,vv as heatmapOverlayProps,$p as htmlOverlayProps,wm as iconProps,Zp as imageryLayerProps,rI as install,fD as ionImageryProviderProps,Fb as kmlDatasourceProps,Fv as labelCollectionProps,eC as labelGraphicsProps,Nv as labelProps,uh as makeInstaller,by as mapboxImageryProviderProps,Jc as measurementsProps,iC as modelGraphicsProps,nv as modelPrimitiveProps,vf as myLocationProps,dp as navigationProps,gp as navigationSmProps,wy as osmImageryProviderProps,bp as overviewProps,cv as particlePrimitiveProps,rC as pathGraphicsProps,no as pickEventEmits,zg as planeGeometryProps,aC as planeGraphicsProps,Vv as pointCollectionProps,lC as pointGraphicsProps,Gv as pointProps,gg as polygonCoplanarOutlineProps,pg as polygonCoplanarProps,Gg as polygonGeometryProps,uC as polygonGraphicsProps,Hg as polygonOutlineGeometryProps,Xv as polygonProps,qg as polylineGeometryProps,hC as polylineGraphicsProps,Wv as polylineProps,Qg as polylineVolumeGeometryProps,fC as polylineVolumeGraphicsProps,Yg as polylineVolumeOutlineGeometryProps,GC as postProcessStageCollectionProps,zC as postProcessStageProps,VC as postProcessStageScanProps,wi as primitiveCollectionEmits,Zv as primitiveCollectionProps,mn as primitiveEmits,ov as primitiveProps,mf as printProps,nt as providerEmits,Kg as rectangleGeometryProps,vC as rectangleGraphicsProps,t0 as rectangleOutlineGeometryProps,wp as selectionIndicatorProps,n0 as simplePolylineGeometryProps,xy as singletileImageryProviderProps,Nm as skeletonAnimations,zm as skeletonProps,km as skeletonTypes,s0 as sphereGeometryOutlineProps,o0 as sphereGeometryProps,sp as statusBarProps,Ty as supermapImageryProviderProps,Iy as tencentImageryProviderProps,zy as tiandituImageryProviderProps,ab as tiandituTerrainProviderProps,$y as tileCoordinatesImageryProviderProps,Wy as tiledcacheImageryProviderProps,yC as tilesetGraphicsProps,sv as tilesetPrimitiveProps,Uy as tmsImageryProviderProps,Rm as tooltipProps,Uh as translate,Zy as urltemplateImageryProviderProps,Be as useCommon,eo as useDatasources,Fl as useEvents,Ne as useGeometries,Tt as useGraphics,em as useHandler,Ct as useLocale,Nn as usePrimitiveCollectionItems,zn as usePrimitiveCollections,dn as usePrimitives,tt as useProviders,ql as useVueCesium,oI as version,gm as viewerProps,dv as viewshedProps,rb as vrTheworldImageryProviderProps,c0 as wallGeometryProps,CC as wallGraphicsProps,d0 as wallOutlineProps,xv as windmapOverlayProps,Xy as wmsImageryProviderProps,Jy as wmtsImageryProviderProps,df as zoomControlProps,fp as zoomControlSmProps};
//# sourceMappingURL=index.full.min.mjs.map