UNPKG

@dspacev-bundle/vue-cesium

Version:
887 lines 754 kB
/*! VueCesium v3.1.5 */System.register(["@dspacev-bundle/vue3","lodash-es","mitt","echarts"],function(X){"use strict";var te,ae,So,re,Gi,Ea,zr,on,Ke,he,Fc,xe,Jn,Be,S,Gr,ee,Ur,Ui,ne,kc,Xn,Rc,ni,Vc,$c,Hr,Nc,To,Ge,rt,zc,Wr,qr,Gc,Qr,Io;return{setters:[function(Ve){te=Ve.ref,ae=Ve.getCurrentInstance,So=Ve.inject,re=Ve.computed,Gi=Ve.provide,Ea=Ve.unref,zr=Ve.isRef,on=Ve.onBeforeUnmount,Ke=Ve.onUnmounted,he=Ve.watch,Fc=Ve.markRaw,xe=Ve.reactive,Jn=Ve.onMounted,Be=Ve.nextTick,S=Ve.h,Gr=Ve.withDirectives,ee=Ve.defineComponent,Ur=Ve.Transition,Ui=Ve.Teleport,ne=Ve.createCommentVNode,kc=Ve.createApp,Xn=Ve.toRaw,Rc=Ve.renderSlot},function(Ve){ni=Ve.isUndefined,Vc=Ve.isNull,$c=Ve.findIndex,Hr=Ve.camelCase,Nc=Ve.get,To=Ve.isEqual,Ge=Ve.cloneDeep,rt=Ve.differenceBy,zc=Ve.debounce,Wr=Ve.remove,qr=Ve.find,Gc=Ve.uniqWith},function(Ve){Qr=Ve.default},function(Ve){Io=Ve}],execute:function(){X({useCommon:ze,useDatasources:Jo,useEvents:Ks,useGeometries:We,useGraphics:jt,useHandler:Qu,usePrimitiveCollectionItems:Nn,usePrimitiveCollections:zn,usePrimitives:vi,useProviders:dt,useVueCesium:ml});const Ve="3.1.5",Uc=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",an=X("vcKey",Uc?Symbol("VueCesium"):"VueCesium"),Hc=Uc?Symbol("_vc_f_"):"_vc_f_",Zr=Symbol(),mg=Object.prototype.hasOwnProperty,Ue=(e,t)=>mg.call(e,t),et=Array.isArray,wt=e=>typeof e=="function",Ci=e=>typeof e=="string",Di=e=>e!==null&&typeof e=="object",pg=Object.prototype.toString,vg=e=>pg.call(e),st=e=>vg(e)==="[object Object]",Jr=e=>{const t=Object.create(null);return i=>t[i]||(t[i]=e(i))},fg=/-(\w)/g,Vt=Jr(e=>e.replace(fg,(t,i)=>i?i.toUpperCase():"")),gg=/\B([A-Z])/g,yg=Jr(e=>e.replace(gg,"-$1").toLowerCase()),Pa=Jr(e=>e.charAt(0).toUpperCase()+e.slice(1));function bg(e){if(typeof e!="string"&&(e=e+""),e.length===0)return".";let t=e.charCodeAt(0);const i=t===47;let n=-1,o=!0;for(let r=e.length-1;r>=1;--r)if(t=e.charCodeAt(r),t===47){if(!o){n=r;break}}else o=!1;return n===-1?i?"/":".":i&&n===1?"/":e.slice(0,n)}function Ao(e){return ni(e)||Vc(e)?!0:e instanceof Element?!1:Object.keys(e).length===0}const se=yg;function Cg(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 wg(e){let t;const i=Object.keys(Cesium);for(let n=0;n<i.length;n++){const o=i[n];if(Cg(e,Cesium[o])){t=o;break}}return t}function Xr(e,t=!1){if(e&&e.constructor){if(t){const i=wg(e);if(i)return i}return e.constructor.name}return typeof e}function oi(e,t){return e!=null?e:t}function wi(e,t=[]){const i={};return Object.keys(e).forEach(n=>{if(t.indexOf(n)===-1){const o=e[n];i[n]=wt(o)?void 0:st(o)?wt(o.default)?o.default():o.default:o}}),i}const Bi=(e,t,i=[])=>{for(const n in t)!e[n]&&i.indexOf(n)===-1&&(e[n]=t[n])};function _g(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 lt(e={},t={}){let i;for(i in t)e[i]=Di(e[i])?lt(e[i],t[i]):e[i]=t[i];return e}function Eg(e){return typeof e=="number"&&isFinite(e)}function Yr(e,t,i){const{JulianDate:n,Color:o}=Cesium,r=n.now();return e?(typeof e.getValue=="function"&&(e=e.getValue(i||r)),typeof e=="string"?o.fromCssColorString(e):typeof e=="function"?Yr(e(i),t):e):t}function Wc(e,t,i){const{JulianDate:n,Property:o}=Cesium,r=n.now();if(!e)return e;if(t){if(e instanceof t)return e;if(e instanceof o&&e._value instanceof t)return e._value}return wt(e.getValue)?e.getValue(i||r):e}const qc=e=>Object.keys(e),xa=te();function Oa(e,t=void 0){const i=ae()?So(Zr,xa):xa;return e?re(()=>{var n,o;return(o=(n=i.value)==null?void 0:n[e])!=null?o:t}):i}const Qc=(e,t,i=!1)=>{var n;const o=!!ae(),r=o?Oa():void 0;if(!((n=t==null?void 0:t.provide)!=null?n:o&&Gi)){console.warn("provideGlobalConfig","provideGlobalConfig() can only be used inside setup().");return}const a=re(()=>{const s=Ea(e);return r!=null&&r.value?Pg(r.value,s):s});return t!=null&&t.provide?t.provide(Zr,a):Gi(Zr,a),(i||!xa.value)&&(xa.value=a.value),a},Pg=(e,t)=>{var i;const n=[...new Set([...qc(e),...qc(t)])],o={};for(const r of n)o[r]=(i=t[r])!=null?i:e[r];return o};function Do(e){var t,i,n,o;const r=(y="")=>function(...E){y&&(Ci(E[0])?E[0]=y.trim()+" "+E[0]:E=[y.trim(),...E]),console.log(...E)},a=(y="")=>function(...E){y&&(Ci(E[0])?E[0]=y.trim()+" "+E[0]:E=[y.trim(),...E]),console.warn(...E)},s=(y="")=>function(...E){y&&(Ci(E[0])?E[0]=y.trim()+" "+E[0]:E=[y.trim(),...E]),console.error(...E)},l=(y="")=>function(...E){y&&(Ci(E[0])?E[0]=y.trim()+" "+E[0]:E=[y.trim(),...E])},c=(y="default")=>{let E="";switch(y){case"default":E="#35495E";break;case"primary":E="#3488ff";break;case"success":E="#43B883";break;case"warning":E="#e6a23c";break;case"danger":E="#f56c6c";break}return E},u=(y,E,x="primary")=>{console.log(`%c ${y} %c ${E} %c`,"background:#35495E; padding: 1px; border-radius: 3px 0 0 3px; color: #fff;",`background:${c(x)}; padding: 1px; border-radius: 0 3px 3px 0;  color: #fff;`,"background:transparent")},d=y=>{console.log(`%c${y.map(E=>E.text||"").join("%c")}`,...y.map(E=>`color: ${c(E.type)};`))},h=y=>{d([{text:y,type:"success"}])},p=y=>{d([{text:y,type:"warning"}])},v=y=>{d([{text:y,type:"danger"}])},b=y=>{d([{text:y,type:"primary"}])};return{log:r(`[VueCesium] ${(t=e==null?void 0:e.proxy)==null?void 0:t.$options.name}`),warn:a(`[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 ${(o=e==null?void 0:e.proxy)==null?void 0:o.$options.name}`),capsule:u,success:h,warning:p,danger:v,primary:b}}Do(void 0);const Zc=Symbol("INSTALLED_KEY"),xg=X("makeInstaller",(e=[])=>({version:Ve,install:(t,i)=>{if(t[Zc])return;const n={cesiumPath:"https://unpkg.com/cesium@latest/Build/Cesium/Cesium.js",accessToken:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI2OGE2MjZlOC1mMzhiLTRkZjQtOWEwZi1jZTE0MWY0YzhlMTAiLCJpZCI6MjU5LCJpYXQiOjE2NDM3MjU1NzZ9.ptZ5tVXvMmuWRC0WhjtYTg-17nQh14fgxBsx0HJiVXQ"};t[Zc]=!0;const o=Object.assign(n,i);e.forEach(r=>{t.use(r,o)}),Qc(o,t,!0)}}));/*!
 * merge-descriptors
 * Copyright(c) 2014 Jonathan Ong
 * Copyright(c) 2015 Douglas Christopher Wilson
 * MIT Licensed
 */const Og=Object.prototype.hasOwnProperty;function Mg(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(n){if(!i&&Og.call(e,n))return;const o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,o)}),e}function Mn(...e){let t;return typeof e[e.length-1]!="object"&&(t=e.pop()),e.slice(1).reduce((i,n,o)=>Mg(i,n,t),e[0])}function Sg(e){return e.appContext.config.globalProperties.$router!==void 0}function Kr(e,t){return e.vnode.props!==null&&e.vnode.props[t]!==void 0}function Se(e,t){const i=e.vnode.props;if(i===null)return;const n=Object.keys(i),o=$c(n,r=>r.includes(`on${Pa(t)}`)||r.includes(`on${Pa(Hr(t))}`));return i[n[o]]}function ve(e){return e.value}function St(e){var t,i;const n=e.parent;return!n.cesiumClass&&((t=n.proxy)==null?void 0:t.$options.name)!=="VcViewer"?St(n):(i=n.proxy)!=null&&i.getVcViewer?n.proxy.getVcViewer().getInstance():n}const Tg=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,Jc=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(Tg);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},Xc=e=>e==="*"||e==="x"||e==="X",Yc=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},Ig=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],Ag=(e,t)=>{if(Xc(e)||Xc(t))return 0;const[i,n]=Ig(Yc(e),Yc(t));return i>n?1:i<n?-1:0},Kc=(e,t)=>{for(let i=0;i<Math.max(e.length,t.length);i++){const n=Ag(e[i]||"0",t[i]||"0");if(n!==0)return n}return 0},Dg=(e,t)=>{const i=Jc(e),n=Jc(t),o=i.pop(),r=n.pop(),a=Kc(i,n);return a!==0?a:o&&r?Kc(o.split("."),r.split(".")):o||r?o?-1:1:0},Bg=(e,t,i)=>{Lg(i);const n=Dg(e,t);return eu[i].includes(n)},eu={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},tu=Object.keys(eu),Lg=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(tu.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${tu.join("|")}`)};var jg=`
czm_material czm_getMaterial(czm_materialInput materialInput) {
czm_material material = czm_getDefaultMaterial(materialInput);
material.diffuse = 1.5 * color.rgb;
vec2 st = materialInput.st;
vec3 str = materialInput.str;
float dis = distance(st, vec2(0.5, 0.5));
float per = fract(time);
if (abs(str.z) > 0.001) {
  discard;
}
if (dis > 0.5) {
  discard;
} else {
  float perDis = 0.5 / count;
  float disNum;
  float bl = .0;
  for (int i = 0; i <= 9; i++) {
    if (float(i) <= count) {
      disNum = perDis *float(i) - dis + per / count;
      if (disNum > 0.0) {
        if (disNum < perDis) {
          bl = 1.0 - disNum / perDis;
        } else if(disNum - perDis < perDis) {
          bl = 1.0 - abs(1.0 - disNum / perDis);
        }
        material.alpha = pow(bl, gradient);
      }
    }
  }
}
return material;
}`,Fg=`
uniform float globalAlpha;
uniform bool axisY;
uniform bool mixt;

czm_material czm_getMaterial(czm_materialInput materialInput) {
  czm_material material = czm_getDefaultMaterial(materialInput);
  vec2 st = repeat * materialInput.st;

  vec4 colorImage;
  if (speed != 0.0) {
    float currTime;
    if (time < 0.0) {
      currTime = speed * czm_frameNumber / 1000.0;
    } else {
      currTime = time;
    }
    colorImage = texture(image, vec2(fract((axisY ? st.t : st.s) - currTime), st.t));
  } else {
    colorImage = texture(image, st);
  }

  if (color.a == 0.0) {
    if (colorImage.rgb == vec3(1.0)) {
      discard;
    }
  }

  if (color.rgb == vec3(1.0)) {
    material.alpha = colorImage.a * globalAlpha;
    material.diffuse = colorImage.rgb;
  } else {
    material.alpha = colorImage.a * color.a * globalAlpha;
    if (mixt)
      material.diffuse = max(colorImage.rgb * color.rgb * material.alpha * 3.0, colorImage.rgb * color.rgb);
    else
      material.diffuse = max(color.rgb * material.alpha * 3.0, color.rgb);
  }

  if (hasImage2) {
    vec4 colorBG = texture(image2, materialInput.st);
    if (colorBG.a > 0.5) {
      material.diffuse = color2.rgb;
    }
  }
  return material;
}
`;let Ma=!1;class iu{static extend(t){var i;if(Ma)return;const{Material:n,Color:o,Cartesian2:r}=Cesium,a=(i=t.scene.context)==null?void 0:i.webgl2;let s=Fg,l=jg;a||(s=s.replace(/texture\(/g,"texture2D("),l=l.replace(/texture\(/g,"texture2D(")),n.VcCircleWave="VcCircleWave",Cesium.Material._materialCache.addMaterial(n.VcCircleWave,{fabric:{type:n.VcCircleWave,uniforms:{color:new o(1,0,0,1),time:1,count:1,gradient:.1},source:l},translucent(){return!0}}),n.VcLineFlow="VcLineFlow",Cesium.Material._materialCache.addMaterial(n.VcLineFlow,{fabric:{type:n.VcLineFlow,uniforms:{image:n.DefaultImageId,color:new o(1,1,1,1),repeat:new r(1,1),axisY:!1,mixt:!1,speed:10,time:-1,hasImage2:!1,image2:n.DefaultImageId,color2:new o(1,1,1),globalAlpha:1},source:s},translucent(){return!0}}),Ma=!0}static revoke(t){Ma&&(Ma=!1)}}X("MaterialExtend",iu);class nu{constructor(t={}){this.options=t,this._definitionChanged=new Cesium.Event}get isConstant(){return!0}get definitionChanged(){return this._definitionChanged}getType(t){return null}getValue(t,i={}){return i}equals(t){return this===t}}class Sn extends nu{constructor(t){super(t);const{Event:i,defaultValue:n}=Cesium;Object.getOwnPropertyDescriptor(Sn.prototype,"color")||Object.defineProperties(Sn.prototype,{color:Cesium.createPropertyDescriptor("color")}),this._definitionChanged=new i,this._color=new Cesium.ConstantProperty(t.color),this._duration=n(t.duration,1e3),this.count=n(t.count,2),this.count<=0&&(this.count=1),this._gradient=n(t.gradient,.1),this._gradient===0&&(this._gradient=0),this._gradient>1&&(this._gradient=1),this._time=new Date().getTime()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}get color(){return this._color}set color(t){const i=this._color;i!==t&&(this._color=new Cesium.ConstantProperty(t),this._definitionChanged.raiseEvent(this,"color",t,i))}get duration(){return this._duration}set duration(t){const i=this._duration;i!==t&&(this._duration=t,this._definitionChanged.raiseEvent(this,"duration",t,i))}get count(){return this._count}set count(t){const i=this._count;i!==t&&(this._count=t,this._definitionChanged.raiseEvent(this,"count",t,i))}getType(){return"VcCircleWave"}getValue(t,i){return Cesium.defined(i)||(i={}),i.color=Cesium.Property.getValueOrClonedDefault(this._color,t,Cesium.Color.YELLOW,i.color),i.time=(new Date().getTime()-this._time)%this.duration/this.duration,i.count=this.count,i.gradient=1+10*(1-this._gradient),i}equals(t){return this===t||t instanceof Sn&&Cesium.Property.equals(this._color,t._color)}}X("VcCircleWaveMaterialProperty",Sn);class Bo extends nu{constructor(t={}){var i,n,o,r,a,s,l,c,u,d;super(t);const{Color:h,Cartesian2:p,defined:v}=Cesium;this.image=(i=t.image)!=null?i:t.url,this.color=(n=t.color)!=null?n:new h(1,1,1,0),this.axisY=(o=t.axisY)!=null?o:!1,this.mixt=(r=t.mixt)!=null?r:!1,this.speed=(a=t.speed)!=null?a:10,this.duration=t.duration,this.repeat=(s=t.repeat)!=null?s:new p(1,1),this.image2=(l=t.image2)!=null?l:t.bgUrl,this.color2=(u=(c=t.color2)!=null?c:t.bgColor)!=null?u:new h(1,1,1,0),this.hasImage2=v(this.image2),this.globalAlpha=(d=t.globalAlpha)!=null?d:!0}getType(t){return"VcLineFlow"}getValue(t,i){const{Color:n,Cartesian2:o,defined:r}=Cesium;return!r(i)&&(i={}),i.image=this.image,i.color=Yr(this.color,new n(1,1,1,0),t),i.repeat=Wc(this.repeat,o,t),i.axisY=this.axisY,i.mixt=this.mixt,i.speed=Wc(this.speed,Number,t),this.duration?this._time===void 0&&(this._time=new Date().getTime(),i.time=(new Date().getTime()-this._time)/(this.duration*1e3)):i.time=-1,i.hasImage2=this.hasImage2,i.image2=this.image2,i.color2=Yr(this.color2,new n(1,1,1,0),t),i.globalAlpha=this.globalAlpha,i}equals(t){return this===t||t instanceof Bo&&Cesium.Property.equals(this.color,t.color)&&Cesium.Property.equals(this.repeat,t.repeat)&&this.image===t.image&&this.axisY===t.axisY&&this.speed===t.speed&&this.hasImage2===t.hasImage2&&this.image2===t.image2&&this.image2===t.image2&&Cesium.Property.equals(this.color2,t.color2)}}X("VcLineFlowMaterialProperty",Bo);function pt(e,t=!1){const{Cartesian2:i,CallbackProperty:n}=Cesium;if(e instanceof Cesium.Cartesian2||e instanceof n)return e;if(st(e)&&Ue(e,"x")&&Ue(e,"y")){const o=e;return new i(o.x,o.y)}if(et(e))return new i(e[0],e[1]);if(wt(e))return new n(e,t)}function tt(e,t,i=!1){const{CallbackProperty:n,Cartesian3:o,Ellipsoid:r,SampledPositionProperty:a,CompositePositionProperty:s,ConstantPositionProperty:l,TimeIntervalCollectionPositionProperty:c}=Cesium;if(e instanceof o||e instanceof n||e instanceof a||e instanceof s||e instanceof l||e instanceof c)return e;if(t=t||r.WGS84,st(e)){if(Ue(e,"x")&&Ue(e,"y")&&Ue(e,"z")){const u=e;return new o(u.x,u.y,u.z)}else if(Ue(e,"lng")&&Ue(e,"lat")){const u=e;return o.fromDegrees(u.lng,u.lat,u.height||0,t)}}if(et(e))return o.fromDegrees(e[0],e[1],e[2]||0,t);if(wt(e))return new n(e,i)}function _i(e,t,i=!1){const{CallbackProperty:n,Cartesian3:o,Ellipsoid:r}=Cesium;if(e instanceof n)return e;if(wt(e))return new n(e,i);if(t=t||r.WGS84,et(e)){if(et(e[0])||st(e[0])){const a=[];return e.forEach(s=>{a.push(tt(s,t))}),a}return o.fromDegreesArrayHeights(e,t)}}function ou(e,t){const{CallbackProperty:i}=Cesium;if(e instanceof i)return e;if(wt(e))return new i(e,t);if(et(e)){const n=[];return e.forEach(o=>{n.push(pt(o))}),n}}function es(e,t=!1){const{CallbackProperty:i,Quaternion:n,VelocityOrientationProperty:o}=Cesium;if(e instanceof n||e instanceof i||e instanceof o)return e;if(st(e)&&Ue(e,"x")&&Ue(e,"y")){const r=e;return new n(r.x,r.y,r.z,r.w)}if(et(e))return new n(e[0],e[1],e[2],e[3]);if(wt(e))return new i(e,t)}function au(e,t){e.forEach(i=>{i.positions=_i(i.positions,t),i.holes&&au(i.holes,t)})}function ts(e,t,i=!1){var n;const{PolygonHierarchy:o,CallbackProperty:r}=Cesium;if(e instanceof o||e instanceof r)return e;if(wt(e))return new r(e,i);if(et(e)&&e.length>=3){const a=_i(e,t);return new o(a)}if(st(e)&&Ue(e,"positions")){const a=e;return a.positions=_i(a.positions,t),(n=a.holes)!=null&&n.length&&au(a.holes,t),a}}function is(e,t=!1){const{NearFarScalar:i,CallbackProperty:n}=Cesium;if(e instanceof i||e instanceof n)return e;if(st(e)&&Ue(e,"near")&&Ue(e,"far")){const o=e;return new i(o.near,o.nearValue||0,o.far,o.farValue||1)}if(et(e))return new i(e[0],e[1],e[2],e[3]);if(wt(e))return new n(e,t)}function kg(e,t=!1){const{DistanceDisplayCondition:i,CallbackProperty:n}=Cesium;if(e instanceof i||e instanceof n)return e;if(st(e)&&Ue(e,"near")&&Ue(e,"far")){const o=e;return new i(o.near,o.far)}if(et(e))return new i(e[0],e[1]);if(wt(e))return new n(e,t)}function Ie(e,t=!1){const{Color:i,CallbackProperty:n,defaultValue:o}=Cesium;if(e instanceof i||e instanceof n)return e;if(Ci(e))return i.fromCssColorString(e);if(st(e)){if(Ue(e,"red")){const r=e;return i.fromBytes(o(r.red,255),o(r.green,255),o(r.blue,255),o(r.alpha,255))}else if(Ue(e,"x")){const r=e;return new i(o(r.x,1),o(r.y,1),o(r.z,1),o(r.w,1))}}if(et(e))return i.fromBytes(e[0],e[1],e[2],o(e[3],255));if(wt(e))return new n(e,t)}function Rg(e){if(et(e)){const t=[];return e.forEach(i=>{t.push(Ie(i))}),t}else return e}function Vg(e,t=!1){const{CallbackProperty:i,Color:n,CheckerboardMaterialProperty:o,ColorMaterialProperty:r,CompositeMaterialProperty:a,GridMaterialProperty:s,ImageMaterialProperty:l,MaterialProperty:c,PolylineArrowMaterialProperty:u,PolylineDashMaterialProperty:d,PolylineGlowMaterialProperty:h,PolylineOutlineMaterialProperty:p,StripeMaterialProperty:v,StripeOrientation:b,defaultValue:y,Cartesian2:E,Material:x}=Cesium;if(e instanceof i||e instanceof n||e instanceof o||e instanceof r||e instanceof a||e instanceof s||e instanceof l||e instanceof c||e instanceof u||e instanceof d||e instanceof h||e instanceof p||e instanceof v||e instanceof Sn||e instanceof Bo)return e;if(Ci(e)&&/(.*)\.(jpg|bmp|gif|ico|pcx|jpeg|tif|png|raw|tga)$/.test(e)||e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement)return new l({image:e,repeat:pt({x:1,y:1}),color:n.WHITE,transparent:!0});if(et(e)||Ci(e))return new r(Ie(e));if(st(e)&&Ue(e,"fabric")){const g=e;switch(g.fabric.type){case"Image":return new l({image:g.fabric.uniforms.image,repeat:pt(y(g.fabric.uniforms.repeat,{x:1,y:1})),color:y(Ie(g.fabric.uniforms.color),n.WHITE),transparent:y(g.fabric.uniforms.transparent,!1)});case"Color":return new r(Ie(y(g.fabric.uniforms.color,n.WHITE)));case"PolylineArrow":return new u(Ie(y(g.fabric.uniforms.color,n.WHITE)));case"PolylineDash":return new d({color:Ie(y(g.fabric.uniforms.color,"white")),gapColor:Ie(y(g.fabric.uniforms.gapColor,n.TRANSPARENT)),dashLength:y(g.fabric.uniforms.taperPower,16),dashPattern:y(g.fabric.uniforms.taperPower,255)});case"PolylineGlow":return new h({color:Ie(y(g.fabric.uniforms.color,n.WHITE)),glowPower:y(g.fabric.uniforms.glowPower,.25),taperPower:y(g.fabric.uniforms.taperPower,1)});case"PolylineOutline":return new p({color:Ie(y(g.fabric.uniforms.color,n.WHITE)),outlineColor:Ie(y(g.fabric.uniforms.outlineColor,n.BLACK)),outlineWidth:y(g.fabric.uniforms.outlineWidth,1)});case"Checkerboard":return new o({evenColor:Ie(y(g.fabric.uniforms.evenColor,n.WHITE)),oddColor:Ie(y(g.fabric.uniforms.oddColor,n.BLACK)),repeat:y(pt(g.fabric.uniforms.repeat),{x:2,y:2})});case"Grid":return new s({color:Ie(y(g.fabric.uniforms.color,n.WHITE)),cellAlpha:y(g.fabric.uniforms.cellAlpha,.1),lineCount:y(pt(g.fabric.uniforms.lineCount),{x:8,y:8}),lineThickness:y(pt(g.fabric.uniforms.lineThickness),{x:1,y:1}),lineOffset:y(pt(g.fabric.uniforms.lineOffset),{x:0,y:0})});case"Stripe":return new v({orientation:y(g.fabric.uniforms.orientation,b.HORIZONTAL),evenColor:Ie(y(g.fabric.uniforms.evenColor,"white")),oddColor:Ie(y(g.fabric.uniforms.oddColor,"black")),offset:y(g.fabric.uniforms.offset,0),repeat:y(g.fabric.uniforms.repeat,1)});case"VcCircleWave":return new Sn({duration:y(g.fabric.uniforms.duration,3e3),gradient:y(g.fabric.uniforms.gradient,.5),color:Ie(y(g.fabric.uniforms.color,n.RED)),count:y(g.fabric.uniforms.count,3)});case"VcLineFlow":return new Bo({image:y(g.fabric.uniforms.image,x.DefaultImageId),color:Ie(y(g.fabric.uniforms.color,new n(1,1,1,1))),repeat:pt(y(g.fabric.uniforms.repeat,new E(1,1))),axisY:y(g.fabric.uniforms.axisY,!1),mixt:y(g.fabric.uniforms.mixt,!1),speed:y(g.fabric.uniforms.speed,10),time:y(g.fabric.uniforms.time,-1)})}}return wt(e)?new i(e,t):e}function ns(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 Vg(e);const{Material:o,combine:r}=Cesium;if(e instanceof o)return e;if(st(e)&&Ue(e,"fabric")){const a=s=>{for(const l in s)if(!et(s[l])&&st(s[l]))a(s[l]);else if(l.toLocaleLowerCase().indexOf("color")!==-1&&!Ao(s[l])){const c=Ie(s[l]);s[l]=r(c,c,!0)}};return a(e),new o(e)}if(et(e)||Ci(e)){const a=o.fromType("Color");return a.uniforms.color=Ie(e),a}}function Sa(e){var t;const{Appearance:i,DebugAppearance:n,MaterialAppearance:o,PolylineColorAppearance:r,EllipsoidSurfaceAppearance:a,PerInstanceColorAppearance:s,PolylineMaterialAppearance:l}=Cesium;if(e instanceof i||e instanceof n||e instanceof o||e instanceof r||e instanceof a||e instanceof s||e instanceof l)return e;if(st(e)&&Ue(e,"type")){const c={...e.options};return(t=e.options)!=null&&t.material&&(c.material=ns.call(this,e.options.material)),new Cesium[e.type]({...c})}}function Tn(e,t=!1){const{Rectangle:i,RectangleGraphics:n,CallbackProperty:o}=Cesium;if(e instanceof n||e instanceof i||e instanceof o)return e;if(et(e))return i.fromDegrees(e[0],e[1],e[2],e[3]);if(st(e)){if(Ue(e,"west")){const r=e;return i.fromDegrees(r.west,r.south,r.east,r.north)}else if(Ue(e,"x")){const r=e;return new i(r.x,r.y,r.z,r.w)}}if(wt(e))return new o(e,t)}function ru(e,t=!1){const{BoundingRectangle:i,CallbackProperty:n}=Cesium;if(e instanceof i||e instanceof n)return e;if(st(e)&&Ue(e,"x")){const o=e;return new i(o.x,o.y,o.width,o.height)}if(et(e))return new i(e[0],e[1],e[2],e[3]);if(wt(e))return new n(e,t)}function $g(e,t=!1){const{Cartesian3:i,Plane:n,PlaneGraphics:o,CallbackProperty:r}=Cesium;if(e instanceof o||e instanceof n||e instanceof r)return e;if(st(e)&&Ue(e,"normal")){const a=e;return i.normalize(tt(a.normal),a.normal),new n(a.normal,a.distance)}if(et(e)){const a=tt(e[0]),s=i.normalize(a,new i);return new n(s,e[1])}if(wt(e))return new r(e,t)}function Ng(e,t=!1){const{TranslationRotationScale:i,CallbackProperty:n}=Cesium;if(e instanceof n||e instanceof i)return e;if(st(e)&&Ue(e,"translation")){const o=e;return new i(tt(o.translation),es(o.rotation),tt(o.scale))}return et(e)?new i(tt(e[0]),es(e[1]),tt(e[2])):wt(e)?new n(e,t):e}function zg(e){var t;const i=(t=this.proxy)==null?void 0:t.$options.name,n={};switch(i){case"VcDatasourceGeojson":return Object.assign(n,e),n&&n.markerColor&&(n.markerColor=Ie(n.markerColor)),n&&n.stroke&&(n.stroke=Ie(n.stroke)),n&&n.fill&&(n.fill=Ie(n.fill)),n}return e}function Gg(e){const t=e.scene,i=new Promise((n,o)=>{const r=e.scene.postRender.addEventListener(()=>{r();try{const a=e.scene.canvas;n(a.toDataURL("image/png"))}catch(a){o(a)}})});return t.render(e.clock.currentTime),i}function su(e,t){const{Math:i,Rectangle:n,defaultValue:o}=Cesium;let r,a={};if(Ue(e,"position")){const s=e.position;r=tt(s,t),Ue(s,"lng")&&Ue(s,"lat")||et(s)?a={heading:i.toRadians(o(e.heading,360)),pitch:i.toRadians(o(e.pitch,-90)),roll:i.toRadians(o(e.roll,0))}:a={heading:o(e.heading,2*Math.PI),pitch:o(e.pitch,-Math.PI/2),roll:o(e.roll,0)}}else if(Ue(e,"rectangle")){const s=e.rectangle;r=Tn(s),n.validate(r),Ue(s,"west")&&Ue(s,"south")&&Ue(s,"east")&&Ue(s,"north")||et(s)?a={heading:i.toRadians(o(e.heading,360)),pitch:i.toRadians(o(e.pitch,-90)),roll:i.toRadians(o(e.roll,0))}:a={heading:o(e.heading,2*Math.PI),pitch:o(e.pitch,-Math.PI/2),roll:o(e.roll,0)}}return{destination:r,orientation:a}}function os(e,t){const{destination:i,orientation:n}=su(t,e.scene.globe.ellipsoid);e.camera.setView({destination:i,orientation:n})}function Ug(e,t,i){const{destination:n,orientation:o}=su(t,e.scene.globe.ellipsoid);e.camera.flyTo({...i,destination:(i==null?void 0:i.destination)||n,orientation:(i==null?void 0:i.orientation)||o})}function as(e,t,i){const{EllipsoidGeodesic:n,Ellipsoid:o}=Cesium;i=i||o.WGS84;const r=i.cartesianToCartographic(e),a=i.cartesianToCartographic(t);return new n(r,a).surfaceDistance}function Hg(e,t,i,n){const{Cartesian3:o}=Cesium;if(o.equals(e,t))return;const r=Cesium.Cartesian3.subtract(t,e,new Cesium.Cartesian3),a=Cesium.Cartesian3.normalize(r,new Cesium.Cartesian3),s=Cesium.Transforms.rotationMatrixFromPositionVelocity(e,a,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),h=Cesium.Quaternion.fromRotationMatrix(d);return Cesium.HeadingPitchRoll.fromQuaternion(h)}function Wg(e,t,i,n){const{HeadingPitchRoll:o,Transforms:r,Matrix4:a,Cartesian3:s,Cartesian4:l,Quaternion:c,Cartographic:u,Ellipsoid:d}=Cesium;n=n||d.WGS84;const h=new o(t,0,0),p=new s(1,1,1),v=r.headingPitchRollToFixedFrame(e,h),b=a.getColumn(v,1,new l),y=new s(b.x,b.y,b.z),E=c.fromAxisAngle(y,i*n.oneOverRadii.x),x=a.fromTranslationQuaternionRotationScale(s.ZERO,E,p),g=a.multiplyByPoint(x,e,new s),w=u.fromCartesian(e,n),O=u.fromCartesian(g,n);return O.height=w.height,u.toCartesian(O,n)}function lu(e){let t=0;const{CoplanarPolygonGeometry:i,VertexFormat:n,defined:o,Cartesian3:r}=Cesium,a=i.createGeometry(i.fromPositions({positions:e,vertexFormat:n.POSITION_ONLY}));if(!ni(a)&&o(a)){const s=a.indices,l=a.attributes.position.values;for(let c=0;c<s.length;c+=3){const u=s[c],d=s[c+1],h=s[c+2];t+=qg(r.unpack(l,3*u,{}),r.unpack(l,3*d,{}),r.unpack(l,3*h,{}))}}return t}const qg=(e,t,i)=>{const{Cartesian3:n}=Cesium,o=n.subtract(e,t,{}),r=n.subtract(i,t,{}),a=n.cross(o,r,o);return .5*n.magnitude(a)};function Li(e){const{JulianDate:t}=Cesium;return e instanceof t?e:Ci(e)?Cesium.JulianDate.fromDate(new Date(e)):e instanceof Date?Cesium.JulianDate.fromDate(e):Cesium.JulianDate.now()}function rs(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):st(e)?new t(e.heading||0,e.pitch||0,e.range||0):new t}function cu(e,t){const{Cartesian3:i,Matrix4:n,Transforms:o,Math:r}=Cesium,a=new i,s=o.eastNorthUpToFixedFrame(e);return n.inverse(s,s),n.multiplyByPoint(s,t,a),i.normalize(a,a),r.toDegrees(Math.atan2(a.x,a.y))}function uu(e,t){const{Cartesian3:i,Matrix4:n,Transforms:o,Math:r}=Cesium,a=new i,s=o.eastNorthUpToFixedFrame(e);return n.inverse(s,s),n.multiplyByPoint(s,t,a),i.normalize(a,a),r.toDegrees(Math.asin(a.z))}function du(e,t,i,n=[]){const{Cartesian3:o,Ray:r,defined:a}=Cesium,s=o.normalize(o.subtract(t,e,new o),new o),l=new r(e,s),c=i.scene.pickFromRay(l,n);if(a(c)&&a(c.position))return c.position}function ss(e){const t=7096758e-11,i=91610.74,n=-40467.74;return Math.round(n+(40487.57-n)/(1+Math.pow(e/i,t)))}function rn(e,t,i=">="){return Bg(e,t,i)}function Qg(e){const{ImageBasedLighting:t,defined:i}=Cesium;if(e instanceof Cesium.ImageBasedLighting)return e;const n=new t;return n.imageBasedLightingFactor&&(n.imageBasedLightingFactor=pt(e.imageBasedLightingFactor)),n.sphericalHarmonicCoefficients&&(n.sphericalHarmonicCoefficients=_i(e.sphericalHarmonicCoefficients)),n.luminanceAtZenith&&(n.luminanceAtZenith=Number(e.luminanceAtZenith)),i(n.specularEnvironmentMaps)&&(n.specularEnvironmentMaps=e.specularEnvironmentMaps),n}const In={position:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:tt,deep:!0}}},hu={viewFrom:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:tt,deep:!0}}},ls={orientation:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:es}}},cs={alignedAxis:{type:[Object,Array,Function],default:()=>({x:0,y:0,z:0}),watcherOptions:{cesiumObjectBuilder:tt}}},sn={color:{type:[Object,String,Array,Function],default:"white",watcherOptions:{cesiumObjectBuilder:Ie}}},Zg={depthFailColor:{type:[Object,String,Array,Function],default:"white",watcherOptions:{cesiumObjectBuilder:Ie}}},An={disableDepthTestDistance:[Number,Object,Function]},ft={distanceDisplayCondition:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:kg}}},Lo={eyeOffset:{type:[Object,Array,Function],default:()=>({x:0,y:0,z:0}),watcherOptions:{cesiumObjectBuilder:tt}}},$t={height:[Number,Object,Function]},Xt={heightReference:{type:[Number,Object,Function]}},jo={horizontalOrigin:{type:[Number,Object,Function],default:0}},Ta={image:[String,Object,HTMLCanvasElement,Function]},mu={imageSubRegion:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:ru}}},Yn={pixelOffset:{type:[Object,Array,Function],default:()=>({x:0,y:0}),validator:e=>et(e)?e.length===2:Di(e)?Ue(e,"x")&&Ue(e,"y"):!!wt(e),watcherOptions:{cesiumObjectBuilder:pt}}},Fo={pixelOffsetScaleByDistance:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:is}}},ln={rotation:{type:[Number,Object,Function],default:0}},Dn={scale:{type:[Number,Object,Function],default:1}},Bn={scaleByDistance:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:is}}},Ae={show:{type:[Boolean,Object,Function],default:!0}},Ia={sizeInMeters:{type:[Boolean,Object,Function],default:!1}},Ln={translucencyByDistance:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:is}}},ko={verticalOrigin:{type:[Number,Object,Function],default:0}},ji={width:[Number,Object,Function]},Aa={dimensions:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:tt}}},Fi={fill:{type:[Boolean,Object,Function],default:!0}},ai={material:{type:[Object,String,Array,Function],default:"white",watcherOptions:{cesiumObjectBuilder:ns}}},ki={outline:{type:[Boolean,Object,Function],default:!1}},Qt={outlineColor:{type:[Object,String,Array,Function],default:"black",watcherOptions:{cesiumObjectBuilder:Ie}}},Yt={outlineWidth:{type:[Number,Object,Function],default:1}},Nt={shadows:[Number,Object,Function]},ri={positions:{type:[Array,Object,Function],watcherOptions:{cesiumObjectBuilder:_i,exclude:"_callback",deep:!0}}},Kt={extrudedHeight:[Number,Object,Function]},Ro={extrudedHeightReference:[Number,Object,Function]},jn={cornerType:{type:[Number,Object,Function],default:0}},ct={granularity:[Number,Object,Function]},Ri={classificationType:{type:[Number,Object,Function]}},Kn={zIndex:[Number,Object,Function]},Da={length:[Number,Object,Function]},Ba={topRadius:[Number,Object,Function]},La={bottomRadius:[Number,Object,Function]},eo={numberOfVerticalLines:{type:[Number,Object,Function],default:16}},ja={slices:{type:[Number,Object,Function],default:128}},Fa={semiMajorAxis:[Number,Object,Function]},ka={semiMinorAxis:[Number,Object,Function]},Hi={stRotation:{type:[Number,Object,Function],default:0}},Ra={radii:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:tt}}},Va={innerRadii:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:tt}}},$a={minimumClock:{type:[Number,Object,Function],default:0}},Na={maximumClock:{type:[Number,Object,Function],default:2*Math.PI}},za={minimumCone:{type:[Number,Object,Function],default:0}},Ga={maximumCone:{type:[Number,Object,Function],default:Math.PI}},to={stackPartitions:{type:[Number,Object,Function],default:64}},io={slicePartitions:{type:[Number,Object,Function],default:64}},Ua={subdivisions:{type:[Number,Object,Function],default:128}},us={text:[String,Object,Function]},ds={font:{type:[String,Object,Function],default:"30px sans-serif"}},hs={labelStyle:{type:[Number,Object,Function],default:0}},ms={showBackground:{type:[Boolean,Object,Function],default:!1}},ps={backgroundColor:{type:[Object,String,Array,Function],default:()=>({x:.165,y:.165,z:.165,w:.8}),watcherOptions:{cesiumObjectBuilder:Ie}}},vs={backgroundPadding:{type:[Object,Array,Function],default:()=>({x:7,y:5}),watcherOptions:{cesiumObjectBuilder:pt}}},fs={fillColor:{type:[Object,String,Array,Function],default:"white",watcherOptions:{cesiumObjectBuilder:Ie}}},gs={uri:[String,Object,Function]},ys={minimumPixelSize:{type:[Number,Object,Function],default:0}},bs={maximumScale:[Number,Object,Function]},Cs={incrementallyLoadTextures:{type:[Boolean,Object,Function],default:!0}},pu={clampAnimations:{type:[Boolean,Object,Function],default:!0}},ws={clampAnimations:{type:[Boolean,Object,Function],default:!0}},_s={silhouetteColor:{type:[Object,String,Array,Function],watcherOptions:{cesiumObjectBuilder:Ie}}},Es={silhouetteSize:{type:[Number,Object,Function],default:0}},Ps={colorBlendMode:{type:[Number,Object,Function],default:0}},xs={colorBlendAmount:{type:[Number,Object,Function],default:.5}},Ha={imageBasedLightingFactor:{type:[Object,Array,Function],default:()=>[1,1],watcherOptions:{cesiumObjectBuilder:pt}}},Os={lightColor:{type:[Object,String,Array,Function],watcherOptions:{cesiumObjectBuilder:Ie}}},vu={nodeTransformations:{type:[Object,Function],watcherOptions:{cesiumObjectBuilder:Ng}}},fu={articulations:[Object,Function]},Vo={clippingPlanes:[Object,Function]},gu={plane:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:$g}}},Ms={pixelSize:{type:[Number,Object,Function],default:1}},yu={hierarchy:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:ts,deep:!0,exclude:"_callback"}}},Wa={perPositionHeight:{type:[Boolean,Object,Function],default:!1}},Ss={closeTop:{type:[Boolean,Object,Function],default:!0}},Ts={closeBottom:{type:[Boolean,Object,Function],default:!0}},cn={arcType:{type:[Number,Object,Function],default:1}},bu={depthFailMaterial:{type:[Object,String,Array,Function],watcherOptions:{cesiumObjectBuilder:ns}}},$o={clampToGround:{type:[Boolean,Object,Function],default:!1}},Cu={shape:{type:[Array,Object,Function],watcherOptions:{cesiumObjectBuilder:ou}}},wu={coordinates:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:Tn}}},Is={maximumScreenSpaceError:{type:[Number,Object,Function],default:16}},qa={minimumHeights:[Array,Object,Function]},Qa={maximumHeights:[Array,Object,Function]},_u={cutoutRectangle:{type:[Object,Array],watcherOptions:{cesiumObjectBuilder:Tn}}},Eu={colorToAlpha:{type:[Object,String,Array],watcherOptions:{cesiumObjectBuilder:Ie}}},Ei={url:[String,Object]},As={token:String},No={tileDiscardPolicy:Object},Ds={layers:String},Za={enablePickFeatures:{type:Boolean,default:!0}},Lt={rectangle:{type:[Object,Array],watcherOptions:{cesiumObjectBuilder:Tn}}},Vi={tilingScheme:Object},Ne={ellipsoid:Object},Tt={credit:{type:[String,Object],default:""}},Wi={tileWidth:{type:Number,default:256}},qi={tileHeight:{type:Number,default:256}},si={maximumLevel:Number},mi={minimumLevel:{type:Number,default:0}},Bs={fileExtension:{type:String,default:"png"}},Ls={accessToken:String},js={format:{type:String,default:"png"}},Ja={subdomains:[String,Array]},Fs={getFeatureInfoFormats:Array},zo={clock:Object},ks={times:Object},Fn={projectionTransforms:{type:[Boolean,Object],default:!1}},Rs={customShader:{type:Object}},Pu={maximumMemoryUsage:{type:Number,default:256}},xu={defaultColor:{type:[Object,String,Array],watcherOptions:{cesiumObjectBuilder:Ie}}},Vs={tileStyle:{type:Object}},kn={allowPicking:{type:Boolean,default:!0}},Rn={asynchronous:{type:Boolean,default:!0}},Xa={debugShowShadowVolume:{type:Boolean,default:!1}},Go={releaseGeometryInstances:{type:Boolean,default:!0}},Uo={interleave:{type:Boolean,default:!1}},no={appearance:{type:Object,watcherOptions:{cesiumObjectBuilder:Sa,deep:!0}}},$s={depthFailAppearance:{type:Object,watcherOptions:{cesiumObjectBuilder:Sa,deep:!0}}},Ho={geometryInstances:[Array,Object]},Ya={vertexCacheOptimize:{type:Boolean,default:!1}},Wo={compressVertices:{type:Boolean,default:!0}},Pi={modelMatrix:Object},$i={debugShowBoundingVolume:{tyep:Boolean,default:!1}},qo={scene:Object},Ka={blendOption:{type:Number,default:2}},hn={id:null},Ns={loop:{type:Boolean,default:!1}},zs={debugWireframe:{type:Boolean,default:!1}},zt={vertexFormat:Object},Qo={center:{type:[Object,Array],watcherOptions:{cesiumObjectBuilder:tt}}},Zo={radius:Number},Gs={frustum:Object},Us={origin:{type:[Object,Array],watcherOptions:{cesiumObjectBuilder:tt}}},Vn={polygonHierarchy:{type:[Object,Array],watcherOptions:{cesiumObjectBuilder:ts,deep:!0}}},Ou={startColor:{type:[Object,String,Array],watcherOptions:{cesiumObjectBuilder:Ie}}},Mu={endColor:{type:[Object,String,Array],watcherOptions:{cesiumObjectBuilder:Ie}}},Su={minimumImageSize:{type:[Object,Array],watcherOptions:{cesiumObjectBuilder:pt}}},Tu={maximumImageSize:{type:[Object,Array],watcherOptions:{cesiumObjectBuilder:pt}}},Iu={imageSize:{type:[Object,Array],watcherOptions:{cesiumObjectBuilder:pt}}},Hs={shapePositions:{type:Array,watcherOptions:{cesiumObjectBuilder:ou,deep:!0}}},Ws={polylinePositions:{type:Array,watcherOptions:{cesiumObjectBuilder:_i,deep:!0}}},Au={lightColor:{type:[Object,Array],watcherOptions:{cesiumObjectBuilder:tt}}},qs={luminanceAtZenith:{type:Number,default:.2}},Qs={sphericalHarmonicCoefficients:{type:[Array,Object],watcherOptions:{cesiumObjectBuilder:_i}}},Zs={specularEnvironmentMaps:String},Du={imageBasedLighting:{type:Object,watcherOptions:{cesiumObjectBuilder:Qg}}},Js={backFaceCulling:{type:Boolean,default:!0}},Xs={colors:{type:Array,watcherOptions:{cesiumObjectBuilder:Rg,deep:!0}}},Ys={data:{type:[String,Object],required:!0}},er={sourceUri:{type:[String,Object]}},Jg={options:{type:Object,watcherOptions:{cesiumObjectBuilder:zg,deep:!0}}},Bu={glowColor:{type:[String,Array,Object],default:()=>[0,1,0,.05],watcherOptions:{cesiumObjectBuilder:Ie}}},Lu={clearColor:{type:[String,Array,Object],watcherOptions:{cesiumObjectBuilder:Ie}}},ju={scissorRectangle:{type:[Object,Array],watcherOptions:{cesiumObjectBuilder:ru}}},Je={enableMouseEvent:{type:Boolean,default:!0}};var Fu=Object.freeze({__proto__:null,customShader:Rs,maximumMemoryUsage:Pu,tileStyle:Vs,defaultColor:xu,viewFrom:hu,projectionTransforms:Fn,sourceUri:er,colors:Xs,enableMouseEvent:Je,backFaceCulling:Js,imageBasedLighting:Du,specularEnvironmentMaps:Zs,sphericalHarmonicCoefficients:Qs,luminanceAtZenith:qs,maximumScreenSpaceError:Is,runAnimations:pu,articulations:fu,scissorRectangle:ju,clearColor:Lu,glowColor:Bu,options:Jg,data:Ys,imageSubRegion:mu,coordinates:wu,nodeTransformations:vu,hierarchy:yu,plane:gu,colorToAlpha:Eu,cutoutRectangle:_u,polylinePositions:Ws,shapePositions:Hs,imageSize:Iu,maximumImageSize:Tu,minimumImageSize:Su,endColor:Mu,startColor:Ou,shape:Cu,lightColor:Os,lightColor2:Au,imageBasedLightingFactor:Ha,polygonHierarchy:Vn,orientation:ls,origin:Us,frustum:Gs,maximumCone:Ga,minimumCone:za,maximumClock:Na,minimumClock:$a,innerRadii:Va,radius:Zo,center:Qo,debugWireframe:zs,vertexFormat:zt,position:In,loop:Ns,geometryInstances:Ho,depthFailAppearance:$s,appearance:no,interleave:Uo,releaseGeometryInstances:Go,debugShowShadowVolume:Xa,id:hn,allowPicking:kn,asynchronous:Rn,vertexCacheOptimize:Ya,compressVertices:Wo,modelMatrix:Pi,debugShowBoundingVolume:$i,scene:qo,blendOption:Ka,maximumHeights:Qa,minimumHeights:qa,arcType:cn,clampToGround:$o,closeBottom:Ts,closeTop:Ss,perPositionHeight:Wa,pixelSize:Ms,clippingPlanes:Vo,colorBlendAmount:xs,colorBlendMode:Ps,silhouetteSize:Es,silhouetteColor:_s,clampAnimations:ws,incrementallyLoadTextures:Cs,maximumScale:bs,minimumPixelSize:ys,uri:gs,fillColor:fs,backgroundPadding:vs,backgroundColor:ps,showBackground:ms,labelStyle:hs,font:ds,text:us,subdivisions:Ua,slicePartitions:io,stackPartitions:to,radii:Ra,stRotation:Hi,semiMinorAxis:ka,semiMajorAxis:Fa,slices:ja,numberOfVerticalLines:eo,bottomRadius:La,topRadius:Ba,length:Da,zIndex:Kn,classificationType:Ri,granularity:ct,cornerType:jn,extrudedHeightReference:Ro,extrudedHeight:Kt,positions:ri,image:Ta,scale:Dn,pixelOffset:Yn,eyeOffset:Lo,horizontalOrigin:jo,verticalOrigin:ko,heightReference:Xt,depthFailColor:Zg,color:sn,rotation:ln,alignedAxis:cs,sizeInMeters:Ia,width:ji,height:$t,scaleByDistance:Bn,translucencyByDistance:Ln,pixelOffsetScaleByDistance:Fo,disableDepthTestDistance:An,dimensions:Aa,fill:Fi,depthFailMaterial:bu,material:ai,outline:ki,outlineColor:Qt,outlineWidth:Yt,shadows:Nt,distanceDisplayCondition:ft,show:Ae,times:ks,clock:zo,getFeatureInfoFormats:Fs,subdomains:Ja,format:js,accessToken:Ls,fileExtension:Bs,minimumLevel:mi,maximumLevel:si,tileHeight:qi,url:Ei,token:As,tileDiscardPolicy:No,layers:Ds,enablePickFeatures:Za,rectangle:Lt,tilingScheme:Vi,ellipsoid:Ne,credit:Tt,tileWidth:Wi}),ku={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"},typhoon:{warn:"\u64AD\u653E\u53F0\u98CE\u5931\u8D25\uFF0C\u539F\u56E0\uFF1A\u672A\u627E\u5230\u5BF9\u5E94\u7F16\u53F7\u7684\u53F0\u98CE\u6570\u636E\u3002"}}};const Ru=e=>(t,i)=>Vu(t,i,Ea(e)),Vu=(e,t,i)=>Nc(i,e,e).replace(/\{(\w+)\}/g,(n,o)=>{var r;return`${(r=t==null?void 0:t[o])!=null?r:`{${o}}`}`}),$u=e=>{const t=re(()=>Ea(e).name),i=zr(e)?e:te(e);return{lang:t,locale:i,t:Ru(e)}},_t=()=>{const e=Oa("locale");return $u(re(()=>e.value||ku))};X({buildTranslator:Ru,translate:Vu,buildLocaleContext:$u,useLocale:_t});function Ks(e,t,i){const n=(a,s,l=!0)=>{const c=s||t.cesiumEvents||[];c&&c.forEach(u=>{if(a[u]){const d=Se(t,u),h=l?"addEventListener":"removeEventListener";d&&a[u][h](d)}})},o=a=>{var s;const{viewer:l,cesiumObject:c}=t;if(c===void 0||l===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),el.forEach(h=>{const p=Se(t,h);p&&l._vcViewerScreenSpaceEventHandler.setInputAction(p,d[h]),l._vcPickScreenSpaceEventHandler.setInputAction(r.bind({eventName:h,viewer:l}),d[h])})),n(c,t.cesiumEvents||[],a),(s=t.cesiumMembersEvents)==null||s.forEach(h=>{const p=et(h.name)&&h.name.length>0&&c[h.name[0]]?c[h.name[0]][h.name[1]]:c[h.name];p&&n(p,h.events,a)}),e.enableMouseEvent&&Nu.forEach(h=>{const p=Se(t,h);a?p&&(c[`vc${h}`]=p):p&&delete c[`vc${h}`]})};function r(a){if(!e.enableMouseEvent||!a)return;const s=this.viewer,{eventName:l}=this,c=a.position||a.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 h;d==="mousemove"?h="mouseout":d==="click"&&(h="clickout");const p=s.scene.pick(c);if(Cesium.defined(p)?(this.pickedFeature&&this.pickedFeature.id!==p.id&&u.push({callbackName:h,pickedFeature:this.pickedFeature}),d==="mousemove"&&(!this.pickedFeature||this.pickedFeature.id!==p.id)&&u.push({callbackName:"mouseover",pickedFeature:p}),u.push({callbackName:d,pickedFeature:p})):(this.pickedFeature&&u.push({callbackName:h,pickedFeature:this.pickedFeature}),this.pickedFeature=void 0),u.length===0)return;let v;const b=s.scene;if(b.mode===Cesium.SceneMode.SCENE3D){const x=b.camera.getPickRay(c);v=b.globe.pick(x,b)}else v=b.camera.pickEllipsoid(c,b.globe.ellipsoid);let y=-1;l.indexOf("LEFT")!==-1?y=0:l.indexOf("MIDDLE")!==-1?y=1:l.indexOf("RIGHT")!==-1&&(y=2);const E=[];u.forEach(x=>{const g=x.callbackName,w=x.pickedFeature;w.id&&(et(w.id)?w.id[0]instanceof Cesium.Entity?E.push({callbackName:g,cesiumObject:w.id[0].entityCollection.owner,pickedFeature:w}):E.push({callbackName:g,cesiumObject:w.primitive.owner,pickedFeature:w}):w.id instanceof Cesium.Entity&&(E.push({callbackName:g,cesiumObject:w.id,pickedFeature:w}),E.push({callbackName:g,cesiumObject:w.id.entityCollection.owner,pickedFeature:w})));const O=I=>{E.push({callbackName:g,cesiumObject:I,pickedFeature:w}),I._vcParent&&O(I._vcParent)};w.primitive&&(w.primitive._vcParent&&O(w.primitive._vcParent),E.push({callbackName:g,cesiumObject:w.primitive,pickedFeature:w})),w.collection&&(w.collection._vcParent&&O(w.collection._vcParent),E.push({callbackName:g,cesiumObject:w.collection,pickedFeature:w}))}),E.forEach(x=>{if(x.callbackName){const g=x.cesiumObject[`vc${x.callbackName}`]||x.cesiumObject[`on${Pa(x.callbackName)}`]||x.cesiumObject[se(`on${Pa(x.callbackName)}`)];if(Cesium.defined(g)){const w={type:`on${x.callbackName}`,windowPosition:c,surfacePosition:v,pickedFeature:x.pickedFeature,button:y,cesiumObject:x.cesiumObject};g instanceof Cesium.CallbackProperty?g._callback(w):g(w)}}}),this.pickedFeature=p}return{bindEvents:n,registerEvents:o}}const el=["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"],Nu=["mousedown","mouseup","click","clickout","dblclick","mousemove","mouseover","mouseout"];function tl(){let e;return on(()=>{clearTimeout(e)}),{registerTimeout(t,i){clearTimeout(e),e=setTimeout(t,i)},removeTimeout(){clearTimeout(e)}}}const Xg=["Graphics","VcEntity","Datasource","VcOverlayDynamic"];function ze(e,{emit:t,attrs:i},n){const o=Do(n),{registerTimeout:r,removeTimeout:a}=tl();n.alreadyListening=[],n.removeCallbacks=[];let s=[];n.mounted=!1;const l=Qr();n.vcMitt=l;const c=So(an),{t:u}=_t();if(c===void 0){console.error(`${n.cesiumClass} ${u("vc.loadError")}`);return}const d=St(n),h=Ks(e,n);n.children=[];const p={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=Oa(),b=async()=>{if(t("beforeLoad",n),d.nowaiting)return!0;await d.proxy.creatingPromise},y=async()=>{var f;if(n.mounted)return!1;o.debug(`${n.cesiumClass}---loading`),await b();const{Cesium:C,viewer:T}=c;return n.viewer=T,n.Cesium=C,!d.cesiumObject&&!d.nowaiting?await((f=d.proxy)==null?void 0:f.load()):(M(!0),R().then(async _=>(n.cesiumObject=_,O().then(()=>{n.mounted=!0,d.children.push(n),Object.assign(n.proxy,{cesiumObject:n.cesiumObject});const P={Cesium:C,viewer:T,cesiumObject:_,vm:n};return t("ready",P),l.emit("ready",P),o.debug(`${n.cesiumClass}---loaded`),P}))))},E=async()=>{await n.unloadingPromise},x=async()=>{await E();for(let f=0;f<n.children.length;f++)await n.children[f].proxy.unload();return n.children.length=0,n.isUnmounted=!1,n.mounted?I().then(async()=>(M(!1),n.cesiumObject=void 0,n.mounted=!1,n.removeCallbacks.forEach(f=>{f()}),t("destroyed",n),l.emit("destroyed",n),o.debug(`${n.cesiumClass}---unmounted`),n.renderByParent&&!n.unloadingPromise?d.proxy.unload():!0)):!1},g=async()=>{await n.reloadingPromise},w=async()=>(await g(),x().then(()=>y())),O=async()=>{var f;return h.registerEvents(!0),((f=n.mount)==null?void 0:f.call(n))||!0},I=async()=>{var f;return h.registerEvents(!1),((f=n.unmount)==null?void 0:f.call(n))||!0},R=async()=>{if(o.debug("do createCesiumObject"),wt(n.createCesiumObject))return n.createCesiumObject();{const f=k(e);return new Cesium[n.cesiumClass](f)}},D=(f,C)=>{let T=C==null?void 0:C.deep;const{SampledPositionProperty:_,Appearance:P,DebugAppearance:A,MaterialAppearance:L,PolylineColorAppearance:B,EllipsoidSurfaceAppearance:F,PerInstanceColorAppearance:q,PolylineMaterialAppearance:Z}=Cesium;if(f==="position")T=!(n.proxy[f]instanceof _);else if(f==="appearance"||f==="depthFailAppearance"){const H=n.proxy[f];T=!(H instanceof P||H instanceof A||H instanceof L||H instanceof B||H instanceof F||H instanceof q||H instanceof Z||Xr(H).indexOf("Appearance")!==-1)}return T},M=f=>{if(f){if(!n.cesiumClass||!Cesium[n.cesiumClass])return;e&&Object.keys(e).forEach(C=>{var T,_,P,A,L;let B=C;if(C==="labelStyle"||C==="wmtsStyle"?B="style":C==="bmKey"&&(B="key"),(_=(T=n.proxy)==null?void 0:T.$options.watch)!=null&&_[C]||n.alreadyListening.indexOf(C)!==-1)return;const F=(A=(P=n.proxy)==null?void 0:P.$options.props[C])==null?void 0:A.watcherOptions,q=(L=n.proxy)==null?void 0:L.$watch(C,async(Z,H)=>{await n.proxy.creatingPromise;const{cesiumObject:N}=n,j=N&&Object.getOwnPropertyDescriptor(N,B),G=N&&Object.getOwnPropertyDescriptor(Object.getPrototypeOf(N),B);if(j&&(j.writable||j.set)||G&&(G.writable||G.set)){if(F&&F.cesiumObjectBuilder){const J=F.cesiumObjectBuilder.call(n,Z,n.viewer.scene.globe.ellipsoid);Cesium.defined(N[B])&&Cesium.defined(N[B]._callback)||(N[B]=J)}else N[B]=$(B,Z);return!0}else(!To(Z,H)||Array.isArray(Z))&&(i["reload-mode"]==="once"||i.reloadMode==="once"||v.value.reloadMode==="once"?(a(),r(()=>{n.proxy.reload()},0)):n.reloadingPromise=new Promise((J,U)=>{n.proxy.reload().then(()=>{J(!0)}).catch(z=>{U(z)})}))},{deep:D(C,F)});s.push(q)})}else s.forEach(C=>C()),s=[]},k=(f,C)=>{const T={};return f&&Object.keys(f).forEach(_=>{let P=_;_==="labelStyle"||_==="wmtsStyle"?P="style":_==="bmKey"&&(P="key"),!(f[_]===void 0||f[_]===null)&&(Xr(f[_])&&p[P]&&(n.cesiumClass==="Entity"||n.cesiumClass.indexOf("DataSource")>0||n.cesiumClass==="VcOverlayDynamic")?T[P]=k(f[_],C):T[P]=$(_,f[_],C))}),T},$=(f,C,T)=>{var _,P;if(Xr(C)&&p[f]&&(n.cesiumClass==="Entity"||n.cesiumClass.indexOf("DataSource")>0||n.cesiumClass==="VcOverlayDynamic"))return k(C,T);{const A=(_=n.proxy)==null?void 0:_.$options.name;let L=!1;wt(C)&&A&&Xg.forEach(F=>{A.indexOf(F)!==-1&&(L=!0)});const B=((P=n.proxy)==null?void 0:P.$options.props[f])||(T==null?void 0:T[f])||Fu[f]&&Fu[f][f];return B!=null&&B.watcherOptions&&!Ao(C)?B.watcherOptions.cesiumObjectBuilder.call(n,C,n.viewer.scene.globe.ellipsoid):L?new Cesium.CallbackProperty(C,!1):C}},V=()=>Mn({},c||{}),m=new Promise((f,C)=>{try{let T=!1;c.viewer&&(T=!0,y().then(_=>{f(_),T=!1}).catch(_=>{t("unready",_),C(_)})),d.vcMitt.on("ready",()=>{!T&&!n.isUnmounted&&y().then(_=>{f(_)}).catch(_=>{t("unready",_),C(_)})})}catch(T){t("unready",T),C(T)}});return o.debug(`${n.cesiumClass}---onCreated`),Ke(()=>{o.debug(`${n.cesiumClass}---onUnmounted`),n.unloadingPromise=new Promise((f,C)=>{x().then(()=>{o.debug(`${n.cesiumClass}---unloaded`),f(!0),n.isUnmounted=!0,n.unloadingPromise=void 0,l.all.clear()})}),n.alreadyListening=[]}),Object.assign(n.proxy,{creatingPromise:m,load:y,unload:x,reload:w,getCreatingPromise:()=>m,getCesiumObject:()=>n.cesiumObject}),{$services:c,load:y,unload:x,reload:w,creatingPromise:m,transformProp:$,transformProps:k,unwatchFns:s,setPropsWatcher:M,logger:o,getServices:V}}function Jo(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=ze(e,t,i);if(n===void 0)return;i.alreadyListening.push("entities");let o=[];o.push(he(()=>Ge(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 h=s[d],p=l[d];JSON.stringify(h)!==JSON.stringify(p)&&u.push({newOptions:h,oldOptions:p})}u.forEach(d=>{const h=c.entities.getById(d.oldOptions.id);if(d.oldOptions.id===d.newOptions.id)h&&Object.keys(d.newOptions).forEach(p=>{d.oldOptions[p]!==d.newOptions[p]&&(h[p]=n.transformProp(p,d.newOptions[p]))});else{c.entities.remove(h);const p=d.newOptions;r(c,[p])}})}else{const u=rt(s,l,"id"),d=rt(l,s,"id"),h=[];for(let p=0;p<d.length;p++){const v=c.entities.getById(d[p].id);h.push(v)}h.forEach(p=>{c.entities.remove(p)}),r(c,u)}},{deep:!0}));const r=(s,l)=>{for(let c=0;c<l.length;c++){const u=l[c],d=n.transformProps(u),h=s.entities.add(d);u.id!==h.id&&(u.id=h.id),Bi(h,d)}};i.mount=async()=>{const s=n.$services.dataSources,l=i.cesiumObject;return l.show=e.show,r(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 a=()=>Mn(n.getServices(),{get datasource(){return i.cesiumObject},get entities(){var s;return(s=i.cesiumObject)==null?void 0:s.entities}});return Ke(()=>{o.forEach(s=>s()),o=[]}),Gi(an,a()),{transformProps:n.transformProps,unwatchFns:n.unwatchFns,setPropsWatcher:n.setPropsWatcher}}function We(e,t,i){i.cesiumEvents=[],i.renderByParent=!0;const n=ze(e,t,i);if(n!==void 0)return i.mount=async()=>{var o;const r=i.cesiumObject,a=St(i).proxy;return(o=a.__updateGeometry)==null?void 0:o.call(a,r)},{transformProps:n.transformProps,unwatchFns:n.unwatchFns,setPropsWatcher:n.setPropsWatcher}}function jt(e,t,i){i.cesiumEvents=["definitionChanged"],ze(e,t,i)!==void 0&&(i.mount=async()=>{var n,o;const r=i.cesiumObject;if(r===void 0)return!1;const a=se(((n=i.proxy)==null?void 0:n.$options.name)||"").split("-"),s=a.length===3?`update:${a[2]}`:"update:polylineVolume",l=St(i).proxy;return l&&((o=l.__updateGraphics)==null?void 0:o.call(l,r,s))},i.unmount=async()=>{var n,o;const r=se(((n=i.proxy)==null?void 0:n.$options.name)||"").split("-"),a=r.length===3?`update:${r[2]}`:"update:polylineVolume",s=St(i).proxy;return s&&((o=s.__updateGraphics)==null?void 0:o.call(s,void 0,a))})}const tr=e=>Fc(e);function il(e,t){const i=e.style;Object.keys(t).forEach(n=>{i[n]=t[n]})}function zu(e){if(e==null)return;if(typeof e=="string")try{return document.querySelector(e)||void 0}catch(i){return}const t=zr(e)===!0?e.value:e;if(t)return t.$el||t}const mn={hasPassive:!1,passiveCapture:!0,notPassiveCapture:!0,passive:void 0};try{const e=Object.defineProperty({},"passive",{get(){Object.assign(mn,{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 nl(){}function ol(e){return e.button===0}function Qi(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 Xo(e){e.stopPropagation()}function $n(e){e.cancelable!==!1&&e.preventDefault()}function Zi(e){e.cancelable!==!1&&e.preventDefault(),e.stopPropagation()}function al(e,t){if(e===void 0||t===!0&&e.__dragPrevented===!0)return;const i=t===!0?n=>{n.__dragPrevented=!0,n.addEventListener("dragstart",$n,mn.notPassiveCapture)}:n=>{delete n.__dragPrevented,n.removeEventListener("dragstart",$n,mn.notPassiveCapture)};e.querySelectorAll("a, img").forEach(i)}function It(e,t,i){const n=`__vc_${t}_evt`;e[n]=e[n]!==void 0?e[n].concat(i):i,i.forEach(o=>{o[0].addEventListener(o[1],e[o[2]],mn[o[3]])})}function pi(e,t){const i=`__vc_${t}_evt`;e[i]!==void 0&&(e[i].forEach(n=>{n[0].removeEventListener(n[1],e[n[2]],mn[n[3]])}),e[i]=void 0)}function Yg(e){return e!==Object(e)||e.isComposing===!0||e.qKeyEvent===!0}function Yo(e,t){return Yg(e)===!0?!1:[].concat(t).includes(e.keyCode)}function rl(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 Gu(e,t,i,n){i.modifiers.stop===!0&&Xo(e);const o=i.modifiers.color;let r=i.modifiers.center;r=r===!0||n===!0;const a=document.createElement("span"),s=document.createElement("span"),l=Qi(e),{left:c,top:u,width:d,height:h}=t.getBoundingClientRect(),p=Math.sqrt(d*d+h*h),v=p/2,b=`${(d-p)/2}px`,y=r?b:`${l.left-c-v}px`,E=`${(h-p)/2}px`,x=r?E:`${l.top-u-v}px`;s.className="vc-ripple__inner",il(s,{height:`${p}px`,width:`${p}px`,transform:`translate3d(${y},${x},0) scale3d(.2,.2,1)`,opacity:0}),a.className=`vc-ripple${o?" text-"+o:""}`,a.setAttribute("dir","ltr"),a.appendChild(s),t.appendChild(a);const g=()=>{a.remove(),clearTimeout(w)};i.abort.push(g);let w=setTimeout(()=>{s.classList.add("vc-ripple__inner--enter"),s.style.transform=`translate3d(${b},${E},0) scale3d(1,1,1)`,s.style.opacity="0.2",w=setTimeout(()=>{s.classList.remove("vc-ripple__inner--enter"),s.classList.add("vc-ripple__inner--leave"),s.style.opacity="0",w=setTimeout(()=>{a.remove(),i.abort.splice(i.abort.indexOf(g),1)},275)},250)},50)}function Uu(e,{modifiers:t,value:i,arg:n,instance:o}){const r=Object.assign({},t,i);e.modifiers={early:r.early===!0,stop:r.stop===!0,center:r.center===!0,color:r.color||n,keyCodes:[].concat(r.keyCodes||13)}}var Kg=X("Ripple",tr({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")&&Gu(n,e,i,n.qKeyEvent===!0)},keystart:rl(n=>{i.enabled===!0&&n.qSkipRipple!==!0&&Yo(n,i.modifiers.keyCodes)===!0&&n.type===`key${i.modifiers.early===!0?"down":"up"}`&&Gu(n,e,i,!0)},300)};Uu(i,t),e.__vcripple=i,It(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&&Uu(i,t)}},beforeUnmount(e){const t=e.__vcripple;t.abort.forEach(i=>{i()}),pi(t,"main"),delete e._vcripple}}));function ut(){const e=navigator.userAgent,t=/(?:Windows Phone)/.test(e),i=/(?:SymbianOS)/.test(e)||t,n=/(?:Android)/.test(e),o=/(?:Firefox)/.test(e),r=/(?:Chrome|CriOS)/.test(e),a=/(?:iPad|PlayBook)/.test(e)||n&&!/(?:Mobile)/.test(e)||o&&/(?:Tablet)/.test(e),s=/(?:iPhone)/.test(e)&&!a,l=!s&&!n&&!i,c=!!e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);return{isTablet:a,isPhone:s,isAndroid:n,isPc:l,isFireFox:o,isChrome:r,isIOS:c,hasTouch:"ontouchstart"in window||window.navigator.maxTouchPoints>0}}function Ji(){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(),ut().isPhone!==!0&&e.addRange(document.createRange()))}else document.selection!==void 0&&document.selection.empty()}var sl=X("TouchHold",tr({name:"touch-hold",beforeMount(e,t){const{modifiers:i}=t;if(i.mouse!==!0&&ut().hasTouch!==!0)return;const n={handler:t.value,noop:nl,mouseStart(r){typeof n.handler=="function"&&ol(r)===!0&&(It(n,"temp",[[document,"mousemove","move","passiveCapture"],[document,"click","end","notPassiveCapture"]]),n.start(r,!0))},touchStart(r){var a;if(r.target!==void 0&&typeof n.handler=="function"){const s=r.target;It(n,"temp",[[s,"touchmove","move","passiveCapture"],[s,"touchcancel","end","notPassiveCapture"],[s,"touchend","end","notPassiveCapture"]]),n.start(r),(a=t==null?void 0:t.touchStart)==null||a.call(t,r)}},start(r,a){n.origin=Qi(r);const s=Date.now();ut().isPhone===!0&&(document.body.classList.add("non-selectable"),Ji(),n.styleCleanup=l=>{n.styleCleanup=void 0;const c=()=>{document.body.classList.remove("non-selectable")};l===!0?(Ji(),setTimeout(c,10)):c()}),n.triggered=!1,n.sensitivity=a===!0?n.mouseSensitivity:n.touchSensitivity,n.timer=setTimeout(()=>{Ji(),n.triggered=!0,n.handler({evt:r,touch:a!==!0,mouse:a===!0,position:n.origin,duration:Date.now()-s})},n.duration)},move(r){const{top:a,left:s}=Qi(r);(Math.abs(s-n.origin.left)>=n.sensitivity||Math.abs(a-n.origin.top)>=n.sensitivity)&&clearTimeout(n.timer)},end(r){var a;pi(n,"temp"),n.styleCleanup!==void 0&&n.styleCleanup(n.triggered),n.triggered===!0?r!==void 0&&Zi(r):clearTimeout(n.timer),(a=t==null?void 0:t.touchEnd)==null||a.call(t,r)}},o=[600,5,7];typeof t.arg=="string"&&t.arg.length>0&&t.arg.split(":").forEach((r,a)=>{const s=parseInt(r,10);s&&(o[a]=s)}),[n.duration,n.touchSensitivity,n.mouseSensitivity]=o,e.__vctouchhold=n,i.mouse===!0&&It(n,"main",[[e,"mousedown","mouseStart",`passive${i.mouseCapture===!0?"Capture":""}`]]),ut().hasTouch===!0&&It(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&&(pi(t,"main"),pi(t,"temp"),clearTimeout(t.timer),t.styleCleanup!==void 0&&t.styleCleanup(),delete e.__vctouchhold)}}));const Hu={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},ey=new RegExp(`^([\\d+]+|${Object.keys(Hu).join("|")})$`,"i");function ty(e,t){const{top:i,left:n}=Qi(e);return Math.abs(n-t.left)>=7||Math.abs(i-t.top)>=7}var eM=X("TouchRepeat",tr({name:"touch-repeat",beforeMount(e,{modifiers:t,value:i,arg:n,touchStart:o}){const r=Object.keys(t).reduce((c,u)=>{if(ey.test(u)===!0){const d=isNaN(parseInt(u,10))?Hu[u.toLowerCase()]:parseInt(u,10);d>=0&&c.push(d)}return c},[]);if(t.mouse!==!0&&ut().hasTouch!==!0&&r.length===0)return;const a=typeof n=="string"&&n.length>0?n.split(":").map(c=>parseInt(c,10)):[0,600,300],s=a.length-1,l={keyboard:r,handler:i,noop:nl,mouseStart(c){l.event===void 0&&typeof l.handler=="function"&&ol(c)===!0&&(It(l,"temp",[[document,"mousemove","move","passiveCapture"],[document,"click","end","notPassiveCapture"]]),l.start(c,!0))},keyboardStart(c){if(typeof l.handler=="function"&&Yo(c,r)===!0){if((a[0]===0||l.event!==void 0)&&(Zi(c),e.focus(),l.event!==void 0))return;It(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;It(l,"temp",[[u,"touchmove","move","passiveCapture"],[u,"touchcancel","end","notPassiveCapture"],[u,"touchend","end","notPassiveCapture"]]),l.start(c),o==null||o(c)}},start(c,u,d){d!==!0&&(l.origin=Qi(c));function h(v){l.styleCleanup=void 0,document.documentElement.style.cursor="";const b=()=>{document.body.classList.remove("non-selectable")};v===!0?(Ji(),setTimeout(b,10)):b()}ut().isPhone===!0&&(document.body.classList.add("non-selectable"),Ji(),l.styleCleanup=h),l.event={touch:u!==!0&&d!==!0,mouse:u===!0,keyboard:d===!0,startTime:Date.now(),repeatCount:0};const p=()=>{if(l.event===void 0)return;l.event.repeatCount===0&&(l.event.evt=c,d===!0?l.event.keyCode=c.keyCode:l.event.position=Qi(c),ut().isPhone!==!0&&(document.documentElement.style.cursor="pointer",document.body.classList.add("non-selectable"),Ji(),l.styleCleanup=h)),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(p,a[v])};a[0]===0?p():l.timer=setTimeout(p,a[0])},move(c){l.event!==void 0&&ty(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&&Zi(c),pi(l,"temp"),clearTimeout(l.timer),l.event=void 0)}};e.__vctouchrepeat=l,t.mouse===!0&&It(l,"main",[[e,"mousedown","mouseStart",`passive${t.mouseCapture===!0?"Capture":""}`]]),ut().hasTouch===!0&&It(l,"main",[[e,"touchstart","touchStart",`passive${t.capture===!0?"Capture":""}`],[e,"touchend","noop","notPassiveCapture"]]),r.length>0&&It(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),pi(t,"main"),pi(t,"temp"),t.styleCleanup!==void 0&&t.styleCleanup(),delete e.__vctouchrepeat)}}));const iy=["left","right","up","down","horizontal","vertical"],ny={left:!0,right:!0,up:!0,down:!0,horizontal:!0,vertical:!0,all:!0};function Wu(e){const t={};return iy.forEach(i=>{e[i]&&(t[i]=!0)}),Object.keys(t).length===0?ny:(t.horizontal===!0&&(t.left=t.right=!0),t.vertical===!0&&(t.up=t.down=!0),t.left===!0&&t.right===!0&&(t.horizontal=!0),t.up===!0&&t.down===!0&&(t.vertical=!0),t.horizontal===!0&&t.vertical===!0&&(t.all=!0),t)}const ll=ut().isIOS||navigator.vendor.toLowerCase().indexOf("apple")>-1?()=>document:e=>e;function qu(e,t){return t.event===void 0&&e.target!==void 0&&e.target.draggable!==!0&&typeof t.handler=="function"&&e.target.nodeName.toUpperCase()!=="INPUT"&&(e.qClonedBy===void 0||e.qClonedBy.indexOf(t.uid)===-1)}function cl(e,t,i){const n=Qi(e);let o,r=n.left-t.event.x,a=n.top-t.event.y,s=Math.abs(r),l=Math.abs(a);const c=t.direction;c.horizontal===!0&&c.vertical!==!0?o=r<0?"left":"right":c.horizontal!==!0&&c.vertical===!0?o=a<0?"up":"down":c.up===!0&&a<0?(o="up",s>l&&(c.left===!0&&r<0?o="left":c.right===!0&&r>0&&(o="right"))):c.down===!0&&a>0?(o="down",s>l&&(c.left===!0&&r<0?o="left":c.right===!0&&r>0&&(o="right"))):c.left===!0&&r<0?(o="left",s<l&&(c.up===!0&&a<0?o="up":c.down===!0&&a>0&&(o="down"))):c.right===!0&&r>0&&(o="right",s<l&&(c.up===!0&&a<0?o="up":c.down===!0&&a>0&&(o="down")));let u=!1;if(o===void 0&&i===!1){if(t.event.isFirst===!0||t.event.lastDir===void 0)return{};o=t.event.lastDir,u=!0,o==="left"||o==="right"?(n.left-=r,s=0,r=0):(n.top-=a,l=0,a=0)}return{synthetic:u,payload:{evt:e,touch:t.event.mouse!==!0,mouse:t.event.mouse===!0,position:n,direction:o,isFirst:t.event.isFirst,isFinal:i===!0,duration:Date.now()-t.event.time,distance:{x:s,y:l},offset:{x:r,y:a},delta:{x:n.left-t.event.lastX,y:n.top-t.event.lastY}}}}let oy=0;var ay=X("TouchPan",tr({name:"touch-pan",beforeMount(e,{value:t,modifiers:i}){if(i.mouse!==!0&&ut().hasTouch!==!0)return;function n(r,a){i.mouse===!0&&a===!0?Zi(r):(i.stop===!0&&Xo(r),i.prevent===!0&&$n(r))}const o={uid:"qvtp_"+oy++,handler:t,modifiers:i,direction:Wu(i),noop:nl,mouseStart(r){qu(r,o)&&ol(r)&&(It(o,"temp",[[document,"mousemove","move","notPassiveCapture"],[document,"mouseup","end","passiveCapture"]]),o.start(r,!0))},touchStart(r){if(qu(r,o)){const a=r.target;It(o,"temp",[[a,"touchmove","move","notPassiveCapture"],[a,"touchcancel","end","passiveCapture"],[a,"touchend","end","passiveCapture"]]),o.start(r)}},start(r,a){if(ut().isFireFox===!0&&al(e,!0),o.lastEvt=r,a===!0||i.stop===!0){if(o.direction.all!==!0&&(a!==!0||o.modifiers.mouseAllDir!==!0&&o.modifiers.mousealldir!==!0)){const c=r.type.indexOf("mouse")>-1?new MouseEvent(r.type,r):new TouchEvent(r.type,r);r.defaultPrevented===!0&&$n(c),r.cancelBubble===!0&&Xo(c),Object.assign(c,{qKeyEvent:r.qKeyEvent,qClickOutside:r.qClickOutside,qAnchorHandled:r.qAnchorHandled,qClonedBy:r.qClonedBy===void 0?[o.uid]:r.qClonedBy.concat(o.uid)}),o.initialEvent={target:r.target,event:c}}Xo(r)}const{left:s,top:l}=Qi(r);o.event={x:s,y:l,time:Date.now(),mouse:a===!0,detected:!1,isFirst:!0,isFinal:!1,lastX:s,lastY:l}},move(r){if(o.event===void 0)return;const a=Qi(r),s=a.left-o.event.x,l=a.top-o.event.y;if(s===0&&l===0)return;o.lastEvt=r;const c=o.event.mouse===!0,u=()=>{n(r,c);let p;i.preserveCursor!==!0&&i.preservecursor!==!0&&(p=document.documentElement.style.cursor||"",document.documentElement.style.cursor="grabbing"),c===!0&&document.body.classList.add("no-pointer-events--children"),document.body.classList.add("non-selectable"),Ji(),o.styleCleanup=v=>{if(o.styleCleanup=void 0,p!==void 0&&(document.documentElement.style.cursor=p),document.body.classList.remove("non-selectable"),c===!0){const b=()=>{document.body.classList.remove("no-pointer-events--children")};v!==void 0?setTimeout(()=>{b(),v()},50):b()}else v!==void 0&&v()}};if(o.event.detected===!0){o.event.isFirst!==!0&&n(r,o.event.mouse);const{payload:p,synthetic:v}=cl(r,o,!1);p!==void 0&&(o.handler(p)===!1?o.end(r):(o.styleCleanup===void 0&&o.event.isFirst===!0&&u(),o.event.lastX=p.position.left,o.event.lastY=p.position.top,o.event.lastDir=v===!0?void 0:p.direction,o.event.isFirst=!1));return}if(o.direction.all===!0||c===!0&&(o.modifiers.mouseAllDir===!0||o.modifiers.mousealldir===!0)){u(),o.event.detected=!0,o.move(r);return}const d=Math.abs(s),h=Math.abs(l);d!==h&&(o.direction.horizontal===!0&&d>h||o.direction.vertical===!0&&d<h||o.direction.up===!0&&d<h&&l<0||o.direction.down===!0&&d<h&&l>0||o.direction.left===!0&&d>h&&s<0||o.direction.right===!0&&d>h&&s>0?(o.event.detected=!0,o.move(r)):o.end(r,!0))},end(r,a){if(o.event!==void 0){if(pi(o,"temp"),ut().isFireFox===!0&&al(e,!1),a===!0)o.styleCleanup!==void 0&&o.styleCleanup(),o.event.detected!==!0&&o.initialEvent!==void 0&&o.initialEvent.target.dispatchEvent(o.initialEvent.event);else if(o.event.detected===!0){o.event.isFirst===!0&&o.handler(cl(r===void 0?o.lastEvt:r,o).payload);const{payload:s}=cl(r===void 0?o.lastEvt:r,o,!0),l=()=>{o.handler(s)};o.styleCleanup!==void 0?o.styleCleanup(l):l()}o.event=void 0,o.initialEvent=void 0,o.lastEvt=void 0}}};if(e.__qtouchpan=o,i.mouse===!0){const r=i.mouseCapture===!0||i.mousecapture===!0?"Capture":"";It(o,"main",[[e,"mousedown","mouseStart",`passive${r}`]])}ut().hasTouch===!0&&It(o,"main",[[e,"touchstart","touchStart",`passive${i.capture===!0?"Capture":""}`],[e,"touchmove","noop","notPassiveCapture"]])},updated(e,t){const i=e.__qtouchpan;i!==void 0&&(t.oldValue!==t.value&&(typeof t.value!="function"&&i.end(),i.handler=t.value),i.direction=Wu(t.modifiers))},beforeUnmount(e){const t=e.__qtouchpan;t!==void 0&&(t.event!==void 0&&t.end(),pi(t,"main"),pi(t,"temp"),ut().isFireFox===!0&&al(e,!1),t.styleCleanup!==void 0&&t.styleCleanup(),delete e.__qtouchpan)}}));function Ko(){let e,t;const i=new Promise(function(n,o){e=n,t=o});return{resolve:e,reject:t,promise:i}}function Qu(e,{handleMouseClick:t=void 0,handleMouseDown:i=void 0,handleMouseUp:n=void 0,handleMouseMove:o=void 0,handleDoubleClick:r=void 0,handleMouseWheel:a=void 0,handlePinch:s=void 0}){const l=te(void 0),c=te(!1),u=()=>{if(c.value)return;const{ScreenSpaceEventType:W,KeyboardEventModifier:ce,ScreenSpaceEventHandler:Ee}=Cesium;if(!l.value){const{viewer:nt}=e;l.value=new Ee(nt.canvas),sl.beforeMount(nt.canvas,{arg:"2000",value:ye,touchStart:Te,touchEnd:ge,modifiers:{}})}const de=l.value;de.setInputAction(p,W.LEFT_CLICK),de.setInputAction(v,W.LEFT_CLICK,ce.SHIFT),de.setInputAction(b,W.LEFT_CLICK,ce.CTRL),de.setInputAction(R,W.LEFT_DOWN),de.setInputAction(D,W.LEFT_DOWN,ce.SHIFT),de.setInputAction(M,W.LEFT_DOWN,ce.CTRL),de.setInputAction(T,W.LEFT_UP),de.setInputAction(_,W.LEFT_UP,ce.SHIFT),de.setInputAction(P,W.LEFT_UP,ce.CTRL),de.setInputAction(w,W.RIGHT_CLICK),de.setInputAction(O,W.RIGHT_CLICK,ce.SHIFT),de.setInputAction(I,W.RIGHT_CLICK,ce.CTRL),de.setInputAction(m,W.RIGHT_DOWN),de.setInputAction(f,W.RIGHT_DOWN,ce.SHIFT),de.setInputAction(C,W.RIGHT_DOWN,ce.CTRL),de.setInputAction(F,W.RIGHT_UP),de.setInputAction(q,W.RIGHT_UP,ce.SHIFT),de.setInputAction(Z,W.RIGHT_UP,ce.CTRL),de.setInputAction(y,W.MIDDLE_CLICK),de.setInputAction(E,W.MIDDLE_CLICK,ce.SHIFT),de.setInputAction(x,W.MIDDLE_CLICK,ce.CTRL),de.setInputAction(k,W.MIDDLE_DOWN),de.setInputAction($,W.MIDDLE_DOWN,ce.SHIFT),de.setInputAction(V,W.MIDDLE_DOWN,ce.CTRL),de.setInputAction(A,W.MIDDLE_UP),de.setInputAction(L,W.MIDDLE_UP,ce.SHIFT),de.setInputAction(B,W.MIDDLE_UP,ce.CTRL),de.setInputAction(H,W.LEFT_DOUBLE_CLICK),de.setInputAction(N,W.LEFT_DOUBLE_CLICK,ce.SHIFT),de.setInputAction(j,W.LEFT_DOUBLE_CLICK,ce.CTRL),de.setInputAction(G,W.MOUSE_MOVE),de.setInputAction(J,W.MOUSE_MOVE,ce.SHIFT),de.setInputAction(U,W.MOUSE_MOVE,ce.CTRL),de.setInputAction(z,W.WHEEL),de.setInputAction(K,W.WHEEL,ce.SHIFT),de.setInputAction(Q,W.WHEEL,ce.CTRL),de.setInputAction(ie,W.PINCH_START),de.setInputAction(Y,W.PINCH_START,ce.SHIFT),de.setInputAction(oe,W.PINCH_START,ce.CTRL),de.setInputAction(le,W.PINCH_END),de.setInputAction(fe,W.PINCH_END,ce.SHIFT),de.setInputAction(Ce,W.PINCH_END,ce.CTRL),de.setInputAction(me,W.PINCH_MOVE),de.setInputAction(be,W.PINCH_MOVE,ce.SHIFT),de.setInputAction(_e,W.PINCH_MOVE,ce.CTRL),c.value=!0},d=()=>{if(!c.value)return;const{ScreenSpaceEventType:W,KeyboardEventModifier:ce}=Cesium,Ee=l.value;if(!Ee)return;Ee.removeInputAction(W.LEFT_CLICK),Ee.removeInputAction(W.LEFT_CLICK,ce.SHIFT),Ee.removeInputAction(W.LEFT_CLICK,ce.CTRL),Ee.removeInputAction(W.LEFT_DOWN),Ee.removeInputAction(W.LEFT_DOWN,ce.SHIFT),Ee.removeInputAction(W.LEFT_DOWN,ce.CTRL),Ee.removeInputAction(W.LEFT_UP),Ee.removeInputAction(W.LEFT_UP,ce.SHIFT),Ee.removeInputAction(W.LEFT_UP,ce.CTRL),Ee.removeInputAction(W.RIGHT_CLICK),Ee.removeInputAction(W.RIGHT_CLICK,ce.SHIFT),Ee.removeInputAction(W.RIGHT_CLICK,ce.CTRL),Ee.removeInputAction(W.RIGHT_DOWN),Ee.removeInputAction(W.RIGHT_DOWN,ce.SHIFT),Ee.removeInputAction(W.RIGHT_DOWN,ce.CTRL),Ee.removeInputAction(W.RIGHT_UP),Ee.removeInputAction(W.RIGHT_UP,ce.SHIFT),Ee.removeInputAction(W.RIGHT_UP,ce.CTRL),Ee.removeInputAction(W.MIDDLE_CLICK),Ee.removeInputAction(W.MIDDLE_CLICK,ce.SHIFT),Ee.removeInputAction(W.MIDDLE_CLICK,ce.CTRL),Ee.removeInputAction(W.MIDDLE_DOWN),Ee.removeInputAction(W.MIDDLE_DOWN,ce.SHIFT),Ee.removeInputAction(W.MIDDLE_DOWN,ce.CTRL),Ee.removeInputAction(W.MIDDLE_UP),Ee.removeInputAction(W.MIDDLE_UP,ce.SHIFT),Ee.removeInputAction(W.MIDDLE_UP,ce.CTRL),Ee.removeInputAction(W.LEFT_DOUBLE_CLICK),Ee.removeInputAction(W.LEFT_DOUBLE_CLICK,ce.SHIFT),Ee.removeInputAction(W.LEFT_DOUBLE_CLICK,ce.CTRL),Ee.removeInputAction(W.MOUSE_MOVE),Ee.removeInputAction(W.MOUSE_MOVE,ce.SHIFT),Ee.removeInputAction(W.MOUSE_MOVE,ce.CTRL),Ee.removeInputAction(W.WHEEL),Ee.removeInputAction(W.WHEEL,ce.SHIFT),Ee.removeInputAction(W.WHEEL,ce.CTRL),Ee.removeInputAction(W.PINCH_START),Ee.removeInputAction(W.PINCH_START,ce.SHIFT),Ee.removeInputAction(W.PINCH_START,ce.CTRL),Ee.removeInputAction(W.PINCH_END),Ee.removeInputAction(W.PINCH_END,ce.SHIFT),Ee.removeInputAction(W.PINCH_END,ce.CTRL),Ee.removeInputAction(W.PINCH_MOVE),Ee.removeInputAction(W.PINCH_MOVE,ce.SHIFT),Ee.removeInputAction(W.PINCH_MOVE,ce.CTRL);const{viewer:de}=e;sl.beforeUnmount(de.canvas),c.value=!1},h=()=>{var W;(W=l.value)==null||W.destroy(),l.value=void 0},p=W=>{t==null||t(W,{button:0})},v=W=>{t==null||t(W,{button:0,shift:!0})},b=W=>{t==null||t(W,{button:0,ctrl:!0})},y=W=>{t==null||t(W,{button:1})},E=W=>{t==null||t(W,{button:1,shift:!0})},x=W=>{t==null||t(W,{button:1,ctrl:!0})};let g;const w=W=>{var ce;g?(ce=g==null?void 0:g.promise)==null||ce.then(Ee=>{Ee&&(t==null||t(W,{button:2}))}):t==null||t(W,{button:2})},O=W=>{t==null||t(W,{button:2,shift:!0})},I=W=>{t==null||t(W,{button:2,ctrl:!0})},R=W=>{i==null||i(W,{button:0})},D=W=>{i==null||i(W,{button:0,shift:!0})},M=W=>{i==null||i(W,{button:0,ctrl:!0})},k=W=>{i==null||i(W,{button:1})},$=W=>{i==null||i(W,{button:1,shift:!0})},V=W=>{i==null||i(W,{button:1,ctrl:!0})},m=W=>{i==null||i(W,{button:2})},f=W=>{i==null||i(W,{button:2,shift:!0})},C=W=>{i==null||i(W,{button:2,ctrl:!0})},T=W=>{n==null||n(W,{button:0})},_=W=>{n==null||n(W,{button:0,shift:!0})},P=W=>{n==null||n(W,{button:0,ctrl:!0})},A=W=>{n==null||n(W,{button:1,ctrl:!0})},L=W=>{n==null||n(W,{button:1,shift:!0})},B=W=>{n==null||n(W,{button:1,ctrl:!0})},F=W=>{n==null||n(W,{button:2})},q=W=>{n==null||n(W,{button:2,shift:!0})},Z=W=>{n==null||n(W,{button:2,ctrl:!0})},H=W=>{r==null||r(W,{button:0})},N=W=>{r==null||r(W,{button:0,shift:!0})},j=W=>{r==null||r(W,{button:0,ctrl:!0})},G=W=>{o==null||o(W)},J=W=>{o==null||o(W,{shift:!0})},U=W=>{o==null||o(W,{ctrl:!0})},z=W=>{a==null||a(W)},K=W=>{a==null||a(W,{shift:!0})},Q=W=>{a==null||a(W,{ctrl:!0})},ie=W=>{s==null||s(W,{start:!0})},Y=W=>{s==null||s(W,{start:!0,shift:!0})},oe=W=>{s==null||s(W,{start:!0,ctrl:!0})},le=W=>{s==null||s(W,{end:!0})},fe=W=>{s==null||s(W,{end:!0,shift:!0})},Ce=W=>{s==null||s(W,{end:!0,ctrl:!0})},me=W=>{s==null||s(W,{move:!0})},be=W=>{s==null||s(W,{move:!0,shift:!0})},_e=W=>{s==null||s(W,{move:!0,ctrl:!0})},ye=W=>{if(W.touch){const ce={position:{x:W.position.left,y:W.position.top}};r==null||r(ce,{button:0})}g.resolve(!1)},ge=W=>{g.resolve(!0)},Te=W=>{g=Ko()};return{activate:u,deactivate:d,destroy:h,isActive:c}}function Nn(e,t,i){const n=ze(e,t,i);if(n!==void 0)return i.createCesiumObject=async()=>{const o=n.transformProps(e),r=n.$services.primitives;return r&&r.add(o)},i.mount=async()=>{const o=n.$services.primitives,r=i.cesiumObject;return o&&o.contains(r)},i.unmount=async()=>{const o=n.$services.primitives,r=i.cesiumObject;return o&&!o.isDestroyed()&&o.remove(r)},{transformProps:n.transformProps,unwatchFns:n.unwatchFns,setPropsWatcher:n.setPropsWatcher,$services:n.$services}}function zn(e,t,i){i.cesiumEvents=["primitiveAdded","primitiveRemoved"];const n=ze(e,t,i);return n===void 0?void 0:(i.mount=async()=>{const o=n.$services.primitives,r=i.cesiumObject,a=o&&o.add(r);return Cesium.defined(a)},i.unmount=async()=>{const o=n.$services.primitives,r=i.cesiumObject;return o&&o.remove(r)},Gi(an,(()=>Mn(n.getServices(),{get primitives(){return i.cesiumObject}}))()),{transformProps:n.transformProps,transformProp:n.transformProp,unwatchFns:n.unwatchFns,setPropsWatcher:n.setPropsWatcher})}function vi(e,t,i){const n=ze(e,t,i);if(n===void 0)return;const{emit:o}=t,r=te(0),a=te([]);i.createCesiumObject=async()=>{var c,u;const d=n.transformProps(e);if(d.asynchronous||await((u=(c=Cesium[i.cesiumClass]).initializeTerrainHeights)==null?void 0:u.call(c)),e.geometryInstances&&(et(e.geometryInstances)?(a.value.push(...e.geometryInstances),r.value+=e.geometryInstances.length):(r.value+=1,a.value.push(e.geometryInstances))),(i.cesiumClass==="Cesium3DTileset"||i.cesiumClass==="I3SDataProvider")&&rn(Cesium.VERSION,"1.104"))try{return Cesium.defined(e.assetId)&&i.cesiumClass==="Cesium3DTileset"?await Cesium[i.cesiumClass].fromIonAssetId(e.assetId,d):await Cesium[i.cesiumClass].fromUrl(e.url,d)}catch(h){n.logger.error(`Failed to load tileset: ${h}`)}else return new Cesium[i.cesiumClass](d)},i.mount=async()=>{var c;const u=n.$services.primitives,d=i.cesiumObject;(c=d==null?void 0:d.readyPromise)==null||c.then(p=>{Se(i,"readyPromise")&&o("readyPromise",p,n.$services.viewer,i.proxy)}),d._vcParent=u;const h=u&&u.add(d);if(i.cesiumClass==="ParticleSystem"){const p=setInterval(()=>{Cesium.defined(h._billboardCollection)&&(h._billboardCollection._vcParent=h,clearInterval(p))},500)}return Cesium.defined(h)},i.unmount=async()=>{r.value=0,a.value=[];const c=n.$services.primitives,u=i.cesiumObject;return c&&c.remove(u)};const s=(c,u)=>{if(a.value.push(c),u===r.value-1)if(Se(i,"update:geometryInstances"))t.emit("update:geometryInstances",a.value);else{const d=i.cesiumObject;d.geometryInstances=u===0?c:a.value}return!0},l=c=>{const u=a.value.indexOf(c);return a.value.splice(u,1),!0};return Gi(an,(()=>Mn(n.getServices(),{get primitive(){return i.cesiumObject}}))()),Object.assign(i.proxy,{__updateGeometryInstances:s,__removeGeometryInstances:l,__childCount:r}),{transformProps:n.transformProps,transformProp:n.transformProp,unwatchFns:n.unwatchFns,setPropsWatcher:n.setPropsWatcher,$services:n.$services}}const ir=52.35987755982988,Ft=3.141592653589793,nr=6378245,or=.006693421622965943,ul=function(i,n){var i=+i,n=+n;const o=i-.0065,r=n-.006,a=Math.sqrt(o*o+r*r)-2e-5*Math.sin(r*ir),s=Math.atan2(r,o)-3e-6*Math.cos(o*ir),l=a*Math.cos(s),c=a*Math.sin(s);return[l,c]},dl=function(n,i){var i=+i,n=+n;const o=Math.sqrt(n*n+i*i)+2e-5*Math.sin(i*ir),r=Math.atan2(i,n)+3e-6*Math.cos(n*ir),a=o*Math.cos(r)+.0065,s=o*Math.sin(r)+.006;return[a,s]},Zu=function(n,i){var i=+i,n=+n;if(Yu(n,i))return[n,i];{let o=Ju(n-105,i-35),r=Xu(n-105,i-35);const a=i/180*Ft;let s=Math.sin(a);s=1-or*s*s;const l=Math.sqrt(s);o=o*180/(nr*(1-or)/(s*l)*Ft),r=r*180/(nr/l*Math.cos(a)*Ft);const c=i+o;return[n+r,c]}},hl=function(n,i){var i=+i,n=+n;if(Yu(n,i))return[n,i];{let o=Ju(n-105,i-35),r=Xu(n-105,i-35);const a=i/180*Ft;let s=Math.sin(a);s=1-or*s*s;const l=Math.sqrt(s);o=o*180/(nr*(1-or)/(s*l)*Ft),r=r*180/(nr/l*Math.cos(a)*Ft);const c=i+o,u=n+r;return[n*2-u,i*2-c]}};var Ju=function(n,i){var i=+i,n=+n;let o=-100+2*n+3*i+.2*i*i+.1*n*i+.2*Math.sqrt(Math.abs(n));return o+=(20*Math.sin(6*n*Ft)+20*Math.sin(2*n*Ft))*2/3,o+=(20*Math.sin(i*Ft)+40*Math.sin(i/3*Ft))*2/3,o+=(160*Math.sin(i/12*Ft)+320*Math.sin(i*Ft/30))*2/3,o},Xu=function(n,i){var i=+i,n=+n;let o=300+n+2*i+.1*n*n+.1*n*i+.1*Math.sqrt(Math.abs(n));return o+=(20*Math.sin(6*n*Ft)+20*Math.sin(2*n*Ft))*2/3,o+=(20*Math.sin(n*Ft)+40*Math.sin(n/3*Ft))*2/3,o+=(150*Math.sin(n/12*Ft)+300*Math.sin(n/30*Ft))*2/3,o},Yu=function(n,i){var i=+i,n=+n;return!(n>73.66&&n<135.05&&i>3.86&&i<53.55)},Ku=Object.freeze({__proto__:null,bd09togcj02:ul,gcj02tobd09:dl,wgs84togcj02:Zu,gcj02towgs84:hl});function dt(e,t,i){i.cesiumEvents=["errorEvent"];const n=ze(e,t,i);if(n===void 0)return;const{emit:o}=t;return i.createCesiumObject=async()=>{const r=n.transformProps(e);return rn(Cesium.VERSION,"1.104")&&typeof Cesium[i.cesiumClass].fromUrl=="function"?await Cesium[i.cesiumClass].fromUrl(r.url,r):new Cesium[i.cesiumClass](r)},i.mount=async()=>{var r,a,s,l,c;const{viewer:u}=n.$services;if(i.cesiumClass.indexOf("ImageryProvider")!==-1){i.renderByParent=!0;const d=i.cesiumObject;if((r=d==null?void 0:d.readyPromise)==null||r.then(()=>{Se(i,"readyPromise")&&o("readyPromise",d,u,i.proxy)}),e.projectionTransforms&&e.projectionTransforms.from!==e.projectionTransforms.to&&!(((a=i.proxy)==null?void 0:a.$options.name)==="VcImageryProviderBaidu"||((s=i.proxy)==null?void 0:s.$options.name)==="VcImageryProviderTianditu"&&d._epsgCode==="4490")){const{WebMercatorTilingScheme:p,Cartographic:v,Math:b}=Cesium,y=new p,E=y.projection,x=E.project,g=E.unproject;let w,O;e.projectionTransforms.to.toUpperCase()==="WGS84"?(w="wgs84togcj02",O="gcj02towgs84"):e.projectionTransforms.to.toUpperCase()==="GCJ02"&&(w="gcj02towgs84",O="wgs84togcj02"),w&&O&&(E.project=function(I,R){return R=R||new Cesium.Cartesian3,R=Ku[w](b.toDegrees(I.longitude),b.toDegrees(I.latitude)),x.call(this,new v(b.toRadians(R==null?void 0:R[0]),b.toRadians(R==null?void 0:R[1])))},E.unproject=function(I,R){R=R||new v;const D=g.call(this,I);return R=Ku[O](b.toDegrees(D.longitude),b.toDegrees(D.latitude)),new v(b.toRadians(R==null?void 0:R[0]),b.toRadians(R==null?void 0:R[1]))},d._tilingScheme=y)}const h=St(i).proxy;return h&&((l=h.__updateProvider)==null?void 0:l.call(h,d))}else{const d=i.cesiumObject;return(c=d==null?void 0:d.readyPromise)==null||c.then(()=>{Se(i,"readyPromise")&&o("readyPromise",d,u,i.proxy)}),u.terrainProvider=d,!0}},i.unmount=async()=>{var r,a;const{viewer:s}=n.$services;if(i.cesiumClass.indexOf("ImageryProvider")!==-1){const l=St(i).proxy;return l&&((r=l.__updateProvider)==null?void 0:r.call(l,void 0))}else{const l=new Cesium.EllipsoidTerrainProvider;return(a=l==null?void 0:l.readyPromise)==null||a.then(()=>{Se(i,"readyPromise")&&o("readyPromise",l,s,i.proxy)}),s.terrainProvider=l,!0}},{transformProps:n.transformProps,unwatchFns:n.unwatchFns,setPropsWatcher:n.setPropsWatcher}}function ml(e){var t,i,n;const o=ae(),r=(o==null?void 0:o.parent)===null?o.vnode.appContext&&o.vnode.appContext.provides:(t=o==null?void 0:o.parent)==null?void 0:t.provides;(!r||!(an in r))&&!e&&(e="cesiumContainer");const a=Do();if(o)if(e){const s=(n=(i=o.appContext.config.globalProperties)==null?void 0:i.$VueCesium)==null?void 0:n[e];return s||a.warn(`Failed to get $vc, reason: vc-viewer with containerId: ${e} was not found.`),s}else return So(an);else a.warn("VueCesium useVueCesium() can only be used inside setup().")}var ry={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,baseLayer: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 sy(){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 ed{constructor(){this.states=new Cesium.ManagedArray,this.count=0}hidePrimitiveCollection(t){const{PrimitiveCollection:i,Cesium3DTileset:n,Model:o}=Cesium,r=t.length;for(let a=0;a<r;a++){const s=t.get(a);s instanceof i?this.hidePrimitiveCollection(s):(this.states.push(s.show),s instanceof n||s instanceof o||(s.show=!1))}}restorePrimitiveCollection(t){const{PrimitiveCollection:i}=Cesium,n=t.length;for(let o=0;o<n;o++){const r=t.get(o);r instanceof i?this.restorePrimitiveCollection(r):r.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)}}X("VisibilityState",ed);var Me=X("DrawStatus",{BeforeDraw:0,Drawing:1,AfterDraw:2});const At=Object.freeze({METERS:"METERS",CENTIMETERS:"CENTIMETERS",KILOMETERS:"KILOMETERS",FEET:"FEET",US_SURVEY_FEET:"US_SURVEY_FEET",INCHES:"INCHES",YARDS:"YARDS",MILES:"MILES"}),Et=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"}),Gt=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"}),td=class hi{constructor(t){t=oi(t,{}),this.distanceUnits=oi(t.distanceUnits,At.METERS),this.areaUnits=oi(t.areaUnits,Et.SQUARE_METERS),this.volumeUnits=oi(t.volumeUnits,Gt.CUBIC_METERS),this.angleUnits=oi(t.angleUnits,Pt.DEGREES),this.slopeUnits=oi(t.slopeUnits,Pt.DEGREES)}static distanceToString(t,i,n,o){return t=hi.convertDistance(t,At.METERS,i),oo(t,n,o)+hi.getDistanceUnitSpacing(i)+hi.getDistanceUnitSymbol(i)}static areaToString(t,i,n,o){return t=hi.convertArea(t,Et.SQUARE_METERS,i),oo(t,n,o)+hi.getAreaUnitSpacing(i)+hi.getAreaUnitSymbol(i)}static angleToString(t,i,n,o){const{Math:r}=Cesium;if(i===Pt.DEGREES||i===Pt.RADIANS||i===Pt.GRADE)return t=ad(t,i),oo(t,n,o)+hi.getAngleUnitSpacing(i)+hi.getAngleUnitSymbol(i);if(i===Pt.DEGREES_MINUTES_SECONDS){const a=r.toDegrees(t),s=a<0?"-":"",l=Math.floor(a),c=60*(a-l),u=Math.floor(c);return s+l+"\xB0 "+u+"' "+oo(60*(c-u),void 0,o)+'"'}Pt.RATIO}static volumeToString(t,i,n,o){return t=hi.convertArea(t,Gt.CUBIC_METERS,i),oo(t,n,o)+hi.getVolumeUnitSpacing(i)+hi.getVolumeUnitSymbol(i)}static getDistanceUnitSpacing(t){return" "}static getAreaUnitSpacing(t){return" "}static getAngleUnitSpacing(t){return t===Pt.RADIANS?" ":""}static getVolumeUnitSpacing(t){return" "}static getDistanceUnitSymbol(t){switch(t){case At.METERS:return"m";case At.CENTIMETERS:return"cm";case At.KILOMETERS:return"km";case At.FEET:case At.US_SURVEY_FEET:return"ft";case At.INCHES:return"in";case At.YARDS:return"yd";case At.MILES:return"mi";default:return}}static getAreaUnitSymbol(t){switch(t){case Et.SQUARE_METERS:return"m\xB2";case Et.SQUARE_CENTIMETERS:return"cm\xB2";case Et.SQUARE_KILOMETERS:return"km\xB2";case Et.SQUARE_FEET:return"sq ft";case Et.SQUARE_INCHES:return"sq in";case Et.SQUARE_YARDS:return"sq yd";case Et.SQUARE_MILES:return"sq mi";case Et.ACRES:return"ac";case Et.HECTARES:return"ha";default:return}}static getVolumeUnitSymbol(t){switch(t){case Gt.CUBIC_METERS:return"m\xB3";case Gt.CUBIC_CENTIMETERS:return"cm\xB3";case Gt.CUBIC_KILOMETERS:return"km\xB3";case Gt.CUBIC_FEET:return"cu ft";case Gt.CUBIC_INCHES:return"cu in";case Gt.CUBIC_YARDS:return"cu yd";case Gt.CUBIC_MILES:return"cu mi";default:return}}static getAngleUnitSymbol(t){return t===Pt.DEGREES?"\xB0":t===Pt.RADIANS?"rad":t===Pt.GRADE?"%":void 0}static convertDistance(t,i,n){return i===n?t:t*id(i)*(1/id(n))}static convertArea(t,i,n){return i===n?t:t*nd(i)*(1/nd(n))}static convertVolume(t,i,n){return i===n?t:t*od(i)*(1/od(n))}static convertAngle(t,i,n){return i===n?t:ad(ly(t,i),n)}static longitudeToString(t,i,n,o){return hi.angleToString(Math.abs(t),i,n,o)+" "+(t<0?"W":"E")}static latitudeToString(t,i,n,o){return hi.angleToString(Math.abs(t),i,n,o)+" "+(t<0?"S":"N")}};X({DistanceUnits:At,AreaUnits:Et,VolumeUnits:Gt,AngleUnits:Pt}),td.numberToString=function(e,t,i){return oo(e,t,i)};let gt=X("MeasureUnits",td);function id(e){switch(e){case At.METERS:return 1;case At.CENTIMETERS:return .01;case At.KILOMETERS:return 1e3;case At.FEET:return .3048;case At.US_SURVEY_FEET:return 1200/3937;case At.INCHES:return .254;case At.YARDS:return .9144;case At.MILES:return 1609.344;default:return 1}}function nd(e){switch(e){case Et.SQUARE_METERS:return 1;case Et.SQUARE_CENTIMETERS:return 1e-4;case Et.SQUARE_KILOMETERS:return 1e6;case Et.SQUARE_FEET:return .09290304;case Et.SQUARE_INCHES:return 64516e-8;case Et.SQUARE_YARDS:return .83612736;case Et.SQUARE_MILES:return 2589988110336e-6;case Et.ACRES:return 4046.85642232;case Et.HECTARES:return 1e4;default:return 1}}function od(e){switch(e){case Gt.CUBIC_METERS:return 1;case Gt.CUBIC_CENTIMETERS:return 1e-6;case Gt.CUBIC_KILOMETERS:return 1e9;case Gt.CUBIC_FEET:return .09290304*.3048;case Gt.CUBIC_INCHES:return 16387064e-12;case Gt.CUBIC_YARDS:return .764554857984;case Gt.CUBIC_MILES:return 416818182544058e-5;default:return 1}}function ly(e,t){const{defined:i,Math:n,RuntimeError:o}=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 r=/(-?)(\d+)\s*°\s*(\d+)\s*'\s*([\d.,]+)"\s*([WENS]?)/i.exec(e)||[];if(!i(r))throw new o("Could not convert angle to radians: "+e);let a=0<r[1].length?-1:1;const s=parseInt(r[2]),l=parseInt(r[3]),c=parseFloat(r[4]);let u=r[5];u.length===1&&((u=u.toUpperCase())!=="W"&&u!=="S"||(a*=-1));const d=a*(s+l/60+c/3600);return n.toRadians(d)}}function ad(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 oo(e,t,i){const n=cy(i,e,t),o=e.toLocaleString(t,n),r=-0,a=0;return o===r.toLocaleString(t,n)?a.toLocaleString(t,n):o}function cy(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 pl{constructor(t){const{defined:i,defaultValue:n,createGuid:o,BoundingSphere:r,Ellipsoid:a,ClassificationType:s,ArcType:l}=Cesium;t=n(t,{}),this.show=n(t.show,!0),this._id=i(t.id)?t.id:o(),this._ellipsoid=n(t.ellipsoid,a.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 r,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(o=>{this._primitive&&this._primitive.destroy(),this._primitive=void 0,this._primitive=o,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:o}=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(r){return o.clone(r)}),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:o}=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(r){return o.clone(r)}),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)}}X("PolygonPrimitive",pl);class vl{constructor(t){const{SampledPositionProperty:i,Entity:n,ExtrapolationType:o,VelocityOrientationProperty:r,CallbackProperty:a}=Cesium;this._lastTime=void 0,this._sampledPosition=new i,this._sampledPosition.forwardExtrapolationType=t.forwardExtrapolationType||o.HOLD,this._sampledPosition.backwardExtrapolationType=t.backwardExtrapolationType||o.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 r(this._sampledPosition);let c;s.orientation=new a((u,d)=>{const h=l.getValue(u);if(h)c=h;else return c;return h},!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 o=Cesium.JulianDate.now();n=Cesium.JulianDate.addSeconds(o,i,new Cesium.JulianDate),Cesium.destroyObject(o)}else n=Li(i);return this._sampledPosition.addSample(n,tt(t)),this._lastTime=n,this._cache.push(this._lastTime),n}}X("DynamicOverlay",vl);const uy={position:0,normal:1};class rd{constructor(t){const{defaultValue:i,Matrix4:n,Math:o,Color:r,BoundingSphere:a}=Cesium;this.modelMatrix=i(t.modelMatrix,new n),this.fovH=i(t.fovH,o.toRadians(60)),this.fovV=i(t.fovV,o.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 r(1,1,1,.1)),this._lineColor=i(t.lineColor,new r(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 a,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:o,BoundingSphere:r}=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()),o(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=r.transform(this._initBoundingSphere,this._modelMatrix,this._boundingSphere),this._lineCommand.modelMatrix=n.IDENTITY,this._lineCommand.modelMatrix=this._modelMatrix,this._lineCommand.boundingVolume=r.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:o,ShaderProgram:r,BufferUsage:a,IndexDatatype:s,VertexArray:l,ComponentDatatype:c,BoundingSphere:u,DrawCommand:d,PrimitiveType:h,Pass:p,Matrix4:v}=Cesium,b=this,y=this._subSegmentH*this._segmentH,E=this._subSegmentV*this._segmentV,x=sd(this._fovH,this._fovV,y,E),g=sd(this._fovH,this._fovV,y,E),w=dy(y,E),O=hy(this._segmentH,this._segmentV,this._subSegmentH,this._subSegmentV),I=i.getDefaultRenderState(!0,!1,void 0),R=n.fromCache(I),D=t.webgl2,M=new o({sources:[`
        // \u4F7F\u7528double\u7C7B\u578B\u7684position\u8FDB\u884C\u8BA1\u7B97
        // attribute vec3 position3DHigh;
        // attribute vec3 position3DLow;
        ${D?"in":"attribute"} vec3 position;
        ${D?"in":"attribute"} vec3 normal;
        // attribute vec2 st;
        // attribute float batchId;
        ${D?"out":"varying"} vec3 v_positionEC;
        ${D?"out":"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);
          }
        `]}),k=new o({sources:[`
        ${D?"in":"varying"} vec3 v_positionEC;
        ${D?"in":"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
          ${D?"out_FragColor":"gl_FragColor"} = vec4(material.diffuse + material.emission, material.alpha);
          #else
          ${D?"out_FragColor":"gl_FragColor"} = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
          #endif
        }
        `]}),$={vcColor:function(){return b._faceColor}},V={vcColor:function(){return b._lineColor}},m=r.fromCache({context:t,vertexShaderSource:M,fragmentShaderSource:k,attributeLocations:uy});this._shaderprogram=m;const f=Cesium.Buffer.createVertexBuffer({context:t,typedArray:x,usage:a.STATIC_DRAW}),C=Cesium.Buffer.createVertexBuffer({context:t,typedArray:g,usage:a.STATIC_DRAW}),T=Cesium.Buffer.createIndexBuffer({context:t,typedArray:w,usage:a.STATIC_DRAW,indexDatatype:s.UNSIGNED_SHORT}),_=Cesium.Buffer.createIndexBuffer({context:t,typedArray:O,usage:a.STATIC_DRAW,indexDatatype:s.UNSIGNED_SHORT}),P=new l({context:t,attributes:[{index:0,vertexBuffer:f,componentsPerAttribute:3,componentDatatype:c.FLOAT},{index:1,vertexBuffer:C,componentsPerAttribute:3,componentDatatype:c.FLOAT}],indexBuffer:T}),A=new l({context:t,attributes:[{index:0,vertexBuffer:f,componentsPerAttribute:3,componentDatatype:c.FLOAT},{index:1,vertexBuffer:C,componentsPerAttribute:3,componentDatatype:c.FLOAT}],indexBuffer:_});this._initBoundingSphere=u.fromVertices(x),this._command=new d({vertexArray:P,primitiveType:h.TRIANGLES,renderState:R,shaderProgram:m,uniformMap:$,owner:this,pass:p.TRANSLUCENT,modelMatrix:new v,boundingVolume:new u,cull:!0}),this._lineCommand=new d({vertexArray:A,primitiveType:h.LINES,renderState:R,shaderProgram:m,uniformMap:V,owner:this,pass:p.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)}}X("DebugCameraPrimitive",rd);function sd(e,t,i,n){const o=new Float32Array((i+1)*(n+1)*3+3);for(let r=0;r<i+1;r++)for(let a=0;a<n+1;a++){const s=e*(r/i-.5),l=t*(a/n-.5),c=[Math.cos(-s)*Math.cos(-l),Math.sin(-s)*Math.cos(-l),Math.sin(l)];o[3*(a*(i+1)+r)+0]=c[0],o[3*(a*(i+1)+r)+1]=c[1],o[3*(a*(i+1)+r)+2]=c[2]}return o[(i+1)*(n+1)*3+0]=0,o[(i+1)*(n+1)*3+1]=0,o[(i+1)*(n+1)*3+2]=0,o}function dy(e,t){const i=e*t*6,n=new Uint16Array(i);for(let o=0;o<e;o++)for(let r=0;r<t;r++){const a=r*(1+e)+o,s=r*(1+e)+o+1,l=(r+1)*(1+e)+o,c=(r+1)*(1+e)+o+1,u=6*(r*e+o);n[0+u]=a,n[1+u]=s,n[2+u]=c,n[3+u]=a,n[4+u]=c,n[5+u]=l}return n}function hy(e,t,i,n){const o=e*i,r=t*n,a=new Uint16Array((e+1)*(2*r)+(t+1)*(2*o)+8);for(let c=0;c<e+1;c++)for(let u=0;u<r;u++){const d=c*i;a[2*(c*r+u)+0]=u*(1+o)+d,a[2*(c*r+u)+1]=(u+1)*(1+o)+d}const s=(e+1)*(2*r);for(let c=0;c<t;c++)for(let u=0;u<o;u++){const d=c*n;a[s+2*(u+c*o)]=d*(1+o)+u,a[s+2*(u+c*o)+1]=d*(1+o)+u+1}const l=(e+1)*(2*r)+(t+1)*(2*o);return a[l]=0,a[l+1]=(1+o)*(1+r),a[l+2]=o,a[l+3]=(1+o)*(1+r),a[l+4]=(1+o)*r,a[l+5]=(1+o)*(1+r),a[l+6]=(1+o)*(1+r)-1,a[l+7]=(1+o)*(1+r),a}function fl(e,t,i,n,o,r){if(o-n<=i)return;const a=n+o>>1;ld(e,t,a,n,o,r%2),fl(e,t,i,n,a-1,r+1),fl(e,t,i,a+1,o,r+1)}function ld(e,t,i,n,o,r){for(;o>n;){if(o-n>600){const c=o-n+1,u=i-n+1,d=Math.log(c),h=.5*Math.exp(2*d/3),p=.5*Math.sqrt(d*h*(c-h)/c)*(u-c/2<0?-1:1),v=Math.max(n,Math.floor(i-u*h/c+p)),b=Math.min(o,Math.floor(i+(c-u)*h/c+p));ld(e,t,i,v,b,r)}const a=t[2*i+r];let s=n,l=o;for(ea(e,t,n,i),t[2*o+r]>a&&ea(e,t,n,o);s<l;){for(ea(e,t,s,l),s++,l--;t[2*s+r]<a;)s++;for(;t[2*l+r]>a;)l--}t[2*n+r]===a?ea(e,t,n,l):(l++,ea(e,t,l,o)),l<=i&&(n=l+1),i<=l&&(o=l-1)}}function ea(e,t,i,n){gl(e,i,n),gl(t,2*i,2*n),gl(t,2*i+1,2*n+1)}function gl(e,t,i){const n=e[t];e[t]=e[i],e[i]=n}function my(e,t,i,n,o,r,a){const s=[0,e.length-1,0],l=[];let c,u;for(;s.length;){const d=s.pop(),h=s.pop(),p=s.pop();if(h-p<=a){for(let y=p;y<=h;y++)c=t[2*y],u=t[2*y+1],c>=i&&c<=o&&u>=n&&u<=r&&l.push(e[y]);continue}const v=Math.floor((p+h)/2);c=t[2*v],u=t[2*v+1],c>=i&&c<=o&&u>=n&&u<=r&&l.push(e[v]);const b=(d+1)%2;(d===0?i<=c:n<=u)&&(s.push(p),s.push(v-1),s.push(b)),(d===0?o>=c:r>=u)&&(s.push(v+1),s.push(h),s.push(b))}return l}function py(e,t,i,n,o,r){const a=[0,e.length-1,0],s=[],l=o*o;for(;a.length;){const c=a.pop(),u=a.pop(),d=a.pop();if(u-d<=r){for(let y=d;y<=u;y++)cd(t[2*y],t[2*y+1],i,n)<=l&&s.push(e[y]);continue}const h=Math.floor((d+u)/2),p=t[2*h],v=t[2*h+1];cd(p,v,i,n)<=l&&s.push(e[h]);const b=(c+1)%2;(c===0?i-o<=p:n-o<=v)&&(a.push(d),a.push(h-1),a.push(b)),(c===0?i+o>=p:n+o>=v)&&(a.push(h+1),a.push(u),a.push(b))}return s}function cd(e,t,i,n){const o=e-i,r=t-n;return o*o+r*r}const vy=e=>e[0],fy=e=>e[1];class gy{constructor(t,i=vy,n=fy,o=64,r=Float64Array){this.nodeSize=o,this.points=t;const a=t.length<65536?Uint16Array:Uint32Array,s=this.ids=new a(t.length),l=this.coords=new r(t.length*2);for(let c=0;c<t.length;c++)s[c]=c,l[2*c]=i(t[c]),l[2*c+1]=n(t[c]);fl(s,l,o,0,s.length-1,0)}range(t,i,n,o){return my(this.ids,this.coords,t,i,n,o,this.nodeSize)}within(t,i,n){return py(this.ids,this.coords,t,i,n,this.nodeSize)}}class ud{constructor(t){t=oi(t,{}),this._enabled=oi(t.enabled,!1),this._pixelRange=oi(t.pixelRange,80),this._minimumClusterSize=oi(t.minimumClusterSize,2),this._clusterBillboards=oi(t.clusterBillboards,!0),this._clusterLabels=oi(t.clusterLabels,!0),this._clusterPoints=oi(t.clusterPoints,!0),this._labelCollection=void 0,this._billboardCollection=void 0,this._pointCollection=void 0,this._clusterBillboardCollection=void 0,this._clusterLabelCollection=void 0,this._clusterPointCollection=void 0,this._collectionIndicesByEntity={},this._unusedLabelIndices=[],this._unusedBillboardIndices=[],this._unusedPointIndices=[],this._previousClusters=[],this._previousHeight=void 0,this._enabledDirty=!1,this._clusterDirty=!1,this._cluster=void 0,this._removeEventListener=void 0,this._clusterEvent=new Cesium.Event,this.show=oi(t.show,!0)}_initialize(t){this._scene=t;const i=_y(this);this._cluster=i,this._removeEventListener=t.camera.changed.addEventListener(i)}get enabled(){return this._enabled}set enabled(t){this._enabledDirty=t!==this._enabled,this._enabled=t}get pixelRange(){return this._pixelRange}set pixelRange(t){this._clusterDirty=this._clusterDirty||t!==this._pixelRange,this._pixelRange=t}get minimumClusterSize(){return this._minimumClusterSize}set minimumClusterSize(t){this._clusterDirty=this._clusterDirty||t!==this._minimumClusterSize,this._minimumClusterSize=t}get clusterEvent(){return this._clusterEvent}get clusterBillboards(){return this._clusterBillboards}set clusterBillboards(t){this._clusterDirty=this._clusterDirty||t!==this._clusterBillboards,this._clusterBillboards=t}get clusterLabels(){return this._clusterLabels}set clusterLabels(t){this._clusterDirty=this._clusterDirty||t!==this._clusterLabels,this._clusterLabels=t}get clusterPoints(){return this._clusterPoints}set clusterPoints(t){this._clusterDirty=this._clusterDirty||t!==this._clusterPoints,this._clusterPoints=t}getLabel(t){return bl.call(this,t,"_labelCollection",Cesium.LabelCollection,"_unusedLabelIndices","labelIndex")}removeLabel(t){const{defined:i}=Cesium,n=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[t.id];if(!i(this._labelCollection)||!i(n)||!i(n.labelIndex))return;const o=n.labelIndex;n.labelIndex=void 0,Cl(this,t.id);const r=this._labelCollection.get(o);r.show=!1,r.text="",r.id=void 0,this._unusedLabelIndices.push(o),this._clusterDirty=!0}getBillboard(t){return bl.call(this,t,"_billboardCollection",Cesium.BillboardCollection,"_unusedBillboardIndices","billboardIndex")}removeBillboard(t){const{defined:i}=Cesium,n=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[t.id];if(!i(this._billboardCollection)||!i(n)||!i(n.billboardIndex))return;const o=n.billboardIndex;n.billboardIndex=void 0,Cl(this,t.id);const r=this._billboardCollection.get(o);r.id=void 0,r.show=!1,r.image=void 0,this._unusedBillboardIndices.push(o),this._clusterDirty=!0}getPoint(t){return bl.call(this,t,"_pointCollection",Cesium.PointPrimitiveCollection,"_unusedPointIndices","pointIndex")}removePoint(t){const{defined:i}=Cesium,n=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[t.id];if(!i(this._pointCollection)||!i(n)||!i(n.pointIndex))return;const o=n.pointIndex;n.pointIndex=void 0,Cl(this,t.id);const r=this._pointCollection.get(o);r.show=!1,r.id=void 0,this._unusedPointIndices.push(o),this._clusterDirty=!0}update(t){if(!this.show)return;const{defined:i}=Cesium;let n;i(this._labelCollection)&&this._labelCollection.length>0&&this._labelCollection.get(0)._glyphs.length===0&&(n=t.commandList,t.commandList=[],this._labelCollection.update(t),t.commandList=n),i(this._billboardCollection)&&this._billboardCollection.length>0&&!i(this._billboardCollection.get(0).width)&&(n=t.commandList,t.commandList=[],this._billboardCollection.update(t),t.commandList=n),this._enabledDirty&&(this._enabledDirty=!1,yy(this),this._clusterDirty=!0),this._clusterDirty&&(this._clusterDirty=!1,this._cluster()),i(this._clusterLabelCollection)&&this._clusterLabelCollection.update(t),i(this._clusterBillboardCollection)&&this._clusterBillboardCollection.update(t),i(this._clusterPointCollection)&&this._clusterPointCollection.update(t),i(this._labelCollection)&&this._labelCollection.update(t),i(this._billboardCollection)&&this._billboardCollection.update(t),i(this._pointCollection)&&this._pointCollection.update(t)}destroy(){const{defined:t}=Cesium;this._labelCollection=this._labelCollection&&this._labelCollection.destroy(),this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),this._pointCollection=this._pointCollection&&this._pointCollection.destroy(),this._clusterLabelCollection=this._clusterLabelCollection&&this._clusterLabelCollection.destroy(),this._clusterBillboardCollection=this._clusterBillboardCollection&&this._clusterBillboardCollection.destroy(),this._clusterPointCollection=this._clusterPointCollection&&this._clusterPointCollection.destroy(),t(this._removeEventListener)&&(this._removeEventListener(),this._removeEventListener=void 0),this._labelCollection=void 0,this._billboardCollection=void 0,this._pointCollection=void 0,this._clusterBillboardCollection=void 0,this._clusterLabelCollection=void 0,this._clusterPointCollection=void 0,this._collectionIndicesByEntity=void 0,this._unusedLabelIndices=[],this._unusedBillboardIndices=[],this._unusedPointIndices=[],this._previousClusters=[],this._previousHeight=void 0,this._enabledDirty=!1,this._pixelRangeDirty=!1,this._minimumClusterSizeDirty=!1}}X("PrimitiveCluster",ud);function yy(e){if(e.enabled)return;const{defined:t}=Cesium;t(e._clusterLabelCollection)&&e._clusterLabelCollection.destroy(),t(e._clusterBillboardCollection)&&e._clusterBillboardCollection.destroy(),t(e._clusterPointCollection)&&e._clusterPointCollection.destroy(),e._clusterLabelCollection=void 0,e._clusterBillboardCollection=void 0,e._clusterPointCollection=void 0,yl(e._labelCollection),yl(e._billboardCollection),yl(e._pointCollection)}function yl(e){const{defined:t}=Cesium;if(!t(e))return;const i=e.length;for(let n=0;n<i;++n)e.get(n).clusterShow=!0}function bl(e,t,i,n,o){const{defined:r}=Cesium;let a=this[t];r(this._collectionIndicesByEntity)||(this._collectionIndicesByEntity={});let s=this._collectionIndicesByEntity[e.id];if(r(s)||(s=this._collectionIndicesByEntity[e.id]={billboardIndex:void 0,labelIndex:void 0,pointIndex:void 0}),r(a)&&r(s[o]))return a.get(s[o]);r(a)||(a=this[t]=new i({scene:this._scene}));let l,c;const u=this[n];u.length>0?(l=u.pop(),c=a.get(l)):(c=a.add(),l=a.length-1),s[o]=l;const d=this;return Promise.resolve().then(function(){d._clusterDirty=!0}),c}function Cl(e,t){const{defined:i}=Cesium,n=e._collectionIndicesByEntity[t];!i(n.billboardIndex)&&!i(n.labelIndex)&&!i(n.pointIndex)&&delete e._collectionIndicesByEntity[t]}function by(e){return e.coord.x}function Cy(e){return e.coord.y}function dd(e,t){e.x-=t,e.y-=t,e.width+=t*2,e.height+=t*2}function hd(e,t,i,n,o){const{defined:r,Label:a,Billboard:s,PointPrimitive:l,BoundingRectangle:c}=Cesium,u=new c;if(r(e._labelCollection)&&n._clusterLabels?o=a.getScreenSpaceBoundingBox(e,t,o):r(e._billboardCollection)&&n._clusterBillboards?o=s.getScreenSpaceBoundingBox(e,t,o):r(e._pointPrimitiveCollection)&&n._clusterPoints&&(o=l.getScreenSpaceBoundingBox(e,t,o)),dd(o,i),n._clusterLabels&&!r(e._labelCollection)&&r(e.id)&&pd(n,e.id.id)&&r(e.id._label)){const d=n._collectionIndicesByEntity[e.id.id].labelIndex,h=n._labelCollection.get(d),p=a.getScreenSpaceBoundingBox(h,t,u);dd(p,i),o=c.union(o,p,o)}return o}function wy(e,t){const{defined:i}=Cesium;if(e.clusterShow=!0,!i(e._labelCollection)&&i(e.id)&&pd(t,e.id.id)&&i(e.id._label)){const n=t._collectionIndicesByEntity[e.id.id].labelIndex,o=t._labelCollection.get(n);o.clusterShow=!0}}function md(e,t,i,n){const o={billboard:n._clusterBillboardCollection.add(),label:n._clusterLabelCollection.add(),point:n._clusterPointCollection.add()};o.billboard.show=!1,o.point.show=!1,o.label.show=!0,o.label.text=t.toLocaleString(),o.label.id=i,o.billboard.position=o.label.position=o.point.position=e,o.billboard.owner=n,o.label.owner=n,o.point.owner=n,n._clusterEvent.raiseEvent(i,o)}function pd(e,t){const{defined:i}=Cesium;return i(e)&&i(e._collectionIndicesByEntity[t])&&i(e._collectionIndicesByEntity[t].labelIndex)}function wl(e,t,i,n,o){const{defined:r,SceneMode:a}=Cesium;if(!r(e))return;const s=e.length;for(let l=0;l<s;++l){const c=e.get(l);if(c.clusterShow=!1,!c.show||o._scene.mode===a.SCENE3D&&!n.isPointVisible(c.position))continue;const u=c.computeScreenSpacePosition(i);r(u)&&t.push({index:l,collection:e,clustered:!1,coord:u})}}function _y(e){const{defined:t,LabelCollection:i,BillboardCollection:n,PointPrimitiveCollection:o,Billboard:r,Matrix4:a,Cartesian3:s,Cartesian2:l,BoundingRectangle:c}=Cesium,u=new c,d=new c,h=new c;return function(p){if(t(p)&&p<.05||!e.enabled)return;const v=e._scene,b=e._labelCollection,y=e._billboardCollection,E=e._pointCollection;if(!t(b)&&!t(y)&&!t(E)||!e._clusterBillboards&&!e._clusterLabels&&!e._clusterPoints)return;let x=e._clusterLabelCollection,g=e._clusterBillboardCollection,w=e._clusterPointCollection;t(x)?x.removeAll():x=e._clusterLabelCollection=new i({scene:v}),t(g)?g.removeAll():g=e._clusterBillboardCollection=new n({scene:v}),t(w)?w.removeAll():w=e._clusterPointCollection=new o;const O=e._pixelRange,I=e._minimumClusterSize,R=e._previousClusters,D=[],M=e._previousHeight,k=v.camera.positionCartographic.height,$=v.mapProjection.ellipsoid,V=v.camera.positionWC,m=new Cesium.EllipsoidalOccluder($,V),f=[];e._clusterLabels&&wl(b,f,v,m,e),e._clusterBillboards&&wl(y,f,v,m,e),e._clusterPoints&&wl(E,f,v,m,e);let C,T,_,P,A,L,B,F,q,Z,H,N;const j=new gy(f,by,Cy,64,Int32Array);if(k<M)for(_=R.length,C=0;C<_;++C){const G=R[C];if(!m.isPointVisible(G.position))continue;const J=r._computeScreenSpacePosition(a.IDENTITY,G.position,s.ZERO,l.ZERO,v);if(!t(J))continue;const U=1-k/M;let z=G.width=G.width*U,K=G.height=G.height*U;z=Math.max(z,G.minimumWidth),K=Math.max(K,G.minimumHeight);const Q=J.x-z*.5,ie=J.y-K*.5,Y=J.x+z,oe=J.y+K;for(A=j.range(Q,ie,Y,oe),L=A.length,Z=0,q=[],T=0;T<L;++T)B=A[T],F=f[B],F.clustered||(++Z,H=F.collection,N=F.index,q.push(H.get(N).id));if(Z>=I)for(md(G.position,Z,q,e),D.push(G),T=0;T<L;++T)f[A[T]].clustered=!0}for(_=f.length,C=0;C<_;++C){const G=f[C];if(G.clustered)continue;G.clustered=!0,H=G.collection,N=G.index;const J=H.get(N);P=hd(J,G.coord,O,e,u);const U=c.clone(P,d);A=j.range(P.x,P.y,P.x+P.width,P.y+P.height),L=A.length;const z=s.clone(J.position);for(Z=1,q=[J.id],T=0;T<L;++T)if(B=A[T],F=f[B],!F.clustered){const K=F.collection.get(F.index),Q=hd(K,F.coord,O,e,h);s.add(K.position,z,z),c.union(U,Q,U),++Z,q.push(K.id)}if(Z>=I){const K=s.multiplyByScalar(z,1/Z,z);for(md(K,Z,q,e),D.push({position:K,width:U.width,height:U.height,minimumWidth:P.width,minimumHeight:P.height}),T=0;T<L;++T)f[A[T]].clustered=!0}else wy(J,e)}x.length===0&&(x.destroy(),e._clusterLabelCollection=void 0),g.length===0&&(g.destroy(),e._clusterBillboardCollection=void 0),w.length===0&&(w.destroy(),e._clusterPointCollection=void 0),e._previousClusters=D,e._previousHeight=k}}let ar=!1;class vd{static extend(t){if(ar)return;const{Rectangle:i}=Cesium;i.prototype.expand=function(n,o,r){return r=r&&r instanceof i?r:this.clone(),n=r.width*(1-n)/2,o=r.height*(1-o)/2,r.west+=n,r.south+=o,r.east-=n,r.north-=o,r.west=r.west<-Math.PI?-Math.PI:r.west,r.east=r.east>Math.PI?Math.PI:r.east,r.north=r.north>Math.PI/2?Math.PI/2:r.north,r.south=r.south<-Math.PI/2?-Math.PI/2:r.south,r},ar=!0}static revoke(t){if(!ar)return;const{Rectangle:i}=Cesium;i.prototype.expand=void 0,ar=!1}}X("RectangleExtend",vd);let rr=!1,_l;class fd{static extend(t){if(rr)return;const i=Cesium.ShadowMapShader;_l=i.createShadowReceiveFragmentShader,i.createShadowReceiveFragmentShader=function(n,o,r,a,s){var l;if(n=_l.bind(this)(n,o,r,a,s),o._isSpotLight){n.sources[0]=`
          uniform vec4 shadowMap_viewshedVisibleColor;
          uniform vec4 shadowMap_viewshedInvisibleColor;
          ${n.sources[0]}
        `;const c=(l=t.scene.context)==null?void 0:l.webgl2;n.sources[n.sources.length-1]=n.sources[n.sources.length-1].replace(`${c?"out_FragColor":"gl_FragColor"}.rgb *= visibility;`,`
          float _depth = shadowPosition.z - shadowParameters.depthBias;
          float _visibility = czm_shadowDepthCompare(shadowMap_texture, shadowPosition.xy, _depth);
          ${c?"out_FragColor":"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; }")}return n},rr=!0}static revoke(t){if(!rr)return;const i=Cesium.ShadowMapShader;i.createShadowReceiveFragmentShader=_l,rr=!1}}X("ShadowMapShaderExtend",fd);class gd{constructor(t,i){const{defined:n,DeveloperError:o,PerspectiveFrustum:r,Math:a,Camera:s,ShadowMap:l,ShadowMode:c,Event:u,Cartesian3:d,defaultValue:h,Color:p}=Cesium;if(!n(t))throw new o("scene is required.");this._scene=t,this._frustum=new r,this._frustum.fov=a.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 rd({}),this._enabledChangedEvent=new u,this._position=new d,this._offsetHeight=h(i.offsetHeight,1.8),this._visibleColor=h(i.visibleColor,new p(0,1,0,1)),this._invisibleColor=h(i.invisibleColor,new p(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=h(i.lineColor,new p(1,1,1,.4)),this._debugCameraPrimitive.faceColor=h(i.faceColor,new p(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:o,Math:r}=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 a=this._debugCameraPrimitive.modelMatrix;o.clone(this._spotLightCamera.inverseViewMatrix,a);const s=n.fromRotationZ(.5*r.PI),l=n.fromRotationY(.5*r.PI),c=new n;n.multiply(s,l,c),o.multiplyByMatrix3(a,c,a),o.multiplyByUniformScale(a,this._spotLightCamera.frustum.far,a);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,o=Cesium.Cartographic.fromCartesian(i,this._scene.globe.ellipsoid);if(o){o.height=o.height+n;const r=Cesium.Cartesian3.fromRadians(o.longitude,o.latitude,o.height,this._scene.globe.ellipsoid);t.destination=r}}this._spotLightCamera.setView(t)}isDestroyed(){return!1}destroy(){this._debugCameraPrimitive&&this._debugCameraPrimitive.destroy(),this._viewshedShadowMap&&this._viewshedShadowMap.destroy(),Cesium.destroyObject(this)}}X("Viewshed",gd);class Ey{constructor(t,i,n){this._color=t,this._height=i,this._base=Cesium.defaultValue(n,0)}getHeight(){return this._height}getBase(){return this._base}getStartTime(){return this._start}getStopTime(){return this._stop}setRange(t,i){this._start=t,this._stop=i}render(t){let i="";const{JulianDate:n}=Cesium;if(this._start&&this._stop&&this._color){const o=n.secondsDifference(this._start,t.epochJulian);let r=Math.round(t.timeBarWidth*t.getAlpha(o));const a=n.secondsDifference(this._stop,t.epochJulian);let s=Math.round(t.timeBarWidth*t.getAlpha(a))-r;r<0&&(s+=r,r=0),r+s>t.timeBarWidth&&(s=t.timeBarWidth-r),s>0&&(i=`<span class="cesium-timeline-highlight" style="left: ${r.toString()}px; width: ${s.toString()}px; bottom: ${this._base.toString()}px; height: ${this._height}px; background-color: ${this._color};"></span>`)}return i}}class Py{constructor(t,i,n,o){const{Color:r}=Cesium;this.interval=t,this.height=i,this.color=n||new r(.5,.5,.5,1),this.backgroundColor=o||new r(0,0,0,0)}render(t,i){const{JulianDate:n,defined:o}=Cesium,r=this.interval.start,a=this.interval.stop,s=i.startJulian,l=n.addSeconds(i.startJulian,i.duration,new n);if(n.lessThan(r,s)&&n.greaterThan(a,l))t.fillStyle=this.color.toCssColorString(),t.fillRect(0,i.y,i.timeBarWidth,this.height);else if(n.lessThanOrEquals(r,l)&&n.greaterThanOrEquals(a,s)){let c,u,d;for(c=0;c<i.timeBarWidth;++c){const h=n.addSeconds(i.startJulian,c/i.timeBarWidth*i.duration,new n);!o(u)&&n.greaterThanOrEquals(h,r)?u=c:!o(d)&&n.greaterThanOrEquals(h,a)&&(d=c)}t.fillStyle=this.backgroundColor.toCssColorString(),t.fillRect(0,i.y,i.timeBarWidth,this.height),o(u)&&(o(d)||(d=i.timeBarWidth),t.fillStyle=this.color.toCssColorString(),t.fillRect(u,i.y,Math.max(d-u,1),this.height))}}}let El=1e12;const xi={none:0,scrub:1,slide:2,zoom:3,touchOnly:4},ei={none:0,scrub:1,slideZoom:2,singleTap:3,ignore:4},pn=[.001,.002,.005,.01,.02,.05,.1,.25,.5,1,2,5,10,15,30,60,120,300,600,900,1800,3600,7200,14400,21600,43200,86400,172800,345600,604800,1296e3,2592e3,5184e3,7776e3,15552e3,31536e3,63072e3,126144e3,15768e4,31536e4,63072e4,126144e4,15768e5,31536e5,63072e5,126144e5,15768e6,31536e6],xy=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];class Oy{constructor(t,i){this.smallestTicInPixels=7;const{defined:n,DeveloperError:o}=Cesium;if(!n(t))throw new o("container is required.");if(!n(i))throw new o("clock is required.");t=zu(t);const r=t.ownerDocument;this.container=t;const a=r.createElement("div");a.className="cesium-timeline-main",t.appendChild(a),this._topDiv=a,this._endJulian=void 0,this._epochJulian=void 0,this._lastXPos=void 0,this._scrubElement=void 0,this._startJulian=void 0,this._timeBarSecondsSpan=void 0,this._clock=i,this._scrubJulian=i.currentTime,this._mainTicSpan=-1,this._mouseMode=xi.none,this._touchMode=ei.none,this._touchState={centerX:0,spanX:0},this._mouseX=0,this._timelineDrag=0,this._timelineDragLocation=void 0,this._lastHeight=void 0,this._lastWidth=void 0,this._topDiv.innerHTML='<div class="cesium-timeline-bar"></div><div class="cesium-timeline-trackContainer"><canvas class="cesium-timeline-tracks" width="10" height="1"></canvas></div><div class="cesium-timeline-needle"></div><span class="cesium-timeline-ruler"></span>',this._timeBarEle=this._topDiv.childNodes[0],this._trackContainer=this._topDiv.childNodes[1],this._trackListEle=this._topDiv.childNodes[1].childNodes[0],this._needleEle=this._topDiv.childNodes[2],this._rulerEle=this._topDiv.childNodes[3],this._context=this._trackListEle.getContext("2d"),this._trackList=[],this._highlightRanges=[],this.zoomTo(i.startTime,i.stopTime),this._onMouseDown=My(this),this._onMouseUp=Sy(this),this._onMouseMove=Ty(this),this._onMouseWheel=Iy(this),this._onTouchStart=Ay(this),this._onTouchMove=By(this),this._onTouchEnd=Dy(this);const s=this._timeBarEle;r.addEventListener("mouseup",this._onMouseUp,!1),r.addEventListener("mousemove",this._onMouseMove,!1),s.addEventListener("mousedown",this._onMouseDown,!1),s.addEventListener("DOMMouseScroll",this._onMouseWheel,!1),s.addEventListener("mousewheel",this._onMouseWheel,!1),s.addEventListener("touchstart",this._onTouchStart,!1),s.addEventListener("touchmove",this._onTouchMove,!1),s.addEventListener("touchend",this._onTouchEnd,!1),s.addEventListener("touchcancel",this._onTouchEnd,!1),this._topDiv.oncontextmenu=function(){return!1},i.onTick.addEventListener(this.updateFromClock,this),this.updateFromClock()}addEventListener(t,i,n){this._topDiv.addEventListener(t,i,n)}removeEventListener(t,i,n){this._topDiv.removeEventListener(t,i,n)}isDestroyed(){return!1}destroy(){this._clock.onTick.removeEventListener(this.updateFromClock,this);const t=this.container.ownerDocument;t.removeEventListener("mouseup",this._onMouseUp,!1),t.removeEventListener("mousemove",this._onMouseMove,!1);const i=this._timeBarEle;i.removeEventListener("mousedown",this._onMouseDown,!1),i.removeEventListener("DOMMouseScroll",this._onMouseWheel,!1),i.removeEventListener("mousewheel",this._onMouseWheel,!1),i.removeEventListener("touchstart",this._onTouchStart,!1),i.removeEventListener("touchmove",this._onTouchMove,!1),i.removeEventListener("touchend",this._onTouchEnd,!1),i.removeEventListener("touchcancel",this._onTouchEnd,!1),this.container.removeChild(this._topDiv),Cesium.destroyObject(this)}addHighlightRange(t,i,n){const o=new Ey(t,i,n);return this._highlightRanges.push(o),this.resize(),o}addTrack(t,i,n,o){const r=new Py(t,i,n,o);return this._trackList.push(r),this._lastHeight=void 0,this.resize(),r}resize(){const t=this.container.clientWidth,i=this.container.clientHeight;if(t===this._lastWidth&&i===this._lastHeight)return;this._trackContainer.style.height=`${i}px`;let n=1;this._trackList.forEach(function(o){n+=o.height}),this._trackListEle.style.height=`${n.toString()}px`,this._trackListEle.width=this._trackListEle.clientWidth,this._trackListEle.height=n,this._makeTics(),this._lastXPos=void 0,this._lastWidth=t,this._lastHeight=i}zoomTo(t,i){const{defined:n,JulianDate:o,DeveloperError:r,ClockRange:a}=Cesium;if(!n(t))throw new r("startTime is required.");if(!n(i))throw new r("stopTime is required");if(o.lessThanOrEquals(i,t))throw new r("Start time must come before end time.");if(this._startJulian=t,this._endJulian=i,this._timeBarSecondsSpan=o.secondsDifference(i,t),this._clock&&this._clock.clockRange!==a.UNBOUNDED){const l=this._clock.startTime,c=this._clock.stopTime,u=o.secondsDifference(c,l),d=o.secondsDifference(l,this._startJulian),h=o.secondsDifference(c,this._endJulian);this._timeBarSecondsSpan>=u?(this._timeBarSecondsSpan=u,this._startJulian=this._clock.startTime,this._endJulian=this._clock.stopTime):d>0?(this._endJulian=o.addSeconds(this._endJulian,d,new o),this._startJulian=l,this._timeBarSecondsSpan=o.secondsDifference(this._endJulian,this._startJulian)):h<0&&(this._startJulian=o.addSeconds(this._startJulian,h,new o),this._endJulian=c,this._timeBarSecondsSpan=o.secondsDifference(this._endJulian,this._startJulian))}this._makeTics();const s=new Event("setzoom",{bubbles:!0,cancelable:!0,composed:!0});s.startJulian=this._startJulian,s.endJulian=this._endJulian,s.epochJulian=this._epochJulian,s.totalSpan=this._timeBarSecondsSpan,s.mainTicSpan=this._mainTicSpan,this._topDiv.dispatchEvent(s)}updateFromClock(){const{defined:t,JulianDate:i}=Cesium;this._scrubJulian=this._clock.currentTime;const n=this._scrubElement;if(t(this._scrubElement)){const o=i.secondsDifference(this._scrubJulian,this._startJulian),r=Math.round(o*this._topDiv.clientWidth/this._timeBarSecondsSpan);this._lastXPos!==r&&(this._lastXPos=r,n.style.left=`${r-8}px`,this._needleEle.style.left=`${r}px`)}t(this._timelineDragLocation)&&(this._setTimeBarTime(this._timelineDragLocation,this._timelineDragLocation*this._timeBarSecondsSpan/this._topDiv.clientWidth),this.zoomTo(i.addSeconds(this._startJulian,this._timelineDrag,new i),i.addSeconds(this._endJulian,this._timelineDrag,new i)))}_setTimeBarTime(t,i){const{JulianDate:n}=Cesium;if(t=Math.round(t),this._scrubJulian=n.addSeconds(this._startJulian,i,new n),this._scrubElement){const r=t-8;this._scrubElement.style.left=`${r.toString()}px`,this._needleEle.style.left=`${t.toString()}px`}const o=new Event("settime",{bubbles:!0,cancelable:!0,composed:!0});o.clientX=t,o.timeSeconds=i,o.timeJulian=this._scrubJulian,o.clock=this._clock,this._topDiv.dispatchEvent(o)}zoomFrom(t){const{JulianDate:i}=Cesium;let n=i.secondsDifference(this._scrubJulian,this._startJulian);t>1||n<0||n>this._timeBarSecondsSpan?n=this._timeBarSecondsSpan*.5:n+=n-this._timeBarSecondsSpan*.5;const o=this._timeBarSecondsSpan-n;this.zoomTo(i.addSeconds(this._startJulian,n-n*t,new i),i.addSeconds(this._endJulian,o*t-o,new i))}makeLabel(t){const{JulianDate:i}=Cesium,n=i.toGregorianDate(t),o=n.millisecond;let r=" UTC";if(o>0&&this._timeBarSecondsSpan<3600){for(r=Math.floor(o).toString();r.length<3;)r=`0${r}`;r=`.${r}`}return`${xy[n.month-1]} ${n.day} ${n.year} ${Pl(n.hour)}:${Pl(n.minute)}:${Pl(n.second)}${r}`}_makeTics(){const{JulianDate:t}=Cesium,i=this._timeBarEle,n=t.secondsDifference(this._scrubJulian,this._startJulian),o=Math.round(n*this._topDiv.clientWidth/this._timeBarSecondsSpan),r=o-8;let a;const s=this;this._needleEle.style.left=`${o.toString()}px`;let l="";const c=.01,u=31536e6,d=1e-10;let h=0,p=this._timeBarSecondsSpan;p<c?(p=c,this._timeBarSecondsSpan=c,this._endJulian=t.addSeconds(this._startJulian,c,new t)):p>u&&(p=u,this._timeBarSecondsSpan=u,this._endJulian=t.addSeconds(this._startJulian,u,new t));let v=this._timeBarEle.clientWidth;v<10&&(v=10);const b=this._startJulian,y=Math.min(p/v*1e-5,.4);let E;const x=t.toGregorianDate(b);p>31536e4?E=t.fromDate(new Date(Date.UTC(Math.floor(x.year/100)*100,0))):p>31536e3?E=t.fromDate(new Date(Date.UTC(Math.floor(x.year/10)*10,0))):p>86400?E=t.fromDate(new Date(Date.UTC(x.year,0))):E=t.fromDate(new Date(Date.UTC(x.year,x.month,x.day)));const g=t.secondsDifference(this._startJulian,t.addSeconds(E,y,new t));let w=g+p;this._epochJulian=E;function O(F){return Math.floor(g/F)*F}function I(F,q){return Math.ceil(F/q+.5)*q}function R(F){return(F-g)/p}function D(F,q){return F-q*Math.round(F/q)}this._rulerEle.innerHTML=this.makeLabel(t.addSeconds(this._endJulian,-c,new t));let M=this._rulerEle.offsetWidth+20;M<30&&(M=180);const k=h;h-=d;const $={startTime:g,startJulian:b,epochJulian:E,duration:p,timeBarWidth:v,getAlpha:R};this._highlightRanges.forEach(function(F){l+=F.render($)});let V=0,m=0,f=0,C=M/v;C>1&&(C=1),C*=this._timeBarSecondsSpan;let T=-1,_=-1;const P=pn.length;let A;for(A=0;A<P;++A){const F=pn[A];if(++T,V=F,F>C&&F>h)break;_<0&&v*(F/this._timeBarSecondsSpan)>=this.smallestTicInPixels&&(_=T)}if(T>0){for(;T>0;)if(--T,Math.abs(D(V,pn[T]))<1e-5){pn[T]>=h&&(m=pn[T]);break}if(_>=0)for(;_<T;){if(Math.abs(D(m,pn[_]))<1e-5&&pn[_]>=h){f=pn[_];break}++_}}h=k,h>d&&f<1e-5&&Math.abs(h-V)>d&&(f=h,h<=V+d&&(m=0));let L=-999999,B;if(v*(f/this._timeBarSecondsSpan)>=3)for(a=O(f);a<=w;a=I(a,f))l+=`<span class="cesium-timeline-ticTiny" style="left: ${Math.round(v*R(a)).toString()}px;"></span>`;if(v*(m/this._timeBarSecondsSpan)>=3)for(a=O(m);a<=w;a=I(a,m))l+=`<span class="cesium-timeline-ticSub" style="left: ${Math.round(v*R(a)).toString()}px;"></span>`;if(v*(V/this._timeBarSecondsSpan)>=2){this._mainTicSpan=V,w+=V,a=O(V);const F=t.computeTaiMinusUtc(E);for(;a<=w;){let q=t.addSeconds(b,a-g,new t);if(V>2.1){const j=t.computeTaiMinusUtc(q);Math.abs(j-F)>.1&&(a+=j-F,q=t.addSeconds(b,a-g,new t))}const Z=Math.round(v*R(a)),H=this.makeLabel(q);this._rulerEle.innerHTML=H,B=this._rulerEle.offsetWidth,B<10&&(B=M);const N=Z-(B/2-1);N>L?(L=N+B+5,l+=`<span class="cesium-timeline-ticMain" style="left: ${Z.toString()}px;"></span><span class="cesium-timeline-ticLabel" style="left: ${N.toString()}px;">${H}</span>`):l+=`<span class="cesium-timeline-ticSub" style="left: ${Z.toString()}px;"></span>`,a=I(a,V)}}else this._mainTicSpan=-1;l+=`<span class="cesium-timeline-icon16" style="left:${r}px;bottom:0;background-position: 0 0;"></span>`,i.innerHTML=l,this._scrubElement=i.lastChild,this._context.clearRect(0,0,this._trackListEle.width,this._trackListEle.height),$.y=0,this._trackList.forEach(function(F){F.render(s._context,$),$.y+=F.height})}}X("VcTimeline",Oy);function My(e){return function(t){e._mouseMode!==xi.touchOnly&&(t.button===0?(e._mouseMode=xi.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition="-16px 0"),e._onMouseMove(t)):(e._mouseX=t.clientX,t.button===2?e._mouseMode=xi.zoom:e._mouseMode=xi.slide)),t.preventDefault()}}function Sy(e){return function(t){e._mouseMode=xi.none,e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0"),e._timelineDrag=0,e._timelineDragLocation=void 0}}function Ty(e){return function(t){let i;if(e._mouseMode===xi.scrub){t.preventDefault();const n=t.clientX-e._topDiv.getBoundingClientRect().left;n<0?(e._timelineDragLocation=0,e._timelineDrag=-.01*e._timeBarSecondsSpan):n>e._topDiv.clientWidth?(e._timelineDragLocation=e._topDiv.clientWidth,e._timelineDrag=.01*e._timeBarSecondsSpan):(e._timelineDragLocation=void 0,e._setTimeBarTime(n,n*e._timeBarSecondsSpan/e._topDiv.clientWidth))}else if(e._mouseMode===xi.slide){if(i=e._mouseX-t.clientX,e._mouseX=t.clientX,i!==0){const{JulianDate:n}=Cesium,o=i*e._timeBarSecondsSpan/e._topDiv.clientWidth;e.zoomTo(n.addSeconds(e._startJulian,o,new n),n.addSeconds(e._endJulian,o,new n))}}else e._mouseMode===xi.zoom&&(i=e._mouseX-t.clientX,e._mouseX=t.clientX,i!==0&&e.zoomFrom(Math.pow(1.01,i)))}}function Iy(e){return function(t){let i=t.wheelDeltaY||t.wheelDelta||-t.detail;El=Math.max(Math.min(Math.abs(i),El),1),i/=El,e.zoomFrom(Math.pow(1.05,-i))}}function Ay(e){return function(t){const i=t.touches.length;let n,o;const r=e._topDiv.getBoundingClientRect().left;t.preventDefault(),e._mouseMode=xi.touchOnly,i===1?(n=Cesium.JulianDate.secondsDifference(e._scrubJulian,e._startJulian),o=Math.round(n*e._topDiv.clientWidth/e._timeBarSecondsSpan+r),Math.abs(t.touches[0].clientX-o)<50?(e._touchMode=ei.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition=i===1?"-16px 0":"0 0")):(e._touchMode=ei.singleTap,e._touchState.centerX=t.touches[0].clientX-r)):i===2?(e._touchMode=ei.slideZoom,e._touchState.centerX=(t.touches[0].clientX+t.touches[1].clientX)*.5-r,e._touchState.spanX=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):e._touchMode=ei.ignore}}function Dy(e){return function(t){const i=t.touches.length,n=e._topDiv.getBoundingClientRect().left;e._touchMode===ei.singleTap?(e._touchMode=ei.scrub,e._onTouchMove(t)):e._touchMode===ei.scrub&&e._onTouchMove(t),e._mouseMode=xi.touchOnly,i!==1?e._touchMode=i>0?ei.ignore:ei.none:e._touchMode===ei.slideZoom&&(e._touchState.centerX=t.touches[0].clientX-n),e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0")}}function By(e){return function(t){let i,n,o,r,a,s,l=1;const c=e._topDiv.getBoundingClientRect().left;if(e._touchMode===ei.singleTap&&(e._touchMode=ei.slideZoom),e._mouseMode=xi.touchOnly,e._touchMode===ei.scrub)t.preventDefault(),t.changedTouches.length===1&&(n=t.changedTouches[0].clientX-c,n>=0&&n<=e._topDiv.clientWidth&&e._setTimeBarTime(n,n*e._timeBarSecondsSpan/e._topDiv.clientWidth));else if(e._touchMode===ei.slideZoom){o=t.touches.length,o===2?(r=(t.touches[0].clientX+t.touches[1].clientX)*.5-c,a=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):o===1&&(r=t.touches[0].clientX-c,a=0);const{defined:u,JulianDate:d}=Cesium;u(r)&&(a>0&&e._touchState.spanX>0?(l=e._touchState.spanX/a,s=d.addSeconds(e._startJulian,(e._touchState.centerX*e._timeBarSecondsSpan-r*e._timeBarSecondsSpan*l)/e._topDiv.clientWidth,new d)):(i=e._touchState.centerX-r,s=d.addSeconds(e._startJulian,i*e._timeBarSecondsSpan/e._topDiv.clientWidth,new d)),e.zoomTo(s,d.addSeconds(s,e._timeBarSecondsSpan*l,new d)),e._touchState.centerX=r,e._touchState.spanX=a)}}}function Pl(e){return e<10?`0${e.toString()}`:e.toString()}const yd=[vd,fd,iu];function Ly(){return{invokeExtensions:e=>{yd.forEach(t=>{t.extend(e)})},revokeExtensions:e=>{yd.forEach(t=>{t.revoke(e)})}}}const jy=X("viewerProps",ry);function Fy(e,t,i){let n,o;const r=new Promise((_,P)=>{n=_,o=P}),a=te(),s=te(!1),l=Qr(),{emit:c}=t,u=Oa(),d=Do(i);i.mounted=!1,i.vcMitt=l,i.cesiumClass="Viewer",i.children=[];const h=Ks(e,i),p=xe({toolbarContainerRC:void 0,timelineContainerRC:void 0,animationContainerRC:void 0,bottomContainerRC:void 0});let v=[];d.debug("viewer creating");const{t:b}=_t(),{invokeExtensions:y,revokeExtensions:E}=Ly();he(()=>e.selectionIndicator,_=>{const{viewer:P,viewerElement:A}=i,{defined:L,SelectionIndicator:B}=Cesium;let F;if(L(P.selectionIndicator)&&!P.selectionIndicator.isDestroyed()&&!_)F=P.selectionIndicator.container,A==null||A.removeChild(F),P.selectionIndicator.destroy(),P._selectionIndicator=void 0;else if(!L(P.selectionIndicator)||P.selectionIndicator.isDestroyed()){F=document.createElement("div"),F.className="cesium-viewer-selectionIndicatorContainer",A==null||A.appendChild(F);const q=new B(F,P.scene);P._selectionIndicator=q}P.viewerWidgetResized.raiseEvent({type:"selectionIndicator",status:_?"added":"removed",target:F})}),he(()=>e.infoBox,_=>{var P,A;const{viewer:L,viewerElement:B}=i,{defined:F,InfoBox:q}=Cesium,Z=["cameraClicked","closeClicked"];let H;if(F(L.infoBox)&&!L.infoBox.isDestroyed()&&!_){const N=L.infoBox.viewModel;N&&h.bindEvents(N,Z,!1),H=L.infoBox.container,B==null||B.removeChild(H),L.infoBox.destroy(),L._infoBox=void 0}else if(!F(L.infoBox)||L.infoBox.isDestroyed()){H=document.createElement("div"),H.className="cesium-viewer-infoBoxContainer",B==null||B.appendChild(H);const N=new q(H),j=N.viewModel;L._onInfoBoxCameraClicked&&((P=L._eventHelper)==null||P.add(j.cameraClicked,L._onInfoBoxCameraClicked,L)),L._onInfoBoxClockClicked&&((A=L._eventHelper)==null||A.add(j.closeClicked,L._onInfoBoxClockClicked,L)),j&&h.bindEvents(j,Z,!0),L._infoBox=N}L.forceResize(),L.viewerWidgetResized.raiseEvent({type:"infoBox",status:_?"added":"removed",target:H})}),he(()=>e.geocoder,_=>{var P;const{viewer:A}=i,L=A._toolbar,{defined:B,Geocoder:F}=Cesium;let q;if(B(A.geocoder)&&!A.geocoder.isDestroyed()&&!_)q=A.geocoder.container,L==null||L.removeChild(q),A.geocoder.destroy(),A._geocoder=void 0;else if(!B(A.geocoder)||A.geocoder.isDestroyed()){q=document.createElement("div"),q.className="cesium-viewer-geocoderContainer",L==null||L.appendChild(q);const Z=new F({container:q,geocoderServices:B(e.geocoder)&&typeof e.geocoder!="boolean"?Array.isArray(e.geocoder)?e.geocoder:[e.geocoder]:void 0,scene:A.scene});A._clearObjects&&((P=A._eventHelper)==null||P.add(Z.viewModel.search.beforeExecute,A._clearObjects,A)),A._geocoder=Z,C(L)}A.viewerWidgetResized.raiseEvent({type:"geocoder",status:_?"added":"removed",target:q})}),he(()=>e.homeButton,_=>{var P,A;const{viewer:L}=i,B=L._toolbar,{defined:F,HomeButton:q}=Cesium;if(F(L.homeButton)&&!L.homeButton.isDestroyed()&&!_)L.homeButton.destroy(),L._homeButton=void 0;else if(!F(L.homeButton)||L.homeButton.isDestroyed()){const Z=new q(B,L.scene);F(L.geocoder)&&((P=L._eventHelper)==null||P.add(Z.viewModel.command.afterExecute,function(){const H=L.geocoder.viewModel;H.searchText="",H.isSearchInProgress&&H.search()})),L._clearTrackedObject&&((A=L._eventHelper)==null||A.add(Z.viewModel.command.beforeExecute,L._clearTrackedObject,L)),L._homeButton=Z,C(B)}L.viewerWidgetResized.raiseEvent({type:"homeButton",status:_?"added":"removed",target:B})}),he(()=>e.sceneModePicker,_=>{const{viewer:P}=i,A=P._toolbar,{defined:L,DeveloperError:B,SceneModePicker:F}=Cesium;if(L(P.sceneModePicker)&&!P.sceneModePicker.isDestroyed()&&!_)P.sceneModePicker.destroy(),P._sceneModePicker=void 0;else if(!L(P.sceneModePicker)||P.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 q=new F(A,P.scene);P._sceneModePicker=q,C(A)}}P.viewerWidgetResized.raiseEvent({type:"sceneModePicker",status:_?"added":"removed",target:A})}),he(()=>e.projectionPicker,_=>{const{viewer:P}=i,A=P._toolbar,{defined:L,ProjectionPicker:B}=Cesium;if(L(P.projectionPicker)&&!P.projectionPicker.isDestroyed()&&!_)P.projectionPicker.destroy(),P._projectionPicker=void 0;else if(!L(P.projectionPicker)||P.projectionPicker.isDestroyed()){const F=new B(A,P.scene);P._projectionPicker=F,C(A)}P.viewerWidgetResized.raiseEvent({type:"projectionPicker",status:_?"added":"removed",target:A})}),he(()=>e.baseLayerPicker,async _=>{const{viewer:P}=i,A=P._toolbar,{defined:L,buildModuleUrl:B,DeveloperError:F,defaultValue:q,createDefaultImageryProviderViewModels:Z,createDefaultTerrainProviderViewModels:H,BaseLayerPicker:N}=Cesium;if(L(P.baseLayerPicker)&&!P.baseLayerPicker.isDestroyed()&&!_){P.baseLayerPicker.destroy(),P._baseLayerPicker=void 0,P.imageryLayers.remove(P.imageryLayers.get(P.imageryLayers.length-1));const j=B("Assets/Textures/NaturalEarthII"),G=P.imageryLayers.addImageryProvider(rn(Cesium.VERSION,"1.104")?await Cesium.TileMapServiceImageryProvider.fromUrl(j):new Cesium.TileMapServiceImageryProvider({url:j}));P.imageryLayers.lowerToBottom(G)}else if(!L(P.baseLayerPicker)||P.baseLayerPicker.isDestroyed()){const j=(!Cesium.defined(P.scene.globe)||e.globe!==!1)&&(!Cesium.defined(P.baseLayerPicker)||e.baseLayerPicker!==!1);if(j&&L(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(!j&&L(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(j&&L(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(!j&&L(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(j){const G=q(e.imageryProviderViewModels,Z()),J=q(e.terrainProviderViewModels,H()),U=new N(A,{globe:P.scene.globe,imageryProviderViewModels:G,selectedImageryProviderViewModel:G[0],terrainProviderViewModels:J,selectedTerrainProviderViewModel:J[0]}),z=A==null?void 0:A.getElementsByClassName("cesium-baseLayerPicker-dropDown"),K=z==null?void 0:z[0];P._baseLayerPickerDropDown=K,P._baseLayerPicker=U,P.imageryLayers.raiseToTop(P.imageryLayers.get(0)),C(A)}}P.viewerWidgetResized.raiseEvent({type:"baseLayerPicker",status:_?"added":"removed",target:A})}),he(()=>e.navigationHelpButton,_=>{const{viewer:P}=i,A=P._toolbar,{defined:L,defaultValue:B,NavigationHelpButton:F}=Cesium;if(L(P.navigationHelpButton)&&!P.navigationHelpButton.isDestroyed()&&!_)P.navigationHelpButton.destroy(),P._navigationHelpButton=void 0;else if(!L(P.navigationHelpButton)||P.navigationHelpButton.isDestroyed()){let q=!0;try{if(L(window.localStorage)){const H=window.localStorage.getItem("cesium-hasSeenNavHelp");L(H)&&H?q=!1:window.localStorage.setItem("cesium-hasSeenNavHelp","true")}}catch(H){}const Z=new F({container:A,instructionsInitiallyVisible:B(e.navigationInstructionsInitiallyVisible,q)});P._navigationHelpButton=Z,C(A)}P.viewerWidgetResized.raiseEvent({type:"navigationHelpButton",status:_?"added":"removed",target:A})}),he(()=>e.animation,_=>{const{viewer:P,viewerElement:A}=i,{defined:L,Animation:B,AnimationViewModel:F}=Cesium;let q;if(L(P.animation)&&!P.animation.isDestroyed()&&!_)q=P.animation.container,A==null||A.removeChild(q),P.animation.destroy(),P._animation=void 0;else if(!L(P.animation)||P.animation.isDestroyed()){q=document.createElement("div"),q.className="cesium-viewer-animationContainer",A==null||A.appendChild(q);const Z=new B(q,new F(P.clockViewModel));Z.viewModel.dateFormatter=$,Z.viewModel.timeFormatter=V,P._animation=Z}P.forceResize(),P.viewerWidgetResized.raiseEvent({type:"animation",status:_?"added":"removed",target:q})}),he(()=>e.timeline,_=>{var P;const{viewer:A,viewerElement:L}=i,{defined:B,Timeline:F}=Cesium;let q;if(B(A.timeline)&&!A.timeline.isDestroyed()&&!_)q=A.timeline.container,L==null||L.removeChild(q),A.timeline.destroy(),A._timeline=void 0;else if(!B(A.timeline)||A.timeline.isDestroyed()){q=document.createElement("div"),q.className="cesium-viewer-timelineContainer",L==null||L.appendChild(q);const Z=new F(q,A.clock);Z.makeLabel=H=>$(H),(P=Z.addEventListener)==null||P.call(Z,"settime",m,!1),Z.zoomTo(A.clock.startTime,A.clock.stopTime),A._timeline=Z}A.forceResize(),A.viewerWidgetResized.raiseEvent({type:"timeline",status:_?"added":"removed",target:q})}),he(()=>e.fullscreenButton,_=>{const{viewer:P,viewerElement:A}=i,{defined:L,FullscreenButton:B}=Cesium;let F;if(L(P.fullscreenButton)&&!P.fullscreenButton.isDestroyed()&&!_)F=P.fullscreenButton.container,A==null||A.removeChild(F),P.fullscreenButton.destroy(),P._fullscreenButton=void 0;else if(!L(P.fullscreenButton)||P.fullscreenButton.isDestroyed()){F=document.createElement("div"),F.className="cesium-viewer-fullscreenContainer",A==null||A.appendChild(F);const q=new B(F,A);P._fullscreenButton=q}P.forceResize(),P.viewerWidgetResized.raiseEvent({type:"fullscreenButton",status:_?"added":"removed",target:F})}),he(()=>e.fullscreenElement,_=>{const{viewer:P}=i,{defined:A}=Cesium;A(P.fullscreenButton)&&A(_)&&(P.fullscreenButton.viewModel.fullscreenElement=_)}),he(()=>e.vrButton,_=>{const{viewer:P,viewerElement:A}=i,{defined:L,VRButton:B}=Cesium;let F;if(L(P.vrButton)&&!P.vrButton.isDestroyed()&&!_)F=P.vrButton.container,A==null||A.removeChild(F),P.vrButton.destroy(),P._vrButton=void 0;else if(!L(P.vrButton)||P.vrButton.isDestroyed()){F=document.createElement("div"),F.className="cesium-viewer-vrContainer",A==null||A.appendChild(F);const q=new B(F,P.scene,A),Z=q.viewModel.command;q.viewModel._command=function(H){Z(),f(P,H.isVRMode)},P._vrButton=q}P.forceResize(),P.viewerWidgetResized.raiseEvent({type:"fullscreenButton",status:_?"added":"removed",target:F})}),he(()=>e.useDefaultRenderLoop,_=>{i.viewer.useDefaultRenderLoop=_}),he(()=>e.sceneMode,_=>{const{SceneMode:P}=Cesium;(P.COLUMBUS_VIEW===_||P.MORPHING===_||P.SCENE2D===_||P.SCENE3D===_)&&(i.viewer.scene.mode=_)}),he(()=>e.shouldAnimate,_=>{i.viewer.clock.shouldAnimate=_}),he(()=>e.terrainExaggeration,_=>{i.viewer._terrainExaggeration=_}),he(()=>e.shadows,_=>{i.viewer.scene.shadowMap.enabled=_}),he(()=>e.terrainProvider,_=>{_&&(i.viewer.terrainProvider=_)}),he(()=>e.camera,_=>{os(i.viewer,_)},{deep:!0}),he(()=>e.imageryProvider,(_,P)=>{const{viewer:A}=i,{defined:L}=Cesium;if(L(_)){for(let B=0;B<A.imageryLayers.length;B++)A.imageryLayers.get(B).imageryProvider===P&&A.imageryLayers.remove(A.imageryLayers[B]);_&&A.imageryLayers.addImageryProvider(_)}}),he(()=>e.showCredit,_=>{const{viewer:P}=i;P.cesiumWidget.creditContainer.style.display=_?"inline":"none",P.viewerWidgetResized.raiseEvent({type:"credit",status:_?"added":"removed",target:P.cesiumWidget.creditContainer})}),he(()=>e.debugShowFramesPerSecond,_=>{const{viewer:P}=i;P.scene.debugShowFramesPerSecond=_});const x=async function(){d.debug("beforeLoad - viewer"),Se(i,"beforeLoad")&&c("beforeLoad",i),u.value.__scriptPromise=u.value.__scriptPromise||I(),await u.value.__scriptPromise},g=async function(){var _,P,A;if(d.debug("loading-viewer"),i.mounted||(await x(),typeof Cesium=="undefined"))return!1;const{Ion:L,buildModuleUrl:B,ImageryLayer:F,TileMapServiceImageryProvider:q,Viewer:Z,defined:H,Math:N,Event:j}=Cesium,G=e.accessToken?e.accessToken:u.value.accessToken;L.defaultAccessToken=G;const J=B("Assets/Textures/NaturalEarthII"),U={};e&&Object.keys(e).forEach(Q=>{e[Q]===void 0||e[Q]===null||(U[Q]=e[Q])}),U.fullscreenElement=Ao(U.fullscreenElement)?ve(a):U.fullscreenElement,rn(Cesium.VERSION,"1.104")?U.baseLayer=Ao(U.baseLayer)?F.fromProviderAsync(q.fromUrl(J),{}):U.baseLayer:U.imageryProvider=Ao(U.imageryProvider)?new q({url:J}):U.imageryProvider;let z;e.viewerCreator?z=e.viewerCreator(i,ve(a),U):globalThis.mars3d?(i.map=new mars3d.Map(ve(a).id,{scene:U,control:U}),z=(_=i.map)==null?void 0:_._viewer):globalThis.DC?(i.dcViewer=new DC.Viewer(ve(a).id,U),z=(P=i.dcViewer)==null?void 0:P.delegate):globalThis.XE?(i.earth=new globalThis.XE.Earth(ve(a),U),z=(A=i.earth)==null?void 0:A.czm.viewer):z=new Z(ve(a),U),y(z),i.Cesium=Cesium,i.viewer=z,i.viewerElement=z._element,i.mounted=!0,rn(Cesium.VERSION,"1.83")&&(z.scene.globe.terrainExaggeration=U.terrainExaggeration),H(U.camera)&&os(z,U.camera),Se(i,"update:camera")&&z.camera.changed.addEventListener(()=>{const Q=z.camera.positionCartographic;let ie;Ue(U.camera.position,"lng")?ie={position:{lng:N.toDegrees(Q.longitude),lat:N.toDegrees(Q.latitude),height:Q.height},heading:N.toDegrees(z.camera.heading||360),pitch:N.toDegrees(z.camera.pitch||-90),roll:N.toDegrees(z.camera.roll||0)}:ie={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",ie)}),H(z.animation)&&(z.animation.viewModel.dateFormatter=$,z.animation.viewModel.timeFormatter=V),H(z.timeline)&&(z.timeline.makeLabel=Q=>$(Q),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 j,z.viewerWidgetResized.addEventListener(M),z.imageryLayers.layerAdded.addEventListener(k),h.registerEvents(!0);const K={Cesium,viewer:z,vm:i};return globalThis.XE?Object.assign(K,{earth:i.earth}):globalThis.mars3d?Object.assign(K,{map:i.map}):globalThis.DC&&Object.assign(K,{dcViewer:i.dcViewer}),Se(i,"ready")&&c("ready",K),l==null||l.emit("ready",K),Be(()=>{z.resize(),M({type:"viewer",status:"added",target:z.container}),s.value=!0}),d.debug("loaded-viewer"),Object.assign(i.proxy,{cesiumObject:z}),K},w=async function(){if(!i.mounted)return!1;d.debug("viewer---unloading");let _;u.value.__viewerUnloadingPromise=new Promise((q,Z)=>{_=q});for(let q=0;q<i.children.length;q++)await i.children[q].proxy.unload();i.children.length=0;const{viewer:P,earth:A,map:L,dcViewer:B}=i;globalThis.Cesium&&(P.imageryLayers.layerAdded.removeEventListener(k),h.registerEvents(!1));const{removeCesiumScript:F}=e;if(P._vcPickScreenSpaceEventHandler&&P._vcPickScreenSpaceEventHandler.destroy(),P._vcViewerScreenSpaceEventHandler&&P._vcViewerScreenSpaceEventHandler.destroy(),P._vcPickScreenSpaceEventHandler=void 0,P._vcViewerScreenSpaceEventHandler=void 0,F&&E(P),delete i.appContext.config.globalProperties.$VueCesium[P.container.id],globalThis.XE?A&&A.destroy():globalThis.mars3d?L&&L.destroy():globalThis.DC?B&&B.destroy():P&&P.destroy(),i.viewer=void 0,i.mounted=!1,F&&globalThis.Cesium){const q=document.getElementsByTagName("script"),Z=[];for(const N of q)N.src.indexOf("/Cesium.js")>-1&&Z.push(N),N.src.indexOf("/Workers/zlib.min.js")>-1&&Z.push(N),globalThis.XE&&(N.src.indexOf("/rxjs.umd.min.js")>-1&&Z.push(N),N.src.indexOf("/XbsjCesium.js")>-1&&Z.push(N),N.src.indexOf("/viewerCesiumNavigationMixin.js")>-1&&Z.push(N),N.src.indexOf("/XbsjEarth.js")>-1&&Z.push(N)),v.includes(N.src)&&!Z.includes(N)&&Z.push(N);const H=document.getElementsByTagName("link");for(const N of H)N.href.includes("Widgets/widgets.css")&&!Z.includes(N)&&Z.push(N),v.includes(N.href)&&!Z.includes(N)&&Z.push(N);Z.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 i.isUnmounted=!1,Se(i,"destroyed")&&c("destroyed",i),l.emit("destroyed",i),d.debug("viewer---unloaded"),_(!0),u.value.__viewerUnloadingPromise=void 0,s.value=!1,!0},O=function(){return w().then(()=>g())},I=async function(){if(d.debug("getCesiumScript"),globalThis.Cesium)return Promise.resolve(globalThis.Cesium);{const _=e.cesiumPath?e.cesiumPath:u.value.cesiumPath,P=bg(_),A=u.value.mars3dConfig||e.mars3dConfig;if(A){const F=A.libs||sy(),q=(A.include||"mars3d").trim().split(","),Z={};for(let H=0,N=q.length;H<N;H++){const j=q[H];Z[j]||(Z[j]=!0,v.push(...F[j]))}}else _.includes("/dc.base.min.js")?(v.push(_),v.push(_.replace("/dc.base.min.js","/dc.core.min.js")),v.push(_.replace("/dc.base.min.js","/dc.core.min.js").replace("/dc.core.min.js","/dc.core.min.css"))):_.includes("/XbsjEarth.js")?v.push(_):(v.push(_),v.push(`${P}/Widgets/widgets.css`));const L=v;if(A){const F=v.find(q=>q.includes("Cesium.js"));await R(F),L.splice(L.indexOf(F),1)}const B=[];return L.forEach(F=>{new RegExp("\\.css").test(F)?B.push(D(F)):B.push(R(F))}),Promise.all(B).then(()=>{if(globalThis.Cesium)return Se(i,"cesiumReady")&&c("cesiumReady",globalThis.Cesium),globalThis.Cesium;if(globalThis.XE)return globalThis.XE.ready().then(()=>(Se(i,"cesiumReady")&&c("cesiumReady",globalThis.Cesium),globalThis.Cesium));if(globalThis.DC)return globalThis.DC.use(globalThis.DcCore.default||globalThis.DcCore),globalThis.DC.baseUrl=`${P}/resources/`,globalThis.DC.ready(()=>(globalThis.Cesium=DC.Namespace.Cesium,Se(i,"cesiumReady")&&c("cesiumReady",globalThis.DC),globalThis.Cesium)),globalThis.Cesium;o(new Error("VueCesium ERROR: Error loading CesiumJS!"))})}},R=_=>{const P=document.createElement("script");return P.async=!1,P.src=_,document.body.appendChild(P),new Promise((A,L)=>{P.onload=()=>{A(!0)}})},D=_=>{const P=document.createElement("link");return P.rel="stylesheet",P.href=_,document.head.appendChild(P),new Promise((A,L)=>{P.onload=()=>{A(!0)}})},M=_=>{var P,A;const{viewer:L}=i,B=L._toolbar;B!==void 0&&getComputedStyle(B).visibility!=="hidden"&&getComputedStyle(B).display!=="none"?p.toolbarContainerRC=B.getBoundingClientRect():p.toolbarContainerRC=void 0;const F=L.bottomContainer;F!==void 0&&getComputedStyle(F).visibility!=="hidden"&&getComputedStyle(F).display!=="none"?p.bottomContainerRC=F.getBoundingClientRect():p.bottomContainerRC=void 0;const q=(P=L.timeline)==null?void 0:P.container;q!==void 0&&getComputedStyle(q).visibility!=="hidden"&&getComputedStyle(q).display!=="none"?p.timelineContainerRC=q.getBoundingClientRect():p.timelineContainerRC=void 0;const Z=(A=L.animation)==null?void 0:A.container;Z!==void 0&&getComputedStyle(Z).visibility!=="hidden"&&getComputedStyle(Z).display!=="none"?p.animationContainerRC=Z.getBoundingClientRect():p.animationContainerRC=void 0,L.resize(),Se(i,"viewerWidgetResized")&&c("viewerWidgetResized",_)},k=_=>{const P=i.viewer,{autoSortImageryLayers:A}=e;P.baseLayerPicker&&P.imageryLayers.raiseToTop(_);const{defined:L}=Cesium;A&&(_.sortOrder=L(_.sortOrder)?_.sortOrder:9999,P.imageryLayers._layers.sort((B,F)=>B.sortOrder-F.sortOrder),P.imageryLayers._update())},$=function(_,P,A){const{JulianDate:L}=Cesium;let B;if(e.UTCOffset){_=L.addMinutes(_,e.UTCOffset,new L);const H=new Date().getTimezoneOffset()-e.UTCOffset;B=H===0?"UTC":"UTC+"+-(H/60)}else B=new Date().getTimezoneOffset()===0?"UTC":"UTC+"+-(new Date().getTimezoneOffset()/60);const F=L.toDate(_),q=F.toLocaleString(b("name"),{hour:"numeric",minute:"numeric",second:"numeric",hour12:!1}).replace(/,/g,""),Z=F.toLocaleString(b("name"),{year:"numeric",month:"short",day:"numeric"}).replace(/,/g,"");return!A&&(P||F.getHours()+F.getMinutes()===0)?Z:(e.TZCode&&(B=e.TZCode),A?`${q} ${B}`:`${Z} ${q} ${B}`)},V=function(_,P){return $(_,P,!0)},m=function(_){const P=_.clock;P.currentTime=_.timeJulian,P.shouldAnimate=!1},f=function(_,P){const A=_._geocoder,L=_._homeButton,B=_._sceneModePicker,F=_._projectionPicker,q=_._baseLayerPicker,Z=_._animation,H=_._timeline,N=_._fullscreenButton,j=_._infoBox,G=_._selectionIndicator,J=P?"hidden":"visible",{defined:U}=Cesium;if(U(A)&&(A.container.style.visibility=J),U(L)&&(L.container.style.visibility=J),U(B)&&(B.container.style.visibility=J),U(F)&&(F.container.style.visibility=J),U(q)&&(q.container.style.visibility=J),U(Z)&&(Z.container.style.visibility=J),U(H)&&(H.container.style.visibility=J),U(N)&&N.viewModel.isFullscreenEnabled&&(N.container.style.visibility=J),U(j)&&(j.container.style.visibility=J),U(G)&&(G.container.style.visibility=J),_._container){const z=P||!U(N)?0:N.container.clientWidth;_._vrButton.container.style.right=z+"px",_.forceResize()}},C=function(_,P){Array.prototype.slice.call(_.children).forEach(L=>{switch(L.className){case"cesium-viewer-geocoderContainer":L.customIndex=1;break;case"cesium-button cesium-toolbar-button cesium-home-button":L.customIndex=2;break;case"cesium-sceneModePicker-wrapper cesium-toolbar-button":L.customIndex=3;break;case"cesium-projectionPicker-wrapper cesium-toolbar-button":L.customIndex=4;break;case"cesium-button cesium-toolbar-button":case"cesium-baseLayerPicker-dropDown":L.customIndex=5;break;case"cesium-navigationHelpButton-wrapper":L.customIndex=6;break}});const A=[];Array.prototype.slice.call(_.children).forEach(L=>{A.push(L)}),A.sort(function(L,B){return L.customIndex-B.customIndex});for(let L=0;L<A.length;L++)_.appendChild(A[L])},T=function(){return Mn({},{get layout(){return p},get vm(){return i},get Cesium(){return i.Cesium},get viewer(){return i.viewer},get dataSources(){var _;return(_=i.viewer)==null?void 0:_.dataSources},get entities(){var _;return(_=i.viewer)==null?void 0:_.entities},get imageryLayers(){var _;return(_=i.viewer)==null?void 0:_.imageryLayers},get primitives(){var _;return(_=i.viewer)==null?void 0:_.scene.primitives},get groundPrimitives(){var _;return(_=i.viewer)==null?void 0:_.scene.groundPrimitives},get postProcessStages(){var _;return(_=i.viewer)==null?void 0:_.postProcessStages},get creatingPromise(){return r},get mars3dMap(){return i.map},get dcViewer(){return i.dcViewer},get earth(){return i.earth}})};return Object.defineProperties(i,{cesiumObject:{enumerable:!0,get:()=>i.viewer}}),Jn(async()=>{var _;try{d.debug("viewer - onMounted"),await((_=u.value)==null?void 0:_.__viewerUnloadingPromise),g().then(P=>{n(P)}).catch(P=>{c("unready",P),o(P)})}catch(P){c("unready",P),o(P)}}),Ke(()=>{d.debug("viewer - onUnmounted"),w().then(()=>{l.all.clear()})}),{isReady:s,load:g,unload:w,reload:O,getServices:T,viewerRef:a,creatingPromise:r}}const bd=[{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"]}],ky=el.map(e=>Hr(e)),Ry=["beforeLoad","cesiumReady","ready","destroyed","update:camera","viewerWidgetResized",...el,...ky,...Nu];bd.reduce((e,t)=>e.concat(t.events),Ry);const xl={xs:18,sm:24,md:32,lg:38,xl:46},Cd={size:String};function wd(e,t=xl){return re(()=>e.size!==void 0?{fontSize:e.size in t?`${t[e.size]}px`:e.size}:null)}function Xe(e,t){return e!==void 0?e():t}function Oi(e,t){return e!==void 0?t.concat(e()):t}function _d(e,t,i,n,o,r){t.key=n+o;const a=S(e,t,i);return o===!0?Gr(a,r()):a}const Vy=X("iconProps",{...Cd,tag:{type:String,default:"i"},name:String,color:String,hoverColor:String,left:Boolean,right:Boolean});var ao=ee({name:"VcIcon",props:Vy,setup(e,{slots:t}){const i=wd(e),n=re(()=>{const a=i.value;if(a)return e.color&&(a.color=e.color),e.hoverColor&&(a["--hover-color"]=e.hoverColor),a}),o=re(()=>"vc-icon"+(e.left===!0?" on-left":"")+(e.right===!0?" on-right":"")+(e.color!==void 0?` text-${e.color}`:"")),r=re(()=>{let a,s=e.name;if(!s)return{none:!0,cls:o.value};if(s.startsWith("M")===!0){const[c,u]=s.split("|");return{svg:!0,cls:o.value,nodes:c.split("&&").map(d=>{const[h,p,v]=d.split("@@");return S("path",{style:p,d:h,transform:v})}),viewBox:u!==void 0?u:"0 0 24 24"}}if(s.startsWith("img:")===!0)return{img:!0,cls:o.value,src:s.substring(4)};if(s.startsWith("svguse:")===!0){const[c,u]=s.split("|");return{svguse:!0,cls:o.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?a=s:s.startsWith("bt-")===!0?a=`bt ${s}`:s.startsWith("eva-")===!0?a=`eva ${s}`:/^ion-(md|ios|logo)/.test(s)===!0?a=`ionicons ${s}`:s.startsWith("ion-")===!0?a=`ionicons ion-md${s.substr(3)}`:s.startsWith("mdi-")===!0?a=`mdi ${s}`:s.startsWith("iconfont ")===!0?a=`${s}`:s.startsWith("ti-")===!0?a=`themify-icon ${s}`:s.startsWith("vc-")===!0?a=`vc-icons ${s}`:(a="notranslate material-icons",s.startsWith("o_")===!0?(s=s.substring(2),a+="-outlined"):s.startsWith("r_")===!0?(s=s.substring(2),a+="-round"):s.startsWith("s_")===!0&&(s=s.substring(2),a+="-sharp"),l=s),{cls:a+" "+o.value,content:l}});return()=>{const a={class:r.value.cls,style:n.value,"aria-hidden":"true",role:"presentation",viewBox:"",src:""};return r.value.none===!0?S(e.tag,a,Xe(t.default)):r.value.img===!0?(a.src=r.value.src,a.style&&(a.style.width=a.style.fontSize,a.style.height=a.style.fontSize),S("img",a)):r.value.svg===!0?(a.viewBox=r.value.viewBox,a["aria-hidden"]="true",a.style&&(a.style.width=a.style.fontSize,a.style.height=a.style.fontSize),S("svg",a,Oi(t.default,r.value.nodes))):r.value.svguse===!0?(a.viewBox=r.value.viewBox,a["aria-hidden"]="true",a.style&&(a.style.width=a.style.fontSize,a.style.height=a.style.fontSize),S("svg",a,Oi(t.default,[S("use",{"xlink:href":r.value.src})]))):S(e.tag,a,Oi(t.default,[r.value.content]))}}});const Mi={size:{type:[Number,String],default:"1em"},color:String};function Si(e){return{cSize:re(()=>e.size in xl?`${xl[e.size]}px`:e.size),classes:re(()=>"vc-spinner"+(e.color?` text-${e.color}`:""))}}const $y=[S("g",{transform:"translate(1 1)","stroke-width":"2",fill:"none","fill-rule":"evenodd"},[S("circle",{cx:"5",cy:"50",r:"5"},[S("animate",{attributeName:"cy",begin:"0s",dur:"2.2s",values:"50;5;50;50",calcMode:"linear",repeatCount:"indefinite"}),S("animate",{attributeName:"cx",begin:"0s",dur:"2.2s",values:"5;27;49;5",calcMode:"linear",repeatCount:"indefinite"})]),S("circle",{cx:"27",cy:"5",r:"5"},[S("animate",{attributeName:"cy",begin:"0s",dur:"2.2s",from:"5",to:"5",values:"5;50;50;5",calcMode:"linear",repeatCount:"indefinite"}),S("animate",{attributeName:"cx",begin:"0s",dur:"2.2s",from:"27",to:"27",values:"27;49;5;27",calcMode:"linear",repeatCount:"indefinite"})]),S("circle",{cx:"49",cy:"50",r:"5"},[S("animate",{attributeName:"cy",begin:"0s",dur:"2.2s",values:"50;50;5;50",calcMode:"linear",repeatCount:"indefinite"}),S("animate",{attributeName:"cx",from:"49",to:"49",begin:"0s",dur:"2.2s",values:"49;5;27;49",calcMode:"linear",repeatCount:"indefinite"})])])];var Ed=X("SpinnerBall",ee({name:"VcSpinnerBall",props:Mi,setup(e){const{cSize:t,classes:i}=Si(e);return()=>S("svg",{class:i.value,stroke:"currentColor",width:t.value,height:t.value,viewBox:"0 0 57 57",xmlns:"http://www.w3.org/2000/svg"},$y)}}));const Ny=[S("rect",{y:"10",width:"15",height:"120",rx:"6"},[S("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),S("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),S("rect",{x:"30",y:"10",width:"15",height:"120",rx:"6"},[S("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),S("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),S("rect",{x:"60",width:"15",height:"140",rx:"6"},[S("animate",{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),S("animate",{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),S("rect",{x:"90",y:"10",width:"15",height:"120",rx:"6"},[S("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),S("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),S("rect",{x:"120",y:"10",width:"15",height:"120",rx:"6"},[S("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),S("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 Pd=X("SpinnerBars",ee({name:"VcSpinnerBars",props:Mi,setup(e){const{cSize:t,classes:i}=Si(e);return()=>S("svg",{class:i.value,fill:"currentColor",width:t.value,height:t.value,viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg"},Ny)}}));const zy=[S("circle",{cx:"15",cy:"15",r:"15"},[S("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),S("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})]),S("circle",{cx:"60",cy:"15",r:"9","fill-opacity":".3"},[S("animate",{attributeName:"r",from:"9",to:"9",begin:"0s",dur:"0.8s",values:"9;15;9",calcMode:"linear",repeatCount:"indefinite"}),S("animate",{attributeName:"fill-opacity",from:".5",to:".5",begin:"0s",dur:"0.8s",values:".5;1;.5",calcMode:"linear",repeatCount:"indefinite"})]),S("circle",{cx:"105",cy:"15",r:"15"},[S("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),S("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})])];var xd=X("SpinnerDots",ee({name:"VcSpinnerDots",props:Mi,setup(e){const{cSize:t,classes:i}=Si(e);return()=>S("svg",{class:i.value,fill:"currentColor",width:t.value,height:t.value,viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg"},zy)}}));const Gy=[S("g",{transform:"translate(-20,-20)"},[S("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"},[S("animateTransform",{attributeName:"transform",type:"rotate",from:"90 50 50",to:"0 50 50",dur:"1s",repeatCount:"indefinite"})])]),S("g",{transform:"translate(20,20) rotate(15 50 50)"},[S("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"},[S("animateTransform",{attributeName:"transform",type:"rotate",from:"0 50 50",to:"90 50 50",dur:"1s",repeatCount:"indefinite"})])])];var Od=X("SpinnerGears",ee({name:"VcSpinnerGears",props:Mi,setup(e){const{cSize:t,classes:i}=Si(e);return()=>S("svg",{class:i.value,width:t.value,height:t.value,viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",xmlns:"http://www.w3.org/2000/svg"},Gy)}}));const Uy=[S("g",[S("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"}),S("clipPath",{id:"uil-hourglass-clip1"},[S("rect",{x:"15",y:"20",width:" 70",height:"25"},[S("animate",{attributeName:"height",from:"25",to:"0",dur:"1s",repeatCount:"indefinite",values:"25;0;0",keyTimes:"0;0.5;1"}),S("animate",{attributeName:"y",from:"20",to:"45",dur:"1s",repeatCount:"indefinite",values:"20;45;45",keyTimes:"0;0.5;1"})])]),S("clipPath",{id:"uil-hourglass-clip2"},[S("rect",{x:"15",y:"55",width:" 70",height:"25"},[S("animate",{attributeName:"height",from:"0",to:"25",dur:"1s",repeatCount:"indefinite",values:"0;25;25",keyTimes:"0;0.5;1"}),S("animate",{attributeName:"y",from:"80",to:"55",dur:"1s",repeatCount:"indefinite",values:"80;55;55",keyTimes:"0;0.5;1"})])]),S("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"}),S("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"}),S("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 Md=X("SpinnerHourglass",ee({name:"VcSpinnerHourglass",props:Mi,setup(e){const{cSize:t,classes:i}=Si(e);return()=>S("svg",{class:i.value,width:t.value,height:t.value,viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",xmlns:"http://www.w3.org/2000/svg"},Uy)}}));const Hy=[S("g",{"stroke-width":"4","stroke-linecap":"round"},[S("line",{y1:"17",y2:"29",transform:"translate(32,32) rotate(180)"},[S("animate",{attributeName:"stroke-opacity",dur:"750ms",values:"1;.85;.7;.65;.55;.45;.35;.25;.15;.1;0;1",repeatCount:"indefinite"})]),S("line",{y1:"17",y2:"29",transform:"translate(32,32) rotate(210)"},[S("animate",{attributeName:"stroke-opacity",dur:"750ms",values:"0;1;.85;.7;.65;.55;.45;.35;.25;.15;.1;0",repeatCount:"indefinite"})]),S("line",{y1:"17",y2:"29",transform:"translate(32,32) rotate(240)"},[S("animate",{attributeName:"stroke-opacity",dur:"750ms",values:".1;0;1;.85;.7;.65;.55;.45;.35;.25;.15;.1",repeatCount:"indefinite"})]),S("line",{y1:"17",y2:"29",transform:"translate(32,32) rotate(270)"},[S("animate",{attributeName:"stroke-opacity",dur:"750ms",values:".15;.1;0;1;.85;.7;.65;.55;.45;.35;.25;.15",repeatCount:"indefinite"})]),S("line",{y1:"17",y2:"29",transform:"translate(32,32) rotate(300)"},[S("animate",{attributeName:"stroke-opacity",dur:"750ms",values:".25;.15;.1;0;1;.85;.7;.65;.55;.45;.35;.25",repeatCount:"indefinite"})]),S("line",{y1:"17",y2:"29",transform:"translate(32,32) rotate(330)"},[S("animate",{attributeName:"stroke-opacity",dur:"750ms",values:".35;.25;.15;.1;0;1;.85;.7;.65;.55;.45;.35",repeatCount:"indefinite"})]),S("line",{y1:"17",y2:"29",transform:"translate(32,32) rotate(0)"},[S("animate",{attributeName:"stroke-opacity",dur:"750ms",values:".45;.35;.25;.15;.1;0;1;.85;.7;.65;.55;.45",repeatCount:"indefinite"})]),S("line",{y1:"17",y2:"29",transform:"translate(32,32) rotate(30)"},[S("animate",{attributeName:"stroke-opacity",dur:"750ms",values:".55;.45;.35;.25;.15;.1;0;1;.85;.7;.65;.55",repeatCount:"indefinite"})]),S("line",{y1:"17",y2:"29",transform:"translate(32,32) rotate(60)"},[S("animate",{attributeName:"stroke-opacity",dur:"750ms",values:".65;.55;.45;.35;.25;.15;.1;0;1;.85;.7;.65",repeatCount:"indefinite"})]),S("line",{y1:"17",y2:"29",transform:"translate(32,32) rotate(90)"},[S("animate",{attributeName:"stroke-opacity",dur:"750ms",values:".7;.65;.55;.45;.35;.25;.15;.1;0;1;.85;.7",repeatCount:"indefinite"})]),S("line",{y1:"17",y2:"29",transform:"translate(32,32) rotate(120)"},[S("animate",{attributeName:"stroke-opacity",dur:"750ms",values:".85;.7;.65;.55;.45;.35;.25;.15;.1;0;1;.85",repeatCount:"indefinite"})]),S("line",{y1:"17",y2:"29",transform:"translate(32,32) rotate(150)"},[S("animate",{attributeName:"stroke-opacity",dur:"750ms",values:"1;.85;.7;.65;.55;.45;.35;.25;.15;.1;0;1",repeatCount:"indefinite"})])])];var Sd=X("SpinnerIos",ee({name:"VcSpinnerIos",props:Mi,setup(e){const{cSize:t,classes:i}=Si(e);return()=>S("svg",{class:i.value,width:t.value,height:t.value,stroke:"currentColor",fill:"currentColor",viewBox:"0 0 64 64"},Hy)}}));const Wy=[S("circle",{cx:"50",cy:"50",r:"44",fill:"none","stroke-width":"4","stroke-opacity":".5",stroke:"currentColor"}),S("circle",{cx:"8",cy:"54",r:"6",fill:"currentColor","stroke-width":"3",stroke:"currentColor"},[S("animateTransform",{attributeName:"transform",type:"rotate",from:"0 50 48",to:"360 50 52",dur:"2s",repeatCount:"indefinite"})])];var Td=X("SpinnerOrbit",ee({name:"VcSpinnerOrbit",props:Mi,setup(e){const{cSize:t,classes:i}=Si(e);return()=>S("svg",{class:i.value,width:t.value,height:t.value,viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",xmlns:"http://www.w3.org/2000/svg"},Wy)}}));const qy=[S("g",{transform:"translate(1 1)","stroke-width":"2",fill:"none","fill-rule":"evenodd"},[S("circle",{"stroke-opacity":".5",cx:"18",cy:"18",r:"18"}),S("path",{d:"M36 18c0-9.94-8.06-18-18-18"},[S("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})])])];var Id=X("SpinnerOval",ee({name:"VcSpinnerOval",props:Mi,setup(e){const{cSize:t,classes:i}=Si(e);return()=>S("svg",{class:i.value,stroke:"currentColor",width:t.value,height:t.value,viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg"},qy)}}));const Qy=[S("g",{fill:"none","fill-rule":"evenodd","stroke-width":"2"},[S("circle",{cx:"22",cy:"22",r:"1"},[S("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"}),S("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"})]),S("circle",{cx:"22",cy:"22",r:"1"},[S("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"}),S("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 Ad=X("SpinnerPuff",ee({name:"VcSpinnerPuff",props:Mi,setup(e){const{cSize:t,classes:i}=Si(e);return()=>S("svg",{class:i.value,stroke:"currentColor",width:t.value,height:t.value,viewBox:"0 0 44 44",xmlns:"http://www.w3.org/2000/svg"},Qy)}}));const Zy=[S("g",{fill:"none","fill-rule":"evenodd",transform:"translate(1 1)","stroke-width":"2"},[S("circle",{cx:"22",cy:"22",r:"6"},[S("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),S("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),S("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]),S("circle",{cx:"22",cy:"22",r:"6"},[S("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),S("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),S("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]),S("circle",{cx:"22",cy:"22",r:"8"},[S("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"})])])];var Dd=X("SpinnerRings",ee({name:"VcSpinnerRings",props:Mi,setup(e){const{cSize:t,classes:i}=Si(e);return()=>S("svg",{class:i.value,stroke:"currentColor",width:t.value,height:t.value,viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg"},Zy)}}));const Jy=[S("defs",[S("linearGradient",{x1:"8.042%",y1:"0%",x2:"65.682%",y2:"23.865%",id:"a"},[S("stop",{"stop-color":"currentColor","stop-opacity":"0",offset:"0%"}),S("stop",{"stop-color":"currentColor","stop-opacity":".631",offset:"63.146%"}),S("stop",{"stop-color":"currentColor",offset:"100%"})])]),S("g",{transform:"translate(1 1)",fill:"none","fill-rule":"evenodd"},[S("path",{d:"M36 18c0-9.94-8.06-18-18-18",stroke:"url(#a)","stroke-width":"2"},[S("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"0.9s",repeatCount:"indefinite"})]),S("circle",{fill:"currentColor",cx:"36",cy:"18",r:"1"},[S("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"0.9s",repeatCount:"indefinite"})])])];var Bd=X("SpinnerTail",ee({name:"VcSpinnerTail",props:Mi,setup(e){const{cSize:t,classes:i}=Si(e);return()=>S("svg",{class:i.value,width:t.value,height:t.value,viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg"},Jy)}})),Ol=X("Spinner",ee({name:"VcSpinner",props:{...Mi,thickness:{type:Number,default:5}},setup(e){const{cSize:t,classes:i}=Si(e);return()=>S("svg",{class:i.value+" vc-spinner-mat",width:t.value,height:t.value,viewBox:"25 25 50 50"},[S("circle",{class:"path",cx:"50",cy:"50",r:"20",fill:"none",stroke:"currentColor","stroke-width":e.thickness,"stroke-miterlimit":"10"})])}}));const Ld={left:"start",center:"center",right:"end",between:"between",around:"around",evenly:"evenly",stretch:"stretch"},Xy=Object.keys(Ld),Yy={align:{type:String,validator:e=>Xy.includes(e)}};function Ky(e){return re(()=>{const t=e.align===void 0?e.vertical===!0?"stretch":"left":e.align;return`${e.vertical===!0?"items":"justify"}-${Ld[t]}`})}const jd={none:0,xs:4,sm:8,md:16,lg:24,xl:32},eb={xs:8,sm:10,md:14,lg:20,xl:24},tb={...Cd,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:{...Yy.align,default:"center"},stack:Boolean,stretch:Boolean,loading:{type:Boolean,default:null},disable:Boolean};function ib(e){const t=wd(e,eb),i=Ky(e),n=re(()=>{const d=e.fab===!1&&e.fabMini===!1?t.value:{};return e.padding!==void 0?Object.assign({},d,{padding:e.padding.split(/\s+/).map(h=>h in jd?jd[h]+"px":h).join(" "),minWidth:"0",minHeight:"0"}):d}),o=re(()=>e.rounded===!0||e.fab===!0||e.fabMini===!0),r=re(()=>e.disable!==!0&&e.loading!==!0),a=re(()=>r.value===!0?e.tabindex||0:-1),s=re(()=>e.flat===!0?"flat":e.outline===!0?"outline":e.push===!0?"push":e.unelevated===!0?"unelevated":"standard"),l=re(()=>{const d={tabindex:a.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=re(()=>{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${o.value===!0?" vc-btn--rounded":""}`}`+(d!==void 0?" "+d:"")+(r.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=re(()=>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:r}}const{passiveCapture:Ti}=mn;let ro,so,lo;const nb=X("btnProps",{...tb,percentage:{type:Number,default:0},darkPercentage:Boolean});var sr=ee({name:"VcBtn",props:nb,emits:["click","keydown","touchstart","mousedown","keyup"],setup(e,{slots:t,emit:i}){var n;const o=(n=ae())==null?void 0:n.proxy,{classes:r,style:a,innerClasses:s,attributes:l,isActionable:c}=ib(e),u=te(),d=te();let h=null,p,v;const b=re(()=>e.label!==void 0&&e.label!==null&&e.label!==""),y=re(()=>e.ripple===!1?!1:{keyCodes:13,...e.ripple===!0?{}:e.ripple}),E=re(()=>{const V=Math.max(0,Math.min(100,e.percentage));return V>0?{transition:"transform 0.6s",transform:`translateX(${V-100}%)`}:{}}),x=re(()=>e.loading===!0?{onMousedown:$,onTouchstart:$,onClick:$,onKeydown:$,onKeyup:$}:c.value===!0?{onClick:O,onKeydown:I,onMousedown:D,onTouchstart:R}:{}),g=re(()=>[[Kg,y.value,void 0,{center:e.round}]]),w=re(()=>({ref:u,class:"vc-btn vc-btn-item non-selectable no-outline "+r.value,style:a.value,...l.value,...x.value}));function O(V){var m;if(V!==void 0){if(V.defaultPrevented===!0)return;const f=document.activeElement;if(e.type==="submit"&&f!==document.body&&((m=u.value)==null?void 0:m.contains(f))===!1&&(f==null?void 0:f.contains(u.value))===!1){u.value.focus();const C=()=>{document.removeEventListener("keydown",Zi,!0),document.removeEventListener("keyup",C,Ti),u.value!==null&&u.value.removeEventListener("blur",C,Ti)};document.addEventListener("keydown",Zi,!0),document.addEventListener("keyup",C,Ti),u.value.addEventListener("blur",C,Ti)}}i("click",V,()=>{})}function I(V){var m,f,C;Yo(V,[13,32])===!0&&(Zi(V),so!==u.value&&(so!==null&&k(),(m=u.value)==null||m.focus(),so=u.value,(f=u.value)==null||f.classList.add("vc-btn--active"),document.addEventListener("keyup",M,!0),(C=u.value)==null||C.addEventListener("blur",M,Ti))),i("keydown",V)}function R(V){ro!==u.value&&(ro!==null&&k(),ro=u.value,h=ll(V.target),h==null||h.addEventListener("touchcancel",M,Ti),h==null||h.addEventListener("touchend",M,Ti)),p=!0,clearTimeout(v),v=setTimeout(()=>{p=!1},200),i("touchstart",V)}function D(V){var m;lo!==u.value&&(lo!==null&&k(),lo=u.value,(m=u.value)==null||m.classList.add("vc-btn--active"),document.addEventListener("mouseup",M,Ti)),V.qSkipRipple=p===!0,i("mousedown",V)}function M(V){var m;if(!(V!==void 0&&V.type==="blur"&&document.activeElement===u.value)){if(V!==void 0&&V.type==="keyup"){if(so===u.value&&Yo(V,[13,32])===!0){const f=new MouseEvent("click",V);f.qKeyEvent=!0,V.defaultPrevented===!0&&$n(f),V.cancelBubble===!0&&Xo(f),(m=u.value)==null||m.dispatchEvent(f),Zi(V),V.qKeyEvent=!0}i("keyup",V)}k()}}function k(V){const m=d.value;V!==!0&&(ro===u.value||lo===u.value)&&m!==null&&m!==document.activeElement&&(m.setAttribute("tabindex","-1"),m.focus()),ro===u.value&&(h!==null&&(h.removeEventListener("touchcancel",M,Ti),h.removeEventListener("touchend",M,Ti)),ro=h=null),lo===u.value&&(document.removeEventListener("mouseup",M,Ti),lo=null),so===u.value&&(document.removeEventListener("keyup",M,!0),u.value!==null&&u.value.removeEventListener("blur",M,Ti),so=null),u.value!==null&&u.value.classList.remove("vc-btn--active")}function $(V){Zi(V),V.qSkipRipple=!0}return on(()=>{k(!0)}),Object.assign(o,{click:O}),()=>{let V=[];e.icon!==void 0&&V.push(S(ao,{name:e.icon,left:e.stack===!1&&b.value===!0,role:"img","aria-hidden":"true"})),b.value===!0&&V.push(S("span",{class:"block"},[e.label])),V=Oi(t.default,V),e.iconRight!==void 0&&e.round===!1&&V.push(S(ao,{name:e.iconRight,right:e.stack===!1&&b.value===!0,role:"img","aria-hidden":"true"}));const m=[S("span",{class:"vc-focus-helper",ref:d})];return e.loading===!0&&e.percentage!==void 0&&m.push(S("span",{class:"vc-btn__progress absolute-full overflow-hidden"},[S("span",{class:"vc-btn__progress-indicator fit block"+(e.darkPercentage===!0?" vc-btn__progress--dark":""),style:E.value})])),m.push(S("span",{class:"vc-btn__content text-center col items-center vc-anchor--skip "+s.value},V)),e.loading!==null&&m.push(S(Ur,{name:"vc-transition--fade"},()=>e.loading===!0?[S("span",{key:"loading",class:"absolute-full flex flex-center"},t.loading!==void 0?t.loading():[S(Ol)])]:null)),_d("button",w.value,m,"ripple",e.disable!==!0&&e.ripple!==!1,()=>g.value)}}});const ob={target:{type:[Boolean,String],default:!0},noParentEvent:Boolean,contextMenu:Boolean};function ab({showing:e,avoidEmit:t,configureAnchorEl:i}){const{props:n,proxy:o,emit:r}=ae(),a=te(null);let s;function l(p){return a.value===null?!1:p===void 0||p.touches===void 0||p.touches.length<=1}const c={};i===void 0&&(Object.assign(c,{hide(p){o.hide(p)},toggle(p){o.toggle(p)},toggleKey(p){Yo(p,13)===!0&&o.toggle(p)},contextClick(p){o.hide(p),Be(()=>{o.show(p)}),$n(p)},mobilePrevent:$n,mobileTouch(p){var v;if(c.mobileCleanup(p),l(p)!==!0)return;o.hide(p),(v=a.value)==null||v.classList.add("non-selectable");const b=ll(p.target);It(c,"anchor",[[b,"touchmove","mobileCleanup","passive"],[b,"touchend","mobileCleanup","passive"],[b,"touchcancel","mobileCleanup","passive"],[a.value,"contextmenu","mobilePrevent","notPassive"]]),s=setTimeout(()=>{o.show(p)},300)},mobileCleanup(p){a.value.classList.remove("non-selectable"),clearTimeout(s),e.value===!0&&p!==void 0&&Ji()}}),i=function(p=n.contextMenu){if(n.noParentEvent===!0||a.value===null)return;let v;p===!0?ut().isPhone===!0?v=[[a.value,"touchstart","mobileTouch","passive"]]:v=[[a.value,"click","hide","passive"],[a.value,"contextmenu","contextClick","notPassive"]]:v=[[a.value,"click","toggle","passive"],[a.value,"keyup","toggleKey","passive"]],It(c,"anchor",v)});function u(){pi(c,"anchor")}function d(p){for(a.value=p;a.value.classList.contains("vc-anchor--skip");)a.value=a.value.parentNode;i()}function h(){if(n.target===!1||n.target==="")a.value=null;else if(n.target===!0)d(o==null?void 0:o.$el.parentNode);else{let p=n.target;if(typeof n.target=="string")try{p=document.querySelector(n.target)}catch(v){p=void 0}p!=null?(a.value=p.$el||p,i()):(a.value=null,console.error(`Anchor: target "${n.target}" not found`))}}return he(()=>n.contextMenu,p=>{a.value!==null&&(u(),i(p))}),he(()=>n.target,()=>{a.value!==null&&u(),h()}),he(()=>n.noParentEvent,p=>{a.value!==null&&(p===!0?u():i())}),Jn(()=>{h(),t!==!0&&n.modelValue===!0&&a.value===null&&r("update:modelValue",!1)}),on(()=>{clearTimeout(s),u()}),{anchorEl:a,canShow:l,anchorEvents:c}}function rb(e,t){const i=te(null);let n;function o(s,l){const c=`${l!==void 0?"add":"remove"}EventListener`,u=l!==void 0?l:n;s!==window&&s[c]("scroll",u,mn.passive),window[c]("scroll",u,mn.passive),n=l}function r(){i.value!==null&&(o(i.value),i.value=null)}const a=he(()=>e.noParentEvent,()=>{i.value!==null&&(r(),t())});return on(a),{localScrollTarget:i,unconfigureScrollTarget:r,changeScrollEvent:o}}const Fd={modelValue:{type:Boolean,default:null}},kd=["update:modelValue","before-show","show","before-hide","hide"];function Rd({showing:e,canShow:t=void 0,hideOnRouteChange:i=void 0,handleShow:n=void 0,handleHide:o=void 0,processOnMount:r=void 0}){const a=ae(),{props:s,emit:l,proxy:c}=a;let u;function d(x){(e==null?void 0:e.value)===!0?v(x):h(x)}function h(x){if(s.disable===!0||t!==void 0&&t(x)!==!0)return;const g=Kr(a,"onUpdate:modelValue")===!0;g===!0&&(l("update:modelValue",!0),u=x,Be(()=>{u===x&&(u=void 0)})),(s.modelValue===null||g===!1)&&p(x)}function p(x){(e==null?void 0:e.value)!==!0&&(e&&(e.value=!0),l("before-show",x),!(x&&x.cancel===!0)&&(n!==void 0?n(x):l("show",x)))}function v(x){if(s.disable===!0)return;const g=Kr(a,"onUpdate:modelValue")===!0;g===!0&&(l("update:modelValue",!1),u=x,Be(()=>{u===x&&(u=void 0)})),(s.modelValue===null||g===!1)&&b(x)}function b(x){(e==null?void 0:e.value)!==!1&&(e&&(e.value=!1),l("before-hide",x),o!==void 0?o(x):l("hide",x))}function y(x){s.disable===!0&&x===!0?Kr(a,"onUpdate:modelValue")===!0&&l("update:modelValue",!1):x===!0!==(e==null?void 0:e.value)&&(x===!0?p:b)(u)}he(()=>s.modelValue,y),i!==void 0&&Sg(a)===!0&&he(()=>c.$route,()=>{i.value===!0&&(e==null?void 0:e.value)===!0&&v()}),r===!0&&Jn(()=>{y(s.modelValue)});const E={show:h,hide:v,toggle:d};return Object.assign(c,E),E}let sb=document.body;function lb(e){const t=document.createElement("div");return e!==void 0&&(t.id=e),sb.appendChild(t),t}function cb(e){e.remove()}const Ml=[];function ub(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 Vd(e,t,i,n){var o,r,a,s;let l=null;(r=(o=e.props)==null?void 0:o.teleport)!=null&&r.to&&(l=(s=(a=e.props)==null?void 0:a.teleport)==null?void 0:s.to);const c=n===!0&&ub(e),u=te(!1);function d(){c===!1&&l===null&&(l=lb()),u.value=!0,Ml.push(e.proxy)}function h(){var p,v;u.value=!1;const b=Ml.indexOf(e.proxy);b>-1&&Ml.splice(b,1),l!==null&&!((v=(p=e.props)==null?void 0:p.teleport)!=null&&v.to)&&(cb(l),l=null)}return Ke(h),Object.assign(e.proxy,{__vcPortalInnerRef:t}),{showPortal:d,hidePortal:h,portalIsActive:u,renderPortal:()=>c===!0?i():u.value===!0?[S(Ui,{to:l},i())]:void 0}}const db={transitionShow:{type:String,default:"fade"},transitionHide:{type:String,default:"fade"},transitionDuration:{type:[String,Number],default:300}};function hb(e,t){const i=te(t.value);return he(t,n=>{Be(()=>{i.value=n})}),{transition:re(()=>"vc-transition--"+(i.value===!0?e.transitionHide:e.transitionShow)),transitionStyle:re(()=>`--vc-transition-duration: ${e.transitionDuration}ms`)}}function mb(){let e;return on(()=>{e=void 0}),{registerTick(t){e=t},removeTick(){e=void 0},prepareTick(){if(e!==void 0){const t=e;Be(()=>{e===t&&(e(),e=void 0)})}}}}const pb=[null,document,document.body,document.scrollingElement,document.documentElement];function vb(e,t){let i=zu(t);if(i===void 0){if(e==null)return window;i=e.closest(".scroll,.scroll-y,.overflow-auto")}return pb.includes(i)?window:i}let lr;function fb(){if(lr!==void 0)return lr;const e=document.createElement("p"),t=document.createElement("div");il(e,{width:"100%",height:"200px"}),il(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(),lr=i-n,lr}let $d,Nd;function zd(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 gb(e){return e?!(e.length!==2||typeof e[0]!="number"||typeof e[1]!="number"):!0}const Sl={"start#ltr":"left","start#rtl":"right","end#ltr":"right","end#rtl":"left"};["left","middle","right"].forEach(e=>{Sl[`${e}#ltr`]=e,Sl[`${e}#rtl`]=e});function Gd(e,t){const i=e.split(" ");return{vertical:i[0],horizontal:Sl[`${i[1]}#${t===!0?"rtl":"ltr"}`]}}function yb(e,t){let{top:i,left:n,right:o,bottom:r,width:a,height:s}=e.getBoundingClientRect();return t!==void 0&&(i-=t[1],n-=t[0],r+=t[1],o+=t[0],a+=t[0],s+=t[1]),{top:i,left:n,right:o,bottom:r,width:a,height:s,middle:n+(o-n)/2,center:i+(r-i)/2}}function bb(e){return{top:0,center:e.offsetHeight/2,bottom:e.offsetHeight,left:0,middle:e.offsetWidth/2,right:e.offsetWidth}}function Cb(e){if(ut().isIOS===!0&&window.visualViewport!==void 0){const s=document.body.style,{offsetLeft:l,offsetTop:c}=window.visualViewport;l!==$d&&(s.setProperty("--vc-pe-left",l+"px"),$d=l),c!==Nd&&(s.setProperty("--vc-pe-top",c+"px"),Nd=c)}let t={};const{scrollLeft:i,scrollTop:n}=e.el;if(e.absoluteOffset===void 0)t=yb(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 o={maxHeight:e.maxHeight,maxWidth:e.maxWidth,visibility:"visible"};(e.fit===!0||e.cover===!0)&&(o.minWidth=t.width+"px",e.cover===!0&&(o.minHeight=t.height+"px")),Object.assign(e.el.style,o);const r=bb(e.el),a={top:t[e.anchorOrigin.vertical]-r[e.selfOrigin.vertical],left:t[e.anchorOrigin.horizontal]-r[e.selfOrigin.horizontal]};wb(a,t,r,e.anchorOrigin,e.selfOrigin),o={top:a.top+"px",left:a.left+"px"},a.maxHeight!==void 0&&(o.maxHeight=a.maxHeight+"px",t.height>a.maxHeight&&(o.minHeight=o.maxHeight)),a.maxWidth!==void 0&&(o.maxWidth=a.maxWidth+"px",t.width>a.maxWidth&&(o.minWidth=o.maxWidth)),Object.assign(e.el.style,o),e.el.scrollTop!==n&&(e.el.scrollTop=n),e.el.scrollLeft!==i&&(e.el.scrollLeft=i)}function wb(e,t,i,n,o){const r=i.bottom,a=i.right,s=fb(),l=window.innerHeight-s,c=document.body.clientWidth;if(e.top<0||e.top+r>l)if(o.vertical==="center")e.top=t[n.vertical]>l/2?Math.max(0,l-r):0,e.maxHeight=Math.min(r,l);else if(t[n.vertical]>l/2){const u=Math.min(l,n.vertical==="center"?t.center:n.vertical===o.vertical?t.bottom:t.top);e.maxHeight=Math.min(r,u),e.top=Math.max(0,u-r)}else e.top=Math.max(0,n.vertical==="center"?t.center:n.vertical===o.vertical?t.top:t.bottom),e.maxHeight=Math.min(r,l-e.top);if(e.left<0||e.left+a>c)if(e.maxWidth=Math.min(a,c),o.horizontal==="middle")e.left=t[n.horizontal]>c/2?Math.max(0,c-a):0;else if(t[n.horizontal]>c/2){const u=Math.min(c,n.horizontal==="middle"?t.middle:n.horizontal===o.horizontal?t.right:t.left);e.maxWidth=Math.min(a,u),e.left=Math.max(0,u-e.maxWidth)}else e.left=Math.max(0,n.horizontal==="middle"?t.middle:n.horizontal===o.horizontal?t.left:t.right),e.maxWidth=Math.min(a,c-e.left)}const _b=X("tooltipProps",{...ob,...Fd,...db,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:zd},self:{type:String,default:"top middle",validator:zd},offset:{type:Array,default:()=>[14,14],validator:gb},scrollTarget:String,delay:{type:Number,default:0},hideDelay:{type:Number,default:0},persistent:{type:Boolean}});var Ud=ee({name:"VcTooltip",inheritAttrs:!1,props:_b,emits:[...kd],setup(e,{slots:t,emit:i,attrs:n}){let o,r;const a=ae(),s=te(null),l=te(!1),c=re(()=>Gd(e.anchor,!0)),u=re(()=>Gd(e.self,!0)),d=re(()=>e.persistent!==!0),{registerTick:h,removeTick:p,prepareTick:v}=mb(),{registerTimeout:b,removeTimeout:y}=tl(),{transition:E,transitionStyle:x}=hb(e,l),{localScrollTarget:g,changeScrollEvent:w,unconfigureScrollTarget:O}=rb(e,B),{anchorEl:I,canShow:R,anchorEvents:D}=ab({showing:l,configureAnchorEl:L,avoidEmit:void 0}),{show:M,hide:k}=Rd({showing:l,canShow:R,handleShow:f,handleHide:C,hideOnRouteChange:d,processOnMount:!0});Object.assign(D,{delayShow:P,delayHide:A});const{showPortal:$,hidePortal:V,renderPortal:m}=Vd(a,s,q);function f(Z){p(),y(),$(),h(()=>{r=new MutationObserver(()=>_()),r.observe(s.value,{attributes:!1,childList:!0,characterData:!0,subtree:!0}),_(),B()}),v(),o===void 0&&(o=he(()=>e.self+"|"+e.anchor,_)),b(()=>{i("show",Z)},e.transitionDuration)}function C(Z){p(),y(),T(),b(()=>{V(),i("hide",Z)},e.transitionDuration)}function T(){r!==void 0&&(r.disconnect(),r=void 0),o!==void 0&&(o(),o=void 0),O(),pi(D,"tooltipTemp")}function _(){const Z=s.value;I.value===void 0||!Z||Cb({el:Z,offset:e.offset,anchorEl:I.value,anchorOrigin:c.value,selfOrigin:u.value,maxHeight:e.maxHeight,maxWidth:e.maxWidth})}function P(Z){if(ut().isPhone===!0){Ji(),document.body.classList.add("non-selectable");const H=ll(I.value),N=["touchmove","touchcancel","touchend","click"].map(j=>[H,j,"__delayHide","passiveCapture"]);It(D,"tooltipTemp",N)}b(()=>{M(Z)},e.delay)}function A(Z){y(),ut().isPhone===!0&&(pi(D,"tooltipTemp"),Ji(),setTimeout(()=>{document.body.classList.remove("non-selectable")},10)),b(()=>{k(Z)},e.hideDelay)}function L(){if(e.noParentEvent===!0||I.value===void 0)return;const Z=ut().isPhone===!0?[[I.value,"touchstart","delayShow","passive"]]:[[I.value,"mouseenter","delayShow","passive"],[I.value,"mouseleave","delayHide","passive"]];It(D,"anchor",Z)}function B(){if(I.value!==void 0||e.scrollTarget!==void 0){g.value=vb(I.value,e.scrollTarget);const Z=e.noParentEvent===!0?_:k;w(g.value,Z)}}function F(){return l.value===!0?S("div",{...n,ref:s,class:["vc-tooltip vc-tooltip--style vc-position-engine no-pointer-events",n.class],style:x.value,role:"complementary"},Xe(t.default)):null}function q(){return S(Ur,{name:E.value,appear:!0},F)}return on(T),Object.assign(a==null?void 0:a.proxy,{updatePosition:_}),m}});function Gn(e,t,i){return i<=t?t:Math.min(i,Math.max(t,e))}const Tl=XMLHttpRequest,Hd=Tl.prototype.open,Eb=["top","right","bottom","left"];let cr=[],ta=0;function Pb({p:e,pos:t,active:i,horiz:n,reverse:o,dir:r}){let a=1,s=1;return n===!0?(o===!0&&(a=-1),t==="bottom"&&(s=-1),{transform:`translate3d(${a*(e-100)}%,${i?0:s*-200}%,0)`}):(o===!0&&(s=-1),t==="right"&&(a=-1),{transform:`translate3d(${i?0:r*a*-200}%,${s*(e-100)}%,0)`})}function xb(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),Gn(e+t,0,100)}function Ob(e){ta++,cr.push(e),!(ta>1)&&(Tl.prototype.open=function(t,i){const n=[],o=()=>{cr.forEach(a=>{(a.hijackFilter.value===null||a.hijackFilter.value(i)===!0)&&(a.start(),n.push(a.stop))})},r=()=>{n.forEach(a=>{a()})};this.addEventListener("loadstart",o,{once:!0}),this.addEventListener("loadend",r,{once:!0}),Hd.apply(this,arguments)})}function Mb(e){cr=cr.filter(t=>t.start!==e),ta=Math.max(0,ta-1),ta===0&&(Tl.prototype.open=Hd)}const Sb=X("ajaxBarProps",{position:{type:String,default:"top",validator:e=>Eb.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 Wd=ee({name:"VcAjaxBar",props:Sb,emits:["start","stop"],setup(e,{emit:t}){const{proxy:i}=ae(),n=te(0),o=te(!1),r=te(!0);let a=0,s,l;const c=re(()=>`vc-loading-bar vc-loading-bar--${e.position}`+(e.color!==void 0?` bg-${e.color}`:"")+(r.value===!0?"":" no-transition")),u=re(()=>e.position==="top"||e.position==="bottom"),d=re(()=>u.value===!0?"height":"width"),h=re(()=>{const g=o.value,w=Pb({p:n.value,pos:e.position,active:g,horiz:u.value,reverse:e.reverse,dir:1});return w[d.value]=e.size,w.opacity=g?1:0,w.position=e.positioning==="absolute"?"absolute":"fixed",w.backgroundColor=e.color,w}),p=re(()=>o.value===!0?{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":n.value}:{"aria-hidden":"true"});function v(g=300){const w=l;return l=Math.max(0,g)||0,a++,a>1?(w===0&&g>0?E():w>0&&g<=0&&clearTimeout(s),a):(clearTimeout(s),t("start"),n.value=0,s=setTimeout(()=>{r.value=!0,g>0&&E()},o.value===!0?500:1),o.value!==!0&&(o.value=!0,r.value=!1),a)}function b(g){return a>0&&(n.value=xb(n.value,g)),a}function y(){if(a=Math.max(0,a-1),a>0)return a;clearTimeout(s),t("stop");const g=()=>{r.value=!0,n.value=100,s=setTimeout(()=>{o.value=!1},1e3)};n.value===0?s=setTimeout(g,1):g()}function E(){n.value<100&&(s=setTimeout(()=>{b(),E()},l))}let x;return Jn(()=>{e.skipHijack!==!0&&(x=!0,Ob({start:v,stop:y,hijackFilter:re(()=>e.hijackFilter||null)}))}),on(()=>{clearTimeout(s),x===!0&&Mb(v)}),Object.assign(i,{start:v,stop:y,increment:b}),()=>S("div",{class:c.value,style:h.value,...p.value})}});const qd={dark:{type:Boolean,default:null}};function Qd(e){return re(()=>e.dark)}const Zd=["text","rect","circle","VcBtn","VcBadge","VcChip","VcToolbar","VcCheckbox","VcRadio","VcToggle","VcSlider","VcRange","VcInput","VcAvatar"],Jd=["wave","pulse","pulse-x","pulse-y","fade","blink","none"],Xd={...qd,tag:{type:String,default:"div"},type:{type:String,validator:e=>Zd.includes(e),default:"rect"},animation:{type:String,validator:e=>Jd.includes(e),default:"wave"},square:Boolean,bordered:Boolean,size:String,width:String,height:String};X({skeletonTypes:Zd,skeletonAnimations:Jd,skeletonProps:Xd});var Yd=ee({name:"VcSkeleton",props:Xd,setup(e,{slots:t}){const i=Qd(e),n=re(()=>e.size!==void 0?{width:e.size,height:e.size}:{width:e.width,height:e.height}),o=re(()=>`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()=>S(e.tag,{class:o.value,style:n.value},Xe(t.default))}});const Tb=["top","right","bottom","left"],Kd={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=>Tb.includes(e)},externalLabel:Boolean,hideLabel:{type:Boolean},labelClass:[Array,String,Object],labelStyle:[Array,String,Object],disable:Boolean,tabindex:[Number,String]};function eh(e,t){return{formClass:re(()=>`vc-fab--form-${e.square===!0?"square":"rounded"}`),stacked:re(()=>e.externalLabel===!1&&["top","bottom"].includes(e.labelPosition)),labelProps:re(()=>{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 Ib=["up","right","down","left"],Ab=["left","center","right"],Db={...Kd,...Fd,icon:String,activeIcon:String,hideActionOnClick:{type:Boolean,default:!0},hideIcon:Boolean,hideLabel:{type:Boolean,default:!0},direction:{type:String,default:"right",validator:e=>Ib.includes(e)},persistent:Boolean,stacked:Boolean,verticalActionsAlign:{type:String,default:"center",validator:e=>Ab.includes(e)}},Bb=X("fabProps",Db);var th=ee({name:"VcFab",props:Bb,emits:kd,setup(e,{slots:t}){const i=te(null),n=te(e.modelValue===!0),{formClass:o,labelProps:r}=eh(e,n),a=re(()=>e.persistent!==!0),{hide:s,toggle:l}=Rd({showing:n,hideOnRouteChange:a}),c=re(()=>({opened:n.value})),u=re(()=>`vc-fab z-fab row inline justify-center vc-fab--align-${e.verticalActionsAlign} ${o.value}`+(n.value===!0?" vc-fab--opened":" vc-fab--closed")),d=re(()=>`vc-fab__actions flex no-wrap inline vc-fab__actions--${e.direction} vc-fab__actions--${n.value===!0?"opened":"closed"}`),h=re(()=>`vc-fab__icon-holder  vc-fab__icon-holder--${n.value===!0?"opened":"closed"}`);function p(b,y){const E=t[b],x=`vc-fab__${b} absolute-full`;return E===void 0?S(ao,{class:x,name:e[y]}):S("div",{class:x},E(c.value))}function v(){const b=[];return e.hideIcon!==!0&&b.push(S("div",{class:h.value},[p("icon","icon"),p("active-icon","activeIcon")])),(e.label!==""||t.label!==void 0)&&b[r.value.action](S("div",r.value.data,t.label!==void 0?t.label(c.value):[e.label])),Oi(t.tooltip,b)}return Gi(Hc,{showing:n,onChildClick(b){e.hideActionOnClick&&s(b),i.value!==null&&i.value.$el.focus()}}),()=>S("div",{class:u.value},[S(sr,{ref:i,class:o.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),S("div",{class:d.value},Xe(t.default))])}});const ih={start:"self-end",center:"self-center",end:"self-start"},Lb=Object.keys(ih),jb={...Kd,icon:{type:String,default:""},stacked:Boolean,anchor:{type:String,validator:e=>Lb.includes(e)},to:[String,Object],replace:Boolean},Fb=X("fabActionProps",jb);var nh=ee({name:"VcFabAction",props:Fb,emits:["click"],setup(e,{slots:t,emit:i}){const n=So(Hc),{formClass:o,labelProps:r}=eh(e,n==null?void 0:n.showing),a=re(()=>{let d;return e.anchor&&(d=ih[e.anchor]),o.value+(d!==void 0?` ${d}`:"")}),s=re(()=>{var d;return e.disable===!0||((d=n==null?void 0:n.showing)==null?void 0:d.value)!==!0});function l(d){var h;(h=n==null?void 0:n.onChildClick)==null||h.call(n,d),i("click",d)}function c(){const d=[];return e.icon!==""&&d.push(S(ao,{name:e.icon})),e.label!==""&&d[r.value.action](S("div",r.value.data,[e.label])),Oi(t.default,d)}const u=ae();return Object.assign(u==null?void 0:u.proxy,{click:l}),()=>S(sr,{class:a.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 kb={name:String};function Rb(e){return re(()=>({type:"hidden",name:e.name,value:e.modelValue}))}function Vb(e={}){return(t,i,n)=>{t[i](S("input",{class:"hidden"+(n||""),...e.value}))}}const oh="vc-slider__marker-labels",$b=e=>({value:e}),Nb=({marker:e})=>S("div",{key:e.value,style:e.style,class:e.classes},e.label),ah=[34,37,40,33,39,38],zb={...qd,...kb,min:{type:Number,default:0},max:{type:Number,default:100},innerMin:Number,innerMax:Number,step:{type:Number,default:1,validator:e=>e>=0},snap:Boolean,vertical:Boolean,reverse:Boolean,hideSelection:Boolean,color:String,markerLabelsClass:String,label:Boolean,labelColor:String,labelTextColor:String,labelAlways:Boolean,switchLabelSide:Boolean,markers:[Boolean,Number],markerLabels:[Boolean,Array,Object,Function],switchMarkerLabelsSide:Boolean,trackImg:String,trackColor:String,innerTrackImg:String,innerTrackColor:String,selectionColor:String,selectionImg:String,thumbSize:{type:String,default:"20px"},trackSize:{type:String,default:"4px"},disable:Boolean,readonly:Boolean,dense:Boolean,tabindex:[String,Number],thumbColor:String,thumbPath:{type:String,default:"M 4, 10 a 6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"}},Gb=["pan","update:modelValue","change"];function Ub({updateValue:e,updatePosition:t,getDragging:i,formAttrs:n}){const{props:o,emit:r,slots:a,proxy:s}=ae(),l=Qd(o),c=Vb(n),u=te(!1),d=te(!1),h=te(!1),p=te(!1),v=re(()=>o.vertical===!0?"--v":"--h"),b=re(()=>"-"+(o.switchLabelSide===!0?"switched":"standard")),y=re(()=>o.reverse===!0),E=re(()=>isNaN(o.innerMin)===!0||o.innerMin<o.min?o.min:o.innerMin),x=re(()=>isNaN(o.innerMax)===!0||o.innerMax>o.max?o.max:o.innerMax),g=re(()=>o.disable!==!0&&o.readonly!==!0&&E.value<x.value),w=re(()=>(String(o.step).trim().split(".")[1]||"").length),O=re(()=>o.step===0?1:o.step),I=re(()=>g.value===!0?o.tabindex||0:-1),R=re(()=>o.max-o.min),D=re(()=>x.value-E.value),M=re(()=>z(E.value)),k=re(()=>z(x.value)),$=re(()=>o.vertical===!0?y.value===!0?"bottom":"top":y.value===!0?"right":"left"),V=re(()=>o.vertical===!0?"height":"width"),m=re(()=>o.vertical===!0?"width":"height"),f=re(()=>o.vertical===!0?"vertical":"horizontal"),C=re(()=>{const ue={role:"slider","aria-valuemin":E.value,"aria-valuemax":x.value,"aria-orientation":f.value,"data-step":o.step};return o.disable===!0?ue["aria-disabled"]="true":o.readonly===!0&&(ue["aria-readonly"]="true"),ue}),T=re(()=>`vc-slider vc-slider${v.value} vc-slider--${u.value===!0?"":"in"}active inline no-wrap `+(o.vertical===!0?"row":"column")+(o.disable===!0?" disabled":" vc-slider--enabled"+(g.value===!0?" vc-slider--editable":""))+(h.value==="both"?" vc-slider--focus":"")+(o.label||o.labelAlways===!0?" vc-slider--label":"")+(o.labelAlways===!0?" vc-slider--label-always":"")+(l.value===!0?" vc-slider--dark":"")+(o.dense===!0?" vc-slider--dense vc-slider--dense"+v.value:""));function _(ue){const De="vc-slider__"+ue;return`${De} ${De}${v.value} ${De}${v.value}${b.value}`}function P(ue){const De="vc-slider__"+ue;return`${De} ${De}${v.value}`}const A=re(()=>{const ue=o.selectionColor||o.color;return"vc-slider__selection absolute"+(ue!==void 0?` text-${ue}`:"")}),L=re(()=>P("markers")+" absolute overflow-hidden"),B=re(()=>P("track-container")),F=re(()=>_("pin")),q=re(()=>_("label")),Z=re(()=>_("text-container")),H=re(()=>_("marker-labels-container")+(o.markerLabelsClass!==void 0?` ${o.markerLabelsClass}`:"")),N=re(()=>"vc-slider__track relative-position no-outline"+(o.trackColor!==void 0?` bg-${o.trackColor}`:"")),j=re(()=>{const ue={[m.value]:o.trackSize};return o.trackImg!==void 0&&(ue.backgroundImage=`url(${o.trackImg}) !important`),ue}),G=re(()=>"vc-slider__inner absolute"+(o.innerTrackColor!==void 0?` bg-${o.innerTrackColor}`:"")),J=re(()=>{const ue={[$.value]:`${100*M.value}%`,[V.value]:`${100*(k.value-M.value)}%`};return o.innerTrackImg!==void 0&&(ue.backgroundImage=`url(${o.innerTrackImg}) !important`),ue});function U(ue){const{min:De,max:Fe,step:Le}=o;let $e=De+ue*(Fe-De);if(Le>0){const mt=($e-De)%Le;$e+=(Math.abs(mt)>=Le/2?(mt<0?-1:1)*Le:0)-mt}return w.value>0&&($e=parseFloat($e.toFixed(w.value))),Gn($e,E.value,x.value)}function z(ue){return R.value===0?0:(ue-o.min)/R.value}function K(ue,De){const Fe=Qi(ue),Le=o.vertical===!0?Gn((Fe.top-De.top)/De.height,0,1):Gn((Fe.left-De.left)/De.width,0,1);return Gn(y.value===!0?1-Le:Le,M.value,k.value)}const Q=re(()=>Eg(o.markers)===!0?o.markers:O.value),ie=re(()=>{const ue=[],De=Q.value,Fe=o.max;let Le=o.min;do ue.push(Le),Le+=De;while(Le<Fe);return ue.push(Fe),ue}),Y=re(()=>{const ue=` ${oh}${v.value}-`;return oh+`${ue}${o.switchMarkerLabelsSide===!0?"switched":"standard"}${ue}${y.value===!0?"rtl":"ltr"}`}),oe=re(()=>o.markerLabels===!1?null:Ce(o.markerLabels).map((ue,De)=>({index:De,value:ue.value,label:ue.label||ue.value,classes:Y.value+(ue.classes!==void 0?" "+ue.classes:""),style:{...me(ue.value),...ue.style||{}}}))),le=re(()=>({markerList:oe.value,markerMap:be.value,classes:Y.value,getStyle:me})),fe=re(()=>{if(D.value!==0){const ue=100*Q.value/D.value;return{...J.value,backgroundSize:o.vertical===!0?`2px ${ue}%`:`${ue}% 2px`}}return null});function Ce(ue){if(ue===!1)return null;if(ue===!0)return ie.value.map($b);if(typeof ue=="function")return ie.value.map(Fe=>{const Le=ue(Fe);return Di(Le)===!0?{...Le,value:Fe}:{value:Fe,label:Le}});const De=({value:Fe})=>Fe>=o.min&&Fe<=o.max;return Array.isArray(ue)===!0?ue.map(Fe=>Di(Fe)===!0?Fe:{value:Fe}).filter(De):Object.keys(ue).map(Fe=>{const Le=ue[Fe],$e=Number(Fe);return Di(Le)===!0?{...Le,value:$e}:{value:$e,label:Le}}).filter(De)}function me(ue){return{[$.value]:`${100*(ue-o.min)/R.value}%`}}const be=re(()=>{if(o.markerLabels===!1)return null;const ue={};return oe.value.forEach(De=>{ue[De.value]=De}),ue});function _e(){if(a["marker-label-group"]!==void 0)return a["marker-label-group"](le.value);const ue=a["marker-label"]||Nb;return oe.value.map(De=>ue({marker:De,...le.value}))}const ye=re(()=>[[ay,ge,void 0,{[f.value]:!0,prevent:!0,stop:!0,mouse:!0,mouseAllDir:!0}]]);function ge(ue){ue.isFinal===!0?(p.value!==void 0&&(t(ue.evt),ue.touch===!0&&e(!0),p.value=void 0,r("pan","end")),u.value=!1,h.value=!1):ue.isFirst===!0?(p.value=i(ue.evt),t(ue.evt),e(),u.value=!0,r("pan","start")):(t(ue.evt),e())}function Te(){h.value=!1}function W(ue){t(ue,i(ue)),e(),d.value=!0,u.value=!0,document.addEventListener("mouseup",ce,!0)}function ce(){d.value=!1,u.value=!1,e(!0),Te(),document.removeEventListener("mouseup",ce,!0)}function Ee(ue){t(ue,i(ue)),e(!0)}function de(ue){ah.includes(ue.keyCode)&&e(!0)}function nt(ue){if(o.vertical===!0)return null;const De=ue;return{transform:`translateX(calc(${2*De-1} * ${o.thumbSize} / 2 + ${50-100*De}%))`}}function qt(ue){const De=re(()=>d.value===!1&&(h.value===ue.focusValue||h.value==="both")?" vc-slider--focus":""),Fe=re(()=>`vc-slider__thumb vc-slider__thumb${v.value} vc-slider__thumb${v.value}-${y.value===!0?"rtl":"ltr"} absolute non-selectable`+De.value+(ue.thumbColor.value!==void 0?` text-${ue.thumbColor.value}`:"")),Le=re(()=>({width:o.thumbSize,height:o.thumbSize,[$.value]:`${100*ue.ratio.value}%`,zIndex:h.value===ue.focusValue?2:void 0})),$e=re(()=>ue.labelColor.value!==void 0?` text-${ue.labelColor.value}`:""),mt=re(()=>nt(ue.ratio.value)),ot=re(()=>"vc-slider__text"+(ue.labelTextColor.value!==void 0?` text-${ue.labelTextColor.value}`:""));return()=>{const at=[S("svg",{class:"vc-slider__thumb-shape absolute-full",viewBox:"0 0 20 20","aria-hidden":"true"},[S("path",{d:o.thumbPath})]),S("div",{class:"vc-slider__focus-ring fit"})];return(o.label===!0||o.labelAlways===!0)&&(at.push(S("div",{class:F.value+" absolute fit no-pointer-events"+$e.value},[S("div",{class:q.value,style:{minWidth:o.thumbSize}},[S("div",{class:Z.value,style:mt.value},[S("span",{class:ot.value},ue.label.value)])])])),o.name!==void 0&&o.disable!==!0&&c(at,"push")),S("div",{class:Fe.value,style:Le.value,...ue.getNodeData()},at)}}function Re(ue,De,Fe,Le){const $e=[];o.innerTrackColor!=="transparent"&&$e.push(S("div",{key:"inner",class:G.value,style:J.value})),o.selectionColor!=="transparent"&&$e.push(S("div",{key:"selection",class:A.value,style:ue.value})),o.markers!==!1&&$e.push(S("div",{key:"marker",class:L.value,style:fe.value})),Le($e);const mt=[_d("div",{key:"trackC",class:B.value,tabindex:De.value,...Fe.value},[S("div",{class:N.value,style:j.value},$e)],"slide",g.value,()=>ye.value)];if(o.markerLabels!==!1){const ot=o.switchMarkerLabelsSide===!0?"unshift":"push";mt[ot](S("div",{key:"markerL",class:H.value},_e()))}return mt}return on(()=>{document.removeEventListener("mouseup",ce,!0)}),{state:{active:u,focus:h,preventFocus:d,dragging:p,editable:g,classes:T,tabindex:I,attributes:C,step:O,decimals:w,trackLen:R,innerMin:E,innerMinRatio:M,innerMax:x,innerMaxRatio:k,positionProp:$,sizeProp:V,isReversed:y},methods:{onActivate:W,onMobileClick:Ee,onBlur:Te,onKeyup:de,getContent:Re,getThumbRenderFn:qt,convertRatioToModel:U,convertModelToRatio:z,getDraggingRatio:K}}}const Hb=()=>({}),Wb=X("sliderProps",{...zb,modelValue:{required:!0,default:null,validator:e=>typeof e=="number"||e===null},labelValue:[String,Number]});var rh=ee({name:"VcSlider",props:Wb,emits:Gb,setup(e,{emit:t}){const{state:i,methods:n}=Ub({updateValue:p,updatePosition:b,getDragging:v,formAttrs:Rb(e)}),o=te(null),r=te(0),a=te(0);function s(){a.value=e.modelValue===null?i.innerMin.value:Gn(e.modelValue,i.innerMin.value,i.innerMax.value)}he(()=>`${e.modelValue}|${i.innerMin.value}|${i.innerMax.value}`,s),s();const l=re(()=>n.convertModelToRatio(a.value)),c=re(()=>i.active.value===!0?r.value:l.value),u=re(()=>{const x={[i.positionProp.value]:`${100*i.innerMinRatio.value}%`,[i.sizeProp.value]:`${100*(c.value-i.innerMinRatio.value)}%`};return e.selectionImg!==void 0&&(x.backgroundImage=`url(${e.selectionImg}) !important`),x}),d=n.getThumbRenderFn({focusValue:!0,getNodeData:Hb,ratio:c,label:re(()=>e.labelValue!==void 0?e.labelValue:a.value),thumbColor:re(()=>e.thumbColor||e.color),labelColor:re(()=>e.labelColor),labelTextColor:re(()=>e.labelTextColor)}),h=re(()=>i.editable.value!==!0?{}:ut().isPhone===!0?{onClick:n.onMobileClick}:{onMousedown:n.onActivate,onFocus:y,onBlur:n.onBlur,onKeydown:E,onKeyup:n.onKeyup});function p(x){a.value!==e.modelValue&&t("update:modelValue",a.value),x===!0&&t("change",a.value)}function v(){return o.value.getBoundingClientRect()}function b(x,g=i.dragging.value){const w=n.getDraggingRatio(x,g);a.value=n.convertRatioToModel(w),r.value=e.snap!==!0||e.step===0?w:n.convertModelToRatio(a.value)}function y(){i.focus.value=!0}function E(x){if(!ah.includes(x.keyCode))return;Zi(x);const g=([34,33].includes(x.keyCode)?10:1)*i.step.value,w=([34,37,40].includes(x.keyCode)?-1:1)*(i.isReversed.value===!0?-1:1)*(e.vertical===!0?-1:1)*g;a.value=Gn(parseFloat((a.value+w).toFixed(i.decimals.value)),i.innerMin.value,i.innerMax.value),p()}return()=>{const x=n.getContent(u,i.tabindex,h,g=>{g.push(d())});return S("div",{ref:o,class:i.classes.value+(e.modelValue===null?" vc-slider--no-value":""),...i.attributes.value,"aria-valuenow":e.modelValue},x)}}});[sr,ao,Ed,Pd,xd,Od,Md,Sd,Td,Id,Ad,Dd,Bd,Ol,Ud,Wd,Yd,th,nh,rh].forEach(e=>{e.install=t=>{t.component(e.name,e)}});const li=sr,vn=ao,sh=Ed,ur=Pd,lh=xd,ch=Od,uh=Md,Il=Sd,Al=Td,Dl=Id,Bl=Ad,dh=Dd,Ll=Bd,hh=Ol,Dt=Ud,mh=Wd,jl=Yd,Fl=th,dr=nh,ph=rh;X({VcBtn:li,VcIcon:vn,VcSpinnerBall:sh,VcSpinnerBars:ur,VcSpinnerDots:lh,VcSpinnerGears:ch,VcSpinnerHourglass:uh,VcSpinnerIos:Il,VcSpinnerOrbit:Al,VcSpinnerOval:Dl,VcSpinnerPuff:Bl,VcSpinnerRings:dh,VcSpinnerTail:Ll,VcSpinner:hh,VcTooltip:Dt,VcAjaxBar:mh,VcSkeleton:jl,VcFab:Fl,VcFabAction:dr,VcSlider:ph});const we={beforeLoad:e=>!0,ready:e=>!0,unready:e=>!0,destroyed:e=>!0},ia={mousedown:e=>!0,mouseup:e=>!0,click:e=>!0,clickout:e=>!0,dblclick:e=>!0,mousemove:e=>!0,mouseover:e=>!0,mouseout:e=>!0},na={...we,definitionChanged:e=>!0},ht={...we,errorEvent:e=>!0,readyPromise:(e,t,i)=>!0},fi={...we,...ia,readyPromise:(e,t,i)=>!0,"update:geometryInstances":e=>!0},Ii={...we,...ia},oa={...we,...ia,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,o,r,a)=>!0},xt={...we,activeEvt:(e,t)=>!0,drawEvt:(e,t)=>!0,editorEvt:(e,t)=>!0,mouseEvt:(e,t)=>!0};X({commonEmits:we,pickEventEmits:ia,graphicsEmits:na,providerEmits:ht,primitiveEmits:fi,primitiveCollectionEmits:Ii,datasourceEmits:oa,drawingEmit:xt});const qb={...we,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 hr=ee({name:"VcViewer",props:jy,emits:qb,setup(e,t){const i=ae();i.cesiumEvents=["selectedEntityChanged","trackedEntityChanged"],i.cesiumMembersEvents=bd;const n=Fy(e,t,i),o=re(()=>e.containerId||t.attrs.id||"cesiumContainer");Gi(an,n.getServices()),i.appContext.config.globalProperties.$VueCesium=i.appContext.config.globalProperties.$VueCesium||{},i.appContext.config.globalProperties.$VueCesium[o.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,getInstance:()=>i});const r=a=>{t.emit("touchEnd",a)};return()=>{var a;const s=[];return st(e.skeleton)&&!n.isReady.value?s.push(S(jl,{...e.skeleton,style:{background:e.skeleton.color,width:"100%",height:"100%"}})):s.push(ne("v-if")),s.push(ne("vc-viewer"),Gr(S("div",{ref:n.viewerRef,class:se(((a=i.proxy)==null?void 0:a.$options.name)||""),id:o.value,style:t.attrs.style||{width:"100%",height:"100%"}},Xe(t.slots.default)),[[sl,r,e.touchHoldArg]])),s}}});hr.install=(e,t)=>{e.component(hr.name,hr)};const vh=hr,Qb=X("VcViewer",vh),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 gi(e,t){const i=re(()=>{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=te(0),o=te(0),r=te(0),a=te(0),s=re(()=>{let c=0,u=0;const d=i.value,h=1;d.top===!0&&n.value!==0?u=`${n.value}px`:d.bottom===!0&&a.value!==0&&(u=`${-a.value}px`),d.left===!0&&r.value!==0?c=`${h*r.value}px`:d.right===!0&&o.value!==0&&(c=`${-h*o.value}px`);const p={transform:`translate(${c}, ${u})`};return e.offset&&(p.margin=`${e.offset[1]}px ${e.offset[0]}px`),d.vertical===!0?(r.value!==0&&(p.right=`${r.value}px`),o.value!==0&&(p.left=`${o.value}px`)):d.horizontal===!0&&(n.value!==0&&(p.top=`${n.value}px`),a.value!==0&&(p.bottom=`${a.value}px`)),typeof e.teleportToViewer=="undefined"||e.teleportToViewer?p:{}}),l=re(()=>typeof e.teleportToViewer=="undefined"||e.teleportToViewer?`absolute absolute-${e.position}`:"relative-position");return{attach:i,style:s,classes:l}}const kl={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}},Rl=wi(kl);class fh{static createTween(t,i){const{Cartesian2:n,Cartesian3:o,defaultValue:r,defined:a,DeveloperError:s,EasingFunction:l,Math:c,SceneMode:u}=Cesium;i=r(i,{});let d=i.destination;if(!a(t))throw new s("scene is required.");if(!a(d))throw new s("destination is required.");const h=t.mode;if(h===u.MORPHING)return $l();const p=r(i.convert,!0),v=t.mapProjection,b=v.ellipsoid,y=i.maximumHeight,E=i.flyOverLongitude,x=i.flyOverLongitudeWeight,g=i.pitchAdjustHeight;let w=i.easingFunction;p&&h!==u.SCENE3D&&(b.cartesianToCartographic(d,bh),d=v.project(bh,a1));const O=t.camera,I=i.endTransform;a(I)&&O._setTransform(I);let R=i.duration;a(R)||(R=Math.ceil(o.distance(O.position,d)/1e6)+2,R=Math.min(R,3));const D=r(i.heading,0),M=r(i.pitch,-c.PI_OVER_TWO),k=r(i.roll,0),$=t.screenSpaceCameraController;$.enableInputs=!1;const V=Ch($,i.complete),m=Ch($,i.cancel),f=O.frustum;let C=t.mode===u.SCENE2D;if(C=C&&n.equalsEpsilon(O.position,d,c.EPSILON6),C=C&&c.equalsEpsilon(Math.max(f.right-f.left,f.top-f.bottom),d.z,c.EPSILON6),C=C||t.mode!==u.SCENE2D&&o.equalsEpsilon(d,O.position,c.EPSILON10),C=C&&c.equalsEpsilon(c.negativePiToPi(D),c.negativePiToPi(O.heading),c.EPSILON10)&&c.equalsEpsilon(c.negativePiToPi(M),c.negativePiToPi(O.pitch),c.EPSILON10)&&c.equalsEpsilon(c.negativePiToPi(k),c.negativePiToPi(O.roll),c.EPSILON10),C)return $l(V,m);const T=new Array(4);if(T[u.SCENE2D]=o1,T[u.SCENE3D]=n1,T[u.COLUMBUS_VIEW]=Yb,R<=0)return $l(function(){T[h](t,1,d,D,M,k,y,E,x,g)({time:1}),typeof V=="function"&&V()},m);const _=T[h](t,R,d,D,M,k,y,E,x,g);if(!a(w)){const P=O.positionCartographic.height,A=h===u.SCENE3D?b.cartesianToCartographic(d).height:d.z;P>A&&P>11500?w=l.CUBIC_OUT:w=l.QUINTIC_IN_OUT}return{duration:R,easingFunction:w,startObject:{time:0},stopObject:{time:R},update:_,complete:V,cancel:m}}}function Zb(e,t,i){const{PerspectiveFrustum:n,PerspectiveOffCenterFrustum:o}=Cesium;let r,a,s;if(e instanceof n){const l=Math.tan(.5*e.fovy);return r=e.near,a=e.near*l,s=e.aspectRatio*a,Math.max(t*r/s,i*r/a)}else if(e instanceof o)return r=e.near,a=e.top,s=e.right,Math.max(t*r/s,i*r/a);return Math.max(t,i)}const Jb={},gh={};function Xb(e,t,i,n){const{defined:o,Math:r}=Cesium;if(o(n)&&i(.5)>n){const a=i(0),s=i(1),l=i(.5),c=l-a,u=l-s;return function(d){const h=i(d);if(d<=.5){const v=(h-a)/c;return r.lerp(e,-r.PI_OVER_TWO,v)}const p=(h-s)/u;return r.lerp(-r.PI_OVER_TWO,t,1-p)}}return function(a){return r.lerp(e,t,a)}}function Vl(e,t,i,n,o){const{Cartesian3:r,defined:a,Math:s}=Cesium;let l=o;const c=Math.max(i,n);if(!a(l)){const u=e.position,d=t,h=e.up,p=e.right,v=e.frustum,b=r.subtract(u,d,Jb),y=r.magnitude(r.multiplyByScalar(h,r.dot(b,h),gh)),E=r.magnitude(r.multiplyByScalar(p,r.dot(b,p),gh));l=Math.min(Zb(v,y,E)*.2,1e9)}if(c<l){const u=-Math.pow((l-i)*1e6,.125),d=Math.pow((l-n)*1e6,1/8);return function(h){const p=h*(d-u)+u;return-Math.pow(p,8)/1e6+l}}return function(u){return s.lerp(i,n,u)}}function aa(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 yh={};function Yb(e,t,i,n,o,r,a){const{Cartesian2:s,Cartesian3:l,Math:c}=Cesium,u=e.camera,d=l.clone(u.position,yh),h=u.pitch,p=aa(u.heading,n),v=aa(u.roll,r),b=Vl(u,i,d.z,i.z,a);function y(E){const x=E.time/t;u.setView({orientation:{heading:c.lerp(p,n,x),pitch:c.lerp(h,o,x),roll:c.lerp(v,r,x)}}),s.lerp(d,i,x,u.position),u.position.z=b(x)}return y}function Kb(e,t){const{Math:i}=Cesium;e.longitude<t.longitude?e.longitude+=i.TWO_PI:t.longitude+=i.TWO_PI}function e1(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 t1={},i1={};function n1(e,t,i,n,o,r,a,s,l,c){const{Cartesian3:u,Cartographic:d,defined:h,Math:p}=Cesium,v=e.camera,b=e.mapProjection.ellipsoid,y=d.clone(v.positionCartographic,t1),E=v.pitch,x=aa(v.heading,n),g=aa(v.roll,r),w=b.cartesianToCartographic(i,i1);y.longitude=p.zeroToTwoPi(y.longitude),w.longitude=p.zeroToTwoPi(w.longitude);let O=!1;if(h(s)){const M=p.zeroToTwoPi(s),k=Math.min(y.longitude,w.longitude),$=Math.max(y.longitude,w.longitude),V=M>=k&&M<=$;if(h(l)){const m=Math.abs(y.longitude-w.longitude),f=p.TWO_PI-m;(V?m:f)<(V?f:m)*l&&!V&&(O=!0)}else V||(O=!0)}O?Kb(y,w):e1(y,w);const I=Vl(v,i,y.height,w.height,a),R=Xb(E,o,I,c);function D(){const M=y.longitude,k=w.longitude,$=y.latitude,V=w.latitude;return function(m){const f=m.time/t,C=u.fromRadians(p.lerp(M,k,f),p.lerp($,V,f),I(f),e.globe.ellipsoid);v.setView({destination:C,orientation:{heading:p.lerp(x,n,f),pitch:R(f),roll:p.lerp(g,r,f)}})}}return D()}function o1(e,t,i,n,o,r,a){const{Cartesian2:s,Cartesian3:l,Math:c}=Cesium,u=e.camera,d=l.clone(u.position,yh),h=aa(u.heading,n),p=u.frustum.right-u.frustum.left,v=Vl(u,i,p,i.z,a);function b(y){const E=y.time/t;u.setView({orientation:{heading:c.lerp(h,n,E)}}),s.lerp(d,i,E,u.position);const x=v(E),g=u.frustum,w=g.top/g.right,O=(x-(g.right-g.left))*.5;g.right+=O,g.left-=O,g.top=w*g.right,g.bottom=-g.top}return b}const bh={},a1={};function $l(e,t){return{startObject:{},stopObject:{},duration:0,complete:e,cancel:t}}function Ch(e,t){function i(){typeof t=="function"&&t(),e.enableInputs=!0}return i}function r1(e,{emit:t},i){const n={},o={},r={},a={};let s,l,c,u,d;const h=te(0),p=te(0),v=te(0);let b=0,y={},E=!1,x,g,w=0,O={},I=0;const R=te(null),D=te(null),M=C=>{var T,_;C.stopPropagation&&C.stopPropagation(),C.preventDefault&&C.preventDefault(),(T=ve(R))==null||T.hide(),(_=ve(D))==null||_.hide();const{SceneMode:P,Cartesian2:A}=Cesium;if(i.viewer.scene.mode===P.MORPHING)return!0;const L=C.currentTarget,B=L.getBoundingClientRect(),F=B.width/2,q=new A((B.right-B.left)/2,(B.bottom-B.top)/2);let Z;C instanceof MouseEvent?Z=new A(C.clientX-B.left,C.clientY-B.top):C instanceof TouchEvent&&(Z=new A(C.changedTouches[0].clientX-B.left,C.changedTouches[0].clientY-B.top));const H=A.subtract(Z,q,n),N=A.magnitude(H)/F;if(N<50/145)m(L,H);else if(N<1)f(L,H);else return!0},k=C=>{const{Cartesian2:T,Cartesian3:_,defined:P,Ellipsoid:A,Matrix4:L,Ray:B,SceneMode:F,Transforms:q}=Cesium,{viewer:Z}=i,H=Z.scene,N=H.camera,j=H.screenSpaceCameraController;if(H.mode===F.MORPHING||!j.enableInputs)return!0;if(H.mode===F.COLUMBUS_VIEW&&!j.enableTranslate||(H.mode===F.SCENE3D||H.mode===F.COLUMBUS_VIEW)&&(!j.enableLook||H.mode===F.SCENE3D&&!j.enableRotate))return;const G=new T;G.x=H.canvas.clientWidth/2,G.y=H.canvas.clientHeight/2;const J=new B,U=N.getPickRay(G,J),z=H.globe.pick(U,H,a);if(!Di(z)||!P(z)){Z.camera.flyHome();return}const K=Se(i,"compassEvt");K&&t("compassEvt",{type:"reset",camera:Z.camera,status:"start",target:C.currentTarget});const Q=q.eastNorthUpToFixedFrame(z,Z.scene.globe.ellipsoid),ie=_.subtract(z,N.position,new _),Y=fh.createTween(H,{destination:L.multiplyByPoint(Q,new _(0,0,_.magnitude(ie)),new _),direction:L.multiplyByPointAsVector(Q,new _(0,0,-1),new _),up:L.multiplyByPointAsVector(Q,new _(0,1,0),new _),duration:e.duration,complete:()=>{K&&t("compassEvt",{type:"reset",camera:Z.camera,status:"end",target:C.currentTarget})},cancel:()=>{K&&t("compassEvt",{type:"reset",camera:Z.camera,status:"cancel",target:C.currentTarget})}});H.tweens.add(Y)},$=()=>{v.value=0,p.value=0},V=()=>{const{defined:C}=Cesium;C(i.viewer)?(s&&(s(),s=void 0),s=i.viewer.scene.postRender.addEventListener(function(){h.value!==i.viewer.scene.camera.heading&&(h.value=i.viewer.scene.camera.heading)})):s&&(s(),s=void 0)},m=(C,T)=>{const{Cartesian2:_,Cartesian3:P,defined:A,getTimestamp:L,Math:B,Matrix4:F,Ray:q,SceneMode:Z,Transforms:H}=Cesium;let N=i.viewer.scene,j=N.camera;const G=N.screenSpaceCameraController;if(N.mode===Z.MORPHING||!G.enableInputs)return;switch(N.mode){case Z.COLUMBUS_VIEW:if(G.enableLook)break;if(!G.enableTranslate||!G.enableTilt)return;break;case Z.SCENE3D:if(G.enableLook)break;if(!G.enableTilt||!G.enableRotate)return;break;case Cesium.SceneMode.SCENE2D:if(!G.enableTranslate)return;break}const J=Se(i,"compassEvt");J&&t("compassEvt",{type:"orbit",camera:N.camera,status:"start",target:C}),document.removeEventListener("mousemove",c,!1),document.removeEventListener("mouseup",u,!1),document.removeEventListener("touchmove",c,!1),document.removeEventListener("touchend",u,!1),A(d)&&i.viewer.clock.onTick.removeEventListener(d),c=void 0,u=void 0,d=void 0,b=L();const U=new _;U.x=N.canvas.clientWidth/2,U.y=N.canvas.clientHeight/2;const z=new q,K=j.getPickRay(U,z),Q=N.globe.pick(K,N,a);A(Q)?(y=H.eastNorthUpToFixedFrame(Q||new Cesium.Cartesian3,N.globe.ellipsoid,r),E=!1):(y=H.eastNorthUpToFixedFrame(j.positionWC,N.globe.ellipsoid,r),E=!0),d=function(Y){const oe=L(),le=oe-b,fe=(v.value-.5)*2.5/1e3,Ce=le*fe,me=p.value+B.PI_OVER_TWO,be=Math.cos(me)*Ce,_e=Math.sin(me)*Ce;N=i.viewer.scene,j=N.camera;const ye=F.clone(j.transform,o);j.lookAtTransform(y),E?(j.look(P.UNIT_Z,-be),j.look(j.right,-_e)):(j.rotateLeft(be),j.rotateUp(_e)),j.lookAtTransform(ye),b=oe};function ie(Y,oe){const le=Math.atan2(-Y.y,Y.x);p.value=B.zeroToTwoPi(le-B.PI_OVER_TWO);const fe=_.magnitude(Y),Ce=oe/2,me=Math.min(fe/Ce,1),be=.5*me*me+.5;v.value=be}c=function(Y){const oe=C.getBoundingClientRect(),le=new _((oe.right-oe.left)/2,(oe.bottom-oe.top)/2);let fe;Y instanceof MouseEvent?fe=new _(Y.clientX-oe.left,Y.clientY-oe.top):Y instanceof TouchEvent&&(fe=new _(Y.changedTouches[0].clientX-oe.left,Y.changedTouches[0].clientY-oe.top));const Ce=_.subtract(fe,le,n);ie(Ce,oe.width),J&&t("compassEvt",{type:"orbit",camera:N.camera,status:"changing",target:C})},u=function(Y){document.removeEventListener("mousemove",c,!1),document.removeEventListener("mouseup",u,!1),document.removeEventListener("touchmove",c,!1),document.removeEventListener("touchend",u,!1),A(d)&&i.viewer.clock.onTick.removeEventListener(d),c=void 0,u=void 0,d=void 0,$(),J&&t("compassEvt",{type:"orbit",camera:N.camera,status:"end",target:C})},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),ie(T,C.getBoundingClientRect().width)},f=(C,T)=>{if(!e.enableCompassOuterRing)return;const _=i.viewer.scene;let P=_.camera;const A=_.screenSpaceCameraController;if(_.mode===Cesium.SceneMode.MORPHING||_.mode===Cesium.SceneMode.SCENE2D||!A.enableInputs||!A.enableLook&&(_.mode===Cesium.SceneMode.COLUMBUS_VIEW||_.mode===Cesium.SceneMode.SCENE3D&&!A.enableRotate))return;document.removeEventListener("mousemove",g,!1),document.removeEventListener("touchmove",g,!1),document.removeEventListener("mouseup",x,!1),document.removeEventListener("touchend",x,!1);const{Cartesian2:L,Cartesian3:B,defined:F,Math:q,Matrix4:Z,Ray:H,Transforms:N}=Cesium;g=void 0,x=void 0;const j=Se(i,"compassEvt");j&&t("compassEvt",{type:"rotate",camera:_.camera,status:"start",target:C}),w=Math.atan2(-T.y,T.x);const G=new L;G.x=_.canvas.clientWidth/2,G.y=_.canvas.clientHeight/2;const J=new H,U=P.getPickRay(G,J),z=_.globe.pick(U,_,a);F(z)?O=N.eastNorthUpToFixedFrame(z||new B,_.globe.ellipsoid,r):O=N.eastNorthUpToFixedFrame(P.positionWC,_.globe.ellipsoid,r);let K=Z.clone(P.transform,o);P.lookAtTransform(O),I=Math.atan2(P.position.y,P.position.x),B.magnitude(new B(P.position.x,P.position.y,0)),P.lookAtTransform(K),g=function(Q){const ie=C.getBoundingClientRect(),Y=new L((ie.right-ie.left)/2,(ie.bottom-ie.top)/2);let oe;Q instanceof MouseEvent?oe=new L(Q.clientX-ie.left,Q.clientY-ie.top):Q instanceof TouchEvent&&(oe=new L(Q.changedTouches[0].clientX-ie.left,Q.changedTouches[0].clientY-ie.top));const le=L.subtract(oe,Y,n),fe=Math.atan2(-le.y,le.x)-w,Ce=q.zeroToTwoPi(I-fe);P=i.viewer.scene.camera,K=Z.clone(P.transform,o),P.lookAtTransform(O);const me=Math.atan2(P.position.y,P.position.x);P.rotateRight(Ce-me),P.lookAtTransform(K),j&&t("compassEvt",{type:"rotate",camera:_.camera,status:"changing",target:C})},x=function(Q){document.removeEventListener("mousemove",g,!1),document.removeEventListener("touchmove",g,!1),document.removeEventListener("mouseup",x,!1),document.removeEventListener("touchend",x,!1),g=void 0,x=void 0,j&&t("compassEvt",{type:"rotate",camera:_.camera,status:"end",target:C})},document.addEventListener("mousemove",g,!1),document.addEventListener("touchmove",g,!1),document.addEventListener("mouseup",x,!1),document.addEventListener("touchend",x,!1)};return{heading:h,orbitCursorAngle:p,orbitCursorOpacity:v,handleDoubleClick:k,handleMouseDown:M,resetRotater:$,onTooltipBeforeShow:C=>{(g!==void 0||c!==void 0)&&(C.cancel=!0)},viewerChange:V,load:async C=>(i.viewer=C,V(),!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:D}}const s1={...we,compassEvt:e=>!0},l1=X("compassProps",kl);var Nl=ee({name:"VcCompass",props:l1,emits:s1,setup(e,t){var i;const n=ae();n.cesiumClass="VcCompass";const o=ze(e,t,n);if(o===void 0)return;const{t:r}=_t(),a=St(n),{$services:s}=o,l=r1(e,t,n),c=gi(e),u=te(null),d=te(null),h=((i=a.proxy)==null?void 0:i.$options.name)==="VcNavigation",p=te(h),v=xe({});he(()=>e,I=>{Be(()=>{n.mounted&&O()})},{deep:!0});const b=re(()=>Object.assign({},Rl.innerOptions,e.innerOptions)),y=re(()=>Object.assign({},Rl.outerOptions,e.outerOptions)),E=re(()=>Object.assign({},Rl.markerOptions,e.markerOptions)),x=re(()=>({transform:"translate(-50%,-50%) rotate(-"+l.heading.value+"rad)",WebkitTransform:"translate(-50%,-50%) rotate(-"+l.heading.value+"rad)",opacity:void 0,background:y.value.background,color:y.value.color})),g=re(()=>({transform:"rotate(-"+l.orbitCursorAngle.value+"rad)",WebkitTransform:"rotate(-"+l.orbitCursorAngle.value+"rad)",opacity:l.orbitCursorOpacity.value,color:E.value.color})),w=re(()=>({background:b.value.background,color:b.value.color}));n.createCesiumObject=async()=>u,n.mount=async()=>{var I;p.value=!0,Be(()=>{O()});const{viewer:R}=s;return(I=R.viewerWidgetResized)==null||I.raiseEvent({type:n.cesiumClass,status:"mounted",target:ve(u)}),l.load(s.viewer)},n.unmount=async()=>{var I;p.value=!1;const{viewer:R}=s;return(I=R.viewerWidgetResized)==null||I.raiseEvent({type:n.cesiumClass,status:"unmounted",target:ve(u)}),l.unload()};const O=()=>{var I;const R=c.style.value,D=(I=ve(d))==null?void 0:I.$el;if(D!==void 0){const M=D.getBoundingClientRect();R.width=`${M.width}px`,R.height=`${M.height}px`}if(typeof e.teleportToViewer=="undefined"||e.teleportToViewer){v.left=R.left,v.top=R.top,v.transform=R.transform;const M=c.attach.value;D!==void 0&&((M.bottom||M.top)&&!M.left&&!M.right&&(R.left="50%",R.transform="translate(-50%, 0)"),(M.left||M.right)&&!M.top&&!M.bottom&&(R.top="50%",R.transform="translate(0, -50%)"))}Object.assign(v,R)};return()=>{if(p.value){let I=[];I=Oi(t.slots.default,I),I.push(S(li,{ref:d,class:"vc-compass-outerRing absolute-center",style:x.value,size:y.value.size,dense:!0,round:!0,disabled:!e.enableCompassOuterRing},()=>[S(vn,{size:y.value.size,name:y.value.icon}),y.value.tooltip?S(Dt,{ref:l.iconOuterTooltipRef,...y.value.tooltip,onBeforeShow:l.onTooltipBeforeShow},()=>S("strong",{},y.value.tooltip.tip||r("vc.navigation.compass.outerTip"))):ne("v-if")])),I.push(S(li,{class:"vc-compass-innerRing absolute-center",style:w.value,size:b.value.size,dense:!0,round:!0},()=>[S(vn,{size:b.value.size,name:b.value.icon}),b.value.tooltip?S(Dt,{ref:l.iconInnerTooltipRef,...b.value.tooltip,onBeforeShow:l.onTooltipBeforeShow},()=>S("strong",{},b.value.tooltip.tip||r("vc.navigation.compass.innerTip"))):ne("v-if")])),I.push(g.value.opacity?S(li,{class:"vc-compass-rotation-marker absolute-center",dense:!0,round:!0},()=>[S(vn,{size:E.value.size,name:E.value.icon,style:g.value})]):ne("v-if"));const R=S("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},I);return!h&&e.teleportToViewer?S(Ui,{to:s.viewer._element},R):R}else return ne("v-if")}}});const zl={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}},Gl=wi(zl);function c1(e,{emit:t},i,n){const o=te(null),r=te(null),a=te(null),s=h=>{c(1/e.zoomAmount,h)},l=h=>{c(e.zoomAmount,h)},c=(h,p)=>{var v,b;(v=ve(o))==null||v.hide(),(b=ve(r))==null||b.hide();const{Cartesian3:y,defined:E,IntersectionTests:x,Ray:g,SceneMode:w}=Cesium,{viewer:O}=n;if(E(O)){const I=O.scene,R=I.screenSpaceCameraController;if(!R.enableInputs||!R.enableZoom||I.mode===w.COLUMBUS_VIEW&&!R.enableTranslate)return;const D=I.camera;let M;switch(I.mode){case w.MORPHING:break;case w.SCENE2D:{D.zoomIn(D.positionCartographic.height*(1-h));break}default:{let k;if(E(O.trackedEntity)?k=new Cesium.Cartesian3:k=d(O.scene),Cesium.defined(k))M={direction:D.direction,up:D.up};else{const A=new g(D.worldToCameraCoordinatesPoint(I.globe.ellipsoid.cartographicToCartesian(D.positionCartographic)),D.directionWC);k=x.grazingAltitudeLocation(A,I.globe.ellipsoid),M={heading:D.heading,pitch:D.pitch,roll:D.roll}}const $=new y,V=y.subtract(D.position,k,$),m=y.multiplyByScalar(V,h,V),f=y.add(k,m,k),C=h<1?"zoomIn":"zoomOut",T=p.currentTarget,_=ss(D.positionCartographic.height).toFixed(0),P=Se(i,"zoomEvt");P&&t("zoomEvt",{type:C,camera:O.camera,status:"start",target:T,level:_}),Cesium.defined(O.trackedEntity)||I.mode===w.COLUMBUS_VIEW?D.position=f:D.flyTo({destination:f,orientation:M,duration:e.duration,convert:!1,complete:()=>{P&&t("zoomEvt",{type:C,camera:O.camera,status:"end",target:T,level:_})},cancel:()=>{P&&t("zoomEvt",{type:C,camera:O.camera,status:"cancel",target:T,level:_})}})}}}},u=h=>{var p;(p=ve(a))==null||p.hide();const{viewer:v}=n;if(v.scene.screenSpaceCameraController.enableInputs)if(Cesium.defined(v.trackedEntity)){const b=v.trackedEntity;v.trackedEntity=void 0,v.trackedEntity=b}else{const b=Se(i,"zoomEvt"),y=h.currentTarget,E=ss(v.camera.positionCartographic.height).toFixed(0);b&&t("zoomEvt",{type:"zoomReset",camera:v.camera,status:"start",target:y,level:E});const x=()=>{b&&t("zoomEvt",{type:"zoomReset",camera:v.camera,status:"end",target:y,level:E})},g=()=>{b&&t("zoomEvt",{type:"zoomReset",camera:v.camera,status:"cancel",target:y,level:E})},w=e.defaultResetView,O={duration:e.durationReset,complete:x,cancel:g};Ug(v,w,O)}},d=h=>{const{defined:p,IntersectionTests:v,Ray:b}=Cesium,y=new b(h.camera.positionWC,h.camera.directionWC),E=v.rayEllipsoid(y,h.globe.ellipsoid);return p(E)?b.getPoint(y,E.start):v.grazingAltitudeLocation(y,h.globe.ellipsoid)};return{zoomIn:s,zoomOut:l,zoomReset:u,zoomInTooltipRef:o,zoomOutTooltipRef:r,resetTooltipRef:a}}const u1={...we,zoomEvt:e=>!0},d1=X("zoomControlProps",zl);var Ul=ee({name:"VcZoomControl",props:d1,emits:u1,setup(e,t){var i;const n=ae();n.cesiumClass="VcZoomControl",n.cesiumEvents=[];const o=ze(e,t,n);if(o===void 0)return;const{t:r}=_t(),{$services:a}=o,s=c1(e,t,n,a),l=gi(e),c=te(null),u=te(null),d=te(null),h=te(null),p=((i=St(n).proxy)==null?void 0:i.$options.name)==="VcNavigation",v=te(p),b=xe({});he(()=>e,O=>{Be(()=>{n.mounted&&g()})},{deep:!0});const y=re(()=>Object.assign({},Gl.zoomOutOptions,e.zoomOutOptions)),E=re(()=>Object.assign({},Gl.zoomInOptions,e.zoomInOptions)),x=re(()=>Object.assign({},Gl.zoomResetOptions,e.zoomResetOptions));n.createCesiumObject=async()=>{const{viewer:O}=a;if(e.overrideViewerCamera){const I=e.defaultResetView;os(O,I)}return c},n.mount=async()=>{var O;v.value=!0,Be(()=>{g()});const{viewer:I}=a;return(O=I.viewerWidgetResized)==null||O.raiseEvent({type:n.cesiumClass,status:"mounted",target:ve(c)}),!0},n.unmount=async()=>{var O;v.value=!1;const{viewer:I}=a;return(O=I.viewerWidgetResized)==null||O.raiseEvent({type:n.cesiumClass,status:"unmounted",target:ve(c)}),!0};const g=()=>{var O,I,R;const D=l.style.value;if(b.left=D.left,b.top=D.top,b.transform=D.transform,D.flexDirection=e.direction==="vertical"?"column":"row",D.background=e.background,D.borderRadius=e.borderRadius,D.border=e.border,!p){const M=(O=ve(u))==null?void 0:O.$el,k=(I=ve(d))==null?void 0:I.$el,$=(R=ve(h))==null?void 0:R.$el;let V=0,m=0;if(M!==void 0){const f=M.getBoundingClientRect();e.direction==="horizontal"?(V+=f.width,m=f.height>m?f.height:m):(m+=f.height,V=f.width>V?f.width:V)}if(k!==void 0){const f=k.getBoundingClientRect();e.direction==="horizontal"?(V+=f.width,m=f.height>m?f.height:m):(m+=f.height,V=f.width>V?f.width:V)}if($!==void 0){const f=$.getBoundingClientRect();e.direction==="horizontal"?(V+=f.width,m=f.height>m?f.height:m):(m+=f.height,V=f.width>V?f.width:V)}if(D.width=`${V+4}px`,D.height=`${m+4}px`,typeof e.teleportToViewer=="undefined"||e.teleportToViewer){const f=l.attach.value;(f.bottom||f.top)&&!f.left&&!f.right&&(D.left="50%",D.transform="translate(-50%, 0)"),(f.left||f.right)&&!f.top&&!f.bottom&&(D.top="50%",D.transform="translate(0, -50%)")}}Object.assign(b,D)},w=(O,I)=>{var R,D,M;let k,$,V,m;I==="zoomIn"?(k=u,$=s.zoomInTooltipRef,V=((R=O.tooltip)==null?void 0:R.tip)||r("vc.navigation.zoomCotrol.zoomInTip"),m=s.zoomIn):I==="zoomOut"?(k=h,$=s.zoomOutTooltipRef,V=((D=O.tooltip)==null?void 0:D.tip)||r("vc.navigation.zoomCotrol.zoomOutTip"),m=s.zoomOut):I==="zoomReset"&&(k=d,$=s.resetTooltipRef,V=((M=O.tooltip)==null?void 0:M.tip)||r("vc.navigation.zoomCotrol.zoomResetTip"),m=s.zoomReset);const f=[];return f.push(S(vn,{name:O.icon,size:O.size})),f.push(S("div",null,O.label)),O.tooltip?f.push(S(Dt,{ref:$,...O.tooltip},()=>S("strong",null,V))):f.push(ne("v-if")),S(li,{class:`vc-${se(I)}`,ref:k,size:O.size,flat:O.flat,stack:O.stack,round:O.round,dense:!0,style:{color:O.color,background:O.background},onClick:m},()=>Oi(t.slots.default,f))};return Object.assign(n.proxy,{zoomIn:()=>s.zoomIn,zoomOut:()=>s.zoomOut,zoomReset:()=>s.zoomReset}),()=>{if(v.value){const O=[];O.push(S("li",null,w(E.value,"zoomIn"))),e.enableResetButton?O.push(S("li",null,w(x.value,"zoomReset"))):O.push(ne("v-if")),O.push(S("li",null,w(y.value,"zoomOut")));const I=S("div",{ref:c,class:`vc-zoom-control ${l.classes.value} ${e.customClass}`,style:b},S("ul",{class:"vc-list"},O));return!p&&e.teleportToViewer?S(Ui,{to:a.viewer._element},I):I}else return ne("v-if")}}});const h1=ee({name:"VcPrintView",props:{options:Object},setup(e){const t=te(!1),i=te(!1),n=ae();n.cesiumClass="VcPrintView";const{t:o}=_t(),r=()=>{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 h=0;d&&h<u.length;++h)d=u[h].complete;d&&(s(),t.value=d,t.value&&!i.value&&((c=e.options)!=null&&c.readyCallback&&e.options.readyCallback(e.options.printWindow),i.value=!0))};let a;const s=()=>{a&&a()};return Jn(()=>{var l;const c=(l=e.options)==null?void 0:l.printWindow,u=window,d=c==null?void 0:c.setInterval(r,200),h=u.setInterval(r,200);a=()=>{c.clearInterval(d),u.clearInterval(h),a=void 0}}),Ke(()=>{s()}),()=>{var l,c,u,d,h,p;const v=[];if(v.push(S("p",{},S("img",{src:(l=e.options)==null?void 0:l.image,alt:o("vc.navigation.screenshot"),class:"vc-map-image"}))),(c=e.options)!=null&&c.credits.length&&(u=e.options)!=null&&u.showCredit?v.push(S("h1",{},o("vc.navigation.credit"))):v.push(ne("v-if")),(d=e.options)!=null&&d.credits.length&&(h=e.options)!=null&&h.showCredit){const b=[];(p=e.options)==null||p.credits.forEach(y=>{b.push(S("li",{innerHTML:y}))}),v.push(S("ul",{},b))}else v.push(ne("v-if"));return S("div",{},v)}}}),m1=`
  .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;
  }
`,p1=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>${m1}</style>
    `,t.document.body.innerHTML='<div id="print"></div>',e.printWindow=e.printWindow||t,kc(h1,{options:e}).mount(t.document.getElementById("print"))};var wh={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 v1(e){const t=Ko();let i=0;const n=setTimeout(function(){t.reject(!1)},1e4);function o(){clearTimeout(n)}function r(){i<=0&&t.resolve()}return e.matchMedia&&e.matchMedia("print").addListener(function(a){o(),a.matches?++i:(--i,r())}),e.onbeforeprint=function(){o(),++i},e.onafterprint=function(){o(),--i,r()},e.document.execCommand("print",!0,null)||e.print(),t.promise}const f1={...we,printEvt:e=>!0},g1=X("printProps",wh);var Hl=ee({name:"VcPrint",props:g1,emits:f1,setup(e,t){var i;const n=ae();n.cesiumClass="VcPrint",n.cesiumEvents=[];const o=ze(e,t,n);if(o===void 0)return;const{t:r}=_t(),{$services:a}=o,s=te(null),l=te(null),c=te(null),u=gi(e),d=te(!1),h=((i=St(n).proxy)==null?void 0:i.$options.name)==="VcNavigation",p=te(h),v=xe({});he(()=>e,I=>{Be(()=>{n.mounted&&b()})},{deep:!0}),n.createCesiumObject=async()=>s,n.mount=async()=>{var I;p.value=!0,Be(()=>{b()});const{viewer:R}=a;return(I=R.viewerWidgetResized)==null||I.raiseEvent({type:n.cesiumClass,status:"mounted",target:ve(s)}),!0},n.unmount=async()=>{var I;p.value=!1;const{viewer:R}=a;return(I=R.viewerWidgetResized)==null||I.raiseEvent({type:n.cesiumClass,status:"unmounted",target:ve(s)}),!0};const b=()=>{var I;const R=u.style.value;if(v.left=R.left,v.top=R.top,v.transform=R.transform,!h){const D=u.attach.value;((I=ve(c))==null?void 0:I.$el)!==void 0&&(typeof e.teleportToViewer=="undefined"||e.teleportToViewer)&&((D.bottom||D.top)&&!D.left&&!D.right&&(R.left="50%",R.transform="translate(-50%, 0)"),(D.left||D.right)&&!D.top&&!D.bottom&&(R.top="50%",R.transform="translate(0, -50%)"))}Object.assign(v,R)},y=()=>{var I;(I=ve(l))==null||I.hide();const{viewer:R}=a;Gg(R).then(D=>{if(e.downloadAutomatically){const M=document.createElement("a");M.download=e.screenshotName||r("vc.navigation.print.screenshot"),M.style.display="none",M.href=D,document.body.appendChild(M),M.click(),document.body.removeChild(M)}(e.printAutomatically||e.showPrintView)&&(e.showPrintView?x(D):e.printAutomatically&&E(D)),Se(n,"printEvt")&&t.emit("printEvt",{type:"capture",image:D,status:"end"})})},E=I=>{g(!0,!0,I)},x=I=>{g(!1,!1,I)},g=(I,R,D)=>{d.value=!0;let M;I&&(M=document.createElement("iframe"),document.body.appendChild(M));const{viewer:k}=a;p1({image:D,showCredit:e.showCredit,credits:w(k),printWindow:M?M.contentWindow:void 0,title:r("vc.navigation.print.printViewTitle"),readyCallback:$=>{R&&v1($).catch(V=>{o.logger.warn(V)}).then(()=>{M&&document.body.removeChild(M),I&&(d.value=!1)})},closeCallback:$=>{I&&(d.value=!1)}}),I||(d.value=!1)},w=I=>I.scene.frameState.creditDisplay._currentFrameCredits.screenCredits.values.concat(I.scene.frameState.creditDisplay._currentFrameCredits.lightboxCredits.values).map(R=>R.html),O=I=>{d.value&&(I.cancel=!0)};return()=>{if(p.value){const I=[];I.push(S(vn,{name:e.icon,size:e.size})),I.push(S("div",null,e.label)),st(e.tooltip)?I.push(S(Dt,{ref:l,onBeforeShow:O,...e.tooltip},()=>S("strong",null,st(e.tooltip)&&e.tooltip.tip||r("vc.navigation.print.printTip")))):I.push(ne("v-if"));const R=[S(li,{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:y},()=>I)],D=S("div",{ref:s,class:`vc-print ${u.classes.value} ${e.customClass}`,style:v},R);return!h&&e.teleportToViewer?S(Ui,{to:a.viewer._element},D):D}else return ne("v-if")}}}),gn=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Wl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var mr={exports:{}};mr.exports,function(e,t){(function(i,n){e.exports=n()})(gn,function(){function i(d){var h=[];return d.AMapUI&&h.push(n(d.AMapUI)),d.Loca&&h.push(o(d.Loca)),Promise.all(h)}function n(d){return new Promise(function(h,p){var v=[];if(d.plugins)for(var b=0;b<d.plugins.length;b+=1)a.AMapUI.plugins.indexOf(d.plugins[b])==-1&&v.push(d.plugins[b]);if(s.AMapUI===r.failed)p("\u524D\u6B21\u8BF7\u6C42 AMapUI \u5931\u8D25");else if(s.AMapUI===r.notload){s.AMapUI=r.loading,a.AMapUI.version=d.version||a.AMapUI.version,b=a.AMapUI.version;var y=document.body||document.head,E=document.createElement("script");E.type="text/javascript",E.src="https://webapi.amap.com/ui/"+b+"/main.js",E.onerror=function(x){s.AMapUI=r.failed,p("\u8BF7\u6C42 AMapUI \u5931\u8D25")},E.onload=function(){if(s.AMapUI=r.loaded,v.length)window.AMapUI.loadUI(v,function(){for(var x=0,g=v.length;x<g;x++){var w=v[x].split("/").slice(-1)[0];window.AMapUI[w]=arguments[x]}for(h();l.AMapUI.length;)l.AMapUI.splice(0,1)[0]()});else for(h();l.AMapUI.length;)l.AMapUI.splice(0,1)[0]()},y.appendChild(E)}else s.AMapUI===r.loaded?d.version&&d.version!==a.AMapUI.version?p("\u4E0D\u5141\u8BB8\u591A\u4E2A\u7248\u672C AMapUI \u6DF7\u7528"):v.length?window.AMapUI.loadUI(v,function(){for(var x=0,g=v.length;x<g;x++){var w=v[x].split("/").slice(-1)[0];window.AMapUI[w]=arguments[x]}h()}):h():d.version&&d.version!==a.AMapUI.version?p("\u4E0D\u5141\u8BB8\u591A\u4E2A\u7248\u672C AMapUI \u6DF7\u7528"):l.AMapUI.push(function(x){x?p(x):v.length?window.AMapUI.loadUI(v,function(){for(var g=0,w=v.length;g<w;g++){var O=v[g].split("/").slice(-1)[0];window.AMapUI[O]=arguments[g]}h()}):h()})})}function o(d){return new Promise(function(h,p){if(s.Loca===r.failed)p("\u524D\u6B21\u8BF7\u6C42 Loca \u5931\u8D25");else if(s.Loca===r.notload){s.Loca=r.loading,a.Loca.version=d.version||a.Loca.version;var v=a.Loca.version,b=a.AMap.version.startsWith("2"),y=v.startsWith("2");if(b&&!y||!b&&y)p("JSAPI \u4E0E Loca \u7248\u672C\u4E0D\u5BF9\u5E94\uFF01\uFF01");else{b=a.key,y=document.body||document.head;var E=document.createElement("script");E.type="text/javascript",E.src="https://webapi.amap.com/loca?v="+v+"&key="+b,E.onerror=function(x){s.Loca=r.failed,p("\u8BF7\u6C42 AMapUI \u5931\u8D25")},E.onload=function(){for(s.Loca=r.loaded,h();l.Loca.length;)l.Loca.splice(0,1)[0]()},y.appendChild(E)}}else s.Loca===r.loaded?d.version&&d.version!==a.Loca.version?p("\u4E0D\u5141\u8BB8\u591A\u4E2A\u7248\u672C Loca \u6DF7\u7528"):h():d.version&&d.version!==a.Loca.version?p("\u4E0D\u5141\u8BB8\u591A\u4E2A\u7248\u672C Loca \u6DF7\u7528"):l.Loca.push(function(x){x?p(x):p()})})}if(!window)throw Error("AMap JSAPI can only be used in Browser.");var r;(function(d){d.notload="notload",d.loading="loading",d.loaded="loaded",d.failed="failed"})(r||(r={}));var a={key:"",AMap:{version:"1.4.15",plugins:[]},AMapUI:{version:"1.1",plugins:[]},Loca:{version:"1.3.2"}},s={AMap:r.notload,AMapUI:r.notload,Loca:r.notload},l={AMap:[],AMapUI:[],Loca:[]},c=[],u=function(d){typeof d=="function"&&(s.AMap===r.loaded?d(window.AMap):c.push(d))};return{load:function(d){return new Promise(function(h,p){if(s.AMap==r.failed)p("");else if(s.AMap==r.notload){var v=d.key,b=d.version,y=d.plugins;v?(window.AMap&&location.host!=="lbs.amap.com"&&p("\u7981\u6B62\u591A\u79CDAPI\u52A0\u8F7D\u65B9\u5F0F\u6DF7\u7528"),a.key=v,a.AMap.version=b||a.AMap.version,a.AMap.plugins=y||a.AMap.plugins,s.AMap=r.loading,b=document.body||document.head,window.___onAPILoaded=function(x){if(delete window.___onAPILoaded,x)s.AMap=r.failed,p(x);else for(s.AMap=r.loaded,i(d).then(function(){h(window.AMap)}).catch(p);c.length;)c.splice(0,1)[0]()},y=document.createElement("script"),y.type="text/javascript",y.src="https://webapi.amap.com/maps?callback=___onAPILoaded&v="+a.AMap.version+"&key="+v+"&plugin="+a.AMap.plugins.join(","),y.onerror=function(x){s.AMap=r.failed,p(x)},b.appendChild(y)):p("\u8BF7\u586B\u5199key")}else if(s.AMap==r.loaded)if(d.key&&d.key!==a.key)p("\u591A\u4E2A\u4E0D\u4E00\u81F4\u7684 key");else if(d.version&&d.version!==a.AMap.version)p("\u4E0D\u5141\u8BB8\u591A\u4E2A\u7248\u672C JSAPI \u6DF7\u7528");else{if(v=[],d.plugins)for(b=0;b<d.plugins.length;b+=1)a.AMap.plugins.indexOf(d.plugins[b])==-1&&v.push(d.plugins[b]);v.length?window.AMap.plugin(v,function(){i(d).then(function(){h(window.AMap)}).catch(p)}):i(d).then(function(){h(window.AMap)}).catch(p)}else if(d.key&&d.key!==a.key)p("\u591A\u4E2A\u4E0D\u4E00\u81F4\u7684 key");else if(d.version&&d.version!==a.AMap.version)p("\u4E0D\u5141\u8BB8\u591A\u4E2A\u7248\u672C JSAPI \u6DF7\u7528");else{var E=[];if(d.plugins)for(b=0;b<d.plugins.length;b+=1)a.AMap.plugins.indexOf(d.plugins[b])==-1&&E.push(d.plugins[b]);u(function(){E.length?window.AMap.plugin(E,function(){i(d).then(function(){h(window.AMap)}).catch(p)}):i(d).then(function(){h(window.AMap)}).catch(p)})}})},reset:function(){delete window.AMap,delete window.AMapUI,delete window.Loca,a={key:"",AMap:{version:"1.4.15",plugins:[]},AMapUI:{version:"1.1",plugins:[]},Loca:{version:"1.3.2"}},s={AMap:r.notload,AMapUI:r.notload,Loca:r.notload},l={AMap:[],AMapUI:[],Loca:[]}}}})}(mr,mr.exports);var y1=mr.exports,b1=Wl(y1),_h={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,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 C1={...we,locationEvt:e=>!0},w1=X("myLocationProps",_h);var ql=ee({name:"VcMyLocation",props:w1,emits:C1,setup(e,t){var i;const n=ae();n.cesiumClass="VcMyLocation",n.cesiumEvents=[];const o=ze(e,t,n);if(o===void 0)return;const{$services:r}=o,{t:a}=_t(),s=te(null),l=te(null),c=te(null),u=te(!1),d=gi(e),h=((i=St(n).proxy)==null?void 0:i.$options.name)==="VcNavigation",p=te(h),v=xe({});let b,y;he(()=>e,M=>{Be(()=>{n.mounted&&x()})},{deep:!0});const E=re(()=>u.value?a("vc.navigation.myLocation.positioning"):st(e.tooltip)&&e.tooltip.tip||a("vc.navigation.myLocation.myLocationTip"));n.createCesiumObject=async()=>{const{viewer:M}=r,{CustomDataSource:k}=Cesium,$=M.dataSources.getByName("__vc-myLocation__");$.length?b=$[0]:M.dataSources.add(new k("__vc-myLocation__")).then(f=>{b=f});let V;if(e.amap&&e.amap.key){const f=e.amap.options;V=new Promise((C,T)=>{var _,P;b1.load({key:(_=e.amap)==null?void 0:_.key,version:(P=e.amap)==null?void 0:P.version,plugins:["AMap.Geolocation"]}).then(A=>{y=new A.Geolocation(f),C(y)}).catch(A=>{o.logger.error(A),T(A)})})}const m=new Promise((f,C)=>{Be(()=>{f(ve(s))})});return Promise.all([m,V]).then(f=>f[0])},n.mount=async()=>{var M;p.value=!0,Be(()=>{x()});const{viewer:k}=r;return(M=k.viewerWidgetResized)==null||M.raiseEvent({type:n.cesiumClass,status:"mounted",target:ve(s)}),!0},n.unmount=async()=>{var M;p.value=!1;const{viewer:k}=r;if(y){const $=document.getElementsByTagName("script"),V=[];for(const m of $)m.src.indexOf("/webapi.amap.com/maps")>-1&&V.push(m);V.forEach(m=>{document.getElementsByTagName("body")[0].removeChild(m)})}return(M=k.viewerWidgetResized)==null||M.raiseEvent({type:n.cesiumClass,status:"unmounted",target:ve(s)}),k.dataSources.remove(b,!0)};const x=()=>{var M;const k=d.style.value;if(v.left=k.left,v.top=k.top,v.transform=k.transform,!h){const $=d.attach.value;((M=ve(c))==null?void 0:M.$el)!==void 0&&(typeof e.teleportToViewer=="undefined"||e.teleportToViewer)&&(($.bottom||$.top)&&!$.left&&!$.right&&(k.left="50%",k.transform="translate(-50%, 0)"),($.left||$.right)&&!$.top&&!$.bottom&&(k.top="50%",k.transform="translate(0, -50%)"))}Object.assign(v,k)},g=()=>{var M;(M=ve(l))==null||M.hide(),u.value=!0;const k=e.customApi||e.customAPI;if(wt(k)){const $=k(I);w($)}else y&&e.amap&&e.amap.key?y.getCurrentPosition(($,V)=>{var m;if($==="complete"){let f=[V.position.lng,V.position.lat];(m=e.amap)!=null&&m.transformToWGS84&&(f=hl(f[0],f[1])),w({lng:f[0],lat:f[1],address:V.formattedAddress},V)}else I(a("vc.navigation.myLocation.fail"),V.message)}):e.geolocation?navigator.geolocation.getCurrentPosition($=>{w({lng:$.coords.longitude,lat:$.coords.latitude},$)},I,{enableHighAccuracy:e.geolocation.enableHighAccuracy,timeout:e.geolocation.timeout,maximumAge:e.geolocation.maximumAge}):I(a("vc.navigation.myLocation.fail"))},w=(M,k)=>{var $;const V=M.lng,m=M.lat,f=M.address,{Rectangle:C,sampleTerrain:T,defined:_,SceneMode:P}=Cesium,{viewer:A}=r;b.entities.removeAll();const L=b.entities.add({id:e.id,position:tt([V,m],A.scene.globe.ellipsoid),point:{color:Ie(e.pointColor),pixelSize:e.pixelSize,outlineWidth:e.outlineWidth,outlineColor:Ie(e.outlineColor)},properties:{...k},description:(($=e.description)==null?void 0:$.call(this,M,k))||O({[a("vc.navigation.myLocation.lng")]:V,[a("vc.navigation.myLocation.lat")]:m,[a("vc.navigation.myLocation.address")]:f})}),B=Se(n,"locationEvt");B&&t.emit("locationEvt",{type:"location",position:M,detail:k,entity:L});const F={duration:e.duration};if(_(e.maximumHeight)&&(F.maximumHeight=e.maximumHeight),_(e.hpr)&&et(e.hpr)&&(F.offset=new Cesium.HeadingPitchRange(e.hpr[0],e.hpr[1],e.hpr[2])),A.scene.mode===P.SCENE2D||A.scene.mode===P.COLUMBUS_VIEW)return A.flyTo(L,F).then(()=>{u.value=!1,B&&t.emit("locationEvt",{type:"zoomIn",camera:A.camera,status:"end"})});const q=e.factor,Z=C.fromDegrees(V-q,m-q,V+q,m+q),H=A.scene.camera,N=H.getRectangleCameraCoordinates(Z),j=A.scene.globe.ellipsoid.cartesianToCartographic(N),G=A.scene.globe.terrainProvider,J=e.level,U=[C.center(Z)];return T(G,J,U).then(function(z){const K={longitude:j.longitude,latitude:j.latitude,height:j.height+z[0].height},Q=A.scene.globe.ellipsoid.cartographicToCartesian(K);B&&t.emit("locationEvt",{type:"zoomIn",camera:A.camera,status:"start"}),H.flyTo({duration:e.duration,destination:Q,complete:()=>{u.value=!1,B&&t.emit("locationEvt",{type:"zoomIn",camera:A.camera,status:"end"})},cancel:()=>{u.value=!1,B&&t.emit("locationEvt",{type:"zoomIn",camera:A.camera,status:"cancel"})}})})},O=(M,k)=>{let $="";M instanceof Cesium.PropertyBag&&(M=M.getValue(Cesium.JulianDate.now()));for(let V in M)if(Object.prototype.hasOwnProperty.call(M,V)){if(V===k)continue;let m=M[V];typeof m=="object"&&(m=O(m)),V=V.replace(/_/g," "),Cesium.defined(m)&&($+="<tr><th>"+V+"</th><td>"+m+"</td></tr>")}return $.length>0&&($='<table class="cesium-infoBox-defaultTable"><tbody>'+$+"</tbody></table>"),$},I=(...M)=>{u.value=!1,o.logger.error(...M)},R=()=>{switch(e.loadingType){case"bars":return ur;case"ios":return Il;case"orbit":return Al;case"oval":return Dl;case"puff":return Bl;case"tail":return Ll;default:return ur}},D=M=>{u.value&&(M.cancel=!0)};return()=>{if(p.value){const M=[];M.push(S(vn,{name:e.icon,size:e.size})),M.push(S("div",null,e.label)),st(e.tooltip)?M.push(S(Dt,{ref:l,onBeforeShow:D,...e.tooltip},()=>S("strong",null,E.value))):M.push(ne("v-if"));const k=S("div",{ref:s,class:`vc-my-location ${d.classes.value} ${e.customClass}`,style:v},[S(li,{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:g},{default:()=>M,loading:()=>S(R())})]);return!h&&e.teleportToViewer?S(Ui,{to:r.viewer._element},k):k}else return ne("v-if")}}});function _1(e,t,i){const n={latitude:"",longitude:"",elevation:""},{defaultValue:o,defined:r}=Cesium,a=o(i,{}),s=o(a.decimal,5);return a.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")):a.rangeType===1?(n.latitude=t.toFixed(s)+"\xB0",n.longitude=e.toFixed(s)+"\xB0"):a.rangeType===2&&(n.latitude=t.toFixed(s)+"\xB0",n.longitude=(e<0?360+e:e).toFixed(s)+"\xB0"),r(a.height)?n.elevation=Math.round(a.height)+(r(a.errorBar)?"\xB1"+Math.round(a.errorBar):"")+"m":n.elevation="",n}function E1(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 Un=1,Hn=2,co=3,P1=4,Ql=5,Eh=6378137,x1=6356752314e-3,Ph=.0066943799901413165,ra=484813681109536e-20,pe=Math.PI/2,O1=.16666666666666666,M1=.04722222222222222,S1=.022156084656084655,Pe=1e-10,Ut=.017453292519943295,Xi=57.29577951308232,Qe=Math.PI/4,sa=Math.PI*2,Ot=3.14159265359,ci={};ci.greenwich=0,ci.lisbon=-9.131906111111,ci.paris=2.337229166667,ci.bogota=-74.080916666667,ci.madrid=-3.687938888889,ci.rome=12.452333333333,ci.bern=7.439583333333,ci.jakarta=106.807719444444,ci.ferro=-17.666666666667,ci.brussels=4.367975,ci.stockholm=18.058277777778,ci.athens=23.7163375,ci.oslo=10.722916666667;var T1={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},xh=/[\s_\-\/\(\)]/g;function yn(e,t){if(e[t])return e[t];for(var i=Object.keys(e),n=t.toLowerCase().replace(xh,""),o=-1,r,a;++o<i.length;)if(r=i[o],a=r.toLowerCase().replace(xh,""),a===n)return e[r]}function Zl(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,o,r,a={proj:"projName",datum:"datumCode",rf:function(s){t.rf=parseFloat(s)},lat_0:function(s){t.lat0=s*Ut},lat_1:function(s){t.lat1=s*Ut},lat_2:function(s){t.lat2=s*Ut},lat_ts:function(s){t.lat_ts=s*Ut},lon_0:function(s){t.long0=s*Ut},lon_1:function(s){t.long1=s*Ut},lon_2:function(s){t.long2=s*Ut},alpha:function(s){t.alpha=parseFloat(s)*Ut},gamma:function(s){t.rectified_grid_angle=parseFloat(s)},lonc:function(s){t.longc=s*Ut},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=yn(T1,s);l&&(t.to_meter=l.to_meter)},from_greenwich:function(s){t.from_greenwich=s*Ut},pm:function(s){var l=yn(ci,s);t.from_greenwich=(l||parseFloat(s))*Ut},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)o=i[n],n in a?(r=a[n],typeof r=="function"?r(o):t[r]=o):t[n]=o;return typeof t.datumCode=="string"&&t.datumCode!=="WGS84"&&(t.datumCode=t.datumCode.toLowerCase()),t}var la=1,Oh=2,Mh=3,pr=4,Sh=5,Jl=-1,I1=/\s/,A1=/[A-Za-z]/,D1=/[A-Za-z84_]/,vr=/[,\]]/,Th=/[\d\.E\-\+]/;function un(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=la}un.prototype.readCharicter=function(){var e=this.text[this.place++];if(this.state!==pr)for(;I1.test(e);){if(this.place>=this.text.length)return;e=this.text[this.place++]}switch(this.state){case la:return this.neutral(e);case Oh:return this.keyword(e);case pr:return this.quoted(e);case Sh:return this.afterquote(e);case Mh:return this.number(e);case Jl:return}},un.prototype.afterquote=function(e){if(e==='"'){this.word+='"',this.state=pr;return}if(vr.test(e)){this.word=this.word.trim(),this.afterItem(e);return}throw new Error(`havn't handled "`+e+'" in afterquote yet, index '+this.place)},un.prototype.afterItem=function(e){if(e===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=la;return}if(e==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=la,this.currentObject=this.stack.pop(),this.currentObject||(this.state=Jl);return}},un.prototype.number=function(e){if(Th.test(e)){this.word+=e;return}if(vr.test(e)){this.word=parseFloat(this.word),this.afterItem(e);return}throw new Error(`havn't handled "`+e+'" in number yet, index '+this.place)},un.prototype.quoted=function(e){if(e==='"'){this.state=Sh;return}this.word+=e},un.prototype.keyword=function(e){if(D1.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=la;return}if(vr.test(e)){this.afterItem(e);return}throw new Error(`havn't handled "`+e+'" in keyword yet, index '+this.place)},un.prototype.neutral=function(e){if(A1.test(e)){this.word=e,this.state=Oh;return}if(e==='"'){this.word="",this.state=pr;return}if(Th.test(e)){this.word=e,this.state=Mh;return}if(vr.test(e)){this.afterItem(e);return}throw new Error(`havn't handled "`+e+'" in neutral yet, index '+this.place)},un.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(this.state===Jl)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function B1(e){var t=new un(e);return t.output()}function Ih(e,t,i){Array.isArray(t)&&(i.unshift(t),t=null);var n=t?{}:e,o=i.reduce(function(r,a){return uo(a,r),r},n);t&&(e[t]=o)}function uo(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]={},uo(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&&uo(e[2],t[i]);return;case"SPHEROID":case"ELLIPSOID":t[i]={name:e[0],a:e[1],rf:e[2]},e.length===4&&uo(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]],Ih(t,i,e);return;default:for(n=-1;++n<e.length;)if(!Array.isArray(e[n]))return uo(e,t[i]);return Ih(t,i,e)}}var L1=.017453292519943295;function j1(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 Yi(e){return e*L1}function F1(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 o=[e.AXIS[i][0].toLowerCase(),e.AXIS[i][1].toLowerCase()];o[0].indexOf("north")!==-1||(o[0]==="y"||o[0]==="lat")&&o[1]==="north"?t+="n":o[0].indexOf("south")!==-1||(o[0]==="y"||o[0]==="lat")&&o[1]==="south"?t+="s":o[0].indexOf("east")!==-1||(o[0]==="x"||o[0]==="lon")&&o[1]==="east"?t+="e":(o[0].indexOf("west")!==-1||(o[0]==="x"||o[0]==="lon")&&o[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 r=e.GEOGCS;e.type==="GEOGCS"&&(r=e),r&&(r.DATUM?e.datumCode=r.DATUM.name.toLowerCase():e.datumCode=r.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"),r.DATUM&&r.DATUM.SPHEROID&&(e.ellps=r.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),e.ellps.toLowerCase().slice(0,13)==="international"&&(e.ellps="intl"),e.a=r.DATUM.SPHEROID.a,e.rf=parseFloat(r.DATUM.SPHEROID.rf,10)),r.DATUM&&r.DATUM.TOWGS84&&(e.datum_params=r.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 a(c){var u=e.to_meter||1;return c*u}var s=function(c){return j1(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",Yi],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",Yi],["x0","false_easting",a],["y0","false_northing",a],["long0","central_meridian",Yi],["lat0","latitude_of_origin",Yi],["lat0","standard_parallel_1",Yi],["lat1","standard_parallel_1",Yi],["lat2","standard_parallel_2",Yi],["azimuth","Azimuth"],["alpha","azimuth",Yi],["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=Yi(e.lat1>0?90:-90),e.lat_ts=e.lat1):!e.lat_ts&&e.lat0&&e.projName==="Polar_Stereographic"&&(e.lat_ts=e.lat0,e.lat0=Yi(e.lat0>0?90:-90))}function Ah(e){var t=B1(e),i=t.shift(),n=t.shift();t.unshift(["name",n]),t.unshift(["type",i]);var o={};return uo(t,o),F1(o),o}function ti(e){var t=this;if(arguments.length===2){var i=arguments[1];typeof i=="string"?i.charAt(0)==="+"?ti[e]=Zl(arguments[1]):ti[e]=Ah(arguments[1]):ti[e]=i}else if(arguments.length===1){if(Array.isArray(e))return e.map(function(n){Array.isArray(n)?ti.apply(t,n):ti(n)});if(typeof e=="string"){if(e in ti)return ti[e]}else"EPSG"in e?ti["EPSG:"+e.EPSG]=e:"ESRI"in e?ti["ESRI:"+e.ESRI]=e:"IAU2000"in e?ti["IAU2000:"+e.IAU2000]=e:console.log(e);return}}E1(ti);function k1(e){return typeof e=="string"}function R1(e){return e in ti}var V1=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function $1(e){return V1.some(function(t){return e.indexOf(t)>-1})}var N1=["3857","900913","3785","102113"];function z1(e){var t=yn(e,"authority");if(t){var i=yn(t,"epsg");return i&&N1.indexOf(i)>-1}}function G1(e){var t=yn(e,"extension");if(t)return yn(t,"proj4")}function U1(e){return e[0]==="+"}function H1(e){if(k1(e)){if(R1(e))return ti[e];if($1(e)){var t=Ah(e);if(z1(t))return ti["EPSG:3857"];var i=G1(t);return i?Zl(i):t}if(U1(e))return Zl(e)}else return e}function Dh(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 ca(e){return e<0?-1:1}function Oe(e){return Math.abs(e)<=Ot?e:e-ca(e)*sa}function Ni(e,t,i){var n=e*i,o=.5*e;return n=Math.pow((1-n)/(1+n),o),Math.tan(.5*(pe-t))/n}function ua(e,t){for(var i=.5*e,n,o,r=pe-2*Math.atan(t),a=0;a<=15;a++)if(n=e*Math.sin(r),o=pe-2*Math.atan(t*Math.pow((1-n)/(1+n),i))-r,r+=o,Math.abs(o)<=1e-10)return r;return-9999}function W1(){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 q1(e){var t=e.x,i=e.y;if(i*Xi>90&&i*Xi<-90&&t*Xi>180&&t*Xi<-180)return null;var n,o;if(Math.abs(Math.abs(i)-pe)<=Pe)return null;if(this.sphere)n=this.x0+this.a*this.k0*Oe(t-this.long0),o=this.y0+this.a*this.k0*Math.log(Math.tan(Qe+.5*i));else{var r=Math.sin(i),a=Ni(this.e,i,r);n=this.x0+this.a*this.k0*Oe(t-this.long0),o=this.y0-this.a*this.k0*Math.log(a)}return e.x=n,e.y=o,e}function Q1(e){var t=e.x-this.x0,i=e.y-this.y0,n,o;if(this.sphere)o=pe-2*Math.atan(Math.exp(-i/(this.a*this.k0)));else{var r=Math.exp(-i/(this.a*this.k0));if(o=ua(this.e,r),o===-9999)return null}return n=Oe(this.long0+t/(this.a*this.k0)),e.x=n,e.y=o,e}var Z1=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"],J1={init:W1,forward:q1,inverse:Q1,names:Z1};function X1(){}function Bh(e){return e}var Y1=["longlat","identity"],K1={init:X1,forward:Bh,inverse:Bh,names:Y1},eC=[J1,K1],fr={},gr=[];function Lh(e,t){var i=gr.length;return e.names?(gr[i]=e,e.names.forEach(function(n){fr[n.toLowerCase()]=i}),this):(console.log(t),!0)}function tC(e){if(!e)return!1;var t=e.toLowerCase();if(typeof fr[t]!="undefined"&&gr[fr[t]])return gr[fr[t]]}function iC(){eC.forEach(Lh)}var nC={start:iC,add:Lh,get:tC},ke={};ke.MERIT={a:6378137,rf:298.257,ellipseName:"MERIT 1983"},ke.SGS85={a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},ke.GRS80={a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},ke.IAU76={a:6378140,rf:298.257,ellipseName:"IAU 1976"},ke.airy={a:6377563396e-3,b:635625691e-2,ellipseName:"Airy 1830"},ke.APL4={a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},ke.NWL9D={a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},ke.mod_airy={a:6377340189e-3,b:6356034446e-3,ellipseName:"Modified Airy"},ke.andrae={a:637710443e-2,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},ke.aust_SA={a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},ke.GRS67={a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},ke.bessel={a:6377397155e-3,rf:299.1528128,ellipseName:"Bessel 1841"},ke.bess_nam={a:6377483865e-3,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},ke.clrk66={a:63782064e-1,b:63565838e-1,ellipseName:"Clarke 1866"},ke.clrk80={a:6378249145e-3,rf:293.4663,ellipseName:"Clarke 1880 mod."},ke.clrk80ign={a:63782492e-1,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},ke.clrk58={a:6378293645208759e-9,rf:294.2606763692654,ellipseName:"Clarke 1858"},ke.CPM={a:63757387e-1,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},ke.delmbr={a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},ke.engelis={a:637813605e-2,rf:298.2566,ellipseName:"Engelis 1985"},ke.evrst30={a:6377276345e-3,rf:300.8017,ellipseName:"Everest 1830"},ke.evrst48={a:6377304063e-3,rf:300.8017,ellipseName:"Everest 1948"},ke.evrst56={a:6377301243e-3,rf:300.8017,ellipseName:"Everest 1956"},ke.evrst69={a:6377295664e-3,rf:300.8017,ellipseName:"Everest 1969"},ke.evrstSS={a:6377298556e-3,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},ke.fschr60={a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},ke.fschr60m={a:6378155,rf:298.3,ellipseName:"Fischer 1960"},ke.fschr68={a:6378150,rf:298.3,ellipseName:"Fischer 1968"},ke.helmert={a:6378200,rf:298.3,ellipseName:"Helmert 1906"},ke.hough={a:6378270,rf:297,ellipseName:"Hough"},ke.intl={a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},ke.kaula={a:6378163,rf:298.24,ellipseName:"Kaula 1961"},ke.lerch={a:6378139,rf:298.257,ellipseName:"Lerch 1979"},ke.mprts={a:6397300,rf:191,ellipseName:"Maupertius 1738"},ke.new_intl={a:63781575e-1,b:63567722e-1,ellipseName:"New International 1967"},ke.plessis={a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},ke.krass={a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},ke.SEasia={a:6378155,b:63567733205e-4,ellipseName:"Southeast Asia"},ke.walbeck={a:6376896,b:63558348467e-4,ellipseName:"Walbeck"},ke.WGS60={a:6378165,rf:298.3,ellipseName:"WGS 60"},ke.WGS66={a:6378145,rf:298.25,ellipseName:"WGS 66"},ke.WGS7={a:6378135,rf:298.26,ellipseName:"WGS 72"};var oC=ke.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};ke.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};function aC(e,t,i,n){var o=e*e,r=t*t,a=(o-r)/o,s=0;n?(e*=1-a*(O1+a*(M1+a*S1)),o=e*e,a=0):s=Math.sqrt(a);var l=(o-r)/r;return{es:a,e:s,ep2:l}}function rC(e,t,i,n,o){if(!e){var r=yn(ke,n);r||(r=oC),e=r.a,t=r.b,i=r.rf}return i&&!t&&(t=(1-1/i)*e),(i===0||Math.abs(e-t)<Pe)&&(o=!0,t=e),{a:e,b:t,rf:i,sphere:o}}var kt={};kt.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},kt.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},kt.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},kt.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},kt.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},kt.potsdam={towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},kt.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},kt.hermannskogel={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},kt.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},kt.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},kt.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},kt.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},kt.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},kt.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},kt.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},kt.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},kt.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};function sC(e,t,i,n,o,r,a){var s={};return e===void 0||e==="none"?s.datum_type=Ql:s.datum_type=P1,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=Un),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=Hn,s.datum_params[3]*=ra,s.datum_params[4]*=ra,s.datum_params[5]*=ra,s.datum_params[6]=s.datum_params[6]/1e6+1)),a&&(s.datum_type=co,s.grids=a),s.a=i,s.b=n,s.es=o,s.ep2=r,s}var jh={};function lC(e,t){var i=new DataView(t),n=dC(i),o=hC(i,n),r=mC(i,o,n),a={header:o,subgrids:r};return jh[e]=a,a}function cC(e){if(e===void 0)return null;var t=e.split(",");return t.map(uC)}function uC(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:jh[e]||null,isNull:!1}}function ho(e){return e/3600*Math.PI/180}function dC(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 hC(e,t){return{nFields:e.getInt32(8,t),nSubgridFields:e.getInt32(24,t),nSubgrids:e.getInt32(40,t),shiftType:Xl(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 Xl(e,t,i){return String.fromCharCode.apply(null,new Uint8Array(e.buffer.slice(t,i)))}function mC(e,t,i){for(var n=176,o=[],r=0;r<t.nSubgrids;r++){var a=vC(e,n,i),s=fC(e,n,a,i),l=Math.round(1+(a.upperLongitude-a.lowerLongitude)/a.longitudeInterval),c=Math.round(1+(a.upperLatitude-a.lowerLatitude)/a.latitudeInterval);o.push({ll:[ho(a.lowerLongitude),ho(a.lowerLatitude)],del:[ho(a.longitudeInterval),ho(a.latitudeInterval)],lim:[l,c],count:a.gridNodeCount,cvs:pC(s)}),n+=176+a.gridNodeCount*16}return o}function pC(e){return e.map(function(t){return[ho(t.longitudeShift),ho(t.latitudeShift)]})}function vC(e,t,i){return{name:Xl(e,t+8,t+16).trim(),parent:Xl(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 fC(e,t,i,n){for(var o=t+176,r=16,a=[],s=0;s<i.gridNodeCount;s++){var l={latitudeShift:e.getFloat32(o+s*r,n),longitudeShift:e.getFloat32(o+s*r+4,n),latitudeAccuracy:e.getFloat32(o+s*r+8,n),longitudeAccuracy:e.getFloat32(o+s*r+12,n)};a.push(l)}return a}function en(e,t){if(!(this instanceof en))return new en(e);t=t||function(c){if(c)throw c};var i=H1(e);if(typeof i!="object"){t(e);return}var n=en.projections.get(i.projName);if(!n){t(e);return}if(i.datumCode&&i.datumCode!=="none"){var o=yn(kt,i.datumCode);o&&(i.datum_params=i.datum_params||(o.towgs84?o.towgs84.split(","):null),i.ellps=o.ellipse,i.datumName=o.datumName?o.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 r=rC(i.a,i.b,i.rf,i.ellps,i.sphere),a=aC(r.a,r.b,r.rf,i.R_A),s=cC(i.nadgrids),l=i.datum||sC(i.datumCode,i.datum_params,r.a,r.b,a.es,a.ep2,s);Dh(this,i),Dh(this,n),this.a=r.a,this.b=r.b,this.rf=r.rf,this.sphere=r.sphere,this.es=a.es,this.e=a.e,this.ep2=a.ep2,this.datum=l,this.init(),t(null,this)}en.projections=nC,en.projections.start();function gC(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===Un?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===Hn?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 Fh(e,t,i){var n=e.x,o=e.y,r=e.z?e.z:0,a,s,l,c;if(o<-pe&&o>-1.001*pe)o=-pe;else if(o>pe&&o<1.001*pe)o=pe;else{if(o<-pe)return{x:-1/0,y:-1/0,z:e.z};if(o>pe)return{x:1/0,y:1/0,z:e.z}}return n>Math.PI&&(n-=2*Math.PI),s=Math.sin(o),c=Math.cos(o),l=s*s,a=i/Math.sqrt(1-t*l),{x:(a+r)*c*Math.cos(n),y:(a+r)*c*Math.sin(n),z:(a*(1-t)+r)*s}}function kh(e,t,i,n){var o=1e-12,r=o*o,a=30,s,l,c,u,d,h,p,v,b,y,E,x,g,w=e.x,O=e.y,I=e.z?e.z:0,R,D,M;if(s=Math.sqrt(w*w+O*O),l=Math.sqrt(w*w+O*O+I*I),s/i<o){if(R=0,l/i<o)return D=pe,M=-n,{x:e.x,y:e.y,z:e.z}}else R=Math.atan2(O,w);c=I/l,u=s/l,d=1/Math.sqrt(1-t*(2-t)*u*u),v=u*(1-t)*d,b=c*d,g=0;do g++,p=i/Math.sqrt(1-t*b*b),M=s*v+I*b-p*(1-t*b*b),h=t*p/(p+M),d=1/Math.sqrt(1-h*(2-h)*u*u),y=u*(1-h)*d,E=c*d,x=E*v-y*b,v=y,b=E;while(x*x>r&&g<a);return D=Math.atan(E/Math.abs(y)),{x:R,y:D,z:M}}function yC(e,t,i){if(t===Un)return{x:e.x+i[0],y:e.y+i[1],z:e.z+i[2]};if(t===Hn){var n=i[0],o=i[1],r=i[2],a=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-a*e.z)+o,z:c*(-s*e.x+a*e.y+e.z)+r}}}function bC(e,t,i){if(t===Un)return{x:e.x-i[0],y:e.y-i[1],z:e.z-i[2]};if(t===Hn){var n=i[0],o=i[1],r=i[2],a=i[3],s=i[4],l=i[5],c=i[6],u=(e.x-n)/c,d=(e.y-o)/c,h=(e.z-r)/c;return{x:u+l*d-s*h,y:-l*u+d+a*h,z:s*u-a*d+h}}}function yr(e){return e===Un||e===Hn}function CC(e,t,i){if(gC(e,t)||e.datum_type===Ql||t.datum_type===Ql)return i;var n=e.a,o=e.es;if(e.datum_type===co){var r=Rh(e,!1,i);if(r!==0)return;n=Eh,o=Ph}var a=t.a,s=t.b,l=t.es;if(t.datum_type===co&&(a=Eh,s=x1,l=Ph),o===l&&n===a&&!yr(e.datum_type)&&!yr(t.datum_type))return i;if(i=Fh(i,o,n),yr(e.datum_type)&&(i=yC(i,e.datum_type,e.datum_params)),yr(t.datum_type)&&(i=bC(i,t.datum_type,t.datum_params)),i=kh(i,l,a,s),t.datum_type===co){var c=Rh(t,!0,i);if(c!==0)return}return i}function Rh(e,t,i){if(e.grids===null||e.grids.length===0)return console.log("Grid shift grids not found"),-1;var n={x:-i.x,y:i.y},o={x:Number.NaN,y:Number.NaN},r=[];e:for(var a=0;a<e.grids.length;a++){var s=e.grids[a];if(r.push(s.name),s.isNull){o=n;break}if(s.mandatory,s.grid===null){if(s.mandatory)return console.log("Unable to find mandatory grid '"+s.name+"'"),-1;continue}for(var l=s.grid.subgrids,c=0,u=l.length;c<u;c++){var d=l[c],h=(Math.abs(d.del[1])+Math.abs(d.del[0]))/1e4,p=d.ll[0]-h,v=d.ll[1]-h,b=d.ll[0]+(d.lim[0]-1)*d.del[0]+h,y=d.ll[1]+(d.lim[1]-1)*d.del[1]+h;if(!(v>n.y||p>n.x||y<n.y||b<n.x)&&(o=wC(n,t,d),!isNaN(o.x)))break e}}return isNaN(o.x)?(console.log("Failed to find a grid shift table for location '"+-n.x*Xi+" "+n.y*Xi+" tried: '"+r+"'"),-1):(i.x=-o.x,i.y=o.y,0)}function wC(e,t,i){var n={x:Number.NaN,y:Number.NaN};if(isNaN(e.x))return n;var o={x:e.x,y:e.y};o.x-=i.ll[0],o.y-=i.ll[1],o.x=Oe(o.x-Math.PI)+Math.PI;var r=Vh(o,i);if(t){if(isNaN(r.x))return n;r.x=o.x-r.x,r.y=o.y-r.y;var a=9,s=1e-12,l,c;do{if(c=Vh(r,i),isNaN(c.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge.  Using first approximation.");break}l={x:o.x-(c.x+r.x),y:o.y-(c.y+r.y)},r.x+=l.x,r.y+=l.y}while(a--&&Math.abs(l.x)>s&&Math.abs(l.y)>s);if(a<0)return console.log("Inverse grid shift iterator failed to converge."),n;n.x=Oe(r.x+i.ll[0]),n.y=r.y+i.ll[1]}else isNaN(r.x)||(n.x=e.x+r.x,n.y=e.y+r.y);return n}function Vh(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)},o={x:i.x-1*n.x,y:i.y-1*n.y},r={x:Number.NaN,y:Number.NaN},a;if(n.x<0||n.x>=t.lim[0]||n.y<0||n.y>=t.lim[1])return r;a=n.y*t.lim[0]+n.x;var s={x:t.cvs[a][0],y:t.cvs[a][1]};a++;var l={x:t.cvs[a][0],y:t.cvs[a][1]};a+=t.lim[0];var c={x:t.cvs[a][0],y:t.cvs[a][1]};a--;var u={x:t.cvs[a][0],y:t.cvs[a][1]},d=o.x*o.y,h=o.x*(1-o.y),p=(1-o.x)*(1-o.y),v=(1-o.x)*o.y;return r.x=p*s.x+h*l.x+v*u.x+d*c.x,r.y=p*s.y+h*l.y+v*u.y+d*c.y,r}function $h(e,t,i){var n=i.x,o=i.y,r=i.z||0,a,s,l,c={};for(l=0;l<3;l++)if(!(t&&l===2&&i.z===void 0))switch(l===0?(a=n,"ew".indexOf(e.axis[l])!==-1?s="x":s="y"):l===1?(a=o,"ns".indexOf(e.axis[l])!==-1?s="y":s="x"):(a=r,s="z"),e.axis[l]){case"e":c[s]=a;break;case"w":c[s]=-a;break;case"n":c[s]=a;break;case"s":c[s]=-a;break;case"u":i[s]!==void 0&&(c.z=a);break;case"d":i[s]!==void 0&&(c.z=-a);break;default:return null}return c}function Nh(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 _C(e){zh(e.x),zh(e.y)}function zh(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 EC(e,t){return(e.datum.datum_type===Un||e.datum.datum_type===Hn||e.datum.datum_type===co)&&t.datumCode!=="WGS84"||(t.datum.datum_type===Un||t.datum.datum_type===Hn||t.datum.datum_type===co)&&e.datumCode!=="WGS84"}function br(e,t,i,n){var o;Array.isArray(i)?i=Nh(i):i={x:i.x,y:i.y,z:i.z,m:i.m};var r=i.z!==void 0;if(_C(i),e.datum&&t.datum&&EC(e,t)&&(o=new en("WGS84"),i=br(e,o,i,n),e=o),n&&e.axis!=="enu"&&(i=$h(e,!1,i)),e.projName==="longlat")i={x:i.x*Ut,y:i.y*Ut,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=CC(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*Xi,y:i.y*Xi,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"?$h(t,!0,i):(i&&!r&&delete i.z,i)}var Gh=en("WGS84");function Yl(e,t,i,n){var o,r,a;return Array.isArray(i)?(o=br(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 o.z=="number"?[o.x,o.y,o.z].concat(i.splice(3)):[o.x,o.y,i[2]].concat(i.splice(3)):[o.x,o.y].concat(i.splice(2)):[o.x,o.y]):(r=br(e,t,i,n),a=Object.keys(i),a.length===2||a.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;r[s]=i[s]}),r)}function Uh(e){return e instanceof en?e:e.oProj?e.oProj:en(e)}function yi(e,t,i){e=Uh(e);var n=!1,o;return typeof t=="undefined"?(t=e,e=Gh,n=!0):(typeof t.x!="undefined"||Array.isArray(t))&&(i=t,t=e,e=Gh,n=!0),t=Uh(t),i?Yl(e,t,i):(o={forward:function(r,a){return Yl(e,t,r,a)},inverse:function(r,a){return Yl(t,e,r,a)}},n&&(o.oProj=t),o)}var Hh=6,Wh="AJSAJS",qh="AFAFAF",mo=65,ui=73,Ai=79,da=86,ha=90,PC={forward:Qh,inverse:xC,toPoint:Zh};function Qh(e,t){return t=t||5,SC(OC({lat:e[1],lon:e[0]}),t)}function xC(e){var t=ec(Yh(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat,t.lon,t.lat]:[t.left,t.bottom,t.right,t.top]}function Zh(e){var t=ec(Yh(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function Kl(e){return e*(Math.PI/180)}function Jh(e){return 180*(e/Math.PI)}function OC(e){var t=e.lat,i=e.lon,n=6378137,o=.00669438,r=.9996,a,s,l,c,u,d,h,p=Kl(t),v=Kl(i),b,y;y=Math.floor((i+180)/6)+1,i===180&&(y=60),t>=56&&t<64&&i>=3&&i<12&&(y=32),t>=72&&t<84&&(i>=0&&i<9?y=31:i>=9&&i<21?y=33:i>=21&&i<33?y=35:i>=33&&i<42&&(y=37)),a=(y-1)*6-180+3,b=Kl(a),s=o/(1-o),l=n/Math.sqrt(1-o*Math.sin(p)*Math.sin(p)),c=Math.tan(p)*Math.tan(p),u=s*Math.cos(p)*Math.cos(p),d=Math.cos(p)*(v-b),h=n*((1-o/4-3*o*o/64-5*o*o*o/256)*p-(3*o/8+3*o*o/32+45*o*o*o/1024)*Math.sin(2*p)+(15*o*o/256+45*o*o*o/1024)*Math.sin(4*p)-35*o*o*o/3072*Math.sin(6*p));var E=r*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,x=r*(h+l*Math.tan(p)*(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&&(x+=1e7),{northing:Math.round(x),easting:Math.round(E),zoneNumber:y,zoneLetter:MC(t)}}function ec(e){var t=e.northing,i=e.easting,n=e.zoneLetter,o=e.zoneNumber;if(o<0||o>60)return null;var r=.9996,a=6378137,s=.00669438,l,c=(1-Math.sqrt(1-s))/(1+Math.sqrt(1-s)),u,d,h,p,v,b,y,E,x,g=i-5e5,w=t;n<"N"&&(w-=1e7),y=(o-1)*6-180+3,l=s/(1-s),b=w/r,E=b/(a*(1-s/4-3*s*s/64-5*s*s*s/256)),x=E+(3*c/2-27*c*c*c/32)*Math.sin(2*E)+(21*c*c/16-55*c*c*c*c/32)*Math.sin(4*E)+151*c*c*c/96*Math.sin(6*E),u=a/Math.sqrt(1-s*Math.sin(x)*Math.sin(x)),d=Math.tan(x)*Math.tan(x),h=l*Math.cos(x)*Math.cos(x),p=a*(1-s)/Math.pow(1-s*Math.sin(x)*Math.sin(x),1.5),v=g/(u*r);var O=x-u*Math.tan(x)/p*(v*v/2-(5+3*d+10*h-4*h*h-9*l)*v*v*v*v/24+(61+90*d+298*h+45*d*d-252*l-3*h*h)*v*v*v*v*v*v/720);O=Jh(O);var I=(v-(1+2*d+h)*v*v*v/6+(5-2*h+28*d-3*h*h+8*l+24*d*d)*v*v*v*v*v/120)/Math.cos(x);I=y+Jh(I);var R;if(e.accuracy){var D=ec({northing:e.northing+e.accuracy,easting:e.easting+e.accuracy,zoneLetter:e.zoneLetter,zoneNumber:e.zoneNumber});R={top:D.lat,right:D.lon,bottom:O,left:I}}else R={lat:O,lon:I};return R}function MC(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 SC(e,t){var i="00000"+e.easting,n="00000"+e.northing;return e.zoneNumber+e.zoneLetter+TC(e.easting,e.northing,e.zoneNumber)+i.substr(i.length-5,t)+n.substr(n.length-5,t)}function TC(e,t,i){var n=Xh(i),o=Math.floor(e/1e5),r=Math.floor(t/1e5)%20;return IC(o,r,n)}function Xh(e){var t=e%Hh;return t===0&&(t=Hh),t}function IC(e,t,i){var n=i-1,o=Wh.charCodeAt(n),r=qh.charCodeAt(n),a=o+e-1,s=r+t,l=!1;a>ha&&(a=a-ha+mo-1,l=!0),(a===ui||o<ui&&a>ui||(a>ui||o<ui)&&l)&&a++,(a===Ai||o<Ai&&a>Ai||(a>Ai||o<Ai)&&l)&&(a++,a===ui&&a++),a>ha&&(a=a-ha+mo-1),s>da?(s=s-da+mo-1,l=!0):l=!1,(s===ui||r<ui&&s>ui||(s>ui||r<ui)&&l)&&s++,(s===Ai||r<Ai&&s>Ai||(s>Ai||r<Ai)&&l)&&(s++,s===ui&&s++),s>da&&(s=s-da+mo-1);var c=String.fromCharCode(a)+String.fromCharCode(s);return c}function Yh(e){if(e&&e.length===0)throw"MGRSPoint coverting from nothing";for(var t=e.length,i=null,n="",o,r=0;!/[A-Z]/.test(o=e.charAt(r));){if(r>=2)throw"MGRSPoint bad conversion from: "+e;n+=o,r++}var a=parseInt(n,10);if(r===0||r+3>t)throw"MGRSPoint bad conversion from: "+e;var s=e.charAt(r++);if(s<="A"||s==="B"||s==="Y"||s>="Z"||s==="I"||s==="O")throw"MGRSPoint zone letter "+s+" not handled: "+e;i=e.substring(r,r+=2);for(var l=Xh(a),c=AC(i.charAt(0),l),u=BC(i.charAt(1),l);u<LC(s);)u+=2e6;var d=t-r;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 h=d/2,p=0,v=0,b,y,E,x,g;return h>0&&(b=1e5/Math.pow(10,h),y=e.substring(r,r+h),p=parseFloat(y)*b,E=e.substring(r+h),v=parseFloat(E)*b),x=p+c,g=v+u,{easting:x,northing:g,zoneLetter:s,zoneNumber:a,accuracy:b}}function AC(e,t){for(var i=Wh.charCodeAt(t-1),n=1e5,o=!1;i!==e.charCodeAt(0);){if(i++,i===ui&&i++,i===Ai&&i++,i>ha){if(o)throw"Bad character: "+e;i=mo,o=!0}n+=1e5}return n}function BC(e,t){if(e>"V")throw"MGRSPoint given invalid Northing "+e;for(var i=qh.charCodeAt(t-1),n=0,o=!1;i!==e.charCodeAt(0);){if(i++,i===ui&&i++,i===Ai&&i++,i>da){if(o)throw"Bad character: "+e;i=mo,o=!0}n+=1e5}return n}function LC(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 po(e,t,i){if(!(this instanceof po))return new po(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")}po.fromMGRS=function(e){return new po(Zh(e))},po.prototype.toMGRS=function(e){return Qh([this.x,this.y],e)};var jC=1,FC=.25,Kh=.046875,em=.01953125,tm=.01068115234375,kC=.75,RC=.46875,VC=.013020833333333334,$C=.007120768229166667,NC=.3645833333333333,zC=.005696614583333333,GC=.3076171875;function im(e){var t=[];t[0]=jC-e*(FC+e*(Kh+e*(em+e*tm))),t[1]=e*(kC-e*(Kh+e*(em+e*tm)));var i=e*e;return t[2]=i*(RC-e*(VC+e*$C)),i*=e,t[3]=i*(NC-e*zC),t[4]=i*e*GC,t}function Cr(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 UC=20;function nm(e,t,i){for(var n=1/(1-t),o=e,r=UC;r;--r){var a=Math.sin(o),s=1-t*a*a;if(s=(Cr(o,a,Math.cos(o),i)-e)*(s*Math.sqrt(s))*n,o-=s,Math.abs(s)<Pe)return o}return o}function HC(){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=im(this.es),this.ml0=Cr(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function WC(e){var t=e.x,i=e.y,n=Oe(t-this.long0),o,r,a,s=Math.sin(i),l=Math.cos(i);if(this.es){var u=l*n,d=Math.pow(u,2),h=this.ep2*Math.pow(l,2),p=Math.pow(h,2),v=Math.abs(l)>Pe?Math.tan(i):0,b=Math.pow(v,2),y=Math.pow(b,2);o=1-this.es*Math.pow(s,2),u=u/Math.sqrt(o);var E=Cr(i,s,l,this.en);r=this.a*(this.k0*u*(1+d/6*(1-b+h+d/20*(5-18*b+y+14*h-58*b*h+d/42*(61+179*y-y*b-479*b)))))+this.x0,a=this.a*(this.k0*(E-this.ml0+s*n*u/2*(1+d/12*(5-b+9*h+4*p+d/30*(61+y-58*b+270*h-330*b*h+d/56*(1385+543*y-y*b-3111*b))))))+this.y0}else{var c=l*Math.sin(n);if(Math.abs(Math.abs(c)-1)<Pe)return 93;if(r=.5*this.a*this.k0*Math.log((1+c)/(1-c))+this.x0,a=l*Math.cos(n)/Math.sqrt(1-Math.pow(c,2)),c=Math.abs(a),c>=1){if(c-1>Pe)return 93;a=0}else a=Math.acos(a);i<0&&(a=-a),a=this.a*this.k0*(a-this.lat0)+this.y0}return e.x=r,e.y=a,e}function qC(e){var t,i,n,o,r=(e.x-this.x0)*(1/this.a),a=(e.y-this.y0)*(1/this.a);if(this.es)if(t=this.ml0+a/this.k0,i=nm(t,this.es,this.en),Math.abs(i)<pe){var d=Math.sin(i),h=Math.cos(i),p=Math.abs(h)>Pe?Math.tan(i):0,v=this.ep2*Math.pow(h,2),b=Math.pow(v,2),y=Math.pow(p,2),E=Math.pow(y,2);t=1-this.es*Math.pow(d,2);var x=r*Math.sqrt(t)/this.k0,g=Math.pow(x,2);t=t*p,n=i-t*g/(1-this.es)*.5*(1-g/12*(5+3*y-9*v*y+v-4*b-g/30*(61+90*y-252*v*y+45*E+46*v-g/56*(1385+3633*y+4095*E+1574*E*y)))),o=Oe(this.long0+x*(1-g/6*(1+2*y+v-g/20*(5+28*y+24*E+8*v*y+6*v-g/42*(61+662*y+1320*E+720*E*y))))/h)}else n=pe*ca(a),o=0;else{var s=Math.exp(r/this.k0),l=.5*(s-1/s),c=this.lat0+a/this.k0,u=Math.cos(c);t=Math.sqrt((1-Math.pow(u,2))/(1+Math.pow(l,2))),n=Math.asin(t),a<0&&(n=-n),l===0&&u===0?o=0:o=Oe(Math.atan2(l,u)+this.long0)}return e.x=o,e.y=n,e}var QC=["Fast_Transverse_Mercator","Fast Transverse Mercator"],wr={init:HC,forward:WC,inverse:qC,names:QC};function om(e){var t=Math.exp(e);return t=(t-1/t)/2,t}function zi(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 ZC(e){var t=1+e,i=t-1;return i===0?e:e*Math.log(t)/i}function JC(e){var t=Math.abs(e);return t=ZC(t*(1+t/(zi(1,t)+1))),e<0?-t:t}function tc(e,t){for(var i=2*Math.cos(2*t),n=e.length-1,o=e[n],r=0,a;--n>=0;)a=-r+i*o+e[n],r=o,o=a;return t+a*Math.sin(2*t)}function XC(e,t){for(var i=2*Math.cos(t),n=e.length-1,o=e[n],r=0,a;--n>=0;)a=-r+i*o+e[n],r=o,o=a;return Math.sin(t)*a}function YC(e){var t=Math.exp(e);return t=(t+1/t)/2,t}function am(e,t,i){for(var n=Math.sin(t),o=Math.cos(t),r=om(i),a=YC(i),s=2*o*a,l=-2*n*r,c=e.length-1,u=e[c],d=0,h=0,p=0,v,b;--c>=0;)v=h,b=d,h=u,d=p,u=-v+s*h-l*d+e[c],p=-b+l*h+s*d;return s=n*a,l=o*r,[s*u-l*p,s*p+l*u]}function KC(){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&&(wr.init.apply(this),this.forward=wr.forward,this.inverse=wr.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=tc(this.cbg,this.lat0);this.Zb=-this.Qn*(n+XC(this.gtu,2*n))}function ew(e){var t=Oe(e.x-this.long0),i=e.y;i=tc(this.cbg,i);var n=Math.sin(i),o=Math.cos(i),r=Math.sin(t),a=Math.cos(t);i=Math.atan2(n,a*o),t=Math.atan2(r*o,zi(n,o*a)),t=JC(Math.tan(t));var s=am(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 tw(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,o;if(Math.abs(t)<=2.623395162778){var r=am(this.utg,2*i,2*t);i=i+r[0],t=t+r[1],t=Math.atan(om(t));var a=Math.sin(i),s=Math.cos(i),l=Math.sin(t),c=Math.cos(t);i=Math.atan2(a*c,zi(l,c*s)),t=Math.atan2(l,c*s),n=Oe(t+this.long0),o=tc(this.cgb,i)}else n=1/0,o=1/0;return e.x=n,e.y=o,e}var iw=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","tmerc"],_r={init:KC,forward:ew,inverse:tw,names:iw};function nw(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 ow="etmerc";function aw(){var e=nw(this.zone,this.long0);if(e===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(e)-183)*Ut,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,_r.init.apply(this),this.forward=_r.forward,this.inverse=_r.inverse}var rw=["Universal Transverse Mercator System","utm"],sw={init:aw,names:rw,dependsOn:ow};function ic(e,t){return Math.pow((1-e)/(1+e),t)}var lw=20;function cw(){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+Qe)/(Math.pow(Math.tan(.5*this.lat0+Qe),this.C)*ic(this.e*e,this.ratexp))}function uw(e){var t=e.x,i=e.y;return e.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*i+Qe),this.C)*ic(this.e*Math.sin(i),this.ratexp))-pe,e.x=this.C*t,e}function dw(e){for(var t=1e-14,i=e.x/this.C,n=e.y,o=Math.pow(Math.tan(.5*n+Qe)/this.K,1/this.C),r=lw;r>0&&(n=2*Math.atan(o*ic(this.e*Math.sin(e.y),-.5*this.e))-pe,!(Math.abs(n-e.y)<t));--r)e.y=n;return r?(e.x=i,e.y=n,e):null}var hw=["gauss"],nc={init:cw,forward:uw,inverse:dw,names:hw};function mw(){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 pw(e){var t,i,n,o;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),o=this.k0*this.R2/(1+this.sinc0*t+this.cosc0*i*n),e.x=o*i*Math.sin(e.x),e.y=o*(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 vw(e){var t,i,n,o,r;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,r=Math.sqrt(e.x*e.x+e.y*e.y)){var a=2*Math.atan2(r,this.R2);t=Math.sin(a),i=Math.cos(a),o=Math.asin(i*this.sinc0+e.y*t*this.cosc0/r),n=Math.atan2(e.x*t,r*this.cosc0*i-e.y*this.sinc0*t)}else o=this.phic0,n=0;return e.x=n,e.y=o,nc.inverse.apply(this,[e]),e.x=Oe(e.x+this.long0),e}var fw=["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"],gw={init:mw,forward:pw,inverse:vw,names:fw};function yw(e,t,i){return t*=i,Math.tan(.5*(pe+e))*Math.pow((1-t)/(1+t),.5*i)}function bw(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,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)<=Pe&&(this.k0=.5*(1+ca(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=Pe&&(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)<=Pe&&Math.abs(Math.cos(this.lat_ts))>Pe&&(this.k0=.5*this.cons*Ki(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/Ni(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 Cw(e){var t=e.x,i=e.y,n=Math.sin(i),o=Math.cos(i),r,a,s,l,c,u,d=Oe(t-this.long0);return Math.abs(Math.abs(t-this.long0)-Math.PI)<=Pe&&Math.abs(i+this.lat0)<=Pe?(e.x=NaN,e.y=NaN,e):this.sphere?(r=2*this.k0/(1+this.sinlat0*n+this.coslat0*o*Math.cos(d)),e.x=this.a*r*o*Math.sin(d)+this.x0,e.y=this.a*r*(this.coslat0*n-this.sinlat0*o*Math.cos(d))+this.y0,e):(a=2*Math.atan(this.ssfn_(i,n,this.e))-pe,l=Math.cos(a),s=Math.sin(a),Math.abs(this.coslat0)<=Pe?(c=Ni(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)<Pe?(r=2*this.a*this.k0/(1+l*Math.cos(d)),e.y=r*s):(r=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*s+this.cosX0*l*Math.cos(d))),e.y=r*(this.cosX0*s-this.sinX0*l*Math.cos(d))+this.y0),e.x=r*l*Math.sin(d)+this.x0,e))}function ww(e){e.x-=this.x0,e.y-=this.y0;var t,i,n,o,r,a=Math.sqrt(e.x*e.x+e.y*e.y);if(this.sphere){var s=2*Math.atan(a/(2*this.a*this.k0));return t=this.long0,i=this.lat0,a<=Pe?(e.x=t,e.y=i,e):(i=Math.asin(Math.cos(s)*this.sinlat0+e.y*Math.sin(s)*this.coslat0/a),Math.abs(this.coslat0)<Pe?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),a*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)<=Pe){if(a<=Pe)return i=this.lat0,t=this.long0,e.x=t,e.y=i,e;e.x*=this.con,e.y*=this.con,n=a*this.cons/(2*this.a*this.k0),i=this.con*ua(this.e,n),t=this.con*Oe(this.con*this.long0+Math.atan2(e.x,-1*e.y))}else o=2*Math.atan(a*this.cosX0/(2*this.a*this.k0*this.ms1)),t=this.long0,a<=Pe?r=this.X0:(r=Math.asin(Math.cos(o)*this.sinX0+e.y*Math.sin(o)*this.cosX0/a),t=Oe(this.long0+Math.atan2(e.x*Math.sin(o),a*this.cosX0*Math.cos(o)-e.y*this.sinX0*Math.sin(o)))),i=-1*ua(this.e,Math.tan(.5*(pe+r)));return e.x=t,e.y=i,e}var _w=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)","Polar_Stereographic"],Ew={init:bw,forward:Cw,inverse:ww,names:_w,ssfn_:yw};function Pw(){var e=this.lat0;this.lambda0=this.long0;var t=Math.sin(e),i=this.a,n=this.rf,o=1/n,r=2*o-Math.pow(o,2),a=this.e=Math.sqrt(r);this.R=this.k0*i*Math.sqrt(1-r)/(1-r*Math.pow(t,2)),this.alpha=Math.sqrt(1+r/(1-r)*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+a*t)/(1-a*t));this.K=s-this.alpha*l+this.alpha*a/2*c}function xw(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,o=2*(Math.atan(Math.exp(n))-Math.PI/4),r=this.alpha*(e.x-this.lambda0),a=Math.atan(Math.sin(r)/(Math.sin(this.b0)*Math.tan(o)+Math.cos(this.b0)*Math.cos(r))),s=Math.asin(Math.cos(this.b0)*Math.sin(o)-Math.sin(this.b0)*Math.cos(o)*Math.cos(r));return e.y=this.R/2*Math.log((1+Math.sin(s))/(1-Math.sin(s)))+this.y0,e.x=this.R*a+this.x0,e}function Ow(e){for(var t=e.x-this.x0,i=e.y-this.y0,n=t/this.R,o=2*(Math.atan(Math.exp(i/this.R))-Math.PI/4),r=Math.asin(Math.cos(this.b0)*Math.sin(o)+Math.sin(this.b0)*Math.cos(o)*Math.cos(n)),a=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(o))),s=this.lambda0+a/this.alpha,l=0,c=r,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+r/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 Mw=["somerc"],Sw={init:Pw,forward:xw,inverse:Ow,names:Mw},vo=1e-7;function Tw(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 Iw(){var e,t,i,n,o,r,a,s,l,c,u=0,d,h=0,p=0,v=0,b=0,y=0,E=0;this.no_off=Tw(this),this.no_rot="no_rot"in this;var x=!1;"alpha"in this&&(x=!0);var g=!1;if("rectified_grid_angle"in this&&(g=!0),x&&(E=this.alpha),g&&(u=this.rectified_grid_angle*Ut),x||g)h=this.longc;else if(p=this.long1,b=this.lat1,v=this.long2,y=this.lat2,Math.abs(b-y)<=vo||(e=Math.abs(b))<=vo||Math.abs(e-pe)<=vo||Math.abs(Math.abs(this.lat0)-pe)<=vo||Math.abs(Math.abs(y)-pe)<=vo)throw new Error;var w=1-this.es;t=Math.sqrt(w),Math.abs(this.lat0)>Pe?(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/w),this.A=this.B*this.k0*t/e,n=this.B*t/(i*Math.sqrt(e)),o=n*n-1,o<=0?o=0:(o=Math.sqrt(o),this.lat0<0&&(o=-o)),this.E=o+=n,this.E*=Math.pow(Ni(this.e,this.lat0,s),this.B)):(this.B=1/t,this.A=this.k0,this.E=n=o=1),x||g?(x?(d=Math.asin(Math.sin(E)/n),g||(u=E)):(d=u,E=Math.asin(n*Math.sin(d))),this.lam0=h-Math.asin(.5*(o-1/o)*Math.tan(d))/this.B):(r=Math.pow(Ni(this.e,b,Math.sin(b)),this.B),a=Math.pow(Ni(this.e,y,Math.sin(y)),this.B),o=this.E/r,l=(a-r)/(a+r),c=this.E*this.E,c=(c-a*r)/(c+a*r),e=p-v,e<-Math.pi?v-=sa:e>Math.pi&&(v+=sa),this.lam0=Oe(.5*(p+v)-Math.atan(c*Math.tan(.5*this.B*(p-v))/l)/this.B),d=Math.atan(2*Math.sin(this.B*Oe(p-this.lam0))/(o-1/o)),u=E=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(E))),this.lat0<0&&(this.u_0=-this.u_0)),o=.5*d,this.v_pole_n=this.ArB*Math.log(Math.tan(Qe-o)),this.v_pole_s=this.ArB*Math.log(Math.tan(Qe+o))}function Aw(e){var t={},i,n,o,r,a,s,l,c;if(e.x=e.x-this.lam0,Math.abs(Math.abs(e.y)-pe)>Pe){if(a=this.E/Math.pow(Ni(this.e,e.y,Math.sin(e.y)),this.B),s=1/a,i=.5*(a-s),n=.5*(a+s),r=Math.sin(this.B*e.x),o=(i*this.singam-r*this.cosgam)/n,Math.abs(Math.abs(o)-1)<Pe)throw new Error;c=.5*this.ArB*Math.log((1-o)/(1+o)),s=Math.cos(this.B*e.x),Math.abs(s)<vo?l=this.A*e.x:l=this.ArB*Math.atan2(i*this.cosgam+r*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 Dw(e){var t,i,n,o,r,a,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),o=.5*(n-1/n),r=.5*(n+1/n),a=Math.sin(this.BrA*t),s=(a*this.cosgam+o*this.singam)/r,Math.abs(Math.abs(s)-1)<Pe)l.x=0,l.y=s<0?-pe:pe;else{if(l.y=this.E/Math.sqrt((1+s)/(1-s)),l.y=ua(this.e,Math.pow(l.y,1/this.B)),l.y===1/0)throw new Error;l.x=-this.rB*Math.atan2(o*this.cosgam-a*this.singam,Math.cos(this.BrA*t))}return l.x+=this.lam0,l}var Bw=["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"],Lw={init:Iw,forward:Aw,inverse:Dw,names:Bw};function jw(){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)<Pe)){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),o=Ni(this.e,this.lat1,t),r=Math.sin(this.lat2),a=Math.cos(this.lat2),s=Ki(this.e,r,a),l=Ni(this.e,this.lat2,r),c=Ni(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>Pe?this.ns=Math.log(n/s)/Math.log(o/l):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=n/(this.ns*Math.pow(o,this.ns)),this.rh=this.a*this.f0*Math.pow(c,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function Fw(e){var t=e.x,i=e.y;Math.abs(2*Math.abs(i)-Math.PI)<=Pe&&(i=ca(i)*(pe-2*Pe));var n=Math.abs(Math.abs(i)-pe),o,r;if(n>Pe)o=Ni(this.e,i,Math.sin(i)),r=this.a*this.f0*Math.pow(o,this.ns);else{if(n=i*this.ns,n<=0)return null;r=0}var a=this.ns*Oe(t-this.long0);return e.x=this.k0*(r*Math.sin(a))+this.x0,e.y=this.k0*(this.rh-r*Math.cos(a))+this.y0,e}function kw(e){var t,i,n,o,r,a=(e.x-this.x0)/this.k0,s=this.rh-(e.y-this.y0)/this.k0;this.ns>0?(t=Math.sqrt(a*a+s*s),i=1):(t=-Math.sqrt(a*a+s*s),i=-1);var l=0;if(t!==0&&(l=Math.atan2(i*a,i*s)),t!==0||this.ns>0){if(i=1/this.ns,n=Math.pow(t/(this.a*this.f0),i),o=ua(this.e,n),o===-9999)return null}else o=-pe;return r=Oe(l/this.ns+this.long0),e.x=r,e.y=o,e}var Rw=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"],Vw={init:jw,forward:Fw,inverse:kw,names:Rw};function $w(){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 Nw(e){var t,i,n,o,r,a,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,o=Math.asin(Math.cos(this.ad)*Math.sin(i)+Math.sin(this.ad)*Math.cos(i)*Math.cos(n)),r=Math.asin(Math.cos(i)*Math.sin(n)/Math.cos(o)),a=this.n*r,s=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(o/2+this.s45),this.n),e.y=s*Math.cos(a)/1,e.x=s*Math.sin(a)/1,this.czech||(e.y*=-1,e.x*=-1),e}function zw(e){var t,i,n,o,r,a,s,l,c=e.x;e.x=e.y,e.y=c,this.czech||(e.y*=-1,e.x*=-1),a=Math.sqrt(e.x*e.x+e.y*e.y),r=Math.atan2(e.y,e.x),o=r/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/a,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(o)),i=Math.asin(Math.cos(n)*Math.sin(o)/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 Gw=["Krovak","krovak"],Uw={init:$w,forward:Nw,inverse:zw,names:Gw};function ii(e,t,i,n,o){return e*o-t*Math.sin(2*o)+i*Math.sin(4*o)-n*Math.sin(6*o)}function ma(e){return 1-.25*e*(1+e/16*(3+1.25*e))}function pa(e){return .375*e*(1+.25*e*(1+.46875*e))}function va(e){return .05859375*e*e*(1+.75*e)}function fa(e){return e*e*e*(35/3072)}function fo(e,t,i){var n=t*i;return e/Math.sqrt(1-n*n)}function go(e){return Math.abs(e)<pe?e:e-ca(e)*Math.PI}function Er(e,t,i,n,o){var r,a;r=e/t;for(var s=0;s<15;s++)if(a=(e-(t*r-i*Math.sin(2*r)+n*Math.sin(4*r)-o*Math.sin(6*r)))/(t-2*i*Math.cos(2*r)+4*n*Math.cos(4*r)-6*o*Math.cos(6*r)),r+=a,Math.abs(a)<=1e-10)return r;return NaN}function Hw(){this.sphere||(this.e0=ma(this.es),this.e1=pa(this.es),this.e2=va(this.es),this.e3=fa(this.es),this.ml0=this.a*ii(this.e0,this.e1,this.e2,this.e3,this.lat0))}function Ww(e){var t,i,n=e.x,o=e.y;if(n=Oe(n-this.long0),this.sphere)t=this.a*Math.asin(Math.cos(o)*Math.sin(n)),i=this.a*(Math.atan2(Math.tan(o),Math.cos(n))-this.lat0);else{var r=Math.sin(o),a=Math.cos(o),s=fo(this.a,this.e,r),l=Math.tan(o)*Math.tan(o),c=n*Math.cos(o),u=c*c,d=this.es*a*a/(1-this.es),h=this.a*ii(this.e0,this.e1,this.e2,this.e3,o);t=s*c*(1-u*l*(1/6-(8-l+8*d)*u/120)),i=h-this.ml0+s*r/a*u*(.5+(5-l+6*d)*u/24)}return e.x=t+this.x0,e.y=i+this.y0,e}function qw(e){e.x-=this.x0,e.y-=this.y0;var t=e.x/this.a,i=e.y/this.a,n,o;if(this.sphere){var r=i+this.lat0;n=Math.asin(Math.sin(r)*Math.cos(t)),o=Math.atan2(Math.tan(t),Math.cos(r))}else{var a=this.ml0/this.a+i,s=Er(a,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(s)-pe)<=Pe)return e.x=this.long0,e.y=pe,i<0&&(e.y*=-1),e;var l=fo(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,h=d*d;n=s-l*Math.tan(s)/c*d*d*(.5-(1+3*u)*d*d/24),o=d*(1-h*(u/3+(1+3*u)*u*h/15))/Math.cos(s)}return e.x=Oe(o+this.long0),e.y=go(n),e}var Qw=["Cassini","Cassini_Soldner","cass"],Zw={init:Hw,forward:Ww,inverse:qw,names:Qw};function bn(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 Jw=1,Xw=2,Yw=3,Kw=4;function e_(){var e=Math.abs(this.lat0);if(Math.abs(e-pe)<Pe?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(e)<Pe?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0){var t;switch(this.qp=bn(this.e,1),this.mmf=.5/(1-this.es),this.apa=c_(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=bn(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 t_(e){var t,i,n,o,r,a,s,l,c,u,d=e.x,h=e.y;if(d=Oe(d-this.long0),this.sphere){if(r=Math.sin(h),u=Math.cos(h),n=Math.cos(d),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(i=this.mode===this.EQUIT?1+u*n:1+this.sinph0*r+this.cosph0*u*n,i<=Pe)return null;i=Math.sqrt(2/i),t=i*u*Math.sin(d),i*=this.mode===this.EQUIT?r:this.cosph0*r-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(h+this.lat0)<Pe)return null;i=Qe-h*.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),o=Math.sin(d),r=Math.sin(h),a=bn(this.e,r),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(s=a/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+h,a=this.qp-a;break;case this.S_POLE:c=h-pe,a=this.qp+a;break}if(Math.abs(c)<Pe)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*o;break;case this.N_POLE:case this.S_POLE:a>=0?(t=(c=Math.sqrt(a))*o,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 i_(e){e.x-=this.x0,e.y-=this.y0;var t=e.x/this.a,i=e.y/this.a,n,o,r,a,s,l,c;if(this.sphere){var u=0,d,h=0;if(d=Math.sqrt(t*t+i*i),o=d*.5,o>1)return null;switch(o=2*Math.asin(o),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(h=Math.sin(o),u=Math.cos(o)),this.mode){case this.EQUIT:o=Math.abs(d)<=Pe?0:Math.asin(i*h/d),t*=h,i=u*d;break;case this.OBLIQ:o=Math.abs(d)<=Pe?this.lat0:Math.asin(u*this.sinph0+i*h*this.cosph0/d),t*=h*this.cosph0,i=(u-Math.sin(o)*this.sinph0)*d;break;case this.N_POLE:i=-i,o=pe-o;break;case this.S_POLE:o-=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<Pe)return e.x=this.long0,e.y=this.lat0,e;a=2*Math.asin(.5*l/this.rq),r=Math.cos(a),t*=a=Math.sin(a),this.mode===this.OBLIQ?(c=r*this.sinb1+i*a*this.cosb1/l,s=this.qp*c,i=l*this.cosb1*r-i*this.sinb1*a):(c=i*a/l,s=this.qp*c,i=l*r)}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),o=u_(Math.asin(c),this.apa)}return e.x=Oe(this.long0+n),e.y=o,e}var n_=.3333333333333333,o_=.17222222222222222,a_=.10257936507936508,r_=.06388888888888888,s_=.0664021164021164,l_=.016415012942191543;function c_(e){var t,i=[];return i[0]=e*n_,t=e*e,i[0]+=t*o_,i[1]=t*r_,t*=e,i[0]+=t*a_,i[1]+=t*s_,i[2]=t*l_,i}function u_(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 d_=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],h_={init:e_,forward:t_,inverse:i_,names:d_,S_POLE:Jw,N_POLE:Xw,EQUIT:Yw,OBLIQ:Kw};function Cn(e){return Math.abs(e)>1&&(e=e>1?1:-1),Math.asin(e)}function m_(){Math.abs(this.lat1+this.lat2)<Pe||(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=bn(this.e3,this.sin_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=bn(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=bn(this.e3,this.sin_po),Math.abs(this.lat1-this.lat2)>Pe?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 p_(e){var t=e.x,i=e.y;this.sin_phi=Math.sin(i),this.cos_phi=Math.cos(i);var n=bn(this.e3,this.sin_phi),o=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,r=this.ns0*Oe(t-this.long0),a=o*Math.sin(r)+this.x0,s=this.rh-o*Math.cos(r)+this.y0;return e.x=a,e.y=s,e}function v_(e){var t,i,n,o,r,a;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),o=0,t!==0&&(o=Math.atan2(n*e.x,n*e.y)),n=t*this.ns0/this.a,this.sphere?a=Math.asin((this.c-n*n)/(2*this.ns0)):(i=(this.c-n*n)/this.ns0,a=this.phi1z(this.e3,i)),r=Oe(o/this.ns0+this.long0),e.x=r,e.y=a,e}function f_(e,t){var i,n,o,r,a,s=Cn(.5*t);if(e<Pe)return s;for(var l=e*e,c=1;c<=25;c++)if(i=Math.sin(s),n=Math.cos(s),o=e*i,r=1-o*o,a=.5*r*r/n*(t/(1-l)-i/r+.5/e*Math.log((1-o)/(1+o))),s=s+a,Math.abs(a)<=1e-7)return s;return null}var g_=["Albers_Conic_Equal_Area","Albers","aea"],y_={init:m_,forward:p_,inverse:v_,names:g_,phi1z:f_};function b_(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function C_(e){var t,i,n,o,r,a,s,l,c=e.x,u=e.y;return n=Oe(c-this.long0),t=Math.sin(u),i=Math.cos(u),o=Math.cos(n),a=this.sin_p14*t+this.cos_p14*i*o,r=1,a>0||Math.abs(a)<=Pe?(s=this.x0+this.a*r*i*Math.sin(n)/a,l=this.y0+this.a*r*(this.cos_p14*t-this.sin_p14*i*o)/a):(s=this.x0+this.infinity_dist*i*Math.sin(n),l=this.y0+this.infinity_dist*(this.cos_p14*t-this.sin_p14*i*o)),e.x=s,e.y=l,e}function w_(e){var t,i,n,o,r,a;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))?(o=Math.atan2(t,this.rc),i=Math.sin(o),n=Math.cos(o),a=Cn(n*this.sin_p14+e.y*i*this.cos_p14/t),r=Math.atan2(e.x*i,t*this.cos_p14*n-e.y*this.sin_p14*i),r=Oe(this.long0+r)):(a=this.phic0,r=0),e.x=r,e.y=a,e}var __=["gnom"],E_={init:b_,forward:C_,inverse:w_,names:__};function P_(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),o,r,a,s,l=0;l<30;l++)if(r=Math.sin(n),a=Math.cos(n),s=e*r,o=Math.pow(1-s*s,2)/(2*a)*(t/(1-e*e)-r/(1-s*s)+.5/e*Math.log((1-s)/(1+s))),n+=o,Math.abs(o)<=1e-10)return n;return NaN}function x_(){this.sphere||(this.k0=Ki(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function O_(e){var t=e.x,i=e.y,n,o,r=Oe(t-this.long0);if(this.sphere)n=this.x0+this.a*r*Math.cos(this.lat_ts),o=this.y0+this.a*Math.sin(i)/Math.cos(this.lat_ts);else{var a=bn(this.e,Math.sin(i));n=this.x0+this.a*this.k0*r,o=this.y0+this.a*a*.5/this.k0}return e.x=n,e.y=o,e}function M_(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=P_(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 S_=["cea"],T_={init:x_,forward:O_,inverse:M_,names:S_};function I_(){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 A_(e){var t=e.x,i=e.y,n=Oe(t-this.long0),o=go(i-this.lat0);return e.x=this.x0+this.a*n*this.rc,e.y=this.y0+this.a*o,e}function D_(e){var t=e.x,i=e.y;return e.x=Oe(this.long0+(t-this.x0)/(this.a*this.rc)),e.y=go(this.lat0+(i-this.y0)/this.a),e}var B_=["Equirectangular","Equidistant_Cylindrical","eqc"],L_={init:I_,forward:A_,inverse:D_,names:B_},rm=20;function j_(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=ma(this.es),this.e1=pa(this.es),this.e2=va(this.es),this.e3=fa(this.es),this.ml0=this.a*ii(this.e0,this.e1,this.e2,this.e3,this.lat0)}function F_(e){var t=e.x,i=e.y,n,o,r,a=Oe(t-this.long0);if(r=a*Math.sin(i),this.sphere)Math.abs(i)<=Pe?(n=this.a*a,o=-1*this.a*this.lat0):(n=this.a*Math.sin(r)/Math.tan(i),o=this.a*(go(i-this.lat0)+(1-Math.cos(r))/Math.tan(i)));else if(Math.abs(i)<=Pe)n=this.a*a,o=-1*this.ml0;else{var s=fo(this.a,this.e,Math.sin(i))/Math.tan(i);n=s*Math.sin(r),o=this.a*ii(this.e0,this.e1,this.e2,this.e3,i)-this.ml0+s*(1-Math.cos(r))}return e.x=n+this.x0,e.y=o+this.y0,e}function k_(e){var t,i,n,o,r,a,s,l,c;if(n=e.x-this.x0,o=e.y-this.y0,this.sphere)if(Math.abs(o+this.a*this.lat0)<=Pe)t=Oe(n/this.a+this.long0),i=0;else{a=this.lat0+o/this.a,s=n*n/this.a/this.a+a*a,l=a;var u;for(r=rm;r;--r)if(u=Math.tan(l),c=-1*(a*(l*u+1)-l-.5*(l*l+s)*u)/((l-a)/u-1),l+=c,Math.abs(c)<=Pe){i=l;break}t=Oe(this.long0+Math.asin(n*Math.tan(l)/this.a)/Math.sin(i))}else if(Math.abs(o+this.ml0)<=Pe)i=0,t=Oe(this.long0+n/this.a);else{a=(this.ml0+o)/this.a,s=n*n/this.a/this.a+a*a,l=a;var d,h,p,v,b;for(r=rm;r;--r)if(b=this.e*Math.sin(l),d=Math.sqrt(1-b*b)*Math.tan(l),h=this.a*ii(this.e0,this.e1,this.e2,this.e3,l),p=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),v=h/this.a,c=(a*(d*v+1)-v-.5*d*(v*v+s))/(this.es*Math.sin(2*l)*(v*v+s-2*a*v)/(4*d)+(a-v)*(d*p-2/Math.sin(2*l))-p),l-=c,Math.abs(c)<=Pe){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 R_=["Polyconic","poly"],V_={init:j_,forward:F_,inverse:k_,names:R_};function $_(){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 N_(e){var t,i=e.x,n=e.y,o=n-this.lat0,r=i-this.long0,a=o/ra*1e-5,s=r,l=1,c=0;for(t=1;t<=10;t++)l=l*a,c=c+this.A[t]*l;var u=c,d=s,h=1,p=0,v,b,y=0,E=0;for(t=1;t<=6;t++)v=h*u-p*d,b=p*u+h*d,h=v,p=b,y=y+this.B_re[t]*h-this.B_im[t]*p,E=E+this.B_im[t]*h+this.B_re[t]*p;return e.x=E*this.a+this.x0,e.y=y*this.a+this.y0,e}function z_(e){var t,i=e.x,n=e.y,o=i-this.x0,r=n-this.y0,a=r/this.a,s=o/this.a,l=1,c=0,u,d,h=0,p=0;for(t=1;t<=6;t++)u=l*a-c*s,d=c*a+l*s,l=u,c=d,h=h+this.C_re[t]*l-this.C_im[t]*c,p=p+this.C_im[t]*l+this.C_re[t]*c;for(var v=0;v<this.iterations;v++){var b=h,y=p,E,x,g=a,w=s;for(t=2;t<=6;t++)E=b*h-y*p,x=y*h+b*p,b=E,y=x,g=g+(t-1)*(this.B_re[t]*b-this.B_im[t]*y),w=w+(t-1)*(this.B_im[t]*b+this.B_re[t]*y);b=1,y=0;var O=this.B_re[1],I=this.B_im[1];for(t=2;t<=6;t++)E=b*h-y*p,x=y*h+b*p,b=E,y=x,O=O+t*(this.B_re[t]*b-this.B_im[t]*y),I=I+t*(this.B_im[t]*b+this.B_re[t]*y);var R=O*O+I*I;h=(g*O+w*I)/R,p=(w*O-g*I)/R}var D=h,M=p,k=1,$=0;for(t=1;t<=9;t++)k=k*D,$=$+this.D[t]*k;var V=this.lat0+$*ra*1e5,m=this.long0+M;return e.x=m,e.y=V,e}var G_=["New_Zealand_Map_Grid","nzmg"],U_={init:$_,forward:N_,inverse:z_,names:G_};function H_(){}function W_(e){var t=e.x,i=e.y,n=Oe(t-this.long0),o=this.x0+this.a*n,r=this.y0+this.a*Math.log(Math.tan(Math.PI/4+i/2.5))*1.25;return e.x=o,e.y=r,e}function q_(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 Q_=["Miller_Cylindrical","mill"],Z_={init:H_,forward:W_,inverse:q_,names:Q_},J_=20;function X_(){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=im(this.es)}function Y_(e){var t,i,n=e.x,o=e.y;if(n=Oe(n-this.long0),this.sphere){if(!this.m)o=this.n!==1?Math.asin(this.n*Math.sin(o)):o;else for(var r=this.n*Math.sin(o),a=J_;a;--a){var s=(this.m*o+Math.sin(o)-r)/(this.m+Math.cos(o));if(o-=s,Math.abs(s)<Pe)break}t=this.a*this.C_x*n*(this.m+Math.cos(o)),i=this.a*this.C_y*o}else{var l=Math.sin(o),c=Math.cos(o);i=this.a*Cr(o,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 K_(e){var t,i,n,o;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=Cn((this.m*t+Math.sin(t))/this.n):this.n!==1&&(t=Cn(Math.sin(t)/this.n)),n=Oe(n+this.long0),t=go(t)):(t=nm(e.y/this.a,this.es,this.en),o=Math.abs(t),o<pe?(o=Math.sin(t),i=this.long0+e.x*Math.sqrt(1-this.es*o*o)/(this.a*Math.cos(t)),n=Oe(i)):o-Pe<pe&&(n=this.long0)),e.x=n,e.y=t,e}var e2=["Sinusoidal","sinu"],t2={init:X_,forward:Y_,inverse:K_,names:e2};function i2(){}function n2(e){for(var t=e.x,i=e.y,n=Oe(t-this.long0),o=i,r=Math.PI*Math.sin(i);;){var a=-(o+Math.sin(o)-r)/(1+Math.cos(o));if(o+=a,Math.abs(a)<Pe)break}o/=2,Math.PI/2-Math.abs(i)<Pe&&(n=0);var s=.900316316158*this.a*n*Math.cos(o)+this.x0,l=1.4142135623731*this.a*Math.sin(o)+this.y0;return e.x=s,e.y=l,e}function o2(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 o=Math.asin(i);return e.x=n,e.y=o,e}var a2=["Mollweide","moll"],r2={init:i2,forward:n2,inverse:o2,names:a2};function s2(){Math.abs(this.lat1+this.lat2)<Pe||(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=ma(this.es),this.e1=pa(this.es),this.e2=va(this.es),this.e3=fa(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=ii(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<Pe?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=ii(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=ii(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function l2(e){var t=e.x,i=e.y,n;if(this.sphere)n=this.a*(this.g-i);else{var o=ii(this.e0,this.e1,this.e2,this.e3,i);n=this.a*(this.g-o)}var r=this.ns*Oe(t-this.long0),a=this.x0+n*Math.sin(r),s=this.y0+this.rh-n*Math.cos(r);return e.x=a,e.y=s,e}function c2(e){e.x-=this.x0,e.y=this.rh-e.y+this.y0;var t,i,n,o;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 r=0;if(i!==0&&(r=Math.atan2(t*e.x,t*e.y)),this.sphere)return o=Oe(this.long0+r/this.ns),n=go(this.g-i/this.a),e.x=o,e.y=n,e;var a=this.g-i/this.a;return n=Er(a,this.e0,this.e1,this.e2,this.e3),o=Oe(this.long0+r/this.ns),e.x=o,e.y=n,e}var u2=["Equidistant_Conic","eqdc"],d2={init:s2,forward:l2,inverse:c2,names:u2};function h2(){this.R=this.a}function m2(e){var t=e.x,i=e.y,n=Oe(t-this.long0),o,r;Math.abs(i)<=Pe&&(o=this.x0+this.R*n,r=this.y0);var a=Cn(2*Math.abs(i/Math.PI));(Math.abs(n)<=Pe||Math.abs(Math.abs(i)-pe)<=Pe)&&(o=this.x0,i>=0?r=this.y0+Math.PI*this.R*Math.tan(.5*a):r=this.y0+Math.PI*this.R*-Math.tan(.5*a));var s=.5*Math.abs(Math.PI/n-n/Math.PI),l=s*s,c=Math.sin(a),u=Math.cos(a),d=u/(c+u-1),h=d*d,p=d*(2/c-1),v=p*p,b=Math.PI*this.R*(s*(d-v)+Math.sqrt(l*(d-v)*(d-v)-(v+l)*(h-v)))/(v+l);n<0&&(b=-b),o=this.x0+b;var y=l+d;return b=Math.PI*this.R*(p*y-s*Math.sqrt((v+l)*(l+1)-y*y))/(v+l),i>=0?r=this.y0+b:r=this.y0-b,e.x=o,e.y=r,e}function p2(e){var t,i,n,o,r,a,s,l,c,u,d,h,p;return e.x-=this.x0,e.y-=this.y0,d=Math.PI*this.R,n=e.x/d,o=e.y/d,r=n*n+o*o,a=-Math.abs(o)*(1+r),s=a-2*o*o+n*n,l=-2*a+1+2*o*o+r*r,p=o*o/l+(2*s*s*s/l/l/l-9*a*s/l/l)/27,c=(a-s*s/3/l)/l,u=2*Math.sqrt(-c/3),d=3*p/c/u,Math.abs(d)>1&&(d>=0?d=1:d=-1),h=Math.acos(d)/3,e.y>=0?i=(-u*Math.cos(h+Math.PI/3)-s/3/l)*Math.PI:i=-(-u*Math.cos(h+Math.PI/3)-s/3/l)*Math.PI,Math.abs(n)<Pe?t=this.long0:t=Oe(this.long0+Math.PI*(r-1+Math.sqrt(1+2*(n*n-o*o)+r*r))/2/n),e.x=t,e.y=i,e}var v2=["Van_der_Grinten_I","VanDerGrinten","vandg"],f2={init:h2,forward:m2,inverse:p2,names:v2};function g2(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)}function y2(e){var t=e.x,i=e.y,n=Math.sin(e.y),o=Math.cos(e.y),r=Oe(t-this.long0),a,s,l,c,u,d,h,p,v,b,y,E,x,g,w,O,I,R,D,M,k,$,V;return this.sphere?Math.abs(this.sin_p12-1)<=Pe?(e.x=this.x0+this.a*(pe-i)*Math.sin(r),e.y=this.y0-this.a*(pe-i)*Math.cos(r),e):Math.abs(this.sin_p12+1)<=Pe?(e.x=this.x0+this.a*(pe+i)*Math.sin(r),e.y=this.y0+this.a*(pe+i)*Math.cos(r),e):(R=this.sin_p12*n+this.cos_p12*o*Math.cos(r),O=Math.acos(R),I=O?O/Math.sin(O):1,e.x=this.x0+this.a*I*o*Math.sin(r),e.y=this.y0+this.a*I*(this.cos_p12*n-this.sin_p12*o*Math.cos(r)),e):(a=ma(this.es),s=pa(this.es),l=va(this.es),c=fa(this.es),Math.abs(this.sin_p12-1)<=Pe?(u=this.a*ii(a,s,l,c,pe),d=this.a*ii(a,s,l,c,i),e.x=this.x0+(u-d)*Math.sin(r),e.y=this.y0-(u-d)*Math.cos(r),e):Math.abs(this.sin_p12+1)<=Pe?(u=this.a*ii(a,s,l,c,pe),d=this.a*ii(a,s,l,c,i),e.x=this.x0+(u+d)*Math.sin(r),e.y=this.y0+(u+d)*Math.cos(r),e):(h=n/o,p=fo(this.a,this.e,this.sin_p12),v=fo(this.a,this.e,n),b=Math.atan((1-this.es)*h+this.es*p*this.sin_p12/(v*o)),y=Math.atan2(Math.sin(r),this.cos_p12*Math.tan(b)-this.sin_p12*Math.cos(r)),y===0?D=Math.asin(this.cos_p12*Math.sin(b)-this.sin_p12*Math.cos(b)):Math.abs(Math.abs(y)-Math.PI)<=Pe?D=-Math.asin(this.cos_p12*Math.sin(b)-this.sin_p12*Math.cos(b)):D=Math.asin(Math.sin(r)*Math.cos(b)/Math.sin(y)),E=this.e*this.sin_p12/Math.sqrt(1-this.es),x=this.e*this.cos_p12*Math.cos(y)/Math.sqrt(1-this.es),g=E*x,w=x*x,M=D*D,k=M*D,$=k*D,V=$*D,O=p*D*(1-M*w*(1-w)/6+k/8*g*(1-2*w)+$/120*(w*(4-7*w)-3*E*E*(1-7*w))-V/48*g),e.x=this.x0+O*Math.sin(y),e.y=this.y0+O*Math.cos(y),e))}function b2(e){e.x-=this.x0,e.y-=this.y0;var t,i,n,o,r,a,s,l,c,u,d,h,p,v,b,y,E,x,g,w,O,I,R,D;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),o=Math.cos(i),r=this.long0,Math.abs(t)<=Pe?a=this.lat0:(a=Cn(o*this.sin_p12+e.y*n*this.cos_p12/t),s=Math.abs(this.lat0)-pe,Math.abs(s)<=Pe?this.lat0>=0?r=Oe(this.long0+Math.atan2(e.x,-e.y)):r=Oe(this.long0-Math.atan2(-e.x,e.y)):r=Oe(this.long0+Math.atan2(e.x*n,t*this.cos_p12*o-e.y*this.sin_p12*n))),e.x=r,e.y=a,e)):(l=ma(this.es),c=pa(this.es),u=va(this.es),d=fa(this.es),Math.abs(this.sin_p12-1)<=Pe?(h=this.a*ii(l,c,u,d,pe),t=Math.sqrt(e.x*e.x+e.y*e.y),p=h-t,a=Er(p/this.a,l,c,u,d),r=Oe(this.long0+Math.atan2(e.x,-1*e.y)),e.x=r,e.y=a,e):Math.abs(this.sin_p12+1)<=Pe?(h=this.a*ii(l,c,u,d,pe),t=Math.sqrt(e.x*e.x+e.y*e.y),p=t-h,a=Er(p/this.a,l,c,u,d),r=Oe(this.long0+Math.atan2(e.x,e.y)),e.x=r,e.y=a,e):(t=Math.sqrt(e.x*e.x+e.y*e.y),y=Math.atan2(e.x,e.y),v=fo(this.a,this.e,this.sin_p12),E=Math.cos(y),x=this.e*this.cos_p12*E,g=-x*x/(1-this.es),w=3*this.es*(1-g)*this.sin_p12*this.cos_p12*E/(1-this.es),O=t/v,I=O-g*(1+g)*Math.pow(O,3)/6-w*(1+3*g)*Math.pow(O,4)/24,R=1-g*I*I/2-O*I*I*I/6,b=Math.asin(this.sin_p12*Math.cos(I)+this.cos_p12*Math.sin(I)*E),r=Oe(this.long0+Math.asin(Math.sin(y)*Math.sin(I)/Math.cos(b))),D=Math.sin(b),a=Math.atan2((D-this.es*R*this.sin_p12)*Math.tan(b),D*(1-this.es)),e.x=r,e.y=a,e))}var C2=["Azimuthal_Equidistant","aeqd"],w2={init:g2,forward:y2,inverse:b2,names:C2};function _2(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function E2(e){var t,i,n,o,r,a,s,l,c=e.x,u=e.y;return n=Oe(c-this.long0),t=Math.sin(u),i=Math.cos(u),o=Math.cos(n),a=this.sin_p14*t+this.cos_p14*i*o,r=1,(a>0||Math.abs(a)<=Pe)&&(s=this.a*r*i*Math.sin(n),l=this.y0+this.a*r*(this.cos_p14*t-this.sin_p14*i*o)),e.x=s,e.y=l,e}function P2(e){var t,i,n,o,r,a,s;return e.x-=this.x0,e.y-=this.y0,t=Math.sqrt(e.x*e.x+e.y*e.y),i=Cn(t/this.a),n=Math.sin(i),o=Math.cos(i),a=this.long0,Math.abs(t)<=Pe?(s=this.lat0,e.x=a,e.y=s,e):(s=Cn(o*this.sin_p14+e.y*n*this.cos_p14/t),r=Math.abs(this.lat0)-pe,Math.abs(r)<=Pe?(this.lat0>=0?a=Oe(this.long0+Math.atan2(e.x,-e.y)):a=Oe(this.long0-Math.atan2(-e.x,e.y)),e.x=a,e.y=s,e):(a=Oe(this.long0+Math.atan2(e.x*n,t*this.cos_p14*o-e.y*this.sin_p14*n)),e.x=a,e.y=s,e))}var x2=["ortho"],O2={init:_2,forward:E2,inverse:P2,names:x2},vt={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},Ze={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function M2(){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-Qe/2?this.face=vt.TOP:this.lat0<=-(pe-Qe/2)?this.face=vt.BOTTOM:Math.abs(this.long0)<=Qe?this.face=vt.FRONT:Math.abs(this.long0)<=pe+Qe?this.face=this.long0>0?vt.RIGHT:vt.LEFT:this.face=vt.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 S2(e){var t={x:0,y:0},i,n,o,r,a,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===vt.TOP)r=pe-i,n>=Qe&&n<=pe+Qe?(l.value=Ze.AREA_0,o=n-pe):n>pe+Qe||n<=-(pe+Qe)?(l.value=Ze.AREA_1,o=n>0?n-Ot:n+Ot):n>-(pe+Qe)&&n<=-Qe?(l.value=Ze.AREA_2,o=n+pe):(l.value=Ze.AREA_3,o=n);else if(this.face===vt.BOTTOM)r=pe+i,n>=Qe&&n<=pe+Qe?(l.value=Ze.AREA_0,o=-n+pe):n<Qe&&n>=-Qe?(l.value=Ze.AREA_1,o=-n):n<-Qe&&n>=-(pe+Qe)?(l.value=Ze.AREA_2,o=-n-pe):(l.value=Ze.AREA_3,o=n>0?-n+Ot:-n-Ot);else{var c,u,d,h,p,v,b;this.face===vt.RIGHT?n=yo(n,+pe):this.face===vt.BACK?n=yo(n,+Ot):this.face===vt.LEFT&&(n=yo(n,-pe)),h=Math.sin(i),p=Math.cos(i),v=Math.sin(n),b=Math.cos(n),c=p*b,u=p*v,d=h,this.face===vt.FRONT?(r=Math.acos(c),o=Pr(r,d,u,l)):this.face===vt.RIGHT?(r=Math.acos(u),o=Pr(r,d,-c,l)):this.face===vt.BACK?(r=Math.acos(-c),o=Pr(r,d,-u,l)):this.face===vt.LEFT?(r=Math.acos(-u),o=Pr(r,d,c,l)):(r=o=0,l.value=Ze.AREA_0)}return s=Math.atan(12/Ot*(o+Math.acos(Math.sin(o)*Math.cos(Qe))-pe)),a=Math.sqrt((1-Math.cos(r))/(Math.cos(s)*Math.cos(s))/(1-Math.cos(Math.atan(1/Math.cos(o))))),l.value===Ze.AREA_1?s+=pe:l.value===Ze.AREA_2?s+=Ot:l.value===Ze.AREA_3&&(s+=1.5*Ot),t.x=a*Math.cos(s),t.y=a*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 T2(e){var t={lam:0,phi:0},i,n,o,r,a,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=Ze.AREA_0:e.y>=0&&e.y>=Math.abs(e.x)?(d.value=Ze.AREA_1,i-=pe):e.x<0&&-e.x>=Math.abs(e.y)?(d.value=Ze.AREA_2,i=i<0?i+Ot:i-Ot):(d.value=Ze.AREA_3,i+=pe),u=Ot/12*Math.tan(i),a=Math.sin(u)/(Math.cos(u)-1/Math.sqrt(2)),s=Math.atan(a),o=Math.cos(i),r=Math.tan(n),l=1-o*o*r*r*(1-Math.cos(Math.atan(1/Math.cos(s)))),l<-1?l=-1:l>1&&(l=1),this.face===vt.TOP)c=Math.acos(l),t.phi=pe-c,d.value===Ze.AREA_0?t.lam=s+pe:d.value===Ze.AREA_1?t.lam=s<0?s+Ot:s-Ot:d.value===Ze.AREA_2?t.lam=s-pe:t.lam=s;else if(this.face===vt.BOTTOM)c=Math.acos(l),t.phi=c-pe,d.value===Ze.AREA_0?t.lam=-s+pe:d.value===Ze.AREA_1?t.lam=-s:d.value===Ze.AREA_2?t.lam=-s-pe:t.lam=s<0?-s-Ot:-s+Ot;else{var h,p,v;h=l,u=h*h,u>=1?v=0:v=Math.sqrt(1-u)*Math.sin(s),u+=v*v,u>=1?p=0:p=Math.sqrt(1-u),d.value===Ze.AREA_1?(u=p,p=-v,v=u):d.value===Ze.AREA_2?(p=-p,v=-v):d.value===Ze.AREA_3&&(u=p,p=v,v=-u),this.face===vt.RIGHT?(u=h,h=-p,p=u):this.face===vt.BACK?(h=-h,p=-p):this.face===vt.LEFT&&(u=h,h=p,p=-u),t.phi=Math.acos(-v)-pe,t.lam=Math.atan2(p,h),this.face===vt.RIGHT?t.lam=yo(t.lam,-pe):this.face===vt.BACK?t.lam=yo(t.lam,-Ot):this.face===vt.LEFT&&(t.lam=yo(t.lam,+pe))}if(this.es!==0){var b,y,E;b=t.phi<0?1:0,y=Math.tan(t.phi),E=this.b/Math.sqrt(y*y+this.one_minus_f_squared),t.phi=Math.atan(Math.sqrt(this.a*this.a-E*E)/(this.one_minus_f*E)),b&&(t.phi=-t.phi)}return t.lam+=this.long0,e.x=t.lam,e.y=t.phi,e}function Pr(e,t,i,n){var o;return e<Pe?(n.value=Ze.AREA_0,o=0):(o=Math.atan2(t,i),Math.abs(o)<=Qe?n.value=Ze.AREA_0:o>Qe&&o<=pe+Qe?(n.value=Ze.AREA_1,o-=pe):o>pe+Qe||o<=-(pe+Qe)?(n.value=Ze.AREA_2,o=o>=0?o-Ot:o+Ot):(n.value=Ze.AREA_3,o+=pe)),o}function yo(e,t){var i=e+t;return i<-Ot?i+=sa:i>+Ot&&(i-=sa),i}var I2=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"],A2={init:M2,forward:S2,inverse:T2,names:I2},oc=[[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]],ga=[[-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]],sm=.8487,lm=1.3523,cm=Xi/5,D2=1/cm,bo=18,xr=function(e,t){return e[0]+t*(e[1]+t*(e[2]+t*e[3]))},B2=function(e,t){return e[1]+t*(2*e[2]+t*3*e[3])};function L2(e,t,i,n){for(var o=t;n;--n){var r=e(o);if(o-=r,Math.abs(r)<i)break}return o}function j2(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function F2(e){var t=Oe(e.x-this.long0),i=Math.abs(e.y),n=Math.floor(i*cm);n<0?n=0:n>=bo&&(n=bo-1),i=Xi*(i-D2*n);var o={x:xr(oc[n],i)*t,y:xr(ga[n],i)};return e.y<0&&(o.y=-o.y),o.x=o.x*this.a*sm+this.x0,o.y=o.y*this.a*lm+this.y0,o}function k2(e){var t={x:(e.x-this.x0)/(this.a*sm),y:Math.abs(e.y-this.y0)/(this.a*lm)};if(t.y>=1)t.x/=oc[bo][0],t.y=e.y<0?-pe:pe;else{var i=Math.floor(t.y*bo);for(i<0?i=0:i>=bo&&(i=bo-1);;)if(ga[i][0]>t.y)--i;else if(ga[i+1][0]<=t.y)++i;else break;var n=ga[i],o=5*(t.y-n[0])/(ga[i+1][0]-n[0]);o=L2(function(r){return(xr(n,r)-t.y)/B2(n,r)},o,Pe,100),t.x/=xr(oc[i],o),t.y=(5*i+o)*Ut,e.y<0&&(t.y=-t.y)}return t.x=Oe(t.x+this.long0),t}var R2=["Robinson","robin"],V2={init:j2,forward:F2,inverse:k2,names:R2};function $2(){this.name="geocent"}function N2(e){var t=Fh(e,this.es,this.a);return t}function z2(e){var t=kh(e,this.es,this.a,this.b);return t}var G2=["Geocentric","geocentric","geocent","Geocent"],U2={init:$2,forward:N2,inverse:z2,names:G2},Zt={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},ya={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 H2(){if(Object.keys(ya).forEach(function(i){if(typeof this[i]=="undefined")this[i]=ya[i].def;else{if(ya[i].num&&isNaN(this[i]))throw new Error("Invalid parameter value, must be numeric "+i+" = "+this[i]);ya[i].num&&(this[i]=parseFloat(this[i]))}ya[i].degrees&&(this[i]=this[i]*Ut)}.bind(this)),Math.abs(Math.abs(this.lat0)-pe)<Pe?this.mode=this.lat0<0?Zt.S_POLE:Zt.N_POLE:Math.abs(this.lat0)<Pe?this.mode=Zt.EQUIT:(this.mode=Zt.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 W2(e){e.x-=this.long0;var t=Math.sin(e.y),i=Math.cos(e.y),n=Math.cos(e.x),o,r;switch(this.mode){case Zt.OBLIQ:r=this.sinph0*t+this.cosph0*i*n;break;case Zt.EQUIT:r=i*n;break;case Zt.S_POLE:r=-t;break;case Zt.N_POLE:r=t;break}switch(r=this.pn1/(this.p-r),o=r*i*Math.sin(e.x),this.mode){case Zt.OBLIQ:r*=this.cosph0*t-this.sinph0*i*n;break;case Zt.EQUIT:r*=t;break;case Zt.N_POLE:r*=-(i*n);break;case Zt.S_POLE:r*=i*n;break}var a,s;return a=r*this.cg+o*this.sg,s=1/(a*this.sw*this.h1+this.cw),o=(o*this.cg-r*this.sg)*this.cw*s,r=a*s,e.x=o*this.a,e.y=r*this.a,e}function q2(e){e.x/=this.a,e.y/=this.a;var t={x:e.x,y:e.y},i,n,o;o=1/(this.pn1-e.y*this.sw),i=this.pn1*e.x*o,n=this.pn1*e.y*this.cw*o,e.x=i*this.cg+n*this.sg,e.y=n*this.cg-i*this.sg;var r=zi(e.x,e.y);if(Math.abs(r)<Pe)t.x=0,t.y=e.y;else{var a,s;switch(s=1-r*r*this.pfact,s=(this.p-Math.sqrt(s))/(this.pn1/r+r/this.pn1),a=Math.sqrt(1-s*s),this.mode){case Zt.OBLIQ:t.y=Math.asin(a*this.sinph0+e.y*s*this.cosph0/r),e.y=(a-this.sinph0*Math.sin(t.y))*r,e.x*=s*this.cosph0;break;case Zt.EQUIT:t.y=Math.asin(e.y*s/r),e.y=a*r,e.x*=s;break;case Zt.N_POLE:t.y=Math.asin(a),e.y=-e.y;break;case Zt.S_POLE:t.y=-Math.asin(a);break}t.x=Math.atan2(e.x,e.y)}return e.x=t.x+this.long0,e.y=t.y,e}var Q2=["Tilted_Perspective","tpers"],Z2={init:H2,forward:W2,inverse:q2,names:Q2};function J2(){if(this.flip_axis=this.sweep==="x"?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,this.es!==0){var e=1-this.es,t=1/e;this.radius_p=Math.sqrt(e),this.radius_p2=e,this.radius_p_inv2=t,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")}function X2(e){var t=e.x,i=e.y,n,o,r,a;if(t=t-this.long0,this.shape==="ellipse"){i=Math.atan(this.radius_p2*Math.tan(i));var s=this.radius_p/zi(this.radius_p*Math.cos(i),Math.sin(i));if(o=s*Math.cos(t)*Math.cos(i),r=s*Math.sin(t)*Math.cos(i),a=s*Math.sin(i),(this.radius_g-o)*o-r*r-a*a*this.radius_p_inv2<0)return e.x=Number.NaN,e.y=Number.NaN,e;n=this.radius_g-o,this.flip_axis?(e.x=this.radius_g_1*Math.atan(r/zi(a,n)),e.y=this.radius_g_1*Math.atan(a/n)):(e.x=this.radius_g_1*Math.atan(r/n),e.y=this.radius_g_1*Math.atan(a/zi(r,n)))}else this.shape==="sphere"&&(n=Math.cos(i),o=Math.cos(t)*n,r=Math.sin(t)*n,a=Math.sin(i),n=this.radius_g-o,this.flip_axis?(e.x=this.radius_g_1*Math.atan(r/zi(a,n)),e.y=this.radius_g_1*Math.atan(a/n)):(e.x=this.radius_g_1*Math.atan(r/n),e.y=this.radius_g_1*Math.atan(a/zi(r,n))));return e.x=e.x*this.a,e.y=e.y*this.a,e}function Y2(e){var t=-1,i=0,n=0,o,r,a,s;if(e.x=e.x/this.a,e.y=e.y/this.a,this.shape==="ellipse"){this.flip_axis?(n=Math.tan(e.y/this.radius_g_1),i=Math.tan(e.x/this.radius_g_1)*zi(1,n)):(i=Math.tan(e.x/this.radius_g_1),n=Math.tan(e.y/this.radius_g_1)*zi(1,i));var l=n/this.radius_p;if(o=i*i+l*l+t*t,r=2*this.radius_g*t,a=r*r-4*o*this.C,a<0)return e.x=Number.NaN,e.y=Number.NaN,e;s=(-r-Math.sqrt(a))/(2*o),t=this.radius_g+s*t,i*=s,n*=s,e.x=Math.atan2(i,t),e.y=Math.atan(n*Math.cos(e.x)/t),e.y=Math.atan(this.radius_p_inv2*Math.tan(e.y))}else if(this.shape==="sphere"){if(this.flip_axis?(n=Math.tan(e.y/this.radius_g_1),i=Math.tan(e.x/this.radius_g_1)*Math.sqrt(1+n*n)):(i=Math.tan(e.x/this.radius_g_1),n=Math.tan(e.y/this.radius_g_1)*Math.sqrt(1+i*i)),o=i*i+n*n+t*t,r=2*this.radius_g*t,a=r*r-4*o*this.C,a<0)return e.x=Number.NaN,e.y=Number.NaN,e;s=(-r-Math.sqrt(a))/(2*o),t=this.radius_g+s*t,i*=s,n*=s,e.x=Math.atan2(i,t),e.y=Math.atan(n*Math.cos(e.x)/t)}return e.x=e.x+this.long0,e}var K2=["Geostationary Satellite View","Geostationary_Satellite","geos"],eE={init:J2,forward:X2,inverse:Y2,names:K2};function tE(e){e.Proj.projections.add(wr),e.Proj.projections.add(_r),e.Proj.projections.add(sw),e.Proj.projections.add(gw),e.Proj.projections.add(Ew),e.Proj.projections.add(Sw),e.Proj.projections.add(Lw),e.Proj.projections.add(Vw),e.Proj.projections.add(Uw),e.Proj.projections.add(Zw),e.Proj.projections.add(h_),e.Proj.projections.add(y_),e.Proj.projections.add(E_),e.Proj.projections.add(T_),e.Proj.projections.add(L_),e.Proj.projections.add(V_),e.Proj.projections.add(U_),e.Proj.projections.add(Z_),e.Proj.projections.add(t2),e.Proj.projections.add(r2),e.Proj.projections.add(d2),e.Proj.projections.add(f2),e.Proj.projections.add(w2),e.Proj.projections.add(O2),e.Proj.projections.add(A2),e.Proj.projections.add(V2),e.Proj.projections.add(U2),e.Proj.projections.add(Z2),e.Proj.projections.add(eE)}yi.defaultDatum="WGS84",yi.Proj=en,yi.WGS84=new yi.Proj("WGS84"),yi.Point=po,yi.toPoint=Nh,yi.defs=ti,yi.nadgrid=lC,yi.transform=br,yi.mgrs=PC,yi.version="__VERSION__",tE(yi);function iE(e,t,i,n,o){const r=1+Math.floor((e+180)/6),a=i+" +zone="+r+(t<0?" +south":""),s=yi(n,a,[e,t]);return{utmZone:r+(t<0?"S":"N"),north:s[1].toFixed(2)+o,east:s[0].toFixed(2)+o}}class nE{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 um(this).then(function(n){return dm(n,t,i)})}getHeights(t){return um(this).then(function(i){for(let n=0;n<t.length;++n){const o=t[n];o.height=dm(i,o.longitude,o.latitude)}return t})}}async function um(e){const{defined:t}=Cesium;t(e.data)||(e.data=oE(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 o=0;o<n.length;o+=2){const r=n[o];n[o]=n[o+1],n[o+1]=r}e.data=new Int16Array(i)}return e.data}function dm(e,t,i){const{Math:n}=Cesium;let o=720*(n.PI_OVER_TWO-i)/Math.PI;o<0?o=0:o>720&&(o=720),t=n.zeroToTwoPi(t);let r=1440*t/n.TWO_PI;r<0?r=0:r>1440&&(r=1440);const a=r|0,s=o|0,l=r-a,c=o-s,u=1-l,d=1-c,h=Or(e,s,a),p=Or(e,s,a+1),v=Or(e,s+1,a),b=Or(e,s+1,a+1);return(h*u*d+p*l*d+v*u*c+b*l*c)/100}function Or(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 oE(e){const{Resource:t}=Cesium;return t.createIfNeeded(e).fetchArrayBuffer()}class aE{constructor(t){const{Cartographic:i,knockout:n}=Cesium,o=t.gridFileUrl;o&&(this.geoidModel=new nE(o)),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=zc(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:o,EllipsoidTerrainProvider:r,Intersections2D:a,SceneMode:s}=Cesium,l=t.scene,c=l.camera.getPickRay(i),u=l.globe,d=u.pickTriangle(c,l);if(o(d)){const h=u.ellipsoid,p=h.cartesianToCartographic(d.v0),v=h.cartesianToCartographic(d.v1),b=h.cartesianToCartographic(d.v2),y=h.cartesianToCartographic(l.mode===s.SCENE3D?d.intersection:l.globe.pick(c,l));let E;if(u.terrainProvider instanceof r)y.height=void 0;else{const g=a.computeBarycentricCoordinates(y.longitude,y.latitude,p.longitude,p.latitude,v.longitude,v.latitude,b.longitude,b.latitude);if(g.x>=-1e-15&&g.y>=-1e-15&&g.z>=-1e-15){const k=g.x*p.height+g.y*v.height+g.z*b.height;y.height=k}const w=u.terrainProvider.getLevelMaximumGeometricError(d.tile.level),O=y.height,I=Math.max(d.tile.data.tileBoundingRegion.minimumHeight,O-w),R=Math.min(d.tile.data.tileBoundingRegion.maximumHeight,O+w),D=I-(this.geoidModel?this.geoidModel.minimumHeight:0),M=R+(this.geoidModel?this.geoidModel.maximumHeight:0);E=Math.max(Math.abs(O-D),Math.abs(M-O))}n.clone(y,this.lastHeightSamplePosition);const x=u.terrainProvider;this.cartographicToFields(y,E),x instanceof r||this.debounceSampleAccurateHeight(x,y)}else this.elevation="",this.utmZone="",this.latitude="",this.longitude="",this.north="",this.east=""}cartographicToFields(t,i){const{Math:n}=Cesium,o=n.toDegrees(t.latitude),r=n.toDegrees(t.longitude);if(this.useProjection){const s=iE(r,o,this.proj4Projection,this.proj4longlat,this.projectionUnits);this.utmZone=s.utmZone,this.north=s.north,this.east=s.east}const a=_1(r,o,{height:t.height,errorBar:i,decimal:this.decimal,rangeType:this.rangeType});this.latitude=a.latitude,this.longitude=a.longitude,this.elevation=a.elevation}sampleAccurateHeight(t,i){const{Cartographic:n,sampleTerrainMostDetailed:o}=Cesium;if(this.tileRequestInFlight){this.debounceSampleAccurateHeight.cancel(),this.debounceSampleAccurateHeight(t,i);return}const r=n.clone(i),a=this.geoidModel?this.geoidModel.getHeight(i.longitude,i.latitude):void 0,s=o(t,[r]);this.tileRequestInFlight=Promise.all([a,s]).then(l=>{const c=l[0]||0;this.tileRequestInFlight=void 0,n.equals(i,this.lastHeightSamplePosition)&&(i.height=r.height-c,this.cartographicToFields(i))}).catch(()=>{this.tileRequestInFlight=void 0})}}const rE=[],sE={start:0,stop:0},lE={},cE={},uE={};function dE(){const{Globe:e,GlobeSurfaceTile:t,BoundingSphere:i,defaultValue:n,Cartesian3:o,defined:r,DeveloperError:a,IntersectionTests:s,SceneMode:l}=Cesium;e.prototype.pickTriangle=e.prototype.pickTriangle||function(c,u,d,h){if(!r(c))throw new a("ray is required");if(!r(u))throw new a("scene is required");d=n(d,!0);const p=u.mode,v=u.mapProjection,b=rE;b.length=0;const y=this._surface._tilesToRender;let E=y.length,x,g;for(g=0;g<E;++g){x=y[g];const O=x.data;if(!r(O))continue;const I=O.pickBoundingSphere;p!==l.SCENE3D?(i.fromRectangleWithHeights2D(x.rectangle,v,O.minimumHeight,O.maximumHeight,I),o.fromElements(I.center.z,I.center.x,I.center.y,I.center)):i.clone(O.boundingSphere3D,I);const R=s.raySphere(c,I,sE);r(R)&&b.push(x)}b.sort(hE(c.origin));let w;for(E=b.length,g=0;g<E;++g)if(w=b[g].data.pickTriangle(c,u.mode,u.mapProjection,d,h),r(w)){w.tile=b[g];break}return w},t.prototype.pickTriangle=t.prototype.pickTriangle||function(c,u,d,h){const p=this.renderedMesh;if(!r(p))return;const v=p.vertices,b=p.indices,y=p.encoding,E=b.length;for(let x=0;x<E;x+=3){const g=b[x],w=b[x+1],O=b[x+2],I=ac(y,u,d,v,g,lE),R=ac(y,u,d,v,w,cE),D=ac(y,u,d,v,O,uE),M=s.rayTriangle(c,I,R,D,h,new o);if(r(M))return{intersection:M,v0:I,v1:R,v2:D}}}}function hE(e){const{BoundingSphere:t}=Cesium;return function(i,n){const o=t.distanceSquaredTo(i.data.pickBoundingSphere,e),r=t.distanceSquaredTo(n.data.pickBoundingSphere,e);return o-r}}function ac(e,t,i,n,o,r){e.decodePosition(n,o,r);const{Cartesian3:a,defined:s,SceneMode:l}=Cesium;if(s(t)&&t!==l.SCENE3D){const c=i.ellipsoid.cartesianToCartographic(r);i.project(c,r),a.fromElements(r.z,r.x,r.y,r)}return r}var hm={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 mE={...we,statusBarEvt:e=>!0},pE=X("statusBarProps",hm);var rc=ee({name:"VcStatusBar",props:pE,emits:mE,setup(e,t){var i;const n=ae();n.cesiumClass="VcStatusBar",n.cesiumEvents=[];const o=ze(e,t,n);if(o===void 0)return;const r=St(n),{$services:a}=o,s=te(null),l=te(null),{t:c}=_t();let u=-1,d=-1;const h=xe({heading:"NaN",pitch:"NaN",roll:"NaN",height:"NaN",level:"NaN"}),p=xe({fps:"NaN",ms:"NaN"}),v=te(),b=gi(e),y=((i=r.proxy)==null?void 0:i.$options.name)==="VcNavigation",E=te(y),x=xe({});let g=!1;he(()=>e,M=>{Be(()=>{n.mounted&&w()})},{deep:!0}),n.createCesiumObject=async()=>{const{viewer:M}=a,k=M._element;return e.showMouseInfo&&(v.value=new aE({gridFileUrl:e.gridFileUrl,proj4Projection:e.proj4Projection,projectionUnits:e.projectionUnits,proj4longlat:e.proj4longlat,decimal:e.decimal,rangeType:e.rangeType}),k.addEventListener("wheel",R,!1),k.addEventListener("mousemove",R,!1),k.addEventListener("touchmove",R,!1),dE()),e.showCameraInfo&&(M.camera.changed.addEventListener(I),I()),e.showPerformanceInfo&&(g=M.scene.debugShowFramesPerSecond,M.scene.debugShowFramesPerSecond=!0,M.scene.postRender.addEventListener(O)),s},n.mount=async()=>{var M,k;E.value=!0,Be(()=>{w()});const{viewer:$}=a;return(k=$.viewerWidgetResized)==null||k.raiseEvent({type:n.cesiumClass,status:"mounted",target:(M=ve(s))==null?void 0:M.$el}),!0},n.unmount=async()=>{var M,k;E.value=!1;const{viewer:$}=a,V=$._element;return e.showMouseInfo&&(v.value=void 0,V.removeEventListener("wheel",R),V.removeEventListener("mousemove",R),V.removeEventListener("touchmove",R)),e.showCameraInfo&&$.camera.changed.removeEventListener(I),e.showPerformanceInfo&&(g?$.scene._performanceDisplay._container.style.display="block":$.scene.debugShowFramesPerSecond=!1,$.scene.postRender.removeEventListener(O)),(k=$.viewerWidgetResized)==null||k.raiseEvent({type:n.cesiumClass,status:"unmounted",target:(M=ve(s))==null?void 0:M.$el}),!0};const w=()=>{const M=b.style.value;if(x.left=M.left,x.top=M.top,x.transform=M.transform,M.background=e.background,M.color=e.color,typeof e.teleportToViewer=="undefined"||e.teleportToViewer){const k=b.attach.value;(k.bottom||k.top)&&!k.left&&!k.right&&(M.left="50%",M.transform="translate(-50%, 0)"),(k.left||k.right)&&!k.top&&!k.bottom&&(M.top="50%",M.transform="translate(0, -50%)")}Object.assign(x,M)},O=rl(M=>{var k,$;p.fps=(k=M._performanceDisplay)==null?void 0:k._fpsText.nodeValue,p.ms=($=M._performanceDisplay)==null?void 0:$._msText.nodeValue,M._performanceDisplay._container.style.display="none"},250),I=()=>{const{viewer:M}=a,k=M.scene,$=k.screenSpaceCameraController;if(k.mode===Cesium.SceneMode.MORPHING||!$.enableInputs)return;const{Math:V}=Cesium;h.heading=V.toDegrees(M.camera.heading).toFixed(1),h.pitch=V.toDegrees(M.camera.pitch).toFixed(1),h.roll=V.toDegrees(M.camera.roll).toFixed(1),h.height=M.camera.positionCartographic.height.toFixed(2),h.level=ss(Number(h.height)).toFixed(0)},R=M=>{var k;const{Cartesian2:$,SceneMode:V}=Cesium,{viewer:m}=a;if(m.scene.mode===V.MORPHING)return;const f=M.type==="mousemove"||M.type==="wheel"?M.clientX:M.changedTouches[0].clientX,C=M.type==="mousemove"||M.type==="wheel"?M.clientY:M.changedTouches[0].clientY;if(f===u&&C===d)return;u=f,d=C;const T=m._element;if(m){if(e.showMouseInfo){const _=T.getBoundingClientRect(),P=new $(f-_.left,C-_.top);(k=v.value)==null||k.updateCoordinatesFromCesium(m,P)}Se(n,"statusBarEvt")&&t.emit("statusBarEvt",{type:"statusBar",mouseCoordsInfo:v.value,cameraInfo:h,performanceInfo:p})}},D=()=>{var M,k;e.useProjection&&((M=ve(l))==null||M.hide(),e.showMouseInfo&&((k=v.value)==null||k.toggleUseProjection()))};return Object.assign(n.proxy,{getMouseCoordsInfo:()=>v.value,getCameraInfo:()=>h,getPerformanceInfo:()=>p}),()=>{var M,k,$,V,m,f,C,T;if(E.value){const _=[];e.showMouseInfo?((M=v.value)!=null&&M.useProjection?_.push(S("div",{class:"vc-section-short ellipsis"},[S("span",{...t.attrs},c("vc.navigation.statusBar.zone")),S("span",null,(V=v.value)==null?void 0:V.utmZone)]),S("div",{class:"vc-section ellipsis"},[S("span",{...t.attrs},c("vc.navigation.statusBar.e")),S("span",null,(m=v.value)==null?void 0:m.east)]),S("div",{class:"vc-section ellipsis"},[S("span",{...t.attrs},c("vc.navigation.statusBar.n")),S("span",null,(f=v.value)==null?void 0:f.north)])):_.push(S("div",{class:"vc-section ellipsis"},[S("span",{...t.attrs},c("vc.navigation.statusBar.lng")),S("span",{},(k=v.value)==null?void 0:k.longitude)]),S("div",{class:"vc-section ellipsis"},[S("span",{},c("vc.navigation.statusBar.lat")),S("span",{},($=v.value)==null?void 0:$.latitude)])),(C=v.value)!=null&&C.elevation?_.push(S("div",{class:"vc-section ellipsis"},[S("span",{...t.attrs},c("vc.navigation.statusBar.elev")),S("span",{},(T=v.value)==null?void 0:T.elevation)])):_.push(ne("v-if"))):_.push(ne("v-if")),e.showCameraInfo?_.push(S("div",{class:"vc-section-short-mini ellipsis"},[S("span",{...t.attrs},c("vc.navigation.statusBar.level")),S("span",null,h.level)]),S("div",{class:"vc-section-short ellipsis"},[S("span",{...t.attrs},c("vc.navigation.statusBar.heading")),S("span",null,`${h.heading}\xB0`)]),S("div",{class:"vc-section-short ellipsis"},[S("span",{...t.attrs},c("vc.navigation.statusBar.pitch")),S("span",null,`${h.pitch}\xB0`)]),S("div",{class:"vc-section-short ellipsis"},[S("span",{...t.attrs},c("vc.navigation.statusBar.roll")),S("span",null,`${h.roll}\xB0`)]),S("div",{class:"vc-section ellipsis"},[S("span",{...t.attrs},c("vc.navigation.statusBar.cameraHeight")),S("span",null,`${h.height}m`)])):_.push(ne("v-if")),e.showPerformanceInfo?_.push(S("div",{class:"vc-section-short-mini ellipsis"},[S("span",null,p.ms)]),S("div",{class:"vc-section-short-mini ellipsis"},[S("span",null,p.fps)])):_.push(ne("v-if")),st(e.tooltip)&&e.showMouseInfo&&e.useProjection?_.push(S(Dt,{ref:l,...e.tooltip},()=>S("strong",null,st(e.tooltip)&&e.tooltip.tip||c("vc.navigation.statusBar.tip")))):_.push(ne("v-if"));const P=S(li,{ref:s,class:`vc-status-bar ${b.classes.value} ${e.customClass}`,style:x,noCaps:!0,onClick:D},()=>_);return!y&&e.teleportToViewer?S(Ui,{to:a.viewer._element},P):P}else return ne("v-if")}}}),mm={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 vE={...we,distanceLegendEvt:e=>!0},fE=X("distanceLegendProps",mm);var sc=ee({name:"VcDistanceLegend",props:fE,emits:vE,setup(e,t){var i;const n=ae();n.cesiumClass="VcDistanceLegend",n.cesiumEvents=[];const o=ze(e,t,n);if(o===void 0)return;const r=St(n),{$services:a}=o,s=te(null),l=te(""),c=gi(e),u=((i=r.proxy)==null?void 0:i.$options.name)==="VcNavigation",d=te(u),h=xe({});let p=0;const v=te(0);let b=0;he(()=>e,g=>{Be(()=>{n.mounted&&E()})},{deep:!0});const y=re(()=>({width:`${v.value}px`,left:`${5+(e.width+15-v.value)/2}px`,height:"2px",background:e.barBackground}));n.createCesiumObject=async()=>(l.value="",s),n.mount=async()=>{var g,w;d.value=!0,Be(()=>{E()});const{viewer:O}=a;return O.scene.postRender.addEventListener(x),(w=O.viewerWidgetResized)==null||w.raiseEvent({type:n.cesiumClass,status:"mounted",target:(g=ve(s))==null?void 0:g.$el}),!0},n.unmount=async()=>{var g,w;d.value=!1;const{viewer:O}=a;return O.scene.postRender.removeEventListener(x),(w=O.viewerWidgetResized)==null||w.raiseEvent({type:n.cesiumClass,status:"unmounted",target:(g=ve(s))==null?void 0:g.$el}),!0};const E=()=>{const g=c.style.value;if(h.left=g.left,h.top=g.top,h.transform=g.transform,g.background=e.background,g.color=e.color,typeof e.teleportToViewer=="undefined"||e.teleportToViewer){const w=c.attach.value;(w.bottom||w.top)&&!w.left&&!w.right&&(g.left="50%",g.transform="translate(-50%, 0)"),(w.left||w.right)&&!w.top&&!w.bottom&&(g.top="50%",g.transform="translate(0, -50%)")}g.width=`${e.width}px`,Object.assign(h,g)},x=rl(g=>{const{Cartesian2:w,defined:O,getTimestamp:I,EllipsoidGeodesic:R}=Cesium,D=I();if(D<p+250)return;p=D;const M=new R,k=g.canvas.clientWidth,$=g.canvas.clientHeight,V=g.camera.getPickRay(new w(k/2|0,$-1)),m=g.camera.getPickRay(new w(1+k/2|0,$-1)),f=g.globe,C=f.pick(V,g),T=f.pick(m,g);if(!O(C)||!O(T)){v.value=0,l.value="";return}const _=f.ellipsoid.cartesianToCartographic(C),P=f.ellipsoid.cartesianToCartographic(T);M.setEndPoints(_,P);const A=M.surfaceDistance,L=e.width-10;let B;for(let F=lc.length-1;!O(B)&&F>=0;--F)lc[F]/A<L&&(B=lc[F],b!==B&&(b=B,Se(n,"distanceLegendEvt")&&t.emit("distanceLegendEvt",{type:"distanceLegend",distance:b,status:"changed"})));if(O(B)){let F;b>=1e3?F=(B/1e3).toString()+" km":F=B.toString()+" m",v.value=B/A|0,l.value=F}else v.value=0,l.value=""},500);return()=>{if(d.value&&l.value!==void 0){const g=S(li,{ref:s,class:`vc-distance-legend ${c.classes.value} ${e.customClass}`,style:h,stack:!0,noCaps:!0},()=>[S("label",null,l.value),S("div",{style:y.value,class:"vc-bar"})]);return!u&&e.teleportToViewer?S(Ui,{to:a.viewer._element},g):g}else return ne("v-if")}}});const lc=[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],pm={...fn,compassOpts:{type:[Object,Boolean],default:()=>wi(kl,["position","offset"])},zoomOpts:{type:[Object,Boolean],default:()=>wi(zl,["position","offset"])},printOpts:{type:[Object,Boolean],default:()=>wi(wh,["position","offset"])},locationOpts:{type:[Object,Boolean],default:()=>wi(_h,["position","offset"])},otherOpts:{type:[Object,Boolean],default:()=>({position:"bottom-right",offset:[2,3],statusBarOpts:wi(hm,["position","offset"]),distancelegendOpts:wi(mm,["position","offset"])})},customClass:{type:String,default:""},teleportToViewer:{type:Boolean,default:!0}},ba=wi(pm),gE={...we,zoomEvt:e=>!0,compassEvt:e=>!0,locationEvt:e=>!0,printEvt:e=>!0,statusBarEvt:e=>!0,distanceLegendEvt:e=>!0},yE=X("navigationProps",pm);var vm=ee({name:"VcNavigation",inheritAttrs:!1,props:yE,emits:gE,setup(e,t){const i=ae();i.cesiumClass="VcNavigation";const n=ze(e,t,i);if(n===void 0)return;const o=te(!1),{$services:r}=n,a=gi(e),s=gi(e.otherOpts||{position:"bottom-right"}),l=te(null),c=te(null),u=te(null),d=te(null),h=te(null),p=te(null),v=te(null),b=te(null),y=xe({}),E=xe({}),{emit:x}=t;he(()=>e,()=>{Be(()=>{var T,_,P,A,L,B;C(),(T=ve(u))==null||T.reload(),(_=ve(d))==null||_.reload(),(P=ve(p))==null||P.reload(),(A=ve(h))==null||A.reload(),(L=ve(v))==null||L.reload(),(B=ve(b))==null||B.reload()})},{deep:!0});const g=re(()=>Object.assign({},ba.compassOpts,e.compassOpts)),w=re(()=>Object.assign({},ba.zoomOpts,e.zoomOpts)),O=re(()=>Object.assign({},ba.printOpts,e.printOpts)),I=re(()=>Object.assign({},ba.locationOpts,e.locationOpts)),R=re(()=>Object.assign({},ba.otherOpts,e.otherOpts)),D=T=>{Se(i,"compassEvt")&&x("compassEvt",T)},M=T=>{Se(i,"zoomEvt")&&x("zoomEvt",T)},k=T=>{Se(i,"printEvt")&&x("printEvt",T)},$=T=>{Se(i,"locationEvt")&&x("locationEvt",T)},V=T=>{Se(i,"statusBarEvt")&&x("statusBarEvt",T)},m=T=>{Se(i,"distanceLegendEvt")&&x("distanceLegendEvt",T)};i.createCesiumObject=async()=>{var T;const{viewer:_}=r;return(T=_.viewerWidgetResized)==null||T.addEventListener(f),[l,c]},i.mount=async()=>{var T;o.value=!0,Be(()=>{C()});const{viewer:_}=r;return(T=_.viewerWidgetResized)==null||T.raiseEvent({type:i.cesiumClass,status:"mounted",target:ve(l)}),!0},i.unmount=async()=>{var T,_;o.value=!1;const{viewer:P}=r;return(T=P.viewerWidgetResized)==null||T.removeEventListener(f),(_=P.viewerWidgetResized)==null||_.raiseEvent({type:i.cesiumClass,status:"unmounted",target:ve(l)}),!0};const f=()=>{Be(()=>{C()})},C=()=>{var T,_,P,A,L;const B=(T=ve(u))==null?void 0:T.$el;let F=0,q=0;if(B!==void 0&&B.nodeName!=="#comment"){const Q=getComputedStyle(B.parentNode).margin;q=parseInt(Q),F+=B.getBoundingClientRect().height+q*2}const Z=(_=ve(d))==null?void 0:_.$el;Z!==void 0&&Z.nodeName!=="#comment"&&(F+=Z.getBoundingClientRect().height+q*2);const H=(P=ve(h))==null?void 0:P.$el;H!==void 0&&H.nodeName!=="#comment"&&(F+=H.getBoundingClientRect().height+q*2);const N=(A=ve(p))==null?void 0:A.$el;N!==void 0&&N.nodeName!=="#comment"&&(F+=N.getBoundingClientRect().height+q*2);const j=a.style.value,G=a.attach.value;y.left=j.left,y.top=j.top,y.transform=j.transform,(typeof e.teleportToViewer=="undefined"||e.teleportToViewer)&&((G.bottom||G.top)&&!G.left&&!G.right&&(j.left="50%",j.transform="translate(-50%, 0)"),(G.left||G.right)&&!G.top&&!G.bottom&&(j.top="50%",j.transform="translate(0, -50%)")),Object.assign(y,j,{height:`${F}px`});const J=s.style.value,U=s.attach.value;E.left=J.left,E.top=J.top,E.transform=J.transform,(typeof e.teleportToViewer=="undefined"||e.teleportToViewer)&&((U.bottom||U.top)&&!U.left&&!U.right&&(J.left="50%",J.transform="translate(-50%, 0)"),(U.left||U.right)&&!U.top&&!U.bottom&&(J.top="50%",J.transform="translate(0, -50%)"));let z=0;const K=(L=ve(v))==null?void 0:L.$el;K!==void 0&&K.nodeName!=="#comment"&&(z+=K.getBoundingClientRect().height),Object.assign(E,J,{height:`${z}px`})};return()=>{if(o.value){const T=[];g.value&&e.compassOpts!==!1?T.push(S("div",{class:"vc-navigation-control"},[S(Nl,{ref:u,...g.value,onCompassEvt:D})])):T.push(ne("v-if")),w.value&&e.zoomOpts!==!1?T.push(S("div",{class:"vc-navigation-control"},[S(Ul,{ref:d,...w.value,onZoomEvt:M})])):T.push(ne("v-if")),O.value&&e.printOpts!==!1?T.push(S("div",{class:"vc-navigation-control"},[S(Hl,{ref:h,...O.value,onPrintEvt:k})])):T.push(ne("v-if")),I.value&&e.locationOpts!==!1?T.push(S("div",{class:"vc-navigation-control"},[S(ql,{ref:p,...I.value,onLocationEvt:$})])):T.push(ne("v-if"));let _=[S("div",{class:"vc-navigation-controls"},T)];_=Oi(t.slots.default,_);const P=[],A=S("div",{ref:l,class:`vc-navigation ${a.classes.value} ${e.customClass}`,style:y},_);if(e.teleportToViewer?P.push(S(Ui,{to:r.viewer._element},A)):P.push(A),e.otherOpts!==!1){const L=S("div",{ref:c,class:"vc-location-other-controls "+s.classes.value,style:E},[S(rc,{ref:v,...R.value.statusBarOpts,onStatusBarEvt:V}),S(sc,{ref:b,...R.value.distancelegendOpts,onDistanceLegendEvt:m})]);e.teleportToViewer?P.push(S(Ui,{to:r.viewer._element},L)):P.push(L)}return P}else return ne("v-if")}}});function bE(e,{emit:t},i){const n={},o={},r={},a={};let s,l,c,u;const d=te(0);let h,p,v=0,b={},y=0,E,x,g,w={},O=0;const I=te(56),R=te(3);let D;const M=te(null),k=A=>{var L;A.stopPropagation&&A.stopPropagation(),A.preventDefault&&A.preventDefault(),(L=ve(M))==null||L.hide();const{Cartesian2:B,SceneMode:F,Math:q}=Cesium;if(i.viewer.scene.mode===F.MORPHING)return!0;const Z=A.currentTarget,H=A.currentTarget.getBoundingClientRect(),N=new B((H.right-H.left)/2,(H.bottom-H.top)/2);let j;A instanceof MouseEvent?(j=new B(A.clientX-H.left,A.clientY-H.top),D=new B(A.clientX,A.clientY)):A instanceof TouchEvent&&(j=new B(A.changedTouches[0].clientX-H.left,A.changedTouches[0].clientY-H.top),D=new B(A.changedTouches[0].clientX,A.changedTouches[0].clientY));const G=B.subtract(j,N,n),J=B.magnitude(G);if(J>30&&J<45)C(Z,G);else if(!(J>50&&J<70))f(Z,G);else{const U=q.PI_OVER_TWO-Math.atan2(-G.y,G.x);U>=0&&U<=q.PI_OVER_TWO&&T(Z,G)}},$=A=>{const{Cartesian2:L,Math:B}=Cesium,F=A.currentTarget.getBoundingClientRect(),q=new L((F.right-F.left)/2,(F.bottom-F.top)/2),Z=A.type==="mouseup"?new L(A.clientX-F.left,A.clientY-F.top):new L(A.changedTouches[0].clientX-F.left,A.changedTouches[0].clientY-F.top),H=L.subtract(Z,q,n),N=L.magnitude(H);if(N>30&&N<45){const j=B.toDegrees(Math.atan2(-H.y,H.x)),G=A.type==="mouseup"?new L(A.clientX,A.clientY):new L(A.changedTouches[0].clientX,A.changedTouches[0].clientY),J=G.x-D.x,U=G.y-D.y;if(Math.sqrt(J*J+U*U)>5)return;const z=B.toDegrees(d.value),K=Math.abs(j-z),Q=i.viewer.scene;(j>0&&z>0&&z<90&&K>80&&K<100||K>260&&K<280)&&Q.camera.flyTo({destination:Q.camera.position,orientation:{heading:0,pitch:Q.camera.pitch}})}},V=A=>{const{Cartesian2:L,Cartesian3:B,defined:F,Matrix4:q,Ray:Z,SceneMode:H,Transforms:N}=Cesium,{viewer:j}=i,G=j.scene,J=G.camera,U=G.screenSpaceCameraController;if(G.mode===H.MORPHING||!U.enableInputs)return!0;if(G.mode===H.COLUMBUS_VIEW&&!U.enableTranslate||(G.mode===H.SCENE3D||G.mode===H.COLUMBUS_VIEW)&&(!U.enableLook||G.mode===H.SCENE3D&&!U.enableRotate))return;const z=new L;z.x=G.canvas.clientWidth/2,z.y=G.canvas.clientHeight/2;const K=new Z,Q=J.getPickRay(z,K),ie=G.globe.pick(Q,G,a);if(!F(ie)){j.camera.flyHome();return}const Y=Se(i,"compassEvt");Y&&t("compassEvt",{type:"reset",camera:j.camera,status:"start",target:A.currentTarget});const oe=N.eastNorthUpToFixedFrame(ie||new B,j.scene.globe.ellipsoid),le=B.subtract(ie||new B,J.position,new B),fe=fh.createTween(G,{destination:q.multiplyByPoint(oe,new B(0,0,B.magnitude(le)),new B),direction:q.multiplyByPointAsVector(oe,new B(0,0,-1),new B),up:q.multiplyByPointAsVector(oe,new B(0,1,0),new B),duration:e.duration,complete:()=>{Y&&t("compassEvt",{type:"reset",camera:j.camera,status:"end",target:A.currentTarget})},cancel:()=>{Y&&t("compassEvt",{type:"reset",camera:j.camera,status:"cancel",target:A.currentTarget})}});G.tweens.add(fe)},m=()=>{const{defined:A}=Cesium;A(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)},f=(A,L)=>{const{defined:B,getTimestamp:F,SceneMode:q,Math:Z,ScreenSpaceEventType:H}=Cesium,N=i.viewer.scene,j=N.screenSpaceCameraController;if(N.mode===q.MORPHING||!j.enableInputs)return;switch(N.mode){case q.COLUMBUS_VIEW:if(j.enableLook)break;if(!j.enableTranslate||!j.enableTilt)return;break;case q.SCENE3D:if(j.enableLook)break;if(!j.enableTilt||!j.enableRotate)return;break;case Cesium.SceneMode.SCENE2D:if(!j.enableTranslate)return;break}E.removeInputAction(H.LEFT_UP),B(u)&&i.viewer.clock.onTick.removeEventListener(u),c=void 0,u=void 0,F();let G=Z.PI_OVER_TWO-Math.atan2(-L.y,L.x);const J=Math.PI/4;let U=0;const z={LEFT:1,RIGHT:2,UP:3,DOWN:4};U=G>=-J&&J>=G?z.DOWN:G>=J&&3*J>=G?z.RIGHT:G>=3*J&&5*J>=G?z.UP:z.LEFT;const K=Se(i,"compassEvt");let Q="rotateEast";switch(U){case z.LEFT:Q="rotateWest";break;case z.RIGHT:Q="rotateEast";break;case z.UP:Q="rotateNorth";break;case z.DOWN:Q="rotateSouth"}K&&t("compassEvt",{type:Q,camera:N.camera,status:"start",target:A}),u=function(ie){const Y=i.viewer.scene,oe=Y.camera;switch(F(),G=20*Math.abs(oe.positionCartographic.height/6378317)*5e-4,U){case z.LEFT:oe.rotateLeft(G);break;case z.RIGHT:oe.rotateRight(G);break;case z.UP:oe.rotate(oe.right,-G);break;case z.DOWN:oe.rotate(oe.right,G)}K&&t("compassEvt",{type:Q,camera:Y.camera,status:"changing",target:A})},c=function(ie){E.removeInputAction(H.LEFT_UP),B(u)&&i.viewer.clock.onTick.removeEventListener(u),c=void 0,u=void 0,K&&t("compassEvt",{type:Q,camera:N.camera,status:"end",target:A})},E.setInputAction(c,H.LEFT_UP),l=i.viewer.clock.onTick.addEventListener(u)},C=(A,L)=>{if(!e.enableCompassOuterRing)return;const B=i.viewer.scene;let F=B.camera;const q=B.screenSpaceCameraController;if(B.mode===Cesium.SceneMode.MORPHING||B.mode===Cesium.SceneMode.SCENE2D||!q.enableInputs||!q.enableLook&&(B.mode===Cesium.SceneMode.COLUMBUS_VIEW||B.mode===Cesium.SceneMode.SCENE3D&&!q.enableRotate))return;document.removeEventListener("mousemove",p,!1),document.removeEventListener("touchmove",p,!1),document.removeEventListener("mouseup",h,!1),document.removeEventListener("touchend",h,!1);const{Cartesian2:Z,Cartesian3:H,defined:N,Math:j,Matrix4:G,Ray:J,Transforms:U}=Cesium;p=void 0,h=void 0;const z=Se(i,"compassEvt");z&&t("compassEvt",{type:"rotate",camera:B.camera,status:"start",target:A}),v=Math.atan2(-L.y,L.x);const K=new Z;K.x=B.canvas.clientWidth/2,K.y=B.canvas.clientHeight/2;const Q=new J,ie=F.getPickRay(K,Q),Y=B.globe.pick(ie,B,a);N(Y)?b=U.eastNorthUpToFixedFrame(Y||new H,B.globe.ellipsoid,r):b=U.eastNorthUpToFixedFrame(F.positionWC,B.globe.ellipsoid,r);let oe=G.clone(F.transform,o);F.lookAtTransform(b),y=Math.atan2(F.position.y,F.position.x),H.magnitude(new H(F.position.x,F.position.y,0)),F.lookAtTransform(oe),p=function(le){const fe=A.getBoundingClientRect(),Ce=new Z((fe.right-fe.left)/2,(fe.bottom-fe.top)/2);let me;le instanceof MouseEvent?me=new Z(le.clientX-fe.left,le.clientY-fe.top):le instanceof TouchEvent&&(me=new Z(le.changedTouches[0].clientX-fe.left,le.changedTouches[0].clientY-fe.top));const be=Z.subtract(me,Ce,n),_e=Math.atan2(-be.y,be.x)-v,ye=j.zeroToTwoPi(y-_e);F=i.viewer.scene.camera,oe=G.clone(F.transform,o),F.lookAtTransform(b);const ge=Math.atan2(F.position.y,F.position.x);F.rotateRight(ye-ge),F.lookAtTransform(oe),z&&t("compassEvt",{type:"rotate",camera:B.camera,status:"changing",target:A})},h=function(le){document.removeEventListener("mousemove",p,!1),document.removeEventListener("touchmove",p,!1),document.removeEventListener("mouseup",h,!1),document.removeEventListener("touchend",h,!1),p=void 0,h=void 0,z&&t("compassEvt",{type:"rotate",camera:B.camera,status:"end",target:A})},document.addEventListener("mousemove",p,!1),document.addEventListener("touchmove",p,!1),document.addEventListener("mouseup",h,!1),document.addEventListener("touchend",h,!1)},T=(A,L)=>{const{Cartesian2:B,defined:F,Math:q,Matrix4:Z,ScreenSpaceEventType:H,Transforms:N}=Cesium;E.removeInputAction(H.MOUSE_MOVE),E.removeInputAction(H.LEFT_UP),x=void 0,g=void 0,O=q.PI_OVER_TWO-Math.atan2(-L.y,L.x),O=O<0?0:O,O=O>q.PI_OVER_TWO?q.PI_OVER_TWO:O;const j=i.viewer.scene,G=j.camera,J=new B;J.x=j.canvas.clientWidth/2,J.y=j.canvas.clientHeight/2;let U=G.pickEllipsoid(J,j.globe.ellipsoid);if(!F(U))for(;J.y<j.canvas.clientHeight;)J.y+=5,U=G.pickEllipsoid(J,j.globe.ellipsoid);const z=Se(i,"compassEvt");z&&t("compassEvt",{type:"tilt",camera:j.camera,status:"start",target:A}),Di(U)&&F(U)&&(w=N.eastNorthUpToFixedFrame(U,j.globe.ellipsoid)),x=K=>{const Q=A.getBoundingClientRect(),ie=new Cesium.Cartesian2((Q.right-Q.left)/2,(Q.bottom-Q.top)/2),Y=B.clone(K.endPosition),oe=B.subtract(Y,ie,n);let le=q.PI_OVER_TWO-Math.atan2(-oe.y,oe.x);le=le<0?0:le,le=le>q.PI_OVER_TWO?q.PI_OVER_TWO:le;const fe=i.viewer.scene.camera,Ce=Z.clone(fe.transform,o);fe.lookAtTransform(w);const me=le-O;fe.rotateUp(me),O=le,fe.lookAtTransform(Ce);let be=Math.ceil(le/(Math.PI/40));be=be>19?19:be;const _e=cc()[be];I.value=_e.x,R.value=_e.y,z&&t("compassEvt",{type:"tilt",camera:j.camera,status:"changing",target:A})},g=function(K){E.removeInputAction(H.MOUSE_MOVE),E.removeInputAction(H.LEFT_UP),x=void 0,g=void 0,z&&t("compassEvt",{type:"tilt",camera:j.camera,status:"end",target:A})},E.setInputAction(x,H.MOUSE_MOVE),E.setInputAction(g,H.LEFT_UP)},_=A=>{p!==void 0&&(A.cancel=!0)},P=()=>{const{Math:A}=Cesium,L=A.PI_OVER_TWO+i.viewer.scene.camera.pitch,B=Math.PI/2/20;let F=Math.floor(L/B);F=F>19?19:F,F=F<0?0:F,I.value=cc()[F].x,R.value=cc()[F].y};return{heading:d,handleDoubleClick:V,handleMouseDown:k,handleMouseUp:$,onTooltipBeforeShow:_,viewerChange:m,load:async(A,L)=>(i.viewer=A,d.value=A.scene.camera.heading,m(),E=new Cesium.ScreenSpaceEventHandler(L),P(),!0),unload:async()=>(document.removeEventListener("mousemove",p,!1),document.removeEventListener("touchmove",p,!1),document.removeEventListener("mouseup",h,!1),document.removeEventListener("touchend",h,!1),l&&l(),s&&s(),E==null||E.destroy(),!0),tiltbarLeft:I,tiltbarTop:R,tooltipRef:M}}function cc(){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 CE=X("compassSmProps",{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}),wE={...we,compassEvt:e=>!0};var uc=ee({name:"VcCompassSm",props:CE,emits:wE,setup(e,t){var i;const n=ae();n.cesiumClass="VcCompassSm";const o=ze(e,t,n);if(o===void 0)return;const{t:r}=_t(),a=St(n),{$services:s}=o,l=bE(e,t,n),c=gi(e),u=te(null),d=te(null),h=((i=a.proxy)==null?void 0:i.$options.name)==="VcNavigationSm",p=te(h),v=xe({});he(()=>e,g=>{Be(()=>{n.mounted&&x()})},{deep:!0});const b=re(()=>({left:l.tiltbarLeft.value+"px",top:l.tiltbarTop.value+"px",visibility:e.autoHidden?"hidden":"visible"})),y=re(()=>({visibility:e.autoHidden?"hidden":"visible"})),E=re(()=>({transform:"rotate(-"+l.heading.value+"rad)",WebkitTransform:"rotate(-"+l.heading.value+"rad)"}));n.createCesiumObject=async()=>{p.value=!0;const{viewer:g}=s;return new Promise((w,O)=>{Be(()=>{h||g._element.appendChild(ve(u)),w(ve(u))})})},n.mount=async()=>{var g;x();const{viewer:w}=s;return(g=w.viewerWidgetResized)==null||g.raiseEvent({type:n.cesiumClass,status:"mounted",target:ve(u)}),l.load(s.viewer,ve(u))},n.unmount=async()=>{var g;const{viewer:w}=s,O=w._element;return h||O.contains(ve(u))&&O.removeChild(ve(u)),(g=w.viewerWidgetResized)==null||g.raiseEvent({type:n.cesiumClass,status:"unmounted",target:ve(u)}),l.unload()};const x=()=>{const g=c.style.value;v.left=g.left,v.top=g.top,v.transform=g.transform;const w=c.attach.value,O=ve(d);if(O!==void 0){const I=O==null?void 0:O.getBoundingClientRect();g.width=`${I==null?void 0:I.width}px`,g.height=`${I==null?void 0:I.height}px`,(w.bottom||w.top)&&!w.left&&!w.right&&(g.left="50%",g.transform="translate(-50%, 0)"),(w.left||w.right)&&!w.top&&!w.bottom&&(g.top="50%",g.transform="translate(0, -50%)")}Object.assign(v,g)};return()=>{if(p.value){let g=[];return g=Oi(t.slots.default,g),g.push(S("div",{class:"vc-compass-tilt-sm",style:y.value})),g.push(S("div",{class:"vc-compass-tiltbar-sm",style:b.value})),g.push(S("div",{class:"vc-compass-arrows-sm",style:y.value})),g.push(S("div",{ref:d,class:"vc-compass-outer-ring-sm",style:E.value},e.tooltip?S(Dt,{ref:l.tooltipRef,...e.tooltip,onBeforeShow:l.onTooltipBeforeShow},()=>S("strong",{},e.tooltip.tip||r("vc.navigationSm.compass.outerTip"))):ne("v-if"))),g.push(S("div",{class:"vc-arrows-e-sm",style:y.value})),g.push(S("div",{class:"vc-arrows-n-sm",style:y.value})),g.push(S("div",{class:"vc-arrows-s-sm",style:y.value})),g.push(S("div",{class:"vc-arrows-w-sm",style:y.value})),S("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 _E(e,{emit:t},i,n){const o=te(65),r=te(null),a=te(null),s=te(null);let l,c,u,d,h,p,v,b,y,E,x,g;const w=M=>{var k,$,V;const{defined:m,getTimestamp:f,SceneMode:C,ScreenSpaceEventType:T}=Cesium,{viewer:_}=n;(k=ve(r))==null||k.hide(),($=ve(a))==null||$.hide(),(V=ve(s))==null||V.hide(),l.removeInputAction(T.LEFT_UP),m(c)&&_.clock.onTick.removeEventListener(c),u=void 0,c=void 0,f();const P=_.scene.camera;c=()=>{_.scene.mode===C.COLUMBUS_VIEW||_.scene.mode===C.SCENE2D?P.zoomIn():R(1)},u=()=>{l.removeInputAction(T.LEFT_UP),m(c)&&_.clock.onTick.removeEventListener(c),u=void 0,c=void 0},l.setInputAction(u,T.LEFT_UP),d=_.clock.onTick.addEventListener(c)},O=M=>{var k,$,V;(k=ve(r))==null||k.hide(),($=ve(a))==null||$.hide(),(V=ve(s))==null||V.hide();const{defined:m,getTimestamp:f,SceneMode:C,ScreenSpaceEventType:T}=Cesium,{viewer:_}=n;l.removeInputAction(T.LEFT_UP),m(h)&&_.clock.onTick.removeEventListener(h),p=void 0,h=void 0,f();const P=_.scene.camera;h=()=>{_.scene.mode===C.COLUMBUS_VIEW||_.scene.mode===C.SCENE2D?P.zoomOut():R(-1)},p=()=>{l.removeInputAction(T.LEFT_UP),m(h)&&_.clock.onTick.removeEventListener(h),p=void 0,h=void 0},l.setInputAction(p,T.LEFT_UP),v=_.clock.onTick.addEventListener(h)},I=M=>{var k,$,V;(k=ve(r))==null||k.hide(),($=ve(a))==null||$.hide(),(V=ve(s))==null||V.hide();const{Cartesian2:m,defined:f,SceneMode:C}=Cesium,{viewer:T}=n;document.removeEventListener("mousemove",b,!1),document.removeEventListener("touchmove",b,!1),document.removeEventListener("mouseup",y,!1),document.removeEventListener("touchend",y,!1),f(E)&&T.clock.onTick.removeEventListener(E),y=void 0,E=void 0;const _=T.scene.camera;E=()=>{const P=o.value-65;P>0?T.scene.mode===C.COLUMBUS_VIEW||T.scene.mode===C.SCENE2D?_.zoomOut():R(-1):P<0&&(T.scene.mode===C.COLUMBUS_VIEW||T.scene.mode===C.SCENE2D?_.zoomIn():R(1))},b=P=>{const A=o.value,L=P.target.parentElement.getBoundingClientRect(),B=g.getBoundingClientRect(),F=new Cesium.Cartesian2;F.x=P.type==="touchmove"?P.changedTouches[0].clientX-B.left:P.clientX-B.left,F.y=P.type==="touchmove"?P.changedTouches[0].clientY-B.top:P.clientY-B.top;let q=new m(L.width-F.x,L.height-F.y).y-16;q=q<0?0:q,q=q>120?120:q,o.value=120-q,o.value-A>0?T.scene.mode===C.COLUMBUS_VIEW||T.scene.mode===C.SCENE2D?_.zoomOut():R(-1):T.scene.mode===C.COLUMBUS_VIEW||T.scene.mode===C.SCENE2D?_.zoomIn():R(1)},y=()=>{document.removeEventListener("mousemove",b,!1),document.removeEventListener("touchmove",b,!1),document.removeEventListener("mouseup",y,!1),document.removeEventListener("touchend",y,!1),f(E)&&T.clock.onTick.removeEventListener(E),y=void 0,b=void 0,E=void 0,o.value=65},document.addEventListener("mousemove",b,!1),document.addEventListener("touchmove",b,!1),document.addEventListener("mouseup",y,!1),document.addEventListener("touchend",y,!1),x=T.clock.onTick.addEventListener(E)},R=M=>{const{Cartesian2:k,Cartesian3:$,defined:V,Ellipsoid:m,Math:f}=Cesium,{viewer:C}=n,T=C.scene,_=T.camera,P=T.canvas,A=new k;A.x=P.clientWidth/2,A.y=P.clientHeight/2;const L=D(A);if(V(L)){const B=$.distance(_.position,L);let F=.0618*M*.2;F=B>300?F:2*F;const q=B*F,Z=new $;$.subtract(L,_.position,Z);const H=$.clone(_.right),N=$.dot(Z,H),j=new $;$.multiplyByScalar(H,N,j),$.subtract(Z,j,Z),$.normalize(Z,Z),_.move(Z,q);const G=new $;$.normalize(L,G);const J=_.pickEllipsoid(A,C.scene.globe.ellipsoid);if(Di(J)&&V(J)&&!isNaN(J.x)&&!isNaN(J.y)&&!isNaN(J.z)&&!(_.positionCartographic.height<0)){$.normalize(J,J);const U=$.angleBetween(G,J);if(!f.equalsEpsilon(U,0,f.EPSILON10)){const z=$.cross(G,J,new $);_.rotate(z,U),Se(i,"zoomEvt")&&t("zoomEvt",{type:M===1?"zoomIn":"zoomOut",camera:C.camera,status:"end"})}}}},D=M=>{const{defined:k,Cartesian3:$}=Cesium,{viewer:V}=n,m=V.scene,f=m.globe,C=m.camera;if(k(f)){let T;m.pickPositionSupported&&(T=m.pickPositionWorldCoordinates(M));const _=C.getPickRay(M),P=f.pick(_,m),A=k(T)?$.distance(T,C.positionWC):Number.POSITIVE_INFINITY;return(Di(P)&&k(P)?$.distance(P,C.positionWC):Number.POSITIVE_INFINITY)>A?T:P}};return{handleZoomInMouseDown:w,handleZoomOutMouseDown:O,handleZoomBarScrollMouseDown:I,load:M=>(g=M,l=new Cesium.ScreenSpaceEventHandler(M),!0),unload:()=>(document.removeEventListener("mousemove",b,!1),document.removeEventListener("touchmove",b,!1),document.removeEventListener("mouseup",y,!1),document.removeEventListener("touchend",y,!1),d==null||d(),v==null||v(),x==null||x(),l==null||l.destroy(),!0),zoombarTop:o,zoomInTooltipRef:r,zoomOutTooltipRef:a,zoomBarTooltipRef:s,onTooltipBeforeShow:M=>{(b!==void 0||c!==void 0||h!==void 0)&&(M.cancel=!0)}}}const EE=X("zoomControlSmProps",{...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})}}),PE={...we,zoomEvt:e=>!0};var dc=ee({name:"VcZoomControlSm",props:EE,emits:PE,setup(e,t){var i;const n=ae();n.cesiumClass="VcZoomControlSm",n.cesiumEvents=[];const o=te(),r=te(),a=te(),s=te(),l=((i=St(n).proxy)==null?void 0:i.$options.name)==="VcNavigationSm",c=te(l),u=xe({}),d=ze(e,t,n);if(d===void 0)return;const{t:h}=_t(),{$services:p}=d,v=gi(e),b=_E(e,t,n,p);he(()=>e,x=>{Be(()=>{n.mounted&&E()})},{deep:!0});const y=re(()=>({top:b.zoombarTop.value+"px"}));n.createCesiumObject=async()=>new Promise((x,g)=>{c.value=!0,Be(()=>{const w=ve(o),{viewer:O}=p;if(l)x(w);else{const I=O._element;Di(w)&&(I==null||I.appendChild(w)),x(w)}})}),n.mount=async()=>{var x;E();const{viewer:g}=p;return(x=g.viewerWidgetResized)==null||x.raiseEvent({type:n.cesiumClass,status:"mounted",target:ve(o)}),b.load(ve(o))},n.unmount=async()=>{var x;const{viewer:g}=p;if(!l){const w=g._element,O=ve(o);Di(O)&&w!=null&&w.contains(O)&&w.removeChild(O)}return(x=g.viewerWidgetResized)==null||x.raiseEvent({type:n.cesiumClass,status:"unmounted",target:ve(o)}),b.unload()};const E=()=>{const x=v.style.value;if(u.left=x.left,u.top=x.top,u.transform=x.transform,u.visibility=e.autoHidden?"hidden":"visible",!l){const g=v.attach.value;(g.bottom||g.top)&&!g.left&&!g.right&&(x.left="50%",x.transform="translate(-50%, 0)"),(g.left||g.right)&&!g.top&&!g.bottom&&(x.top="50%",x.transform="translate(0, -50%)")}Object.assign(u,x)};return()=>{if(c.value){let x=[];return x=Oi(t.slots.default,x),x.push(S("div",{ref:r,class:"vc-zoomin-sm",onMousedown:b.handleZoomInMouseDown,onTouchstart:b.handleZoomInMouseDown},e.tooltip?S(Dt,{ref:b.zoomInTooltipRef,...e.tooltip,onBeforeShow:b.onTooltipBeforeShow},()=>S("strong",{},e.tooltip.zoomInTip||h("vc.navigationSm.zoomCotrol.zoomInTip"))):ne("v-if"))),x.push(S("div",{ref:s,class:"vc-zoomout-sm",onMousedown:b.handleZoomOutMouseDown,onTouchstart:b.handleZoomOutMouseDown},e.tooltip?S(Dt,{ref:b.zoomInTooltipRef,...e.tooltip,onBeforeShow:b.onTooltipBeforeShow},()=>S("strong",{},e.tooltip.zoomOutTip||h("vc.navigationSm.zoomCotrol.zoomOutTip"))):ne("v-if"))),x.push(S("div",{ref:a,class:"vc-zoombar-sm",style:y.value,onMousedown:b.handleZoomBarScrollMouseDown,onTouchstart:b.handleZoomBarScrollMouseDown},e.tooltip?S(Dt,{ref:b.zoomInTooltipRef,...e.tooltip,onBeforeShow:b.onTooltipBeforeShow},()=>S("strong",{},e.tooltip.zoomBarTip||h("vc.navigationSm.zoomCotrol.zoomBarTip"))):ne("v-if"))),S("div",{ref:o,class:"vc-zoom-control-sm "+v.classes.value,style:u},x)}else return ne("v-if")}}});const fm={enableCompassOuterRing:!0,duration:1.5,autoHidden:!0,tooltip:{delay:1e3,anchor:"bottom middle",offset:[0,20],tip:void 0}},gm={autoHidden:!0,tooltip:{delay:1e3,anchor:"bottom middle",offset:[0,20],tip:void 0}},xE=X("navigationSmProps",{...fn,compassOpts:{type:[Boolean,Object],default:()=>fm},zoomOpts:{type:[Boolean,Object],default:()=>gm}}),OE={...we,zoomEvt:e=>!0,compassEvt:e=>!0};var ym=ee({name:"VcNavigationSm",inheritAttrs:!1,props:xE,emits:OE,setup(e,t){const i=ae();i.cesiumClass="VcNavigationSm";const n=ze(e,t,i);if(n===void 0)return;const o=te(!1),{$services:r}=n,a=gi(e),s=te(null),l=te(null),c=te(null),u=xe({}),{emit:d}=t;he(()=>e,()=>{Be(()=>{var x,g;E(),(x=ve(l))==null||x.reload(),(g=ve(c))==null||g.reload()})},{deep:!0});const h=re(()=>Object.assign({},fm,e.compassOpts)),p=re(()=>Object.assign({},gm,e.zoomOpts)),v=x=>{Se(i,"compassEvt")&&d("compassEvt",x)},b=x=>{Se(i,"zoomEvt")&&d("zoomEvt",x)};i.createCesiumObject=async()=>{var x;o.value=!0;const{viewer:g}=r;return(x=g.viewerWidgetResized)==null||x.addEventListener(y),new Promise((w,O)=>{Be(()=>{g._element.appendChild(ve(s)),w(ve(s))})})},i.mount=async()=>{var x;E();const{viewer:g}=r;return(x=g.viewerWidgetResized)==null||x.raiseEvent({type:i.cesiumClass,status:"mounted",target:ve(s)}),!0},i.unmount=async()=>{var x,g;const{viewer:w}=r,O=w._element;return O.contains(ve(s))&&O.removeChild(ve(s)),(x=w.viewerWidgetResized)==null||x.removeEventListener(y),(g=w.viewerWidgetResized)==null||g.raiseEvent({type:i.cesiumClass,status:"unmounted",target:ve(s)}),!0};const y=()=>{Be(()=>{E()})},E=()=>{const x=a.style.value,g=a.attach.value;u.left=x.left,u.top=x.top,u.transform=x.transform,(g.bottom||g.top)&&!g.left&&!g.right&&(x.left="50%",x.transform="translate(-50%, 0)"),(g.left||g.right)&&!g.top&&!g.bottom&&(x.top="50%",x.transform="translate(0, -50%)"),Object.assign(u,x)};return()=>{if(o.value){let x=[];return x=Oi(t.slots.default,x),h.value&&e.compassOpts!==!1&&x.push(S(uc,{ref:l,onCompassEvt:v,...h.value})),p.value&&e.zoomOpts!==!1&&x.push(S(dc,{ref:c,onZoomEvt:b,...p.value})),S("div",{ref:s,class:"vc-navigation-sm "+a.classes.value,style:u},x)}else return ne("v-if")}}});const ME=X("overviewProps",{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 bm=ee({name:"VcOverviewMap",props:ME,emits:{...we,"update:modelValue":e=>!0},setup(e,t){const i=ae();i.cesiumClass="VcOverviewMap",i.cesiumEvents=[];const n=ze(e,t,i);if(n===void 0)return;const{t:o}=_t(),{$services:r}=n,a=te(null),s=te(null),l=xe({}),c=te(null),u=te(null),d=gi(e),h=te(e.modelValue);let p=[],v,b;const y=re(()=>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)),E=re(()=>Object.assign({},{removeCesiumScript:!1,showCredit:!1,sceneMode:2,containerId:"vc-overview-map"},e.viewerOpts));i.createCesiumObject=async()=>{const{viewer:D}=r;return D._element.appendChild(ve(a)),[ve(a),ve(u)]},i.mount=async()=>{w();const{viewer:D}=r;return D.clock.onTick.addEventListener(x),!0},i.unmount=async()=>{const{viewer:D}=r,M=D._element;return D.clock.onTick.removeEventListener(x),M.contains(ve(a))&&M.removeChild(ve(a)),!0};const x=()=>{if(v){const{viewer:D}=r,M=D.camera.computeViewRectangle(),{defined:k}=Cesium;if(!k(M))return;const $=M.expand(e.widthFactor,e.heightFactor);v.camera.flyTo({destination:$.clone(),orientation:{heading:D.camera.heading,pitch:D.camera.pitch,roll:D.camera.roll},duration:0});const{Cartesian3:V,SceneTransforms:m}=Cesium,f=V.fromRadians(M.west,M.north),C=V.fromRadians(M.east,M.north),T=V.fromRadians(M.west,M.south),_=V.fromRadians(M.east,M.south),P=v.scene,A=m.wgs84ToWindowCoordinates(P,f),L=m.wgs84ToWindowCoordinates(P,C),B=m.wgs84ToWindowCoordinates(P,T),F=m.wgs84ToWindowCoordinates(P,_);if(!k(A)||!k(L)||!k(B)||!k(F))return;const q=L.x-A.x,Z=B.y-A.y,H=(A.x+L.x)/2-q/2,N=(A.y+B.y)/2-Z/2;if(q<=0||Z<=0)return;const j=new Cesium.BoundingRectangle(H,N,q,Z);b.rectangle=j,b.material.uniforms.color=Ie(e.centerRectColor),b.show=!0}},g=D=>{const{viewer:M}=D;v=M;const k=M.scene.screenSpaceCameraController;k.enableRotate=!1,k.enableTranslate=!1,k.enableZoom=!1,k.enableTilt=!1,k.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,b=new Cesium.ViewportQuad(new Cesium.BoundingRectangle(150,100,100,50)),b.show=!1,v.scene.primitives.add(b)},w=()=>{var D;const M=d.style.value;if(l.left=M.left,l.top=M.top,l.transform=M.transform,l["pointer-events"]="none",M.borderRadius=e.borderRadius,M.border=e.border,h.value)M.width=e.width,M.height=e.height;else{const k=/(\d+)/g.exec(e.border),$=k!=null&&k.length?parseFloat(k[0]):0,V=getComputedStyle((D=ve(s))==null?void 0:D.$el);M.width=`${parseFloat(V.width)+parseFloat(V.padding)+$}px`,M.height=`${parseFloat(V.height)+parseFloat(V.padding)+$}px`}Object.assign(l,M)},O=()=>{h.value?I():R(),h.value=!h.value,t.emit("update:modelValue",h.value)},I=()=>{var D;const M=/(\d+)/g.exec(e.border),k=M!=null&&M.length?parseFloat(M[0]):0,$=getComputedStyle((D=ve(s))==null?void 0:D.$el);l.width=`${parseFloat($.width)+parseFloat($.padding)+k}px`,l.height=`${parseFloat($.height)+parseFloat($.padding)+k}px`},R=()=>{l.width=e.width,l.height=e.height};return Ke(()=>{p.forEach(D=>D()),p=[]}),()=>{const D=[];return D.push(S(li,{ref:s,class:"toggle toggle-"+e.position+(h.value?"":" minimized "),flat:!0,dense:!0,icon:y.value.icon,size:y.value.size,style:{color:y.value.color,background:y.value.background,"pointer-events":"auto"},onClick:O},()=>y.value.tooltip?S(Dt,{ref:c,...y.value.tooltip},()=>S("strong",{},y.value.tooltip.tip||o(`vc.overview.${h.value?"hidden":"show"}`))):ne("v-if"))),D.push(S(vh,{ref:u,...E.value,onReady:g},()=>Xe(t.slots.default))),S("div",{ref:a,class:"vc-overview-map "+d.classes.value,style:l},D)}}});class tn{constructor(t){this.id=t.id||Cesium.createGuid()}static getBoundingSphere(t,i){var n,o,r,a;const{Primitive:s,ClassificationPrimitive:l,GroundPolylinePrimitive:c,GroundPrimitive:u,Polyline:d}=Cesium;let h;return t instanceof l||t instanceof c?h=(o=(n=t._primitive)==null?void 0:n._boundingSphereWC)==null?void 0:o[0]:t instanceof s?h=(r=t._boundingSphereWC)==null?void 0:r[0]:t instanceof u?h=(a=t._boundingVolumes)==null?void 0:a[0]:t instanceof d?h=t._boundingVolumeWC:t instanceof Cesium.Entity&&(h=new Cesium.BoundingSphere,i.dataSourceDisplay.getBoundingSphere(t,!0,h)),h}static fromPickedFeature(t,i,n,o){var r,a,s,l,c;const u=new tn({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,h=(r=i==null?void 0:i.getProperty)==null?void 0:r.call(i,"position");Cesium.defined(h)&&(typeof h=="string"&&(h=JSON.parse(h)),d=tt(h)),u.position=d}else u.position=(a=tn.getBoundingSphere(t,n))==null?void 0:a.center;return u.cesiumObject=t,u.pickedFeature=i,u.windowPosition=o,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 tn({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}}class SE{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"])}}function TE(e,t,i,n){const{defined:o,Rectangle:r,Math:a}=Cesium,s=e.globe._surface._tilesToRender;let l;for(let u=0;!o(l)&&u<s.length;++u){const d=s[u];r.contains(d.rectangle,t)&&(l=d)}if(!o(l))return;const c=l.data.imagery;for(let u=c.length-1;u>=0;--u){const d=c[u],h=d.readyImagery;if(!o(h))continue;const p=h.imageryLayer.imageryProvider;if(i&&!o(p.pickFeatures)||!r.contains(h.rectangle,t))continue;const v=new r,b=1/1024;v.west=a.lerp(l.rectangle.west,l.rectangle.east,d.textureCoordinateRectangle.x-b),v.east=a.lerp(l.rectangle.west,l.rectangle.east,d.textureCoordinateRectangle.z+b),v.south=a.lerp(l.rectangle.south,l.rectangle.north,d.textureCoordinateRectangle.y-b),v.north=a.lerp(l.rectangle.south,l.rectangle.north,d.textureCoordinateRectangle.w+b),r.contains(v,t)&&n(h)}}function IE(e,t,i=[],n=[]){const{defined:o}=Cesium,r=t.globe.pick(e,t);if(!o(r))return;const a=t.globe.ellipsoid.cartesianToCartographic(r),s=[],l=[];if(TE(t,a,!0,function(c){if(n.indexOf(c.imageryLayer.vcId)!==-1||i.length&&i.indexOf(c.imageryLayer.vcId)===-1)return;const u=c.imageryLayer.imageryProvider.pickFeatures(c.x,c.y,c.level,a.longitude,a.latitude);o(u)&&(s.push(u),l.push(c.imageryLayer))}),s.length!==0)return Promise.all(s).then(function(c){const u=[];for(let d=0;d<c.length;++d){const h=c[d],p=l[d];if(o(h)&&h.length>0)for(let v=0;v<h.length;++v){const b=h[v];b.imageryLayer=p,o(b.position)||(b.position=a),u.push(b)}}return u})}function AE(e,t,i){const n="-1000px",o=te(n),r=te(n),a="",s=1,l=te(),c=te();let u,d;const h=te(null),p=te(null);let v=[],b=!1;const y=xe({top:r.value,left:o.value,transform:a,opacity:s});v.push(he(p,$=>{var V,m,f;const C=$,{defined:T}=Cesium;if(T(C)&&T(C==null?void 0:C.position)){const{viewer:_}=i;l.value=(C==null?void 0:C.position)instanceof Cesium.Cartesian3?C==null?void 0:C.position:(V=C==null?void 0:C.position)==null?void 0:V.getValue(_.clock.currentTime),D(),(m=e.proxy)==null||m.$emit("pickEvt",C)}else M(),(f=e.proxy)==null||f.$emit("pickEvt",C);R()})),v.push(he(h,$=>{const{defined:V,Entity:m}=Cesium,f=$;if(!V(f))p.value=void 0;else{const C=new m({id:"__Vc__Pick__Location__"});C.position=f.pickPosition,p.value=C}Be(()=>{V(f.allFeaturesAvailablePromise)&&f.allFeaturesAvailablePromise.then(()=>{var C,T,_;const P=f.features.filter(A=>V(A));p.value=P.filter(E)[0],!V(p.value)&&P.length>0&&(p.value=P[0],b&&p.value instanceof tn&&(_=(T=(C=p.value)==null?void 0:C.pickedFeature)==null?void 0:T.primitive)!=null&&_.position&&(p.value.position=p.value.pickedFeature.primitive.position))})})}));const E=$=>{const{defined:V}=Cesium;return V($.properties)||V($.description)},x=$=>{const{defined:V}=Cesium,{viewer:m}=i,f=m.scene,C=f.camera.getPickRay($);let T=f.globe.pick(C,f);if(!V(T)&&(T=f.pickPosition($),!V(T)))return;const _=f.globe.ellipsoid.cartesianToCartographic(T||new Cesium.Cartesian3),P=w($),A=O(),L=t.allowFeatureInfoRequests?IE(C,f,t.includeImageryIds,t.excludeImageryIds):Promise.resolve(),B=g(A,T,P,[L],void 0,_.height,!1,m);h.value=B},g=($,V,m,f,C,T,_,P)=>{const{defined:A,defaultValue:L}=Cesium;_=L(_,!1);const B=new SE;return B.providerCoords=$,B.pickPosition=V,B.allFeaturesAvailablePromise=Promise.all(f).then(function(F){B.isLoading=!1,B.features=F.reduce(function(q,Z,H){if(!A(Z))return q;const N=Z.map(function(j){return A(C)&&(j.imageryLayer=C[H]),A(j.position)||(j.position=P.scene.globe.ellipsoid.cartesianToCartographic(V)),(!A(j.position.height)||j.position.height===0)&&(j.position.height=T),tn.fromImageryLayerFeature(j,P)}.bind(this));return q.concat(N)}.bind(this),L(m,[]))}).catch(function(){B.isLoading=!1,B.error="An unknown error occurred while picking features."}),B},w=$=>{var V,m;const f=[],{defined:C}=Cesium,{viewer:T}=i,_=T.scene.drillPick($,t.limit);for(let P=0;P<_.length;++P){const A=_[P];let L=A.id;!C(L)&&C(A.primitive)&&(L=A.primitive);const B=(m=(V=A==null?void 0:A.primitive)==null?void 0:V._catalogItem)!=null?m:L==null?void 0:L._catalogItem;if(typeof(B==null?void 0:B.getFeaturesFromPickResult)=="function"){const F=B.getFeaturesFromPickResult.bind(B)($,A);F&&(Array.isArray(F)?f.push(...F):f.push(F))}else{const F=A;if(F.id)if(et(F.id)&&F.id[0]instanceof Cesium.Entity){b=!0,F.id.forEach(q=>{const Z=tn.fromPickedFeature(q,F,T,$);f.push(Z)});continue}else if(F.id instanceof Cesium.Entity){const q=tn.fromPickedFeature(F.id,F,T,$);f.push(q),b=!1;continue}else b=!1;if(F.primitive){const q=tn.fromPickedFeature(F.primitive,F,T,$);f.push(q)}else if(F.collection){const q=tn.fromPickedFeature(F.collection,F,T,$);f.push(q)}}}return f},O=()=>{const $={},{viewer:V}=i,m=V.scene,f=function(C,T,_,P,A,L,B){if(T){const F=T.call(C,_,P,A,L,B);return C.url&&($[C.url]={x:_,y:P,level:A}),C.pickFeatures=T,F}return Promise.reject(!1)};for(let C=0;C<m.imageryLayers.length;C++){const T=m.imageryLayers.get(C).imageryProvider;T.pickFeatures=f.bind(void 0,T,T.pickFeatures)}return $},I=($,V)=>{const{viewer:m}=i;return Cesium.SceneTransforms.wgs84ToWindowCoordinates(m.scene,$,V)},R=()=>{const{defined:$,Cartesian2:V}=Cesium;if(t.show&&$(l.value)){const m=I(l.value,new V);if($(m)){const{viewer:f}=i,C=f.container,T=C.clientWidth,_=C.clientHeight,P=t.width,A=P*.5;m.x=Math.min(Math.max(m.x,-P),T+P)-A,m.y=Math.min(Math.max(m.y,-P),_+P)-A,y.left=Math.floor(m.x+.25)+"px",y.top=Math.floor(m.y+.25)+"px"}}},D=()=>{const{viewer:$}=i,{defined:V,EasingFunction:m}=Cesium;if(V(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:m.EXPONENTIAL_OUT,update:function(f){y.opacity=f.opacity,y.transform="scale("+f.scale+") rotate("+f.rotate+"deg)"},complete:function(){u=void 0},cancel:function(){u=void 0}})},M=()=>{const{viewer:$}=i,{defined:V,EasingFunction:m}=Cesium;if(V(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:m.EXPONENTIAL_OUT,update:function(f){y.opacity=f.opacity,y.transform="scale("+f.scale+") rotate(0deg)"},complete:function(){u=void 0},cancel:function(){u=void 0}})},k=()=>{R()};return Ke(()=>{v.forEach($=>$()),v=[]}),Object.assign(e.proxy,{selectedFeature:p,position:l,computeScreenSpacePosition:I,update:R,animateAppear:D,animateDepart:M,getPickedFeatures:()=>h}),{pickFromScreenPosition:x,rootRef:c,rootStyle:y,onPostRender:k}}const DE=X("selectionIndicatorProps",{show:{type:Boolean,default:!0},width:{type:Number,default:50},height:{type:Number,default:50},allowFeatureInfoRequests:{type:Boolean,default:!0},includeImageryIds:{type:Array,default:()=>[]},excludeImageryIds:{type:Array,default:()=>[]},limit:{type:Number,default:25}}),BE={...we,pickEvt:e=>!0};var Cm=ee({name:"VcSelectionIndicator",props:DE,emits:BE,setup(e,t){const i=ae();i.cesiumClass="VcSelectionIndicator",i.cesiumEvents=[];const n=ze(e,t,i);if(n===void 0)return;const{$services:o}=n;let r;const a=AE(i,e,o);return i.createCesiumObject=async()=>{const{viewer:s}=o;return s._element.appendChild(ve(a.rootRef)),ve(a.rootRef)},i.mount=async()=>{const{viewer:s}=o,{ScreenSpaceEventHandler:l,ScreenSpaceEventType:c}=Cesium;return r=new l(s.canvas),r.setInputAction(u=>{a.pickFromScreenPosition(u.position)},c.LEFT_CLICK),s.scene.postRender.addEventListener(a.onPostRender),!0},i.unmount=async()=>{const{viewer:s}=o,l=s._element;return l.contains(ve(a.rootRef))&&l.removeChild(ve(a.rootRef)),s.scene.postRender.removeEventListener(a.onPostRender),r.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK),r.destroy(),r=void 0,!0},()=>S("div",{ref:a.rootRef,class:"vc-selection-indicator",style:a.rootStyle},S("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}))}});[Nl,Ul,Hl,ql,rc,sc,vm,uc,dc,ym,bm,Cm].forEach(e=>{e.install=t=>{t.component(e.name,e)}});const wm=Nl,_m=Ul,Em=Hl,Pm=ql,xm=rc,Om=sc,Mm=vm,Sm=uc,Tm=dc,Im=ym,Am=bm,Dm=Cm;X({VcCompass:wm,VcZoomControl:_m,VcPrint:Em,VcMyLocation:Pm,VcStatusBar:xm,VcDistanceLegend:Om,VcNavigation:Mm,VcCompassSm:Sm,VcZoomControlSm:Tm,VcNavigationSm:Im,VcOverviewMap:Am,VcSelectionIndicator:Dm});const yt={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}},Wn={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]}}}}}},wn={show:!0,color:"rgb(255,229,0)",pixelSize:8,outlineColor:"black",outlineWidth:1,disableDepthTestDistance:Number.POSITIVE_INFINITY},LE={show:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY,verticalOrigin:1,image:""},Co={width:2,arcType:0,ellipsoid:void 0},jE={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}}}}},bt={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},Mt={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]}},Mr={show:!0,drawtip:{show:!0,pixelOffset:[32,32]},pointOpts:wn,editorOpts:{delay:1e3,hideDelay:1e3,pixelOffset:[16,-8],move:Object.assign({},Mt),remove:Object.assign({},Mt,{icon:"vc-icons-remove"})},heightReference:1,disableDepthTest:!1,showLabel:!1,labelOpts:Object.assign({},bt,{horizontalOrigin:1,verticalOrigin:0,pixelOffset:[10,0]})},hc={show:!0,showComponentLines:!1,drawtip:{show:!0,pixelOffset:[32,32]},pointOpts:wn,polylineOpts:Co,primitiveOpts:Wn,editorOpts:{pixelOffset:[16,-8],delay:1e3,hideDelay:1e3,move:Object.assign({},Mt),removeAll:Object.assign({},Mt,{icon:"vc-icons-delete"})},disableDepthTest:!1},Bm={show:!0,drawtip:{show:!0,pixelOffset:[32,32]},pointOpts:wn,polylineOpts:Co,primitiveOpts:Wn,editorOpts:{pixelOffset:[16,-8],delay:1e3,hideDelay:1e3,move:Object.assign({},Mt),insert:Object.assign({},Mt,{icon:"vc-icons-insert"}),remove:Object.assign({},Mt,{icon:"vc-icons-remove"}),removeAll:Object.assign({},Mt,{icon:"vc-icons-delete"})},loop:!1,disableDepthTest:!1,showLabel:!1,showAngleLabel:!1,showDistanceLabel:!1,labelOpts:bt,labelsOpts:Object.assign({},bt,{scale:.8,horizontalOrigin:1,verticalOrigin:-1,pixelOffset:[5,5]})},Sr={show:!0,drawtip:{show:!0,pixelOffset:[32,32]},pointOpts:wn,polylineOpts:Co,primitiveOpts:Object.assign({},Wn,{depthFailAppearance:{type:"PolylineMaterialAppearance",options:{material:{fabric:{type:"Color",uniforms:{color:"#51ff00"}}}}}}),polygonOpts:jE,editorOpts:{pixelOffset:[16,-8],delay:1e3,hideDelay:1e3,move:Object.assign({},Mt),insert:Object.assign({},Mt,{icon:"vc-icons-insert"}),remove:Object.assign({},Mt,{icon:"vc-icons-remove"}),removeAll:Object.assign({},Mt,{icon:"vc-icons-delete"})},loop:!0,disableDepthTest:!1,showDistanceLabel:!1,showLabel:!1,showAngleLabel:!1,labelOpts:bt,labelsOpts:Object.assign({},bt,{scale:.8,horizontalOrigin:1,verticalOrigin:-1,pixelOffset:[5,5]})},mc=Object.assign({},Sr,{pointOpts:Object.assign({},wn,{show:!1}),editorOpts:{pixelOffset:[16,-8],delay:1e3,hideDelay:1e3,move:Object.assign({},Mt),removeAll:Object.assign({},Mt,{icon:"vc-icons-delete"})},edge:4,loop:!1,disableDepthTest:!1,showLabel:!1,showAngleLabel:!1,showDistanceLabel:!1,labelOpts:bt,labelsOpts:Object.assign({},bt,{scale:.8,horizontalOrigin:1,verticalOrigin:-1,pixelOffset:[5,5]})}),FE=Object.assign({},mc,{edge:360}),kE=Object.assign({},mc,{edge:6,loop:!0}),RE=Object.assign({},yt,{icon:"vc-icons-clear",color:"red"}),Lm=Object.assign({},yt,{icon:"vc-icons-drawing-regular"}),jm=Object.assign({},yt,{icon:"vc-icons-drawing-circle"}),Ht={...Je,show:Boolean,editable:Boolean,drawtip:Object,pointOpts:Object,editorOpts:Object,mode:Number,preRenderDatas:Array,disableDepthTest:Boolean},pc={...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:()=>RE}},VE=Object.assign({},yt,{icon:"vc-icons-measure-distance"}),Fm=Object.assign({},hc,{labelOpts:Object.assign({},bt,{horizontalOrigin:1,verticalOrigin:-1,pixelOffset:[10,10]}),measureUnits:new gt,decimals:{distance:2,angle:2},locale:void 0,autoUpdateLabelPosition:!0}),$E=Object.assign({},yt,{icon:"vc-icons-measure-component-distance"}),NE=Object.assign({},Fm,{showComponentLines:!0,xLabelOpts:bt,xAngleLabelOpts:Object.assign({},bt,{horizontalOrigin:1,verticalOrigin:0,pixelOffset:[9,0]}),yLabelOpts:Object.assign({},bt,{horizontalOrigin:-1,pixelOffset:[-9,0]}),yAngleLabelOpts:Object.assign({},bt,{verticalOrigin:-1,pixelOffset:[0,9]})}),zE=Object.assign({},yt,{icon:"vc-icons-measure-polyline-distance"}),km=Object.assign({},Bm,{measureUnits:new gt,labelOpts:bt,labelsOpts:Object.assign({},bt,{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}),GE=Object.assign({},yt,{icon:"vc-icons-measure-horizontal-distance"}),UE=Object.assign({},km,{dashLineOpts:{width:2},dashLinePrimitiveOpts:Object.assign({},Wn,{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({},bt,{horizontalOrigin:1,verticalOrigin:1,pixelOffset:[10,-10]}),labelsOpts:Object.assign({},bt,{scale:.8,horizontalOrigin:1,verticalOrigin:-1,pixelOffset:[5,5]}),showDashedLine:!0}),HE=Object.assign({},yt,{icon:"vc-icons-measure-vertical-distance"}),WE=Object.assign({},hc,{labelOpts:Object.assign({},bt,{horizontalOrigin:1,verticalOrigin:-1,pixelOffset:[10,10]}),measureUnits:new gt,decimals:{distance:2,angle:2},locale:void 0,autoUpdateLabelPosition:!0}),qE=Object.assign({},yt,{icon:"vc-icons-measure-height-from-terrain"}),QE=Object.assign({},Mr,{polylineOpts:Co,labelOpts:Object.assign({},bt,{horizontalOrigin:1,verticalOrigin:-1,pixelOffset:[10,10]}),editorOpts:{pixelOffset:[16,-8],delay:1e3,hideDelay:1e3,move:Object.assign({},Mt),removeAll:Object.assign({},Mt,{icon:"vc-icons-delete"})},measureUnits:new gt,decimals:{distance:2},locale:void 0,primitiveOpts:Wn}),ZE=Object.assign({},yt,{icon:"vc-icons-measure-area"}),Rm=Object.assign({},Sr,{labelOpts:bt,labelsOpts:Object.assign({},bt,{scale:.8,horizontalOrigin:1,verticalOrigin:-1,pixelOffset:[5,5]}),showDistanceLabel:!0,showAngleLabel:!0,showLabel:!0,measureUnits:new gt,decimals:{area:2,distance:2,angle:2},loop:!0,locale:void 0,autoUpdateLabelPosition:!0}),JE=Object.assign({},yt,{icon:"vc-icons-measure-point-coordinates"}),XE=Object.assign({},Mr,{heightReference:1,measureUnits:new gt,drawtip:{show:!0,pixelOffset:[32,48]},labelOpts:Object.assign({},bt,{horizontalOrigin:1,verticalOrigin:0,pixelOffset:[10,0]}),decimals:{lng:6,lat:6,height:2,slope:3},locale:void 0,showLabel:!0}),YE=Object.assign({},yt,{icon:"vc-icons-drawing-rectangle"}),vc=Object.assign({},Rm,{pointOpts:Object.assign({},wn,{show:!1}),drawtip:{show:!0,pixelOffset:[32,32]},editorOpts:{pixelOffset:[16,-8],delay:1e3,hideDelay:1e3,move:Object.assign({},Mt),removeAll:Object.assign({},Mt,{icon:"vc-icons-delete"})},edge:4,loop:!1,showAngleLabel:!1}),KE=Object.assign({},vc,{edge:6,loop:!0}),eP=Object.assign({},vc,{edge:360,loop:!0,showDistanceLabel:!1,showAngleLabel:!1}),tP=Object.assign({},{}),iP=Object.assign({},yt,{direction:"right",icon:"vc-icons-measurement-button",activeIcon:"vc-icons-measurement-button",verticalActionsAlign:"center",hideIcon:!1,persistent:!1,modelValue:!0,hideActionOnClick:!1,color:"info"}),Vm=["distance","component-distance","polyline","horizontal","vertical","height","area","point","rectangle","regular","circle"],nP=e=>{let t=!0;return e.forEach(i=>{Vm.includes(i)||(console.error(`VueCesium: unknown measurement type: ${i}`),t=!1)}),t},$m=X("measurementsProps",{...pc,measurements:{type:Array,default:()=>Vm,validator:nP},mainFabOpts:{type:Object,default:()=>iP},fabActionOpts:{type:Object,default:()=>tP},distanceActionOpts:{type:Object,default:()=>VE},distanceMeasurementOpts:{type:Object,default:()=>Fm},componentDistanceActionOpts:{type:Object,default:()=>$E},componentDistanceMeasurementOpts:{type:Object,default:()=>NE},polylineActionOpts:{type:Object,default:()=>zE},polylineMeasurementOpts:{type:Object,default:()=>km},horizontalActionOpts:{type:Object,default:()=>GE},horizontalMeasurementOpts:{type:Object,default:()=>UE},verticalActionOpts:{type:Object,default:()=>HE},verticalMeasurementOpts:{type:Object,default:()=>WE},heightActionOpts:{type:Object,default:()=>qE},heightMeasurementOpts:{type:Object,default:()=>QE},areaActionOpts:{type:Object,default:()=>ZE},areaMeasurementOpts:{type:Object,default:()=>Rm},pointActionOpts:{type:Object,default:()=>JE},pointMeasurementOpts:{type:Object,default:()=>XE},rectangleActionOpts:{type:Object,default:()=>YE},rectangleMeasurementOpts:{type:Object,default:()=>vc},regularActionOpts:{type:Object,default:()=>Lm},regularMeasurementOpts:{type:Object,default:()=>KE},circleActionOpts:{type:Object,default:()=>jm},circleMeasurementOpts:{type:Object,default:()=>eP}}),it=wi($m),oP=X("htmlOverlayProps",{...In,...Yn,...Ae,autoHidden:{type:Boolean,default:!0},customClass:String,teleport:Object}),aP={...we,mouseenter:e=>!0,mouseleave:e=>!0,click:e=>!0};var fc=ee({name:"VcOverlayHtml",props:oP,emits:aP,setup(e,t){const i=ae();i.cesiumClass="VcOverlayHtml",i.cesiumEvents=[];const n=ze(e,t,i);if(n===void 0)return;const{$services:o}=n,r=te(!1),a=te(null),s=xe({}),l=te(null),c=te(null),u=te(null);let d=[];d.push(he(()=>e.position,O=>{c.value=tt(O,o.viewer.scene.globe.ellipsoid)})),d.push(he(()=>e.pixelOffset,O=>{l.value=pt(O)})),d.push(he(()=>e.show,O=>{s.display=O?"block":"none"})),i.createCesiumObject=async()=>ve(a),i.mount=async()=>{const{viewer:O}=o;return r.value=!0,x(),l.value=pt(e.pixelOffset),c.value=tt(e.position,O.scene.globe.ellipsoid),O.scene.preRender.addEventListener(h),!0},i.unmount=async()=>{const{viewer:O}=o;return O.scene.preRender.removeEventListener(h),r.value=!1,g(),!0};const h=()=>{const{viewer:O}=o;if(c.value){const I=O.scene.cartesianToCanvasCoordinates(c.value,{});if(Cesium.defined(I)&&!Cesium.Cartesian2.equals(u.value,I))if(s.left=I.x+l.value.x+"px",s.top=I.y+l.value.y+"px",e.autoHidden&&O.scene.mode!==Cesium.SceneMode.SCENE2D&&O.scene.mode!==Cesium.SceneMode.MORPHING){const R=O.camera.position,D=O.scene.globe.ellipsoid.cartesianToCartographic(R);if(Cesium.defined(D)){let M=D.height;M+=1*O.scene.globe.ellipsoid.maximumRadius,Cesium.Cartesian3.distance(R,c.value)>M||!e.show?s.display="none":s.display="block"}}else s.display="block";else Cesium.defined(I)||(s.display="none");u.value=I}};Ke(()=>{d.forEach(O=>O()),d=[]});const p=()=>r.value?S("div",{ref:a,class:`vc-html-container${e.customClass?" "+e.customClass:""}`,style:s,onMouseenter:b,onMouseleave:y,onClick:v},Xe(t.slots.default)):ne("v-if"),v=O=>{t.emit("click",O)},b=O=>{t.emit("mouseenter",O)},y=O=>{t.emit("mouseleave",O)},E=()=>p(),{showPortal:x,hidePortal:g,renderPortal:w}=Vd(i,a,E);return e.teleport&&e.teleport.to&&!e.teleport.disabled?w:()=>p()}}),gc={exports:{}};gc.exports,function(e){(function(t,i,n){e.exports?e.exports=n():i[t]=n()})("h337",gn,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(h){this._coordinator={},this._data=[],this._radi=[],this._min=10,this._max=1,this._xField=h.xField||h.defaultXField,this._yField=h.yField||h.defaultYField,this._valueField=h.valueField||h.defaultValueField,h.radius&&(this._cfgRadius=h.radius)},u=t.defaultRadius;return c.prototype={_organiseData:function(d,h){var p=d[this._xField],v=d[this._yField],b=this._radi,y=this._data,E=this._max,x=this._min,g=d[this._valueField]||1,w=d.radius||this._cfgRadius||u;y[p]||(y[p]=[],b[p]=[]),y[p][v]?y[p][v]+=g:(y[p][v]=g,b[p][v]=w);var O=y[p][v];return O>E?(h?this.setDataMax(O):this._max=O,!1):O<x?(h?this.setDataMin(O):this._min=O,!1):{x:p,y:v,value:g,radius:w,min:x,max:E}},_unOrganizeData:function(){var d=[],h=this._data,p=this._radi;for(var v in h)for(var b in h[v])d.push({x:v,y:b,radius:p[v][b],value:h[v][b]});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],h=d.length;h--;)this.addData.call(this,d[h]);else{var p=this._organiseData(arguments[0],!0);p&&(this._data.length===0&&(this._min=this._max=p.value),this._coordinator.emit("renderpartial",{min:this._min,max:this._max,data:[p]}))}return this},setData:function(d){var h=d.data,p=h.length;this._data=[],this._radi=[];for(var v=0;v<p;v++)this._organiseData(h[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(p){var v=p.gradient||p.defaultGradient,b=document.createElement("canvas"),y=b.getContext("2d");b.width=256,b.height=1;var E=y.createLinearGradient(0,0,256,1);for(var x in v)E.addColorStop(x,v[x]);return y.fillStyle=E,y.fillRect(0,0,256,1),y.getImageData(0,0,256,1).data},u=function(p,v){var b=document.createElement("canvas"),y=b.getContext("2d"),E=p,x=p;if(b.width=b.height=p*2,v==1)y.beginPath(),y.arc(E,x,p,0,2*Math.PI,!1),y.fillStyle="rgba(0,0,0,1)",y.fill();else{var g=y.createRadialGradient(E,x,p*v,E,x,p);g.addColorStop(0,"rgba(0,0,0,1)"),g.addColorStop(1,"rgba(0,0,0,0)"),y.fillStyle=g,y.fillRect(0,0,2*p,2*p)}return b},d=function(x){for(var v=[],b=x.min,y=x.max,E=x.radi,x=x.data,g=Object.keys(x),w=g.length;w--;)for(var O=g[w],I=Object.keys(x[O]),R=I.length;R--;){var D=I[R],M=x[O][D],k=E[O][D];v.push({x:O,y:D,value:M,radius:k})}return{min:b,max:y,data:v}};function h(p){var v=p.container,b=this.shadowCanvas=document.createElement("canvas"),y=this.canvas=p.canvas||document.createElement("canvas");this._renderBoundaries=[1e4,1e4,0,0];var E=getComputedStyle(p.container)||{};y.className="heatmap-canvas",this._width=y.width=b.width=p.width||+E.width.replace(/px/,""),this._height=y.height=b.height=p.height||+E.height.replace(/px/,""),this.shadowCtx=b.getContext("2d"),this.ctx=y.getContext("2d"),y.style.cssText=b.style.cssText="position:absolute;left:0;top:0;",v.style.position="relative",v.appendChild(y),this._palette=c(p),this._templates={},this._setStyles(p)}return h.prototype={renderPartial:function(p){p.data.length>0&&(this._drawAlpha(p),this._colorize())},renderAll:function(p){this._clear(),p.data.length>0&&(this._drawAlpha(d(p)),this._colorize())},_updateGradient:function(p){this._palette=c(p)},updateConfig:function(p){p.gradient&&this._updateGradient(p),this._setStyles(p)},setDimensions:function(p,v){this._width=p,this._height=v,this.canvas.width=this.shadowCanvas.width=p,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(p){this._blur=p.blur==0?0:p.blur||p.defaultBlur,p.backgroundColor&&(this.canvas.style.backgroundColor=p.backgroundColor),this._width=this.canvas.width=this.shadowCanvas.width=p.width||this._width,this._height=this.canvas.height=this.shadowCanvas.height=p.height||this._height,this._opacity=(p.opacity||0)*255,this._maxOpacity=(p.maxOpacity||p.defaultMaxOpacity)*255,this._minOpacity=(p.minOpacity||p.defaultMinOpacity)*255,this._useGradientOpacity=!!p.useGradientOpacity},_drawAlpha:function(y){for(var v=this._min=y.min,b=this._max=y.max,y=y.data||[],E=y.length,x=1-this._blur;E--;){var g=y[E],w=g.x,O=g.y,I=g.radius,R=Math.min(g.value,b),D=w-I,M=O-I,k=this.shadowCtx,$;this._templates[I]?$=this._templates[I]:this._templates[I]=$=u(I,x);var V=(R-v)/(b-v);k.globalAlpha=V<.01?.01:V,k.drawImage($,D,M),D<this._renderBoundaries[0]&&(this._renderBoundaries[0]=D),M<this._renderBoundaries[1]&&(this._renderBoundaries[1]=M),D+2*I>this._renderBoundaries[2]&&(this._renderBoundaries[2]=D+2*I),M+2*I>this._renderBoundaries[3]&&(this._renderBoundaries[3]=M+2*I)}},_colorize:function(){var p=this._renderBoundaries[0],v=this._renderBoundaries[1],b=this._renderBoundaries[2]-p,y=this._renderBoundaries[3]-v,E=this._width,x=this._height,g=this._opacity,w=this._maxOpacity,O=this._minOpacity,I=this._useGradientOpacity;p<0&&(p=0),v<0&&(v=0),p+b>E&&(b=E-p),v+y>x&&(y=x-v);for(var R=this.shadowCtx.getImageData(p,v,b,y),D=R.data,M=D.length,k=this._palette,$=3;$<M;$+=4){var V=D[$],m=V*4;if(m){var f;g>0?f=g:V<w?V<O?f=O:f=V:f=w,D[$-3]=k[m],D[$-2]=k[m+1],D[$-1]=k[m+2],D[$]=I?k[m+3]:f}}this.ctx.putImageData(R,p,v),this._renderBoundaries=[1e3,1e3,0,0]},getValueAt:function(p){var v,b=this.shadowCtx,y=b.getImageData(p.x,p.y,1,1),E=y.data[3],x=this._max,g=this._min;return v=Math.abs(x-g)*(E/255)>>0,v},getDataURL:function(){return this.canvas.toDataURL()}},h}(),o=function(){var c=!1;return t.defaultRenderer==="canvas2d"&&(c=n),c}(),r={merge:function(){for(var l={},c=arguments.length,u=0;u<c;u++){var d=arguments[u];for(var h in d)l[h]=d[h]}return l}},a=function(){var c=function(){function p(){this.cStore={}}return p.prototype={on:function(v,b,y){var E=this.cStore;E[v]||(E[v]=[]),E[v].push(function(x){return b.call(y,x)})},emit:function(v,b){var y=this.cStore;if(y[v])for(var E=y[v].length,x=0;x<E;x++){var g=y[v][x];g(b)}}},p}(),u=function(h){var p=h._renderer,v=h._coordinator,b=h._store;v.on("renderpartial",p.renderPartial,p),v.on("renderall",p.renderAll,p),v.on("extremachange",function(y){h._config.onExtremaChange&&h._config.onExtremaChange({min:y.min,max:y.max,gradient:h._config.gradient||h._config.defaultGradient})}),b.setCoordinator(v)};function d(){var h=this._config=r.merge(t,arguments[0]||{});if(this._coordinator=new c,h.plugin){var p=h.plugin;if(t.plugins[p]){var v=t.plugins[p];this._renderer=new v.renderer(h),this._store=new v.store(h)}else throw new Error("Plugin '"+p+"' not found. Maybe it was not registered.")}else this._renderer=new o(h),this._store=new i(h);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(h){return this._config=r.merge(this._config,h),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(h){return this._store.getValueAt?this._store.getValueAt(h):this._renderer.getValueAt?this._renderer.getValueAt(h):null}},d}(),s={create:function(l){return new a(l)},register:function(l,c){t.plugins[l]=c}};return s})}(gc);var rP=gc.exports,sP=Wl(rP);const lP=X("entityProps",{id:String,name:String,availability:Object,...Ae,description:[String,Object],...In,orientation:Object,...hu,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,...Je}),cP={...we,...ia,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 Tr=ee({name:"VcEntity",props:lP,emits:cP,setup(e,t){const i=ae();i.cesiumClass="Entity",i.cesiumEvents=["definitionChanged"];const n=ze(e,t,i);if(n===void 0)return;const{$services:o}=n,{emit:r}=t;i.mount=async()=>{var s;const l=(s=o==null?void 0:o.entities)==null?void 0:s.add(i.cesiumObject);return o==null?void 0:o.entities.contains(l)},i.unmount=async()=>{var s;return(s=o==null?void 0:o.entities)==null?void 0:s.remove(i.cesiumObject)};const a=(s,l)=>(Se(i,l)?r(l,s):i.cesiumObject&&(i.cesiumObject[l.substring(7)]=s),s&&(s._vcParent=i.cesiumObject),!0);return Object.assign(i.proxy,{__updateGraphics:a}),()=>{var s,l;return t.slots.default?S("i",{class:se(((s=i.proxy)==null?void 0:s.$options.name)||""),style:{display:"none !important"}},Xe(t.slots.default)):ne(se(((l=i.proxy)==null?void 0:l.$options.name)||""))}}});Tr.install=e=>{e.component(Tr.name,Tr)};const yc=Tr,nM=X("VcEntity",yc);var uP={imageryProvider:Object,...Lt,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,..._u,...Eu,colorToAlphaThreshold:{type:Number,default:.004},sortOrder:Number,vcId:String};const dP={...we,"update:imageryProvider":e=>!0,readyEvent:e=>!0,errorEvent:e=>!0},hP=X("imageryLayerProps",uP);var Ir=ee({name:"VcLayerImagery",props:hP,emits:dP,setup(e,t){const i=ae();i.cesiumClass="ImageryLayer",i.cesiumEvents=["readyEvent","errorEvent"];const n=ze(e,t,i);if(n===void 0)return;const{$services:o}=n,{emit:r}=t;i.createCesiumObject=async()=>{const s=n.transformProps(e);if(rn(Cesium.VERSION,"1.104")){const l=e.imageryProvider||Cesium.BingMapsImageryProvider.fromUrl(void 0,{key:""}),c=Cesium.ImageryLayer.fromProviderAsync(l,s);return c.errorEvent.addEventListener(u=>{}),c}else{const l=e.imageryProvider||{};return new Cesium.ImageryLayer(l,s)}},i.mount=async()=>{const{viewer:s}=o,l=i.cesiumObject;return l.sortOrder=e.sortOrder,l.vcId=e.vcId||Cesium.createGuid(),s.imageryLayers.add(l),!s.isDestroyed()&&s.imageryLayers.contains(l)},i.unmount=async()=>{const{viewer:s}=o,l=i.cesiumObject;return!s.isDestroyed()&&s.imageryLayers.remove(l)};const a=s=>{var l;if(ni(s))return(l=i.unmount)==null?void 0:l.call(i);{const c=i.cesiumObject;c._imageryProvider=s,Se(i,"update:imageryProvider")&&r("update:imageryProvider",s)}return!0};return Object.assign(i.proxy,{__updateProvider:a}),()=>{var s,l;return t.slots.default?S("i",{class:se(((s=i.proxy)==null?void 0:s.$options.name)||""),style:{display:"none !important"}},Xe(t.slots.default)):ne(se(((l=i.proxy)==null?void 0:l.$options.name)||"v-if"))}}});Ir.install=e=>{e.component(Ir.name,Ir)};const bc=Ir,oM=X("VcLayerImagery",bc),mP=X("classificationPrimitiveProps",{...Ho,...no,...Ae,...Ya,...Uo,...Wo,...Go,...kn,...Rn,...Ri,...$i,...Xa,...Je});var Nm=ee({name:"VcPrimitiveClassification",props:mP,emits:fi,setup(e,t){var i;const n=ae();n.cesiumClass="ClassificationPrimitive",vi(e,t,n);const o=((i=n.proxy)==null?void 0:i.$options.name)||"";return()=>t.slots.default?S("i",{class:se(o),style:{display:"none !important"}},Xe(t.slots.default)):ne(se(o))}});const pP=X("groundPrimitiveProps",{...Ho,...no,...Ae,...Ya,...Uo,...Wo,...Go,...kn,...Rn,...Ri,...$i,...Xa,...Je});var zm=ee({name:"VcPrimitiveGround",props:pP,emits:fi,setup(e,t){var i;const n=ae();n.cesiumClass="GroundPrimitive",vi(e,t,n);const o=((i=n.proxy)==null?void 0:i.$options.name)||"";return()=>t.slots.default?S("i",{class:se(o),style:{display:"none !important"}},Xe(t.slots.default)):ne(se(o))}});const vP=X("groundPolylinePrimitiveProps",{...Ho,...no,...Ae,...Uo,...Wo,...Go,...kn,...Rn,...Ri,...$i,...Xa,...Je});var Gm=ee({name:"VcPrimitiveGroundPolyline",props:vP,emits:fi,setup(e,t){var i;const n=ae();n.cesiumClass="GroundPolylinePrimitive",vi(e,t,n);const o=((i=n.proxy)==null?void 0:i.$options.name)||"";return()=>t.slots.default?S("i",{class:se(o),style:{display:"none !important"}},Xe(t.slots.default)):ne(se(o))}});const fP=X("modelPrimitiveProps",{...Ei,basePath:String,...Ae,...Pi,...Dn,...ys,...bs,...hn,...kn,...Cs,...Rn,...ws,...Nt,...$i,...zs,...Xt,...qo,...ft,...sn,...Ps,...xs,..._s,...Es,...Vo,dequantizeInShader:{type:Boolean,default:!0},...Ha,...Os,...qs,...Qs,...Zs,...Tt,...Js,showOutline:{type:Boolean,default:!0},...Je});var Um=ee({name:"VcPrimitiveModel",props:fP,emits:{...fi,readyEvent:e=>!0,texturesReadyEvent:e=>!0,errorEvent:e=>!0},setup(e,t){const i=ae();i.cesiumClass="Model",i.cesiumEvents=["readyEvent","texturesReadyEvent","errorEvent"];const n=vi(e,t,i);return i.createCesiumObject=async()=>{const o=n==null?void 0:n.transformProps(e);return rn(Cesium.VERSION,"1.104")?await Cesium.Model.fromGltfAsync(o):Cesium.Model.fromGltf(o)},()=>{var o;return ne(se(((o=i.proxy)==null?void 0:o.$options.name)||""))}}});const gP=X("primitiveProps",{...Ho,...no,...$s,...Ae,...Pi,...Ya,...Uo,...Wo,...Go,...kn,cull:{type:Boolean,default:!0},...Rn,...$i,...Nt,...Je});var Hm=ee({name:"VcPrimitive",props:gP,emits:fi,setup(e,t){var i;const n=ae();n.cesiumClass="Primitive",vi(e,t,n);const o=((i=n.proxy)==null?void 0:i.$options.name)||"";return()=>{var r;return t.slots.default?S("i",{class:se(o),style:{display:"none !important"}},Xe(t.slots.default)):ne(se(((r=n.proxy)==null?void 0:r.$options.name)||""))}}});const yP={...fi,allTilesLoaded:()=>!0,initialTilesLoaded:()=>!0,loadProgress:(e,t)=>!0,tileFailed:(e,t)=>!0,tileLoad:e=>!0,tileUnload:e=>!0,tileVisible:e=>!0},bP=X("tilesetPrimitiveProps",{url:[String,Object],...Ae,...Pi,modelUpAxis:{type:Number},modelForwardAxis:{type:Number},...Nt,...Is,maximumMemoryUsage:{type:Number},cacheBytes:{type:Number,default:536870912},maximumCacheOverflowBytes:{type:Number,default:536870912},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},...Vo,...Ri,...Ne,pointCloudShading:Object,...Ha,...Au,...qs,...Qs,...Zs,...Du,...Js,enableShowOutline:{type:Boolean,default:!0},showOutline:{type:Boolean,default:!0},...Qt,vectorClassificationOnly:{type:Boolean,default:!1},vectorKeepDecodedPositions:{type:Boolean,default:!1},featureIdIndex:{type:Number,default:0},instanceFeatureIdIndex:{type:Number,default:0},featureIdLabel:{type:[String,Number]},instanceFeatureIdLabel:{type:[String,Number]},splitDirection:{type:Number,default:0},projectTo2D:{type:Boolean,default:!1},showCreditsOnScreen:{type:Boolean,default:!1},debugHeatmapTilePropertyName:String,debugFreezeFrame:{type:Boolean,default:!1},debugColorizeTiles:{type:Boolean,default:!1},...zs,...$i,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},...Je,enableModelExperimental:{type:Boolean,default:!1},...Rs,properties:{type:Array},fragmentShader:String,replaceFS:Boolean,assetId:Number});var Wm=ee({name:"VcPrimitiveTileset",props:bP,emits:yP,setup(e,t){const i=ae();i.cesiumClass="Cesium3DTileset",i.cesiumEvents=["allTilesLoaded","initialTilesLoaded","loadProgress","tileFailed","tileLoad","tileUnload","tileVisible"];const n=vi(e,t,i);i.proxy.creatingPromise.then(r=>{const a=r.cesiumObject;i.removeCallbacks.push(a.tileVisible.addEventListener(o))});const o=r=>{const a=r.content,s=a._model;for(let l=0;l<a.featuresLength;l++){const c=a.getFeature(l);e.properties&&e.properties.length&&e.properties.forEach(u=>{c.hasProperty(u.key)&&c.getProperty(u.key)===u.keyValue&&c.setProperty(u.propertyName,u.propertyValue)})}e.fragmentShader&&s&&s._sourcePrograms&&s._rendererResources&&(Object.keys(s._sourcePrograms).forEach(l=>{var c;const u=s._sourcePrograms[l],d=s._rendererResources.sourceShaders;if(e.replaceFS)d[u.fragmentShader]=e.fragmentShader;else{const h=d[u.fragmentShader],p=(c=n.$services.viewer.scene.context)==null?void 0:c.webgl2;d[u.fragmentShader]=h.replace(`${p?"out_FragColor":"gl_FragColor"} = vec4(color, 1.0);
}`,`${p?"out_FragColor":"gl_FragColor"}  = vec4(color, 1.0);
             ${e.fragmentShader}
}
            `)}}),s._shouldRegenerateShaders=!0)};return()=>{var r;return ne(se(((r=i.proxy)==null?void 0:r.$options.name)||""))}}});const CP=X("osmBuildingsProps",{...xu,...Vs,enableShowOutline:{type:Boolean,default:!0},showOutline:{type:Boolean,default:!0},...Je});var qm=ee({name:"VcPrimitiveOsmBuildings",props:CP,emits:{...fi},setup(e,t){const i=ae();i.cesiumClass="VcPrimitiveOsmBuildings";const n=vi(e,t,i);return i.createCesiumObject=async()=>{const o=n==null?void 0:n.transformProps(e);return o.style=o.tileStyle,delete o.tileStyle,rn(Cesium.VERSION,"1.104")?await Cesium.createOsmBuildingsAsync(o):Cesium.createOsmBuildings(o)},()=>{var o;return ne(se(((o=i.proxy)==null?void 0:o.$options.name)||""))}}});const wP={...fi,complete:e=>!0},_P=X("particlePrimitiveProps",{...Ae,updateCallback:Function,emitter:Object,...Pi,emitterModelMatrix:Object,emissionRate:{type:Number,default:5},bursts:Array,loop:{type:Boolean,default:!0},scale:{type:Number,default:1},startScale:Number,endScale:Number,...sn,...Ou,...Mu,...Ta,...Iu,...Su,...Tu,...Ia,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,...Je});var Qm=ee({name:"VcPrimitiveParticle",props:_P,emits:wP,setup(e,t){const i=ae();return i.cesiumClass="ParticleSystem",i.cesiumEvents=["complete"],vi(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}}),EP=`
  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;
  in 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 texture(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 = texture(colorTexture, v_textureCoordinates);
    out_FragColor = color;
    if ( u_isShed < 0.5 )
        return;
    vec4 currD = texture(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 ){
      out_FragColor = mix(color,vec4(u_color1.rgb, 1.0),mixNum);
    }
    else{
      if(abs(shadowPosition.z-0.0)<0.01){
        return;
      }
      out_FragColor = mix(color,vec4(u_color2.rgb, 1.0),mixNum);
    }
  }
`;const PP=X("viewshedProps",{...qo,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},uniforms:Object});var xP=ee({name:"VcViewshed",props:PP,emits:we,setup(e,t){const i=ae();i.cesiumClass="VcViewshed";const n=ze(e,t,i);if(n===void 0)return;const o=[];let r;o.push(he([()=>e.startPosition,()=>e.endPosition],([s,l])=>{i.mounted&&a(s,l)},{deep:!0})),o.push(he(()=>e.fovH,s=>{if(!i.mounted)return;const l=i.cesiumObject;l.fovH=s})),o.push(he(()=>e.fovV,s=>{if(!i.mounted)return;const l=i.cesiumObject;l.fovV=s})),o.push(he(()=>e.fovV,s=>{if(!i.mounted)return;const l=i.cesiumObject;l.fovV=s})),o.push(he(()=>e.offsetHeight,s=>{if(!i.mounted)return;const l=i.cesiumObject;l.offsetHeight=s})),o.push(he(()=>e.visibleColor,s=>{if(!i.mounted)return;const l=i.cesiumObject;l.visibleColor=Ie(s)})),o.push(he(()=>e.invisibleColor,s=>{if(!i.mounted)return;const l=i.cesiumObject;l.invisibleColor=Ie(s)})),o.push(he(()=>e.showGridLine,s=>{if(!i.mounted)return;const l=i.cesiumObject;l.showGridLine=s})),o.push(he(()=>e.show,s=>{if(!i.mounted)return;const l=i.cesiumObject;l.enabled=s})),Ke(()=>{o.forEach(s=>s()),o.length=0}),i.createCesiumObject=async()=>{const s=n.$services.viewer,l=new gd(s.scene,{fovH:120,fovV:60,offsetHeight:1.8,visibleColor:Ie(e.visibleColor),invisibleColor:Ie(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=Ie(e.lineColor),l.faceColor=Ie(e.faceColor),l},i.mount=async()=>{var s;const l=n.$services.viewer,c=i.cesiumObject,{Cartesian4:u,PostProcessStage:d,Cartesian2:h}=Cesium,p=(s=n.$services.viewer.scene.context)==null?void 0:s.webgl2;let v=EP;p||(v=v.replace("in vec2 v_textureCoordinates;","varying vec2 v_textureCoordinates;"),v=v.replace(/texture\(/g,"texture2D("),v=v.replace(/out_FragColor/g,"gl_FragColor")),a(e.startPosition,e.endPosition),r=new d({fragmentShader:e.fragmentShader||v,uniforms:e.uniforms||{u_color1:function(){return c.visibleColor},u_color2:function(){return c.invisibleColor},u_isShed:function(){return c.shadowMap.enabled},u_radius:function(){return c.lightCamera.frustum.far},shadowMap_depthTexture:function(){return c.shadowMap.enabled?c.shadowMap._shadowMapTexture:l.scene.context.defaultTexture},shadowMap_matrix:function(){return c.shadowMap._shadowMapMatrix},shadowMap_cascadeSplits:function(){return c.shadowMap._cascadeSplits},shadowMap_cascadeMatrices:function(){return c.shadowMap._cascadeMatrices},shadowMap_lightDirectionEC:function(){return c.shadowMap._lightDirectionEC},shadowMap_lightPositionEC:function(){return c.shadowMap._lightPositionEC},shadowMap_cascadeDistances:function(){return c.shadowMap._cascadeDistances},shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness:function(){const y=c.shadowMap._pointBias;return u.fromElements(y.normalOffsetScale,c.shadowMap._distance,c.shadowMap.maximumDistance,0,new u)},shadowMap_texelSizeDepthBiasAndNormalShadingSmooth:function(){const y=c.shadowMap._pointBias,E=new h;return E.x=1/c.shadowMap._textureSize.x,E.y=1/c.shadowMap._textureSize.y,u.fromElements(E.x,E.y,y.depthBias,y.normalShadingSmooth,new u)},czzj:function(){return c.lightCamera.frustum.fov},spzj:function(){return c.lightCamera.frustum.fov},mixNum:function(){return .5},shadowMap_lightUp:function(){return c.lightCamera.up},shadowMap_lightDir:function(){return c.lightCamera.direction},shadowMap_lightRight:function(){return c.lightCamera.right}}}),l.scene.postProcessStages.add(r);const b=n.$services.primitives;return b&&b.add(c)},i.unmount=async()=>{const s=n.$services.viewer;r&&s.scene.postProcessStages.remove(r);const l=n.$services.primitives,c=i.cesiumObject;return l&&l.remove(c)};const a=(s,l)=>{const c=i.cesiumObject,{Cartesian3:u}=Cesium;let d=u.subtract(l,s,new u);const h=u.magnitudeSquared(d),p=u.distance(l,s);if(h<.01||c.frustum.near>p)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(p,1.1)}};return()=>{var s;return ne(se(((s=i.proxy)==null?void 0:s.$options.name)||""))}}});const OP=X("timeDynamicPointCloudProps",{...zo,intervals:Object,...Ae,...Pi,...Nt,...Pu,shading:Object,...Vs,...Vo,...Je});var Zm=ee({name:"VcPrimitiveTimeDynamicPointCloud",props:OP,emits:{...fi,frameChanged:e=>!0,frameFailed:e=>!0},setup(e,t){const i=ae();i.cesiumClass="VcPrimitiveTimeDynamicPointCloud",i.cesiumEvents=["frameChanged","frameFailed"];const n=vi(e,t,i);return i.createCesiumObject=async()=>{const o=n==null?void 0:n.transformProps(e);return o.style=o.tileStyle,delete o.tileStyle,new Cesium.TimeDynamicPointCloud(o)},()=>{var o;return ne(se(((o=i.proxy)==null?void 0:o.$options.name)||""))}}});const MP=X("i3sDataProviderProps",{...Ei,name:String,...Ae,geoidTiledTerrainProvider:{type:Object},traceFetches:{type:Boolean,default:!1},cesium3dTilesetOptions:{type:Object},...Je});var Jm=ee({name:"VcPrimitiveI3sDataProvider",props:MP,emits:fi,setup(e,t){const i=ae();return i.cesiumClass="I3SDataProvider",vi(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const SP=X("voxelPromitiveProps",{provider:{type:Object},...Pi,...Rs,...zo,...Je});var Xm=ee({name:"VcPrimitiveVoxel",props:SP,emits:fi,setup(e,t){const i=ae();return i.cesiumClass="VoxelPrimitive",vi(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const TP=X("primitiveClusterProps",{...Ae,enabled:{type:Boolean,default:!0},pixelRange:{type:Number,default:80},minimumClusterSize:{type:Number,default:2},clusterBillboards:{type:Boolean,default:!0},clusterLabels:{type:Boolean,default:!0},clusterPoints:{type:Boolean,default:!0},billboards:{type:Array,default:()=>[]},labels:{type:Array,default:()=>[]},points:{type:Array,default:()=>[]},...Je});var Ym=ee({name:"VcPrimitiveCluster",props:TP,emits:{...fi,clusterEvent:(e,t)=>!0},setup(e,t){var i;const n=ae();n.cesiumClass="VcPrimitiveCluster",n.cesiumEvents=["clusterEvent"];const o=vi(e,t,n),r=[];r.push(he(()=>e.show,u=>{const d=n.cesiumObject;d.show=u})),r.push(he(()=>e.enabled,u=>{const d=n.cesiumObject;d.enabled=u})),r.push(he(()=>e.minimumClusterSize,u=>{const d=n.cesiumObject;d.minimumClusterSize=u})),r.push(he(()=>e.clusterBillboards,u=>{const d=n.cesiumObject;d.clusterBillboards=u,n.proxy.reload()})),r.push(he(()=>e.clusterLabels,u=>{const d=n.cesiumObject;d.clusterLabels=u,n.proxy.reload()})),r.push(he(()=>e.clusterBillboards,u=>{const d=n.cesiumObject;d.clusterPoints=u,n.proxy.reload()})),r.push(he(()=>Ge(e.billboards),(u,d)=>{if(!n.mounted)return;const h=n.cesiumObject._billboardCollection;if(u.length===d.length){const p=[];for(let v=0;v<u.length;v++){const b=u[v],y=d[v];JSON.stringify(b)!==JSON.stringify(y)&&p.push({newOptions:b,oldOptions:y})}p.forEach(v=>{const b=h._billboards.find(y=>(y==null?void 0:y.id)===v.oldOptions.id);b&&Object.keys(v.newOptions).forEach(y=>{v.oldOptions[y]!==v.newOptions[y]&&(b[y]=o==null?void 0:o.transformProp(y,v.newOptions[y]))})})}else{const p=rt(u,d,"id"),v=rt(d,u,"id"),b=[];for(let y=0;y<v.length;y++){const E=h._billboards.find(x=>x.id===v[y].id);E&&b.push(E)}b.forEach(y=>{h.remove(y)}),s(h,p),setTimeout(()=>{o.$services.viewer.scene.camera.changed.raiseEvent()})}},{deep:!0})),r.push(he(()=>Ge(e.labels),(u,d)=>{if(!n.mounted)return;const h=n.cesiumObject._labelCollection;if(u.length===d.length){const p=[];for(let v=0;v<u.length;v++){const b=u[v],y=d[v];JSON.stringify(b)!==JSON.stringify(y)&&p.push({newOptions:b,oldOptions:y})}p.forEach(v=>{const b=h._labels.find(y=>y.id===v.oldOptions.id);b&&Object.keys(v.newOptions).forEach(y=>{v.oldOptions[y]!==v.newOptions[y]&&(b[y]=o.transformProp(y,v.newOptions[y]))})})}else{const p=rt(u,d,"id"),v=rt(d,u,"id"),b=[];for(let y=0;y<v.length;y++){const E=h._labels.find(x=>x.id===v[y].id);E&&b.push(E)}b.forEach(y=>{h.remove(y)}),l(h,p),setTimeout(()=>{o.$services.viewer.scene.camera.changed.raiseEvent()})}},{deep:!0})),r.push(he(()=>Ge(e.points),(u,d)=>{if(!n.mounted)return;const h=n.cesiumObject._pointCollection;if(u.length===d.length){const p=[];for(let v=0;v<u.length;v++){const b=u[v],y=d[v];JSON.stringify(b)!==JSON.stringify(y)&&p.push({newOptions:b,oldOptions:y})}p.forEach(v=>{const b=h._pointPrimitives.find(y=>y&&y.id===v.oldOptions.id);b&&Object.keys(v.newOptions).forEach(y=>{v.oldOptions[y]!==v.newOptions[y]&&(b[y]=o.transformProp(y,v.newOptions[y]))})})}else{const p=rt(u,d,"id"),v=rt(d,u,"id"),b=[];for(let y=0;y<v.length;y++){const E=h._pointPrimitives.find(x=>x.id===v[y].id);E&&b.push(E)}b.forEach(y=>{h.remove(y)}),a(h,p),setTimeout(()=>{o.$services.viewer.scene.camera.changed.raiseEvent()})}},{deep:!0})),n.createCesiumObject=async()=>{const u=new ud({show:e.show,enabled:e.enabled,pixelRange:e.pixelRange,minimumClusterSize:e.minimumClusterSize,clusterBillboards:e.clusterBillboards,clusterLabels:e.clusterLabels,clusterPoints:e.clusterPoints}),d=new Cesium.BillboardCollection;s(d,e.billboards);const h=new Cesium.LabelCollection;l(h,e.labels);const p=new Cesium.PointPrimitiveCollection;return a(p,e.points),u._billboardCollection=d,u._labelCollection=h,u._pointCollection=p,u._initialize(o.$services.viewer.scene),setTimeout(()=>{o.$services.viewer.scene.camera.changed.raiseEvent()}),u};const a=(u,d)=>{for(let h=0;h<d.length;h++){const p=d[h];p.id=Cesium.defined(p.id)?p.id:Cesium.createGuid();const v=o.transformProps(p),b=u.add(v);Bi(b,v)}},s=(u,d)=>{for(let h=0;h<d.length;h++){const p=d[h];p.id=Cesium.defined(p.id)?p.id:Cesium.createGuid();const v=o.transformProps(p),b=u.add(v);Bi(b,v)}},l=(u,d)=>{for(let h=0;h<d.length;h++){const p=d[h];p.id=Cesium.defined(p.id)?p.id:Cesium.createGuid();const v=o.transformProps(p),b=u.add(v);Bi(b,v)}};Ke(()=>{r.forEach(u=>u()),r.length=0});const c=((i=n.proxy)==null?void 0:i.$options.name)||"";return()=>t.slots.default?S("i",{class:se(c),style:{display:"none !important"}},Xe(t.slots.default)):ne(se(c))}});[Nm,zm,Gm,Um,Hm,Wm,qm,Jm,Xm,Zm,Qm,Ym].forEach(e=>{e.install=t=>{t.component(e.name,e)}});const Cc=Nm,wc=zm,Ar=Gm,Km=Um,_n=Hm,ep=Wm,tp=qm,ip=Qm,np=xP,op=Zm,ap=Jm,rp=Xm,sp=Ym;X({VcPrimitiveClassification:Cc,VcPrimitiveGround:wc,VcPrimitiveGroundPolyline:Ar,VcPrimitiveModel:Km,VcPrimitive:_n,VcPrimitiveTileset:ep,VcPrimitiveOsmBuildings:tp,VcPrimitiveParticle:ip,VcViewshed:np,VcPrimitiveTimeDynamicPointCloud:op,VcPrimitiveI3sDataProvider:ap,VcPrimitiveVoxel:rp,VcPrimitiveCluster:sp});const IP=X("heatmapOverlayProps",{...Ae,...Lt,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 lp=ee({name:"VcOverlayHeatmap",props:IP,emits:we,setup(e,t){var i;const n=ae();n.cesiumClass="VcOverlayHeatmap",n.cesiumEvents=[];const o=ze(e,t,n);if(o===void 0)return;const r=te(null),a=te(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=te(),c=te(),u=te(),d=te(),h=te(),p=te(!1),v=te();(i=St(n).proxy.creatingPromise)==null||i.then(()=>{p.value=!0});const b=re(()=>Object.assign({},s,e.options));let y=[];y.push(he(()=>u,w=>{c.value.fabric.uniforms.image=w.value,h.value.options.material.fabric.uniforms.image=w.value},{deep:!0})),y.push(he(()=>e.data,(w,O)=>{if(!n.mounted)return;const I=n.cesiumObject;Array.isArray(w)&&Array.isArray(O)?(g(w,I),u.value=I.getDataURL()):o.reload()},{deep:!0})),y.push(he(()=>[e.max,e.min],w=>{const O=n.cesiumObject;O.setDataMax(w[0]||0),O.setDataMin(w[1]||0),u.value=O.getDataURL()})),y.push(he(()=>[e.type,e.projection,e.rectangle],w=>{o.reload()})),y.push(he(()=>e.options,w=>{const O=n.cesiumObject;O.configure(w),u.value=O.getDataURL()},{deep:!0})),n.createCesiumObject=async()=>{const{WebMercatorProjection:w,GeographicProjection:O}=Cesium;a.value=e.projection==="3857"?new w:new O;const I=E();v.value=x(e.rectangle);const R=document.createElement("div");if(Cesium.defined(I)&&R.setAttribute("id",I),R.setAttribute("style","width: "+v.value.width+"px; height: "+v.value.height+"px; margin: 0px; display: none;"),document.body.appendChild(R),b.value.container=R,e.segments.length){b.value.gradient={};const M=e.max-e.min;for(let k=0;k<e.segments.length;k++)b.value.gradient[`${(e.segments[k][0]-e.min)/M}`]=Ie(e.segments[k][1]).toCssColorString()}const D=sP.create(b.value);return R.children[0].setAttribute("id",I+"-hm"),Array.isArray(e.data)&&(g(e.data,D),c.value={fabric:{type:"Image",uniforms:{image:u.value,transparent:!0}}},h.value={type:"MaterialAppearance",options:{material:{fabric:{type:"Image",uniforms:{image:u.value}}}}}),D},n.unmount=async()=>(document.body.removeChild(n.cesiumObject._config.container),!0);const E=w=>{let O="";const I="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let R=0;R<(w||8);R++)O+=I.charAt(Math.floor(Math.random()*I.length));return O},x=w=>{const O=Tn(w),I=a.value.project(new Cesium.Cartographic(O.west,O.south)),R=a.value.project(new Cesium.Cartographic(O.east,O.north)),D={north:R.y,east:R.x,south:I.y,west:I.x};let M=D.east>0&&D.west<0?D.east+Math.abs(D.west):Math.abs(D.east-D.west),k=D.north>0&&D.south<0?D.north+Math.abs(D.south):Math.abs(D.north-D.south),$=1;M>k&&M>b.value.maxCanvasSize?($=M/b.value.maxCanvasSize,k/$<b.value.minCanvasSize&&($=k/b.value.minCanvasSize)):k>M&&k>b.value.maxCanvasSize?($=k/b.value.maxCanvasSize,k/$<b.value.minCanvasSize&&($=M/b.value.minCanvasSize)):M<k&&M<b.value.minCanvasSize?($=M/b.value.minCanvasSize,k/$>b.value.maxCanvasSize&&($=k/b.value.maxCanvasSize)):k<M&&k<b.value.minCanvasSize&&($=k/b.value.minCanvasSize,M/$>b.value.maxCanvasSize&&($=M/b.value.maxCanvasSize)),M=M/$,k=k/$,Cesium.defined(b.value.radius)||(b.value.radius=M>k?M/b.value.radiusFactor:k/b.value.radiusFactor);const V=(b.value.radius||1)*b.value.spacingFactor,m=D.west,f=D.south;M=Math.round(M+V*2),k=Math.round(k+V*2),D.west-=V*$,D.east+=V*$,D.south-=V*$,D.north+=V*$;const C=a.value.unproject(new Cesium.Cartesian3(D.west,D.south)),T=a.value.unproject(new Cesium.Cartesian3(D.east,D.north)),_={north:Cesium.Math.toDegrees(T.latitude),east:Cesium.Math.toDegrees(T.longitude),south:Cesium.Math.toDegrees(C.latitude),west:Cesium.Math.toDegrees(C.longitude)};return l.value=_,{height:k,width:M,factor:$,xoffset:m,yoffset:f,spacing:V}},g=(w,O)=>{if(w){const{height:I,xoffset:R,yoffset:D,factor:M,spacing:k}=v.value,$=b.value.xField||"x",V=b.value.yField||"y",m=b.value.valueField||"value",f=[];for(let C=0;C<w.length;C++){const T=w[C];Cesium.defined(T.id)||(T.id=C);const _=a.value.project(Cesium.Cartographic.fromDegrees(T[$],T[V])),P={[$]:Math.round((_.x-R)/M+k),[V]:Math.round((_.y-D)/M+k),[m]:void 0};P[V]=I-P[V],(T[m]||T[m]===0)&&(P[m]=T[m]),!(P[m]>e.max||P[m]<e.min)&&f.push(P)}O.setData({min:e.min,max:e.max,data:f}),u.value=O.getDataURL()}};return Ke(()=>{y.forEach(w=>w()),y=[]}),Object.assign(n.proxy,{rootRef:r,childRef:d}),()=>{if(p.value){const w=[];return e.type==="entity"&&u.value?w.push(S(yc,{ref:d,show:e.show,rectangle:{coordinates:l.value,material:c.value}})):e.type==="primitive"?w.push(S(wc,{ref:d,show:e.show,appearance:h.value,releaseGeometryInstances:!1,geometryInstances:new Cesium.GeometryInstance({geometry:new Cesium.RectangleGeometry({rectangle:Tn(l.value)})})})):e.type==="imagery-layer"&&u.value&&w.push(S(bc,{ref:d,show:e.show,imageryProvider:new Cesium.SingleTileImageryProvider({url:u.value,rectangle:Tn(l.value)})})),S("i",{ref:r,class:"vc-overlay-heatmap",style:"display: none !important"},w)}else return ne("v-if")}}});const AP=X("echartsOverlayProps",{options:{type:Object,required:!0},autoHidden:{type:Boolean,default:!0},customClass:String,coordinateSystem:{type:String,default:"cesium"}});({...we});var cp=ee({name:"VcOverlayEcharts",props:AP,emits:["beforeLoad","ready","destroyed","mouseenter","mouseleave","click"],setup(e,t){const i=ae();i.cesiumClass="VcOverlayEcharts",i.cesiumEvents=[];const n=ze(e,t,i);if(n===void 0)return;const{$services:o}=n,r=te(!1),a=te(),s=xe({left:"0px",top:"0px",pointerEvents:"none",position:"absolute"});let l;const c=te(!0);let u=[];u.push(he(()=>e.options,x=>{n.reload()})),i.createCesiumObject=async()=>a.value,i.mount=async()=>{const{viewer:x}=o;return r.value=!0,Be(()=>{Io.registerCoordinateSystem(e.coordinateSystem,p(x)),a.value&&(l=Io.init(a.value),h(),x.scene.postRender.addEventListener(d))}),!0},i.unmount=async()=>{const{viewer:x}=o;return x.scene.postRender.removeEventListener(d),r.value=!1,!0};const d=()=>{if(c.value){const{viewer:x}=o;l.resize({width:x.canvas.width,height:x.canvas.height})}},h=()=>{c.value&&e.options&&l.setOption(e.options)},p=x=>{const g=function(w){this.viewer=w,this._mapOffset=[0,0]};return g.create=function(w){return w.eachSeries(function(O){O.get("coordinateSystem")===e.coordinateSystem&&(O.coordinateSystem=new g(x))}),[]},g.getDimensionsInfo=function(){return["x","y"]},g.dimensions=["x","y"],g.prototype.dimensions=["x","y"],g.prototype.setMapOffset=function(w){this._mapOffset=w},g.prototype.dataToPoint=function(w){const O=[],I=Cesium.Cartesian3.fromDegrees(w[0],w[1]);if(!I)return O;if(e.autoHidden){const D=Cesium.Ellipsoid.WGS84.geodeticSurfaceNormal(I,new Cesium.Cartesian3),M=this.viewer.camera.direction;if(Cesium.Cartesian3.dot(D,M)>=0)return O}const R=this.viewer.scene.cartesianToCanvasCoordinates(I);return R?[R.x-this._mapOffset[0],R.y-this._mapOffset[1]]:O},g.prototype.pointToData=function(w){const O=this._mapOffset,I=x.scene.globe.ellipsoid,R=new Cesium.Cartesian3(w[1]+O[1],w[2]+O[2],0),D=I.cartesianToCartographic(R);return D?[D.longitude,D.latitude]:[0,0]},g.prototype.getviewerRect=function(){const w=this.viewer.canvas;return new Io.graphic.BoundingRect(0,0,w.width,w.height)},g.prototype.getRoamTransform=function(){return Io.matrix.create()},g},v=()=>r.value?S("div",{ref:a,class:`vc-echart-container${e.customClass?" "+e.customClass:""}`,style:s,onMouseenter:y,onMouseleave:E,onClick:b},Xe(t.slots.default)):ne("v-if"),b=x=>{t.emit("click",x)},y=x=>{t.emit("mouseenter",x)},E=x=>{t.emit("mouseleave",x)};return Ke(()=>{u.forEach(x=>x()),u=[]}),()=>v()}});function up(){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 bi(e,t){if(Cesium.defined(t)){const i={};i.arrayBufferView=t,e.source=i}return new Cesium.Texture(e)}function _c(e,t,i){return new Cesium.Framebuffer({context:e,colorTextures:[t],depthTexture:i})}function Ec(e){const t={viewport:e.viewport,depthTest:e.depthTest,depthMask:e.depthMask,blending:e.blending};return Cesium.Appearance.getDefaultRenderState(!0,!1,t)}function DP(e){const t={},i=Cesium.Math.mod(e.west,Cesium.Math.TWO_PI),n=Cesium.Math.mod(e.east,Cesium.Math.TWO_PI),o=e.width;let r,a;o>Cesium.Math.THREE_PI_OVER_TWO?(r=0,a=Cesium.Math.TWO_PI):n-i<o?(r=i,a=i+o):(r=i,a=n),t.lon={min:Cesium.Math.toDegrees(r),max:Cesium.Math.toDegrees(a)};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),h=Cesium.Math.clampToLatitudeRange(l+u);return d<-Cesium.Math.PI_OVER_THREE&&(d=-Cesium.Math.PI_OVER_TWO),h>Cesium.Math.PI_OVER_THREE&&(h=Cesium.Math.PI_OVER_TWO),t.lat={min:Cesium.Math.toDegrees(d),max:Cesium.Math.toDegrees(h)},t}var BP=`

precision highp float;

// 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;

in 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 = texture(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;
  float speedScaleFactor = speedFactor * pixelSize;

  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 = texture(currentParticlesPosition, v_textureCoordinates).rgb;
  float speedScaleFactor = speedFactor * pixelSize;
  vec3 speed = calculateSpeedByRungeKutta2(lonLatLev);
  vec3 speedInLonLat = convertSpeedUnitToLonLat(lonLatLev, speed);

  vec4 particleSpeed = vec4(speedInLonLat, calculateWindNorm(speed / speedScaleFactor));
  out_FragColor = particleSpeed;
}
`;const LP=`
uniform sampler2D currentParticlesPosition; // (lon, lat, lev)
uniform sampler2D particlesSpeed; // (u, v, w, norm) Unit converted to degrees of longitude and latitude

in vec2 v_textureCoordinates;

void main() {
  // texture coordinate must be normalized
  vec3 lonLatLev = texture(currentParticlesPosition, v_textureCoordinates).rgb;
  vec3 speed = texture(particlesSpeed, v_textureCoordinates).rgb;
  vec3 nextParticle = lonLatLev + speed;

  out_FragColor = vec4(nextParticle, 0.0);
}
`,jP=`

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;

in 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 = texture(nextParticlesPosition, v_textureCoordinates).rgb;
  vec4 nextSpeed = texture(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)) {
    out_FragColor = vec4(randomParticle, 1.0); // 1.0 means this is a random particle
  } else {
    out_FragColor = vec4(nextParticle, 0.0);
  }
}
`;class wo{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}),o=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:o,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)}}class dp{constructor(t,i,n,o){this.data=i,this.createWindTextures(t,i),this.createParticlesTextures(t,n,o),this.createComputingPrimitives(i,n,o,t)}createWindTextures(t,i){const n={context:t,width:i.dimensions.lon,height:i.dimensions.lat*i.dimensions.lev,pixelFormat:t!=null&&t.webgl2?Cesium.PixelFormat.RED:Cesium.PixelFormat.LUMINANCE,pixelDatatype:Cesium.PixelDatatype.FLOAT,flipY:!1,sampler:new Cesium.Sampler({minificationFilter:Cesium.TextureMinificationFilter.NEAREST,magnificationFilter:Cesium.TextureMagnificationFilter.NEAREST})};this.windTextures={U:bi(n,i.U.array),V:bi(n,i.V.array)}}createParticlesTextures(t,i,n){const o={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})},r=this.randomizeParticles(i.maxParticles,n),a=new Float32Array(4*i.maxParticles).fill(0);this.particlesTextures={previousParticlesPosition:bi(o,r),currentParticlesPosition:bi(o,r),nextParticlesPosition:bi(o,r),postProcessingPosition:bi(o,r),particlesSpeed:bi(o,a)}}randomizeParticles(t,i){const n=new Float32Array(4*t);for(let o=0;o<t;o++)n[4*o]=Cesium.Math.randomBetween(i.lonRange.x,i.lonRange.y),n[4*o+1]=Cesium.Math.randomBetween(i.latRange.x,i.latRange.y),n[4*o+2]=Cesium.Math.randomBetween(this.data.lev.min,this.data.lev.max),n[4*o+3]=0;return n}destroyParticlesTextures(){Object.keys(this.particlesTextures).forEach(t=>{this.particlesTextures[t].destroy()})}createComputingPrimitives(t,i,n,o){const r=o==null?void 0:o.webgl2;let a=BP;r||(a=a.replace("in vec2 v_textureCoordinates;","varying vec2 v_textureCoordinates;"),a=a.replace(/texture\(/g,"texture2D("),a=a.replace(/out_FragColor/g,"gl_FragColor"));let s=LP;r||(s=s.replace("in vec2 v_textureCoordinates;","varying vec2 v_textureCoordinates;"),s=s.replace(/texture\(/g,"texture2D("),s=s.replace(/out_FragColor/g,"gl_FragColor"));let l=jP;r||(l=l.replace("in vec2 v_textureCoordinates;","varying vec2 v_textureCoordinates;"),l=l.replace(/texture\(/g,"texture2D("),l=l.replace(/out_FragColor/g,"gl_FragColor"));const c=new Cesium.Cartesian3(t.dimensions.lon,t.dimensions.lat,t.dimensions.lev),u=new Cesium.Cartesian3(t.lon.min,t.lat.min,t.lev.min),d=new Cesium.Cartesian3(t.lon.max,t.lat.max,t.lev.max),h=new Cesium.Cartesian3((d.x-u.x)/(c.x-1),(d.y-u.y)/(c.y-1),c.z>1?(d.z-u.z)/(c.z-1):1),p=new Cesium.Cartesian2(t.U.min,t.U.max),v=new Cesium.Cartesian2(t.V.min,t.V.max),b=this;this.primitives={calculateSpeed:new wo({commandType:"Compute",uniformMap:{U:function(){return b.windTextures.U},V:function(){return b.windTextures.V},currentParticlesPosition:function(){return b.particlesTextures.currentParticlesPosition},dimension:function(){return c},minimum:function(){return u},maximum:function(){return d},interval:function(){return h},uSpeedRange:function(){return p},vSpeedRange:function(){return v},pixelSize:function(){return n.pixelSize},speedFactor:function(){return i.speedFactor}},fragmentShaderSource:new Cesium.ShaderSource({sources:[a]}),outputTexture:this.particlesTextures.particlesSpeed,preExecute:function(){const y=b.particlesTextures.previousParticlesPosition;b.particlesTextures.previousParticlesPosition=b.particlesTextures.currentParticlesPosition,b.particlesTextures.currentParticlesPosition=b.particlesTextures.postProcessingPosition,b.particlesTextures.postProcessingPosition=y,b.primitives.calculateSpeed.commandToExecute.outputTexture=b.particlesTextures.particlesSpeed}}),updatePosition:new wo({commandType:"Compute",uniformMap:{currentParticlesPosition:function(){return b.particlesTextures.currentParticlesPosition},particlesSpeed:function(){return b.particlesTextures.particlesSpeed}},fragmentShaderSource:new Cesium.ShaderSource({sources:[s]}),outputTexture:this.particlesTextures.nextParticlesPosition,preExecute:function(){b.primitives.updatePosition.commandToExecute.outputTexture=b.particlesTextures.nextParticlesPosition}}),postProcessingPosition:new wo({commandType:"Compute",uniformMap:{nextParticlesPosition:function(){return b.particlesTextures.nextParticlesPosition},particlesSpeed:function(){return b.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:[l]}),outputTexture:this.particlesTextures.postProcessingPosition,preExecute:function(){b.primitives.postProcessingPosition.commandToExecute.outputTexture=b.particlesTextures.postProcessingPosition}})}}}const FP=`
in vec2 st;
// it is not normal itself, but used to control lines drawing
in 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 = texture(previousParticlesPosition, particleIndex).rgb;
  vec3 currentPosition = texture(currentParticlesPosition, particleIndex).rgb;
  vec3 nextPosition = texture(postProcessingPosition, particleIndex).rgb;

  float isAnyRandomPointUsed = texture(postProcessingPosition, particleIndex).a +
    texture(currentParticlesPosition, particleIndex).a +
    texture(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 {

      }
    }
  }
}
`,kP=`
void main() {
  const vec4 white = vec4(1.0);
  out_FragColor = white;
}
`,RP=`
in vec3 position;
in vec2 st;

out vec2 textureCoordinate;

void main() {
  textureCoordinate = st;
  gl_Position = vec4(position, 1.0);
}
`,VP=`

uniform sampler2D segmentsColorTexture;
uniform sampler2D segmentsDepthTexture;

uniform sampler2D currentTrailsColor;
uniform sampler2D trailsDepthTexture;

uniform float fadeOpacity;

in vec2 textureCoordinate;

void main() {
  vec4 pointsColor = texture(segmentsColorTexture, textureCoordinate);
  vec4 trailsColor = texture(currentTrailsColor, textureCoordinate);

  trailsColor = floor(fadeOpacity * 255.0 * trailsColor) / 255.0; // make sure the trailsColor will be strictly decreased

  float pointsDepth = texture(segmentsDepthTexture, textureCoordinate).r;
  float trailsDepth = texture(trailsDepthTexture, textureCoordinate).r;
  float globeDepth = czm_unpackDepth(texture(czm_globeDepthTexture, textureCoordinate));

  out_FragColor = vec4(0.0);
  if (pointsDepth < globeDepth) {
    out_FragColor = out_FragColor + pointsColor;
  }
  if (trailsDepth < globeDepth) {
    out_FragColor = out_FragColor + trailsColor;
  }
  gl_FragDepth = min(pointsDepth, trailsDepth);
}
`,$P=`
uniform sampler2D trailsColorTexture;
uniform sampler2D trailsDepthTexture;

in vec2 textureCoordinate;

void main() {
  vec4 trailsColor = texture(trailsColorTexture, textureCoordinate);
  float trailsDepth = texture(trailsDepthTexture, textureCoordinate).r;
  float globeDepth = czm_unpackDepth(texture(czm_globeDepthTexture, textureCoordinate));

  if (trailsDepth < globeDepth) {
    out_FragColor = trailsColor;
  } else {
    out_FragColor = vec4(0.0);
  }
}
`;class hp{constructor(t,i,n,o,r){this.createRenderingTextures(t,i),this.createRenderingFramebuffers(t),this.createRenderingPrimitives(t,n,o,r)}createRenderingTextures(t,i){const n={context:t,width:t.drawingBufferWidth,height:t.drawingBufferHeight,pixelFormat:Cesium.PixelFormat.RGBA,pixelDatatype:Cesium.PixelDatatype.UNSIGNED_BYTE},o={context:t,width:t.drawingBufferWidth,height:t.drawingBufferHeight,pixelFormat:Cesium.PixelFormat.DEPTH_COMPONENT,pixelDatatype:Cesium.PixelDatatype.UNSIGNED_INT};this.textures={segmentsColor:bi(n),segmentsDepth:bi(o),currentTrailsColor:bi(n),currentTrailsDepth:bi(o),nextTrailsColor:bi(n),nextTrailsDepth:bi(o)}}createRenderingFramebuffers(t){this.framebuffers={segments:_c(t,this.textures.segmentsColor,this.textures.segmentsDepth),currentTrails:_c(t,this.textures.currentTrailsColor,this.textures.currentTrailsDepth),nextTrails:_c(t,this.textures.nextTrailsColor,this.textures.nextTrailsDepth)}}createSegmentsGeometry(t){const i=[];for(let d=0;d<t.particlesTextureSize;d++)for(let h=0;h<t.particlesTextureSize;h++)for(let p=0;p<6;p++)i.push(d/t.particlesTextureSize),i.push(h/t.particlesTextureSize);const n=new Float32Array(i),o=[],r=[-1,0,1],a=[-1,1];for(let d=0;d<t.maxParticles;d++)for(let h=0;h<r.length;h++)for(let p=0;p<a.length;p++)o.push(r[h]),o.push(a[p]),o.push(0);const s=new Float32Array(o),l=12*t.maxParticles,c=new Uint32Array(l);for(let d=0,h=0,p=0;d<t.maxParticles;d++)c[h++]=p+0,c[h++]=p+1,c[h++]=p+2,c[h++]=p+2,c[h++]=p+1,c[h++]=p+3,c[h++]=p+2,c[h++]=p+4,c[h++]=p+3,c[h++]=p+4,c[h++]=p+3,c[h++]=p+5,p+=6;const u=Cesium.GeometryAttributes;return new Cesium.Geometry({attributes:new u({st:new Cesium.GeometryAttribute({componentDatatype:Cesium.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:n}),normal:new Cesium.GeometryAttribute({componentDatatype:Cesium.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:s})}),indices:c})}createRenderingPrimitives(t,i,n,o){const r=this,a=t==null?void 0:t.webgl2;let s=FP;a||(s=s.replace("in vec2 st;","attribute vec2 st;"),s=s.replace("in vec3 normal;","attribute vec3 normal;"),s=s.replace(/texture\(/g,"texture2D("));let l=kP;a||(l=l.replace(/out_FragColor/g,"gl_FragColor"));let c=RP;a||(c=c.replace("out vec2 textureCoordinate;","varying vec2 textureCoordinate;"),c=c.replace("in vec3 position;","attribute vec3 position;"),c=c.replace("in vec2 st;","attribute vec2 st;"));let u=VP;a||(u=u.replace("in vec2 textureCoordinate;","varying vec2 textureCoordinate;"),u=u.replace(/out_FragColor/g,"gl_FragColor"),u=u.replace(/gl_FragDepth/g,"gl_FragDepthEXT"),u=u.replace(/texture\(/g,"texture2D("));let d=$P;a||(d=d.replace("in vec2 textureCoordinate;","varying vec2 textureCoordinate;"),d=d.replace(/out_FragColor/g,"gl_FragColor"),d=d.replace(/texture\(/g,"texture2D(")),this.primitives={segments:new wo({commandType:"Draw",attributeLocations:{st:0,normal:1},geometry:this.createSegmentsGeometry(i),primitiveType:Cesium.PrimitiveType.TRIANGLES,uniformMap:{previousParticlesPosition:function(){return o.particlesTextures.previousParticlesPosition},currentParticlesPosition:function(){return o.particlesTextures.currentParticlesPosition},postProcessingPosition:function(){return o.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:[s]}),fragmentShaderSource:new Cesium.ShaderSource({sources:[l]}),rawRenderState:Ec({viewport:void 0,depthTest:{enabled:!0},depthMask:!0}),framebuffer:this.framebuffers.segments,autoClear:!0}),trails:new wo({commandType:"Draw",attributeLocations:{position:0,st:1},geometry:up(),primitiveType:Cesium.PrimitiveType.TRIANGLES,uniformMap:{segmentsColorTexture:function(){return r.textures.segmentsColor},segmentsDepthTexture:function(){return r.textures.segmentsDepth},currentTrailsColor:function(){return r.framebuffers.currentTrails.getColorTexture(0)},trailsDepthTexture:function(){return r.framebuffers.currentTrails.depthTexture},fadeOpacity:function(){return i.fadeOpacity}},vertexShaderSource:new Cesium.ShaderSource({defines:["DISABLE_GL_POSITION_LOG_DEPTH"],sources:[c]}),fragmentShaderSource:new Cesium.ShaderSource({defines:["DISABLE_LOG_DEPTH_FRAGMENT_WRITE"],sources:[u]}),rawRenderState:Ec({viewport:void 0,depthTest:{enabled:!0,func:Cesium.DepthFunction.ALWAYS},depthMask:!0}),framebuffer:this.framebuffers.nextTrails,autoClear:!0,preExecute:function(){const h=r.framebuffers.currentTrails;r.framebuffers.currentTrails=r.framebuffers.nextTrails,r.framebuffers.nextTrails=h,r.primitives.trails.commandToExecute.framebuffer=r.framebuffers.nextTrails,r.primitives.trails.clearCommand.framebuffer=r.framebuffers.nextTrails}}),screen:new wo({commandType:"Draw",attributeLocations:{position:0,st:1},geometry:up(),primitiveType:Cesium.PrimitiveType.TRIANGLES,uniformMap:{trailsColorTexture:function(){return r.framebuffers.nextTrails.getColorTexture(0)},trailsDepthTexture:function(){return r.framebuffers.nextTrails.depthTexture}},vertexShaderSource:new Cesium.ShaderSource({defines:["DISABLE_GL_POSITION_LOG_DEPTH"],sources:[c]}),fragmentShaderSource:new Cesium.ShaderSource({defines:["DISABLE_LOG_DEPTH_FRAGMENT_WRITE"],sources:[d]}),rawRenderState:Ec({viewport:void 0,depthTest:{enabled:!1},depthMask:!0,blending:{enabled:!0}}),framebuffer:void 0})}}}class NP{constructor(t,i,n,o){this.context=t,this.data=i,this.particleSystemOptions=n,this.viewerParameters=o,this.particlesComputing=new dp(this.context,this.data,this.particleSystemOptions,this.viewerParameters),this.particlesRendering=new hp(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 dp(this.context,this.data,this.particleSystemOptions,this.viewerParameters),this.particlesRendering=new hp(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)}}function mp(e,t){const i=e-t*Math.floor(e/t);return i===t?0:i}function Dr(e){return typeof e=="string"&&e.indexOf("/")>=0&&(e=e.split("/")),_g(e)&&e.length===2?e[0]/e[1]:+e}function zP(e,t){const i=Math.floor(e.size),n=Math.floor(t.size),o=i*n,r=Dr(e.delta),a=Dr(t.delta),s=Dr(e.start),l=Dr(t.start),c=Math.floor(i*r)>=360;function u(){return{width:i,height:n}}function d(){return c}function h(b,y){for(let E=y||0;E<o;E++){const x=E%i,g=Math.floor(E/i),w=s+x*r,O=l+g*a;if(b(w,O,E))return E+1}return NaN}function p(b,y){if(b===b&&y===y){const E=mp(b-s,360)/r,x=(y-l)/a,g=Math.round(E),w=Math.round(x);if(0<=w&&w<n&&0<=g&&(g<i||g===i&&c)){const O=w*i+g;return g===i?O-i:O}}return NaN}function v(b,y){if(b===b&&y===y){const E=mp(b-s,360)/r,x=(y-l)/a,g=Math.floor(E),w=Math.floor(x),O=g+1,I=w+1,R=E-g,D=x-w;if(0<=w&&I<n&&0<=g&&(O<i||O===i&&c)){const M=w*i+g;let k=M+1;const $=M+i;let V=$+1;return O===i&&(k-=i,V-=i),[M,k,$,V,R,D]}}return[NaN,NaN,NaN,NaN,NaN,NaN]}return{dimensions:u,isCylindrical:d,forEach:h,closest:p,closest4:v}}const GP=X("windmapOverlayProps",{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 pp=ee({name:"VcOverlayWindmap",props:GP,emits:we,setup(e,t){const i=ae();i.cesiumClass="VcOverlayHtml",i.cesiumEvents=[];const n=ze(e,t,i);if(n===void 0)return;const{$services:o}=n;let r,a,s,l;const c=re(()=>{const w=Math.ceil(Math.sqrt(e.options.maxParticles)),O=w*w;return{particlesTextureSize:w,maxParticles:O,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(he(()=>e.show,w=>{s.show=w})),u.push(he(()=>e.data,w=>{i.proxy.reload()})),u.push(he(()=>c.value,w=>{const O=i.cesiumObject;O&&O.applyParticleSystemOptions(w)},{deep:!0})),u.push(he(()=>e.viewerParameters,w=>{x(),i.cesiumObject.applyViewerParameters(r)},{deep:!0})),i.createCesiumObject=async()=>{const{viewer:w}=o;s=new Cesium.PrimitiveCollection,a=new Cesium.BoundingSphere(Cesium.Cartesian3.ZERO,.99*6378137),r={lonRange:new Cesium.Cartesian2,latRange:new Cesium.Cartesian2,pixelSize:0};const O={start:e.data.lon.array[0],delta:e.data.lon.delta,size:e.data.lon.array.length},I={start:e.data.lat.array[0],delta:e.data.lat.delta,size:e.data.lat.array.length};return l=zP(O,I),x(),new NP(w.scene.context,e.data,c.value,r)},i.mount=async()=>{const{viewer:w}=o;w.scene.primitives.add(s);const O=w.scene,I=O.camera;return d(),I.moveStart.addEventListener(p),I.moveEnd.addEventListener(v),window.addEventListener("resize",y),O.preRender.addEventListener(E),!0},i.unmount=async()=>{h();const{viewer:w}=o,O=w.scene,I=O.camera;return h(),w.scene.primitives.remove(s),I.moveStart.removeEventListener(p),I.moveEnd.removeEventListener(v),window.removeEventListener("resize",y),O.preRender.removeEventListener(E),!0};const d=()=>{const w=i.cesiumObject;s.add(w.particlesComputing.primitives.calculateSpeed),s.add(w.particlesComputing.primitives.updatePosition),s.add(w.particlesComputing.primitives.postProcessingPosition),s.add(w.particlesRendering.primitives.segments),s.add(w.particlesRendering.primitives.trails),s.add(w.particlesRendering.primitives.screen)},h=()=>{const w=i.cesiumObject;s.remove(w.particlesComputing.primitives.calculateSpeed),s.remove(w.particlesComputing.primitives.updatePosition),s.remove(w.particlesComputing.primitives.postProcessingPosition),s.remove(w.particlesRendering.primitives.segments),s.remove(w.particlesRendering.primitives.trails),s.remove(w.particlesRendering.primitives.screen)},p=()=>{s.show=!1},v=()=>{x(),i.cesiumObject.applyViewerParameters(r),s.show=!0};let b=!1;const y=()=>{b=!0,s.show=!1,s.removeAll()},E=()=>{if(b){const{viewer:w}=o,O=w.scene;i.cesiumObject.canvasResize(O.context),b=!1,d(),s.show=!0}},x=()=>{const{viewer:w}=o,O=w.scene,I=O.camera;if(Cesium.defined(e.viewerParameters)&&Cesium.defined(e.viewerParameters.latRange)&&Cesium.defined(e.viewerParameters.lonRange))r.lonRange=pt(e.viewerParameters.lonRange),r.latRange=pt(e.viewerParameters.latRange);else{const D=I.computeViewRectangle(O.globe.ellipsoid),M=DP(D);r.lonRange.x=M.lon.min,r.lonRange.y=M.lon.max,r.latRange.x=M.lat.min,r.latRange.y=M.lat.max}const R=Cesium.defined(e.viewerParameters)&&Cesium.defined(e.viewerParameters.pixelSize)?e.viewerParameters.pixelSize:I.getPixelSize(a,O.drawingBufferWidth,O.drawingBufferHeight);R>0&&(r.pixelSize=R)},g=(w,O)=>{const I=l.closest(w,O);if(Cesium.defined(I))return[e.data.U.array[I],e.data.V.array[I]]};return Ke(()=>{u.forEach(w=>w()),u=[]}),Object.assign(i.proxy,{getNearestUV:g}),()=>{var w;return ne(se(((w=i.proxy)==null?void 0:w.$options.name)||"v-if"))}}});const UP=X("dynamicOverlayProps",{...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}}),HP={...we,"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=>!0};var vp=ee({name:"VcOverlayDynamic",props:UP,emits:HP,setup(e,t){const i=ae();i.cesiumClass="VcOverlayDynamic",i.cesiumEvents=[];const n=ze(e,t,i);if(n===void 0)return;const{$services:o}=n,r=te([]),a=te({}),{emit:s}=t,l=te(null),c=te(null);let u,d=[];d.push(he(()=>e.show,g=>{const w=i.cesiumObject;w&&(w.show=g)})),d.push(he(()=>e.name,g=>{const w=i.cesiumObject;w&&(w.name=g)})),d.push(he(()=>e.startTime,g=>{const{viewer:w}=o;Cesium.defined(w)&&g&&(w.clock.startTime=Li(g))})),d.push(he(()=>e.stopTime,g=>{const{viewer:w}=o;Cesium.defined(w)&&g&&(w.clock.stopTime=Li(g))})),d.push(he(()=>e.currentTime,g=>{const{viewer:w}=o;Cesium.defined(w)&&g&&(w.clock.currentTime=Li(g))})),d.push(he(()=>e.multiplier,g=>{const{viewer:w}=o;Cesium.defined(w)&&(w.clock.multiplier=g)})),d.push(he(()=>e.clockStep,g=>{const{viewer:w}=o;Cesium.defined(w)&&(w.clock.clockStep=g)})),d.push(he(()=>e.clockRange,g=>{const{viewer:w}=o;Cesium.defined(w)&&(w.clock.clockRange=g)})),d.push(he(()=>e.canAnimate,g=>{const{viewer:w}=o;Cesium.defined(w)&&(w.clock.canAnimate=g)})),d.push(he(()=>e.shouldAnimate,g=>{const{viewer:w}=o;Cesium.defined(w)&&(w.clock.shouldAnimate=g)})),d.push(he(()=>Ge(e.dynamicOverlays),(g,w)=>{if(!i.mounted)return;const O=i.cesiumObject;if(g.length===w.length){const I=[];for(let R=0;R<g.length;R++){const D=g[R],M=w[R],k=($,V)=>{if($!=="nodeTransformations"&&$!=="_definitionChanged")return V};JSON.stringify(D,k)!==JSON.stringify(M,k)&&I.push({newOptions:D,oldOptions:M})}I.forEach(R=>{const D=O.entities.getById(R.oldOptions.id);if(Cesium.defined(D)){if(R.oldOptions.id===R.newOptions.id)D&&Object.keys(R.newOptions).forEach(k=>{R.oldOptions[k]!==R.newOptions[k]&&(D[k]=n.transformProp(k,R.newOptions[k]))});else if(D){O.entities.remove(D),Wr(r.value,$=>$.id===D.id);const k=R.newOptions;p(O,[k])}const M=qr(r.value,k=>k.id===D.id);if(Cesium.defined(M)){const k=R.oldOptions.sampledPositions,$=R.newOptions.sampledPositions,V=rt($,k,"id");rt(k,$,"id").forEach(m=>{m.time&&M._sampledPosition.removeSample(m.time)}),V.forEach(m=>{m.time?M.addPosition(m.position,m.time):m.interval&&M.addPosition(m.position,m.interval||e.defaultInterval)})}}})}else{const I=rt(g,w,"id"),R=rt(w,g,"id"),D=[];for(let M=0;M<R.length;M++){const k=O.entities.getById(R[M].id);D.push(k)}D.forEach(M=>{O.entities.remove(M),Wr(r.value,k=>k.id===M.id)}),p(O,I)}},{deep:!0})),i.createCesiumObject=async()=>new Cesium.CustomDataSource(e.name);const h=g=>{let w=Se(i,"update:currentTime");!Li(e.currentTime).equalsEpsilon(g.currentTime,.001)&&w&&s("update:currentTime",g.currentTime),w=Se(i,"update:shouldAnimate"),e.shouldAnimate!==g.shouldAnimate&&w&&s("update:shouldAnimate",g.shouldAnimate),w=Se(i,"update:canAnimate"),e.canAnimate!==g.canAnimate&&w&&s("update:canAnimate",g.canAnimate),w=Se(i,"update:clockRange"),e.clockRange!==g.clockRange&&w&&s("update:clockRange",g.clockRange),w=Se(i,"update:clockStep"),e.clockStep!==g.clockStep&&w&&s("update:clockStep",g.clockStep),w=Se(i,"update:multiplier"),e.multiplier!==g.multiplier&&w&&s("update:multiplier",g.multiplier),w=Se(i,"update:startTime"),!Li(e.startTime).equalsEpsilon(g.startTime,.001)&&w&&s("update:startTime",g.startTime),w=Se(i,"update:stopTime"),!Li(e.stopTime).equalsEpsilon(g.stopTime,.001)&&w&&s("update:stopTime",g.stopTime),v(g);const{JulianDate:O,Cartesian3:I}=Cesium;if(w=Se(i,"stopArrived"),w&&e.shouldAnimate)for(let R=0;R<r.value.length;R++){const D=r.value[R],M=D._sampledPosition.getValue(g.currentTime),k=e.dynamicOverlays[R];for(let $=0;$<k.sampledPositions.length;$++){const V=k.sampledPositions[$],m=tt(V.position),f=Li(V.time),C=I.equalsEpsilon(M,m,e.positionPrecision),T=O.equalsEpsilon(g.currentTime,f,e.timePrecision);let _=!1;switch(e.stopArrivedFlag){case"time":_=T;break;case"position":_=C;break;case"both":_=T&&C;break;case"or":_=T||C;break}if(_){s("stopArrived",{overlay:D,position:V,offset:u,clock:g,indexOverlay:R,indexPosition:$});break}}}},p=(g,w)=>{for(let O=0;O<w.length;O++){const I=w[O],R=n.transformProps(I),D=new vl(R);r.value.push(D);const M=g.entities.add(D._entity);R.sampledPositions.forEach(k=>{k.time?D.addPosition(k.position,k.time):k.interval&&(k.time=D.addPosition(k.position,k.interval||e.defaultInterval))}),I.id!==M.id&&(I.id=M.id),Bi(M,R,["id"])}};i.mount=async()=>{const{viewer:g}=o,w=i.cesiumObject;return w.show=e.show,p(w,e.dynamicOverlays),g.dataSources.add(w).then(()=>{a.value.startTime=g.clock.startTime,a.value.stopTime=g.clock.stopTime,a.value.currentTime=g.clock.currentTime,a.value.multiplier=g.clock.multiplier,a.value.clockStep=g.clock.clockStep,a.value.clockRange=g.clock.clockRange,a.value.canAnimate=g.clock.canAnimate,a.value.shouldAnimate=g.clock.shouldAnimate,e.startTime&&(g.clock.startTime=Li(e.startTime)),e.stopTime&&(g.clock.stopTime=Li(e.stopTime)),e.currentTime&&(g.clock.currentTime=Li(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(h);const O=Se(i,"onStop");return O&&g.clock.onStop.addEventListener(O),!0})},i.unmount=async()=>{const{viewer:g}=o,w=i.cesiumObject;g.dataSources.remove(w,!0),g.clock.startTime=a.value.startTime,g.clock.stopTime=a.value.stopTime,g.clock.multiplier=a.value.multiplier,g.clock.clockStep=a.value.clockStep,g.clock.clockRange=a.value.clockRange,g.clock.canAnimate=a.value.canAnimate,g.clock.shouldAnimate=a.value.shouldAnimate,r.value.length=0,g.clock.onTick.removeEventListener(h);const O=Se(i,"onStop");return O&&g.clock.onStop.removeEventListener(O),l.value&&(g.trackedEntity=void 0),!0};const v=g=>{var w,O,I,R,D,M,k,$;if(c.value&&l.value){const{viewer:V}=o;if(Cesium.JulianDate.greaterThan(g.currentTime,g.stopTime)){l.value=null;return}const m=l.value._sampledPosition.getValue(g.currentTime);let f=new Cesium.HeadingPitchRange;switch(c.value.mode){case"TP":f.heading=0,f.pitch=((O=(w=c.value)==null?void 0:w.offset)==null?void 0:O.pitch)||Cesium.Math.toRadians(-90),f.range=((R=(I=c.value)==null?void 0:I.offset)==null?void 0:R.range)||1e3;break;case"FP":{const C=Cesium.JulianDate.addSeconds(g.currentTime,.016666666666666666,new Cesium.JulianDate),T=l.value._sampledPosition.getValue(C)||m;m.equals(T)&&u?f=u:(f.heading=Cesium.Math.toRadians(cu(m,T)),f.pitch=(((M=(D=c.value)==null?void 0:D.offset)==null?void 0:M.pitch)||Cesium.Math.toRadians(-45))+uu(m,T),f.range=(($=(k=c.value)==null?void 0:k.offset)==null?void 0:$.range)||500);break}case"CUSTOM":f=rs(c.value.offset)}u=f,V.camera.lookAt(m,f)}},b=(g,w)=>{var O;const{viewer:I}=o;if(w=w||{mode:c.value===null?"FP":"FREE"},w.mode==="FREE"){I.camera.lookAtTransform(Cesium.Matrix4.IDENTITY),l.value&&(I.trackedEntity=void 0,l.value=null,c.value=null);return}l.value=y(g),I.trackedEntity=Xn(l.value._entity),w.mode==="TRACKED"?((O=w==null?void 0:w.viewFrom)!=null&&O.length&&(I.trackedEntity.viewFrom=new Cesium.Cartesian3(w.viewFrom[0],w.viewFrom[1],w.viewFrom[2])),c.value=null):c.value=w},y=g=>g instanceof vl?g:typeof g=="string"?qr(r.value,w=>w.id===g):typeof g=="number"?r.value[g]:r.value[0],E=(g,w)=>{const{viewer:O}=o;l.value&&(O.trackedEntity=void 0,l.value=null);let I;if(Cesium.defined(g))if(Array.isArray(g))if(g.length){const R=[];g.forEach(D=>{const M=Xn(y(D)._entity);R.push(M)}),I=R}else I=i.cesiumObject;else I=Xn(y(g)._entity);else I=i.cesiumObject;return w=w||{duration:3},Cesium.defined(w.offset)&&(w.offset=rs(w.offset)),O.flyTo(I,w)},x=(g,w)=>{const{viewer:O}=o;l.value&&(O.trackedEntity=void 0,l.value=null);let I;if(Cesium.defined(g))if(Array.isArray(g))if(g.length){const R=[];g.forEach(D=>{const M=Xn(y(D)._entity);R.push(M)}),I=R}else I=i.cesiumObject;else I=Xn(y(g)._entity);else I=i.cesiumObject;return O.zoomTo(I,Cesium.defined(w)?rs(w):void 0)};return Ke(()=>{d.forEach(g=>g()),d=[]}),Object.assign(i.proxy,{getOverlays:()=>r.value,getOverlay:y,trackOverlay:b,zoomToOverlay:x,flyToOverlay:E}),()=>{var g;return ne(se(((g=i.proxy)==null?void 0:g.$options.name)||""))}}});const WP=X("billboardCollectionProps",{...qo,...Ka,...Ae,...Je,...Pi,...$i,billboards:{type:Array,default:()=>[]}});var fp=ee({name:"VcCollectionBillboard",props:WP,emits:Ii,setup(e,t){const i=ae();i.cesiumClass="BillboardCollection";const n=zn(e,t,i);let o=[];o.push(he(()=>Ge(e.billboards),(a,s)=>{if(!i.mounted)return;const l=i.cesiumObject;if(a.length===s.length){const c=[];for(let u=0;u<a.length;u++){const d=a[u],h=s[u];JSON.stringify(d)!==JSON.stringify(h)&&c.push({newOptions:d,oldOptions:h})}c.forEach(u=>{const d=l._billboards.find(h=>(h==null?void 0:h.id)===u.oldOptions.id);d&&Object.keys(u.newOptions).forEach(h=>{u.oldOptions[h]!==u.newOptions[h]&&(d[h]=n==null?void 0:n.transformProp(h,u.newOptions[h]))})})}else{const c=rt(a,s,"id"),u=rt(s,a,"id"),d=[];for(let h=0;h<u.length;h++){const p=l._billboards.find(v=>v.id===u[h].id);p&&d.push(p)}d.forEach(h=>{l.remove(h)}),r(l,c)}},{deep:!0})),i.alreadyListening.push("billboards");const r=(a,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=a.add(u);Bi(d,u)}};return i.createCesiumObject=async()=>{const a=n==null?void 0:n.transformProps(e),s=new Cesium.BillboardCollection(a);return r(s,e.billboards),s},Ke(()=>{o.forEach(a=>a()),o=[]}),()=>{var a,s;return t.slots.default?S("i",{class:se(((a=i.proxy)==null?void 0:a.$options.name)||""),style:{display:"none !important"}},Xe(t.slots.default)):ne(se(((s=i.proxy)==null?void 0:s.$options.name)||""))}}});const qP=X("billboardProps",{...cs,...sn,...An,...ft,...Lo,...$t,...Xt,...jo,...hn,...Ta,...Yn,...Fo,...In,...ln,...Dn,...Bn,...Ae,...Ia,...Ln,...ko,...ji,...Je});var gp=ee({name:"VcBillboard",props:qP,emits:Ii,setup(e,t){const i=ae();return i.cesiumClass="Billboard",Nn(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const QP=X("cumulusCloudProps",{brightness:{type:Number,default:1},...sn,maximumSize:{type:Object,watcherOptions:{cesiumObjectBuilder:tt}},...In,scale:{type:Object,watcherOptions:{cesiumObjectBuilder:pt}},...Ae,slice:{type:Number,default:-1}});var Br=ee({name:"VcCumulusCloud",props:QP,emits:Ii,setup(e,t){const i=ae();return i.cesiumClass="CumulusCloud",Nn(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const ZP=X("cloudCollectionProps",{...Ae,noiseDetail:{type:Number,default:16},noiseOffset:{type:Object},debugBillboards:{type:Boolean,default:!1},debugEllipsoids:{type:Boolean,default:!1},clouds:{type:Array,default:()=>[]}});var yp=ee({name:"VcCollectionCloud",props:ZP,emits:we,setup(e,t){var i;const n=ae();n.cesiumClass="CloudCollection";const o=zn(e,t,n);if(o===void 0)return;n.alreadyListening.push("clouds");let r=[];r.push(he(()=>Ge(e.clouds),(l,c)=>{if(!n.mounted)return;const u=n.cesiumObject;if(l.length===c.length){const d=[];for(let h=0;h<l.length;h++){const p=l[h],v=c[h];JSON.stringify(p)!==JSON.stringify(v)&&d.push({newOptions:p,oldOptions:v})}d.forEach(h=>{const p=u._clouds.find(v=>v.id===h.oldOptions.id);p&&Object.keys(h.newOptions).forEach(v=>{h.oldOptions[v]!==h.newOptions[v]&&(p[v]=o.transformProp(v,h.newOptions[v]))})})}else{const d=rt(l,c,"id"),h=rt(c,l,"id"),p=[];for(let v=0;v<h.length;v++){const b=u._clouds.find(y=>y.id===h[v].id);b&&p.push(b)}p.forEach(v=>{u.remove(v)}),a(u,d)}},{deep:!0}));const a=(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 h=o.transformProps(d,Br.props),p=l.add(h);Bi(p,h)}};n.createCesiumObject=async()=>{const l=o.transformProps(e,Br.props),c=new Cesium.CloudCollection(l);return a(c,e.clouds),c},Ke(()=>{r.forEach(l=>l()),r=[]});const s=((i=n.proxy)==null?void 0:i.$options.name)||"";return()=>t.slots.default?S("i",{class:se(s),style:{display:"none !important"}},Xe(t.slots.default)):ne(se(s))}});const JP=X("labelCollectionProps",{...Pi,...$i,...qo,...Ka,...Ae,...Je,labels:{type:Array,default:()=>[]}});var bp=ee({name:"VcCollectionLabel",props:JP,emits:Ii,setup(e,t){var i;const n=ae();n.cesiumClass="LabelCollection";const o=zn(e,t,n);if(o===void 0)return;n.alreadyListening.push("labels");let r=[];r.push(he(()=>Ge(e.labels),(l,c)=>{if(!n.mounted)return;const u=n.cesiumObject;if(l.length===c.length){const d=[];for(let h=0;h<l.length;h++){const p=l[h],v=c[h];JSON.stringify(p)!==JSON.stringify(v)&&d.push({newOptions:p,oldOptions:v})}d.forEach(h=>{const p=u._labels.find(v=>v.id===h.oldOptions.id);p&&Object.keys(h.newOptions).forEach(v=>{h.oldOptions[v]!==h.newOptions[v]&&(p[v]=o.transformProp(v,h.newOptions[v]))})})}else{const d=rt(l,c,"id"),h=rt(c,l,"id"),p=[];for(let v=0;v<h.length;v++){const b=u._labels.find(y=>y.id===h[v].id);b&&p.push(b)}p.forEach(v=>{u.remove(v)}),a(u,d)}},{deep:!0}));const a=(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 h=o.transformProps(d),p=l.add(h);Bi(p,h)}};n.createCesiumObject=async()=>{const l=o.transformProps(e),c=new Cesium.LabelCollection(l);return a(c,e.labels),c},Ke(()=>{r.forEach(l=>l()),r=[]});const s=((i=n.proxy)==null?void 0:i.$options.name)||"";return()=>t.slots.default?S("i",{class:se(s),style:{display:"none !important"}},Xe(t.slots.default)):ne(se(s))}});const XP=X("labelProps",{...ps,...vs,...An,...ft,...Lo,...fs,...ds,...Xt,...jo,...hn,...Qt,...Yt,...Yn,...Fo,...In,...Dn,...Bn,...Ae,...ms,...hs,...us,totalScale:{type:Number,default:1},...Ln,...ko,...Je});var Cp=ee({name:"VcLabel",props:XP,emits:Ii,setup(e,t){const i=ae();return i.cesiumClass="Label",Nn(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const YP=X("pointCollectionProps",{...Pi,...$i,...Ka,...Ae,...Je,points:{type:Array,default:()=>[]}});var wp=ee({name:"VcCollectionPoint",props:YP,emits:Ii,setup(e,t){const i=ae();i.cesiumClass="PointPrimitiveCollection";const n=zn(e,t,i);if(n===void 0)return;i.alreadyListening.push("points");let o=[];o.push(he(()=>Ge(e.points),(a,s)=>{if(!i.mounted)return;const l=i.cesiumObject;if(a.length===s.length){const c=[];for(let u=0;u<a.length;u++){const d=a[u],h=s[u];JSON.stringify(d)!==JSON.stringify(h)&&c.push({newOptions:d,oldOptions:h})}c.forEach(u=>{const d=l._pointPrimitives.find(h=>h&&h.id===u.oldOptions.id);d&&Object.keys(u.newOptions).forEach(h=>{u.oldOptions[h]!==u.newOptions[h]&&(d[h]=n.transformProp(h,u.newOptions[h]))})})}else{const c=rt(a,s,"id"),u=rt(s,a,"id"),d=[];for(let h=0;h<u.length;h++){const p=l._pointPrimitives.find(v=>v.id===u[h].id);p&&d.push(p)}d.forEach(h=>{l.remove(h)}),r(l,c)}},{deep:!0}));const r=(a,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=a.add(u);Bi(d,u)}};return i.createCesiumObject=async()=>{const a=n.transformProps(e),s=new Cesium.PointPrimitiveCollection(a);return r(s,e.points),s},Ke(()=>{o.forEach(a=>a()),o=[]}),()=>{var a,s;return t.slots.default?S("i",{class:se(((a=i.proxy)==null?void 0:a.$options.name)||""),style:{display:"none !important"}},Xe(t.slots.default)):ne(se(((s=i.proxy)==null?void 0:s.$options.name)||""))}}});const KP=X("pointProps",{...sn,...An,...ft,...hn,...Qt,...Yt,...Ms,...In,...Bn,...Ae,...Ln,...Je});var _p=ee({name:"VcPoint",props:KP,emits:Ii,setup(e,t){const i=ae();return i.cesiumClass="PointPrimitive",Nn(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const ex={...Pi,...$i,...Ae,...Je,polylines:{type:Array,default:()=>[]}};var Ep=ee({name:"VcCollectionPolyline",props:ex,emits:Ii,setup(e,t){var i;const n=ae();n.cesiumClass="PolylineCollection";const o=zn(e,t,n);if(o===void 0)return;n.alreadyListening.push("polylines");let r=[];r.push(he(()=>Ge(e.polylines),(l,c)=>{if(!n.mounted)return;const u=n.cesiumObject;if(l.length===c.length){const d=[];for(let h=0;h<l.length;h++){const p=l[h],v=c[h];JSON.stringify(p)!==JSON.stringify(v)&&d.push({newOptions:p,oldOptions:v})}d.forEach(h=>{const p=u._polylines.find(v=>v.id===h.oldOptions.id);p&&Object.keys(h.newOptions).forEach(v=>{h.oldOptions[v]!==h.newOptions[v]&&(p[v]=o.transformProp(v,h.newOptions[v]))})})}else{const d=rt(l,c,"id"),h=rt(c,l,"id"),p=[];for(let v=0;v<h.length;v++){const b=u._polylines.find(y=>y.id===h[v].id);b&&p.push(b)}p.forEach(v=>{u.remove(v)}),a(u,d)}},{deep:!0}));const a=(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 h=o.transformProps(d),p=l.add(h);Bi(p,h)}};n.createCesiumObject=async()=>{const l=o.transformProps(e),c=new Cesium.PolylineCollection(l);return a(c,e.polylines),c},Ke(()=>{r.forEach(l=>l()),r=[]});const s=((i=n.proxy)==null?void 0:i.$options.name)||"";return()=>t.slots.default?S("i",{class:se(s),style:{display:"none !important"}},Xe(t.slots.default)):ne(se(s))}});const tx=X("polylineProps",{...ft,...hn,...Ns,...ai,...ri,...Ae,...ji,...Je});var Pp=ee({name:"VcPolyline",props:tx,emits:Ii,setup(e,t){const i=ae();return i.cesiumClass="Polyline",Nn(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const ix=X("primitiveCollectionProps",{...Ae,destroyPrimitives:{type:Boolean,default:!0},...Je,polygons:{type:Array,default:()=>[]}});var xp=ee({name:"VcCollectionPrimitive",props:ix,emits:Ii,setup(e,t){var i;const n=ae();n.cesiumClass="PrimitiveCollection";const o=zn(e,t,n);if(o===void 0)return;n.alreadyListening.push("polygons");let r=[];r.push(he(()=>Ge(e.polygons),(l,c)=>{if(!n.mounted)return;const u=n.cesiumObject;if(l.length===c.length){const d=[];for(let h=0;h<l.length;h++){const p=l[h],v=c[h];JSON.stringify(p)!==JSON.stringify(v)&&d.push({newOptions:p,oldOptions:v})}d.forEach(h=>{const p=u._primitives.find(v=>v._id===h.oldOptions.id);p&&Object.keys(h.newOptions).forEach(v=>{h.oldOptions[v]!==h.newOptions[v]&&(p[v]=o.transformProp(v,h.newOptions[v]))})})}else{const d=rt(l,c,"id"),h=rt(c,l,"id"),p=[];for(let v=0;v<h.length;v++){const b=u._primitives.find(y=>y.id===h[v].id);b&&p.push(b)}p.forEach(v=>{u.remove(v)}),a(u,d)}},{deep:!0}));const a=(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 h=o.transformProps(d),p=new pl(h);p._vcParent=l,Bi(p,h),l.add(p)}};n.createCesiumObject=async()=>{const l=o.transformProps(e),c=new Cesium.PrimitiveCollection(l);return a(c,e.polygons),c},Ke(()=>{r.forEach(l=>l()),r=[]});const s=((i=n.proxy)==null?void 0:i.$options.name)||"";return()=>t.slots.default?S("i",{class:se(s),style:{display:"none !important"}},Xe(t.slots.default)):ne(se(s))}});const nx=X("polygonProps",{...ri,...Vn,...no,...$s,...Ae,...hn,...cn,...Ri,...$o,...Ne,...kn,...Rn,...Je});var Op=ee({name:"VcPolygon",props:nx,emits:Ii,setup(e,t){const i=ae();i.cesiumClass="PolygonPrimitive";const n=Nn(e,t,i);if(n===void 0)return;let o=[];return o.push(he(()=>e.clampToGround,r=>{const a=i.cesiumObject;a&&(a.clampToGround=r)})),o.push(he(()=>e.positions,r=>{const a=i.cesiumObject;a&&(a.positions=_i(r))})),o.push(he(()=>e.polygonHierarchy,r=>{const a=i.cesiumObject;a&&(a.polygonHierarchy=ts(r))})),o.push(he(()=>e.appearance,r=>{const a=i.cesiumObject;a&&(a.appearance=Sa.call(i,r))})),o.push(he(()=>e.depthFailAppearance,r=>{const a=i.cesiumObject;a&&(a.depthFailAppearance=Sa.call(i,r))})),o.push(he(()=>e.show,r=>{const a=i.cesiumObject;a&&(a.show=r)})),o.push(he(()=>e.classificationType,r=>{const a=i.cesiumObject;a&&(a.classificationType=r)})),i.createCesiumObject=async()=>{const r=n.transformProps(e);return new pl(r)},i.mount=async()=>{const r=n.$services.primitives,a=i.cesiumObject;return a._vcParent=r,r&&r.add(a)},i.unmount=async()=>{const r=n.$services.primitives,a=i.cesiumObject;return r&&!r.isDestroyed()&&r.remove(a)},Ke(()=>{o.forEach(r=>r()),o=[]}),()=>{var r;return ne(se(((r=i.proxy)==null?void 0:r.$options.name)||""))}}});[fp,yp,bp,wp,Ep,xp,Br,gp,Cp,_p,Pp,Op].forEach(e=>{e.install=t=>{t.component(e.name,e)}});const Pc=fp,Mp=yp,_o=bp,Eo=wp,Sp=Ep,qn=xp,Tp=gp,Ip=Br,Ap=Cp,Dp=_p,Bp=Pp,Qn=Op;X({VcCollectionBillboard:Pc,VcCollectionCloud:Mp,VcCollectionLabel:_o,VcCollectionPoint:Eo,VcCollectionPolyline:Sp,VcCollectionPrimitive:qn,VcBillboard:Tp,VcCumulusCloud:Ip,VcLabel:Ap,VcPoint:Dp,VcPolyline:Bp,VcPolygon:Qn});const ox=X("geometryInstanceProps",{geometry:Object,...Pi,...hn,attributes:Object}),ax={...we,"update:geometry":e=>!0};var Lr=ee({name:"VcGeometryInstance",props:ox,emits:ax,setup(e,t){const i=ae();i.renderByParent=!0,i.cesiumClass="GeometryInstance",i.cesiumEvents=[];const n=ze(e,t,i);if(n===void 0)return;const{emit:o}=t,r=te(0);i.createCesiumObject=async()=>{const s=n.transformProps(e);return s.geometry||(s.geometry=new Cesium.Geometry({attributes:new Cesium.GeometryAttributes})),new Cesium.GeometryInstance(s)},i.mount=async()=>{var s;const l=St(i).proxy;l.__childCount!==void 0&&(r.value=l.__childCount.value||0,l.__childCount.value+=1);const c=i.cesiumObject;return(s=l.__updateGeometryInstances)==null||s.call(l,c,r.value),!0},i.unmount=async()=>{var s;const l=i.cesiumObject,c=St(i).proxy;return(s=c.__removeGeometryInstances)==null||s.call(c,l),!0};const a=s=>{if(Se(i,"update:geometry"))o("update:geometry",s);else{const l=i.cesiumObject;l.geometry=s}return!0};return Gi(an,(()=>Mn(n.getServices(),{get geometryInstance(){return i.cesiumObject}}))()),Object.assign(i.proxy,{__updateGeometry:a}),()=>{var s,l;return t.slots.default?S("i",{class:se(((s=i.proxy)==null?void 0:s.$options.name)||""),style:{display:"none !important"}},Xe(t.slots.default)):ne(se(((l=i.proxy)==null?void 0:l.$options.name)||"v-if"))}}});Lr.install=e=>{e.component(Lr.name,Lr)};const Lp=Lr,Zn=X("VcGeometryInstance",Lp),rx=X("boxGeometryProps",{...Aa,...zt});var jp=ee({name:"VcGeometryBox",props:rx,emits:we,setup(e,t){const i=ae();i.cesiumClass="BoxGeometry";const n=We(e,t,i);return i.createCesiumObject=async()=>{const o=n==null?void 0:n.transformProps(e);return Cesium.BoxGeometry.fromDimensions(o)},()=>{var o;return ne(se(((o=i.proxy)==null?void 0:o.$options.name)||""))}}});const sx=X("boxOutlineGeometryProps",{...Aa});var Fp=ee({name:"VcGeometryBoxOutline",props:sx,emits:we,setup(e,t){const i=ae();i.cesiumClass="BoxOutlineGeometry";const n=We(e,t,i);return i.createCesiumObject=async()=>{const o=n==null?void 0:n.transformProps(e);return Cesium.BoxOutlineGeometry.fromDimensions(o)},()=>{var o;return ne(se(((o=i.proxy)==null?void 0:o.$options.name)||"v-if"))}}});const lx=X("circleGeometryProps",{...Qo,...Zo,...Ne,...$t,...ct,...zt,...Kt,...Hi});var kp=ee({name:"VcGeometryCircle",props:lx,emits:we,setup(e,t){const i=ae();return i.cesiumClass="CircleGeometry",We(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const cx=X("circleOutlineGeometryProps",{...Qo,...Zo,...Ne,...$t,...ct,...Kt,...eo});var Rp=ee({name:"VcGeometryCircleOutline",props:cx,emits:we,setup(e,t){const i=ae();return i.cesiumClass="CircleOutlineGeometry",We(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const ux=X("polygonCoplanarProps",{...Vn,...Ne,...zt,...Hi});var Vp=ee({name:"VcGeometryPolygonCoplanar",props:ux,emits:we,setup(e,t){const i=ae();return i.cesiumClass="CoplanarPolygonGeometry",We(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const dx=X("polygonCoplanarOutlineProps",{...Vn});var $p=ee({name:"VcGeometryPolygonCoplanarOutline",props:dx,emits:we,setup(e,t){const i=ae();return i.cesiumClass="CoplanarPolygonOutlineGeometry",We(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const hx=X("corridorGeometryProps",{...ri,...ji,...Ne,...ct,...$t,...Kt,...zt,...jn});var Np=ee({name:"VcGeometryCorridor",props:hx,emits:we,setup(e,t){const i=ae();return i.cesiumClass="CorridorGeometry",We(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const mx=X("corridorOutlineGeometryProps",{...ri,...ji,...Ne,...ct,...$t,...Kt,...jn});var zp=ee({name:"VcGeometryCorridorOutline",props:mx,emits:we,setup(e,t){const i=ae();return i.cesiumClass="CorridorOutlineGeometry",We(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const px=X("cylinderGeometryProps",{...Da,...Ba,...La,...ja,...zt});var Gp=ee({name:"VcGeometryCylinder",props:px,emits:we,setup(e,t){const i=ae();return i.cesiumClass="CylinderGeometry",We(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const vx=X("cylinderOutlineGeometryProps",{...Da,...Ba,...La,...ja,...eo});var Up=ee({name:"VcGeometryCylinderOutline",props:vx,emits:we,setup(e,t){const i=ae();return i.cesiumClass="CylinderOutlineGeometry",We(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const fx=X("ellipseGeometryProps",{...Qo,...Fa,...ka,...Ne,...$t,...Kt,...ln,...Hi,...ct,...zt});var Hp=ee({name:"VcGeometryEllipse",props:fx,emits:we,setup(e,t){const i=ae();return i.cesiumClass="EllipseGeometry",We(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const gx=X("ellipseOutlineGeometryProps",{...Qo,...Fa,...ka,...Ne,...$t,...Kt,...ln,...Hi,...ct,...eo});var Wp=ee({name:"VcGeometryEllipseOutline",props:gx,emits:we,setup(e,t){const i=ae();return i.cesiumClass="EllipseOutlineGeometry",We(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const yx=X("ellipsoidGeometryProps",{...Ra,...Va,...$a,...Na,...za,...Ga,...to,...io,...zt});var qp=ee({name:"VcGeometryEllipsoid",props:yx,emits:we,setup(e,t){const i=ae();return i.cesiumClass="EllipsoidGeometry",We(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const bx={...Ra,...Va,...$a,...Na,...za,...Ga,...to,...io,...Ua};var Qp=ee({name:"VcGeometryEllipsoidOutline",props:bx,emits:we,setup(e,t){const i=ae();return i.cesiumClass="EllipsoidOutlineGeometry",We(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Cx=X("frustumGeometryProps",{...Gs,...Us,...ls,...zt});var Zp=ee({name:"VcGeometryFrustum",props:Cx,emits:we,setup(e,t){const i=ae();return i.cesiumClass="FrustumGeometry",We(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const wx=X("frustumOutlineGeometryProps",{...Gs,...Us,...ls});var Jp=ee({name:"VcGeometryFrustumOutline",props:wx,emits:we,setup(e,t){const i=ae();return i.cesiumClass="FrustumOutlineGeometry",We(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const _x=X("groundPolylineGeometryProps",{...ri,...ji,...ct,...Ns,...cn});var Xp=ee({name:"VcGeometryGroundPolyline",props:_x,emits:we,setup(e,t){const i=ae();return i.cesiumClass="GroundPolylineGeometry",We(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Ex=X("planeGeometryProps",{...zt});var Yp=ee({name:"VcGeometryPlane",props:Ex,emits:we,setup(e,t){const i=ae();return i.cesiumClass="PlaneGeometry",We(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}}),Kp=ee({name:"VcGeometryPlaneOutline",emits:we,setup(e,t){const i=ae();return i.cesiumClass="PlaneOutlineGeometry",We(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Px=X("polygonGeometryProps",{...Vn,...$t,...Kt,...zt,...Hi,...Ne,...ct,...Wa,...Ss,...Ts,...cn});var ev=ee({name:"VcGeometryPolygon",props:Px,emits:we,setup(e,t){const i=ae();return i.cesiumClass="PolygonGeometry",We(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const xx=X("polygonOutlineGeometryProps",{...Vn,...$t,...Kt,...zt,...Ne,...ct,...Wa,...cn});var tv=ee({name:"VcGeometryPolygonOutline",props:xx,emits:we,setup(e,t){const i=ae();return i.cesiumClass="PolygonOutlineGeometry",We(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Ox=X("polylineGeometryProps",{...ri,...ji,...Xs,colorsPerVertex:{type:Boolean,default:!1},...cn,...ct,...zt,...Ne});var iv=ee({name:"VcGeometryPolyline",props:Ox,emits:we,setup(e,t){const i=ae();return i.cesiumClass="PolylineGeometry",We(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Mx=X("polylineVolumeGeometryProps",{...Ws,...Hs,...Ne,...ct,...zt,...jn});var nv=ee({name:"VcGeometryPolylineVolume",props:Mx,emits:we,setup(e,t){const i=ae();return i.cesiumClass="PolylineVolumeGeometry",We(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Sx=X("polylineVolumeOutlineGeometryProps",{...Ws,...Hs,...Ne,...ct,...jn});var ov=ee({name:"VcGeometryPolylineVolumeOutline",props:Sx,emits:we,setup(e,t){const i=ae();return i.cesiumClass="PolylineVolumeOutlineGeometry",We(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Tx=X("rectangleGeometryProps",{...Lt,...zt,...Ne,...ct,...$t,...ln,...Hi,...Kt});var av=ee({name:"VcGeometryRectangle",props:Tx,emits:we,setup(e,t){const i=ae();return i.cesiumClass="RectangleGeometry",We(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Ix=X("rectangleOutlineGeometryProps",{...Lt,...Ne,...ct,...$t,...ln,...Kt});var rv=ee({name:"VcGeometryRectangleOutline",props:Ix,emits:we,setup(e,t){const i=ae();return i.cesiumClass="RectangleOutlineGeometry",We(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Ax=X("simplePolylineGeometryProps",{...ri,...Xs,colorsPerVertex:{type:Boolean,default:!1},...cn,...ct,...Ne});var sv=ee({name:"VcGeometrySimplePolyline",props:Ax,emits:we,setup(e,t){const i=ae();return i.cesiumClass="SimplePolylineGeometry",We(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Dx=X("sphereGeometryProps",{...Zo,...to,...io,...zt});var lv=ee({name:"VcGeometrySphere",props:Dx,emits:we,setup(e,t){const i=ae();return i.cesiumClass="SphereGeometry",We(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Bx=X("sphereGeometryOutlineProps",{...Zo,...to,...io,...Ua});var cv=ee({name:"VcGeometrySphereOutline",props:Bx,emits:we,setup(e,t){const i=ae();return i.cesiumClass="SphereOutlineGeometry",We(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Lx=X("wallGeometryProps",{...ri,...ct,...Qa,...qa,...Ne,...zt});var uv=ee({name:"VcGeometryWall",props:Lx,emits:we,setup(e,t){const i=ae();return i.cesiumClass="WallGeometry",We(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const jx=X("wallOutlineProps",{...ri,...ct,...Qa,...qa,...Ne});var dv=ee({name:"VcGeometryWallOutline",props:jx,emits:we,setup(e,t){const i=ae();return i.cesiumClass="WallOutlineGeometry",We(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});[jp,Fp,kp,Rp,Vp,$p,Np,zp,Gp,Up,Hp,Wp,qp,Qp,Zp,Jp,Xp,Yp,Kp,ev,tv,iv,nv,ov,av,rv,sv,lv,cv,uv,dv].forEach(e=>{e.install=t=>{t.component(e.name,e)}});const hv=jp,mv=Fp,pv=kp,vv=Rp,fv=Vp,gv=$p,yv=Np,bv=zp,Cv=Gp,wv=Up,_v=Hp,Ev=Wp,Pv=qp,xv=Qp,Ov=Zp,Mv=Jp,jr=Xp,Sv=Yp,Tv=Kp,xc=ev,Iv=tv,En=iv,Av=nv,Dv=ov,Bv=av,Lv=rv,jv=sv,Fv=lv,kv=cv,Rv=uv,Vv=dv;X({VcGeometryBox:hv,VcGeometryBoxOutline:mv,VcGeometryCircle:pv,VcGeometryCircleOutline:vv,VcGeometryPolygonCoplanar:fv,VcGeometryPolygonCoplanarOutline:gv,VcGeometryCorridor:yv,VcGeometryCorridorOutline:bv,VcGeometryCylinder:Cv,VcGeometryCylinderOutline:wv,VcGeometryEllipse:_v,VcGeometryEllipseOutline:Ev,VcGeometryEllipsoid:Pv,VcGeometryEllipsoidOutline:xv,VcGeometryFrustum:Ov,VcGeometryFrustumOutline:Mv,VcGeometryGroundPolyline:jr,VcGeometryPlane:Sv,VcGeometryPlaneOutline:Tv,VcGeometryPolygon:xc,VcGeometryPolygonOutline:Iv,VcGeometryPolyline:En,VcGeometryPolylineVolume:Av,VcGeometryPolylineVolumeOutline:Dv,VcGeometryRectangle:Bv,VcGeometryRectangleOutline:Lv,VcGeometrySimplePolyline:jv,VcGeometrySphere:Fv,VcGeometrySphereOutline:kv,VcGeometryWall:Rv,VcGeometryWallOutline:Vv});var di=63710088e-1,Fx={centimeters:di*100,centimetres:di*100,degrees:di/111325,feet:di*3.28084,inches:di*39.37,kilometers:di/1e3,kilometres:di/1e3,meters:di,metres:di,miles:di/1609.344,millimeters:di*1e3,millimetres:di*1e3,nauticalmiles:di/1852,radians:1,yards:di*1.0936};function $v(e,t,i){i===void 0&&(i={});var n={type:"Feature"};return(i.id===0||i.id)&&(n.id=i.id),i.bbox&&(n.bbox=i.bbox),n.properties=t||{},n.geometry=e,n}function kx(e,t,i){if(i===void 0&&(i={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!zv(e[0])||!zv(e[1]))throw new Error("coordinates must contain numbers");var n={type:"Point",coordinates:e};return $v(n,t,i)}function Rx(e,t,i){i===void 0&&(i={});for(var n=0,o=e;n<o.length;n++){var r=o[n];if(r.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<r[r.length-1].length;a++)if(r[r.length-1][a]!==r[0][a])throw new Error("First and last Position are not equivalent.")}var s={type:"Polygon",coordinates:e};return $v(s,t,i)}function Vx(e,t){t===void 0&&(t="kilometers");var i=Fx[t];if(!i)throw new Error(t+" units is invalid");return e/i}function Nv(e){var t=e%(2*Math.PI);return t*180/Math.PI}function Oc(e){var t=e%360;return t*Math.PI/180}function zv(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}function $x(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if(e.type==="Feature"&&e.geometry!==null&&e.geometry.type==="Point")return e.geometry.coordinates;if(e.type==="Point")return e.coordinates}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function Nx(e,t,i,n){n===void 0&&(n={});var o=$x(e),r=Oc(o[0]),a=Oc(o[1]),s=Oc(i),l=Vx(t,n.units),c=Math.asin(Math.sin(a)*Math.cos(l)+Math.cos(a)*Math.sin(l)*Math.cos(s)),u=r+Math.atan2(Math.sin(s)*Math.sin(l)*Math.cos(a),Math.cos(l)-Math.sin(a)*Math.sin(c)),d=Nv(u),h=Nv(c);return kx([d,h],n.properties)}function zx(e,t,i){i===void 0&&(i={});for(var n=i.steps||64,o=i.properties?i.properties:!Array.isArray(e)&&e.type==="Feature"&&e.properties?e.properties:{},r=[],a=0;a<n;a++)r.push(Nx(e,t,a*-360/n,i).geometry.coordinates);return r.push(r[0]),Rx([r],o)}const Gv={color:"#409eff",pixelSize:8,outlineColor:"rgba(0,0,0,0.6)",outlineWidth:1,disableDepthTestDistance:Number.POSITIVE_INFINITY},Uv={enableMouseEvent:!1,asynchronous:!1,allowPicking:!0},Hv={width:2,show:!0},Wv={pixelOffset:[20,0],showBackground:!0,backgroundColor:"rgba(0,0,0,1)",enableMouseEvent:!1},Gx=X("typhoonOverlayProps",{typhoonRoutes:{type:Array},clampToGround:{type:Boolean,default:!1},radius7Color:{type:String,default:"rgba(68, 255, 230, 0.3)"},radius10Color:{type:String,default:"rgba(32, 237, 39, 0.3)"},radius12Color:{type:String,default:"rgba(255, 247, 16, 0.3)"},pointProps:{type:[Object,Function],default:()=>Gv},linePrimitiveProps:{type:[Object,Function],default:()=>Uv},lineGeometryProps:{type:[Object,Function],default:()=>Hv},labelProps:{type:[Object,Function],default:()=>Wv},circleOverlayPosition:{type:[String,Function],default:"-175px"},setsArray:{type:Array,default:()=>["\u4E2D\u592E\u53F0","\u65E5\u672C","\u7F8E\u56FD","\u97E9\u56FD","\u4E2D\u56FD\u9999\u6E2F"]}}),Ux={...we,mouseover:e=>!0,mouseout:e=>!0,click:e=>!0,clickout:e=>!0,forecastRouteAdded:e=>!0};var qv=ee({name:"VcOverlayTyphoon",props:Gx,emits:Ux,setup(e,t){const i=ae();i.cesiumClass="VcOverlayTyphoon",i.cesiumEvents=[];const n=ze(e,t,i);if(n===void 0)return;const{$services:o}=n,r=Do(i),{t:a}=_t(),s=te(null),l=xe([]);i.createCesiumObject=async()=>s;const c=(g,w)=>{w.playIndex=g;const O=w.typhoonRoute.points[g];O.type="live",O.index=g,O.tfbh=w.name;const I=[O.lng,O.lat];w.positions.push(I);const R=typeof e.pointProps=="function"?lt(Ge(Gv),e.pointProps(O)):e.pointProps;w.points.push({id:O.id||Cesium.createGuid(),position:I,onMouseover(M){t.emit("mouseover",M)},onMouseout(M){t.emit("mouseout",M)},onClick(M){d(O,w,g,!0),w.playIndex=O.index,t.emit("click",M)},onClickout(M){t.emit("clickout",M)},...R,...O});const D=w.points[g];D&&w.colors.push(D.color),g===w.typhoonRoute.points.length-1&&d(O,w,g)},u=g=>{const w=l.findIndex(O=>O.name===g);if(w>=0){let O=0;const I=l[w];I.points.length=0,I.positions.length=0;const R=I.typhoonRoute;c(O,I),cancelAnimationFrame(I.playInterval);const D=()=>{O++,O>=R.points.length?cancelAnimationFrame(I.playInterval):c(O,I),I.playInterval=requestAnimationFrame(D)};I.playInterval=requestAnimationFrame(D)}else r.warn(a("vc.typhoon.warn")||"\u64AD\u653E\u53F0\u98CE\u5931\u8D25\uFF0C\u539F\u56E0\uFF1A\u672A\u627E\u5230\u5BF9\u5E94\u7F16\u53F7\u7684\u53F0\u98CE\u6570\u636E\u3002")},d=(g,w,O,I=!1)=>{w.children.length=0;let R=I?g.forecast||[]:[];if(!I)for(let D=0;D<e.setsArray.length;D++){const M=(k,$)=>{const V=(k==null?void 0:k.forecast)||[];if(R.push(...V),I)return;R=Gc(R,(C,T)=>C.sets===T.sets);const m=e.setsArray[D],f=R.findIndex(C=>C.sets===m);if(f>-1)R[f].unshifted||(R[f].points.unshift({lat:k.lat,lng:k.lng}),R[f].unshifted=!0);else if($>0){const C=w.typhoonRoute.points[$-1];M(C,$-1)}};M(g,O)}if(!(!R||R.length<=0)){for(let D=0;D<R.length;D++){const M=R[D],k=[],$=[],V={name:w.name+"_"+M.sets,typhoonRoute:M,show:!0,positions:$,points:k,type:"forc"};w.children.push(V),M.points.forEach((m,f)=>{const C=[m.lng,m.lat];V.positions.push(C),f===0&&I&&V.positions.unshift([g.lng,g.lat]),m.sets=M.sets,m.type="forc",m.index=f;const T=typeof e.pointProps=="function"?e.pointProps(m):e.pointProps;f!==0&&V.points.push({id:m.id||Cesium.createGuid(),position:C,onMouseover(_){t.emit("mouseover",_)},onMouseout(_){t.emit("mouseout",_)},onClick(_){t.emit("click",_)},...T,...m})})}t.emit("forecastRouteAdded",{livePoint:g,datasource:w,addedByClick:I})}},h=g=>{const w=[],O=[],I={name:g.tfbh,typhoonRoute:g,show:!0,positions:O,points:w,children:[],colors:[],type:"live"};return l.push(I),u(g.tfbh),I},p=(g,w)=>{const O=[];typeof g=="string"?O.push(g):O.push(...g);let I=null;O.forEach(R=>{var D;const M=[],k=l.find(m=>m.name===R);k&&k.typhoonRoute.points&&k.typhoonRoute.points.forEach(m=>{M.push([m.lng,m.lat])}),(D=k==null?void 0:k.children)!=null&&D.length&&k.children.forEach(m=>{m.typhoonRoute.points.forEach(f=>{M.push([f.lng,f.lat])})});const $=_i(M),V=Cesium.BoundingSphere.fromPoints($);I===null?I=V:I=Cesium.BoundingSphere.union(I,V)}),o.viewer.camera.flyToBoundingSphere(new Cesium.BoundingSphere(I.center,I.radius),{...w})},v=g=>{const w=l.indexOf(g);w>=0&&(clearInterval(g.playInterval),l.splice(w,1))},b=()=>{l.forEach(g=>{clearInterval(g.playInterval)}),l.length=0},y=(g,w)=>{let O=[];if(typeof w=="number")O=zx(g,w*1e3,{units:"meters"}).geometry.coordinates;else if(w.ne){const I={0:"ne",1:"nw",2:"sw",3:"se"};for(let R=0;R<4;R++){let D=parseFloat(w[I[R]])*1e3;D||(D=0);for(let M=R*15;M<=(R+1)*15;M++){const k=6*M,$=g[0]+D*Math.cos(k*Math.PI/180)/111e3,V=g[1]+D*Math.sin(k*Math.PI/180)/111e3;O.push([$,V])}}}return O},E=(g,w)=>{const O=[];return g.forEach(I=>{if(I.positions.length>1){const R=typeof e.linePrimitiveProps=="function"?lt(Ge(Uv),e.linePrimitiveProps(I)):e.linePrimitiveProps,D=typeof e.lineGeometryProps=="function"?lt(Ge(Hv),e.lineGeometryProps(I)):e.lineGeometryProps;O.push(S(_n,{show:I.show,appearance:{type:I.type==="live"?"PolylineColorAppearance":"PolylineMaterialAppearance",options:{material:I.type==="live"?void 0:{fabric:{type:"PolylineDash",uniforms:{color:"#000000"}}},translucent:!0}},onMouseover:M=>{t.emit("mouseover",M)},onMouseout:M=>{t.emit("mouseout",M)},onClick:M=>{t.emit("click",M)},onClickout:M=>{t.emit("clickout",M)},...R},()=>S(Zn,{id:I.name||Cesium.createGuid()},()=>S(En,{positions:_i(I.positions),colors:I.colors,...D}))))}if(I.points.length&&O.push(S(Eo,{show:I.show,points:I.points,onReady:R=>{const{cesiumObject:D}=R,M=D.update;D.update=function(k){const $=k.commandList.length;M.call(this,k);const V=k.commandList.length;for(let m=$;m<V;++m)k.commandList[m].pass=Cesium.Pass.TRANSLUCENT,k.commandList[m].renderState=Cesium.RenderState.fromCache({depthTest:{enabled:!1},depthMask:!1})}}})),I.type==="live"){const R=typeof e.labelProps=="function"?lt(Ge(Wv),e.labelProps(I)):e.labelProps;O.push(S(_o,{show:I.show,enableMouseEvent:!1,labels:[{text:I.typhoonRoute.name,position:I.positions[0],...R}]}));const D=I.points[I.playIndex];w.length=w.push(S(fc,{show:I.show,position:D.position,autoHidden:!0},()=>S("div",{class:"vc-typhoon-circle",style:{backgroundPosition:typeof e.circleOverlayPosition=="function"?e.circleOverlayPosition(D):e.circleOverlayPosition}}))),(D==null?void 0:D.radius7)>0&&O.push(S(Qn,{show:I.show,positions:y(D.position,D.radius7_quad),clampToGround:e.clampToGround,asynchronous:!1,allowPicking:!1,enableMouseEvent:!1,classificationType:2,appearance:{type:"MaterialAppearance",options:{material:{fabric:{type:"Color",uniforms:{color:e.radius7Color}}}}},onReady:x})),(D==null?void 0:D.radius10)>0&&O.push(S(Qn,{show:I.show,positions:y(D.position,D.radius10_quad),clampToGround:e.clampToGround,asynchronous:!1,allowPicking:!1,enableMouseEvent:!1,classificationType:2,appearance:{type:"MaterialAppearance",options:{material:{fabric:{type:"Color",uniforms:{color:e.radius10Color}}}}},onReady:x})),(D==null?void 0:D.radius12)>0&&O.push(S(Qn,{show:I.show,positions:y(D.position,D.radius12_quad),clampToGround:e.clampToGround,asynchronous:!1,allowPicking:!1,enableMouseEvent:!1,classificationType:2,appearance:{type:"MaterialAppearance",options:{material:{fabric:{type:"Color",uniforms:{color:e.radius12Color}}}}},onReady:x}))}I.children&&O.push(...E(I.children,w))}),O},x=g=>{const w=g.cesiumObject,O=w.update;w.update=function(I){const R=I.commandList.length;O.call(this,I);const D=I.commandList.length;for(let M=R;M<D;++M)I.commandList[M].pass===Cesium.Pass.TRANSLUCENT&&(I.commandList[M].pass=Cesium.Pass.OPAQUE,I.commandList[M].renderState=Cesium.RenderState.fromCache({depthTest:{enabled:!1},depthMask:!1,blending:Cesium.BlendingState.ALPHA_BLEND}))}};return Object.assign(i.proxy,{addTyphoonRoute:h,playTyphoonRoute:u,flyToTyphoonRoute:p,showForecast:d,removeTyphoonData:v,removeAllTyphoonData:b,getTyphoonDatasources:()=>l}),e.typhoonRoutes.forEach(g=>{h(g)}),()=>{const g=[],w=E(l,g);return[S(qn,{ref:s,show:!0},()=>w),...g]}}});[fc,lp,cp,pp,vp,qv].forEach(e=>{e.install=t=>{t.component(e.name,e)}});const Pn=fc,Qv=lp,Zv=cp,Jv=pp,Xv=vp,Yv=qv;X({VcOverlayHtml:Pn,VcOverlayHeatmap:Qv,VcOverlayEcharts:Zv,VcOverlayWind:Jv,VcOverlayDynamic:Xv,VcOverlayTyphoon:Yv});function Mc(e,t,i,n,o){i.cesiumClass=n,i.cesiumEvents=[];const{t:r}=_t(),{emit:a}=t,s=se(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=te(""),u=re(()=>({drawingTipStart:e.drawtip.drawingTipStart||r(`${s[0]}.${s[1]}.${s[2]}.drawingTipStart`),drawingTipEnd:e.drawtip.drawingTipEnd||r(`${s[0]}.${s[1]}.${s[2]}.drawingTipEnd`),drawingTipEditing:e.drawtip.drawingTipEditing||r(`${s[0]}.${s[1]}.${s[2]}.drawingTipEditing`)})),d=te(Me.BeforeDraw),h=te(!1),p=te([0,0,0]),v=te(!1),b=te([0,0,0]),y=te(null),E=te(null),x=te(null),g=te(""),{registerTimeout:w,removeTimeout:O}=tl();return i.createCesiumObject=async()=>x,{drawingType:l,drawTip:c,drawTipOpts:u,drawStatus:d,canShowDrawTip:h,drawTipPosition:p,showEditor:v,editorPosition:b,mouseoverPoint:y,editingPoint:E,primitiveCollectionRef:x,editorType:g,onMouseoverPoints:I=>{var R,D;const{drawingHandlerActive:M,viewer:k}=o;e.editable&&d.value!==Me.Drawing&&M&&(I.pickedFeature.primitive.pixelSize=((R=e.pointOpts)==null?void 0:R.pixelSize)*1.5,O(),w(()=>{y.value=I.pickedFeature.primitive,b.value=I.pickedFeature.primitive.position,v.value=!0,h.value=!1,p.value=[0,0,0]},(D=e.editorOpts)==null?void 0:D.delay)),a("mouseEvt",{type:I.type,name:l,target:I},k)},onMouseoutPoints:I=>{var R,D;const{viewer:M,selectedDrawingActionInstance:k}=o;e.editable&&(I.pickedFeature.primitive.pixelSize=((R=e.pointOpts)==null?void 0:R.pixelSize)*1,O(),w(()=>{b.value=[0,0,0],y.value=void 0,v.value=!1},(D=e.editorOpts)==null?void 0:D.hideDelay),k&&(h.value=!0)),a("mouseEvt",{type:I.type,name:l,target:I},M)},onMouseenterEditor:I=>{O()},onMouseleaveEditor:I=>{var R;O(),w(()=>{var D;b.value=[0,0,0],y.value.pixelSize=((D=e.pointOpts)==null?void 0:D.pixelSize)*1,y.value=void 0,v.value=!1},(R=e.editorOpts)==null?void 0:R.hideDelay)},onPrimitiveCollectionReady:I=>{I.cesiumObject._vcId=n},onVcCollectionPointReady:function(I){const{cesiumObject:R}=I,D=R.update;R.update=function(M){const k=M.commandList.length;D.call(this,M);const $=M.commandList.length;for(let V=k;V<$;++V)M.commandList[V].pass=Cesium.Pass.TRANSLUCENT,M.commandList[V].renderState=Cesium.RenderState.fromCache({depthTest:{enabled:!1},depthMask:!1})}},onVcPrimitiveReady:I=>{if(e.disableDepthTest)return;const R=I.cesiumObject,D=R.update;R.update=function(M){const k=M.commandList.length;D.call(this,M);const $=M.commandList.length;for(let V=k;V<$;++V)M.commandList[V].pass===Cesium.Pass.TRANSLUCENT&&(M.commandList[V].pass=Cesium.Pass.OPAQUE,M.commandList[V].renderState=Cesium.RenderState.fromCache({depthTest:{enabled:!1},depthMask:!1,blending:Cesium.BlendingState.ALPHA_BLEND}))}},onVcCollectionLabelReady:I=>{if(e.disableDepthTest)return;const R=I.cesiumObject,D=R.update;R.update=function(M){const k=M.commandList.length;D.call(this,M);const $=M.commandList.length;for(let V=k;V<$;++V)M.commandList[V].pass=Cesium.Pass.OVERLAY,M.commandList[V].renderState=Cesium.RenderState.fromCache({depthTest:{enabled:!1},depthMask:!1,blending:Cesium.BlendingState.ALPHA_BLEND})}}}}function dn(e,t,i){const n=ae(),o=ze(e,t,n);if(o===void 0)return;const{t:r}=_t(),a=o.$services,{emit:s}=t,{drawingType:l,drawTip:c,drawTipOpts:u,drawStatus:d,canShowDrawTip:h,drawTipPosition:p,showEditor:v,editorPosition:b,mouseoverPoint:y,editingPoint:E,primitiveCollectionRef:x,editorType:g,onMouseoverPoints:w,onMouseoutPoints:O,onMouseenterEditor:I,onMouseleaveEditor:R,onPrimitiveCollectionReady:D,onVcCollectionPointReady:M,onVcCollectionLabelReady:k,onVcPrimitiveReady:$}=Mc(e,t,n,i,a),V=te([]);e.preRenderDatas&&e.preRenderDatas.length&&e.preRenderDatas.forEach(N=>{const j={positions:_i(N),show:!0,drawStatus:Me.AfterDraw,distance:0,labels:[],pointOpts:{},labelOpts:{},labelsOpts:{},polylineOpts:{},primitiveOpts:{},polygonOpts:{}};i==="VcMeasurementVertical"&&Object.assign(j,{draggingPlane:new Cesium.Plane(Cesium.Cartesian3.UNIT_X,0),surfaceNormal:new Cesium.Cartesian3}),V.value.push(j)});let m;const f=re(()=>{const N=[],{Cartesian3:j,Cartographic:G,Rectangle:J,createGuid:U,defined:z,Math:K,Ray:Q}=Cesium,{viewer:ie}=a;return V.value.forEach(Y=>{var oe,le,fe,Ce,me,be,_e,ye,ge,Te,W,ce,Ee,de,nt,qt,Re,ue,De;const Fe=Y.positions[0],Le=Y.positions[1];if(j.equals(Fe,Le))return;const $e=xe([]),mt=((oe=e.polylineOpts)==null?void 0:oe.arcType)===0?j.distance(Fe,Le):as(Fe,Le,a.viewer.scene.globe.ellipsoid),ot=j.midpoint(Fe,Le,{}),at=cu(Fe,Le),K5=uu(Fe,Le);Y.points=Y.positions.map(Ct=>({position:Ct}));const Ye={...Y,distance:mt,heading:at,pitch:K5},cg=Object.assign({},e.labelOpts,Ye.labelOpts);if(i==="VcDrawingRectangle"||i==="VcMeasurementRectangle"){const Ct=G.fromCartesian(Fe,ie.scene.globe.ellipsoid),He=G.fromCartesian(Le,ie.scene.globe.ellipsoid),Jt=Ct.height;!e.clampToGround&&(He.height=Jt);const qe=J.fromCartesianArray(Y.positions,ie.scene.globe.ellipsoid),Bt=[qe.west,qe.north,Jt,qe.east,qe.north,Jt,qe.east,qe.south,Jt,qe.west,qe.south,Jt,qe.west,qe.north,Jt],On=j.fromRadiansArrayHeights(Bt,ie.scene.globe.ellipsoid);Object.assign(Ye,{polygonPositions:On,height:Jt})}else if(i==="VcDrawingRegular"||i==="VcMeasurementRegular"){const Ct=Y.positions[0],He=Y.positions[1],Jt=Hg(Ct,He,ie.scene);if(!ni(Jt)&&z(Jt)){const qe=[],Bt=G.fromCartesian(Ct,ie.scene.globe.ellipsoid),On=G.fromCartesian(He,ie.scene.globe.ellipsoid);!e.clampToGround&&(On.height=Bt.height),qe.push(G.toCartesian(On,ie.scene.globe.ellipsoid));for(let Mo=0;Mo<(e.edge||4)-1;Mo++){const jc=Wg(Ct,Jt.heading+=Math.PI*2/(e.edge||4),mt,ie.scene.globe.ellipsoid);qe.push(jc)}Object.assign(Ye,{polygonPositions:qe,height:Bt.height})}}else if(i==="VcAnalysisViewshed")Object.assign(Ye.viewshedOpts,{startPosition:Fe,endPosition:Le});else if(i==="VcAnalysisSightline")if(e.sightlineType==="segment"){const Ct=[];Ct.push(Fe);const He=[];x.value.cesiumObject._primitives.forEach(Bt=>{Bt instanceof Cesium.PointPrimitiveCollection&&He.push(...Bt._pointPrimitives),Bt instanceof Cesium.Primitive&&He.push(Bt)});const Jt=du(Fe,Le,a.viewer,He);z(Jt)&&Ct.push(Jt),Ct.push(Le);let qe=0;for(let Bt=0;Bt<Ct.length-1;Bt++){const On=j.distance(Ct[Bt],Ct[Bt+1]);qe=qe+On}Object.assign(Ye,{positions:Ct,distance:qe})}else e.sightlineType;else $e.push({position:ot,id:U(),text:gt.distanceToString(mt,(le=e.measureUnits)==null?void 0:le.distanceUnits,e.locale,(fe=e.decimals)==null?void 0:fe.distance),...cg});if(Ye.polygonPositions&&Ye.polygonPositions.length){const Ct=Object.assign({},e.labelsOpts,Ye.labelsOpts),He=Ye.polygonPositions.slice();e.loop&&He.length>2&&He.push(He[0]);for(let qe=0;qe<He.length-1;qe++){let Bt=0;if(((Ce=e.polylineOpts)==null?void 0:Ce.arcType)===0?Bt=as(He[qe],He[qe+1],a.viewer.scene.globe.ellipsoid):Bt=j.distance(He[qe],He[qe+1]),Bt>0&&He.length>2&&e.showDistanceLabel&&$e.push({text:gt.distanceToString(Bt,(me=e.measureUnits)==null?void 0:me.distanceUnits,e.locale,(be=e.decimals)==null?void 0:be.distance),position:j.midpoint(He[qe],He[qe+1],{}),id:U(),...Ct}),He.length>2&&e.showAngleLabel&&(qe>0||e.loop)){const On=He[qe===0?He.length-2:qe-1],Mo=He[qe],jc=He[qe+1],ug=j.subtract(On,Mo,{}),dg=j.subtract(jc,Mo,{});let hg=0;j.ZERO.equals(ug)||j.ZERO.equals(dg)||(hg=j.angleBetween(ug,dg)),$e.push({text:gt.angleToString(hg,(_e=e.measureUnits)==null?void 0:_e.angleUnits,e.locale,(ye=e.decimals)==null?void 0:ye.angle),position:Mo,id:U(),...Ct})}}const Jt=lu(He);e.showLabel&&$e.push({text:gt.areaToString(Jt,(ge=e.measureUnits)==null?void 0:ge.areaUnits,e.locale,(Te=e.decimals)==null?void 0:Te.area),position:Y.positions[0],id:U(),...cg})}e.showComponentLines&&(Object.assign(Ye,{xyPolylinePositions:[new j,new j,new j],xyBoxPositions:[new j,new j,new j],xDistance:0,yDistance:0,xAngle:0,yAngle:0}),T(Ye),$e.push({position:Ye.xLabelPosition,id:U(),text:gt.distanceToString(Ye.xDistance||0,(W=e.measureUnits)==null?void 0:W.distanceUnits,e.locale,(ce=e.decimals)==null?void 0:ce.distance),...e.xLabelOpts}),$e.push({position:Ye.yLabelPosition,id:U(),text:gt.distanceToString(Ye.yDistance||0,(Ee=e.measureUnits)==null?void 0:Ee.distanceUnits,e.locale,(de=e.decimals)==null?void 0:de.distance),...e.yLabelOpts}),$e.push({position:Ye.xAnglePosition,id:U(),text:gt.angleToString(Ye.xAngle||0,(nt=e.measureUnits)==null?void 0:nt.angleUnits,e.locale,(qt=e.decimals)==null?void 0:qt.angle),...e.xAngleLabelOpts}),$e.push({position:Ye.yAnglePosition,id:U(),text:gt.angleToString(Ye.yAngle||0,(Re=e.measureUnits)==null?void 0:Re.angleUnits,e.locale,(ue=e.decimals)==null?void 0:ue.angle),...e.yAngleLabelOpts})),Object.assign(Ye,{labels:$e}),Ye.positionsDegreesArray=Ye.positions.map(Ct=>{const He=Cesium.Cartographic.fromCartesian(Ct,ie.scene.globe.ellipsoid);return[K.toDegrees(He.longitude),K.toDegrees(He.latitude),He.height]}),(De=Ye==null?void 0:Ye.polygonPositions)!=null&&De.length&&(Ye.polygonPositionsDegreesArray=Ye.polygonPositions.map(Ct=>{const He=Cesium.Cartographic.fromCartesian(Ct,ie.scene.globe.ellipsoid);return[K.toDegrees(He.longitude),K.toDegrees(He.latitude),He.height]})),N.push(Ye)}),N});n.createCesiumObject=async()=>x,n.mount=async()=>{const{viewer:N}=a;return e.autoUpdateLabelPosition&&(i==="VcMeasurementDistance"&&N.scene.preRender.addEventListener(P),(i==="VcMeasurementRegular"||i==="VcMeasurementRectangle"||i==="VcDrawingRegular"||i==="VcDrawingRectangle")&&N.scene.preRender.addEventListener(_)),!0},n.unmount=async()=>{const{viewer:N}=a;return e.autoUpdateLabelPosition&&(i==="VcMeasurementDistance"&&N.scene.preRender.removeEventListener(P),(i==="VcMeasurementRegular"||i==="VcMeasurementRectangle"||i==="VcDrawingRegular"||i==="VcDrawingRectangle")&&N.scene.preRender.removeEventListener(_)),!0};const C=(N,j)=>{const{defined:G,SceneMode:J,Cartesian3:U,IntersectionTests:z,Plane:K,SceneTransforms:Q,Ray:ie}=Cesium,{viewer:Y}=a,oe=Y.scene,le=oe.camera,fe=le.direction,Ce=oe.frameState.mapProjection.ellipsoid,me=N.positions,be=me[0];let _e=be,ye=me[1],ge=N.draggingPlane,Te=N.surfaceNormal,W=Te;if(oe.mode===J.COLUMBUS_VIEW){W=U.UNIT_X;const de=Ce.cartesianToCartographic(be,{});_e=oe.mapProjection.project(de,{}),U.fromElements(_e.z,_e.x,_e.y,_e)}let ce=U.cross(W,fe,{});ce=U.cross(W,ce,ce),ce=U.normalize(ce,ce),ge=K.fromPointNormal(_e,ce,ge);const Ee=le.getPickRay(j,new ie);if(ye=z.rayPlane(Ee,ge,{}),G(ye)){if(oe.mode===J.COLUMBUS_VIEW){ye=U.fromElements(ye.y,ye.z,ye.x,ye);const nt=oe.mapProjection.unproject(ye,{});ye=Ce.cartographicToCartesian(nt,ye)}Q.wgs84ToWindowCoordinates(oe,me[0],{}).y<j.y&&(Te=U.negate(Te,{}));let de=U.subtract(ye,be,{});return de=U.projectVector(de,Te,de),ye=U.add(be,de,ye),ye}},T=N=>{const{Cartesian3:j,Math:G,defined:J}=Cesium,{viewer:U}=a,z=U.scene.frameState.mapProjection.ellipsoid,K=N.positions[0],Q=N.positions[1],ie=z.cartesianToCartographic(K,{});if(!J(ie))return;const Y=z.cartesianToCartographic(Q,{}),oe=ie.height,le=Y.height;let fe,Ce,me,be;oe<le?(fe=K,Ce=Q,be=le,me=oe):(fe=Q,Ce=K,be=oe,me=le);const _e=N.xyPolylinePositions;if(_e===void 0)return;_e[0]=fe,_e[2]=Ce;let ye=z.geodeticSurfaceNormal(fe,{});ye=j.multiplyByScalar(ye,be-me,ye);const ge=j.add(fe,ye,_e[1]);if(!(j.equalsEpsilon(ge,Ce,G.EPSILON10)&&j.equalsEpsilon(ge,fe,G.EPSILON10))){let Te=j.subtract(Ce,ge,{}),W=j.subtract(fe,ge,{});const ce=Math.min(j.magnitude(Te),j.magnitude(W)),Ee=15<ce?.15*ce:.25*ce;Te=j.normalize(Te,Te),W=j.normalize(W,W),Te=j.multiplyByScalar(Te,Ee,Te),W=j.multiplyByScalar(W,Ee,W);const de=N.xyBoxPositions;if(de===void 0)return;j.add(ge,Te,de[0]),j.add(de[0],W,de[1]),j.add(ge,W,de[2]),N.xLabelPosition=j.midpoint(ge,Ce,{}),N.yLabelPosition=j.midpoint(fe,ge,{}),N.xAnglePosition=Ce,N.yAnglePosition=fe;const nt=j.subtract(ge,Ce,{}),qt=j.subtract(ge,fe,{});let Re=j.subtract(Ce,fe,{});N.yAngle=j.angleBetween(qt,Re),Re=j.negate(Re,Re),N.xAngle=j.angleBetween(nt,Re),N.xDistance=j.magnitude(nt),N.yDistance=j.magnitude(qt)}},_=()=>{f.value.forEach((N,j)=>{var G;const J=N.polygonPositions;if(!(J.length<2)){const{defined:U,SceneTransforms:z,Cartesian2:K,HorizontalOrigin:Q}=Cesium,{viewer:ie}=a,Y=ie.scene;let oe=N.positions[0];const le=z.wgs84ToWindowCoordinates(Y,oe,{});let fe=U(le)?K.clone(le,{}):K.fromElements(Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,{}),Ce=fe.y;const me=((G=x.value)==null?void 0:G.cesiumObject)._primitives.filter(_e=>_e instanceof Cesium.LabelCollection)[j]._labels,be=me[me.length-1];if(!be)return;for(let _e=1;_e<J.length;_e++){const ye=z.wgs84ToWindowCoordinates(Y,J[_e],{});if(U(ye)){const ge=(fe.y-ye.y)/(ye.x-fe.x),Te=me[_e-1];Te&&Te!==be&&(Te.horizontalOrigin=0<ge?Q.LEFT:Q.RIGHT),ye.y<Ce&&(Ce=ye.y,oe=J[_e]),fe=K.clone(ye,fe)}N.drawStatus===Me.AfterDraw&&(be.position=oe)}}})},P=()=>{f.value.forEach((N,j)=>{var G,J,U;const{defined:z,SceneTransforms:K,HorizontalOrigin:Q}=Cesium,{viewer:ie}=a,Y=ie.scene,oe=(G=x.value)==null?void 0:G.cesiumObject,le=N.positions,fe=le[0],Ce=le[1],me=K.wgs84ToWindowCoordinates(Y,fe,{}),be=K.wgs84ToWindowCoordinates(Y,Ce,{});if(z(me)&&z(be)){const _e=oe._primitives.filter(ye=>ye instanceof Cesium.LabelCollection);if(_e.length){const ye=_e[j].get(0);let ge,Te,W,ce;e.showComponentLines&&(ge=_e[j].get(2),Te=_e[j].get(3),W=pt((J=e.yLabelOpts)==null?void 0:J.pixelOffset),ce=pt((U=e.xAngleLabelOpts)==null?void 0:U.pixelOffset)),(me.y-be.y)/(be.x-me.x)>0?(!ni(ge)&&!ni(W)&&(W.x=-9,ge.pixelOffset=W,ge.horizontalOrigin=Q.RIGHT),!ni(Te)&&!ni(ce)&&(ce.x=12,Te.pixelOffset=ce,Te.horizontalOrigin=Q.LEFT),ye.horizontalOrigin=Q.LEFT):(!ni(ge)&&!ni(W)&&(W.x=9,ge.pixelOffset=W,ge.horizontalOrigin=Q.LEFT),!ni(Te)&&!ni(ce)&&(ce.x=-12,Te.pixelOffset=ce,Te.horizontalOrigin=Q.RIGHT),ye.horizontalOrigin=Q.RIGHT)}}})},A=(N,j)=>{const{defined:G,defaultValue:J,Cartesian3:U}=Cesium,{viewer:z}=a,K=z.scene,Q=N.positions;Q[0]=j;const ie=K.frameState.mapProjection.ellipsoid,Y=ie.cartesianToCartographic(j,{}),oe=K.globe;Y.height=G(oe)?J(oe.getHeight(Y),0):0,Q[1]=ie.cartographicToCartesian(Y,{}),N.distance=U.distance(Q[0],Q[1]),N.labelPosition=U.midpoint(Q[0],Q[1],{})},L=()=>{const{Cartesian3:N,Plane:j}=Cesium,G={positions:[new N,new N],show:!1,drawStatus:Me.BeforeDraw,distance:0,labels:[],pointOpts:{},labelOpts:{},labelsOpts:{},polylineOpts:{},primitiveOpts:{},polygonOpts:{}};i==="VcMeasurementVertical"&&Object.assign(G,{draggingPlane:new j(N.UNIT_X,0),surfaceNormal:new N}),V.value.push(G),d.value=Me.BeforeDraw,h.value=!0,c.value=u.value.drawingTipStart},B=(N=!0)=>{N&&d.value===Me.Drawing&&V.value.pop();const j=E.value?E.value._vcPolylineIndx:V.value.length-1,G=V.value[j];G&&(G.drawStatus=Me.AfterDraw),d.value=Me.AfterDraw,h.value=!1,p.value=[0,0,0]},F=(N,j)=>{var G;const{viewer:J,drawingFabInstance:U,selectedDrawingActionInstance:z,getWorldPosition:K}=a,Q=U==null?void 0:U.proxy;if(j.button===2&&j.ctrl){const ye=Q.getDrawingActionInstance(l);Q.toggleAction(ye),Be(()=>{s("drawEvt",{name:l,finished:!0,windowPoistion:N,type:"cancel"},J)});return}d.value===Me.AfterDraw&&L();const ie=E.value?E.value._vcPolylineIndx:V.value.length-1,Y=V.value[ie],oe=Y.positions,le=E.value?E.value._index:Y.positions.length-1;if(j.button===2&&E.value){Q.editingActionName=void 0,Y.positions[E.value._index]=m,d.value=Me.AfterDraw,Y.drawStatus=Me.AfterDraw,E.value=void 0,c.value=u.value.drawingTipStart,i==="VcMeasurementHeight"&&A(Y,m),Be(()=>{s("drawEvt",Object.assign({name:l,index:ie,pointIndex:le,renderDatas:V,finished:!0,windowPoistion:N,type:"cancel"},f.value[ie]),J)});return}if(j.button!==0)return;const{defined:fe}=Cesium;let Ce="new",me,be=!1;const _e=J.scene;if(d.value===Me.BeforeDraw){const ye=K(_e,N,{});if(!fe(ye))return;if(oe[0]=ye,oe[1]=ye,Y.show=!0,d.value=Me.Drawing,Y.drawStatus=Me.Drawing,c.value=u.value.drawingTipEnd,me=ye,be=!1,i==="VcMeasurementVertical"){const ge=_e.frameState.mapProjection.ellipsoid;Y.surfaceNormal=ge.geodeticSurfaceNormal(ye,Y.surfaceNormal)}i==="VcMeasurementHeight"&&(A(Y,ye),be=!0,Y.drawStatus=Me.AfterDraw,d.value=Me.AfterDraw,c.value=u.value.drawingTipStart,e.mode===1&&Q.toggleAction(z)),i==="VcAnalysisViewshed"&&(Y.viewshedOpts={...e.viewshedOpts})}else{if(Y.drawStatus=Me.AfterDraw,d.value=Me.AfterDraw,E.value){if(ut().hasTouch===!0){const ye=K(_e,N,{});fe(ye)&&(Y.positions.splice(E.value._index,1,ye),E.value.pixelSize=((G=e.pointOpts)==null?void 0:G.pixelSize)*1)}E.value=void 0,Q.editingActionName=void 0,h.value=!1,p.value=[0,0,0],Ce=g.value,z&&(c.value=u.value.drawingTipStart,h.value=!0)}else{if(i!=="VcMeasurementVertical"&&ut().hasTouch===!0){const ye=K(_e,N,{});if(fe(ye)){const ge=Y.positions;ge[1]=ye}}e.mode===1&&Q.toggleAction(z)}be=!0,me=Y.positions[1]}Be(()=>{s("drawEvt",Object.assign({index:ie,pointIndex:le,renderDatas:V,name:l,finished:be,position:me,windowPoistion:N,type:Ce},f.value[ie]),J)})},q=N=>{const{viewer:j,getWorldPosition:G}=a,J=j.scene,U=G(J,N,{}),{defined:z,Cartographic:K}=Cesium;if(!z(U)||(p.value=U,d.value!==Me.Drawing)||i==="VcMeasurementVertical"&&J.mode===Cesium.SceneMode.SCENE2D)return;const Q=E.value?E.value._vcPolylineIndx:V.value.length-1,ie=V.value[Q],Y=E.value?E.value._index:ie.positions.length-1;if(i==="VcMeasurementVertical"){const oe=C(ie,N);if(!ni(oe)){const le=ie.positions.slice();le[E.value?E.value._index:1]=oe,ie.positions=le}}else if(i==="VcMeasurementHeight")A(ie,U);else if(i==="VcDrawingRectangle"||i==="VcDrawingRegular"||i==="VcMeasurementRegular"||i==="VcMeasurementRectangle"){const oe=ie.positions,le=oe[0],fe=K.fromCartesian(le,j.scene.globe.ellipsoid),Ce=K.fromCartesian(U,j.scene.globe.ellipsoid);!e.clampToGround&&(Ce.height=fe.height),oe[E.value?E.value._index:1]=K.toCartesian(Ce,j.scene.globe.ellipsoid)}else if(i==="VcAnalysisSightline"){const oe=ie.positions;if(E.value){const le=E.value._index>0?1:0;oe[le]=U}else oe[1]=U}else{const oe=ie.positions.slice();oe[E.value?E.value._index:1]=U,ie.positions=oe}Be(()=>{s("drawEvt",Object.assign({index:Q,pointIndex:Y,renderDatas:V,name:l,finished:!1,position:ie.positions[1],windowPoistion:N,type:E.value?g:"new"},f.value[Q]),j)})},Z=N=>{var j,G,J;if(b.value=[0,0,0],v.value=!1,!e.editable)return;g.value=N;const{viewer:U,drawingFabInstance:z}=a;if(N==="move"){c.value=u.value.drawingTipEditing,d.value=Me.Drawing,E.value=y.value,m=V.value[E.value._vcPolylineIndx].positions[E.value._index],h.value=!0;const K=z==null?void 0:z.proxy;K.editingActionName=l}else if(N==="remove"){const K=y.value._vcPolylineIndx;V.value[K].positions.splice(y.value._index,1)}else if(N==="removeAll"){const K=y.value._vcPolylineIndx;V.value.splice(K,1)}else{const K=y.value._vcPolylineIndx,Q=V.value[K];(J=(G=(j=e.editorOpts)==null?void 0:j[N])==null?void 0:G.callback)==null||J.call(G,K,Q)}s("editorEvt",{type:N,renderDatas:V,name:l,index:y.value._vcPolylineIndx,pointIndex:y.value._index,point:y.value},U)},H={computedRenderDatas:f,renderDatas:V,startNew:L,stop:B,clear:()=>{V.value=[],B()},handleMouseClick:F,handleMouseMove:q};return Object.assign(n.proxy,H),()=>{var N,j,G;const{createGuid:J}=Cesium,U=[];if(f.value.forEach((z,K)=>{var Q;const ie=i==="VcDrawingRectangle"||i==="VcDrawingRegular"||i==="VcMeasurementRegular"||i==="VcMeasurementRectangle",Y=ie?(Q=z.polygonPositions)==null?void 0:Q.slice():z.positions;ie&&(Y==null||Y.push(Y[0]));const oe=Object.assign({},e.polylineOpts,z.polylineOpts);e.clampToGround&&delete oe.arcType;const le=Object.assign({},e.primitiveOpts,z.primitiveOpts);if(Y!=null&&Y.length&&(Y==null?void 0:Y.length)>1&&(U.push(S(e.clampToGround?Ar:_n,{...le,show:z.show&&le.show||e.editable||z.drawStatus===Me.Drawing,onReady:Ce=>{var me;(me=le==null?void 0:le.onReady)==null||me.call(le,Ce),Ce.cesiumObject._vcPolylineIndex=K}},()=>S(Zn,{id:J()},()=>S(e.clampToGround?jr:En,{positions:Y,...oe})))),i==="VcAnalysisViewshed"&&U.push(S(np,{...z.viewshedOpts}))),z.polygonPositions&&z.polygonPositions.length>2){const Ce=Object.assign({},e==null?void 0:e.polygonOpts,z==null?void 0:z.polygonOpts);Ce.clampToGround=e.clampToGround,U.push(S(Qn,{positions:Y,show:z.show&&(Ce==null?void 0:Ce.show),...Ce,onReady:me=>{var be;$(me),(be=Ce==null?void 0:Ce.onReady)==null||be.call(Ce,me),me.cesiumObject._vcPolylineIndex=K}}))}z.xyPolylinePositions&&z.xyPolylinePositions.length>1&&U.push(S(_n,{show:z.show&&le||e.editable||z.drawStatus===Me.Drawing,...le,onReady:Ce=>{var me;(me=le==null?void 0:le.onReady)==null||me.call(le,Ce),Ce.cesiumObject._vcPolylineIndex=K}},()=>S(Zn,{id:J()},()=>S(En,{positions:z.xyPolylinePositions,...oe})))),z.xyBoxPositions&&z.xyBoxPositions.length>1&&U.push(S(_n,{show:z.show&&le||e.editable||z.drawStatus===Me.Drawing,...le},()=>S(Zn,{id:J()},()=>S(En,{positions:z.xyBoxPositions,...oe}))));const fe=Object.assign({},e.pointOpts,z.pointOpts);U.push(S(Eo,{enableMouseEvent:e.enableMouseEvent,show:z.show,points:z.points.map((Ce,me)=>{const be=Ce.position,_e=Object.assign({},fe,Ce);return{position:be,id:J(),_vcPolylineIndx:K,..._e,show:((_e==null?void 0:_e.show)||e.editable||z.drawStatus===Me.Drawing)&&(i==="VcAnalysisSightline"&&z.positions.length===3?me!==1:!0)}}),onMouseover:w,onMouseout:O,onReady:M})),U.push(S(_o,{enableMouseEvent:e.enableMouseEvent,show:z.show,labels:z.labels,onReady:k}))}),(N=e.drawtip)!=null&&N.show&&h.value){const{viewer:z}=a;U.push(S(Pn,{position:p.value,pixelOffset:(j=e.drawtip)==null?void 0:j.pixelOffset,teleport:{to:z.container}},()=>S("div",{class:"vc-drawtip vc-tooltip--style"},c.value)))}if(v.value){const z=[];if(y.value){const Q=e.editorOpts;for(const ie in Q)if(!Array.isArray(Q[ie])&&typeof Q[ie]!="number"){const Y={...Q[ie]};delete Y.color,z.push(S(li,{style:{color:Q[ie].color,background:Q[ie].background},...Y,onclick:Z.bind(void 0,ie)},()=>S(Dt,{...Q[ie].tooltip},()=>{var oe;return S("strong",null,((oe=Q[ie].tooltip)==null?void 0:oe.tip)||r(`vc.measurement.editor.${ie}`))})))}}const{viewer:K}=a;U.push(S(Pn,{position:b.value,pixelOffset:(G=e.editorOpts)==null?void 0:G.pixelOffset,teleport:{to:K.container},onMouseenter:I,onMouseleave:R},()=>S("div",{class:"vc-editor"},z)))}return S(qn,{ref:x,show:e.show,onReady:D},()=>U)}}var Hx=X("VcMeasurementDistance",ee({name:"VcMeasurementDistance",props:{...Ht,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:xt,setup(e,t){return dn(e,t,"VcMeasurementDistance")}}));function Po(e,t,i){const n=ae(),o=ze(e,t,n);if(o===void 0)return;const{t:r}=_t(),a=o.$services,{emit:s}=t,{drawingType:l,drawTip:c,drawTipOpts:u,drawStatus:d,canShowDrawTip:h,drawTipPosition:p,showEditor:v,editorPosition:b,mouseoverPoint:y,editingPoint:E,primitiveCollectionRef:x,editorType:g,onMouseoverPoints:w,onMouseoutPoints:O,onMouseenterEditor:I,onMouseleaveEditor:R,onPrimitiveCollectionReady:D,onVcCollectionPointReady:M,onVcCollectionLabelReady:k,onVcPrimitiveReady:$}=Mc(e,t,n,i,a);let V,m;const f=10,C=te([]);e.preRenderDatas&&e.preRenderDatas.length&&e.preRenderDatas.forEach(j=>{const G={show:!0,positions:_i(j),tempPositions:[],drawStatus:Me.AfterDraw,loop:e.loop,distance:0,area:0,distances:[],labels:[],angles:[],polylineOpts:{},pointOpts:{},labelOpts:{},labelsOpts:{},primitiveOpts:{},polygonOpts:{}};C.value.push(G)});const T=re(()=>{const{Cartesian3:j,createGuid:G,defined:J,Math:U}=Cesium,z=[],{viewer:K}=a;return C.value.forEach((Q,ie)=>{var Y,oe,le,fe,Ce,me,be,_e,ye;const ge=xe([]),Te=[],W=[];let ce=0;const Ee=[];Q.points=Q.positions.map(nt=>({position:nt}));const de=Q.positions.slice();if(i==="VcAnalysisSightline"){const nt=de.shift();nt&&de.forEach(qt=>{const Re=[];Re.push(nt);const ue=[];x.value.cesiumObject._primitives.forEach($e=>{$e instanceof Cesium.PointPrimitiveCollection&&ue.push(...$e._pointPrimitives),$e instanceof Cesium.Primitive&&ue.push($e)});const De=du(nt,qt,a.viewer,ue);J(De)&&Re.push(De),Re.push(qt);let Fe=0;const Le=[];for(let $e=0;$e<Re.length-1;$e++){const mt=j.distance(Re[$e],Re[$e+1]);Le.push(mt),Fe=Fe+mt}z.push({...Q,positions:Re,distance:Fe,distances:Le})})}else{e.loop&&de.length>2&&de.push(de[0]);for(let Re=0;Re<de.length-1;Re++){let ue=0;((Y=e.polylineOpts)==null?void 0:Y.arcType)===0?ue=as(de[Re],de[Re+1],a.viewer.scene.globe.ellipsoid):ue=j.distance(de[Re],de[Re+1]),Te.push(ue),ce=ce+ue;const De=Object.assign({},e.labelsOpts,Q.labelsOpts);if(ue>0&&de.length>2&&e.showDistanceLabel&&ge.push({text:gt.distanceToString(ue,(oe=e.measureUnits)==null?void 0:oe.distanceUnits,e.locale,(le=e.decimals)==null?void 0:le.distance),position:j.midpoint(de[Re],de[Re+1],{}),id:G(),...De}),de.length>2&&e.showAngleLabel&&(Re>0||e.loop)){const Fe=de[Re===0?de.length-2:Re-1],Le=de[Re],$e=de[Re+1],mt=j.subtract(Fe,Le,{}),ot=j.subtract($e,Le,{});let at=0;j.ZERO.equals(mt)||j.ZERO.equals(ot)||(at=j.angleBetween(mt,ot)),W.push(at),ge.push({text:gt.angleToString(at,(fe=e.measureUnits)==null?void 0:fe.angleUnits,e.locale,(Ce=e.decimals)==null?void 0:Ce.angle),position:Le,id:G(),...De})}e.showDashedLine&&(Ee.push({positions:[de[Re],_(de[Re])]}),Re===de.length-2&&Ee.push({positions:[de[Re+1],_(de[Re+1])]}))}const nt=lu(de),qt=Object.assign({},e.labelOpts,Q.labelOpts);e.showLabel&&de.length&&(i.includes("Area")?ge.push({text:gt.areaToString(nt,(me=e.measureUnits)==null?void 0:me.areaUnits,e.locale,(be=e.decimals)==null?void 0:be.area),position:de[de.length-1],id:G(),...qt}):ge.push({text:gt.distanceToString(ce,(_e=e.measureUnits)==null?void 0:_e.distanceUnits,e.locale,(ye=e.decimals)==null?void 0:ye.distance),position:de[de.length-1],id:G(),...qt})),Q.positionsDegreesArray=Q.positions.map(Re=>{const ue=Cesium.Cartographic.fromCartesian(Re,K.scene.globe.ellipsoid);return[U.toDegrees(ue.longitude),U.toDegrees(ue.latitude),ue.height]}),z.push({...Q,labels:ge,distance:ce,distances:Te,area:nt,angles:W,dashedLines:Ee})}}),z});n.mount=async()=>{const{viewer:j}=a;return e.autoUpdateLabelPosition&&j.scene.preRender.addEventListener(P),!0},n.unmount=async()=>{const{viewer:j}=a;return e.autoUpdateLabelPosition&&j.scene.preRender.removeEventListener(P),!0};const _=j=>{const{defined:G,defaultValue:J}=Cesium,{viewer:U}=a,z=U.scene,K=z.globe,Q=z.frameState.mapProjection.ellipsoid,ie=Q.cartesianToCartographic(j);return ie.height=G(K)?J(K.getHeight(ie),0):0,Q.cartographicToCartesian(ie)},P=()=>{T.value.forEach((j,G)=>{var J;const U=j.positions;if(!(U.length<2)){const{defined:z,SceneTransforms:K,Cartesian2:Q,HorizontalOrigin:ie}=Cesium,{viewer:Y}=a,oe=Y.scene;let le=U[0];const fe=K.wgs84ToWindowCoordinates(oe,le,{});let Ce=z(fe)?Q.clone(fe,{}):Q.fromElements(Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,{}),me=Ce.y;const be=((J=x.value)==null?void 0:J.cesiumObject)._primitives.filter(ye=>ye instanceof Cesium.LabelCollection)[G]._labels,_e=be[be.length-1];for(let ye=1;ye<U.length;ye++){const ge=K.wgs84ToWindowCoordinates(oe,U[ye],{});if(z(ge)){const Te=(Ce.y-ge.y)/(ge.x-Ce.x);be[ye-1]!==_e&&(be[ye-1].horizontalOrigin=0<Te?ie.LEFT:ie.RIGHT),ge.y<me&&(me=ge.y,le=U[ye]),Ce=Q.clone(ge,Ce)}j.drawStatus===Me.AfterDraw&&(_e.position=le)}}})},A=()=>{const j={show:!1,positions:[],tempPositions:[],drawStatus:Me.BeforeDraw,loop:e.loop,distance:0,area:0,distances:[],labels:[],angles:[],polylineOpts:{},pointOpts:{},labelOpts:{},labelsOpts:{},primitiveOpts:{},polygonOpts:{}};if(i==="VcMeasurementHorizontal"){const{Cartesian3:G,Plane:J}=Cesium;Object.assign(j,{dashedLines:[],heightPlane:new J(G.UNIT_X,0),heightPlaneCV:new J(G.UNIT_X,0),height:0,firstMove:!1,tempNextPos:new G})}d.value=Me.BeforeDraw,C.value.push(j),h.value=!0,c.value=u.value.drawingTipStart},L=(j=!0)=>{j&&d.value===Me.Drawing&&C.value.pop();const G=E.value?E.value._vcPolylineIndex:C.value.length-1,J=C.value[G];J&&(J.positions=J.tempPositions,J.drawStatus=Me.AfterDraw),d.value=Me.AfterDraw,h.value=!1,p.value=[0,0,0]},B=(j,G)=>{var J;const{viewer:U,drawingFabInstance:z,getWorldPosition:K,selectedDrawingActionInstance:Q}=a,ie=z==null?void 0:z.proxy;if(G.button===2&&G.ctrl){const ce=ie.getDrawingActionInstance(l);ie.toggleAction(ce),Be(()=>{s("drawEvt",{name:l,finished:!0,windowPoistion:j,type:"cancel"},U)});return}d.value===Me.AfterDraw&&A();const{defined:Y,Cartesian2:oe,Plane:le,Cartesian3:fe}=Cesium,Ce=E.value?E.value._vcPolylineIndex:C.value.length-1,me=C.value[Ce],be=me.tempPositions,_e=E.value?E.value._index:me.positions.length-1;if(G.button===2&&E.value){g.value==="insert"?me.positions.splice(E.value._index,1):me.positions[E.value._index]=m,d.value=Me.AfterDraw,me.drawStatus=Me.AfterDraw,E.value=void 0,c.value=u.value.drawingTipStart,ie.editingActionName=void 0,h.value=Y(Q),Be(()=>{s("drawEvt",Object.assign({index:Ce,pointIndex:_e,name:l,renderDatas:C,finished:!0,windowPoistion:j,type:"cancel"},T.value[Ce]),U)});return}if(V=V||new Cesium.Cartesian2(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),oe.magnitude(oe.subtract(V,j,{}))<f||(G.button===2&&d.value===Me.Drawing&&be.length>1&&(be.pop(),F(j)),G.button!==0))return;const ye=U.scene,ge=K(ye,j,{});if(!Y(ge))return;let Te=!1,W="new";if(i==="VcMeasurementHorizontal"){if(E.value)d.value=Me.AfterDraw,E.value=void 0,Te=!0,W=g.value,c.value=u.value.drawingTipStart;else if(be.length===0){const ce=ye.frameState.mapProjection.ellipsoid;be.push(ge),me.positions=be,me.heightPlane=le.fromPointNormal(ge,ce.geodeticSurfaceNormal(ge,{}),me.heightPlane);const Ee=ce.cartesianToCartographic(ge,{}),de=ye.mapProjection.project(Ee,{}),nt=fe.fromElements(de.z,de.x,de.y,de);me.heightPlaneCV=le.fromPointNormal(nt,fe.UNIT_X,me.heightPlaneCV),me.height=Ee.height,me.firstMove=!0,me.drawStatus=Me.Drawing,me.show=!0,d.value=Me.Drawing}else be.push(me.tempNextPos),me.positions=be,me.firstMove=!0;c.value=u.value.drawingTipEnd}else{if(E.value){if(ut().hasTouch===!0){const ce=K(ye,j,{});Y(ce)&&(me.positions.splice(E.value._index,1,ce),E.value.pixelSize=((J=e.pointOpts)==null?void 0:J.pixelSize)*1)}d.value=Me.AfterDraw,E.value=void 0,Te=!0,W=g.value,c.value=u.value.drawingTipStart}else be.push(ge),me.positions=be,me.show=!0,me.drawStatus=Me.Drawing,d.value=Me.Drawing,h.value=!0,c.value=u.value.drawingTipEnd;W!=="new"&&(ie.editingActionName=void 0,h.value=Y(Q))}oe.clone(j,V),Be(()=>{s("drawEvt",Object.assign({index:Ce,pointIndex:_e,name:l,renderDatas:C,finished:Te,position:i==="VcMeasurementHorizontal"?me.positions[me.positions.length-1]:ge,windowPoistion:j,type:W},T.value[Ce]),U)})},F=(j,G)=>{const{viewer:J,getWorldPosition:U}=a,z=J.scene,K=U(z,j,{}),{defined:Q}=Cesium;if(!Q(K)||(p.value=K,d.value!==Me.Drawing))return;const ie=E.value?E.value._vcPolylineIndex:C.value.length-1,Y=C.value[ie],oe=E.value?E.value._index:Y.positions.length-1;let le="new";if(i==="VcMeasurementHorizontal"){const{SceneMode:fe,IntersectionTests:Ce,Cartesian3:me}=Cesium,be=z.frameState.mapProjection.ellipsoid,_e=Y.positions,ye=z.camera.getPickRay(j);let ge,Te;if(z.mode===fe.SCENE3D&&Y.heightPlane)ge=Ce.rayPlane(ye,Y.heightPlane);else if(z.mode===fe.COLUMBUS_VIEW&&Y.heightPlaneCV)ge=Ce.rayPlane(ye,Y.heightPlaneCV),ge=me.fromElements(ge.y,ge.z,ge.x,ge),Te=z.mapProjection.unproject(ge),ge=be.cartographicToCartesian(Te);else if(ge=z.camera.pickEllipsoid(j,be),Q(ge)){const W=be.cartesianToCartographic(ge);W.height=Y.height||0,ge=be.cartographicToCartesian(W,ge)}if(!Q(ge))return;if(!Y.firstMove&&G!=null&&G.shift){const W=_e[_e.length-2],ce=Y.tempNextPos,Ee=me.subtract(ce,W,{});let de=me.subtract(ge,W,{});de=me.projectVector(de,Ee,de),ge=me.add(W,de,ge)}if(E.value)Y.positions.splice(E.value._index,1,ge),le=g.value;else{const W=Y.tempPositions.slice();W.push(ge),Y.positions=W,Y.firstMove=!1,Y.tempNextPos=Object.assign(ge),c.value=u.value.drawingTipEnd}}else if(E.value)Y.positions.splice(E.value._index,1,K),le=g.value;else{const fe=Y.tempPositions.slice();fe.push(K),Y.positions=fe}Be(()=>{s("drawEvt",Object.assign({index:ie,pointIndex:oe,name:l,renderDatas:C,finished:!1,position:i==="VcMeasurementHorizontal"?Y.positions[Y.positions.length-1]:K,windowPoistion:j,type:le},T.value[ie]),J)})},q=j=>{const{drawingFabInstance:G,selectedDrawingActionInstance:J,viewer:U}=a;if(d.value===Me.Drawing){const z=E.value?E.value._vcPolylineIndex:C.value.length-1,K=C.value[z],Q=E.value?E.value._index:K.positions.length-1;L(!1),c.value=u.value.drawingTipStart,Be(()=>{s("drawEvt",Object.assign({index:z,pointIndex:Q,name:l,renderDatas:C,finished:!0,position:K.positions[K.positions.length-1],windowPoistion:j,type:"new"},T.value[z]),U),e.mode===1&&(G==null?void 0:G.proxy).toggleAction(J)})}},Z=()=>{let j=E.value._vcPolylineIndex,G=E.value._index;if(i==="VcAnalysisSightline")for(let J=0;J<C.value.length;J++){const U=C.value[J];for(let z=0;z<U.positions.length;z++){const K=U.positions[z];E.value.position.equals(K)&&(j=J,G=z)}}return[j,G]},H=j=>{var G,J,U;if(b.value=[0,0,0],v.value=!1,!e.editable)return;const{viewer:z,drawingFabInstance:K}=a,Q=K==null?void 0:K.proxy;if(g.value=j,j==="move"){c.value=u.value.drawingTipEditing,d.value=Me.Drawing,E.value=y.value,h.value=!0;const ie=Z();E.value._vcPolylineIndex=ie[0],E.value._index=ie[1],m=C.value[ie[0]].positions[ie[1]],Q.editingActionName=l}else if(j==="insert"){const ie=y.value._vcPolylineIndex;C.value[ie].positions.splice(y.value._index,0,y.value.position),E.value=y.value,h.value=!0,d.value=Me.Drawing,c.value=u.value.drawingTipEditing,Q.editingActionName=l}else if(j==="remove"){const ie=y.value._vcPolylineIndex,Y=C.value[ie];Y.positions.length>2&&Y.positions.splice(y.value._index,1)}else if(j==="removeAll"){const ie=y.value._vcPolylineIndex;C.value.splice(ie,1)}else{const ie=y.value._vcPolylineIndex,Y=C.value[ie];(U=(J=(G=e.editorOpts)==null?void 0:G[j])==null?void 0:J.callback)==null||U.call(J,ie,Y)}s("editorEvt",{type:j,renderDatas:C,name:l,polylineIndex:y.value._vcPolylineIndex,pointIndex:y.value._index,point:y.value},z)},N={computedRenderDatas:T,renderDatas:C,startNew:A,stop:L,clear:()=>{C.value=[],L()},handleMouseClick:B,handleMouseMove:F,handleDoubleClick:q};return Object.assign(n.proxy,N),()=>{var j,G;const{createGuid:J,Cartesian3:U}=Cesium,z=[],K=[];if(T.value.forEach((Q,ie)=>{var Y,oe;const le=Q.positions.slice();if(le.length>1){Q.loop&&le.push(le[0]);const be=Object.assign({},e.polylineOpts,Q.polylineOpts);e.clampToGround&&delete be.arcType;const _e=Object.assign({},e.primitiveOpts,Q.primitiveOpts);z.push(S(e.clampToGround?Ar:_n,{show:Q.show&&_e.show||e.editable||Q.drawStatus===Me.Drawing,..._e,onReady:ye=>{var ge;(ge=_e==null?void 0:_e.onReady)==null||ge.call(_e,ye),ye.cesiumObject._vcPolylineIndex=ie}},()=>S(Zn,{id:J()},()=>S(e.clampToGround?jr:En,{positions:le,...be}))))}const fe=Object.assign({},e.dashLineOpts,Q.dashLineOpts),Ce=Object.assign({},e.dashLinePrimitiveOpts,Q.dashLinePrimitiveOpts);(Y=Q.dashedLines)==null||Y.forEach(be=>{z.push(S(_n,{show:Q.show&&e.dashLinePrimitiveOpts.show||e.editable||Q.drawStatus===Me.Drawing,...Ce},()=>S(Zn,{id:J()},()=>S(En,{positions:be.positions,...fe}))))});const me=Object.assign({},e.pointOpts,Q.pointOpts);if(z.push(S(Eo,{enableMouseEvent:e.enableMouseEvent,show:Q.show,points:Q.points.map((be,_e)=>{var ye;const ge=be.position;let Te=!1;for(let Ee=0;Ee<K.length;Ee++)U.equals(ge,K[Ee])&&(Te=!0);const W=(((ye=e.pointOpts)==null?void 0:ye.show)||e.editable||Q.drawStatus===Me.Drawing)&&(i==="VcAnalysisSightline"&&Q.positions.length===3?_e!==1:!0)&&!Te;i==="VcAnalysisSightline"&&K.push(ge);const ce=Object.assign({},me,be);return{position:ge,id:J(),_vcPolylineIndex:ie,show:W,...ce}}),onMouseover:w,onMouseout:O,onReady:M})),z.push(S(_o,{enableMouseEvent:e.enableMouseEvent,show:Q.show,labels:Q.labels,onReady:k})),le.length>2&&(i.includes("Polygon")||i.includes("Area"))){const be=Object.assign({},e.polygonOpts,Q.polygonOpts);z.push(S(Qn,{positions:le,clampToGround:e.clampToGround,show:Q.show&&((oe=e.polygonOpts)==null?void 0:oe.show),...be,onReady:_e=>{var ye;$(_e),(ye=be==null?void 0:be.onReady)==null||ye.call(be,_e),_e.cesiumObject._vcPolylineIndex=ie}}))}}),(j=e.drawtip)!=null&&j.show&&h.value){const{viewer:Q}=a;z.push(S(Pn,{position:p.value,pixelOffset:e.drawtip.pixelOffset,teleport:{to:Q.container}},()=>S("div",{class:"vc-drawtip vc-tooltip--style"},c.value)))}if(v.value){const Q=[];if(y.value){const Y=e.editorOpts;for(const oe in Y)if(!Array.isArray(Y[oe])&&typeof Y[oe]!="number"){const le={...Y[oe]};delete le.color,Q.push(S(li,{style:{color:Y[oe].color,background:Y[oe].background},...le,onclick:H.bind("polyline",oe)},()=>S(Dt,{...Y[oe].tooltip},()=>{var fe;return S("strong",null,((fe=Y[oe].tooltip)==null?void 0:fe.tip)||r(`vc.drawing.editor.${oe}`))})))}}const{viewer:ie}=a;z.push(S(Pn,{position:b.value,pixelOffset:(G=e.editorOpts)==null?void 0:G.pixelOffset,teleport:{to:ie.container},onMouseenter:I,onMouseleave:R},()=>S("div",{class:"vc-editor"},Q)))}return S(qn,{ref:x,show:e.show,onReady:D},()=>z)}}var Wx=X("VcMeasurementPolyline",ee({name:"VcMeasurementPolyline",props:{...Ht,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:xt,setup(e,t){return Po(e,t,"VcMeasurementPolyline")}})),qx=X("VcMeasurementHorizontal",ee({name:"VcMeasurementHorizontal",props:{...Ht,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:xt,setup(e,t){return Po(e,t,"VcMeasurementHorizontal")}})),Qx=X("VcMeasurementVertical",ee({name:"VcMeasurementVertical",props:{...Ht,measureUnits:Object,polylineOpts:Object,primitiveOpts:Object,labelOpts:Object,locale:String,decimals:Object,autoUpdateLabelPosition:Boolean},emits:xt,setup(e,t){return dn(e,t,"VcMeasurementVertical")}})),Zx=X("VcMeasurementHeight",ee({name:"VcMeasurementHeight",props:{...Ht,measureUnits:Object,polylineOpts:Object,primitiveOpts:Object,labelOpts:Object,locale:String,decimals:Object,autoUpdateLabelPosition:Boolean},emits:xt,setup(e,t){return dn(e,t,"VcMeasurementHeight")}}));function Sc(e,t,i){const n=ae(),o=ze(e,t,n);if(o===void 0)return;const{t:r}=_t(),a=o.$services,{emit:s}=t,{drawingType:l,drawTip:c,drawTipOpts:u,drawStatus:d,canShowDrawTip:h,drawTipPosition:p,showEditor:v,editorPosition:b,mouseoverPoint:y,editingPoint:E,primitiveCollectionRef:x,editorType:g,onMouseoverPoints:w,onMouseoutPoints:O,onMouseenterEditor:I,onMouseleaveEditor:R,onPrimitiveCollectionReady:D,onVcCollectionPointReady:M,onVcCollectionLabelReady:k}=Mc(e,t,n,i,a),$=te([]);let V,m=[];i==="VcDrawingPin"&&e.billboardOpts.image===""&&(e.billboardOpts.image=Cesium.buildModuleUrl("Assets/Textures/pin.svg")),m.push(he(()=>e.editable,H=>{const{drawingFabInstance:N,selectedDrawingActionInstance:j}=a;H&&(j==null?void 0:j.name)===l&&(N==null?void 0:N.proxy).toggleAction(j)}));const f=(H,N,j)=>{const G=Cesium.Cartographic.fromCartesian(H,j.globe.ellipsoid),J=[Cesium.Math.toDegrees(G.longitude),Cesium.Math.toDegrees(G.latitude),G.height];N.positionDegrees=J},C=()=>{const{Cartesian3:H}=Cesium,N={drawStatus:Me.Drawing,show:!1,position:new H,lng:0,lat:0,height:0,slope:0,pointOpts:{},labelOpts:{},billboardOpts:{}};$.value.push(N),d.value=Me.Drawing,h.value=!0,c.value=u.value.drawingTipStart},T=(H=!0)=>{H&&d.value===Me.Drawing&&$.value.pop();const N=E.value?E.value._vcPolylineIndx:$.value.length-1,j=$.value[N];j&&(j.drawStatus=Me.AfterDraw),d.value=Me.AfterDraw,h.value=!1,p.value=[0,0,0]},_=(H,N)=>{const{viewer:j,drawingFabInstance:G,getWorldPosition:J,selectedDrawingActionInstance:U}=a,z=G==null?void 0:G.proxy;if(N.button===2&&N.ctrl){const oe=z==null?void 0:z.getDrawingActionInstance(l);z==null||z.toggleAction(oe),Be(()=>{s("drawEvt",{name:l,finished:!0,windowPoistion:H,type:"cancel"},j)});return}const K=E.value?E.value._vcPolylineIndx:$.value.length-1,Q=$.value[K];if(N.button===2&&E.value){z.editingActionName=void 0,$.value[K]=V,d.value=Me.AfterDraw,$.value[K].drawStatus=Me.AfterDraw,E.value=void 0,c.value=u.value.drawingTipStart,Be(()=>{s("drawEvt",{name:l,index:K,renderDatas:$,finished:!0,windowPoistion:H,type:"cancel"},j)});return}if(N.button!==0)return;const{defined:ie}=Cesium;let Y="new";if(d.value===Me.BeforeDraw){const oe=j.scene,le=J(oe,H,{});if(!ie(le))return;Q.position=le,Q.show=!0,Q.drawStatus=Me.AfterDraw,d.value=Me.AfterDraw,c.value=u.value.drawingTipStart,Be(()=>{s("drawEvt",{index:K,renderDatas:$,name:l,finished:!0,position:le,windowPoistion:H,type:Y},j)})}else{d.value=Me.AfterDraw,Q.drawStatus=Me.AfterDraw;const oe=j.scene;if(ut().hasTouch===!0){const le=J(oe,H,{});f(le,Q,oe),ie(le)&&(Q.position=le,Q.show=!0)}E.value?(E.value=void 0,z.editingActionName=void 0,h.value=!1,Y=g.value):e.mode===1&&Be(()=>{z.toggleAction(U)}),U&&(c.value=u.value.drawingTipStart,h.value=!0),Be(()=>{s("drawEvt",{index:K,renderDatas:$,name:l,finished:!0,position:$.value[K].position,positionDegrees:$.value[K].positionDegrees,windowPoistion:H,type:Y},j)})}},P=H=>{const{viewer:N,getWorldPosition:j}=a,G=N.scene,{defined:J,SceneMode:U}=Cesium;if(G.mode!==U.MORPHING){const z=j(G,H,{});if(!J(z)||(p.value=z,d.value===Me.AfterDraw&&C(),d.value!==Me.Drawing))return;const K=E.value?E.value._vcPolylineIndx:$.value.length-1,Q=$.value[K];Q.position=z,f(z,Q,G),A(Q,H);const ie=E.value?g.value:"new";Be(()=>{s("drawEvt",{index:K,renderDatas:$,name:l,finished:!1,position:z,positionDegrees:Q.positionDegrees,windowPoistion:H,type:ie},N)})}},A=(H,N)=>{const{viewer:j}=a,G=j.scene,{defined:J,defaultValue:U,Math:z,SceneMode:K}=Cesium,Q=G.frameState.mapProjection.ellipsoid.cartesianToCartographic(H.position,{}),ie=G.globe;let Y=J(ie)?U(ie.getHeight(Q),0):0;Y=e.heightReference===0?Q.height:Q.height-Y,z.equalsEpsilon(Y,0,z.EPSILON3)&&(Y=0);let oe=0;G.mode!==K.SCENE2D&&(N||(N=G.cartesianToCanvasCoordinates(H.position,{})),oe=L(G,N)),H.show=!0,H.lng=Q.longitude,H.lat=Q.latitude,H.height=Y,H.slope=oe},L=(H,N)=>{const{getWorldPosition:j}=a,{defined:G,Cartesian2:J,Cartesian3:U,Math:z}=Cesium,K=j(H,N,{});if(G(K)){const Q=H.camera.position,ie=U.distance(K,Q),Y=[new U,new U,new U,new U,new U],oe=new U,le=new U;if(!(1e4<ie)){const fe=Y[0],Ce=Y[1],me=Y[2],be=Y[3];let _e=H.frameState.mapProjection.ellipsoid.geodeticSurfaceNormal(K,oe);_e=U.negate(_e,_e);const ye=J.clone(N,Y[0]);ye.x-=2,ye.y-=2;const ge=J.clone(N,Y[1]);ge.x-=2,ge.y+=2;const Te=J.clone(N,Y[2]);Te.x+=2,Te.y+=2;const W=J.clone(N,Y[3]);W.x+=2,W.y-=2;const ce=j(H,ye,fe),Ee=j(H,ge,Ce),de=j(H,Te,me),nt=j(H,W,be);let qt,Re,ue,De,Fe,Le,$e,mt;G(ce)&&(qt=U.subtract(ce,K,fe),Re=U.magnitude(qt)/ie<=.05?U.normalize(qt,fe):void 0),G(Ee)&&(ue=U.subtract(Ee,K,Ce),De=U.magnitude(ue)/ie<=.05?U.normalize(ue,Ce):void 0),G(de)&&(Fe=U.subtract(de,K,me),Le=U.magnitude(Fe)/ie<=.05?U.normalize(Fe,me):void 0),G(nt)&&($e=U.subtract(nt,K,be),mt=U.magnitude($e)/ie<=.05?U.normalize($e,be):void 0);let ot=U.clone(U.ZERO,le),at=Y[4];if(G(Re)&&G(De)&&(at=U.normalize(U.cross(Re,De,at),at),ot=U.add(ot,at,ot)),G(De)&&G(Le)&&(at=U.normalize(U.cross(De,Le,at),at),ot=U.add(ot,at,ot)),G(Le)&&G(mt)&&(at=U.normalize(U.cross(Le,mt,at),at),ot=U.add(ot,at,ot)),G(mt)&&G(Re)&&(at=U.normalize(U.cross(mt,Re,at),at),ot=U.add(ot,at,ot)),!ot.equals(U.ZERO))return ot=U.normalize(ot,ot),z.asinClamped(Math.abs(Math.sin(U.angleBetween(ot,_e))))}}return 0},B=H=>{var N,j,G;if(b.value=[0,0,0],v.value=!1,!e.editable)return;g.value=H;const{viewer:J,drawingFabInstance:U}=a,z=U==null?void 0:U.proxy;if(H==="move")c.value=u.value.drawingTipEditing,d.value=Me.Drawing,E.value=y.value,h.value=!0,V=Object.assign({},$.value[E.value._vcPolylineIndx]),z.editingActionName=l;else if(H==="remove"){const K=y.value._vcPolylineIndx;$.value.splice(K,1)}else{const K=y.value._vcPolylineIndx,Q=$.value[K];(G=(j=(N=e.editorOpts)==null?void 0:N[H])==null?void 0:j.callback)==null||G.call(j,K,Q)}s("editorEvt",{type:H,name:l,renderDatas:$,index:y.value._vcPolylineIndx,pointIndex:y.value._index,point:y.value},J)},F=()=>{$.value=[],T()},q=H=>{var N,j,G,J,U,z,K,Q;const{viewer:ie}=a,Y=ie.scene.frameState.mapProjection.ellipsoid.cartesianToCartographic(H.position,{});return Cesium.defined(Y)?`${r("vc.measurement.point.lng")}${gt.angleToString(Y.longitude,(N=e.measureUnits)==null?void 0:N.angleUnits,e.locale,(j=e.decimals)==null?void 0:j.lng)}
${r("vc.measurement.point.lat")}${gt.angleToString(Y.latitude,(G=e.measureUnits)==null?void 0:G.angleUnits,e.locale,(J=e.decimals)==null?void 0:J.lat)}
${r("vc.measurement.point.height")}${gt.distanceToString(H.height,(U=e.measureUnits)==null?void 0:U.distanceUnits,e.locale,(z=e.decimals)==null?void 0:z.height)}
${r("vc.measurement.point.slope")}${gt.angleToString(H.slope,(K=e.measureUnits)==null?void 0:K.slopeUnits,e.locale,(Q=e.decimals)==null?void 0:Q.slope)}`:""};if(e.preRenderDatas&&e.preRenderDatas.length){const{viewer:H}=a;e.preRenderDatas.forEach(N=>{const j={drawStatus:Me.AfterDraw,show:!0,position:tt(N),lng:0,lat:0,height:0,slope:0,pointOpts:{},labelOpts:{},billboardOpts:{}},G=Cesium.Cartographic.fromCartesian(j.position,H.scene.globe.ellipsoid);j.positionDegrees=[Cesium.Math.toDegrees(G.longitude),Cesium.Math.toDegrees(G.latitude),G.height],A(j),$.value.push(j)})}Ke(()=>{m.forEach(H=>H()),m=[]});const Z={renderDatas:$,startNew:C,stop:T,clear:F,handleMouseClick:_,handleMouseMove:P};return Object.assign(n.proxy,Z),()=>{var H,N,j;const{createGuid:G}=Cesium,J=[],U=[],z=[],K=[];if($.value.forEach((Q,ie)=>{var Y;const oe=Object.assign({},e.pointOpts,Q.pointOpts);U.push({position:Q.position,id:G(),_vcPolylineIndx:ie,...oe,show:Q.show&&((Y=e.pointOpts)==null?void 0:Y.show)||e.editable||Q.drawStatus===Me.Drawing});const le=Object.assign({},e.labelOpts,Q.labelOpts);if(e.showLabel)if(i==="VcDrawingPin"){const fe=Object.assign({},e.billboardOpts,Q.billboardOpts);K.push({position:Q.position,id:G(),_vcPolylineIndx:ie,...fe}),le.text&&z.push({position:Q.position,id:G(),...le})}else z.push({position:Q.position,id:G(),text:q(Q),...le})}),J.push(S(Eo,{enableMouseEvent:e.enableMouseEvent,points:U,onMouseover:w,onMouseout:O,onReady:M})),J.push(S(_o,{enableMouseEvent:e.enableMouseEvent,labels:z,onReady:k})),i==="VcDrawingPin"&&J.push(S(Pc,{enableMouseEvent:e.enableMouseEvent,billboards:K})),(H=e.drawtip)!=null&&H.show&&h.value){const{viewer:Q}=a;J.push(S(Pn,{position:p.value,pixelOffset:(N=e.drawtip)==null?void 0:N.pixelOffset,teleport:{to:Q.container}},()=>S("div",{class:"vc-drawtip vc-tooltip--style"},c.value)))}if(v.value){const Q=[];if(y.value){const Y=e.editorOpts;for(const oe in Y)if(!Array.isArray(Y[oe])&&typeof Y[oe]!="number"){const le={...Y[oe]};delete le.color,Q.push(S(li,{style:{color:Y[oe].color,background:Y[oe].background},...le,onclick:B.bind(void 0,oe)},()=>S(Dt,{...Y[oe].tooltip},()=>{var fe;return S("strong",null,((fe=Y[oe].tooltip)==null?void 0:fe.tip)||r(`vc.drawing.editor.${oe}`))})))}}const{viewer:ie}=a;J.push(S(Pn,{position:b.value,pixelOffset:(j=e.editorOpts)==null?void 0:j.pixelOffset,teleport:{to:ie.container},onMouseenter:I,onMouseleave:R},()=>S("div",{class:"vc-editor"},Q)))}return S(qn,{ref:x,show:e.show,onReady:D},()=>J)}}var Jx=X("VcMeasurementPoint",ee({name:"VcMeasurementPoint",props:{...Ht,measureUnits:Object,labelOpts:Object,locale:String,decimals:Object,heightReference:Number,showLabel:Boolean},emits:xt,setup(e,t){return Sc(e,t,"VcMeasurementPoint")}})),Xx=X("VcMeasurementArea",ee({name:"VcMeasurementArea",props:{...Ht,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:xt,setup(e,t){return Po(e,t,"VcMeasurementArea")}})),Yx=X("VcMeasurementRectangle",ee({name:"VcMeasurementRectangle",props:{...Ht,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:xt,setup(e,t){return dn(e,t,"VcMeasurementRectangle")}})),Kx=X("VcMeasurementRegular",ee({name:"VcMeasurementRegular",props:{...Ht,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:xt,setup(e,t){return dn(e,t,"VcMeasurementRegular")}}));function Tc(e,t,i,n,o,r,a){i.cesiumEvents=[];const s=ze(e,t,i);if(s===void 0)return;const{t:l}=_t(),{$services:c}=s,{emit:u}=t,d=te(!1),h=xe({}),p=gi(e),v=te(null),b=te(null),y=te(!1),E=te(null);let x,g;const w=(B,F)=>{var q,Z;const H=g==null?void 0:g.cmpRef.value;(q=H==null?void 0:H.handleMouseClick)==null||q.call(H,B.position,F);let N;const j=i.proxy;if(j.editingActionName&&(N=C(j.editingActionName)),N&&N!==g){const G=N.cmpRef.value;(Z=G==null?void 0:G.handleMouseClick)==null||Z.call(G,B.position,F)}},O=(B,F)=>{var q,Z;const H=g==null?void 0:g.cmpRef.value;(q=H==null?void 0:H.handleMouseMove)==null||q.call(H,B.endPosition,F);let N;const j=i.proxy;if(j.editingActionName&&(N=C(j.editingActionName)),N&&N!==g){const G=N.cmpRef.value;(Z=G==null?void 0:G.handleMouseMove)==null||Z.call(G,B.endPosition,F)}},I=(B,F)=>{var q,Z;const H=g==null?void 0:g.cmpRef.value;(q=H==null?void 0:H.handleDoubleClick)==null||q.call(H,B.position,F);let N;const j=i.proxy;if(j.editingActionName&&(N=C(j.editingActionName)),N&&N!==g){const G=N.cmpRef.value;(Z=G==null?void 0:G.handleDoubleClick)==null||Z.call(G,B.position,F)}},{activate:R,deactivate:D,destroy:M,isActive:k}=Qu(c,{handleMouseClick:w,handleMouseMove:O,handleDoubleClick:I});i.createCesiumObject=async()=>(d.value=!0,x=new ed,n.value),i.mount=async()=>(V(),y.value=!0,R(),!0),i.unmount=async()=>(g&&(f(g),g=void 0),D(),M(),y.value=!1,!0);const $=(B,F,q)=>{const{Cesium3DTileFeature:Z,Cesium3DTileset:H,Cartesian3:N,defined:j,Model:G,Ray:J}=Cesium;if(Cesium.SuperMapVersion)return B.pickPosition(F);let U;const z={},K=new J;if(B.pickPositionSupported){x.hide(B);const Q=B.pick(F,1,1);if(x.restore(B),j(Q)&&(Q instanceof Z||Q.primitive instanceof H||Q.primitive instanceof G||Cesium.S3MTilesLayer&&Q.primitive instanceof Cesium.S3MTilesLayer)&&(U=B.pickPosition(F,z),j(U)))return N.clone(U,q)}if(j(B.globe)){const Q=B.camera.getPickRay(F,K);return U=B.globe.pick(Q,B,z),j(U)?N.clone(U,q):void 0}},V=()=>{var B;const F=p.style.value;h.left=F.left,h.top=F.top,h.transform=F.transform;const q=p.attach.value,Z=(B=ve(b))==null?void 0:B.$el;if(Z!==void 0){const H=Z.getBoundingClientRect();F.width=`${H.width}px`,F.height=`${H.height}px`,(q.bottom||q.top)&&!q.left&&!q.right&&(F.left="50%",F.transform="translate(-50%, 0)"),(q.left||q.right)&&!q.top&&!q.bottom&&(F.top="50%",F.transform="translate(0, -50%)")}Object.assign(h,F)},m=te(null),f=B=>{var F;const{viewer:q}=c;if(Ci(B)&&(B=C(B)),!B){s.logger.error("Invalid drawingActionOption or drawingActionOption name");return}const Z=T(B.name);if(Z!==-1){if(g!==void 0){g.actionOpts.color=m.value||"";const H=g.cmpRef.value;(F=H.stop)==null||F.call(H),g.isActive=!1,u("activeEvt",{type:g.name,option:g,isActive:!1},q)}(g==null?void 0:g.name)===(B==null?void 0:B.name)?(g=void 0,n.value[Z].actionOpts.color=m.value||"red"):Be(()=>{n.value[Z].cmpRef.value.startNew(),m.value=n.value[Z].actionOpts.color,n.value[Z].actionOpts.color=e.activeColor,n.value[Z].isActive=!0,g=n.value[Z],u("activeEvt",{type:g.name,option:g,isActive:!0},q)})}},C=B=>n.value.find(F=>F.name===B),T=B=>n.value.findIndex(F=>F.name===B),_=B=>{B?R():(g&&f(g),D()),o.modelValue=B,u("fabUpdated",B)},P=()=>{n.value.forEach(F=>{var q;(q=F.cmpRef.value)==null||q.clear()}),g&&f(g);const{viewer:B}=c;u("clearEvt",{type:"clear",option:r},B)},A=()=>Mn(s.getServices(),{get drawingFabInstance(){return i},get selectedDrawingActionInstance(){return g},get getWorldPosition(){return $},get drawingHandlerActive(){return k}}),L=({cesiumObject:B})=>{B._vcId=a};return Gi(an,A()),Object.assign(i.proxy,{clearAll:P,deactivate:D,activate:R,toggleAction:f,getFabRef:()=>b.value,getDrawingActionInstance:C,getDrawingActionInstances:()=>n.value,getSelectedDrawingActionInstance:()=>g}),{renderContent:()=>{if(d.value){const B=[],F=[];n.value.forEach(Z=>{B.push(S(dr,{ref:Z.actionRef,style:Z.actionStyle,class:Z.actionClass,...Z.actionOpts,onClick:()=>{f(Z)}},()=>S(Dt,{...Z.actionOpts.tooltip},()=>S("strong",null,Z.tip)))),Z.cmp&&F.push(S(Z.cmp,{ref:Z.cmpRef,editable:e.editable,clampToGround:e.clampToGround,mode:e.mode,onDrawEvt:(H,N)=>{u("drawEvt",H,N)},onEditorEvt:(H,N)=>{u("editorEvt",H,N)},onMouseEvt:(H,N)=>{u("mouseEvt",H,N)},...Z.cmpOpts}))}),n.value.length&&B.push(S(dr,{style:{background:r.color,color:r.textColor},class:"vc-draw-button vc-draw-clear",...r,onClick:P},()=>S(Dt,{...r.tooltip},()=>S("strong",null,r.tooltip.tip||l(`vc.${a}.clear.tip`)))));const q=[];return y.value&&q.push(S("div",{ref:v,class:"vc-drawings-container "+p.classes.value,style:h},t.slots.body!==void 0?t.slots.body(n.value):S(Fl,{ref:b,class:"vc-draw-button",style:{background:o.color,color:o.textColor},...o,"onUpdate:modelValue":_},{default:()=>B,tooltip:()=>S(Dt,{...o.tooltip},()=>S("strong",null,o.tooltip.tip||(o.modelValue?l("vc.drawing.collapse"):l("vc.drawing.expand"))))}))),q.push(S(qn,{ref:E,show:e.show,onReady:L},()=>F)),q}else return ne("v-if")}}}const eO={...xt,fabUpdated:e=>!0,clearEvt:(e,t)=>!0};var Fr=ee({name:"VcMeasurements",props:$m,emits:eO,setup(e,t){var i;const n=ae();n.cesiumClass="VcMeasurements";const{t:o}=_t(),r=xe(Object.assign({},it.clearActionOpts,e.clearActionOpts)),a=xe(Object.assign({},it.mainFabOpts,e.mainFabOpts)),s=xe(Object.assign({},it.fabActionOpts,e.fabActionOpts)),l=xe(Object.assign({},it.distanceActionOpts,_("distanceActionOpts"))),c=xe(lt(Ge(it.distanceMeasurementOpts),e.distanceMeasurementOpts)),u=xe(Object.assign({},it.componentDistanceActionOpts,_("componentDistanceActionOpts"))),d=xe(lt(Ge(it.componentDistanceMeasurementOpts),e.componentDistanceMeasurementOpts)),h=xe(Object.assign({},it.polylineActionOpts,_("polylineActionOpts"))),p=xe(lt(Ge(it.polylineMeasurementOpts),e.polylineMeasurementOpts)),v=xe(Object.assign({},it.horizontalActionOpts,_("horizontalActionOpts"))),b=xe(lt(Ge(it.horizontalMeasurementOpts),e.horizontalMeasurementOpts)),y=xe(Object.assign({},it.verticalActionOpts,_("verticalActionOpts"))),E=xe(lt(Ge(it.verticalMeasurementOpts),e.verticalMeasurementOpts)),x=xe(Object.assign({},it.heightActionOpts,_("heightActionOpts"))),g=xe(lt(Ge(it.heightMeasurementOpts),e.heightMeasurementOpts)),w=xe(Object.assign({},it.areaActionOpts,_("areaActionOpts"))),O=xe(lt(Ge(it.areaMeasurementOpts),e.areaMeasurementOpts)),I=xe(Object.assign({},it.pointActionOpts,_("pointActionOpts"))),R=xe(lt(Ge(it.pointMeasurementOpts),e.pointMeasurementOpts)),D=xe(Object.assign({},it.rectangleActionOpts,_("rectangleActionOpts"))),M=xe(lt(Ge(it.rectangleMeasurementOpts),e.rectangleMeasurementOpts)),k=xe(Object.assign({},it.regularActionOpts,_("regularActionOpts"))),$=xe(lt(Ge(it.regularMeasurementOpts),e.regularMeasurementOpts)),V=xe(Object.assign({},it.circleActionOpts,_("circleActionOpts"))),m=xe(lt(Ge(it.circleMeasurementOpts),e.circleMeasurementOpts)),f={};f.distanceActionOpts=l,f.distanceMeasurementOpts=c,f.componentDistanceActionOpts=u,f.componentDistanceMeasurementOpts=d,f.polylineActionOpts=h,f.polylineMeasurementOpts=p,f.horizontalActionOpts=v,f.horizontalMeasurementOpts=b,f.verticalActionOpts=y,f.verticalMeasurementOpts=E,f.heightActionOpts=x,f.heightMeasurementOpts=g,f.areaActionOpts=w,f.areaMeasurementOpts=O,f.pointActionOpts=I,f.pointMeasurementOpts=R,f.rectangleActionOpts=D,f.rectangleMeasurementOpts=M,f.regularActionOpts=k,f.regularMeasurementOpts=$,f.circleActionOpts=V,f.circleMeasurementOpts=m,f.clearActionOpts=r;const C=re(()=>e.measurements.map(P=>({name:P,type:"measurement",actionStyle:{background:f[`${Vt(P)}ActionOpts`].color,color:f[`${Vt(P)}ActionOpts`].textColor},actionClass:`vc-measure-${P} vc-measure-button`,actionRef:te(null),actionOpts:f[`${Vt(P)}ActionOpts`],cmp:T(P),cmpRef:te(null),cmpOpts:f[`${Vt(P)}MeasurementOpts`],tip:f[`${Vt(P)}ActionOpts`].tooltip.tip||o(`vc.measurement.${P}.tip`),isActive:!1})));function T(P){switch(P){case"distance":case"component-distance":return Hx;case"polyline":return Wx;case"horizontal":return qx;case"vertical":return Qx;case"height":return Zx;case"point":return Jx;case"area":return Xx;case"rectangle":return Yx;case"regular":case"circle":return Kx;default:return}}function _(P){return To(it[P],e[P])?s:Object.assign({},s,e[P])}return(i=Tc(e,t,n,C,a,r,"measurement"))==null?void 0:i.renderContent}});Fr.install=e=>{e.component(Fr.name,Fr)};const Kv=Fr,cM=X("VcMeasurements",Kv),tO=Object.assign({},yt,{icon:"vc-icons-drawing-point"}),iO=Object.assign({},yt,{icon:"vc-icons-drawing-polyline"}),nO=Object.assign({},yt,{icon:"vc-icons-drawing-polygon"}),oO=Object.assign({},yt,{icon:"vc-icons-drawing-rectangle"}),aO=Object.assign({},yt,{icon:"vc-icons-drawing-pin"}),rO=Object.assign({},Mr,{pointOpts:Object.assign({},wn,{show:!1}),billboardOpts:LE,labelOpts:Object.assign({},bt,{pixelOffset:[0,-30],verticalOrigin:1}),showLabel:!0}),sO=Object.assign({},{}),lO=Object.assign({},yt,{direction:"right",icon:"vc-icons-drawing-button",activeIcon:"vc-icons-drawing-button",verticalActionsAlign:"center",hideIcon:!1,persistent:!1,modelValue:!0,hideActionOnClick:!1,color:"info"}),ef=["pin","point","polyline","polygon","rectangle","regular","circle"],cO=e=>{let t=!0;return e.forEach(i=>{ef.includes(i)||(console.error(`VueCesium: unknown drawing type: ${i}`),t=!1)}),t},tf=X("drawingsProps",{...pc,drawings:{type:Array,default:()=>ef,validator:cO},mainFabOpts:{type:Object,default:()=>lO},fabActionOpts:{type:Object,default:()=>sO},pinActionOpts:{type:Object,default:()=>aO},pinDrawingOpts:{type:Object,default:()=>rO},pointActionOpts:{type:Object,default:()=>tO},pointDrawingOpts:{type:Object,default:()=>Mr},polylineActionOpts:{type:Object,default:()=>iO},polylineDrawingOpts:{type:Object,default:()=>Bm},polygonActionOpts:{type:Object,default:()=>nO},polygonDrawingOpts:{type:Object,default:()=>Sr},rectangleActionOpts:{type:Object,default:()=>oO},rectangleDrawingOpts:{type:Object,default:()=>mc},circleActionOpts:{type:Object,default:()=>jm},circleDrawingOpts:{type:Object,default:()=>FE},regularActionOpts:{type:Object,default:()=>Lm},regularDrawingOpts:{type:Object,default:()=>kE}}),Rt=wi(tf);var uO=X("VcDrawingPin",ee({name:"VcDrawingPin",props:{...Ht,billboardOpts:Object,labelOpts:Object,heightReference:Number,showLabel:Boolean},emits:xt,setup(e,t){return Sc(e,t,"VcDrawingPin")}})),dO=X("VcDrawingPoint",ee({name:"VcDrawingPoint",props:{...Ht,heightReference:Number,labelOpts:Object,showLabel:Boolean},emits:xt,setup(e,t){return Sc(e,t,"VcDrawingPoint")}})),hO=X("VcDrawingPolyline",ee({name:"VcDrawingPolyline",props:{...Ht,polylineOpts:Object,primitiveOpts:Object,loop:Boolean,clampToGround:Boolean,showLabel:Boolean,showDistanceLabel:Boolean,showAngleLabel:Boolean,labelOpts:Object,labelsOpts:Object,autoUpdateLabelPosition:Boolean},emits:xt,setup(e,t){return Po(e,t,"VcDrawingPolyline")}})),mO=X("VcDrawingPolygon",ee({name:"VcDrawingPolygon",props:{...Ht,polylineOpts:Object,primitiveOpts:Object,polygonOpts:Object,loop:Boolean,clampToGround:Boolean,showLabel:Boolean,showDistanceLabel:Boolean,showAngleLabel:Boolean,labelOpts:Object,labelsOpts:Object,autoUpdateLabelPosition:Boolean},emits:xt,setup(e,t){return Po(e,t,"VcDrawingPolygon")}})),nf=X("VcDrawingRegular",ee({name:"VcDrawingRegular",props:{...Ht,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:xt,setup(e,t){return dn(e,t,"VcDrawingRegular")}})),pO=X("VcDrawingRectangle",ee({name:"VcDrawingRectangle",props:{...Ht,polylineOpts:Object,primitiveOpts:Object,polygonOpts:Object,clampToGround:Boolean,showLabel:Boolean,showDistanceLabel:Boolean,showAngleLabel:Boolean,labelOpts:Object,labelsOpts:Object,loop:Boolean,autoUpdateLabelPosition:Boolean},emits:xt,setup(e,t){return dn(e,t,"VcDrawingRectangle")}}));const vO={...xt,fabUpdated:e=>!0,clearEvt:(e,t)=>!0};var kr=ee({name:"VcDrawings",props:tf,emits:vO,setup(e,t){var i;const n=ae();n.cesiumClass="VcDrawings";const{t:o}=_t(),r={},a=xe(Object.assign({},Rt.clearActionOpts,e.clearActionOpts)),s=xe(Object.assign({},Rt.mainFabOpts,e.mainFabOpts)),l=xe(Object.assign({},Rt.fabActionOpts,e.fabActionOpts)),c=xe(Object.assign({},Rt.pointActionOpts,M("pointActionOpts"))),u=xe(lt(Ge(Rt.pointDrawingOpts),e.pointDrawingOpts)),d=xe(Object.assign({},Rt.polylineActionOpts,M("polylineActionOpts"))),h=xe(lt(Ge(Rt.polylineDrawingOpts),e.polylineDrawingOpts)),p=xe(Object.assign({},Rt.polygonActionOpts,M("polygonActionOpts"))),v=xe(lt(Ge(Rt.polygonDrawingOpts),e.polygonDrawingOpts)),b=xe(Object.assign({},Rt.rectangleActionOpts,M("rectangleActionOpts"))),y=xe(lt(Ge(Rt.rectangleDrawingOpts),e.rectangleDrawingOpts)),E=xe(Object.assign({},Rt.circleActionOpts,M("circleActionOpts"))),x=xe(lt(Ge(Rt.circleDrawingOpts),e.circleDrawingOpts)),g=xe(Object.assign({},Rt.regularActionOpts,M("regularActionOpts"))),w=xe(lt(Ge(Rt.regularDrawingOpts),e.regularDrawingOpts)),O=xe(Object.assign({},Rt.pinActionOpts,M("pinActionOpts"))),I=xe(lt(Ge(Rt.pinDrawingOpts),e.pinDrawingOpts));r.pointActionOpts=c,r.pointDrawingOpts=u,r.polylineActionOpts=d,r.polylineDrawingOpts=h,r.polygonActionOpts=p,r.polygonDrawingOpts=v,r.rectangleActionOpts=b,r.rectangleDrawingOpts=y,r.circleActionOpts=E,r.circleDrawingOpts=x,r.regularActionOpts=g,r.regularDrawingOpts=w,r.pinActionOpts=O,r.pinDrawingOpts=I,r.clearActionOpts=a;const R=re(()=>e.drawings.map(k=>({name:k,type:"drawing",actionStyle:{background:r[`${Vt(k)}ActionOpts`].color,color:r[`${Vt(k)}ActionOpts`].textColor},actionClass:`vc-draw-${k} vc-draw-button`,actionRef:te(null),actionOpts:r[`${Vt(k)}ActionOpts`],cmp:D(k),cmpRef:te(null),cmpOpts:r[`${Vt(k)}DrawingOpts`],tip:r[`${Vt(k)}ActionOpts`].tooltip.tip||o(`vc.drawing.${Vt(k)}.tip`),isActive:!1})));function D(k){switch(k){case"pin":return uO;case"point":return dO;case"polyline":return hO;case"polygon":return mO;case"rectangle":return y.regular?nf:pO;case"circle":case"regular":return nf;default:return}}function M(k){return To(Rt[k],e[k])?l:Object.assign({},l,e[k])}return(i=Tc(e,t,n,R,s,a,"drawing"))==null?void 0:i.renderContent}});kr.install=e=>{e.component(kr.name,kr)};const of=kr,uM=X("VcDrawings",of);class fO{constructor(t){const{Resource:i,defaultValue:n,Credit:o,Event:r}=Cesium;this._url=t.url;const a=i.createIfNeeded(this._url);a.appendForwardSlash(),this._ready=!1,this._resource=a,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 o(s)),this._credit=s,this.enablePickFeatures=n(t.enablePickFeatures,!1),this._hasAlphaChannel=n(t.hasAlphaChannel,!0),this._errorEvent=new r,this._readyPromise=Ko(),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,o){if(!this.ready)throw new Cesium.DeveloperError("requestImage must not be called before the imagery provider is ready.");return Cesium.ImageryProvider.loadImage(this,gO.call(this,t,i,n,o))}pickFeatures(t,i,n,o,r){}}function gO(e,t,i,n){let o=this._url;const r=this._subdomains;return o=o.replace("{domain}",this._domain).replace("{s}",r[(e+t+i)%r.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:o,request:n})}const yO=X("amapImageryProviderProps",{url:{type:String,default:"https://{domain}{s}.is.autonavi.com/appmaptile?lang={lang}&size=1&style={style}&scl={scl}&ltype={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"},...Tt,...mi,...si,...Lt,...Vi,...Fn});var af=ee({name:"VcImageryProviderAmap",props:yO,emits:ht,setup(e,t){const i=ae();i.cesiumClass="AMapImageryProvider";const n=dt(e,t,i);if(n!==void 0)return i.createCesiumObject=async()=>{Cesium.AMapImageryProvider=Cesium.AMapImageryProvider||fO,n.unwatchFns.length===0&&n.setPropsWatcher(!0);const o=n.transformProps(e);return new Cesium.AMapImageryProvider(o)},()=>{var o;return ne(se(((o=i.proxy)==null?void 0:o.$options.name)||""))}}});const bO=X("arcgisImageryProviderProps",{url:{type:[String,Object],default:"https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"},...As,...No,usePreCachedTilesIfAvailable:{type:Boolean,default:!0},...Ds,...Za,...Lt,...Vi,...Ne,...Tt,...Wi,...qi,...si});var rf=ee({name:"VcImageryProviderArcgis",props:bO,emits:ht,setup(e,t){const i=ae();return i.cesiumClass="ArcGisMapServerImageryProvider",dt(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});class nn{constructor(t,i){isNaN(t)&&(t=isNaN(t)?0:t),Ci(t)&&(t=parseFloat(t)),isNaN(i)&&(i=isNaN(i)?0:i),Ci(i)&&(i=parseFloat(i)),this.lng=t,this.lat=i}equals(t){return t&&this.lat===t.lat&&this.lng===t.lng}}nn.isInRange=function(e){return e&&e.lng<=180&&e.lng>=-180&&e.lat<=74&&e.lat>=-74};class sf{constructor(t,i){this.x=t||0,this.y=i||0}equals(t){return t&&t.x===this.x&&t.y===this.y}}const je=class _a{lngLatToMercator(t,i){return _a.convertLL2MC(t)}lngLatToPoint(t){const i=_a.convertLL2MC(t);return new sf(i.lng,i.lat)}mercatorToLngLat(t,i){return _a.convertMC2LL(t)}pointToLngLat(t){const i=new nn(t.x,t.y);return _a.convertMC2LL(i)}pointToPixel(t,i,n,o,r){if(!t)return;t=this.lngLatToMercator(t,r),n=this.lngLatToMercator(n);const a=this.getZoomUnits(i),s=Math.round((t.lng-n.lng)/a+o.width/2),l=Math.round((n.lat-t.lat)/a+o.height/2);return new sf(s,l)}pixelToPoint(t,i,n,o,r){if(!t)return;const a=this.getZoomUnits(i),s=n.lng+a*(t.x-o.width/2),l=n.lat-a*(t.y-o.height/2),c=new nn(s,l);return this.mercatorToLngLat(c,r)}getZoomUnits(t){return Math.pow(2,18-t)}};je.EARTHRADIUS=637099681e-2,je.MCBAND=[1289059486e-2,836237787e-2,5591021,348198983e-2,167804312e-2,0],je.LLBAND=[75,60,45,30,15,0],je.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]],je.LL2MC=[[-.0015702102444,111320.7020616939,0x60e374c3105a3,-0x24bb4115e2e164,0x5cc55543bb0ae8,-0x7ce070193f3784,0x5e7ca61ddf8150,-0x261a578d8b24d0,0x665d60f3742ca,82.5],[.0008277824516172526,111320.7020463578,6477955746671607e-7,-4082003173641316e-6,1077490566351142e-5,-1517187553151559e-5,1205306533862167e-5,-5124939663577472e-6,9133119359512032e-7,67.5],[.00337398766765,111320.7020202162,4481351045890365e-9,-2339375119931662e-8,7968221547186455e-8,-1159649932797253e-7,9723671115602145e-8,-4366194633752821e-8,8477230501135234e-9,52.5],[.00220636496208,111320.7020209128,51751.86112841131,3796837749470245e-9,992013.7397791013,-122195221711287e-8,1340652697009075e-9,-620943.6990984312,144416.9293806241,37.5],[-.0003441963504368392,111320.7020576856,278.2353980772752,2485758690035394e-9,6070.750963243378,54821.18345352118,9540.606633304236,-2710.55326746645,1405.483844121726,22.5],[-.0003218135878613132,111320.7020701615,.00369383431289,823725.6402795718,.46104986909093,2351.343141331292,1.58060784298199,8.77738589078284,.37238884252424,7.45]],je.getDistanceByMC=function(e,t){if(!e||!t||(e=je.convertMC2LL(e),!e))return 0;const i=je.toRadians(e.lng),n=je.toRadians(e.lat);if(t=je.convertMC2LL(t),!t)return 0;const o=je.toRadians(t.lng),r=je.toRadians(t.lat);return je.getDistance(i,o,n,r)},je.getDistanceByLL=function(e,t){if(!e||!t)return 0;e.lng=je.getLoop(e.lng,-180,180),e.lat=je.getRange(e.lat,-74,74),t.lng=je.getLoop(t.lng,-180,180),t.lat=je.getRange(t.lat,-74,74);const i=je.toRadians(e.lng),n=je.toRadians(e.lat),o=je.toRadians(t.lng),r=je.toRadians(t.lat);return je.getDistance(i,o,n,r)},je.convertMC2LL=function(e){let t;const i=new nn(Math.abs(e.lng),Math.abs(e.lat));for(let o=0;o<je.MCBAND.length;o++)if(i.lat>=je.MCBAND[o]){t=je.MC2LL[o];break}const n=je.convertor(e,t);return new nn(n==null?void 0:n.lng.toFixed(6),n==null?void 0:n.lat.toFixed(6))},je.convertLL2MC=function(e){let t;e.lng=je.getLoop(e.lng,-180,180),e.lat=je.getRange(e.lat,-74,74);const i=new nn(e.lng,e.lat);for(let o=0;o<je.LLBAND.length;o++)if(i.lat>=je.LLBAND[o]){t=je.LL2MC[o];break}if(!t){for(let o=je.LLBAND.length-1;o>=0;o--)if(i.lat<=-je.LLBAND[o]){t=je.LL2MC[o];break}}const n=je.convertor(e,t);return new nn(n==null?void 0:n.lng.toFixed(2),n==null?void 0:n.lat.toFixed(2))},je.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 o=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,o*=e.lat<0?-1:1,new nn(i,o)},je.getDistance=function(e,t,i,n){return je.EARTHRADIUS*Math.acos(Math.sin(i)*Math.sin(n)+Math.cos(i)*Math.cos(n)*Math.cos(t-e))},je.toRadians=function(e){return Math.PI*e/180},je.toDegrees=function(e){return 180*e/Math.PI},je.getRange=function(e,t,i){return t!=null&&(e=Math.max(e,t)),i!=null&&(e=Math.min(e,i)),e},je.getLoop=function(e,t,i){for(;e>i;)e-=i-t;for(;e<t;)e+=i-t;return e};let CO=je;class wO{constructor(t){const{defaultValue:i,Ellipsoid:n,WebMercatorProjection:o,Cartesian2:r,Cartographic:a,Math:s,Rectangle:l}=Cesium;t=t||{},this._ellipsoid=i(t.ellipsoid,n.WGS84),this._projection=new o(this._ellipsoid);const c=new CO;this._projection.project=function(h,p){return p=p||{},t.projectionTransforms&&t.projectionTransforms.from!==t.projectionTransforms.to&&(t.projectionTransforms.to.toUpperCase()==="WGS84"?(p=Zu(s.toDegrees(h.longitude),s.toDegrees(h.latitude)),p=dl(p[0],p[1])):p=dl(s.toDegrees(h.longitude),s.toDegrees(h.latitude))),p[0]=Math.min(p[0],180),p[0]=Math.max(p[0],-180),p[1]=Math.min(p[1],74.000022),p[1]=Math.max(p[1],-71.988531),p=c.lngLatToPoint(new nn(p[0],p[1])),new r(p.x,p.y)},this._projection.unproject=function(h,p){return p=p||{},p=c.mercatorToLngLat(new nn(h.x,h.y)),p[0]=(p[0]+180)%360-180,t.projectionTransforms&&t.projectionTransforms.from!==t.projectionTransforms.to&&(t.projectionTransforms.to.toUpperCase()==="WGS84"?(p=ul(p.lng,p.lat),p=hl(p[0],p[1])):p=ul(p.lng,p.lat)),new a(Cesium.Math.toRadians(p[0]),Cesium.Math.toRadians(p[1]))},this._rectangleSouthwestInMeters=new r(-2003772637e-2,-1247410417e-2),this._rectangleNortheastInMeters=new r(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 h=0;h<19;h++)this.resolutions[h]=256*Math.pow(2,18-h)}getNumberOfXTilesAtLevel(t){return 1<<t}getNumberOfYTilesAtLevel(t){return 1<<t}rectangleToNativeRectangle(t,i){const{defined:n,Rectangle:o}=Cesium,r=this._projection,a=r.project(o.southwest(t)),s=r.project(o.northeast(t));return n(i)?(i.west=a.x,i.south=a.y,i.east=s.x,i.north=s.y,i):new o(a.x,a.y,s.x,s.y)}tileXYToNativeRectangle(t,i,n,o){const{defined:r,Rectangle:a}=Cesium,s=this.resolutions[n],l=t*s,c=(t+1)*s,u=((i=-i)+1)*s,d=i*s;return r(o)?(o.west=l,o.south=d,o.east=c,o.north=u,o):new a(l,d,c,u)}tileXYToRectangle(t,i,n,o){const{Cartesian2:r}=Cesium,a=this.tileXYToNativeRectangle(t,i,n,o),s=this._projection,l=s.unproject(new r(a.west,a.south)),c=s.unproject(new r(a.east,a.north));return a.west=l.longitude,a.south=l.latitude,a.east=c.longitude,a.north=c.latitude,a}positionToTileXY(t,i,n){const{Rectangle:o,defined:r,Cartesian2:a}=Cesium,s=this._rectangle;if(!o.contains(s,t))return;const l=this._projection.project(t);if(!r(l))return;const c=this.resolutions[i],u=Math.floor(l.x/c),d=-Math.floor(l.y/c);return r(n)?(n.x=u,n.y=d,n):new a(u,d)}get ellipsoid(){return this._ellipsoid}get rectangle(){return this._rectangle}get projection(){return this._projection}}class _O{constructor(t){const{Resource:i,defaultValue:n,Credit:o,Event:r}=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&showtext={showtext}":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 a=i.createIfNeeded(this._url);a.appendForwardSlash(),this._ready=!1,this._resource=a,this._tileDiscardPolicy=t.tileDiscardPolicy,this._tileWidth=256,this._tileHeight=256,this._minimumLevel=t.minimumLevel||0,this._maximumLevel=t.maximumLevel||18,this._tilingScheme=new wO(t),this._rectangle=n(t.rectangle,this._tilingScheme.rectangle);let s=t.credit;typeof s=="string"&&(s=new o(s)),this._credit=s,this.enablePickFeatures=n(t.enablePickFeatures,!1),this._hasAlphaChannel=n(t.hasAlphaChannel,!0),this._errorEvent=new r,this._ready=!0,this._labelStyle=t.labelStyle||"web2D",this._showtext=t.showtext||"1",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 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,o){if(!this.ready)throw new Cesium.DeveloperError("requestImage must not be called before the imagery provider is ready.");return Cesium.ImageryProvider.loadImage(this,EO.call(this,t,i,n,o))}pickFeatures(t,i,n,o,r){}}function EO(e,t,i,n){let o=this._url;const r=this._subdomains;return o=o.replace("{s}",r[(e+t+i)%r.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("{ak}",this._ak).replace("{time}",String(new Date().getTime())).replace("{udt}",String(new Date().getTime())).replace("{showtext}",this._showtext),this._resource.getDerivedResource({url:o,request:n})}const PO=X("baiduImageryProviderProps",{...Ei,...Lt,...Ne,...No,...Tt,...mi,...si,projectionTransforms:{type:[Boolean,Object],default:()=>({from:"BD09",to:"WGS84"})},scale:{type:String,default:"2"},ak:{type:String,default:"5ieMMexWmzB9jivTq6oCRX9j"},subdomains:{type:Array,default:()=>["0","1","2","3"]},mapStyle:{type:String,default:"vec"},qt:{type:String,default:"vtile"},styles:{type:String,default:"pl"},showtext:{type:String,default:"1"}});var lf=ee({name:"VcImageryProviderBaidu",props:PO,emits:ht,setup(e,t){const i=ae();i.cesiumClass="BaiduMapImageryProvider";const n=dt(e,t,i);if(n!==void 0)return i.createCesiumObject=async()=>{Cesium.BaiduMapImageryProvider=Cesium.BaiduMapImageryProvider||_O,n.unwatchFns.length===0&&n.setPropsWatcher(!0);const o=n.transformProps(e);return new Cesium.BaiduMapImageryProvider(o)},()=>{var o;return ne(se(((o=i.proxy)==null?void 0:o.$options.name)||""))}}});const xO=X("bingImageryProviderProps",{url:{type:[String,Object],default:"https://dev.virtualearth.net"},bmKey:String,tileProtocol:String,mapStyle:{type:String,default:"Aerial"},culture:{type:String,default:""},...Ne,...No});var cf=ee({name:"VcImageryProviderBing",props:xO,emits:ht,setup(e,t){const i=ae();return i.cesiumClass="BingMapsImageryProvider",dt(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const OO=X("googleImageryProviderProps",{...Ei,...Ne,...No,...Tt,metadata:Object});var uf=ee({name:"VcImageryProviderGoogle",props:OO,emits:ht,setup(e,t){const i=ae();return i.cesiumClass="GoogleEarthEnterpriseImageryProvider",dt(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const MO=X("gridImageryProviderProps",{...Vi,...Ne,cells:{type:Number,default:8},color:{type:[String,Object,Array],default:()=>[1,1,1,.4],watcherOptions:{cesiumObjectBuilder:Ie}},...Bu,glowWidth:{type:Number,default:6},backgroundColor:{type:[String,Array,Object],default:()=>[0,.5,0,.2],watcherOptions:{cesiumObjectBuilder:Ie}},...Wi,...qi,canvasSize:{type:Number,default:256}});var df=ee({name:"VcImageryProviderGrid",props:MO,emits:ht,setup(e,t){const i=ae();return i.cesiumClass="GridImageryProvider",dt(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const dM=X("ionImageryProviderProps",{});var hf=ee({name:"VcImageryProviderIon",props:{assetId:Number,...Ls,server:[String,Object]},emits:ht,setup(e,t){const i=ae();i.cesiumClass="IonImageryProvider";const n=dt(e,t,i);if(n!==void 0)return i.createCesiumObject=async()=>{const o=n.transformProps(e);return rn(Cesium.VERSION,"1.104")&&typeof Cesium[i.cesiumClass].fromAssetId=="function"?await Cesium.IonImageryProvider.fromAssetId(o.assetId,o):new Cesium.IonImageryProvider(o)},()=>{var o;return ne(se(((o=i.proxy)==null?void 0:o.$options.name)||""))}}});const SO=X("mapboxImageryProviderProps",{url:{type:[String,Object],default:"https://api.mapbox.com/styles/v1/"},username:{type:String,default:"mapbox"},styleId:String,...Ls,tilesize:{type:Number,default:512},scaleFactor:Boolean,...Ne,...mi,...si,...Lt,...Tt});var mf=ee({name:"VcImageryProviderMapbox",props:SO,emits:ht,setup(e,t){const i=ae();return i.cesiumClass="MapboxStyleImageryProvider",dt(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const TO=X("osmImageryProviderProps",{url:{type:String,default:"https://a.tile.openstreetmap.org"},...Bs,...Lt,...mi,...si,...Ne,credit:{type:[String,Object],default:"MapQuest, Open Street Map and contributors, CC-BY-SA"}});var pf=ee({name:"VcImageryProviderOsm",props:TO,emits:ht,setup(e,t){const i=ae();return i.cesiumClass="OpenStreetMapImageryProvider",dt(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const IO=X("singletileImageryProviderProps",{...Ei,...Lt,...Tt,...Ne,...Wi,...qi});var vf=ee({name:"VcImageryProviderSingletile",props:IO,emits:ht,setup(e,t){const i=ae();return i.cesiumClass="SingleTileImageryProvider",dt(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const Ca={NONE:0,STORING:1,STORED:2,FAILED:3};class AO{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((o,r)=>{i.onsuccess=a=>{n.db=a.target.result,n.version=n.db.version,n.cachestatus=n.cachestatus||{},o(n)},i.onupgradeneeded=a=>{n.db=a.target.result,n.version=n.db.version,o(n)},i.onerror=a=>{n.db=null,r("create database fail, error code : "+a.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 o=parseInt(this.db.version);this.db.close();const r=this,a=window.indexedDB.open(this.dbname,o+1);a.onupgradeneeded=s=>{const l=s.target.result;r.db=l;const c=l.createObjectStore(t,{keyPath:"id"});if(Cesium.defined(c)){c.createIndex("value","value",{unique:!1}),r.creatingTable=!1,r.cachestatus=r.cachestatus||{},r.cachestatus[t]={},r.db.close();const u=window.indexedDB.open(r.dbname);u.onsuccess=d=>{r.db=d.target.result,i(!0)}}else r.creatingTable=!1,i(!1)},a.onsuccess=s=>{s.target.result.close(),i(!0)},a.onerror=s=>{r.creatingTable=!1,n(!1)}}})}putElementInDB(t,i,n){return new Promise((o,r)=>{if(!Cesium.defined(this.db)){r(!1);return}const{cachestatus:a,db:s}=this;if(Cesium.defined(a[t])&&Cesium.defined(a[t][i]&&(a[t][i]===Ca.STORING||a[t][i]===Ca.STORED))){o(!1);return}if(s.objectStoreNames.contains(t)){a[t]=a[t]||{};try{const l=s.transaction([t],"readwrite").objectStore(t).add({id:i,value:n});a[t][i]=Ca.STORING,l.onsuccess=c=>{a[t][i]=Ca.STORED,o(!0)},l.onerror=c=>{a[t][i]=Ca.FAILED,o(!1)}}catch(l){r(null);return}}else this.createObjectStore(t).then(()=>{const l=s.transaction([t],"readwrite").objectStore(t).add({id:i,value:n});l.onsuccess=function(c){o(!0)},l.onerror=function(c){r(!1)}},()=>{r(!1)})})}getElementFromDB(t,i){return new Promise((n,o)=>{const{db:r}=this;if(!Cesium.defined(r)||!r.objectStoreNames.contains(t))return null;try{const a=r.transaction([t]).objectStore(t).get(i);a.onsuccess=s=>Cesium.defined(s.target.result)?n(s.target.result.value):o(null),a.onerror=s=>{o(null)}}catch(a){o(null)}})}updateElementInDB(t,i,n){return new Promise((o,r)=>{const{db:a}=this;if(!Cesium.defined(a)){o(!1);return}if(!a.objectStoreNames.contains(t)){o(!1);return}try{const s=a.transaction([t],"readwrite").objectStore(t).put({id:i,value:n});s.onsuccess=()=>{o(!0)},s.onerror=()=>{o(!1)}}catch(s){o(!1)}})}removeElementFromDB(t,i){return new Promise((n,o)=>{const{db:r}=this;if(!Cesium.defined(r)){n(!1);return}if(!r.objectStoreNames.contains(t)){n(!1);return}try{const a=r.transaction([t],"readwrite").objectStore(t).delete(i);a.onsuccess=()=>{n(!0)},a.onerror=()=>{n(!1)}}catch(a){n(!1)}})}clear(t){return new Promise((i,n)=>{const{db:o}=this;if(!Cesium.defined(o)){i(!1);return}if(!o.objectStoreNames.contains(t)){i(!1);return}try{const r=o.transaction([t],"readwrite").objectStore(t).clear();r.onsuccess=()=>{i(!0)},r.onerror=()=>{i(!1)}}catch(r){i(!1)}})}}class DO{constructor(t){const{appendForwardSlash:i,Credit:n,defaultValue:o,defined:r,DeveloperError:a,Event:s,Resource:l,Math:c}=Cesium;t=o(t,{});const{url:u}=t;if(!r(u))throw new a("options.url is required.");const d=u.substring(0,u.indexOf("datas"));this.tablename=u.substring(0,u.indexOf("datas/")+6,u.length);const h=this;new AO({name:d+this.tablename}).then(b=>{h._indexedDBScheduler=b}),this._indexedDBSetting={isOpen:!1,clear:()=>{h._indexedDBScheduler.clear(h.tablename)}},this.isSci=!1,this.isTileMap=!1;const p=i(u);if(p.indexOf("rest/maps")>-1)this.isTileMap=!0,this.layersID=t.layersID;else{if(!(p.indexOf("rest/realspace")>-1))throw new a("The url type is not supported!");this.isSci=!0,this.layersID=void 0}this._url=p,this._resource=l.createIfNeeded(p),this._transparent=o(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=o(t.minimumLevel,0),this._maximumLevel=t.maximumLevel,this._rectangle=void 0,this._tilingScheme=void 0,this._tileDiscardPolicy=t.tileDiscardPolicy,this._fRatio=o(t.ratio,c.DEGREES_PER_RADIAN/6378137),this._scales=[],this._coordUnit="DEGREE";let v=o(t.credit,new n("MapQuest, SuperMap iServer Imagery"));typeof v=="string"&&(v=new n(v)),this._credit=v,this._ready=!1,this._readyPromise=Ko(),this._options=t}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,o){const{defined:r,DeveloperError:a,ImageryProvider:s}=Cesium;if(!this.ready)throw new a("requestImage must not be called before the imagery provider is ready.");const l=LO.call(this,t,i,n),c=this._resource.getDerivedResource({url:l,request:o}),u=this;if(this._indexedDBSetting.isOpen){if(r(this._indexedDBScheduler)){const d=this._indexedDBScheduler.getElementFromDB(this.tablename,l);try{return d.then(h=>{if(r(h)){const p=new Image;return p.src=h,p}return s.loadImage(u,c)})}catch(h){return s.loadImage(u,c)}}}else return s.loadImage(this,c)}pickFeatures(t,i,n,o,r){}async init(){await jO.call(this)}}let ff={};const Ic=["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"],BO=[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 LO(e,t,i){let n;if(this.isTileMap){if(this._coordUnit==="DEGREE"){const o=Ic[i+1]||Ic[i];n=this._urlTemplate.replace("{x}",e).replace("{y}",t).replace("{scale}",o)}else if(this._coordUnit==="METER"){const o=Ic[i];n=this._urlTemplate.replace("{x}",e).replace("{y}",t).replace("{scale}",o)}}else n=this._urlTemplate.replace("{x}",e).replace("{y}",t).replace("{level}",i).replace("{fileExtension}",this._fileExtension);return n}async function jO(){const{Resource:e}=Cesium;if(this.isTileMap){const t=e.fetchJsonp({url:this._options.url+".jsonp",queryParameters:{f:"json"}});try{t.then(i=>{$O.call(this,i)})}catch(i){yf.call(this)}}else try{const t=await e.fetchText({url:this.url+"config"});kO.call(this,t)}catch(t){yf.call(this)}}function FO(e){for(let t=BO.length;t--;)if(e[t]<=e)return t}function kO(e){const t=RO.call(this,e),{defaultValue:i,defined:n,GeographicTilingScheme:o,Math:r,Rectangle:a}=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 o({ellipsoid:this._options.ellipsoid})),!n(this._rectangle)&&t.left&&t.right&&t.top&&t.bottom){const h=r.toRadians(t.left),p=r.toRadians(t.right),v=r.toRadians(t.bottom),b=r.toRadians(t.top);this._rectangle=new a(h,v,p,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(a.southwest(this._rectangle),this._minimumLevel),d=c.positionToTileXY(a.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 RO(e){e=new DOMParser().parseFromString(e,"application/xml");const t="http://www.supermap.com/SuperMapCache/sci3d",i=e.childNodes[0],n=Rr(i,"Levels",t),o=VO(n,"Level",t)||[],r=[];for(let b=0;b<o.length;b++)r.push(parseInt(o[b].textContent,10));const a=Rr(i,"Bounds",t),s=xo(a,"Left",t),l=xo(a,"Right",t),c=xo(a,"Top",t),u=xo(a,"Bottom",t),d=gf(i,"FileExtentName",t),h=xo(i,"CellWidth",t),p=xo(i,"CellHeight",t),v=gf(i,"CacheName",t);return this._name=v||"",{left:s,right:l,top:c,bottom:u,fileExtentName:d,levels:r,imageSizeWidth:h,imageSizeHeight:p}}function gf(e,t,i){const n=Rr(e,t,i);return Cesium.defined(n)?n.textContent.trim():void 0}function xo(e,t,i){const n=Rr(e,t,i);if(Cesium.defined(n)){const o=parseFloat(n.textContent);return isNaN(o)?void 0:o}}function Rr(e,t,i){if(Cesium.defined(e)){const n=e.childNodes,o=n.length;for(let r=0;r<o;r++){const a=n[r];if(a.localName===t&&i.indexOf(a.namespaceURI)!==-1)return a}}}function VO(e,t,i){if(Cesium.defined(e)){const n=[],o=e.getElementsByTagNameNS("*",t),r=o.length;for(let a=0;a<r;a++){const s=o[a];s.localName===t&&i.indexOf(s.namespaceURI)!==-1&&n.push(s)}return n}}function $O(e){const{Cartesian3:t,defaultValue:i,defined:n,GeographicTilingScheme:o,Math:r,Rectangle:a,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=FO(d)}if(l==="DEGREE")this._tilingScheme=new o,c.left=r.clamp(c.left,-180,180),c.bottom=r.clamp(c.bottom,-90,90),c.right=r.clamp(c.right,-180,180),c.top=r.clamp(c.top,-90,90),this._rectangle=a.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 h=new t(c.right,c.top,0);h.x=Math.min(20037508342789244e-9,h.x),h.y=Math.min(20037508342789244e-9,h.y),this._tilingScheme=new s;const p=this._tilingScheme.projection.unproject(d),v=this._tilingScheme.projection.unproject(h);this._rectangle=new a(p.longitude,p.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 yf(){const{TileProviderError:e,RuntimeError:t}=Cesium,i="An error occurred while accessing "+this._url+".";ff=e.reportError(ff,this,this._errorEvent,i,0,0,0,new Error(i)),this._readyPromise.reject(new t(i))}const NO=X("supermapImageryProviderProps",{url:String,...mi,...si,name:String,transparent:{type:Boolean,default:!0},credit:{type:[String,Object],default:"MapQuest, SuperMap iServer Imagery"},...Fn});var bf=ee({name:"VcImageryProviderSupermap",props:NO,emits:ht,setup(e,t){const i=ae();i.cesiumClass="SuperMapImageryProvider";const n=dt(e,t,i);if(n!==void 0)return i.createCesiumObject=async()=>{Cesium.SuperMapImageryProvider=Cesium.SuperMapImageryProvider||DO,n.unwatchFns.length===0&&n.setPropsWatcher(!0);const o=n.transformProps(e),r=new Cesium.SuperMapImageryProvider(o);return Cesium.SuperMapVersion||await r.init(),r},()=>{var o;return ne(se(((o=i.proxy)==null?void 0:o.$options.name)||""))}}});const Cf={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 zO{constructor(t){const{Resource:i,defaultValue:n,Credit:o,Event:r}=Cesium;this._subdomains=t.subdomains||["1","2","3"],this._url=t.url||[t.protocol||"",Cf[t.mapStyle]||Cf.vector].join("");const a=i.createIfNeeded(this._url);a.appendForwardSlash(),this._ready=!1,this._resource=a,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 o(s)),this._credit=s,this.enablePickFeatures=n(t.enablePickFeatures,!1),this._hasAlphaChannel=n(t.hasAlphaChannel,!0),this._errorEvent=new r,this._readyPromise=Ko(),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,o){if(!this.ready)throw new Cesium.DeveloperError("requestImage must not be called before the imagery provider is ready.");return Cesium.ImageryProvider.loadImage(this,GO.call(this,t,i,n,o))}pickFeatures(t,i,n,o,r){}}function GO(e,t,i,n){let o=this._url;const r=this._subdomains,a=this.tilingScheme.getNumberOfYTilesAtLevel(i)-t-1;return o=o.replace("{s}",r[(e+t+i)%r.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}",a),this._resource.getDerivedResource({url:o,request:n})}const UO=X("tencentImageryProviderProps",{...Ei,subdomains:{type:Array,default:()=>["1","2","3"]},mapStyle:{type:String,default:"vector"},styleId:{type:String,default:"1"},protocol:String,...Tt,...mi,...si,...Lt,...Vi,...Fn});var wf=ee({name:"VcImageryProviderTencent",props:UO,emits:ht,setup(e,t){const i=ae();i.cesiumClass="TencentImageryProvider";const n=dt(e,t,i);if(n!==void 0)return i.createCesiumObject=async()=>{Cesium.TencentImageryProvider=Cesium.TencentImageryProvider||zO,n.unwatchFns.length===0&&n.setPropsWatcher(!0);const o=n.transformProps(e);return new Cesium.TencentImageryProvider(o)},()=>{var o;return ne(se(((o=i.proxy)==null?void 0:o.$options.name)||""))}}});const Wt={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 Ac={exports:{}},wa={exports:{}};/*! https://mths.be/punycode v1.4.0 by @mathias */wa.exports;var _f;function HO(){return _f||(_f=1,function(e,t){(function(i){var n=t&&!t.nodeType&&t,o=e&&!e.nodeType&&e,r=typeof gn=="object"&&gn;(r.global===r||r.window===r||r.self===r)&&(i=r);var a,s=2147483647,l=36,c=1,u=26,d=38,h=700,p=72,v=128,b="-",y=/^xn--/,E=/[^\x20-\x7E]/,x=/[\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"},w=l-c,O=Math.floor,I=String.fromCharCode,R;function D(L){throw new RangeError(g[L])}function M(L,B){for(var F=L.length,q=[];F--;)q[F]=B(L[F]);return q}function k(L,B){var F=L.split("@"),q="";F.length>1&&(q=F[0]+"@",L=F[1]),L=L.replace(x,".");var Z=L.split("."),H=M(Z,B).join(".");return q+H}function $(L){for(var B=[],F=0,q=L.length,Z,H;F<q;)Z=L.charCodeAt(F++),Z>=55296&&Z<=56319&&F<q?(H=L.charCodeAt(F++),(H&64512)==56320?B.push(((Z&1023)<<10)+(H&1023)+65536):(B.push(Z),F--)):B.push(Z);return B}function V(L){return M(L,function(B){var F="";return B>65535&&(B-=65536,F+=I(B>>>10&1023|55296),B=56320|B&1023),F+=I(B),F}).join("")}function m(L){return L-48<10?L-22:L-65<26?L-65:L-97<26?L-97:l}function f(L,B){return L+22+75*(L<26)-((B!=0)<<5)}function C(L,B,F){var q=0;for(L=F?O(L/h):L>>1,L+=O(L/B);L>w*u>>1;q+=l)L=O(L/w);return O(q+(w+1)*L/(L+d))}function T(L){var B=[],F=L.length,q,Z=0,H=v,N=p,j,G,J,U,z,K,Q,ie,Y;for(j=L.lastIndexOf(b),j<0&&(j=0),G=0;G<j;++G)L.charCodeAt(G)>=128&&D("not-basic"),B.push(L.charCodeAt(G));for(J=j>0?j+1:0;J<F;){for(U=Z,z=1,K=l;J>=F&&D("invalid-input"),Q=m(L.charCodeAt(J++)),(Q>=l||Q>O((s-Z)/z))&&D("overflow"),Z+=Q*z,ie=K<=N?c:K>=N+u?u:K-N,!(Q<ie);K+=l)Y=l-ie,z>O(s/Y)&&D("overflow"),z*=Y;q=B.length+1,N=C(Z-U,q,U==0),O(Z/q)>s-H&&D("overflow"),H+=O(Z/q),Z%=q,B.splice(Z++,0,H)}return V(B)}function _(L){var B,F,q,Z,H,N,j,G,J,U,z,K=[],Q,ie,Y,oe;for(L=$(L),Q=L.length,B=v,F=0,H=p,N=0;N<Q;++N)z=L[N],z<128&&K.push(I(z));for(q=Z=K.length,Z&&K.push(b);q<Q;){for(j=s,N=0;N<Q;++N)z=L[N],z>=B&&z<j&&(j=z);for(ie=q+1,j-B>O((s-F)/ie)&&D("overflow"),F+=(j-B)*ie,B=j,N=0;N<Q;++N)if(z=L[N],z<B&&++F>s&&D("overflow"),z==B){for(G=F,J=l;U=J<=H?c:J>=H+u?u:J-H,!(G<U);J+=l)oe=G-U,Y=l-U,K.push(I(f(U+oe%Y,0))),G=O(oe/Y);K.push(I(f(G,0))),H=C(F,ie,q==Z),F=0,++q}++F,++B}return K.join("")}function P(L){return k(L,function(B){return y.test(B)?T(B.slice(4).toLowerCase()):B})}function A(L){return k(L,function(B){return E.test(B)?"xn--"+_(B):B})}if(a={version:"1.3.2",ucs2:{decode:$,encode:V},decode:T,encode:_,toASCII:A,toUnicode:P},n&&o)if(e.exports==n)o.exports=a;else for(R in a)a.hasOwnProperty(R)&&(n[R]=a[R]);else i.punycode=a})(gn)}(wa,wa.exports)),wa.exports}var Vr={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
 *
 */Vr.exports;var Ef;function WO(){return Ef||(Ef=1,function(e){(function(t,i){e.exports?e.exports=i():t.IPv6=i(t)})(gn,function(t){var i=t&&t.IPv6;function n(r){var a=r.toLowerCase(),s=a.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,h=0;h<c;h++){d=s[h].split("");for(var p=0;p<3&&(d[0]==="0"&&d.length>1);p++)d.splice(0,1);s[h]=d.join("")}var v=-1,b=0,y=0,E=-1,x=!1;for(h=0;h<c;h++)x?s[h]==="0"?y+=1:(x=!1,y>b&&(v=E,b=y)):s[h]==="0"&&(x=!0,E=h,y=1);y>b&&(v=E,b=y),b>1&&s.splice(v,b,""),l=s.length;var g="";for(s[0]===""&&(g=":"),h=0;h<l&&(g+=s[h],h!==l-1);h++)g+=":";return s[l-1]===""&&(g+=":"),g}function o(){return t.IPv6===this&&(t.IPv6=i),this}return{best:n,noConflict:o}})}(Vr)),Vr.exports}var $r={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
 *
 */$r.exports;var Pf;function qO(){return Pf||(Pf=1,function(e){(function(t,i){e.exports?e.exports=i():t.SecondLevelDomains=i(t)})(gn,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(o){var r=o.lastIndexOf(".");if(r<=0||r>=o.length-1)return!1;var a=o.lastIndexOf(".",r-1);if(a<=0||a>=r-1)return!1;var s=n.list[o.slice(r+1)];return s?s.indexOf(" "+o.slice(a+1,r)+" ")>=0:!1},is:function(o){var r=o.lastIndexOf(".");if(r<=0||r>=o.length-1)return!1;var a=o.lastIndexOf(".",r-1);if(a>=0)return!1;var s=n.list[o.slice(r+1)];return s?s.indexOf(" "+o.slice(0,r)+" ")>=0:!1},get:function(o){var r=o.lastIndexOf(".");if(r<=0||r>=o.length-1)return null;var a=o.lastIndexOf(".",r-1);if(a<=0||a>=r-1)return null;var s=n.list[o.slice(r+1)];return!s||s.indexOf(" "+o.slice(a+1,r)+" ")<0?null:o.slice(a+1)},noConflict:function(){return t.SecondLevelDomains===this&&(t.SecondLevelDomains=i),this}};return n})}($r)),$r.exports}/*!
 * 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
 *
 */Ac.exports,function(e){(function(t,i){e.exports?e.exports=i(HO(),WO(),qO()):t.URI=i(t.punycode,t.IPv6,t.SecondLevelDomains,t)})(gn,function(t,i,n,o){var r=o&&o.URI;function a(m,f){var C=arguments.length>=1,T=arguments.length>=2;if(!(this instanceof a))return C?T?new a(m,f):new a(m):new a;if(m===void 0){if(C)throw new TypeError("undefined is not a valid argument for URI");typeof location!="undefined"?m=location.href+"":m=""}if(m===null&&C)throw new TypeError("null is not a valid argument for URI");return this.href(m),f!==void 0?this.absoluteTo(f):this}function s(m){return/^[0-9]+$/.test(m)}a.version="1.19.11";var l=a.prototype,c=Object.prototype.hasOwnProperty;function u(m){return m.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function d(m){return m===void 0?"Undefined":String(Object.prototype.toString.call(m)).slice(8,-1)}function h(m){return d(m)==="Array"}function p(m,f){var C={},T,_;if(d(f)==="RegExp")C=null;else if(h(f))for(T=0,_=f.length;T<_;T++)C[f[T]]=!0;else C[f]=!0;for(T=0,_=m.length;T<_;T++){var P=C&&C[m[T]]!==void 0||!C&&f.test(m[T]);P&&(m.splice(T,1),_--,T--)}return m}function v(m,f){var C,T;if(h(f)){for(C=0,T=f.length;C<T;C++)if(!v(m,f[C]))return!1;return!0}var _=d(f);for(C=0,T=m.length;C<T;C++)if(_==="RegExp"){if(typeof m[C]=="string"&&m[C].match(f))return!0}else if(m[C]===f)return!0;return!1}function b(m,f){if(!h(m)||!h(f)||m.length!==f.length)return!1;m.sort(),f.sort();for(var C=0,T=m.length;C<T;C++)if(m[C]!==f[C])return!1;return!0}function y(m){var f=/^\/+|\/+$/g;return m.replace(f,"")}a._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:a.preventInvalidHostname,duplicateQueryParameters:a.duplicateQueryParameters,escapeQuerySpace:a.escapeQuerySpace}},a.preventInvalidHostname=!1,a.duplicateQueryParameters=!1,a.escapeQuerySpace=!0,a.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,a.idn_expression=/[^a-z0-9\._-]/i,a.punycode_expression=/(xn--)/i,a.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,a.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*$/,a.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,a.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},a.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,a.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,a.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},a.hostProtocols=["http","https"],a.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,a.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"},a.getDomAttribute=function(m){if(!(!m||!m.nodeName)){var f=m.nodeName.toLowerCase();if(!(f==="input"&&m.type!=="image"))return a.domAttributes[f]}};function E(m){return escape(m)}function x(m){return encodeURIComponent(m).replace(/[!'()*]/g,E).replace(/\*/g,"%2A")}a.encode=x,a.decode=decodeURIComponent,a.iso8859=function(){a.encode=escape,a.decode=unescape},a.unicode=function(){a.encode=x,a.decode=decodeURIComponent},a.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"}}}},a.encodeQuery=function(m,f){var C=a.encode(m+"");return f===void 0&&(f=a.escapeQuerySpace),f?C.replace(/%20/g,"+"):C},a.decodeQuery=function(m,f){m+="",f===void 0&&(f=a.escapeQuerySpace);try{return a.decode(f?m.replace(/\+/g,"%20"):m)}catch(C){return m}};var g={encode:"encode",decode:"decode"},w,O=function(m,f){return function(C){try{return a[f](C+"").replace(a.characters[m][f].expression,function(T){return a.characters[m][f].map[T]})}catch(T){return C}}};for(w in g)a[w+"PathSegment"]=O("pathname",g[w]),a[w+"UrnPathSegment"]=O("urnpath",g[w]);var I=function(m,f,C){return function(T){var _;C?_=function(B){return a[f](a[C](B))}:_=a[f];for(var P=(T+"").split(m),A=0,L=P.length;A<L;A++)P[A]=_(P[A]);return P.join(m)}};a.decodePath=I("/","decodePathSegment"),a.decodeUrnPath=I(":","decodeUrnPathSegment"),a.recodePath=I("/","encodePathSegment","decode"),a.recodeUrnPath=I(":","encodeUrnPathSegment","decode"),a.encodeReserved=O("reserved","encode"),a.parse=function(m,f){var C;return f||(f={preventInvalidHostname:a.preventInvalidHostname}),m=m.replace(a.leading_whitespace_expression,""),m=m.replace(a.ascii_tab_whitespace,""),C=m.indexOf("#"),C>-1&&(f.fragment=m.substring(C+1)||null,m=m.substring(0,C)),C=m.indexOf("?"),C>-1&&(f.query=m.substring(C+1)||null,m=m.substring(0,C)),m=m.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://"),m=m.replace(/^[/\\]{2,}/i,"//"),m.substring(0,2)==="//"?(f.protocol=null,m=m.substring(2),m=a.parseAuthority(m,f)):(C=m.indexOf(":"),C>-1&&(f.protocol=m.substring(0,C)||null,f.protocol&&!f.protocol.match(a.protocol_expression)?f.protocol=void 0:m.substring(C+1,C+3).replace(/\\/g,"/")==="//"?(m=m.substring(C+3),m=a.parseAuthority(m,f)):(m=m.substring(C+1),f.urn=!0))),f.path=m,f},a.parseHost=function(m,f){m||(m=""),m=m.replace(/\\/g,"/");var C=m.indexOf("/"),T,_;if(C===-1&&(C=m.length),m.charAt(0)==="[")T=m.indexOf("]"),f.hostname=m.substring(1,T)||null,f.port=m.substring(T+2,C)||null,f.port==="/"&&(f.port=null);else{var P=m.indexOf(":"),A=m.indexOf("/"),L=m.indexOf(":",P+1);L!==-1&&(A===-1||L<A)?(f.hostname=m.substring(0,C)||null,f.port=null):(_=m.substring(0,C).split(":"),f.hostname=_[0]||null,f.port=_[1]||null)}return f.hostname&&m.substring(C).charAt(0)!=="/"&&(C++,m="/"+m),f.preventInvalidHostname&&a.ensureValidHostname(f.hostname,f.protocol),f.port&&a.ensureValidPort(f.port),m.substring(C)||"/"},a.parseAuthority=function(m,f){return m=a.parseUserinfo(m,f),a.parseHost(m,f)},a.parseUserinfo=function(m,f){var C=m,T=m.indexOf("\\");T!==-1&&(m=m.replace(/\\/g,"/"));var _=m.indexOf("/"),P=m.lastIndexOf("@",_>-1?_:m.length-1),A;return P>-1&&(_===-1||P<_)?(A=m.substring(0,P).split(":"),f.username=A[0]?a.decode(A[0]):null,A.shift(),f.password=A[0]?a.decode(A.join(":")):null,m=C.substring(P+1)):(f.username=null,f.password=null),m},a.parseQuery=function(m,f){if(!m)return{};if(m=m.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,""),!m)return{};for(var C={},T=m.split("&"),_=T.length,P,A,L,B=0;B<_;B++)P=T[B].split("="),A=a.decodeQuery(P.shift(),f),L=P.length?a.decodeQuery(P.join("="),f):null,A!=="__proto__"&&(c.call(C,A)?((typeof C[A]=="string"||C[A]===null)&&(C[A]=[C[A]]),C[A].push(L)):C[A]=L);return C},a.build=function(m){var f="",C=!1;return m.protocol&&(f+=m.protocol+":"),!m.urn&&(f||m.hostname)&&(f+="//",C=!0),f+=a.buildAuthority(m)||"",typeof m.path=="string"&&(m.path.charAt(0)!=="/"&&C&&(f+="/"),f+=m.path),typeof m.query=="string"&&m.query&&(f+="?"+m.query),typeof m.fragment=="string"&&m.fragment&&(f+="#"+m.fragment),f},a.buildHost=function(m){var f="";if(m.hostname)a.ip6_expression.test(m.hostname)?f+="["+m.hostname+"]":f+=m.hostname;else return"";return m.port&&(f+=":"+m.port),f},a.buildAuthority=function(m){return a.buildUserinfo(m)+a.buildHost(m)},a.buildUserinfo=function(m){var f="";return m.username&&(f+=a.encode(m.username)),m.password&&(f+=":"+a.encode(m.password)),f&&(f+="@"),f},a.buildQuery=function(m,f,C){var T="",_,P,A,L;for(P in m)if(P!=="__proto__"&&c.call(m,P))if(h(m[P]))for(_={},A=0,L=m[P].length;A<L;A++)m[P][A]!==void 0&&_[m[P][A]+""]===void 0&&(T+="&"+a.buildQueryParameter(P,m[P][A],C),f!==!0&&(_[m[P][A]+""]=!0));else m[P]!==void 0&&(T+="&"+a.buildQueryParameter(P,m[P],C));return T.substring(1)},a.buildQueryParameter=function(m,f,C){return a.encodeQuery(m,C)+(f!==null?"="+a.encodeQuery(f,C):"")},a.addQuery=function(m,f,C){if(typeof f=="object")for(var T in f)c.call(f,T)&&a.addQuery(m,T,f[T]);else if(typeof f=="string"){if(m[f]===void 0){m[f]=C;return}else typeof m[f]=="string"&&(m[f]=[m[f]]);h(C)||(C=[C]),m[f]=(m[f]||[]).concat(C)}else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter")},a.setQuery=function(m,f,C){if(typeof f=="object")for(var T in f)c.call(f,T)&&a.setQuery(m,T,f[T]);else if(typeof f=="string")m[f]=C===void 0?null:C;else throw new TypeError("URI.setQuery() accepts an object, string as the name parameter")},a.removeQuery=function(m,f,C){var T,_,P;if(h(f))for(T=0,_=f.length;T<_;T++)m[f[T]]=void 0;else if(d(f)==="RegExp")for(P in m)f.test(P)&&(m[P]=void 0);else if(typeof f=="object")for(P in f)c.call(f,P)&&a.removeQuery(m,P,f[P]);else if(typeof f=="string")C!==void 0?d(C)==="RegExp"?!h(m[f])&&C.test(m[f])?m[f]=void 0:m[f]=p(m[f],C):m[f]===String(C)&&(!h(C)||C.length===1)?m[f]=void 0:h(m[f])&&(m[f]=p(m[f],C)):m[f]=void 0;else throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter")},a.hasQuery=function(m,f,C,T){switch(d(f)){case"String":break;case"RegExp":for(var _ in m)if(c.call(m,_)&&f.test(_)&&(C===void 0||a.hasQuery(m,_,C)))return!0;return!1;case"Object":for(var P in f)if(c.call(f,P)&&!a.hasQuery(m,P,f[P]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(d(C)){case"Undefined":return f in m;case"Boolean":var A=!!(h(m[f])?m[f].length:m[f]);return C===A;case"Function":return!!C(m[f],f,m);case"Array":if(!h(m[f]))return!1;var L=T?v:b;return L(m[f],C);case"RegExp":return h(m[f])?T?v(m[f],C):!1:!!(m[f]&&m[f].match(C));case"Number":C=String(C);case"String":return h(m[f])?T?v(m[f],C):!1:m[f]===C;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},a.joinPaths=function(){for(var m=[],f=[],C=0,T=0;T<arguments.length;T++){var _=new a(arguments[T]);m.push(_);for(var P=_.segment(),A=0;A<P.length;A++)typeof P[A]=="string"&&f.push(P[A]),P[A]&&C++}if(!f.length||!C)return new a("");var L=new a("").segment(f);return(m[0].path()===""||m[0].path().slice(0,1)==="/")&&L.path("/"+L.path()),L.normalize()},a.commonPath=function(m,f){var C=Math.min(m.length,f.length),T;for(T=0;T<C;T++)if(m.charAt(T)!==f.charAt(T)){T--;break}return T<1?m.charAt(0)===f.charAt(0)&&m.charAt(0)==="/"?"/":"":((m.charAt(T)!=="/"||f.charAt(T)!=="/")&&(T=m.substring(0,T).lastIndexOf("/")),m.substring(0,T+1))},a.withinString=function(m,f,C){C||(C={});var T=C.start||a.findUri.start,_=C.end||a.findUri.end,P=C.trim||a.findUri.trim,A=C.parens||a.findUri.parens,L=/[a-z0-9-]=["']?$/i;for(T.lastIndex=0;;){var B=T.exec(m);if(!B)break;var F=B.index;if(C.ignoreHtml){var q=m.slice(Math.max(F-3,0),F);if(q&&L.test(q))continue}for(var Z=F+m.slice(F).search(_),H=m.slice(F,Z),N=-1;;){var j=A.exec(H);if(!j)break;var G=j.index+j[0].length;N=Math.max(N,G)}if(N>-1?H=H.slice(0,N)+H.slice(N).replace(P,""):H=H.replace(P,""),!(H.length<=B[0].length)&&!(C.ignore&&C.ignore.test(H))){Z=F+H.length;var J=f(H,F,Z,m);if(J===void 0){T.lastIndex=Z;continue}J=String(J),m=m.slice(0,F)+J+m.slice(Z),T.lastIndex=F+J.length}}return T.lastIndex=0,m},a.ensureValidHostname=function(m,f){var C=!!m,T=!!f,_=!1;if(T&&(_=v(a.hostProtocols,f)),_&&!C)throw new TypeError("Hostname cannot be empty, if protocol is "+f);if(m&&m.match(a.invalid_hostname_characters)){if(!t)throw new TypeError('Hostname "'+m+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(t.toASCII(m).match(a.invalid_hostname_characters))throw new TypeError('Hostname "'+m+'" contains characters other than [A-Z0-9.-:_]')}},a.ensureValidPort=function(m){if(m){var f=Number(m);if(!(s(f)&&f>0&&f<65536))throw new TypeError('Port "'+m+'" is not a valid port')}},a.noConflict=function(m){if(m){var f={URI:this.noConflict()};return o.URITemplate&&typeof o.URITemplate.noConflict=="function"&&(f.URITemplate=o.URITemplate.noConflict()),o.IPv6&&typeof o.IPv6.noConflict=="function"&&(f.IPv6=o.IPv6.noConflict()),o.SecondLevelDomains&&typeof o.SecondLevelDomains.noConflict=="function"&&(f.SecondLevelDomains=o.SecondLevelDomains.noConflict()),f}else o.URI===this&&(o.URI=r);return this},l.build=function(m){return m===!0?this._deferred_build=!0:(m===void 0||this._deferred_build)&&(this._string=a.build(this._parts),this._deferred_build=!1),this},l.clone=function(){return new a(this)},l.valueOf=l.toString=function(){return this.build(!1)._string};function R(m){return function(f,C){return f===void 0?this._parts[m]||"":(this._parts[m]=f||null,this.build(!C),this)}}function D(m,f){return function(C,T){return C===void 0?this._parts[m]||"":(C!==null&&(C=C+"",C.charAt(0)===f&&(C=C.substring(1))),this._parts[m]=C,this.build(!T),this)}}l.protocol=R("protocol"),l.username=R("username"),l.password=R("password"),l.hostname=R("hostname"),l.port=R("port"),l.query=D("query","?"),l.fragment=D("fragment","#"),l.search=function(m,f){var C=this.query(m,f);return typeof C=="string"&&C.length?"?"+C:C},l.hash=function(m,f){var C=this.fragment(m,f);return typeof C=="string"&&C.length?"#"+C:C},l.pathname=function(m,f){if(m===void 0||m===!0){var C=this._parts.path||(this._parts.hostname?"/":"");return m?(this._parts.urn?a.decodeUrnPath:a.decodePath)(C):C}else return this._parts.urn?this._parts.path=m?a.recodeUrnPath(m):"":this._parts.path=m?a.recodePath(m):"/",this.build(!f),this},l.path=l.pathname,l.href=function(m,f){var C;if(m===void 0)return this.toString();this._string="",this._parts=a._parts();var T=m instanceof a,_=typeof m=="object"&&(m.hostname||m.path||m.pathname);if(m.nodeName){var P=a.getDomAttribute(m);m=m[P]||"",_=!1}if(!T&&_&&m.pathname!==void 0&&(m=m.toString()),typeof m=="string"||m instanceof String)this._parts=a.parse(String(m),this._parts);else if(T||_){var A=T?m._parts:m;for(C in A)C!=="query"&&c.call(this._parts,C)&&(this._parts[C]=A[C]);A.query&&this.query(A.query,!1)}else throw new TypeError("invalid input");return this.build(!f),this},l.is=function(m){var f=!1,C=!1,T=!1,_=!1,P=!1,A=!1,L=!1,B=!this._parts.urn;switch(this._parts.hostname&&(B=!1,C=a.ip4_expression.test(this._parts.hostname),T=a.ip6_expression.test(this._parts.hostname),f=C||T,_=!f,P=_&&n&&n.has(this._parts.hostname),A=_&&a.idn_expression.test(this._parts.hostname),L=_&&a.punycode_expression.test(this._parts.hostname)),m.toLowerCase()){case"relative":return B;case"absolute":return!B;case"domain":case"name":return _;case"sld":return P;case"ip":return f;case"ip4":case"ipv4":case"inet4":return C;case"ip6":case"ipv6":case"inet6":return T;case"idn":return A;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return L}return null};var M=l.protocol,k=l.port,$=l.hostname;l.protocol=function(m,f){if(m&&(m=m.replace(/:(\/\/)?$/,""),!m.match(a.protocol_expression)))throw new TypeError('Protocol "'+m+`" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]`);return M.call(this,m,f)},l.scheme=l.protocol,l.port=function(m,f){return this._parts.urn?m===void 0?"":this:(m!==void 0&&(m===0&&(m=null),m&&(m+="",m.charAt(0)===":"&&(m=m.substring(1)),a.ensureValidPort(m))),k.call(this,m,f))},l.hostname=function(m,f){if(this._parts.urn)return m===void 0?"":this;if(m!==void 0){var C={preventInvalidHostname:this._parts.preventInvalidHostname},T=a.parseHost(m,C);if(T!=="/")throw new TypeError('Hostname "'+m+'" contains characters other than [A-Z0-9.-]');m=C.hostname,this._parts.preventInvalidHostname&&a.ensureValidHostname(m,this._parts.protocol)}return $.call(this,m,f)},l.origin=function(m,f){if(this._parts.urn)return m===void 0?"":this;if(m===void 0){var C=this.protocol(),T=this.authority();return T?(C?C+"://":"")+this.authority():""}else{var _=a(m);return this.protocol(_.protocol()).authority(_.authority()).build(!f),this}},l.host=function(m,f){if(this._parts.urn)return m===void 0?"":this;if(m===void 0)return this._parts.hostname?a.buildHost(this._parts):"";var C=a.parseHost(m,this._parts);if(C!=="/")throw new TypeError('Hostname "'+m+'" contains characters other than [A-Z0-9.-]');return this.build(!f),this},l.authority=function(m,f){if(this._parts.urn)return m===void 0?"":this;if(m===void 0)return this._parts.hostname?a.buildAuthority(this._parts):"";var C=a.parseAuthority(m,this._parts);if(C!=="/")throw new TypeError('Hostname "'+m+'" contains characters other than [A-Z0-9.-]');return this.build(!f),this},l.userinfo=function(m,f){if(this._parts.urn)return m===void 0?"":this;if(m===void 0){var C=a.buildUserinfo(this._parts);return C&&C.substring(0,C.length-1)}else return m[m.length-1]!=="@"&&(m+="@"),a.parseUserinfo(m,this._parts),this.build(!f),this},l.resource=function(m,f){var C;return m===void 0?this.path()+this.search()+this.hash():(C=a.parse(m),this._parts.path=C.path,this._parts.query=C.query,this._parts.fragment=C.fragment,this.build(!f),this)},l.subdomain=function(m,f){if(this._parts.urn)return m===void 0?"":this;if(m===void 0){if(!this._parts.hostname||this.is("IP"))return"";var C=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,C)||""}else{var T=this._parts.hostname.length-this.domain().length,_=this._parts.hostname.substring(0,T),P=new RegExp("^"+u(_));if(m&&m.charAt(m.length-1)!=="."&&(m+="."),m.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");return m&&a.ensureValidHostname(m,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(P,m),this.build(!f),this}},l.domain=function(m,f){if(this._parts.urn)return m===void 0?"":this;if(typeof m=="boolean"&&(f=m,m=void 0),m===void 0){if(!this._parts.hostname||this.is("IP"))return"";var C=this._parts.hostname.match(/\./g);if(C&&C.length<2)return this._parts.hostname;var T=this._parts.hostname.length-this.tld(f).length-1;return T=this._parts.hostname.lastIndexOf(".",T-1)+1,this._parts.hostname.substring(T)||""}else{if(!m)throw new TypeError("cannot set domain empty");if(m.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");if(a.ensureValidHostname(m,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=m;else{var _=new RegExp(u(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(_,m)}return this.build(!f),this}},l.tld=function(m,f){if(this._parts.urn)return m===void 0?"":this;if(typeof m=="boolean"&&(f=m,m=void 0),m===void 0){if(!this._parts.hostname||this.is("IP"))return"";var C=this._parts.hostname.lastIndexOf("."),T=this._parts.hostname.substring(C+1);return f!==!0&&n&&n.list[T.toLowerCase()]&&n.get(this._parts.hostname)||T}else{var _;if(m)if(m.match(/[^a-zA-Z0-9-]/))if(n&&n.is(m))_=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(_,m);else throw new TypeError('TLD "'+m+'" 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");_=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(_,m)}else throw new TypeError("cannot set TLD empty");return this.build(!f),this}},l.directory=function(m,f){if(this._parts.urn)return m===void 0?"":this;if(m===void 0||m===!0){if(!this._parts.path&&!this._parts.hostname)return"";if(this._parts.path==="/")return"/";var C=this._parts.path.length-this.filename().length-1,T=this._parts.path.substring(0,C)||(this._parts.hostname?"/":"");return m?a.decodePath(T):T}else{var _=this._parts.path.length-this.filename().length,P=this._parts.path.substring(0,_),A=new RegExp("^"+u(P));return this.is("relative")||(m||(m="/"),m.charAt(0)!=="/"&&(m="/"+m)),m&&m.charAt(m.length-1)!=="/"&&(m+="/"),m=a.recodePath(m),this._parts.path=this._parts.path.replace(A,m),this.build(!f),this}},l.filename=function(m,f){if(this._parts.urn)return m===void 0?"":this;if(typeof m!="string"){if(!this._parts.path||this._parts.path==="/")return"";var C=this._parts.path.lastIndexOf("/"),T=this._parts.path.substring(C+1);return m?a.decodePathSegment(T):T}else{var _=!1;m.charAt(0)==="/"&&(m=m.substring(1)),m.match(/\.?\//)&&(_=!0);var P=new RegExp(u(this.filename())+"$");return m=a.recodePath(m),this._parts.path=this._parts.path.replace(P,m),_?this.normalizePath(f):this.build(!f),this}},l.suffix=function(m,f){if(this._parts.urn)return m===void 0?"":this;if(m===void 0||m===!0){if(!this._parts.path||this._parts.path==="/")return"";var C=this.filename(),T=C.lastIndexOf("."),_,P;return T===-1?"":(_=C.substring(T+1),P=/^[a-z0-9%]+$/i.test(_)?_:"",m?a.decodePathSegment(P):P)}else{m.charAt(0)==="."&&(m=m.substring(1));var A=this.suffix(),L;if(A)m?L=new RegExp(u(A)+"$"):L=new RegExp(u("."+A)+"$");else{if(!m)return this;this._parts.path+="."+a.recodePath(m)}return L&&(m=a.recodePath(m),this._parts.path=this._parts.path.replace(L,m)),this.build(!f),this}},l.segment=function(m,f,C){var T=this._parts.urn?":":"/",_=this.path(),P=_.substring(0,1)==="/",A=_.split(T);if(m!==void 0&&typeof m!="number"&&(C=f,f=m,m=void 0),m!==void 0&&typeof m!="number")throw new Error('Bad segment "'+m+'", must be 0-based integer');if(P&&A.shift(),m<0&&(m=Math.max(A.length+m,0)),f===void 0)return m===void 0?A:A[m];if(m===null||A[m]===void 0)if(h(f)){A=[];for(var L=0,B=f.length;L<B;L++)!f[L].length&&(!A.length||!A[A.length-1].length)||(A.length&&!A[A.length-1].length&&A.pop(),A.push(y(f[L])))}else(f||typeof f=="string")&&(f=y(f),A[A.length-1]===""?A[A.length-1]=f:A.push(f));else f?A[m]=y(f):A.splice(m,1);return P&&A.unshift(""),this.path(A.join(T),C)},l.segmentCoded=function(m,f,C){var T,_,P;if(typeof m!="number"&&(C=f,f=m,m=void 0),f===void 0){if(T=this.segment(m,f,C),!h(T))T=T!==void 0?a.decode(T):void 0;else for(_=0,P=T.length;_<P;_++)T[_]=a.decode(T[_]);return T}if(!h(f))f=typeof f=="string"||f instanceof String?a.encode(f):f;else for(_=0,P=f.length;_<P;_++)f[_]=a.encode(f[_]);return this.segment(m,f,C)};var V=l.query;return l.query=function(m,f){if(m===!0)return a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof m=="function"){var C=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace),T=m.call(this,C);return this._parts.query=a.buildQuery(T||C,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!f),this}else return m!==void 0&&typeof m!="string"?(this._parts.query=a.buildQuery(m,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!f),this):V.call(this,m,f)},l.setQuery=function(m,f,C){var T=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof m=="string"||m instanceof String)T[m]=f!==void 0?f:null;else if(typeof m=="object")for(var _ in m)c.call(m,_)&&(T[_]=m[_]);else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");return this._parts.query=a.buildQuery(T,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof m!="string"&&(C=f),this.build(!C),this},l.addQuery=function(m,f,C){var T=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return a.addQuery(T,m,f===void 0?null:f),this._parts.query=a.buildQuery(T,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof m!="string"&&(C=f),this.build(!C),this},l.removeQuery=function(m,f,C){var T=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return a.removeQuery(T,m,f),this._parts.query=a.buildQuery(T,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof m!="string"&&(C=f),this.build(!C),this},l.hasQuery=function(m,f,C){var T=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return a.hasQuery(T,m,f,C)},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(m){return typeof this._parts.protocol=="string"&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!m)),this},l.normalizeHostname=function(m){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(!m)),this},l.normalizePort=function(m){return typeof this._parts.protocol=="string"&&this._parts.port===a.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!m)),this},l.normalizePath=function(m){var f=this._parts.path;if(!f)return this;if(this._parts.urn)return this._parts.path=a.recodeUrnPath(this._parts.path),this.build(!m),this;if(this._parts.path==="/")return this;f=a.recodePath(f);var C,T="",_,P;for(f.charAt(0)!=="/"&&(C=!0,f="/"+f),(f.slice(-3)==="/.."||f.slice(-2)==="/.")&&(f+="/"),f=f.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),C&&(T=f.substring(1).match(/^(\.\.\/)+/)||"",T&&(T=T[0]));_=f.search(/\/\.\.(\/|$)/),_!==-1;){if(_===0){f=f.substring(3);continue}P=f.substring(0,_).lastIndexOf("/"),P===-1&&(P=_),f=f.substring(0,P)+f.substring(_+3)}return C&&this.is("relative")&&(f=T+f.substring(1)),this._parts.path=f,this.build(!m),this},l.normalizePathname=l.normalizePath,l.normalizeQuery=function(m){return typeof this._parts.query=="string"&&(this._parts.query.length?this.query(a.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!m)),this},l.normalizeFragment=function(m){return this._parts.fragment||(this._parts.fragment=null,this.build(!m)),this},l.normalizeSearch=l.normalizeQuery,l.normalizeHash=l.normalizeFragment,l.iso8859=function(){var m=a.encode,f=a.decode;a.encode=escape,a.decode=decodeURIComponent;try{this.normalize()}finally{a.encode=m,a.decode=f}return this},l.unicode=function(){var m=a.encode,f=a.decode;a.encode=x,a.decode=unescape;try{this.normalize()}finally{a.encode=m,a.decode=f}return this},l.readable=function(){var m=this.clone();m.username("").password("").normalize();var f="";if(m._parts.protocol&&(f+=m._parts.protocol+"://"),m._parts.hostname&&(m.is("punycode")&&t?(f+=t.toUnicode(m._parts.hostname),m._parts.port&&(f+=":"+m._parts.port)):f+=m.host()),m._parts.hostname&&m._parts.path&&m._parts.path.charAt(0)!=="/"&&(f+="/"),f+=m.path(!0),m._parts.query){for(var C="",T=0,_=m._parts.query.split("&"),P=_.length;T<P;T++){var A=(_[T]||"").split("=");C+="&"+a.decodeQuery(A[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),A[1]!==void 0&&(C+="="+a.decodeQuery(A[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}f+="?"+C.substring(1)}return f+=a.decodeQuery(m.hash(),!0),f},l.absoluteTo=function(m){var f=this.clone(),C=["protocol","username","password","hostname","port"],T,_,P;if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(m instanceof a||(m=new a(m)),f._parts.protocol||(f._parts.protocol=m._parts.protocol,this._parts.hostname))return f;for(_=0;P=C[_];_++)f._parts[P]=m._parts[P];return f._parts.path?(f._parts.path.substring(-2)===".."&&(f._parts.path+="/"),f.path().charAt(0)!=="/"&&(T=m.directory(),T=T||(m.path().indexOf("/")===0?"/":""),f._parts.path=(T?T+"/":"")+f._parts.path,f.normalizePath())):(f._parts.path=m._parts.path,f._parts.query||(f._parts.query=m._parts.query)),f.build(),f},l.relativeTo=function(m){var f=this.clone().normalize(),C,T,_,P,A;if(f._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(m=new a(m).normalize(),C=f._parts,T=m._parts,P=f.path(),A=m.path(),P.charAt(0)!=="/")throw new Error("URI is already relative");if(A.charAt(0)!=="/")throw new Error("Cannot calculate a URI relative to another relative URI");if(C.protocol===T.protocol&&(C.protocol=null),C.username!==T.username||C.password!==T.password||C.protocol!==null||C.username!==null||C.password!==null)return f.build();if(C.hostname===T.hostname&&C.port===T.port)C.hostname=null,C.port=null;else return f.build();if(P===A)return C.path="",f.build();if(_=a.commonPath(P,A),!_)return f.build();var L=T.path.substring(_.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return C.path=L+C.path.substring(_.length)||"./",f.build()},l.equals=function(m){var f=this.clone(),C=new a(m),T={},_={},P={},A,L,B;if(f.normalize(),C.normalize(),f.toString()===C.toString())return!0;if(A=f.query(),L=C.query(),f.query(""),C.query(""),f.toString()!==C.toString()||A.length!==L.length)return!1;T=a.parseQuery(A,this._parts.escapeQuerySpace),_=a.parseQuery(L,this._parts.escapeQuerySpace);for(B in T)if(c.call(T,B)){if(h(T[B])){if(!b(T[B],_[B]))return!1}else if(T[B]!==_[B])return!1;P[B]=!0}for(B in _)if(c.call(_,B)&&!P[B])return!1;return!0},l.preventInvalidHostname=function(m){return this._parts.preventInvalidHostname=!!m,this},l.duplicateQueryParameters=function(m){return this._parts.duplicateQueryParameters=!!m,this},l.escapeQuerySpace=function(m){return this._parts.escapeQuerySpace=!!m,this},a})}(Ac);var QO=Ac.exports,ZO=Wl(QO);const xf={},Of={},Dc={},Mf={},Bc={},Oo={};class JO{constructor(t){Object.keys(Wt).forEach(u=>{switch(xf[Wt[u]]=t.protocol+"://{s}.tianditu.gov.cn/"+Wt[u]+"/wmts",Of[Wt[u]]=Wt[u].slice(0,3),Dc[Wt[u]]=Wt[u].slice(4),Mf[Wt[u]]="tiles",Dc[Wt[u]]==="w"?Bc[Wt[u]]="900913":Bc[Wt[u]]="4490",Wt[u]){case"img_w":case"img_c":case"cia_w":case"cia_c":case"cta_w":case"cta_c":Oo[Wt[u]]=["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":Oo[Wt[u]]=["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":Oo[Wt[u]]=["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":Oo[Wt[u]]=["1","2","3","4","5","6","7","8","9","10"];break}});const{Credit:i,Resource:n,defaultValue:o,Event:r,GeographicTilingScheme:a,WebMercatorTilingScheme:s}=Cesium;t=o(t,{}),this._mapStyle=o(t.mapStyle,Wt.IMG_W),this._url=t.url||o(t.url,xf[this._mapStyle]);const l=n.createIfNeeded(this._url);l.appendForwardSlash(),this._ready=!1,this._resource=l,this._token=t.token,this._layer=o(t.layer,Of[this._mapStyle]),this._style=o(t.style,"default"),this._tileMatrixSetID=o(t.tileMatrixSetID,Dc[this._mapStyle]),this._tileMatrixLabels=o(t.tileMatrixLabels,Oo[this._mapStyle]),this._format=o(t.format,Mf[this._mapStyle]),this._epsgCode=Bc[this._mapStyle],this._tilingScheme=this._epsgCode==="900913"?new s:new a,this._tileWidth=o(t.tileWidth,256),this._tileHeight=o(t.tileHeight,256),this._minimumLevel=o(t.minimumLevel,0),this._maximumLevel=o(t.maximumLevel,Oo[this._mapStyle].length),this._rectangle=o(t.rectangle,this._tilingScheme.rectangle),this._errorEvent=new r;const c=o(t.credit,"\u5929\u5730\u56FE\u5168\u7403\u5F71\u50CF\u670D\u52A1");this._credit=typeof c=="string"?new i(c):c,this._subdomains=o(t.subdomains,["t0","t1","t2","t3","t4","t5","t6","t7"]),this._tileDiscardPolicy=t.tileDiscardPolicy,this._ready=!0}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,o){if(!this.ready)throw new Cesium.DeveloperError("requestImage must not be called before the imagery provider is ready.");const r=XO.call(this,t,i,n,o);return Cesium.ImageryProvider.loadImage(this,r)}pickFeatures(t,i,n,o,r){}get url(){return this._resource.url}get proxy(){return this._resource.proxy}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 credit(){return this._credit}get hasAlphaChannel(){return!0}get tileDiscardPolicy(){return this._tileDiscardPolicy}}function XO(e,t,i,n){var o;const{combine:r,defined:a,defaultValue:s,queryToObject:l,objectToQuery:c}=Cesium,u=Object.freeze,d=u({service:"WMTS",version:"1.0.0",request:"GetTile"});this._epsgCode==="900913"&&(i-=1);const h=this._tileMatrixLabels,p=a(h)?h[i]:i.toString(),v=this._subdomains;let b=this._url.replace("{s}",v[(e+t+i)%v.length]);const y=new ZO(b);let E=l(s((o=y.query)==null?void 0:o.call(y),""));E=r(d,E),E.tilematrix=p,E.layer=this._layer,E.style=this._style,E.tilerow=t,E.tilecol=e,E.tilematrixset=this._tileMatrixSetID,E.format=this._format;const x=c(E);return b=y.toString()+"?"+x,a(this._proxy)&&(b=this._proxy.getURL(b)),a(this._token)&&(b+="&tk="+this._token),this._resource.getDerivedResource({url:b,request:n})}const YO=X("tiandituImageryProviderProps",{...Ei,...mi,...si,...Lt,mapStyle:{type:String,default:"img_w",validator:e=>["cia_c","cia_w","cta_c","cta_w","cva_c","cva_w","eia_c","eia_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"},...Fn});var Sf=ee({name:"VcImageryProviderTianditu",props:YO,emits:ht,setup(e,t){const i=ae();i.cesiumClass="TiandituImageryProvider";const n=dt(e,t,i);if(n!==void 0)return i.createCesiumObject=async()=>{Cesium.TiandituImageryProvider=Cesium.TiandituImageryProvider||JO,n.unwatchFns.length===0&&n.setPropsWatcher(!0);const o=n.transformProps(e);return new Cesium.TiandituImageryProvider(o)},()=>{var o;return ne(se(((o=i.proxy)==null?void 0:o.$options.name)||""))}}});const KO=X("tileCoordinatesImageryProviderProps",{...Vi,...Ne,color:{type:[Object,String,Array],default:"YELLOW"},...Wi,...qi});var Tf=ee({name:"VcImageryProviderTileCoordinates",props:KO,emits:ht,setup(e,t){const i=ae();return i.cesiumClass="TileCoordinatesImageryProvider",dt(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const e5=X("tmsImageryProviderProps",{url:[String,Object],...Bs,...Tt,...mi,...si,...Lt,...Vi,...Ne,...Wi,...qi,flipXY:Boolean,...Fn});var If=ee({name:"VcImageryProviderTms",props:e5,emits:ht,setup(e,t){const i=ae();return i.cesiumClass="TileMapServiceImageryProvider",dt(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const t5=X("tiledcacheImageryProviderProps",{...Ei,...js,...Tt,...mi,...si,...Lt,...Vi,...Ne,...Wi,...qi,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 Af=ee({name:"VcImageryProviderTiledcache",props:t5,emits:ht,setup(e,t){const i=ae();i.cesiumClass="UrlTemplateImageryProvider";const n=dt(e,t,i);if(n===void 0)return;i.createCesiumObject=async()=>{const r=n.transformProps(e),{Credit:a,defined:s,defaultValue:l,DeveloperError:c,Ellipsoid:u,GeographicTilingScheme:d,Rectangle:h,Resource:p,UrlTemplateImageryProvider:v}=Cesium,{url:b,dir:y,format:E}=r;if(!s(b))throw new c("options.url is required.");if(!s(y))throw new c("options.dir is required.");const x=p.createIfNeeded(b);x.url+=`?dir=${y}&scale={scale}&col={x}&row={y}&format=${E}`;const g=l(r.tilingScheme,new d({ellipsoid:l(r.ellipsoid,u.WGS84),numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:1})),w=l(r.tileWidth,256),O=l(r.tileHeight,256),I=r.maximumLevel,R=l(r.minimumLevel,0),D=l(r.rectangle,g.rectangle),M=g.positionToTileXY(h.southwest(D),R),k=g.positionToTileXY(h.northeast(D),R),$=(Math.abs(k.x-M.x)+1)*(Math.abs(k.y-M.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 V=l(r.credit,"");return typeof V=="string"&&(V=new a(V)),new v({url:x,credit:V,tilingScheme:g,tileWidth:w,tileHeight:O,minimumLevel:R,maximumLevel:I,rectangle:D,customTags:{scale:(m,f,C,T)=>{const _=1/e.scales[T];return o(m,"{scale}",_)}}})};const o=(r,a,s)=>{if(r&&r.urlSchemeZeroPadding&&Object.prototype.hasOwnProperty.call(r.urlSchemeZeroPadding,a)){const l=r.urlSchemeZeroPadding[a];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 r;return ne(se(((r=i.proxy)==null?void 0:r.$options.name)||""))}}});const i5=X("urltemplateImageryProviderProps",{...Ei,pickFeaturesUrl:[String,Object],urlSchemeZeroPadding:Object,...Ja,...Tt,...mi,...si,...Lt,...Vi,...Ne,...Wi,...qi,hasAlphaChannel:{type:Boolean,default:!0},...Fs,...Za,customTags:Object,...Fn});var Df=ee({name:"VcImageryProviderUrltemplate",props:i5,emits:ht,setup(e,t){const i=ae();return i.cesiumClass="UrlTemplateImageryProvider",dt(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const n5=X("wmsImageryProviderProps",{...Ei,...Ds,parameters:Object,getFeatureInfoParameters:Object,...Za,...Fs,...Lt,...Vi,...Ne,...Wi,...qi,...mi,...si,crs:String,srs:String,...Tt,...Ja,...zo,...ks,getFeatureInfoUrl:[String,Object]});var Bf=ee({name:"VcImageryProviderWms",props:n5,emits:ht,setup(e,t){const i=ae();return i.cesiumClass="WebMapServiceImageryProvider",dt(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const o5=X("wmtsImageryProviderProps",{...Ei,...js,layer:{type:String,required:!0},wmtsStyle:{type:String,required:!0},tileMatrixSetID:{type:String,required:!0},tileMatrixLabels:Array,...zo,...ks,dimensions:Object,...Wi,...qi,...Vi,...Lt,...mi,...si,...Ne,...Tt,...Ja});var Lf=ee({name:"VcImageryProviderWmts",props:o5,emits:ht,setup(e,t){const i=ae();return i.cesiumClass="WebMapTileServiceImageryProvider",dt(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const a5=X("cesiumTerrainProviderProps",{url:[String,Object],requestVertexNormals:{type:Boolean,default:!1},requestWaterMask:{type:Boolean,default:!1},requestMetadata:{type:Boolean,default:!0},assetId:Number,...Ne,...Tt});var jf=ee({name:"VcTerrainProviderCesium",props:a5,emits:ht,setup(e,t){const i=ae();i.cesiumClass="CesiumTerrainProvider";const n=dt(e,t,i);if(n!==void 0)return i.createCesiumObject=async()=>{n.unwatchFns.length===0&&n.setPropsWatcher(!0);const o=n.transformProps(e);return Cesium.defined(e.assetId)&&typeof Cesium[i.cesiumClass].fromIonAssetId=="function"?await Cesium.CesiumTerrainProvider.fromIonAssetId(e.assetId,o):typeof Cesium[i.cesiumClass].fromUrl=="function"?Cesium.defined(o.url)?await Cesium.CesiumTerrainProvider.fromUrl(o.url,o):await Cesium.createWorldTerrainAsync({requestVertexNormals:o.requestVertexNormals,requestWaterMask:o.requestWaterMask}):Cesium.defined(o.url)?new Cesium.CesiumTerrainProvider(o):Cesium.createWorldTerrain({requestVertexNormals:o.requestVertexNormals,requestWaterMask:o.requestWaterMask})},()=>{var o;return ne(se(((o=i.proxy)==null?void 0:o.$options.name)||""))}}});const r5=X("arcgisTerrainProviderProps",{url:{type:[String,Object],default:"https://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer"},...Ne,...As});var Ff=ee({name:"VcTerrainProviderArcgis",props:r5,emits:ht,setup(e,t){const i=ae();return i.cesiumClass="ArcGISTiledElevationTerrainProvider",dt(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const s5=X("vrTheworldImageryProviderProps",{url:{type:[String,Object],default:"https://www.vr-theworld.com/vr-theworld/tiles1.0.0/73/"},...Ne,...Tt});var kf=ee({name:"VcTerrainProviderVrTheworld",props:s5,emits:ht,setup(e,t){const i=ae();return i.cesiumClass="VRTheWorldTerrainProvider",dt(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const l5=X("tiandituTerrainProviderProps",{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 Rf=ee({name:"VcTerrainProviderTianditu",props:l5,emits:ht,setup(e,t){const i=ae();i.cesiumClass="GeoTerrainProvider";const n=dt(e,t,i);if(n===void 0)return;const{emit:o}=t,r=ml();let a;return i.createCesiumObject=async()=>new Promise((s,l)=>{a=document.createElement("script"),document.body.appendChild(a),a.src=e.pluginPath,a.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()=>{var s;const l=new Cesium.EllipsoidTerrainProvider;return(s=l==null?void 0:l.readyPromise)==null||s.then(()=>{Se(i,"readyPromise")&&o("readyPromise",l,r==null?void 0:r.viewer,i.proxy)}),r&&(r.viewer.terrainProvider=l),a==null||a.parentNode.removeChild(a),!0},()=>{var s;return ne(se(((s=i.proxy)==null?void 0:s.$options.name)||""))}}});[af,rf,lf,cf,uf,df,hf,mf,pf,vf,bf,wf,Sf,Tf,If,Af,Df,Bf,Lf,jf,Ff,kf,Rf].forEach(e=>{e.install=t=>{t.component(e.name,e)}});const Vf=af,$f=rf,Nf=lf,zf=cf,Gf=uf,Uf=df,Hf=hf,Wf=mf,qf=pf,Qf=vf,Zf=bf,Jf=wf,Xf=Sf,Yf=Tf,Kf=If,e0=Af,t0=Df,i0=Bf,n0=Lf,o0=jf,a0=Ff,r0=kf,s0=Rf;X({VcImageryProviderAmap:Vf,VcImageryProviderArcgis:$f,VcImageryProviderBaidu:Nf,VcImageryProviderBing:zf,VcImageryProviderGoogle:Gf,VcImageryProviderGrid:Uf,VcImageryProviderIon:Hf,VcImageryProviderMapbox:Wf,VcImageryProviderOsm:qf,VcImageryProviderSingletile:Qf,VcImageryProviderSupermap:Zf,VcImageryProviderTencent:Jf,VcImageryProviderTianditu:Xf,VcImageryProviderTileCoordinates:Yf,VcImageryProviderTms:Kf,VcImageryProviderTiledcache:e0,VcImageryProviderUrltemplate:t0,VcImageryProviderWms:i0,VcImageryProviderWmts:n0,VcTerrainProviderCesium:o0,VcTerrainProviderArcgis:a0,VcTerrainProviderVrTheworld:r0,VcTerrainProviderTianditu:s0});const c5=X("customDatasourceProps",{...Ae,...Je,entities:{type:Array,default:()=>[]},name:String,destroy:{type:Boolean,default:!1}});var l0=ee({name:"VcDatasourceCustom",props:c5,emits:oa,setup(e,t){const i=ae();return i.cesiumClass="CustomDataSource",Jo(e,t,i),i.createCesiumObject=async()=>new Cesium.CustomDataSource(e.name),()=>{var n,o;return t.slots.default?S("i",{class:se(((n=i.proxy)==null?void 0:n.$options.name)||""),style:{display:"none !important"}},Xe(t.slots.default)):ne(se(((o=i.proxy)==null?void 0:o.$options.name)||""))}}});const u5=X("czmlDatasourceProps",{...Ae,...Je,entities:{type:Array,default:()=>[]},czml:{type:[String,Object,Array],required:!0},...er,...Tt,destroy:{type:Boolean,default:!1}});var c0=ee({name:"VcDatasourceCzml",props:u5,emits:oa,setup(e,t){const i=ae();i.cesiumClass="CzmlDataSource";const n=Jo(e,t,i);if(n!==void 0)return i.createCesiumObject=async()=>{const o=n.transformProps(e);return Cesium.CzmlDataSource.load(e.czml,o)},()=>{var o,r;return t.slots.default?S("i",{class:se(((o=i.proxy)==null?void 0:o.$options.name)||""),style:{display:"none !important"}},Xe(t.slots.default)):ne(se(((r=i.proxy)==null?void 0:r.$options.name)||""))}}});const d5=X("geojsonDatasourceProps",{...Ae,...Je,entities:{type:Array,default:()=>[]},...Ys,...er,describe:[Function,Object],markerSize:{type:Number,default:48},markerSymbol:String,markerColor:{type:[Object,String,Array],default:()=>({x:.2549019607843137,y:.4117647058823529,z:.8823529411764706}),watcherOptions:{cesiumObjectBuilder:Ie}},stroke:{type:[Object,String,Array],default:()=>({x:1,y:1,z:0}),watcherOptions:{cesiumObjectBuilder:Ie}},strokeWidth:{type:Number,default:2},fill:{type:[Object,String,Array],default:()=>({x:1,y:1,z:0,w:.39215686274509803}),watcherOptions:{cesiumObjectBuilder:Ie}},...$o,...Tt,destroy:{type:Boolean,default:!1}});var u0=ee({name:"VcDatasourceGeojson",props:d5,emits:oa,setup(e,t){const i=ae();i.cesiumClass="GeoJsonDataSource";const n=Jo(e,t,i);if(n!==void 0)return i.createCesiumObject=async()=>{const o=n.transformProps(e);return Cesium.GeoJsonDataSource.load(e.data,o)},()=>{var o,r;return t.slots.default?S("i",{class:se(((o=i.proxy)==null?void 0:o.$options.name)||""),style:{display:"none !important"}},Xe(t.slots.default)):ne(se(((r=i.proxy)==null?void 0:r.$options.name)||""))}}});const h5=X("kmlDatasourceProps",{...Ae,...Je,entities:{type:Array,default:()=>[]},...Ys,camera:Object,canvas:HTMLCanvasElement,...er,...$o,...Ne,...Tt,destroy:{type:Boolean,default:!1},screenOverlayContainer:[Element,String]});var d0=ee({name:"VcDatasourceKml",props:h5,emits:oa,setup(e,t){const i=ae();i.cesiumClass="KmlDataSource";const n=Jo(e,t,i),o=ml();return i.createCesiumObject=async()=>{const r=n==null?void 0:n.transformProps(e);return r.camera||(r.camera=o==null?void 0:o.viewer.camera),r.canvas||(r.canvas=o==null?void 0:o.viewer.canvas),Cesium.KmlDataSource.load(e.data||"",r)},()=>{var r,a;return t.slots.default?S("i",{class:se(((r=i.proxy)==null?void 0:r.$options.name)||""),style:{display:"none !important"}},Xe(t.slots.default)):ne(se(((a=i.proxy)==null?void 0:a.$options.name)||""))}}});[l0,c0,u0,d0].forEach(e=>{e.install=t=>{t.component(e.name,e)}});const h0=l0,m0=c0,p0=u0,v0=d0;X({VcDatasourceCustom:h0,VcDatasourceCzml:m0,VcDatasourceGeojson:p0,VcDatasourceKml:v0});const m5=X("billboarGraphicsProps",{...Ta,...Dn,...Yn,...Lo,...jo,...ko,...Xt,...sn,...ln,...cs,...Ia,...ji,...$t,...Bn,...Ln,...Fo,...An,...Ae,...ft,...mu});var f0=ee({name:"VcGraphicsBillboard",props:m5,emits:na,setup(e,t){const i=ae();return i.cesiumClass="BillboardGraphics",jt(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const p5=X("boxGraphicsProps",{...Ae,...Aa,...Xt,...Fi,...ai,...ki,...Qt,...Yt,...Nt,...ft});var g0=ee({name:"VcGraphicsBox",props:p5,emits:na,setup(e,t){const i=ae();return i.cesiumClass="BoxGraphics",jt(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const v5={...Ae,...ri,...ji,...$t,...Xt,...Kt,...Ro,...jn,...ct,...Fi,...ai,...ki,...Qt,...Yt,...Nt,...ft,...Ri,...Kn};var y0=ee({name:"VcGraphicsCorridor",props:v5,emits:na,setup(e,t){const i=ae();return i.cesiumClass="CorridorGraphics",jt(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const f5=X("cylinderGraphicsProps",{...Ae,...Da,...Ba,...La,...Xt,...Fi,...ai,...ki,...Qt,...Yt,...eo,...ja,...Nt,...ft});var b0=ee({name:"VcGraphicsCylinder",props:f5,emits:na,setup(e,t){const i=ae();return i.cesiumClass="CylinderGraphics",jt(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const g5=X("ellipseGraphicsProps",{...Ae,...Fa,...ka,...$t,...Xt,...Kt,...Ro,...ln,...Hi,...ct,...Fi,...ai,...ki,...Qt,...Yt,...eo,...Nt,...ft,...Ri,...Kn});var C0=ee({name:"VcGraphicsEllipse",props:g5,emits:we,setup(e,t){const i=ae();return i.cesiumClass="EllipseGraphics",jt(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const y5=X("ellipsoidGraphicsProps",{...Ae,...Ra,...Va,...$a,...Na,...za,...Ga,...Xt,...Fi,...ai,...ki,...Qt,...Yt,...to,...io,...Ua,...Nt,...ft});var w0=ee({name:"VcGraphicsEllipsoid",props:y5,emits:we,setup(e,t){const i=ae();return i.cesiumClass="EllipsoidGraphics",jt(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const b5=X("labelGraphicsProps",{...Ae,...us,...ds,...hs,...Dn,...ms,...ps,...vs,...Yn,...Lo,...jo,...ko,...Xt,...fs,...Qt,...Yt,...Ln,...Fo,...Bn,...ft,...An});var _0=ee({name:"VcGraphicsLabel",props:b5,emits:we,setup(e,t){const i=ae();return i.cesiumClass="LabelGraphics",jt(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const C5=X("modelGraphicsProps",{...Ae,...gs,...Dn,...ys,...bs,...Cs,...pu,...ws,...Nt,...Xt,..._s,...Es,...sn,...Ps,...xs,...Ha,...Os,...ft,...vu,...fu,...Vo});var E0=ee({name:"VcGraphicsModel",props:C5,emits:we,setup(e,t){const i=ae();return i.cesiumClass="ModelGraphics",jt(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const w5=X("pathGraphicsProps",{...Ae,leadTime:[Number,Object,Function],trailTime:[Number,Object,Function],...ji,resolution:{type:[Number,Object,Function],default:60},...ai,...ft});var P0=ee({name:"VcGraphicsPath",props:w5,emits:we,setup(e,t){const i=ae();return i.cesiumClass="PathGraphics",jt(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const _5=X("planeGraphicsProps",{...Ae,...gu,dimensions:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:pt}},...Fi,...ai,...ki,...Qt,...Yt,...Nt,...ft});var x0=ee({name:"VcGraphicsPlane",props:_5,emits:we,setup(e,t){const i=ae();return i.cesiumClass="PlaneGraphics",jt(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const E5=X("pointGraphicsProps",{...Ae,...Ms,...Xt,...sn,...Qt,...Yt,...Bn,...Ln,...ft,...An});var O0=ee({name:"VcGraphicsPoint",props:E5,emits:we,setup(e,t){const i=ae();return i.cesiumClass="PointGraphics",jt(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const P5=X("polygonGraphicsProps",{...Ae,...yu,...$t,...Xt,...Kt,...Ro,...Hi,...ct,...Fi,...ai,...ki,...Qt,...Yt,...Wa,...Ss,...Ts,...cn,...Nt,...ft,...Ri,...Kn});var M0=ee({name:"VcGraphicsPolygon",props:P5,emits:we,setup(e,t){const i=ae();return i.cesiumClass="PolygonGraphics",jt(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const x5=X("polylineGraphicsProps",{...Ae,...ri,...ji,...ct,...ai,...bu,...cn,...$o,...Nt,...ft,...Ri,...Kn});var S0=ee({name:"VcGraphicsPolyline",props:x5,emits:we,setup(e,t){const i=ae();return i.cesiumClass="PolylineGraphics",jt(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const O5=X("polylineVolumeGraphicsProps",{...Ae,...ri,...Cu,...jn,...ct,...Fi,...ai,...ki,...Qt,...Yt,...Nt,...ft});var T0=ee({name:"VcGraphicsPolylineVolume",props:O5,emits:we,setup(e,t){const i=ae();return i.cesiumClass="PolylineVolumeGraphics",jt(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const M5=X("rectangleGraphicsProps",{...Ae,...wu,...$t,...Xt,...Kt,...Ro,...ln,...Hi,...ct,...Fi,...ai,...ki,...Qt,...Yt,...Nt,...ft,...Ri,...Kn});var I0=ee({name:"VcGraphicsRectangle",props:M5,emits:we,setup(e,t){const i=ae();return i.cesiumClass="RectangleGraphics",jt(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const S5=X("tilesetGraphicsProps",{...Ae,...gs,...Is});var A0=ee({name:"VcGraphicsTileset",props:S5,emits:we,setup(e,t){const i=ae();return i.cesiumClass="Cesium3DTilesetGraphics",jt(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const T5=X("wallGraphicsProps",{...Ae,...ri,...qa,...Qa,...ct,...Fi,...ai,...ki,...Qt,...Yt,...Nt,...ft});var D0=ee({name:"VcGraphicsWall",props:T5,emits:we,setup(e,t){const i=ae();return i.cesiumClass="WallGraphics",jt(e,t,i),()=>{var n;return ne(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});[f0,g0,y0,b0,C0,w0,_0,E0,P0,x0,O0,M0,S0,T0,I0,A0,D0].forEach(e=>{e.install=t=>{t.component(e.name,e)}});const B0=f0,L0=g0,j0=y0,F0=b0,k0=C0,R0=w0,V0=_0,$0=E0,N0=P0,z0=x0,G0=O0,U0=M0,H0=S0,W0=T0,q0=I0,Q0=A0,Z0=D0;X({VcGraphicsBillboard:B0,VcGraphicsBox:L0,VcGraphicsCorridor:j0,VcGraphicsCylinder:F0,VcGraphicsEllipse:k0,VcGraphicsEllipsoid:R0,VcGraphicsLabel:V0,VcGraphicsModel:$0,VcGraphicsPath:N0,VcGraphicsPlane:z0,VcGraphicsPoint:G0,VcGraphicsPolygon:U0,VcGraphicsPolyline:H0,VcGraphicsPolylineVolume:W0,VcGraphicsRectangle:q0,VcGraphicsTileset:Q0,VcGraphicsWall:Z0});const I5={fragmentShader:String,uniforms:Object,textureScale:{type:Number,default:1},forcePowerOfTwo:{type:Boolean,default:!1},sampleMode:Number,pixelFormat:Number,pixelDatatype:Number,...Lu,...ju,name:String},A5=X("postProcessStageProps",I5);var Lc=ee({name:"VcPostProcessStage",props:A5,emits:we,setup(e,t){const i=ae();i.cesiumClass="PostProcessStage",i.cesiumEvents=[];const n=ze(e,t,i);if(n===void 0)return;const{$services:o}=n;return i.mount=async()=>{const{postProcessStages:r}=o,a=r.add(i.cesiumObject);return r.contains(a)},i.unmount=async()=>{const{postProcessStages:r}=o;return r==null?void 0:r.remove(i.cesiumObject)},()=>{var r;return ne(se(((r=i.proxy)==null?void 0:r.$options.name)||""))}}}),D5=`
  uniform sampler2D colorTexture;
  uniform sampler2D depthTexture;
  in 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()
  {
    out_FragColor = texture(colorTexture, v_textureCoordinates);
    float depth = getDepth( texture(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);
      }
      out_FragColor = mix(out_FragColor, u_scanColor, f + f0);
    }
  }
`;function B5(e){return{webgl:t=>{var i;const{viewer:n}=e,o=(i=e.viewer.scene.context)==null?void 0:i.webgl2;let r=D5;o||(r=r.replace("in vec2 v_textureCoordinates;","varying vec2 v_textureCoordinates;"),r=r.replace(/texture\(/g,"texture2D("),r=r.replace(/out_FragColor/g,"gl_FragColor"));const a=Cesium.Cartographic.fromCartesian(t.position,n.scene.globe.ellipsoid),s=Cesium.Cartographic.toCartesian(a,n.scene.globe.ellipsoid),l=new Cesium.Cartesian4(s.x,s.y,s.z,1),c=new Cesium.Cartographic(a.longitude,a.latitude,a.height+500),u=Cesium.Cartographic.toCartesian(c,n.scene.globe.ellipsoid),d=new Cesium.Cartesian4(u.x,u.y,u.z,1),h=new Cesium.Cartographic(a.longitude+Cesium.Math.toRadians(.001),a.latitude,a.height),p=Cesium.Cartographic.toCartesian(h,n.scene.globe.ellipsoid),v=new Cesium.Cartesian4(p.x,p.y,p.z,1),b=new Cesium.Quaternion,y=new Cesium.Matrix3,E=new Date().getTime(),x=new Cesium.Cartesian4,g=new Cesium.Cartesian4,w=new Cesium.Cartesian4,O=new Cesium.Cartesian3,I=new Cesium.Cartesian3,R={u_scanCenterEC:function(){return Cesium.Matrix4.multiplyByVector(n.camera.viewMatrix,l,x)},u_scanPlaneNormalEC:function(){const D=Cesium.Matrix4.multiplyByVector(n.camera.viewMatrix,l,x),M=Cesium.Matrix4.multiplyByVector(n.camera.viewMatrix,d,g);return O.x=M.x-D.x,O.y=M.y-D.y,O.z=M.z-D.z,Cesium.Cartesian3.normalize(O,O),O},u_radius:t.radius,u_scanLineNormalEC:function(){const D=Cesium.Matrix4.multiplyByVector(n.camera.viewMatrix,l,x),M=Cesium.Matrix4.multiplyByVector(n.camera.viewMatrix,d,g),k=Cesium.Matrix4.multiplyByVector(n.camera.viewMatrix,v,w);O.x=M.x-D.x,O.y=M.y-D.y,O.z=M.z-D.z,Cesium.Cartesian3.normalize(O,O),I.x=k.x-D.x,I.y=k.y-D.y,I.z=k.z-D.z;const $=(new Date().getTime()-E)%t.interval/t.interval;return Cesium.Quaternion.fromAxisAngle(O,$*Cesium.Math.PI*2,b),Cesium.Matrix3.fromQuaternion(b,y),Cesium.Matrix3.multiplyByVector(y,I,I),Cesium.Cartesian3.normalize(I,I),I},u_scanColor:t.color};return{shaderSource:r,uniforms:R}}}}var L5=`
  uniform sampler2D colorTexture;
  uniform sampler2D depthTexture;
  in 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()
  {
    out_FragColor = texture(colorTexture, v_textureCoordinates);
    float depth = getDepth( texture(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);
      out_FragColor = mix(out_FragColor, u_scanColor, f);
    }
  }
`;function j5(e){return{webgl:t=>{var i;const{viewer:n}=e,o=(i=n.scene.context)==null?void 0:i.webgl2;let r=L5;o||(r=r.replace("in vec2 v_textureCoordinates;","varying vec2 v_textureCoordinates;"),r=r.replace(/texture\(/g,"texture2D("),r=r.replace(/out_FragColor/g,"gl_FragColor"));const a=Cesium.Cartographic.fromCartesian(t.position,n.scene.globe.ellipsoid),s=Cesium.Cartographic.toCartesian(a,n.scene.globe.ellipsoid),l=new Cesium.Cartesian4(s.x,s.y,s.z,1),c=new Cesium.Cartographic(a.longitude,a.latitude,a.height+500),u=Cesium.Cartographic.toCartesian(c,n.scene.globe.ellipsoid),d=new Cesium.Cartesian4(u.x,u.y,u.z,1),h=new Date().getTime(),p=new Cesium.Cartesian4,v=new Cesium.Cartesian4,b=new Cesium.Cartesian3,y={u_scanCenterEC:function(){return Cesium.Matrix4.multiplyByVector(n.camera.viewMatrix,l,p)},u_scanPlaneNormalEC:function(){const E=Cesium.Matrix4.multiplyByVector(n.camera.viewMatrix,l,p),x=Cesium.Matrix4.multiplyByVector(n.camera.viewMatrix,d,v);return b.x=x.x-E.x,b.y=x.y-E.y,b.z=x.z-E.z,Cesium.Cartesian3.normalize(b,b),b},u_radius:function(){return t.radius*((new Date().getTime()-h)%t.interval)/t.interval},u_scanColor:t.color};return{shaderSource:r,uniforms:y}}}}const F5={position:[0,0],radius:1500,interval:3500,color:[0,0,0,255]},k5=X("postProcessStageScanProps",{type:{type:String,default:"radar"},options:Object});var J0=ee({name:"VcPostProcessStageScan",props:k5,emits:we,setup(e,t){const i=ae();i.cesiumClass="VcPostProcessStageScan",i.cesiumEvents=[];const n=ze(e,t,i);if(n===void 0)return;const o=te(""),r=te(null),{$services:a}=n,s=B5(a),l=j5(a);let c=[];const u=re(()=>Object.assign({},F5,e.options));return c.push(he(()=>u,d=>{i.mounted&&i.proxy.reload()},{deep:!0})),i.createCesiumObject=async()=>{const d=n.transformProps(u.value);let h;return e.type==="radar"?h=s.webgl(d):e.type==="circle"&&(h=l.webgl(d)),o.value=h.shaderSource,r.value=h.uniforms,!0},Ke(()=>{c.forEach(d=>d()),c=[]}),()=>S(Lc,{fragmentShader:o.value,uniforms:r.value})}});const R5=X("postProcessStageCollectionProps",{postProcesses:{type:Array,default:()=>[]}});var X0=ee({name:"VcPostProcessStageCollection",props:R5,emits:we,setup(e,t){const i=ae();i.cesiumClass="PostProcessStageCollection",i.cesiumEvents=[];const n=ze(e,t,i);if(n===void 0)return;const{$services:o}=n,r=[];let a=[];return a.push(he(()=>e.postProcesses,s=>{var l,c;i.mounted&&((c=(l=i.proxy).reload)==null||c.call(l))},{deep:!0})),i.createCesiumObject=async()=>r,i.mount=async()=>{const{postProcessStages:s}=o;return e.postProcesses.forEach(l=>{const c=n.transformProps(l);r.push(s.add(new Cesium.PostProcessStage(c)))}),!0},i.unmount=async()=>{const{postProcessStages:s}=o;return r.forEach(l=>{s.remove(l)}),r.length=0,!0},Ke(()=>{a.forEach(s=>s()),a=[]}),()=>{var s,l;return t.slots.default?S("i",{class:se(((s=i.proxy)==null?void 0:s.$options.name)||""),style:{display:"none !important"}},Xe(t.slots.default)):ne(se(((l=i.proxy)==null?void 0:l.$options.name)||""))}}});[Lc,J0,X0].forEach(e=>{e.install=t=>{t.component(e.name,e)}});const Y0=Lc,K0=J0,eg=X0;X({VcPostProcessStage:Y0,VcPostProcessStageScan:K0,VcPostProcessStageCollection:eg});var Nr=ee({name:"VcConfigProvider",props:{locale:{type:Object,default:()=>ku},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=Qc(e);return()=>Rc(t,"default",{config:i==null?void 0:i.value})}});Nr.install=e=>{e.component(Nr.name,Nr)};const tg=Nr,fM=X("VcConfigProvider",tg),V5={...we,stop:e=>!0};var ig=ee({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)"},...Vn},emits:V5,setup(e,t){var i;const n=ae();n.cesiumClass="VcAnalysisFlood",n.cesiumEvents=[];const o=ze(e,t,n);if(o===void 0)return;const{emit:r}=t,a=te(!1);(i=St(n).proxy.creatingPromise)==null||i.then(()=>{a.value=!0});const s=te(!1),l=te(null),c=te(-1),u=te(null);let d=!1,h=[];h.push(he(()=>e.minHeight,E=>{c.value=E})),n.createCesiumObject=async()=>{const{ColorGeometryInstanceAttribute:E}=Cesium;return l.value={color:E.fromColor(Ie(e.color))},u.value},n.mount=async()=>{const{viewer:E}=o.$services;return E.clock.onTick.addEventListener(p),!0},n.unmount=async()=>{const{viewer:E}=o.$services;return E.clock.onTick.removeEventListener(p),c.value=-1,s.value=!1,!0};const p=()=>{s.value&&(c.value<=e.maxHeight?(c.value+=e.speed,d=!1):(Se(n,"stop")&&r("stop",u.value),d=!0,e.loop?c.value=e.minHeight:s.value=!1))},v=E=>{c.value=Cesium.defined(E)?E:e.minHeight,s.value=!0},b=()=>{s.value=!s.value,d&&(c.value=e.minHeight)},y=()=>{c.value=-1,s.value=!1};return Ke(()=>{h.forEach(E=>E()),h=[]}),Object.assign(n.proxy,{start:v,pause:b,stop:y,getCurrentHeight:()=>c.value}),()=>{if(a.value){const{createGuid:E}=Cesium;return S(Cc,{asynchronous:!1,ref:u},()=>S(Zn,{id:E(),attributes:l.value},()=>S(xc,{extrudedHeight:c.value,polygonHierarchy:e.polygonHierarchy})))}else return ne("v-if")}}});const $5=Object.assign({},yt,{icon:"vc-icons-analysis-sightline"}),N5=Object.assign({},hc,{polylineOpts:Object.assign({},Co,{colors:["#51ff00","red"]}),primitiveOpts:Object.assign({},Wn,{appearance:{type:"PolylineColorAppearance"},depthFailAppearance:{type:"PolylineColorAppearance"}}),sightlineType:"polyline"}),z5=Object.assign({},yt,{icon:"vc-icons-analysis-viewshed"}),G5=Object.assign({},Sr,{pointOpts:Object.assign({},wn,{show:!1}),polylineOpts:Object.assign({},Co,{width:15}),primitiveOpts:Object.assign({},Wn,{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({},Mt),removeAll:Object.assign({},Mt,{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)"}}),U5=Object.assign({},{}),H5=Object.assign({},yt,{direction:"right",icon:"vc-icons-analysis-button",activeIcon:"vc-icons-analysis-button",verticalActionsAlign:"center",hideIcon:!1,persistent:!1,modelValue:!0,hideActionOnClick:!1,color:"info"}),ng=["sightline","viewshed"],W5=e=>{let t=!0;return e.forEach(i=>{ng.includes(i)||(console.error(`VueCesium: unknown analysis type: ${i}`),t=!1)}),t},og=X("analysesProps",{...pc,analyses:{type:Array,default:()=>ng,validator:W5},mainFabOpts:{type:Object,default:()=>H5},fabActionOpts:{type:Object,default:()=>U5},sightlineActionOpts:{type:Object,default:()=>$5},sightlineAnalysisOpts:{type:Object,default:()=>N5},viewshedActionOpts:{type:Object,default:()=>z5},viewshedAnalysisOpts:{type:Object,default:()=>G5}}),xn=wi(og);var q5=X("VcAnalysisSightline",ee({name:"VcAnalysisSightline",props:{...Ht,polylineOpts:Object,polygonOpts:Object,primitiveOpts:Object,sightlineType:{type:String,default:"polyline"}},emits:xt,setup(e,t){if(e.sightlineType==="segment"||e.sightlineType==="circle")return dn(e,t,"VcAnalysisSightline");if(e.sightlineType==="polyline")return Po(e,t,"VcAnalysisSightline")}})),Q5=X("VcAnalysisViewshed",ee({name:"VcAnalysisViewshed",props:{...Ht,polylineOpts:Object,primitiveOpts:Object,viewshedOpts:Object},emits:xt,setup(e,t){return dn(e,t,"VcAnalysisViewshed")}}));const Z5={...xt,fabUpdated:e=>!0,clearEvt:(e,t)=>!0};var ag=ee({name:"VcAnalyses",props:og,emits:Z5,setup(e,t){var i;const n=ae();n.cesiumClass="VcAnalyses";const{t:o}=_t(),r={},a=xe(Object.assign({},xn.clearActionOpts,e.clearActionOpts)),s=xe(Object.assign({},xn.mainFabOpts,e.mainFabOpts)),l=xe(Object.assign({},xn.fabActionOpts,e.fabActionOpts)),c=xe(Object.assign({},xn.sightlineActionOpts,b("sightlineActionOpts"))),u=xe(lt(Ge(xn.sightlineAnalysisOpts),e.sightlineAnalysisOpts)),d=xe(Object.assign({},xn.viewshedActionOpts,b("viewshedActionOpts"))),h=xe(lt(Ge(xn.viewshedAnalysisOpts),e.viewshedAnalysisOpts));r.sightlineActionOpts=c,r.sightlineAnalysisOpts=u,r.viewshedActionOpts=d,r.viewshedAnalysisOpts=h,r.clearActionOpts=a;const p=re(()=>e.analyses.map(y=>({name:y,type:"analysis",actionStyle:{background:r[`${Vt(y)}ActionOpts`].color,color:r[`${Vt(y)}ActionOpts`].textColor},actionClass:`vc-analysis-${y} vc-analysis-button`,actionRef:te(null),actionOpts:r[`${Vt(y)}ActionOpts`],cmp:v(y),cmpRef:te(null),cmpOpts:r[`${Vt(y)}AnalysisOpts`],tip:r[`${Vt(y)}ActionOpts`].tooltip.tip||o(`vc.analysis.${Vt(y)}.tip`),isActive:!1})));function v(y){switch(y){case"sightline":return q5;case"viewshed":return Q5;default:return}}function b(y){return To(xn[y],e[y])?l:Object.assign({},l,e[y])}return(i=Tc(e,t,n,p,s,a,"analysis"))==null?void 0:i.renderContent}});[ig,ag].forEach(e=>{e.install=t=>{t.component(e.name,e)}});const rg=ig,sg=ag;X({VcAnalysisFlood:rg,VcAnalyses:sg});var J5=[Qb,wm,_m,Em,Pm,xm,Om,Mm,Sm,Tm,Im,Am,Dm,Kv,of,bc,Vf,$f,Nf,zf,Gf,Uf,Hf,Wf,qf,Qf,Zf,Jf,Xf,Yf,Kf,e0,t0,i0,n0,o0,a0,r0,s0,h0,m0,p0,v0,yc,B0,L0,j0,F0,k0,R0,V0,$0,N0,z0,G0,U0,H0,W0,q0,Q0,Z0,Cc,wc,Ar,Km,_n,ep,tp,op,ap,rp,ip,sp,Pc,Mp,_o,Eo,Sp,qn,Tp,Ip,Ap,Dp,Bp,Qn,Lp,hv,mv,pv,vv,fv,gv,yv,bv,Cv,wv,_v,Ev,Pv,xv,Ov,Mv,jr,Sv,Tv,xc,Iv,En,Av,Dv,Bv,Lv,jv,Fv,kv,Rv,Vv,Pn,Qv,Jv,Xv,Zv,Yv,Y0,K0,eg,li,vn,Dt,mh,jl,sh,ur,lh,ch,uh,Il,Al,Dl,Bl,dh,Ll,hh,Fl,dr,ph,tg,rg,sg],lg=X("default",xg([...J5]));const X5=lg.install,Y5=lg.version;X({install:X5,version:Y5})}}});
//# sourceMappingURL=index.full.dspacev.min.js.map