@gmgis/gm-sdk 1.12.4 → 1.12.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/gm.min.js +263 -145
  2. package/dist/index.js +262 -144
  3. package/package.json +1 -1
package/dist/gm.min.js CHANGED
@@ -4,7 +4,7 @@
4
4
  * @github http://gitlab.greatmap.com.cn:10000/gmgis/gm-sdk.git
5
5
  * @author XIN <1130779739@qq.com>
6
6
  * @organization dvgis
7
- * @version 1.12.4
7
+ * @version 1.12.5
8
8
  *
9
9
  * Copyright (c) 2019-present Caven Chen
10
10
  *
@@ -15765,80 +15765,78 @@ void main()
15765
15765
  `;function kbt(e){e=g(e,g.EMPTY_OBJECT);let t=c(e.typedArray),n=c(e.url);if(t===n)throw new w("exactly one of options.typedArray, options.url must be defined");if(t&&(!c(e.width)||!c(e.height)))throw new w("options.width and options.height are required when options.typedArray is defined");this.typedArray=e.typedArray,this.width=e.width,this.height=e.height,this.pixelFormat=g(e.pixelFormat,Le.RGBA),this.pixelDatatype=g(e.pixelDatatype,ze.UNSIGNED_BYTE);let i=e.url;typeof i=="string"&&(i=Te.createIfNeeded(i)),this.resource=i;let r=g(e.repeat,!0)?hn.REPEAT:hn.CLAMP_TO_EDGE;this.sampler=new Jt({wrapS:r,wrapT:r,minificationFilter:e.minificationFilter,magnificationFilter:e.magnificationFilter,maximumAnisotropy:e.maximumAnisotropy})}var Dxe=kbt;var zbt={FLOAT:"float",VEC2:"vec2",VEC3:"vec3",VEC4:"vec4",MAT2:"mat2",MAT3:"mat2",MAT4:"mat4"},Ixe=Object.freeze(zbt);var Vbt={SIGX:"SIGX",SIGY:"SIGY",SIGZ:"SIGZ",VARX:"VARX",VARY:"VARY",VARZ:"VARZ",SIGR:"VARZ"},Oxe=Object.freeze(Vbt);function Hbt(e){async function t({data:i}){let o=[],r={id:i.id,result:void 0,error:void 0};self.CESIUM_BASE_URL=i.baseUrl;try{let s=await e(i.parameters,o);r.result=s}catch(s){s instanceof Error?r.error={name:s.name,message:s.message,stack:s.stack}:r.error=s}i.canTransferArrayBuffer||(o.length=0);try{postMessage(r,o)}catch(s){r.result=void 0,r.error=`postMessage failed with error: ${Vp(s)}
15766
15766
  with responseMessage: ${JSON.stringify(r)}`,postMessage(r)}}function n(i){var o;postMessage({id:(o=i.data)==null?void 0:o.id,error:`postMessage failed with error: ${JSON.stringify(i)}`})}return self.onmessage=t,self.onmessageerror=n,self}var Pxe=Hbt;globalThis.CESIUM_VERSION="1.122";var Gbt={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:e=>e},Rxe=Math.fround||(e=>t=>(e[0]=+t,e[0]))(new Float32Array(1)),cx=2,Uy=3,u7=4,By=5,Lxe=6,GI=class{constructor(t){this.options=Object.assign(Object.create(Gbt),t),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(t){let{log:n,minZoom:i,maxZoom:o}=this.options;n&&console.time("total time");let r=`prepare ${t.length} points`;n&&console.time(r),this.points=t;let s=[];for(let l=0;l<t.length;l++){let u=t[l];if(!u.geometry)continue;let[f,h]=u.geometry.coordinates,m=Rxe(PH(f)),p=Rxe(RH(h));s.push(m,p,1/0,l,-1,1),this.options.reduce&&s.push(0)}let a=this.trees[o+1]=this._createTree(s);n&&console.timeEnd(r);for(let l=o;l>=i;l--){let u=+Date.now();a=this.trees[l]=this._createTree(this._cluster(a,l)),n&&console.log("z%d: %d clusters in %dms",l,a.numItems,+Date.now()-u)}return n&&console.timeEnd("total time"),this}getClusters(t,n){let i=((t[0]+180)%360+360)%360-180,o=Math.max(-90,Math.min(90,t[1])),r=t[2]===180?180:((t[2]+180)%360+360)%360-180,s=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)i=-180,r=180;else if(i>r){let h=this.getClusters([i,o,180,s],n),m=this.getClusters([-180,o,r,s],n);return h.concat(m)}let a=this.trees[this._limitZoom(n)],l=a.range(PH(i),RH(s),PH(r),RH(o)),u=a.data,f=[];for(let h of l){let m=this.stride*h;f.push(u[m+By]>1?Mxe(u,m,this.clusterProps):this.points[u[m+Uy]])}return f}getChildren(t){let n=this._getOriginId(t),i=this._getOriginZoom(t),o="No cluster with the specified id.",r=this.trees[i];if(!r)throw new Error(o);let s=r.data;if(n*this.stride>=s.length)throw new Error(o);let a=this.options.radius/(this.options.extent*Math.pow(2,i-1)),l=s[n*this.stride],u=s[n*this.stride+1],f=r.within(l,u,a),h=[];for(let m of f){let p=m*this.stride;s[p+u7]===t&&h.push(s[p+By]>1?Mxe(s,p,this.clusterProps):this.points[s[p+Uy]])}if(h.length===0)throw new Error(o);return h}getLeaves(t,n,i){n=n||10,i=i||0;let o=[];return this._appendLeaves(o,t,n,i,0),o}getTile(t,n,i){let o=this.trees[this._limitZoom(t)],r=Math.pow(2,t),{extent:s,radius:a}=this.options,l=a/s,u=(i-l)/r,f=(i+1+l)/r,h={features:[]};return this._addTileFeatures(o.range((n-l)/r,u,(n+1+l)/r,f),o.data,n,i,r,h),n===0&&this._addTileFeatures(o.range(1-l/r,u,1,f),o.data,r,i,r,h),n===r-1&&this._addTileFeatures(o.range(0,u,l/r,f),o.data,-1,i,r,h),h.features.length?h:null}getClusterExpansionZoom(t){let n=this._getOriginZoom(t)-1;for(;n<=this.options.maxZoom;){let i=this.getChildren(t);if(n++,i.length!==1)break;t=i[0].properties.cluster_id}return n}_appendLeaves(t,n,i,o,r){let s=this.getChildren(n);for(let a of s){let l=a.properties;if(l&&l.cluster?r+l.point_count<=o?r+=l.point_count:r=this._appendLeaves(t,l.cluster_id,i,o,r):r<o?r++:t.push(a),t.length===i)break}return r}_createTree(t){let n=new ib(t.length/this.stride|0,this.options.nodeSize,Float32Array);for(let i=0;i<t.length;i+=this.stride)n.add(t[i],t[i+1]);return n.finish(),n.data=t,n}_addTileFeatures(t,n,i,o,r,s){for(let a of t){let l=a*this.stride,u=n[l+By]>1,f,h,m;if(u)f=Nxe(n,l,this.clusterProps),h=n[l],m=n[l+1];else{let b=this.points[n[l+Uy]];f=b.properties;let[x,T]=b.geometry.coordinates;h=PH(x),m=RH(T)}let p={type:1,geometry:[[Math.round(this.options.extent*(h*r-i)),Math.round(this.options.extent*(m*r-o))]],tags:f},_;u||this.options.generateId?_=n[l+Uy]:_=this.points[n[l+Uy]].id,_!==void 0&&(p.id=_),s.features.push(p)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,n){let{radius:i,extent:o,reduce:r,minPoints:s}=this.options,a=i/(o*Math.pow(2,n)),l=t.data,u=[],f=this.stride;for(let h=0;h<l.length;h+=f){if(l[h+cx]<=n)continue;l[h+cx]=n;let m=l[h],p=l[h+1],_=t.within(l[h],l[h+1],a),b=l[h+By],x=b;for(let T of _){let E=T*f;l[E+cx]>n&&(x+=l[E+By])}if(x>b&&x>=s){let T=m*b,E=p*b,S,A=-1,v=((h/f|0)<<5)+(n+1)+this.points.length;for(let I of _){let M=I*f;if(l[M+cx]<=n)continue;l[M+cx]=n;let P=l[M+By];T+=l[M]*P,E+=l[M+1]*P,l[M+u7]=v,r&&(S||(S=this._map(l,h,!0),A=this.clusterProps.length,this.clusterProps.push(S)),r(S,this._map(l,M)))}l[h+u7]=v,u.push(T/x,E/x,1/0,v,-1,x),r&&u.push(A)}else{for(let T=0;T<f;T++)u.push(l[h+T]);if(x>1)for(let T of _){let E=T*f;if(!(l[E+cx]<=n)){l[E+cx]=n;for(let S=0;S<f;S++)u.push(l[E+S])}}}}return u}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,n,i){if(t[n+By]>1){let s=this.clusterProps[t[n+Lxe]];return i?Object.assign({},s):s}let o=this.points[t[n+Uy]].properties,r=this.options.map(o);return i&&r===o?Object.assign({},r):r}};function Mxe(e,t,n){return{type:"Feature",id:e[t+Uy],properties:Nxe(e,t,n),geometry:{type:"Point",coordinates:[jbt(e[t]),Wbt(e[t+1])]}}}function Nxe(e,t,n){let i=e[t+By],o=i>=1e4?`${Math.round(i/1e3)}k`:i>=1e3?`${Math.round(i/100)/10}k`:i,r=e[t+Lxe],s=r===-1?{}:Object.assign({},n[r]);return Object.assign(s,{cluster:!0,cluster_id:e[t+Uy],point_count:i,point_count_abbreviated:o})}function PH(e){return e/360+.5}function RH(e){let t=Math.sin(e*Math.PI/180),n=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return n<0?0:n>1?1:n}function jbt(e){return(e-.5)*360}function Wbt(e){let t=(180-e*360)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}var qbt="11.1.0";return Kxe(Ybt);})();
15767
15767
 
15768
- var GM=(()=>{var Zp=Object.create;var Ve=Object.defineProperty;var qp=Object.getOwnPropertyDescriptor;var Xp=Object.getOwnPropertyNames;var Jp=Object.getPrototypeOf,Kp=Object.prototype.hasOwnProperty;var Qp=(n,e,t)=>e in n?Ve(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var $p=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),ed=(n,e)=>{for(var t in e)Ve(n,t,{get:e[t],enumerable:!0})},xl=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Xp(e))!Kp.call(n,s)&&s!==t&&Ve(n,s,{get:()=>e[s],enumerable:!(r=qp(e,s))||r.enumerable});return n};var td=(n,e,t)=>(t=n!=null?Zp(Jp(n)):{},xl(e||!n||!n.__esModule?Ve(t,"default",{value:n,enumerable:!0}):t,n)),id=n=>xl(Ve({},"__esModule",{value:!0}),n);var ni=(n,e,t)=>(Qp(n,typeof e!="symbol"?e+"":e,t),t);var Sl=$p((F_,bl)=>{bl.exports=GM_Common});var I_={};ed(I_,{Analysis:()=>hl,AnalysisType:()=>lt,AnimationType:()=>V,AroundPoint:()=>nn,AroundView:()=>on,AttackArrow:()=>Le,Billboard:()=>ge,BillboardPrimitive:()=>Qe,BounceBillboardPrimitive:()=>br,BounceLabelPrimitive:()=>Mr,Box:()=>ss,CallbackProperty:()=>$u,Cartesian2:()=>Nu,Cartesian3:()=>Wu,ChartLayer:()=>Xs,Circle:()=>et,CircleBlurMaterialProperty:()=>ra,CircleDiffuseMaterialProperty:()=>sa,CircleFadeMaterialProperty:()=>oa,CirclePulseMaterialProperty:()=>aa,CircleScan:()=>hn,CircleScanMaterialProperty:()=>na,CircleSpiralMaterialProperty:()=>la,CircleVaryMaterialProperty:()=>ha,CircleWaveMaterialProperty:()=>ca,ClassificationType:()=>e_,ClippingPlane:()=>w_,ClippingPlaneCollection:()=>T_,ClippingPolygon:()=>C_,ClippingPolygonCollection:()=>x_,CloudPrimitive:()=>Dr,ClusterLayer:()=>Bi,Color:()=>Yu,ColorMaterialProperty:()=>s_,CoordTransform:()=>he,Corridor:()=>ns,CustomBillboard:()=>$i,CustomGeographicTilingScheme:()=>Bo,CustomLabel:()=>tr,CustomMercatorTilingScheme:()=>jo,CustomShader:()=>m_,CustomShaderMode:()=>p_,CustomShaderTranslucencyMode:()=>d_,Cylinder:()=>hs,CzmlLayer:()=>ji,DiffuseWallPrimitive:()=>Rr,DivIcon:()=>mr,DomUtil:()=>S,DoubleArrow:()=>qe,DynamicBillboard:()=>sr,DynamicLayer:()=>Zi,DynamicModel:()=>ar,Effect:()=>_p,ElecEllipsoidPrimitive:()=>kr,Ellipse:()=>ps,Ellipsoid:()=>__,EllipsoidElectricMaterialProperty:()=>pa,EllipsoidTrailMaterialProperty:()=>da,FeatureGridLayer:()=>Ji,FineArrow:()=>Xe,FlowLinePrimitive:()=>zr,Flying:()=>pn,GatheringPlace:()=>Je,GeoJsonLayer:()=>st,GeoTools:()=>gl,GeographicTilingScheme:()=>i_,GlobeRotate:()=>mn,GpxLayer:()=>Ms,GraticuleLayer:()=>Ds,GroundPrimitiveLayer:()=>Rs,GroundSkyBox:()=>mo,HeatMapLayer:()=>Uh,HeightReference:()=>Ju,HorizontalOrigin:()=>Ku,HtmlLayer:()=>ks,I3S:()=>fr,I3SLayer:()=>zs,ImageMaterialProperty:()=>o_,ImageryLayerFactory:()=>Go,ImageryType:()=>R,JulianDate:()=>Xu,KeyboardRoaming:()=>An,KmlLayer:()=>Ns,Label:()=>tt,LabelLayer:()=>Gs,LabelPrimitive:()=>$e,Layer:()=>P,LayerGroup:()=>zi,LayerType:()=>Fe,LightCylinderPrimitive:()=>Nr,Material:()=>Bu,Math:()=>pr,Matrix3:()=>Gu,Matrix4:()=>Uu,Measure:()=>il,MeasureType:()=>ie,Model:()=>De,ModelAnimationLoop:()=>v_,ModelEventType:()=>be,ModelPrimitive:()=>Gr,MouseEventType:()=>L,MouseMode:()=>we,Overlay:()=>g,OverlayType:()=>F,P:()=>_,Parse:()=>_,Plane:()=>fs,Plot:()=>op,PlotAnalysis:()=>_l,PlotAnalysisType:()=>ht,Point:()=>it,PointPrimitive:()=>Br,Polygon:()=>ye,Polyline:()=>ve,PolylineArrowMaterialProperty:()=>h_,PolylineDashMaterialProperty:()=>a_,PolylineFlickerMaterialProperty:()=>ma,PolylineFlowMaterialProperty:()=>ua,PolylineGlowMaterialProperty:()=>n_,PolylineImageTrailMaterialProperty:()=>_a,PolylineLightingMaterialProperty:()=>fa,PolylineLightingTrailMaterialProperty:()=>ga,PolylineOutlineMaterialProperty:()=>l_,PolylinePrimitive:()=>jr,PolylineTrailMaterialProperty:()=>ya,PolylineVolume:()=>Ts,Position:()=>j,PrimitiveLayer:()=>Bs,RadarLineMaterialProperty:()=>va,RadarScan:()=>_n,RadarSweepMaterialProperty:()=>wa,RadarWaveMaterialProperty:()=>Ta,RasterTileLayer:()=>js,Rect:()=>rt,Rectangle:()=>Zu,ReflectionWaterPrimitive:()=>ts,Resource:()=>f_,RoamingController:()=>Ln,RoamingPath:()=>On,ScanCirclePrimitive:()=>Zr,SceneEventType:()=>A,SceneMode:()=>Vu,ShadowMode:()=>qu,Shp2JsonLayer:()=>Ss,SkyBox:()=>ju,Sphere:()=>ms,T:()=>u,TailedAttackArrow:()=>Ke,TerrainFactory:()=>Zo,TerrainType:()=>xe,TileSetEventType:()=>Z,Tileset:()=>yr,TilesetLayer:()=>Zs,TilesetStyle:()=>t_,Track:()=>Hn,TrackController:()=>Fn,TrackViewMode:()=>Ee,TrailLinePrimitive:()=>Xr,Transform:()=>u,UniformType:()=>u_,Util:()=>v,VERSION:()=>S_,VectorLayer:()=>ce,VerticalOrigin:()=>Qu,VideoPrimitive:()=>Kr,Viewer:()=>Eh,Wall:()=>Es,WallImageTrailMaterialProperty:()=>Ca,WallLineTrailMaterialProperty:()=>xa,WallTrailMaterialProperty:()=>Ea,WaterMaterialProperty:()=>Pa,WaterPrimitive:()=>$r,Weather:()=>Ep,WindLayer:()=>jh,config:()=>P_,createElevationBandMaterial:()=>y_,createGooglePhotorealistic3DTileset:()=>g_,ebMercatorTilingScheme:()=>r_,getLib:()=>me,ready:()=>b_,registerLib:()=>de,writeTextToCanvas:()=>c_});var El={};function de(n,e){El[n]=e}function me(n){return El[n]}var Pl={};function mt(n,e){Pl[n]=e}function ut(n){return Pl[n]}var rd={},Fe=rd;var i=td(Sl(),1);de("Cesium",i.Cesium);de("Supercluster",i.Supercluster);var sd="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),li=class{static uuid(e="D"){let t=[];t[8]=t[13]=t[18]=t[23]="-",t[14]="4";let r;for(let s=0;s<36;s++)t[s]||(r=0|Math.random()*16,t[s]=sd[s===19?r&3|8:r]);return e+"-"+t.join("")}static merge(e,...t){let r,s,o,a;for(s=0,o=t.length;s<o;s++){a=t[s];for(r in a)e[r]=a[r]}return e}static splitWords(e){return this.trim(e).split(/\s+/)}static setOptions(e,t){e.hasOwnProperty("options")||(e.options=e.options?Object.create(e.options):{});for(let r in t)e.options[r]=t[r];return e.options}static formatNum(e,t){let r=Math.pow(10,t===void 0?6:t);return Math.round(e*r)/r}static trim(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}static emptyImageUrl(){return function(){return"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="}()}static checkPosition(e){return e&&e.hasOwnProperty("_lng")&&e.hasOwnProperty("_lat")&&e.hasOwnProperty("_alt")}static debounce(e,t){let r=null;return function(){r&&clearTimeout(r),r=setTimeout(e,t)}}static throttle(e,t){let r=!0;return function(){if(!r)return!1;r=!1,setTimeout(()=>{e(),r=!0},t)}}static dataURLtoBlob(e){let t=e.split(","),r=t[0].match(/:(.*?);/)[1],s=atob(t[1]),o=s.length,a=new Uint8Array(o);for(;o--;)a[o]=s.charCodeAt(o);return new Blob([a],{type:r})}static isPromise(e){return Promise.resolve(e)==e}},v=li;var hi=class{static get(e){return typeof e=="string"?document.getElementById(e):e}static getStyle(e,t){let r=e.style[t]||e.currentStyle&&e.currentStyle[t];if((!r||r==="auto")&&document.defaultView){let s=document.defaultView.getComputedStyle(e,null);r=s?s[t]:null}return r==="auto"?null:r}static create(e,t,r=null){let s=document.createElement(e);return s.className=t||"",r&&r.appendChild(s),s}static remove(e){let t=e.parentNode;t&&t.removeChild(e)}static empty(e){for(;e.firstChild;)e.removeChild(e.firstChild)}static hasClass(e,t){if(e.classList!==void 0)return e.classList.contains(t);let r=this.getClass(e);return r.length>0&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(r)}static addClass(e,t){if(e.classList!==void 0){let r=v.splitWords(t);for(let s=0,o=r.length;s<o;s++)e.classList.add(r[s])}else if(!this.hasClass(e,t)){let r=this.getClass(e);this.setClass(e,(r?r+" ":"")+t)}}static removeClass(e,t){e.classList!==void 0?e.classList.remove(t):this.setClass(e,v.trim((" "+this.getClass(e)+" ").replace(" "+t+" "," ")))}static setClass(e,t){e.className.baseVal===void 0?e.className=t:e.className.baseVal=t}static getClass(e){return e.correspondingElement&&(e=e.correspondingElement),e.className.baseVal===void 0?e.className:e.className.baseVal}static createSvg(e,t,r,s){let o=document.createElementNS("http://www.w3.org/2000/svg","svg:svg");o.setAttribute("class","svg-path"),o.setAttribute("width",e),o.setAttribute("height",t),o.setAttribute("viewBox",`0 0 ${e} ${t}`);let a=document.createElementNS("http://www.w3.org/2000/svg","path");return a.setAttribute("d",r),o.appendChild(a),s&&s.appendChild(o),o}static parseDom(e,t,r){t=t!=null?t:!1;let s=document.createElement("div");return s.className=r||"",s.innerHTML=e,t?s:s.childNodes}static enterFullscreen(e){e&&(e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen())}static exitFullscreen(){document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()}static createVideo(e,t,r=null){let s=this.create("video",t,r),o=this.create("source","",s);o.setAttribute("src",e),o.setAttribute("type","video/map4");let a=this.create("source","",s);return a.setAttribute("src",e),a.setAttribute("type","video/quicktime"),s}},S=hi;var ci=Math.PI*2,_t=100,pi=1e-4,di=class{static distance(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2))}static wholeDistance(e){let t=0;for(let r=0;r<e.length-1;r++)t+=this.distance(e[r],e[r+1]);return t}static getBaseLength(e){return Math.pow(this.wholeDistance(e),.99)}static mid(e,t){return[(e[0]+t[0])/2,(e[1]+t[1])/2]}static getCircleCenterOfThreePoints(e,t,r){let s=[(e[0]+t[0])/2,(e[1]+t[1])/2],o=[s[0]-e[1]+t[1],s[1]+e[0]-t[0]],a=[(e[0]+r[0])/2,(e[1]+r[1])/2],l=[a[0]-e[1]+r[1],a[1]+e[0]-r[0]];return this.getIntersectPoint(s,o,a,l)}static getIntersectPoint(e,t,r,s){let o,a,l,h;return e[1]===t[1]?(l=(s[0]-r[0])/(s[1]-r[1]),o=l*(e[1]-r[1])+r[0],a=e[1],[o,a]):r[1]===s[1]?(h=(t[0]-e[0])/(t[1]-e[1]),o=h*(r[1]-e[1])+e[0],a=r[1],[o,a]):(h=(t[0]-e[0])/(t[1]-e[1]),l=(s[0]-r[0])/(s[1]-r[1]),a=(h*e[1]-e[0]-l*r[1]+r[0])/(h-l),o=h*a-h*e[1]+e[0],[o,a])}static getAzimuth(e,t){let r,s=Math.asin(Math.abs(t[1]-e[1])/this.distance(e,t));return t[1]>=e[1]&&t[0]>=e[0]?r=s+Math.PI:t[1]>=e[1]&&t[0]<e[0]?r=ci-s:t[1]<e[1]&&t[0]<e[0]?r=s:t[1]<e[1]&&t[0]>=e[0]&&(r=Math.PI-s),r}static getAngleOfThreePoints(e,t,r){let s=this.getAzimuth(t,e)-this.getAzimuth(t,r);return s<0?s+ci:s}static isClockWise(e,t,r){return(r[1]-e[1])*(t[0]-e[0])>(t[1]-e[1])*(r[0]-e[0])}static getPointOnLine(e,t,r){let s=t[0]+e*(r[0]-t[0]),o=t[1]+e*(r[1]-t[1]);return[s,o]}static getCubicValue(e,t,r,s,o){e=Math.max(Math.min(e,1),0);let a=1-e,l=e*e,h=l*e,c=a*a,p=c*a,f=p*t[0]+3*c*e*r[0]+3*a*l*s[0]+h*o[0],T=p*t[1]+3*c*e*r[1]+3*a*l*s[1]+h*o[1];return[f,T]}static getThirdPoint(e,t,r,s,o){let a=this.getAzimuth(e,t),l=o?a+r:a-r,h=s*Math.cos(l),c=s*Math.sin(l);return[t[0]+h,t[1]+c]}static getArcPoints(e,t,r,s){let o,a,l=[],h=s-r;h=h<0?h+ci:h;for(let c=0;c<=_t;c++){let p=r+h*c/_t;o=e[0]+t*Math.cos(p),a=e[1]+t*Math.sin(p),l.push([o,a])}return l}static getBisectorNormals(e,t,r,s){let o=this.getNormal(t,r,s),a=Math.sqrt(o[0]*o[0]+o[1]*o[1]),l=o[0]/a,h=o[1]/a,c=this.distance(t,r),p=this.distance(r,s),f,T,y,m,E;return a>pi?this.isClockWise(t,r,s)?(f=e*c,T=r[0]-f*h,y=r[1]+f*l,E=[T,y],f=e*p,T=r[0]+f*h,y=r[1]-f*l,m=[T,y]):(f=e*c,T=r[0]+f*h,y=r[1]-f*l,E=[T,y],f=e*p,T=r[0]-f*h,y=r[1]+f*l,m=[T,y]):(T=r[0]+e*(t[0]-r[0]),y=r[1]+e*(t[1]-r[1]),E=[T,y],T=r[0]+e*(s[0]-r[0]),y=r[1]+e*(s[1]-r[1]),m=[T,y]),[E,m]}static getNormal(e,t,r){let s=e[0]-t[0],o=e[1]-t[1],a=Math.sqrt(s*s+o*o);s/=a,o/=a;let l=r[0]-t[0],h=r[1]-t[1],c=Math.sqrt(l*l+h*h);l/=c,h/=c;let p=s+l,f=o+h;return[p,f]}static getCurvePoints(e,t){let s=[this.getLeftMostControlPoint(e,t)],o,a,l,h;for(let f=0;f<t.length-2;f++)o=t[f],a=t[f+1],l=t[f+2],h=this.getBisectorNormals(e,o,a,l),s=s.concat(h);let c=this.getRightMostControlPoint(e,t);s.push(c);let p=[];for(let f=0;f<t.length-1;f++){o=t[f],a=t[f+1],p.push(o);for(let T=0;T<_t;T++){let y=this.getCubicValue(T/_t,o,s[f*2],s[f*2+1],a);p.push(y)}p.push(a)}return p}static getLeftMostControlPoint(e,t){let r=t[0],s=t[1],o=t[2],l=this.getBisectorNormals(0,r,s,o)[0],h=this.getNormal(r,s,o),c=Math.sqrt(h[0]*h[0]+h[1]*h[1]),p,f;if(c>pi){let T=this.mid(r,s),y=r[0]-T[0],m=r[1]-T[1],x=2/this.distance(r,s),b=-x*m,I=x*y,N=b*b-I*I,H=2*b*I,W=I*I-b*b,ee=l[0]-T[0],le=l[1]-T[1];p=T[0]+N*ee+H*le,f=T[1]+H*ee+W*le}else p=r[0]+e*(s[0]-r[0]),f=r[1]+e*(s[1]-r[1]);return[p,f]}static getRightMostControlPoint(e,t){let r=t.length,s=t[r-3],o=t[r-2],a=t[r-1],h=this.getBisectorNormals(0,s,o,a)[1],c=this.getNormal(s,o,a),p=Math.sqrt(c[0]*c[0]+c[1]*c[1]),f,T;if(p>pi){let y=this.mid(o,a),m=a[0]-y[0],E=a[1]-y[1],b=2/this.distance(o,a),I=-b*E,N=b*m,H=I*I-N*N,W=2*I*N,ee=N*N-I*I,le=h[0]-y[0],Y=h[1]-y[1];f=y[0]+H*le+W*Y,T=y[1]+W*le+ee*Y}else f=a[0]+e*(o[0]-a[0]),T=a[1]+e*(o[1]-a[1]);return[f,T]}static getBezierPoints(e){if(e.length<=2)return e;let t=[],r=e.length-1;for(let s=0;s<=1;s+=.01){let o=0,a=0;for(let l=0;l<=r;l++){let h=this.getBinomialFactor(r,l),c=Math.pow(s,l),p=Math.pow(1-s,r-l);o+=h*c*p*e[l][0],a+=h*c*p*e[l][1]}t.push([o,a])}return t.push(e[r]),t}static getBinomialFactor(e,t){return this.getFactorial(e)/(this.getFactorial(t)*this.getFactorial(e-t))}static getFactorial(e){if(e<=1)return 1;if(e===2)return 2;if(e===3)return 6;if(e===4)return 24;if(e===5)return 120;let t=1;for(let r=1;r<=e;r++)t*=r;return t}static getQBSplinePoints(e){if(e.length<=2)return e;let t=2,r=[],s=e.length-t-1;r.push(e[0]);for(let o=0;o<=s;o++)for(let a=0;a<=1;a+=.05){let l=0,h=0;for(let c=0;c<=t;c++){let p=this.getQuadricBSplineFactor(c,a);l+=p*e[o+c][0],h+=p*e[o+c][1]}r.push([l,h])}return r.push(e[e.length-1]),r}static getQuadricBSplineFactor(e,t){return e===0?Math.pow(t-1,2)/2:e===1?(-2*Math.pow(t,2)+2*t+1)/2:e===2?Math.pow(t,2)/2:0}},w=di;var od={INITIALIZED:"initialized",ADDED:"added",REMOVED:"removed",CLEARED:"cleared",INSTALLED:"installed",ENABLED:"enabled",DISABLED:"disabled",PLAY:"play",PAUSE:"pause",RESTORE:"restore"},d=od;var je={ADD:"add",REMOVE:"remove"},L={LEFT_DOWN:i.Cesium.ScreenSpaceEventType.LEFT_DOWN,LEFT_UP:i.Cesium.ScreenSpaceEventType.LEFT_UP,CLICK:i.Cesium.ScreenSpaceEventType.LEFT_CLICK,RIGHT_DOWN:i.Cesium.ScreenSpaceEventType.RIGHT_DOWN,RIGHT_UP:i.Cesium.ScreenSpaceEventType.RIGHT_UP,RIGHT_CLICK:i.Cesium.ScreenSpaceEventType.RIGHT_CLICK,DB_CLICK:i.Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK,MOUSE_MOVE:i.Cesium.ScreenSpaceEventType.MOUSE_MOVE,WHEEL:i.Cesium.ScreenSpaceEventType.WHEEL,MOUSE_OVER:"mouseover",MOUSE_OUT:"mouseout"},Il={ADD_LAYER:"addLayer",REMOVE_LAYER:"removeLayer",ADD_EFFECT:"addEffect",REMOVE_EFFECT:"removeEffect",LEFT_DOWN:i.Cesium.ScreenSpaceEventType.LEFT_DOWN,LEFT_UP:i.Cesium.ScreenSpaceEventType.LEFT_UP,CLICK:i.Cesium.ScreenSpaceEventType.LEFT_CLICK,RIGHT_DOWN:i.Cesium.ScreenSpaceEventType.RIGHT_DOWN,RIGHT_UP:i.Cesium.ScreenSpaceEventType.RIGHT_UP,RIGHT_CLICK:i.Cesium.ScreenSpaceEventType.RIGHT_CLICK,DB_CLICK:i.Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK,MOUSE_MOVE:i.Cesium.ScreenSpaceEventType.MOUSE_MOVE,WHEEL:i.Cesium.ScreenSpaceEventType.WHEEL},A={CAMERA_MOVE_END:"cameraMoveEnd",CAMERA_CHANGED:"cameraChanged",PRE_UPDATE:"preUpdate",POST_UPDATE:"postUpdate",PRE_RENDER:"preRender",POST_RENDER:"postRender",MORPH_COMPLETE:"morphComplete",CLOCK_TICK:"clockTick",RENDER_ERROR:"renderError"},Pe={...je,LEFT_DOWN:i.Cesium.ScreenSpaceEventType.LEFT_DOWN,LEFT_UP:i.Cesium.ScreenSpaceEventType.LEFT_UP,CLICK:i.Cesium.ScreenSpaceEventType.LEFT_CLICK,RIGHT_DOWN:i.Cesium.ScreenSpaceEventType.RIGHT_DOWN,RIGHT_UP:i.Cesium.ScreenSpaceEventType.RIGHT_UP,RIGHT_CLICK:i.Cesium.ScreenSpaceEventType.RIGHT_CLICK,DB_CLICK:i.Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK,MOUSE_MOVE:i.Cesium.ScreenSpaceEventType.MOUSE_MOVE,MOUSE_OVER:"mouseover",MOUSE_OUT:"mouseout",POSITION_UPDATE:"positionUpdate"},be={READY:"ready",TEX_READY:"texturesReady"},Z={INITIAL_TILES_LOADED:"initialTilesLoaded",ALL_TILES_LOADED:"allTilesLoaded ",LOAD_PROGRESS:"loadProgress ",TILE_FAILED:"tileFailed ",TILE_LOAD:"tileLoad",TILE_UNLOAD:"tileUnload",TILE_VISIBLE:"tileVisible"},Se=je,Ie={...je,LEFT_DOWN:i.Cesium.ScreenSpaceEventType.LEFT_DOWN,LEFT_UP:i.Cesium.ScreenSpaceEventType.LEFT_UP,CLICK:i.Cesium.ScreenSpaceEventType.LEFT_CLICK,RIGHT_DOWN:i.Cesium.ScreenSpaceEventType.RIGHT_DOWN,RIGHT_UP:i.Cesium.ScreenSpaceEventType.RIGHT_UP,RIGHT_CLICK:i.Cesium.ScreenSpaceEventType.RIGHT_CLICK,DB_CLICK:i.Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK},re={...je,POST_RENDER:"postRender",ACTIVATE:"activate",DEACTIVATE:"deactivate",RESET_TIME_LINE:"restTimeLine"},se={...je,POST_RENDER:"postRender",RESET_TIME_LINE:"restTimeLine"},C={DRAW_START:"drawStart",DRAW_STOP:"drawStop",EDIT_START:"editStart",EDIT_STOP:"editEnd",DRAW_ANCHOR:"drawAnchor",CREATE_ANCHOR:"createAnchor",UPDATE_ANCHOR:"updateAnchor",ANCHOR_MOVING:"anchorMoving",EDIT_ANCHOR_STOP:"editAnchorStop",CLEAR_ANCHOR:"clearAnchor"};var mi=class{constructor(e){this._types=e,this._cache={}}_on(e,t,r){let s=this.getEvent(e),o;return s&&t&&(o=s.addEventListener(t,r||this)),o}_off(e,t,r){let s=this.getEvent(e),o=!1;return s&&t&&(o=s.removeEventListener(t,r||this)),o}_fire(e,t){let r=this.getEvent(e);r&&r.raiseEvent(t)}_registerEvent(){Object.keys(this._types).forEach(e=>{let t=this._types[e];this._cache[t]=new i.Cesium.Event})}on(e,t,r){return this._on(e,t,r)}once(e,t,r){let s=this._on(e,o=>{t(o),s&&s()},r)}off(e,t,r){return this._off(e,t,r)}fire(e,t){this._fire(e,t)}getEvent(e){return this._cache[e]||void 0}},G=mi;var ui=class extends G{constructor(e,t={}){super(L),this._viewer=e,this._selected=void 0,this._enableEventPropagation=t.enableEventPropagation,this._enableMouseOver=t.enableMouseOver,this._registerEvent(),this._addDefaultEvent()}_registerEvent(){let e=new i.Cesium.ScreenSpaceEventHandler(this._viewer.canvas);Object.keys(i.Cesium.ScreenSpaceEventType).forEach(t=>{let r=i.Cesium.ScreenSpaceEventType[t];this._cache[r]=new i.Cesium.Event,e.setInputAction(s=>{this._cache[r].raiseEvent(s)},r)})}_addDefaultEvent(){this.on(this._types.LEFT_DOWN,this._leftDownHandler,this),this.on(this._types.LEFT_UP,this._leftUpHandler,this),this.on(this._types.CLICK,this._clickHandler,this),this.on(this._types.DB_CLICK,this._dbClickHandler,this),this.on(this._types.RIGHT_DOWN,this._rightDownHandler,this),this.on(this._types.RIGHT_UP,this._rightUpHandler,this),this.on(this._types.RIGHT_CLICK,this._rightClickHandler,this),this.on(this._types.MOUSE_MOVE,this._mouseMoveHandler,this),this.on(this._types.WHEEL,this._mouseWheelHandler,this)}_adjustPosition(e){let t=this._viewer.container.getBoundingClientRect(),r=t.width/this._viewer.container.offsetWidth,s=t.height/this._viewer.container.offsetHeight,o=window.devicePixelRatio,a=e.x/r/o,l=e.y/s/o;return new i.Cesium.Cartesian2(a,l)}_getMouseInfo(e){let t=this._viewer.scene,r=t.pick(e),s,o,a,l;if(t.pickPositionSupported&&(s=t.pickPosition(e)),s){let h=i.Cesium.Ellipsoid.WGS84.cartesianToCartographic(s);h&&(a={lng:i.Cesium.Math.toDegrees(h.longitude),lat:i.Cesium.Math.toDegrees(h.latitude),alt:h.height})}if(t.mode===i.Cesium.SceneMode.SCENE3D&&!(this._viewer.terrainProvider instanceof i.Cesium.EllipsoidTerrainProvider)){let h=t.camera.getPickRay(e);o=t.globe.pick(h,t)}else o=t.camera.pickEllipsoid(e,i.Cesium.Ellipsoid.WGS84);if(o){let h=i.Cesium.Ellipsoid.WGS84.cartesianToCartographic(o);h&&(l={lng:i.Cesium.Math.toDegrees(h.longitude),lat:i.Cesium.Math.toDegrees(h.latitude),alt:h.height})}return{target:r,windowPosition:e,position:s,wgs84Position:a,surfacePosition:o,wgs84SurfacePosition:l}}_getDrillInfos(e){let t=[],s=this._viewer.scene.drillPick(e);return s&&s.length&&s.forEach(o=>{t.push(this._getTargetInfo(o))}),t}_getOverlayId(e){let t;return(e==null?void 0:e.id)instanceof i.Cesium.Entity?t=e.id.overlayId:e instanceof i.Cesium.Cesium3DTileFeature?t=e.tileset.overlayId:((e==null?void 0:e.primitive)instanceof i.Cesium.Cesium3DTileset||e!=null&&e.primitive)&&(t=e.primitive.overlayId),t}_getTargetInfo(e){let t,r,s;return(e==null?void 0:e.id)instanceof i.Cesium.Entity?(r=this._viewer.getLayers().filter(o=>o.layerId===e.id.layerId)[0],r!=null&&r.getOverlay&&(t=r.getOverlay(e.id.overlayId))):e instanceof i.Cesium.Cesium3DTileFeature?(r=this._viewer.getLayers().filter(o=>o.layerId===e.tileset.layerId)[0],s=e,r!=null&&r.getOverlay&&(t=r.getOverlay(e.tileset.overlayId),s&&s.getPropertyNames&&s.getPropertyNames().forEach(a=>{t.attr[a]=s.getProperty(a)}))):(e==null?void 0:e.primitive)instanceof i.Cesium.Cesium3DTileset?(r=this._viewer.getLayers().filter(o=>o.layerId===e.primitive.layerId)[0],r!=null&&r.getOverlay&&(t=r.getOverlay(e.primitive.overlayId))):e!=null&&e.primitive&&(r=this._viewer.getLayers().filter(o=>o.layerId===e.primitive.layerId)[0],r!=null&&r.getOverlay&&(t=r.getOverlay(e.primitive.overlayId))),{layer:r,overlay:t,feature:s,instanceId:e==null?void 0:e.instanceId}}_raiseEvent(e,t={}){var l;let r,s=this._getTargetInfo(t.target),o=s==null?void 0:s.overlay,a=s==null?void 0:s.layer;o!=null&&o.overlayEvent&&(r=o.overlayEvent.getEvent(e),r&&r.numberOfListeners>0&&r.raiseEvent({...s,...t})),(!r||r.numberOfListeners===0||this._eventPropagation)&&(a!=null&&a.layerEvent)&&(r=a.layerEvent.getEvent(e),r&&r.numberOfListeners>0&&r.raiseEvent({...s,...t})),(!r||r.numberOfListeners===0||this._enableEventPropagation)&&((l=this._viewer)!=null&&l.viewerEvent)&&(r=this._viewer.viewerEvent.getEvent(e),r&&r.numberOfListeners>0&&r.raiseEvent({...s,...t})),o!=null&&o.allowDrillPicking&&this._getDrillInfos(t.windowPosition).forEach(c=>{let p=c==null?void 0:c.overlay,f=c==null?void 0:c.layer;(p==null?void 0:p.overlayId)!==o.overlayId&&(p!=null&&p.overlayEvent)&&(r=p.overlayEvent.getEvent(e),(!r||r.numberOfListeners===0)&&(f!=null&&f.layerEvent)&&(r=f.layerEvent.getEvent(e)),r&&r.numberOfListeners>0&&r.raiseEvent({...c,...t}))})}_clickHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(L.CLICK,this._getMouseInfo(e.position))}_dbClickHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(L.DB_CLICK,this._getMouseInfo(e.position))}_rightClickHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(L.RIGHT_CLICK,this._getMouseInfo(e.position))}_mouseMoveHandler(e){if(!(e!=null&&e.endPosition))return!1;let t=this._getMouseInfo(e.endPosition);this._viewer.canvas.style.cursor=t.target?"pointer":"default",this._raiseEvent(L.MOUSE_MOVE,t),this._enableMouseOver&&(!this._selected||this._getOverlayId(this._selected.target)!==this._getOverlayId(t.target))&&(this._raiseEvent(L.MOUSE_OUT,this._selected),this._raiseEvent(L.MOUSE_OVER,t),this._selected=t)}_leftDownHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(L.LEFT_DOWN,this._getMouseInfo(e.position))}_leftUpHandler(e){this._raiseEvent(L.LEFT_UP,this._getMouseInfo(e.position))}_rightDownHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(L.RIGHT_DOWN,this._getMouseInfo(e.position))}_rightUpHandler(e){this._raiseEvent(L.RIGHT_UP,this._getMouseInfo(e.position))}_mouseWheelHandler(e){this._raiseEvent(L.WHEEL,{movement:e})}},_i=ui;var fi=class extends G{constructor(){super(Il),this._registerEvent()}},gi=fi;var yi=class extends G{constructor(e){super(A),this._camera=e.camera,this._scene=e.scene,this._clock=e.clock}on(e,t,r){let s;switch(e){case A.CAMERA_MOVE_END:s=this._camera.moveEnd.addEventListener(t,r||this);break;case A.CAMERA_CHANGED:s=this._camera.changed.addEventListener(t,r||this);break;case A.PRE_UPDATE:s=this._scene.preUpdate.addEventListener(t,r||this);break;case A.POST_UPDATE:s=this._scene.postUpdate.addEventListener(t,r||this);break;case A.PRE_RENDER:s=this._scene.preRender.addEventListener(t,r||this);break;case A.POST_RENDER:s=this._scene.postRender.addEventListener(t,r||this);break;case A.MORPH_COMPLETE:s=this._scene.morphComplete.addEventListener(t,r||this);break;case A.CLOCK_TICK:s=this._clock.onTick.addEventListener(t,r||this);break;case A.RENDER_ERROR:s=this._scene.renderError.addEventListener(t,r||this);break;default:break}return s}off(e,t,r){let s=!1;switch(e){case A.CAMERA_MOVE_END:s=this._camera.moveEnd.removeEventListener(t,r||this);break;case A.CAMERA_CHANGED:s=this._camera.changed.removeEventListener(t,r||this);break;case A.PRE_UPDATE:s=this._scene.preUpdate.removeEventListener(t,r||this);break;case A.POST_UPDATE:s=this._scene.postUpdate.removeEventListener(t,r||this);break;case A.PRE_RENDER:s=this._scene.preRender.removeEventListener(t,r||this);break;case A.POST_RENDER:s=this._scene.postRender.removeEventListener(t,r||this);break;case A.MORPH_COMPLETE:s=this._scene.morphComplete.removeEventListener(t,r||this);break;case A.CLOCK_TICK:s=this._clock.onTick.removeEventListener(t,r||this);break;case A.RENDER_ERROR:s=this._scene.renderError.removeEventListener(t,r||this);break;default:break}return s}},vi=yi;var wi=class extends G{constructor(){super(Se),this._registerEvent()}},Ti=wi;var Ci=class extends G{constructor(){super(Ie),this._registerEvent()}},xi=Ci;var Ei=class extends G{constructor(){super(Pe),this._registerEvent()}},Pi=Ei;var bi=class extends G{constructor(e){super(Z),this._tileset=e}on(e,t,r){return this._tileset.then(s=>{switch(e){case Z.INITIAL_TILES_LOADED:s.initialTilesLoaded.addEventListener(t,r||this);break;case Z.ALL_TILES_LOADED:s.allTilesLoaded.addEventListener(t,r||this);break;case Z.LOAD_PROGRESS:s.loadProgress.addEventListener(t,r||this);break;case Z.TILE_FAILED:s.tileFailed.addEventListener(t,r||this);break;case Z.TILE_LOAD:s.tileLoad.addEventListener(t,r||this);break;case Z.TILE_UNLOAD:s.tileUnload.addEventListener(t,r||this);break;case Z.TILE_VISIBLE:s.tileVisible.addEventListener(t,r||this);break;default:break}}),null}off(e,t,r){return this._tileset.then(s=>{switch(e){case Z.INITIAL_TILES_LOADED:s.initialTilesLoaded.removeEventListener(t,r||this);break;case Z.ALL_TILES_LOADED:s.allTilesLoaded.removeEventListener(t,r||this);break;case Z.LOAD_PROGRESS:s.loadProgress.removeEventListener(t,r||this);break;case Z.TILE_FAILED:s.tileFailed.removeEventListener(t,r||this);break;case Z.TILE_LOAD:s.tileLoad.removeEventListener(t,r||this);break;case Z.TILE_UNLOAD:s.tileUnload.removeEventListener(t,r||this);break;case Z.TILE_VISIBLE:s.tileVisible.removeEventListener(t,r||this);break;default:break}}),!0}},Si=bi;var Ii=class extends G{constructor(e){super(be),this._model=e}on(e,t,r){return this._model.then(s=>{switch(e){case be.READY:s.readyEvent.addEventListener(t,r||this);break;case be.TEX_READY:s.texturesReadyEvent.addEventListener(t,r||this);break;default:break}}),null}off(e,t,r){return this._model.then(s=>{switch(e){case be.READY:s.readyEvent.removeEventListener(t,r||this);break;case be.TEX_READY:s.texturesReadyEvent.removeEventListener(t,r||this);break;default:break}}),!0}},Mi=Ii;var Ai=class extends G{constructor(){super(re),this._registerEvent()}},Di=Ai;var Li=class extends G{constructor(){super(se),this._registerEvent()}},Ri=Li;var Oi=class extends G{constructor(){super(C),this._registerEvent()}},Ye=Oi;var ki=class{constructor(e){this._id=v.uuid(),this._bid=e||v.uuid(),this._delegate=void 0,this._viewer=void 0,this._state=void 0,this._show=!0,this._isGround=!1,this._cache={},this._attr={},this._layerEvent=new xi,this._layerEvent.on(Ie.ADD,this._onAdd,this),this._layerEvent.on(Ie.REMOVE,this._onRemove,this)}get layerId(){return this._id}get id(){return this._bid}get delegate(){return this._delegate}set show(e){this._show=e,this._delegate&&(this._delegate.show=this._show)}get show(){return this._show}get layerEvent(){return this._layerEvent}set attr(e){this._attr=e}get attr(){return this._attr}get state(){return this._state}_addedHook(){}_removedHook(){}_onAdd(e){this._viewer=e,this._delegate&&(this._delegate instanceof i.Cesium.PrimitiveCollection?this._isGround?this._viewer.scene.groundPrimitives.add(this._delegate):this._viewer.scene.primitives.add(this._delegate):this._delegate instanceof i.Cesium.ImageryLayer?this._viewer.imageryLayers.add(this._delegate):this._viewer.dataSources.add(this._delegate),this._addedHook&&this._addedHook(),this._state=d.ADDED)}_onRemove(){this._delegate&&this._viewer&&(this._cache={},this._delegate instanceof i.Cesium.PrimitiveCollection?(this._delegate.removeAll(),this._isGround?this._viewer.scene.groundPrimitives.remove(this._delegate):this._viewer.scene.primitives.remove(this._delegate)):this._delegate instanceof i.Cesium.ImageryLayer?this._viewer.imageryLayers.remove(this._delegate,!1):this._delegate instanceof Promise?(this._delegate.then(e=>{e.entities.removeAll()}),this._viewer.dataSources.remove(this._delegate)):(this._delegate.entities&&this._delegate.entities.removeAll(),this._viewer.dataSources.remove(this._delegate)),this._removedHook&&this._removedHook(),this._state=d.REMOVED)}_addOverlay(e){this._cache.hasOwnProperty(e.overlayId)||(this._cache[e.overlayId]=e,this._delegate&&e.fire(Pe.ADD,this),this._state===d.CLEARED&&(this._state=d.ADDED))}_removeOverlay(e){this._cache.hasOwnProperty(e.overlayId)&&(this._delegate&&e.fire(Pe.REMOVE,this),delete this._cache[e.overlayId])}addOverlay(e){return this._addOverlay(e),this}addOverlays(e){return Array.isArray(e)&&e.forEach(t=>{this._addOverlay(t)}),this}removeOverlay(e){return this._removeOverlay(e),this}getOverlay(e){return this._cache[e]||void 0}getOverlayById(e){let t;return Object.keys(this._cache).forEach(r=>{this._cache[r].id===e&&(t=this._cache[r])}),t}getOverlaysByAttr(e,t){let r=[];return this.eachOverlay(s=>{s.attr[e]===t&&r.push(s)},this),r}eachOverlay(e,t){return Object.keys(this._cache).forEach(r=>{e&&e.call(t||this,this._cache[r])}),this}getOverlays(){let e=[];return Object.keys(this._cache).forEach(t=>{e.push(this._cache[t])}),e}clear(){}remove(){this._viewer&&this._viewer.removeLayer(this)}addTo(e){return e!=null&&e.addLayer&&e.addLayer(this),this}setStyle(e){}on(e,t,r){return this._layerEvent.on(e,t,r||this),this}off(e,t,r){return this._layerEvent.off(e,t,r||this),this}fire(e,t){return this._layerEvent.fire(e,t),this}static registerType(e){e&&(Fe[e.toLocaleUpperCase()]=e.toLocaleLowerCase())}static getLayerType(e){return Fe[e.toLocaleUpperCase()]||void 0}},P=ki;var Fi=class{constructor(e){this._id=e||v.uuid(),this._cache={},this._show=!0,this._viewer=void 0,this._layerGroupEvent=new Ti,this._layerGroupEvent.on(Se.ADD,this._onAdd,this),this._layerGroupEvent.on(Se.REMOVE,this._onRemove,this),this._state=d.INITIALIZED}get id(){return this._id}get type(){return P.getLayerType("layer_group")}set show(e){this._show=e,Object.keys(this._cache).forEach(t=>{this._cache[t].show=this._show})}get show(){return this._show}get layerGroupEvent(){return this._layerGroupEvent}get state(){return this._state}_onAdd(e){this._viewer=e,Object.keys(this._cache).forEach(t=>{this._viewer.addLayer(this._cache[t])}),this._state=d.ADDED}_onRemove(){Object.keys(this._cache).forEach(e=>{this._viewer&&this._viewer.removeLayer(this._cache[e])}),this._cache={},this._state=d.REMOVED}addLayer(e){return Object(this._cache).hasOwnProperty(e.id)||(this._cache[e.id]=e,this._viewer&&this._viewer.addLayer(e)),this}removeLayer(e){return Object(this._cache).hasOwnProperty(e.id)&&(this._viewer&&this._viewer.removeLayer(e),delete this._cache[e.id]),this}getLayer(e){return this._cache[e]||void 0}getLayers(){let e=[];return Object.keys(this._cache).forEach(t=>{e.push(this._cache[t])}),e}addTo(e){return e&&e.addLayerGroup&&e.addLayerGroup(this),this}remove(){return this._viewer&&this._viewer.removeLayerGroup(this),this}};P.registerType("layer_group");var zi=Fi;var Ml=new i.Cesium.WebMercatorProjection,Hi=class{static transformCartesianToWGS84(e){if(e){let t=i.Cesium.Ellipsoid.WGS84.cartesianToCartographic(e);return new j(i.Cesium.Math.toDegrees((t==null?void 0:t.longitude)||0),i.Cesium.Math.toDegrees((t==null?void 0:t.latitude)||0),t.height||0)}return new j(0,0)}static transformCartographicToWGS84(e){return e?new j(i.Cesium.Math.toDegrees((e==null?void 0:e.longitude)||0),i.Cesium.Math.toDegrees((e==null?void 0:e.latitude)||0),e.height||0):new j(0,0)}static transformWGS84ToCartesian(e){return e?i.Cesium.Cartesian3.fromDegrees(e.lng,e.lat,e.alt,i.Cesium.Ellipsoid.WGS84):i.Cesium.Cartesian3.ZERO}static transformWGS84ToCartographic(e){return e?i.Cesium.Cartographic.fromDegrees(e.lng,e.lat,e.alt):i.Cesium.Cartographic.ZERO}static transformCartesianArrayToWGS84Array(e){return e?e.map(t=>this.transformCartesianToWGS84(t)):[]}static transformWGS84ArrayToCartesianArray(e){return e?e.map(t=>this.transformWGS84ToCartesian(t)):[]}static transformWGS84ToMercator(e){let t=Ml.project(i.Cesium.Cartographic.fromDegrees(e.lng,e.lat,e.alt));return new j(t.x,t.y,t.z)}static transformMercatorToWGS84(e){let t=Ml.unproject(new i.Cesium.Cartesian3(e.lng,e.lat,e.alt));return new j(i.Cesium.Math.toDegrees(t.longitude),i.Cesium.Math.toDegrees(t.latitude),t.height)}static transformWindowToWGS84(e,t){let r=t.scene,s;if(r.mode===i.Cesium.SceneMode.SCENE3D){let o=r.camera.getPickRay(e);s=r.globe.pick(o,r)}else s=r.camera.pickEllipsoid(e,i.Cesium.Ellipsoid.WGS84);return this.transformCartesianToWGS84(s)}static transformWGS84ToWindow(e,t){let r=t.scene;return i.Cesium.SceneTransforms.worldToWindowCoordinates(r,this.transformWGS84ToCartesian(e))}},u=Hi;var ft=52.35987755982988,K=3.141592653589793,Al=6378245,Dl=.006693421622965943,Ni=class{static BD09ToGCJ02(e,t){let r=+e-.0065,s=+t-.006,o=Math.sqrt(r*r+s*s)-2e-5*Math.sin(s*ft),a=Math.atan2(s,r)-3e-6*Math.cos(r*ft),l=o*Math.cos(a),h=o*Math.sin(a);return[l,h]}static GCJ02ToBD09(e,t){t=+t,e=+e;let r=Math.sqrt(e*e+t*t)+2e-5*Math.sin(t*ft),s=Math.atan2(t,e)+3e-6*Math.cos(e*ft),o=r*Math.cos(s)+.0065,a=r*Math.sin(s)+.006;return[o,a]}static WGS84ToGCJ02(e,t){if(t=+t,e=+e,this.out_of_china(e,t))return[e,t];{let r=this.delta(e,t);return[e+r[0],t+r[1]]}}static GCJ02ToWGS84(e,t){if(t=+t,e=+e,this.out_of_china(e,t))return[e,t];{let r=[e,t],s=this.WGS84ToGCJ02(e,t),o=s[0]-e,a=s[1]-t;do s=this.WGS84ToGCJ02(r[0]-=o,r[1]-=a),o=s[0]-e,a=s[1]-t;while(Math.abs(o)>1e-7||Math.abs(a)>1e-7);return r}}static delta(e,t){let r=this.transformLng(e-105,t-35),s=this.transformLat(e-105,t-35),o=t/180*K,a=Math.sin(o);a=1-Dl*a*a;let l=Math.sqrt(a);return r=r*180/(Al/l*Math.cos(o)*K),s=s*180/(Al*(1-Dl)/(a*l)*K),[r,s]}static transformLng(e,t){t=+t,e=+e;let r=300+e+2*t+.1*e*e+.1*e*t+.1*Math.sqrt(Math.abs(e));return r+=(20*Math.sin(6*e*K)+20*Math.sin(2*e*K))*2/3,r+=(20*Math.sin(e*K)+40*Math.sin(e/3*K))*2/3,r+=(150*Math.sin(e/12*K)+300*Math.sin(e/30*K))*2/3,r}static transformLat(e,t){t=+t,e=+e;let r=-100+2*e+3*t+.2*t*t+.1*e*t+.2*Math.sqrt(Math.abs(e));return r+=(20*Math.sin(6*e*K)+20*Math.sin(2*e*K))*2/3,r+=(20*Math.sin(t*K)+40*Math.sin(t/3*K))*2/3,r+=(160*Math.sin(t/12*K)+320*Math.sin(t*K/30))*2/3,r}static out_of_china(e,t){return t=+t,e=+e,!(e>73.66&&e<135.05&&t>3.86&&t<53.55)}},he=Ni;var Wi=class n{constructor(e,t,r,s,o,a){this._lng=+e||0,this._lat=+t||0,this._alt=+r||0,this._heading=+s||0,this._pitch=+o||0,this._roll=+a||0}set lng(e){this._lng=+e}get lng(){return this._lng}set lat(e){this._lat=+e}get lat(){return this._lat}set alt(e){this._alt=+e}get alt(){return this._alt}set heading(e){this._heading=+e}get heading(){return this._heading}set pitch(e){this._pitch=+e}get pitch(){return this._pitch}set roll(e){this._roll=+e}get roll(){return this._roll}serialize(){let e=new n(this._lng,this._lat,this._alt,this._heading,this._pitch,this._roll);return JSON.stringify(e)}distance(e){return!e||!(e instanceof n)?0:i.Cesium.Cartesian3.distance(u.transformWGS84ToCartesian(this),u.transformWGS84ToCartesian(e))}clone(){let e=new n;return e.lng=this.lng||0,e.lat=this.lat||0,e.alt=this.alt||0,e.heading=this.heading||0,e.pitch=this.pitch||0,e.roll=this.roll||0,e}copy(){return this.clone()}toArray(){return[this.lng,this.lat,this.alt,this.heading,this.pitch,this.roll]}toString(){return`${this.lng},${this.lat},${this.alt},${this.heading},${this.pitch},${this.roll}`}toObject(){return{lng:this.lng,lat:this.lat,alt:this.alt,heading:this.heading,pitch:this.pitch,roll:this.roll}}static fromArray(e){let t=new n;return Array.isArray(e)&&(t.lng=e[0]||0,t.lat=e[1]||0,t.alt=e[2]||0,t.heading=e[3]||0,t.pitch=e[4]||0,t.roll=e[5]||0),t}static fromString(e){let t=new n;if(e&&typeof e=="string"){let r=e.split(",");t=this.fromArray(r)}return t}static fromObject(e){return new n(e.lng,e.lat,e.alt,e.heading,e.pitch,e.roll)}static deserialize(e){let t=new n,r=JSON.parse(e);return r&&(t.lng=r.lng||0,t.lat=r.lat||0,t.alt=r.alt||0,t.heading=r.heading||0,t.pitch=r.pitch||0,t.roll=r.roll||0),t}},j=Wi;var Gi=class{static parsePosition(e){let t=new j;return e&&(typeof e=="string"?t=j.fromString(e):Array.isArray(e)?t=j.fromArray(e):!(Object(e)instanceof j)&&Object(e).hasOwnProperty("lng")&&Object(e).hasOwnProperty("lat")?t=j.fromObject(e):Object(e)instanceof j?t=e:Object(e)instanceof i.Cesium.Cartesian3?t=u.transformCartesianToWGS84(e):Object(e)instanceof i.Cesium.Cartographic&&(t=u.transformCartographicToWGS84(e))),t}static parsePositions(e){if(typeof e=="string"){if(e.indexOf("#")>=0)throw new Error("the positions invalid");e=e.split(";").filter(t=>!!t)}return e.map(t=>this.parsePosition(t))}static parsePointCoordToArray(e){return e=this.parsePosition(e),[e.lng,e.lat]}static parsePolylineCoordToArray(e){let t=[];return e=this.parsePositions(e),e.forEach(r=>{t.push([r.lng,r.lat])}),t}static parsePolygonCoordToArray(e,t=!1){let r=[];return e=this.parsePositions(e),e.forEach(s=>{r.push([s.lng,s.lat])}),t&&r.length>0&&r.push(r[0]),[r]}},_=Gi;var ad={radius:60,maxZoom:25,style:"circle",image:"",gradientColors:{1e-4:i.Cesium.Color.DEEPSKYBLUE,.001:i.Cesium.Color.GREEN,.01:i.Cesium.Color.ORANGE,.1:i.Cesium.Color.RED},gradientImages:{},showCount:!0,fontSize:12,clusterSize:16,fontColor:i.Cesium.Color.BLACK,getCountOffset:n=>({x:-3.542857*String(n).length+1.066667,y:String(n).length>3?5:4})},Ui=class extends P{constructor(e,t={}){super(e),this._delegate=new i.Cesium.PrimitiveCollection,this._options={...ad,...t},this._billboards=this._delegate.add(new i.Cesium.BillboardCollection),this._labels=this._delegate.add(new i.Cesium.LabelCollection),this._cluster=new i.Supercluster({radius:this._options.radius,maxZoom:this._options.maxZoom}),this._allCount=0,this._changedRemoveCallback=void 0,this._lastChangedTime=null,this._state=d.INITIALIZED}get type(){return P.getLayerType("cluster")}_addOverlay(e){}_removeOverlay(e){}_getCircleImage(e,t){let r=this._options.clusterSize*(String(t).length+1),s=e.toCssColorString()+"-"+t;if(!this._cache[s]){let o=document.createElement("canvas");o.width=r,o.height=r;let a=o.getContext("2d");a.save(),a.scale(r/24,r/24),a.fillStyle=e.withAlpha(.2).toCssColorString(),a.beginPath(),a.arc(12,12,9,0,2*Math.PI),a.closePath(),a.fill(),a.beginPath(),a.arc(12,12,6,0,2*Math.PI),a.fillStyle=e.toCssColorString(),a.closePath(),a.fill(),a.restore(),this._cache[s]=o.toDataURL()}return this._cache[s]}_getClusteringImage(e,t){let r=this._options.clusterSize*(String(t).length+1),s=e.toCssColorString()+"-"+t,o=-Math.PI/12,a=Math.PI/2,l=Math.PI/6;if(!this._cache[s]){let h=document.createElement("canvas");h.width=r,h.height=r;let c=h.getContext("2d");c.save(),c.scale(r/24,r/24),c.beginPath(),c.arc(12,12,6,0,2*Math.PI),c.fillStyle=e.toCssColorString(),c.fill(),c.closePath(),c.lineWidth=2;for(let p=0;p<3;p++)c.beginPath(),c.arc(12,12,8,o,o+a,!1),c.strokeStyle=e.withAlpha(.4).toCssColorString(),c.stroke(),c.arc(12,12,11,o,o+a,!1),c.strokeStyle=e.withAlpha(.2).toCssColorString(),c.stroke(),c.closePath(),o=o+a+l;c.restore(),this._cache[s]=h.toDataURL()}return this._cache[s]}_getClusterImage(e){let t=e/this._allCount,r;if(this._options.style==="custom"){let s=Object.keys(this._options.gradientImages).sort((o,a)=>Number(o)-Number(a));for(let o=s.length-1;o>=0;o--)if(t>=Number(s[o])){r=this._options.gradientImages[s[o]];break}r||(r=this._options.gradientImages[s[0]])}else{let s=Object.keys(this._options.gradientColors).sort((a,l)=>Number(a)-Number(l)),o;for(let a=s.length-1;a>=0;a--)if(t>=Number(s[a])){o=this._options.gradientColors[s[a]];break}o||(o=this._options.gradientColors[s[0]]),r=this._options.style==="circle"?this._getCircleImage(o,e):this._getClusteringImage(o,e)}return r}_changeCluster(e){let t=i.Cesium.getTimestamp();if(this._lastChangedTime&&t-this._lastChangedTime<=1e3)return;this._lastChangedTime=t,this._cache={},this._billboards.removeAll(),this._labels.removeAll();let r=this._viewer.camera.computeViewRectangle();r||(r=this._viewer.viewBounds),this._allCount&&this._cluster.getClusters([i.Cesium.Math.toDegrees(r.west),i.Cesium.Math.toDegrees(r.south),i.Cesium.Math.toDegrees(r.east),i.Cesium.Math.toDegrees(r.north)],this._viewer.zoom).forEach(o=>{let a=v.uuid();if(o.properties.cluster){let l=o.properties.point_count,h=this._billboards.add({position:i.Cesium.Cartesian3.fromDegrees(+o.geometry.coordinates[0],+o.geometry.coordinates[1]),image:this._getClusterImage(l)});if(h.layerId=this.layerId,h.overlayId=a,h.attr={count:l},this._cache[a]=h,this._options.showCount){let c=this._labels.add({position:i.Cesium.Cartesian3.fromDegrees(+o.geometry.coordinates[0],+o.geometry.coordinates[1]),text:String(l),font:`${this._options.fontSize} px sans-serif`,disableDepthTestDistance:Number.POSITIVE_INFINITY,fillColor:this._options.fontColor,scale:.8,pixelOffset:this._options.getCountOffset(l)});c.layerId=this.layerId,c.overlayId=a,c.attr={count:l},this._cache[a]=c}}else{let l=this._billboards.add({position:i.Cesium.Cartesian3.fromDegrees(+o.geometry.coordinates[0],+o.geometry.coordinates[1]),image:this._options.image,...o.properties.style});l.layerId=this.layerId,l.overlayId=a,l.attr=o.properties,this._cache[a]=l}})}_addedHook(){this._changedRemoveCallback=this._viewer.camera.changed.addEventListener(this._changeCluster,this)}_removedHook(){this._changedRemoveCallback&&this._changedRemoveCallback()}setPoints(e=[]){return e.length&&(this._allCount=e.length,this._cluster.load(e.map(t=>{let r=_.parsePosition(t);return{type:"Feature",geometry:{type:"Point",coordinates:[r.lng,r.lat]},properties:t.attr||{}}}))),this}clear(){return this._cache={},this._allCount=0,this._state=d.CLEARED,this}};P.registerType("cluster");var Bi=Ui;var Vi=class extends P{constructor(e,t="",r={}){super(e),this._delegate=i.Cesium.CzmlDataSource.load(t,r),this._state=d.INITIALIZED}get type(){return P.getLayerType("czml")}set show(e){this._show=e,this._delegate&&this._delegate.then(t=>{t.show=this._show})}get show(){return this._show}eachOverlay(e,t){if(this._delegate)return this._delegate.then(r=>{r.entities.values.forEach(o=>{e.call(t,o)})}),this}};P.registerType("czml");var ji=Vi;var Yi=class extends P{constructor(e){super(e),this._delegate=new i.Cesium.CustomDataSource(e),this._state=d.INITIALIZED}get type(){return P.getLayerType("dynamic")}clear(){return this._delegate.entities&&this._delegate.entities.removeAll(),this._cache={},this._state=d.CLEARED,this}};P.registerType("dynamic");var Zi=Yi;var qi=class extends P{constructor(e){super(e),this._delegate=new i.Cesium.CustomDataSource(e),this._state=d.INITIALIZED}get type(){return P.getLayerType("vector")}clear(){return this._delegate.entities&&this._delegate.entities.removeAll(),this._cache={},this._state=d.CLEARED,this}};P.registerType("vector");var ce=qi;var nd={name:"",count:10,maximumLevel:21,dataProperty:"",callback:()=>null},Xi=class extends P{constructor(e,t,r={}){super(e),this._url=t,this._options={...nd,...r},this._levelLayers={},this._tileWidth=256,this._tileHeight=256,this._maximumLevel=this._options.maximumLevel,this._tilingScheme=this._options.tilingScheme||new i.Cesium.GeographicTilingScheme,this._rectangle=this._tilingScheme.rectangle,this._credit=void 0,this._token=void 0;for(let s=0;s<this.maximumLevel;s++)this._levelLayers[String(s)]=new ce(e+"-grid-"+s);this._viewer=void 0,this._imageryLayer=void 0,this._imagery=document.createElement("canvas"),this._imagery.width=this._tileWidth,this._imagery.height=this._tileHeight,this._state=d.INITIALIZED}get type(){return P.getLayerType("feature_grid")}get url(){return this._url}set show(e){this._show=e,Object.keys(this._levelLayers).forEach(t=>{this._levelLayers[t].show=e})}get show(){return this._show}get token(){return this._token}get tileWidth(){if(!this.ready)throw new i.Cesium.DeveloperError("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}get tileHeight(){if(!this.ready)throw new i.Cesium.DeveloperError("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}get maximumLevel(){if(!this.ready)throw new i.Cesium.DeveloperError("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}get minimumLevel(){if(!this.ready)throw new i.Cesium.DeveloperError("minimumLevel must not be called before the imagery provider is ready.");return 0}get tilingScheme(){if(!this.ready)throw new i.Cesium.DeveloperError("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}get rectangle(){if(!this.ready)throw new i.Cesium.DeveloperError("rectangle must not be called before the imagery provider is ready.");return this._rectangle}get ready(){return!!this._url}get credit(){return this._credit}get hasAlphaChannel(){return!0}_onAdd(e){this._viewer=e,this._imageryLayer=this._viewer.imageryLayers.addImageryProvider(this),Object.keys(this._levelLayers).forEach(t=>{this._viewer.addLayer(this._levelLayers[t])}),this._state=d.ADDED}_onRemove(){this._imageryLayer&&this._viewer.imageryLayers.remove(this._imageryLayer),Object.keys(this._levelLayers).forEach(e=>{this._viewer.removeLayer(this._levelLayers[e])}),this._state=d.REMOVED}getTileCredits(e,t,r){}requestImage(e,t,r,s){let o=this._levelLayers[String(r)],a=this._tilingScheme.tileXYToRectangle(e,t,r);return this._viewer&&a&&o&&i.Cesium.Rectangle.intersection(a,this._viewer.viewBounds)&&i.Cesium.Resource.fetchJson({url:this._url,queryParameters:{minX:i.Cesium.Math.toDegrees(a.west),minY:i.Cesium.Math.toDegrees(a.south),maxX:i.Cesium.Math.toDegrees(a.east),maxY:i.Cesium.Math.toDegrees(a.north),count:this._options.count}}).then(l=>{let h=l;if(this._options.dataProperty&&(h=l[this._options.dataProperty]),h&&h.length){for(let c=r+3;c<this._maximumLevel;c++)this._levelLayers[String(c)]&&this._levelLayers[String(c)].clear();h.forEach(c=>{let p=this._options.callback(c);p&&o.addOverlay(p)})}}),this._imagery}clear(){Object.keys(this._levelLayers).forEach(e=>{this._levelLayers[e].clear()}),this._state=d.CLEARED}};P.registerType("feature_grid");var Ji=Xi;var ld={},F=ld;var Ki=class{constructor(){this._id=v.uuid(),this._bid=v.uuid(),this._delegate=void 0,this._layer=void 0,this._state=void 0,this._show=!0,this._style={},this._attr={},this._allowDrillPicking=!1,this._contextMenu=[],this._overlayEvent=new Pi,this._overlayEvent.on(Pe.ADD,this._onAdd,this),this._overlayEvent.on(Pe.REMOVE,this._onRemove,this)}get overlayId(){return this._id}get type(){return""}set id(e){this._bid=e}get id(){return this._bid}set show(e){this._show=e,v.isPromise(this._delegate)?this._delegate.then(t=>{t.show=this._show}):this._delegate&&(this._delegate.show=this._show)}get show(){return this._show}set attr(e){this._attr=e}get attr(){return this._attr}set allowDrillPicking(e){this._allowDrillPicking=e}get allowDrillPicking(){return this._allowDrillPicking}get overlayEvent(){return this._overlayEvent}get delegate(){return this._delegate}get state(){return this._state}set contextMenu(e){this._contextMenu=e}get contextMenu(){return this._contextMenu}_getLayerCollection(e){let t;switch(e){case"point_primitive":t=this._layer.points;break;case"billboard_primitive":case"bounce_billboard_primitive":t=this._layer.billboards;break;case"label_primitive":case"bounce_label_primitive":t=this._layer.labels;break;case"polyline_primitive":t=this._layer.polylines;break;case"cloud_primitive":t=this._layer.clouds;break;default:break}return t}_mountedHook(){}_addedHook(){var e;if(!this._delegate)return!1;this._delegate instanceof Promise?this._delegate.then(t=>{var r;t.layerId=(r=this._layer)==null?void 0:r.layerId,t.overlayId=this._id}):(this._delegate.layerId=(e=this._layer)==null?void 0:e.layerId,this._delegate.overlayId=this._id)}_removedHook(){}_onAdd(e){var t,r,s,o;if(e){if(this._layer=e,this._mountedHook&&this._mountedHook(),(r=(t=this._layer)==null?void 0:t.delegate)!=null&&r.entities&&this._delegate)this._layer.delegate.entities.add(this._delegate);else if((o=(s=this._layer)==null?void 0:s.delegate)!=null&&o.add){let a=this._getLayerCollection(this.type);a?(this._delegate&&(this._delegate=a.add(this._delegate)),v.merge(this._delegate,this._style),this.update&&this.destroy&&this._layer.delegate.add(this)):v.isPromise(this._delegate)?this._delegate.then(l=>{this._layer.delegate.add(l)}):this.update&&this.destroy?this._layer.delegate.add(this):this._delegate&&this._layer.delegate.add(this._delegate)}this._addedHook&&this._addedHook(),this._state=d.ADDED}}_onRemove(){var e,t,r,s;if(this._layer){if((t=(e=this._layer)==null?void 0:e.delegate)!=null&&t.entities)this._layer.delegate.entities.remove(this._delegate);else if((s=(r=this._layer)==null?void 0:r.delegate)!=null&&s.remove){let o=this._getLayerCollection(this.type);o?(this._delegate&&o.remove(this._delegate),this.update&&this.destroy&&this._layer.delegate.remove(this)):v.isPromise(this._delegate)?this._delegate.then(a=>{this._layer.delegate.remove(a)}):this.update&&this.destroy?this._layer.delegate.remove(this):this._delegate&&this._layer.delegate.remove(this._delegate)}this._removedHook&&this._removedHook(),this._state=d.REMOVED}}setLabel(e,t){return this._delegate?(this._delegate instanceof i.Cesium.Entity&&(this._delegate.label={...t,text:e}),this):this}setStyle(e){return this}remove(){return this._layer&&this._layer.removeOverlay(this),this}addTo(e){return e&&e.addOverlay&&e.addOverlay(this),this}on(e,t,r){return this._overlayEvent.on(e,t,r||this),this}off(e,t,r){return this._overlayEvent.off(e,t,r||this),this}fire(e,t){return this._overlayEvent.fire(e,t),this}static registerType(e){e&&(F[e.toLocaleUpperCase()]=e.toLocaleLowerCase())}static getOverlayType(e){return F[e.toLocaleUpperCase()]||void 0}},g=Ki;var Qi=class extends g{constructor(e,t){super(),this._delegate=new i.Cesium.Entity({billboard:{}}),this._position=_.parsePosition(e),this._icon=t,this._size=[32,32],this._state=d.INITIALIZED}get type(){return g.getOverlayType("custom_billboard")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}set icon(e){this._icon=e,this._delegate.billboard.image=this._icon}get icon(){return this._icon}set size(e){if(!Array.isArray(e))throw new Error("CustomBillboard: the size invalid");this._size=e,this._delegate.billboard.width=this._size[0]||32,this._delegate.billboard.height=this._size[1]||32}get size(){return this._size}_mountedHook(){this.position=this._position,this.icon=this._icon,this.size=this._size}setLabel(e,t){return this._delegate.label={...t,text:e},this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.image&&delete e.width&&delete e.height,v.merge(this._style,e),v.merge(this._delegate.billboard,e),this)}setVLine(e={}){if(this._position.alt>0&&!this._delegate.polyline){let t=this._position.copy();t.alt=e.height||0,this._delegate.polyline={...e,positions:u.transformWGS84ArrayToCartesianArray([t,this._position])}}return this}setBottomCircle(e,t={},r=0){let s=0,o=r;return this._delegate.ellipse={...t,semiMajorAxis:e,semiMinorAxis:e,stRotation:new i.Cesium.CallbackProperty(()=>(s+=o,(s>=360||s<=-360)&&(s=0),s),!1)},this}};g.registerType("custom_billboard");var $i=Qi;var er=class extends g{constructor(e,t){super(),this._delegate=new i.Cesium.Entity({label:{}}),this._position=_.parsePosition(e),this._text=t,this._state=d.INITIALIZED}get type(){return g.getOverlayType("custom_label")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}set text(e){this._text=e,this._delegate.label.text=this._text}get text(){return this._text}_mountedHook(){this.position=this._position,this.text=this._text}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.text,v.merge(this._style,e),v.merge(this._delegate.label,e),this)}setVLine(e={}){if(this._position.alt>0&&!this._delegate.polyline){let t=this._position.copy();t.alt=e.height||0,this._delegate.polyline={...e,positions:u.transformWGS84ArrayToCartesianArray([t,this._position])}}return this}setBottomCircle(e,t={},r=0){let s=0,o=r;return this._delegate.ellipse={...t,semiMajorAxis:e,semiMinorAxis:e,stRotation:new i.Cesium.CallbackProperty(()=>(s+=o,(s>=360||s<=-360)&&(s=0),s),!1)},this}};g.registerType("custom_label");var tr=er;var ir=class extends g{constructor(){super(),this._startTime=void 0,this._lastTime=void 0,this._sampledPosition=new i.Cesium.SampledPositionProperty,this._cache=[],this._maxCacheSize=10,this._state=d.INITIALIZED}set maxCacheSize(e){this._maxCacheSize=e}get maxCacheSize(){return this._maxCacheSize}get position(){return u.transformCartesianToWGS84(this._sampledPosition.getValue(i.Cesium.JulianDate.now()))}_removePosition(){if(this._cache.length>this._maxCacheSize){let e=i.Cesium.JulianDate.addSeconds(this._cache[0],-.2,new i.Cesium.JulianDate),t=i.Cesium.JulianDate.addSeconds(this._cache[this._cache.length-this._maxCacheSize],-.2,new i.Cesium.JulianDate);this._sampledPosition.removeSamples(new i.Cesium.TimeInterval({start:e,stop:t})),this._cache.splice(0,this._cache.length-this._maxCacheSize)}}addPosition(e,t){this._removePosition();let r=i.Cesium.JulianDate.now(),s=i.Cesium.JulianDate.addSeconds(r,t,new i.Cesium.JulianDate);return this._sampledPosition.addSample(s,u.transformWGS84ToCartesian(_.parsePosition(e))),this._lastTime=s,this._cache.push(this._lastTime),this}bindDom(e){return this}},gt=ir;var rr=class extends gt{constructor(e,t){super(),this._position=_.parsePosition(e),this._icon=t,this._delegate=new i.Cesium.Entity({billboard:{}}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("dynamic_billboard")}set icon(e){this._icon=e,this._delegate.billboard.image=this._icon}get icon(){return this._icon}set size(e){if(!Array.isArray(e))throw new Error("DynamicBillboard: the size invalid");this._size=e,this._delegate.billboard.width=this._size[0]||32,this._delegate.billboard.height=this._size[1]||32}get size(){return this._size}_mountedHook(){this._sampledPosition.forwardExtrapolationType=i.Cesium.ExtrapolationType.HOLD,this._startTime=i.Cesium.JulianDate.now(),this._sampledPosition.addSample(this._startTime,u.transformWGS84ToCartesian(this._position)),this._delegate.position=this._sampledPosition,this._cache.push(this._startTime),this.icon=this._icon,this.size=this._size}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.image&&delete e.width&&delete e.height,v.merge(this._style,e),v.merge(this._delegate.billboard,e),this)}};g.registerType("dynamic_billboard");var sr=rr;var or=class extends gt{constructor(e,t){super(),this._position=_.parsePosition(e),this._modelUrl=t,this._delegate=new i.Cesium.Entity({model:{}}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("dynamic_model")}set modelUrl(e){this._modelUrl=e,this._delegate.model.uri=this._modelUrl}get modelUrl(){return this._modelUrl}_mountedHook(){this._sampledPosition.forwardExtrapolationType=i.Cesium.ExtrapolationType.HOLD,this._startTime=i.Cesium.JulianDate.now(),this._sampledPosition.addSample(this._startTime,u.transformWGS84ToCartesian(this._position)),this._delegate.position=this._sampledPosition,this._delegate.orientation=new i.Cesium.VelocityOrientationProperty(this._sampledPosition),this._cache.push(this._startTime),this.modelUrl=this._modelUrl}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.uri,v.merge(this._style,e),v.merge(this._delegate.model,e),this)}};g.registerType("dynamic_model");var ar=or;function hd(n,e,t){let r=i.Cesium.Cartesian3.subtract(n,e,new i.Cesium.Cartesian3),s=i.Cesium.Cartesian3.subtract(t,e,new i.Cesium.Cartesian3),o=i.Cesium.Cartesian3.cross(r,s,r);return i.Cesium.Cartesian3.magnitude(o)*.5}function ue(n){let e=0;if(!Array.isArray(n))return e;n[0]instanceof i.Cesium.Cartesian3||(n=u.transformWGS84ArrayToCartesianArray(n));let t=i.Cesium.CoplanarPolygonGeometry.createGeometry(i.Cesium.CoplanarPolygonGeometry.fromPositions({positions:n,vertexFormat:i.Cesium.VertexFormat.POSITION_ONLY}));if(!t)return e;let r=t.attributes.position.values,s=t.indices;for(let o=0;o<s.length;o+=3){let a=i.Cesium.Cartesian3.unpack(r,s[o]*3,new i.Cesium.Cartesian3),l=i.Cesium.Cartesian3.unpack(r,s[o+1]*3,new i.Cesium.Cartesian3),h=i.Cesium.Cartesian3.unpack(r,s[o+2]*3,new i.Cesium.Cartesian3);e+=hd(a,l,h)}return e}function nr(n=[],e=0){let t=180,r=90,s=-180,o=-90;if(n.forEach(a=>{t=Math.min(t,a.lng||a.x),r=Math.min(r,a.lat||a.y),s=Math.max(s,a.lng||a.x),o=Math.max(o,a.lat||a.y)}),e>0){let a=Math.abs(s-s),l=Math.abs(o-r);t-=a*e,r-=l*e,s+=a*e,o+=l*e}return{west:t,south:r,east:s,north:o}}function _e(n){if(n&&Array.isArray(n)){let e=0;n.forEach(({alt:s})=>e=Math.max(e,s));let t=i.Cesium.BoundingSphere.fromPoints(u.transformWGS84ArrayToCartesianArray(n)),r=u.transformCartesianToWGS84(t.center);return r.alt=e,r}return new j}function lr(n,e){e=e||{};let t=[];for(let r=0;r<n.length-1;r++){let s=cd(n[r],n[r+1],e.count);s&&s.length>0&&(t=t.concat(s))}return t}function cd(n,e,t){if(!n||!e)return null;let r=[];t=t||40;let s=function(I){return 1-2*I+I*I},o=I=>2*I-2*I*I,a=I=>I*I,l,h,c,p,f,T,y=0,m=parseFloat(n.lat),E=parseFloat(e.lat),x=parseFloat(n.lng),b=parseFloat(e.lng);b>x&&b-x>180&&x<0&&(x=360+x,b=360+b),T=0,E===m?(l=0,h=x-b):b===x?(l=Math.PI/2,h=m-E):(l=Math.atan((E-m)/(b-x)),h=(E-m)/Math.sin(l)),T===0&&(T=l+Math.PI/5),c=h/2,f=c*Math.cos(T)+x,p=c*Math.sin(T)+m;for(let I=0;I<t+1;I++){let N=x*s(y)+f*o(y)+b*a(y),H=m*s(y)+p*o(y)+E*a(y),W=n.lng,ee=e.lng;r.push([W<0&&ee>0?N-360:N,H]),y=y+1/t}return r}function Q(n){let e=0;if(n&&Array.isArray(n))for(let t=0;t<n.length-1;t++){let r=u.transformWGS84ToCartographic(n[t]),s=u.transformWGS84ToCartographic(n[t+1]),o=new i.Cesium.EllipsoidGeodesic;o.setEndPoints(r,s);let a=o.surfaceDistance;a=Math.sqrt(Math.pow(a,2)+Math.pow(s.height-r.height,2)),e+=a}return e.toFixed(3)}function fe(n,e){let t=n,r=e;if(!t||!r)return 0;n instanceof i.Cesium.Cartesian3||(t=_.parsePosition(n),t=u.transformWGS84ToCartesian(t)),e instanceof i.Cesium.Cartesian3||(r=_.parsePosition(e),r=u.transformWGS84ToCartesian(r));let s=i.Cesium.Transforms.eastNorthUpToFixedFrame(t),o=i.Cesium.Cartesian3.subtract(r,t,new i.Cesium.Cartesian3),a=i.Cesium.Matrix4.multiplyByPointAsVector(i.Cesium.Matrix4.inverse(s,new i.Cesium.Matrix4),o,new i.Cesium.Cartesian3),l=Math.atan2(a.y,a.x)-i.Cesium.Math.PI_OVER_TWO;return l=i.Cesium.Math.TWO_PI-i.Cesium.Math.zeroToTwoPi(l),isNaN(l)?0:l}function Ze(n,e,t){return n=parseFloat(n)||0,n>=parseFloat(e)&&n<=parseFloat(t)}function k(n,e){return i.Cesium.Cartesian3.midpoint(n,e,new i.Cesium.Cartesian3)}function hr(n,e){let t=_.parsePosition(n),r=_.parsePosition(e);t=u.transformWGS84ToCartographic(t),r=u.transformWGS84ToCartographic(r);let s=new i.Cesium.EllipsoidGeodesic(t,r).interpolateUsingFraction(.5);return new j(i.Cesium.Math.toDegrees(s.longitude),i.Cesium.Math.toDegrees(s.latitude),s.height)}function cr(n,e,t=0,r=50){let s=[];t=Math.max(+t,100),r=Math.max(+r,50);let o=Math.abs(n.lng-e.lng),a=Math.abs(n.lat-e.lat),l=Math.max(o,a),h=l/r;if(o>a){let c=(e.lat-n.lat)/r;n.lng-e.lng>0&&(h=-h);for(let p=0;p<r;p++){let f=t-Math.pow(-.5*l+Math.abs(h)*p,2)*4*t/Math.pow(l,2),T=n.lng+h*p,y=n.lat+c*p;s.push([T,y,f])}}else{let c=(e.lng-n.lng)/r;n.lat-e.lat>0&&(h=-h);for(let p=0;p<r;p++){let f=t-Math.pow(-.5*l+Math.abs(h)*p,2)*4*t/Math.pow(l,2),T=n.lng+c*p,y=n.lat+h*p;s.push([T,y,f])}}return s.push([e.lng,e.lat,e.alt||0]),s}var{Math:pd}=i.Cesium,pr={};v.merge(pr,pd,{area:ue,bounds:nr,center:_e,curve:lr,distance:Q,heading:fe,isBetween:Ze,midCartesian:k,midPosition:hr,parabola:cr});var dr=class n extends g{constructor(e,t){super(),this._delegate=S.create("div","div-icon"),this._position=_.parsePosition(e),this._delegate.setAttribute("id",this._id),v.merge(this._delegate.style,{position:"absolute",top:"0",left:"0"}),this.content=t,this._state=d.INITIALIZED}get type(){return g.getOverlayType("div_icon")}set show(e){this._show=e,this._delegate.style.visibility=this._show?"visible":"hidden"}get show(){return this._show}set position(e){this._position=_.parsePosition(e)}get position(){return this._position}set content(e){if(e&&typeof e=="string")this._delegate.innerHTML=e;else if(e&&e instanceof Element){for(;this._delegate.hasChildNodes();)this._delegate.removeChild(this._delegate.firstChild);this._delegate.appendChild(e)}}get content(){return this._delegate.childNodes||[]}_updateStyle(e,t,r){if(!this._show||!e)return;let s=e.x-this._delegate.offsetWidth/2,o=e.y-this._delegate.offsetHeight/2;this._style.position==="topleft"?(s=e.x-this._delegate.offsetWidth,o=e.y-this._delegate.offsetHeight):this._style.position==="topright"?(s=e.x,o=e.y-this._delegate.offsetHeight):this._style.position==="bottomleft"?(s=e.x-this._delegate.offsetWidth,o=e.y):this._style.position==="bottomright"&&(s=e.x,o=e.y);let a=`translate3d(${Math.round(s)}px,${Math.round(o)}px, 0)`,l="scale3d(1,1,1)",h=this._style.scaleByDistance;if(t&&h){let f=h.near||0,T=h.nearValue||1,y=h.far||Number.MAX_VALUE,m=h.farValue||0,E=t/y;if(t<f)l=`scale3d(${T},${T},1)`;else if(t>y)l=`scale3d(${m},${m},1)`;else{let x=m+E*(T-m);l=`scale3d(${x},${x},1)`}}let c=!0,p=this._style.distanceDisplayCondition;t&&p&&(c=Ze(t,p.near||0,p.far||Number.MAX_VALUE)),this._delegate.style.transform=`${a} ${l}`,this._delegate.style.visibility=c&&r?"visible":"hidden"}_onAdd(e){this._layer=e,this._layer.delegate.appendChild(this._delegate);let t={layer:e,overlay:this,position:u.transformWGS84ToCartesian(this._position)};this._delegate.addEventListener("click",()=>{this._overlayEvent.fire(L.CLICK,t)}),this._delegate.addEventListener("mouseover",()=>{this._overlayEvent.fire(L.MOUSE_OVER,t)}),this._delegate.addEventListener("mouseout",()=>{this._overlayEvent.fire(L.MOUSE_OUT,t)}),this._state=d.ADDED}_onRemove(){this._layer&&(this._layer.delegate.removeChild(this._delegate),this._state=d.REMOVED)}setLabel(e,t){return this}setStyle(e){return!e||Object.keys(e).length===0?this:(v.merge(this._style,e),this._style.className&&S.addClass(this._delegate,this._style.className),this)}static fromEntity(e,t){var a;let r,s=i.Cesium.JulianDate.now(),o=u.transformCartesianToWGS84(e.position.getValue(s));return r=new n(o,t),e.billboard&&(r.attr={...(a=e==null?void 0:e.properties)==null?void 0:a.getValue(s)}),r}};g.registerType("div_icon");var mr=dr;var ur=class n extends g{constructor(e,t){super(),this._delegate=new i.Cesium.Entity({model:{}}),this._position=_.parsePosition(e),this._modelUrl=t,this._rotateAmount=0,this._state=d.INITIALIZED}get type(){return g.getOverlayType("model")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._rotateAmount===0&&(this._delegate.orientation=i.Cesium.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(this._position.heading),i.Cesium.Math.toRadians(this._position.pitch),i.Cesium.Math.toRadians(this._position.roll))))}get position(){return this._position}set modelUrl(e){this._modelUrl=e,this._delegate.model.uri=this._modelUrl}get modelUrl(){return this._modelUrl}set rotateAmount(e){this._rotateAmount=+e,this._delegate.orientation=new i.Cesium.CallbackProperty(()=>(this._position.heading+=this._rotateAmount,(this._position.heading>=360||this._position.heading<=-360)&&(this._position.heading=0),i.Cesium.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(this._position.heading),i.Cesium.Math.toRadians(this._position.pitch),i.Cesium.Math.toRadians(this._position.roll)))),!1)}get rotateAmount(){return this._rotateAmount}_mountedHook(){this.position=this._position,this.modelUrl=this._modelUrl}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.uri,v.merge(this._style,e),v.merge(this._delegate.model,e),this)}static fromEntity(e,t){let r=i.Cesium.JulianDate.now(),s=u.transformCartesianToWGS84(e.position.getValue(r)),o=new n(s,t);return o.attr={...e.properties.getValue(r)},o}};g.registerType("model");var De=ur;var _r=class extends g{constructor(e,t={}){super(),this._delegate=i.Cesium.I3SDataProvider.fromUrl(e,t),this._state=d.INITIALIZED}get type(){return g.getOverlayType("i3s")}ready(e){return this._delegate.then(e),this}setLabel(e,t){return console.warn("not support this function"),this}};g.registerType("i3s");var fr=_r;var gr=class extends g{constructor(e,t={}){super(),this._delegate=i.Cesium.Cesium3DTileset.fromUrl(e,t),this._tilesetEvent=new Si(this._delegate),this._tileVisibleCallback=void 0,this._properties=void 0,this._state=d.INITIALIZED}get type(){return g.getOverlayType("tileset")}set show(e){this._show=e,this._delegate.then(t=>{t.show=e})}_bindVisibleEvent(){this._tileVisibleCallback&&this._tileVisibleCallback(),this._tileVisibleCallback=this._delegate.then(e=>{e.tileVisible.addEventListener(this._updateTile,this)})}_updateTile(e){let t=e.content;for(let r=0;r<t.featuresLength;r++){let s=t.getFeature(r);this._properties&&this._properties.length&&this._properties.forEach(o=>{s.hasProperty(o.key)&&s.getProperty(o.key)===o.keyValue&&s.setProperty(o.propertyName,o.propertyValue)})}}ready(e){return this._delegate.then(e),this}setPosition(e){return e=_.parsePosition(e),this._delegate.then(t=>{let r=i.Cesium.Transforms.eastNorthUpToFixedFrame(i.Cesium.Cartesian3.fromDegrees(e.lng,e.lat,e.alt)),s=i.Cesium.Matrix4.fromRotationTranslation(i.Cesium.Matrix3.fromHeadingPitchRoll(new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(e.heading),i.Cesium.Math.toRadians(e.pitch),i.Cesium.Math.toRadians(e.roll))));i.Cesium.Matrix4.multiply(r,s,r),t.root.transform=r}),this}setHeadingPitchRoll(e,t,r){return this._delegate.then(s=>{let o=s.root.transform,a=i.Cesium.Matrix4.fromRotationTranslation(i.Cesium.Matrix3.fromHeadingPitchRoll(new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(e||0),i.Cesium.Math.toRadians(t||0),i.Cesium.Math.toRadians(r||0))));i.Cesium.Matrix4.multiply(o,a,o),s.root.transform=o}),this}setLabel(e,t){return console.warn("not support this function"),this}clampToGround(){return this._delegate.then(e=>{let t=i.Cesium.Cartographic.fromCartesian(e.boundingSphere.center),r=i.Cesium.Cartesian3.fromRadians(t.longitude,t.latitude,t.height),s=i.Cesium.Cartesian3.fromRadians(t.longitude,t.latitude,0),o=i.Cesium.Cartesian3.subtract(s,r,new i.Cesium.Cartesian3);e.modelMatrix=i.Cesium.Matrix4.fromTranslation(o)}),this}setHeight(e,t=!1){return this._delegate.then(r=>{let s=i.Cesium.Cartographic.fromCartesian(r.boundingSphere.center),o=i.Cesium.Cartesian3.fromRadians(s.longitude,s.latitude,s.height),a=i.Cesium.Cartesian3.fromRadians(s.longitude,s.latitude,t?e:s.height+e),l=i.Cesium.Cartesian3.subtract(a,o,new i.Cesium.Cartesian3);r.modelMatrix=i.Cesium.Matrix4.fromTranslation(l)}),this}setScale(e){return this._delegate.then(t=>{let r=t.root.transform;e>0&&e!==1&&i.Cesium.Matrix4.multiplyByUniformScale(r,e,r),t.root.transform=r}),this}setProperties(e){return this._properties=e,this._bindVisibleEvent(),this}setSplitDirection(e){return this._delegate.then(t=>{t.splitDirection=e}),this}setCustomShader(e){return this._delegate.then(t=>{t.customShader=e}),this}setStyle(e){return e&&e instanceof i.Cesium.Cesium3DTileStyle&&(this._style=e,this._delegate.then(t=>{t.style=e})),this}on(e,t,r){return this._overlayEvent.on(e,t,r||this),this._tilesetEvent.on(e,t,r||this),this}off(e,t,r){return this._overlayEvent.off(e,t,r||this),this._tilesetEvent.off(e,t,r||this),this}};g.registerType("tileset");var yr=gr;var yt=Math.PI/2,vr=class extends g{constructor(e){super(),this._positions=_.parsePositions(e),this._delegate=new i.Cesium.Entity({polygon:{}}),this.headHeightFactor=.18,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this.headTailFactor=.8,this._state=d.INITIALIZED}get type(){return g.getOverlayType("attack_arrow")}set positions(e){this._positions=_.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}get positions(){return this._positions}_getArrowHeadPoints(e,t,r){let s=w.getBaseLength(e),o=s*this.headHeightFactor,a=e[e.length-1];s=w.distance(a,e[e.length-2]);let l=w.distance(t,r);o>l*this.headTailFactor&&(o=l*this.headTailFactor);let h=o*this.headWidthFactor,c=o*this.neckWidthFactor;o=o>s?s:o;let p=o*this.neckHeightFactor,f=w.getThirdPoint(e[e.length-2],a,0,o,!0),T=w.getThirdPoint(e[e.length-2],a,0,p,!0),y=w.getThirdPoint(a,f,yt,h,!1),m=w.getThirdPoint(a,f,yt,h,!0),E=w.getThirdPoint(a,T,yt,c,!1),x=w.getThirdPoint(a,T,yt,c,!0);return[E,y,a,m,x]}_getArrowBodyPoints(e,t,r,s){let o=w.wholeDistance(e),l=w.getBaseLength(e)*s,h=w.distance(t,r),c=(l-h)/2,p=0,f=[],T=[];for(let y=1;y<e.length-1;y++){let m=w.getAngleOfThreePoints(e[y-1],e[y],e[y+1])/2;p+=w.distance(e[y-1],e[y]);let E=(l/2-p/o*c)/Math.sin(m),x=w.getThirdPoint(e[y-1],e[y],Math.PI-m,E,!0),b=w.getThirdPoint(e[y-1],e[y],m,E,!1);f.push(x),T.push(b)}return f.concat(T)}_getHierarchy(){let e=_.parsePolygonCoordToArray(this._positions)[0],t=e[0],r=e[1];w.isClockWise(e[0],e[1],e[2])&&(t=e[1],r=e[0]);let o=[w.mid(t,r)].concat(e.slice(2)),a=this._getArrowHeadPoints(o,t,r),l=a[0],h=a[4],c=w.distance(t,r)/w.getBaseLength(o),p=this._getArrowBodyPoints(o,l,h,c),f=p.length,T=[t].concat(p.slice(0,f/2));T.push(l);let y=[r].concat(p.slice(f/2,f));return y.push(h),T=w.getQBSplinePoints(T),y=w.getQBSplinePoints(y),new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(_.parsePositions(T.concat(a,y.reverse()))))}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.polygon,e),this)}};g.registerType("attack_arrow");var Le=vr;var X=Math.PI/2,wr=class extends g{constructor(e){super(),this._positions=_.parsePositions(e),this._delegate=new i.Cesium.Entity({polygon:{}}),this.headHeightFactor=.25,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this._state=d.INITIALIZED}get type(){return g.getOverlayType("double_arrow")}set positions(e){this._positions=_.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}get positions(){return this._positions}_getArrowPoints(e,t,r,s){let o=w.mid(e,t),a=w.distance(o,r),l=w.getThirdPoint(r,o,0,a*.3,!0),h=w.getThirdPoint(r,o,0,a*.5,!0);l=w.getThirdPoint(o,l,X,a/5,s),h=w.getThirdPoint(o,h,X,a/4,s);let c=[o,l,h,r],p=this._getArrowHeadPoints(c),f=p[0],T=p[4],y=w.distance(e,t)/w.getBaseLength(c)/2,m=this._getArrowBodyPoints(c,f,T,y),E=m.length,x=m.slice(0,E/2),b=m.slice(E/2,E);return x.push(f),b.push(T),x=x.reverse(),x.push(t),b=b.reverse(),b.push(e),x.reverse().concat(p,b)}_getArrowHeadPoints(e){let r=w.getBaseLength(e)*this.headHeightFactor,s=e[e.length-1],o=r*this.headWidthFactor,a=r*this.neckWidthFactor,l=r*this.neckHeightFactor,h=w.getThirdPoint(e[e.length-2],s,0,r,!0),c=w.getThirdPoint(e[e.length-2],s,0,l,!0),p=w.getThirdPoint(s,h,X,o,!1),f=w.getThirdPoint(s,h,X,o,!0),T=w.getThirdPoint(s,c,X,a,!1),y=w.getThirdPoint(s,c,X,a,!0);return[T,p,s,f,y]}_getArrowBodyPoints(e,t,r,s){let o=w.wholeDistance(e),l=w.getBaseLength(e)*s,h=w.distance(t,r),c=(l-h)/2,p=0,f=[],T=[];for(let y=1;y<e.length-1;y++){let m=w.getAngleOfThreePoints(e[y-1],e[y],e[y+1])/2;p+=w.distance(e[y-1],e[y]);let E=(l/2-p/o*c)/Math.sin(m),x=w.getThirdPoint(e[y-1],e[y],Math.PI-m,E,!0),b=w.getThirdPoint(e[y-1],e[y],m,E,!1);f.push(x),T.push(b)}return f.concat(T)}_getTempPoint4(e,t,r){let s=w.mid(e,t),o=w.distance(s,r),a=w.getAngleOfThreePoints(e,s,r),l,h,c,p;return a<X?(h=o*Math.sin(a),c=o*Math.cos(a),p=w.getThirdPoint(e,s,X,h,!1),l=w.getThirdPoint(s,p,X,c,!0)):a>=X&&a<Math.PI?(h=o*Math.sin(Math.PI-a),c=o*Math.cos(Math.PI-a),p=w.getThirdPoint(e,s,X,h,!1),l=w.getThirdPoint(s,p,X,c,!1)):a>=Math.PI&&a<Math.PI*1.5?(h=o*Math.sin(a-Math.PI),c=o*Math.cos(a-Math.PI),p=w.getThirdPoint(e,s,X,h,!0),l=w.getThirdPoint(s,p,X,c,!0)):(h=o*Math.sin(Math.PI*2-a),c=o*Math.cos(Math.PI*2-a),p=w.getThirdPoint(e,s,X,h,!0),l=w.getThirdPoint(s,p,X,c,!1)),l}_getHierarchy(){let e=this._positions.length,t,r,s=_.parsePolygonCoordToArray(this._positions)[0],o=s[0],a=s[1],l=s[2];e===3?t=this._getTempPoint4(o,a,l):t=s[3],e===3||e===4?r=w.mid(o,a):r=s[4];let h,c;w.isClockWise(o,a,l)?(h=this._getArrowPoints(o,r,t,!1),c=this._getArrowPoints(r,a,l,!0)):(h=this._getArrowPoints(a,r,l,!1),c=this._getArrowPoints(r,o,t,!0));let p=h.length,f=(p-5)/2,T=h.slice(0,f),y=h.slice(f,f+5),m=h.slice(f+5,p),E=c.slice(0,f),x=c.slice(f,f+5),b=c.slice(f+5,p);E=w.getBezierPoints(E);let I=w.getBezierPoints(b.concat(T.slice(1)));return m=w.getBezierPoints(m),new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(_.parsePositions(E.concat(x,I,y,m))))}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.polygon,e),this)}};g.registerType("double_arrow");var qe=wr;var Ll=Math.PI/2,Tr=class extends g{constructor(e){super(),this._positions=_.parsePositions(e),this._delegate=new i.Cesium.Entity({polygon:{}}),this.tailWidthFactor=.15,this.neckWidthFactor=.2,this.headWidthFactor=.25,this.headAngle=Math.PI/8.5,this.neckAngle=Math.PI/13,this._state=d.INITIALIZED}get type(){return g.getOverlayType("fine_arrow")}set positions(e){this._positions=_.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}get positions(){return this._positions}_getHierarchy(){let e=_.parsePolygonCoordToArray(this._positions)[0],t=e[0],r=e[1],s=w.getBaseLength(e),o=s*this.tailWidthFactor,a=s*this.neckWidthFactor,l=s*this.headWidthFactor,h=w.getThirdPoint(r,t,Ll,o,!0),c=w.getThirdPoint(r,t,Ll,o,!1),p=w.getThirdPoint(t,r,this.headAngle,l,!1),f=w.getThirdPoint(t,r,this.headAngle,l,!0),T=w.getThirdPoint(t,r,this.neckAngle,a,!1),y=w.getThirdPoint(t,r,this.neckAngle,a,!0);return new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(_.parsePositions([h,T,p,r,f,y,c])))}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.polygon,e),this)}};g.registerType("fine_arrow");var Xe=Tr;var dd=Math.PI/2,Rl=100,Cr=class extends g{constructor(e){super(),this._positions=_.parsePositions(e),this._delegate=new i.Cesium.Entity({polygon:{}}),this.t=.4,this._state=d.INITIALIZED}get type(){return g.getOverlayType("gathering_place")}set positions(e){this._positions=_.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}get positions(){return this._positions}_getHierarchy(){let e=_.parsePolygonCoordToArray(this._positions)[0];if(this._positions.length===2){let a=w.mid(e[0],e[1]),l=w.distance(e[0],a)/.9,h=w.getThirdPoint(e[0],a,dd,l,!0);e=[e[0],h,e[1]]}let t=w.mid(e[0],e[2]);e.push(t,e[0],e[1]);let r=[];for(let a=0;a<e.length-2;a++){let l=e[a],h=e[a+1],c=e[a+2],p=w.getBisectorNormals(this.t,l,h,c);r=r.concat(p)}let s=r.length;r=[r[s-1]].concat(r.slice(0,s-1));let o=[];for(let a=0;a<e.length-2;a++){let l=e[a],h=e[a+1];o.push(l);for(let c=0;c<=Rl;c++){let p=w.getCubicValue(c/Rl,l,r[a*2],r[a*2+1],h);o.push(p)}o.push(h)}return new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(_.parsePositions(o)))}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.polygon,e),this)}};g.registerType("gathering_place");var Je=Cr;var xr=class extends Le{constructor(e){super(e),this._delegate=new i.Cesium.Entity({polygon:{}}),this.headHeightFactor=.18,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this.tailWidthFactor=.1,this.headTailFactor=.8,this.swallowTailFactor=1,this._state=d.INITIALIZED}get type(){return g.getOverlayType("tailed_attack_arrow")}set positions(e){this._positions=_.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}get positions(){return this._positions}_getHierarchy(){let e=_.parsePolygonCoordToArray(this._positions)[0],t=e[0],r=e[1];w.isClockWise(e[0],e[1],e[2])&&(t=e[1],r=e[0]);let o=[w.mid(t,r)].concat(e.slice(2)),a=this._getArrowHeadPoints(o,t,r),l=a[0],h=a[4],c=w.distance(t,r),p=w.getBaseLength(o),f=p*this.tailWidthFactor*this.swallowTailFactor,T=w.getThirdPoint(o[1],o[0],0,f,!0),y=c/p,m=this._getArrowBodyPoints(o,l,h,y),E=m.length,x=[t].concat(m.slice(0,E/2));x.push(l);let b=[r].concat(m.slice(E/2,E));return b.push(h),x=w.getQBSplinePoints(x),b=w.getQBSplinePoints(b),new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(_.parsePositions(x.concat(a,b.reverse(),[T,x[0]]))))}};g.registerType("tailed_attack_arrow");var Ke=xr;var Er=class extends g{constructor(e,t){super(),this._position=_.parsePosition(e),this._icon=t,this._size=[32,32],this._delegate={position:void 0,image:void 0,width:0,height:0},this._state=d.INITIALIZED}get type(){return g.getOverlayType("billboard_primitive")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}set icon(e){this._icon=e,this._delegate.image=this._icon}get icon(){return this._icon}set size(e){if(!Array.isArray(e))throw new Error("Billboard Primitive: the size invalid");this._size=e,this._delegate.width=this._size[0]||32,this._delegate.height=this._size[1]||32}get size(){return this._size}_mountedHook(){this.position=this._position,this.icon=this._icon,this.size=this._size}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position&&delete e.image&&delete e.width&&delete e.height,v.merge(this._style,e),v.merge(this._delegate,e),this)}};g.registerType("billboard_primitive");var Qe=Er;var Ol={maxOffsetY:10,offsetAmount:.1},Pr=class extends Qe{constructor(e,t){super(e,t),this._currentOffset=new i.Cesium.Cartesian2(0,0),this._isUp=!0,this._state=d.INITIALIZED}get type(){return g.getOverlayType("bounce_billboard_primitive")}update(e){var s,o;if(!this._show)return;let t=((s=this._style)==null?void 0:s.maxOffsetY)||Ol.maxOffsetY,r=((o=this._style)==null?void 0:o.offsetAmount)||Ol.offsetAmount;this._currentOffset.y>=0?this._isUp=!0:this._currentOffset.y<=-t&&(this._isUp=!1),this._currentOffset.y+=r*(this._isUp?-1:1),this._delegate.pixelOffset=this._currentOffset}destroy(){return i.Cesium.destroyObject(this)}};g.registerType("bounce_billboard_primitive");var br=Pr;var Sr=class extends g{constructor(e,t){super(),this._position=_.parsePosition(e),this._text=t,this._delegate={position:void 0,text:void 0},this._state=d.INITIALIZED}get type(){return g.getOverlayType("label_primitive")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}set text(e){this._text=e,this._delegate.text=this._text}get text(){return this._text}_mountedHook(){this.position=this._position,this.text=this._text}setLabel(e,t){return this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position&&delete e.text,v.merge(this._style,e),v.merge(this._delegate,e),this)}};g.registerType("label_primitive");var $e=Sr;var kl={maxOffsetY:10,offsetAmount:.1},Ir=class extends $e{constructor(e,t){super(e,t),this._currentOffset=new i.Cesium.Cartesian2(0,0),this._isUp=!0,this._state=d.INITIALIZED}get type(){return g.getOverlayType("bounce_label_primitive")}update(e){var s,o;if(!this._show)return;let t=((s=this._style)==null?void 0:s.maxOffsetY)||kl.maxOffsetY,r=((o=this._style)==null?void 0:o.offsetAmount)||kl.offsetAmount;this._currentOffset.y>=0?this._isUp=!0:this._currentOffset.y<=-t&&(this._isUp=!1),this._currentOffset.y+=r*(this._isUp?-1:1),this._delegate.pixelOffset=this._currentOffset}destroy(){return i.Cesium.destroyObject(this)}};g.registerType("bounce_label_primitive");var Mr=Ir;var Ar=class extends g{constructor(e){super(),this._position=_.parsePosition(e),this._delegate={position:void 0,scale:{x:12,y:8}},this._state=d.INITIALIZED}get type(){return g.getOverlayType("cloud_primitive")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}_mountedHook(){this.position=this._position}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position,v.merge(this._style,e),v.merge(this._delegate,e),this)}};g.registerType("cloud_primitive");var Dr=Ar;var md={minRadius:10,minHeight:30,color:i.Cesium.Color.RED,slices:128,speed:10},Lr=class extends g{constructor(e,t,r){super(),this._center=_.parsePosition(e),this._delegate=void 0,this._height=r,this._radius=t,this._currentHeight=r||0,this._currentRadius=10,this._style={...md},this._state=d.INITIALIZED}get type(){return g.getOverlayType("diffuse_wall_primitive")}set center(e){this._center=_.parsePosition(e)}get center(){return this._center}set radius(e){this._radius=e}get radius(){return this._radius}set height(e){this._height=e}get height(){return this._height}_getPositions(){let e=[],t=i.Cesium.Transforms.eastNorthUpToFixedFrame(u.transformWGS84ToCartesian(this._center));for(let r=0;r<this._style.slices;r++){let s=r/this._style.slices*i.Cesium.Math.TWO_PI,o=Math.cos(s),a=Math.sin(s),l=new i.Cesium.Cartesian3(o*this._currentRadius,a*this._currentRadius,0);e.push(i.Cesium.Matrix4.multiplyByPoint(t,l,new i.Cesium.Cartesian3))}return e.push(e[0]),e}_getHeights(e,t){let r=[];for(let s=0;s<e;s++)r.push(t);return r}update(e){var s;if(this._delegate=this._delegate&&this._delegate.destroy(),this._currentRadius+=this._radius/this._style.speed/20,this._currentHeight-=this._height/this._style.speed/20,(this._currentRadius>this._radius||this._currentHeight<this._style.minHeight)&&(this._currentRadius=this._style.minRadius,this._currentHeight=this._height),!this._style.slices||this._style.slices<3)return!1;let t=this._getPositions();if(!t||!t.length)return!1;let r=new i.Cesium.WallGeometry({positions:t,minimumHeights:this._getHeights(t.length,0),maximumHeights:this._getHeights(t.length,this._currentHeight)});this._delegate=new i.Cesium.Primitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:r}),appearance:new i.Cesium.MaterialAppearance({material:i.Cesium.Material.fromType("WallDiffuse",{color:(s=this._style)==null?void 0:s.color}),flat:!0}),asynchronous:!1}),this._delegate.update(e)}setStyle(e){return!e||Object.keys(e).length===0?this:(v.merge(this._style,e),this)}destroy(){return i.Cesium.destroyObject(this)}};g.registerType("diffuse_wall_primitive");var Rr=Lr;var Or=class extends g{constructor(e,t){super(),this._position=_.parsePosition(e),this._radius=t||{x:10,y:10,z:10},this._delegate=new i.Cesium.Primitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:{}})}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("elec_ellipsoid_primitive")}set position(e){this._position=_.parsePosition(e),this._delegate.geometryInstances.modelMatrix=i.Cesium.Transforms.eastNorthUpToFixedFrame(u.transformWGS84ToCartesian(this._position))}get position(){return this._position}set radius(e){this._radius=e,this._delegate.geometryInstances.geometry=new i.Cesium.EllipsoidGeometry({radii:this._radius,maximumCone:i.Cesium.Math.PI_OVER_TWO})}get radius(){return this._radius}_setAppearance(){var e,t;this._style&&(this._delegate.appearance=new i.Cesium.MaterialAppearance({material:i.Cesium.Material.fromType("EllipsoidElectric",{color:((e=this._style)==null?void 0:e.color)||i.Cesium.Color.GREEN,speed:((t=this._style)==null?void 0:t.speed)||5})}))}_mountedHook(){this.radius=this._radius,this.position=this._position,!this._delegate.appearance&&this._setAppearance()}setLabel(e,t){return this}setStyle(e={}){return Object.keys(e).length===0?this:(v.merge(this._style,e),this._setAppearance(),this)}};g.registerType("elec_ellipsoid_primitive");var kr=Or;var Fr=class extends g{constructor(e,t=1){super(),this._positions=_.parsePositions(e),this._width=t,this._delegate=new i.Cesium.Primitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:{}})}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("flow_line_primitive")}set positions(e){this._positions=_.parsePositions(e),this._delegate.geometryInstances.geometry=new i.Cesium.PolylineGeometry({positions:u.transformWGS84ArrayToCartesianArray(this._positions),width:this._width})}get positions(){return this._positions}_setAppearance(){var e,t,r,s;this._delegate.appearance=new i.Cesium.PolylineMaterialAppearance({material:i.Cesium.Material.fromType("PolylineFlow",{color:((e=this._style)==null?void 0:e.color)||new i.Cesium.Color(1,0,0,.7),speed:((t=this._style)==null?void 0:t.speed)||1,percent:((r=this._style)==null?void 0:r.percent)||.03,gradient:((s=this._style)==null?void 0:s.gradient)||.1})})}_mountedHook(){this.positions=this._positions,!this._delegate.appearance&&this._setAppearance()}setLabel(e,t){return this}setStyle(e={}){return Object.keys(e).length===0?this:(v.merge(this._style,e),e.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};g.registerType("flow_line_primitive");var zr=Fr;var Fl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAEACAYAAADSoXR2AAAAGXRFWHRTb2Z0d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8aDnIoTb5ObZRWg5ywG5o1dX4ClNYxT7IISgJPsXGpLut9MCWU0S5bqkmdAa3LQEwcZDAfkZ3tthQfkwNkVeeD6kiuaUabcp6DpS9YyalrAdQ8bT1EFQVUabarND9fNuyB2gREYAABCAAAQhAAAIQoM770UgBXARCIr/koDogVlzgrWuxemBKd0m4JnBed0+5ZQ9gn3BK5LK+P4y5ewoB8DFiKO91COLFfwVuTCZV1hSoYw1APZCsFIkbN1Haaa87wwiKQe6eT27AEX6esPVVd8/kOOdAz/oz9FE0p+uGIKUeqE5C8xgSKiICEIAABCAAAQhAAAIQgAAEIAABCECA6AA+sbkREyDUUYlKD6ggZwzRkr8tewBhusisv+0in5qE/hFchoZTE0TL4p8sTbtIpyahQ4Ag5fKpSVBmfdDECvQTZjoM0U9N6KgkwH9xY7PXpPiCmq5yuaLVldHIO7jgNi5XfOEhCqNh9udHV/RnC5YAUDTftdV4/ivvwEoRVS9XXPWa1FIT5ird8jpSB+BDN3rO8AaGMnGy0I0QRYTvdk6NkOsucuhGCMAgI8Q0isaHbmAevNMhiD4P6iZhstANGiQE2PEGCRo2NcgAsQDwKnxWFdlT17/duWU1BJmuHz6A5bwbEsCScgh+qAHit3Jr1oooOPExdRBLbeJjSpuwuy30AAH+CDAAPH5ltESNYl4AAAAASUVORK5CYII=";var ud={color:i.Cesium.Color.ORANGE},Hr=class extends g{constructor(e,t,r,s){super(),this._center=_.parsePosition(e),this._length=t||100,this._topRadius=r||1,this._bottomRadius=s||50,this._delegate=new i.Cesium.PrimitiveCollection,this._style={...ud},this._state=d.INITIALIZED}get type(){return g.getOverlayType("light-cylinder-primitive")}set center(e){this._center=_.parsePosition(e),this._updatePrimitives()}get center(){return this._center}set length(e){this._length=e,this._updatePrimitives()}get length(){return this._length}set topRadius(e){this._topRadius=e,this._updatePrimitives()}get topRadius(){return this._topRadius}set bottomRadius(e){this._bottomRadius=e,this._updatePrimitives()}get bottomRadius(){return this._bottomRadius}_computeEllipsePositions(e,t){let r=i.Cesium.EllipseGeometryLibrary.computeEllipsePositions({center:u.transformWGS84ToCartesian(e),semiMajorAxis:t,semiMinorAxis:t,rotation:0,granularity:.005},!1,!0),s=i.Cesium.Cartesian3.unpackArray(r.outerPositions);return s.push(s[0]),s}_createCylinderInstance(e,t,r){let s=t.slice(),o=t.length,a=2*o,l=[],h=1/(o-1),c=[],p=[],f=(y,m=0)=>{let E=i.Cesium.Cartographic.fromCartesian(y);return E.height+=m,i.Cesium.Cartographic.toCartesian(E)};for(let y=0;y<o;y++){p.push(f(e[y],r)),l.push(y*h,0);let m=y+1,E=(y+1)%o,x=a-m;c.push(x-1,x,y),c.push(y,E,x-1)}for(let y in p)s.push(p[o-y-1]),l.push(1-y*h,1);let T=i.Cesium.PolygonGeometry.createGeometry(new i.Cesium.PolygonGeometry({polygonHierarchy:new i.Cesium.PolygonHierarchy(s),perPositionHeight:!0}));return T.indices=c,T.attributes.st.values=l,new i.Cesium.GeometryInstance({geometry:T})}_getCircleImage(){let e=document.createElement("canvas");e.width=512,e.height=512;let t=e.getContext("2d");return t.fillStyle="rgba(255,255,255,0)",t.strokeStyle="rgba(255, 255, 255,255)",t.setLineDash([50,50]),t.lineWidth=30,t.beginPath(),t.arc(256,256,150,0,Math.PI*2,!0),t.stroke(),t.restore(),e}_getParticlesImage(e){let t=document.createElement("canvas");t.width=64,t.height=256;let r=t.getContext("2d");return r.clearRect(0,0,64,256),r.drawImage(e,0,0),r.drawImage(e,33,0),t}_updatePrimitives(){this._delegate.removeAll();let e=this._center.alt===0,t=this._computeEllipsePositions(this._center,this._topRadius),r=this._computeEllipsePositions(this._center,this._bottomRadius*.7),s=this._computeEllipsePositions(this._center,this._bottomRadius),o={geometryInstances:new i.Cesium.GeometryInstance({geometry:new i.Cesium.PolygonGeometry({polygonHierarchy:new i.Cesium.PolygonHierarchy(this._computeEllipsePositions(this._center,this._bottomRadius*2)),perPositionHeight:!e}),asynchronous:!1})},a=e?new i.Cesium.GroundPrimitive(o):new i.Cesium.Primitive(o);a.appearance=new i.Cesium.EllipsoidSurfaceAppearance({material:i.Cesium.Material.fromType(i.Cesium.Material.CircleRingType,{color:this._style.color})});let l=e?new i.Cesium.GroundPrimitive(o):new i.Cesium.Primitive(o);l.appearance=new i.Cesium.EllipsoidSurfaceAppearance({material:i.Cesium.Material.fromType(i.Cesium.Material.CircleRotateType,{color:this._style.color,image:this._getCircleImage()})});let h=new i.Cesium.Primitive({geometryInstances:this._createCylinderInstance(t,r,this._length),appearance:new i.Cesium.EllipsoidSurfaceAppearance({material:i.Cesium.Material.fromType(i.Cesium.Material.CylinderFadeType,{color:this._style.color})}),asynchronous:!1});e?i.Cesium.GroundPrimitive.initializeTerrainHeights().then(()=>{this._delegate.add(a),this._delegate.add(l),this._delegate.add(h)}):(this._delegate.add(a),this._delegate.add(l),this._delegate.add(h)),i.Cesium.Resource.fetchImage({url:Fl}).then(c=>{let p=new i.Cesium.Primitive({geometryInstances:this._createCylinderInstance(t,s,this._length),appearance:new i.Cesium.EllipsoidSurfaceAppearance({material:i.Cesium.Material.fromType(i.Cesium.Material.CylinderParticlesType,{color:this._style.color,image:this._getParticlesImage(c)})}),asynchronous:!1});this._delegate.add(p)})}_mountedHook(){this.center=this._center}update(e){this._delegate.update(e)}setStyle(e){return!e||Object.keys(e).length===0?this:(v.merge(this._style,e),this)}destroy(){return i.Cesium.destroyObject(this)}};g.registerType("light-cylinder-primitive");var Nr=Hr;var Wr=class extends g{constructor(e,t){super(),this._position=_.parsePosition(e),this._modelUrl=t,this._delegate=i.Cesium.Model.fromGltfAsync({url:t}),this._modelEvent=new Mi(this._delegate),this._state=d.INITIALIZED}get type(){return g.getOverlayType("model_primitive")}set position(e){this._position=_.parsePosition(e);let t=u.transformWGS84ToCartesian(this._position);this._delegate.then(r=>{r.modelMatrix=i.Cesium.Transforms.headingPitchRollToFixedFrame(t,new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(this._position.heading),i.Cesium.Math.toRadians(this._position.pitch),i.Cesium.Math.toRadians(this._position.roll)))})}get position(){return this._position}set modelUrl(e){this._modelUrl=e,this._delegate=i.Cesium.Model.fromGltfAsync({url:e,...this._style}),this.position=this._position}get modelUrl(){return this._modelUrl}_mountedHook(){this.position=this._position}setStyle(e){return!e||Object.keys(e).length===0?this:(v.merge(this._style,e),this._delegate.then(t=>{v.merge(t,e)}),this)}on(e,t,r){return this._overlayEvent.on(e,t,r||this),this._modelEvent.on(e,t,r||this),this}off(e,t,r){return this._overlayEvent.off(e,t,r||this),this._modelEvent.off(e,t,r||this),this}};g.registerType("model_primitive");var Gr=Wr;var zl={pixelSize:8,outlineColor:i.Cesium.Color.BLUE,outlineWidth:2},Ur=class extends g{constructor(e){super(),this._position=_.parsePosition(e),this._delegate={position:void 0},this._state=d.INITIALIZED}get type(){return g.getOverlayType("point_primitive")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}_mountedHook(){this.position=this._position,v.merge(this._delegate,zl,this._style)}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position,v.merge(this._style,e),v.merge(this._delegate,zl,this._style),this)}};g.registerType("point_primitive");var Br=Ur;var Vr=class extends g{constructor(e){super(),this._positions=_.parsePositions(e),this._delegate={positions:[]},this._state=d.INITIALIZED}get type(){return g.getOverlayType("polyline_primitive")}set positions(e){this._positions=_.parsePositions(e),this._delegate.positions=u.transformWGS84ArrayToCartesianArray(this._positions)}get positions(){return this._positions}get center(){return _e(this._positions)}get distance(){return Q(this._positions)}_mountedHook(){this.positions=this._positions}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate,e),this)}};g.registerType("polyline_primitive");var jr=Vr;var Yr=class extends g{constructor(e,t){super(),this._position=_.parsePosition(e),this._radius=t,this._delegate=new i.Cesium.GroundPrimitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:{}})}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("scan_circle_primitive")}set position(e){this._position=_.parsePosition(e),this._delegate.geometryInstances.geometry=new i.Cesium.EllipseGeometry({center:u.transformWGS84ToCartesian(this._position),semiMajorAxis:this._radius,semiMinorAxis:this._radius})}get position(){return this._position}set radius(e){this._radius=e,this._delegate.geometryInstances.geometry.semiMajorAxis=this._radius,this._delegate.geometryInstances.geometry.semiMinorAxis=this._radius}get radius(){return this._radius}_setAppearance(){var e,t;this._style&&(this._delegate.appearance=new i.Cesium.MaterialAppearance({material:i.Cesium.Material.fromType("CircleScan",{color:((e=this._style)==null?void 0:e.color)||i.Cesium.Color.WHITE,speed:((t=this._style)==null?void 0:t.speed)||10})}))}_mountedHook(){this.position=this._position,!this._delegate.appearance&&this._setAppearance()}setStyle(e={}){return Object.keys(e).length===0?this:(v.merge(this._style,e),e.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};g.registerType("scan_circle_primitive");var Zr=Yr;var qr=class extends g{constructor(e,t=1){super(),this._positions=_.parsePositions(e),this._width=t,this._delegate=new i.Cesium.Primitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:{}})}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("trail_line_primitive")}set positions(e){this._positions=_.parsePositions(e),this._delegate.geometryInstances.geometry=new i.Cesium.PolylineGeometry({positions:u.transformWGS84ArrayToCartesianArray(this._positions),width:this._width})}get positions(){return this._positions}_setAppearance(){var e,t;this._delegate.appearance=new i.Cesium.PolylineMaterialAppearance({material:i.Cesium.Material.fromType("PolylineTrail",{color:((e=this._style)==null?void 0:e.color)||new i.Cesium.Color(1,0,0,.7),speed:((t=this._style)==null?void 0:t.speed)||5})})}_mountedHook(){this.positions=this._positions,!this._delegate.appearance&&this._setAppearance()}setStyle(e={}){return Object.keys(e).length===0?this:(v.merge(this._style,e),e.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};g.registerType("trail_line_primitive");var Xr=qr;var Jr=class extends g{constructor(e,t){super(),this._positions=_.parsePositions(e),this._delegate=new i.Cesium.GroundPrimitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:{}})}),this._video=t,this._state=d.INITIALIZED}get type(){return g.getOverlayType("video_primitive")}set positions(e){var t,r,s,o;this._positions=_.parsePositions(e),this._delegate.geometryInstances.geometry=i.Cesium.PolygonGeometry.fromPositions({positions:u.transformWGS84ArrayToCartesianArray(this._positions),height:(t=this._style)==null?void 0:t.height,extrudedHeight:(r=this._style)==null?void 0:r.extrudedHeight,closeTop:(s=this._style)==null?void 0:s.closeTop,closeBottom:(o=this._style)==null?void 0:o.closeBottom,vertexFormat:i.Cesium.EllipsoidSurfaceAppearance.VERTEX_FORMAT})}get positions(){return this._positions}set video(e){this._video=e,this._setAppearance()}get video(){return this._video}_setAppearance(){this._delegate.appearance=new i.Cesium.EllipsoidSurfaceAppearance({material:i.Cesium.Material.fromType("Image",{image:this._video})})}_mountedHook(){this.positions=this._positions,this.video=this._video}setStyle(e){var t;return Object.keys(e).length===0?this:(v.merge(this._style,e),(t=this._style)!=null&&t.classificationType&&(this._delegate.classificationType=this._style.classificationType),this)}};g.registerType("video_primitive");var Kr=Jr;var Qr=class extends g{constructor(e,t=[]){super(),this._positions=_.parsePositions(e),this._holes=t.map(r=>_.parsePositions(r)),this._delegate=new i.Cesium.GroundPrimitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:{}}),asynchronous:!0}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("water_primitive")}set positions(e){var t,r,s,o;this._positions=_.parsePositions(e),this._delegate.geometryInstances.geometry=new i.Cesium.PolygonGeometry({polygonHierarchy:new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(this._positions),this._holes.map(a=>new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(a)))),height:(t=this._style)==null?void 0:t.height,extrudedHeight:(r=this._style)==null?void 0:r.extrudedHeight,closeTop:(s=this._style)==null?void 0:s.closeTop,closeBottom:(o=this._style)==null?void 0:o.closeBottom,vertexFormat:i.Cesium.EllipsoidSurfaceAppearance.VERTEX_FORMAT})}get positions(){return this._positions}_setAppearance(){var e,t,r,s,o,a,l,h;this._style&&(this._delegate.appearance=new i.Cesium.EllipsoidSurfaceAppearance({material:i.Cesium.Material.fromType("Water",{baseWaterColor:((e=this._style)==null?void 0:e.baseWaterColor)||new i.Cesium.Color(.2,.3,.6,1),blendColor:((t=this._style)==null?void 0:t.blendColor)||new i.Cesium.Color(0,1,.699,1),specularMap:((r=this._style)==null?void 0:r.specularMap)||i.Cesium.Material.DefaultImageId,normalMap:((s=this._style)==null?void 0:s.normalMap)||i.Cesium.Material.DefaultImageId,frequency:((o=this._style)==null?void 0:o.frequency)||1e3,animationSpeed:((a=this._style)==null?void 0:a.animationSpeed)||.01,amplitude:((l=this._style)==null?void 0:l.amplitude)||10,specularIntensity:((h=this._style)==null?void 0:h.specularIntensity)||.5})}))}_mountedHook(){this.positions=this._positions,!this._delegate.appearance&&this._setAppearance()}setStyle(e){var t;return Object.keys(e).length===0?this:(v.merge(this._style,e),(t=this._style)!=null&&t.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};g.registerType("water_primitive");var $r=Qr;var es=class extends g{constructor(e,t=[]){super(),this._positions=_.parsePositions(e),this._holes=t.map(r=>_.parsePositions(r)),this._delegate=new i.Cesium.Primitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:{}}),asynchronous:!0}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("reflection_water_primitive")}set positions(e){this._positions=_.parsePositions(e),this._delegate.geometryInstances.geometry=new i.Cesium.PolygonGeometry({polygonHierarchy:new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(this._positions),this._holes.map(t=>new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(t)))),perPositionHeight:!0})}get positions(){return this._positions}_setAppearance(){var e,t,r,s;this._style&&(this._delegate.appearance=new i.Cesium.EllipsoidSurfaceAppearance({material:new i.Cesium.Material({fabric:{type:"ReflectionWaterPlane",uniforms:{image:"",waterNormal:new i.Cesium.Cartesian3,fadeFactor:1,normalMap:((e=this._style)==null?void 0:e.normalMap)||i.Cesium.Material.DefaultImageId,fresnelParams:new i.Cesium.Cartesian3(.8,1,5),specularMap:"czm_defaultImage",baseWaterColor:i.Cesium.Color.fromCssColorString("rgba(45, 95, 146, 1.0)"),blendColor:new i.Cesium.Color,frequency:2e3,animationSpeed:((t=this._style)==null?void 0:t.animationSpeed)||.01,amplitude:((r=this._style)==null?void 0:r.amplitude)||5,specularIntensity:((s=this._style)==null?void 0:s.specularIntensity)||.8},source:`
15769
- uniform sampler2D image;
15770
- uniform vec3 waterNormal;
15771
- uniform vec3 fresnelParams; // x\u4E3A\u6700\u5C0F\u53CD\u5C04\u7CFB\u6570\uFF0Cy\u4E3A\u6700\u5927\u53CD\u5C04\u7CFB\u6570\uFF0Cz\u4E3A\u89C6\u7EBF\u56E0\u5B50
15772
- uniform sampler2D specularMap;
15773
- uniform sampler2D normalMap;
15774
- uniform vec4 baseWaterColor;
15775
- uniform vec4 blendColor;
15776
- uniform float frequency;
15777
- uniform float animationSpeed;
15778
- uniform float amplitude;
15779
- uniform float specularIntensity;
15780
- uniform float fadeFactor;
15781
- czm_material czm_getMaterial(czm_materialInput materialInput) {
15782
- czm_material material = czm_getDefaultMaterial(materialInput);
15783
- float time = czm_frameNumber * animationSpeed;
15784
- // \u8870\u51CF\u662F\u4E0E\u788E\u7247\u7684\u8DDD\u79BB\u548C\u6CE2\u7684\u9891\u7387\u7684\u51FD\u6570
15785
- float fade = max(1.0, (length(materialInput.positionToEyeEC) / 10000000000.0) * frequency * fadeFactor);
15786
- float specularMapValue = texture(specularMap, materialInput.st).r;
15787
- // \u6CE8\u610F\uFF1A\u6B64\u65F6\u4E0D\u4F7F\u7528\u65B9\u5411\u8FD0\u52A8\uFF0C\u53EA\u9700\u5C06\u89D2\u5EA6\u8BBE\u7F6E\u4E3A0.0\uFF1B
15788
- vec4 noise = czm_getWaterNoise(normalMap, materialInput.st * frequency, time, 0.0);
15789
- vec3 normalTangentSpace = noise.xyz * vec3(1.0, 1.0, (1.0 / amplitude));
15790
- // \u5F53\u6211\u4EEC\u8FDC\u79BB\u6C34\u9762\u65F6\uFF0C\u6B63\u5E38\u7684\u6270\u52A8\u9010\u6E10\u6D88\u5931
15791
- normalTangentSpace.xy /= fade;
15792
- // \u6211\u4EEC\u63A5\u8FD1\u975E\u6C34\u533A\u57DF\uFF08\u4F4E\u955C\u9762\u8D34\u56FE\u503C\uFF09\u65F6\uFF0C\u5C1D\u8BD5\u6DE1\u51FA\u6B63\u5E38\u6270\u52A8
15793
- normalTangentSpace = mix(vec3(0.0, 0.0, 50.0), normalTangentSpace, specularMapValue);
15794
- normalTangentSpace = normalize(normalTangentSpace);
15795
- // \u83B7\u53D6\u65B0\u6CD5\u5411\u91CF\u4E0E\u5782\u76F4\u4E8E\u5207\u5E73\u9762\u7684\u5411\u91CF\u7684\u5BF9\u9F50\u6BD4\u7387
15796
- float tsPerturbationRatio = clamp(dot(normalTangentSpace, vec3(0.0, 0.0, 1.0)), 0.0, 1.0);
15797
- // \u968F\u7740\u9AD8\u5149\u8D34\u56FE\u503C\u7684\u51CF\u5C11\uFF0C\u6DE1\u5316\u6C34\u7684\u6548\u679C
15798
- float alpha = mix(blendColor.a, baseWaterColor.a, specularMapValue) * specularMapValue;
15799
- // \u57FA\u7840\u8272\u662F\u6C34\u548C\u975E\u6C34\u989C\u8272\u7684\u6DF7\u5408\uFF0C\u57FA\u4E8E\u955C\u9762\u8D34\u56FE\u7684\u503C\uFF0C\u53EF\u80FD\u9700\u8981\u4E00\u4E2A\u5747\u5300\u7684\u6DF7\u5408\u56E0\u5B50\u6765\u66F4\u597D\u5730\u63A7\u5236\u8FD9\u4E00\u70B9
15800
- vec3 waterColor = mix(blendColor.rgb, baseWaterColor.rgb, specularMapValue);
15801
- // \u6F2B\u5C04\u9AD8\u5149\u662F\u57FA\u4E8E\u6CD5\u7EBF\u7684\u6270\u52A8\u7A0B\u5EA6
15802
- waterColor += (0.1 * tsPerturbationRatio);
15803
- // \u83B7\u53D6\u6C34\u9762\u53CD\u5C04\u7684\u989C\u8272
15804
- vec2 uv = gl_FragCoord.xy / czm_viewport.zw; // \u83B7\u53D6\u5C4F\u5E55uv
15805
- uv.s = (1.0 - uv.s); // \u955C\u50CF\u7FFB\u8F6C
15806
- // \u6309\u7167\u6CD5\u7EBF\u65B9\u5411\u6765\u6270\u52A8\u53CD\u5C04\u8D34\u56FE\u7684\u7EB9\u7406\u5750\u6807
15807
- uv += normalTangentSpace.xz / 100.0;
15808
- vec3 reflectColor = texture(image, uv).rgb;
15809
- // \u52A0\u5165\u83F2\u6D85\u5C14\u73B0\u8C61
15810
- vec3 positionEC = -materialInput.positionToEyeEC;
15811
- vec4 positionWC = czm_inverseView * vec4(positionEC, 1.0);
15812
- vec3 cameraDir = normalize(positionWC.xyz - czm_viewerPositionWC);
15813
- vec3 n = normalize(waterNormal);
15814
- float fresnel = 1.0 - dot(-cameraDir, n);
15815
- float min_rc = fresnelParams.x; // \u7269\u4F53\u6700\u5C0F\u53CD\u5C04\u7CFB\u6570
15816
- float max_rc = fresnelParams.y; // \u7269\u4F53\u6700\u5927\u53CD\u5C04\u7CFB\u6570
15817
- float f = fresnelParams.z; // \u89C6\u7EBF\u56E0\u5B50
15818
- fresnel = min_rc + (max_rc - min_rc) * pow(fresnel, f);
15819
- // \u83F2\u6D85\u5C14\u503C\u9AD8\uFF0C\u4EE3\u8868\u53CD\u5C04\u5F3A(\u66F4\u591A\u663E\u793A\u6C34\u7684\u53CD\u5C04)\uFF0C\u503C\u4F4E\u5219\u662F\u6298\u5C04\u5F3A(\u4E5F\u53EF\u4EE5\u7406\u89E3\u6210\u66F4\u591A\u663E\u793A\u6C34\u7684\u672C\u8272)
15820
- material.diffuse = mix(waterColor, reflectColor, fresnel);
15821
- material.alpha = mix(alpha, 1.0, fresnel);
15822
- material.normal = normalize(materialInput.tangentToEyeMatrix * normalTangentSpace);
15823
- material.specular = specularIntensity;
15824
- material.shininess = 10.0;
15825
- return material;
15826
- }
15827
- `}})}))}_calcCenterPoint(e,t=0){let s=e.map(l=>`${l.lng},${l.lat},${l.alt}`).join(",").split(",").map(l=>parseFloat(l));e=i.Cesium.Cartesian3.fromDegreesArrayHeights(s);let o=new i.Cesium.Cartesian3;e.forEach(l=>{i.Cesium.Cartesian3.add(o,l,o)});let a=i.Cesium.Cartesian3.multiplyByScalar(o,1/e.length,o);if(t){let l=i.Cesium.Cartographic.fromCartesian(a),h=new i.Cesium.Cartographic(l.longitude,l.latitude,t);a=i.Cesium.Cartographic.toCartesian(h)}return a}_getMirrorCamera(e,t,r){let s=Cartesian3.subtract(r,e.position,new Cartesian3),o=-Cartesian3.dot(t,s),a=Cartesian3.multiplyByScalar(t,2*o,new Cartesian3),l=Cartesian3.subtract(e.position,a,new Cartesian3),h=Cartesian3.dot(t,e.directionWC),c=Cartesian3.multiplyByScalar(t,2*h,new Cartesian3),p=Cartesian3.subtract(e.directionWC,c,new Cartesian3);Cartesian3.normalize(p,p);let f=Cartesian3.dot(t,e.upWC),T=Cartesian3.multiplyByScalar(t,2*f,new Cartesian3),y=Cartesian3.subtract(e.upWC,T,new Cartesian3),m=i.Cesium.Camera.clone(e);return m.position=l,m.up=y,m.direction=p,m.right=Cartesian3.cross(y,p,new Cartesian3),m}_renderToFbo(e,t,r){let s=t._frameState;t.globe.show=!1;let o=t.context,a=o.uniformState,l=t._defaultView.camera;t._defaultView.camera=r;let h=t._defaultView;t._view=h,t.updateFrameState(),s.passes.render=!0,s.passes.postProcess=t.postProcessStages.hasSelected;let c=new i.Cesium.Cesium3DTilePassState({pass:i.Cesium.Cesium3DTilePass.RENDER});s.tilesetPassState=c;let p=i.Cesium.defaultValue(t.backgroundColor,i.Cesium.Color.BLACK);s.backgroundColor=p,s.atmosphere=t.atmosphere,t.fog.update(s),a.update(s),t._computeCommandList.length=0,t._overlayCommandList.length=0;let f=h.viewport;f.x=0,f.y=0,f.width=o.drawingBufferWidth,f.height=o.drawingBufferHeight;let T=h.passState;T.framebuffer=e,T.blendingEnabled=void 0,T.scissorTest=void 0,T.viewport=i.Cesium.BoundingRectangle.clone(f,T.viewport),t.updateEnvironment(),t.updateAndExecuteCommands(T,p),t.resolveFramebuffers(T),T.framebuffer=void 0,o.endFrame(),t.globe.show=!0,t._defaultView.camera=l}_clipAnyModel(e,t,r){let s=null,o=null;if(e instanceof Cesium3DTileset)o=e,s=Matrix4.multiply(o.modelMatrix,o.root.transform,new Matrix4),Matrix4.inverse(s,s);else if(e instanceof Model)o=e,s=Matrix4.inverse(o.modelMatrix,new Matrix4);else{if(!e.model)return;s=Transforms.eastNorthUpToFixedFrame(e.position.getValue(new i.Cesium.JulianDate)),Matrix4.inverse(s,s),o=e.model}let a=new ClippingPlaneCollection,l=Plane.fromPointNormal(t,r),h=Plane.transform(l,s);return a.add(h),o.clippingPlanes=a,a}_mountedHook(){this.positions=this._positions,!this._delegate.appearance&&this._setAppearance()}setStyle(e){var t;return Object.keys(e).length===0?this:(v.merge(this._style,e),(t=this._style)!=null&&t.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};g.registerType("water_primitive");var ts=es;var is=class n extends g{constructor(e,t){super(),this._delegate=new i.Cesium.Entity({billboard:{}}),this._position=_.parsePosition(e),this._icon=t,this._size=[32,32],this._state=d.INITIALIZED}get type(){return g.getOverlayType("billboard")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}set icon(e){this._icon=e,this._delegate.billboard.image=this._icon}get icon(){return this._icon}set size(e){if(!Array.isArray(e))throw new Error("Billboard: the size invalid");this._size=e,this._delegate.billboard.width=this._size[0]||32,this._delegate.billboard.height=this._size[1]||32}get size(){return this._size}_mountedHook(){this.position=this._position,this.icon=this._icon,this.size=this._size}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.image&&delete e.width&&delete e.height,v.merge(this._style,e),v.merge(this._delegate.billboard,e),this)}static fromEntity(e){var o;let t,r=i.Cesium.JulianDate.now(),s=u.transformCartesianToWGS84(e.position.getValue(r));return e.billboard&&(t=new n(s,e.billboard.image.getValue(r)),t.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(r)}),t}};g.registerType("billboard");var ge=is;var rs=class extends g{constructor(e,t,r,s){super(),this._position=_.parsePosition(e),this._length=t,this._width=r,this._height=s,this._delegate=new i.Cesium.Entity({box:{dimensions:{x:+this._length,y:+this._width,z:+this._height}}}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("box")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._delegate.orientation=i.Cesium.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(this._position.heading),i.Cesium.Math.toRadians(this._position.pitch),i.Cesium.Math.toRadians(this._position.roll)))}get position(){return this._position}set length(e){let t=this._delegate.box.dimensions.getValue();this._length=e||0,t.x=+this._length,this._delegate.box.dimensions.setValue(t)}get length(){return this._length}set width(e){let t=this._delegate.box.dimensions.getValue();this._width=e||0,t.y=+this._width,this._delegate.box.dimensions.setValue(t)}get width(){return this._width}set height(e){let t=this._delegate.box.dimensions.getValue();this._height=e||0,t.z=+this._height,this._delegate.box.dimensions.setValue(t)}get height(){return this._height}_mountedHook(){this.position=this._position}setStyle(e){return Object.keys(e).length===0?this:(delete e.length&&delete e.width&&delete e.height,v.merge(this._style,e),v.merge(this._delegate.box,e),this)}};g.registerType("box");var ss=rs;var os=class extends g{constructor(e,t){super(),this._delegate=new i.Cesium.Entity({polygon:{}}),this._center=_.parsePosition(e),this._radius=+t||0,this._rotateAmount=0,this._stRotation=0,this._state=d.INITIALIZED}get type(){return g.getOverlayType("circle")}set center(e){this._center=_.parsePosition(e),this._delegate.polygon.hierarchy=this._computeHierarchy()}get center(){return this._center}set radius(e){this._radius=+e,this._delegate.polygon.hierarchy=this._computeHierarchy()}get radius(){return this._radius}set rotateAmount(e){this._rotateAmount=+e,this._delegate.polygon.stRotation=new i.Cesium.CallbackProperty(()=>(this._stRotation+=this._rotateAmount,(this._stRotation>=360||this._stRotation<=-360)&&(this._stRotation=0),i.Cesium.Math.toRadians(this._stRotation)),!1)}get rotateAmount(){return this._rotateAmount}_computeHierarchy(){let e=new i.Cesium.PolygonHierarchy,t=i.Cesium.EllipseGeometryLibrary.computeEllipsePositions({center:u.transformWGS84ToCartesian(this._center),semiMajorAxis:this._radius,semiMinorAxis:this._radius,rotation:0,granularity:.005},!1,!0),r=i.Cesium.Cartesian3.unpackArray(t.outerPositions);return r.push(r[0]),e.positions=r,e}_mountedHook(){this.center=this._center}setLabel(e,t){return this._delegate.position=u.transformWGS84ToCartesian(this._center),this._delegate.label={...t,text:e},this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.polygon,e),this)}};g.registerType("circle");var et=os;var as=class n extends g{constructor(e){super(),this._positions=_.parsePositions(e),this._delegate=new i.Cesium.Entity({corridor:{}}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("corridor")}set positions(e){this._positions=_.parsePositions(e),this._delegate.corridor.positions=u.transformWGS84ArrayToCartesianArray(this._positions)}get positions(){return this._positions}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.corridor,e),this)}static fromEntity(e){var s;let t,r=i.Cesium.JulianDate.now();if(e.polyline){let o=u.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(r));t=new n(o),t.attr={...(s=e==null?void 0:e.properties)==null?void 0:s.getValue(r)}}return t}};g.registerType("corridor");var ns=as;var ls=class extends g{constructor(e,t,r,s){super(),this._position=_.parsePosition(e),this._length=+t||0,this._topRadius=+r||0,this._bottomRadius=+s||0,this._delegate=new i.Cesium.Entity({cylinder:{}}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("cylinder")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._delegate.orientation=i.Cesium.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(this._position.heading),i.Cesium.Math.toRadians(this._position.pitch),i.Cesium.Math.toRadians(this._position.roll)))}get position(){return this._position}set length(e){this._length=+e||0,this._delegate.cylinder.length=this._length}get length(){return this._length}set topRadius(e){this._topRadius=+e||0,this._delegate.cylinder.topRadius=this._topRadius}get topRadius(){return this._topRadius}set bottomRadius(e){this._bottomRadius=+e||0,this._delegate.cylinder.bottomRadius=this._bottomRadius}get bottomRadius(){return this._bottomRadius}_mountedHook(){this.position=this._position,this.length=this._length,this.topRadius=this._topRadius,this.bottomRadius=this._bottomRadius}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.length&&delete e.topRadius&&delete e.bottomRadius,v.merge(this._style,e),v.merge(this._delegate.cylinder,e),this)}};g.registerType("cylinder");var hs=ls;var cs=class extends g{constructor(e,t,r){super(),this._position=_.parsePosition(e),this._semiMajorAxis=+t||0,this._semiMinorAxis=+r||0,this._delegate=new i.Cesium.Entity({ellipse:{}}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("ellipse")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._delegate.orientation=i.Cesium.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(this._position.heading),i.Cesium.Math.toRadians(this._position.pitch),i.Cesium.Math.toRadians(this._position.roll)))}get position(){return this._position}set semiMajorAxis(e){this._semiMajorAxis=+e||0,this._delegate.ellipse.semiMajorAxis=this._semiMajorAxis}get semiMajorAxis(){return this._semiMajorAxis}set semiMinorAxis(e){this._semiMinorAxis=+e||0,this._delegate.ellipse.semiMinorAxis=this._semiMinorAxis}get semiMinorAxis(){return this._semiMinorAxis}_mountedHook(){this.position=this._position,this.semiMajorAxis=this._semiMajorAxis,this.semiMinorAxis=this._semiMinorAxis}setStyle(e){return Object.keys(e).length===0?this:(delete e.semiMajorAxis&&delete e.semiMinorAxis,v.merge(this._style,e),v.merge(this._delegate.ellipse,e),this)}};g.registerType("ellipse");var ps=cs;var ds=class extends g{constructor(e,t){super(),this._position=_.parsePosition(e),this._radius=t||{x:10,y:10,z:10},this._delegate=new i.Cesium.Entity({ellipsoid:{}}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("sphere")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._delegate.orientation=i.Cesium.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(this._position.heading),i.Cesium.Math.toRadians(this._position.pitch),i.Cesium.Math.toRadians(this._position.roll)))}get position(){return this._position}set radius(e){this._radius=e||{x:10,y:10,z:10},this._delegate.ellipsoid.radii=this._radius}get radius(){return this._radius}_mountedHook(){this.position=this._position,this.radius=this._radius}setStyle(e){return Object.keys(e).length===0?this:(delete e.radius,v.merge(this._style,e),v.merge(this._delegate.ellipsoid,e),this)}};g.registerType("ellipsoid");var ms=ds;var us=class n extends g{constructor(e,t){super(),this._delegate=new i.Cesium.Entity({label:{}}),this._position=_.parsePosition(e),this._text=t,this._state=d.INITIALIZED}get type(){return g.getOverlayType("label")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}set text(e){this._text=e,this._delegate.label.text=this._text}get text(){return this._text}_mountedHook(){this.position=this._position,this.text=this._text}setLabel(e,t){return this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.text,v.merge(this._style,e),v.merge(this._delegate.label,e),this)}static fromEntity(e){var o;let t=i.Cesium.JulianDate.now(),r=u.transformCartesianToWGS84(e.position.getValue(t)),s;return e.billboard&&(s=new n(r,e.name),s.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(t)}),s}};g.registerType("label");var tt=us;var _s=class extends g{constructor(e,t,r,s={}){if(super(),this._position=_.parsePosition(e),this._width=+t||100,this._height=+r||100,s.normal&&typeof s.normal=="string"){let o=String(s.normal).toLocaleUpperCase();s.normal=o==="X"?i.Cesium.Cartesian3.UNIT_X:o==="Y"?i.Cesium.Cartesian3.UNIT_Y:i.Cesium.Cartesian3.UNIT_Z}else s.normal=i.Cesium.Cartesian3.UNIT_Z;this._normal=s.normal,this._distance=s.distance||0,this._delegate=new i.Cesium.Entity({plane:{dimensions:{x:this._width,y:this._height},plane:new i.Cesium.Plane(this._normal,this._distance)}}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("plane")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._delegate.orientation=i.Cesium.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(this._position.heading),i.Cesium.Math.toRadians(this._position.pitch),i.Cesium.Math.toRadians(this._position.roll)))}get position(){return this._position}set width(e){let t=this._delegate.plane.dimensions.getValue();this._width=+e||0,t.x=this._width}get width(){return this._width}set height(e){let t=this._delegate.plane.dimensions.getValue();this._height=+e||0,t.y=this._height}get height(){return this._height}set distance(e){let t=this._delegate.plane.dimensions.getValue();this._distance=e,t.distance=e}get distance(){return this._distance}_mountedHook(){this.position=this._position,this.distance=this._distance}setStyle(e){return Object.keys(e).length===0?this:(delete e.dimensions&&delete["plane"],v.merge(this._style,e),v.merge(this._delegate.plane,e),this)}};g.registerType("plane");var fs=_s;var Hl={pixelSize:8,outlineColor:i.Cesium.Color.BLUE,outlineWidth:2},gs=class n extends g{constructor(e){super(),this._delegate=new i.Cesium.Entity({point:{}}),this._position=_.parsePosition(e),this._state=d.INITIALIZED}get type(){return g.getOverlayType("point")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}_mountedHook(){this.position=this._position,v.merge(this._delegate.point,Hl,this._style)}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position,v.merge(this._style,e),v.merge(this._delegate.point,Hl,this._style),this)}static fromEntity(e){var o;let t,r=i.Cesium.JulianDate.now(),s=u.transformCartesianToWGS84(e.position.getValue(r));return t=new n(s),t.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(r)},t}};g.registerType("point");var it=gs;var ys=class n extends g{constructor(e){super(),this._delegate=new i.Cesium.Entity({polygon:{}}),this._positions=_.parsePositions(e),this._holes=[],this._state=d.INITIALIZED}get type(){return g.getOverlayType("polygon")}set positions(e){this._positions=_.parsePositions(e),this._delegate.polygon.hierarchy=this._computeHierarchy()}get positions(){return this._positions}set holes(e){e&&e.length&&(this._holes=e.map(t=>_.parsePositions(t)),this._delegate.polygon.hierarchy=this._computeHierarchy())}get holes(){return this._holes}get center(){return _e([...this._positions,this._positions[0]])}get area(){return ue(this._positions)}_computeHierarchy(){let e=new i.Cesium.PolygonHierarchy;return e.positions=u.transformWGS84ArrayToCartesianArray(this._positions),e.holes=this._holes.map(t=>new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(t))),e}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this._delegate.position=u.transformWGS84ToCartesian(this.center),this._delegate.label={text:e,...t},this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.polygon,e),this)}static fromEntity(e){var s;let t,r=i.Cesium.JulianDate.now();if(e.polygon){let o=u.transformCartesianArrayToWGS84Array(e.polygon.hierarchy.getValue(r).positions);t=new n(o),t.attr={...(s=e==null?void 0:e.properties)==null?void 0:s.getValue(r)}}return t}};g.registerType("polygon");var ye=ys;var vs=class n extends g{constructor(e){super(),this._positions=_.parsePositions(e),this._delegate=new i.Cesium.Entity({polyline:{}}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("polyline")}set positions(e){this._positions=_.parsePositions(e),this._delegate.polyline.positions=u.transformWGS84ArrayToCartesianArray(this._positions)}get positions(){return this._positions}get center(){return _e(this._positions)}get distance(){return Q(this._positions)}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this._delegate.position=u.transformWGS84ToCartesian(this.center),this._delegate.label={text:e,...t},this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.polyline,e),this)}static fromEntity(e){var s;let t,r=i.Cesium.JulianDate.now();if(e.polyline){let o=u.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(r));t=new n(o),t.attr={...(s=e==null?void 0:e.properties)==null?void 0:s.getValue(r)}}return t}};g.registerType("polyline");var ve=vs;var ws=class n extends g{constructor(e,t){super(),this._positions=_.parsePositions(e),this._shape=t||[],this._delegate=new i.Cesium.Entity({polylineVolume:{}}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("polyline_volume")}set positions(e){this._positions=_.parsePositions(e),this._delegate.polylineVolume.positions=u.transformWGS84ArrayToCartesianArray(this._positions)}get positions(){return this._positions}set shape(e){this._shape=e||[],this._delegate.polylineVolume.shape=this._shape}get shape(){return this._shape}_mountedHook(){this.positions=this._positions,this.shape=this._shape}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions&&delete e.shape,v.merge(this._style,e),v.merge(this._delegate.polylineVolume,e),this)}static fromEntity(e,t){var o;let r,s=i.Cesium.JulianDate.now();if(e.polyline){let a=u.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(s));r=new n(a,t),r.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(s)}}return r}};g.registerType("polyline_volume");var Ts=ws;var Cs=class extends g{constructor(e){super(),this._positions=_.parsePositions(e),this._delegate=new i.Cesium.Entity({rectangle:{}}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("rect")}set positions(e){this._positions=_.parsePositions(e),this._delegate.rectangle.coordinates=i.Cesium.Rectangle.fromCartesianArray(u.transformWGS84ArrayToCartesianArray(this._positions))}get positions(){return this._positions}_mountedHook(){this.positions=this._positions}setLabel(e,t){let r=this._delegate.rectangle.coordinates.getValue();return this._delegate.position=i.Cesium.Cartographic.toCartesian(i.Cesium.Rectangle.center(r,new i.Cesium.Cartographic)),this._delegate.label={...t,text:e},this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.rectangle,e),this)}};g.registerType("rect");var rt=Cs;var xs=class n extends g{constructor(e){super(),this._positions=_.parsePositions(e),this._delegate=new i.Cesium.Entity({wall:{}}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("wall")}set positions(e){this._positions=_.parsePositions(e),this._delegate.wall.positions=u.transformWGS84ArrayToCartesianArray(this._positions)}get positions(){return this._positions}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.wall,e),this)}static fromEntity(e){var s;let t,r=i.Cesium.JulianDate.now();if(e.polyline){let o=u.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(r));t=new n(o),t.attr={...(s=e==null?void 0:e.properties)==null?void 0:s.getValue(r)}}return t}};g.registerType("wall");var Es=xs;var Ps=class extends P{constructor(e,t,r={}){if(!t)throw new Error("GeoJsonLayer\uFF1Athe url invalid");super(e),this._delegate=i.Cesium.GeoJsonDataSource.load(t,r),this._state=d.INITIALIZED}get type(){return P.getLayerType("geojson")}set show(e){this._show=e,this._delegate&&this._delegate.then(t=>{t.show=this._show})}get show(){return this._show}_createBillboard(e){if(e.position&&e.billboard)return ge.fromEntity(e)}_createPolyline(e){if(e.polyline)return ve.fromEntity(e)}_createPolygon(e){if(e.polygon)return ye.fromEntity(e)}_createModel(e,t){if(e)return De.fromEntity(e,t)}eachOverlay(e,t){if(this._delegate)return this._delegate.then(r=>{r.entities.values.forEach(o=>{e.call(t,o)})}),this}toVectorLayer(){let e=new ce(this.id);return this.eachOverlay(t=>{t.billboard?e.addOverlay(this._createBillboard(t)):t.polyline?e.addOverlay(this._createPolyline(t)):t.polygon&&e.addOverlay(this._createPolygon(t))},this),e}toModelLayer(e){let t=new ce(this.id);return this.eachOverlay(r=>{t.addOverlay(this._createModel(r,e))},this),t}};P.registerType("geojson");var st=Ps;var bs=class extends P{constructor(e,t,r={}){if(!t)throw new Error("Shp2JsonLayer\uFF1Athe url invalid");if(!me("shpUtil"))throw new Error("miss the shpUtil lib");super(e);let o=this._init(t,r);this._delegate=i.Cesium.GeoJsonDataSource.load(o,r),this._state=d.INITIALIZED}async _init(e,t){var s;return await shpUtil.toGeoJSON(e,void 0,(s=t.encoding)!=null?s:"gbk",t.crs)}get type(){return P.getLayerType("shp")}set show(e){this._show=e,this._delegate&&this._delegate.then(t=>{t.show=this._show})}get show(){return this._show}_createBillboard(e){if(e.position&&e.billboard)return ge.fromEntity(e)}_createPolyline(e){if(e.polyline)return ve.fromEntity(e)}_createPolygon(e){if(e.polygon)return ye.fromEntity(e)}_createModel(e,t){if(e)return De.fromEntity(e,t)}eachOverlay(e,t){if(this._delegate)return this._delegate.then(r=>{r.entities.values.forEach(o=>{e.call(t,o)})}),this}toVectorLayer(){let e=new ce(this.id);return this.eachOverlay(t=>{t.billboard?e.addOverlay(this._createBillboard(t)):t.polyline?e.addOverlay(this._createPolyline(t)):t.polygon&&e.addOverlay(this._createPolygon(t))},this),e}toModelLayer(e){let t=new ce(this.id);return this.eachOverlay(r=>{t.addOverlay(this._createModel(r,e))},this),t}};P.registerType("shp");var Ss=bs;var Is=class extends P{constructor(e,t,r={}){if(!t)throw new Error("GpxLayer: the url is empty");super(e),this._delegate=i.Cesium.KmlDataSource.load(t,r),this._state=d.INITIALIZED}get type(){return P.getLayerType("gpx")}set show(e){this._show=e,this._delegate&&this._delegate.then(t=>{t.show=this._show})}get show(){return this._show}eachOverlay(e,t){if(this._delegate)return this._delegate.then(r=>{r.entities.values.forEach(o=>{e.call(t,o)})}),this}};P.registerType("gpx");var Ms=Is;var _d={radialColor:i.Cesium.Color.WHITE,radialWidth:2,showRadial:!0,LabelColor:i.Cesium.Color.YELLOW,weftColor:i.Cesium.Color.WHITE,weftWidth:2},As=class extends P{constructor(e,t){super(e),this._options={..._d,...t},this._delegate=new i.Cesium.CustomDataSource(e),this._state=d.INITIALIZED}get type(){return P.getLayerType("graticule")}_addedHook(){for(let e=0;e<36;e++)this._delegate.entities.add({polyline:{positions:i.Cesium.Cartesian3.fromDegreesArray([e*10,89.5,e*10,-89.5]),material:this._options.radialColor,width:this._options.radialWidth},show:this._options.showRadial}),this._delegate.entities.add({position:i.Cesium.Cartesian3.fromDegrees(e*10,0),label:{text:e*10+"\xB0",font:"12px",fillColor:this._options.LabelColor}});for(let e=0;e<18;e++){let t=[];for(let r=0;r<129;r++)t.push(-180+r*(360/128),(e<9?e:-e)*10);this._delegate.entities.add({polyline:{positions:i.Cesium.Cartesian3.fromDegreesArray(t),material:this._options.weftColor,width:this._options.weftWidth}})}}};P.registerType("graticule");var Ds=As;var Ls=class extends P{constructor(e){super(e),this._delegate=new i.Cesium.PrimitiveCollection,this._isGround=!0,this._state=d.INITIALIZED}get type(){return P.getLayerType("ground_primitive")}clear(){return this._delegate&&this._delegate.removeAll(),this._cache={},this._state=d.CLEARED,this}};P.registerType("ground_primitive");var Rs=Ls;var Os=class extends P{constructor(e){super(e),this._delegate=S.create("div","html-layer",void 0),this._delegate.setAttribute("id",this._id),this._renderRemoveCallback=void 0,this._state=d.INITIALIZED}get type(){return P.getLayerType("html")}set show(e){this._show=e,this._delegate.style.visibility=this._show?"visible":"hidden",Object.keys(this._cache).forEach(t=>{this._cache[t].show=e})}get show(){return this._show}_onAdd(e){this._viewer=e,this._viewer.layerContainer.appendChild(this._delegate);let t=this._viewer.scene;this._renderRemoveCallback=t.postRender.addEventListener(()=>{let r=this._viewer.camera.positionWC,s=this._viewer.camera.direction,o=this._viewer.getOffset();this.eachOverlay(a=>{if(a&&a.position){let l=u.transformWGS84ToCartesian(a.position),h=t.globe.ellipsoid.geodeticSurfaceNormal(l,new i.Cesium.Cartesian3),c=i.Cesium.SceneTransforms.worldToWindowCoordinates(t,l);c&&(c.x+=o.x,c.y+=o.y),a._updateStyle(c,i.Cesium.Cartesian3.distance(l,r),i.Cesium.Cartesian3.dot(s,h)<=0)}},this)},this),this._state=d.ADDED}_onRemove(){this._renderRemoveCallback&&this._renderRemoveCallback(),this._viewer.layerContainer.removeChild(this._delegate),this._state=d.REMOVED}clear(){for(;this._delegate.hasChildNodes();)this._delegate.removeChild(this._delegate.firstChild);return this._cache={},this._state=d.CLEARED,this}};P.registerType("html");var ks=Os;var Fs=class extends P{constructor(e){super(e),this._delegate=new i.Cesium.PrimitiveCollection,this._state=d.INITIALIZED}get type(){return P.getLayerType("i3s")}clear(){return this._delegate.removeAll(),this._cache={},this._state=d.CLEARED,this}};P.registerType("i3s");var zs=Fs;var Hs=class extends P{constructor(e,t,r={}){if(!t)throw new Error("KmlLayer: the url is empty");super(e),this._delegate=i.Cesium.KmlDataSource.load(t,r),this._state=d.INITIALIZED}get type(){return P.getLayerType("kml")}set show(e){this._show=e,this._delegate&&this._delegate.then(t=>{t.show=this._show})}get show(){return this._show}eachOverlay(e,t){if(this._delegate)return this._delegate.then(r=>{r.entities.values.forEach(o=>{e.call(t,o)})}),this}};P.registerType("kml");var Ns=Hs;var Ws=class extends P{constructor(e,t=""){super(e),this._dataSource=i.Cesium.GeoJsonDataSource.load(t),this._delegate=new i.Cesium.CustomDataSource(e),this._initLabel(),this._state=d.INITIALIZED}get type(){return P.getLayerType("label")}_createLabel(e){if(e.position&&e.name)return tt.fromEntity(e)}_initLabel(){this._dataSource.then(e=>{e.entities.values.forEach(r=>{let s=this._createLabel(r);this.addOverlay(s)})})}};P.registerType("label");var Gs=Ws;var Us=class extends P{constructor(e){super(e),this._delegate=new i.Cesium.PrimitiveCollection,this._points=this._delegate.add(new i.Cesium.PointPrimitiveCollection),this._labels=this._delegate.add(new i.Cesium.LabelCollection),this._billboards=this._delegate.add(new i.Cesium.BillboardCollection),this._polylines=this._delegate.add(new i.Cesium.PolylineCollection),this._clouds=this._delegate.add(new i.Cesium.CloudCollection),this._state=d.INITIALIZED}get type(){return P.getLayerType("primitive")}get points(){return this._points}get labels(){return this._labels}get billboards(){return this._billboards}get polylines(){return this._polylines}get clouds(){return this._clouds}clear(){return this._delegate&&this._delegate.removeAll(),this._points=this._delegate.add(new i.Cesium.PointPrimitiveCollection),this._labels=this._delegate.add(new i.Cesium.LabelCollection),this._billboards=this._delegate.add(new i.Cesium.BillboardCollection),this._polylines=this._delegate.add(new i.Cesium.PolylineCollection),this._clouds=this._delegate.add(new i.Cesium.CloudCollection),this._cache={},this._state=d.CLEARED,this}};P.registerType("primitive");var Bs=Us;var Vs=class extends P{constructor(e,t,r){super(e),this._delegate=i.Cesium.ImageryLayer.fromProviderAsync(t,r),this._state=d.INITIALIZED}get type(){return P.getLayerType("raster-tile")}};P.registerType("raster-tile");var js=Vs;var Ys=class extends P{constructor(e){super(e),this._delegate=new i.Cesium.PrimitiveCollection,this._state=d.INITIALIZED}get type(){return P.getLayerType("tileset")}clear(){return this._delegate.removeAll(),this._cache={},this._state=d.CLEARED,this}};P.registerType("tileset");var Zs=Ys;st.registerType("topojson");var qs=class extends P{constructor(e,t){if(!me("echarts"))throw new Error("miss the echarts lib");super(e),this._option=t,this._delegate=void 0,this._chart=void 0}set show(e){this._show=e,this._delegate.style.visibility=e?"visible":"hidden"}get show(){return this._show}_createChartElement(){let e=this._viewer.scene.canvas,t=document.createElement("div");return t.setAttribute("id",this._id),t.setAttribute("data-layer-type","chart-layer"),t.style.cssText=`position:absolute; top:0; left:0; width: ${e.clientWidth}px; height: ${e.clientHeight}px;pointer-events:none;`,this._viewer.layerContainer.appendChild(t),t}_onAdd(e){let t=me("echarts");this._viewer=e,this._viewer.canvas.setAttribute("tabIndex","0"),this._delegate=this._createChartElement(),this._chart=t.init(this._delegate),Object(this._chart.getZr()).viewer=e,this._option&&this._chart.setOption({...this._option,GLMap:{},animation:!1}),this._state=d.ADDED}_onRemove(){this._delegate&&this._viewer&&(this._chart.dispose(),this._viewer.layerContainer.removeChild(this._delegate),this._state=d.REMOVED)}setOption(e={}){return this._option=e,this._chart&&this._chart.setOption({...e,GLMap:{},animation:!1}),this}clear(){return this._chart.clear(),this}resize(){return this._chart.resize(),this}},Xs=qs;var{Cartesian3:vt,Ellipsoid:fd,Math:Nl}=i.Cesium;function Wl(n){function e(t){this._api=t,this._viewer=Object(t.getZr()).viewer,this._mapOffset=[0,0],this.dimensions=["lng","lat"]}return e.prototype.getViewer=function(){return this._viewer},e.prototype.setMapOffset=function(t){return this._mapOffset=t,this},e.prototype.dataToPoint=function(t){let r=[],s=vt.fromDegrees(t[0],t[1]);if(!s)return r;let o=fd.WGS84.geodeticSurfaceNormal(s,new vt),a=this._viewer.camera.direction;if(vt.dot(o,a)>=0)return r;let l=this._viewer.scene.cartesianToCanvasCoordinates(s);return l?[l.x-this._mapOffset[0],l.y-this._mapOffset[1]]:r},e.prototype.pointToData=function(t){let r=this._viewer.scene.globe.ellipsoid,s=new vt(t[0]+this._mapOffset[0],t[1]+this._mapOffset[1],0),o=r.cartesianToCartographic(s);return[Nl.toDegrees(o.longitude),Nl.toDegrees(o.latitude)]},e.prototype.getViewRect=function(){let t=this._api;return new n.graphic.BoundingRect(0,0,t.getWidth(),t.getHeight())},e.prototype.getRoamTransform=function(){return n.matrix.create()},e.create=function(t,r){let s;t.eachComponent("GLMap",function(o){s=new e(r),s.setMapOffset(o.__mapOffset||[0,0]),o.coordinateSystem=s}),t.eachSeries(function(o){o.get("coordinateSystem")==="GLMap"&&(o.coordinateSystem=s)})},e.dimensions=["lng","lat"],e}function Gl(n){let{registerAction:e,registerCoordinateSystem:t,extendComponentModel:r,extendComponentView:s}=n;r({type:"GLMap",getViewer(){return Object(this.getZr()).viewer},defaultOption:{roam:!1}}),s({type:"GLMap",init:function(o,a){this.api=a,a.getZr().viewer.clock.onTick.addEventListener(this.moveHandler,this)},moveHandler:function(){this.api.getZr().dom.style.visibility!=="hidden"&&this.api.dispatchAction({type:"GLMapRoam"})},render:function(o,a,l){},dispose:function(){this.api.getZr().viewer.clock.onTick.removeEventListener(this.moveHandler,this)}}),t("GLMap",Wl(n)),e({type:"GLMapRoam",event:"GLMapRoam",update:"updateLayout"},function(o,a){})}var gd={LEFT_MIDDLE:0,LEFT_RIGHT:1},we=gd;var Js=class{constructor(e){this._viewer=e,this._options={}}_setViewerOption(){var e,t,r;return this._viewer.delegate.shadows=(t=(e=this._options)==null?void 0:e.shadows)!=null?t:!1,this._viewer.delegate.resolutionScale=((r=this._options)==null?void 0:r.resolutionScale)||1,this}_setCanvasOption(){return this._options.tabIndex&&this._viewer.scene.canvas.setAttribute("tabIndex",this._options.tabIndex),this}_setSceneOption(){var t,r,s,o;let e=this._viewer.scene;return e.skyAtmosphere.show=(t=this._options.showAtmosphere)!=null?t:!0,e.sun.show=(r=this._options.showSun)!=null?r:!0,e.moon.show=(s=this._options.showMoon)!=null?s:!0,e.postProcessStages.fxaa.enabled=(o=this._options.enableFxaa)!=null?o:!1,e.msaaSupported&&(e.msaaSamples=+this._options.msaaSamples||1),this}_setSkyBoxOption(){var t;if(!this._options.skyBox)return this;let e=this._options.skyBox;if(e instanceof i.Cesium.SkyBox)this._viewer.scene.skyBox=e;else{let r=this._viewer.scene.skyBox;r.show=(t=e.show)!=null?t:!0,e.offsetAngle&&(r.offsetAngle=e.offsetAngle),e!=null&&e.sources&&(r.sources=e.sources)}return this}_setGlobeOption(){var r,s,o,a,l,h,c,p,f,T,y,m;if(!this._options.globe)return this;let e=this._viewer.scene.globe,t=this._options.globe;if(v.merge(e,{show:(r=t==null?void 0:t.show)!=null?r:!0,showGroundAtmosphere:(s=t==null?void 0:t.showGroundAtmosphere)!=null?s:!0,enableLighting:(o=t==null?void 0:t.enableLighting)!=null?o:!1,depthTestAgainstTerrain:(a=t==null?void 0:t.depthTestAgainstTerrain)!=null?a:!1,tileCacheSize:+(t==null?void 0:t.tileCacheSize)||100,preloadSiblings:(l=t==null?void 0:t.preloadSiblings)!=null?l:!1,showSkirts:(h=t==null?void 0:t.showSkirts)!=null?h:!0,baseColor:(t==null?void 0:t.baseColor)||new i.Cesium.Color(0,0,.5,1),terrainExaggeration:(t==null?void 0:t.terrainExaggeration)||1,terrainExaggerationRelativeHeight:(t==null?void 0:t.terrainExaggerationRelativeHeight)||0}),v.merge(e.translucency,{enabled:(p=(c=t==null?void 0:t.translucency)==null?void 0:c.enabled)!=null?p:!1,backFaceAlpha:+((f=t==null?void 0:t.translucency)==null?void 0:f.backFaceAlpha)||1,backFaceAlphaByDistance:(T=t==null?void 0:t.translucency)==null?void 0:T.backFaceAlphaByDistance,frontFaceAlpha:+((y=t==null?void 0:t.translucency)==null?void 0:y.frontFaceAlpha)||1,frontFaceAlphaByDistance:(m=t==null?void 0:t.translucency)==null?void 0:m.frontFaceAlphaByDistance}),t!=null&&t.filterColor){let E=this._viewer.scene.globe._surfaceShaderSet.baseFragmentShaderSource,x=E.sources.pop();E.sources.push(x.replace("out_FragColor = finalColor;",`out_FragColor = finalColor * vec4${t.filterColor.toString()};`))}return this}_setCameraController(){var r,s,o,a,l,h,c;if(!((r=this._options)!=null&&r.cameraController))return this;let e=this._viewer.scene.screenSpaceCameraController,t=this._options.cameraController;return v.merge(e,{enableInputs:(s=t==null?void 0:t.enableInputs)!=null?s:!0,enableRotate:(o=t==null?void 0:t.enableRotate)!=null?o:!0,enableTilt:(a=t==null?void 0:t.enableTilt)!=null?a:!0,enableTranslate:(l=t==null?void 0:t.enableTranslate)!=null?l:!0,enableZoom:(h=t==null?void 0:t.enableZoom)!=null?h:!0,enableCollisionDetection:(c=t==null?void 0:t.enableCollisionDetection)!=null?c:!0,minimumZoomDistance:+(t==null?void 0:t.minimumZoomDistance)||1,maximumZoomDistance:+(t==null?void 0:t.maximumZoomDistance)||40489014}),this}setOptions(e){return Object.keys(e).length===0?this:(this._options={...this._options,...e},this._setViewerOption()._setCanvasOption()._setSceneOption()._setSkyBoxOption()._setGlobeOption()._setCameraController(),this)}},Ks=Js;var Qs=class{constructor(e){this._viewer=e,this._mouseMode=0}setPitchRange(e,t){let r=new i.Cesium.ScreenSpaceEventHandler(this._viewer.scene.canvas);this._viewer.scene.mode===i.Cesium.SceneMode.SCENE3D&&(r.setInputAction(s=>{r.setInputAction(o=>{let a=!0,l=o.endPosition.y<o.startPosition.y;l&&this._viewer.camera.pitch>i.Cesium.Math.toRadians(t)||!l&&this._viewer.camera.pitch<i.Cesium.Math.toRadians(e)?a=!1:a=!0,this._viewer.scene.screenSpaceCameraController.enableTilt=a},i.Cesium.ScreenSpaceEventType.MOUSE_MOVE)},this._mouseMode===we.LEFT_MIDDLE?i.Cesium.ScreenSpaceEventType.MIDDLE_DOWN:i.Cesium.ScreenSpaceEventType.RIGHT_DOWN),r.setInputAction(s=>{this._viewer.scene.screenSpaceCameraController.enableTilt=!0,r.removeInputAction(i.Cesium.ScreenSpaceEventType.MOUSE_MOVE)},this._mouseMode===we.LEFT_MIDDLE?i.Cesium.ScreenSpaceEventType.MIDDLE_UP:i.Cesium.ScreenSpaceEventType.RIGHT_UP))}changeMouseMode(e){this._mouseMode=e||we.LEFT_MIDDLE,e===we.LEFT_MIDDLE?(this._viewer.scene.screenSpaceCameraController.tiltEventTypes=[i.Cesium.CameraEventType.MIDDLE_DRAG,i.Cesium.CameraEventType.PINCH,{eventType:i.Cesium.CameraEventType.LEFT_DRAG,modifier:i.Cesium.KeyboardEventModifier.CTRL},{eventType:i.Cesium.CameraEventType.RIGHT_DRAG,modifier:i.Cesium.KeyboardEventModifier.CTRL}],this._viewer.scene.screenSpaceCameraController.zoomEventTypes=[i.Cesium.CameraEventType.RIGHT_DRAG,i.Cesium.CameraEventType.WHEEL,i.Cesium.CameraEventType.PINCH]):e===we.LEFT_RIGHT&&(this._viewer.scene.screenSpaceCameraController.tiltEventTypes=[i.Cesium.CameraEventType.RIGHT_DRAG,i.Cesium.CameraEventType.PINCH,{eventType:i.Cesium.CameraEventType.LEFT_DRAG,modifier:i.Cesium.KeyboardEventModifier.CTRL},{eventType:i.Cesium.CameraEventType.RIGHT_DRAG,modifier:i.Cesium.KeyboardEventModifier.CTRL}],this._viewer.scene.screenSpaceCameraController.zoomEventTypes=[i.Cesium.CameraEventType.WHEEL,i.Cesium.CameraEventType.PINCH])}},$s=Qs;var yd={},eo=yd;var to=class{constructor(){this._viewer=void 0,this._enable=!1,this._wrapper=void 0,this._ready=!1}set enable(e){this._enable!==e&&(this._enable=e,this._state=this._enable?d.ENABLED:d.DISABLED,this._enableHook&&this._enableHook())}get enable(){return this._enable}get state(){return this._state}_mountContent(){}_bindEvent(){}_unbindEvent(){}_enableHook(){!this._ready&&this._mountContent(),this._enable?(!this._wrapper.parentNode&&this._viewer.widgetContainer.appendChild(this._wrapper),this._bindEvent()):(this._unbindEvent(),this._wrapper.parentNode&&this._viewer.widgetContainer.removeChild(this._wrapper))}_updateWindowCoord(e){}_installHook(){}_getViewerOffset(){return this._viewer?this._viewer.getOffset():{x:0,y:0}}install(e){this._viewer=e,this._installHook&&this._installHook(),this._state=d.INSTALLED}setWrapper(e){return this}setContent(e){if(e&&typeof e=="string")this._wrapper.innerHTML=e;else if(e&&e instanceof Element){for(;this._wrapper.hasChildNodes();)this._wrapper.removeChild(this._wrapper.firstChild);this._wrapper.appendChild(e)}return this}hide(){this._wrapper&&(this._wrapper.style.cssText=`
15768
+ var GM=(()=>{var pg=Object.create;var nt=Object.defineProperty;var dg=Object.getOwnPropertyDescriptor;var mg=Object.getOwnPropertyNames;var ug=Object.getPrototypeOf,_g=Object.prototype.hasOwnProperty;var fg=(a,e,t)=>e in a?nt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var P=(a,e)=>()=>(e||a((e={exports:{}}).exports,e),e.exports),gg=(a,e)=>{for(var t in e)nt(a,t,{get:e[t],enumerable:!0})},zh=(a,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of mg(e))!_g.call(a,s)&&s!==t&&nt(a,s,{get:()=>e[s],enumerable:!(r=dg(e,s))||r.enumerable});return a};var Fh=(a,e,t)=>(t=a!=null?pg(ug(a)):{},zh(e||!a||!a.__esModule?nt(t,"default",{value:a,enumerable:!0}):t,a)),yg=a=>zh(nt({},"__esModule",{value:!0}),a);var qi=(a,e,t)=>(fg(a,typeof e!="symbol"?e+"":e,t),t);var Gh=P((Eb,Wh)=>{Wh.exports=GM_Common});var $h=P((iL,Qh)=>{function Dg(){this.__data__=[],this.size=0}Qh.exports=Dg});var Fs=P((rL,ec)=>{function Lg(a,e){return a===e||a!==a&&e!==e}ec.exports=Lg});var gt=P((sL,tc)=>{var Rg=Fs();function Og(a,e){for(var t=a.length;t--;)if(Rg(a[t][0],e))return t;return-1}tc.exports=Og});var rc=P((oL,ic)=>{var kg=gt(),zg=Array.prototype,Fg=zg.splice;function Hg(a){var e=this.__data__,t=kg(e,a);if(t<0)return!1;var r=e.length-1;return t==r?e.pop():Fg.call(e,t,1),--this.size,!0}ic.exports=Hg});var oc=P((aL,sc)=>{var Ng=gt();function Wg(a){var e=this.__data__,t=Ng(e,a);return t<0?void 0:e[t][1]}sc.exports=Wg});var nc=P((nL,ac)=>{var Gg=gt();function Ug(a){return Gg(this.__data__,a)>-1}ac.exports=Ug});var hc=P((lL,lc)=>{var Bg=gt();function Vg(a,e){var t=this.__data__,r=Bg(t,a);return r<0?(++this.size,t.push([a,e])):t[r][1]=e,this}lc.exports=Vg});var yt=P((hL,cc)=>{var jg=$h(),qg=rc(),Yg=oc(),Zg=nc(),Xg=hc();function Be(a){var e=-1,t=a==null?0:a.length;for(this.clear();++e<t;){var r=a[e];this.set(r[0],r[1])}}Be.prototype.clear=jg;Be.prototype.delete=qg;Be.prototype.get=Yg;Be.prototype.has=Zg;Be.prototype.set=Xg;cc.exports=Be});var dc=P((cL,pc)=>{var Jg=yt();function Kg(){this.__data__=new Jg,this.size=0}pc.exports=Kg});var uc=P((pL,mc)=>{function Qg(a){var e=this.__data__,t=e.delete(a);return this.size=e.size,t}mc.exports=Qg});var fc=P((dL,_c)=>{function $g(a){return this.__data__.get(a)}_c.exports=$g});var yc=P((mL,gc)=>{function ey(a){return this.__data__.has(a)}gc.exports=ey});var Hs=P((uL,vc)=>{var ty=typeof global=="object"&&global&&global.Object===Object&&global;vc.exports=ty});var _e=P((_L,wc)=>{var iy=Hs(),ry=typeof self=="object"&&self&&self.Object===Object&&self,sy=iy||ry||Function("return this")();wc.exports=sy});var qt=P((fL,Cc)=>{var oy=_e(),ay=oy.Symbol;Cc.exports=ay});var Pc=P((gL,Ec)=>{var Tc=qt(),xc=Object.prototype,ny=xc.hasOwnProperty,ly=xc.toString,vt=Tc?Tc.toStringTag:void 0;function hy(a){var e=ny.call(a,vt),t=a[vt];try{a[vt]=void 0;var r=!0}catch{}var s=ly.call(a);return r&&(e?a[vt]=t:delete a[vt]),s}Ec.exports=hy});var Sc=P((yL,bc)=>{var cy=Object.prototype,py=cy.toString;function dy(a){return py.call(a)}bc.exports=dy});var wt=P((vL,Ic)=>{var Ac=qt(),my=Pc(),uy=Sc(),_y="[object Null]",fy="[object Undefined]",Mc=Ac?Ac.toStringTag:void 0;function gy(a){return a==null?a===void 0?fy:_y:Mc&&Mc in Object(a)?my(a):uy(a)}Ic.exports=gy});var Ve=P((wL,Dc)=>{function yy(a){var e=typeof a;return a!=null&&(e=="object"||e=="function")}Dc.exports=yy});var Ns=P((CL,Lc)=>{var vy=wt(),wy=Ve(),Cy="[object AsyncFunction]",Ty="[object Function]",xy="[object GeneratorFunction]",Ey="[object Proxy]";function Py(a){if(!wy(a))return!1;var e=vy(a);return e==Ty||e==xy||e==Cy||e==Ey}Lc.exports=Py});var Oc=P((TL,Rc)=>{var by=_e(),Sy=by["__core-js_shared__"];Rc.exports=Sy});var Fc=P((xL,zc)=>{var Ws=Oc(),kc=function(){var a=/[^.]+$/.exec(Ws&&Ws.keys&&Ws.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}();function Ay(a){return!!kc&&kc in a}zc.exports=Ay});var Gs=P((EL,Hc)=>{var My=Function.prototype,Iy=My.toString;function Dy(a){if(a!=null){try{return Iy.call(a)}catch{}try{return a+""}catch{}}return""}Hc.exports=Dy});var Wc=P((PL,Nc)=>{var Ly=Ns(),Ry=Fc(),Oy=Ve(),ky=Gs(),zy=/[\\^$.*+?()[\]{}|]/g,Fy=/^\[object .+?Constructor\]$/,Hy=Function.prototype,Ny=Object.prototype,Wy=Hy.toString,Gy=Ny.hasOwnProperty,Uy=RegExp("^"+Wy.call(Gy).replace(zy,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function By(a){if(!Oy(a)||Ry(a))return!1;var e=Ly(a)?Uy:Fy;return e.test(ky(a))}Nc.exports=By});var Uc=P((bL,Gc)=>{function Vy(a,e){return a==null?void 0:a[e]}Gc.exports=Vy});var Re=P((SL,Bc)=>{var jy=Wc(),qy=Uc();function Yy(a,e){var t=qy(a,e);return jy(t)?t:void 0}Bc.exports=Yy});var Yt=P((AL,Vc)=>{var Zy=Re(),Xy=_e(),Jy=Zy(Xy,"Map");Vc.exports=Jy});var Ct=P((ML,jc)=>{var Ky=Re(),Qy=Ky(Object,"create");jc.exports=Qy});var Zc=P((IL,Yc)=>{var qc=Ct();function $y(){this.__data__=qc?qc(null):{},this.size=0}Yc.exports=$y});var Jc=P((DL,Xc)=>{function e0(a){var e=this.has(a)&&delete this.__data__[a];return this.size-=e?1:0,e}Xc.exports=e0});var Qc=P((LL,Kc)=>{var t0=Ct(),i0="__lodash_hash_undefined__",r0=Object.prototype,s0=r0.hasOwnProperty;function o0(a){var e=this.__data__;if(t0){var t=e[a];return t===i0?void 0:t}return s0.call(e,a)?e[a]:void 0}Kc.exports=o0});var ep=P((RL,$c)=>{var a0=Ct(),n0=Object.prototype,l0=n0.hasOwnProperty;function h0(a){var e=this.__data__;return a0?e[a]!==void 0:l0.call(e,a)}$c.exports=h0});var ip=P((OL,tp)=>{var c0=Ct(),p0="__lodash_hash_undefined__";function d0(a,e){var t=this.__data__;return this.size+=this.has(a)?0:1,t[a]=c0&&e===void 0?p0:e,this}tp.exports=d0});var sp=P((kL,rp)=>{var m0=Zc(),u0=Jc(),_0=Qc(),f0=ep(),g0=ip();function je(a){var e=-1,t=a==null?0:a.length;for(this.clear();++e<t;){var r=a[e];this.set(r[0],r[1])}}je.prototype.clear=m0;je.prototype.delete=u0;je.prototype.get=_0;je.prototype.has=f0;je.prototype.set=g0;rp.exports=je});var np=P((zL,ap)=>{var op=sp(),y0=yt(),v0=Yt();function w0(){this.size=0,this.__data__={hash:new op,map:new(v0||y0),string:new op}}ap.exports=w0});var hp=P((FL,lp)=>{function C0(a){var e=typeof a;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?a!=="__proto__":a===null}lp.exports=C0});var Tt=P((HL,cp)=>{var T0=hp();function x0(a,e){var t=a.__data__;return T0(e)?t[typeof e=="string"?"string":"hash"]:t.map}cp.exports=x0});var dp=P((NL,pp)=>{var E0=Tt();function P0(a){var e=E0(this,a).delete(a);return this.size-=e?1:0,e}pp.exports=P0});var up=P((WL,mp)=>{var b0=Tt();function S0(a){return b0(this,a).get(a)}mp.exports=S0});var fp=P((GL,_p)=>{var A0=Tt();function M0(a){return A0(this,a).has(a)}_p.exports=M0});var yp=P((UL,gp)=>{var I0=Tt();function D0(a,e){var t=I0(this,a),r=t.size;return t.set(a,e),this.size+=t.size==r?0:1,this}gp.exports=D0});var wp=P((BL,vp)=>{var L0=np(),R0=dp(),O0=up(),k0=fp(),z0=yp();function qe(a){var e=-1,t=a==null?0:a.length;for(this.clear();++e<t;){var r=a[e];this.set(r[0],r[1])}}qe.prototype.clear=L0;qe.prototype.delete=R0;qe.prototype.get=O0;qe.prototype.has=k0;qe.prototype.set=z0;vp.exports=qe});var Tp=P((VL,Cp)=>{var F0=yt(),H0=Yt(),N0=wp(),W0=200;function G0(a,e){var t=this.__data__;if(t instanceof F0){var r=t.__data__;if(!H0||r.length<W0-1)return r.push([a,e]),this.size=++t.size,this;t=this.__data__=new N0(r)}return t.set(a,e),this.size=t.size,this}Cp.exports=G0});var Ep=P((jL,xp)=>{var U0=yt(),B0=dc(),V0=uc(),j0=fc(),q0=yc(),Y0=Tp();function Ye(a){var e=this.__data__=new U0(a);this.size=e.size}Ye.prototype.clear=B0;Ye.prototype.delete=V0;Ye.prototype.get=j0;Ye.prototype.has=q0;Ye.prototype.set=Y0;xp.exports=Ye});var bp=P((qL,Pp)=>{function Z0(a,e){for(var t=-1,r=a==null?0:a.length;++t<r&&e(a[t],t,a)!==!1;);return a}Pp.exports=Z0});var Ap=P((YL,Sp)=>{var X0=Re(),J0=function(){try{var a=X0(Object,"defineProperty");return a({},"",{}),a}catch{}}();Sp.exports=J0});var Us=P((ZL,Ip)=>{var Mp=Ap();function K0(a,e,t){e=="__proto__"&&Mp?Mp(a,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):a[e]=t}Ip.exports=K0});var Bs=P((XL,Dp)=>{var Q0=Us(),$0=Fs(),ev=Object.prototype,tv=ev.hasOwnProperty;function iv(a,e,t){var r=a[e];(!(tv.call(a,e)&&$0(r,t))||t===void 0&&!(e in a))&&Q0(a,e,t)}Dp.exports=iv});var xt=P((JL,Lp)=>{var rv=Bs(),sv=Us();function ov(a,e,t,r){var s=!t;t||(t={});for(var o=-1,n=e.length;++o<n;){var l=e[o],h=r?r(t[l],a[l],l,t,a):void 0;h===void 0&&(h=a[l]),s?sv(t,l,h):rv(t,l,h)}return t}Lp.exports=ov});var Op=P((KL,Rp)=>{function av(a,e){for(var t=-1,r=Array(a);++t<a;)r[t]=e(t);return r}Rp.exports=av});var Ze=P((QL,kp)=>{function nv(a){return a!=null&&typeof a=="object"}kp.exports=nv});var Fp=P(($L,zp)=>{var lv=wt(),hv=Ze(),cv="[object Arguments]";function pv(a){return hv(a)&&lv(a)==cv}zp.exports=pv});var Gp=P((e3,Wp)=>{var Hp=Fp(),dv=Ze(),Np=Object.prototype,mv=Np.hasOwnProperty,uv=Np.propertyIsEnumerable,_v=Hp(function(){return arguments}())?Hp:function(a){return dv(a)&&mv.call(a,"callee")&&!uv.call(a,"callee")};Wp.exports=_v});var Zt=P((t3,Up)=>{var fv=Array.isArray;Up.exports=fv});var Vp=P((i3,Bp)=>{function gv(){return!1}Bp.exports=gv});var Vs=P((Et,Xe)=>{var yv=_e(),vv=Vp(),Yp=typeof Et=="object"&&Et&&!Et.nodeType&&Et,jp=Yp&&typeof Xe=="object"&&Xe&&!Xe.nodeType&&Xe,wv=jp&&jp.exports===Yp,qp=wv?yv.Buffer:void 0,Cv=qp?qp.isBuffer:void 0,Tv=Cv||vv;Xe.exports=Tv});var Xp=P((r3,Zp)=>{var xv=9007199254740991,Ev=/^(?:0|[1-9]\d*)$/;function Pv(a,e){var t=typeof a;return e=e==null?xv:e,!!e&&(t=="number"||t!="symbol"&&Ev.test(a))&&a>-1&&a%1==0&&a<e}Zp.exports=Pv});var js=P((s3,Jp)=>{var bv=9007199254740991;function Sv(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=bv}Jp.exports=Sv});var Qp=P((o3,Kp)=>{var Av=wt(),Mv=js(),Iv=Ze(),Dv="[object Arguments]",Lv="[object Array]",Rv="[object Boolean]",Ov="[object Date]",kv="[object Error]",zv="[object Function]",Fv="[object Map]",Hv="[object Number]",Nv="[object Object]",Wv="[object RegExp]",Gv="[object Set]",Uv="[object String]",Bv="[object WeakMap]",Vv="[object ArrayBuffer]",jv="[object DataView]",qv="[object Float32Array]",Yv="[object Float64Array]",Zv="[object Int8Array]",Xv="[object Int16Array]",Jv="[object Int32Array]",Kv="[object Uint8Array]",Qv="[object Uint8ClampedArray]",$v="[object Uint16Array]",ew="[object Uint32Array]",G={};G[qv]=G[Yv]=G[Zv]=G[Xv]=G[Jv]=G[Kv]=G[Qv]=G[$v]=G[ew]=!0;G[Dv]=G[Lv]=G[Vv]=G[Rv]=G[jv]=G[Ov]=G[kv]=G[zv]=G[Fv]=G[Hv]=G[Nv]=G[Wv]=G[Gv]=G[Uv]=G[Bv]=!1;function tw(a){return Iv(a)&&Mv(a.length)&&!!G[Av(a)]}Kp.exports=tw});var Xt=P((a3,$p)=>{function iw(a){return function(e){return a(e)}}$p.exports=iw});var Jt=P((Pt,Je)=>{var rw=Hs(),ed=typeof Pt=="object"&&Pt&&!Pt.nodeType&&Pt,bt=ed&&typeof Je=="object"&&Je&&!Je.nodeType&&Je,sw=bt&&bt.exports===ed,qs=sw&&rw.process,ow=function(){try{var a=bt&&bt.require&&bt.require("util").types;return a||qs&&qs.binding&&qs.binding("util")}catch{}}();Je.exports=ow});var sd=P((n3,rd)=>{var aw=Qp(),nw=Xt(),td=Jt(),id=td&&td.isTypedArray,lw=id?nw(id):aw;rd.exports=lw});var Ys=P((l3,od)=>{var hw=Op(),cw=Gp(),pw=Zt(),dw=Vs(),mw=Xp(),uw=sd(),_w=Object.prototype,fw=_w.hasOwnProperty;function gw(a,e){var t=pw(a),r=!t&&cw(a),s=!t&&!r&&dw(a),o=!t&&!r&&!s&&uw(a),n=t||r||s||o,l=n?hw(a.length,String):[],h=l.length;for(var c in a)(e||fw.call(a,c))&&!(n&&(c=="length"||s&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||mw(c,h)))&&l.push(c);return l}od.exports=gw});var Kt=P((h3,ad)=>{var yw=Object.prototype;function vw(a){var e=a&&a.constructor,t=typeof e=="function"&&e.prototype||yw;return a===t}ad.exports=vw});var Zs=P((c3,nd)=>{function ww(a,e){return function(t){return a(e(t))}}nd.exports=ww});var hd=P((p3,ld)=>{var Cw=Zs(),Tw=Cw(Object.keys,Object);ld.exports=Tw});var pd=P((d3,cd)=>{var xw=Kt(),Ew=hd(),Pw=Object.prototype,bw=Pw.hasOwnProperty;function Sw(a){if(!xw(a))return Ew(a);var e=[];for(var t in Object(a))bw.call(a,t)&&t!="constructor"&&e.push(t);return e}cd.exports=Sw});var Xs=P((m3,dd)=>{var Aw=Ns(),Mw=js();function Iw(a){return a!=null&&Mw(a.length)&&!Aw(a)}dd.exports=Iw});var Qt=P((u3,md)=>{var Dw=Ys(),Lw=pd(),Rw=Xs();function Ow(a){return Rw(a)?Dw(a):Lw(a)}md.exports=Ow});var _d=P((_3,ud)=>{var kw=xt(),zw=Qt();function Fw(a,e){return a&&kw(e,zw(e),a)}ud.exports=Fw});var gd=P((f3,fd)=>{function Hw(a){var e=[];if(a!=null)for(var t in Object(a))e.push(t);return e}fd.exports=Hw});var vd=P((g3,yd)=>{var Nw=Ve(),Ww=Kt(),Gw=gd(),Uw=Object.prototype,Bw=Uw.hasOwnProperty;function Vw(a){if(!Nw(a))return Gw(a);var e=Ww(a),t=[];for(var r in a)r=="constructor"&&(e||!Bw.call(a,r))||t.push(r);return t}yd.exports=Vw});var $t=P((y3,wd)=>{var jw=Ys(),qw=vd(),Yw=Xs();function Zw(a){return Yw(a)?jw(a,!0):qw(a)}wd.exports=Zw});var Td=P((v3,Cd)=>{var Xw=xt(),Jw=$t();function Kw(a,e){return a&&Xw(e,Jw(e),a)}Cd.exports=Kw});var Sd=P((St,Ke)=>{var Qw=_e(),bd=typeof St=="object"&&St&&!St.nodeType&&St,xd=bd&&typeof Ke=="object"&&Ke&&!Ke.nodeType&&Ke,$w=xd&&xd.exports===bd,Ed=$w?Qw.Buffer:void 0,Pd=Ed?Ed.allocUnsafe:void 0;function eC(a,e){if(e)return a.slice();var t=a.length,r=Pd?Pd(t):new a.constructor(t);return a.copy(r),r}Ke.exports=eC});var Md=P((w3,Ad)=>{function tC(a,e){var t=-1,r=a.length;for(e||(e=Array(r));++t<r;)e[t]=a[t];return e}Ad.exports=tC});var Dd=P((C3,Id)=>{function iC(a,e){for(var t=-1,r=a==null?0:a.length,s=0,o=[];++t<r;){var n=a[t];e(n,t,a)&&(o[s++]=n)}return o}Id.exports=iC});var Js=P((T3,Ld)=>{function rC(){return[]}Ld.exports=rC});var ei=P((x3,Od)=>{var sC=Dd(),oC=Js(),aC=Object.prototype,nC=aC.propertyIsEnumerable,Rd=Object.getOwnPropertySymbols,lC=Rd?function(a){return a==null?[]:(a=Object(a),sC(Rd(a),function(e){return nC.call(a,e)}))}:oC;Od.exports=lC});var zd=P((E3,kd)=>{var hC=xt(),cC=ei();function pC(a,e){return hC(a,cC(a),e)}kd.exports=pC});var Ks=P((P3,Fd)=>{function dC(a,e){for(var t=-1,r=e.length,s=a.length;++t<r;)a[s+t]=e[t];return a}Fd.exports=dC});var Qs=P((b3,Hd)=>{var mC=Zs(),uC=mC(Object.getPrototypeOf,Object);Hd.exports=uC});var $s=P((S3,Nd)=>{var _C=Ks(),fC=Qs(),gC=ei(),yC=Js(),vC=Object.getOwnPropertySymbols,wC=vC?function(a){for(var e=[];a;)_C(e,gC(a)),a=fC(a);return e}:yC;Nd.exports=wC});var Gd=P((A3,Wd)=>{var CC=xt(),TC=$s();function xC(a,e){return CC(a,TC(a),e)}Wd.exports=xC});var eo=P((M3,Ud)=>{var EC=Ks(),PC=Zt();function bC(a,e,t){var r=e(a);return PC(a)?r:EC(r,t(a))}Ud.exports=bC});var Vd=P((I3,Bd)=>{var SC=eo(),AC=ei(),MC=Qt();function IC(a){return SC(a,MC,AC)}Bd.exports=IC});var qd=P((D3,jd)=>{var DC=eo(),LC=$s(),RC=$t();function OC(a){return DC(a,RC,LC)}jd.exports=OC});var Zd=P((L3,Yd)=>{var kC=Re(),zC=_e(),FC=kC(zC,"DataView");Yd.exports=FC});var Jd=P((R3,Xd)=>{var HC=Re(),NC=_e(),WC=HC(NC,"Promise");Xd.exports=WC});var Qd=P((O3,Kd)=>{var GC=Re(),UC=_e(),BC=GC(UC,"Set");Kd.exports=BC});var em=P((k3,$d)=>{var VC=Re(),jC=_e(),qC=VC(jC,"WeakMap");$d.exports=qC});var ti=P((z3,nm)=>{var to=Zd(),io=Yt(),ro=Jd(),so=Qd(),oo=em(),am=wt(),Qe=Gs(),tm="[object Map]",YC="[object Object]",im="[object Promise]",rm="[object Set]",sm="[object WeakMap]",om="[object DataView]",ZC=Qe(to),XC=Qe(io),JC=Qe(ro),KC=Qe(so),QC=Qe(oo),He=am;(to&&He(new to(new ArrayBuffer(1)))!=om||io&&He(new io)!=tm||ro&&He(ro.resolve())!=im||so&&He(new so)!=rm||oo&&He(new oo)!=sm)&&(He=function(a){var e=am(a),t=e==YC?a.constructor:void 0,r=t?Qe(t):"";if(r)switch(r){case ZC:return om;case XC:return tm;case JC:return im;case KC:return rm;case QC:return sm}return e});nm.exports=He});var hm=P((F3,lm)=>{var $C=Object.prototype,eT=$C.hasOwnProperty;function tT(a){var e=a.length,t=new a.constructor(e);return e&&typeof a[0]=="string"&&eT.call(a,"index")&&(t.index=a.index,t.input=a.input),t}lm.exports=tT});var pm=P((H3,cm)=>{var iT=_e(),rT=iT.Uint8Array;cm.exports=rT});var ii=P((N3,mm)=>{var dm=pm();function sT(a){var e=new a.constructor(a.byteLength);return new dm(e).set(new dm(a)),e}mm.exports=sT});var _m=P((W3,um)=>{var oT=ii();function aT(a,e){var t=e?oT(a.buffer):a.buffer;return new a.constructor(t,a.byteOffset,a.byteLength)}um.exports=aT});var gm=P((G3,fm)=>{var nT=/\w*$/;function lT(a){var e=new a.constructor(a.source,nT.exec(a));return e.lastIndex=a.lastIndex,e}fm.exports=lT});var Tm=P((U3,Cm)=>{var ym=qt(),vm=ym?ym.prototype:void 0,wm=vm?vm.valueOf:void 0;function hT(a){return wm?Object(wm.call(a)):{}}Cm.exports=hT});var Em=P((B3,xm)=>{var cT=ii();function pT(a,e){var t=e?cT(a.buffer):a.buffer;return new a.constructor(t,a.byteOffset,a.length)}xm.exports=pT});var bm=P((V3,Pm)=>{var dT=ii(),mT=_m(),uT=gm(),_T=Tm(),fT=Em(),gT="[object Boolean]",yT="[object Date]",vT="[object Map]",wT="[object Number]",CT="[object RegExp]",TT="[object Set]",xT="[object String]",ET="[object Symbol]",PT="[object ArrayBuffer]",bT="[object DataView]",ST="[object Float32Array]",AT="[object Float64Array]",MT="[object Int8Array]",IT="[object Int16Array]",DT="[object Int32Array]",LT="[object Uint8Array]",RT="[object Uint8ClampedArray]",OT="[object Uint16Array]",kT="[object Uint32Array]";function zT(a,e,t){var r=a.constructor;switch(e){case PT:return dT(a);case gT:case yT:return new r(+a);case bT:return mT(a,t);case ST:case AT:case MT:case IT:case DT:case LT:case RT:case OT:case kT:return fT(a,t);case vT:return new r;case wT:case xT:return new r(a);case CT:return uT(a);case TT:return new r;case ET:return _T(a)}}Pm.exports=zT});var Mm=P((j3,Am)=>{var FT=Ve(),Sm=Object.create,HT=function(){function a(){}return function(e){if(!FT(e))return{};if(Sm)return Sm(e);a.prototype=e;var t=new a;return a.prototype=void 0,t}}();Am.exports=HT});var Dm=P((q3,Im)=>{var NT=Mm(),WT=Qs(),GT=Kt();function UT(a){return typeof a.constructor=="function"&&!GT(a)?NT(WT(a)):{}}Im.exports=UT});var Rm=P((Y3,Lm)=>{var BT=ti(),VT=Ze(),jT="[object Map]";function qT(a){return VT(a)&&BT(a)==jT}Lm.exports=qT});var Fm=P((Z3,zm)=>{var YT=Rm(),ZT=Xt(),Om=Jt(),km=Om&&Om.isMap,XT=km?ZT(km):YT;zm.exports=XT});var Nm=P((X3,Hm)=>{var JT=ti(),KT=Ze(),QT="[object Set]";function $T(a){return KT(a)&&JT(a)==QT}Hm.exports=$T});var Bm=P((J3,Um)=>{var ex=Nm(),tx=Xt(),Wm=Jt(),Gm=Wm&&Wm.isSet,ix=Gm?tx(Gm):ex;Um.exports=ix});var Zm=P((K3,Ym)=>{var rx=Ep(),sx=bp(),ox=Bs(),ax=_d(),nx=Td(),lx=Sd(),hx=Md(),cx=zd(),px=Gd(),dx=Vd(),mx=qd(),ux=ti(),_x=hm(),fx=bm(),gx=Dm(),yx=Zt(),vx=Vs(),wx=Fm(),Cx=Ve(),Tx=Bm(),xx=Qt(),Ex=$t(),Px=1,bx=2,Sx=4,Vm="[object Arguments]",Ax="[object Array]",Mx="[object Boolean]",Ix="[object Date]",Dx="[object Error]",jm="[object Function]",Lx="[object GeneratorFunction]",Rx="[object Map]",Ox="[object Number]",qm="[object Object]",kx="[object RegExp]",zx="[object Set]",Fx="[object String]",Hx="[object Symbol]",Nx="[object WeakMap]",Wx="[object ArrayBuffer]",Gx="[object DataView]",Ux="[object Float32Array]",Bx="[object Float64Array]",Vx="[object Int8Array]",jx="[object Int16Array]",qx="[object Int32Array]",Yx="[object Uint8Array]",Zx="[object Uint8ClampedArray]",Xx="[object Uint16Array]",Jx="[object Uint32Array]",W={};W[Vm]=W[Ax]=W[Wx]=W[Gx]=W[Mx]=W[Ix]=W[Ux]=W[Bx]=W[Vx]=W[jx]=W[qx]=W[Rx]=W[Ox]=W[qm]=W[kx]=W[zx]=W[Fx]=W[Hx]=W[Yx]=W[Zx]=W[Xx]=W[Jx]=!0;W[Dx]=W[jm]=W[Nx]=!1;function ri(a,e,t,r,s,o){var n,l=e&Px,h=e&bx,c=e&Sx;if(t&&(n=s?t(a,r,s,o):t(a)),n!==void 0)return n;if(!Cx(a))return a;var p=yx(a);if(p){if(n=_x(a),!l)return hx(a,n)}else{var _=ux(a),w=_==jm||_==Lx;if(vx(a))return lx(a,l);if(_==qm||_==Vm||w&&!s){if(n=h||w?{}:gx(a),!l)return h?px(a,nx(n,a)):cx(a,ax(n,a))}else{if(!W[_])return s?a:{};n=fx(a,_,l)}}o||(o=new rx);var y=o.get(a);if(y)return y;o.set(a,n),Tx(a)?a.forEach(function(T){n.add(ri(T,e,t,T,a,o))}):wx(a)&&a.forEach(function(T,b){n.set(b,ri(T,e,t,b,a,o))});var d=c?h?mx:dx:h?Ex:xx,E=p?void 0:d(a);return sx(E||a,function(T,b){E&&(b=T,T=a[b]),ox(n,b,ri(T,e,t,b,a,o))}),n}Ym.exports=ri});var Jm=P((Q3,Xm)=>{var Kx=Zm(),Qx=1,$x=4;function e1(a){return Kx(a,Qx|$x)}Xm.exports=e1});var fb={};gg(fb,{Analysis:()=>Th,AnalysisType:()=>ot,AnimationType:()=>Y,AroundPoint:()=>vl,AroundView:()=>gl,AttackArrow:()=>Fe,Billboard:()=>Ce,BillboardPrimitive:()=>_t,BounceBillboardPrimitive:()=>ps,BounceLabelPrimitive:()=>us,Box:()=>_o,CallbackProperty:()=>GP,Cartesian2:()=>SP,Cartesian3:()=>AP,ChartLayer:()=>la,Circle:()=>At,CircleBlurMaterialProperty:()=>fn,CircleDiffuseMaterialProperty:()=>gn,CircleFadeMaterialProperty:()=>yn,CirclePulseMaterialProperty:()=>vn,CircleScan:()=>Cl,CircleScanMaterialProperty:()=>wn,CircleSpiralMaterialProperty:()=>Cn,CircleVaryMaterialProperty:()=>Tn,CircleWaveMaterialProperty:()=>xn,ClassificationType:()=>UP,ClippingPlane:()=>lb,ClippingPlaneCollection:()=>hb,ClippingPolygon:()=>cb,ClippingPolygonCollection:()=>pb,CloudPrimitive:()=>fs,ClusterLayer:()=>Ar,Color:()=>OP,ColorMaterialProperty:()=>qP,CoordTransform:()=>me,Corridor:()=>wo,CustomBillboard:()=>Hr,CustomGeographicTilingScheme:()=>tn,CustomLabel:()=>Wr,CustomMercatorTilingScheme:()=>sn,CustomShader:()=>tb,CustomShaderMode:()=>$P,CustomShaderTranslucencyMode:()=>eb,Cylinder:()=>To,CzmlLayer:()=>Ir,DiffuseWallPrimitive:()=>ys,DivIcon:()=>Qr,DomUtil:()=>A,DoubleArrow:()=>pt,DynamicBillboard:()=>Br,DynamicLayer:()=>Lr,DynamicModel:()=>jr,Effect:()=>Df,ElecEllipsoidPrimitive:()=>ws,Ellipse:()=>Eo,Ellipsoid:()=>rb,EllipsoidElectricMaterialProperty:()=>En,EllipsoidTrailMaterialProperty:()=>Pn,FeatureGridLayer:()=>kr,FineArrow:()=>dt,FlowLinePrimitive:()=>Ts,Flying:()=>xl,GatheringPlace:()=>mt,GeoJsonLayer:()=>Lt,GeoTools:()=>Ih,GeographicTilingScheme:()=>VP,GlobeRotate:()=>Pl,GpxLayer:()=>Uo,GraticuleLayer:()=>Vo,GroundPrimitiveLayer:()=>qo,GroundSkyBox:()=>Pa,HeatMapLayer:()=>r_,HeightReference:()=>HP,HorizontalOrigin:()=>NP,HtmlLayer:()=>Zo,I3S:()=>ts,I3SLayer:()=>Jo,ImageMaterialProperty:()=>YP,ImageryLayerFactory:()=>$a,ImageryType:()=>O,JulianDate:()=>FP,KeyboardRoaming:()=>Ul,KmlLayer:()=>Qo,Label:()=>Mt,LabelLayer:()=>ea,LabelPrimitive:()=>ft,Layer:()=>S,LayerGroup:()=>Tr,LayerType:()=>Ue,LightCylinderPrimitive:()=>Es,Material:()=>DP,Math:()=>Jr,Matrix3:()=>MP,Matrix4:()=>IP,Measure:()=>uh,MeasureType:()=>ae,Model:()=>ze,ModelAnimationLoop:()=>nb,ModelEventType:()=>Ie,ModelPrimitive:()=>bs,MouseEventType:()=>R,MouseMode:()=>Ee,Overlay:()=>g,OverlayType:()=>F,P:()=>f,Parse:()=>f,Plane:()=>Mo,Plot:()=>Cf,PlotAnalysis:()=>Ah,PlotAnalysisType:()=>zt,Point:()=>It,PointPrimitive:()=>As,Polygon:()=>Te,Polyline:()=>xe,PolylineArrowMaterialProperty:()=>KP,PolylineDashMaterialProperty:()=>ZP,PolylineFlickerMaterialProperty:()=>bn,PolylineFlowMaterialProperty:()=>Sn,PolylineGlowMaterialProperty:()=>XP,PolylineImageTrailMaterialProperty:()=>An,PolylineLightingMaterialProperty:()=>Mn,PolylineLightingTrailMaterialProperty:()=>In,PolylineOutlineMaterialProperty:()=>JP,PolylinePrimitive:()=>Is,PolylineTrailMaterialProperty:()=>Dn,PolylineVolume:()=>Oo,Position:()=>Z,PrimitiveLayer:()=>ia,RadarLineMaterialProperty:()=>Ln,RadarScan:()=>Sl,RadarSweepMaterialProperty:()=>Rn,RadarWaveMaterialProperty:()=>On,RasterTileLayer:()=>sa,Rect:()=>Dt,Rectangle:()=>kP,ReflectionWaterPrimitive:()=>po,Resource:()=>sb,RoamingController:()=>Vl,RoamingPath:()=>ql,ScanCirclePrimitive:()=>Ls,SceneEventType:()=>D,SceneMode:()=>LP,ShadowMode:()=>zP,Shp2JsonLayer:()=>Wo,SkyBox:()=>RP,Sphere:()=>bo,T:()=>u,TailedAttackArrow:()=>ut,TerrainFactory:()=>an,TerrainType:()=>Se,TileSetEventType:()=>J,Tileset:()=>rs,TilesetLayer:()=>aa,TilesetStyle:()=>BP,Track:()=>Jl,TrackController:()=>Zl,TrackViewMode:()=>Ae,TrailLinePrimitive:()=>Os,Transform:()=>u,UniformType:()=>ib,Util:()=>v,VERSION:()=>_b,VectorLayer:()=>ue,VerticalOrigin:()=>WP,VideoPrimitive:()=>zs,VideoProjectionPrimitive:()=>no,Viewer:()=>Nu,VolumRadar:()=>yo,Wall:()=>Fo,WallImageTrailMaterialProperty:()=>kn,WallLineTrailMaterialProperty:()=>zn,WallTrailMaterialProperty:()=>Fn,WaterMaterialProperty:()=>Hn,WaterPrimitive:()=>ho,Weather:()=>Wf,WindLayer:()=>a_,config:()=>mb,createElevationBandMaterial:()=>ab,createGooglePhotorealistic3DTileset:()=>ob,ebMercatorTilingScheme:()=>jP,getLib:()=>se,ready:()=>ub,registerLib:()=>ge,writeTextToCanvas:()=>QP});var Hh={};function ge(a,e){Hh[a]=e}function se(a){return Hh[a]}var Nh={};function Wt(a,e){Nh[a]=e}function Gt(a){return Nh[a]}var vg={},Ue=vg;var i=Fh(Gh(),1);ge("Cesium",i.Cesium);ge("Supercluster",i.Supercluster);var wg="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),Yi=class{static uuid(e="D"){let t=[];t[8]=t[13]=t[18]=t[23]="-",t[14]="4";let r;for(let s=0;s<36;s++)t[s]||(r=0|Math.random()*16,t[s]=wg[s===19?r&3|8:r]);return e+"-"+t.join("")}static merge(e,...t){let r,s,o,n;for(s=0,o=t.length;s<o;s++){n=t[s];for(r in n)e[r]=n[r]}return e}static splitWords(e){return this.trim(e).split(/\s+/)}static setOptions(e,t){e.hasOwnProperty("options")||(e.options=e.options?Object.create(e.options):{});for(let r in t)e.options[r]=t[r];return e.options}static formatNum(e,t){let r=Math.pow(10,t===void 0?6:t);return Math.round(e*r)/r}static trim(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}static emptyImageUrl(){return function(){return"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="}()}static checkPosition(e){return e&&e.hasOwnProperty("_lng")&&e.hasOwnProperty("_lat")&&e.hasOwnProperty("_alt")}static debounce(e,t){let r=null;return function(){r&&clearTimeout(r),r=setTimeout(e,t)}}static throttle(e,t){let r=!0;return function(){if(!r)return!1;r=!1,setTimeout(()=>{e(),r=!0},t)}}static dataURLtoBlob(e){let t=e.split(","),r=t[0].match(/:(.*?);/)[1],s=atob(t[1]),o=s.length,n=new Uint8Array(o);for(;o--;)n[o]=s.charCodeAt(o);return new Blob([n],{type:r})}static isPromise(e){return Promise.resolve(e)==e}},v=Yi;var Zi=class{static get(e){return typeof e=="string"?document.getElementById(e):e}static getStyle(e,t){let r=e.style[t]||e.currentStyle&&e.currentStyle[t];if((!r||r==="auto")&&document.defaultView){let s=document.defaultView.getComputedStyle(e,null);r=s?s[t]:null}return r==="auto"?null:r}static create(e,t,r=null){let s=document.createElement(e);return s.className=t||"",r&&r.appendChild(s),s}static remove(e){let t=e.parentNode;t&&t.removeChild(e)}static empty(e){for(;e.firstChild;)e.removeChild(e.firstChild)}static hasClass(e,t){if(e.classList!==void 0)return e.classList.contains(t);let r=this.getClass(e);return r.length>0&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(r)}static addClass(e,t){if(e.classList!==void 0){let r=v.splitWords(t);for(let s=0,o=r.length;s<o;s++)e.classList.add(r[s])}else if(!this.hasClass(e,t)){let r=this.getClass(e);this.setClass(e,(r?r+" ":"")+t)}}static removeClass(e,t){e.classList!==void 0?e.classList.remove(t):this.setClass(e,v.trim((" "+this.getClass(e)+" ").replace(" "+t+" "," ")))}static setClass(e,t){e.className.baseVal===void 0?e.className=t:e.className.baseVal=t}static getClass(e){return e.correspondingElement&&(e=e.correspondingElement),e.className.baseVal===void 0?e.className:e.className.baseVal}static createSvg(e,t,r,s){let o=document.createElementNS("http://www.w3.org/2000/svg","svg:svg");o.setAttribute("class","svg-path"),o.setAttribute("width",e),o.setAttribute("height",t),o.setAttribute("viewBox",`0 0 ${e} ${t}`);let n=document.createElementNS("http://www.w3.org/2000/svg","path");return n.setAttribute("d",r),o.appendChild(n),s&&s.appendChild(o),o}static parseDom(e,t,r){t=t!=null?t:!1;let s=document.createElement("div");return s.className=r||"",s.innerHTML=e,t?s:s.childNodes}static enterFullscreen(e){e&&(e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen())}static exitFullscreen(){document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()}static createVideo(e,t,r=null){let s=this.create("video",t,r),o=this.create("source","",s);o.setAttribute("src",e),o.setAttribute("type","video/map4");let n=this.create("source","",s);return n.setAttribute("src",e),n.setAttribute("type","video/quicktime"),s}},A=Zi;var Xi=Math.PI*2,Ut=100,Ji=1e-4,Ki=class{static distance(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2))}static wholeDistance(e){let t=0;for(let r=0;r<e.length-1;r++)t+=this.distance(e[r],e[r+1]);return t}static getBaseLength(e){return Math.pow(this.wholeDistance(e),.99)}static mid(e,t){return[(e[0]+t[0])/2,(e[1]+t[1])/2]}static getCircleCenterOfThreePoints(e,t,r){let s=[(e[0]+t[0])/2,(e[1]+t[1])/2],o=[s[0]-e[1]+t[1],s[1]+e[0]-t[0]],n=[(e[0]+r[0])/2,(e[1]+r[1])/2],l=[n[0]-e[1]+r[1],n[1]+e[0]-r[0]];return this.getIntersectPoint(s,o,n,l)}static getIntersectPoint(e,t,r,s){let o,n,l,h;return e[1]===t[1]?(l=(s[0]-r[0])/(s[1]-r[1]),o=l*(e[1]-r[1])+r[0],n=e[1],[o,n]):r[1]===s[1]?(h=(t[0]-e[0])/(t[1]-e[1]),o=h*(r[1]-e[1])+e[0],n=r[1],[o,n]):(h=(t[0]-e[0])/(t[1]-e[1]),l=(s[0]-r[0])/(s[1]-r[1]),n=(h*e[1]-e[0]-l*r[1]+r[0])/(h-l),o=h*n-h*e[1]+e[0],[o,n])}static getAzimuth(e,t){let r,s=Math.asin(Math.abs(t[1]-e[1])/this.distance(e,t));return t[1]>=e[1]&&t[0]>=e[0]?r=s+Math.PI:t[1]>=e[1]&&t[0]<e[0]?r=Xi-s:t[1]<e[1]&&t[0]<e[0]?r=s:t[1]<e[1]&&t[0]>=e[0]&&(r=Math.PI-s),r}static getAngleOfThreePoints(e,t,r){let s=this.getAzimuth(t,e)-this.getAzimuth(t,r);return s<0?s+Xi:s}static isClockWise(e,t,r){return(r[1]-e[1])*(t[0]-e[0])>(t[1]-e[1])*(r[0]-e[0])}static getPointOnLine(e,t,r){let s=t[0]+e*(r[0]-t[0]),o=t[1]+e*(r[1]-t[1]);return[s,o]}static getCubicValue(e,t,r,s,o){e=Math.max(Math.min(e,1),0);let n=1-e,l=e*e,h=l*e,c=n*n,p=c*n,_=p*t[0]+3*c*e*r[0]+3*n*l*s[0]+h*o[0],w=p*t[1]+3*c*e*r[1]+3*n*l*s[1]+h*o[1];return[_,w]}static getThirdPoint(e,t,r,s,o){let n=this.getAzimuth(e,t),l=o?n+r:n-r,h=s*Math.cos(l),c=s*Math.sin(l);return[t[0]+h,t[1]+c]}static getArcPoints(e,t,r,s){let o,n,l=[],h=s-r;h=h<0?h+Xi:h;for(let c=0;c<=Ut;c++){let p=r+h*c/Ut;o=e[0]+t*Math.cos(p),n=e[1]+t*Math.sin(p),l.push([o,n])}return l}static getBisectorNormals(e,t,r,s){let o=this.getNormal(t,r,s),n=Math.sqrt(o[0]*o[0]+o[1]*o[1]),l=o[0]/n,h=o[1]/n,c=this.distance(t,r),p=this.distance(r,s),_,w,y,d,E;return n>Ji?this.isClockWise(t,r,s)?(_=e*c,w=r[0]-_*h,y=r[1]+_*l,E=[w,y],_=e*p,w=r[0]+_*h,y=r[1]-_*l,d=[w,y]):(_=e*c,w=r[0]+_*h,y=r[1]-_*l,E=[w,y],_=e*p,w=r[0]-_*h,y=r[1]+_*l,d=[w,y]):(w=r[0]+e*(t[0]-r[0]),y=r[1]+e*(t[1]-r[1]),E=[w,y],w=r[0]+e*(s[0]-r[0]),y=r[1]+e*(s[1]-r[1]),d=[w,y]),[E,d]}static getNormal(e,t,r){let s=e[0]-t[0],o=e[1]-t[1],n=Math.sqrt(s*s+o*o);s/=n,o/=n;let l=r[0]-t[0],h=r[1]-t[1],c=Math.sqrt(l*l+h*h);l/=c,h/=c;let p=s+l,_=o+h;return[p,_]}static getCurvePoints(e,t){let s=[this.getLeftMostControlPoint(e,t)],o,n,l,h;for(let _=0;_<t.length-2;_++)o=t[_],n=t[_+1],l=t[_+2],h=this.getBisectorNormals(e,o,n,l),s=s.concat(h);let c=this.getRightMostControlPoint(e,t);s.push(c);let p=[];for(let _=0;_<t.length-1;_++){o=t[_],n=t[_+1],p.push(o);for(let w=0;w<Ut;w++){let y=this.getCubicValue(w/Ut,o,s[_*2],s[_*2+1],n);p.push(y)}p.push(n)}return p}static getLeftMostControlPoint(e,t){let r=t[0],s=t[1],o=t[2],l=this.getBisectorNormals(0,r,s,o)[0],h=this.getNormal(r,s,o),c=Math.sqrt(h[0]*h[0]+h[1]*h[1]),p,_;if(c>Ji){let w=this.mid(r,s),y=r[0]-w[0],d=r[1]-w[1],T=2/this.distance(r,s),b=-T*d,M=T*y,N=b*b-M*M,H=2*b*M,B=M*M-b*b,re=l[0]-w[0],de=l[1]-w[1];p=w[0]+N*re+H*de,_=w[1]+H*re+B*de}else p=r[0]+e*(s[0]-r[0]),_=r[1]+e*(s[1]-r[1]);return[p,_]}static getRightMostControlPoint(e,t){let r=t.length,s=t[r-3],o=t[r-2],n=t[r-1],h=this.getBisectorNormals(0,s,o,n)[1],c=this.getNormal(s,o,n),p=Math.sqrt(c[0]*c[0]+c[1]*c[1]),_,w;if(p>Ji){let y=this.mid(o,n),d=n[0]-y[0],E=n[1]-y[1],b=2/this.distance(o,n),M=-b*E,N=b*d,H=M*M-N*N,B=2*M*N,re=N*N-M*M,de=h[0]-y[0],X=h[1]-y[1];_=y[0]+H*de+B*X,w=y[1]+B*de+re*X}else _=n[0]+e*(o[0]-n[0]),w=n[1]+e*(o[1]-n[1]);return[_,w]}static getBezierPoints(e){if(e.length<=2)return e;let t=[],r=e.length-1;for(let s=0;s<=1;s+=.01){let o=0,n=0;for(let l=0;l<=r;l++){let h=this.getBinomialFactor(r,l),c=Math.pow(s,l),p=Math.pow(1-s,r-l);o+=h*c*p*e[l][0],n+=h*c*p*e[l][1]}t.push([o,n])}return t.push(e[r]),t}static getBinomialFactor(e,t){return this.getFactorial(e)/(this.getFactorial(t)*this.getFactorial(e-t))}static getFactorial(e){if(e<=1)return 1;if(e===2)return 2;if(e===3)return 6;if(e===4)return 24;if(e===5)return 120;let t=1;for(let r=1;r<=e;r++)t*=r;return t}static getQBSplinePoints(e){if(e.length<=2)return e;let t=2,r=[],s=e.length-t-1;r.push(e[0]);for(let o=0;o<=s;o++)for(let n=0;n<=1;n+=.05){let l=0,h=0;for(let c=0;c<=t;c++){let p=this.getQuadricBSplineFactor(c,n);l+=p*e[o+c][0],h+=p*e[o+c][1]}r.push([l,h])}return r.push(e[e.length-1]),r}static getQuadricBSplineFactor(e,t){return e===0?Math.pow(t-1,2)/2:e===1?(-2*Math.pow(t,2)+2*t+1)/2:e===2?Math.pow(t,2)/2:0}},C=Ki;var Cg={INITIALIZED:"initialized",ADDED:"added",REMOVED:"removed",CLEARED:"cleared",INSTALLED:"installed",ENABLED:"enabled",DISABLED:"disabled",PLAY:"play",PAUSE:"pause",RESTORE:"restore"},m=Cg;var lt={ADD:"add",REMOVE:"remove"},R={LEFT_DOWN:i.Cesium.ScreenSpaceEventType.LEFT_DOWN,LEFT_UP:i.Cesium.ScreenSpaceEventType.LEFT_UP,CLICK:i.Cesium.ScreenSpaceEventType.LEFT_CLICK,RIGHT_DOWN:i.Cesium.ScreenSpaceEventType.RIGHT_DOWN,RIGHT_UP:i.Cesium.ScreenSpaceEventType.RIGHT_UP,RIGHT_CLICK:i.Cesium.ScreenSpaceEventType.RIGHT_CLICK,DB_CLICK:i.Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK,MOUSE_MOVE:i.Cesium.ScreenSpaceEventType.MOUSE_MOVE,WHEEL:i.Cesium.ScreenSpaceEventType.WHEEL,MOUSE_OVER:"mouseover",MOUSE_OUT:"mouseout"},Uh={ADD_LAYER:"addLayer",REMOVE_LAYER:"removeLayer",ADD_EFFECT:"addEffect",REMOVE_EFFECT:"removeEffect",LEFT_DOWN:i.Cesium.ScreenSpaceEventType.LEFT_DOWN,LEFT_UP:i.Cesium.ScreenSpaceEventType.LEFT_UP,CLICK:i.Cesium.ScreenSpaceEventType.LEFT_CLICK,RIGHT_DOWN:i.Cesium.ScreenSpaceEventType.RIGHT_DOWN,RIGHT_UP:i.Cesium.ScreenSpaceEventType.RIGHT_UP,RIGHT_CLICK:i.Cesium.ScreenSpaceEventType.RIGHT_CLICK,DB_CLICK:i.Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK,MOUSE_MOVE:i.Cesium.ScreenSpaceEventType.MOUSE_MOVE,WHEEL:i.Cesium.ScreenSpaceEventType.WHEEL},D={CAMERA_MOVE_END:"cameraMoveEnd",CAMERA_CHANGED:"cameraChanged",PRE_UPDATE:"preUpdate",POST_UPDATE:"postUpdate",PRE_RENDER:"preRender",POST_RENDER:"postRender",MORPH_COMPLETE:"morphComplete",CLOCK_TICK:"clockTick",RENDER_ERROR:"renderError"},Me={...lt,LEFT_DOWN:i.Cesium.ScreenSpaceEventType.LEFT_DOWN,LEFT_UP:i.Cesium.ScreenSpaceEventType.LEFT_UP,CLICK:i.Cesium.ScreenSpaceEventType.LEFT_CLICK,RIGHT_DOWN:i.Cesium.ScreenSpaceEventType.RIGHT_DOWN,RIGHT_UP:i.Cesium.ScreenSpaceEventType.RIGHT_UP,RIGHT_CLICK:i.Cesium.ScreenSpaceEventType.RIGHT_CLICK,DB_CLICK:i.Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK,MOUSE_MOVE:i.Cesium.ScreenSpaceEventType.MOUSE_MOVE,MOUSE_OVER:"mouseover",MOUSE_OUT:"mouseout",POSITION_UPDATE:"positionUpdate"},Ie={READY:"ready",TEX_READY:"texturesReady"},J={INITIAL_TILES_LOADED:"initialTilesLoaded",ALL_TILES_LOADED:"allTilesLoaded ",LOAD_PROGRESS:"loadProgress ",TILE_FAILED:"tileFailed ",TILE_LOAD:"tileLoad",TILE_UNLOAD:"tileUnload",TILE_VISIBLE:"tileVisible"},De=lt,Le={...lt,LEFT_DOWN:i.Cesium.ScreenSpaceEventType.LEFT_DOWN,LEFT_UP:i.Cesium.ScreenSpaceEventType.LEFT_UP,CLICK:i.Cesium.ScreenSpaceEventType.LEFT_CLICK,RIGHT_DOWN:i.Cesium.ScreenSpaceEventType.RIGHT_DOWN,RIGHT_UP:i.Cesium.ScreenSpaceEventType.RIGHT_UP,RIGHT_CLICK:i.Cesium.ScreenSpaceEventType.RIGHT_CLICK,DB_CLICK:i.Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK},ne={...lt,POST_RENDER:"postRender",ACTIVATE:"activate",DEACTIVATE:"deactivate",RESET_TIME_LINE:"restTimeLine"},le={...lt,POST_RENDER:"postRender",RESET_TIME_LINE:"restTimeLine"},x={DRAW_START:"drawStart",DRAW_STOP:"drawStop",EDIT_START:"editStart",EDIT_STOP:"editEnd",DRAW_ANCHOR:"drawAnchor",CREATE_ANCHOR:"createAnchor",UPDATE_ANCHOR:"updateAnchor",ANCHOR_MOVING:"anchorMoving",EDIT_ANCHOR_STOP:"editAnchorStop",CLEAR_ANCHOR:"clearAnchor"};var Qi=class{constructor(e){this._types=e,this._cache={}}_on(e,t,r){let s=this.getEvent(e),o;return s&&t&&(o=s.addEventListener(t,r||this)),o}_off(e,t,r){let s=this.getEvent(e),o=!1;return s&&t&&(o=s.removeEventListener(t,r||this)),o}_fire(e,t){let r=this.getEvent(e);r&&r.raiseEvent(t)}_registerEvent(){Object.keys(this._types).forEach(e=>{let t=this._types[e];this._cache[t]=new i.Cesium.Event})}on(e,t,r){return this._on(e,t,r)}once(e,t,r){let s=this._on(e,o=>{t(o),s&&s()},r)}off(e,t,r){return this._off(e,t,r)}fire(e,t){this._fire(e,t)}getEvent(e){return this._cache[e]||void 0}},V=Qi;var $i=class extends V{constructor(e,t={}){super(R),this._viewer=e,this._selected=void 0,this._enableEventPropagation=t.enableEventPropagation,this._enableMouseOver=t.enableMouseOver,this._registerEvent(),this._addDefaultEvent()}_registerEvent(){let e=new i.Cesium.ScreenSpaceEventHandler(this._viewer.canvas);Object.keys(i.Cesium.ScreenSpaceEventType).forEach(t=>{let r=i.Cesium.ScreenSpaceEventType[t];this._cache[r]=new i.Cesium.Event,e.setInputAction(s=>{this._cache[r].raiseEvent(s)},r)})}_addDefaultEvent(){this.on(this._types.LEFT_DOWN,this._leftDownHandler,this),this.on(this._types.LEFT_UP,this._leftUpHandler,this),this.on(this._types.CLICK,this._clickHandler,this),this.on(this._types.DB_CLICK,this._dbClickHandler,this),this.on(this._types.RIGHT_DOWN,this._rightDownHandler,this),this.on(this._types.RIGHT_UP,this._rightUpHandler,this),this.on(this._types.RIGHT_CLICK,this._rightClickHandler,this),this.on(this._types.MOUSE_MOVE,this._mouseMoveHandler,this),this.on(this._types.WHEEL,this._mouseWheelHandler,this)}_adjustPosition(e){let t=this._viewer.container.getBoundingClientRect(),r=t.width/this._viewer.container.offsetWidth,s=t.height/this._viewer.container.offsetHeight,o=window.devicePixelRatio,n=e.x/r/o,l=e.y/s/o;return new i.Cesium.Cartesian2(n,l)}_getMouseInfo(e){let t=this._viewer.scene,r=t.pick(e),s,o,n,l;if(t.pickPositionSupported&&(s=t.pickPosition(e)),s){let h=i.Cesium.Ellipsoid.WGS84.cartesianToCartographic(s);h&&(n={lng:i.Cesium.Math.toDegrees(h.longitude),lat:i.Cesium.Math.toDegrees(h.latitude),alt:h.height})}if(t.mode===i.Cesium.SceneMode.SCENE3D&&!(this._viewer.terrainProvider instanceof i.Cesium.EllipsoidTerrainProvider)){let h=t.camera.getPickRay(e);o=t.globe.pick(h,t)}else o=t.camera.pickEllipsoid(e,i.Cesium.Ellipsoid.WGS84);if(o){let h=i.Cesium.Ellipsoid.WGS84.cartesianToCartographic(o);h&&(l={lng:i.Cesium.Math.toDegrees(h.longitude),lat:i.Cesium.Math.toDegrees(h.latitude),alt:h.height})}return{target:r,windowPosition:e,position:s,wgs84Position:n,surfacePosition:o,wgs84SurfacePosition:l}}_getDrillInfos(e){let t=[],s=this._viewer.scene.drillPick(e);return s&&s.length&&s.forEach(o=>{t.push(this._getTargetInfo(o))}),t}_getOverlayId(e){let t;return(e==null?void 0:e.id)instanceof i.Cesium.Entity?t=e.id.overlayId:e instanceof i.Cesium.Cesium3DTileFeature?t=e.tileset.overlayId:((e==null?void 0:e.primitive)instanceof i.Cesium.Cesium3DTileset||e!=null&&e.primitive)&&(t=e.primitive.overlayId),t}_getTargetInfo(e){let t,r,s;return(e==null?void 0:e.id)instanceof i.Cesium.Entity?(r=this._viewer.getLayers().filter(o=>o.layerId===e.id.layerId)[0],r!=null&&r.getOverlay&&(t=r.getOverlay(e.id.overlayId))):e instanceof i.Cesium.Cesium3DTileFeature?(r=this._viewer.getLayers().filter(o=>o.layerId===e.tileset.layerId)[0],s=e,r!=null&&r.getOverlay&&(t=r.getOverlay(e.tileset.overlayId),s&&s.getPropertyNames&&s.getPropertyNames().forEach(n=>{t.attr[n]=s.getProperty(n)}))):(e==null?void 0:e.primitive)instanceof i.Cesium.Cesium3DTileset?(r=this._viewer.getLayers().filter(o=>o.layerId===e.primitive.layerId)[0],r!=null&&r.getOverlay&&(t=r.getOverlay(e.primitive.overlayId))):e!=null&&e.primitive&&(r=this._viewer.getLayers().filter(o=>o.layerId===e.primitive.layerId)[0],r!=null&&r.getOverlay&&(t=r.getOverlay(e.primitive.overlayId))),{layer:r,overlay:t,feature:s,instanceId:e==null?void 0:e.instanceId}}_raiseEvent(e,t={}){var l;let r,s=this._getTargetInfo(t.target),o=s==null?void 0:s.overlay,n=s==null?void 0:s.layer;o!=null&&o.overlayEvent&&(r=o.overlayEvent.getEvent(e),r&&r.numberOfListeners>0&&r.raiseEvent({...s,...t})),(!r||r.numberOfListeners===0||this._eventPropagation)&&(n!=null&&n.layerEvent)&&(r=n.layerEvent.getEvent(e),r&&r.numberOfListeners>0&&r.raiseEvent({...s,...t})),(!r||r.numberOfListeners===0||this._enableEventPropagation)&&((l=this._viewer)!=null&&l.viewerEvent)&&(r=this._viewer.viewerEvent.getEvent(e),r&&r.numberOfListeners>0&&r.raiseEvent({...s,...t})),o!=null&&o.allowDrillPicking&&this._getDrillInfos(t.windowPosition).forEach(c=>{let p=c==null?void 0:c.overlay,_=c==null?void 0:c.layer;(p==null?void 0:p.overlayId)!==o.overlayId&&(p!=null&&p.overlayEvent)&&(r=p.overlayEvent.getEvent(e),(!r||r.numberOfListeners===0)&&(_!=null&&_.layerEvent)&&(r=_.layerEvent.getEvent(e)),r&&r.numberOfListeners>0&&r.raiseEvent({...c,...t}))})}_clickHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(R.CLICK,this._getMouseInfo(e.position))}_dbClickHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(R.DB_CLICK,this._getMouseInfo(e.position))}_rightClickHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(R.RIGHT_CLICK,this._getMouseInfo(e.position))}_mouseMoveHandler(e){if(!(e!=null&&e.endPosition))return!1;let t=this._getMouseInfo(e.endPosition);this._viewer.canvas.style.cursor=t.target?"pointer":"default",this._raiseEvent(R.MOUSE_MOVE,t),this._enableMouseOver&&(!this._selected||this._getOverlayId(this._selected.target)!==this._getOverlayId(t.target))&&(this._raiseEvent(R.MOUSE_OUT,this._selected),this._raiseEvent(R.MOUSE_OVER,t),this._selected=t)}_leftDownHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(R.LEFT_DOWN,this._getMouseInfo(e.position))}_leftUpHandler(e){this._raiseEvent(R.LEFT_UP,this._getMouseInfo(e.position))}_rightDownHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(R.RIGHT_DOWN,this._getMouseInfo(e.position))}_rightUpHandler(e){this._raiseEvent(R.RIGHT_UP,this._getMouseInfo(e.position))}_mouseWheelHandler(e){this._raiseEvent(R.WHEEL,{movement:e})}},er=$i;var tr=class extends V{constructor(){super(Uh),this._registerEvent()}},ir=tr;var rr=class extends V{constructor(e){super(D),this._camera=e.camera,this._scene=e.scene,this._clock=e.clock}on(e,t,r){let s;switch(e){case D.CAMERA_MOVE_END:s=this._camera.moveEnd.addEventListener(t,r||this);break;case D.CAMERA_CHANGED:s=this._camera.changed.addEventListener(t,r||this);break;case D.PRE_UPDATE:s=this._scene.preUpdate.addEventListener(t,r||this);break;case D.POST_UPDATE:s=this._scene.postUpdate.addEventListener(t,r||this);break;case D.PRE_RENDER:s=this._scene.preRender.addEventListener(t,r||this);break;case D.POST_RENDER:s=this._scene.postRender.addEventListener(t,r||this);break;case D.MORPH_COMPLETE:s=this._scene.morphComplete.addEventListener(t,r||this);break;case D.CLOCK_TICK:s=this._clock.onTick.addEventListener(t,r||this);break;case D.RENDER_ERROR:s=this._scene.renderError.addEventListener(t,r||this);break;default:break}return s}off(e,t,r){let s=!1;switch(e){case D.CAMERA_MOVE_END:s=this._camera.moveEnd.removeEventListener(t,r||this);break;case D.CAMERA_CHANGED:s=this._camera.changed.removeEventListener(t,r||this);break;case D.PRE_UPDATE:s=this._scene.preUpdate.removeEventListener(t,r||this);break;case D.POST_UPDATE:s=this._scene.postUpdate.removeEventListener(t,r||this);break;case D.PRE_RENDER:s=this._scene.preRender.removeEventListener(t,r||this);break;case D.POST_RENDER:s=this._scene.postRender.removeEventListener(t,r||this);break;case D.MORPH_COMPLETE:s=this._scene.morphComplete.removeEventListener(t,r||this);break;case D.CLOCK_TICK:s=this._clock.onTick.removeEventListener(t,r||this);break;case D.RENDER_ERROR:s=this._scene.renderError.removeEventListener(t,r||this);break;default:break}return s}},sr=rr;var or=class extends V{constructor(){super(De),this._registerEvent()}},ar=or;var nr=class extends V{constructor(){super(Le),this._registerEvent()}},lr=nr;var hr=class extends V{constructor(){super(Me),this._registerEvent()}},cr=hr;var pr=class extends V{constructor(e){super(J),this._tileset=e}on(e,t,r){return this._tileset.then(s=>{switch(e){case J.INITIAL_TILES_LOADED:s.initialTilesLoaded.addEventListener(t,r||this);break;case J.ALL_TILES_LOADED:s.allTilesLoaded.addEventListener(t,r||this);break;case J.LOAD_PROGRESS:s.loadProgress.addEventListener(t,r||this);break;case J.TILE_FAILED:s.tileFailed.addEventListener(t,r||this);break;case J.TILE_LOAD:s.tileLoad.addEventListener(t,r||this);break;case J.TILE_UNLOAD:s.tileUnload.addEventListener(t,r||this);break;case J.TILE_VISIBLE:s.tileVisible.addEventListener(t,r||this);break;default:break}}),null}off(e,t,r){return this._tileset.then(s=>{switch(e){case J.INITIAL_TILES_LOADED:s.initialTilesLoaded.removeEventListener(t,r||this);break;case J.ALL_TILES_LOADED:s.allTilesLoaded.removeEventListener(t,r||this);break;case J.LOAD_PROGRESS:s.loadProgress.removeEventListener(t,r||this);break;case J.TILE_FAILED:s.tileFailed.removeEventListener(t,r||this);break;case J.TILE_LOAD:s.tileLoad.removeEventListener(t,r||this);break;case J.TILE_UNLOAD:s.tileUnload.removeEventListener(t,r||this);break;case J.TILE_VISIBLE:s.tileVisible.removeEventListener(t,r||this);break;default:break}}),!0}},dr=pr;var mr=class extends V{constructor(e){super(Ie),this._model=e}on(e,t,r){return this._model.then(s=>{switch(e){case Ie.READY:s.readyEvent.addEventListener(t,r||this);break;case Ie.TEX_READY:s.texturesReadyEvent.addEventListener(t,r||this);break;default:break}}),null}off(e,t,r){return this._model.then(s=>{switch(e){case Ie.READY:s.readyEvent.removeEventListener(t,r||this);break;case Ie.TEX_READY:s.texturesReadyEvent.removeEventListener(t,r||this);break;default:break}}),!0}},ur=mr;var _r=class extends V{constructor(){super(ne),this._registerEvent()}},fr=_r;var gr=class extends V{constructor(){super(le),this._registerEvent()}},yr=gr;var vr=class extends V{constructor(){super(x),this._registerEvent()}},ht=vr;var wr=class{constructor(e){this._id=v.uuid(),this._bid=e||v.uuid(),this._delegate=void 0,this._viewer=void 0,this._state=void 0,this._show=!0,this._isGround=!1,this._cache={},this._attr={},this._layerEvent=new lr,this._layerEvent.on(Le.ADD,this._onAdd,this),this._layerEvent.on(Le.REMOVE,this._onRemove,this)}get layerId(){return this._id}get id(){return this._bid}get delegate(){return this._delegate}set show(e){this._show=e,this._delegate&&(this._delegate.show=this._show)}get show(){return this._show}get layerEvent(){return this._layerEvent}set attr(e){this._attr=e}get attr(){return this._attr}get state(){return this._state}_addedHook(){}_removedHook(){}_onAdd(e){this._viewer=e,this._delegate&&(this._delegate instanceof i.Cesium.PrimitiveCollection?this._isGround?this._viewer.scene.groundPrimitives.add(this._delegate):this._viewer.scene.primitives.add(this._delegate):this._delegate instanceof i.Cesium.ImageryLayer?this._viewer.imageryLayers.add(this._delegate):this._viewer.dataSources.add(this._delegate),this._addedHook&&this._addedHook(),this._state=m.ADDED)}_onRemove(){this._delegate&&this._viewer&&(this._cache={},this._delegate instanceof i.Cesium.PrimitiveCollection?(this._delegate.removeAll(),this._isGround?this._viewer.scene.groundPrimitives.remove(this._delegate):this._viewer.scene.primitives.remove(this._delegate)):this._delegate instanceof i.Cesium.ImageryLayer?this._viewer.imageryLayers.remove(this._delegate,!1):this._delegate instanceof Promise?(this._delegate.then(e=>{e.entities.removeAll()}),this._viewer.dataSources.remove(this._delegate)):(this._delegate.entities&&this._delegate.entities.removeAll(),this._viewer.dataSources.remove(this._delegate)),this._removedHook&&this._removedHook(),this._state=m.REMOVED)}_addOverlay(e){this._cache.hasOwnProperty(e.overlayId)||(this._cache[e.overlayId]=e,this._delegate&&e.fire(Me.ADD,this),this._state===m.CLEARED&&(this._state=m.ADDED))}_removeOverlay(e){this._cache.hasOwnProperty(e.overlayId)&&(this._delegate&&e.fire(Me.REMOVE,this),delete this._cache[e.overlayId])}addOverlay(e){return this._addOverlay(e),this}addOverlays(e){return Array.isArray(e)&&e.forEach(t=>{this._addOverlay(t)}),this}removeOverlay(e){return this._removeOverlay(e),this}getOverlay(e){return this._cache[e]||void 0}getOverlayById(e){let t;return Object.keys(this._cache).forEach(r=>{this._cache[r].id===e&&(t=this._cache[r])}),t}getOverlaysByAttr(e,t){let r=[];return this.eachOverlay(s=>{s.attr[e]===t&&r.push(s)},this),r}eachOverlay(e,t){return Object.keys(this._cache).forEach(r=>{e&&e.call(t||this,this._cache[r])}),this}getOverlays(){let e=[];return Object.keys(this._cache).forEach(t=>{e.push(this._cache[t])}),e}clear(){}remove(){this._viewer&&this._viewer.removeLayer(this)}addTo(e){return e!=null&&e.addLayer&&e.addLayer(this),this}setStyle(e){}on(e,t,r){return this._layerEvent.on(e,t,r||this),this}off(e,t,r){return this._layerEvent.off(e,t,r||this),this}fire(e,t){return this._layerEvent.fire(e,t),this}static registerType(e){e&&(Ue[e.toLocaleUpperCase()]=e.toLocaleLowerCase())}static getLayerType(e){return Ue[e.toLocaleUpperCase()]||void 0}},S=wr;var Cr=class{constructor(e){this._id=e||v.uuid(),this._cache={},this._show=!0,this._viewer=void 0,this._layerGroupEvent=new ar,this._layerGroupEvent.on(De.ADD,this._onAdd,this),this._layerGroupEvent.on(De.REMOVE,this._onRemove,this),this._state=m.INITIALIZED}get id(){return this._id}get type(){return S.getLayerType("layer_group")}set show(e){this._show=e,Object.keys(this._cache).forEach(t=>{this._cache[t].show=this._show})}get show(){return this._show}get layerGroupEvent(){return this._layerGroupEvent}get state(){return this._state}_onAdd(e){this._viewer=e,Object.keys(this._cache).forEach(t=>{this._viewer.addLayer(this._cache[t])}),this._state=m.ADDED}_onRemove(){Object.keys(this._cache).forEach(e=>{this._viewer&&this._viewer.removeLayer(this._cache[e])}),this._cache={},this._state=m.REMOVED}addLayer(e){return Object(this._cache).hasOwnProperty(e.id)||(this._cache[e.id]=e,this._viewer&&this._viewer.addLayer(e)),this}removeLayer(e){return Object(this._cache).hasOwnProperty(e.id)&&(this._viewer&&this._viewer.removeLayer(e),delete this._cache[e.id]),this}getLayer(e){return this._cache[e]||void 0}getLayers(){let e=[];return Object.keys(this._cache).forEach(t=>{e.push(this._cache[t])}),e}addTo(e){return e&&e.addLayerGroup&&e.addLayerGroup(this),this}remove(){return this._viewer&&this._viewer.removeLayerGroup(this),this}};S.registerType("layer_group");var Tr=Cr;var Bh=new i.Cesium.WebMercatorProjection,xr=class{static transformCartesianToWGS84(e){if(e){let t=i.Cesium.Ellipsoid.WGS84.cartesianToCartographic(e);return new Z(i.Cesium.Math.toDegrees((t==null?void 0:t.longitude)||0),i.Cesium.Math.toDegrees((t==null?void 0:t.latitude)||0),t.height||0)}return new Z(0,0)}static transformCartographicToWGS84(e){return e?new Z(i.Cesium.Math.toDegrees((e==null?void 0:e.longitude)||0),i.Cesium.Math.toDegrees((e==null?void 0:e.latitude)||0),e.height||0):new Z(0,0)}static transformWGS84ToCartesian(e){return e?i.Cesium.Cartesian3.fromDegrees(e.lng,e.lat,e.alt,i.Cesium.Ellipsoid.WGS84):i.Cesium.Cartesian3.ZERO}static transformWGS84ToCartographic(e){return e?i.Cesium.Cartographic.fromDegrees(e.lng,e.lat,e.alt):i.Cesium.Cartographic.ZERO}static transformCartesianArrayToWGS84Array(e){return e?e.map(t=>this.transformCartesianToWGS84(t)):[]}static transformWGS84ArrayToCartesianArray(e){return e?e.map(t=>this.transformWGS84ToCartesian(t)):[]}static transformWGS84ToMercator(e){let t=Bh.project(i.Cesium.Cartographic.fromDegrees(e.lng,e.lat,e.alt));return new Z(t.x,t.y,t.z)}static transformMercatorToWGS84(e){let t=Bh.unproject(new i.Cesium.Cartesian3(e.lng,e.lat,e.alt));return new Z(i.Cesium.Math.toDegrees(t.longitude),i.Cesium.Math.toDegrees(t.latitude),t.height)}static transformWindowToWGS84(e,t){let r=t.scene,s;if(r.mode===i.Cesium.SceneMode.SCENE3D){let o=r.camera.getPickRay(e);s=r.globe.pick(o,r)}else s=r.camera.pickEllipsoid(e,i.Cesium.Ellipsoid.WGS84);return this.transformCartesianToWGS84(s)}static transformWGS84ToWindow(e,t){let r=t.scene;return i.Cesium.SceneTransforms.worldToWindowCoordinates(r,this.transformWGS84ToCartesian(e))}},u=xr;var Bt=52.35987755982988,ee=3.141592653589793,Vh=6378245,jh=.006693421622965943,Er=class{static BD09ToGCJ02(e,t){let r=+e-.0065,s=+t-.006,o=Math.sqrt(r*r+s*s)-2e-5*Math.sin(s*Bt),n=Math.atan2(s,r)-3e-6*Math.cos(r*Bt),l=o*Math.cos(n),h=o*Math.sin(n);return[l,h]}static GCJ02ToBD09(e,t){t=+t,e=+e;let r=Math.sqrt(e*e+t*t)+2e-5*Math.sin(t*Bt),s=Math.atan2(t,e)+3e-6*Math.cos(e*Bt),o=r*Math.cos(s)+.0065,n=r*Math.sin(s)+.006;return[o,n]}static WGS84ToGCJ02(e,t){if(t=+t,e=+e,this.out_of_china(e,t))return[e,t];{let r=this.delta(e,t);return[e+r[0],t+r[1]]}}static GCJ02ToWGS84(e,t){if(t=+t,e=+e,this.out_of_china(e,t))return[e,t];{let r=[e,t],s=this.WGS84ToGCJ02(e,t),o=s[0]-e,n=s[1]-t;do s=this.WGS84ToGCJ02(r[0]-=o,r[1]-=n),o=s[0]-e,n=s[1]-t;while(Math.abs(o)>1e-7||Math.abs(n)>1e-7);return r}}static delta(e,t){let r=this.transformLng(e-105,t-35),s=this.transformLat(e-105,t-35),o=t/180*ee,n=Math.sin(o);n=1-jh*n*n;let l=Math.sqrt(n);return r=r*180/(Vh/l*Math.cos(o)*ee),s=s*180/(Vh*(1-jh)/(n*l)*ee),[r,s]}static transformLng(e,t){t=+t,e=+e;let r=300+e+2*t+.1*e*e+.1*e*t+.1*Math.sqrt(Math.abs(e));return r+=(20*Math.sin(6*e*ee)+20*Math.sin(2*e*ee))*2/3,r+=(20*Math.sin(e*ee)+40*Math.sin(e/3*ee))*2/3,r+=(150*Math.sin(e/12*ee)+300*Math.sin(e/30*ee))*2/3,r}static transformLat(e,t){t=+t,e=+e;let r=-100+2*e+3*t+.2*t*t+.1*e*t+.2*Math.sqrt(Math.abs(e));return r+=(20*Math.sin(6*e*ee)+20*Math.sin(2*e*ee))*2/3,r+=(20*Math.sin(t*ee)+40*Math.sin(t/3*ee))*2/3,r+=(160*Math.sin(t/12*ee)+320*Math.sin(t*ee/30))*2/3,r}static out_of_china(e,t){return t=+t,e=+e,!(e>73.66&&e<135.05&&t>3.86&&t<53.55)}},me=Er;var Pr=class a{constructor(e,t,r,s,o,n){this._lng=+e||0,this._lat=+t||0,this._alt=+r||0,this._heading=+s||0,this._pitch=+o||0,this._roll=+n||0}set lng(e){this._lng=+e}get lng(){return this._lng}set lat(e){this._lat=+e}get lat(){return this._lat}set alt(e){this._alt=+e}get alt(){return this._alt}set heading(e){this._heading=+e}get heading(){return this._heading}set pitch(e){this._pitch=+e}get pitch(){return this._pitch}set roll(e){this._roll=+e}get roll(){return this._roll}serialize(){let e=new a(this._lng,this._lat,this._alt,this._heading,this._pitch,this._roll);return JSON.stringify(e)}distance(e){return!e||!(e instanceof a)?0:i.Cesium.Cartesian3.distance(u.transformWGS84ToCartesian(this),u.transformWGS84ToCartesian(e))}clone(){let e=new a;return e.lng=this.lng||0,e.lat=this.lat||0,e.alt=this.alt||0,e.heading=this.heading||0,e.pitch=this.pitch||0,e.roll=this.roll||0,e}copy(){return this.clone()}toArray(){return[this.lng,this.lat,this.alt,this.heading,this.pitch,this.roll]}toString(){return`${this.lng},${this.lat},${this.alt},${this.heading},${this.pitch},${this.roll}`}toObject(){return{lng:this.lng,lat:this.lat,alt:this.alt,heading:this.heading,pitch:this.pitch,roll:this.roll}}static fromArray(e){let t=new a;return Array.isArray(e)&&(t.lng=e[0]||0,t.lat=e[1]||0,t.alt=e[2]||0,t.heading=e[3]||0,t.pitch=e[4]||0,t.roll=e[5]||0),t}static fromString(e){let t=new a;if(e&&typeof e=="string"){let r=e.split(",");t=this.fromArray(r)}return t}static fromObject(e){return new a(e.lng,e.lat,e.alt,e.heading,e.pitch,e.roll)}static deserialize(e){let t=new a,r=JSON.parse(e);return r&&(t.lng=r.lng||0,t.lat=r.lat||0,t.alt=r.alt||0,t.heading=r.heading||0,t.pitch=r.pitch||0,t.roll=r.roll||0),t}},Z=Pr;var br=class{static parsePosition(e){let t=new Z;return e&&(typeof e=="string"?t=Z.fromString(e):Array.isArray(e)?t=Z.fromArray(e):!(Object(e)instanceof Z)&&Object(e).hasOwnProperty("lng")&&Object(e).hasOwnProperty("lat")?t=Z.fromObject(e):Object(e)instanceof Z?t=e:Object(e)instanceof i.Cesium.Cartesian3?t=u.transformCartesianToWGS84(e):Object(e)instanceof i.Cesium.Cartographic&&(t=u.transformCartographicToWGS84(e))),t}static parsePositions(e){if(typeof e=="string"){if(e.indexOf("#")>=0)throw new Error("the positions invalid");e=e.split(";").filter(t=>!!t)}return e.map(t=>this.parsePosition(t))}static parsePointCoordToArray(e){return e=this.parsePosition(e),[e.lng,e.lat]}static parsePolylineCoordToArray(e){let t=[];return e=this.parsePositions(e),e.forEach(r=>{t.push([r.lng,r.lat])}),t}static parsePolygonCoordToArray(e,t=!1){let r=[];return e=this.parsePositions(e),e.forEach(s=>{r.push([s.lng,s.lat])}),t&&r.length>0&&r.push(r[0]),[r]}},f=br;var Tg={radius:60,maxZoom:25,style:"circle",image:"",gradientColors:{1e-4:i.Cesium.Color.DEEPSKYBLUE,.001:i.Cesium.Color.GREEN,.01:i.Cesium.Color.ORANGE,.1:i.Cesium.Color.RED},gradientImages:{},showCount:!0,fontSize:12,clusterSize:16,fontColor:i.Cesium.Color.BLACK,getCountOffset:a=>({x:-3.542857*String(a).length+1.066667,y:String(a).length>3?5:4})},Sr=class extends S{constructor(e,t={}){super(e),this._delegate=new i.Cesium.PrimitiveCollection,this._options={...Tg,...t},this._billboards=this._delegate.add(new i.Cesium.BillboardCollection),this._labels=this._delegate.add(new i.Cesium.LabelCollection),this._cluster=new i.Supercluster({radius:this._options.radius,maxZoom:this._options.maxZoom}),this._allCount=0,this._changedRemoveCallback=void 0,this._lastChangedTime=null,this._state=m.INITIALIZED}get type(){return S.getLayerType("cluster")}_addOverlay(e){}_removeOverlay(e){}_getCircleImage(e,t){let r=this._options.clusterSize*(String(t).length+1),s=e.toCssColorString()+"-"+t;if(!this._cache[s]){let o=document.createElement("canvas");o.width=r,o.height=r;let n=o.getContext("2d");n.save(),n.scale(r/24,r/24),n.fillStyle=e.withAlpha(.2).toCssColorString(),n.beginPath(),n.arc(12,12,9,0,2*Math.PI),n.closePath(),n.fill(),n.beginPath(),n.arc(12,12,6,0,2*Math.PI),n.fillStyle=e.toCssColorString(),n.closePath(),n.fill(),n.restore(),this._cache[s]=o.toDataURL()}return this._cache[s]}_getClusteringImage(e,t){let r=this._options.clusterSize*(String(t).length+1),s=e.toCssColorString()+"-"+t,o=-Math.PI/12,n=Math.PI/2,l=Math.PI/6;if(!this._cache[s]){let h=document.createElement("canvas");h.width=r,h.height=r;let c=h.getContext("2d");c.save(),c.scale(r/24,r/24),c.beginPath(),c.arc(12,12,6,0,2*Math.PI),c.fillStyle=e.toCssColorString(),c.fill(),c.closePath(),c.lineWidth=2;for(let p=0;p<3;p++)c.beginPath(),c.arc(12,12,8,o,o+n,!1),c.strokeStyle=e.withAlpha(.4).toCssColorString(),c.stroke(),c.arc(12,12,11,o,o+n,!1),c.strokeStyle=e.withAlpha(.2).toCssColorString(),c.stroke(),c.closePath(),o=o+n+l;c.restore(),this._cache[s]=h.toDataURL()}return this._cache[s]}_getClusterImage(e){let t=e/this._allCount,r;if(this._options.style==="custom"){let s=Object.keys(this._options.gradientImages).sort((o,n)=>Number(o)-Number(n));for(let o=s.length-1;o>=0;o--)if(t>=Number(s[o])){r=this._options.gradientImages[s[o]];break}r||(r=this._options.gradientImages[s[0]])}else{let s=Object.keys(this._options.gradientColors).sort((n,l)=>Number(n)-Number(l)),o;for(let n=s.length-1;n>=0;n--)if(t>=Number(s[n])){o=this._options.gradientColors[s[n]];break}o||(o=this._options.gradientColors[s[0]]),r=this._options.style==="circle"?this._getCircleImage(o,e):this._getClusteringImage(o,e)}return r}_changeCluster(e){let t=i.Cesium.getTimestamp();if(this._lastChangedTime&&t-this._lastChangedTime<=1e3)return;this._lastChangedTime=t,this._cache={},this._billboards.removeAll(),this._labels.removeAll();let r=this._viewer.camera.computeViewRectangle();r||(r=this._viewer.viewBounds),this._allCount&&this._cluster.getClusters([i.Cesium.Math.toDegrees(r.west),i.Cesium.Math.toDegrees(r.south),i.Cesium.Math.toDegrees(r.east),i.Cesium.Math.toDegrees(r.north)],this._viewer.zoom).forEach(o=>{let n=v.uuid();if(o.properties.cluster){let l=o.properties.point_count,h=this._billboards.add({position:i.Cesium.Cartesian3.fromDegrees(+o.geometry.coordinates[0],+o.geometry.coordinates[1]),image:this._getClusterImage(l)});if(h.layerId=this.layerId,h.overlayId=n,h.attr={count:l},this._cache[n]=h,this._options.showCount){let c=this._labels.add({position:i.Cesium.Cartesian3.fromDegrees(+o.geometry.coordinates[0],+o.geometry.coordinates[1]),text:String(l),font:`${this._options.fontSize} px sans-serif`,disableDepthTestDistance:Number.POSITIVE_INFINITY,fillColor:this._options.fontColor,scale:.8,pixelOffset:this._options.getCountOffset(l)});c.layerId=this.layerId,c.overlayId=n,c.attr={count:l},this._cache[n]=c}}else{let l=this._billboards.add({position:i.Cesium.Cartesian3.fromDegrees(+o.geometry.coordinates[0],+o.geometry.coordinates[1]),image:this._options.image,...o.properties.style});l.layerId=this.layerId,l.overlayId=n,l.attr=o.properties,this._cache[n]=l}})}_addedHook(){this._changedRemoveCallback=this._viewer.camera.changed.addEventListener(this._changeCluster,this)}_removedHook(){this._changedRemoveCallback&&this._changedRemoveCallback()}setPoints(e=[]){return e.length&&(this._allCount=e.length,this._cluster.load(e.map(t=>{let r=f.parsePosition(t);return{type:"Feature",geometry:{type:"Point",coordinates:[r.lng,r.lat]},properties:t.attr||{}}}))),this}clear(){return this._cache={},this._allCount=0,this._state=m.CLEARED,this}};S.registerType("cluster");var Ar=Sr;var Mr=class extends S{constructor(e,t="",r={}){super(e),this._delegate=i.Cesium.CzmlDataSource.load(t,r),this._state=m.INITIALIZED}get type(){return S.getLayerType("czml")}set show(e){this._show=e,this._delegate&&this._delegate.then(t=>{t.show=this._show})}get show(){return this._show}eachOverlay(e,t){if(this._delegate)return this._delegate.then(r=>{r.entities.values.forEach(o=>{e.call(t,o)})}),this}};S.registerType("czml");var Ir=Mr;var Dr=class extends S{constructor(e){super(e),this._delegate=new i.Cesium.CustomDataSource(e),this._state=m.INITIALIZED}get type(){return S.getLayerType("dynamic")}clear(){return this._delegate.entities&&this._delegate.entities.removeAll(),this._cache={},this._state=m.CLEARED,this}};S.registerType("dynamic");var Lr=Dr;var Rr=class extends S{constructor(e){super(e),this._delegate=new i.Cesium.CustomDataSource(e),this._state=m.INITIALIZED}get type(){return S.getLayerType("vector")}clear(){return this._delegate.entities&&this._delegate.entities.removeAll(),this._cache={},this._state=m.CLEARED,this}};S.registerType("vector");var ue=Rr;var xg={name:"",count:10,maximumLevel:21,dataProperty:"",callback:()=>null},Or=class extends S{constructor(e,t,r={}){super(e),this._url=t,this._options={...xg,...r},this._levelLayers={},this._tileWidth=256,this._tileHeight=256,this._maximumLevel=this._options.maximumLevel,this._tilingScheme=this._options.tilingScheme||new i.Cesium.GeographicTilingScheme,this._rectangle=this._tilingScheme.rectangle,this._credit=void 0,this._token=void 0;for(let s=0;s<this.maximumLevel;s++)this._levelLayers[String(s)]=new ue(e+"-grid-"+s);this._viewer=void 0,this._imageryLayer=void 0,this._imagery=document.createElement("canvas"),this._imagery.width=this._tileWidth,this._imagery.height=this._tileHeight,this._state=m.INITIALIZED}get type(){return S.getLayerType("feature_grid")}get url(){return this._url}set show(e){this._show=e,Object.keys(this._levelLayers).forEach(t=>{this._levelLayers[t].show=e})}get show(){return this._show}get token(){return this._token}get tileWidth(){if(!this.ready)throw new i.Cesium.DeveloperError("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}get tileHeight(){if(!this.ready)throw new i.Cesium.DeveloperError("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}get maximumLevel(){if(!this.ready)throw new i.Cesium.DeveloperError("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}get minimumLevel(){if(!this.ready)throw new i.Cesium.DeveloperError("minimumLevel must not be called before the imagery provider is ready.");return 0}get tilingScheme(){if(!this.ready)throw new i.Cesium.DeveloperError("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}get rectangle(){if(!this.ready)throw new i.Cesium.DeveloperError("rectangle must not be called before the imagery provider is ready.");return this._rectangle}get ready(){return!!this._url}get credit(){return this._credit}get hasAlphaChannel(){return!0}_onAdd(e){this._viewer=e,this._imageryLayer=this._viewer.imageryLayers.addImageryProvider(this),Object.keys(this._levelLayers).forEach(t=>{this._viewer.addLayer(this._levelLayers[t])}),this._state=m.ADDED}_onRemove(){this._imageryLayer&&this._viewer.imageryLayers.remove(this._imageryLayer),Object.keys(this._levelLayers).forEach(e=>{this._viewer.removeLayer(this._levelLayers[e])}),this._state=m.REMOVED}getTileCredits(e,t,r){}requestImage(e,t,r,s){let o=this._levelLayers[String(r)],n=this._tilingScheme.tileXYToRectangle(e,t,r);return this._viewer&&n&&o&&i.Cesium.Rectangle.intersection(n,this._viewer.viewBounds)&&i.Cesium.Resource.fetchJson({url:this._url,queryParameters:{minX:i.Cesium.Math.toDegrees(n.west),minY:i.Cesium.Math.toDegrees(n.south),maxX:i.Cesium.Math.toDegrees(n.east),maxY:i.Cesium.Math.toDegrees(n.north),count:this._options.count}}).then(l=>{let h=l;if(this._options.dataProperty&&(h=l[this._options.dataProperty]),h&&h.length){for(let c=r+3;c<this._maximumLevel;c++)this._levelLayers[String(c)]&&this._levelLayers[String(c)].clear();h.forEach(c=>{let p=this._options.callback(c);p&&o.addOverlay(p)})}}),this._imagery}clear(){Object.keys(this._levelLayers).forEach(e=>{this._levelLayers[e].clear()}),this._state=m.CLEARED}};S.registerType("feature_grid");var kr=Or;var Eg={},F=Eg;var zr=class{constructor(){this._id=v.uuid(),this._bid=v.uuid(),this._delegate=void 0,this._layer=void 0,this._state=void 0,this._show=!0,this._style={},this._attr={},this._allowDrillPicking=!1,this._contextMenu=[],this._overlayEvent=new cr,this._overlayEvent.on(Me.ADD,this._onAdd,this),this._overlayEvent.on(Me.REMOVE,this._onRemove,this)}get overlayId(){return this._id}get type(){return""}set id(e){this._bid=e}get id(){return this._bid}set show(e){this._show=e,v.isPromise(this._delegate)?this._delegate.then(t=>{t.show=this._show}):this._delegate&&(this._delegate.show=this._show)}get show(){return this._show}set attr(e){this._attr=e}get attr(){return this._attr}set allowDrillPicking(e){this._allowDrillPicking=e}get allowDrillPicking(){return this._allowDrillPicking}get overlayEvent(){return this._overlayEvent}get delegate(){return this._delegate}get state(){return this._state}set contextMenu(e){this._contextMenu=e}get contextMenu(){return this._contextMenu}_getLayerCollection(e){let t;switch(e){case"point_primitive":t=this._layer.points;break;case"billboard_primitive":case"bounce_billboard_primitive":t=this._layer.billboards;break;case"label_primitive":case"bounce_label_primitive":t=this._layer.labels;break;case"polyline_primitive":t=this._layer.polylines;break;case"cloud_primitive":t=this._layer.clouds;break;default:break}return t}_mountedHook(){}_addedHook(){var e;if(!this._delegate)return!1;this._delegate instanceof Promise?this._delegate.then(t=>{var r;t.layerId=(r=this._layer)==null?void 0:r.layerId,t.overlayId=this._id}):(this._delegate.layerId=(e=this._layer)==null?void 0:e.layerId,this._delegate.overlayId=this._id)}_removedHook(){}_onAdd(e){var t,r,s,o;if(e){if(this._layer=e,this._mountedHook&&this._mountedHook(),(r=(t=this._layer)==null?void 0:t.delegate)!=null&&r.entities&&this._delegate)this._layer.delegate.entities.add(this._delegate);else if((o=(s=this._layer)==null?void 0:s.delegate)!=null&&o.add){let n=this._getLayerCollection(this.type);n?(this._delegate&&(this._delegate=n.add(this._delegate)),v.merge(this._delegate,this._style),this.update&&this.destroy&&this._layer.delegate.add(this)):v.isPromise(this._delegate)?this._delegate.then(l=>{this._layer.delegate.add(l)}):this.update&&this.destroy?this._layer.delegate.add(this):this._delegate&&this._layer.delegate.add(this._delegate)}this._addedHook&&this._addedHook(),this._state=m.ADDED}}_onRemove(){var e,t,r,s;if(this._layer){if((t=(e=this._layer)==null?void 0:e.delegate)!=null&&t.entities)this._layer.delegate.entities.remove(this._delegate);else if((s=(r=this._layer)==null?void 0:r.delegate)!=null&&s.remove){let o=this._getLayerCollection(this.type);o?(this._delegate&&o.remove(this._delegate),this.update&&this.destroy&&this._layer.delegate.remove(this)):v.isPromise(this._delegate)?this._delegate.then(n=>{this._layer.delegate.remove(n)}):this.update&&this.destroy?this._layer.delegate.remove(this):this._delegate&&this._layer.delegate.remove(this._delegate)}this._removedHook&&this._removedHook(),this._state=m.REMOVED}}setLabel(e,t){return this._delegate?(this._delegate instanceof i.Cesium.Entity&&(this._delegate.label={...t,text:e}),this):this}setStyle(e){return this}remove(){return this._layer&&this._layer.removeOverlay(this),this}addTo(e){return e&&e.addOverlay&&e.addOverlay(this),this}on(e,t,r){return this._overlayEvent.on(e,t,r||this),this}off(e,t,r){return this._overlayEvent.off(e,t,r||this),this}fire(e,t){return this._overlayEvent.fire(e,t),this}static registerType(e){e&&(F[e.toLocaleUpperCase()]=e.toLocaleLowerCase())}static getOverlayType(e){return F[e.toLocaleUpperCase()]||void 0}},g=zr;var Fr=class extends g{constructor(e,t){super(),this._delegate=new i.Cesium.Entity({billboard:{}}),this._position=f.parsePosition(e),this._icon=t,this._size=[32,32],this._state=m.INITIALIZED}get type(){return g.getOverlayType("custom_billboard")}set position(e){this._position=f.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}set icon(e){this._icon=e,this._delegate.billboard.image=this._icon}get icon(){return this._icon}set size(e){if(!Array.isArray(e))throw new Error("CustomBillboard: the size invalid");this._size=e,this._delegate.billboard.width=this._size[0]||32,this._delegate.billboard.height=this._size[1]||32}get size(){return this._size}_mountedHook(){this.position=this._position,this.icon=this._icon,this.size=this._size}setLabel(e,t){return this._delegate.label={...t,text:e},this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.image&&delete e.width&&delete e.height,v.merge(this._style,e),v.merge(this._delegate.billboard,e),this)}setVLine(e={}){if(this._position.alt>0&&!this._delegate.polyline){let t=this._position.copy();t.alt=e.height||0,this._delegate.polyline={...e,positions:u.transformWGS84ArrayToCartesianArray([t,this._position])}}return this}setBottomCircle(e,t={},r=0){let s=0,o=r;return this._delegate.ellipse={...t,semiMajorAxis:e,semiMinorAxis:e,stRotation:new i.Cesium.CallbackProperty(()=>(s+=o,(s>=360||s<=-360)&&(s=0),s),!1)},this}};g.registerType("custom_billboard");var Hr=Fr;var Nr=class extends g{constructor(e,t){super(),this._delegate=new i.Cesium.Entity({label:{}}),this._position=f.parsePosition(e),this._text=t,this._state=m.INITIALIZED}get type(){return g.getOverlayType("custom_label")}set position(e){this._position=f.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}set text(e){this._text=e,this._delegate.label.text=this._text}get text(){return this._text}_mountedHook(){this.position=this._position,this.text=this._text}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.text,v.merge(this._style,e),v.merge(this._delegate.label,e),this)}setVLine(e={}){if(this._position.alt>0&&!this._delegate.polyline){let t=this._position.copy();t.alt=e.height||0,this._delegate.polyline={...e,positions:u.transformWGS84ArrayToCartesianArray([t,this._position])}}return this}setBottomCircle(e,t={},r=0){let s=0,o=r;return this._delegate.ellipse={...t,semiMajorAxis:e,semiMinorAxis:e,stRotation:new i.Cesium.CallbackProperty(()=>(s+=o,(s>=360||s<=-360)&&(s=0),s),!1)},this}};g.registerType("custom_label");var Wr=Nr;var Gr=class extends g{constructor(){super(),this._startTime=void 0,this._lastTime=void 0,this._sampledPosition=new i.Cesium.SampledPositionProperty,this._cache=[],this._maxCacheSize=10,this._state=m.INITIALIZED}set maxCacheSize(e){this._maxCacheSize=e}get maxCacheSize(){return this._maxCacheSize}get position(){return u.transformCartesianToWGS84(this._sampledPosition.getValue(i.Cesium.JulianDate.now()))}_removePosition(){if(this._cache.length>this._maxCacheSize){let e=i.Cesium.JulianDate.addSeconds(this._cache[0],-.2,new i.Cesium.JulianDate),t=i.Cesium.JulianDate.addSeconds(this._cache[this._cache.length-this._maxCacheSize],-.2,new i.Cesium.JulianDate);this._sampledPosition.removeSamples(new i.Cesium.TimeInterval({start:e,stop:t})),this._cache.splice(0,this._cache.length-this._maxCacheSize)}}addPosition(e,t){this._removePosition();let r=i.Cesium.JulianDate.now(),s=i.Cesium.JulianDate.addSeconds(r,t,new i.Cesium.JulianDate);return this._sampledPosition.addSample(s,u.transformWGS84ToCartesian(f.parsePosition(e))),this._lastTime=s,this._cache.push(this._lastTime),this}bindDom(e){return this}},Vt=Gr;var Ur=class extends Vt{constructor(e,t){super(),this._position=f.parsePosition(e),this._icon=t,this._delegate=new i.Cesium.Entity({billboard:{}}),this._state=m.INITIALIZED}get type(){return g.getOverlayType("dynamic_billboard")}set icon(e){this._icon=e,this._delegate.billboard.image=this._icon}get icon(){return this._icon}set size(e){if(!Array.isArray(e))throw new Error("DynamicBillboard: the size invalid");this._size=e,this._delegate.billboard.width=this._size[0]||32,this._delegate.billboard.height=this._size[1]||32}get size(){return this._size}_mountedHook(){this._sampledPosition.forwardExtrapolationType=i.Cesium.ExtrapolationType.HOLD,this._startTime=i.Cesium.JulianDate.now(),this._sampledPosition.addSample(this._startTime,u.transformWGS84ToCartesian(this._position)),this._delegate.position=this._sampledPosition,this._cache.push(this._startTime),this.icon=this._icon,this.size=this._size}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.image&&delete e.width&&delete e.height,v.merge(this._style,e),v.merge(this._delegate.billboard,e),this)}};g.registerType("dynamic_billboard");var Br=Ur;var Vr=class extends Vt{constructor(e,t){super(),this._position=f.parsePosition(e),this._modelUrl=t,this._delegate=new i.Cesium.Entity({model:{}}),this._state=m.INITIALIZED}get type(){return g.getOverlayType("dynamic_model")}set modelUrl(e){this._modelUrl=e,this._delegate.model.uri=this._modelUrl}get modelUrl(){return this._modelUrl}_mountedHook(){this._sampledPosition.forwardExtrapolationType=i.Cesium.ExtrapolationType.HOLD,this._startTime=i.Cesium.JulianDate.now(),this._sampledPosition.addSample(this._startTime,u.transformWGS84ToCartesian(this._position)),this._delegate.position=this._sampledPosition,this._delegate.orientation=new i.Cesium.VelocityOrientationProperty(this._sampledPosition),this._cache.push(this._startTime),this.modelUrl=this._modelUrl}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.uri,v.merge(this._style,e),v.merge(this._delegate.model,e),this)}};g.registerType("dynamic_model");var jr=Vr;function Pg(a,e,t){let r=i.Cesium.Cartesian3.subtract(a,e,new i.Cesium.Cartesian3),s=i.Cesium.Cartesian3.subtract(t,e,new i.Cesium.Cartesian3),o=i.Cesium.Cartesian3.cross(r,s,r);return i.Cesium.Cartesian3.magnitude(o)*.5}function ye(a){let e=0;if(!Array.isArray(a))return e;a[0]instanceof i.Cesium.Cartesian3||(a=u.transformWGS84ArrayToCartesianArray(a));let t=i.Cesium.CoplanarPolygonGeometry.createGeometry(i.Cesium.CoplanarPolygonGeometry.fromPositions({positions:a,vertexFormat:i.Cesium.VertexFormat.POSITION_ONLY}));if(!t)return e;let r=t.attributes.position.values,s=t.indices;for(let o=0;o<s.length;o+=3){let n=i.Cesium.Cartesian3.unpack(r,s[o]*3,new i.Cesium.Cartesian3),l=i.Cesium.Cartesian3.unpack(r,s[o+1]*3,new i.Cesium.Cartesian3),h=i.Cesium.Cartesian3.unpack(r,s[o+2]*3,new i.Cesium.Cartesian3);e+=Pg(n,l,h)}return e}function qr(a=[],e=0){let t=180,r=90,s=-180,o=-90;if(a.forEach(n=>{t=Math.min(t,n.lng||n.x),r=Math.min(r,n.lat||n.y),s=Math.max(s,n.lng||n.x),o=Math.max(o,n.lat||n.y)}),e>0){let n=Math.abs(s-s),l=Math.abs(o-r);t-=n*e,r-=l*e,s+=n*e,o+=l*e}return{west:t,south:r,east:s,north:o}}function ve(a){if(a&&Array.isArray(a)){let e=0;a.forEach(({alt:s})=>e=Math.max(e,s));let t=i.Cesium.BoundingSphere.fromPoints(u.transformWGS84ArrayToCartesianArray(a)),r=u.transformCartesianToWGS84(t.center);return r.alt=e,r}return new Z}function Yr(a,e){e=e||{};let t=[];for(let r=0;r<a.length-1;r++){let s=bg(a[r],a[r+1],e.count);s&&s.length>0&&(t=t.concat(s))}return t}function bg(a,e,t){if(!a||!e)return null;let r=[];t=t||40;let s=function(M){return 1-2*M+M*M},o=M=>2*M-2*M*M,n=M=>M*M,l,h,c,p,_,w,y=0,d=parseFloat(a.lat),E=parseFloat(e.lat),T=parseFloat(a.lng),b=parseFloat(e.lng);b>T&&b-T>180&&T<0&&(T=360+T,b=360+b),w=0,E===d?(l=0,h=T-b):b===T?(l=Math.PI/2,h=d-E):(l=Math.atan((E-d)/(b-T)),h=(E-d)/Math.sin(l)),w===0&&(w=l+Math.PI/5),c=h/2,_=c*Math.cos(w)+T,p=c*Math.sin(w)+d;for(let M=0;M<t+1;M++){let N=T*s(y)+_*o(y)+b*n(y),H=d*s(y)+p*o(y)+E*n(y),B=a.lng,re=e.lng;r.push([B<0&&re>0?N-360:N,H]),y=y+1/t}return r}function te(a){let e=0;if(a&&Array.isArray(a))for(let t=0;t<a.length-1;t++){let r=u.transformWGS84ToCartographic(a[t]),s=u.transformWGS84ToCartographic(a[t+1]),o=new i.Cesium.EllipsoidGeodesic;o.setEndPoints(r,s);let n=o.surfaceDistance;n=Math.sqrt(Math.pow(n,2)+Math.pow(s.height-r.height,2)),e+=n}return e.toFixed(3)}function we(a,e){let t=a,r=e;if(!t||!r)return 0;a instanceof i.Cesium.Cartesian3||(t=f.parsePosition(a),t=u.transformWGS84ToCartesian(t)),e instanceof i.Cesium.Cartesian3||(r=f.parsePosition(e),r=u.transformWGS84ToCartesian(r));let s=i.Cesium.Transforms.eastNorthUpToFixedFrame(t),o=i.Cesium.Cartesian3.subtract(r,t,new i.Cesium.Cartesian3),n=i.Cesium.Matrix4.multiplyByPointAsVector(i.Cesium.Matrix4.inverse(s,new i.Cesium.Matrix4),o,new i.Cesium.Cartesian3),l=Math.atan2(n.y,n.x)-i.Cesium.Math.PI_OVER_TWO;return l=i.Cesium.Math.TWO_PI-i.Cesium.Math.zeroToTwoPi(l),isNaN(l)?0:l}function ct(a,e,t){return a=parseFloat(a)||0,a>=parseFloat(e)&&a<=parseFloat(t)}function z(a,e){return i.Cesium.Cartesian3.midpoint(a,e,new i.Cesium.Cartesian3)}function Zr(a,e){let t=f.parsePosition(a),r=f.parsePosition(e);t=u.transformWGS84ToCartographic(t),r=u.transformWGS84ToCartographic(r);let s=new i.Cesium.EllipsoidGeodesic(t,r).interpolateUsingFraction(.5);return new Z(i.Cesium.Math.toDegrees(s.longitude),i.Cesium.Math.toDegrees(s.latitude),s.height)}function Xr(a,e,t=0,r=50){let s=[];t=Math.max(+t,100),r=Math.max(+r,50);let o=Math.abs(a.lng-e.lng),n=Math.abs(a.lat-e.lat),l=Math.max(o,n),h=l/r;if(o>n){let c=(e.lat-a.lat)/r;a.lng-e.lng>0&&(h=-h);for(let p=0;p<r;p++){let _=t-Math.pow(-.5*l+Math.abs(h)*p,2)*4*t/Math.pow(l,2),w=a.lng+h*p,y=a.lat+c*p;s.push([w,y,_])}}else{let c=(e.lng-a.lng)/r;a.lat-e.lat>0&&(h=-h);for(let p=0;p<r;p++){let _=t-Math.pow(-.5*l+Math.abs(h)*p,2)*4*t/Math.pow(l,2),w=a.lng+c*p,y=a.lat+h*p;s.push([w,y,_])}}return s.push([e.lng,e.lat,e.alt||0]),s}var{Math:Sg}=i.Cesium,Jr={};v.merge(Jr,Sg,{area:ye,bounds:qr,center:ve,curve:Yr,distance:te,heading:we,isBetween:ct,midCartesian:z,midPosition:Zr,parabola:Xr});var Kr=class a extends g{constructor(e,t){super(),this._delegate=A.create("div","div-icon"),this._position=f.parsePosition(e),this._delegate.setAttribute("id",this._id),v.merge(this._delegate.style,{position:"absolute",top:"0",left:"0"}),this.content=t,this._state=m.INITIALIZED}get type(){return g.getOverlayType("div_icon")}set show(e){this._show=e,this._delegate.style.visibility=this._show?"visible":"hidden"}get show(){return this._show}set position(e){this._position=f.parsePosition(e)}get position(){return this._position}set content(e){if(e&&typeof e=="string")this._delegate.innerHTML=e;else if(e&&e instanceof Element){for(;this._delegate.hasChildNodes();)this._delegate.removeChild(this._delegate.firstChild);this._delegate.appendChild(e)}}get content(){return this._delegate.childNodes||[]}_updateStyle(e,t,r){if(!this._show||!e)return;let s=e.x-this._delegate.offsetWidth/2,o=e.y-this._delegate.offsetHeight/2;this._style.position==="topleft"?(s=e.x-this._delegate.offsetWidth,o=e.y-this._delegate.offsetHeight):this._style.position==="topright"?(s=e.x,o=e.y-this._delegate.offsetHeight):this._style.position==="bottomleft"?(s=e.x-this._delegate.offsetWidth,o=e.y):this._style.position==="bottomright"&&(s=e.x,o=e.y);let n=`translate3d(${Math.round(s)}px,${Math.round(o)}px, 0)`,l="scale3d(1,1,1)",h=this._style.scaleByDistance;if(t&&h){let _=h.near||0,w=h.nearValue||1,y=h.far||Number.MAX_VALUE,d=h.farValue||0,E=t/y;if(t<_)l=`scale3d(${w},${w},1)`;else if(t>y)l=`scale3d(${d},${d},1)`;else{let T=d+E*(w-d);l=`scale3d(${T},${T},1)`}}let c=!0,p=this._style.distanceDisplayCondition;t&&p&&(c=ct(t,p.near||0,p.far||Number.MAX_VALUE)),this._delegate.style.transform=`${n} ${l}`,this._delegate.style.visibility=c&&r?"visible":"hidden"}_onAdd(e){this._layer=e,this._layer.delegate.appendChild(this._delegate);let t={layer:e,overlay:this,position:u.transformWGS84ToCartesian(this._position)};this._delegate.addEventListener("click",()=>{this._overlayEvent.fire(R.CLICK,t)}),this._delegate.addEventListener("mouseover",()=>{this._overlayEvent.fire(R.MOUSE_OVER,t)}),this._delegate.addEventListener("mouseout",()=>{this._overlayEvent.fire(R.MOUSE_OUT,t)}),this._state=m.ADDED}_onRemove(){this._layer&&(this._layer.delegate.removeChild(this._delegate),this._state=m.REMOVED)}setLabel(e,t){return this}setStyle(e){return!e||Object.keys(e).length===0?this:(v.merge(this._style,e),this._style.className&&A.addClass(this._delegate,this._style.className),this)}static fromEntity(e,t){var n;let r,s=i.Cesium.JulianDate.now(),o=u.transformCartesianToWGS84(e.position.getValue(s));return r=new a(o,t),e.billboard&&(r.attr={...(n=e==null?void 0:e.properties)==null?void 0:n.getValue(s)}),r}};g.registerType("div_icon");var Qr=Kr;var $r=class a extends g{constructor(e,t){super(),this._delegate=new i.Cesium.Entity({model:{}}),this._position=f.parsePosition(e),this._modelUrl=t,this._rotateAmount=0,this._state=m.INITIALIZED}get type(){return g.getOverlayType("model")}set position(e){this._position=f.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._rotateAmount===0&&(this._delegate.orientation=i.Cesium.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(this._position.heading),i.Cesium.Math.toRadians(this._position.pitch),i.Cesium.Math.toRadians(this._position.roll))))}get position(){return this._position}set modelUrl(e){this._modelUrl=e,this._delegate.model.uri=this._modelUrl}get modelUrl(){return this._modelUrl}set rotateAmount(e){this._rotateAmount=+e,this._delegate.orientation=new i.Cesium.CallbackProperty(()=>(this._position.heading+=this._rotateAmount,(this._position.heading>=360||this._position.heading<=-360)&&(this._position.heading=0),i.Cesium.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(this._position.heading),i.Cesium.Math.toRadians(this._position.pitch),i.Cesium.Math.toRadians(this._position.roll)))),!1)}get rotateAmount(){return this._rotateAmount}_mountedHook(){this.position=this._position,this.modelUrl=this._modelUrl}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.uri,v.merge(this._style,e),v.merge(this._delegate.model,e),this)}static fromEntity(e,t){let r=i.Cesium.JulianDate.now(),s=u.transformCartesianToWGS84(e.position.getValue(r)),o=new a(s,t);return o.attr={...e.properties.getValue(r)},o}};g.registerType("model");var ze=$r;var es=class extends g{constructor(e,t={}){super(),this._delegate=i.Cesium.I3SDataProvider.fromUrl(e,t),this._state=m.INITIALIZED}get type(){return g.getOverlayType("i3s")}ready(e){return this._delegate.then(e),this}setLabel(e,t){return console.warn("not support this function"),this}};g.registerType("i3s");var ts=es;var is=class extends g{constructor(e,t={}){super(),this._delegate=i.Cesium.Cesium3DTileset.fromUrl(e,t),this._tilesetEvent=new dr(this._delegate),this._tileVisibleCallback=void 0,this._properties=void 0,this._state=m.INITIALIZED}get type(){return g.getOverlayType("tileset")}set show(e){this._show=e,this._delegate.then(t=>{t.show=e})}_bindVisibleEvent(){this._tileVisibleCallback&&this._tileVisibleCallback(),this._tileVisibleCallback=this._delegate.then(e=>{e.tileVisible.addEventListener(this._updateTile,this)})}_updateTile(e){let t=e.content;for(let r=0;r<t.featuresLength;r++){let s=t.getFeature(r);this._properties&&this._properties.length&&this._properties.forEach(o=>{s.hasProperty(o.key)&&s.getProperty(o.key)===o.keyValue&&s.setProperty(o.propertyName,o.propertyValue)})}}ready(e){return this._delegate.then(e),this}setPosition(e){return e=f.parsePosition(e),this._delegate.then(t=>{let r=i.Cesium.Transforms.eastNorthUpToFixedFrame(i.Cesium.Cartesian3.fromDegrees(e.lng,e.lat,e.alt)),s=i.Cesium.Matrix4.fromRotationTranslation(i.Cesium.Matrix3.fromHeadingPitchRoll(new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(e.heading),i.Cesium.Math.toRadians(e.pitch),i.Cesium.Math.toRadians(e.roll))));i.Cesium.Matrix4.multiply(r,s,r),t.root.transform=r}),this}setHeadingPitchRoll(e,t,r){return this._delegate.then(s=>{let o=s.root.transform,n=i.Cesium.Matrix4.fromRotationTranslation(i.Cesium.Matrix3.fromHeadingPitchRoll(new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(e||0),i.Cesium.Math.toRadians(t||0),i.Cesium.Math.toRadians(r||0))));i.Cesium.Matrix4.multiply(o,n,o),s.root.transform=o}),this}setLabel(e,t){return console.warn("not support this function"),this}clampToGround(){return this._delegate.then(e=>{let t=i.Cesium.Cartographic.fromCartesian(e.boundingSphere.center),r=i.Cesium.Cartesian3.fromRadians(t.longitude,t.latitude,t.height),s=i.Cesium.Cartesian3.fromRadians(t.longitude,t.latitude,0),o=i.Cesium.Cartesian3.subtract(s,r,new i.Cesium.Cartesian3);e.modelMatrix=i.Cesium.Matrix4.fromTranslation(o)}),this}setHeight(e,t=!1){return this._delegate.then(r=>{let s=i.Cesium.Cartographic.fromCartesian(r.boundingSphere.center),o=i.Cesium.Cartesian3.fromRadians(s.longitude,s.latitude,s.height),n=i.Cesium.Cartesian3.fromRadians(s.longitude,s.latitude,t?e:s.height+e),l=i.Cesium.Cartesian3.subtract(n,o,new i.Cesium.Cartesian3);r.modelMatrix=i.Cesium.Matrix4.fromTranslation(l)}),this}setScale(e){return this._delegate.then(t=>{let r=t.root.transform;e>0&&e!==1&&i.Cesium.Matrix4.multiplyByUniformScale(r,e,r),t.root.transform=r}),this}setProperties(e){return this._properties=e,this._bindVisibleEvent(),this}setSplitDirection(e){return this._delegate.then(t=>{t.splitDirection=e}),this}setCustomShader(e){return this._delegate.then(t=>{t.customShader=e}),this}setClippingPolygons(e=null,t=!1){if(!e||e.length<3)return this._delegate.then(n=>{n.clippingPolygons&&(n.clippingPolygons.enabled=!1)}),this;let r=i.Cesium.Cartesian3.fromDegreesArray(e),s=new i.Cesium.ClippingPolygon({positions:r}),o=new i.Cesium.ClippingPolygonCollection({polygons:[s],inverse:t});return this._delegate.then(n=>{n.clippingPolygons=o}),this}async setClippingPlanes(e=null,t=!1){if(!e||e.length<2)return this._delegate.then(H=>{H.clippingPlanes&&(H.clippingPlanes.enabled=!1)}),this;let r=i.Cesium.Cartesian3.fromDegrees(e[1].lng,e[1].lat),s=i.Cesium.Cartesian3.fromDegrees(e[0].lng,e[0].lat),o=new i.Cesium.Cartesian3((r.x+s.x)/2,(r.y+s.y)/2,(r.z+s.z)/2),n=i.Cesium.Cartesian3.subtract(s,r,new i.Cesium.Cartesian3),l=i.Cesium.Cartesian3.cross(o,n,new i.Cesium.Cartesian3),h=i.Cesium.Cartesian3.normalize(l,new i.Cesium.Cartesian3),c=await Promise.resolve(this._delegate),p=c.boundingSphere.center,_=c.boundingSphere.radius,w=i.Cesium.Transforms.eastNorthUpToFixedFrame(p),y,d=c.root.transform;d.equals(i.Cesium.Matrix4.IDENTITY)?(d=w,y=i.Cesium.Matrix4.inverse(w,new i.Cesium.Matrix4)):y=i.Cesium.Matrix4.inverse(d,new i.Cesium.Matrix4);let E=new i.Cesium.Cartesian3(p.x-r.x,p.y-r.y,p.z-r.z),T=i.Cesium.Cartesian3.dot(E,h),b=i.Cesium.Matrix4.multiplyByPointAsVector(y,h,new i.Cesium.Cartesian3),M=new i.Cesium.ClippingPlane(b,T),N=new i.Cesium.ClippingPlaneCollection({planes:[M],unionClippingRegions:t});return c.clippingPlanes=N,{center:p,size:_,distance:T,clippingPlanes:c.clippingPlanes}}setStyle(e){return e&&e instanceof i.Cesium.Cesium3DTileStyle&&(this._style=e,this._delegate.then(t=>{t.style=e})),this}on(e,t,r){return this._overlayEvent.on(e,t,r||this),this._tilesetEvent.on(e,t,r||this),this}off(e,t,r){return this._overlayEvent.off(e,t,r||this),this._tilesetEvent.off(e,t,r||this),this}};g.registerType("tileset");var rs=is;var jt=Math.PI/2,ss=class extends g{constructor(e){super(),this._positions=f.parsePositions(e),this._delegate=new i.Cesium.Entity({polygon:{}}),this.headHeightFactor=.18,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this.headTailFactor=.8,this._state=m.INITIALIZED}get type(){return g.getOverlayType("attack_arrow")}set positions(e){this._positions=f.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}get positions(){return this._positions}_getArrowHeadPoints(e,t,r){let s=C.getBaseLength(e),o=s*this.headHeightFactor,n=e[e.length-1];s=C.distance(n,e[e.length-2]);let l=C.distance(t,r);o>l*this.headTailFactor&&(o=l*this.headTailFactor);let h=o*this.headWidthFactor,c=o*this.neckWidthFactor;o=o>s?s:o;let p=o*this.neckHeightFactor,_=C.getThirdPoint(e[e.length-2],n,0,o,!0),w=C.getThirdPoint(e[e.length-2],n,0,p,!0),y=C.getThirdPoint(n,_,jt,h,!1),d=C.getThirdPoint(n,_,jt,h,!0),E=C.getThirdPoint(n,w,jt,c,!1),T=C.getThirdPoint(n,w,jt,c,!0);return[E,y,n,d,T]}_getArrowBodyPoints(e,t,r,s){let o=C.wholeDistance(e),l=C.getBaseLength(e)*s,h=C.distance(t,r),c=(l-h)/2,p=0,_=[],w=[];for(let y=1;y<e.length-1;y++){let d=C.getAngleOfThreePoints(e[y-1],e[y],e[y+1])/2;p+=C.distance(e[y-1],e[y]);let E=(l/2-p/o*c)/Math.sin(d),T=C.getThirdPoint(e[y-1],e[y],Math.PI-d,E,!0),b=C.getThirdPoint(e[y-1],e[y],d,E,!1);_.push(T),w.push(b)}return _.concat(w)}_getHierarchy(){let e=f.parsePolygonCoordToArray(this._positions)[0],t=e[0],r=e[1];C.isClockWise(e[0],e[1],e[2])&&(t=e[1],r=e[0]);let o=[C.mid(t,r)].concat(e.slice(2)),n=this._getArrowHeadPoints(o,t,r),l=n[0],h=n[4],c=C.distance(t,r)/C.getBaseLength(o),p=this._getArrowBodyPoints(o,l,h,c),_=p.length,w=[t].concat(p.slice(0,_/2));w.push(l);let y=[r].concat(p.slice(_/2,_));return y.push(h),w=C.getQBSplinePoints(w),y=C.getQBSplinePoints(y),new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(f.parsePositions(w.concat(n,y.reverse()))))}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.polygon,e),this)}};g.registerType("attack_arrow");var Fe=ss;var Q=Math.PI/2,os=class extends g{constructor(e){super(),this._positions=f.parsePositions(e),this._delegate=new i.Cesium.Entity({polygon:{}}),this.headHeightFactor=.25,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this._state=m.INITIALIZED}get type(){return g.getOverlayType("double_arrow")}set positions(e){this._positions=f.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}get positions(){return this._positions}_getArrowPoints(e,t,r,s){let o=C.mid(e,t),n=C.distance(o,r),l=C.getThirdPoint(r,o,0,n*.3,!0),h=C.getThirdPoint(r,o,0,n*.5,!0);l=C.getThirdPoint(o,l,Q,n/5,s),h=C.getThirdPoint(o,h,Q,n/4,s);let c=[o,l,h,r],p=this._getArrowHeadPoints(c),_=p[0],w=p[4],y=C.distance(e,t)/C.getBaseLength(c)/2,d=this._getArrowBodyPoints(c,_,w,y),E=d.length,T=d.slice(0,E/2),b=d.slice(E/2,E);return T.push(_),b.push(w),T=T.reverse(),T.push(t),b=b.reverse(),b.push(e),T.reverse().concat(p,b)}_getArrowHeadPoints(e){let r=C.getBaseLength(e)*this.headHeightFactor,s=e[e.length-1],o=r*this.headWidthFactor,n=r*this.neckWidthFactor,l=r*this.neckHeightFactor,h=C.getThirdPoint(e[e.length-2],s,0,r,!0),c=C.getThirdPoint(e[e.length-2],s,0,l,!0),p=C.getThirdPoint(s,h,Q,o,!1),_=C.getThirdPoint(s,h,Q,o,!0),w=C.getThirdPoint(s,c,Q,n,!1),y=C.getThirdPoint(s,c,Q,n,!0);return[w,p,s,_,y]}_getArrowBodyPoints(e,t,r,s){let o=C.wholeDistance(e),l=C.getBaseLength(e)*s,h=C.distance(t,r),c=(l-h)/2,p=0,_=[],w=[];for(let y=1;y<e.length-1;y++){let d=C.getAngleOfThreePoints(e[y-1],e[y],e[y+1])/2;p+=C.distance(e[y-1],e[y]);let E=(l/2-p/o*c)/Math.sin(d),T=C.getThirdPoint(e[y-1],e[y],Math.PI-d,E,!0),b=C.getThirdPoint(e[y-1],e[y],d,E,!1);_.push(T),w.push(b)}return _.concat(w)}_getTempPoint4(e,t,r){let s=C.mid(e,t),o=C.distance(s,r),n=C.getAngleOfThreePoints(e,s,r),l,h,c,p;return n<Q?(h=o*Math.sin(n),c=o*Math.cos(n),p=C.getThirdPoint(e,s,Q,h,!1),l=C.getThirdPoint(s,p,Q,c,!0)):n>=Q&&n<Math.PI?(h=o*Math.sin(Math.PI-n),c=o*Math.cos(Math.PI-n),p=C.getThirdPoint(e,s,Q,h,!1),l=C.getThirdPoint(s,p,Q,c,!1)):n>=Math.PI&&n<Math.PI*1.5?(h=o*Math.sin(n-Math.PI),c=o*Math.cos(n-Math.PI),p=C.getThirdPoint(e,s,Q,h,!0),l=C.getThirdPoint(s,p,Q,c,!0)):(h=o*Math.sin(Math.PI*2-n),c=o*Math.cos(Math.PI*2-n),p=C.getThirdPoint(e,s,Q,h,!0),l=C.getThirdPoint(s,p,Q,c,!1)),l}_getHierarchy(){let e=this._positions.length,t,r,s=f.parsePolygonCoordToArray(this._positions)[0],o=s[0],n=s[1],l=s[2];e===3?t=this._getTempPoint4(o,n,l):t=s[3],e===3||e===4?r=C.mid(o,n):r=s[4];let h,c;C.isClockWise(o,n,l)?(h=this._getArrowPoints(o,r,t,!1),c=this._getArrowPoints(r,n,l,!0)):(h=this._getArrowPoints(n,r,l,!1),c=this._getArrowPoints(r,o,t,!0));let p=h.length,_=(p-5)/2,w=h.slice(0,_),y=h.slice(_,_+5),d=h.slice(_+5,p),E=c.slice(0,_),T=c.slice(_,_+5),b=c.slice(_+5,p);E=C.getBezierPoints(E);let M=C.getBezierPoints(b.concat(w.slice(1)));return d=C.getBezierPoints(d),new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(f.parsePositions(E.concat(T,M,y,d))))}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.polygon,e),this)}};g.registerType("double_arrow");var pt=os;var qh=Math.PI/2,as=class extends g{constructor(e){super(),this._positions=f.parsePositions(e),this._delegate=new i.Cesium.Entity({polygon:{}}),this.tailWidthFactor=.15,this.neckWidthFactor=.2,this.headWidthFactor=.25,this.headAngle=Math.PI/8.5,this.neckAngle=Math.PI/13,this._state=m.INITIALIZED}get type(){return g.getOverlayType("fine_arrow")}set positions(e){this._positions=f.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}get positions(){return this._positions}_getHierarchy(){let e=f.parsePolygonCoordToArray(this._positions)[0],t=e[0],r=e[1],s=C.getBaseLength(e),o=s*this.tailWidthFactor,n=s*this.neckWidthFactor,l=s*this.headWidthFactor,h=C.getThirdPoint(r,t,qh,o,!0),c=C.getThirdPoint(r,t,qh,o,!1),p=C.getThirdPoint(t,r,this.headAngle,l,!1),_=C.getThirdPoint(t,r,this.headAngle,l,!0),w=C.getThirdPoint(t,r,this.neckAngle,n,!1),y=C.getThirdPoint(t,r,this.neckAngle,n,!0);return new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(f.parsePositions([h,w,p,r,_,y,c])))}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.polygon,e),this)}};g.registerType("fine_arrow");var dt=as;var Ag=Math.PI/2,Yh=100,ns=class extends g{constructor(e){super(),this._positions=f.parsePositions(e),this._delegate=new i.Cesium.Entity({polygon:{}}),this.t=.4,this._state=m.INITIALIZED}get type(){return g.getOverlayType("gathering_place")}set positions(e){this._positions=f.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}get positions(){return this._positions}_getHierarchy(){let e=f.parsePolygonCoordToArray(this._positions)[0];if(this._positions.length===2){let n=C.mid(e[0],e[1]),l=C.distance(e[0],n)/.9,h=C.getThirdPoint(e[0],n,Ag,l,!0);e=[e[0],h,e[1]]}let t=C.mid(e[0],e[2]);e.push(t,e[0],e[1]);let r=[];for(let n=0;n<e.length-2;n++){let l=e[n],h=e[n+1],c=e[n+2],p=C.getBisectorNormals(this.t,l,h,c);r=r.concat(p)}let s=r.length;r=[r[s-1]].concat(r.slice(0,s-1));let o=[];for(let n=0;n<e.length-2;n++){let l=e[n],h=e[n+1];o.push(l);for(let c=0;c<=Yh;c++){let p=C.getCubicValue(c/Yh,l,r[n*2],r[n*2+1],h);o.push(p)}o.push(h)}return new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(f.parsePositions(o)))}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.polygon,e),this)}};g.registerType("gathering_place");var mt=ns;var ls=class extends Fe{constructor(e){super(e),this._delegate=new i.Cesium.Entity({polygon:{}}),this.headHeightFactor=.18,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this.tailWidthFactor=.1,this.headTailFactor=.8,this.swallowTailFactor=1,this._state=m.INITIALIZED}get type(){return g.getOverlayType("tailed_attack_arrow")}set positions(e){this._positions=f.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}get positions(){return this._positions}_getHierarchy(){let e=f.parsePolygonCoordToArray(this._positions)[0],t=e[0],r=e[1];C.isClockWise(e[0],e[1],e[2])&&(t=e[1],r=e[0]);let o=[C.mid(t,r)].concat(e.slice(2)),n=this._getArrowHeadPoints(o,t,r),l=n[0],h=n[4],c=C.distance(t,r),p=C.getBaseLength(o),_=p*this.tailWidthFactor*this.swallowTailFactor,w=C.getThirdPoint(o[1],o[0],0,_,!0),y=c/p,d=this._getArrowBodyPoints(o,l,h,y),E=d.length,T=[t].concat(d.slice(0,E/2));T.push(l);let b=[r].concat(d.slice(E/2,E));return b.push(h),T=C.getQBSplinePoints(T),b=C.getQBSplinePoints(b),new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(f.parsePositions(T.concat(n,b.reverse(),[w,T[0]]))))}};g.registerType("tailed_attack_arrow");var ut=ls;var hs=class extends g{constructor(e,t){super(),this._position=f.parsePosition(e),this._icon=t,this._size=[32,32],this._delegate={position:void 0,image:void 0,width:0,height:0},this._state=m.INITIALIZED}get type(){return g.getOverlayType("billboard_primitive")}set position(e){this._position=f.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}set icon(e){this._icon=e,this._delegate.image=this._icon}get icon(){return this._icon}set size(e){if(!Array.isArray(e))throw new Error("Billboard Primitive: the size invalid");this._size=e,this._delegate.width=this._size[0]||32,this._delegate.height=this._size[1]||32}get size(){return this._size}_mountedHook(){this.position=this._position,this.icon=this._icon,this.size=this._size}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position&&delete e.image&&delete e.width&&delete e.height,v.merge(this._style,e),v.merge(this._delegate,e),this)}};g.registerType("billboard_primitive");var _t=hs;var Zh={maxOffsetY:10,offsetAmount:.1},cs=class extends _t{constructor(e,t){super(e,t),this._currentOffset=new i.Cesium.Cartesian2(0,0),this._isUp=!0,this._state=m.INITIALIZED}get type(){return g.getOverlayType("bounce_billboard_primitive")}update(e){var s,o;if(!this._show)return;let t=((s=this._style)==null?void 0:s.maxOffsetY)||Zh.maxOffsetY,r=((o=this._style)==null?void 0:o.offsetAmount)||Zh.offsetAmount;this._currentOffset.y>=0?this._isUp=!0:this._currentOffset.y<=-t&&(this._isUp=!1),this._currentOffset.y+=r*(this._isUp?-1:1),this._delegate.pixelOffset=this._currentOffset}destroy(){return i.Cesium.destroyObject(this)}};g.registerType("bounce_billboard_primitive");var ps=cs;var ds=class extends g{constructor(e,t){super(),this._position=f.parsePosition(e),this._text=t,this._delegate={position:void 0,text:void 0},this._state=m.INITIALIZED}get type(){return g.getOverlayType("label_primitive")}set position(e){this._position=f.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}set text(e){this._text=e,this._delegate.text=this._text}get text(){return this._text}_mountedHook(){this.position=this._position,this.text=this._text}setLabel(e,t){return this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position&&delete e.text,v.merge(this._style,e),v.merge(this._delegate,e),this)}};g.registerType("label_primitive");var ft=ds;var Xh={maxOffsetY:10,offsetAmount:.1},ms=class extends ft{constructor(e,t){super(e,t),this._currentOffset=new i.Cesium.Cartesian2(0,0),this._isUp=!0,this._state=m.INITIALIZED}get type(){return g.getOverlayType("bounce_label_primitive")}update(e){var s,o;if(!this._show)return;let t=((s=this._style)==null?void 0:s.maxOffsetY)||Xh.maxOffsetY,r=((o=this._style)==null?void 0:o.offsetAmount)||Xh.offsetAmount;this._currentOffset.y>=0?this._isUp=!0:this._currentOffset.y<=-t&&(this._isUp=!1),this._currentOffset.y+=r*(this._isUp?-1:1),this._delegate.pixelOffset=this._currentOffset}destroy(){return i.Cesium.destroyObject(this)}};g.registerType("bounce_label_primitive");var us=ms;var _s=class extends g{constructor(e){super(),this._position=f.parsePosition(e),this._delegate={position:void 0,scale:{x:12,y:8}},this._state=m.INITIALIZED}get type(){return g.getOverlayType("cloud_primitive")}set position(e){this._position=f.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}_mountedHook(){this.position=this._position}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position,v.merge(this._style,e),v.merge(this._delegate,e),this)}};g.registerType("cloud_primitive");var fs=_s;var Mg={minRadius:10,minHeight:30,color:i.Cesium.Color.RED,slices:128,speed:10},gs=class extends g{constructor(e,t,r){super(),this._center=f.parsePosition(e),this._delegate=void 0,this._height=r,this._radius=t,this._currentHeight=r||0,this._currentRadius=10,this._style={...Mg},this._state=m.INITIALIZED}get type(){return g.getOverlayType("diffuse_wall_primitive")}set center(e){this._center=f.parsePosition(e)}get center(){return this._center}set radius(e){this._radius=e}get radius(){return this._radius}set height(e){this._height=e}get height(){return this._height}_getPositions(){let e=[],t=i.Cesium.Transforms.eastNorthUpToFixedFrame(u.transformWGS84ToCartesian(this._center));for(let r=0;r<this._style.slices;r++){let s=r/this._style.slices*i.Cesium.Math.TWO_PI,o=Math.cos(s),n=Math.sin(s),l=new i.Cesium.Cartesian3(o*this._currentRadius,n*this._currentRadius,0);e.push(i.Cesium.Matrix4.multiplyByPoint(t,l,new i.Cesium.Cartesian3))}return e.push(e[0]),e}_getHeights(e,t){let r=[];for(let s=0;s<e;s++)r.push(t);return r}update(e){var s;if(this._delegate=this._delegate&&this._delegate.destroy(),this._currentRadius+=this._radius/this._style.speed/20,this._currentHeight-=this._height/this._style.speed/20,(this._currentRadius>this._radius||this._currentHeight<this._style.minHeight)&&(this._currentRadius=this._style.minRadius,this._currentHeight=this._height),!this._style.slices||this._style.slices<3)return!1;let t=this._getPositions();if(!t||!t.length)return!1;let r=new i.Cesium.WallGeometry({positions:t,minimumHeights:this._getHeights(t.length,0),maximumHeights:this._getHeights(t.length,this._currentHeight)});this._delegate=new i.Cesium.Primitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:r}),appearance:new i.Cesium.MaterialAppearance({material:i.Cesium.Material.fromType("WallDiffuse",{color:(s=this._style)==null?void 0:s.color}),flat:!0}),asynchronous:!1}),this._delegate.update(e)}setStyle(e){return!e||Object.keys(e).length===0?this:(v.merge(this._style,e),this)}destroy(){return i.Cesium.destroyObject(this)}};g.registerType("diffuse_wall_primitive");var ys=gs;var vs=class extends g{constructor(e,t){super(),this._position=f.parsePosition(e),this._radius=t||{x:10,y:10,z:10},this._delegate=new i.Cesium.Primitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:{}})}),this._state=m.INITIALIZED}get type(){return g.getOverlayType("elec_ellipsoid_primitive")}set position(e){this._position=f.parsePosition(e),this._delegate.geometryInstances.modelMatrix=i.Cesium.Transforms.eastNorthUpToFixedFrame(u.transformWGS84ToCartesian(this._position))}get position(){return this._position}set radius(e){this._radius=e,this._delegate.geometryInstances.geometry=new i.Cesium.EllipsoidGeometry({radii:this._radius,maximumCone:i.Cesium.Math.PI_OVER_TWO})}get radius(){return this._radius}_setAppearance(){var e,t;this._style&&(this._delegate.appearance=new i.Cesium.MaterialAppearance({material:i.Cesium.Material.fromType("EllipsoidElectric",{color:((e=this._style)==null?void 0:e.color)||i.Cesium.Color.GREEN,speed:((t=this._style)==null?void 0:t.speed)||5})}))}_mountedHook(){this.radius=this._radius,this.position=this._position,!this._delegate.appearance&&this._setAppearance()}setLabel(e,t){return this}setStyle(e={}){return Object.keys(e).length===0?this:(v.merge(this._style,e),this._setAppearance(),this)}};g.registerType("elec_ellipsoid_primitive");var ws=vs;var Cs=class extends g{constructor(e,t=1){super(),this._positions=f.parsePositions(e),this._width=t,this._delegate=new i.Cesium.Primitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:{}})}),this._state=m.INITIALIZED}get type(){return g.getOverlayType("flow_line_primitive")}set positions(e){this._positions=f.parsePositions(e),this._delegate.geometryInstances.geometry=new i.Cesium.PolylineGeometry({positions:u.transformWGS84ArrayToCartesianArray(this._positions),width:this._width})}get positions(){return this._positions}_setAppearance(){var e,t,r,s;this._delegate.appearance=new i.Cesium.PolylineMaterialAppearance({material:i.Cesium.Material.fromType("PolylineFlow",{color:((e=this._style)==null?void 0:e.color)||new i.Cesium.Color(1,0,0,.7),speed:((t=this._style)==null?void 0:t.speed)||1,percent:((r=this._style)==null?void 0:r.percent)||.03,gradient:((s=this._style)==null?void 0:s.gradient)||.1})})}_mountedHook(){this.positions=this._positions,!this._delegate.appearance&&this._setAppearance()}setLabel(e,t){return this}setStyle(e={}){return Object.keys(e).length===0?this:(v.merge(this._style,e),e.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};g.registerType("flow_line_primitive");var Ts=Cs;var Jh="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAEACAYAAADSoXR2AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbW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ywG5o1dX4ClNYxT7IISgJPsXGpLut9MCWU0S5bqkmdAa3LQEwcZDAfkZ3tthQfkwNkVeeD6kiuaUabcp6DpS9YyalrAdQ8bT1EFQVUabarND9fNuyB2gREYAABCAAAQhAAAIQoM770UgBXARCIr/koDogVlzgrWuxemBKd0m4JnBed0+5ZQ9gn3BK5LK+P4y5ewoB8DFiKO91COLFfwVuTCZV1hSoYw1APZCsFIkbN1Haaa87wwiKQe6eT27AEX6esPVVd8/kOOdAz/oz9FE0p+uGIKUeqE5C8xgSKiICEIAABCAAAQhAAAIQgAAEIAABCECA6AA+sbkREyDUUYlKD6ggZwzRkr8tewBhusisv+0in5qE/hFchoZTE0TL4p8sTbtIpyahQ4Ag5fKpSVBmfdDECvQTZjoM0U9N6KgkwH9xY7PXpPiCmq5yuaLVldHIO7jgNi5XfOEhCqNh9udHV/RnC5YAUDTftdV4/ivvwEoRVS9XXPWa1FIT5ird8jpSB+BDN3rO8AaGMnGy0I0QRYTvdk6NkOsucuhGCMAgI8Q0isaHbmAevNMhiD4P6iZhstANGiQE2PEGCRo2NcgAsQDwKnxWFdlT17/duWU1BJmuHz6A5bwbEsCScgh+qAHit3Jr1oooOPExdRBLbeJjSpuwuy30AAH+CDAAPH5ltESNYl4AAAAASUVORK5CYII=";var Ig={color:i.Cesium.Color.ORANGE},xs=class extends g{constructor(e,t,r,s){super(),this._center=f.parsePosition(e),this._length=t||100,this._topRadius=r||1,this._bottomRadius=s||50,this._delegate=new i.Cesium.PrimitiveCollection,this._style={...Ig},this._state=m.INITIALIZED}get type(){return g.getOverlayType("light-cylinder-primitive")}set center(e){this._center=f.parsePosition(e),this._updatePrimitives()}get center(){return this._center}set length(e){this._length=e,this._updatePrimitives()}get length(){return this._length}set topRadius(e){this._topRadius=e,this._updatePrimitives()}get topRadius(){return this._topRadius}set bottomRadius(e){this._bottomRadius=e,this._updatePrimitives()}get bottomRadius(){return this._bottomRadius}_computeEllipsePositions(e,t){let r=i.Cesium.EllipseGeometryLibrary.computeEllipsePositions({center:u.transformWGS84ToCartesian(e),semiMajorAxis:t,semiMinorAxis:t,rotation:0,granularity:.005},!1,!0),s=i.Cesium.Cartesian3.unpackArray(r.outerPositions);return s.push(s[0]),s}_createCylinderInstance(e,t,r){let s=t.slice(),o=t.length,n=2*o,l=[],h=1/(o-1),c=[],p=[],_=(y,d=0)=>{let E=i.Cesium.Cartographic.fromCartesian(y);return E.height+=d,i.Cesium.Cartographic.toCartesian(E)};for(let y=0;y<o;y++){p.push(_(e[y],r)),l.push(y*h,0);let d=y+1,E=(y+1)%o,T=n-d;c.push(T-1,T,y),c.push(y,E,T-1)}for(let y in p)s.push(p[o-y-1]),l.push(1-y*h,1);let w=i.Cesium.PolygonGeometry.createGeometry(new i.Cesium.PolygonGeometry({polygonHierarchy:new i.Cesium.PolygonHierarchy(s),perPositionHeight:!0}));return w.indices=c,w.attributes.st.values=l,new i.Cesium.GeometryInstance({geometry:w})}_getCircleImage(){let e=document.createElement("canvas");e.width=512,e.height=512;let t=e.getContext("2d");return t.fillStyle="rgba(255,255,255,0)",t.strokeStyle="rgba(255, 255, 255,255)",t.setLineDash([50,50]),t.lineWidth=30,t.beginPath(),t.arc(256,256,150,0,Math.PI*2,!0),t.stroke(),t.restore(),e}_getParticlesImage(e){let t=document.createElement("canvas");t.width=64,t.height=256;let r=t.getContext("2d");return r.clearRect(0,0,64,256),r.drawImage(e,0,0),r.drawImage(e,33,0),t}_updatePrimitives(){this._delegate.removeAll();let e=this._center.alt===0,t=this._computeEllipsePositions(this._center,this._topRadius),r=this._computeEllipsePositions(this._center,this._bottomRadius*.7),s=this._computeEllipsePositions(this._center,this._bottomRadius),o={geometryInstances:new i.Cesium.GeometryInstance({geometry:new i.Cesium.PolygonGeometry({polygonHierarchy:new i.Cesium.PolygonHierarchy(this._computeEllipsePositions(this._center,this._bottomRadius*2)),perPositionHeight:!e}),asynchronous:!1})},n=e?new i.Cesium.GroundPrimitive(o):new i.Cesium.Primitive(o);n.appearance=new i.Cesium.EllipsoidSurfaceAppearance({material:i.Cesium.Material.fromType(i.Cesium.Material.CircleRingType,{color:this._style.color})});let l=e?new i.Cesium.GroundPrimitive(o):new i.Cesium.Primitive(o);l.appearance=new i.Cesium.EllipsoidSurfaceAppearance({material:i.Cesium.Material.fromType(i.Cesium.Material.CircleRotateType,{color:this._style.color,image:this._getCircleImage()})});let h=new i.Cesium.Primitive({geometryInstances:this._createCylinderInstance(t,r,this._length),appearance:new i.Cesium.EllipsoidSurfaceAppearance({material:i.Cesium.Material.fromType(i.Cesium.Material.CylinderFadeType,{color:this._style.color})}),asynchronous:!1});e?i.Cesium.GroundPrimitive.initializeTerrainHeights().then(()=>{this._delegate.add(n),this._delegate.add(l),this._delegate.add(h)}):(this._delegate.add(n),this._delegate.add(l),this._delegate.add(h)),i.Cesium.Resource.fetchImage({url:Jh}).then(c=>{let p=new i.Cesium.Primitive({geometryInstances:this._createCylinderInstance(t,s,this._length),appearance:new i.Cesium.EllipsoidSurfaceAppearance({material:i.Cesium.Material.fromType(i.Cesium.Material.CylinderParticlesType,{color:this._style.color,image:this._getParticlesImage(c)})}),asynchronous:!1});this._delegate.add(p)})}_mountedHook(){this.center=this._center}update(e){this._delegate.update(e)}setStyle(e){return!e||Object.keys(e).length===0?this:(v.merge(this._style,e),this)}destroy(){return i.Cesium.destroyObject(this)}};g.registerType("light-cylinder-primitive");var Es=xs;var Ps=class extends g{constructor(e,t){super(),this._position=f.parsePosition(e),this._modelUrl=t,this._delegate=i.Cesium.Model.fromGltfAsync({url:t}),this._modelEvent=new ur(this._delegate),this._state=m.INITIALIZED}get type(){return g.getOverlayType("model_primitive")}set position(e){this._position=f.parsePosition(e);let t=u.transformWGS84ToCartesian(this._position);this._delegate.then(r=>{r.modelMatrix=i.Cesium.Transforms.headingPitchRollToFixedFrame(t,new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(this._position.heading),i.Cesium.Math.toRadians(this._position.pitch),i.Cesium.Math.toRadians(this._position.roll)))})}get position(){return this._position}set modelUrl(e){this._modelUrl=e,this._delegate=i.Cesium.Model.fromGltfAsync({url:e,...this._style}),this.position=this._position}get modelUrl(){return this._modelUrl}_mountedHook(){this.position=this._position}setStyle(e){return!e||Object.keys(e).length===0?this:(v.merge(this._style,e),this._delegate.then(t=>{v.merge(t,e)}),this)}on(e,t,r){return this._overlayEvent.on(e,t,r||this),this._modelEvent.on(e,t,r||this),this}off(e,t,r){return this._overlayEvent.off(e,t,r||this),this._modelEvent.off(e,t,r||this),this}};g.registerType("model_primitive");var bs=Ps;var Kh={pixelSize:8,outlineColor:i.Cesium.Color.BLUE,outlineWidth:2},Ss=class extends g{constructor(e){super(),this._position=f.parsePosition(e),this._delegate={position:void 0},this._state=m.INITIALIZED}get type(){return g.getOverlayType("point_primitive")}set position(e){this._position=f.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}_mountedHook(){this.position=this._position,v.merge(this._delegate,Kh,this._style)}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position,v.merge(this._style,e),v.merge(this._delegate,Kh,this._style),this)}};g.registerType("point_primitive");var As=Ss;var Ms=class extends g{constructor(e){super(),this._positions=f.parsePositions(e),this._delegate={positions:[]},this._state=m.INITIALIZED}get type(){return g.getOverlayType("polyline_primitive")}set positions(e){this._positions=f.parsePositions(e),this._delegate.positions=u.transformWGS84ArrayToCartesianArray(this._positions)}get positions(){return this._positions}get center(){return ve(this._positions)}get distance(){return te(this._positions)}_mountedHook(){this.positions=this._positions}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate,e),this)}};g.registerType("polyline_primitive");var Is=Ms;var Ds=class extends g{constructor(e,t){super(),this._position=f.parsePosition(e),this._radius=t,this._delegate=new i.Cesium.GroundPrimitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:{}})}),this._state=m.INITIALIZED}get type(){return g.getOverlayType("scan_circle_primitive")}set position(e){this._position=f.parsePosition(e),this._delegate.geometryInstances.geometry=new i.Cesium.EllipseGeometry({center:u.transformWGS84ToCartesian(this._position),semiMajorAxis:this._radius,semiMinorAxis:this._radius})}get position(){return this._position}set radius(e){this._radius=e,this._delegate.geometryInstances.geometry.semiMajorAxis=this._radius,this._delegate.geometryInstances.geometry.semiMinorAxis=this._radius}get radius(){return this._radius}_setAppearance(){var e,t;this._style&&(this._delegate.appearance=new i.Cesium.MaterialAppearance({material:i.Cesium.Material.fromType("CircleScan",{color:((e=this._style)==null?void 0:e.color)||i.Cesium.Color.WHITE,speed:((t=this._style)==null?void 0:t.speed)||10})}))}_mountedHook(){this.position=this._position,!this._delegate.appearance&&this._setAppearance()}setStyle(e={}){return Object.keys(e).length===0?this:(v.merge(this._style,e),e.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};g.registerType("scan_circle_primitive");var Ls=Ds;var Rs=class extends g{constructor(e,t=1){super(),this._positions=f.parsePositions(e),this._width=t,this._delegate=new i.Cesium.Primitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:{}})}),this._state=m.INITIALIZED}get type(){return g.getOverlayType("trail_line_primitive")}set positions(e){this._positions=f.parsePositions(e),this._delegate.geometryInstances.geometry=new i.Cesium.PolylineGeometry({positions:u.transformWGS84ArrayToCartesianArray(this._positions),width:this._width})}get positions(){return this._positions}_setAppearance(){var e,t;this._delegate.appearance=new i.Cesium.PolylineMaterialAppearance({material:i.Cesium.Material.fromType("PolylineTrail",{color:((e=this._style)==null?void 0:e.color)||new i.Cesium.Color(1,0,0,.7),speed:((t=this._style)==null?void 0:t.speed)||5})})}_mountedHook(){this.positions=this._positions,!this._delegate.appearance&&this._setAppearance()}setStyle(e={}){return Object.keys(e).length===0?this:(v.merge(this._style,e),e.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};g.registerType("trail_line_primitive");var Os=Rs;var ks=class extends g{constructor(e,t){super(),this._positions=f.parsePositions(e),this._delegate=new i.Cesium.GroundPrimitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:{}})}),this._video=t,this._state=m.INITIALIZED}get type(){return g.getOverlayType("video_primitive")}set positions(e){var t,r,s,o;this._positions=f.parsePositions(e),this._delegate.geometryInstances.geometry=i.Cesium.PolygonGeometry.fromPositions({positions:u.transformWGS84ArrayToCartesianArray(this._positions),height:(t=this._style)==null?void 0:t.height,extrudedHeight:(r=this._style)==null?void 0:r.extrudedHeight,closeTop:(s=this._style)==null?void 0:s.closeTop,closeBottom:(o=this._style)==null?void 0:o.closeBottom,vertexFormat:i.Cesium.EllipsoidSurfaceAppearance.VERTEX_FORMAT})}get positions(){return this._positions}set video(e){this._video=e,this._setAppearance()}get video(){return this._video}_setAppearance(){this._delegate.appearance=new i.Cesium.EllipsoidSurfaceAppearance({material:i.Cesium.Material.fromType("Image",{image:this._video})})}_mountedHook(){this.positions=this._positions,this.video=this._video}setStyle(e){var t;return Object.keys(e).length===0?this:(v.merge(this._style,e),(t=this._style)!=null&&t.classificationType&&(this._delegate.classificationType=this._style.classificationType),this)}};g.registerType("video_primitive");var zs=ks;var Km=Fh(Jm(),1),ao=class extends g{constructor(e,t,r){super(),this._viewer=e,this._horizontalViewAngle=t.horizontalViewAngle||60,this._verticalViewAngle=t.verticalViewAngle||40,this._viewPosition=t.viewPosition,this._viewPositionEnd=t.viewPositionEnd,this._viewDistance=null,this._lightCamera=null,this._viewHeading=null,this._viewPitch=null,this._orientation=null,this._outLinePrimitive=null,this._outline=!1,this._delegate=new i.Cesium.Primitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:{}})}),this._video=r,this._init(),this._state=m.INITIALIZED}get type(){return g.getOverlayType("video_primitive")}set positions(e){this._createGeometry()}get positions(){return this._positions}set video(e){this._video=e,this._setAppearance()}get video(){return this._video}set outline(e){this._outline=e,this._outLinePrimitive.show=e}get outline(){return this._outline}_init(){this._viewDistance=i.Cesium.Cartesian3.distance(this._viewPosition,this._viewPositionEnd),this._viewHeading=this._getHeading(this._viewPosition,this._viewPositionEnd),this._viewPitch=this._getPitch(this._viewPosition,this._viewPositionEnd),this._createLightCamera()}_createLightCamera(){this._lightCamera=new i.Cesium.Camera(this._viewer.scene),this._lightCamera.position=this._viewPosition,this._lightCamera.frustum.near=this._viewDistance*1e-4,this._lightCamera.frustum.far=this._viewDistance;let e=i.Cesium.Math.toRadians(this._horizontalViewAngle),t=i.Cesium.Math.toRadians(this._verticalViewAngle),r=this._viewDistance*Math.tan(e/2)*2/(this._viewDistance*Math.tan(t/2)*2);this._lightCamera.frustum.aspectRatio=r,e>t?this._lightCamera.frustum.fov=e:this._lightCamera.frustum.fov=t,this._lightCamera.setView({destination:this._viewPosition,orientation:{heading:i.Cesium.Math.toRadians(this._viewHeading||0),pitch:i.Cesium.Math.toRadians(this._viewPitch||0),roll:0}})}_createGeometry(){let e=new i.Cesium.Cartesian3,t=new i.Cesium.Matrix3,r=new i.Cesium.Quaternion,s=this._lightCamera.directionWC,o=this._lightCamera.upWC,n=this._lightCamera.rightWC;n=i.Cesium.Cartesian3.negate(n,e);let l=t;i.Cesium.Matrix3.setColumn(l,0,n,l),i.Cesium.Matrix3.setColumn(l,1,o,l),i.Cesium.Matrix3.setColumn(l,2,s,l),this._orientation=i.Cesium.Quaternion.fromRotationMatrix(l,r);let h=(0,Km.default)(this._lightCamera.frustum);h.near=h.far-.01,this._delegate.geometryInstances.geometry=new i.Cesium.FrustumGeometry({frustum:h,origin:this._viewPosition,orientation:this._orientation}),this._setOutlineGeometry()}_setAppearance(){this._delegate.appearance=new i.Cesium.EllipsoidSurfaceAppearance({material:i.Cesium.Material.fromType("Image",{image:this._video})})}_mountedHook(){this.positions=this._positions,this.video=this._video}setStyle(e){var t;return Object.keys(e).length===0?this:(v.merge(this._style,e),(t=this._style)!=null&&t.classificationType&&(this._delegate.classificationType=this._style.classificationType),this)}_getHeading(e,t){let r=new i.Cesium.Cartesian3,s=i.Cesium.Transforms.eastNorthUpToFixedFrame(e);return i.Cesium.Matrix4.inverse(s,s),i.Cesium.Matrix4.multiplyByPoint(s,t,r),i.Cesium.Cartesian3.normalize(r,r),i.Cesium.Math.toDegrees(Math.atan2(r.x,r.y))}_getPitch(e,t){let r=new i.Cesium.Cartesian3,s=i.Cesium.Transforms.eastNorthUpToFixedFrame(e);return i.Cesium.Matrix4.inverse(s,s),i.Cesium.Matrix4.multiplyByPoint(s,t,r),i.Cesium.Cartesian3.normalize(r,r),i.Cesium.Math.toDegrees(Math.asin(r.z))}_setOutlineGeometry(e=""){let t=new i.Cesium.GeometryInstance({geometry:new i.Cesium.FrustumOutlineGeometry({frustum:this._lightCamera.frustum,origin:this._viewPosition,orientation:this._orientation}),attributes:{color:i.Cesium.ColorGeometryInstanceAttribute.fromColor(e?i.Cesium.Color.fromCssColorString(e):i.Cesium.Color.BLUE)}});this._outLinePrimitive=new i.Cesium.Primitive({geometryInstances:[t],appearance:new i.Cesium.PerInstanceColorAppearance({flat:!0})}),this._outLinePrimitive.show=this._outline,this._viewer.scene.primitives.add(this._outLinePrimitive)}};g.registerType("video_projection_primitive");var no=ao;var lo=class extends g{constructor(e,t=[]){super(),this._positions=f.parsePositions(e),this._holes=t.map(r=>f.parsePositions(r)),this._delegate=new i.Cesium.Primitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:{}}),asynchronous:!0}),this._state=m.INITIALIZED}get type(){return g.getOverlayType("water_primitive")}set positions(e){var t,r,s,o;this._positions=f.parsePositions(e),this._delegate.geometryInstances.geometry=new i.Cesium.PolygonGeometry({polygonHierarchy:new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(this._positions),this._holes.map(n=>new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(n)))),height:(t=this._style)==null?void 0:t.height,extrudedHeight:(r=this._style)==null?void 0:r.extrudedHeight,closeTop:(s=this._style)==null?void 0:s.closeTop,closeBottom:(o=this._style)==null?void 0:o.closeBottom,vertexFormat:i.Cesium.EllipsoidSurfaceAppearance.VERTEX_FORMAT})}get positions(){return this._positions}_setAppearance(){var e,t,r,s,o,n,l,h;this._style&&(this._delegate.appearance=new i.Cesium.EllipsoidSurfaceAppearance({material:i.Cesium.Material.fromType("Water",{baseWaterColor:((e=this._style)==null?void 0:e.baseWaterColor)||new i.Cesium.Color(.2,.3,.6,1),blendColor:((t=this._style)==null?void 0:t.blendColor)||new i.Cesium.Color(0,1,.699,1),specularMap:((r=this._style)==null?void 0:r.specularMap)||i.Cesium.Material.DefaultImageId,normalMap:((s=this._style)==null?void 0:s.normalMap)||i.Cesium.Material.DefaultImageId,frequency:((o=this._style)==null?void 0:o.frequency)||1e3,animationSpeed:((n=this._style)==null?void 0:n.animationSpeed)||.01,amplitude:((l=this._style)==null?void 0:l.amplitude)||10,specularIntensity:((h=this._style)==null?void 0:h.specularIntensity)||.5,fresnelPower:.1})}))}_mountedHook(){this.positions=this._positions,!this._delegate.appearance&&this._setAppearance()}setStyle(e){var t;return Object.keys(e).length===0?this:(v.merge(this._style,e),(t=this._style)!=null&&t.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};g.registerType("water_primitive");var ho=lo;var Qm=`uniform sampler2D image;\r
15769
+ uniform vec3 waterNormal;\r
15770
+ uniform vec3 fresnelParams; // x\u4E3A\u6700\u5C0F\u53CD\u5C04\u7CFB\u6570\uFF0Cy\u4E3A\u6700\u5927\u53CD\u5C04\u7CFB\u6570\uFF0Cz\u4E3A\u89C6\u7EBF\u56E0\u5B50\r
15771
+ uniform sampler2D specularMap;\r
15772
+ uniform sampler2D normalMap;\r
15773
+ uniform vec4 baseWaterColor;\r
15774
+ uniform vec4 blendColor;\r
15775
+ uniform float frequency;\r
15776
+ uniform float animationSpeed;\r
15777
+ uniform float amplitude;\r
15778
+ uniform float specularIntensity;\r
15779
+ uniform float fadeFactor;\r
15780
+ czm_material czm_getMaterial(czm_materialInput materialInput) {\r
15781
+ czm_material material = czm_getDefaultMaterial(materialInput);\r
15782
+ float time = czm_frameNumber * animationSpeed;\r
15783
+ // \u8870\u51CF\u662F\u4E0E\u788E\u7247\u7684\u8DDD\u79BB\u548C\u6CE2\u7684\u9891\u7387\u7684\u51FD\u6570\r
15784
+ float fade = max(1.0, (length(materialInput.positionToEyeEC) / 10000000000.0) * frequency * fadeFactor);\r
15785
+ float specularMapValue = texture(specularMap, materialInput.st).r;\r
15786
+ // \u6CE8\u610F\uFF1A\u6B64\u65F6\u4E0D\u4F7F\u7528\u65B9\u5411\u8FD0\u52A8\uFF0C\u53EA\u9700\u5C06\u89D2\u5EA6\u8BBE\u7F6E\u4E3A0.0\uFF1B\r
15787
+ vec4 noise = czm_getWaterNoise(normalMap, materialInput.st * frequency, time, 0.0);\r
15788
+ vec3 normalTangentSpace = noise.xyz * vec3(1.0, 1.0, (1.0 / amplitude));\r
15789
+ // \u5F53\u6211\u4EEC\u8FDC\u79BB\u6C34\u9762\u65F6\uFF0C\u6B63\u5E38\u7684\u6270\u52A8\u9010\u6E10\u6D88\u5931\r
15790
+ normalTangentSpace.xy /= fade;\r
15791
+ // \u6211\u4EEC\u63A5\u8FD1\u975E\u6C34\u533A\u57DF\uFF08\u4F4E\u955C\u9762\u8D34\u56FE\u503C\uFF09\u65F6\uFF0C\u5C1D\u8BD5\u6DE1\u51FA\u6B63\u5E38\u6270\u52A8\r
15792
+ normalTangentSpace = mix(vec3(0.0, 0.0, 50.0), normalTangentSpace, specularMapValue);\r
15793
+ normalTangentSpace = normalize(normalTangentSpace);\r
15794
+ // \u83B7\u53D6\u65B0\u6CD5\u5411\u91CF\u4E0E\u5782\u76F4\u4E8E\u5207\u5E73\u9762\u7684\u5411\u91CF\u7684\u5BF9\u9F50\u6BD4\u7387\r
15795
+ float tsPerturbationRatio = clamp(dot(normalTangentSpace, vec3(0.0, 0.0, 1.0)), 0.0, 1.0);\r
15796
+ // \u968F\u7740\u9AD8\u5149\u8D34\u56FE\u503C\u7684\u51CF\u5C11\uFF0C\u6DE1\u5316\u6C34\u7684\u6548\u679C\r
15797
+ float alpha = mix(blendColor.a, baseWaterColor.a, specularMapValue) * specularMapValue;\r
15798
+ // \u57FA\u7840\u8272\u662F\u6C34\u548C\u975E\u6C34\u989C\u8272\u7684\u6DF7\u5408\uFF0C\u57FA\u4E8E\u955C\u9762\u8D34\u56FE\u7684\u503C\uFF0C\u53EF\u80FD\u9700\u8981\u4E00\u4E2A\u5747\u5300\u7684\u6DF7\u5408\u56E0\u5B50\u6765\u66F4\u597D\u5730\u63A7\u5236\u8FD9\u4E00\u70B9\r
15799
+ vec3 waterColor = mix(blendColor.rgb, baseWaterColor.rgb, specularMapValue);\r
15800
+ // \u6F2B\u5C04\u9AD8\u5149\u662F\u57FA\u4E8E\u6CD5\u7EBF\u7684\u6270\u52A8\u7A0B\u5EA6\r
15801
+ waterColor += (0.1 * tsPerturbationRatio);\r
15802
+ // \u83B7\u53D6\u6C34\u9762\u53CD\u5C04\u7684\u989C\u8272\r
15803
+ vec2 uv = gl_FragCoord.xy / czm_viewport.zw; // \u83B7\u53D6\u5C4F\u5E55uv\r
15804
+ uv.s = (1.0 - uv.s); // \u955C\u50CF\u7FFB\u8F6C\r
15805
+ // \u6309\u7167\u6CD5\u7EBF\u65B9\u5411\u6765\u6270\u52A8\u53CD\u5C04\u8D34\u56FE\u7684\u7EB9\u7406\u5750\u6807\r
15806
+ uv += normalTangentSpace.xz / 100.0;\r
15807
+ vec3 reflectColor = texture(image, uv).rgb;\r
15808
+ // \u52A0\u5165\u83F2\u6D85\u5C14\u73B0\u8C61\r
15809
+ vec3 positionEC = -materialInput.positionToEyeEC;\r
15810
+ vec4 positionWC = czm_inverseView * vec4(positionEC, 1.0);\r
15811
+ vec3 cameraDir = normalize(positionWC.xyz - czm_viewerPositionWC);\r
15812
+ vec3 n = normalize(waterNormal);\r
15813
+ float fresnel = 1.0 - dot(-cameraDir, n);\r
15814
+ float min_rc = fresnelParams.x; // \u7269\u4F53\u6700\u5C0F\u53CD\u5C04\u7CFB\u6570\r
15815
+ float max_rc = fresnelParams.y; // \u7269\u4F53\u6700\u5927\u53CD\u5C04\u7CFB\u6570\r
15816
+ float f = fresnelParams.z; // \u89C6\u7EBF\u56E0\u5B50\r
15817
+ fresnel = min_rc + (max_rc - min_rc) * pow(fresnel, f);\r
15818
+ // \u83F2\u6D85\u5C14\u503C\u9AD8\uFF0C\u4EE3\u8868\u53CD\u5C04\u5F3A(\u66F4\u591A\u663E\u793A\u6C34\u7684\u53CD\u5C04)\uFF0C\u503C\u4F4E\u5219\u662F\u6298\u5C04\u5F3A(\u4E5F\u53EF\u4EE5\u7406\u89E3\u6210\u66F4\u591A\u663E\u793A\u6C34\u7684\u672C\u8272)\r
15819
+ material.diffuse = mix(waterColor, reflectColor, fresnel);\r
15820
+ material.alpha = mix(alpha, 1.0, fresnel);\r
15821
+ material.normal = normalize(materialInput.tangentToEyeMatrix * normalTangentSpace);\r
15822
+ material.specular = specularIntensity;\r
15823
+ material.shininess = 10.0;\r
15824
+ return material;\r
15825
+ }`;var co=class extends g{constructor(e,t=[]){super(),this._positions=f.parsePositions(e),this._holes=t.map(r=>f.parsePositions(r)),this._delegate=new i.Cesium.Primitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:{}}),asynchronous:!0}),this._state=m.INITIALIZED}get type(){return g.getOverlayType("reflection_reflection_water_primitive")}set positions(e){this._positions=f.parsePositions(e),this._delegate.geometryInstances.geometry=new i.Cesium.PolygonGeometry({polygonHierarchy:new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(this._positions),this._holes.map(t=>new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(t)))),perPositionHeight:!0})}get positions(){return this._positions}_setAppearance(){var e,t,r,s,o,n;this._style&&(this._delegate.appearance=new i.Cesium.EllipsoidSurfaceAppearance({material:new i.Cesium.Material({fabric:{type:"ReflectionWaterPlane",uniforms:{image:"",waterNormal:new i.Cesium.Cartesian3,fadeFactor:1,normalMap:((e=this._style)==null?void 0:e.normalMap)||i.Cesium.Material.DefaultImageId,fresnelParams:new i.Cesium.Cartesian3(.8,1,5),specularMap:"czm_defaultImage",blendColor:new i.Cesium.Color,baseWaterColor:((t=this._style)==null?void 0:t.baseWaterColor)||new i.Cesium.Color(.2,.3,.6,1),frequency:((r=this._style)==null?void 0:r.frequency)||2e3,animationSpeed:((s=this._style)==null?void 0:s.animationSpeed)||.01,amplitude:((o=this._style)==null?void 0:o.amplitude)||5,specularIntensity:((n=this._style)==null?void 0:n.specularIntensity)||.8},source:Qm}})}))}_calcCenterPoint(e,t=0){let s=e.map(l=>`${l.lng},${l.lat},${l.alt}`).join(",").split(",").map(l=>parseFloat(l));e=i.Cesium.Cartesian3.fromDegreesArrayHeights(s);let o=new i.Cesium.Cartesian3;e.forEach(l=>{i.Cesium.Cartesian3.add(o,l,o)});let n=i.Cesium.Cartesian3.multiplyByScalar(o,1/e.length,o);if(t){let l=i.Cesium.Cartographic.fromCartesian(n),h=new i.Cesium.Cartographic(l.longitude,l.latitude,t);n=i.Cesium.Cartographic.toCartesian(h)}return n}_getMirrorCamera(e,t,r){let s=Cartesian3.subtract(r,e.position,new Cartesian3),o=-Cartesian3.dot(t,s),n=Cartesian3.multiplyByScalar(t,2*o,new Cartesian3),l=Cartesian3.subtract(e.position,n,new Cartesian3),h=Cartesian3.dot(t,e.directionWC),c=Cartesian3.multiplyByScalar(t,2*h,new Cartesian3),p=Cartesian3.subtract(e.directionWC,c,new Cartesian3);Cartesian3.normalize(p,p);let _=Cartesian3.dot(t,e.upWC),w=Cartesian3.multiplyByScalar(t,2*_,new Cartesian3),y=Cartesian3.subtract(e.upWC,w,new Cartesian3),d=i.Cesium.Camera.clone(e);return d.position=l,d.up=y,d.direction=p,d.right=Cartesian3.cross(y,p,new Cartesian3),d}_renderToFbo(e,t,r){let s=t._frameState;t.globe.show=!1;let o=t.context,n=o.uniformState,l=t._defaultView.camera;t._defaultView.camera=r;let h=t._defaultView;t._view=h,t.updateFrameState(),s.passes.render=!0,s.passes.postProcess=t.postProcessStages.hasSelected;let c=new i.Cesium.Cesium3DTilePassState({pass:i.Cesium.Cesium3DTilePass.RENDER});s.tilesetPassState=c;let p=i.Cesium.defaultValue(t.backgroundColor,i.Cesium.Color.BLACK);s.backgroundColor=p,s.atmosphere=t.atmosphere,t.fog.update(s),n.update(s),t._computeCommandList.length=0,t._overlayCommandList.length=0;let _=h.viewport;_.x=0,_.y=0,_.width=o.drawingBufferWidth,_.height=o.drawingBufferHeight;let w=h.passState;w.framebuffer=e,w.blendingEnabled=void 0,w.scissorTest=void 0,w.viewport=i.Cesium.BoundingRectangle.clone(_,w.viewport),t.updateEnvironment(),t.updateAndExecuteCommands(w,p),t.resolveFramebuffers(w),w.framebuffer=void 0,o.endFrame(),t.globe.show=!0,t._defaultView.camera=l}_clipAnyModel(e,t,r){let s=null,o=null;if(e instanceof Cesium3DTileset)o=e,s=Matrix4.multiply(o.modelMatrix,o.root.transform,new Matrix4),Matrix4.inverse(s,s);else if(e instanceof Model)o=e,s=Matrix4.inverse(o.modelMatrix,new Matrix4);else{if(!e.model)return;s=Transforms.eastNorthUpToFixedFrame(e.position.getValue(new i.Cesium.JulianDate)),Matrix4.inverse(s,s),o=e.model}let n=new ClippingPlaneCollection,l=Plane.fromPointNormal(t,r),h=Plane.transform(l,s);return n.add(h),o.clippingPlanes=n,n}_mountedHook(){this.positions=this._positions,!this._delegate.appearance&&this._setAppearance()}setStyle(e){var t;return Object.keys(e).length===0?this:(v.merge(this._style,e),(t=this._style)!=null&&t.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};g.registerType("reflection_water_primitive");var po=co;var mo=class a extends g{constructor(e,t){super(),this._delegate=new i.Cesium.Entity({billboard:{}}),this._position=f.parsePosition(e),this._icon=t,this._size=[32,32],this._state=m.INITIALIZED}get type(){return g.getOverlayType("billboard")}set position(e){this._position=f.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}set icon(e){this._icon=e,this._delegate.billboard.image=this._icon}get icon(){return this._icon}set size(e){if(!Array.isArray(e))throw new Error("Billboard: the size invalid");this._size=e,this._delegate.billboard.width=this._size[0]||32,this._delegate.billboard.height=this._size[1]||32}get size(){return this._size}_mountedHook(){this.position=this._position,this.icon=this._icon,this.size=this._size}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.image&&delete e.width&&delete e.height,v.merge(this._style,e),v.merge(this._delegate.billboard,e),this)}static fromEntity(e){var o;let t,r=i.Cesium.JulianDate.now(),s=u.transformCartesianToWGS84(e.position.getValue(r));return e.billboard&&(t=new a(s,e.billboard.image.getValue(r)),t.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(r)}),t}};g.registerType("billboard");var Ce=mo;var uo=class extends g{constructor(e,t,r,s){super(),this._position=f.parsePosition(e),this._length=t,this._width=r,this._height=s,this._delegate=new i.Cesium.Entity({box:{dimensions:{x:+this._length,y:+this._width,z:+this._height}}}),this._state=m.INITIALIZED}get type(){return g.getOverlayType("box")}set position(e){this._position=f.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._delegate.orientation=i.Cesium.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(this._position.heading),i.Cesium.Math.toRadians(this._position.pitch),i.Cesium.Math.toRadians(this._position.roll)))}get position(){return this._position}set length(e){let t=this._delegate.box.dimensions.getValue();this._length=e||0,t.x=+this._length,this._delegate.box.dimensions.setValue(t)}get length(){return this._length}set width(e){let t=this._delegate.box.dimensions.getValue();this._width=e||0,t.y=+this._width,this._delegate.box.dimensions.setValue(t)}get width(){return this._width}set height(e){let t=this._delegate.box.dimensions.getValue();this._height=e||0,t.z=+this._height,this._delegate.box.dimensions.setValue(t)}get height(){return this._height}_mountedHook(){this.position=this._position}setStyle(e){return Object.keys(e).length===0?this:(delete e.length&&delete e.width&&delete e.height,v.merge(this._style,e),v.merge(this._delegate.box,e),this)}};g.registerType("box");var _o=uo;var fo=class extends g{constructor(e,t){super(),this._delegate=new i.Cesium.Entity({polygon:{}}),this._center=f.parsePosition(e),this._radius=+t||0,this._rotateAmount=0,this._stRotation=0,this._state=m.INITIALIZED}get type(){return g.getOverlayType("circle")}set center(e){this._center=f.parsePosition(e),this._delegate.polygon.hierarchy=this._computeHierarchy()}get center(){return this._center}set radius(e){this._radius=+e,this._delegate.polygon.hierarchy=this._computeHierarchy()}get radius(){return this._radius}set rotateAmount(e){this._rotateAmount=+e,this._delegate.polygon.stRotation=new i.Cesium.CallbackProperty(()=>(this._stRotation+=this._rotateAmount,(this._stRotation>=360||this._stRotation<=-360)&&(this._stRotation=0),i.Cesium.Math.toRadians(this._stRotation)),!1)}get rotateAmount(){return this._rotateAmount}_computeHierarchy(){let e=new i.Cesium.PolygonHierarchy,t=i.Cesium.EllipseGeometryLibrary.computeEllipsePositions({center:u.transformWGS84ToCartesian(this._center),semiMajorAxis:this._radius,semiMinorAxis:this._radius,rotation:0,granularity:.005},!1,!0),r=i.Cesium.Cartesian3.unpackArray(t.outerPositions);return r.push(r[0]),e.positions=r,e}_mountedHook(){this.center=this._center}setLabel(e,t){return this._delegate.position=u.transformWGS84ToCartesian(this._center),this._delegate.label={...t,text:e},this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.polygon,e),this)}};g.registerType("circle");var At=fo;var go=class extends g{constructor(e,t,r){super(),this._viewer=e,this._delegate=new i.Cesium.Entity({wall:{}}),this._center=f.parsePosition(t),this._radius=+r||0,this._heading=0,this._headingSpeed=1,this._rotateAmount=0,this._stRotation=0,this._state=m.INITIALIZED}get type(){return g.getOverlayType("volum_radar")}set center(e){this._center=f.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._center),this.positionArr=this._calcPoints(this._center._lng,this._center._lat,this._radius,0),this._createWallAndEllipsoid(),this._addPostRender()}get center(){return this._center}set radius(e){this._radius=+e}get radius(){return this._radius}set headingSpeed(e){this._headingSpeed=e}get headingSpeed(){return this._headingSpeed}set rotateAmount(e){}get rotateAmount(){return this._rotateAmount}_createWallAndEllipsoid(){this._delegate.wall={positions:new i.Cesium.CallbackProperty(()=>i.Cesium.Cartesian3.fromDegreesArrayHeights(this.positionArr),!1),material:this._style.material||i.Cesium.Color.fromCssColorString("#00dcff82"),distanceDisplayCondition:this._style.distanceDisplayCondition||new i.Cesium.DistanceDisplayCondition(0,105e5)},this._delegate.ellipsoid={radii:new i.Cesium.Cartesian3(this._radius,this._radius,this._radius),maximumCone:i.Cesium.Math.toRadians(90),material:this._style.material||i.Cesium.Color.fromCssColorString("#00dcff82"),outline:this._style.outline||!0,outlineColor:this._style.material||i.Cesium.Color.fromCssColorString("#00dcff82"),outlineWidth:this._style.outlineWidth||1,stackPartitions:this._style.stackPartitions||40,slicePartitions:this._style.slicePartitions||40,distanceDisplayCondition:this._style.distanceDisplayCondition||new i.Cesium.DistanceDisplayCondition(0,105e5)}}_addPostRender(){this.tickListener=this._viewer.clock.onTick.addEventListener(()=>{this._heading+=this._headingSpeed,this.positionArr=this._calcPoints(this._center._lng,this._center._lat,this._radius,this._heading)})}_calcPoints(e,t,r,s){let o=i.Cesium.Transforms.eastNorthUpToFixedFrame(i.Cesium.Cartesian3.fromDegrees(e,t)),n=r*Math.cos(s*Math.PI/180),l=r*Math.sin(s*Math.PI/180),h=i.Cesium.Cartesian3.fromElements(n,l,0),c=i.Cesium.Matrix4.multiplyByPoint(o,h,new i.Cesium.Cartesian3),p=i.Cesium.Cartographic.fromCartesian(c),_=i.Cesium.Math.toDegrees(p.longitude),w=i.Cesium.Math.toDegrees(p.latitude);return this._computeCirclularFlight(e,t,_,w,0,90)}_computeCirclularFlight(e,t,r,s,o,n){let l=[];l.push(e),l.push(t),l.push(0);let h=i.Cesium.Cartesian3.distance(i.Cesium.Cartesian3.fromDegrees(e,t),i.Cesium.Cartesian3.fromDegrees(r,s));for(let c=o;c<=o+n;c++){let p=h*Math.sin(c*Math.PI/180),_=Math.cos(c*Math.PI/180),w=(r-e)*_+e,y=(s-t)*_+t;l.push(w),l.push(y),l.push(p)}return l}_computeHierarchy(){let e=new i.Cesium.PolygonHierarchy,t=i.Cesium.EllipseGeometryLibrary.computeEllipsePositions({center:u.transformWGS84ToCartesian(this._center),semiMajorAxis:this._radius,semiMinorAxis:this._radius,rotation:0,granularity:.005},!1,!0),r=i.Cesium.Cartesian3.unpackArray(t.outerPositions);return r.push(r[0]),e.positions=r,e}_mountedHook(){this.center=this._center}setLabel(e,t){return this._delegate.position=u.transformWGS84ToCartesian(this._center),this._delegate.label={...t,text:e},this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.wall,e),v.merge(this._delegate.ellipsoid,e),this)}};g.registerType("volum_radar");var yo=go;var vo=class a extends g{constructor(e){super(),this._positions=f.parsePositions(e),this._delegate=new i.Cesium.Entity({corridor:{}}),this._state=m.INITIALIZED}get type(){return g.getOverlayType("corridor")}set positions(e){this._positions=f.parsePositions(e),this._delegate.corridor.positions=u.transformWGS84ArrayToCartesianArray(this._positions)}get positions(){return this._positions}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.corridor,e),this)}static fromEntity(e){var s;let t,r=i.Cesium.JulianDate.now();if(e.polyline){let o=u.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(r));t=new a(o),t.attr={...(s=e==null?void 0:e.properties)==null?void 0:s.getValue(r)}}return t}};g.registerType("corridor");var wo=vo;var Co=class extends g{constructor(e,t,r,s){super(),this._position=f.parsePosition(e),this._length=+t||0,this._topRadius=+r||0,this._bottomRadius=+s||0,this._delegate=new i.Cesium.Entity({cylinder:{}}),this._state=m.INITIALIZED}get type(){return g.getOverlayType("cylinder")}set position(e){this._position=f.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._delegate.orientation=i.Cesium.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(this._position.heading),i.Cesium.Math.toRadians(this._position.pitch),i.Cesium.Math.toRadians(this._position.roll)))}get position(){return this._position}set length(e){this._length=+e||0,this._delegate.cylinder.length=this._length}get length(){return this._length}set topRadius(e){this._topRadius=+e||0,this._delegate.cylinder.topRadius=this._topRadius}get topRadius(){return this._topRadius}set bottomRadius(e){this._bottomRadius=+e||0,this._delegate.cylinder.bottomRadius=this._bottomRadius}get bottomRadius(){return this._bottomRadius}_mountedHook(){this.position=this._position,this.length=this._length,this.topRadius=this._topRadius,this.bottomRadius=this._bottomRadius}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.length&&delete e.topRadius&&delete e.bottomRadius,v.merge(this._style,e),v.merge(this._delegate.cylinder,e),this)}};g.registerType("cylinder");var To=Co;var xo=class extends g{constructor(e,t,r){super(),this._position=f.parsePosition(e),this._semiMajorAxis=+t||0,this._semiMinorAxis=+r||0,this._delegate=new i.Cesium.Entity({ellipse:{}}),this._state=m.INITIALIZED}get type(){return g.getOverlayType("ellipse")}set position(e){this._position=f.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._delegate.orientation=i.Cesium.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(this._position.heading),i.Cesium.Math.toRadians(this._position.pitch),i.Cesium.Math.toRadians(this._position.roll)))}get position(){return this._position}set semiMajorAxis(e){this._semiMajorAxis=+e||0,this._delegate.ellipse.semiMajorAxis=this._semiMajorAxis}get semiMajorAxis(){return this._semiMajorAxis}set semiMinorAxis(e){this._semiMinorAxis=+e||0,this._delegate.ellipse.semiMinorAxis=this._semiMinorAxis}get semiMinorAxis(){return this._semiMinorAxis}_mountedHook(){this.position=this._position,this.semiMajorAxis=this._semiMajorAxis,this.semiMinorAxis=this._semiMinorAxis}setStyle(e){return Object.keys(e).length===0?this:(delete e.semiMajorAxis&&delete e.semiMinorAxis,v.merge(this._style,e),v.merge(this._delegate.ellipse,e),this)}};g.registerType("ellipse");var Eo=xo;var Po=class extends g{constructor(e,t){super(),this._position=f.parsePosition(e),this._radius=t||{x:10,y:10,z:10},this._delegate=new i.Cesium.Entity({ellipsoid:{}}),this._state=m.INITIALIZED}get type(){return g.getOverlayType("sphere")}set position(e){this._position=f.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._delegate.orientation=i.Cesium.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(this._position.heading),i.Cesium.Math.toRadians(this._position.pitch),i.Cesium.Math.toRadians(this._position.roll)))}get position(){return this._position}set radius(e){this._radius=e||{x:10,y:10,z:10},this._delegate.ellipsoid.radii=this._radius}get radius(){return this._radius}_mountedHook(){this.position=this._position,this.radius=this._radius}setStyle(e){return Object.keys(e).length===0?this:(delete e.radius,v.merge(this._style,e),v.merge(this._delegate.ellipsoid,e),this)}};g.registerType("ellipsoid");var bo=Po;var So=class a extends g{constructor(e,t){super(),this._delegate=new i.Cesium.Entity({label:{}}),this._position=f.parsePosition(e),this._text=t,this._state=m.INITIALIZED}get type(){return g.getOverlayType("label")}set position(e){this._position=f.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}set text(e){this._text=e,this._delegate.label.text=this._text}get text(){return this._text}_mountedHook(){this.position=this._position,this.text=this._text}setLabel(e,t){return this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.text,v.merge(this._style,e),v.merge(this._delegate.label,e),this)}static fromEntity(e){var o;let t=i.Cesium.JulianDate.now(),r=u.transformCartesianToWGS84(e.position.getValue(t)),s;return e.billboard&&(s=new a(r,e.name),s.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(t)}),s}};g.registerType("label");var Mt=So;var Ao=class extends g{constructor(e,t,r,s={}){if(super(),this._position=f.parsePosition(e),this._width=+t||100,this._height=+r||100,s.normal&&typeof s.normal=="string"){let o=String(s.normal).toLocaleUpperCase();s.normal=o==="X"?i.Cesium.Cartesian3.UNIT_X:o==="Y"?i.Cesium.Cartesian3.UNIT_Y:i.Cesium.Cartesian3.UNIT_Z}else s.normal=i.Cesium.Cartesian3.UNIT_Z;this._normal=s.normal,this._distance=s.distance||0,this._delegate=new i.Cesium.Entity({plane:{dimensions:{x:this._width,y:this._height},plane:new i.Cesium.Plane(this._normal,this._distance)}}),this._state=m.INITIALIZED}get type(){return g.getOverlayType("plane")}set position(e){this._position=f.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._delegate.orientation=i.Cesium.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(this._position.heading),i.Cesium.Math.toRadians(this._position.pitch),i.Cesium.Math.toRadians(this._position.roll)))}get position(){return this._position}set width(e){let t=this._delegate.plane.dimensions.getValue();this._width=+e||0,t.x=this._width}get width(){return this._width}set height(e){let t=this._delegate.plane.dimensions.getValue();this._height=+e||0,t.y=this._height}get height(){return this._height}set distance(e){let t=this._delegate.plane.dimensions.getValue();this._distance=e,t.distance=e}get distance(){return this._distance}_mountedHook(){this.position=this._position,this.distance=this._distance}setStyle(e){return Object.keys(e).length===0?this:(delete e.dimensions&&delete["plane"],v.merge(this._style,e),v.merge(this._delegate.plane,e),this)}};g.registerType("plane");var Mo=Ao;var $m={pixelSize:8,outlineColor:i.Cesium.Color.BLUE,outlineWidth:2},Io=class a extends g{constructor(e){super(),this._delegate=new i.Cesium.Entity({point:{}}),this._position=f.parsePosition(e),this._state=m.INITIALIZED}get type(){return g.getOverlayType("point")}set position(e){this._position=f.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}_mountedHook(){this.position=this._position,v.merge(this._delegate.point,$m,this._style)}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position,v.merge(this._style,e),v.merge(this._delegate.point,$m,this._style),this)}static fromEntity(e){var o;let t,r=i.Cesium.JulianDate.now(),s=u.transformCartesianToWGS84(e.position.getValue(r));return t=new a(s),t.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(r)},t}};g.registerType("point");var It=Io;var Do=class a extends g{constructor(e){super(),this._delegate=new i.Cesium.Entity({polygon:{}}),this._positions=f.parsePositions(e),this._holes=[],this._state=m.INITIALIZED}get type(){return g.getOverlayType("polygon")}set positions(e){this._positions=f.parsePositions(e),this._delegate.polygon.hierarchy=this._computeHierarchy()}get positions(){return this._positions}set holes(e){e&&e.length&&(this._holes=e.map(t=>f.parsePositions(t)),this._delegate.polygon.hierarchy=this._computeHierarchy())}get holes(){return this._holes}get center(){return ve([...this._positions,this._positions[0]])}get area(){return ye(this._positions)}_computeHierarchy(){let e=new i.Cesium.PolygonHierarchy;return e.positions=u.transformWGS84ArrayToCartesianArray(this._positions),e.holes=this._holes.map(t=>new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(t))),e}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this._delegate.position=u.transformWGS84ToCartesian(this.center),this._delegate.label={text:e,...t},this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.polygon,e),this)}static fromEntity(e){var s;let t,r=i.Cesium.JulianDate.now();if(e.polygon){let o=u.transformCartesianArrayToWGS84Array(e.polygon.hierarchy.getValue(r).positions);t=new a(o),t.attr={...(s=e==null?void 0:e.properties)==null?void 0:s.getValue(r)}}return t}};g.registerType("polygon");var Te=Do;var Lo=class a extends g{constructor(e){super(),this._positions=f.parsePositions(e),this._delegate=new i.Cesium.Entity({polyline:{}}),this._state=m.INITIALIZED}get type(){return g.getOverlayType("polyline")}set positions(e){this._positions=f.parsePositions(e),this._delegate.polyline.positions=u.transformWGS84ArrayToCartesianArray(this._positions)}get positions(){return this._positions}get center(){return ve(this._positions)}get distance(){return te(this._positions)}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this._delegate.position=u.transformWGS84ToCartesian(this.center),this._delegate.label={text:e,...t},this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.polyline,e),this)}static fromEntity(e){var s;let t,r=i.Cesium.JulianDate.now();if(e.polyline){let o=u.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(r));t=new a(o),t.attr={...(s=e==null?void 0:e.properties)==null?void 0:s.getValue(r)}}return t}};g.registerType("polyline");var xe=Lo;var Ro=class a extends g{constructor(e,t){super(),this._positions=f.parsePositions(e),this._shape=t||[],this._delegate=new i.Cesium.Entity({polylineVolume:{}}),this._state=m.INITIALIZED}get type(){return g.getOverlayType("polyline_volume")}set positions(e){this._positions=f.parsePositions(e),this._delegate.polylineVolume.positions=u.transformWGS84ArrayToCartesianArray(this._positions)}get positions(){return this._positions}set shape(e){this._shape=e||[],this._delegate.polylineVolume.shape=this._shape}get shape(){return this._shape}_mountedHook(){this.positions=this._positions,this.shape=this._shape}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions&&delete e.shape,v.merge(this._style,e),v.merge(this._delegate.polylineVolume,e),this)}static fromEntity(e,t){var o;let r,s=i.Cesium.JulianDate.now();if(e.polyline){let n=u.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(s));r=new a(n,t),r.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(s)}}return r}};g.registerType("polyline_volume");var Oo=Ro;var ko=class extends g{constructor(e){super(),this._positions=f.parsePositions(e),this._delegate=new i.Cesium.Entity({rectangle:{}}),this._state=m.INITIALIZED}get type(){return g.getOverlayType("rect")}set positions(e){this._positions=f.parsePositions(e),this._delegate.rectangle.coordinates=i.Cesium.Rectangle.fromCartesianArray(u.transformWGS84ArrayToCartesianArray(this._positions))}get positions(){return this._positions}_mountedHook(){this.positions=this._positions}setLabel(e,t){let r=this._delegate.rectangle.coordinates.getValue();return this._delegate.position=i.Cesium.Cartographic.toCartesian(i.Cesium.Rectangle.center(r,new i.Cesium.Cartographic)),this._delegate.label={...t,text:e},this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.rectangle,e),this)}};g.registerType("rect");var Dt=ko;var zo=class a extends g{constructor(e){super(),this._positions=f.parsePositions(e),this._delegate=new i.Cesium.Entity({wall:{}}),this._state=m.INITIALIZED}get type(){return g.getOverlayType("wall")}set positions(e){this._positions=f.parsePositions(e),this._delegate.wall.positions=u.transformWGS84ArrayToCartesianArray(this._positions)}get positions(){return this._positions}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.wall,e),this)}static fromEntity(e){var s;let t,r=i.Cesium.JulianDate.now();if(e.polyline){let o=u.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(r));t=new a(o),t.attr={...(s=e==null?void 0:e.properties)==null?void 0:s.getValue(r)}}return t}};g.registerType("wall");var Fo=zo;var Ho=class extends S{constructor(e,t,r={}){if(!t)throw new Error("GeoJsonLayer\uFF1Athe url invalid");super(e),this._delegate=i.Cesium.GeoJsonDataSource.load(t,r),this._state=m.INITIALIZED}get type(){return S.getLayerType("geojson")}set show(e){this._show=e,this._delegate&&this._delegate.then(t=>{t.show=this._show})}get show(){return this._show}_createBillboard(e){if(e.position&&e.billboard)return Ce.fromEntity(e)}_createPolyline(e){if(e.polyline)return xe.fromEntity(e)}_createPolygon(e){if(e.polygon)return Te.fromEntity(e)}_createModel(e,t){if(e)return ze.fromEntity(e,t)}eachOverlay(e,t){if(this._delegate)return this._delegate.then(r=>{r.entities.values.forEach(o=>{e.call(t,o)})}),this}toVectorLayer(){let e=new ue(this.id);return this.eachOverlay(t=>{t.billboard?e.addOverlay(this._createBillboard(t)):t.polyline?e.addOverlay(this._createPolyline(t)):t.polygon&&e.addOverlay(this._createPolygon(t))},this),e}toModelLayer(e){let t=new ue(this.id);return this.eachOverlay(r=>{t.addOverlay(this._createModel(r,e))},this),t}};S.registerType("geojson");var Lt=Ho;var No=class extends S{constructor(e,t,r={}){if(!t)throw new Error("Shp2JsonLayer\uFF1Athe url invalid");if(!se("shpUtil"))throw new Error("miss the shpUtil lib");super(e);let o=this._init(t,r);this._delegate=i.Cesium.GeoJsonDataSource.load(o,r),this._state=m.INITIALIZED}async _init(e,t){var s;return await shpUtil.toGeoJSON(e,void 0,(s=t.encoding)!=null?s:"gbk",t.crs)}get type(){return S.getLayerType("shp")}set show(e){this._show=e,this._delegate&&this._delegate.then(t=>{t.show=this._show})}get show(){return this._show}_createBillboard(e){if(e.position&&e.billboard)return Ce.fromEntity(e)}_createPolyline(e){if(e.polyline)return xe.fromEntity(e)}_createPolygon(e){if(e.polygon)return Te.fromEntity(e)}_createModel(e,t){if(e)return ze.fromEntity(e,t)}eachOverlay(e,t){if(this._delegate)return this._delegate.then(r=>{r.entities.values.forEach(o=>{e.call(t,o)})}),this}toVectorLayer(){let e=new ue(this.id);return this.eachOverlay(t=>{t.billboard?e.addOverlay(this._createBillboard(t)):t.polyline?e.addOverlay(this._createPolyline(t)):t.polygon&&e.addOverlay(this._createPolygon(t))},this),e}toModelLayer(e){let t=new ue(this.id);return this.eachOverlay(r=>{t.addOverlay(this._createModel(r,e))},this),t}};S.registerType("shp");var Wo=No;var Go=class extends S{constructor(e,t,r={}){if(!t)throw new Error("GpxLayer: the url is empty");super(e),this._delegate=i.Cesium.KmlDataSource.load(t,r),this._state=m.INITIALIZED}get type(){return S.getLayerType("gpx")}set show(e){this._show=e,this._delegate&&this._delegate.then(t=>{t.show=this._show})}get show(){return this._show}eachOverlay(e,t){if(this._delegate)return this._delegate.then(r=>{r.entities.values.forEach(o=>{e.call(t,o)})}),this}};S.registerType("gpx");var Uo=Go;var i1={radialColor:i.Cesium.Color.WHITE,radialWidth:2,showRadial:!0,LabelColor:i.Cesium.Color.YELLOW,weftColor:i.Cesium.Color.WHITE,weftWidth:2},Bo=class extends S{constructor(e,t){super(e),this._options={...i1,...t},this._delegate=new i.Cesium.CustomDataSource(e),this._state=m.INITIALIZED}get type(){return S.getLayerType("graticule")}_addedHook(){for(let e=0;e<36;e++)this._delegate.entities.add({polyline:{positions:i.Cesium.Cartesian3.fromDegreesArray([e*10,89.5,e*10,-89.5]),material:this._options.radialColor,width:this._options.radialWidth},show:this._options.showRadial}),this._delegate.entities.add({position:i.Cesium.Cartesian3.fromDegrees(e*10,0),label:{text:e*10+"\xB0",font:"12px",fillColor:this._options.LabelColor}});for(let e=0;e<18;e++){let t=[];for(let r=0;r<129;r++)t.push(-180+r*(360/128),(e<9?e:-e)*10);this._delegate.entities.add({polyline:{positions:i.Cesium.Cartesian3.fromDegreesArray(t),material:this._options.weftColor,width:this._options.weftWidth}})}}};S.registerType("graticule");var Vo=Bo;var jo=class extends S{constructor(e){super(e),this._delegate=new i.Cesium.PrimitiveCollection,this._isGround=!0,this._state=m.INITIALIZED}get type(){return S.getLayerType("ground_primitive")}clear(){return this._delegate&&this._delegate.removeAll(),this._cache={},this._state=m.CLEARED,this}};S.registerType("ground_primitive");var qo=jo;var Yo=class extends S{constructor(e){super(e),this._delegate=A.create("div","html-layer",void 0),this._delegate.setAttribute("id",this._id),this._renderRemoveCallback=void 0,this._state=m.INITIALIZED}get type(){return S.getLayerType("html")}set show(e){this._show=e,this._delegate.style.visibility=this._show?"visible":"hidden",Object.keys(this._cache).forEach(t=>{this._cache[t].show=e})}get show(){return this._show}_onAdd(e){this._viewer=e,this._viewer.layerContainer.appendChild(this._delegate);let t=this._viewer.scene;this._renderRemoveCallback=t.postRender.addEventListener(()=>{let r=this._viewer.camera.positionWC,s=this._viewer.camera.direction,o=this._viewer.getOffset();this.eachOverlay(n=>{if(n&&n.position){let l=u.transformWGS84ToCartesian(n.position),h=t.globe.ellipsoid.geodeticSurfaceNormal(l,new i.Cesium.Cartesian3),c=i.Cesium.SceneTransforms.worldToWindowCoordinates(t,l);c&&(c.x+=o.x,c.y+=o.y),n._updateStyle(c,i.Cesium.Cartesian3.distance(l,r),i.Cesium.Cartesian3.dot(s,h)<=0)}},this)},this),this._state=m.ADDED}_onRemove(){this._renderRemoveCallback&&this._renderRemoveCallback(),this._viewer.layerContainer.removeChild(this._delegate),this._state=m.REMOVED}clear(){for(;this._delegate.hasChildNodes();)this._delegate.removeChild(this._delegate.firstChild);return this._cache={},this._state=m.CLEARED,this}};S.registerType("html");var Zo=Yo;var Xo=class extends S{constructor(e){super(e),this._delegate=new i.Cesium.PrimitiveCollection,this._state=m.INITIALIZED}get type(){return S.getLayerType("i3s")}clear(){return this._delegate.removeAll(),this._cache={},this._state=m.CLEARED,this}};S.registerType("i3s");var Jo=Xo;var Ko=class extends S{constructor(e,t,r={}){if(!t)throw new Error("KmlLayer: the url is empty");super(e),this._delegate=i.Cesium.KmlDataSource.load(t,r),this._state=m.INITIALIZED}get type(){return S.getLayerType("kml")}set show(e){this._show=e,this._delegate&&this._delegate.then(t=>{t.show=this._show})}get show(){return this._show}eachOverlay(e,t){if(this._delegate)return this._delegate.then(r=>{r.entities.values.forEach(o=>{e.call(t,o)})}),this}};S.registerType("kml");var Qo=Ko;var $o=class extends S{constructor(e,t=""){super(e),this._dataSource=i.Cesium.GeoJsonDataSource.load(t),this._delegate=new i.Cesium.CustomDataSource(e),this._initLabel(),this._state=m.INITIALIZED}get type(){return S.getLayerType("label")}_createLabel(e){if(e.position&&e.name)return Mt.fromEntity(e)}_initLabel(){this._dataSource.then(e=>{e.entities.values.forEach(r=>{let s=this._createLabel(r);this.addOverlay(s)})})}};S.registerType("label");var ea=$o;var ta=class extends S{constructor(e){super(e),this._delegate=new i.Cesium.PrimitiveCollection,this._points=this._delegate.add(new i.Cesium.PointPrimitiveCollection),this._labels=this._delegate.add(new i.Cesium.LabelCollection),this._billboards=this._delegate.add(new i.Cesium.BillboardCollection),this._polylines=this._delegate.add(new i.Cesium.PolylineCollection),this._clouds=this._delegate.add(new i.Cesium.CloudCollection),this._state=m.INITIALIZED}get type(){return S.getLayerType("primitive")}get points(){return this._points}get labels(){return this._labels}get billboards(){return this._billboards}get polylines(){return this._polylines}get clouds(){return this._clouds}clear(){return this._delegate&&this._delegate.removeAll(),this._points=this._delegate.add(new i.Cesium.PointPrimitiveCollection),this._labels=this._delegate.add(new i.Cesium.LabelCollection),this._billboards=this._delegate.add(new i.Cesium.BillboardCollection),this._polylines=this._delegate.add(new i.Cesium.PolylineCollection),this._clouds=this._delegate.add(new i.Cesium.CloudCollection),this._cache={},this._state=m.CLEARED,this}};S.registerType("primitive");var ia=ta;var ra=class extends S{constructor(e,t,r){super(e),this._delegate=i.Cesium.ImageryLayer.fromProviderAsync(t,r),this._state=m.INITIALIZED}get type(){return S.getLayerType("raster-tile")}};S.registerType("raster-tile");var sa=ra;var oa=class extends S{constructor(e){super(e),this._delegate=new i.Cesium.PrimitiveCollection,this._state=m.INITIALIZED}get type(){return S.getLayerType("tileset")}clear(){return this._delegate.removeAll(),this._cache={},this._state=m.CLEARED,this}};S.registerType("tileset");var aa=oa;Lt.registerType("topojson");var na=class extends S{constructor(e,t){if(!se("echarts"))throw new Error("miss the echarts lib");super(e),this._option=t,this._delegate=void 0,this._chart=void 0}set show(e){this._show=e,this._delegate.style.visibility=e?"visible":"hidden"}get show(){return this._show}_createChartElement(){let e=this._viewer.scene.canvas,t=document.createElement("div");return t.setAttribute("id",this._id),t.setAttribute("data-layer-type","chart-layer"),t.style.cssText=`position:absolute; top:0; left:0; width: ${e.clientWidth}px; height: ${e.clientHeight}px;pointer-events:none;`,this._viewer.layerContainer.appendChild(t),t}_onAdd(e){let t=se("echarts");this._viewer=e,this._viewer.canvas.setAttribute("tabIndex","0"),this._delegate=this._createChartElement(),this._chart=t.init(this._delegate),Object(this._chart.getZr()).viewer=e,this._option&&this._chart.setOption({...this._option,GLMap:{},animation:!1}),this._state=m.ADDED}_onRemove(){this._delegate&&this._viewer&&(this._chart.dispose(),this._viewer.layerContainer.removeChild(this._delegate),this._state=m.REMOVED)}setOption(e={}){return this._option=e,this._chart&&this._chart.setOption({...e,GLMap:{},animation:!1}),this}clear(){return this._chart.clear(),this}resize(){return this._chart.resize(),this}},la=na;var{Cartesian3:si,Ellipsoid:r1,Math:eu}=i.Cesium;function tu(a){function e(t){this._api=t,this._viewer=Object(t.getZr()).viewer,this._mapOffset=[0,0],this.dimensions=["lng","lat"]}return e.prototype.getViewer=function(){return this._viewer},e.prototype.setMapOffset=function(t){return this._mapOffset=t,this},e.prototype.dataToPoint=function(t){let r=[],s=si.fromDegrees(t[0],t[1]);if(!s)return r;let o=r1.WGS84.geodeticSurfaceNormal(s,new si),n=this._viewer.camera.direction;if(si.dot(o,n)>=0)return r;let l=this._viewer.scene.cartesianToCanvasCoordinates(s);return l?[l.x-this._mapOffset[0],l.y-this._mapOffset[1]]:r},e.prototype.pointToData=function(t){let r=this._viewer.scene.globe.ellipsoid,s=new si(t[0]+this._mapOffset[0],t[1]+this._mapOffset[1],0),o=r.cartesianToCartographic(s);return[eu.toDegrees(o.longitude),eu.toDegrees(o.latitude)]},e.prototype.getViewRect=function(){let t=this._api;return new a.graphic.BoundingRect(0,0,t.getWidth(),t.getHeight())},e.prototype.getRoamTransform=function(){return a.matrix.create()},e.create=function(t,r){let s;t.eachComponent("GLMap",function(o){s=new e(r),s.setMapOffset(o.__mapOffset||[0,0]),o.coordinateSystem=s}),t.eachSeries(function(o){o.get("coordinateSystem")==="GLMap"&&(o.coordinateSystem=s)})},e.dimensions=["lng","lat"],e}function iu(a){let{registerAction:e,registerCoordinateSystem:t,extendComponentModel:r,extendComponentView:s}=a;r({type:"GLMap",getViewer(){return Object(this.getZr()).viewer},defaultOption:{roam:!1}}),s({type:"GLMap",init:function(o,n){this.api=n,n.getZr().viewer.clock.onTick.addEventListener(this.moveHandler,this)},moveHandler:function(){this.api.getZr().dom.style.visibility!=="hidden"&&this.api.dispatchAction({type:"GLMapRoam"})},render:function(o,n,l){},dispose:function(){this.api.getZr().viewer.clock.onTick.removeEventListener(this.moveHandler,this)}}),t("GLMap",tu(a)),e({type:"GLMapRoam",event:"GLMapRoam",update:"updateLayout"},function(o,n){})}var s1={LEFT_MIDDLE:0,LEFT_RIGHT:1},Ee=s1;var ha=class{constructor(e){this._viewer=e,this._options={}}_setViewerOption(){var e,t,r;return this._viewer.delegate.shadows=(t=(e=this._options)==null?void 0:e.shadows)!=null?t:!1,this._viewer.delegate.resolutionScale=((r=this._options)==null?void 0:r.resolutionScale)||1,this}_setCanvasOption(){return this._options.tabIndex&&this._viewer.scene.canvas.setAttribute("tabIndex",this._options.tabIndex),this}_setSceneOption(){var t,r,s,o;let e=this._viewer.scene;return e.skyAtmosphere.show=(t=this._options.showAtmosphere)!=null?t:!0,e.sun.show=(r=this._options.showSun)!=null?r:!0,e.moon.show=(s=this._options.showMoon)!=null?s:!0,e.postProcessStages.fxaa.enabled=(o=this._options.enableFxaa)!=null?o:!1,e.msaaSupported&&(e.msaaSamples=+this._options.msaaSamples||1),this}_setSkyBoxOption(){var t;if(!this._options.skyBox)return this;let e=this._options.skyBox;if(e instanceof i.Cesium.SkyBox)this._viewer.scene.skyBox=e;else{let r=this._viewer.scene.skyBox;r.show=(t=e.show)!=null?t:!0,e.offsetAngle&&(r.offsetAngle=e.offsetAngle),e!=null&&e.sources&&(r.sources=e.sources)}return this}_setGlobeOption(){var r,s,o,n,l,h,c,p,_,w,y,d;if(!this._options.globe)return this;let e=this._viewer.scene.globe,t=this._options.globe;if(v.merge(e,{show:(r=t==null?void 0:t.show)!=null?r:!0,showGroundAtmosphere:(s=t==null?void 0:t.showGroundAtmosphere)!=null?s:!0,enableLighting:(o=t==null?void 0:t.enableLighting)!=null?o:!1,depthTestAgainstTerrain:(n=t==null?void 0:t.depthTestAgainstTerrain)!=null?n:!1,tileCacheSize:+(t==null?void 0:t.tileCacheSize)||100,preloadSiblings:(l=t==null?void 0:t.preloadSiblings)!=null?l:!1,showSkirts:(h=t==null?void 0:t.showSkirts)!=null?h:!0,baseColor:(t==null?void 0:t.baseColor)||new i.Cesium.Color(0,0,.5,1),terrainExaggeration:(t==null?void 0:t.terrainExaggeration)||1,terrainExaggerationRelativeHeight:(t==null?void 0:t.terrainExaggerationRelativeHeight)||0}),v.merge(e.translucency,{enabled:(p=(c=t==null?void 0:t.translucency)==null?void 0:c.enabled)!=null?p:!1,backFaceAlpha:+((_=t==null?void 0:t.translucency)==null?void 0:_.backFaceAlpha)||1,backFaceAlphaByDistance:(w=t==null?void 0:t.translucency)==null?void 0:w.backFaceAlphaByDistance,frontFaceAlpha:+((y=t==null?void 0:t.translucency)==null?void 0:y.frontFaceAlpha)||1,frontFaceAlphaByDistance:(d=t==null?void 0:t.translucency)==null?void 0:d.frontFaceAlphaByDistance}),t!=null&&t.filterColor){let E=this._viewer.scene.globe._surfaceShaderSet.baseFragmentShaderSource,T=E.sources.pop();E.sources.push(T.replace("out_FragColor = finalColor;",`out_FragColor = finalColor * vec4${t.filterColor.toString()};`))}return this}_setCameraController(){var r,s,o,n,l,h,c;if(!((r=this._options)!=null&&r.cameraController))return this;let e=this._viewer.scene.screenSpaceCameraController,t=this._options.cameraController;return v.merge(e,{enableInputs:(s=t==null?void 0:t.enableInputs)!=null?s:!0,enableRotate:(o=t==null?void 0:t.enableRotate)!=null?o:!0,enableTilt:(n=t==null?void 0:t.enableTilt)!=null?n:!0,enableTranslate:(l=t==null?void 0:t.enableTranslate)!=null?l:!0,enableZoom:(h=t==null?void 0:t.enableZoom)!=null?h:!0,enableCollisionDetection:(c=t==null?void 0:t.enableCollisionDetection)!=null?c:!0,minimumZoomDistance:+(t==null?void 0:t.minimumZoomDistance)||1,maximumZoomDistance:+(t==null?void 0:t.maximumZoomDistance)||40489014}),this}setOptions(e){return Object.keys(e).length===0?this:(this._options={...this._options,...e},this._setViewerOption()._setCanvasOption()._setSceneOption()._setSkyBoxOption()._setGlobeOption()._setCameraController(),this)}},ca=ha;var pa=class{constructor(e){this._viewer=e,this._mouseMode=0}setPitchRange(e,t){let r=new i.Cesium.ScreenSpaceEventHandler(this._viewer.scene.canvas);this._viewer.scene.mode===i.Cesium.SceneMode.SCENE3D&&(r.setInputAction(s=>{r.setInputAction(o=>{let n=!0,l=o.endPosition.y<o.startPosition.y;l&&this._viewer.camera.pitch>i.Cesium.Math.toRadians(t)||!l&&this._viewer.camera.pitch<i.Cesium.Math.toRadians(e)?n=!1:n=!0,this._viewer.scene.screenSpaceCameraController.enableTilt=n},i.Cesium.ScreenSpaceEventType.MOUSE_MOVE)},this._mouseMode===Ee.LEFT_MIDDLE?i.Cesium.ScreenSpaceEventType.MIDDLE_DOWN:i.Cesium.ScreenSpaceEventType.RIGHT_DOWN),r.setInputAction(s=>{this._viewer.scene.screenSpaceCameraController.enableTilt=!0,r.removeInputAction(i.Cesium.ScreenSpaceEventType.MOUSE_MOVE)},this._mouseMode===Ee.LEFT_MIDDLE?i.Cesium.ScreenSpaceEventType.MIDDLE_UP:i.Cesium.ScreenSpaceEventType.RIGHT_UP))}changeMouseMode(e){this._mouseMode=e||Ee.LEFT_MIDDLE,e===Ee.LEFT_MIDDLE?(this._viewer.scene.screenSpaceCameraController.tiltEventTypes=[i.Cesium.CameraEventType.MIDDLE_DRAG,i.Cesium.CameraEventType.PINCH,{eventType:i.Cesium.CameraEventType.LEFT_DRAG,modifier:i.Cesium.KeyboardEventModifier.CTRL},{eventType:i.Cesium.CameraEventType.RIGHT_DRAG,modifier:i.Cesium.KeyboardEventModifier.CTRL}],this._viewer.scene.screenSpaceCameraController.zoomEventTypes=[i.Cesium.CameraEventType.RIGHT_DRAG,i.Cesium.CameraEventType.WHEEL,i.Cesium.CameraEventType.PINCH]):e===Ee.LEFT_RIGHT&&(this._viewer.scene.screenSpaceCameraController.tiltEventTypes=[i.Cesium.CameraEventType.RIGHT_DRAG,i.Cesium.CameraEventType.PINCH,{eventType:i.Cesium.CameraEventType.LEFT_DRAG,modifier:i.Cesium.KeyboardEventModifier.CTRL},{eventType:i.Cesium.CameraEventType.RIGHT_DRAG,modifier:i.Cesium.KeyboardEventModifier.CTRL}],this._viewer.scene.screenSpaceCameraController.zoomEventTypes=[i.Cesium.CameraEventType.WHEEL,i.Cesium.CameraEventType.PINCH])}},da=pa;var o1={},ma=o1;var ua=class{constructor(){this._viewer=void 0,this._enable=!1,this._wrapper=void 0,this._ready=!1}set enable(e){this._enable!==e&&(this._enable=e,this._state=this._enable?m.ENABLED:m.DISABLED,this._enableHook&&this._enableHook())}get enable(){return this._enable}get state(){return this._state}_mountContent(){}_bindEvent(){}_unbindEvent(){}_enableHook(){!this._ready&&this._mountContent(),this._enable?(!this._wrapper.parentNode&&this._viewer.widgetContainer.appendChild(this._wrapper),this._bindEvent()):(this._unbindEvent(),this._wrapper.parentNode&&this._viewer.widgetContainer.removeChild(this._wrapper))}_updateWindowCoord(e){}_installHook(){}_getViewerOffset(){return this._viewer?this._viewer.getOffset():{x:0,y:0}}install(e){this._viewer=e,this._installHook&&this._installHook(),this._state=m.INSTALLED}setWrapper(e){return this}setContent(e){if(e&&typeof e=="string")this._wrapper.innerHTML=e;else if(e&&e instanceof Element){for(;this._wrapper.hasChildNodes();)this._wrapper.removeChild(this._wrapper.firstChild);this._wrapper.appendChild(e)}return this}hide(){this._wrapper&&(this._wrapper.style.cssText=`
15828
15826
  visibility:hidden;
15829
- `)}static registerType(e){e&&(eo[e.toLocaleUpperCase()]=e.toLocaleLowerCase())}static getWidgetType(e){return eo[e.toLocaleUpperCase()]||void 0}},M=to;var io=class extends M{constructor(){super(),this._wrapper=S.create("div","widget context-menu"),this._ulEl=void 0,this._handler=void 0,this._overlay=void 0,this._position=void 0,this._wgs84Position=void 0,this._surfacePosition=void 0,this._wgs84SurfacePosition=void 0,this._windowPosition=void 0,this._instanceId=void 0,this._config={},this._defaultMenu=[{label:"\u98DE\u5230\u9ED8\u8BA4\u4F4D\u7F6E",callback:()=>{this._viewer.camera.flyHome(1.5)},context:this},{label:"\u53D6\u6D88\u98DE\u884C",callback:()=>{this._viewer.camera.cancelFlight()},context:this}],this._overlayMenu=[],this._state=d.INITIALIZED}get type(){return M.getWidgetType("contextmenu")}set DEFAULT_MENU(e){this._defaultMenu=e}set config(e){this._config=e,e.customClass&&this._setCustomClass()}_installHook(){let e=this;Object.defineProperty(this._viewer,"contextMenu",{get(){return e}}),this._handler=new i.Cesium.ScreenSpaceEventHandler(this._viewer.canvas)}_bindEvent(){this._handler.setInputAction(e=>{this._onRightClick(e)},i.Cesium.ScreenSpaceEventType.RIGHT_CLICK),this._handler.setInputAction(e=>{this._onClick(e)},i.Cesium.ScreenSpaceEventType.LEFT_CLICK)}_unbindEvent(){this._handler.removeInputAction(i.Cesium.ScreenSpaceEventType.RIGHT_CLICK),this._handler.removeInputAction(i.Cesium.ScreenSpaceEventType.LEFT_CLICK)}_mountContent(){this._ulEl=S.create("ul","menu-list",this._wrapper),this._ready=!0}_mountMenu(){for(;this._ulEl.hasChildNodes();)this._ulEl.removeChild(this._ulEl.firstChild);this._overlayMenu&&this._overlayMenu.length&&this._overlayMenu.forEach(e=>{this._addMenuItem(e.label,e.callback,e.context||this)}),this._defaultMenu&&this._defaultMenu.length&&this._defaultMenu.forEach(e=>{this._addMenuItem(e.label,e.callback,e.context||this)})}_onRightClick(e){var s;if(!this._enable)return;this._overlay=void 0;let t=this._viewer.scene;this._windowPosition=e.position;let r=t.pick(e.position);if(t.pickPositionSupported&&(this._position=t.pickPosition(e.position)),this._position){let o=i.Cesium.Ellipsoid.WGS84.cartesianToCartographic(this._position);o&&(this._wgs84Position={lng:i.Cesium.Math.toDegrees(o.longitude),lat:i.Cesium.Math.toDegrees(o.latitude),alt:o.height})}if(t.mode===i.Cesium.SceneMode.SCENE3D){let o=t.camera.getPickRay(e.position);this._surfacePosition=t.globe.pick(o,t)}else this._surfacePosition=t.camera.pickEllipsoid(e.position,i.Cesium.Ellipsoid.WGS84);if(this._surfacePosition){let o=i.Cesium.Ellipsoid.WGS84.cartesianToCartographic(this._surfacePosition);o&&(this._wgs84SurfacePosition={lng:i.Cesium.Math.toDegrees(o.longitude),lat:i.Cesium.Math.toDegrees(o.latitude),alt:o.height})}if(this._instanceId=r==null?void 0:r.instanceId,(r==null?void 0:r.id)instanceof i.Cesium.Entity){let o=this._viewer.getLayers().filter(a=>a.layerId===r.id.layerId)[0];o&&o.getOverlay&&(this._overlay=o.getOverlay(r.id.overlayId))}else if(r instanceof i.Cesium.Cesium3DTileFeature){let o=this._viewer.getLayers().filter(a=>a.layerId===r.tileset.layerId)[0];o&&o.getOverlay&&(this._overlay=o.getOverlay(r.tileset.overlayId))}else if((r==null?void 0:r.primitive)instanceof i.Cesium.Cesium3DTileset){let o=this._viewer.getLayers().filter(a=>a.layerId===r.primitive.layerId)[0];o&&o.getOverlay&&(this._overlay=o.getOverlay(r.primitive.overlayId))}else if(r!=null&&r.primitive){let o=this._viewer.getLayers().filter(a=>a.layerId===r.primitive.layerId)[0];o&&o.getOverlay&&(this._overlay=o.getOverlay(r.primitive.overlayId))}this._overlayMenu=((s=this._overlay)==null?void 0:s.contextMenu)||[],this._mountMenu(),this._updateWindowCoord(e.position)}_onClick(e){this.hide()}_updateWindowCoord(e){let t=this._ulEl.hasChildNodes()?"visible":"hidden",{x:r,y:s}=e,o=this._getViewerOffset();r+=o.x,s+=o.y,this._wrapper.style.cssText=`
15827
+ `)}static registerType(e){e&&(ma[e.toLocaleUpperCase()]=e.toLocaleLowerCase())}static getWidgetType(e){return ma[e.toLocaleUpperCase()]||void 0}},I=ua;var _a=class extends I{constructor(){super(),this._wrapper=A.create("div","widget context-menu"),this._ulEl=void 0,this._handler=void 0,this._overlay=void 0,this._position=void 0,this._wgs84Position=void 0,this._surfacePosition=void 0,this._wgs84SurfacePosition=void 0,this._windowPosition=void 0,this._instanceId=void 0,this._config={},this._defaultMenu=[{label:"\u98DE\u5230\u9ED8\u8BA4\u4F4D\u7F6E",callback:()=>{this._viewer.camera.flyHome(1.5)},context:this},{label:"\u53D6\u6D88\u98DE\u884C",callback:()=>{this._viewer.camera.cancelFlight()},context:this}],this._overlayMenu=[],this._state=m.INITIALIZED}get type(){return I.getWidgetType("contextmenu")}set DEFAULT_MENU(e){this._defaultMenu=e}set config(e){this._config=e,e.customClass&&this._setCustomClass()}_installHook(){let e=this;Object.defineProperty(this._viewer,"contextMenu",{get(){return e}}),this._handler=new i.Cesium.ScreenSpaceEventHandler(this._viewer.canvas)}_bindEvent(){this._handler.setInputAction(e=>{this._onRightClick(e)},i.Cesium.ScreenSpaceEventType.RIGHT_CLICK),this._handler.setInputAction(e=>{this._onClick(e)},i.Cesium.ScreenSpaceEventType.LEFT_CLICK)}_unbindEvent(){this._handler.removeInputAction(i.Cesium.ScreenSpaceEventType.RIGHT_CLICK),this._handler.removeInputAction(i.Cesium.ScreenSpaceEventType.LEFT_CLICK)}_mountContent(){this._ulEl=A.create("ul","menu-list",this._wrapper),this._ready=!0}_mountMenu(){for(;this._ulEl.hasChildNodes();)this._ulEl.removeChild(this._ulEl.firstChild);this._overlayMenu&&this._overlayMenu.length&&this._overlayMenu.forEach(e=>{this._addMenuItem(e.label,e.callback,e.context||this)}),this._defaultMenu&&this._defaultMenu.length&&this._defaultMenu.forEach(e=>{this._addMenuItem(e.label,e.callback,e.context||this)})}_onRightClick(e){var s;if(!this._enable)return;this._overlay=void 0;let t=this._viewer.scene;this._windowPosition=e.position;let r=t.pick(e.position);if(t.pickPositionSupported&&(this._position=t.pickPosition(e.position)),this._position){let o=i.Cesium.Ellipsoid.WGS84.cartesianToCartographic(this._position);o&&(this._wgs84Position={lng:i.Cesium.Math.toDegrees(o.longitude),lat:i.Cesium.Math.toDegrees(o.latitude),alt:o.height})}if(t.mode===i.Cesium.SceneMode.SCENE3D){let o=t.camera.getPickRay(e.position);this._surfacePosition=t.globe.pick(o,t)}else this._surfacePosition=t.camera.pickEllipsoid(e.position,i.Cesium.Ellipsoid.WGS84);if(this._surfacePosition){let o=i.Cesium.Ellipsoid.WGS84.cartesianToCartographic(this._surfacePosition);o&&(this._wgs84SurfacePosition={lng:i.Cesium.Math.toDegrees(o.longitude),lat:i.Cesium.Math.toDegrees(o.latitude),alt:o.height})}if(this._instanceId=r==null?void 0:r.instanceId,(r==null?void 0:r.id)instanceof i.Cesium.Entity){let o=this._viewer.getLayers().filter(n=>n.layerId===r.id.layerId)[0];o&&o.getOverlay&&(this._overlay=o.getOverlay(r.id.overlayId))}else if(r instanceof i.Cesium.Cesium3DTileFeature){let o=this._viewer.getLayers().filter(n=>n.layerId===r.tileset.layerId)[0];o&&o.getOverlay&&(this._overlay=o.getOverlay(r.tileset.overlayId))}else if((r==null?void 0:r.primitive)instanceof i.Cesium.Cesium3DTileset){let o=this._viewer.getLayers().filter(n=>n.layerId===r.primitive.layerId)[0];o&&o.getOverlay&&(this._overlay=o.getOverlay(r.primitive.overlayId))}else if(r!=null&&r.primitive){let o=this._viewer.getLayers().filter(n=>n.layerId===r.primitive.layerId)[0];o&&o.getOverlay&&(this._overlay=o.getOverlay(r.primitive.overlayId))}this._overlayMenu=((s=this._overlay)==null?void 0:s.contextMenu)||[],this._mountMenu(),this._updateWindowCoord(e.position)}_onClick(e){this.hide()}_updateWindowCoord(e){let t=this._ulEl.hasChildNodes()?"visible":"hidden",{x:r,y:s}=e,o=this._getViewerOffset();r+=o.x,s+=o.y,this._wrapper.style.cssText=`
15830
15828
  visibility:${t};
15831
15829
  z-index:1;
15832
15830
  transform:translate3d(${Math.round(r)}px,${Math.round(s)}px, 0);
15833
- `}_setCustomClass(){S.setClass(this._wrapper,`dc-context-menu ${this._config.customClass}`)}_addMenuItem(e,t,r){if(!e||!t)return this;let s=S.create("li","menu-item",null),o=S.create("a","",s);o.innerHTML=e,o.href="javascript:void(0)";let a=this;return t&&(o.onclick=()=>{t.call(r,{windowPosition:a._windowPosition,position:a._position,wgs84Position:a._wgs84Position,surfacePosition:a._surfacePosition,wgs84SurfacePosition:a._wgs84SurfacePosition,overlay:a._overlay,instanceId:a._instanceId}),a.hide()}),this._ulEl.appendChild(s),this}};M.registerType("contextmenu");var Ul=io;var ro=class extends M{constructor(){super(),this._wrapper=S.create("div","widget location-bar"),this._mouseEl=void 0,this._cameraEl=void 0,this._fpsEl=void 0,this._msEl=void 0,this._lastMouseSampleTime=i.Cesium.getTimestamp(),this._lastCameraSampleTime=i.Cesium.getTimestamp(),this._lastFpsSampleTime=i.Cesium.getTimestamp(),this._lastMsSampleTime=i.Cesium.getTimestamp(),this._fpsFrameCount=0,this._msFrameCount=0,this._state=d.INITIALIZED}get type(){return M.getWidgetType("location_bar")}_installHook(){let e=this;Object.defineProperty(this._viewer,"locationBar",{get(){return e}})}_bindEvent(){this._viewer.on(L.MOUSE_MOVE,this._onMove,this),this._viewer.on(A.CAMERA_CHANGED,this._onCameraChanged,this),this._viewer.on(A.POST_UPDATE,this._onPostUpdate,this)}_unbindEvent(){this._viewer.off(L.MOUSE_MOVE,this._onMove,this),this._viewer.off(A.CAMERA_CHANGED,this._onCameraChanged,this),this._viewer.off(A.POST_UPDATE,this._onPostUpdate,this)}_mountContent(){this._mouseEl=S.create("div","mouse-bar",this._wrapper),this._cameraEl=S.create("div","camera-bar",this._wrapper),this._msEl=S.create("div","ms-bar",this._wrapper),this._fpsEl=S.create("div","fps-bar",this._wrapper),this._ready=!0}_onMove(e){let t=i.Cesium.getTimestamp();if(t<this._lastMouseSampleTime+300)return;let r=e.wgs84SurfacePosition;this._mouseEl.innerHTML=`
15831
+ `}_setCustomClass(){A.setClass(this._wrapper,`dc-context-menu ${this._config.customClass}`)}_addMenuItem(e,t,r){if(!e||!t)return this;let s=A.create("li","menu-item",null),o=A.create("a","",s);o.innerHTML=e,o.href="javascript:void(0)";let n=this;return t&&(o.onclick=()=>{t.call(r,{windowPosition:n._windowPosition,position:n._position,wgs84Position:n._wgs84Position,surfacePosition:n._surfacePosition,wgs84SurfacePosition:n._wgs84SurfacePosition,overlay:n._overlay,instanceId:n._instanceId}),n.hide()}),this._ulEl.appendChild(s),this}};I.registerType("contextmenu");var ru=_a;var fa=class extends I{constructor(){super(),this._wrapper=A.create("div","widget location-bar"),this._mouseEl=void 0,this._cameraEl=void 0,this._fpsEl=void 0,this._msEl=void 0,this._lastMouseSampleTime=i.Cesium.getTimestamp(),this._lastCameraSampleTime=i.Cesium.getTimestamp(),this._lastFpsSampleTime=i.Cesium.getTimestamp(),this._lastMsSampleTime=i.Cesium.getTimestamp(),this._fpsFrameCount=0,this._msFrameCount=0,this._state=m.INITIALIZED}get type(){return I.getWidgetType("location_bar")}_installHook(){let e=this;Object.defineProperty(this._viewer,"locationBar",{get(){return e}})}_bindEvent(){this._viewer.on(R.MOUSE_MOVE,this._onMove,this),this._viewer.on(D.CAMERA_CHANGED,this._onCameraChanged,this),this._viewer.on(D.POST_UPDATE,this._onPostUpdate,this)}_unbindEvent(){this._viewer.off(R.MOUSE_MOVE,this._onMove,this),this._viewer.off(D.CAMERA_CHANGED,this._onCameraChanged,this),this._viewer.off(D.POST_UPDATE,this._onPostUpdate,this)}_mountContent(){this._mouseEl=A.create("div","mouse-bar",this._wrapper),this._cameraEl=A.create("div","camera-bar",this._wrapper),this._msEl=A.create("div","ms-bar",this._wrapper),this._fpsEl=A.create("div","fps-bar",this._wrapper),this._ready=!0}_onMove(e){let t=i.Cesium.getTimestamp();if(t<this._lastMouseSampleTime+300)return;let r=e.wgs84SurfacePosition;this._mouseEl.innerHTML=`
15834
15832
  <span>\u7ECF\u5EA6\uFF1A${(r==null?void 0:r.lng.toFixed(8))||Number.NaN}</span>
15835
15833
  <span>\u7EAC\u5EA6\uFF1A${(r==null?void 0:r.lat.toFixed(8))||Number.NaN}</span>
15836
15834
  <span>\u6D77\u62D4\uFF1A${(r==null?void 0:r.alt.toFixed(2))||Number.NaN} \u7C73</span>`,this._lastMouseSampleTime=t}_onCameraChanged(){let e=i.Cesium.getTimestamp();if(e<this._lastCameraSampleTime+300)return;let t=this._viewer.cameraPosition;this._cameraEl.innerHTML=`
15837
15835
  <span>\u89C6\u89D2\uFF1A${(+t.pitch).toFixed(2)}</span>
15838
15836
  <span>\u89C6\u9AD8\uFF1A${(+t.alt).toFixed(2)} \u7C73</span>
15839
- `,this._lastCameraSampleTime=e}_onPostUpdate(){let e=i.Cesium.getTimestamp();this._msFrameCount++;let t=e-this._lastMsSampleTime;if(t>200){let s=(t/this._msFrameCount).toFixed(2);this._msEl.innerHTML=`<span>${s} MS</span>`,this._lastMsSampleTime=e,this._msFrameCount=0}this._fpsFrameCount++;let r=e-this._lastFpsSampleTime;if(r>1e3){let s=this._fpsFrameCount*1e3/r|0;this._fpsEl.innerHTML=`<span>${s} FPS</span>`,this._lastFpsSampleTime=e,this._fpsFrameCount=0}}};M.registerType("location_bar");var Bl=ro;var vd=`
15837
+ `,this._lastCameraSampleTime=e}_onPostUpdate(){let e=i.Cesium.getTimestamp();this._msFrameCount++;let t=e-this._lastMsSampleTime;if(t>200){let s=(t/this._msFrameCount).toFixed(2);this._msEl.innerHTML=`<span>${s} MS</span>`,this._lastMsSampleTime=e,this._msFrameCount=0}this._fpsFrameCount++;let r=e-this._lastFpsSampleTime;if(r>1e3){let s=this._fpsFrameCount*1e3/r|0;this._fpsEl.innerHTML=`<span>${s} FPS</span>`,this._lastFpsSampleTime=e,this._fpsFrameCount=0}}};I.registerType("location_bar");var su=fa;var a1=`
15840
15838
  data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAG5ElEQVRoQ+2Yf2xVZxnHP89py9qliPe0BUTqBrunuDEBx8QfcxuwRYcxM3HO7Y8JZUNKTweKmWyaGDBZYtwSMmnvuXRKcEMzt0WmwdllE1nclkgsyUaIUM4ZNmKihfbcDjbCpPc85rT3QG1677ltb5UlPf+e932e7/f5vu/zPO8jfMA/+YDjZ4rA/1vBKQWmFBgWAXOnex0Bu4FPAf8Evu3b1vOFgnTZHKHa1LEVgZTtEoLv9NkLfpMjs03hfMa2VucjcdkQSKTdVkGq/ebk2ghswjmxSMh2+Lb10cufgOO9AHRk7OSTw8Gajqu+beUN9GWjgJnq2qZi3JqxrRURATPtbka5w7etL066AjXprmUaGDdhyCI0WAhyHeAjHFPoMgI9lDWyr/Y3X9udD4yZcg8j2qMiewVZhmpjoeiHdiakgJny6tXQLaJ8FZiTA/auCD2q9IBWoz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xnqt5/CA2+CzId9ALIId+2wvwf+8W3Eo7bA1T4tmXGWhvDgrrUkeqAikbEuF/hk8CbKnJQVJtGa9fHp4Dj/gMYnMmI6tp879gx4A6r7Vwp18YAWTPYjsBJgXTV+dNPnKus2wuyZGDaFQvjeqDIZ14FEk7YWLFUIWwX7hKkPJALKwpNFQoRCXsoUdaANjLUInSKIXsGtGLPO/ZVmZqUt1pFnxKRx/qakw8XG5RRCSRS7mABi/Jv7sGyY+R7IM5JTXvXx4MBY6UIYdtxF1AO+iJq7PFbks9G+4e9B67FYEncK26433wETolQN7wfMR33JSAcMBV8hNc4b9+uol9G9VZgSc7ZKcIBQJZfhK+1kcSjFxno477dEE46iv5GJWA67pHQgoGs6bWThyJrpuN1g14VXbLa9u6PZIPsUgkGbhQxblDkNtArh9ZLN8JvA9U/XlE9fX/P6tnvjYYqehOHE44+27qzaOS5hXkUOL5FRIZaZeUVhDOonkWkH9gAVAJngekjHB5V0b2GUbGvr2newUJgctPnaCrxkm9bq8YKfjBM+TaZjnu3CMtVWQwsC1PppbVyLhfpEwodUPbsQFnl0bNNc+J7pJFzoZjxTByp2DowaGDrgfLaurmLVINz06undXevnXf+Yms95GEckzn+hgZPFzM+LESiOAJ5LAw9cIL1IPcAM3JHrgfhLdDDiswSdDHIoksm9C8Ce3RAnvI3WWfiIhz3f0IEIuOJ9rdnGEFwp6p+BeQaoA50JoRHjT6gV5VODXh+tCwUB3LSFJiI41LtLYkCpQIzHjtTBMYTtVLumVKglNEcj63/AIrz7E/FBbRAAAAAAElFTkSuQmCC
15841
- `,Vl=vd;var wd=`
15839
+ `,ou=a1;var n1=`
15842
15840
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
15843
15841
  <svg width="162px" height="162px" viewBox="0 0 162 162" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
15844
15842
  <!-- Generator: Sketch 43.2 (39069) - http://www.bohemiancoding.com/sketch -->
@@ -15859,7 +15857,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAG5ElEQVRoQ+
15859
15857
  </g>
15860
15858
  </g>
15861
15859
  </svg>
15862
- `,jl=wd;var Td=`
15860
+ `,au=n1;var l1=`
15863
15861
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
15864
15862
  <svg width="17px" height="17px" viewBox="0 0 17 17" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
15865
15863
  <!-- Generator: Sketch 43.2 (39069) - http://www.bohemiancoding.com/sketch -->
@@ -15877,7 +15875,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAG5ElEQVRoQ+
15877
15875
  </g>
15878
15876
  </g>
15879
15877
  </svg>
15880
- `,Yl=Td;var Cd=`
15878
+ `,nu=l1;var h1=`
15881
15879
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
15882
15880
  <svg width="53px" height="53px" viewBox="0 0 53 53" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
15883
15881
  <!-- Generator: Sketch 3.4.3 (16044) - http://www.bohemiancoding.com/sketch -->
@@ -15891,45 +15889,45 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAG5ElEQVRoQ+
15891
15889
  </g>
15892
15890
  </g>
15893
15891
  </svg>
15894
- `,Zl=Cd;var xd=`
15892
+ `,lu=h1;var c1=`
15895
15893
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
15896
15894
  <svg width="50px" height="6px" viewBox="0 0 50 6" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
15897
15895
  <!-- Generator: Sketch 3.4.3 (16044) - http://www.bohemiancoding.com/sketch -->
15898
15896
  <title>decrease</title>
15899
15897
  <path d="M46.6183575,0.657894737 L3.30112724,0.657894737 C1.44927539,0.657894737 0,1.66880618 0,2.96052632 C0,4.25224645 1.44927539,5.26315789 3.30112724,5.26315789 L46.6988728,5.26315789 C48.5507246,5.26315789 50,4.25224645 50,2.96052632 C49.9194847,1.66880618 48.4702093,0.657894737 46.6183575,0.657894737 L46.6183575,0.657894737 L46.6183575,0.657894737 Z" id="Shape"></path>
15900
15898
  </svg>
15901
- `,ql=xd;var Ed=`
15899
+ `,hu=c1;var p1=`
15902
15900
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
15903
15901
  <svg width="50px" height="50px" viewBox="0 0 50 50" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
15904
15902
  <!-- Generator: Sketch 3.4.3 (16044) - http://www.bohemiancoding.com/sketch -->
15905
15903
  <title>increase</title>
15906
15904
  <path d="M0,25 C0,25.3514939 0.131810207,25.659051 0.373462207,25.900703 C0.615114207,26.142355 0.922671379,26.2741652 1.27416517,26.2741652 L23.7258348,26.2741652 L23.7258348,48.7258348 C23.7258348,49.0773286 23.857645,49.3848858 24.099297,49.6265378 C24.3189807,49.8462214 24.6485061,50 25,50 C25.7029877,50 26.2741652,49.4288225 26.2741652,48.7258348 L26.2741652,26.2741652 L48.7258348,26.2741652 C49.4288225,26.2741652 50,25.7029877 50,25 C50,24.2970123 49.4288225,23.7258348 48.7258348,23.7258348 L26.2741652,23.7258348 L26.2741652,1.27416517 C26.2741652,0.571177517 25.7029877,0 25,0 C24.2970123,0 23.7258348,0.571177517 23.7258348,1.27416517 L23.7258348,23.7258348 L1.27416517,23.7258348 C0.571177517,23.7258348 0,24.2970123 0,25 L0,25 L0,25 L0,25 Z" id="Shape"></path>
15907
15905
  </svg>
15908
- `,Xl=Ed;var Pd=`
15906
+ `,cu=p1;var d1=`
15909
15907
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
15910
15908
  <svg width="50px" height="50px" viewBox="0 0 50 50" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
15911
15909
  <!-- Generator: Sketch 3.4.3 (16044) - http://www.bohemiancoding.com/sketch -->
15912
15910
  <title>refresh</title>
15913
15911
  <path d="M48.2758621,0 C47.2844828,0 46.5086207,0.775193846 46.5086207,1.76571923 L46.5086207,12.2308355 C42.0689655,4.78036173 34.0086207,0 25,0 C11.2068965,0 0,11.1972438 0,25.0215332 C0,38.8458226 11.2068965,50 25,50 C38.7931035,50 50,38.8027562 50,25.0215332 C50,24.0310078 49.2241379,23.2558139 48.2327587,23.2558139 C47.2413793,23.2558139 46.4655172,24.0310078 46.4655172,25.0215332 C46.4655172,36.8647717 36.8103448,46.5116279 24.9568965,46.5116279 C13.1034483,46.5116279 3.49137933,36.8217054 3.49137933,24.9784668 C3.49137933,13.1352283 13.1465517,3.48837212 25,3.48837212 C33.4913793,3.48837212 41.0775862,8.44099913 44.5258621,16.0206718 L32.1551724,16.0206718 C31.1637931,16.0206718 30.3879311,16.7958657 30.3879311,17.7863911 C30.3879311,18.7769164 31.1637931,19.5521103 32.1551724,19.5521103 L48.2327587,19.5521103 C49.2241379,19.5521103 50,18.7769164 50,17.7863911 L50,1.72265288 C50,0.775193846 49.2241379,0 48.2758621,0 L48.2758621,0 L48.2758621,0 Z" id="Shape"></path>
15914
15912
  </svg>
15915
- `,Jl=Pd;var bd=`
15913
+ `,pu=d1;var m1=`
15916
15914
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
15917
15915
  <svg width="19px" height="28px" viewBox="0 0 19 28" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
15918
15916
  <path d="M0.6551724,2.3448276 L0.6551724,25.6551724 C0.6551724,26.6454761 1.4579722,27.4482759 2.4482759,27.4482759 C3.4385796,27.4482759 4.2413793,26.6454761 4.2413793,25.6551724 L4.2413793,2.3448276 C4.2413793,1.3545239 3.4385796,0.5517241 2.4482759,0.5517241 C1.4579722,0.5517241 0.6551724,1.3545239 0.6551724,2.3448276 L0.6551724,2.3448276 Z M7.6551724,2.3448276 L7.6551724,25.6551724 C7.6551724,26.6454761 8.4579722,27.4482759 9.4482759,27.4482759 C10.4385796,27.4482759 11.2413793,26.6454761 11.2413793,25.6551724 L11.2413793,2.3448276 C11.2413793,1.3545239 10.4385796,0.5517241 9.4482759,0.5517241 C8.4579722,0.5517241 7.6551724,1.3545239 7.6551724,2.3448276 L7.6551724,2.3448276 Z M14.6551724,2.3448276 L14.6551724,25.6551724 C14.6551724,26.6454761 15.4579722,27.4482759 16.4482759,27.4482759 C17.4385796,27.4482759 18.2413793,26.6454761 18.2413793,25.6551724 L18.2413793,2.3448276 C18.2413793,1.3545239 17.4385796,0.5517241 16.4482759,0.5517241 C15.4579722,0.5517241 14.6551724,1.3545239 14.6551724,2.3448276 L14.6551724,2.3448276 Z" id="splitter"></path>
15919
15917
  </svg>
15920
- `,Kl=bd;var Sd={logo:Vl,compass_outer:jl,compass_inner:Yl,compass_rotation_marker:Zl,decrease:ql,increase:Xl,refresh:Jl,splitter:Kl},$=Sd;var so=class extends M{constructor(){super(),this._wrapper=S.create("div","widget slider"),this._baseLayer=void 0,this._moveActive=!1,this._state=d.INITIALIZED}get type(){return M.getWidgetType("map_split")}_installHook(){let e=this;Object.defineProperty(this._viewer,"mapSplit",{get(){return e}})}_bindEvent(){this._viewer.scene.splitPosition=.5,this._wrapper.style.left="50%"}_unbindEvent(){this._baseLayer?this._viewer.scene.splitPosition=this._baseLayer.splitDirection>0?1:0:this._viewer.scene.splitPosition=0}_mountContent(){let e=S.parseDom($.splitter,!0,"splitter");this._wrapper.appendChild(e);let t=new i.Cesium.ScreenSpaceEventHandler(e),r=this;t.setInputAction(()=>{r._moveActive=!0},i.Cesium.ScreenSpaceEventType.LEFT_DOWN),t.setInputAction(()=>{r._moveActive=!0},i.Cesium.ScreenSpaceEventType.PINCH_START),t.setInputAction(s=>{r._moveHandler(s)},i.Cesium.ScreenSpaceEventType.MOUSE_MOVE),t.setInputAction(s=>{r._moveHandler(s)},i.Cesium.ScreenSpaceEventType.PINCH_MOVE),t.setInputAction(()=>{r._moveActive=!1},i.Cesium.ScreenSpaceEventType.LEFT_UP),t.setInputAction(()=>{r._moveActive=!1},i.Cesium.ScreenSpaceEventType.PINCH_END),this._ready=!0}_moveHandler(e){if(!this._moveActive||!this._enable)return;let t=e.endPosition.x,r=(this._wrapper.offsetLeft+t)/this._wrapper.parentElement.offsetWidth;this._wrapper.style.left=100*r+"%",this._viewer.scene.splitPosition=r}addBaseLayer(e,t=1){return!this._viewer||!this._enable?this:(e&&(this._baseLayer&&this._viewer.imageryLayers.remove(this._baseLayer),this._baseLayer=this._viewer.imageryLayers.addImageryProvider(e),this._baseLayer.splitDirection=t||0,this._viewer.scene.splitPosition=this._wrapper.offsetLeft/this._wrapper.parentElement.offsetWidth),this)}};M.registerType("map_split");var Ql=so;var oo=class extends M{constructor(){super(),this._wrapper=S.create("div","widget map-switch"),this._config=void 0,this._cache=[],this._state=d.INITIALIZED}get type(){return M.getWidgetType("map_switch")}_enableHook(){!this._wrapper.parentNode&&this._viewer&&this._viewer.widgetContainer.appendChild(this._wrapper)}_installHook(){let e=this;Object.defineProperty(this._viewer,"mapSwitch",{get(){return e}}),this.enable=!0,this._wrapper.onmouseover=()=>{let t=80,r=5;e._cache.length>0&&(t=e._cache.length*(t+r)-r),this._wrapper.style.width=`${t}px`},this._wrapper.onmouseout=()=>{e._wrapper.style.width="80px"}}_addItem(e){let t=S.create("div","map-item",this._wrapper),r=this._cache.length?this._cache.length-1:0;r===0&&S.addClass(t,"active"),t.setAttribute("data-index",String(r)),t.onclick=o=>{let a=document.getElementsByClassName("map-item active");a&&a.length&&(a[0].className="map-item"),this._viewer&&(o.target.className="map-item active",this._viewer.changeBaseLayer(+o.target.getAttribute("data-index")||0))},e.iconUrl&&(t.style.cssText=`
15918
+ `,du=m1;var u1={logo:ou,compass_outer:au,compass_inner:nu,compass_rotation_marker:lu,decrease:hu,increase:cu,refresh:pu,splitter:du},ie=u1;var ga=class extends I{constructor(){super(),this._wrapper=A.create("div","widget slider"),this._baseLayer=void 0,this._moveActive=!1,this._state=m.INITIALIZED}get type(){return I.getWidgetType("map_split")}_installHook(){let e=this;Object.defineProperty(this._viewer,"mapSplit",{get(){return e}})}_bindEvent(){this._viewer.scene.splitPosition=.5,this._wrapper.style.left="50%"}_unbindEvent(){this._baseLayer?this._viewer.scene.splitPosition=this._baseLayer.splitDirection>0?1:0:this._viewer.scene.splitPosition=0}_mountContent(){let e=A.parseDom(ie.splitter,!0,"splitter");this._wrapper.appendChild(e);let t=new i.Cesium.ScreenSpaceEventHandler(e),r=this;t.setInputAction(()=>{r._moveActive=!0},i.Cesium.ScreenSpaceEventType.LEFT_DOWN),t.setInputAction(()=>{r._moveActive=!0},i.Cesium.ScreenSpaceEventType.PINCH_START),t.setInputAction(s=>{r._moveHandler(s)},i.Cesium.ScreenSpaceEventType.MOUSE_MOVE),t.setInputAction(s=>{r._moveHandler(s)},i.Cesium.ScreenSpaceEventType.PINCH_MOVE),t.setInputAction(()=>{r._moveActive=!1},i.Cesium.ScreenSpaceEventType.LEFT_UP),t.setInputAction(()=>{r._moveActive=!1},i.Cesium.ScreenSpaceEventType.PINCH_END),this._ready=!0}_moveHandler(e){if(!this._moveActive||!this._enable)return;let t=e.endPosition.x,r=(this._wrapper.offsetLeft+t)/this._wrapper.parentElement.offsetWidth;this._wrapper.style.left=100*r+"%",this._viewer.scene.splitPosition=r}addBaseLayer(e,t=1){return!this._viewer||!this._enable?this:(e&&(this._baseLayer&&this._viewer.imageryLayers.remove(this._baseLayer),this._baseLayer=this._viewer.imageryLayers.addImageryProvider(e),this._baseLayer.splitDirection=t||0,this._viewer.scene.splitPosition=this._wrapper.offsetLeft/this._wrapper.parentElement.offsetWidth),this)}};I.registerType("map_split");var mu=ga;var ya=class extends I{constructor(){super(),this._wrapper=A.create("div","widget map-switch"),this._config=void 0,this._cache=[],this._state=m.INITIALIZED}get type(){return I.getWidgetType("map_switch")}_enableHook(){!this._wrapper.parentNode&&this._viewer&&this._viewer.widgetContainer.appendChild(this._wrapper)}_installHook(){let e=this;Object.defineProperty(this._viewer,"mapSwitch",{get(){return e}}),this.enable=!0,this._wrapper.onmouseover=()=>{let t=80,r=5;e._cache.length>0&&(t=e._cache.length*(t+r)-r),this._wrapper.style.width=`${t}px`},this._wrapper.onmouseout=()=>{e._wrapper.style.width="80px"}}_addItem(e){let t=A.create("div","map-item",this._wrapper),r=this._cache.length?this._cache.length-1:0;r===0&&A.addClass(t,"active"),t.setAttribute("data-index",String(r)),t.onclick=o=>{let n=document.getElementsByClassName("map-item active");n&&n.length&&(n[0].className="map-item"),this._viewer&&(o.target.className="map-item active",this._viewer.changeBaseLayer(+o.target.getAttribute("data-index")||0))},e.iconUrl&&(t.style.cssText=`
15921
15919
  background:url(${e.iconUrl});
15922
- `);let s=S.create("span","",t);s.innerHTML=e.name||"\u5730\u56FE"}addMap(e={}){this._enable&&(this._cache.push(e),this._addItem(e),this._cache.length>1&&(this._wrapper.style.visibility="visible"))}};M.registerType("map_switch");var $l=oo;var ao=class extends M{constructor(){super(),this._wrapper=S.create("div","widget popup"),this._config={customClass:""},this._position=void 0,this._state=d.INITIALIZED,this._offsetX=0,this._offsetY=0}get type(){return M.getWidgetType("popup")}set config(e){this._config=e,e.customClass&&this._setCustomClass()}_bindEvent(){if(this._viewer&&this._wrapper){let e=this,t=this._viewer.scene;t.postRender.addEventListener(()=>{if(e._position&&e._enable&&e._updateWindowCoord&&e._wrapper.style.visibility==="visible"){let r=i.Cesium.SceneTransforms.worldToWindowCoordinates(t,e._position);r&&e._updateWindowCoord(r)}})}}_mountContent(){this._wrapper.style.visibility="hidden"}_installHook(){this.enable=!0,this._bindEvent();let e=this;Object.defineProperty(this._viewer,"popup",{get(){return e}})}_updateWindowCoord(e){let t=e.x-this._wrapper.offsetWidth/2,r=e.y-this._wrapper.offsetHeight;this._config.position==="topleft"?(t=e.x-this._wrapper.offsetWidth,r=e.y-this._wrapper.offsetHeight):this._config.position==="topright"?(t=e.x,r=e.y-this._wrapper.offsetHeight):this._config.position==="bottomleft"?(t=e.x-this._wrapper.offsetWidth,r=e.y):this._config.position==="bottomright"&&(t=e.x,r=e.y),t=t+this._offsetX,r=r+this._offsetY,this._wrapper.style.cssText=`
15920
+ `);let s=A.create("span","",t);s.innerHTML=e.name||"\u5730\u56FE"}addMap(e={}){this._enable&&(this._cache.push(e),this._addItem(e),this._cache.length>1&&(this._wrapper.style.visibility="visible"))}};I.registerType("map_switch");var uu=ya;var va=class extends I{constructor(){super(),this._wrapper=A.create("div","widget popup"),this._config={customClass:""},this._position=void 0,this._state=m.INITIALIZED,this._offsetX=0,this._offsetY=0}get type(){return I.getWidgetType("popup")}set config(e){this._config=e,e.customClass&&this._setCustomClass()}_bindEvent(){if(this._viewer&&this._wrapper){let e=this,t=this._viewer.scene;t.postRender.addEventListener(()=>{if(e._position&&e._enable&&e._updateWindowCoord&&e._wrapper.style.visibility==="visible"){let r=i.Cesium.SceneTransforms.worldToWindowCoordinates(t,e._position);r&&e._updateWindowCoord(r)}})}}_mountContent(){this._wrapper.style.visibility="hidden"}_installHook(){this.enable=!0,this._bindEvent();let e=this;Object.defineProperty(this._viewer,"popup",{get(){return e}})}_updateWindowCoord(e){let t=e.x-this._wrapper.offsetWidth/2,r=e.y-this._wrapper.offsetHeight;this._config.position==="topleft"?(t=e.x-this._wrapper.offsetWidth,r=e.y-this._wrapper.offsetHeight):this._config.position==="topright"?(t=e.x,r=e.y-this._wrapper.offsetHeight):this._config.position==="bottomleft"?(t=e.x-this._wrapper.offsetWidth,r=e.y):this._config.position==="bottomright"&&(t=e.x,r=e.y),t=t+this._offsetX,r=r+this._offsetY,this._wrapper.style.cssText=`
15923
15921
  visibility:visible;
15924
15922
  z-index:1;
15925
15923
  transform:translate3d(${Math.round(t)}px,${Math.round(r)}px, 0);
15926
- `}_setCustomClass(){S.setClass(this._wrapper,`widget popup ${this._config.customClass}`)}setWrapper(e){return e&&e instanceof Element&&(this._wrapper=e,S.addClass(this._wrapper,"widget popup")),this}setPosition(e,t={x:0,y:0}){return this._position=e,this._offsetX=t.x||0,this._offsetY=t.y||0,this._wrapper&&(this._wrapper.style.cssText=`
15924
+ `}_setCustomClass(){A.setClass(this._wrapper,`widget popup ${this._config.customClass}`)}setWrapper(e){return e&&e instanceof Element&&(this._wrapper=e,A.addClass(this._wrapper,"widget popup")),this}setPosition(e,t={x:0,y:0}){return this._position=e,this._offsetX=t.x||0,this._offsetY=t.y||0,this._wrapper&&(this._wrapper.style.cssText=`
15927
15925
  visibility:visible;
15928
- `),this}showAt(e,t,r={x:0,y:0}){return this.setPosition(e,r).setContent(t),this}};M.registerType("popup");var eh=ao;var no=class extends M{constructor(){super(),this._wrapper=S.create("div","widget tool-tip"),this._ready=!0,this._state=d.INITIALIZED}get type(){return M.getWidgetType("tooltip")}_installHook(){let e=this;Object.defineProperty(this._viewer,"tooltip",{get(){return e}})}_updateWindowCoord(e){let t=e.x+10,r=e.y-this._wrapper.offsetHeight/2,s=this._getViewerOffset();t+=s.x,r+=s.y,this._wrapper.style.cssText=`
15926
+ `),this}showAt(e,t,r={x:0,y:0}){return this.setPosition(e,r).setContent(t),this}};I.registerType("popup");var _u=va;var wa=class extends I{constructor(){super(),this._wrapper=A.create("div","widget tool-tip"),this._ready=!0,this._state=m.INITIALIZED}get type(){return I.getWidgetType("tooltip")}_installHook(){let e=this;Object.defineProperty(this._viewer,"tooltip",{get(){return e}})}_updateWindowCoord(e){let t=e.x+10,r=e.y-this._wrapper.offsetHeight/2,s=this._getViewerOffset();t+=s.x,r+=s.y,this._wrapper.style.cssText=`
15929
15927
  visibility:visible;
15930
15928
  z-index:1;
15931
15929
  transform:translate3d(${Math.round(t)}px,${Math.round(r)}px, 0);
15932
- `}showAt(e,t){return this._enable?(e&&this._updateWindowCoord(e),this.setContent(t),this):this}};M.registerType("tooltip");var th=no;var{ImageryLayer:Id}=i.Cesium,lo=class{constructor(e){if(!e.globe)throw new Error("globe is required");this._globe=e.globe,this._imageryLayers=[],this._selectedImageryLayer=void 0,this._count=0}set selectedImageryLayer(e){if((!e||!e.layers)&&new Error("imagery format error"),!(this._selectedImageryLayer&&e.id===this._selectedImageryLayer.id)){if(this._selectedImageryLayer&&e.id!==this._selectedImageryLayer.id){for(let t=0;t<this._selectedImageryLayer.cache.length;t++)this._globe.imageryLayers.remove(this._selectedImageryLayer.cache[t]);e.cache=[]}for(let t=e.layers.length-1;t>=0;t--){let r=e.layers[t],s=Id.fromProviderAsync(r,e.options);r&&this._globe.imageryLayers.add(s,0),e.cache.push(s)}this._selectedImageryLayer=e}}get selectedImageryLayer(){return this._selectedImageryLayer}addImageryLayer(e,t={}){let r=[];return Array.isArray(e)?r=e.slice(0):r=[e],this._count++,this._imageryLayers.push({id:`${t.id}-${this._count}`,layers:r,cache:[]}),this}getImageryLayer(e){return this._imageryLayers.filter(r=>r.id.includes(e))}changeImageryLayer(e){if(e>this._imageryLayers.length-1)throw new Error("index error");return this.selectedImageryLayer=this._imageryLayers[e],this}},ho=lo;var{BoxGeometry:ih,Cartesian3:Md,defined:Te,DeveloperError:rh,GeometryPipeline:Ad,Matrix3:sh,Matrix4:co,Transforms:Dd,VertexFormat:Ld,BufferUsage:Rd,CubeMap:Od,loadCubeMap:kd,RenderState:Fd,VertexArray:zd,BlendingState:Hd,SceneMode:oh,ShaderProgram:Nd,ShaderSource:Wd,SkyBox:Gd}=i.Cesium,Ud=`
15930
+ `}showAt(e,t){return this._enable?(e&&this._updateWindowCoord(e),this.setContent(t),this):this}};I.registerType("tooltip");var fu=wa;var{ImageryLayer:_1}=i.Cesium,Ca=class{constructor(e){if(!e.globe)throw new Error("globe is required");this._globe=e.globe,this._imageryLayers=[],this._selectedImageryLayer=void 0,this._count=0}set selectedImageryLayer(e){if((!e||!e.layers)&&new Error("imagery format error"),!(this._selectedImageryLayer&&e.id===this._selectedImageryLayer.id)){if(this._selectedImageryLayer&&e.id!==this._selectedImageryLayer.id){for(let t=0;t<this._selectedImageryLayer.cache.length;t++)this._globe.imageryLayers.remove(this._selectedImageryLayer.cache[t]);e.cache=[]}for(let t=e.layers.length-1;t>=0;t--){let r=e.layers[t],s=_1.fromProviderAsync(r,e.options);r&&this._globe.imageryLayers.add(s,0),e.cache.push(s)}this._selectedImageryLayer=e}}get selectedImageryLayer(){return this._selectedImageryLayer}addImageryLayer(e,t={}){let r=[];return Array.isArray(e)?r=e.slice(0):r=[e],this._count++,this._imageryLayers.push({id:`${t.id}-${this._count}`,layers:r,cache:[]}),this}getImageryLayer(e){return this._imageryLayers.filter(r=>r.id.includes(e))}changeImageryLayer(e){if(e>this._imageryLayers.length-1)throw new Error("index error");return this.selectedImageryLayer=this._imageryLayers[e],this}},Ta=Ca;var{BoxGeometry:gu,Cartesian3:f1,defined:Pe,DeveloperError:yu,GeometryPipeline:g1,Matrix3:vu,Matrix4:xa,Transforms:y1,VertexFormat:v1,BufferUsage:w1,CubeMap:C1,loadCubeMap:T1,RenderState:x1,VertexArray:E1,BlendingState:P1,SceneMode:wu,ShaderProgram:b1,ShaderSource:S1,SkyBox:A1}=i.Cesium,M1=`
15933
15931
  uniform samplerCube u_cubeMap;
15934
15932
  in vec3 v_texCoord;
15935
15933
  void main()
@@ -15937,7 +15935,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAG5ElEQVRoQ+
15937
15935
  vec4 color = czm_textureCube(u_cubeMap, normalize(v_texCoord));
15938
15936
  out_FragColor = vec4(czm_gammaCorrect(color).rgb, czm_morphTime);
15939
15937
  }
15940
- `,Bd=`
15938
+ `,I1=`
15941
15939
  in vec3 position;
15942
15940
  out vec3 v_texCoord;
15943
15941
  uniform mat3 u_rotateMatrix;
@@ -15947,23 +15945,23 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAG5ElEQVRoQ+
15947
15945
  gl_Position = czm_projection * vec4(p, 1.0);
15948
15946
  v_texCoord = position.xyz;
15949
15947
  }
15950
- `,po=class extends Gd{constructor(e={}){super(e),this.offsetAngle=(e==null?void 0:e.offsetAngle)||0}update(e,t){let r=this;if(!this.show||e.mode!==oh.SCENE3D&&e.mode!==oh.MORPHING||!e.passes.render)return;let s=e.context;if(this._sources!==this.sources){this._sources=this.sources;let a=this.sources;if(!Te(a.positiveX)||!Te(a.negativeX)||!Te(a.positiveY)||!Te(a.negativeY)||!Te(a.positiveZ)||!Te(a.negativeZ))throw new rh("this.sources is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.");if(typeof a.positiveX!=typeof a.negativeX||typeof a.positiveX!=typeof a.positiveY||typeof a.positiveX!=typeof a.negativeY||typeof a.positiveX!=typeof a.positiveZ||typeof a.positiveX!=typeof a.negativeZ)throw new rh("this.sources properties must all be the same type.");typeof a.positiveX=="string"?kd(s,this._sources).then(function(l){r._cubeMap=r._cubeMap&&r._cubeMap.destroy(),r._cubeMap=l}):(this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),this._cubeMap=new Od({context:s,source:a}))}let o=this._command;if(o.modelMatrix=Dd.eastNorthUpToFixedFrame(e.camera.positionWC),this.offsetAngle!==0&&co.multiply(o.modelMatrix,co.fromRotationTranslation(sh.fromRotationZ(this.offsetAngle/180*Math.PI)),o.modelMatrix),!Te(o.vertexArray)){o.uniformMap={u_cubeMap:function(){return r._cubeMap},u_rotateMatrix:function(){return co.getMatrix3(o.modelMatrix,new sh)}};let a=ih.createGeometry(ih.fromDimensions({dimensions:new Md(2,2,2),vertexFormat:Ld.POSITION_ONLY})),l=this._attributeLocations=Ad.createAttributeLocations(a);o.vertexArray=zd.fromGeometry({context:s,geometry:a,attributeLocations:l,bufferUsage:Rd._DRAW}),o.renderState=Fd.fromCache({blending:Hd.ALPHA_BLEND})}if(!Te(o.shaderProgram)||this._useHdr!==t){let a=new Wd({defines:[t?"HDR":""],sources:[Ud]});o.shaderProgram=Nd.fromCache({context:s,vertexShaderSource:Bd,fragmentShaderSource:a,attributeLocations:this._attributeLocations}),this._useHdr=t}if(Te(this._cubeMap))return o}},mo=po;var{BoundingSphere:uo,BoundingSphereState:He,Cartographic:Vd,CesiumWidget:jd,Cesium3DTileset:lh,Clock:Yd,computeFlyToLocationForRectangle:Zd,DataSourceCollection:qd,DataSourceDisplay:Xd,defaultValue:ze,defined:z,destroyObject:Jd,DeveloperError:fo,Entity:v2,EntityView:Kd,Event:ah,EventHelper:Qd,getElement:$d,HeadingPitchRange:em,ImageryLayer:tm,Matrix4:_o,Property:im,SceneMode:Ce,ScreenSpaceEventType:nh,TimeDynamicPointCloud:hh,VoxelPrimitive:ch,Color:rm}=i.Cesium,Me=new uo;function ph(n,e,t){if(z(t)){let r=t.clock;z(r)&&r.getValue(e)}}function O(n,e){if(!z(n))throw new fo("container is required.");n=$d(n),e=ze(e,ze.EMPTY_OBJECT);let t=ze(e.scene3DOnly,!1),r=new Yd;z(e.shouldAnimate)&&(r.shouldAnimate=e.shouldAnimate);let s=new jd(n,{baseLayer:!1,clock:r,skyBox:e.skyBox,skyAtmosphere:e.skyAtmosphere,sceneMode:e.sceneMode,mapProjection:e.mapProjection,globe:e.globe,orderIndependentTranslucency:e.orderIndependentTranslucency,contextOptions:e.contextOptions,useDefaultRenderLoop:e.useDefaultRenderLoop,targetFrameRate:e.targetFrameRate,showRenderLoopErrors:e.showRenderLoopErrors,useBrowserRecommendedResolution:e.useBrowserRecommendedResolution,creditContainer:document.createElement("div"),creditViewport:document.createElement("div"),scene3DOnly:t,shadows:e.shadows,terrainShadows:e.terrainShadows,mapMode2D:e.mapMode2D,blurActiveElementOnCanvasFocus:e.blurActiveElementOnCanvasFocus,requestRenderMode:e.requestRenderMode,maximumRenderTimeChange:e.maximumRenderTimeChange,depthPlaneEllipsoidOffset:e.depthPlaneEllipsoidOffset,msaaSamples:e.msaaSamples});s.scene.backgroundColor=rm.TRANSPARENT,s.canvas.parentNode.className="viewer-canvas";let o=e.dataSources,a=!1;z(o)||(o=new qd,a=!0);let l=s.scene;l.screenSpaceCameraController.maximumZoomDistance=40489014;let h=new Xd({scene:l,dataSourceCollection:o}),c=new Qd;c.add(r.onTick,O.prototype._onTick,this),c.add(l.morphStart,O.prototype._clearTrackedObject,this);let p=document.createElement("div");this._dataSourceChangedListeners={},this._automaticallyTrackDataSourceClocks=ze(e.automaticallyTrackDataSourceClocks,!0),this._clock=r,this._container=n,this._bottomContainer=document.createElement("div"),this._element=document.createElement("div"),this._cesiumWidget=s,this._dataSourceCollection=o,this._destroyDataSourceCollection=a,this._dataSourceDisplay=h,this._toolbar=p,this._eventHelper=c,this._lastWidth=0,this._lastHeight=0,this._allowDataSourcesToSuspendAnimation=!0,this._entityView=void 0,this._enableInfoOrSelection=!1,this._clockTrackedDataSource=void 0,this._trackedEntity=void 0,this._needTrackedEntityUpdate=!1,this._selectedEntity=void 0,this._zoomIsFlight=!1,this._zoomTarget=void 0,this._zoomPromise=void 0,this._zoomOptions=void 0,this._selectedEntityChanged=new ah,this._trackedEntityChanged=new ah,c.add(o.dataSourceAdded,O.prototype._onDataSourceAdded,this),c.add(o.dataSourceRemoved,O.prototype._onDataSourceRemoved,this),c.add(l.postUpdate,O.prototype.resize,this),c.add(l.postRender,O.prototype._postRender,this);let f=o.length;for(let T=0;T<f;T++)this._dataSourceAdded(o,o.get(T));this._dataSourceAdded(void 0,h.defaultDataSource),c.add(o.dataSourceAdded,O.prototype._dataSourceAdded,this),c.add(o.dataSourceRemoved,O.prototype._dataSourceRemoved,this)}Object.defineProperties(O.prototype,{container:{get:function(){return this._container}},bottomContainer:{get:function(){return this._bottomContainer}},cesiumWidget:{get:function(){return this._cesiumWidget}},dataSourceDisplay:{get:function(){return this._dataSourceDisplay}},entities:{get:function(){return this._dataSourceDisplay.defaultDataSource.entities}},dataSources:{get:function(){return this._dataSourceCollection}},canvas:{get:function(){return this._cesiumWidget.canvas}},scene:{get:function(){return this._cesiumWidget.scene}},shadows:{get:function(){return this.scene.shadowMap.enabled},set:function(n){this.scene.shadowMap.enabled=n}},terrainShadows:{get:function(){return this.scene.globe.shadows},set:function(n){this.scene.globe.shadows=n}},shadowMap:{get:function(){return this.scene.shadowMap}},imageryLayers:{get:function(){return this.scene.imageryLayers}},terrainProvider:{get:function(){return this.scene.terrainProvider},set:function(n){this.scene.terrainProvider=n}},camera:{get:function(){return this.scene.camera}},postProcessStages:{get:function(){return this.scene.postProcessStages}},clock:{get:function(){return this._clock}},screenSpaceEventHandler:{get:function(){return this._cesiumWidget.screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._cesiumWidget.targetFrameRate},set:function(n){this._cesiumWidget.targetFrameRate=n}},useDefaultRenderLoop:{get:function(){return this._cesiumWidget.useDefaultRenderLoop},set:function(n){this._cesiumWidget.useDefaultRenderLoop=n}},resolutionScale:{get:function(){return this._cesiumWidget.resolutionScale},set:function(n){this._cesiumWidget.resolutionScale=n}},useBrowserRecommendedResolution:{get:function(){return this._cesiumWidget.useBrowserRecommendedResolution},set:function(n){this._cesiumWidget.useBrowserRecommendedResolution=n}},allowDataSourcesToSuspendAnimation:{get:function(){return this._allowDataSourcesToSuspendAnimation},set:function(n){this._allowDataSourcesToSuspendAnimation=n}},trackedEntity:{get:function(){return this._trackedEntity},set:function(n){if(this._trackedEntity!==n){this._trackedEntity=n,go(this);let e=this.scene,t=e.mode;!z(n)||!z(n.position)?(this._needTrackedEntityUpdate=!1,(t===Ce.COLUMBUS_VIEW||t===Ce.SCENE2D)&&(e.screenSpaceCameraController.enableTranslate=!0),(t===Ce.COLUMBUS_VIEW||t===Ce.SCENE3D)&&(e.screenSpaceCameraController.enableTilt=!0),this._entityView=void 0,this.camera.lookAtTransform(_o.IDENTITY)):this._needTrackedEntityUpdate=!0,this._trackedEntityChanged.raiseEvent(n),this.scene.requestRender()}}},selectedEntity:{get:function(){return this._selectedEntity},set:function(n){this._selectedEntity!==n&&(this._selectedEntity=n,this._selectedEntityChanged.raiseEvent(n))}},selectedEntityChanged:{get:function(){return this._selectedEntityChanged}},trackedEntityChanged:{get:function(){return this._trackedEntityChanged}},clockTrackedDataSource:{get:function(){return this._clockTrackedDataSource},set:function(n){this._clockTrackedDataSource!==n&&(this._clockTrackedDataSource=n,ph(void 0,this.clock,n))}}});O.prototype.extend=function(n,e){if(!z(n))throw new fo("mixin is required.");n(this,e)};O.prototype.resize=function(){let n=this._cesiumWidget,e=this._container,t=e.clientWidth,r=e.clientHeight;n.resize(),!(t===this._lastWidth&&r===this._lastHeight)&&(this._lastWidth=t,this._lastHeight=r)};O.prototype.forceResize=function(){this._lastWidth=0,this.resize()};O.prototype.render=function(){this._cesiumWidget.render()};O.prototype.isDestroyed=function(){return!1};O.prototype.destroy=function(){if(this.isDestroyed())return;let n;z(this.screenSpaceEventHandler)&&!this.screenSpaceEventHandler.isDestroyed()&&(this.screenSpaceEventHandler.removeInputAction(nh.LEFT_CLICK),this.screenSpaceEventHandler.removeInputAction(nh.LEFT_DOUBLE_CLICK));let e=this.dataSources,t=e.length;for(n=0;n<t;n++)this._dataSourceRemoved(e,e.get(n));return this._dataSourceRemoved(void 0,this._dataSourceDisplay.defaultDataSource),this._eventHelper.removeAll(),this._dataSourceDisplay=this._dataSourceDisplay.destroy(),this._cesiumWidget=this._cesiumWidget.destroy(),this._destroyDataSourceCollection&&(this._dataSourceCollection=this._dataSourceCollection.destroy()),Jd(this)};O.prototype._dataSourceAdded=function(n,e){e.entities.collectionChanged.addEventListener(O.prototype._onEntityCollectionChanged,this)};O.prototype._dataSourceRemoved=function(n,e){let t=e.entities;t.collectionChanged.removeEventListener(O.prototype._onEntityCollectionChanged,this),z(this.trackedEntity)&&t.getById(this.trackedEntity.id)===this.trackedEntity&&(this.trackedEntity=void 0),z(this.selectedEntity)&&t.getById(this.selectedEntity.id)===this.selectedEntity&&(this.selectedEntity=void 0)};O.prototype._onTick=function(n){let e=n.currentTime,t=this._dataSourceDisplay.update(e);this._allowDataSourcesToSuspendAnimation&&(this._clock.canAnimate=t);let r=this._entityView;if(z(r)){let h=this._trackedEntity;this._dataSourceDisplay.getBoundingSphere(h,!1,Me)===He.DONE&&r.update(e,Me)}let s,o=!1,a=this.selectedEntity;z(a)&&this._enableInfoOrSelection&&a.isShowing&&a.isAvailable(e)&&(this._dataSourceDisplay.getBoundingSphere(a,!0,Me)!==He.FAILED?s=Me.center:z(a.position)&&(s=a.position.getValue(e,s)),o=z(s))};O.prototype._onEntityCollectionChanged=function(n,e,t){let r=t.length;for(let s=0;s<r;s++){let o=t[s];this.trackedEntity===o&&(this.trackedEntity=void 0),this.selectedEntity===o&&(this.selectedEntity=void 0)}};O.prototype._onInfoBoxCameraClicked=function(n){if(n.isCameraTracking&&this.trackedEntity===this.selectedEntity)this.trackedEntity=void 0;else{let t=this.selectedEntity.position;z(t)?this.trackedEntity=this.selectedEntity:this.zoomTo(this.selectedEntity)}};O.prototype._clearTrackedObject=function(){this.trackedEntity=void 0};O.prototype._clearObjects=function(){this.trackedEntity=void 0,this.selectedEntity=void 0};O.prototype._onDataSourceChanged=function(n){this.clockTrackedDataSource===n&&ph(void 0,this.clock,n)};O.prototype._onDataSourceAdded=function(n,e){this._automaticallyTrackDataSourceClocks&&(this.clockTrackedDataSource=e);let t=e.entities.id,r=this._eventHelper.add(e.changedEvent,O.prototype._onDataSourceChanged,this);this._dataSourceChangedListeners[t]=r};O.prototype._onDataSourceRemoved=function(n,e){let t=this.clockTrackedDataSource===e,r=e.entities.id;if(this._dataSourceChangedListeners[r](),this._dataSourceChangedListeners[r]=void 0,t){let s=n.length;this._automaticallyTrackDataSourceClocks&&s>0?this.clockTrackedDataSource=n.get(s-1):this.clockTrackedDataSource=void 0}};O.prototype.zoomTo=function(n,e){return dh(this,n,{offset:e},!1)};O.prototype.flyTo=function(n,e){return dh(this,n,e,!0)};function dh(n,e,t,r){if(!z(e))throw new fo("zoomTarget is required.");go(n);let s=new Promise(o=>{n._completeZoom=function(a){o(a)}});return n._zoomPromise=s,n._zoomIsFlight=r,n._zoomOptions=t,Promise.resolve(e).then(function(o){if(n._zoomPromise===s){if(o instanceof tm){let a;z(o.imageryProvider)?a=Promise.resolve(o.getImageryRectangle()):a=new Promise(l=>{let h=o.readyEvent.addEventListener(()=>{h(),l(o.getImageryRectangle())})}),a.then(function(l){return Zd(l,n.scene)}).then(function(l){n._zoomPromise===s&&(n._zoomTarget=l)});return}if(o instanceof lh||o instanceof hh||o instanceof ch){n._zoomTarget=o;return}if(o.isLoading&&z(o.loadingEvent)){let a=o.loadingEvent.addEventListener(function(){a(),n._zoomPromise===s&&(n._zoomTarget=o.entities.values.slice(0))});return}if(Array.isArray(o)){n._zoomTarget=o.slice(0);return}o=ze(o.values,o),z(o.entities)&&(o=o.entities.values),Array.isArray(o)?n._zoomTarget=o.slice(0):n._zoomTarget=[o]}}),n.scene.requestRender(),s}function ot(n){n._zoomPromise=void 0,n._zoomTarget=void 0,n._zoomOptions=void 0}function go(n){let e=n._zoomPromise;z(e)&&(ot(n),n._completeZoom(!1))}O.prototype._postRender=function(){sm(this),om(this)};function sm(n){let e=n._zoomTarget;if(!z(e)||n.scene.mode===Ce.MORPHING)return;let t=n.scene,r=t.camera,s=ze(n._zoomOptions,{}),o;function a(p){z(s.offset)||(s.offset=new em(0,-.5,p.radius)),o={offset:s.offset,duration:s.duration,maximumHeight:s.maximumHeight,complete:function(){n._completeZoom(!0)},cancel:function(){n._completeZoom(!1)}},n._zoomIsFlight?r.flyToBoundingSphere(e.boundingSphere,o):(r.viewBoundingSphere(p,s.offset),r.lookAtTransform(_o.IDENTITY),n._completeZoom(!0)),ot(n)}if(e instanceof hh){if(z(e.boundingSphere)){a(e.boundingSphere);return}let p=e.frameChanged.addEventListener(function(f){a(f.boundingSphere),p()});return}if(e instanceof lh||e instanceof ch){a(e.boundingSphere);return}if(e instanceof Vd){o={destination:t.mapProjection.ellipsoid.cartographicToCartesian(e),duration:s.duration,maximumHeight:s.maximumHeight,complete:function(){n._completeZoom(!0)},cancel:function(){n._completeZoom(!1)}},n._zoomIsFlight?r.flyTo(o):(r.setView(o),n._completeZoom(!0)),ot(n);return}let l=e,h=[];for(let p=0,f=l.length;p<f;p++){let T=n._dataSourceDisplay.getBoundingSphere(l[p],!1,Me);if(T===He.PENDING)return;T!==He.FAILED&&h.push(uo.clone(Me))}if(h.length===0){go(n);return}n.trackedEntity=void 0;let c=uo.fromBoundingSpheres(h);n._zoomIsFlight?(ot(n),r.flyToBoundingSphere(c,{duration:s.duration,maximumHeight:s.maximumHeight,complete:function(){n._completeZoom(!0)},cancel:function(){n._completeZoom(!1)},offset:s.offset})):(r.viewBoundingSphere(c,s.offset),r.lookAtTransform(_o.IDENTITY),ot(n),n._completeZoom(!0))}function om(n){if(!n._needTrackedEntityUpdate)return;let e=n._trackedEntity,t=n.clock.currentTime,r=im.getValueOrUndefined(e.position,t);if(!z(r))return;let s=n.scene,o=n._dataSourceDisplay.getBoundingSphere(e,!1,Me);if(o===He.PENDING)return;let a=s.mode;(a===Ce.COLUMBUS_VIEW||a===Ce.SCENE2D)&&(s.screenSpaceCameraController.enableTranslate=!1),(a===Ce.COLUMBUS_VIEW||a===Ce.SCENE3D)&&(s.screenSpaceCameraController.enableTilt=!1);let l=o!==He.FAILED?Me:void 0;n._entityView=new Kd(e,s,s.mapProjection.ellipsoid),n._entityView.update(t,l),n._needTrackedEntityUpdate=!1}var at=O;var yo=class extends M{constructor(){super(),this._wrapper=S.create("div","widget hawkeye-map",null),this._wrapper.setAttribute("id",v.uuid()),this._map=void 0,this._state=d.INITIALIZED}get type(){return M.getWidgetType("hawkeye_map")}_mountContent(){let e=new at(this._wrapper,{sceneMode:i.Cesium.SceneMode.SCENE2D});e.imageryLayers.removeAll(),v.merge(e.scene.screenSpaceCameraController,{enableRotate:!1,enableTranslate:!1,enableZoom:!1,enableTilt:!1,enableLook:!1,maximumZoomDistance:40489014}),this._map=e,this._ready=!0}_bindEvent(){this._viewer.on(A.CAMERA_CHANGED,this._syncMap,this)}_unbindEvent(){this._viewer.off(A.CAMERA_CHANGED,this._syncMap,this)}_installHook(){let e=this;Object.defineProperty(this._viewer,"hawkeyeMap",{get(){return e}}),this._viewer.camera.percentageChanged=.01}_syncMap(){let e=new i.Cesium.Cartesian2(Math.floor(this._viewer.canvas.clientWidth/2),Math.floor(this._viewer.canvas.clientHeight/2)),t=this._viewer.scene.camera.pickEllipsoid(e);if(!t)return!1;let r=i.Cesium.Cartesian3.distance(t,this._viewer.scene.camera.positionWC);this._map.scene.camera.lookAt(t,new i.Cesium.Cartesian3(0,0,r))}addBaseLayer(e){return!this._map||!this._enable?this:(e&&(this._map.imageryLayers.removeAll(),Array.isArray(e)||(e=[e]),e.forEach(t=>{this._map.imageryLayers.add(i.Cesium.ImageryLayer.fromProviderAsync(t,{}))})),this)}};M.registerType("hawkeye_map");var mh=yo;var vo=class extends M{constructor(){super(),this._wrapper=S.create("div","widget compass"),this._compassRectangle=void 0,this._outRing=void 0,this._gyro=void 0,this._rotation_marker=void 0,this._orbitCursorAngle=0,this._orbitCursorOpacity=0,this._orbitLastTimestamp=0,this._orbitFrame=void 0,this._orbitIsLook=!1,this._rotateInitialCursorAngle=void 0,this._rotateFrame=void 0,this._mouseMoveHandle=void 0,this._mouseUpHandle=void 0,this._state=d.INITIALIZED}get type(){return M.getWidgetType("compass")}_installHook(){let e=this;Object.defineProperty(this._viewer,"compass",{get(){return e}}),this._wrapper.onmousedown=t=>{this._handleMouseDown(t)},this._wrapper.ondblclick=t=>{this._handleDoubleClick(t)}}_bindEvent(){this._viewer.on(A.POST_RENDER,this._postRenderHandler,this)}_unbindEvent(){this._viewer.off(A.POST_RENDER,this._postRenderHandler,this)}_postRenderHandler(){let e=this._viewer.camera.heading;this._outRing&&(this._outRing.style.cssText=`
15948
+ `,Ea=class extends A1{constructor(e={}){super(e),this.offsetAngle=(e==null?void 0:e.offsetAngle)||0}update(e,t){let r=this;if(!this.show||e.mode!==wu.SCENE3D&&e.mode!==wu.MORPHING||!e.passes.render)return;let s=e.context;if(this._sources!==this.sources){this._sources=this.sources;let n=this.sources;if(!Pe(n.positiveX)||!Pe(n.negativeX)||!Pe(n.positiveY)||!Pe(n.negativeY)||!Pe(n.positiveZ)||!Pe(n.negativeZ))throw new yu("this.sources is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.");if(typeof n.positiveX!=typeof n.negativeX||typeof n.positiveX!=typeof n.positiveY||typeof n.positiveX!=typeof n.negativeY||typeof n.positiveX!=typeof n.positiveZ||typeof n.positiveX!=typeof n.negativeZ)throw new yu("this.sources properties must all be the same type.");typeof n.positiveX=="string"?T1(s,this._sources).then(function(l){r._cubeMap=r._cubeMap&&r._cubeMap.destroy(),r._cubeMap=l}):(this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),this._cubeMap=new C1({context:s,source:n}))}let o=this._command;if(o.modelMatrix=y1.eastNorthUpToFixedFrame(e.camera.positionWC),this.offsetAngle!==0&&xa.multiply(o.modelMatrix,xa.fromRotationTranslation(vu.fromRotationZ(this.offsetAngle/180*Math.PI)),o.modelMatrix),!Pe(o.vertexArray)){o.uniformMap={u_cubeMap:function(){return r._cubeMap},u_rotateMatrix:function(){return xa.getMatrix3(o.modelMatrix,new vu)}};let n=gu.createGeometry(gu.fromDimensions({dimensions:new f1(2,2,2),vertexFormat:v1.POSITION_ONLY})),l=this._attributeLocations=g1.createAttributeLocations(n);o.vertexArray=E1.fromGeometry({context:s,geometry:n,attributeLocations:l,bufferUsage:w1._DRAW}),o.renderState=x1.fromCache({blending:P1.ALPHA_BLEND})}if(!Pe(o.shaderProgram)||this._useHdr!==t){let n=new S1({defines:[t?"HDR":""],sources:[M1]});o.shaderProgram=b1.fromCache({context:s,vertexShaderSource:I1,fragmentShaderSource:n,attributeLocations:this._attributeLocations}),this._useHdr=t}if(Pe(this._cubeMap))return o}},Pa=Ea;var{BoundingSphere:ba,BoundingSphereState:et,Cartographic:D1,CesiumWidget:L1,Cesium3DTileset:xu,Clock:R1,computeFlyToLocationForRectangle:O1,DataSourceCollection:k1,DataSourceDisplay:z1,defaultValue:$e,defined:U,destroyObject:F1,DeveloperError:Aa,Entity:x9,EntityView:H1,Event:Cu,EventHelper:N1,getElement:W1,HeadingPitchRange:G1,ImageryLayer:U1,Matrix4:Sa,Property:B1,SceneMode:be,ScreenSpaceEventType:Tu,TimeDynamicPointCloud:Eu,VoxelPrimitive:Pu,Color:V1}=i.Cesium,Oe=new ba;function bu(a,e,t){if(U(t)){let r=t.clock;U(r)&&r.getValue(e)}}function k(a,e){if(!U(a))throw new Aa("container is required.");a=W1(a),e=$e(e,$e.EMPTY_OBJECT);let t=$e(e.scene3DOnly,!1),r=new R1;U(e.shouldAnimate)&&(r.shouldAnimate=e.shouldAnimate);let s=new L1(a,{baseLayer:!1,clock:r,skyBox:e.skyBox,skyAtmosphere:e.skyAtmosphere,sceneMode:e.sceneMode,mapProjection:e.mapProjection,globe:e.globe,orderIndependentTranslucency:e.orderIndependentTranslucency,contextOptions:e.contextOptions,useDefaultRenderLoop:e.useDefaultRenderLoop,targetFrameRate:e.targetFrameRate,showRenderLoopErrors:e.showRenderLoopErrors,useBrowserRecommendedResolution:e.useBrowserRecommendedResolution,creditContainer:document.createElement("div"),creditViewport:document.createElement("div"),scene3DOnly:t,shadows:e.shadows,terrainShadows:e.terrainShadows,mapMode2D:e.mapMode2D,blurActiveElementOnCanvasFocus:e.blurActiveElementOnCanvasFocus,requestRenderMode:e.requestRenderMode,maximumRenderTimeChange:e.maximumRenderTimeChange,depthPlaneEllipsoidOffset:e.depthPlaneEllipsoidOffset,msaaSamples:e.msaaSamples});s.scene.backgroundColor=V1.TRANSPARENT,s.canvas.parentNode.className="viewer-canvas";let o=e.dataSources,n=!1;U(o)||(o=new k1,n=!0);let l=s.scene;l.screenSpaceCameraController.maximumZoomDistance=40489014;let h=new z1({scene:l,dataSourceCollection:o}),c=new N1;c.add(r.onTick,k.prototype._onTick,this),c.add(l.morphStart,k.prototype._clearTrackedObject,this);let p=document.createElement("div");this._dataSourceChangedListeners={},this._automaticallyTrackDataSourceClocks=$e(e.automaticallyTrackDataSourceClocks,!0),this._clock=r,this._container=a,this._bottomContainer=document.createElement("div"),this._element=document.createElement("div"),this._cesiumWidget=s,this._dataSourceCollection=o,this._destroyDataSourceCollection=n,this._dataSourceDisplay=h,this._toolbar=p,this._eventHelper=c,this._lastWidth=0,this._lastHeight=0,this._allowDataSourcesToSuspendAnimation=!0,this._entityView=void 0,this._enableInfoOrSelection=!1,this._clockTrackedDataSource=void 0,this._trackedEntity=void 0,this._needTrackedEntityUpdate=!1,this._selectedEntity=void 0,this._zoomIsFlight=!1,this._zoomTarget=void 0,this._zoomPromise=void 0,this._zoomOptions=void 0,this._selectedEntityChanged=new Cu,this._trackedEntityChanged=new Cu,c.add(o.dataSourceAdded,k.prototype._onDataSourceAdded,this),c.add(o.dataSourceRemoved,k.prototype._onDataSourceRemoved,this),c.add(l.postUpdate,k.prototype.resize,this),c.add(l.postRender,k.prototype._postRender,this);let _=o.length;for(let w=0;w<_;w++)this._dataSourceAdded(o,o.get(w));this._dataSourceAdded(void 0,h.defaultDataSource),c.add(o.dataSourceAdded,k.prototype._dataSourceAdded,this),c.add(o.dataSourceRemoved,k.prototype._dataSourceRemoved,this)}Object.defineProperties(k.prototype,{container:{get:function(){return this._container}},bottomContainer:{get:function(){return this._bottomContainer}},cesiumWidget:{get:function(){return this._cesiumWidget}},dataSourceDisplay:{get:function(){return this._dataSourceDisplay}},entities:{get:function(){return this._dataSourceDisplay.defaultDataSource.entities}},dataSources:{get:function(){return this._dataSourceCollection}},canvas:{get:function(){return this._cesiumWidget.canvas}},scene:{get:function(){return this._cesiumWidget.scene}},shadows:{get:function(){return this.scene.shadowMap.enabled},set:function(a){this.scene.shadowMap.enabled=a}},terrainShadows:{get:function(){return this.scene.globe.shadows},set:function(a){this.scene.globe.shadows=a}},shadowMap:{get:function(){return this.scene.shadowMap}},imageryLayers:{get:function(){return this.scene.imageryLayers}},terrainProvider:{get:function(){return this.scene.terrainProvider},set:function(a){this.scene.terrainProvider=a}},camera:{get:function(){return this.scene.camera}},postProcessStages:{get:function(){return this.scene.postProcessStages}},clock:{get:function(){return this._clock}},screenSpaceEventHandler:{get:function(){return this._cesiumWidget.screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._cesiumWidget.targetFrameRate},set:function(a){this._cesiumWidget.targetFrameRate=a}},useDefaultRenderLoop:{get:function(){return this._cesiumWidget.useDefaultRenderLoop},set:function(a){this._cesiumWidget.useDefaultRenderLoop=a}},resolutionScale:{get:function(){return this._cesiumWidget.resolutionScale},set:function(a){this._cesiumWidget.resolutionScale=a}},useBrowserRecommendedResolution:{get:function(){return this._cesiumWidget.useBrowserRecommendedResolution},set:function(a){this._cesiumWidget.useBrowserRecommendedResolution=a}},allowDataSourcesToSuspendAnimation:{get:function(){return this._allowDataSourcesToSuspendAnimation},set:function(a){this._allowDataSourcesToSuspendAnimation=a}},trackedEntity:{get:function(){return this._trackedEntity},set:function(a){if(this._trackedEntity!==a){this._trackedEntity=a,Ma(this);let e=this.scene,t=e.mode;!U(a)||!U(a.position)?(this._needTrackedEntityUpdate=!1,(t===be.COLUMBUS_VIEW||t===be.SCENE2D)&&(e.screenSpaceCameraController.enableTranslate=!0),(t===be.COLUMBUS_VIEW||t===be.SCENE3D)&&(e.screenSpaceCameraController.enableTilt=!0),this._entityView=void 0,this.camera.lookAtTransform(Sa.IDENTITY)):this._needTrackedEntityUpdate=!0,this._trackedEntityChanged.raiseEvent(a),this.scene.requestRender()}}},selectedEntity:{get:function(){return this._selectedEntity},set:function(a){this._selectedEntity!==a&&(this._selectedEntity=a,this._selectedEntityChanged.raiseEvent(a))}},selectedEntityChanged:{get:function(){return this._selectedEntityChanged}},trackedEntityChanged:{get:function(){return this._trackedEntityChanged}},clockTrackedDataSource:{get:function(){return this._clockTrackedDataSource},set:function(a){this._clockTrackedDataSource!==a&&(this._clockTrackedDataSource=a,bu(void 0,this.clock,a))}}});k.prototype.extend=function(a,e){if(!U(a))throw new Aa("mixin is required.");a(this,e)};k.prototype.resize=function(){let a=this._cesiumWidget,e=this._container,t=e.clientWidth,r=e.clientHeight;a.resize(),!(t===this._lastWidth&&r===this._lastHeight)&&(this._lastWidth=t,this._lastHeight=r)};k.prototype.forceResize=function(){this._lastWidth=0,this.resize()};k.prototype.render=function(){this._cesiumWidget.render()};k.prototype.isDestroyed=function(){return!1};k.prototype.destroy=function(){if(this.isDestroyed())return;let a;U(this.screenSpaceEventHandler)&&!this.screenSpaceEventHandler.isDestroyed()&&(this.screenSpaceEventHandler.removeInputAction(Tu.LEFT_CLICK),this.screenSpaceEventHandler.removeInputAction(Tu.LEFT_DOUBLE_CLICK));let e=this.dataSources,t=e.length;for(a=0;a<t;a++)this._dataSourceRemoved(e,e.get(a));return this._dataSourceRemoved(void 0,this._dataSourceDisplay.defaultDataSource),this._eventHelper.removeAll(),this._dataSourceDisplay=this._dataSourceDisplay.destroy(),this._cesiumWidget=this._cesiumWidget.destroy(),this._destroyDataSourceCollection&&(this._dataSourceCollection=this._dataSourceCollection.destroy()),F1(this)};k.prototype._dataSourceAdded=function(a,e){e.entities.collectionChanged.addEventListener(k.prototype._onEntityCollectionChanged,this)};k.prototype._dataSourceRemoved=function(a,e){let t=e.entities;t.collectionChanged.removeEventListener(k.prototype._onEntityCollectionChanged,this),U(this.trackedEntity)&&t.getById(this.trackedEntity.id)===this.trackedEntity&&(this.trackedEntity=void 0),U(this.selectedEntity)&&t.getById(this.selectedEntity.id)===this.selectedEntity&&(this.selectedEntity=void 0)};k.prototype._onTick=function(a){let e=a.currentTime,t=this._dataSourceDisplay.update(e);this._allowDataSourcesToSuspendAnimation&&(this._clock.canAnimate=t);let r=this._entityView;if(U(r)){let h=this._trackedEntity;this._dataSourceDisplay.getBoundingSphere(h,!1,Oe)===et.DONE&&r.update(e,Oe)}let s,o=!1,n=this.selectedEntity;U(n)&&this._enableInfoOrSelection&&n.isShowing&&n.isAvailable(e)&&(this._dataSourceDisplay.getBoundingSphere(n,!0,Oe)!==et.FAILED?s=Oe.center:U(n.position)&&(s=n.position.getValue(e,s)),o=U(s))};k.prototype._onEntityCollectionChanged=function(a,e,t){let r=t.length;for(let s=0;s<r;s++){let o=t[s];this.trackedEntity===o&&(this.trackedEntity=void 0),this.selectedEntity===o&&(this.selectedEntity=void 0)}};k.prototype._onInfoBoxCameraClicked=function(a){if(a.isCameraTracking&&this.trackedEntity===this.selectedEntity)this.trackedEntity=void 0;else{let t=this.selectedEntity.position;U(t)?this.trackedEntity=this.selectedEntity:this.zoomTo(this.selectedEntity)}};k.prototype._clearTrackedObject=function(){this.trackedEntity=void 0};k.prototype._clearObjects=function(){this.trackedEntity=void 0,this.selectedEntity=void 0};k.prototype._onDataSourceChanged=function(a){this.clockTrackedDataSource===a&&bu(void 0,this.clock,a)};k.prototype._onDataSourceAdded=function(a,e){this._automaticallyTrackDataSourceClocks&&(this.clockTrackedDataSource=e);let t=e.entities.id,r=this._eventHelper.add(e.changedEvent,k.prototype._onDataSourceChanged,this);this._dataSourceChangedListeners[t]=r};k.prototype._onDataSourceRemoved=function(a,e){let t=this.clockTrackedDataSource===e,r=e.entities.id;if(this._dataSourceChangedListeners[r](),this._dataSourceChangedListeners[r]=void 0,t){let s=a.length;this._automaticallyTrackDataSourceClocks&&s>0?this.clockTrackedDataSource=a.get(s-1):this.clockTrackedDataSource=void 0}};k.prototype.zoomTo=function(a,e){return Su(this,a,{offset:e},!1)};k.prototype.flyTo=function(a,e){return Su(this,a,e,!0)};function Su(a,e,t,r){if(!U(e))throw new Aa("zoomTarget is required.");Ma(a);let s=new Promise(o=>{a._completeZoom=function(n){o(n)}});return a._zoomPromise=s,a._zoomIsFlight=r,a._zoomOptions=t,Promise.resolve(e).then(function(o){if(a._zoomPromise===s){if(o instanceof U1){let n;U(o.imageryProvider)?n=Promise.resolve(o.getImageryRectangle()):n=new Promise(l=>{let h=o.readyEvent.addEventListener(()=>{h(),l(o.getImageryRectangle())})}),n.then(function(l){return O1(l,a.scene)}).then(function(l){a._zoomPromise===s&&(a._zoomTarget=l)});return}if(o instanceof xu||o instanceof Eu||o instanceof Pu){a._zoomTarget=o;return}if(o.isLoading&&U(o.loadingEvent)){let n=o.loadingEvent.addEventListener(function(){n(),a._zoomPromise===s&&(a._zoomTarget=o.entities.values.slice(0))});return}if(Array.isArray(o)){a._zoomTarget=o.slice(0);return}o=$e(o.values,o),U(o.entities)&&(o=o.entities.values),Array.isArray(o)?a._zoomTarget=o.slice(0):a._zoomTarget=[o]}}),a.scene.requestRender(),s}function Rt(a){a._zoomPromise=void 0,a._zoomTarget=void 0,a._zoomOptions=void 0}function Ma(a){let e=a._zoomPromise;U(e)&&(Rt(a),a._completeZoom(!1))}k.prototype._postRender=function(){j1(this),q1(this)};function j1(a){let e=a._zoomTarget;if(!U(e)||a.scene.mode===be.MORPHING)return;let t=a.scene,r=t.camera,s=$e(a._zoomOptions,{}),o;function n(p){U(s.offset)||(s.offset=new G1(0,-.5,p.radius)),o={offset:s.offset,duration:s.duration,maximumHeight:s.maximumHeight,complete:function(){a._completeZoom(!0)},cancel:function(){a._completeZoom(!1)}},a._zoomIsFlight?r.flyToBoundingSphere(e.boundingSphere,o):(r.viewBoundingSphere(p,s.offset),r.lookAtTransform(Sa.IDENTITY),a._completeZoom(!0)),Rt(a)}if(e instanceof Eu){if(U(e.boundingSphere)){n(e.boundingSphere);return}let p=e.frameChanged.addEventListener(function(_){n(_.boundingSphere),p()});return}if(e instanceof xu||e instanceof Pu){n(e.boundingSphere);return}if(e instanceof D1){o={destination:t.mapProjection.ellipsoid.cartographicToCartesian(e),duration:s.duration,maximumHeight:s.maximumHeight,complete:function(){a._completeZoom(!0)},cancel:function(){a._completeZoom(!1)}},a._zoomIsFlight?r.flyTo(o):(r.setView(o),a._completeZoom(!0)),Rt(a);return}let l=e,h=[];for(let p=0,_=l.length;p<_;p++){let w=a._dataSourceDisplay.getBoundingSphere(l[p],!1,Oe);if(w===et.PENDING)return;w!==et.FAILED&&h.push(ba.clone(Oe))}if(h.length===0){Ma(a);return}a.trackedEntity=void 0;let c=ba.fromBoundingSpheres(h);a._zoomIsFlight?(Rt(a),r.flyToBoundingSphere(c,{duration:s.duration,maximumHeight:s.maximumHeight,complete:function(){a._completeZoom(!0)},cancel:function(){a._completeZoom(!1)},offset:s.offset})):(r.viewBoundingSphere(c,s.offset),r.lookAtTransform(Sa.IDENTITY),Rt(a),a._completeZoom(!0))}function q1(a){if(!a._needTrackedEntityUpdate)return;let e=a._trackedEntity,t=a.clock.currentTime,r=B1.getValueOrUndefined(e.position,t);if(!U(r))return;let s=a.scene,o=a._dataSourceDisplay.getBoundingSphere(e,!1,Oe);if(o===et.PENDING)return;let n=s.mode;(n===be.COLUMBUS_VIEW||n===be.SCENE2D)&&(s.screenSpaceCameraController.enableTranslate=!1),(n===be.COLUMBUS_VIEW||n===be.SCENE3D)&&(s.screenSpaceCameraController.enableTilt=!1);let l=o!==et.FAILED?Oe:void 0;a._entityView=new H1(e,s,s.mapProjection.ellipsoid),a._entityView.update(t,l),a._needTrackedEntityUpdate=!1}var Ot=k;var Ia=class extends I{constructor(){super(),this._wrapper=A.create("div","widget hawkeye-map",null),this._wrapper.setAttribute("id",v.uuid()),this._map=void 0,this._state=m.INITIALIZED}get type(){return I.getWidgetType("hawkeye_map")}_mountContent(){let e=new Ot(this._wrapper,{sceneMode:i.Cesium.SceneMode.SCENE2D});e.imageryLayers.removeAll(),v.merge(e.scene.screenSpaceCameraController,{enableRotate:!1,enableTranslate:!1,enableZoom:!1,enableTilt:!1,enableLook:!1,maximumZoomDistance:40489014}),this._map=e,this._ready=!0}_bindEvent(){this._viewer.on(D.CAMERA_CHANGED,this._syncMap,this)}_unbindEvent(){this._viewer.off(D.CAMERA_CHANGED,this._syncMap,this)}_installHook(){let e=this;Object.defineProperty(this._viewer,"hawkeyeMap",{get(){return e}}),this._viewer.camera.percentageChanged=.01}_syncMap(){let e=new i.Cesium.Cartesian2(Math.floor(this._viewer.canvas.clientWidth/2),Math.floor(this._viewer.canvas.clientHeight/2)),t=this._viewer.scene.camera.pickEllipsoid(e);if(!t)return!1;let r=i.Cesium.Cartesian3.distance(t,this._viewer.scene.camera.positionWC);this._map.scene.camera.lookAt(t,new i.Cesium.Cartesian3(0,0,r))}addBaseLayer(e){return!this._map||!this._enable?this:(e&&(this._map.imageryLayers.removeAll(),Array.isArray(e)||(e=[e]),e.forEach(t=>{this._map.imageryLayers.add(i.Cesium.ImageryLayer.fromProviderAsync(t,{}))})),this)}};I.registerType("hawkeye_map");var Au=Ia;var Da=class extends I{constructor(){super(),this._wrapper=A.create("div","widget compass"),this._compassRectangle=void 0,this._outRing=void 0,this._gyro=void 0,this._rotation_marker=void 0,this._orbitCursorAngle=0,this._orbitCursorOpacity=0,this._orbitLastTimestamp=0,this._orbitFrame=void 0,this._orbitIsLook=!1,this._rotateInitialCursorAngle=void 0,this._rotateFrame=void 0,this._mouseMoveHandle=void 0,this._mouseUpHandle=void 0,this._state=m.INITIALIZED}get type(){return I.getWidgetType("compass")}_installHook(){let e=this;Object.defineProperty(this._viewer,"compass",{get(){return e}}),this._wrapper.onmousedown=t=>{this._handleMouseDown(t)},this._wrapper.ondblclick=t=>{this._handleDoubleClick(t)}}_bindEvent(){this._viewer.on(D.POST_RENDER,this._postRenderHandler,this)}_unbindEvent(){this._viewer.off(D.POST_RENDER,this._postRenderHandler,this)}_postRenderHandler(){let e=this._viewer.camera.heading;this._outRing&&(this._outRing.style.cssText=`
15951
15949
  transform : rotate(-${e}rad);
15952
15950
  -webkit-transform : rotate(-${e}rad);
15953
- `)}_mountContent(){S.create("div","out-ring-bg",this._wrapper),this._outRing=S.parseDom($.compass_outer,!0,"out-ring"),this._wrapper.appendChild(this._outRing),this._gyro=S.parseDom($.compass_inner,!0,"gyro"),this._wrapper.appendChild(this._gyro),this._rotation_marker=S.parseDom($.compass_rotation_marker,!0,"rotation_marker"),this._wrapper.appendChild(this._rotation_marker),this._rotation_marker.style.visibility="hidden",this._ready=!0}_handleMouseDown(e){if(this._viewer.scene.mode===i.Cesium.SceneMode.MORPHING)return!0;this._compassRectangle=e.currentTarget.getBoundingClientRect();let r=this._compassRectangle.width/2,s=this._getVector(e),o=i.Cesium.Cartesian2.magnitude(s)/r;if(o<50/145)this._orbit(s);else if(o<1)this._rotate(s);else return!0}_handleDoubleClick(){let e=this._viewer.scene,t=e.camera,r=e.screenSpaceCameraController;if(e.mode===i.Cesium.SceneMode.MORPHING||!r.enableInputs)return!0;if(e.mode===i.Cesium.SceneMode.COLUMBUS_VIEW&&!r.enableTranslate||(e.mode===i.Cesium.SceneMode.SCENE3D||e.mode===i.Cesium.SceneMode.COLUMBUS_VIEW)&&(!r.enableLook||e.mode===i.Cesium.SceneMode.SCENE3D&&!r.enableRotate))return;let s=this._getCameraFocus(!0);if(!s)return;let o=e.globe.ellipsoid.cartographicToCartesian(t.positionCartographic),a=e.globe.ellipsoid.geodeticSurfaceNormal(s),l=new i.Cesium.BoundingSphere(s,0);t.flyToBoundingSphere(l,{offset:new i.Cesium.HeadingPitchRange(0,i.Cesium.Math.PI_OVER_TWO-i.Cesium.Cartesian3.angleBetween(a,t.directionWC),i.Cesium.Cartesian3.distance(o,s)),duration:1.5})}_getCameraFocus(e){let t=new i.Cesium.Cartesian3,r=this._viewer.scene,s=r.camera;if(r.mode!==i.Cesium.SceneMode.MORPHING){if(this._viewer.delegate.trackedEntity)t=this._viewer.delegate.trackedEntity.position.getValue(this._viewer.clock.currentTime);else{let o=new i.Cesium.Ray;o.origin=s.positionWC,o.direction=s.directionWC,t=r.globe.pick(o,r)}if(t){if(r.mode===i.Cesium.SceneMode.SCENE2D||r.mode===i.Cesium.SceneMode.COLUMBUS_VIEW){t=s.worldToCameraCoordinatesPoint(t);let o=new i.Cesium.Cartographic;e&&(t=r.globe.ellipsoid.cartographicToCartesian(r.mapProjection.unproject(t,o)))}else e||(t=s.worldToCameraCoordinatesPoint(t));return t}}}_orbit(e){let t=this._viewer.scene,r=t.screenSpaceCameraController,s=t.camera;if(!(t.mode===i.Cesium.SceneMode.MORPHING||!r.enableInputs)){switch(t.mode){case i.Cesium.SceneMode.COLUMBUS_VIEW:if(r.enableLook)break;if(!r.enableTranslate||!r.enableTilt)return;break;case i.Cesium.SceneMode.SCENE3D:if(r.enableLook)break;if(!r.enableTilt||!r.enableRotate)return;break;case i.Cesium.SceneMode.SCENE2D:if(!r.enableTranslate)return;break}if(this._mouseMoveHandle=o=>{this._orbitMouseMoveFunction(o)},this._mouseUpHandle=()=>{this._orbitMouseUpFunction()},document.removeEventListener("mousemove",this._mouseMoveHandle,!1),document.removeEventListener("mouseup",this._mouseUpHandle,!1),this._orbitLastTimestamp=i.Cesium.getTimestamp(),this._viewer.delegate.trackedEntity)this._orbitFrame=void 0,this._orbitIsLook=!1;else{let o=this._getCameraFocus(!0);o?(this._orbitFrame=i.Cesium.Transforms.eastNorthUpToFixedFrame(o,t.globe.ellipsoid),this._orbitIsLook=!1):(this._orbitFrame=i.Cesium.Transforms.eastNorthUpToFixedFrame(s.positionWC,t.globe.ellipsoid),this._orbitIsLook=!0)}this._rotation_marker.style.visibility="visible",this._gyro.className+=" gyro-active",document.addEventListener("mousemove",this._mouseMoveHandle,!1),document.addEventListener("mouseup",this._mouseUpHandle,!1),this._viewer.clock.onTick.addEventListener(this._orbitTickFunction,this),this._updateAngleAndOpacity(e,this._compassRectangle.width)}}_orbitTickFunction(){let e=this._viewer.scene,t=this._viewer.camera,r=i.Cesium.getTimestamp(),s=r-this._orbitLastTimestamp,o=(this._orbitCursorOpacity-.5)*2.5/1e3,a=s*o,l=this._orbitCursorAngle+i.Cesium.Math.PI_OVER_TWO,h=Math.cos(l)*a,c=Math.sin(l)*a,p;this._orbitFrame&&(p=i.Cesium.Matrix4.clone(t.transform),t.lookAtTransform(this._orbitFrame)),e.mode===i.Cesium.SceneMode.SCENE2D?t.move(new i.Cesium.Cartesian3(h,c,0),Math.max(e.canvas.clientWidth,e.canvas.clientHeight)/100*t.positionCartographic.height*a):this._orbitIsLook?(t.look(i.Cesium.Cartesian3.UNIT_Z,-h),t.look(t.right,-c)):(t.rotateLeft(h),t.rotateUp(c)),this._orbitFrame&&p&&t.lookAtTransform(p),this._orbitLastTimestamp=r}_updateAngleAndOpacity(e,t){let r=Math.atan2(-e.y,e.x);this._orbitCursorAngle=i.Cesium.Math.zeroToTwoPi(r-i.Cesium.Math.PI_OVER_TWO);let s=i.Cesium.Cartesian2.magnitude(e),o=t/2,a=Math.min(s/o,1);this._orbitCursorOpacity=.5*a*a+.5,this._rotation_marker.style.cssText=`
15951
+ `)}_mountContent(){A.create("div","out-ring-bg",this._wrapper),this._outRing=A.parseDom(ie.compass_outer,!0,"out-ring"),this._wrapper.appendChild(this._outRing),this._gyro=A.parseDom(ie.compass_inner,!0,"gyro"),this._wrapper.appendChild(this._gyro),this._rotation_marker=A.parseDom(ie.compass_rotation_marker,!0,"rotation_marker"),this._wrapper.appendChild(this._rotation_marker),this._rotation_marker.style.visibility="hidden",this._ready=!0}_handleMouseDown(e){if(this._viewer.scene.mode===i.Cesium.SceneMode.MORPHING)return!0;this._compassRectangle=e.currentTarget.getBoundingClientRect();let r=this._compassRectangle.width/2,s=this._getVector(e),o=i.Cesium.Cartesian2.magnitude(s)/r;if(o<50/145)this._orbit(s);else if(o<1)this._rotate(s);else return!0}_handleDoubleClick(){let e=this._viewer.scene,t=e.camera,r=e.screenSpaceCameraController;if(e.mode===i.Cesium.SceneMode.MORPHING||!r.enableInputs)return!0;if(e.mode===i.Cesium.SceneMode.COLUMBUS_VIEW&&!r.enableTranslate||(e.mode===i.Cesium.SceneMode.SCENE3D||e.mode===i.Cesium.SceneMode.COLUMBUS_VIEW)&&(!r.enableLook||e.mode===i.Cesium.SceneMode.SCENE3D&&!r.enableRotate))return;let s=this._getCameraFocus(!0);if(!s)return;let o=e.globe.ellipsoid.cartographicToCartesian(t.positionCartographic),n=e.globe.ellipsoid.geodeticSurfaceNormal(s),l=new i.Cesium.BoundingSphere(s,0);t.flyToBoundingSphere(l,{offset:new i.Cesium.HeadingPitchRange(0,i.Cesium.Math.PI_OVER_TWO-i.Cesium.Cartesian3.angleBetween(n,t.directionWC),i.Cesium.Cartesian3.distance(o,s)),duration:1.5})}_getCameraFocus(e){let t=new i.Cesium.Cartesian3,r=this._viewer.scene,s=r.camera;if(r.mode!==i.Cesium.SceneMode.MORPHING){if(this._viewer.delegate.trackedEntity)t=this._viewer.delegate.trackedEntity.position.getValue(this._viewer.clock.currentTime);else{let o=new i.Cesium.Ray;o.origin=s.positionWC,o.direction=s.directionWC,t=r.globe.pick(o,r)}if(t){if(r.mode===i.Cesium.SceneMode.SCENE2D||r.mode===i.Cesium.SceneMode.COLUMBUS_VIEW){t=s.worldToCameraCoordinatesPoint(t);let o=new i.Cesium.Cartographic;e&&(t=r.globe.ellipsoid.cartographicToCartesian(r.mapProjection.unproject(t,o)))}else e||(t=s.worldToCameraCoordinatesPoint(t));return t}}}_orbit(e){let t=this._viewer.scene,r=t.screenSpaceCameraController,s=t.camera;if(!(t.mode===i.Cesium.SceneMode.MORPHING||!r.enableInputs)){switch(t.mode){case i.Cesium.SceneMode.COLUMBUS_VIEW:if(r.enableLook)break;if(!r.enableTranslate||!r.enableTilt)return;break;case i.Cesium.SceneMode.SCENE3D:if(r.enableLook)break;if(!r.enableTilt||!r.enableRotate)return;break;case i.Cesium.SceneMode.SCENE2D:if(!r.enableTranslate)return;break}if(this._mouseMoveHandle=o=>{this._orbitMouseMoveFunction(o)},this._mouseUpHandle=()=>{this._orbitMouseUpFunction()},document.removeEventListener("mousemove",this._mouseMoveHandle,!1),document.removeEventListener("mouseup",this._mouseUpHandle,!1),this._orbitLastTimestamp=i.Cesium.getTimestamp(),this._viewer.delegate.trackedEntity)this._orbitFrame=void 0,this._orbitIsLook=!1;else{let o=this._getCameraFocus(!0);o?(this._orbitFrame=i.Cesium.Transforms.eastNorthUpToFixedFrame(o,t.globe.ellipsoid),this._orbitIsLook=!1):(this._orbitFrame=i.Cesium.Transforms.eastNorthUpToFixedFrame(s.positionWC,t.globe.ellipsoid),this._orbitIsLook=!0)}this._rotation_marker.style.visibility="visible",this._gyro.className+=" gyro-active",document.addEventListener("mousemove",this._mouseMoveHandle,!1),document.addEventListener("mouseup",this._mouseUpHandle,!1),this._viewer.clock.onTick.addEventListener(this._orbitTickFunction,this),this._updateAngleAndOpacity(e,this._compassRectangle.width)}}_orbitTickFunction(){let e=this._viewer.scene,t=this._viewer.camera,r=i.Cesium.getTimestamp(),s=r-this._orbitLastTimestamp,o=(this._orbitCursorOpacity-.5)*2.5/1e3,n=s*o,l=this._orbitCursorAngle+i.Cesium.Math.PI_OVER_TWO,h=Math.cos(l)*n,c=Math.sin(l)*n,p;this._orbitFrame&&(p=i.Cesium.Matrix4.clone(t.transform),t.lookAtTransform(this._orbitFrame)),e.mode===i.Cesium.SceneMode.SCENE2D?t.move(new i.Cesium.Cartesian3(h,c,0),Math.max(e.canvas.clientWidth,e.canvas.clientHeight)/100*t.positionCartographic.height*n):this._orbitIsLook?(t.look(i.Cesium.Cartesian3.UNIT_Z,-h),t.look(t.right,-c)):(t.rotateLeft(h),t.rotateUp(c)),this._orbitFrame&&p&&t.lookAtTransform(p),this._orbitLastTimestamp=r}_updateAngleAndOpacity(e,t){let r=Math.atan2(-e.y,e.x);this._orbitCursorAngle=i.Cesium.Math.zeroToTwoPi(r-i.Cesium.Math.PI_OVER_TWO);let s=i.Cesium.Cartesian2.magnitude(e),o=t/2,n=Math.min(s/o,1);this._orbitCursorOpacity=.5*n*n+.5,this._rotation_marker.style.cssText=`
15954
15952
  transform: rotate(-${this._orbitCursorAngle}rad);
15955
- opacity: ${this._orbitCursorOpacity}`}_orbitMouseMoveFunction(e){this._updateAngleAndOpacity(this._getVector(e),this._compassRectangle.width)}_orbitMouseUpFunction(){document.removeEventListener("mousemove",this._mouseMoveHandle,!1),document.removeEventListener("mouseup",this._mouseUpHandle,!1),this._viewer.clock.onTick.removeEventListener(this._orbitTickFunction,this),this._mouseMoveHandle=void 0,this._mouseUpHandle=void 0,this._rotation_marker.style.visibility="hidden",this._gyro.className=this._gyro.className.replace(" gyro-active","")}_rotate(e){let t=this._viewer.scene,r=t.camera,s=t.screenSpaceCameraController;if(t.mode===i.Cesium.SceneMode.MORPHING||t.mode===i.Cesium.SceneMode.SCENE2D||!s.enableInputs||!s.enableLook&&(t.mode===i.Cesium.SceneMode.COLUMBUS_VIEW||t.mode===i.Cesium.SceneMode.SCENE3D&&!s.enableRotate))return;if(this._mouseMoveHandle=a=>{this._rotateMouseMoveFunction(a)},this._mouseUpHandle=()=>{this._rotateMouseUpFunction()},document.removeEventListener("mousemove",this._mouseMoveHandle,!1),document.removeEventListener("mouseup",this._mouseUpHandle,!1),this._rotateInitialCursorAngle=Math.atan2(-e.y,e.x),this._viewer.delegate.trackedEntity)this._rotateFrame=void 0;else{let a=this._getCameraFocus(!0);!a||t.mode===i.Cesium.SceneMode.COLUMBUS_VIEW&&!s.enableLook&&!s.enableTranslate?this._rotateFrame=i.Cesium.Transforms.eastNorthUpToFixedFrame(r.positionWC,t.globe.ellipsoid):this._rotateFrame=i.Cesium.Transforms.eastNorthUpToFixedFrame(a,t.globe.ellipsoid)}let o;this._rotateFrame&&(o=i.Cesium.Matrix4.clone(r.transform),r.lookAtTransform(this._rotateFrame)),this._rotateInitialCameraAngle=-r.heading,this._rotateFrame&&o&&r.lookAtTransform(o),document.addEventListener("mousemove",this._mouseMoveHandle,!1),document.addEventListener("mouseup",this._mouseUpHandle,!1)}_rotateMouseMoveFunction(e){let t=this._viewer.camera,r=this._getVector(e),o=Math.atan2(-r.y,r.x)-this._rotateInitialCursorAngle,a=i.Cesium.Math.zeroToTwoPi(this._rotateInitialCameraAngle-o),l;this._rotateFrame&&(l=i.Cesium.Matrix4.clone(t.transform),t.lookAtTransform(this._rotateFrame));let h=-t.heading;t.rotateRight(a-h),this._rotateFrame&&l&&t.lookAtTransform(l)}_rotateMouseUpFunction(){document.removeEventListener("mousemove",this._mouseMoveHandle,!1),document.removeEventListener("mouseup",this._mouseUpHandle,!1),this._mouseMoveHandle=void 0,this._mouseUpHandle=void 0}_getVector(e){let t=this._compassRectangle,r=new i.Cesium.Cartesian2((t.right-t.left)/2,(t.bottom-t.top)/2),s=new i.Cesium.Cartesian2(e.clientX-t.left,e.clientY-t.top),o=new i.Cesium.Cartesian2;return i.Cesium.Cartesian2.subtract(s,r,o),o}};M.registerType("compass");var uh=vo;var _h=new i.Cesium.EllipsoidGeodesic,Re=[1,2,3,5],wo=[...Re,...Re.map(n=>n*10),...Re.map(n=>n*100),...Re.map(n=>n*1e3),...Re.map(n=>n*1e4),...Re.map(n=>n*1e5),...Re.map(n=>n*1e6)],To=class extends M{constructor(){super(),this._wrapper=S.create("div","widget distance-legend"),this._labelEl=void 0,this._scaleBarEl=void 0,this._lastUpdate=i.Cesium.getTimestamp(),this._state=d.INITIALIZED}get type(){return M.getWidgetType("distance_legend")}_installHook(){let e=this;Object.defineProperty(this._viewer,"distanceLegend",{get(){return e}})}_bindEvent(){this._viewer.on(A.POST_RENDER,this._updateContent,this)}_unbindEvent(){this._viewer.off(A.POST_RENDER,this._updateContent,this)}_updateContent(e,t){let r=i.Cesium.getTimestamp();if(r<this._lastUpdate+250||!this._labelEl||!this._scaleBarEl)return;this._lastUpdate=r;let s=e.canvas.width,o=e.canvas.height,a=e.camera.getPickRay(new i.Cesium.Cartesian2(s/2|0,o-1)),l=e.camera.getPickRay(new i.Cesium.Cartesian2(1+s/2|0,o-1)),h=e.globe.pick(a,e),c=e.globe.pick(l,e);if(!h||!c)return;_h.setEndPoints(e.globe.ellipsoid.cartesianToCartographic(h),e.globe.ellipsoid.cartesianToCartographic(c));let p=_h.surfaceDistance,f=100,T=0;for(let y=wo.length-1;y>=0;--y)if(wo[y]/p<f){T=wo[y];break}if(T){this._wrapper.style.visibility="visible",this._labelEl.innerHTML=T>=1e3?`${T/1e3} km`:`${T} m`;let y=T/p|0;this._scaleBarEl.style.cssText=`width: ${y}px; left: ${(125-y)/2}px;`}}_mountContent(){this._labelEl=S.create("div","label",this._wrapper),this._scaleBarEl=S.create("div","scale-bar",this._wrapper),this._wrapper.style.visibility="hidden",this._ready=!0}};M.registerType("distance_legend");var fh=To;var Co=class extends M{constructor(){super(),this._wrapper=S.create("div","widget zoom-controller"),this._zoomInEl=void 0,this._zoomOutEl=void 0,this._refreshEl=void 0,this._state=d.INITIALIZED}get type(){return M.getWidgetType("zoom_controller")}_getCameraFocus(e){let t=new i.Cesium.Ray(e.camera.positionWC,e.camera.directionWC),r=i.Cesium.IntersectionTests.rayEllipsoid(t,i.Cesium.Ellipsoid.WGS84);return r?i.Cesium.Ray.getPoint(t,r.start):i.Cesium.IntersectionTests.grazingAltitudeLocation(t,i.Cesium.Ellipsoid.WGS84)}_getCameraPosition(e,t,r){let s=new i.Cesium.Cartesian3,o=i.Cesium.Cartesian3.subtract(t,e.position,s),a=i.Cesium.Cartesian3.multiplyByScalar(o,r,s);return i.Cesium.Cartesian3.add(e.position,a,s)}_zoomIn(){let e=this._viewer.scene,t=e.camera,r=e.screenSpaceCameraController;if(e.mode===i.Cesium.SceneMode.MORPHING||!r.enableInputs||e.mode===i.Cesium.SceneMode.COLUMBUS_VIEW)return!0;if(e.mode===i.Cesium.SceneMode.SCENE2D)t.zoomIn(t.positionCartographic.height*.5);else if(e.mode===i.Cesium.SceneMode.SCENE3D){let s=this._getCameraFocus(e),o=this._getCameraPosition(t,s,1/2);t.flyTo({destination:o,orientation:{heading:t.heading,pitch:t.pitch,roll:t.roll},duration:.5,convert:!1})}}_refresh(){this._viewer.camera.flyHome(1.5)}_zoomOut(){let e=this._viewer.scene,t=e.camera,r=e.screenSpaceCameraController;if(e.mode===i.Cesium.SceneMode.MORPHING||!r.enableInputs||e.mode===i.Cesium.SceneMode.COLUMBUS_VIEW)return!0;if(e.mode===i.Cesium.SceneMode.SCENE2D)t.zoomOut(t.positionCartographic.height);else if(e.mode===i.Cesium.SceneMode.SCENE3D){let s=this._getCameraFocus(e),o=this._getCameraPosition(t,s,-1);t.flyTo({destination:o,orientation:{heading:t.heading,pitch:t.pitch,roll:t.roll},duration:.5,convert:!1})}}_installHook(){let e=this;Object.defineProperty(this._viewer,"zoomController",{get(){return e}})}_mountContent(){this._zoomInEl=S.parseDom($.increase,!0,"zoom-in"),this._refreshEl=S.parseDom($.refresh,!0,"refresh"),this._zoomOutEl=S.parseDom($.decrease,!0,"zoom-out"),this._wrapper.appendChild(this._zoomInEl),this._wrapper.appendChild(this._refreshEl),this._wrapper.appendChild(this._zoomOutEl);let e=this;this._zoomInEl.onclick=()=>{e._zoomIn()},this._refreshEl.onclick=()=>{e._refresh()},this._zoomOutEl.onclick=()=>{e._zoomOut()},this._ready=!0}};M.registerType("zoom_controller");var gh=Co;var xo=class extends M{constructor(){super(),this._wrapper=S.create("div","widget loading-mask"),this._state=d.INITIALIZED}get type(){return M.getWidgetType("loading_mask")}_installHook(){let e=this;Object.defineProperty(this._viewer,"loadingMask",{get(){return e}})}_mountContent(){let e=S.parseDom(`
15953
+ opacity: ${this._orbitCursorOpacity}`}_orbitMouseMoveFunction(e){this._updateAngleAndOpacity(this._getVector(e),this._compassRectangle.width)}_orbitMouseUpFunction(){document.removeEventListener("mousemove",this._mouseMoveHandle,!1),document.removeEventListener("mouseup",this._mouseUpHandle,!1),this._viewer.clock.onTick.removeEventListener(this._orbitTickFunction,this),this._mouseMoveHandle=void 0,this._mouseUpHandle=void 0,this._rotation_marker.style.visibility="hidden",this._gyro.className=this._gyro.className.replace(" gyro-active","")}_rotate(e){let t=this._viewer.scene,r=t.camera,s=t.screenSpaceCameraController;if(t.mode===i.Cesium.SceneMode.MORPHING||t.mode===i.Cesium.SceneMode.SCENE2D||!s.enableInputs||!s.enableLook&&(t.mode===i.Cesium.SceneMode.COLUMBUS_VIEW||t.mode===i.Cesium.SceneMode.SCENE3D&&!s.enableRotate))return;if(this._mouseMoveHandle=n=>{this._rotateMouseMoveFunction(n)},this._mouseUpHandle=()=>{this._rotateMouseUpFunction()},document.removeEventListener("mousemove",this._mouseMoveHandle,!1),document.removeEventListener("mouseup",this._mouseUpHandle,!1),this._rotateInitialCursorAngle=Math.atan2(-e.y,e.x),this._viewer.delegate.trackedEntity)this._rotateFrame=void 0;else{let n=this._getCameraFocus(!0);!n||t.mode===i.Cesium.SceneMode.COLUMBUS_VIEW&&!s.enableLook&&!s.enableTranslate?this._rotateFrame=i.Cesium.Transforms.eastNorthUpToFixedFrame(r.positionWC,t.globe.ellipsoid):this._rotateFrame=i.Cesium.Transforms.eastNorthUpToFixedFrame(n,t.globe.ellipsoid)}let o;this._rotateFrame&&(o=i.Cesium.Matrix4.clone(r.transform),r.lookAtTransform(this._rotateFrame)),this._rotateInitialCameraAngle=-r.heading,this._rotateFrame&&o&&r.lookAtTransform(o),document.addEventListener("mousemove",this._mouseMoveHandle,!1),document.addEventListener("mouseup",this._mouseUpHandle,!1)}_rotateMouseMoveFunction(e){let t=this._viewer.camera,r=this._getVector(e),o=Math.atan2(-r.y,r.x)-this._rotateInitialCursorAngle,n=i.Cesium.Math.zeroToTwoPi(this._rotateInitialCameraAngle-o),l;this._rotateFrame&&(l=i.Cesium.Matrix4.clone(t.transform),t.lookAtTransform(this._rotateFrame));let h=-t.heading;t.rotateRight(n-h),this._rotateFrame&&l&&t.lookAtTransform(l)}_rotateMouseUpFunction(){document.removeEventListener("mousemove",this._mouseMoveHandle,!1),document.removeEventListener("mouseup",this._mouseUpHandle,!1),this._mouseMoveHandle=void 0,this._mouseUpHandle=void 0}_getVector(e){let t=this._compassRectangle,r=new i.Cesium.Cartesian2((t.right-t.left)/2,(t.bottom-t.top)/2),s=new i.Cesium.Cartesian2(e.clientX-t.left,e.clientY-t.top),o=new i.Cesium.Cartesian2;return i.Cesium.Cartesian2.subtract(s,r,o),o}};I.registerType("compass");var Mu=Da;var Iu=new i.Cesium.EllipsoidGeodesic,Ne=[1,2,3,5],La=[...Ne,...Ne.map(a=>a*10),...Ne.map(a=>a*100),...Ne.map(a=>a*1e3),...Ne.map(a=>a*1e4),...Ne.map(a=>a*1e5),...Ne.map(a=>a*1e6)],Ra=class extends I{constructor(){super(),this._wrapper=A.create("div","widget distance-legend"),this._labelEl=void 0,this._scaleBarEl=void 0,this._lastUpdate=i.Cesium.getTimestamp(),this._state=m.INITIALIZED}get type(){return I.getWidgetType("distance_legend")}_installHook(){let e=this;Object.defineProperty(this._viewer,"distanceLegend",{get(){return e}})}_bindEvent(){this._viewer.on(D.POST_RENDER,this._updateContent,this)}_unbindEvent(){this._viewer.off(D.POST_RENDER,this._updateContent,this)}_updateContent(e,t){let r=i.Cesium.getTimestamp();if(r<this._lastUpdate+250||!this._labelEl||!this._scaleBarEl)return;this._lastUpdate=r;let s=e.canvas.width,o=e.canvas.height,n=e.camera.getPickRay(new i.Cesium.Cartesian2(s/2|0,o-1)),l=e.camera.getPickRay(new i.Cesium.Cartesian2(1+s/2|0,o-1)),h=e.globe.pick(n,e),c=e.globe.pick(l,e);if(!h||!c)return;Iu.setEndPoints(e.globe.ellipsoid.cartesianToCartographic(h),e.globe.ellipsoid.cartesianToCartographic(c));let p=Iu.surfaceDistance,_=100,w=0;for(let y=La.length-1;y>=0;--y)if(La[y]/p<_){w=La[y];break}if(w){this._wrapper.style.visibility="visible",this._labelEl.innerHTML=w>=1e3?`${w/1e3} km`:`${w} m`;let y=w/p|0;this._scaleBarEl.style.cssText=`width: ${y}px; left: ${(125-y)/2}px;`}}_mountContent(){this._labelEl=A.create("div","label",this._wrapper),this._scaleBarEl=A.create("div","scale-bar",this._wrapper),this._wrapper.style.visibility="hidden",this._ready=!0}};I.registerType("distance_legend");var Du=Ra;var Oa=class extends I{constructor(){super(),this._wrapper=A.create("div","widget zoom-controller"),this._zoomInEl=void 0,this._zoomOutEl=void 0,this._refreshEl=void 0,this._state=m.INITIALIZED}get type(){return I.getWidgetType("zoom_controller")}_getCameraFocus(e){let t=new i.Cesium.Ray(e.camera.positionWC,e.camera.directionWC),r=i.Cesium.IntersectionTests.rayEllipsoid(t,i.Cesium.Ellipsoid.WGS84);return r?i.Cesium.Ray.getPoint(t,r.start):i.Cesium.IntersectionTests.grazingAltitudeLocation(t,i.Cesium.Ellipsoid.WGS84)}_getCameraPosition(e,t,r){let s=new i.Cesium.Cartesian3,o=i.Cesium.Cartesian3.subtract(t,e.position,s),n=i.Cesium.Cartesian3.multiplyByScalar(o,r,s);return i.Cesium.Cartesian3.add(e.position,n,s)}_zoomIn(){let e=this._viewer.scene,t=e.camera,r=e.screenSpaceCameraController;if(e.mode===i.Cesium.SceneMode.MORPHING||!r.enableInputs||e.mode===i.Cesium.SceneMode.COLUMBUS_VIEW)return!0;if(e.mode===i.Cesium.SceneMode.SCENE2D)t.zoomIn(t.positionCartographic.height*.5);else if(e.mode===i.Cesium.SceneMode.SCENE3D){let s=this._getCameraFocus(e),o=this._getCameraPosition(t,s,1/2);t.flyTo({destination:o,orientation:{heading:t.heading,pitch:t.pitch,roll:t.roll},duration:.5,convert:!1})}}_refresh(){this._viewer.camera.flyHome(1.5)}_zoomOut(){let e=this._viewer.scene,t=e.camera,r=e.screenSpaceCameraController;if(e.mode===i.Cesium.SceneMode.MORPHING||!r.enableInputs||e.mode===i.Cesium.SceneMode.COLUMBUS_VIEW)return!0;if(e.mode===i.Cesium.SceneMode.SCENE2D)t.zoomOut(t.positionCartographic.height);else if(e.mode===i.Cesium.SceneMode.SCENE3D){let s=this._getCameraFocus(e),o=this._getCameraPosition(t,s,-1);t.flyTo({destination:o,orientation:{heading:t.heading,pitch:t.pitch,roll:t.roll},duration:.5,convert:!1})}}_installHook(){let e=this;Object.defineProperty(this._viewer,"zoomController",{get(){return e}})}_mountContent(){this._zoomInEl=A.parseDom(ie.increase,!0,"zoom-in"),this._refreshEl=A.parseDom(ie.refresh,!0,"refresh"),this._zoomOutEl=A.parseDom(ie.decrease,!0,"zoom-out"),this._wrapper.appendChild(this._zoomInEl),this._wrapper.appendChild(this._refreshEl),this._wrapper.appendChild(this._zoomOutEl);let e=this;this._zoomInEl.onclick=()=>{e._zoomIn()},this._refreshEl.onclick=()=>{e._refresh()},this._zoomOutEl.onclick=()=>{e._zoomOut()},this._ready=!0}};I.registerType("zoom_controller");var Lu=Oa;var ka=class extends I{constructor(){super(),this._wrapper=A.create("div","widget loading-mask"),this._state=m.INITIALIZED}get type(){return I.getWidgetType("loading_mask")}_installHook(){let e=this;Object.defineProperty(this._viewer,"loadingMask",{get(){return e}})}_mountContent(){let e=A.parseDom(`
15956
15954
  <span></span>
15957
15955
  <span></span>
15958
15956
  <span></span>
15959
15957
  <span></span>
15960
15958
  <span></span>
15961
- `,!0,"loading");this._wrapper.appendChild(e),this._ready=!0}};M.registerType("loading_mask");var yh=xo;var Eo=class extends M{constructor(){super(),this._wrapper=S.create("div","widget slider"),this._tileset=void 0,this._moveActive=!1,this._state=d.INITIALIZED}get type(){return M.getWidgetType("tileset_split")}_installHook(){let e=this;Object.defineProperty(this._viewer,"tilesetSplit",{get(){return e}})}_bindEvent(){this._viewer.scene.splitPosition=.5,this._wrapper.style.left="50%"}_unbindEvent(){this._tileset?this._viewer.scene.splitPosition=this._tileset.splitDirection>0?1:0:this._viewer.scene.splitPosition=0}_mountContent(){let e=S.parseDom($.splitter,!0,"splitter");this._wrapper.appendChild(e);let t=new i.Cesium.ScreenSpaceEventHandler(e),r=this;t.setInputAction(()=>{r._moveActive=!0},i.Cesium.ScreenSpaceEventType.LEFT_DOWN),t.setInputAction(()=>{r._moveActive=!0},i.Cesium.ScreenSpaceEventType.PINCH_START),t.setInputAction(s=>{r._moveHandler(s)},i.Cesium.ScreenSpaceEventType.MOUSE_MOVE),t.setInputAction(s=>{r._moveHandler(s)},i.Cesium.ScreenSpaceEventType.PINCH_MOVE),t.setInputAction(()=>{r._moveActive=!1},i.Cesium.ScreenSpaceEventType.LEFT_UP),t.setInputAction(()=>{r._moveActive=!1},i.Cesium.ScreenSpaceEventType.PINCH_END),this._ready=!0}_moveHandler(e){if(!this._moveActive||!this._enable)return;let t=e.endPosition.x,r=(this._wrapper.offsetLeft+t)/this._wrapper.parentElement.offsetWidth;this._wrapper.style.left=100*r+"%",this._viewer.scene.splitPosition=r}addTileset(e){return!this._viewer||!this._enable?this:(e&&(this._tileset&&this._viewer.scene.primitives.remove(this._tileset),this._tileset=this._viewer.scene.primitives.add(e.delegate||e),this._viewer.scene.splitPosition=this._wrapper.offsetLeft/this._wrapper.parentElement.offsetWidth),this)}};M.registerType("tileset_split");var vh=Eo;var Po=class extends M{constructor(){super(),this._wrapper=S.create("div","widget slider"),this._tileset=void 0,this._baseLayer=void 0,this._moveActive=!1,this._state=d.INITIALIZED}get type(){return M.getWidgetType("scene_split")}_installHook(){let e=this;Object.defineProperty(this._viewer,"sceneSplit",{get(){return e}})}_bindEvent(){this._viewer.scene.splitPosition=.5,this._wrapper.style.left="50%"}_unbindEvent(){this._viewer.scene.splitPosition=1}_mountContent(){let e=S.parseDom($.splitter,!0,"splitter");this._wrapper.appendChild(e);let t=new i.Cesium.ScreenSpaceEventHandler(e),r=this;t.setInputAction(()=>{r._moveActive=!0},i.Cesium.ScreenSpaceEventType.LEFT_DOWN),t.setInputAction(()=>{r._moveActive=!0},i.Cesium.ScreenSpaceEventType.PINCH_START),t.setInputAction(s=>{r._moveHandler(s)},i.Cesium.ScreenSpaceEventType.MOUSE_MOVE),t.setInputAction(s=>{r._moveHandler(s)},i.Cesium.ScreenSpaceEventType.PINCH_MOVE),t.setInputAction(()=>{r._moveActive=!1},i.Cesium.ScreenSpaceEventType.LEFT_UP),t.setInputAction(()=>{r._moveActive=!1},i.Cesium.ScreenSpaceEventType.PINCH_END),this._ready=!0}_moveHandler(e){if(!this._moveActive||!this._enable)return;let t=e.endPosition.x,r=(this._wrapper.offsetLeft+t)/this._wrapper.parentElement.offsetWidth;this._wrapper.style.left=100*r+"%",this._viewer.scene.splitPosition=r}addTileset(e){return!this._viewer||!this._enable?this:(e&&(this._tileset&&this._viewer.scene.primitives.remove(this._tileset),Promise.resolve(e.delegate||e).then(t=>{this._tileset=this._viewer.scene.primitives.add(t)})),this)}addBaseLayer(e){return!this._viewer||!this._enable?this:(e&&(this._baseLayer&&this._viewer.imageryLayers.remove(this._baseLayer),Promise.resolve(e).then(t=>{this._baseLayer=this._viewer.imageryLayers.addImageryProvider(t),this._baseLayer.splitDirection=1})),this)}};M.registerType("scene_split");var wh=Po;function bo(){return{popup:new eh,contextMenu:new Ul,tooltip:new th,mapSwitch:new $l,mapSplit:new Ql,locationBar:new Bl,hawkeyeMap:new mh,compass:new uh,distanceLegend:new fh,zoomController:new gh,loadingMask:new yh,tilesetSplit:new vh,sceneSplit:new wh}}var Ne="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsSAAALEgHS3X78AAACCklEQVQ4jWP8//8/Ax5gwMDAIACVfgDF2AHIIDSs8Of+8x3/vv/88ffFu++/jl75/evEte//vnz//e/Dl3d/nrye8P//fwF0fSicv28/Vv7/////t8W7/79Wi///gt0DBb9zLfv/89Cl/3/fff7w//9/A2S9cK/9//i1g4GZqeSdcwnzn4v38HmXgSs3gIGnKfEXIyebOQMDwwWQGMwgh/9fvu8hxhAY4Ix1ZeCdnPOTkYNNgoGB4QMT2DWfv6/50riIaENA4Pvi3Qy/T99k//v0TQOIDzLI4P/nb/zfJm8g2hAY+Nq8hIFJmC8DbNDfp28Sfqw7zEKyKQwMDL8OXQKFLShsDJgYmRhN/j58SY45YPDn1hMOUFpjYmBj5aHEIBhg+vvw5QVWPWWyDWBkY/kBoplYjVQPsOgrkWeIADcDq7kmyGsXQLG2gd3XkoFZXpxkg7hzAhn+3nl6HpaOPvx79X4+35xikgwBWcxVEPSXWUW6iAGajhiYxASLWLTkHxNrGMhLAmsb/v57+2klAwPDAbAYUjEi8O/tp0t/rj2U/ZTSy4ArJtns9Bj4F5T9YWBk2M4kKewHNxytPBL49+p9H5OYYOLPzcfBCQ6WbUAGsAdY/2VWkfrz/+PXIiZxwWkorsRRsCn8e/cp8v+nb/aMvFygTMnw/8v3q8zy4rsZGBgWYKhmYGAAAN6EGE9igaT+AAAAAElFTkSuQmCC";var wt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsSAAALEgHS3X78AAAB+klEQVQ4jZ2UT2gTQRTGv5nd7G7TsNnW1QimWC+CghBEqJ7sSTx50oM3iwhejSJ486J4qdWLt6JXsQdPVdRDj0WQBqEehKJotLbEbrLNJvtnZlYmZEub1rLJB8Mw8+b9Zt7Me0PiOMY+KgGwuubv3ba3JKinjUfBj7dC+D6L1tt+82Pke5/agnsRZ+4GC38/iePY6vXbcSLBnXtUGXnYdObQWJ8BC6s7NjeGzyJfuAXNONGgSn4SQCWxbYEE33xECL3zZ+WyEvpf9gsXpn0dVuFuSKgxkcAS0GQsvA9pIIlyI1cweuRBQIh+GECddk4jvLn62nRqiFTTeYWgtaTzaPW+HEtQKeabebc2mxqSqLE2A6qO3uyAeLR6rdWYV/umAPC9RQjuyrspUYCeYVE1hdveioIVQ+YaJSST633mQURZ9KuiDZ0cGECI5sueakOnFjLGYCCqmNCzp2VoFflqr7PmBahasW+QTEwWfFtK8qjOWe35geJ0XxC5sWnf4Kp+rIxuHkFR7bKmH/+ZFiZDOnR0lnPmvASwIOe2F60l2MbnMPg69rd6e1fBJpKFa489ZQB5o2QKl5L53v/I4qz2WFHtqZb7DoG3iLC93DEYuXPImhdlKExwt6yoB59td/zfxzYuuHNV8OZ5SodlUUKI1rKqFd8DeLFrNYB/A6b1Qz9EzRMAAAAASUVORK5CYII=";var lm={icon_center:wt,icon_anchor:Ne,icon_size:[12,12],clampToModel:!1,maxAnchorSize:999},So=class{constructor(){this._viewer=void 0,this._anchorLayer=new i.Cesium.CustomDataSource("draw-anchor-layer"),this._floatingAnchor=void 0,this._options={},this._plotEvent=new Ye,this._tooltipMess=void 0}set tooltipMess(e){this._tooltipMess=e}_getEventPosition(e){let{overlay:t,layer:r,position:s,surfacePosition:o}=e;return!this._options.clampToModel||!t&&!r?o:s}_onClick(e){let t=this._getEventPosition(e);if(!t)return!1;this._floatingAnchor||(this._floatingAnchor=this._onCreateAnchor({position:t})),this._plotEvent.fire(C.DRAW_ANCHOR,t)}_onMouseMove(e){this._viewer.tooltip.showAt(e.windowPosition,this._tooltipMess);let t=this._getEventPosition(e);if(!t)return!1;this._floatingAnchor&&this._floatingAnchor.position.setValue(t),this._plotEvent.fire(C.ANCHOR_MOVING,t)}_onRightClick(e){this._plotEvent.fire(C.DRAW_STOP,this._getEventPosition(e))}_onCreateAnchor({position:e,isCenter:t=!1}){var r;return this._anchorLayer.entities.add({position:e,billboard:{image:t?this._options.icon_center:this._options.icon_anchor,width:this._options.icon_size[0],height:this._options.icon_size[1],pixelOffset:this._options.pixelOffset||new i.Cesium.Cartesian2(0,0),eyeOffset:this._options.eyeOffset||new i.Cesium.Cartesian3(0,0,-100),disableDepthTestDistance:(r=this._options.disableDepthTestDistance)!=null?r:0,heightReference:this._viewer.scene.mode===i.Cesium.SceneMode.SCENE3D&&!this._options.clampToModel?i.Cesium.HeightReference.CLAMP_TO_GROUND:i.Cesium.HeightReference.NONE}})}_onClearAnchor(){this._anchorLayer.entities.removeAll()}_bindEvent(){this._viewer.on(L.CLICK,this._onClick,this),this._viewer.on(L.MOUSE_MOVE,this._onMouseMove,this),this._viewer.on(L.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.on(C.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.on(C.CLEAR_ANCHOR,this._onClearAnchor,this)}_unbindEvent(){this._viewer.off(L.CLICK,this._onClick,this),this._viewer.off(L.MOUSE_MOVE,this._onMouseMove,this),this._viewer.off(L.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.off(C.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.off(C.CLEAR_ANCHOR,this._onClearAnchor,this)}on(e,t,r){return this._plotEvent.on(e,t,r||this),this}off(e,t,r){return this._plotEvent.off(e,t,r||this),this}fire(e,t={}){return this._plotEvent.fire(e,t),this}activate(e={}){return this._viewer.tooltip.enable=!0,this._options={...lm,...e},this._unbindEvent(),this._bindEvent(),this.fire(C.DRAW_START,this._options),this}deactivate(){return this._unbindEvent(),this._viewer.tooltip.enable=!1,this._anchorLayer.entities.removeAll(),this._floatingAnchor=void 0,this}install(e){this._viewer=e,this._viewer.dataSources.add(this._anchorLayer),Object.defineProperty(this._viewer,"drawTool",{value:this,writable:!1})}},Th=So;var Ch="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsSAAALEgHS3X78AAACDElEQVQ4jWP8//8/Ax5gwMDAIACVfgDF2AHIIDSscO/l7x3ff/378fz9n++Hr//4fezmz+9ffvz7/eHr33eP3/6Z8P//fwF0fSguevv5X6UwL1PbwoNfGRrWfGJ48PoPiuUOWuwMDSH8DHryrB8FuZkcGBgYLsDk4AZ9/Pavg5mJscS24SXzhQe/8XmXocCLl6Etgv8XJxujOcwwmEEOX37830OMITCQYM/NMD1F8CcHK6MEAwPDByaQ+Ofv/9fUrvpItCEgsODgV4aTt3+xP3n3twHEBxlk8On7P/4J2z4TbQgMNKz5yCDCy5QBNujJu78Ja05+YyHZFAYGhgPXfjJ8+PoPFDYGTEyMDCYPXv8lxxwwuPnsDwcorTGxsTDyoEczOYDp4es/Fwzk2cg2gI2F8QeIZjJWYjtgoMBKliEC3EwMlmpsIK9dAMXaBn8TTgYFUdLDu8CTl+H2iz/nYenow8uPf+cvyBQiyRCQxcU+vH9VJViKGKDpiEGcn7lIW5b1MbGGgby0qVTk75vPf1eCUgFIDDnTCrz5/O/S1ce/ZROmv8PIsDAAyrhLcoT/MDIybJcSZPaDiaOXRwIvP/7tE+dnTtx45js4wV148Ass4aDFwRBkxvlXVZLlz4ev/4okBJinIWvEVbApvP38L/LT93/2vJxMoEzJ8OXHv6sKoiy7QdkMQzUDAwMAuq71NKWtMMgAAAAASUVORK5CYII=";var cm={icon_center:wt,icon_anchor:Ne,icon_midAnchor:Ch,icon_size:[12,12],clampToModel:!0},Io=class{constructor(){this._viewer=void 0,this._anchorLayer=new i.Cesium.CustomDataSource("edit-anchor-layer"),this._options={},this._plotEvent=new Ye,this._tooltipMess=void 0,this._pickedAnchor=void 0,this._isMoving=!1,this._anchors=[]}set tooltipMess(e){this._tooltipMess=e}_onClick(e){if(this._isMoving){let t=this._options.clampToModel&&e.position?e.position:e.surfacePosition;if(!t)return!1;this._pickedAnchor&&this._pickedAnchor.position&&this._pickedAnchor.properties&&(this._pickedAnchor.position.setValue(t),this._plotEvent.fire(C.EDIT_ANCHOR_STOP,{pickedAnchor:this._pickedAnchor,position:t})),this._isMoving=!1}else{if(!e.target||!e.target.id)return!1;this._pickedAnchor=e.target.id,this._isMoving=!0}}_onMouseMove(e){if(this._viewer.tooltip.showAt(e.windowPosition,this._tooltipMess),!this._isMoving&&this._anchors.length!==0)return!1;let t=this._options.clampToModel&&e.position?e.position:e.surfacePosition;if(!t)return!1;this._pickedAnchor&&this._pickedAnchor.position&&this._pickedAnchor.properties?(this._pickedAnchor.position.setValue(t),this._plotEvent.fire(C.ANCHOR_MOVING,{pickedAnchor:this._pickedAnchor,position:t})):this._anchors.length===0&&this._plotEvent.fire(C.ANCHOR_MOVING,{position:t})}_onRightClick(e){let t=this._options.clampToModel&&e.position?e.position:e.surfacePosition;this._plotEvent.fire(C.EDIT_STOP,{pickedAnchor:this._pickedAnchor,position:t})}_onCreateAnchor({position:e,index:t,isCenter:r=!1,isMid:s=!1}){var l;let o=s?this._options.icon_midAnchor:r?this._options.icon_center:this._options.icon_anchor,a=this._anchorLayer.entities.add({position:e,billboard:{image:o,width:this._options.icon_size[0],height:this._options.icon_size[1],pixelOffset:this._options.pixelOffset||new i.Cesium.Cartesian2(0,0),eyeOffset:this._options.eyeOffset||new i.Cesium.Cartesian3(0,0,-100),disableDepthTestDistance:(l=this._options.disableDepthTestDistance)!=null?l:0,heightReference:this._viewer.scene.mode===i.Cesium.SceneMode.SCENE3D&&!this._options.clampToModel?i.Cesium.HeightReference.CLAMP_TO_GROUND:i.Cesium.HeightReference.NONE},properties:{isMid:s,index:t}});this._anchors.push(a)}_onUpdateAnchor({index:e,position:t}){this._anchors[e]&&this._anchors[e].position.setValue(t)}_onClearAnchor(){this._anchorLayer.entities.removeAll(),this._anchors=[]}_bindEvent(){this._viewer.on(L.CLICK,this._onClick,this),this._viewer.on(L.MOUSE_MOVE,this._onMouseMove,this),this._viewer.on(L.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.on(C.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.on(C.UPDATE_ANCHOR,this._onUpdateAnchor,this),this._plotEvent.on(C.CLEAR_ANCHOR,this._onClearAnchor,this)}_unbindEvent(){this._viewer.off(L.CLICK,this._onClick,this),this._viewer.off(L.MOUSE_MOVE,this._onMouseMove,this),this._viewer.off(L.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.off(C.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.off(C.UPDATE_ANCHOR,this._onUpdateAnchor,this),this._plotEvent.off(C.CLEAR_ANCHOR,this._onClearAnchor,this)}on(e,t,r){return this._plotEvent.on(e,t,r||this),this}off(e,t,r){return this._plotEvent.off(e,t,r||this),this}fire(e,t){return this._plotEvent.fire(e,t),this}activate(e={}){return this._anchorLayer.entities.removeAll(),this._anchors=[],this._viewer.tooltip.enable=!0,this._options={...cm,...e},this._unbindEvent(),this._bindEvent(),this.fire(C.EDIT_START,this._options),this}deactivate(){return this._unbindEvent(),this._viewer.tooltip.enable=!1,this._anchorLayer.entities.removeAll(),this._anchors=[],this}install(e){this._viewer=e,this._viewer.dataSources.add(this._anchorLayer),Object.defineProperty(this._viewer,"editTool",{value:this,writable:!1})}},xh=Io;function Mo(){return{drawTool:new Th,editTool:new xh}}var pm={creditContainer:void 0,shouldAnimate:!0},Ao=class{constructor(e,t={}){if(!ut("isInitialized"))throw new Error("please do the ready function");if(!e||typeof e=="string"&&!document.getElementById(e))throw new Error("Viewer: the container is empty");if(e instanceof HTMLElement)throw new Error("Viewer: not support the type container");if(typeof e=="string"){let o=ut("baseUrl");o&&i.Cesium.buildModuleUrl.setBaseUrl(o)}this._delegate=typeof e!="string"?e:new at(e,{...pm,...t}),new _i(this,t),this._viewerEvent=new gi,this._sceneEvent=new vi(this),this._viewerOption=new Ks(this),this._cameraOption=new $s(this),this._widgetContainer=S.create("div","viewer-widgets",typeof e=="string"?document.getElementById(e):this._delegate.container),this._layerContainer=S.create("div","viewer-layers",typeof e=="string"?document.getElementById(e):this._delegate.container),this._baseLayerPicker=new ho({globe:this._delegate.scene.globe}),this._layerGroupCache={},this._layerCache={};let r=bo();Object.keys(r).forEach(o=>{this._use(r[o])});let s=Mo();Object.keys(s).forEach(o=>{this._use(s[o])})}get delegate(){return this._delegate}get container(){return this._delegate.container}get widgetContainer(){return this._widgetContainer}get layerContainer(){return this._layerContainer}get scene(){return this._delegate.scene}get camera(){return this._delegate.camera}get canvas(){return this._delegate.scene.canvas}get dataSources(){return this._delegate.dataSources}get imageryLayers(){return this._delegate.imageryLayers}get terrainProvider(){return this._delegate.terrainProvider}get entities(){return this._delegate.entities}get postProcessStages(){return this._delegate.scene.postProcessStages}get clock(){return this._delegate.clock}get viewerEvent(){return this._viewerEvent}get cameraPosition(){var t,r,s,o,a,l,h;let e=u.transformCartographicToWGS84((t=this.camera)==null?void 0:t.positionCartographic);return e&&(e.heading=i.Cesium.Math.toDegrees((s=(r=this.camera)==null?void 0:r.heading)!=null?s:0),e.pitch=i.Cesium.Math.toDegrees((a=(o=this.camera)==null?void 0:o.pitch)!=null?a:0),e.roll=i.Cesium.Math.toDegrees((h=(l=this.camera)==null?void 0:l.roll)!=null?h:0)),e}get resolution(){let e=this.scene.canvas.width,t=this.scene.canvas.height,r=u.transformWindowToWGS84(new i.Cesium.Cartesian2(e/2|0,t-1),this),s=u.transformWindowToWGS84(new i.Cesium.Cartesian2(1+e/2|0,t-1),this);return!r||!s?1:Math.abs(r.lng-s.lng)}get viewBounds(){let e=this.scene.canvas.width,t=this.scene.canvas.height,r=u.transformWindowToWGS84(new i.Cesium.Cartesian2(0,t),this),s=u.transformWindowToWGS84(new i.Cesium.Cartesian2(e,0),this);return!r||!s?i.Cesium.Rectangle.MAX_VALUE:i.Cesium.Rectangle.fromDegrees(r.lng,r.lat,s.lng,s.lat)}get zoom(){let e=this.camera.positionCartographic.height,t=40487.57,r=7096758e-11,s=91610.74,o=-40467.74;return Math.round(o+(t-o)/(1+Math.pow(e/s,r)))}_use(e){return e&&e.install&&e.install(this),this}_addLayerGroup(e){e!=null&&e.layerGroupEvent&&!Object(this._layerGroupCache).hasOwnProperty(e.id)&&(e.layerGroupEvent.fire(Se.ADD,this),this._layerGroupCache[e.id]=e)}_removeLayerGroup(e){e!=null&&e.layerGroupEvent&&Object(this._layerGroupCache).hasOwnProperty(e.id)&&(e.layerGroupEvent.fire(Se.REMOVE,this),delete this._layerGroupCache[e.id])}_addLayer(e){!this._layerCache[e.type]&&(this._layerCache[e.type]={}),Object(this._layerCache[e.type]).hasOwnProperty(e.id)||(e.fire(Ie.ADD,this),this._layerCache[e.type][e.id]=e)}_removeLayer(e){Object(this._layerCache[e.type]).hasOwnProperty(e.id)&&(e.fire(Ie.REMOVE,this),delete this._layerCache[e.type][e.id])}setOptions(e){return this._viewerOption.setOptions(e),this}setPitchRange(e=-90,t=-20){return this._cameraOption.setPitchRange(e,t),this}changeSceneMode(e,t=0){return e===2?this._delegate.scene.morphTo2D(t):e===3?this._delegate.scene.morphTo3D(t):e===2.5&&this._delegate.scene.morphToColumbusView(t),this}changeMouseMode(e){return this._cameraOption.changeMouseMode(e),this}setTerrain(e){return this._delegate.scene.setTerrain(new i.Cesium.Terrain(e||Promise.resolve(new i.Cesium.EllipsoidTerrainProvider))),this}addBaseLayer(e,t={}){return e?(this._baseLayerPicker.addImageryLayer(e,t),this._baseLayerPicker.selectedImageryLayer||this._baseLayerPicker.changeImageryLayer(0),this.mapSwitch&&this.mapSwitch.addMap(t),this):this}getBaseLayer(e){return this._baseLayerPicker.getImageryLayer(e)}changeBaseLayer(e){return this._baseLayerPicker.changeImageryLayer(e),this}getImageryLayerInfo(e){let t=this._delegate.camera.getPickRay(e);return this._delegate.imageryLayers.pickImageryLayerFeatures(t,this._delegate.scene)}addLayerGroup(e){return this._addLayerGroup(e),this}removeLayerGroup(e){return this._removeLayerGroup(e),this}getLayerGroup(e){return this._layerGroupCache[e]||void 0}addLayer(e){return this._addLayer(e),this}removeLayer(e){return this._removeLayer(e),this}hasLayer(e){return Object(this._layerCache[e.type]).hasOwnProperty(e.id)}getLayer(e){let t=this.getLayers().filter(r=>r.id===e);return t&&t.length?t[0]:void 0}getLayers(){let e=[];return Object.keys(this._layerCache).forEach(t=>{let r=this._layerCache[t];Object.keys(r).forEach(s=>{e.push(r[s])})}),e}eachLayer(e,t){return Object.keys(this._layerCache).forEach(r=>{let s=this._layerCache[r];Object.keys(s).forEach(o=>{e.call(t,s[o])})}),this}flyTo(e,t){return this._delegate.flyTo((e==null?void 0:e.delegate)||e,{duration:t}),this}zoomTo(e){return this._delegate.zoomTo((e==null?void 0:e.delegate)||e),this}flyToPosition(e,t,r){return e=_.parsePosition(e),this.camera.flyTo({destination:u.transformWGS84ToCartesian(e),orientation:{heading:i.Cesium.Math.toRadians(e.heading),pitch:i.Cesium.Math.toRadians(e.pitch),roll:i.Cesium.Math.toRadians(e.roll)},complete:t,duration:r}),this}zoomToPosition(e,t){return this.flyToPosition(e,t,0),this}flyToBounds(e,{heading:t=0,pitch:r=0,roll:s=0},o,a){return e?(Array.isArray(e)||(e=e.split(",")),this.camera.flyTo({destination:i.Cesium.Rectangle.fromDegrees(e[0],e[1],e[2],e[3]),orientation:{heading:i.Cesium.Math.toRadians(t),pitch:i.Cesium.Math.toRadians(r),roll:i.Cesium.Math.toRadians(s)},complete:o,duration:a}),this):this}zoomToBounds(e,{heading:t=0,pitch:r=0,roll:s=0},o){return this.flyToBounds(e,{heading:t,pitch:r,roll:s},o),this}on(e,t,r){return this._viewerEvent.on(e,t,r||this),this._sceneEvent.on(e,t,r||this),this}once(e,t,r){return this._viewerEvent.once(e,t,r||this),this}off(e,t,r){return this._viewerEvent.off(e,t,r||this),this._sceneEvent.off(e,t,r||this),this}destroy(){return Object.keys(this._layerCache).forEach(e=>{let t=this._layerCache[e];Object.keys(t).forEach(r=>{this._removeLayer(t[r])})}),this._delegate.destroy(),this._delegate=void 0,this._baseLayerPicker=void 0,this._layerCache={},this._widgetContainer.parentNode.removeChild(this._widgetContainer),this._widgetContainer=void 0,this._layerContainer.parentNode.removeChild(this._layerContainer),this._layerContainer=void 0,this}exportScene(e){this.scene.render();let r=this.canvas.toDataURL("image/png").replace("image/png","image/octet-stream"),s=document.createElement("a"),o=v.dataURLtoBlob(r),a=URL.createObjectURL(o);return s.download=`${e||"scene"}.png`,s.href=a,s.click(),this}getOffset(){var r;let e={x:0,y:0},t=(r=this._delegate)==null?void 0:r.container;if(t)if(t.getBoundingClientRect){let s=t.getBoundingClientRect();e.x=s.left,e.y=s.top}else e.x=t.offsetLeft,e.y=t.offsetTop;return e}},Eh=Ao;var dm={ARCGIS:"arcgis",BING:"bing",OSM:"osm",SINGLE_TILE:"single_tile",WMS:"wms",WMTS:"wmts",XYZ:"xyz",COORD:"coord",GRID:"grid",MAPBOX:"mapbox",MAPBOX_STYLE:"mapbox_style",TMS:"tms"},R=dm;var Do=class extends i.Cesium.WebMercatorTilingScheme{constructor(e){super(e);let t=new i.Cesium.WebMercatorProjection;this._projection.project=function(r,s){return s=he.WGS84ToGCJ02(i.Cesium.Math.toDegrees(r.longitude),i.Cesium.Math.toDegrees(r.latitude)),s=t.project(new i.Cesium.Cartographic(i.Cesium.Math.toRadians(s[0]),i.Cesium.Math.toRadians(s[1]))),new i.Cesium.Cartesian2(s.x,s.y)},this._projection.unproject=function(r,s){let o=t.unproject(r);return s=he.GCJ02ToWGS84(i.Cesium.Math.toDegrees(o.longitude),i.Cesium.Math.toDegrees(o.latitude)),new i.Cesium.Cartographic(i.Cesium.Math.toRadians(s[0]),i.Cesium.Math.toRadians(s[1]))}}},Tt=Do;var Ph={img:"//webst{s}.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}",elec:"//webrd{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",cva:"//webst{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}"},Lo=class extends i.Cesium.UrlTemplateImageryProvider{constructor(e={}){e.url=e.url||[e.protocol||"",Ph[e.style]||Ph.elec].join(""),e.subdomains=e.subdomains||["01","02","03","04"],e.crs==="WGS84"&&(e.tilingScheme=new Tt),super(e)}};R.AMAP="amap";var bh=Lo;var mm=637099681e-2,Sh=[1289059486e-2,836237787e-2,5591021,348198983e-2,167804312e-2,0],Ct=[75,60,45,30,15,0],um=[[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]],Ih=[[-.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]],Ro=class{constructor(){this.isWgs84=!1}getDistanceByMC(e,t){if(!e||!t||(e=this.convertMC2LL(e),!e))return 0;let r=this.toRadians(e.lng),s=this.toRadians(e.lat);if(t=this.convertMC2LL(t),!t)return 0;let o=this.toRadians(t.lng),a=this.toRadians(t.lat);return this.getDistance(r,o,s,a)}getDistanceByLL(e,t){if(!e||!t)return 0;e.lng=this.getLoop(e.lng,-180,180),e.lat=this.getRange(e.lat,-74,74),t.lng=this.getLoop(t.lng,-180,180),t.lat=this.getRange(t.lat,-74,74);let r=this.toRadians(e.lng),s=this.toRadians(e.lat),o=this.toRadians(t.lng),a=this.toRadians(t.lat);return this.getDistance(r,o,s,a)}convertMC2LL(e){if(!e)return{lng:0,lat:0};let t={};if(this.isWgs84){t.lng=e.lng/2003750834e-2*180;let o=e.lat/2003750834e-2*180;return t.lat=180/Math.PI*(2*Math.atan(Math.exp(o*Math.PI/180))-Math.PI/2),{lng:t.lng.toFixed(6),lat:t.lat.toFixed(6)}}let r={lng:Math.abs(e.lng),lat:Math.abs(e.lat)},s;for(let o=0;o<Sh.length;o++)if(r.lat>=Sh[o]){s=um[o];break}return t=this.convertor(e,s),{lng:t.lng.toFixed(6),lat:t.lat.toFixed(6)}}convertLL2MC(e){if(!e)return{lng:0,lat:0};if(e.lng>180||e.lng<-180||e.lat>90||e.lat<-90)return e;if(this.isWgs84){let o={},a=6378137;o.lng=e.lng*Math.PI/180*a;let l=e.lat*Math.PI/180;return o.lat=a/2*Math.log((1+Math.sin(l))/(1-Math.sin(l))),{lng:parseFloat(o.lng.toFixed(2)),lat:parseFloat(o.lat.toFixed(2))}}e.lng=this.getLoop(e.lng,-180,180),e.lat=this.getRange(e.lat,-74,74);let t={lng:e.lng,lat:e.lat},r;for(let o=0;o<Ct.length;o++)if(t.lat>=Ct[o]){r=Ih[o];break}if(!r){for(let o=0;o<Ct.length;o++)if(t.lat<=-Ct[o]){r=Ih[o];break}}let s=this.convertor(e,r);return{lng:parseFloat(s.lng.toFixed(2)),lat:parseFloat(s.lat.toFixed(2))}}convertor(e,t){if(!e||!t)return{lng:0,lat:0};let r=t[0]+t[1]*Math.abs(e.lng),s=Math.abs(e.lat)/t[9],o=t[2]+t[3]*s+t[4]*s*s+t[5]*s*s*s+t[6]*s*s*s*s+t[7]*s*s*s*s*s+t[8]*s*s*s*s*s*s;return r*=e.lng<0?-1:1,o*=e.lat<0?-1:1,{lng:r,lat:o}}getDistance(e,t,r,s){return mm*Math.acos(Math.sin(r)*Math.sin(s)+Math.cos(r)*Math.cos(s)*Math.cos(t-e))}toRadians(e){return Math.PI*e/180}toDegrees(e){return 180*e/Math.PI}getRange(e,t,r){return t!=null&&(e=Math.max(e,t)),r!=null&&(e=Math.min(e,r)),e}getLoop(e,t,r){for(;e>r;)e-=r-t;for(;e<t;)e+=r-t;return e}lngLatToMercator(e){return this.convertLL2MC(e)}lngLatToPoint(e){let t=this.convertLL2MC(e);return{x:t.lng,y:t.lat}}mercatorToLngLat(e){return this.convertMC2LL(e)}pointToLngLat(e){let t={lng:e.x,lat:e.y};return this.convertMC2LL(t)}pointToPixel(e,t,r,s){if(!e)return{x:0,y:0};e=this.lngLatToMercator(e);let o=this.getZoomUnits(t),a=Math.round((e.lng-r.lng)/o+s.width/2),l=Math.round((r.lat-e.lat)/o+s.height/2);return{x:a,y:l}}pixelToPoint(e,t,r,s){if(!e)return{lng:0,lat:0};let o=this.getZoomUnits(t),a=r.lng+o*(e.x-s.width/2),l=r.lat-o*(e.y-s.height/2),h={lng:a,lat:l};return this.mercatorToLngLat(h)}getZoomUnits(e){return Math.pow(2,18-e)}},Mh=Ro;var Oo=class extends i.Cesium.WebMercatorTilingScheme{constructor(e){super(e);let t=new Mh;this._projection.project=function(r,s){return s=s||{},s=he.WGS84ToGCJ02(i.Cesium.Math.toDegrees(r.longitude),i.Cesium.Math.toDegrees(r.latitude)),s=he.GCJ02ToBD09(s[0],s[1]),s[0]=Math.min(s[0],180),s[0]=Math.max(s[0],-180),s[1]=Math.min(s[1],74.000022),s[1]=Math.max(s[1],-71.988531),s=t.lngLatToPoint({lng:s[0],lat:s[1]}),new i.Cesium.Cartesian2(s.x,s.y)},this._projection.unproject=function(r,s){return s=s||{},s=t.mercatorToLngLat({lng:r.x,lat:r.y}),s=he.BD09ToGCJ02(s.lng,s.lat),s=he.GCJ02ToWGS84(s[0],s[1]),new i.Cesium.Cartographic(i.Cesium.Math.toRadians(s[0]),i.Cesium.Math.toRadians(s[1]))},this.resolutions=e.resolutions||[]}tileXYToNativeRectangle(e,t,r,s){let o=this.resolutions[r],a=e*o,l=(e+1)*o,h=((t=-t)+1)*o,c=t*o;return i.Cesium.defined(s)?(s.west=a,s.south=c,s.east=l,s.north=h,s):new i.Cesium.Rectangle(a,c,l,h)}positionToTileXY(e,t,r){let s=this._rectangle;if(!i.Cesium.Rectangle.contains(s,e))return;let a=this._projection.project(e);if(!i.Cesium.defined(a))return;let l=this.resolutions[t],h=Math.floor(a.x/l),c=-Math.floor(a.y/l);return i.Cesium.defined(r)?(r.x=h,r.y=c,r):new i.Cesium.Cartesian2(h,c)}},Ah=Oo;var Dh={img:"//shangetu{s}.map.bdimg.com/it/u=x={x};y={y};z={z};v=009;type=sate&fm=46",vec:"//online{s}.map.bdimg.com/tile/?qt=tile&x={x}&y={y}&z={z}&styles=sl&v=020",custom:"//api{s}.map.bdimg.com/customimage/tile?&x={x}&y={y}&z={z}&scale=1&customid={style}",traffic:"//its.map.baidu.com:8002/traffic/TrafficTileService?time={time}&label={labelStyle}&v=016&level={z}&x={x}&y={y}&scaler=2"},ko=class extends i.Cesium.UrlTemplateImageryProvider{constructor(e={}){if(e.url=e.url||[e.protocol||"",Dh[e.style]||Dh.custom].join(""),e.crs==="WGS84"){let t=[];for(let r=0;r<19;r++)t[r]=256*Math.pow(2,18-r);e.tilingScheme=new Ah({resolutions:t,rectangleSouthwestInMeters:new i.Cesium.Cartesian2(-2003772637e-2,-1247410417e-2),rectangleNortheastInMeters:new i.Cesium.Cartesian2(2003772637e-2,1247410417e-2)})}else e.tilingScheme=new i.Cesium.WebMercatorTilingScheme({rectangleSouthwestInMeters:new i.Cesium.Cartesian2(-33554054,-33746824),rectangleNortheastInMeters:new i.Cesium.Cartesian2(33554054,33746824)});e.maximumLevel=18,super(e),this._rectangle=this._tilingScheme.rectangle,this._url=e.url,this._crs=e.crs||"BD09",this._style=e.style||"normal"}requestImage(e,t,r){let s=this._tilingScheme.getNumberOfXTilesAtLevel(r),o=this._tilingScheme.getNumberOfYTilesAtLevel(r),a=this._url.replace("{z}",r).replace("{s}",String(1)).replace("{style}",this._style);return this._crs==="WGS84"?a=a.replace("{x}",String(e)).replace("{y}",String(-t)):a=a.replace("{x}",String(e-s/2)).replace("{y}",String(o/2-t-1)),i.Cesium.ImageryProvider.loadImage(this,a)}};R.BAIDU="baidu";var Lh=ko;var _m="//tiles{s}.geovisearth.com/base/v1/{style}/{z}/{x}/{y}?format={format}&tmsIds=w&token={key}",Fo=class extends i.Cesium.UrlTemplateImageryProvider{constructor(e={}){e.url=e.url||[e.protocol||"",_m.replace(/\{style\}/g,e.style||"vec").replace(/\{format\}/g,e.format||"png").replace(/\{key\}/g,e.key||"")].join(""),e.subdomains=e.subdomains||["1","2","3"],super(e)}};R.GEO_VIS="geoVis";var Rh=Fo;var Oh={img:"https://gac-geo.googlecnapps.cn/maps/vt?lyrs=s&x={x}&y={y}&z={z}",elec:"https://gac-geo.googlecnapps.cn/maps/vt?lyrs=m&x={x}&y={y}&z={z}",cva:"https://gac-geo.googlecnapps.cn/maps/vt?lyrs=h&x={x}&y={y}&z={z}",ter:"https://gac-geo.googlecnapps.cn/maps/vt?lyrs=t@131,r&x={x}&y={y}&z={z}",img_cva:"https://gac-geo.googlecnapps.cn/maps/vt?lyrs=y&x={x}&y={y}&z={z}"},zo=class extends i.Cesium.UrlTemplateImageryProvider{constructor(e={}){e.url=e.url||[e.protocol||"",Oh[e.style]||Oh.elec].join(""),e.crs==="WGS84"&&(e.tilingScheme=new Tt),super(e)}};R.GOOGLE="google";var kh=zo;var fm="//t{s}.tianditu.gov.cn/DataServer?T={style}_w&x={x}&y={y}&l={z}&tk={key}",Ho=class extends i.Cesium.UrlTemplateImageryProvider{constructor(e={}){super({url:[e.protocol||"",fm.replace(/\{style\}/g,e.style||"vec").replace(/\{key\}/g,e.key||"")].join(""),subdomains:["0","1","2","3","4","5","6","7"],maximumLevel:18})}};R.TDT="tdt";var Fh=Ho;var zh={img:"//p{s}.map.gtimg.com/sateTiles/{z}/{sx}/{sy}/{x}_{reverseY}.jpg?version=400",elec:"//rt{s}.map.gtimg.com/tile?z={z}&x={x}&y={reverseY}&styleid={style}&scene=0&version=347"},No=class extends i.Cesium.UrlTemplateImageryProvider{constructor(e={}){let t=e.url||[e.protocol||"",zh[e.style]||zh.elec].join("");e.url=t.replace("{style}",e.style||1),e.subdomains=e.subdomains||["1","2","3"],e.style==="img"&&(e.customTags={sx:(r,s,o,a)=>s>>4,sy:(r,s,o,a)=>(1<<a)-o>>4}),super(e)}};R.TENCENT="tencent";var Hh=No;var Wo=class{static createAMapImageryLayer(e){return Promise.resolve(new bh(e))}static createBaiduImageryLayer(e){return Promise.resolve(new Lh(e))}static createGeoVisImageryLayer(e){return Promise.resolve(new Rh(e))}static createGoogleImageryLayer(e){return Promise.resolve(new kh(e))}static createTdtImageryLayer(e){return Promise.resolve(new Fh(e))}static createTencentImageryLayer(e){return Promise.resolve(new Hh(e))}static createArcGisImageryLayer(e){return i.Cesium.ArcGisMapServerImageryProvider.fromUrl(e.url,e)}static createBingImageryLayer(e){return i.Cesium.BingMapsImageryProvider.fromUrl(e.url,e)}static createOSMImageryLayer(e){return Promise.resolve(new i.Cesium.OpenStreetMapImageryProvider(e))}static createSingleTileImageryLayer(e){return i.Cesium.SingleTileImageryProvider.fromUrl(e.url,e)}static createWMSImageryLayer(e){return Promise.resolve(new i.Cesium.WebMapServiceImageryProvider(e))}static createWMTSImageryLayer(e){return Promise.resolve(new i.Cesium.WebMapTileServiceImageryProvider(e))}static createXYZImageryLayer(e){return Promise.resolve(new i.Cesium.UrlTemplateImageryProvider(e))}static createCoordImageryLayer(e){return Promise.resolve(new i.Cesium.TileCoordinatesImageryProvider(e))}static createGridImageryLayer(e){return Promise.resolve(new i.Cesium.GridImageryProvider(e))}static createMapboxImageryLayer(e){return Promise.resolve(new i.Cesium.MapboxImageryProvider(e))}static createMapboxStyleImageryLayer(e){return Promise.resolve(new i.Cesium.MapboxStyleImageryProvider(e))}static createTMSImageryLayer(e){return i.Cesium.TileMapServiceImageryProvider.fromUrl(e.url,e)}static createImageryLayer(e,t){let r;switch(e){case R.AMAP:r=this.createAMapImageryLayer(t);break;case R.BAIDU:r=this.createBaiduImageryLayer(t);break;case R.GEO_VIS:r=this.createGeoVisImageryLayer(t);break;case R.GOOGLE:r=this.createGoogleImageryLayer(t);break;case R.TDT:r=this.createTdtImageryLayer(t);break;case R.TENCENT:r=this.createTencentImageryLayer(t);break;case R.ARCGIS:r=this.createArcGisImageryLayer(t);break;case R.BING:r=this.createBingImageryLayer(t);break;case R.OSM:r=this.createOSMImageryLayer(t);break;case R.SINGLE_TILE:r=this.createSingleTileImageryLayer(t);break;case R.WMS:r=this.createWMSImageryLayer(t);break;case R.WMTS:r=this.createWMTSImageryLayer(t);break;case R.XYZ:r=this.createXYZImageryLayer(t);break;case R.COORD:r=this.createCoordImageryLayer(t);break;case R.GRID:r=this.createGridImageryLayer(t);break;case R.MAPBOX:r=this.createMapboxImageryLayer(t);break;case R.MAPBOX_STYLE:r=this.createMapboxStyleImageryLayer(t);break;case R.TMS:r=this.createTMSImageryLayer(t);break;default:break}return r}},Go=Wo;var Uo=class extends i.Cesium.GeographicTilingScheme{constructor(e={}){super(e),this._origin=e.origin||[-180,90],this._zoomOffset=e.zoomOffset||0,this._tileSize=e.tileSize||256,this._resolutions=e.resolutions||[]}get zoomOffset(){return this._zoomOffset}tileXYToRectangle(e,t,r,s){if(!this._resolutions||!this._resolutions[r+this._zoomOffset])return i.Cesium.Rectangle.MAX_VALUE;let o=this._resolutions[r+this._zoomOffset]*this._tileSize,a=i.Cesium.Math.toRadians(this._origin[0]+e*o),l=i.Cesium.Math.toRadians(this._origin[1]-(t+1)*o),h=i.Cesium.Math.toRadians(this._origin[0]+(e+1)*o),c=i.Cesium.Math.toRadians(this._origin[1]-t*o);return s?(s.west=a,s.south=l,s.east=h,s.north=c,s):new i.Cesium.Rectangle(a,l,h,c)}positionToTileXY(e,t,r){if(!this._resolutions||!this._resolutions[t+this._zoomOffset])return new i.Cesium.Cartesian2;let s=this._resolutions[t+this._zoomOffset]*this._tileSize,o=i.Cesium.Math.toDegrees(e.longitude),a=i.Cesium.Math.toDegrees(e.latitude),l=Math.floor((o-this._origin[0])/s),h=Math.floor((this._origin[1]-a)/s);return r?(r.x=l,r.y=h,r):new i.Cesium.Cartesian2(Math.max(0,l),Math.max(0,h))}},Bo=Uo;var Vo=class extends i.Cesium.WebMercatorTilingScheme{constructor(e={}){super(e),this._origin=e.origin||[-200375083427892e-7,200375083427892e-7],this._zoomOffset=e.zoomOffset||0,this._tileSize=e.tileSize||256,this._resolutions=e.resolutions||[]}get zoomOffset(){return this._zoomOffset}tileXYToNativeRectangle(e,t,r,s){if(!this._resolutions||!this._resolutions[r+this._zoomOffset])return i.Cesium.Rectangle.MAX_VALUE;if(e<0||t<0)return i.Cesium.Rectangle.MAX_VALUE;let o=this._resolutions[r+this._zoomOffset]*this._tileSize,a=this._origin[0]+e*o,l=this._origin[1]-(t+1)*o,h=this._origin[0]+(e+1)*o,c=this._origin[1]-t*o;return s?(s.west=a,s.south=l,s.east=h,s.north=c,s):new i.Cesium.Rectangle(a,l,h,c)}positionToTileXY(e,t,r){let s=this._rectangle;if(!i.Cesium.Rectangle.contains(s,e))return;if(!this._resolutions||!this._resolutions[t+this._zoomOffset])return new i.Cesium.Cartesian2;let o=this._resolutions[t+this._zoomOffset]*this._tileSize,l=this._projection.project(e),h=Math.floor((l.x-this._origin[0])/o),c=Math.floor((this._origin[1]-l.y)/o);return r?(r.x=h,r.y=c,r):new i.Cesium.Cartesian2(Math.max(0,h),Math.max(0,c))}},jo=Vo;var gm={NONE:"none",XYZ:"xyz",ARCGIS:"arcgis",GOOGLE:"google",VR:"vr"},xe=gm;var Yo=class{static createEllipsoidTerrain(e){return Promise.resolve(new i.Cesium.EllipsoidTerrainProvider(e))}static createUrlTerrain(e){return i.Cesium.CesiumTerrainProvider.fromUrl(e.url,e)}static createGoogleTerrain(e){return i.Cesium.GoogleEarthEnterpriseTerrainProvider.fromUrl(e.url,e)}static createArcgisTerrain(e){return i.Cesium.ArcGISTiledElevationTerrainProvider.fromUrl(e.url,e)}static createVRTerrain(e){return i.Cesium.VRTheWorldTerrainProvider.fromUrl(e.url,e)}static createTerrain(e,t){let r;switch(e){case xe.NONE:r=this.createEllipsoidTerrain(t);break;case xe.XYZ:r=this.createUrlTerrain(t);break;case xe.GOOGLE:r=this.createGoogleTerrain(t);break;case xe.ARCGIS:r=this.createArcgisTerrain(t);break;case xe.VR:r=this.createVRTerrain(t);break;default:break}return r}},Zo=Yo;var Wh=[].indexOf||function(n){for(let e=0,t=this.length;e<t;e++)if(e in this&&this[e]===n)return e;return-1},xt=`attribute vec4 position;
15959
+ `,!0,"loading");this._wrapper.appendChild(e),this._ready=!0}};I.registerType("loading_mask");var Ru=ka;var za=class extends I{constructor(){super(),this._wrapper=A.create("div","widget slider"),this._tileset=void 0,this._moveActive=!1,this._state=m.INITIALIZED}get type(){return I.getWidgetType("tileset_split")}_installHook(){let e=this;Object.defineProperty(this._viewer,"tilesetSplit",{get(){return e}})}_bindEvent(){this._viewer.scene.splitPosition=.5,this._wrapper.style.left="50%"}_unbindEvent(){this._tileset?this._viewer.scene.splitPosition=this._tileset.splitDirection>0?1:0:this._viewer.scene.splitPosition=0}_mountContent(){let e=A.parseDom(ie.splitter,!0,"splitter");this._wrapper.appendChild(e);let t=new i.Cesium.ScreenSpaceEventHandler(e),r=this;t.setInputAction(()=>{r._moveActive=!0},i.Cesium.ScreenSpaceEventType.LEFT_DOWN),t.setInputAction(()=>{r._moveActive=!0},i.Cesium.ScreenSpaceEventType.PINCH_START),t.setInputAction(s=>{r._moveHandler(s)},i.Cesium.ScreenSpaceEventType.MOUSE_MOVE),t.setInputAction(s=>{r._moveHandler(s)},i.Cesium.ScreenSpaceEventType.PINCH_MOVE),t.setInputAction(()=>{r._moveActive=!1},i.Cesium.ScreenSpaceEventType.LEFT_UP),t.setInputAction(()=>{r._moveActive=!1},i.Cesium.ScreenSpaceEventType.PINCH_END),this._ready=!0}_moveHandler(e){if(!this._moveActive||!this._enable)return;let t=e.endPosition.x,r=(this._wrapper.offsetLeft+t)/this._wrapper.parentElement.offsetWidth;this._wrapper.style.left=100*r+"%",this._viewer.scene.splitPosition=r}addTileset(e){return!this._viewer||!this._enable?this:(e&&(this._tileset&&this._viewer.scene.primitives.remove(this._tileset),this._tileset=this._viewer.scene.primitives.add(e.delegate||e),this._viewer.scene.splitPosition=this._wrapper.offsetLeft/this._wrapper.parentElement.offsetWidth),this)}};I.registerType("tileset_split");var Ou=za;var Fa=class extends I{constructor(){super(),this._wrapper=A.create("div","widget slider"),this._tileset=void 0,this._baseLayer=void 0,this._moveActive=!1,this._state=m.INITIALIZED}get type(){return I.getWidgetType("scene_split")}_installHook(){let e=this;Object.defineProperty(this._viewer,"sceneSplit",{get(){return e}})}_bindEvent(){this._viewer.scene.splitPosition=.5,this._wrapper.style.left="50%"}_unbindEvent(){this._viewer.scene.splitPosition=1}_mountContent(){let e=A.parseDom(ie.splitter,!0,"splitter");this._wrapper.appendChild(e);let t=new i.Cesium.ScreenSpaceEventHandler(e),r=this;t.setInputAction(()=>{r._moveActive=!0},i.Cesium.ScreenSpaceEventType.LEFT_DOWN),t.setInputAction(()=>{r._moveActive=!0},i.Cesium.ScreenSpaceEventType.PINCH_START),t.setInputAction(s=>{r._moveHandler(s)},i.Cesium.ScreenSpaceEventType.MOUSE_MOVE),t.setInputAction(s=>{r._moveHandler(s)},i.Cesium.ScreenSpaceEventType.PINCH_MOVE),t.setInputAction(()=>{r._moveActive=!1},i.Cesium.ScreenSpaceEventType.LEFT_UP),t.setInputAction(()=>{r._moveActive=!1},i.Cesium.ScreenSpaceEventType.PINCH_END),this._ready=!0}_moveHandler(e){if(!this._moveActive||!this._enable)return;let t=e.endPosition.x,r=(this._wrapper.offsetLeft+t)/this._wrapper.parentElement.offsetWidth;this._wrapper.style.left=100*r+"%",this._viewer.scene.splitPosition=r}addTileset(e){return!this._viewer||!this._enable?this:(e&&(this._tileset&&this._viewer.scene.primitives.remove(this._tileset),Promise.resolve(e.delegate||e).then(t=>{this._tileset=this._viewer.scene.primitives.add(t)})),this)}addBaseLayer(e){return!this._viewer||!this._enable?this:(e&&(this._baseLayer&&this._viewer.imageryLayers.remove(this._baseLayer),Promise.resolve(e).then(t=>{this._baseLayer=this._viewer.imageryLayers.addImageryProvider(t),this._baseLayer.splitDirection=1})),this)}};I.registerType("scene_split");var ku=Fa;function Ha(){return{popup:new _u,contextMenu:new ru,tooltip:new fu,mapSwitch:new uu,mapSplit:new mu,locationBar:new su,hawkeyeMap:new Au,compass:new Mu,distanceLegend:new Du,zoomController:new Lu,loadingMask:new Ru,tilesetSplit:new Ou,sceneSplit:new ku}}var tt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsSAAALEgHS3X78AAACCklEQVQ4jWP8//8/Ax5gwMDAIACVfgDF2AHIIDSs8Of+8x3/vv/88ffFu++/jl75/evEte//vnz//e/Dl3d/nrye8P//fwF0fSicv28/Vv7/////t8W7/79Wi///gt0DBb9zLfv/89Cl/3/fff7w//9/A2S9cK/9//i1g4GZqeSdcwnzn4v38HmXgSs3gIGnKfEXIyebOQMDwwWQGMwgh/9fvu8hxhAY4Ix1ZeCdnPOTkYNNgoGB4QMT2DWfv6/50riIaENA4Pvi3Qy/T99k//v0TQOIDzLI4P/nb/zfJm8g2hAY+Nq8hIFJmC8DbNDfp28Sfqw7zEKyKQwMDL8OXQKFLShsDJgYmRhN/j58SY45YPDn1hMOUFpjYmBj5aHEIBhg+vvw5QVWPWWyDWBkY/kBoplYjVQPsOgrkWeIADcDq7kmyGsXQLG2gd3XkoFZXpxkg7hzAhn+3nl6HpaOPvx79X4+35xikgwBWcxVEPSXWUW6iAGajhiYxASLWLTkHxNrGMhLAmsb/v57+2klAwPDAbAYUjEi8O/tp0t/rj2U/ZTSy4ArJtns9Bj4F5T9YWBk2M4kKewHNxytPBL49+p9H5OYYOLPzcfBCQ6WbUAGsAdY/2VWkfrz/+PXIiZxwWkorsRRsCn8e/cp8v+nb/aMvFygTMnw/8v3q8zy4rsZGBgWYKhmYGAAAN6EGE9igaT+AAAAAElFTkSuQmCC";var oi="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsSAAALEgHS3X78AAAB+klEQVQ4jZ2UT2gTQRTGv5nd7G7TsNnW1QimWC+CghBEqJ7sSTx50oM3iwhejSJ486J4qdWLt6JXsQdPVdRDj0WQBqEehKJotLbEbrLNJvtnZlYmZEub1rLJB8Mw8+b9Zt7Me0PiOMY+KgGwuubv3ba3JKinjUfBj7dC+D6L1tt+82Pke5/agnsRZ+4GC38/iePY6vXbcSLBnXtUGXnYdObQWJ8BC6s7NjeGzyJfuAXNONGgSn4SQCWxbYEE33xECL3zZ+WyEvpf9gsXpn0dVuFuSKgxkcAS0GQsvA9pIIlyI1cweuRBQIh+GECddk4jvLn62nRqiFTTeYWgtaTzaPW+HEtQKeabebc2mxqSqLE2A6qO3uyAeLR6rdWYV/umAPC9RQjuyrspUYCeYVE1hdveioIVQ+YaJSST633mQURZ9KuiDZ0cGECI5sueakOnFjLGYCCqmNCzp2VoFflqr7PmBahasW+QTEwWfFtK8qjOWe35geJ0XxC5sWnf4Kp+rIxuHkFR7bKmH/+ZFiZDOnR0lnPmvASwIOe2F60l2MbnMPg69rd6e1fBJpKFa489ZQB5o2QKl5L53v/I4qz2WFHtqZb7DoG3iLC93DEYuXPImhdlKExwt6yoB59td/zfxzYuuHNV8OZ5SodlUUKI1rKqFd8DeLFrNYB/A6b1Qz9EzRMAAAAASUVORK5CYII=";var X1={icon_center:oi,icon_anchor:tt,icon_size:[12,12],clampToModel:!1,maxAnchorSize:999},Na=class{constructor(){this._viewer=void 0,this._anchorLayer=new i.Cesium.CustomDataSource("draw-anchor-layer"),this._floatingAnchor=void 0,this._options={},this._plotEvent=new ht,this._tooltipMess=void 0}set tooltipMess(e){this._tooltipMess=e}_getEventPosition(e){let{overlay:t,layer:r,position:s,surfacePosition:o}=e;return!this._options.clampToModel||!t&&!r?o:s}_onClick(e){let t=this._getEventPosition(e);if(!t)return!1;this._floatingAnchor||(this._floatingAnchor=this._onCreateAnchor({position:t})),this._plotEvent.fire(x.DRAW_ANCHOR,t)}_onMouseMove(e){this._viewer.tooltip.showAt(e.windowPosition,this._tooltipMess);let t=this._getEventPosition(e);if(!t)return!1;this._floatingAnchor&&this._floatingAnchor.position.setValue(t),this._plotEvent.fire(x.ANCHOR_MOVING,t)}_onRightClick(e){this._plotEvent.fire(x.DRAW_STOP,this._getEventPosition(e))}_onCreateAnchor({position:e,isCenter:t=!1}){var r;return this._anchorLayer.entities.add({position:e,billboard:{image:t?this._options.icon_center:this._options.icon_anchor,width:this._options.icon_size[0],height:this._options.icon_size[1],pixelOffset:this._options.pixelOffset||new i.Cesium.Cartesian2(0,0),eyeOffset:this._options.eyeOffset||new i.Cesium.Cartesian3(0,0,-100),disableDepthTestDistance:(r=this._options.disableDepthTestDistance)!=null?r:0,heightReference:this._viewer.scene.mode===i.Cesium.SceneMode.SCENE3D&&!this._options.clampToModel?i.Cesium.HeightReference.CLAMP_TO_GROUND:i.Cesium.HeightReference.NONE}})}_onClearAnchor(){this._anchorLayer.entities.removeAll()}_bindEvent(){this._viewer.on(R.CLICK,this._onClick,this),this._viewer.on(R.MOUSE_MOVE,this._onMouseMove,this),this._viewer.on(R.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.on(x.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.on(x.CLEAR_ANCHOR,this._onClearAnchor,this)}_unbindEvent(){this._viewer.off(R.CLICK,this._onClick,this),this._viewer.off(R.MOUSE_MOVE,this._onMouseMove,this),this._viewer.off(R.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.off(x.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.off(x.CLEAR_ANCHOR,this._onClearAnchor,this)}on(e,t,r){return this._plotEvent.on(e,t,r||this),this}off(e,t,r){return this._plotEvent.off(e,t,r||this),this}fire(e,t={}){return this._plotEvent.fire(e,t),this}activate(e={}){return this._viewer.tooltip.enable=!0,this._options={...X1,...e},this._unbindEvent(),this._bindEvent(),this.fire(x.DRAW_START,this._options),this}deactivate(){return this._unbindEvent(),this._viewer.tooltip.enable=!1,this._anchorLayer.entities.removeAll(),this._floatingAnchor=void 0,this}install(e){this._viewer=e,this._viewer.dataSources.add(this._anchorLayer),Object.defineProperty(this._viewer,"drawTool",{value:this,writable:!1})}},zu=Na;var Fu="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsSAAALEgHS3X78AAACDElEQVQ4jWP8//8/Ax5gwMDAIACVfgDF2AHIIDSscO/l7x3ff/378fz9n++Hr//4fezmz+9ffvz7/eHr33eP3/6Z8P//fwF0fSguevv5X6UwL1PbwoNfGRrWfGJ48PoPiuUOWuwMDSH8DHryrB8FuZkcGBgYLsDk4AZ9/Pavg5mJscS24SXzhQe/8XmXocCLl6Etgv8XJxujOcwwmEEOX37830OMITCQYM/NMD1F8CcHK6MEAwPDByaQ+Ofv/9fUrvpItCEgsODgV4aTt3+xP3n3twHEBxlk8On7P/4J2z4TbQgMNKz5yCDCy5QBNujJu78Ja05+YyHZFAYGhgPXfjJ8+PoPFDYGTEyMDCYPXv8lxxwwuPnsDwcorTGxsTDyoEczOYDp4es/Fwzk2cg2gI2F8QeIZjJWYjtgoMBKliEC3EwMlmpsIK9dAMXaBn8TTgYFUdLDu8CTl+H2iz/nYenow8uPf+cvyBQiyRCQxcU+vH9VJViKGKDpiEGcn7lIW5b1MbGGgby0qVTk75vPf1eCUgFIDDnTCrz5/O/S1ce/ZROmv8PIsDAAyrhLcoT/MDIybJcSZPaDiaOXRwIvP/7tE+dnTtx45js4wV148Ass4aDFwRBkxvlXVZLlz4ev/4okBJinIWvEVbApvP38L/LT93/2vJxMoEzJ8OXHv6sKoiy7QdkMQzUDAwMAuq71NKWtMMgAAAAASUVORK5CYII=";var K1={icon_center:oi,icon_anchor:tt,icon_midAnchor:Fu,icon_size:[12,12],clampToModel:!0},Wa=class{constructor(){this._viewer=void 0,this._anchorLayer=new i.Cesium.CustomDataSource("edit-anchor-layer"),this._options={},this._plotEvent=new ht,this._tooltipMess=void 0,this._pickedAnchor=void 0,this._isMoving=!1,this._anchors=[]}set tooltipMess(e){this._tooltipMess=e}_onClick(e){if(this._isMoving){let t=this._options.clampToModel&&e.position?e.position:e.surfacePosition;if(!t)return!1;this._pickedAnchor&&this._pickedAnchor.position&&this._pickedAnchor.properties&&(this._pickedAnchor.position.setValue(t),this._plotEvent.fire(x.EDIT_ANCHOR_STOP,{pickedAnchor:this._pickedAnchor,position:t})),this._isMoving=!1}else{if(!e.target||!e.target.id)return!1;this._pickedAnchor=e.target.id,this._isMoving=!0}}_onMouseMove(e){if(this._viewer.tooltip.showAt(e.windowPosition,this._tooltipMess),!this._isMoving&&this._anchors.length!==0)return!1;let t=this._options.clampToModel&&e.position?e.position:e.surfacePosition;if(!t)return!1;this._pickedAnchor&&this._pickedAnchor.position&&this._pickedAnchor.properties?(this._pickedAnchor.position.setValue(t),this._plotEvent.fire(x.ANCHOR_MOVING,{pickedAnchor:this._pickedAnchor,position:t})):this._anchors.length===0&&this._plotEvent.fire(x.ANCHOR_MOVING,{position:t})}_onRightClick(e){let t=this._options.clampToModel&&e.position?e.position:e.surfacePosition;this._plotEvent.fire(x.EDIT_STOP,{pickedAnchor:this._pickedAnchor,position:t})}_onCreateAnchor({position:e,index:t,isCenter:r=!1,isMid:s=!1}){var l;let o=s?this._options.icon_midAnchor:r?this._options.icon_center:this._options.icon_anchor,n=this._anchorLayer.entities.add({position:e,billboard:{image:o,width:this._options.icon_size[0],height:this._options.icon_size[1],pixelOffset:this._options.pixelOffset||new i.Cesium.Cartesian2(0,0),eyeOffset:this._options.eyeOffset||new i.Cesium.Cartesian3(0,0,-100),disableDepthTestDistance:(l=this._options.disableDepthTestDistance)!=null?l:0,heightReference:this._viewer.scene.mode===i.Cesium.SceneMode.SCENE3D&&!this._options.clampToModel?i.Cesium.HeightReference.CLAMP_TO_GROUND:i.Cesium.HeightReference.NONE},properties:{isMid:s,index:t}});this._anchors.push(n)}_onUpdateAnchor({index:e,position:t}){this._anchors[e]&&this._anchors[e].position.setValue(t)}_onClearAnchor(){this._anchorLayer.entities.removeAll(),this._anchors=[]}_bindEvent(){this._viewer.on(R.CLICK,this._onClick,this),this._viewer.on(R.MOUSE_MOVE,this._onMouseMove,this),this._viewer.on(R.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.on(x.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.on(x.UPDATE_ANCHOR,this._onUpdateAnchor,this),this._plotEvent.on(x.CLEAR_ANCHOR,this._onClearAnchor,this)}_unbindEvent(){this._viewer.off(R.CLICK,this._onClick,this),this._viewer.off(R.MOUSE_MOVE,this._onMouseMove,this),this._viewer.off(R.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.off(x.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.off(x.UPDATE_ANCHOR,this._onUpdateAnchor,this),this._plotEvent.off(x.CLEAR_ANCHOR,this._onClearAnchor,this)}on(e,t,r){return this._plotEvent.on(e,t,r||this),this}off(e,t,r){return this._plotEvent.off(e,t,r||this),this}fire(e,t){return this._plotEvent.fire(e,t),this}activate(e={}){return this._anchorLayer.entities.removeAll(),this._anchors=[],this._viewer.tooltip.enable=!0,this._options={...K1,...e},this._unbindEvent(),this._bindEvent(),this.fire(x.EDIT_START,this._options),this}deactivate(){return this._unbindEvent(),this._viewer.tooltip.enable=!1,this._anchorLayer.entities.removeAll(),this._anchors=[],this}install(e){this._viewer=e,this._viewer.dataSources.add(this._anchorLayer),Object.defineProperty(this._viewer,"editTool",{value:this,writable:!1})}},Hu=Wa;function Ga(){return{drawTool:new zu,editTool:new Hu}}var Q1={creditContainer:void 0,shouldAnimate:!0},Ua=class{constructor(e,t={}){if(!Gt("isInitialized"))throw new Error("please do the ready function");if(!e||typeof e=="string"&&!document.getElementById(e))throw new Error("Viewer: the container is empty");if(e instanceof HTMLElement)throw new Error("Viewer: not support the type container");if(typeof e=="string"){let o=Gt("baseUrl");o&&i.Cesium.buildModuleUrl.setBaseUrl(o)}this._delegate=typeof e!="string"?e:new Ot(e,{...Q1,...t}),new er(this,t),this._viewerEvent=new ir,this._sceneEvent=new sr(this),this._viewerOption=new ca(this),this._cameraOption=new da(this),this._widgetContainer=A.create("div","viewer-widgets",typeof e=="string"?document.getElementById(e):this._delegate.container),this._layerContainer=A.create("div","viewer-layers",typeof e=="string"?document.getElementById(e):this._delegate.container),this._baseLayerPicker=new Ta({globe:this._delegate.scene.globe}),this._layerGroupCache={},this._layerCache={};let r=Ha();Object.keys(r).forEach(o=>{this._use(r[o])});let s=Ga();Object.keys(s).forEach(o=>{this._use(s[o])})}get delegate(){return this._delegate}get container(){return this._delegate.container}get widgetContainer(){return this._widgetContainer}get layerContainer(){return this._layerContainer}get scene(){return this._delegate.scene}get camera(){return this._delegate.camera}get canvas(){return this._delegate.scene.canvas}get dataSources(){return this._delegate.dataSources}get imageryLayers(){return this._delegate.imageryLayers}get terrainProvider(){return this._delegate.terrainProvider}get entities(){return this._delegate.entities}get postProcessStages(){return this._delegate.scene.postProcessStages}get clock(){return this._delegate.clock}get viewerEvent(){return this._viewerEvent}get cameraPosition(){var t,r,s,o,n,l,h;let e=u.transformCartographicToWGS84((t=this.camera)==null?void 0:t.positionCartographic);return e&&(e.heading=i.Cesium.Math.toDegrees((s=(r=this.camera)==null?void 0:r.heading)!=null?s:0),e.pitch=i.Cesium.Math.toDegrees((n=(o=this.camera)==null?void 0:o.pitch)!=null?n:0),e.roll=i.Cesium.Math.toDegrees((h=(l=this.camera)==null?void 0:l.roll)!=null?h:0)),e}get resolution(){let e=this.scene.canvas.width,t=this.scene.canvas.height,r=u.transformWindowToWGS84(new i.Cesium.Cartesian2(e/2|0,t-1),this),s=u.transformWindowToWGS84(new i.Cesium.Cartesian2(1+e/2|0,t-1),this);return!r||!s?1:Math.abs(r.lng-s.lng)}get viewBounds(){let e=this.scene.canvas.width,t=this.scene.canvas.height,r=u.transformWindowToWGS84(new i.Cesium.Cartesian2(0,t),this),s=u.transformWindowToWGS84(new i.Cesium.Cartesian2(e,0),this);return!r||!s?i.Cesium.Rectangle.MAX_VALUE:i.Cesium.Rectangle.fromDegrees(r.lng,r.lat,s.lng,s.lat)}get zoom(){let e=this.camera.positionCartographic.height,t=40487.57,r=7096758e-11,s=91610.74,o=-40467.74;return Math.round(o+(t-o)/(1+Math.pow(e/s,r)))}_use(e){return e&&e.install&&e.install(this),this}_addLayerGroup(e){e!=null&&e.layerGroupEvent&&!Object(this._layerGroupCache).hasOwnProperty(e.id)&&(e.layerGroupEvent.fire(De.ADD,this),this._layerGroupCache[e.id]=e)}_removeLayerGroup(e){e!=null&&e.layerGroupEvent&&Object(this._layerGroupCache).hasOwnProperty(e.id)&&(e.layerGroupEvent.fire(De.REMOVE,this),delete this._layerGroupCache[e.id])}_addLayer(e){!this._layerCache[e.type]&&(this._layerCache[e.type]={}),Object(this._layerCache[e.type]).hasOwnProperty(e.id)||(e.fire(Le.ADD,this),this._layerCache[e.type][e.id]=e)}_removeLayer(e){Object(this._layerCache[e.type]).hasOwnProperty(e.id)&&(e.fire(Le.REMOVE,this),delete this._layerCache[e.type][e.id])}setOptions(e){return this._viewerOption.setOptions(e),this}setPitchRange(e=-90,t=-20){return this._cameraOption.setPitchRange(e,t),this}changeSceneMode(e,t=0){return e===2?this._delegate.scene.morphTo2D(t):e===3?this._delegate.scene.morphTo3D(t):e===2.5&&this._delegate.scene.morphToColumbusView(t),this}changeMouseMode(e){return this._cameraOption.changeMouseMode(e),this}setTerrain(e){return this._delegate.scene.setTerrain(new i.Cesium.Terrain(e||Promise.resolve(new i.Cesium.EllipsoidTerrainProvider))),this}addBaseLayer(e,t={}){return e?(this._baseLayerPicker.addImageryLayer(e,t),this._baseLayerPicker.selectedImageryLayer||this._baseLayerPicker.changeImageryLayer(0),this.mapSwitch&&this.mapSwitch.addMap(t),this):this}getBaseLayer(e){return this._baseLayerPicker.getImageryLayer(e)}changeBaseLayer(e){return this._baseLayerPicker.changeImageryLayer(e),this}getImageryLayerInfo(e){let t=this._delegate.camera.getPickRay(e);return this._delegate.imageryLayers.pickImageryLayerFeatures(t,this._delegate.scene)}addLayerGroup(e){return this._addLayerGroup(e),this}removeLayerGroup(e){return this._removeLayerGroup(e),this}getLayerGroup(e){return this._layerGroupCache[e]||void 0}addLayer(e){return this._addLayer(e),this}removeLayer(e){return this._removeLayer(e),this}hasLayer(e){return Object(this._layerCache[e.type]).hasOwnProperty(e.id)}getLayer(e){let t=this.getLayers().filter(r=>r.id===e);return t&&t.length?t[0]:void 0}getLayers(){let e=[];return Object.keys(this._layerCache).forEach(t=>{let r=this._layerCache[t];Object.keys(r).forEach(s=>{e.push(r[s])})}),e}eachLayer(e,t){return Object.keys(this._layerCache).forEach(r=>{let s=this._layerCache[r];Object.keys(s).forEach(o=>{e.call(t,s[o])})}),this}flyTo(e,t){return this._delegate.flyTo((e==null?void 0:e.delegate)||e,{duration:t}),this}zoomTo(e){return this._delegate.zoomTo((e==null?void 0:e.delegate)||e),this}flyToPosition(e,t,r){return e=f.parsePosition(e),this.camera.flyTo({destination:u.transformWGS84ToCartesian(e),orientation:{heading:i.Cesium.Math.toRadians(e.heading),pitch:i.Cesium.Math.toRadians(e.pitch),roll:i.Cesium.Math.toRadians(e.roll)},complete:t,duration:r}),this}zoomToPosition(e,t){return this.flyToPosition(e,t,0),this}flyToBounds(e,{heading:t=0,pitch:r=0,roll:s=0},o,n){return e?(Array.isArray(e)||(e=e.split(",")),this.camera.flyTo({destination:i.Cesium.Rectangle.fromDegrees(e[0],e[1],e[2],e[3]),orientation:{heading:i.Cesium.Math.toRadians(t),pitch:i.Cesium.Math.toRadians(r),roll:i.Cesium.Math.toRadians(s)},complete:o,duration:n}),this):this}zoomToBounds(e,{heading:t=0,pitch:r=0,roll:s=0},o){return this.flyToBounds(e,{heading:t,pitch:r,roll:s},o),this}on(e,t,r){return this._viewerEvent.on(e,t,r||this),this._sceneEvent.on(e,t,r||this),this}once(e,t,r){return this._viewerEvent.once(e,t,r||this),this}off(e,t,r){return this._viewerEvent.off(e,t,r||this),this._sceneEvent.off(e,t,r||this),this}destroy(){return Object.keys(this._layerCache).forEach(e=>{let t=this._layerCache[e];Object.keys(t).forEach(r=>{this._removeLayer(t[r])})}),this._delegate.destroy(),this._delegate=void 0,this._baseLayerPicker=void 0,this._layerCache={},this._widgetContainer.parentNode.removeChild(this._widgetContainer),this._widgetContainer=void 0,this._layerContainer.parentNode.removeChild(this._layerContainer),this._layerContainer=void 0,this}exportScene(e){this.scene.render();let r=this.canvas.toDataURL("image/png").replace("image/png","image/octet-stream"),s=document.createElement("a"),o=v.dataURLtoBlob(r),n=URL.createObjectURL(o);return s.download=`${e||"scene"}.png`,s.href=n,s.click(),this}getOffset(){var r;let e={x:0,y:0},t=(r=this._delegate)==null?void 0:r.container;if(t)if(t.getBoundingClientRect){let s=t.getBoundingClientRect();e.x=s.left,e.y=s.top}else e.x=t.offsetLeft,e.y=t.offsetTop;return e}},Nu=Ua;var $1={ARCGIS:"arcgis",BING:"bing",OSM:"osm",SINGLE_TILE:"single_tile",WMS:"wms",WMTS:"wmts",XYZ:"xyz",COORD:"coord",GRID:"grid",MAPBOX:"mapbox",MAPBOX_STYLE:"mapbox_style",TMS:"tms"},O=$1;var Ba=class extends i.Cesium.WebMercatorTilingScheme{constructor(e){super(e);let t=new i.Cesium.WebMercatorProjection;this._projection.project=function(r,s){return s=me.WGS84ToGCJ02(i.Cesium.Math.toDegrees(r.longitude),i.Cesium.Math.toDegrees(r.latitude)),s=t.project(new i.Cesium.Cartographic(i.Cesium.Math.toRadians(s[0]),i.Cesium.Math.toRadians(s[1]))),new i.Cesium.Cartesian2(s.x,s.y)},this._projection.unproject=function(r,s){let o=t.unproject(r);return s=me.GCJ02ToWGS84(i.Cesium.Math.toDegrees(o.longitude),i.Cesium.Math.toDegrees(o.latitude)),new i.Cesium.Cartographic(i.Cesium.Math.toRadians(s[0]),i.Cesium.Math.toRadians(s[1]))}}},ai=Ba;var Wu={img:"//webst{s}.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}",elec:"//webrd{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",cva:"//webst{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}"},Va=class extends i.Cesium.UrlTemplateImageryProvider{constructor(e={}){e.url=e.url||[e.protocol||"",Wu[e.style]||Wu.elec].join(""),e.subdomains=e.subdomains||["01","02","03","04"],e.crs==="WGS84"&&(e.tilingScheme=new ai),super(e)}};O.AMAP="amap";var Gu=Va;var eE=637099681e-2,Uu=[1289059486e-2,836237787e-2,5591021,348198983e-2,167804312e-2,0],ni=[75,60,45,30,15,0],tE=[[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]],Bu=[[-.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]],ja=class{constructor(){this.isWgs84=!1}getDistanceByMC(e,t){if(!e||!t||(e=this.convertMC2LL(e),!e))return 0;let r=this.toRadians(e.lng),s=this.toRadians(e.lat);if(t=this.convertMC2LL(t),!t)return 0;let o=this.toRadians(t.lng),n=this.toRadians(t.lat);return this.getDistance(r,o,s,n)}getDistanceByLL(e,t){if(!e||!t)return 0;e.lng=this.getLoop(e.lng,-180,180),e.lat=this.getRange(e.lat,-74,74),t.lng=this.getLoop(t.lng,-180,180),t.lat=this.getRange(t.lat,-74,74);let r=this.toRadians(e.lng),s=this.toRadians(e.lat),o=this.toRadians(t.lng),n=this.toRadians(t.lat);return this.getDistance(r,o,s,n)}convertMC2LL(e){if(!e)return{lng:0,lat:0};let t={};if(this.isWgs84){t.lng=e.lng/2003750834e-2*180;let o=e.lat/2003750834e-2*180;return t.lat=180/Math.PI*(2*Math.atan(Math.exp(o*Math.PI/180))-Math.PI/2),{lng:t.lng.toFixed(6),lat:t.lat.toFixed(6)}}let r={lng:Math.abs(e.lng),lat:Math.abs(e.lat)},s;for(let o=0;o<Uu.length;o++)if(r.lat>=Uu[o]){s=tE[o];break}return t=this.convertor(e,s),{lng:t.lng.toFixed(6),lat:t.lat.toFixed(6)}}convertLL2MC(e){if(!e)return{lng:0,lat:0};if(e.lng>180||e.lng<-180||e.lat>90||e.lat<-90)return e;if(this.isWgs84){let o={},n=6378137;o.lng=e.lng*Math.PI/180*n;let l=e.lat*Math.PI/180;return o.lat=n/2*Math.log((1+Math.sin(l))/(1-Math.sin(l))),{lng:parseFloat(o.lng.toFixed(2)),lat:parseFloat(o.lat.toFixed(2))}}e.lng=this.getLoop(e.lng,-180,180),e.lat=this.getRange(e.lat,-74,74);let t={lng:e.lng,lat:e.lat},r;for(let o=0;o<ni.length;o++)if(t.lat>=ni[o]){r=Bu[o];break}if(!r){for(let o=0;o<ni.length;o++)if(t.lat<=-ni[o]){r=Bu[o];break}}let s=this.convertor(e,r);return{lng:parseFloat(s.lng.toFixed(2)),lat:parseFloat(s.lat.toFixed(2))}}convertor(e,t){if(!e||!t)return{lng:0,lat:0};let r=t[0]+t[1]*Math.abs(e.lng),s=Math.abs(e.lat)/t[9],o=t[2]+t[3]*s+t[4]*s*s+t[5]*s*s*s+t[6]*s*s*s*s+t[7]*s*s*s*s*s+t[8]*s*s*s*s*s*s;return r*=e.lng<0?-1:1,o*=e.lat<0?-1:1,{lng:r,lat:o}}getDistance(e,t,r,s){return eE*Math.acos(Math.sin(r)*Math.sin(s)+Math.cos(r)*Math.cos(s)*Math.cos(t-e))}toRadians(e){return Math.PI*e/180}toDegrees(e){return 180*e/Math.PI}getRange(e,t,r){return t!=null&&(e=Math.max(e,t)),r!=null&&(e=Math.min(e,r)),e}getLoop(e,t,r){for(;e>r;)e-=r-t;for(;e<t;)e+=r-t;return e}lngLatToMercator(e){return this.convertLL2MC(e)}lngLatToPoint(e){let t=this.convertLL2MC(e);return{x:t.lng,y:t.lat}}mercatorToLngLat(e){return this.convertMC2LL(e)}pointToLngLat(e){let t={lng:e.x,lat:e.y};return this.convertMC2LL(t)}pointToPixel(e,t,r,s){if(!e)return{x:0,y:0};e=this.lngLatToMercator(e);let o=this.getZoomUnits(t),n=Math.round((e.lng-r.lng)/o+s.width/2),l=Math.round((r.lat-e.lat)/o+s.height/2);return{x:n,y:l}}pixelToPoint(e,t,r,s){if(!e)return{lng:0,lat:0};let o=this.getZoomUnits(t),n=r.lng+o*(e.x-s.width/2),l=r.lat-o*(e.y-s.height/2),h={lng:n,lat:l};return this.mercatorToLngLat(h)}getZoomUnits(e){return Math.pow(2,18-e)}},Vu=ja;var qa=class extends i.Cesium.WebMercatorTilingScheme{constructor(e){super(e);let t=new Vu;this._projection.project=function(r,s){return s=s||{},s=me.WGS84ToGCJ02(i.Cesium.Math.toDegrees(r.longitude),i.Cesium.Math.toDegrees(r.latitude)),s=me.GCJ02ToBD09(s[0],s[1]),s[0]=Math.min(s[0],180),s[0]=Math.max(s[0],-180),s[1]=Math.min(s[1],74.000022),s[1]=Math.max(s[1],-71.988531),s=t.lngLatToPoint({lng:s[0],lat:s[1]}),new i.Cesium.Cartesian2(s.x,s.y)},this._projection.unproject=function(r,s){return s=s||{},s=t.mercatorToLngLat({lng:r.x,lat:r.y}),s=me.BD09ToGCJ02(s.lng,s.lat),s=me.GCJ02ToWGS84(s[0],s[1]),new i.Cesium.Cartographic(i.Cesium.Math.toRadians(s[0]),i.Cesium.Math.toRadians(s[1]))},this.resolutions=e.resolutions||[]}tileXYToNativeRectangle(e,t,r,s){let o=this.resolutions[r],n=e*o,l=(e+1)*o,h=((t=-t)+1)*o,c=t*o;return i.Cesium.defined(s)?(s.west=n,s.south=c,s.east=l,s.north=h,s):new i.Cesium.Rectangle(n,c,l,h)}positionToTileXY(e,t,r){let s=this._rectangle;if(!i.Cesium.Rectangle.contains(s,e))return;let n=this._projection.project(e);if(!i.Cesium.defined(n))return;let l=this.resolutions[t],h=Math.floor(n.x/l),c=-Math.floor(n.y/l);return i.Cesium.defined(r)?(r.x=h,r.y=c,r):new i.Cesium.Cartesian2(h,c)}},ju=qa;var qu={img:"//shangetu{s}.map.bdimg.com/it/u=x={x};y={y};z={z};v=009;type=sate&fm=46",vec:"//online{s}.map.bdimg.com/tile/?qt=tile&x={x}&y={y}&z={z}&styles=sl&v=020",custom:"//api{s}.map.bdimg.com/customimage/tile?&x={x}&y={y}&z={z}&scale=1&customid={style}",traffic:"//its.map.baidu.com:8002/traffic/TrafficTileService?time={time}&label={labelStyle}&v=016&level={z}&x={x}&y={y}&scaler=2"},Ya=class extends i.Cesium.UrlTemplateImageryProvider{constructor(e={}){if(e.url=e.url||[e.protocol||"",qu[e.style]||qu.custom].join(""),e.crs==="WGS84"){let t=[];for(let r=0;r<19;r++)t[r]=256*Math.pow(2,18-r);e.tilingScheme=new ju({resolutions:t,rectangleSouthwestInMeters:new i.Cesium.Cartesian2(-2003772637e-2,-1247410417e-2),rectangleNortheastInMeters:new i.Cesium.Cartesian2(2003772637e-2,1247410417e-2)})}else e.tilingScheme=new i.Cesium.WebMercatorTilingScheme({rectangleSouthwestInMeters:new i.Cesium.Cartesian2(-33554054,-33746824),rectangleNortheastInMeters:new i.Cesium.Cartesian2(33554054,33746824)});e.maximumLevel=18,super(e),this._rectangle=this._tilingScheme.rectangle,this._url=e.url,this._crs=e.crs||"BD09",this._style=e.style||"normal"}requestImage(e,t,r){let s=this._tilingScheme.getNumberOfXTilesAtLevel(r),o=this._tilingScheme.getNumberOfYTilesAtLevel(r),n=this._url.replace("{z}",r).replace("{s}",String(1)).replace("{style}",this._style);return this._crs==="WGS84"?n=n.replace("{x}",String(e)).replace("{y}",String(-t)):n=n.replace("{x}",String(e-s/2)).replace("{y}",String(o/2-t-1)),i.Cesium.ImageryProvider.loadImage(this,n)}};O.BAIDU="baidu";var Yu=Ya;var iE="//tiles{s}.geovisearth.com/base/v1/{style}/{z}/{x}/{y}?format={format}&tmsIds=w&token={key}",Za=class extends i.Cesium.UrlTemplateImageryProvider{constructor(e={}){e.url=e.url||[e.protocol||"",iE.replace(/\{style\}/g,e.style||"vec").replace(/\{format\}/g,e.format||"png").replace(/\{key\}/g,e.key||"")].join(""),e.subdomains=e.subdomains||["1","2","3"],super(e)}};O.GEO_VIS="geoVis";var Zu=Za;var Xu={img:"https://gac-geo.googlecnapps.cn/maps/vt?lyrs=s&x={x}&y={y}&z={z}",elec:"https://gac-geo.googlecnapps.cn/maps/vt?lyrs=m&x={x}&y={y}&z={z}",cva:"https://gac-geo.googlecnapps.cn/maps/vt?lyrs=h&x={x}&y={y}&z={z}",ter:"https://gac-geo.googlecnapps.cn/maps/vt?lyrs=t@131,r&x={x}&y={y}&z={z}",img_cva:"https://gac-geo.googlecnapps.cn/maps/vt?lyrs=y&x={x}&y={y}&z={z}"},Xa=class extends i.Cesium.UrlTemplateImageryProvider{constructor(e={}){e.url=e.url||[e.protocol||"",Xu[e.style]||Xu.elec].join(""),e.crs==="WGS84"&&(e.tilingScheme=new ai),super(e)}};O.GOOGLE="google";var Ju=Xa;var rE="//t{s}.tianditu.gov.cn/DataServer?T={style}_w&x={x}&y={y}&l={z}&tk={key}",Ja=class extends i.Cesium.UrlTemplateImageryProvider{constructor(e={}){super({url:[e.protocol||"",rE.replace(/\{style\}/g,e.style||"vec").replace(/\{key\}/g,e.key||"")].join(""),subdomains:["0","1","2","3","4","5","6","7"],maximumLevel:18})}};O.TDT="tdt";var Ku=Ja;var Qu={img:"//p{s}.map.gtimg.com/sateTiles/{z}/{sx}/{sy}/{x}_{reverseY}.jpg?version=400",elec:"//rt{s}.map.gtimg.com/tile?z={z}&x={x}&y={reverseY}&styleid={style}&scene=0&version=347"},Ka=class extends i.Cesium.UrlTemplateImageryProvider{constructor(e={}){let t=e.url||[e.protocol||"",Qu[e.style]||Qu.elec].join("");e.url=t.replace("{style}",e.style||1),e.subdomains=e.subdomains||["1","2","3"],e.style==="img"&&(e.customTags={sx:(r,s,o,n)=>s>>4,sy:(r,s,o,n)=>(1<<n)-o>>4}),super(e)}};O.TENCENT="tencent";var $u=Ka;var Qa=class{static createAMapImageryLayer(e){return Promise.resolve(new Gu(e))}static createBaiduImageryLayer(e){return Promise.resolve(new Yu(e))}static createGeoVisImageryLayer(e){return Promise.resolve(new Zu(e))}static createGoogleImageryLayer(e){return Promise.resolve(new Ju(e))}static createTdtImageryLayer(e){return Promise.resolve(new Ku(e))}static createTencentImageryLayer(e){return Promise.resolve(new $u(e))}static createArcGisImageryLayer(e){return i.Cesium.ArcGisMapServerImageryProvider.fromUrl(e.url,e)}static createBingImageryLayer(e){return i.Cesium.BingMapsImageryProvider.fromUrl(e.url,e)}static createOSMImageryLayer(e){return Promise.resolve(new i.Cesium.OpenStreetMapImageryProvider(e))}static createSingleTileImageryLayer(e){return i.Cesium.SingleTileImageryProvider.fromUrl(e.url,e)}static createWMSImageryLayer(e){return Promise.resolve(new i.Cesium.WebMapServiceImageryProvider(e))}static createWMTSImageryLayer(e){return Promise.resolve(new i.Cesium.WebMapTileServiceImageryProvider(e))}static createXYZImageryLayer(e){return Promise.resolve(new i.Cesium.UrlTemplateImageryProvider(e))}static createCoordImageryLayer(e){return Promise.resolve(new i.Cesium.TileCoordinatesImageryProvider(e))}static createGridImageryLayer(e){return Promise.resolve(new i.Cesium.GridImageryProvider(e))}static createMapboxImageryLayer(e){return Promise.resolve(new i.Cesium.MapboxImageryProvider(e))}static createMapboxStyleImageryLayer(e){return Promise.resolve(new i.Cesium.MapboxStyleImageryProvider(e))}static createTMSImageryLayer(e){return i.Cesium.TileMapServiceImageryProvider.fromUrl(e.url,e)}static createImageryLayer(e,t){let r;switch(e){case O.AMAP:r=this.createAMapImageryLayer(t);break;case O.BAIDU:r=this.createBaiduImageryLayer(t);break;case O.GEO_VIS:r=this.createGeoVisImageryLayer(t);break;case O.GOOGLE:r=this.createGoogleImageryLayer(t);break;case O.TDT:r=this.createTdtImageryLayer(t);break;case O.TENCENT:r=this.createTencentImageryLayer(t);break;case O.ARCGIS:r=this.createArcGisImageryLayer(t);break;case O.BING:r=this.createBingImageryLayer(t);break;case O.OSM:r=this.createOSMImageryLayer(t);break;case O.SINGLE_TILE:r=this.createSingleTileImageryLayer(t);break;case O.WMS:r=this.createWMSImageryLayer(t);break;case O.WMTS:r=this.createWMTSImageryLayer(t);break;case O.XYZ:r=this.createXYZImageryLayer(t);break;case O.COORD:r=this.createCoordImageryLayer(t);break;case O.GRID:r=this.createGridImageryLayer(t);break;case O.MAPBOX:r=this.createMapboxImageryLayer(t);break;case O.MAPBOX_STYLE:r=this.createMapboxStyleImageryLayer(t);break;case O.TMS:r=this.createTMSImageryLayer(t);break;default:break}return r}},$a=Qa;var en=class extends i.Cesium.GeographicTilingScheme{constructor(e={}){super(e),this._origin=e.origin||[-180,90],this._zoomOffset=e.zoomOffset||0,this._tileSize=e.tileSize||256,this._resolutions=e.resolutions||[]}get zoomOffset(){return this._zoomOffset}tileXYToRectangle(e,t,r,s){if(!this._resolutions||!this._resolutions[r+this._zoomOffset])return i.Cesium.Rectangle.MAX_VALUE;let o=this._resolutions[r+this._zoomOffset]*this._tileSize,n=i.Cesium.Math.toRadians(this._origin[0]+e*o),l=i.Cesium.Math.toRadians(this._origin[1]-(t+1)*o),h=i.Cesium.Math.toRadians(this._origin[0]+(e+1)*o),c=i.Cesium.Math.toRadians(this._origin[1]-t*o);return s?(s.west=n,s.south=l,s.east=h,s.north=c,s):new i.Cesium.Rectangle(n,l,h,c)}positionToTileXY(e,t,r){if(!this._resolutions||!this._resolutions[t+this._zoomOffset])return new i.Cesium.Cartesian2;let s=this._resolutions[t+this._zoomOffset]*this._tileSize,o=i.Cesium.Math.toDegrees(e.longitude),n=i.Cesium.Math.toDegrees(e.latitude),l=Math.floor((o-this._origin[0])/s),h=Math.floor((this._origin[1]-n)/s);return r?(r.x=l,r.y=h,r):new i.Cesium.Cartesian2(Math.max(0,l),Math.max(0,h))}},tn=en;var rn=class extends i.Cesium.WebMercatorTilingScheme{constructor(e={}){super(e),this._origin=e.origin||[-200375083427892e-7,200375083427892e-7],this._zoomOffset=e.zoomOffset||0,this._tileSize=e.tileSize||256,this._resolutions=e.resolutions||[]}get zoomOffset(){return this._zoomOffset}tileXYToNativeRectangle(e,t,r,s){if(!this._resolutions||!this._resolutions[r+this._zoomOffset])return i.Cesium.Rectangle.MAX_VALUE;if(e<0||t<0)return i.Cesium.Rectangle.MAX_VALUE;let o=this._resolutions[r+this._zoomOffset]*this._tileSize,n=this._origin[0]+e*o,l=this._origin[1]-(t+1)*o,h=this._origin[0]+(e+1)*o,c=this._origin[1]-t*o;return s?(s.west=n,s.south=l,s.east=h,s.north=c,s):new i.Cesium.Rectangle(n,l,h,c)}positionToTileXY(e,t,r){let s=this._rectangle;if(!i.Cesium.Rectangle.contains(s,e))return;if(!this._resolutions||!this._resolutions[t+this._zoomOffset])return new i.Cesium.Cartesian2;let o=this._resolutions[t+this._zoomOffset]*this._tileSize,l=this._projection.project(e),h=Math.floor((l.x-this._origin[0])/o),c=Math.floor((this._origin[1]-l.y)/o);return r?(r.x=h,r.y=c,r):new i.Cesium.Cartesian2(Math.max(0,h),Math.max(0,c))}},sn=rn;var sE={NONE:"none",XYZ:"xyz",ARCGIS:"arcgis",GOOGLE:"google",VR:"vr"},Se=sE;var on=class{static createEllipsoidTerrain(e){return Promise.resolve(new i.Cesium.EllipsoidTerrainProvider(e))}static createUrlTerrain(e){return i.Cesium.CesiumTerrainProvider.fromUrl(e.url,e)}static createGoogleTerrain(e){return i.Cesium.GoogleEarthEnterpriseTerrainProvider.fromUrl(e.url,e)}static createArcgisTerrain(e){return i.Cesium.ArcGISTiledElevationTerrainProvider.fromUrl(e.url,e)}static createVRTerrain(e){return i.Cesium.VRTheWorldTerrainProvider.fromUrl(e.url,e)}static createTerrain(e,t){let r;switch(e){case Se.NONE:r=this.createEllipsoidTerrain(t);break;case Se.XYZ:r=this.createUrlTerrain(t);break;case Se.GOOGLE:r=this.createGoogleTerrain(t);break;case Se.ARCGIS:r=this.createArcgisTerrain(t);break;case Se.VR:r=this.createVRTerrain(t);break;default:break}return r}},an=on;var t_=[].indexOf||function(a){for(let e=0,t=this.length;e<t;e++)if(e in this&&this[e]===a)return e;return-1},li=`attribute vec4 position;
15962
15960
  varying vec2 texcoord;
15963
15961
  void main(){
15964
15962
  texcoord = position.xy*0.5+0.5;
15965
15963
  gl_Position = position;
15966
- }`,Et=`#ifdef GL_FRAGMENT_PRECISION_HIGH
15964
+ }`,hi=`#ifdef GL_FRAGMENT_PRECISION_HIGH
15967
15965
  precision highp int;
15968
15966
  precision highp float;
15969
15967
  #else
@@ -15971,13 +15969,13 @@ void main(){
15971
15969
  precision mediump float;
15972
15970
  #endif
15973
15971
  uniform sampler2D source;
15974
- varying vec2 texcoord;`,ym=function(){let n,e,t,r;if(window.WebGLRenderingContext!=null)return r=["WEBKIT","MOZ","MS","O"],t=/^WEBKIT_(.*)|MOZ_(.*)|MS_(.*)|O_(.*)/,n=WebGLRenderingContext.prototype.getExtension,WebGLRenderingContext.prototype.getExtension=function(s){let o,a,l,h,c;if(a=s.match(t),a!==null&&(s=a[1]),o=n.call(this,s),o===null){for(h=0,c=r.length;h<c;h++)if(l=r[h],o=n.call(this,l+"_"+s),o!==null)return o;return null}else return o},e=WebGLRenderingContext.prototype.getSupportedExtensions,WebGLRenderingContext.prototype.getSupportedExtensions=function(){let s,o,a,l,h,c;for(l=e.call(this),a=[],h=0,c=l.length;h<c;h++)s=l[h],o=s.match(t),o!==null&&(s=o[1]),Wh.call(a,s)<0&&a.push(s);return a}},vm=function(){let n,e,t,r,s,o,a,l,h,c,p,f,T,y;if(s=function(){let m,E,x;return m=document.createElement("canvas"),m.width=2,m.height=2,E=m.getContext("2d"),x=E.getImageData(0,0,2,2),x.data.set(new Uint8ClampedArray([0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255])),E.putImageData(x,0,0),m},s(),e=function(m,E){let x,b,I,N,H,W,ee,le,Y,Oe,Be,Ae,pe,ke;if(W=m.createProgram(),pe=m.createShader(m.VERTEX_SHADER),m.attachShader(W,pe),m.shaderSource(pe,`attribute vec2 position;
15972
+ varying vec2 texcoord;`,oE=function(){let a,e,t,r;if(window.WebGLRenderingContext!=null)return r=["WEBKIT","MOZ","MS","O"],t=/^WEBKIT_(.*)|MOZ_(.*)|MS_(.*)|O_(.*)/,a=WebGLRenderingContext.prototype.getExtension,WebGLRenderingContext.prototype.getExtension=function(s){let o,n,l,h,c;if(n=s.match(t),n!==null&&(s=n[1]),o=a.call(this,s),o===null){for(h=0,c=r.length;h<c;h++)if(l=r[h],o=a.call(this,l+"_"+s),o!==null)return o;return null}else return o},e=WebGLRenderingContext.prototype.getSupportedExtensions,WebGLRenderingContext.prototype.getSupportedExtensions=function(){let s,o,n,l,h,c;for(l=e.call(this),n=[],h=0,c=l.length;h<c;h++)s=l[h],o=s.match(t),o!==null&&(s=o[1]),t_.call(n,s)<0&&n.push(s);return n}},aE=function(){let a,e,t,r,s,o,n,l,h,c,p,_,w,y;if(s=function(){let d,E,T;return d=document.createElement("canvas"),d.width=2,d.height=2,E=d.getContext("2d"),T=E.getImageData(0,0,2,2),T.data.set(new Uint8ClampedArray([0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255])),E.putImageData(T,0,0),d},s(),e=function(d,E){let T,b,M,N,H,B,re,de,X,We,at,ke,fe,Ge;if(B=d.createProgram(),fe=d.createShader(d.VERTEX_SHADER),d.attachShader(B,fe),d.shaderSource(fe,`attribute vec2 position;
15975
15973
  void main(){
15976
15974
  gl_Position = vec4(position, 0.0, 1.0);
15977
- }`),m.compileShader(pe),!m.getShaderParameter(pe,m.COMPILE_STATUS))throw m.getShaderInfoLog(pe);if(I=m.createShader(m.FRAGMENT_SHADER),m.attachShader(W,I),m.shaderSource(I,`uniform sampler2D source;
15975
+ }`),d.compileShader(fe),!d.getShaderParameter(fe,d.COMPILE_STATUS))throw d.getShaderInfoLog(fe);if(M=d.createShader(d.FRAGMENT_SHADER),d.attachShader(B,M),d.shaderSource(M,`uniform sampler2D source;
15978
15976
  void main(){
15979
15977
  gl_FragColor = texture2D(source, vec2(1.0, 1.0));
15980
- }`),m.compileShader(I),!m.getShaderParameter(I,m.COMPILE_STATUS))throw m.getShaderInfoLog(I);if(m.linkProgram(W),!m.getProgramParameter(W,m.LINK_STATUS))throw m.getProgramInfoLog(W);return m.useProgram(W),b=function(){return m.deleteShader(I),m.deleteShader(pe),m.deleteProgram(W),m.deleteBuffer(x),m.deleteTexture(Y),m.deleteTexture(Ae),m.deleteFramebuffer(N),m.bindBuffer(m.ARRAY_BUFFER,null),m.useProgram(null),m.bindTexture(m.TEXTURE_2D,null),m.bindFramebuffer(m.FRAMEBUFFER,null)},Ae=m.createTexture(),m.bindTexture(m.TEXTURE_2D,Ae),m.texImage2D(m.TEXTURE_2D,0,m.RGBA,2,2,0,m.RGBA,m.UNSIGNED_BYTE,null),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MAG_FILTER,m.LINEAR),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,m.LINEAR),N=m.createFramebuffer(),m.bindFramebuffer(m.FRAMEBUFFER,N),m.framebufferTexture2D(m.FRAMEBUFFER,m.COLOR_ATTACHMENT0,m.TEXTURE_2D,Ae,0),Oe=s(),Y=m.createTexture(),m.bindTexture(m.TEXTURE_2D,Y),m.texImage2D(m.TEXTURE_2D,0,m.RGBA,m.RGBA,E,Oe),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MAG_FILTER,m.LINEAR),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,m.LINEAR),ke=new Float32Array([1,1,-1,1,-1,-1,1,1,-1,-1,1,-1]),x=m.createBuffer(),m.bindBuffer(m.ARRAY_BUFFER,x),m.bufferData(m.ARRAY_BUFFER,ke,m.STATIC_DRAW),H=m.getAttribLocation(W,"position"),Be=m.getUniformLocation(W,"source"),m.enableVertexAttribArray(H),m.vertexAttribPointer(H,2,m.FLOAT,!1,0,0),m.uniform1i(Be,0),m.drawArrays(m.TRIANGLES,0,6),ee=new Uint8Array(4*4),m.readPixels(0,0,2,2,m.RGBA,m.UNSIGNED_BYTE,ee),le=Math.abs(ee[0]-127)<10,b(),le},r=function(m,E){let x;return x=m.createTexture(),m.bindTexture(m.TEXTURE_2D,x),m.texImage2D(m.TEXTURE_2D,0,m.RGBA,2,2,0,m.RGBA,E,null),m.getError()===0?(m.deleteTexture(x),!0):(m.deleteTexture(x),!1)},n=function(m,E){let x,b,I;return I=m.createTexture(),m.bindTexture(m.TEXTURE_2D,I),m.texImage2D(m.TEXTURE_2D,0,m.RGBA,2,2,0,m.RGBA,E,null),b=m.createFramebuffer(),m.bindFramebuffer(m.FRAMEBUFFER,b),m.framebufferTexture2D(m.FRAMEBUFFER,m.COLOR_ATTACHMENT0,m.TEXTURE_2D,I,0),x=m.checkFramebufferStatus(m.FRAMEBUFFER),m.deleteTexture(I),m.deleteFramebuffer(b),m.bindTexture(m.TEXTURE_2D,null),m.bindFramebuffer(m.FRAMEBUFFER,null),x===m.FRAMEBUFFER_COMPLETE},h=[],c={},p=[],t=function(){let m,E,x,b,I,N,H;m=document.createElement("canvas"),x=null;try{x=m.getContext("experimental-webgl"),x===null&&(x=m.getContext("webgl"))}catch{}if(x!=null&&(N=x.getExtension("OES_texture_float"),N===null?r(x,x.FLOAT)?(H=!0,h.push("OES_texture_float"),c.OES_texture_float={shim:!0}):(H=!1,p.push("OES_texture_float")):r(x,x.FLOAT)?(H=!0,h.push("OES_texture_float")):(H=!1,p.push("OES_texture_float")),H&&(E=x.getExtension("WEBGL_color_buffer_float"),E===null?n(x,x.FLOAT)?(h.push("WEBGL_color_buffer_float"),c.WEBGL_color_buffer_float={shim:!0,RGBA32F_EXT:34836,RGB32F_EXT:34837,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT:33297,UNSIGNED_NORMALIZED_EXT:35863}):p.push("WEBGL_color_buffer_float"):n(x,x.FLOAT)?h.push("WEBGL_color_buffer_float"):p.push("WEBGL_color_buffer_float"),E=x.getExtension("OES_texture_float_linear"),E===null?e(x,x.FLOAT)?(h.push("OES_texture_float_linear"),c.OES_texture_float_linear={shim:!0}):p.push("OES_texture_float_linear"):e(x,x.FLOAT)?h.push("OES_texture_float_linear"):p.push("OES_texture_float_linear")),b=x.getExtension("OES_texture_half_float"),b===null?r(x,36193)?(I=!0,h.push("OES_texture_half_float"),b=c.OES_texture_half_float={HALF_FLOAT_OES:36193,shim:!0}):(I=!1,p.push("OES_texture_half_float")):r(x,b.HALF_FLOAT_OES)?(I=!0,h.push("OES_texture_half_float")):(I=!1,p.push("OES_texture_half_float")),I))return E=x.getExtension("EXT_color_buffer_half_float"),E===null?n(x,b.HALF_FLOAT_OES)?(h.push("EXT_color_buffer_half_float"),c.EXT_color_buffer_half_float={shim:!0,RGBA16F_EXT:34842,RGB16F_EXT:34843,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT:33297,UNSIGNED_NORMALIZED_EXT:35863}):p.push("EXT_color_buffer_half_float"):n(x,b.HALF_FLOAT_OES)?h.push("EXT_color_buffer_half_float"):p.push("EXT_color_buffer_half_float"),E=x.getExtension("OES_texture_half_float_linear"),E===null?e(x,b.HALF_FLOAT_OES)?(h.push("OES_texture_half_float_linear"),c.OES_texture_half_float_linear={shim:!0}):p.push("OES_texture_half_float_linear"):e(x,b.HALF_FLOAT_OES)?h.push("OES_texture_half_float_linear"):p.push("OES_texture_half_float_linear")},window.WebGLRenderingContext!=null){for(t(),f={},T=0,y=p.length;T<y;T++)l=p[T],f[l]=!0;return o=WebGLRenderingContext.prototype.getExtension,WebGLRenderingContext.prototype.getExtension=function(m){let E;return E=c[m],E===void 0?f[m]?null:o.call(this,m):E},a=WebGLRenderingContext.prototype.getSupportedExtensions,WebGLRenderingContext.prototype.getSupportedExtensions=function(){let m,E,x,b,I,N,H;for(x=a.call(this),E=[],b=0,N=x.length;b<N;b++)m=x[b],f[m]===void 0&&E.push(m);for(I=0,H=h.length;I<H;I++)m=h[I],Wh.call(E,m)<0&&E.push(m);return E},WebGLRenderingContext.prototype.getFloatExtension=function(m){let E,x,b,I,N,H,W,ee,le,Y,Oe,Be,Ae,pe,ke,ct,pt,dt,yl,vl,wl,Tl,ii,Cl,ri,si;for(m.prefer==null&&(m.prefer=["half"]),m.require==null&&(m.require=[]),m.throws==null&&(m.throws=!0),pe=this.getExtension("OES_texture_float"),H=this.getExtension("OES_texture_half_float"),Be=this.getExtension("WEBGL_color_buffer_float"),I=this.getExtension("EXT_color_buffer_half_float"),Ae=this.getExtension("OES_texture_float_linear"),N=this.getExtension("OES_texture_half_float_linear"),Oe={texture:pe!==null,filterable:Ae!==null,renderable:Be!==null,score:0,precision:"single",half:!1,single:!0,type:this.FLOAT},b={texture:H!==null,filterable:N!==null,renderable:I!==null,score:0,precision:"half",half:!0,single:!1,type:(Cl=H!=null?H.HALF_FLOAT_OES:void 0)!=null?Cl:null},x=[],Oe.texture&&x.push(Oe),b.texture&&x.push(b),Y=[],ct=0,yl=x.length;ct<yl;ct++){for(E=x[ct],ke=!0,ri=m.require,pt=0,vl=ri.length;pt<vl;pt++)l=ri[pt],E[l]===!1&&(ke=!1);ke&&Y.push(E)}for(dt=0,wl=Y.length;dt<wl;dt++)for(E=Y[dt],si=m.prefer,W=ii=0,Tl=si.length;ii<Tl;W=++ii)le=si[W],ee=Math.pow(2,m.prefer.length-W-1),E[le]&&(E.score+=ee);if(Y.sort(function(oi,ai){if(oi.score===ai.score)return 0;if(oi.score<ai.score)return 1;if(oi.score>ai.score)return-1}),Y.length===0){if(m.throws)throw"No floating point texture support that is "+m.require.join(", ");return null}else return Y=Y[0],{filterable:Y.filterable,renderable:Y.renderable,type:Y.type,precision:Y.precision}}}};ym();vm();var nt=function(){function n(e,t){let r,s;this.gl=e,s=t.vertex,r=t.fragment,this.program=this.gl.createProgram(),this.vs=this.gl.createShader(this.gl.VERTEX_SHADER),this.fs=this.gl.createShader(this.gl.FRAGMENT_SHADER),this.gl.attachShader(this.program,this.vs),this.gl.attachShader(this.program,this.fs),this.compileShader(this.vs,s),this.compileShader(this.fs,r),this.link(),this.value_cache={},this.uniform_cache={},this.attribCache={}}return n.prototype.attribLocation=function(e){let t=this.attribCache[e];return t===void 0&&(t=this.attribCache[e]=this.gl.getAttribLocation(this.program,e)),t},n.prototype.compileShader=function(e,t){if(this.gl.shaderSource(e,t),this.gl.compileShader(e),!this.gl.getShaderParameter(e,this.gl.COMPILE_STATUS))throw"Shader Compile Error: "+this.gl.getShaderInfoLog(e)},n.prototype.link=function(){if(this.gl.linkProgram(this.program),!this.gl.getProgramParameter(this.program,this.gl.LINK_STATUS))throw"Shader Link Error: "+this.gl.getProgramInfoLog(this.program)},n.prototype.use=function(){return this.gl.useProgram(this.program),this},n.prototype.uniformLoc=function(e){let t=this.uniform_cache[e];return t===void 0&&(t=this.uniform_cache[e]=this.gl.getUniformLocation(this.program,e)),t},n.prototype.int=function(e,t){let r,s;return r=this.value_cache[e],r!==t&&(this.value_cache[e]=t,s=this.uniformLoc(e),s&&this.gl.uniform1i(s,t)),this},n.prototype.vec2=function(e,t,r){let s;return s=this.uniformLoc(e),s&&this.gl.uniform2f(s,t,r),this},n.prototype.float=function(e,t){let r,s;return r=this.value_cache[e],r!==t&&(this.value_cache[e]=t,s=this.uniformLoc(e),s&&this.gl.uniform1f(s,t)),this},n}(),wm=function(){function n(e){this.gl=e,this.buffer=this.gl.createFramebuffer()}return n.prototype.destroy=function(){return this.gl.deleteFRamebuffer(this.buffer)},n.prototype.bind=function(){return this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,this.buffer),this},n.prototype.unbind=function(){return this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,null),this},n.prototype.check=function(){let e;switch(e=this.gl.checkFramebufferStatus(this.gl.FRAMEBUFFER),e){case this.gl.FRAMEBUFFER_UNSUPPORTED:throw"Framebuffer is unsupported";case this.gl.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:throw"Framebuffer incomplete attachment";case this.gl.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:throw"Framebuffer incomplete dimensions";case this.gl.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:throw"Framebuffer incomplete missing attachment"}return this},n.prototype.color=function(e){return this.gl.framebufferTexture2D(this.gl.FRAMEBUFFER,this.gl.COLOR_ATTACHMENT0,e.target,e.handle,0),this.check(),this},n.prototype.depth=function(e){return this.gl.framebufferRenderbuffer(this.gl.FRAMEBUFFER,this.gl.DEPTH_ATTACHMENT,this.gl.RENDERBUFFER,e.id),this.check(),this},n.prototype.destroy=function(){return this.gl.deleteFramebuffer(this.buffer)},n}(),Gh=function(){function n(e,t){let r,s;switch(this.gl=e,t==null&&(t={}),this.channels=this.gl[((r=t.channels)!=null?r:"rgba").toUpperCase()],typeof t.type=="number"?this.type=t.type:this.type=this.gl[((s=t.type)!=null?s:"unsigned_byte").toUpperCase()],this.channels){case this.gl.RGBA:this.chancount=4;break;case this.gl.RGB:this.chancount=3;break;case this.gl.LUMINANCE_ALPHA:this.chancount=2;break;default:this.chancount=1}this.target=this.gl.TEXTURE_2D,this.handle=this.gl.createTexture()}return n.prototype.destroy=function(){return this.gl.deleteTexture(this.handle)},n.prototype.bind=function(e){if(e==null&&(e=0),e>15)throw"Texture unit too large: "+e;return this.gl.activeTexture(this.gl.TEXTURE0+e),this.gl.bindTexture(this.target,this.handle),this},n.prototype.setSize=function(e,t){return this.width=e,this.height=t,this.gl.texImage2D(this.target,0,this.channels,this.width,this.height,0,this.channels,this.type,null),this},n.prototype.upload=function(e){return this.width=e.width,this.height=e.height,this.gl.texImage2D(this.target,0,this.channels,this.channels,this.type,e),this},n.prototype.linear=function(){return this.gl.texParameteri(this.target,this.gl.TEXTURE_MAG_FILTER,this.gl.LINEAR),this.gl.texParameteri(this.target,this.gl.TEXTURE_MIN_FILTER,this.gl.LINEAR),this},n.prototype.nearest=function(){return this.gl.texParameteri(this.target,this.gl.TEXTURE_MAG_FILTER,this.gl.NEAREST),this.gl.texParameteri(this.target,this.gl.TEXTURE_MIN_FILTER,this.gl.NEAREST),this},n.prototype.clampToEdge=function(){return this.gl.texParameteri(this.target,this.gl.TEXTURE_WRAP_S,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.target,this.gl.TEXTURE_WRAP_T,this.gl.CLAMP_TO_EDGE),this},n.prototype.repeat=function(){return this.gl.texParameteri(this.target,this.gl.TEXTURE_WRAP_S,this.gl.REPEAT),this.gl.texParameteri(this.target,this.gl.TEXTURE_WRAP_T,this.gl.REPEAT),this},n}(),Nh=function(){function n(e,t,r){let s;this.gl=e,this.width=t,this.height=r,s=this.gl.getFloatExtension({require:["renderable"]}),this.texture=new Gh(this.gl,{type:s.type}).bind(0).setSize(this.width,this.height).nearest().clampToEdge(),this.fbo=new wm(this.gl).bind().color(this.texture).unbind()}return n.prototype.use=function(){return this.fbo.bind()},n.prototype.bind=function(e){return this.texture.bind(e)},n.prototype.end=function(){return this.fbo.unbind()},n.prototype.resize=function(e,t){return this.width=e,this.height=t,this.texture.bind(0).setSize(this.width,this.height)},n}(),Tm=function(){function n(e,t,r,s){let o,a,l;for(this.heatmap=e,this.gl=t,this.width=r,this.height=s,this.shader=new nt(this.gl,{vertex:`attribute vec4 position, intensity;
15978
+ }`),d.compileShader(M),!d.getShaderParameter(M,d.COMPILE_STATUS))throw d.getShaderInfoLog(M);if(d.linkProgram(B),!d.getProgramParameter(B,d.LINK_STATUS))throw d.getProgramInfoLog(B);return d.useProgram(B),b=function(){return d.deleteShader(M),d.deleteShader(fe),d.deleteProgram(B),d.deleteBuffer(T),d.deleteTexture(X),d.deleteTexture(ke),d.deleteFramebuffer(N),d.bindBuffer(d.ARRAY_BUFFER,null),d.useProgram(null),d.bindTexture(d.TEXTURE_2D,null),d.bindFramebuffer(d.FRAMEBUFFER,null)},ke=d.createTexture(),d.bindTexture(d.TEXTURE_2D,ke),d.texImage2D(d.TEXTURE_2D,0,d.RGBA,2,2,0,d.RGBA,d.UNSIGNED_BYTE,null),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,d.LINEAR),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,d.LINEAR),N=d.createFramebuffer(),d.bindFramebuffer(d.FRAMEBUFFER,N),d.framebufferTexture2D(d.FRAMEBUFFER,d.COLOR_ATTACHMENT0,d.TEXTURE_2D,ke,0),We=s(),X=d.createTexture(),d.bindTexture(d.TEXTURE_2D,X),d.texImage2D(d.TEXTURE_2D,0,d.RGBA,d.RGBA,E,We),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,d.LINEAR),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,d.LINEAR),Ge=new Float32Array([1,1,-1,1,-1,-1,1,1,-1,-1,1,-1]),T=d.createBuffer(),d.bindBuffer(d.ARRAY_BUFFER,T),d.bufferData(d.ARRAY_BUFFER,Ge,d.STATIC_DRAW),H=d.getAttribLocation(B,"position"),at=d.getUniformLocation(B,"source"),d.enableVertexAttribArray(H),d.vertexAttribPointer(H,2,d.FLOAT,!1,0,0),d.uniform1i(at,0),d.drawArrays(d.TRIANGLES,0,6),re=new Uint8Array(4*4),d.readPixels(0,0,2,2,d.RGBA,d.UNSIGNED_BYTE,re),de=Math.abs(re[0]-127)<10,b(),de},r=function(d,E){let T;return T=d.createTexture(),d.bindTexture(d.TEXTURE_2D,T),d.texImage2D(d.TEXTURE_2D,0,d.RGBA,2,2,0,d.RGBA,E,null),d.getError()===0?(d.deleteTexture(T),!0):(d.deleteTexture(T),!1)},a=function(d,E){let T,b,M;return M=d.createTexture(),d.bindTexture(d.TEXTURE_2D,M),d.texImage2D(d.TEXTURE_2D,0,d.RGBA,2,2,0,d.RGBA,E,null),b=d.createFramebuffer(),d.bindFramebuffer(d.FRAMEBUFFER,b),d.framebufferTexture2D(d.FRAMEBUFFER,d.COLOR_ATTACHMENT0,d.TEXTURE_2D,M,0),T=d.checkFramebufferStatus(d.FRAMEBUFFER),d.deleteTexture(M),d.deleteFramebuffer(b),d.bindTexture(d.TEXTURE_2D,null),d.bindFramebuffer(d.FRAMEBUFFER,null),T===d.FRAMEBUFFER_COMPLETE},h=[],c={},p=[],t=function(){let d,E,T,b,M,N,H;d=document.createElement("canvas"),T=null;try{T=d.getContext("experimental-webgl"),T===null&&(T=d.getContext("webgl"))}catch{}if(T!=null&&(N=T.getExtension("OES_texture_float"),N===null?r(T,T.FLOAT)?(H=!0,h.push("OES_texture_float"),c.OES_texture_float={shim:!0}):(H=!1,p.push("OES_texture_float")):r(T,T.FLOAT)?(H=!0,h.push("OES_texture_float")):(H=!1,p.push("OES_texture_float")),H&&(E=T.getExtension("WEBGL_color_buffer_float"),E===null?a(T,T.FLOAT)?(h.push("WEBGL_color_buffer_float"),c.WEBGL_color_buffer_float={shim:!0,RGBA32F_EXT:34836,RGB32F_EXT:34837,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT:33297,UNSIGNED_NORMALIZED_EXT:35863}):p.push("WEBGL_color_buffer_float"):a(T,T.FLOAT)?h.push("WEBGL_color_buffer_float"):p.push("WEBGL_color_buffer_float"),E=T.getExtension("OES_texture_float_linear"),E===null?e(T,T.FLOAT)?(h.push("OES_texture_float_linear"),c.OES_texture_float_linear={shim:!0}):p.push("OES_texture_float_linear"):e(T,T.FLOAT)?h.push("OES_texture_float_linear"):p.push("OES_texture_float_linear")),b=T.getExtension("OES_texture_half_float"),b===null?r(T,36193)?(M=!0,h.push("OES_texture_half_float"),b=c.OES_texture_half_float={HALF_FLOAT_OES:36193,shim:!0}):(M=!1,p.push("OES_texture_half_float")):r(T,b.HALF_FLOAT_OES)?(M=!0,h.push("OES_texture_half_float")):(M=!1,p.push("OES_texture_half_float")),M))return E=T.getExtension("EXT_color_buffer_half_float"),E===null?a(T,b.HALF_FLOAT_OES)?(h.push("EXT_color_buffer_half_float"),c.EXT_color_buffer_half_float={shim:!0,RGBA16F_EXT:34842,RGB16F_EXT:34843,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT:33297,UNSIGNED_NORMALIZED_EXT:35863}):p.push("EXT_color_buffer_half_float"):a(T,b.HALF_FLOAT_OES)?h.push("EXT_color_buffer_half_float"):p.push("EXT_color_buffer_half_float"),E=T.getExtension("OES_texture_half_float_linear"),E===null?e(T,b.HALF_FLOAT_OES)?(h.push("OES_texture_half_float_linear"),c.OES_texture_half_float_linear={shim:!0}):p.push("OES_texture_half_float_linear"):e(T,b.HALF_FLOAT_OES)?h.push("OES_texture_half_float_linear"):p.push("OES_texture_half_float_linear")},window.WebGLRenderingContext!=null){for(t(),_={},w=0,y=p.length;w<y;w++)l=p[w],_[l]=!0;return o=WebGLRenderingContext.prototype.getExtension,WebGLRenderingContext.prototype.getExtension=function(d){let E;return E=c[d],E===void 0?_[d]?null:o.call(this,d):E},n=WebGLRenderingContext.prototype.getSupportedExtensions,WebGLRenderingContext.prototype.getSupportedExtensions=function(){let d,E,T,b,M,N,H;for(T=n.call(this),E=[],b=0,N=T.length;b<N;b++)d=T[b],_[d]===void 0&&E.push(d);for(M=0,H=h.length;M<H;M++)d=h[M],t_.call(E,d)<0&&E.push(d);return E},WebGLRenderingContext.prototype.getFloatExtension=function(d){let E,T,b,M,N,H,B,re,de,X,We,at,ke,fe,Ge,Ft,Ht,Nt,Dh,Lh,Rh,Oh,Gi,kh,Ui,Bi;for(d.prefer==null&&(d.prefer=["half"]),d.require==null&&(d.require=[]),d.throws==null&&(d.throws=!0),fe=this.getExtension("OES_texture_float"),H=this.getExtension("OES_texture_half_float"),at=this.getExtension("WEBGL_color_buffer_float"),M=this.getExtension("EXT_color_buffer_half_float"),ke=this.getExtension("OES_texture_float_linear"),N=this.getExtension("OES_texture_half_float_linear"),We={texture:fe!==null,filterable:ke!==null,renderable:at!==null,score:0,precision:"single",half:!1,single:!0,type:this.FLOAT},b={texture:H!==null,filterable:N!==null,renderable:M!==null,score:0,precision:"half",half:!0,single:!1,type:(kh=H!=null?H.HALF_FLOAT_OES:void 0)!=null?kh:null},T=[],We.texture&&T.push(We),b.texture&&T.push(b),X=[],Ft=0,Dh=T.length;Ft<Dh;Ft++){for(E=T[Ft],Ge=!0,Ui=d.require,Ht=0,Lh=Ui.length;Ht<Lh;Ht++)l=Ui[Ht],E[l]===!1&&(Ge=!1);Ge&&X.push(E)}for(Nt=0,Rh=X.length;Nt<Rh;Nt++)for(E=X[Nt],Bi=d.prefer,B=Gi=0,Oh=Bi.length;Gi<Oh;B=++Gi)de=Bi[B],re=Math.pow(2,d.prefer.length-B-1),E[de]&&(E.score+=re);if(X.sort(function(Vi,ji){if(Vi.score===ji.score)return 0;if(Vi.score<ji.score)return 1;if(Vi.score>ji.score)return-1}),X.length===0){if(d.throws)throw"No floating point texture support that is "+d.require.join(", ");return null}else return X=X[0],{filterable:X.filterable,renderable:X.renderable,type:X.type,precision:X.precision}}}};oE();aE();var kt=function(){function a(e,t){let r,s;this.gl=e,s=t.vertex,r=t.fragment,this.program=this.gl.createProgram(),this.vs=this.gl.createShader(this.gl.VERTEX_SHADER),this.fs=this.gl.createShader(this.gl.FRAGMENT_SHADER),this.gl.attachShader(this.program,this.vs),this.gl.attachShader(this.program,this.fs),this.compileShader(this.vs,s),this.compileShader(this.fs,r),this.link(),this.value_cache={},this.uniform_cache={},this.attribCache={}}return a.prototype.attribLocation=function(e){let t=this.attribCache[e];return t===void 0&&(t=this.attribCache[e]=this.gl.getAttribLocation(this.program,e)),t},a.prototype.compileShader=function(e,t){if(this.gl.shaderSource(e,t),this.gl.compileShader(e),!this.gl.getShaderParameter(e,this.gl.COMPILE_STATUS))throw"Shader Compile Error: "+this.gl.getShaderInfoLog(e)},a.prototype.link=function(){if(this.gl.linkProgram(this.program),!this.gl.getProgramParameter(this.program,this.gl.LINK_STATUS))throw"Shader Link Error: "+this.gl.getProgramInfoLog(this.program)},a.prototype.use=function(){return this.gl.useProgram(this.program),this},a.prototype.uniformLoc=function(e){let t=this.uniform_cache[e];return t===void 0&&(t=this.uniform_cache[e]=this.gl.getUniformLocation(this.program,e)),t},a.prototype.int=function(e,t){let r,s;return r=this.value_cache[e],r!==t&&(this.value_cache[e]=t,s=this.uniformLoc(e),s&&this.gl.uniform1i(s,t)),this},a.prototype.vec2=function(e,t,r){let s;return s=this.uniformLoc(e),s&&this.gl.uniform2f(s,t,r),this},a.prototype.float=function(e,t){let r,s;return r=this.value_cache[e],r!==t&&(this.value_cache[e]=t,s=this.uniformLoc(e),s&&this.gl.uniform1f(s,t)),this},a}(),nE=function(){function a(e){this.gl=e,this.buffer=this.gl.createFramebuffer()}return a.prototype.destroy=function(){return this.gl.deleteFRamebuffer(this.buffer)},a.prototype.bind=function(){return this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,this.buffer),this},a.prototype.unbind=function(){return this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,null),this},a.prototype.check=function(){let e;switch(e=this.gl.checkFramebufferStatus(this.gl.FRAMEBUFFER),e){case this.gl.FRAMEBUFFER_UNSUPPORTED:throw"Framebuffer is unsupported";case this.gl.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:throw"Framebuffer incomplete attachment";case this.gl.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:throw"Framebuffer incomplete dimensions";case this.gl.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:throw"Framebuffer incomplete missing attachment"}return this},a.prototype.color=function(e){return this.gl.framebufferTexture2D(this.gl.FRAMEBUFFER,this.gl.COLOR_ATTACHMENT0,e.target,e.handle,0),this.check(),this},a.prototype.depth=function(e){return this.gl.framebufferRenderbuffer(this.gl.FRAMEBUFFER,this.gl.DEPTH_ATTACHMENT,this.gl.RENDERBUFFER,e.id),this.check(),this},a.prototype.destroy=function(){return this.gl.deleteFramebuffer(this.buffer)},a}(),i_=function(){function a(e,t){let r,s;switch(this.gl=e,t==null&&(t={}),this.channels=this.gl[((r=t.channels)!=null?r:"rgba").toUpperCase()],typeof t.type=="number"?this.type=t.type:this.type=this.gl[((s=t.type)!=null?s:"unsigned_byte").toUpperCase()],this.channels){case this.gl.RGBA:this.chancount=4;break;case this.gl.RGB:this.chancount=3;break;case this.gl.LUMINANCE_ALPHA:this.chancount=2;break;default:this.chancount=1}this.target=this.gl.TEXTURE_2D,this.handle=this.gl.createTexture()}return a.prototype.destroy=function(){return this.gl.deleteTexture(this.handle)},a.prototype.bind=function(e){if(e==null&&(e=0),e>15)throw"Texture unit too large: "+e;return this.gl.activeTexture(this.gl.TEXTURE0+e),this.gl.bindTexture(this.target,this.handle),this},a.prototype.setSize=function(e,t){return this.width=e,this.height=t,this.gl.texImage2D(this.target,0,this.channels,this.width,this.height,0,this.channels,this.type,null),this},a.prototype.upload=function(e){return this.width=e.width,this.height=e.height,this.gl.texImage2D(this.target,0,this.channels,this.channels,this.type,e),this},a.prototype.linear=function(){return this.gl.texParameteri(this.target,this.gl.TEXTURE_MAG_FILTER,this.gl.LINEAR),this.gl.texParameteri(this.target,this.gl.TEXTURE_MIN_FILTER,this.gl.LINEAR),this},a.prototype.nearest=function(){return this.gl.texParameteri(this.target,this.gl.TEXTURE_MAG_FILTER,this.gl.NEAREST),this.gl.texParameteri(this.target,this.gl.TEXTURE_MIN_FILTER,this.gl.NEAREST),this},a.prototype.clampToEdge=function(){return this.gl.texParameteri(this.target,this.gl.TEXTURE_WRAP_S,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.target,this.gl.TEXTURE_WRAP_T,this.gl.CLAMP_TO_EDGE),this},a.prototype.repeat=function(){return this.gl.texParameteri(this.target,this.gl.TEXTURE_WRAP_S,this.gl.REPEAT),this.gl.texParameteri(this.target,this.gl.TEXTURE_WRAP_T,this.gl.REPEAT),this},a}(),e_=function(){function a(e,t,r){let s;this.gl=e,this.width=t,this.height=r,s=this.gl.getFloatExtension({require:["renderable"]}),this.texture=new i_(this.gl,{type:s.type}).bind(0).setSize(this.width,this.height).nearest().clampToEdge(),this.fbo=new nE(this.gl).bind().color(this.texture).unbind()}return a.prototype.use=function(){return this.fbo.bind()},a.prototype.bind=function(e){return this.texture.bind(e)},a.prototype.end=function(){return this.fbo.unbind()},a.prototype.resize=function(e,t){return this.width=e,this.height=t,this.texture.bind(0).setSize(this.width,this.height)},a}(),lE=function(){function a(e,t,r,s){let o,n,l;for(this.heatmap=e,this.gl=t,this.width=r,this.height=s,this.shader=new kt(this.gl,{vertex:`attribute vec4 position, intensity;
15981
15979
  varying vec2 off, dim;
15982
15980
  varying float vIntensity;
15983
15981
  uniform vec2 viewport;
@@ -16001,13 +15999,13 @@ void main(){
16001
15999
  float falloff = (1.0 - smoothstep(0.0, 1.0, length(off/dim)));
16002
16000
  float intensity = falloff*vIntensity;
16003
16001
  gl_FragColor = vec4(intensity);
16004
- }`}),this.clampShader=new nt(this.gl,{vertex:xt,fragment:Et+`uniform float low, high;
16002
+ }`}),this.clampShader=new kt(this.gl,{vertex:li,fragment:hi+`uniform float low, high;
16005
16003
  void main(){
16006
16004
  gl_FragColor = vec4(clamp(texture2D(source, texcoord).rgb, low, high), 1.0);
16007
- }`}),this.multiplyShader=new nt(this.gl,{vertex:xt,fragment:Et+`uniform float value;
16005
+ }`}),this.multiplyShader=new kt(this.gl,{vertex:li,fragment:hi+`uniform float value;
16008
16006
  void main(){
16009
16007
  gl_FragColor = vec4(texture2D(source, texcoord).rgb*value, 1.0);
16010
- }`}),this.blurShader=new nt(this.gl,{vertex:xt,fragment:Et+`uniform vec2 viewport;
16008
+ }`}),this.blurShader=new kt(this.gl,{vertex:li,fragment:hi+`uniform vec2 viewport;
16011
16009
  void main(){
16012
16010
  vec4 result = vec4(0.0);
16013
16011
  for(int x=-1; x<=1; x++){
@@ -16019,10 +16017,10 @@ void main(){
16019
16017
  }
16020
16018
  }
16021
16019
  gl_FragColor = vec4(result.rgb/result.w, 1.0);
16022
- }`}),this.nodeBack=new Nh(this.gl,this.width,this.height),this.nodeFront=new Nh(this.gl,this.width,this.height),this.vertexBuffer=this.gl.createBuffer(),this.vertexSize=8,this.maxPointCount=1024*10,this.vertexBufferData=new Float32Array(this.maxPointCount*this.vertexSize*6),this.vertexBufferViews=[],o=a=0,l=this.maxPointCount;0<=l?a<l:a>l;o=0<=l?++a:--a)this.vertexBufferViews.push(new Float32Array(this.vertexBufferData.buffer,0,o*this.vertexSize*6));this.bufferIndex=0,this.pointCount=0}return n.prototype.resize=function(e,t){return this.width=e,this.height=t,this.nodeBack.resize(this.width,this.height),this.nodeFront.resize(this.width,this.height)},n.prototype.update=function(){var e,t;if(this.pointCount>0)return this.gl.enable(this.gl.BLEND),this.nodeFront.use(),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.vertexBuffer),this.gl.bufferData(this.gl.ARRAY_BUFFER,this.vertexBufferViews[this.pointCount],this.gl.STREAM_DRAW),t=this.shader.attribLocation("position"),e=this.shader.attribLocation("intensity"),this.gl.enableVertexAttribArray(1),this.gl.vertexAttribPointer(t,4,this.gl.FLOAT,!1,8*4,0),this.gl.vertexAttribPointer(e,4,this.gl.FLOAT,!1,8*4,4*4),this.shader.use().vec2("viewport",this.width,this.height),this.gl.drawArrays(this.gl.TRIANGLES,0,this.pointCount*6),this.gl.disableVertexAttribArray(1),this.pointCount=0,this.bufferIndex=0,this.nodeFront.end(),this.gl.disable(this.gl.BLEND)},n.prototype.clear=function(){return this.nodeFront.use(),this.gl.clearColor(0,0,0,1),this.gl.clear(this.gl.COLOR_BUFFER_BIT),this.nodeFront.end()},n.prototype.clamp=function(e,t){return this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.heatmap.quad),this.gl.vertexAttribPointer(0,4,this.gl.FLOAT,!1,0,0),this.nodeFront.bind(0),this.nodeBack.use(),this.clampShader.use().int("source",0).float("low",e).float("high",t),this.gl.drawArrays(this.gl.TRIANGLES,0,6),this.nodeBack.end(),this.swap()},n.prototype.multiply=function(e){return this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.heatmap.quad),this.gl.vertexAttribPointer(0,4,this.gl.FLOAT,!1,0,0),this.nodeFront.bind(0),this.nodeBack.use(),this.multiplyShader.use().int("source",0).float("value",e),this.gl.drawArrays(this.gl.TRIANGLES,0,6),this.nodeBack.end(),this.swap()},n.prototype.blur=function(){return this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.heatmap.quad),this.gl.vertexAttribPointer(0,4,this.gl.FLOAT,!1,0,0),this.nodeFront.bind(0),this.nodeBack.use(),this.blurShader.use().int("source",0).vec2("viewport",this.width,this.height),this.gl.drawArrays(this.gl.TRIANGLES,0,6),this.nodeBack.end(),this.swap()},n.prototype.swap=function(){let e=this.nodeFront;return this.nodeFront=this.nodeBack,this.nodeBack=e},n.prototype.addVertex=function(e,t,r,s,o){return this.vertexBufferData[this.bufferIndex++]=e,this.vertexBufferData[this.bufferIndex++]=t,this.vertexBufferData[this.bufferIndex++]=r,this.vertexBufferData[this.bufferIndex++]=s,this.vertexBufferData[this.bufferIndex++]=o,this.vertexBufferData[this.bufferIndex++]=o,this.vertexBufferData[this.bufferIndex++]=o,this.vertexBufferData[this.bufferIndex++]=o},n.prototype.addPoint=function(e,t,r,s){let o;return r==null&&(r=50),s==null&&(s=.2),this.pointCount>=this.maxPointCount-1&&this.update(),t=this.height-t,o=r/2,this.addVertex(e,t,-o,-o,s),this.addVertex(e,t,+o,-o,s),this.addVertex(e,t,-o,+o,s),this.addVertex(e,t,-o,+o,s),this.addVertex(e,t,+o,-o,s),this.addVertex(e,t,+o,+o,s),this.pointCount+=1},n}(),Cm=function(){function n(e){let t,r,s,o,a,l,h,c,p,f,T,y,m;y=e!=null?e:{},this.canvas=y.canvas,this.width=y.width,this.height=y.height,c=y.intensityToAlpha,l=y.gradientTexture,r=y.alphaRange,this.canvas||(this.canvas=document.createElement("canvas"));try{if(this.gl=this.canvas.getContext("experimental-webgl",{depth:!1,antialias:!1}),this.gl===null&&(this.gl=this.canvas.getContext("webgl",{depth:!1,antialias:!1}),this.gl===null))throw"WebGL not supported"}catch(E){throw o=E,"WebGL not supported"}window.WebGLDebugUtils!=null&&(this.gl=window.WebGLDebugUtils.makeDebugContext(this.gl,function(E,x,b){throw window.WebGLDebugUtils.glEnumToString(E)+" was caused by call to: "+x})),this.gl.enableVertexAttribArray(0),this.gl.blendFunc(this.gl.ONE,this.gl.ONE),l?(T=this.gradientTexture=new Gh(this.gl,{channels:"rgba"}).bind(0).setSize(2,2).nearest().clampToEdge(),typeof l=="string"?(h=new Image,h.onload=function(){return T.bind().upload(h)},h.src=l):l.width>0&&l.height>0?T.upload(l):l.onload=function(){return T.upload(l)},a=`uniform sampler2D gradientTexture;
16020
+ }`}),this.nodeBack=new e_(this.gl,this.width,this.height),this.nodeFront=new e_(this.gl,this.width,this.height),this.vertexBuffer=this.gl.createBuffer(),this.vertexSize=8,this.maxPointCount=1024*10,this.vertexBufferData=new Float32Array(this.maxPointCount*this.vertexSize*6),this.vertexBufferViews=[],o=n=0,l=this.maxPointCount;0<=l?n<l:n>l;o=0<=l?++n:--n)this.vertexBufferViews.push(new Float32Array(this.vertexBufferData.buffer,0,o*this.vertexSize*6));this.bufferIndex=0,this.pointCount=0}return a.prototype.resize=function(e,t){return this.width=e,this.height=t,this.nodeBack.resize(this.width,this.height),this.nodeFront.resize(this.width,this.height)},a.prototype.update=function(){var e,t;if(this.pointCount>0)return this.gl.enable(this.gl.BLEND),this.nodeFront.use(),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.vertexBuffer),this.gl.bufferData(this.gl.ARRAY_BUFFER,this.vertexBufferViews[this.pointCount],this.gl.STREAM_DRAW),t=this.shader.attribLocation("position"),e=this.shader.attribLocation("intensity"),this.gl.enableVertexAttribArray(1),this.gl.vertexAttribPointer(t,4,this.gl.FLOAT,!1,8*4,0),this.gl.vertexAttribPointer(e,4,this.gl.FLOAT,!1,8*4,4*4),this.shader.use().vec2("viewport",this.width,this.height),this.gl.drawArrays(this.gl.TRIANGLES,0,this.pointCount*6),this.gl.disableVertexAttribArray(1),this.pointCount=0,this.bufferIndex=0,this.nodeFront.end(),this.gl.disable(this.gl.BLEND)},a.prototype.clear=function(){return this.nodeFront.use(),this.gl.clearColor(0,0,0,1),this.gl.clear(this.gl.COLOR_BUFFER_BIT),this.nodeFront.end()},a.prototype.clamp=function(e,t){return this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.heatmap.quad),this.gl.vertexAttribPointer(0,4,this.gl.FLOAT,!1,0,0),this.nodeFront.bind(0),this.nodeBack.use(),this.clampShader.use().int("source",0).float("low",e).float("high",t),this.gl.drawArrays(this.gl.TRIANGLES,0,6),this.nodeBack.end(),this.swap()},a.prototype.multiply=function(e){return this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.heatmap.quad),this.gl.vertexAttribPointer(0,4,this.gl.FLOAT,!1,0,0),this.nodeFront.bind(0),this.nodeBack.use(),this.multiplyShader.use().int("source",0).float("value",e),this.gl.drawArrays(this.gl.TRIANGLES,0,6),this.nodeBack.end(),this.swap()},a.prototype.blur=function(){return this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.heatmap.quad),this.gl.vertexAttribPointer(0,4,this.gl.FLOAT,!1,0,0),this.nodeFront.bind(0),this.nodeBack.use(),this.blurShader.use().int("source",0).vec2("viewport",this.width,this.height),this.gl.drawArrays(this.gl.TRIANGLES,0,6),this.nodeBack.end(),this.swap()},a.prototype.swap=function(){let e=this.nodeFront;return this.nodeFront=this.nodeBack,this.nodeBack=e},a.prototype.addVertex=function(e,t,r,s,o){return this.vertexBufferData[this.bufferIndex++]=e,this.vertexBufferData[this.bufferIndex++]=t,this.vertexBufferData[this.bufferIndex++]=r,this.vertexBufferData[this.bufferIndex++]=s,this.vertexBufferData[this.bufferIndex++]=o,this.vertexBufferData[this.bufferIndex++]=o,this.vertexBufferData[this.bufferIndex++]=o,this.vertexBufferData[this.bufferIndex++]=o},a.prototype.addPoint=function(e,t,r,s){let o;return r==null&&(r=50),s==null&&(s=.2),this.pointCount>=this.maxPointCount-1&&this.update(),t=this.height-t,o=r/2,this.addVertex(e,t,-o,-o,s),this.addVertex(e,t,+o,-o,s),this.addVertex(e,t,-o,+o,s),this.addVertex(e,t,-o,+o,s),this.addVertex(e,t,+o,-o,s),this.addVertex(e,t,+o,+o,s),this.pointCount+=1},a}(),hE=function(){function a(e){let t,r,s,o,n,l,h,c,p,_,w,y,d;y=e!=null?e:{},this.canvas=y.canvas,this.width=y.width,this.height=y.height,c=y.intensityToAlpha,l=y.gradientTexture,r=y.alphaRange,this.canvas||(this.canvas=document.createElement("canvas"));try{if(this.gl=this.canvas.getContext("experimental-webgl",{depth:!1,antialias:!1}),this.gl===null&&(this.gl=this.canvas.getContext("webgl",{depth:!1,antialias:!1}),this.gl===null))throw"WebGL not supported"}catch(E){throw o=E,"WebGL not supported"}window.WebGLDebugUtils!=null&&(this.gl=window.WebGLDebugUtils.makeDebugContext(this.gl,function(E,T,b){throw window.WebGLDebugUtils.glEnumToString(E)+" was caused by call to: "+T})),this.gl.enableVertexAttribArray(0),this.gl.blendFunc(this.gl.ONE,this.gl.ONE),l?(w=this.gradientTexture=new i_(this.gl,{channels:"rgba"}).bind(0).setSize(2,2).nearest().clampToEdge(),typeof l=="string"?(h=new Image,h.onload=function(){return w.bind().upload(h)},h.src=l):l.width>0&&l.height>0?w.upload(l):l.onload=function(){return w.upload(l)},n=`uniform sampler2D gradientTexture;
16023
16021
  vec3 getColor(float intensity){
16024
16022
  return texture2D(gradientTexture, vec2(intensity, 0.0)).rgb;
16025
- }`):(T=null,a=`vec3 getColor(float intensity){
16023
+ }`):(w=null,n=`vec3 getColor(float intensity){
16026
16024
  vec3 blue = vec3(0.0, 0.0, 1.0);
16027
16025
  vec3 cyan = vec3(0.0, 1.0, 1.0);
16028
16026
  vec3 green = vec3(0.0, 1.0, 0.0);
@@ -16037,12 +16035,12 @@ vec3 getColor(float intensity){
16037
16035
  smoothstep(0.75, 1.0, intensity)*red
16038
16036
  );
16039
16037
  return color;
16040
- }`),c==null&&(c=!0),c?(m=r!=null?r:[0,1],s=m[0],t=m[1],p=`vec4 alphaFun(vec3 color, float intensity){
16038
+ }`),c==null&&(c=!0),c?(d=r!=null?r:[0,1],s=d[0],t=d[1],p=`vec4 alphaFun(vec3 color, float intensity){
16041
16039
  float alpha = smoothstep(`+s.toFixed(8)+", "+t.toFixed(8)+`, intensity);
16042
16040
  return vec4(color*alpha, alpha);
16043
16041
  }`):p=`vec4 alphaFun(vec3 color, float intensity){
16044
16042
  return vec4(color, 1.0);
16045
- }`,this.shader=new nt(this.gl,{vertex:xt,fragment:Et+(`float linstep(float low, float high, float value){
16043
+ }`,this.shader=new kt(this.gl,{vertex:li,fragment:hi+(`float linstep(float low, float high, float value){
16046
16044
  return clamp((value-low)/(high-low), 0.0, 1.0);
16047
16045
  }
16048
16046
 
@@ -16053,18 +16051,18 @@ float fade(float low, float high, float value){
16053
16051
  return smoothstep(0.0, 1.0, x);
16054
16052
  }
16055
16053
 
16056
- `+a+`
16054
+ `+n+`
16057
16055
  `+p+`
16058
16056
 
16059
16057
  void main(){
16060
16058
  float intensity = smoothstep(0.0, 1.0, texture2D(source, texcoord).r);
16061
16059
  vec3 color = getColor(intensity);
16062
16060
  gl_FragColor = alphaFun(color, intensity);
16063
- }`)}),this.width==null&&(this.width=this.canvas.offsetWidth||2),this.height==null&&(this.height=this.canvas.offsetHeight||2),this.canvas.width=this.width,this.canvas.height=this.height,this.gl.viewport(0,0,this.width,this.height),this.quad=this.gl.createBuffer(),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.quad),f=new Float32Array([-1,-1,0,1,1,-1,0,1,-1,1,0,1,-1,1,0,1,1,-1,0,1,1,1,0,1]),this.gl.bufferData(this.gl.ARRAY_BUFFER,f,this.gl.STATIC_DRAW),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,null),this.heights=new Tm(this,this.gl,this.width,this.height)}return n.prototype.adjustSize=function(){let e,t;if(t=this.canvas.offsetWidth||2,e=this.canvas.offsetHeight||2,this.width!==t||this.height!==e)return this.gl.viewport(0,0,t,e),this.canvas.width=t,this.canvas.height=e,this.width=t,this.height=e,this.heights.resize(this.width,this.height)},n.prototype.display=function(){return this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.quad),this.gl.vertexAttribPointer(0,4,this.gl.FLOAT,!1,0,0),this.heights.nodeFront.bind(0),this.gradientTexture&&this.gradientTexture.bind(1),this.shader.use().int("source",0).int("gradientTexture",1),this.gl.drawArrays(this.gl.TRIANGLES,0,6)},n.prototype.update=function(){return this.heights.update()},n.prototype.clear=function(){return this.heights.clear()},n.prototype.clamp=function(e,t){return e==null&&(e=0),t==null&&(t=1),this.heights.clamp(e,t)},n.prototype.multiply=function(e){return e==null&&(e=.95),this.heights.multiply(e)},n.prototype.blur=function(){return this.heights.blur()},n.prototype.addPoint=function(e,t,r,s){return this.heights.addPoint(e,t,r,s)},n.prototype.addPoints=function(e){let t,r,s,o;for(o=[],r=0,s=e.length;r<s;r++)t=e[r],o.push(this.addPoint(t.x,t.y,t.size,t.intensity));return o},n}();function qo(n){return new Cm(n)}var Xo=new i.Cesium.WebMercatorProjection,xm={radius:30,height:0,gradient:void 0,useGround:!1,classificationType:2},Jo=class extends P{constructor(e,t={}){super(e),this._options={...xm,...t},this._delegate=new i.Cesium.PrimitiveCollection,this._isGround=this._options.useGround,this._canvas=document.createElement("canvas"),this._canvas.setAttribute("id",e),this._heat=void 0,this._scale=1,this._points=[],this._bounds=new i.Cesium.Rectangle,this._boundsInMeter=void 0,this._primitive=this._delegate.add(this._isGround?new i.Cesium.GroundPrimitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:{}}),classificationType:this._options.classificationType}):new i.Cesium.Primitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:{}})})),this._state=d.INITIALIZED}get type(){return P.getLayerType("heat-map")}_addedHook(){this._canvas.style.cssText=`
16061
+ }`)}),this.width==null&&(this.width=this.canvas.offsetWidth||2),this.height==null&&(this.height=this.canvas.offsetHeight||2),this.canvas.width=this.width,this.canvas.height=this.height,this.gl.viewport(0,0,this.width,this.height),this.quad=this.gl.createBuffer(),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.quad),_=new Float32Array([-1,-1,0,1,1,-1,0,1,-1,1,0,1,-1,1,0,1,1,-1,0,1,1,1,0,1]),this.gl.bufferData(this.gl.ARRAY_BUFFER,_,this.gl.STATIC_DRAW),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,null),this.heights=new lE(this,this.gl,this.width,this.height)}return a.prototype.adjustSize=function(){let e,t;if(t=this.canvas.offsetWidth||2,e=this.canvas.offsetHeight||2,this.width!==t||this.height!==e)return this.gl.viewport(0,0,t,e),this.canvas.width=t,this.canvas.height=e,this.width=t,this.height=e,this.heights.resize(this.width,this.height)},a.prototype.display=function(){return this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.quad),this.gl.vertexAttribPointer(0,4,this.gl.FLOAT,!1,0,0),this.heights.nodeFront.bind(0),this.gradientTexture&&this.gradientTexture.bind(1),this.shader.use().int("source",0).int("gradientTexture",1),this.gl.drawArrays(this.gl.TRIANGLES,0,6)},a.prototype.update=function(){return this.heights.update()},a.prototype.clear=function(){return this.heights.clear()},a.prototype.clamp=function(e,t){return e==null&&(e=0),t==null&&(t=1),this.heights.clamp(e,t)},a.prototype.multiply=function(e){return e==null&&(e=.95),this.heights.multiply(e)},a.prototype.blur=function(){return this.heights.blur()},a.prototype.addPoint=function(e,t,r,s){return this.heights.addPoint(e,t,r,s)},a.prototype.addPoints=function(e){let t,r,s,o;for(o=[],r=0,s=e.length;r<s;r++)t=e[r],o.push(this.addPoint(t.x,t.y,t.size,t.intensity));return o},a}();function nn(a){return new hE(a)}var ln=new i.Cesium.WebMercatorProjection,cE={radius:30,height:0,gradient:void 0,useGround:!1,classificationType:2},hn=class extends S{constructor(e,t={}){super(e),this._options={...cE,...t},this._delegate=new i.Cesium.PrimitiveCollection,this._isGround=this._options.useGround,this._canvas=document.createElement("canvas"),this._canvas.setAttribute("id",e),this._heat=void 0,this._scale=1,this._points=[],this._bounds=new i.Cesium.Rectangle,this._boundsInMeter=void 0,this._primitive=this._delegate.add(this._isGround?new i.Cesium.GroundPrimitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:{}}),classificationType:this._options.classificationType}):new i.Cesium.Primitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:{}})})),this._state=m.INITIALIZED}get type(){return S.getLayerType("heat-map")}_addedHook(){this._canvas.style.cssText=`
16064
16062
  visibility:hidden;
16065
16063
  width:${this._viewer.canvas.width}px;
16066
16064
  height:${this._viewer.canvas.height}px;
16067
- `,this._viewer.layerContainer.appendChild(this._canvas),this._points&&this._points.length&&(this._heat=qo({canvas:this._canvas,gradientTexture:this._createGradientTexture()}),this._scale=Math.min(Math.abs(this._boundsInMeter.west-this._boundsInMeter.east)/this._viewer.canvas.width,Math.abs(this._boundsInMeter.north-this._boundsInMeter.south)/this._viewer.canvas.height),this._heat.blur(),this._heat.addPoints(this._parsePoints(this._points)),this._update())}_createGradientTexture(){if(!this._options.gradient)return;let e=document.createElement("canvas");e.width=200,e.height=10;let t=e.getContext("2d"),r=t.createLinearGradient(0,0,200,0);for(let s in this._options.gradient)r.addColorStop(+s,this._options.gradient[s]);return t.fillStyle=r,t.fillRect(0,0,200,10),e}_parsePoints(e){return e.map(t=>{let r=Xo.project(i.Cesium.Cartographic.fromDegrees(t.lng,t.lat));return{x:(r.x-this._boundsInMeter.west)/this._scale,y:(r.y-this._boundsInMeter.south)/this._scale,size:this._options.radius,intensity:t.value||Math.random()}})}_computeBounds(){i.Cesium.Rectangle.fromCartographicArray(this._points.map(e=>i.Cesium.Cartographic.fromDegrees(e.lng,e.lat)),this._bounds)}_computeBoundsInMeter(){let e=Xo.project(i.Cesium.Rectangle.southwest(this._bounds)),t=Xo.project(i.Cesium.Rectangle.northeast(this._bounds));this._boundsInMeter=new i.Cesium.Rectangle(e.x,e.y,t.x,t.y)}_update(){if(!this._points||!this._points.length)return!1;this._heat.adjustSize(),this._heat.update(),this._heat.display(),this._primitive&&this._primitive.geometryInstances&&(this._primitive.geometryInstances.geometry=new i.Cesium.RectangleGeometry({rectangle:this._bounds,height:this._options.height})),this._primitive.appearance=new i.Cesium.MaterialAppearance({material:new i.Cesium.Material({fabric:{type:"Heat-Image",uniforms:{image:this._canvas},source:`
16065
+ `,this._viewer.layerContainer.appendChild(this._canvas),this._points&&this._points.length&&(this._heat=nn({canvas:this._canvas,gradientTexture:this._createGradientTexture()}),this._scale=Math.min(Math.abs(this._boundsInMeter.west-this._boundsInMeter.east)/this._viewer.canvas.width,Math.abs(this._boundsInMeter.north-this._boundsInMeter.south)/this._viewer.canvas.height),this._heat.blur(),this._heat.addPoints(this._parsePoints(this._points)),this._update())}_createGradientTexture(){if(!this._options.gradient)return;let e=document.createElement("canvas");e.width=200,e.height=10;let t=e.getContext("2d"),r=t.createLinearGradient(0,0,200,0);for(let s in this._options.gradient)r.addColorStop(+s,this._options.gradient[s]);return t.fillStyle=r,t.fillRect(0,0,200,10),e}_parsePoints(e){return e.map(t=>{let r=ln.project(i.Cesium.Cartographic.fromDegrees(t.lng,t.lat));return{x:(r.x-this._boundsInMeter.west)/this._scale,y:(r.y-this._boundsInMeter.south)/this._scale,size:this._options.radius,intensity:t.value||Math.random()}})}_computeBounds(){i.Cesium.Rectangle.fromCartographicArray(this._points.map(e=>i.Cesium.Cartographic.fromDegrees(e.lng,e.lat)),this._bounds)}_computeBoundsInMeter(){let e=ln.project(i.Cesium.Rectangle.southwest(this._bounds)),t=ln.project(i.Cesium.Rectangle.northeast(this._bounds));this._boundsInMeter=new i.Cesium.Rectangle(e.x,e.y,t.x,t.y)}_update(){if(!this._points||!this._points.length)return!1;this._heat.adjustSize(),this._heat.update(),this._heat.display(),this._primitive&&this._primitive.geometryInstances&&(this._primitive.geometryInstances.geometry=new i.Cesium.RectangleGeometry({rectangle:this._bounds,height:this._options.height})),this._primitive.appearance=new i.Cesium.MaterialAppearance({material:new i.Cesium.Material({fabric:{type:"Heat-Image",uniforms:{image:this._canvas},source:`
16068
16066
  uniform sampler2D image;
16069
16067
  czm_material czm_getMaterial(czm_materialInput materialInput){
16070
16068
  czm_material material = czm_getDefaultMaterial(materialInput);
@@ -16077,7 +16075,7 @@ void main(){
16077
16075
  material.alpha = colorImage.a;
16078
16076
  return material;
16079
16077
  }
16080
- `},translucent:function(e){return!0}}),flat:!0})}setPoints(e){return this._points=e,this._computeBounds(),this._computeBoundsInMeter(),this._viewer&&(this._scale=Math.min(Math.abs(this._boundsInMeter.west-this._boundsInMeter.east)/this._viewer.canvas.width,Math.abs(this._boundsInMeter.north-this._boundsInMeter.south)/this._viewer.canvas.height),this._heat=qo({canvas:this._canvas,gradientTexture:this._createGradientTexture()})),this._heat&&(this._heat.blur(),this._heat.addPoints(this._parsePoints(this._points)),this._update()),this}clear(){return this._heat.clear(),this._points=[],this._state=d.CLEARED,this}};P.registerType("heat-map");var Uh=Jo;var Ko=class{constructor(e,t){this.u=e,this.v=t,this.m=this.magnitude()}magnitude(){return Math.sqrt(this.u*this.u+this.v*this.v)}directionTo(){let t=Math.atan2(this.u,this.v)*(180/Math.PI);return t<0&&(t+=360),t}directionFrom(){return(this.directionTo()+180)%360}},Qo=Ko;var $o=class{constructor(e){this.grid=[],this.xmin=e.xmin,this.xmax=e.xmax,this.ymin=e.ymin,this.ymax=e.ymax,this.cols=e.cols,this.rows=e.rows,this.us=e.us,this.vs=e.vs,this.deltaX=e.deltaX,this.deltaY=e.deltaY,this.deltaY<0&&this.ymin<this.ymax?console.warn("[wind-core]: The data is flipY"):(this.ymin=Math.min(e.ymax,e.ymin),this.ymax=Math.max(e.ymax,e.ymin)),this.isFields=!0;let t=Math.ceil((this.xmax-this.xmin)/e.deltaX),r=Math.ceil((this.ymax-this.ymin)/e.deltaY);(t!==this.cols||r!==this.rows)&&console.warn("[wind-core]: The data grid not equal"),this.isContinuous=Math.floor(this.cols*e.deltaX)>=360,this.wrappedX="wrappedX"in e?e.wrappedX:this.xmax>180,this.grid=this.buildGrid(),this.range=this.calculateRange()}buildGrid(){let e=[],t=0,r=this,s=r.rows,o=r.cols,a=r.us,l=r.vs;for(let h=0;h<s;h++){let c=[];for(let p=0;p<o;p++,t++){let f=a[t],T=l[t],y=this.isValid(f)&&this.isValid(T);c[p]=y?new Qo(f,T):null}this.isContinuous&&c.push(c[0]),e[h]=c}return e}release(){this.grid=[]}extent(){return[this.xmin,this.ymin,this.xmax,this.ymax]}bilinearInterpolateVector(e,t,r,s,o,a){let l=1-e,h=1-t,c=l*h,p=e*h,f=l*t,T=e*t,y=r.u*c+s.u*p+o.u*f+a.u*T,m=r.v*c+s.v*p+o.v*f+a.v*T;return new Qo(y,m)}calculateRange(){if(!this.grid||!this.grid[0])return;let e=this.grid.length,t=this.grid[0].length,r,s;for(let o=0;o<e;o++)for(let a=0;a<t;a++){let l=this.grid[o][a];if(l!==null){let h=l.m||l.magnitude();r===void 0?r=h:s===void 0?(s=h,r=Math.min(r,s),s=Math.max(r,s)):(r=Math.min(h,r),s=Math.max(h,s))}}return[r,s]}isValid(e){return e!=null}getWrappedLongitudes(){let e=this.xmin,t=this.xmax;return this.wrappedX&&(this.isContinuous?(e=-180,t=180):(t=this.xmax-360,e=this.xmin-360)),[e,t]}contains(e,t){let r=this.getWrappedLongitudes(),s=r[0],o=r[1],a=e>=s&&e<=o,l;return this.deltaY>=0?l=t>=this.ymin&&t<=this.ymax:l=t>=this.ymax&&t<=this.ymin,a&&l}floorMod(e,t){return e-t*Math.floor(e/t)}getDecimalIndexes(e,t){let r=this.floorMod(e-this.xmin,360)/this.deltaX,s=(this.ymax-t)/this.deltaY;return[r,s]}valueAt(e,t){if(!this.contains(e,t))return null;let r=this.getDecimalIndexes(e,t),s=Math.floor(r[0]),o=Math.floor(r[1]),a=this.clampColumnIndex(s),l=this.clampRowIndex(o);return this.valueAtIndexes(a,l)}interpolatedValueAt(e,t){if(!this.contains(e,t))return null;let r=this.getDecimalIndexes(e,t),s=r[0],o=r[1];return this.interpolatePoint(s,o)}hasValueAt(e,t){return this.valueAt(e,t)!==null}interpolatePoint(e,t){let r=this.getFourSurroundingIndexes(e,t),s=r[0],o=r[1],a=r[2],l=r[3],h=this.getFourSurroundingValues(s,o,a,l);if(h){let c=h[0],p=h[1],f=h[2],T=h[3];return this.bilinearInterpolateVector(e-s,t-a,c,p,f,T)}return null}clampColumnIndex(e){let t=e;e<0&&(t=0);let r=this.cols-1;return e>r&&(t=r),t}clampRowIndex(e){let t=e;e<0&&(t=0);let r=this.rows-1;return e>r&&(t=r),t}getFourSurroundingIndexes(e,t){let r=Math.floor(e),s=r+1;this.isContinuous&&s>=this.cols&&(s=0),s=this.clampColumnIndex(s);let o=this.clampRowIndex(Math.floor(t)),a=this.clampRowIndex(o+1);return[r,s,o,a]}getFourSurroundingValues(e,t,r,s){let o;if(o=this.grid[r]){let a=o[e],l=o[t];if(this.isValid(a)&&this.isValid(l)&&(o=this.grid[s])){let h=o[e],c=o[t];if(this.isValid(h)&&this.isValid(c))return[a,l,h,c]}}return null}valueAtIndexes(e,t){return this.grid[t][e]}lonLatAtIndexes(e,t){let r=this.longitudeAtX(e),s=this.latitudeAtY(t);return[r,s]}longitudeAtX(e){let t=this.deltaX/2,r=this.xmin+t+e*this.deltaX;return this.wrappedX&&(r=r>180?r-360:r),r}latitudeAtY(e){let t=this.deltaY/2;return this.ymax-t-e*this.deltaY}randomize(e,t,r,s){e===void 0&&(e={});let o=Math.random()*(t||this.cols)|0,a=Math.random()*(r||this.rows)|0,l=s([o,a]);return l!==null?(e.x=l[0],e.y=l[1]):(e.x=this.longitudeAtX(o),e.y=this.latitudeAtY(a)),e}checkFields(){return this.isFields}},Bh=$o;var ea=class{constructor(e){this.options={},this.particles=[],this.ctx=e,this.animationLoop=void 0,this.animate=this.animate.bind(this)}_indexFor(e,t,r,s){return Math.max(0,Math.min(s.length-1,Math.round((e-t)/(r-t)*(s.length-1))))}_moveParticles(){if(!this.particles||!this.particles.length)return;let e=this.ctx.canvas.width,t=this.ctx.canvas.height,r=this.particles,s=this.options.maxAge,o=typeof this.options.velocityScale=="function"?this.options.velocityScale():this.options.velocityScale;for(let a=0;a<r.length;a++){let l=r[a];l.age>s&&(l.age=0,this.field.randomize(l,e,t,this.unProject));let h=l.x,c=l.y,p=this.field.interpolatedValueAt(h,c);if(p===null)l.age=s;else{let f=h+p.u*o,T=c+p.v*o;this.field.hasValueAt(f,T)?(l.xt=f,l.yt=T,l.m=p.m):(l.x=f,l.y=T,l.age=s)}l.age++}}_drawParticles(){if(!this.particles||!this.particles.length)return;let e=this.particles,t=this.ctx.globalCompositeOperation;this.ctx.globalCompositeOperation="destination-in",this.ctx.fillRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.globalCompositeOperation=t,this.ctx.globalAlpha=this.options.globalAlpha,this.ctx.fillStyle="rgba(0, 0, 0, "+this.options.globalAlpha+")",this.ctx.lineWidth=this.options.lineWidth?this.options.lineWidth:1,this.ctx.strokeStyle=this.options.colorScale?this.options.colorScale:"#fff";let r=0,s=e.length;if(this.field&&s>0){let o,a;if(this.options.minVelocity&&this.options.maxVelocity)o=this.options.minVelocity,a=this.options.maxVelocity;else{let l=this.field.range;o=l[0],a=l[1]}for(;r<s;r++)this[this.options.useCoordsDraw?"_drawCoordsParticle":"_drawPixelParticle"](e[r],o,a)}}_drawPixelParticle(e,t,r){let s=[e.x,e.y],o=[e.xt,e.yt],a=e.xt-e.x,l=e.yt-e.y;a*a+l*l>20*20||o&&s&&o[0]&&o[1]&&s[0]&&s[1]&&e.age<=this.options.maxAge&&this._drawStroke(s,o,e,t,r)}_drawCoordsParticle(e,t,r){let s=[e.x,e.y],o=[e.xt,e.yt];if(o&&s&&o[0]&&o[1]&&s[0]&&s[1]&&this.intersectsCoordinate(o)&&e.age<=this.options.maxAge){let a=this.project(s),l=this.project(o);this._drawStroke(a,l,e,t,r)}}_drawStroke(e,t,r,s,o){if(e&&t){if(this.ctx.beginPath(),this.ctx.moveTo(e[0],e[1]),this.ctx.lineTo(t[0],t[1]),typeof this.options.colorScale=="function")this.ctx.strokeStyle=this.options.colorScale(r.m);else if(Array.isArray(this.options.colorScale)){let a=this._indexFor(r.m,s,o,this.options.colorScale);this.ctx.strokeStyle=this.options.colorScale[a]}typeof this.options.lineWidth=="function"&&(this.ctx.lineWidth=this.options.lineWidth(r.m)),r.x=r.xt,r.y=r.yt,this.ctx.stroke()}}_prepareParticlePaths(){let e=this.ctx.canvas.width,t=this.ctx.canvas.height,r=typeof this.options.paths=="function"?this.options.paths(this):this.options.paths,s=[];if(!this.field)return[];for(let o=0;o<r;o++)s.push(this.field.randomize({age:Math.floor(Math.random()*this.options.maxAge)},e,t,this.unProject));return s}project(){throw new Error("project must be override")}unProject(){throw new Error("unProject must be override")}intersectsCoordinate(e){throw new Error("must be override")}prerender(){this.field&&(this.particles=this._prepareParticlePaths(),!this.starting&&!this.forceStop&&(this.starting=!0,this._then=Date.now(),this.animate()))}render(){return this._moveParticles(),this._drawParticles(),this}clearCanvas(){this.stop(),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.forceStop=!1}start(){this.starting=!0,this.forceStop=!1,this._then=Date.now(),this.animate()}stop(){cancelAnimationFrame(this.animationLoop),this.starting=!1,this.forceStop=!0}animate(){this.animationLoop&&cancelAnimationFrame(this.animationLoop),this.animationLoop=requestAnimationFrame(this.animate);let e=Date.now(),t=e-this._then;t>this.options.frameRate&&(this._then=e-t%this.options.frameRate,this.render())}setData(e){return this.field=e,this}setOptions(e){var t,r,s,o;return this.options=e,!((t=this.options)!=null&&t.maxAge)&&((r=this.options)!=null&&r.particleAge)&&(this.options.maxAge=Number(this.options.particleAge)),!((s=this.options)!=null&&s.paths)&&((o=this.options)!=null&&o.particleMultiplier)&&(this.options.paths=Math.round(this.options.width*this.options.height*Number(this.options.particleMultiplier))),this}},Vh=ea;var Em={globalAlpha:.9,lineWidth:1,colorScale:"#fff",velocityScale:1/25,maxAge:90,paths:800,frameRate:20,useCoordsDraw:!0,gpet:!0},ta=class extends P{constructor(e,t={}){super(e),this._options={...Em,...t},this._data=void 0,this._canvas=document.createElement("canvas"),this._state=d.INITIALIZED}get type(){return P.getLayerType("wind")}set show(e){this._show=e,this._canvas.style.visibility=e?"visible":"hidden"}get show(){return this._show}_formatData(e){let t,r;if(e.forEach(function(o){switch(o.header.parameterCategory+","+o.header.parameterNumber){case"1,2":case"2,2":t=o;break;case"1,3":case"2,3":r=o;break}}),!r||!t)return;let s=t.header;return new Bh({xmin:s.lo1,ymin:s.la1,xmax:s.lo2,ymax:s.la2,deltaX:s.dx,deltaY:s.dy,cols:s.nx,rows:s.ny,us:t.data,vs:r.data})}_mountCanvas(){if(!this._viewer||!this._canvas)return;this._canvas.style.cssText="position:absolute; left:0; top:0;user-select:none;pointer-events: none;",this._canvas.className="dc-wind-layer";let{width:e,height:t}=this._viewer.canvas;this._canvas.width=e,this._canvas.height=t,this._canvas.style.width=e+"px",this._canvas.style.height=t+"px",this._viewer.layerContainer.appendChild(this._canvas)}_addedHook(){let e=this._viewer.scene,t=this._viewer.camera,r=i.Cesium.Ellipsoid.WGS84;this._delegate.intersectsCoordinate=s=>{if(e.mode===i.Cesium.SceneMode.SCENE3D){let o=new i.Cesium.EllipsoidalOccluder(r,t.position),a=i.Cesium.Cartesian3.fromDegrees(s[0],s[1]);return o.isPointVisible(a)}else if(e.mode===i.Cesium.SceneMode.SCENE2D)return!(s[0]===-180||s[0]===180);return!0},this._delegate.project=s=>{let o=i.Cesium.Cartesian3.fromDegrees(s[0],s[1]),a=i.Cesium.SceneTransforms.worldToWindowCoordinates(e,o);return[a.x,a.y]},this._delegate.unProject=s=>{let o=new i.Cesium.Cartesian2(s[0],s[1]),a;if(e.mode===i.Cesium.SceneMode.SCENE3D?a=e.globe.pick(t.getPickRay(o),e):a=e.camera.pickEllipsoid(o,r),!a)return null;let l=r.cartesianToCartographic(a),h=i.Cesium.Math.toDegrees(l.latitude);return[i.Cesium.Math.toDegrees(l.longitude),h]}}_onAdd(e){this._viewer=e,this._mountCanvas();let t=this._canvas.getContext("2d");this._delegate||(this._delegate=new Vh(t),this._delegate.setOptions(this._options),this._addedHook()),this._data&&(this._delegate.setData(this._data),this._delegate.prerender(),this._delegate.render())}_onRemove(){this._delegate&&this._delegate.stop(),this._canvas&&this._viewer.layerContainer.removeChild(this._canvas),delete this._canvas}setData(e,t){return e&&e.checkFields&&e.checkFields()?this._data=e:Array.isArray(e)&&(this._data=this._formatData(e)),this._delegate&&(this._delegate.setData(this._data),t&&(this._options={...this._options,...t},this._delegate.setOptions(this._options)),this._delegate.prerender(),this._delegate.render()),this}setOptions(e){return this._options={...this._options,...e},this._delegate&&(this._delegate.setOptions(this._options),this._delegate.prerender(),this._delegate.render()),this}};P.registerType("wind");var jh=ta;var Yh=`/**
16078
+ `},translucent:function(e){return!0}}),flat:!0})}setPoints(e){return this._points=e,this._computeBounds(),this._computeBoundsInMeter(),this._viewer&&(this._scale=Math.min(Math.abs(this._boundsInMeter.west-this._boundsInMeter.east)/this._viewer.canvas.width,Math.abs(this._boundsInMeter.north-this._boundsInMeter.south)/this._viewer.canvas.height),this._heat=nn({canvas:this._canvas,gradientTexture:this._createGradientTexture()})),this._heat&&(this._heat.blur(),this._heat.addPoints(this._parsePoints(this._points)),this._update()),this}clear(){return this._heat.clear(),this._points=[],this._state=m.CLEARED,this}};S.registerType("heat-map");var r_=hn;var cn=class{constructor(e,t){this.u=e,this.v=t,this.m=this.magnitude()}magnitude(){return Math.sqrt(this.u*this.u+this.v*this.v)}directionTo(){let t=Math.atan2(this.u,this.v)*(180/Math.PI);return t<0&&(t+=360),t}directionFrom(){return(this.directionTo()+180)%360}},pn=cn;var dn=class{constructor(e){this.grid=[],this.xmin=e.xmin,this.xmax=e.xmax,this.ymin=e.ymin,this.ymax=e.ymax,this.cols=e.cols,this.rows=e.rows,this.us=e.us,this.vs=e.vs,this.deltaX=e.deltaX,this.deltaY=e.deltaY,this.deltaY<0&&this.ymin<this.ymax?console.warn("[wind-core]: The data is flipY"):(this.ymin=Math.min(e.ymax,e.ymin),this.ymax=Math.max(e.ymax,e.ymin)),this.isFields=!0;let t=Math.ceil((this.xmax-this.xmin)/e.deltaX),r=Math.ceil((this.ymax-this.ymin)/e.deltaY);(t!==this.cols||r!==this.rows)&&console.warn("[wind-core]: The data grid not equal"),this.isContinuous=Math.floor(this.cols*e.deltaX)>=360,this.wrappedX="wrappedX"in e?e.wrappedX:this.xmax>180,this.grid=this.buildGrid(),this.range=this.calculateRange()}buildGrid(){let e=[],t=0,r=this,s=r.rows,o=r.cols,n=r.us,l=r.vs;for(let h=0;h<s;h++){let c=[];for(let p=0;p<o;p++,t++){let _=n[t],w=l[t],y=this.isValid(_)&&this.isValid(w);c[p]=y?new pn(_,w):null}this.isContinuous&&c.push(c[0]),e[h]=c}return e}release(){this.grid=[]}extent(){return[this.xmin,this.ymin,this.xmax,this.ymax]}bilinearInterpolateVector(e,t,r,s,o,n){let l=1-e,h=1-t,c=l*h,p=e*h,_=l*t,w=e*t,y=r.u*c+s.u*p+o.u*_+n.u*w,d=r.v*c+s.v*p+o.v*_+n.v*w;return new pn(y,d)}calculateRange(){if(!this.grid||!this.grid[0])return;let e=this.grid.length,t=this.grid[0].length,r,s;for(let o=0;o<e;o++)for(let n=0;n<t;n++){let l=this.grid[o][n];if(l!==null){let h=l.m||l.magnitude();r===void 0?r=h:s===void 0?(s=h,r=Math.min(r,s),s=Math.max(r,s)):(r=Math.min(h,r),s=Math.max(h,s))}}return[r,s]}isValid(e){return e!=null}getWrappedLongitudes(){let e=this.xmin,t=this.xmax;return this.wrappedX&&(this.isContinuous?(e=-180,t=180):(t=this.xmax-360,e=this.xmin-360)),[e,t]}contains(e,t){let r=this.getWrappedLongitudes(),s=r[0],o=r[1],n=e>=s&&e<=o,l;return this.deltaY>=0?l=t>=this.ymin&&t<=this.ymax:l=t>=this.ymax&&t<=this.ymin,n&&l}floorMod(e,t){return e-t*Math.floor(e/t)}getDecimalIndexes(e,t){let r=this.floorMod(e-this.xmin,360)/this.deltaX,s=(this.ymax-t)/this.deltaY;return[r,s]}valueAt(e,t){if(!this.contains(e,t))return null;let r=this.getDecimalIndexes(e,t),s=Math.floor(r[0]),o=Math.floor(r[1]),n=this.clampColumnIndex(s),l=this.clampRowIndex(o);return this.valueAtIndexes(n,l)}interpolatedValueAt(e,t){if(!this.contains(e,t))return null;let r=this.getDecimalIndexes(e,t),s=r[0],o=r[1];return this.interpolatePoint(s,o)}hasValueAt(e,t){return this.valueAt(e,t)!==null}interpolatePoint(e,t){let r=this.getFourSurroundingIndexes(e,t),s=r[0],o=r[1],n=r[2],l=r[3],h=this.getFourSurroundingValues(s,o,n,l);if(h){let c=h[0],p=h[1],_=h[2],w=h[3];return this.bilinearInterpolateVector(e-s,t-n,c,p,_,w)}return null}clampColumnIndex(e){let t=e;e<0&&(t=0);let r=this.cols-1;return e>r&&(t=r),t}clampRowIndex(e){let t=e;e<0&&(t=0);let r=this.rows-1;return e>r&&(t=r),t}getFourSurroundingIndexes(e,t){let r=Math.floor(e),s=r+1;this.isContinuous&&s>=this.cols&&(s=0),s=this.clampColumnIndex(s);let o=this.clampRowIndex(Math.floor(t)),n=this.clampRowIndex(o+1);return[r,s,o,n]}getFourSurroundingValues(e,t,r,s){let o;if(o=this.grid[r]){let n=o[e],l=o[t];if(this.isValid(n)&&this.isValid(l)&&(o=this.grid[s])){let h=o[e],c=o[t];if(this.isValid(h)&&this.isValid(c))return[n,l,h,c]}}return null}valueAtIndexes(e,t){return this.grid[t][e]}lonLatAtIndexes(e,t){let r=this.longitudeAtX(e),s=this.latitudeAtY(t);return[r,s]}longitudeAtX(e){let t=this.deltaX/2,r=this.xmin+t+e*this.deltaX;return this.wrappedX&&(r=r>180?r-360:r),r}latitudeAtY(e){let t=this.deltaY/2;return this.ymax-t-e*this.deltaY}randomize(e,t,r,s){e===void 0&&(e={});let o=Math.random()*(t||this.cols)|0,n=Math.random()*(r||this.rows)|0,l=s([o,n]);return l!==null?(e.x=l[0],e.y=l[1]):(e.x=this.longitudeAtX(o),e.y=this.latitudeAtY(n)),e}checkFields(){return this.isFields}},s_=dn;var mn=class{constructor(e){this.options={},this.particles=[],this.ctx=e,this.animationLoop=void 0,this.animate=this.animate.bind(this)}_indexFor(e,t,r,s){return Math.max(0,Math.min(s.length-1,Math.round((e-t)/(r-t)*(s.length-1))))}_moveParticles(){if(!this.particles||!this.particles.length)return;let e=this.ctx.canvas.width,t=this.ctx.canvas.height,r=this.particles,s=this.options.maxAge,o=typeof this.options.velocityScale=="function"?this.options.velocityScale():this.options.velocityScale;for(let n=0;n<r.length;n++){let l=r[n];l.age>s&&(l.age=0,this.field.randomize(l,e,t,this.unProject));let h=l.x,c=l.y,p=this.field.interpolatedValueAt(h,c);if(p===null)l.age=s;else{let _=h+p.u*o,w=c+p.v*o;this.field.hasValueAt(_,w)?(l.xt=_,l.yt=w,l.m=p.m):(l.x=_,l.y=w,l.age=s)}l.age++}}_drawParticles(){if(!this.particles||!this.particles.length)return;let e=this.particles,t=this.ctx.globalCompositeOperation;this.ctx.globalCompositeOperation="destination-in",this.ctx.fillRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.globalCompositeOperation=t,this.ctx.globalAlpha=this.options.globalAlpha,this.ctx.fillStyle="rgba(0, 0, 0, "+this.options.globalAlpha+")",this.ctx.lineWidth=this.options.lineWidth?this.options.lineWidth:1,this.ctx.strokeStyle=this.options.colorScale?this.options.colorScale:"#fff";let r=0,s=e.length;if(this.field&&s>0){let o,n;if(this.options.minVelocity&&this.options.maxVelocity)o=this.options.minVelocity,n=this.options.maxVelocity;else{let l=this.field.range;o=l[0],n=l[1]}for(;r<s;r++)this[this.options.useCoordsDraw?"_drawCoordsParticle":"_drawPixelParticle"](e[r],o,n)}}_drawPixelParticle(e,t,r){let s=[e.x,e.y],o=[e.xt,e.yt],n=e.xt-e.x,l=e.yt-e.y;n*n+l*l>20*20||o&&s&&o[0]&&o[1]&&s[0]&&s[1]&&e.age<=this.options.maxAge&&this._drawStroke(s,o,e,t,r)}_drawCoordsParticle(e,t,r){let s=[e.x,e.y],o=[e.xt,e.yt];if(o&&s&&o[0]&&o[1]&&s[0]&&s[1]&&this.intersectsCoordinate(o)&&e.age<=this.options.maxAge){let n=this.project(s),l=this.project(o);this._drawStroke(n,l,e,t,r)}}_drawStroke(e,t,r,s,o){if(e&&t){if(this.ctx.beginPath(),this.ctx.moveTo(e[0],e[1]),this.ctx.lineTo(t[0],t[1]),typeof this.options.colorScale=="function")this.ctx.strokeStyle=this.options.colorScale(r.m);else if(Array.isArray(this.options.colorScale)){let n=this._indexFor(r.m,s,o,this.options.colorScale);this.ctx.strokeStyle=this.options.colorScale[n]}typeof this.options.lineWidth=="function"&&(this.ctx.lineWidth=this.options.lineWidth(r.m)),r.x=r.xt,r.y=r.yt,this.ctx.stroke()}}_prepareParticlePaths(){let e=this.ctx.canvas.width,t=this.ctx.canvas.height,r=typeof this.options.paths=="function"?this.options.paths(this):this.options.paths,s=[];if(!this.field)return[];for(let o=0;o<r;o++)s.push(this.field.randomize({age:Math.floor(Math.random()*this.options.maxAge)},e,t,this.unProject));return s}project(){throw new Error("project must be override")}unProject(){throw new Error("unProject must be override")}intersectsCoordinate(e){throw new Error("must be override")}prerender(){this.field&&(this.particles=this._prepareParticlePaths(),!this.starting&&!this.forceStop&&(this.starting=!0,this._then=Date.now(),this.animate()))}render(){return this._moveParticles(),this._drawParticles(),this}clearCanvas(){this.stop(),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.forceStop=!1}start(){this.starting=!0,this.forceStop=!1,this._then=Date.now(),this.animate()}stop(){cancelAnimationFrame(this.animationLoop),this.starting=!1,this.forceStop=!0}animate(){this.animationLoop&&cancelAnimationFrame(this.animationLoop),this.animationLoop=requestAnimationFrame(this.animate);let e=Date.now(),t=e-this._then;t>this.options.frameRate&&(this._then=e-t%this.options.frameRate,this.render())}setData(e){return this.field=e,this}setOptions(e){var t,r,s,o;return this.options=e,!((t=this.options)!=null&&t.maxAge)&&((r=this.options)!=null&&r.particleAge)&&(this.options.maxAge=Number(this.options.particleAge)),!((s=this.options)!=null&&s.paths)&&((o=this.options)!=null&&o.particleMultiplier)&&(this.options.paths=Math.round(this.options.width*this.options.height*Number(this.options.particleMultiplier))),this}},o_=mn;var pE={globalAlpha:.9,lineWidth:1,colorScale:"#fff",velocityScale:1/25,maxAge:90,paths:800,frameRate:20,useCoordsDraw:!0,gpet:!0},un=class extends S{constructor(e,t={}){super(e),this._options={...pE,...t},this._data=void 0,this._canvas=document.createElement("canvas"),this._state=m.INITIALIZED}get type(){return S.getLayerType("wind")}set show(e){this._show=e,this._canvas.style.visibility=e?"visible":"hidden"}get show(){return this._show}_formatData(e){let t,r;if(e.forEach(function(o){switch(o.header.parameterCategory+","+o.header.parameterNumber){case"1,2":case"2,2":t=o;break;case"1,3":case"2,3":r=o;break}}),!r||!t)return;let s=t.header;return new s_({xmin:s.lo1,ymin:s.la1,xmax:s.lo2,ymax:s.la2,deltaX:s.dx,deltaY:s.dy,cols:s.nx,rows:s.ny,us:t.data,vs:r.data})}_mountCanvas(){if(!this._viewer||!this._canvas)return;this._canvas.style.cssText="position:absolute; left:0; top:0;user-select:none;pointer-events: none;",this._canvas.className="dc-wind-layer";let{width:e,height:t}=this._viewer.canvas;this._canvas.width=e,this._canvas.height=t,this._canvas.style.width=e+"px",this._canvas.style.height=t+"px",this._viewer.layerContainer.appendChild(this._canvas)}_addedHook(){let e=this._viewer.scene,t=this._viewer.camera,r=i.Cesium.Ellipsoid.WGS84;this._delegate.intersectsCoordinate=s=>{if(e.mode===i.Cesium.SceneMode.SCENE3D){let o=new i.Cesium.EllipsoidalOccluder(r,t.position),n=i.Cesium.Cartesian3.fromDegrees(s[0],s[1]);return o.isPointVisible(n)}else if(e.mode===i.Cesium.SceneMode.SCENE2D)return!(s[0]===-180||s[0]===180);return!0},this._delegate.project=s=>{let o=i.Cesium.Cartesian3.fromDegrees(s[0],s[1]),n=i.Cesium.SceneTransforms.worldToWindowCoordinates(e,o);return[n.x,n.y]},this._delegate.unProject=s=>{let o=new i.Cesium.Cartesian2(s[0],s[1]),n;if(e.mode===i.Cesium.SceneMode.SCENE3D?n=e.globe.pick(t.getPickRay(o),e):n=e.camera.pickEllipsoid(o,r),!n)return null;let l=r.cartesianToCartographic(n),h=i.Cesium.Math.toDegrees(l.latitude);return[i.Cesium.Math.toDegrees(l.longitude),h]}}_onAdd(e){this._viewer=e,this._mountCanvas();let t=this._canvas.getContext("2d");this._delegate||(this._delegate=new o_(t),this._delegate.setOptions(this._options),this._addedHook()),this._data&&(this._delegate.setData(this._data),this._delegate.prerender(),this._delegate.render())}_onRemove(){this._delegate&&this._delegate.stop(),this._canvas&&this._viewer.layerContainer.removeChild(this._canvas),delete this._canvas}setData(e,t){return e&&e.checkFields&&e.checkFields()?this._data=e:Array.isArray(e)&&(this._data=this._formatData(e)),this._delegate&&(this._delegate.setData(this._data),t&&(this._options={...this._options,...t},this._delegate.setOptions(this._options)),this._delegate.prerender(),this._delegate.render()),this}setOptions(e){return this._options={...this._options,...e},this._delegate&&(this._delegate.setOptions(this._options),this._delegate.prerender(),this._delegate.render()),this}};S.registerType("wind");var a_=un;var n_=`/**
16081
16079
  * @license
16082
16080
  * Cellular noise ("Worley noise") in 2D in GLSL.
16083
16081
  * Copyright (c) Stefan Gustavson 2011-04-19. All rights reserved.
@@ -16154,7 +16152,7 @@ vec2 czm_cellular(vec2 P)
16154
16152
  d1.y = min(d1.y, d2.x); // F2 is in d1.y, we're done.
16155
16153
  return sqrt(d1.xy);
16156
16154
  }
16157
- `;var Zh=`/**
16155
+ `;var l_=`/**
16158
16156
  * @license
16159
16157
  * Description : Array and textureless GLSL 2D/3D/4D simplex
16160
16158
  * noise functions.
@@ -16436,7 +16434,7 @@ float czm_snoise(vec4 v)
16436
16434
  return 49.0 * ( dot(m0*m0, vec3( dot( p0, x0 ), dot( p1, x1 ), dot( p2, x2 )))
16437
16435
  + dot(m1*m1, vec2( dot( p3, x3 ), dot( p4, x4 ) ) ) ) ;
16438
16436
  }
16439
- `;var qh=`uniform vec4 asphaltColor;
16437
+ `;var h_=`uniform vec4 asphaltColor;
16440
16438
  uniform float bumpSize;
16441
16439
  uniform float roughness;
16442
16440
 
@@ -16460,7 +16458,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
16460
16458
 
16461
16459
  return material;
16462
16460
  }
16463
- `;var Xh=`uniform vec4 lightColor;
16461
+ `;var c_=`uniform vec4 lightColor;
16464
16462
  uniform vec4 darkColor;
16465
16463
  uniform float frequency;
16466
16464
 
@@ -16477,7 +16475,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
16477
16475
 
16478
16476
  return material;
16479
16477
  }
16480
- `;var Jh=`uniform vec4 brickColor;
16478
+ `;var p_=`uniform vec4 brickColor;
16481
16479
  uniform vec4 mortarColor;
16482
16480
  uniform vec2 brickSize;
16483
16481
  uniform vec2 brickPct;
@@ -16518,7 +16516,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
16518
16516
 
16519
16517
  return material;
16520
16518
  }
16521
- `;var Kh=`uniform vec4 cementColor;
16519
+ `;var d_=`uniform vec4 cementColor;
16522
16520
  uniform float grainScale;
16523
16521
  uniform float roughness;
16524
16522
 
@@ -16536,7 +16534,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
16536
16534
 
16537
16535
  return material;
16538
16536
  }
16539
- `;var Qh=`uniform vec4 color;
16537
+ `;var m_=`uniform vec4 color;
16540
16538
  uniform float time;
16541
16539
 
16542
16540
  czm_material czm_getMaterial(czm_materialInput materialInput){
@@ -16557,7 +16555,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
16557
16555
 
16558
16556
  return material;
16559
16557
  }
16560
- `;var $h=`uniform vec4 lightColor;
16558
+ `;var u_=`uniform vec4 lightColor;
16561
16559
  uniform vec4 darkColor;
16562
16560
  uniform float frequency;
16563
16561
 
@@ -16574,7 +16572,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
16574
16572
 
16575
16573
  return material;
16576
16574
  }
16577
- `;var ec=`czm_material czm_getMaterial(czm_materialInput materialInput){
16575
+ `;var __=`czm_material czm_getMaterial(czm_materialInput materialInput){
16578
16576
  czm_material material = czm_getDefaultMaterial(materialInput);
16579
16577
 
16580
16578
  vec3 normalWC = normalize(czm_inverseViewRotation * material.normal);
@@ -16585,7 +16583,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
16585
16583
 
16586
16584
  return material;
16587
16585
  }
16588
- `;var tc=`uniform vec4 grassColor;
16586
+ `;var f_=`uniform vec4 grassColor;
16589
16587
  uniform vec4 dirtColor;
16590
16588
  uniform float patchiness;
16591
16589
 
@@ -16612,7 +16610,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
16612
16610
 
16613
16611
  return material;
16614
16612
  }
16615
- `;var ic=`uniform samplerCube cubeMap;
16613
+ `;var g_=`uniform samplerCube cubeMap;
16616
16614
 
16617
16615
  czm_material czm_getMaterial(czm_materialInput materialInput){
16618
16616
  czm_material material = czm_getDefaultMaterial(materialInput);
@@ -16624,7 +16622,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
16624
16622
 
16625
16623
  return material;
16626
16624
  }
16627
- `;var rc=`uniform samplerCube cubeMap;
16625
+ `;var y_=`uniform samplerCube cubeMap;
16628
16626
  uniform float indexOfRefractionRatio;
16629
16627
 
16630
16628
  czm_material czm_getMaterial(czm_materialInput materialInput){
@@ -16637,7 +16635,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
16637
16635
 
16638
16636
  return material;
16639
16637
  }
16640
- `;var sc=`uniform vec4 lightColor;
16638
+ `;var v_=`uniform vec4 lightColor;
16641
16639
  uniform vec4 darkColor;
16642
16640
  uniform float frequency;
16643
16641
 
@@ -16653,7 +16651,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
16653
16651
 
16654
16652
  return material;
16655
16653
  }
16656
- `;var oc=`uniform vec4 lightWoodColor;
16654
+ `;var w_=`uniform vec4 lightWoodColor;
16657
16655
  uniform vec4 darkWoodColor;
16658
16656
  uniform float ringFrequency;
16659
16657
  uniform vec2 noiseScale;
@@ -16688,7 +16686,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
16688
16686
 
16689
16687
  return material;
16690
16688
  }
16691
- `;i.Cesium.ShaderSource._czmBuiltinsAndUniforms.czm_cellular=Yh;i.Cesium.ShaderSource._czmBuiltinsAndUniforms.czm_snoise=Zh;i.Cesium.Material.AsphaltType="Asphalt";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.AsphaltType,{fabric:{type:i.Cesium.Material.AsphaltType,uniforms:{asphaltColor:new i.Cesium.Color(.15,.15,.15,1),bumpSize:.02,roughness:.2},source:qh},translucent:function(n){return n.uniforms.asphaltColor.alpha<1}});i.Cesium.Material.BlobType="Blob";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.BlobType,{fabric:{type:i.Cesium.Material.BlobType,uniforms:{lightColor:new i.Cesium.Color(1,1,1,.5),darkColor:new i.Cesium.Color(0,0,1,.5),frequency:10},source:Xh},translucent:function(n){var e=n.uniforms;return e.lightColor.alpha<1||e.darkColor.alpha<0}});i.Cesium.Material.BrickType="Brick";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.BrickType,{fabric:{type:i.Cesium.Material.BrickType,uniforms:{brickColor:new i.Cesium.Color(.6,.3,.1,1),mortarColor:new i.Cesium.Color(.8,.8,.7,1),brickSize:new i.Cesium.Cartesian2(.3,.15),brickPct:new i.Cesium.Cartesian2(.9,.85),brickRoughness:.2,mortarRoughness:.1},source:Jh},translucent:function(n){var e=n.uniforms;return e.brickColor.alpha<1||e.mortarColor.alpha<1}});i.Cesium.Material.CementType="Cement";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CementType,{fabric:{type:i.Cesium.Material.CementType,uniforms:{cementColor:new i.Cesium.Color(.95,.95,.85,1),grainScale:.01,roughness:.3},source:Kh},translucent:function(n){return n.uniforms.cementColor.alpha<1}});i.Cesium.Material.ErosionType="Erosion";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.ErosionType,{fabric:{type:i.Cesium.Material.ErosionType,uniforms:{color:new i.Cesium.Color(1,0,0,.5),time:1},source:Qh},translucent:function(n){return n.uniforms.color.alpha<1}});i.Cesium.Material.FacetType="Facet";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.FacetType,{fabric:{type:i.Cesium.Material.FacetType,uniforms:{lightColor:new i.Cesium.Color(.25,.25,.25,.75),darkColor:new i.Cesium.Color(.75,.75,.75,.75),frequency:10},source:$h},translucent:function(n){var e=n.uniforms;return e.lightColor.alpha<1||e.darkColor.alpha<0}});i.Cesium.Material.FresnelType="Fresnel";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.FresnelType,{fabric:{type:i.Cesium.Material.FresnelType,materials:{reflection:{type:i.Cesium.Material.ReflectionType},refraction:{type:i.Cesium.Material.RefractionType}},source:ec},translucent:!1});i.Cesium.Material.GrassType="Grass";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.GrassType,{fabric:{type:i.Cesium.Material.GrassType,uniforms:{grassColor:new i.Cesium.Color(.25,.4,.1,1),dirtColor:new i.Cesium.Color(.1,.1,.1,1),patchiness:1.5},source:tc},translucent:function(n){var e=n.uniforms;return e.grassColor.alpha<1||e.dirtColor.alpha<1}});i.Cesium.Material.ReflectionType="Reflection";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.ReflectionType,{fabric:{type:i.Cesium.Material.ReflectionType,uniforms:{cubeMap:i.Cesium.Material.DefaultCubeMapId,channels:"rgb"},source:ic},translucent:!1});i.Cesium.Material.RefractionType="Refraction";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.RefractionType,{fabric:{type:i.Cesium.Material.RefractionType,uniforms:{cubeMap:i.Cesium.Material.DefaultCubeMapId,channels:"rgb",indexOfRefractionRatio:.9},source:rc},translucent:!1});i.Cesium.Material.TyeDyeType="TieDye";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.TyeDyeType,{fabric:{type:i.Cesium.Material.TyeDyeType,uniforms:{lightColor:new i.Cesium.Color(1,1,0,.75),darkColor:new i.Cesium.Color(1,0,0,.75),frequency:5},source:sc},translucent:function(n){var e=n.uniforms;return e.lightColor.alpha<1||e.darkColor.alpha<0}});i.Cesium.Material.WoodType="Wood";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.WoodType,{fabric:{type:i.Cesium.Material.WoodType,uniforms:{lightWoodColor:new i.Cesium.Color(.6,.3,.1,1),darkWoodColor:new i.Cesium.Color(.4,.2,.07,1),ringFrequency:3,noiseScale:new i.Cesium.Cartesian2(.7,.5),grainFrequency:27},source:oc},translucent:function(n){let e=n.uniforms;return e.lightWoodColor.alpha<1||e.darkWoodColor.alpha<1}});var ac=`uniform vec4 color;
16689
+ `;i.Cesium.ShaderSource._czmBuiltinsAndUniforms.czm_cellular=n_;i.Cesium.ShaderSource._czmBuiltinsAndUniforms.czm_snoise=l_;i.Cesium.Material.AsphaltType="Asphalt";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.AsphaltType,{fabric:{type:i.Cesium.Material.AsphaltType,uniforms:{asphaltColor:new i.Cesium.Color(.15,.15,.15,1),bumpSize:.02,roughness:.2},source:h_},translucent:function(a){return a.uniforms.asphaltColor.alpha<1}});i.Cesium.Material.BlobType="Blob";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.BlobType,{fabric:{type:i.Cesium.Material.BlobType,uniforms:{lightColor:new i.Cesium.Color(1,1,1,.5),darkColor:new i.Cesium.Color(0,0,1,.5),frequency:10},source:c_},translucent:function(a){var e=a.uniforms;return e.lightColor.alpha<1||e.darkColor.alpha<0}});i.Cesium.Material.BrickType="Brick";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.BrickType,{fabric:{type:i.Cesium.Material.BrickType,uniforms:{brickColor:new i.Cesium.Color(.6,.3,.1,1),mortarColor:new i.Cesium.Color(.8,.8,.7,1),brickSize:new i.Cesium.Cartesian2(.3,.15),brickPct:new i.Cesium.Cartesian2(.9,.85),brickRoughness:.2,mortarRoughness:.1},source:p_},translucent:function(a){var e=a.uniforms;return e.brickColor.alpha<1||e.mortarColor.alpha<1}});i.Cesium.Material.CementType="Cement";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CementType,{fabric:{type:i.Cesium.Material.CementType,uniforms:{cementColor:new i.Cesium.Color(.95,.95,.85,1),grainScale:.01,roughness:.3},source:d_},translucent:function(a){return a.uniforms.cementColor.alpha<1}});i.Cesium.Material.ErosionType="Erosion";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.ErosionType,{fabric:{type:i.Cesium.Material.ErosionType,uniforms:{color:new i.Cesium.Color(1,0,0,.5),time:1},source:m_},translucent:function(a){return a.uniforms.color.alpha<1}});i.Cesium.Material.FacetType="Facet";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.FacetType,{fabric:{type:i.Cesium.Material.FacetType,uniforms:{lightColor:new i.Cesium.Color(.25,.25,.25,.75),darkColor:new i.Cesium.Color(.75,.75,.75,.75),frequency:10},source:u_},translucent:function(a){var e=a.uniforms;return e.lightColor.alpha<1||e.darkColor.alpha<0}});i.Cesium.Material.FresnelType="Fresnel";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.FresnelType,{fabric:{type:i.Cesium.Material.FresnelType,materials:{reflection:{type:i.Cesium.Material.ReflectionType},refraction:{type:i.Cesium.Material.RefractionType}},source:__},translucent:!1});i.Cesium.Material.GrassType="Grass";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.GrassType,{fabric:{type:i.Cesium.Material.GrassType,uniforms:{grassColor:new i.Cesium.Color(.25,.4,.1,1),dirtColor:new i.Cesium.Color(.1,.1,.1,1),patchiness:1.5},source:f_},translucent:function(a){var e=a.uniforms;return e.grassColor.alpha<1||e.dirtColor.alpha<1}});i.Cesium.Material.ReflectionType="Reflection";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.ReflectionType,{fabric:{type:i.Cesium.Material.ReflectionType,uniforms:{cubeMap:i.Cesium.Material.DefaultCubeMapId,channels:"rgb"},source:g_},translucent:!1});i.Cesium.Material.RefractionType="Refraction";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.RefractionType,{fabric:{type:i.Cesium.Material.RefractionType,uniforms:{cubeMap:i.Cesium.Material.DefaultCubeMapId,channels:"rgb",indexOfRefractionRatio:.9},source:y_},translucent:!1});i.Cesium.Material.TyeDyeType="TieDye";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.TyeDyeType,{fabric:{type:i.Cesium.Material.TyeDyeType,uniforms:{lightColor:new i.Cesium.Color(1,1,0,.75),darkColor:new i.Cesium.Color(1,0,0,.75),frequency:5},source:v_},translucent:function(a){var e=a.uniforms;return e.lightColor.alpha<1||e.darkColor.alpha<0}});i.Cesium.Material.WoodType="Wood";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.WoodType,{fabric:{type:i.Cesium.Material.WoodType,uniforms:{lightWoodColor:new i.Cesium.Color(.6,.3,.1,1),darkWoodColor:new i.Cesium.Color(.4,.2,.07,1),ringFrequency:3,noiseScale:new i.Cesium.Cartesian2(.7,.5),grainFrequency:27},source:w_},translucent:function(a){let e=a.uniforms;return e.lightWoodColor.alpha<1||e.darkWoodColor.alpha<1}});var C_=`uniform vec4 color;
16692
16690
  uniform float speed;
16693
16691
  czm_material czm_getMaterial(czm_materialInput materialInput){
16694
16692
  czm_material material = czm_getDefaultMaterial(materialInput);
@@ -16705,7 +16703,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
16705
16703
  material.diffuse = color.rgb * a * 3.0;
16706
16704
  return material;
16707
16705
  }
16708
- `;var nc=`uniform vec4 color;
16706
+ `;var T_=`uniform vec4 color;
16709
16707
  uniform float speed;
16710
16708
 
16711
16709
  vec3 circlePing(float r, float innerTail, float frontierBorder, float timeResetSeconds, float radarPingSpeed, float fadeDistance){
@@ -16729,7 +16727,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
16729
16727
  material.diffuse = flagColor.rgb;
16730
16728
  return material;
16731
16729
  }
16732
- `;var lc=`uniform vec4 color;
16730
+ `;var x_=`uniform vec4 color;
16733
16731
  uniform float speed;
16734
16732
 
16735
16733
  czm_material czm_getMaterial(czm_materialInput materialInput){
@@ -16745,7 +16743,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
16745
16743
  }
16746
16744
  return material;
16747
16745
  }
16748
- `;var hc=`uniform vec4 color;
16746
+ `;var E_=`uniform vec4 color;
16749
16747
  uniform float speed;
16750
16748
  czm_material czm_getMaterial(czm_materialInput materialInput){
16751
16749
  czm_material material = czm_getDefaultMaterial(materialInput);
@@ -16761,7 +16759,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
16761
16759
  material.diffuse = color.rgb * d;
16762
16760
  return material;
16763
16761
  }
16764
- `;var cc=`uniform vec4 color;
16762
+ `;var P_=`uniform vec4 color;
16765
16763
  czm_material czm_getMaterial(czm_materialInput materialInput){
16766
16764
  czm_material material = czm_getDefaultMaterial(materialInput);
16767
16765
  vec2 st = materialInput.st;
@@ -16778,7 +16776,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
16778
16776
  material.alpha = pow(alpha, 4.0);
16779
16777
  return material;
16780
16778
  }
16781
- `;var pc=`uniform vec4 color;
16779
+ `;var b_=`uniform vec4 color;
16782
16780
  uniform sampler2D image;
16783
16781
  czm_material czm_getMaterial(czm_materialInput materialInput){
16784
16782
  czm_material material = czm_getDefaultMaterial(materialInput);
@@ -16796,7 +16794,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
16796
16794
  material.alpha = colorImage.a * pow(length, 0.5);
16797
16795
  return material;
16798
16796
  }
16799
- `;var dc=`uniform vec4 color;
16797
+ `;var S_=`uniform vec4 color;
16800
16798
  uniform float speed;
16801
16799
 
16802
16800
  float circle(vec2 uv, float r, float blur) {
@@ -16822,7 +16820,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput)
16822
16820
  material.alpha *= color.a;
16823
16821
  return material;
16824
16822
  }
16825
- `;var mc=`uniform vec4 color;
16823
+ `;var A_=`uniform vec4 color;
16826
16824
  uniform float speed;
16827
16825
 
16828
16826
  #define PI 3.14159265359
@@ -16846,7 +16844,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
16846
16844
  material.diffuse = color.rgb * a * b * 3.0;
16847
16845
  return material;
16848
16846
  }
16849
- `;var uc=`uniform vec4 color;
16847
+ `;var M_=`uniform vec4 color;
16850
16848
  uniform float speed;
16851
16849
 
16852
16850
  czm_material czm_getMaterial(czm_materialInput materialInput){
@@ -16864,7 +16862,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
16864
16862
  material.diffuse = fragColor * (inten1 + inten2);
16865
16863
  return material;
16866
16864
  }
16867
- `;var _c=`uniform vec4 color;
16865
+ `;var I_=`uniform vec4 color;
16868
16866
  uniform float speed;
16869
16867
  uniform float count;
16870
16868
  uniform float gradient;
@@ -16912,7 +16910,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput)
16912
16910
  return material;
16913
16911
  }
16914
16912
 
16915
- `;i.Cesium.Material.CircleBlurType="CircleBlur";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CircleBlurType,{fabric:{type:i.Cesium.Material.CircleBlurType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:3},source:ac},translucent:function(n){return!0}});i.Cesium.Material.CircleDiffuseType="CircleDiffuse";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CircleDiffuseType,{fabric:{type:i.Cesium.Material.CircleDiffuseType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:3},source:nc},translucent:function(n){return!0}});i.Cesium.Material.CircleFadeType="CircleFade";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CircleFadeType,{fabric:{type:i.Cesium.Material.CircleFadeType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:3},source:lc},translucent:function(n){return!0}});i.Cesium.Material.CirclePulseType="CirclePulse";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CirclePulseType,{fabric:{type:i.Cesium.Material.CirclePulseType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:12},source:hc},translucent:function(n){return!0}});i.Cesium.Material.CircleRingType="CircleRing";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CircleRingType,{fabric:{type:i.Cesium.Material.CircleRingType,uniforms:{color:new i.Cesium.Color(1,0,0,.7)},source:cc},translucent:function(n){return!0}});i.Cesium.Material.CircleRotateType="CircleRotate";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CircleRotateType,{fabric:{type:i.Cesium.Material.CircleRotateType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),image:i.Cesium.Material.DefaultImageId},source:pc},translucent:function(n){return!0}});i.Cesium.Material.CircleScanType="CircleScan";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CircleScanType,{fabric:{type:i.Cesium.Material.CircleScanType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:1},source:dc},translucent:function(n){return!0}});i.Cesium.Material.CircleSpiralType="CircleSpiral";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CircleSpiralType,{fabric:{type:i.Cesium.Material.CircleSpiralType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:3},source:mc},translucent:function(n){return!0}});i.Cesium.Material.CircleVaryType="CircleVary";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CircleVaryType,{fabric:{type:i.Cesium.Material.CircleVaryType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:3},source:uc},translucent:function(n){return!0}});i.Cesium.Material.CircleWaveType="CircleWave";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CircleWaveType,{fabric:{type:i.Cesium.Material.CircleWaveType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:3,count:1,gradient:.1},source:_c},translucent:function(n){return!0}});var fc=`uniform vec4 color;
16913
+ `;i.Cesium.Material.CircleBlurType="CircleBlur";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CircleBlurType,{fabric:{type:i.Cesium.Material.CircleBlurType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:3},source:C_},translucent:function(a){return!0}});i.Cesium.Material.CircleDiffuseType="CircleDiffuse";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CircleDiffuseType,{fabric:{type:i.Cesium.Material.CircleDiffuseType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:3},source:T_},translucent:function(a){return!0}});i.Cesium.Material.CircleFadeType="CircleFade";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CircleFadeType,{fabric:{type:i.Cesium.Material.CircleFadeType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:3},source:x_},translucent:function(a){return!0}});i.Cesium.Material.CirclePulseType="CirclePulse";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CirclePulseType,{fabric:{type:i.Cesium.Material.CirclePulseType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:12},source:E_},translucent:function(a){return!0}});i.Cesium.Material.CircleRingType="CircleRing";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CircleRingType,{fabric:{type:i.Cesium.Material.CircleRingType,uniforms:{color:new i.Cesium.Color(1,0,0,.7)},source:P_},translucent:function(a){return!0}});i.Cesium.Material.CircleRotateType="CircleRotate";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CircleRotateType,{fabric:{type:i.Cesium.Material.CircleRotateType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),image:i.Cesium.Material.DefaultImageId},source:b_},translucent:function(a){return!0}});i.Cesium.Material.CircleScanType="CircleScan";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CircleScanType,{fabric:{type:i.Cesium.Material.CircleScanType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:1},source:S_},translucent:function(a){return!0}});i.Cesium.Material.CircleSpiralType="CircleSpiral";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CircleSpiralType,{fabric:{type:i.Cesium.Material.CircleSpiralType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:3},source:A_},translucent:function(a){return!0}});i.Cesium.Material.CircleVaryType="CircleVary";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CircleVaryType,{fabric:{type:i.Cesium.Material.CircleVaryType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:3},source:M_},translucent:function(a){return!0}});i.Cesium.Material.CircleWaveType="CircleWave";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CircleWaveType,{fabric:{type:i.Cesium.Material.CircleWaveType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:3,count:1,gradient:.1},source:I_},translucent:function(a){return!0}});var D_=`uniform vec4 color;
16916
16914
  czm_material czm_getMaterial(czm_materialInput materialInput){
16917
16915
  czm_material material = czm_getDefaultMaterial(materialInput);
16918
16916
  vec2 st = materialInput.st;
@@ -16923,7 +16921,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
16923
16921
  material.alpha = temp.a;
16924
16922
  return material;
16925
16923
  }
16926
- `;var gc=`uniform vec4 color;
16924
+ `;var L_=`uniform vec4 color;
16927
16925
  uniform sampler2D image;
16928
16926
  czm_material czm_getMaterial(czm_materialInput materialInput){
16929
16927
  czm_material material = czm_getDefaultMaterial(materialInput);
@@ -16939,7 +16937,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
16939
16937
  material.alpha = alpha * pow(1. - st.t,color.a);
16940
16938
  return material;
16941
16939
  }
16942
- `;i.Cesium.Material.CylinderFadeType="CylinderFade";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CylinderFadeType,{fabric:{type:i.Cesium.Material.CylinderFadeType,uniforms:{color:new i.Cesium.Color(1,0,0,.7)},source:fc},translucent:function(n){return!0}});i.Cesium.Material.CylinderParticlesType="CylinderParticles";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CylinderParticlesType,{fabric:{type:i.Cesium.Material.CylinderParticlesType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),image:i.Cesium.Material.DefaultImageId},source:gc},translucent:function(n){return!0}});var yc=`uniform vec4 color;
16940
+ `;i.Cesium.Material.CylinderFadeType="CylinderFade";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CylinderFadeType,{fabric:{type:i.Cesium.Material.CylinderFadeType,uniforms:{color:new i.Cesium.Color(1,0,0,.7)},source:D_},translucent:function(a){return!0}});i.Cesium.Material.CylinderParticlesType="CylinderParticles";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CylinderParticlesType,{fabric:{type:i.Cesium.Material.CylinderParticlesType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),image:i.Cesium.Material.DefaultImageId},source:L_},translucent:function(a){return!0}});var R_=`uniform vec4 color;
16943
16941
  uniform float speed;
16944
16942
 
16945
16943
  #define pi 3.1415926535
@@ -17017,7 +17015,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput)
17017
17015
  material.alpha = temp.a * 2.0;
17018
17016
  return material;
17019
17017
  }
17020
- `;var vc=`uniform vec4 color;
17018
+ `;var O_=`uniform vec4 color;
17021
17019
  uniform float speed;
17022
17020
  czm_material czm_getMaterial(czm_materialInput materialInput){
17023
17021
  czm_material material = czm_getDefaultMaterial(materialInput);
@@ -17029,7 +17027,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
17029
17027
  material.diffuse = color.rgb;
17030
17028
  return material;
17031
17029
  }
17032
- `;i.Cesium.Material.EllipsoidElectricType="EllipsoidElectric";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.EllipsoidElectricType,{fabric:{type:i.Cesium.Material.EllipsoidElectricType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:1},source:yc},translucent:function(n){return!0}});i.Cesium.Material.EllipsoidTrailType="EllipsoidTrail";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.EllipsoidTrailType,{fabric:{type:i.Cesium.Material.EllipsoidTrailType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:3},source:vc},translucent:function(n){return!0}});var wc=`uniform vec4 color;
17030
+ `;i.Cesium.Material.EllipsoidElectricType="EllipsoidElectric";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.EllipsoidElectricType,{fabric:{type:i.Cesium.Material.EllipsoidElectricType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:1},source:R_},translucent:function(a){return!0}});i.Cesium.Material.EllipsoidTrailType="EllipsoidTrail";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.EllipsoidTrailType,{fabric:{type:i.Cesium.Material.EllipsoidTrailType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:3},source:O_},translucent:function(a){return!0}});var k_=`uniform vec4 color;
17033
17031
  uniform float speed;
17034
17032
  czm_material czm_getMaterial(czm_materialInput materialInput){
17035
17033
  czm_material material = czm_getDefaultMaterial(materialInput);
@@ -17040,7 +17038,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
17040
17038
  material.alpha = color.a * scalar ;
17041
17039
  return material;
17042
17040
  }
17043
- `;var Tc=`uniform vec4 color;
17041
+ `;var z_=`uniform vec4 color;
17044
17042
  uniform float speed;
17045
17043
  uniform float percent;
17046
17044
  uniform float gradient;
@@ -17056,7 +17054,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
17056
17054
  material.alpha = alpha;
17057
17055
  return material;
17058
17056
  }
17059
- `;var Cc=`uniform sampler2D image;
17057
+ `;var F_=`uniform sampler2D image;
17060
17058
  uniform float speed;
17061
17059
  uniform vec4 color;
17062
17060
  uniform vec2 repeat;
@@ -17078,7 +17076,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
17078
17076
  }
17079
17077
  return material;
17080
17078
  }
17081
- `;var xc=`uniform sampler2D image;
17079
+ `;var H_=`uniform sampler2D image;
17082
17080
  uniform vec4 color;
17083
17081
  czm_material czm_getMaterial(czm_materialInput materialInput){
17084
17082
  czm_material material = czm_getDefaultMaterial(materialInput);
@@ -17089,7 +17087,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
17089
17087
  material.diffuse = max(fragColor.rgb + colorImage.rgb , fragColor.rgb);
17090
17088
  return material;
17091
17089
  }
17092
- `;var Ec=`uniform sampler2D image;
17090
+ `;var N_=`uniform sampler2D image;
17093
17091
  uniform vec4 color;
17094
17092
  uniform float speed;
17095
17093
  czm_material czm_getMaterial(czm_materialInput materialInput){
@@ -17110,7 +17108,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
17110
17108
  }
17111
17109
  return material;
17112
17110
  }
17113
- `;var Pc=`uniform vec4 color;
17111
+ `;var W_=`uniform vec4 color;
17114
17112
  uniform float speed;
17115
17113
 
17116
17114
  czm_material czm_getMaterial(czm_materialInput materialInput){
@@ -17121,7 +17119,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
17121
17119
  material.alpha = color.a * fract(st.s-time);
17122
17120
  return material;
17123
17121
  }
17124
- `;i.Cesium.Material.PolylineFlickerType="PolylineFlicker";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.PolylineFlickerType,{fabric:{type:i.Cesium.Material.PolylineFlickerType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:1},source:wc},translucent:function(n){return!0}});i.Cesium.Material.PolylineFlowType="PolylineFlow";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.PolylineFlowType,{fabric:{type:i.Cesium.Material.PolylineFlowType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:1,percent:.03,gradient:.1},source:Tc},translucent:function(n){return!0}});i.Cesium.Material.PolylineImageTrailType="PolylineImageTrail";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.PolylineImageTrailType,{fabric:{type:i.Cesium.Material.PolylineImageTrailType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),image:i.Cesium.Material.DefaultImageId,speed:1,repeat:new i.Cesium.Cartesian2(1,1)},source:Cc},translucent:function(n){return!0}});i.Cesium.Material.PolylineLightingType="PolylineLighting";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.PolylineLightingType,{fabric:{type:i.Cesium.Material.PolylineLightingType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),image:i.Cesium.Material.DefaultImageId},source:xc},translucent:function(n){return!0}});i.Cesium.Material.PolylineLightingTrailType="PolylineLightingTrail";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.PolylineLightingTrailType,{fabric:{type:i.Cesium.Material.PolylineLightingTrailType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),image:i.Cesium.Material.DefaultImageId,speed:3},source:Ec},translucent:function(n){return!0}});i.Cesium.Material.PolylineTrailType="PolylineTrail";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.PolylineTrailType,{fabric:{type:i.Cesium.Material.PolylineTrailType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),image:i.Cesium.Material.DefaultImageId,speed:1,repeat:new i.Cesium.Cartesian2(1,1)},source:Pc},translucent:function(n){return!0}});var bc=`uniform vec4 color;
17122
+ `;i.Cesium.Material.PolylineFlickerType="PolylineFlicker";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.PolylineFlickerType,{fabric:{type:i.Cesium.Material.PolylineFlickerType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:1},source:k_},translucent:function(a){return!0}});i.Cesium.Material.PolylineFlowType="PolylineFlow";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.PolylineFlowType,{fabric:{type:i.Cesium.Material.PolylineFlowType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:1,percent:.03,gradient:.1},source:z_},translucent:function(a){return!0}});i.Cesium.Material.PolylineImageTrailType="PolylineImageTrail";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.PolylineImageTrailType,{fabric:{type:i.Cesium.Material.PolylineImageTrailType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),image:i.Cesium.Material.DefaultImageId,speed:1,repeat:new i.Cesium.Cartesian2(1,1)},source:F_},translucent:function(a){return!0}});i.Cesium.Material.PolylineLightingType="PolylineLighting";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.PolylineLightingType,{fabric:{type:i.Cesium.Material.PolylineLightingType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),image:i.Cesium.Material.DefaultImageId},source:H_},translucent:function(a){return!0}});i.Cesium.Material.PolylineLightingTrailType="PolylineLightingTrail";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.PolylineLightingTrailType,{fabric:{type:i.Cesium.Material.PolylineLightingTrailType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),image:i.Cesium.Material.DefaultImageId,speed:3},source:N_},translucent:function(a){return!0}});i.Cesium.Material.PolylineTrailType="PolylineTrail";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.PolylineTrailType,{fabric:{type:i.Cesium.Material.PolylineTrailType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),image:i.Cesium.Material.DefaultImageId,speed:1,repeat:new i.Cesium.Cartesian2(1,1)},source:W_},translucent:function(a){return!0}});var G_=`uniform vec4 color;
17125
17123
  uniform float speed;
17126
17124
 
17127
17125
  czm_material czm_getMaterial(czm_materialInput materialInput){
@@ -17145,7 +17143,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
17145
17143
  material.diffuse = col * 3.0 ;
17146
17144
  return material;
17147
17145
  }
17148
- `;var Sc=`uniform vec4 color;
17146
+ `;var U_=`uniform vec4 color;
17149
17147
  uniform float speed;
17150
17148
 
17151
17149
  #define PI 3.14159265359
@@ -17177,7 +17175,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
17177
17175
  material.diffuse = (0.5 + pow(angle, 2.0) * falloff ) * color.rgb ;
17178
17176
  return material;
17179
17177
  }
17180
- `;var Ic=`uniform vec4 color;
17178
+ `;var B_=`uniform vec4 color;
17181
17179
  uniform float speed;
17182
17180
 
17183
17181
  #define PI 3.14159265359
@@ -17204,7 +17202,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
17204
17202
  material.diffuse = flagColor * 3.0;
17205
17203
  return material;
17206
17204
  }
17207
- `;i.Cesium.Material.RadarLineType="RadarLine";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.RadarLineType,{fabric:{type:i.Cesium.Material.RadarLineType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:3},source:bc},translucent:function(n){return!0}});i.Cesium.Material.RadarSweepType="RadarSweep";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.RadarSweepType,{fabric:{type:i.Cesium.Material.RadarSweepType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:3},source:Sc},translucent:function(n){return!0}});i.Cesium.Material.RadarWaveType="RadarWave";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.RadarWaveType,{fabric:{type:i.Cesium.Material.RadarWaveType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:3},source:Ic},translucent:function(n){return!0}});var Mc=`uniform vec4 color;
17205
+ `;i.Cesium.Material.RadarLineType="RadarLine";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.RadarLineType,{fabric:{type:i.Cesium.Material.RadarLineType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:3},source:G_},translucent:function(a){return!0}});i.Cesium.Material.RadarSweepType="RadarSweep";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.RadarSweepType,{fabric:{type:i.Cesium.Material.RadarSweepType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:3},source:U_},translucent:function(a){return!0}});i.Cesium.Material.RadarWaveType="RadarWave";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.RadarWaveType,{fabric:{type:i.Cesium.Material.RadarWaveType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:3},source:B_},translucent:function(a){return!0}});var V_=`uniform vec4 color;
17208
17206
  czm_material czm_getMaterial(czm_materialInput materialInput){
17209
17207
  czm_material material = czm_getDefaultMaterial(materialInput);
17210
17208
  vec2 st = materialInput.st;
@@ -17212,7 +17210,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
17212
17210
  material.alpha = color.a * (1.0-fract(st.t)) * 0.8;
17213
17211
  return material;
17214
17212
  }
17215
- `;var Ac=`uniform sampler2D image;
17213
+ `;var j_=`uniform sampler2D image;
17216
17214
  uniform vec4 color;
17217
17215
  uniform float speed;
17218
17216
  uniform vec2 repeat;
@@ -17225,7 +17223,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
17225
17223
  material.diffuse = colorImage.rgb * color.rgb * 3.0 ;
17226
17224
  return material;
17227
17225
  }
17228
- `;var Dc=`uniform sampler2D image;
17226
+ `;var q_=`uniform sampler2D image;
17229
17227
  uniform float speed;
17230
17228
  uniform vec4 color;
17231
17229
  uniform vec2 repeat;
@@ -17241,7 +17239,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
17241
17239
  material.emission = max(color.rgb * material.alpha * 1.5, color.rgb);
17242
17240
  return material;
17243
17241
  }
17244
- `;var Lc=` uniform sampler2D image;
17242
+ `;var Y_=` uniform sampler2D image;
17245
17243
  uniform float speed;
17246
17244
  uniform vec4 color;
17247
17245
 
@@ -17259,7 +17257,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
17259
17257
  }
17260
17258
  return material;
17261
17259
  }
17262
- `;i.Cesium.Material.WallDiffuseType="WallDiffuse";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.WallDiffuseType,{fabric:{type:i.Cesium.Material.WallDiffuseType,uniforms:{color:new i.Cesium.Color(1,0,0,.7)},source:Mc},translucent:function(n){return!0}});i.Cesium.Material.WallImageTrailType="WallImageTrail";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.WallImageTrailType,{fabric:{type:i.Cesium.Material.WallImageTrailType,uniforms:{image:i.Cesium.Material.DefaultImageId,color:new i.Cesium.Color(1,0,0,.7),speed:3,repeat:new i.Cesium.Cartesian2(1,1)},source:Ac},translucent:function(n){return!0}});i.Cesium.Material.WallLineTrailType="WallLineTrail";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.WallLineTrailType,{fabric:{type:i.Cesium.Material.WallLineTrailType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),image:i.Cesium.Material.DefaultImageId,repeat:new i.Cesium.Cartesian2(1,1),speed:3},source:Dc},translucent:function(n){return!0}});i.Cesium.Material.WallTrailType="WallTrail";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.WallTrailType,{fabric:{type:i.Cesium.Material.WallTrailType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),image:i.Cesium.Material.DefaultImageId,speed:1},source:Lc},translucent:function(n){return!0}});var ia=class{constructor(e={}){this._definitionChanged=new i.Cesium.Event,this._color=void 0,this._colorSubscription=void 0,this._speed=void 0,this._speedSubscription=void 0,this.color=e.color||i.Cesium.Color.fromBytes(0,255,255,255),this.speed=e.speed||1}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(e){return null}getValue(e,t){return t=i.Cesium.defaultValue(t,{}),t}equals(e){return this===e}},D=ia;var Pt=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.CircleBlurType}getValue(e,t){return t=i.Cesium.defaultValue(t,{}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Pt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var ra=Pt;var bt=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.CircleDiffuseType}getValue(e,t){return t=i.Cesium.defaultValue(t,{}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(bt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var sa=bt;var St=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.CircleFadeType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(St.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var oa=St;var It=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.CirclePulseType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(It.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var aa=It;var Mt=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.CircleScanType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Mt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var na=Mt;var At=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.CircleSpiralType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(At.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var la=At;var Dt=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.CircleVaryType}getValue(e,t){return t=i.Cesium.defaultValue(t,{}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Dt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var ha=Dt;var Lt=class n extends D{constructor(e={}){super(e),this.count=Math.max(e.count||3,1),this.gradient=i.Cesium.Math.clamp(e.gradient||.1,0,1)}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(e){return i.Cesium.Material.CircleWaveType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t.count=i.Cesium.Property.getValueOrUndefined(this._count,e),t.gradient=i.Cesium.Property.getValueOrUndefined(this._gradient,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Lt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var ca=Lt;var Rt=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.EllipsoidElectricType}getValue(e,t){return t=i.Cesium.defaultValue(t,{}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Rt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var pa=Rt;var Ot=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.EllipsoidTrailType}getValue(e,t){return t=i.Cesium.defaultValue(t,{}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Ot.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var da=Ot;var kt=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.PolylineFlickerType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(kt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var ma=kt;var Ft=class n extends D{constructor(e={}){super(e),this._percent=void 0,this._percentSubscription=void 0,this._gradient=void 0,this._gradientSubscription=void 0,this.percent=e.percent||.03,this.gradient=e.gradient||.1}getType(e){return i.Cesium.Material.PolylineFlowType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t.percent=i.Cesium.Property.getValueOrUndefined(this._percent,e),t.gradient=i.Cesium.Property.getValueOrUndefined(this._gradient,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)&&i.Cesium.Property.equals(this._percent,e._percent)&&i.Cesium.Property.equals(this._gradient,e._gradient)}};Object.defineProperties(Ft.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed"),percent:i.Cesium.createPropertyDescriptor("percent"),gradient:i.Cesium.createPropertyDescriptor("gradient")});var ua=Ft;var zt=class n extends D{constructor(e={}){var t,r;super(e),this._image=void 0,this._imageSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.image=e.image,this.repeat=new i.Cesium.Cartesian2(((t=e.repeat)==null?void 0:t.x)||1,((r=e.repeat)==null?void 0:r.y)||1)}getType(e){return i.Cesium.Material.PolylineImageTrailType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.image=i.Cesium.Property.getValueOrUndefined(this._image,e),t.repeat=i.Cesium.Property.getValueOrUndefined(this._repeat,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._image,e._image)&&i.Cesium.Property.equals(this._repeat,e._repeat)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(zt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed"),image:i.Cesium.createPropertyDescriptor("image"),repeat:i.Cesium.createPropertyDescriptor("repeat")});var _a=zt;var Ht="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAACYCAYAAACS0lH9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAJ0GlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDIgMTE2LjE2NDY1NSwgMjAyMS8wMS8yNi0xNTo0MToyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0RXZ0PSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VFdmVudCMiIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iIHhtbG5zOmV4aWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vZXhpZi8x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2DVJPl6HAAB2TZIP1yEAgF2T5NN1CABgl0uAAFBokny9DgEA7Jok369DAAC7JsmP6xAAwC4FAAAK+S0AACikAABAoUny6zoEALDLHQAAKKQAAEAhRwAAUGiS/L4OAQDsUgAAoJAjAAAopAAAQKFJ8v91CABgly8BAkChSfK4DgEA7PIWAAAUsgAAQCFvAQBAIQsAABRSAACgkEuAAFDo+ToAALDPlwABoJACAACFFAAAKOQtAAAoZAEAgEIWAAAopAAAQCEFAAAKuQMAAIUsAABQyKeAAaCQBQAACrkDAACFHAEAQCELAAAUsgAAQCELAAAUsgAAQCELAAAUsgAAQCEFAAAKOQIAgEIWAAAo5LcAAKCQAgAAhRwBAEAhCwAAFLIAAEAhCwAAFLIAAEAhBQAACvkSIAAUsgAAQCEFAAAKKQAAUMhrgABQyAIAAIUUAAAo5AgAAApZAACgkAIAAIUUAAAo5A4AABT6A6gaPQ6/wRIfAAAAAElFTkSuQmCC";var Nt=class n extends D{constructor(e={}){super(e),this._image=void 0,this._imageSubscription=void 0,this.image=Ht}getType(e){return i.Cesium.Material.PolylineLightingType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.image=i.Cesium.Property.getValueOrUndefined(this._image,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._image,e._image)}};Object.defineProperties(Nt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),image:i.Cesium.createPropertyDescriptor("image")});var fa=Nt;var Wt=class n extends D{constructor(e={}){super(e),this._image=void 0,this._imageSubscription=void 0,this.image=Ht}getType(e){return i.Cesium.Material.PolylineLightingTrailType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.image=i.Cesium.Property.getValueOrUndefined(this._image,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Wt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed"),image:i.Cesium.createPropertyDescriptor("image")});var ga=Wt;var Gt=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.PolylineTrailType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=this._speed,t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Gt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var ya=Gt;var Ut=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.RadarLineType}getValue(e,t){return t=i.Cesium.defaultValue(t,{}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Ut.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var va=Ut;var Bt=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.RadarSweepType}getValue(e,t){return t=i.Cesium.defaultValue(t,{}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Bt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var wa=Bt;var Vt=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.RadarWaveType}getValue(e,t){return t=i.Cesium.defaultValue(t,{}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Vt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var Ta=Vt;var jt=class n extends D{constructor(e={}){var t,r;super(e),this._image=void 0,this._imageSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.image=e.image,this.repeat=new i.Cesium.Cartesian2(((t=e.repeat)==null?void 0:t.x)||1,((r=e.repeat)==null?void 0:r.y)||1)}getType(e){return i.Cesium.Material.WallImageTrailType}getValue(e,t){return t=i.Cesium.defaultValue(t,{}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.image=i.Cesium.Property.getValueOrUndefined(this._image,e),t.repeat=i.Cesium.Property.getValueOrUndefined(this._repeat,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._image,e._image)&&i.Cesium.Property.equals(this._repeat,e._repeat)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(jt.prototype,{image:i.Cesium.createPropertyDescriptor("image"),color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed"),repeat:i.Cesium.createPropertyDescriptor("repeat")});var Ca=jt;var Rc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAVwAAABACAYAAABWdc94AAAACXBIWXMAAAsTAAALEwEAmpwYAAAGx2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDIgMTE2LjE2NDY1NSwg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A8P3hwYWNrZXQgZW5kPSJyIj8+eAiLkwAAAQZJREFUeJzt3LERwDAMxDAl5/1XdqYIXRiYQBULFf/svQeA/72nDwC4heACRAQXICK4ABHBBYgILkBEcAEiggsQEVyAiOACRAQXICK4ABHBBYgILkBkzYx9RoDAmpnn9BEAN/BSAIgILkBEcAEiggsQEVyAiOACRAQXICK4ABHBBYgILkBEcAEiggsQEVyAiOACRAQXIGKAHCBigBwg4qUAEBFcgIjgAkQEFyAiuAARwQWICC5ARHABIoILEBFcgIjgAkQEFyAiuAARwQWI2MMFiNjDBYh4KQBEBBcgIrgAEcEFiAguQERwASKCCxARXICI4AJEBBcgIrgAEcEFiAguQERwASIfRmAGiWTgoMYAAAAASUVORK5CYII=";var Yt=class n extends D{constructor(e={}){var t,r;super(e),this._image=void 0,this._imageSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.image=Rc,this.repeat=new i.Cesium.Cartesian2(((t=e.repeat)==null?void 0:t.x)||1,((r=e.repeat)==null?void 0:r.y)||1)}getType(e){return i.Cesium.Material.WallLineTrailType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.image=i.Cesium.Property.getValueOrUndefined(this._image,e),t.repeat=i.Cesium.Property.getValueOrUndefined(this._repeat,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)&&i.Cesium.Property.equals(this._repeat,e._repeat)}};Object.defineProperties(Yt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),image:i.Cesium.createPropertyDescriptor("image"),repeat:i.Cesium.createPropertyDescriptor("repeat"),speed:i.Cesium.createPropertyDescriptor("speed")});var xa=Yt;var Oc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAOhlWElmTU0AKgAAAAgABgESAAMAAAABAAEAAAEaAAU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ualIvlptDJAAAAAElFTkSuQmCC";var Zt=class n extends D{constructor(e={}){super(e),this._image=void 0,this._imageSubscription=void 0,this.image=Oc}getType(e){return i.Cesium.Material.WallTrailType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.image=i.Cesium.Property.getValueOrUndefined(this._image,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Zt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed"),image:i.Cesium.createPropertyDescriptor("image")});var Ea=Zt;var qt=class n{constructor(e){e=e||{},this._definitionChanged=new i.Cesium.Event,this._baseWaterColor=void 0,this._baseWaterColorSubscription=void 0,this.baseWaterColor=e.baseWaterColor||new i.Cesium.Color(.2,.3,.6,1),this._blendColor=void 0,this._blendColorSubscription=void 0,this.blendColor=e.blendColor||new i.Cesium.Color(0,1,.699,1),this._specularMap=void 0,this._specularMapSubscription=void 0,this.specularMap=e.specularMap||i.Cesium.Material.DefaultImageId,this._normalMap=void 0,this._normalMapSubscription=void 0,this.normalMap=e.normalMap||i.Cesium.Material.DefaultImageId,this.frequency=i.Cesium.defaultValue(e.frequency,1e3),this.animationSpeed=i.Cesium.defaultValue(e.animationSpeed,.01),this.amplitude=i.Cesium.defaultValue(e.amplitude,10),this.specularIntensity=i.Cesium.defaultValue(e.specularIntensity,.5)}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(e){return i.Cesium.Material.WaterType}getValue(e,t){return t||(t={}),t.baseWaterColor=i.Cesium.Property.getValueOrUndefined(this._baseWaterColor,e),t.blendColor=i.Cesium.Property.getValueOrUndefined(this._blendColor,e),t.specularMap=i.Cesium.Property.getValueOrUndefined(this._specularMap,e),t.normalMap=i.Cesium.Property.getValueOrUndefined(this._normalMap,e),t.frequency=this.frequency,t.animationSpeed=this.animationSpeed,t.amplitude=this.amplitude,t.specularIntensity=this.specularIntensity,t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._baseWaterColor,e._baseWaterColor)}};Object.defineProperties(qt.prototype,{baseWaterColor:i.Cesium.createPropertyDescriptor("baseWaterColor"),blendColor:i.Cesium.createPropertyDescriptor("blendColor"),specularMap:i.Cesium.createPropertyDescriptor("specularMap"),normalMap:i.Cesium.createPropertyDescriptor("normalMap")});var Pa=qt;var ba=class{constructor(e){this._style=e,this._viewer=void 0,this._layer=void 0,this._delegate=void 0,this._options={},this._positions=[]}get drawTool(){return this._viewer.drawTool}_mountedHook(){}_stoppedHook(){}_onDrawAnchor(e){}_onAnchorMoving(e){this._positions.pop(),this._positions.push(e)}_onDrawStop(){this._unbindEvent(),this._viewer.drawTool.deactivate(),this._delegate&&this._layer.entities.remove(this._delegate),this._stoppedHook()}_bindEvent(){this.drawTool.on(C.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.on(C.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.on(C.DRAW_STOP,this._onDrawStop,this)}_unbindEvent(){this.drawTool.off(C.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.off(C.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.off(C.DRAW_STOP,this._onDrawStop,this)}start(e,t){return this._viewer=e.viewer,this._layer=e.layer,this._options=t,this._viewer.editTool.deactivate(),this._viewer.drawTool.activate(t),this._mountedHook(),this._unbindEvent(),this._bindEvent(),this}stop(){return this.drawTool.fire(C.DRAW_STOP),this}},U=ba;var _u={pixelSize:10,outlineColor:i.Cesium.Color.BLUE,outlineWidth:5},Sa=class extends U{constructor(e){super(),this._position=i.Cesium.Cartesian3.ZERO,this._style={..._u,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Cesium.Entity({position:new i.Cesium.CallbackProperty(()=>this._position,!1),point:{...this._style}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._position&&(e=new it(u.transformCartesianToWGS84(this._position)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){this._position=e,this.drawTool.fire(C.DRAW_STOP,e)}_onAnchorMoving(e){this._position=e}},kc=Sa;var fu={width:3,material:i.Cesium.Color.YELLOW.withAlpha(.6)},Ia=class extends U{constructor(e){super(),this._style={...fu,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D,\u53F3\u51FB\u7ED3\u675F",this._delegate=new i.Cesium.Entity({polyline:{...this._style,positions:new i.Cesium.CallbackProperty(()=>this._positions,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new ve(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(C.CREATE_ANCHOR,{position:e}),t>=this._options.maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(C.DRAW_STOP))}},Fc=Ia;var gu={material:i.Cesium.Color.YELLOW.withAlpha(.6),fill:!0},Ma=class extends U{constructor(e){super(),this._style={...gu,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D,\u53F3\u51FB\u7ED3\u675F",this._delegate=new i.Cesium.Entity({polygon:{...this._style,hierarchy:new i.Cesium.CallbackProperty(()=>this._positions.length>2?new i.Cesium.PolygonHierarchy(this._positions.map(e=>e.clone())):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new ye(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){this._positions.push(e),this.drawTool.fire(C.CREATE_ANCHOR,{position:e})}},zc=Ma;var yu={material:i.Cesium.Color.YELLOW.withAlpha(.6),fill:!0},Aa=class extends U{constructor(e){super(),this._maxAnchorSize=2,this._radius=0,this._style={...yu,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Cesium.Entity({polygon:{...this._style,hierarchy:new i.Cesium.CallbackProperty(()=>{if(this._positions.length>1){if(this._radius=i.Cesium.Cartesian3.distance(this._positions[0],this._positions[1]),this._radius<=0)return null;let e=i.Cesium.EllipseGeometryLibrary.computeEllipsePositions({center:this._positions[0],semiMajorAxis:this._radius,semiMinorAxis:this._radius,rotation:0,granularity:.005},!1,!0),t=i.Cesium.Cartesian3.unpackArray(e.outerPositions);return t.push(t[0]),new i.Cesium.PolygonHierarchy(t)}else return null},!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new et(u.transformCartesianToWGS84(this._positions[0]),this._radius).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(C.CREATE_ANCHOR,{position:e,isCenter:t===1}),t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(C.DRAW_STOP))}},Hc=Aa;var vu={material:i.Cesium.Color.YELLOW.withAlpha(.6)},Da=class extends U{constructor(e){super(),this._maxAnchorSize=2,this._style={...vu,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Cesium.Entity({rectangle:{...this._style,coordinates:new i.Cesium.CallbackProperty(e=>this._positions.length>1?i.Cesium.Rectangle.fromCartesianArray(this._positions):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new rt(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(C.CREATE_ANCHOR,{position:e}),t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(C.DRAW_STOP))}},Nc=Da;var La=class extends U{constructor(e){super(),this._position=i.Cesium.Cartesian3.ZERO,this._style={image:Ne,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Cesium.Entity({position:new i.Cesium.CallbackProperty(()=>this._position,!1),billboard:{...this._style}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._position&&(e=new ge(u.transformCartesianToWGS84(this._position),this._style.image).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){this._position=e,this.drawTool.fire(C.DRAW_STOP)}_onAnchorMoving(e){this._position=e}},Wc=La;var Xt=Math.PI/2,Ra=class{constructor(e){this._positions=(e==null?void 0:e.positions)||[],this.headHeightFactor=.18,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this.headTailFactor=.8}set positions(e){this._positions=e}get positions(){return this._positions}get hierarchy(){return this._createHierarchy()}_getArrowHeadPoints(e,t,r){let s=w.getBaseLength(e),o=s*this.headHeightFactor,a=e[e.length-1];s=w.distance(a,e[e.length-2]);let l=w.distance(t,r);o>l*this.headTailFactor&&(o=l*this.headTailFactor);let h=o*this.headWidthFactor,c=o*this.neckWidthFactor;o=o>s?s:o;let p=o*this.neckHeightFactor,f=w.getThirdPoint(e[e.length-2],a,0,o,!0),T=w.getThirdPoint(e[e.length-2],a,0,p,!0),y=w.getThirdPoint(a,f,Xt,h,!1),m=w.getThirdPoint(a,f,Xt,h,!0),E=w.getThirdPoint(a,T,Xt,c,!1),x=w.getThirdPoint(a,T,Xt,c,!0);return[E,y,a,m,x]}_getArrowBodyPoints(e,t,r,s){let o=w.wholeDistance(e),l=w.getBaseLength(e)*s,h=w.distance(t,r),c=(l-h)/2,p=0,f=[],T=[];for(let y=1;y<e.length-1;y++){let m=w.getAngleOfThreePoints(e[y-1],e[y],e[y+1])/2;p+=w.distance(e[y-1],e[y]);let E=(l/2-p/o*c)/Math.sin(m),x=w.getThirdPoint(e[y-1],e[y],Math.PI-m,E,!0),b=w.getThirdPoint(e[y-1],e[y],m,E,!1);f.push(x),T.push(b)}return f.concat(T)}_createHierarchy(){let e=_.parsePolygonCoordToArray(u.transformCartesianArrayToWGS84Array(this._positions))[0],t=e[0],r=e[1];w.isClockWise(e[0],e[1],e[2])&&(t=e[1],r=e[0]);let o=[w.mid(t,r)].concat(e.slice(2)),a=this._getArrowHeadPoints(o,t,r),l=a[0],h=a[4],c=w.distance(t,r)/w.getBaseLength(o),p=this._getArrowBodyPoints(o,l,h,c),f=p.length,T=[t].concat(p.slice(0,f/2));T.push(l);let y=[r].concat(p.slice(f/2,f));return y.push(h),T=w.getQBSplinePoints(T),y=w.getQBSplinePoints(y),new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(_.parsePositions(T.concat(a,y.reverse()))))}},We=Ra;var wu={material:i.Cesium.Color.YELLOW.withAlpha(.6),fill:!0},Oa=class extends U{constructor(e){super(),this._maxAnchorSize=3,this._style={...wu,...e},this._graphics=new We}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Cesium.Entity({polygon:{...this._style,hierarchy:new i.Cesium.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new Le(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(C.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(C.DRAW_STOP))}},Gc=Oa;var J=Math.PI/2,ka=class{constructor(e){this._positions=(e==null?void 0:e.positions)||[],this.headHeightFactor=.25,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15}set positions(e){this._positions=e}get positions(){return this._positions}get hierarchy(){return this._createHierarchy()}_getArrowPoints(e,t,r,s){let o=w.mid(e,t),a=w.distance(o,r),l=w.getThirdPoint(r,o,0,a*.3,!0),h=w.getThirdPoint(r,o,0,a*.5,!0);l=w.getThirdPoint(o,l,J,a/5,s),h=w.getThirdPoint(o,h,J,a/4,s);let c=[o,l,h,r],p=this._getArrowHeadPoints(c),f=p[0],T=p[4],y=w.distance(e,t)/w.getBaseLength(c)/2,m=this._getArrowBodyPoints(c,f,T,y),E=m.length,x=m.slice(0,E/2),b=m.slice(E/2,E);return x.push(f),b.push(T),x=x.reverse(),x.push(t),b=b.reverse(),b.push(e),x.reverse().concat(p,b)}_getArrowHeadPoints(e){let r=w.getBaseLength(e)*this.headHeightFactor,s=e[e.length-1],o=r*this.headWidthFactor,a=r*this.neckWidthFactor,l=r*this.neckHeightFactor,h=w.getThirdPoint(e[e.length-2],s,0,r,!0),c=w.getThirdPoint(e[e.length-2],s,0,l,!0),p=w.getThirdPoint(s,h,J,o,!1),f=w.getThirdPoint(s,h,J,o,!0),T=w.getThirdPoint(s,c,J,a,!1),y=w.getThirdPoint(s,c,J,a,!0);return[T,p,s,f,y]}_getArrowBodyPoints(e,t,r,s){let o=w.wholeDistance(e),l=w.getBaseLength(e)*s,h=w.distance(t,r),c=(l-h)/2,p=0,f=[],T=[];for(let y=1;y<e.length-1;y++){let m=w.getAngleOfThreePoints(e[y-1],e[y],e[y+1])/2;p+=w.distance(e[y-1],e[y]);let E=(l/2-p/o*c)/Math.sin(m),x=w.getThirdPoint(e[y-1],e[y],Math.PI-m,E,!0),b=w.getThirdPoint(e[y-1],e[y],m,E,!1);f.push(x),T.push(b)}return f.concat(T)}_getTempPoint4(e,t,r){let s=w.mid(e,t),o=w.distance(s,r),a=w.getAngleOfThreePoints(e,s,r),l,h,c,p;return a<J?(h=o*Math.sin(a),c=o*Math.cos(a),p=w.getThirdPoint(e,s,J,h,!1),l=w.getThirdPoint(s,p,J,c,!0)):a>=J&&a<Math.PI?(h=o*Math.sin(Math.PI-a),c=o*Math.cos(Math.PI-a),p=w.getThirdPoint(e,s,J,h,!1),l=w.getThirdPoint(s,p,J,c,!1)):a>=Math.PI&&a<Math.PI*1.5?(h=o*Math.sin(a-Math.PI),c=o*Math.cos(a-Math.PI),p=w.getThirdPoint(e,s,J,h,!0),l=w.getThirdPoint(s,p,J,c,!0)):(h=o*Math.sin(Math.PI*2-a),c=o*Math.cos(Math.PI*2-a),p=w.getThirdPoint(e,s,J,h,!0),l=w.getThirdPoint(s,p,J,c,!1)),l}_createHierarchy(){let e=this._positions.length,t,r,s=_.parsePolygonCoordToArray(u.transformCartesianArrayToWGS84Array(this._positions))[0],o=s[0],a=s[1],l=s[2];e===3?t=this._getTempPoint4(o,a,l):t=s[3],e===3||e===4?r=w.mid(o,a):r=s[4];let h,c;w.isClockWise(o,a,l)?(h=this._getArrowPoints(o,r,t,!1),c=this._getArrowPoints(r,a,l,!0)):(h=this._getArrowPoints(a,r,l,!1),c=this._getArrowPoints(r,o,t,!0));let p=h.length,f=(p-5)/2,T=h.slice(0,f),y=h.slice(f,f+5),m=h.slice(f+5,p),E=c.slice(0,f),x=c.slice(f,f+5),b=c.slice(f+5,p);E=w.getBezierPoints(E);let I=w.getBezierPoints(b.concat(T.slice(1)));return m=w.getBezierPoints(m),new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(_.parsePositions(E.concat(x,I,y,m))))}},Jt=ka;var Tu={material:i.Cesium.Color.YELLOW.withAlpha(.6),fill:!0},Fa=class extends U{constructor(e){super(),this._maxAnchorSize=4,this._style={...Tu,...e},this._graphics=new Jt}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Cesium.Entity({polygon:{...this._style,hierarchy:new i.Cesium.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new qe(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(C.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(C.DRAW_STOP))}},Uc=Fa;var Bc=Math.PI/2,za=class{constructor(e){this._positions=(e==null?void 0:e.positions)||[],this.tailWidthFactor=.15,this.neckWidthFactor=.2,this.headWidthFactor=.25,this.headAngle=Math.PI/8.5,this.neckAngle=Math.PI/13}set positions(e){this._positions=e}get positions(){return this._positions}get hierarchy(){return this._createHierarchy()}_createHierarchy(){let e=_.parsePolygonCoordToArray(u.transformCartesianArrayToWGS84Array(this._positions))[0],t=e[0],r=e[1],s=w.getBaseLength(e),o=s*this.tailWidthFactor,a=s*this.neckWidthFactor,l=s*this.headWidthFactor,h=w.getThirdPoint(r,t,Bc,o,!0),c=w.getThirdPoint(r,t,Bc,o,!1),p=w.getThirdPoint(t,r,this.headAngle,l,!1),f=w.getThirdPoint(t,r,this.headAngle,l,!0),T=w.getThirdPoint(t,r,this.neckAngle,a,!1),y=w.getThirdPoint(t,r,this.neckAngle,a,!0);return new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(_.parsePositions([h,T,p,r,f,y,c])))}},Kt=za;var Cu={material:i.Cesium.Color.YELLOW.withAlpha(.6),fill:!0},Ha=class extends U{constructor(e){super(),this._maxAnchorSize=2,this._style={...Cu,...e},this._graphics=new Kt}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Cesium.Entity({polygon:{...this._style,hierarchy:new i.Cesium.CallbackProperty(()=>this._positions.length>1?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new Xe(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(C.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(C.DRAW_STOP))}},Vc=Ha;var xu=Math.PI/2,jc=100,Na=class{constructor(e){this._positions=(e==null?void 0:e.positions)||[],this.t=.4}set positions(e){this._positions=e}get positions(){return this._positions}get hierarchy(){return this._createHierarchy()}_createHierarchy(){let e=_.parsePolygonCoordToArray(u.transformCartesianArrayToWGS84Array(this._positions))[0];if(this._positions.length===2){let a=w.mid(e[0],e[1]),l=w.distance(e[0],a)/.9,h=w.getThirdPoint(e[0],a,xu,l,!0);e=[e[0],h,e[1]]}let t=w.mid(e[0],e[2]);e.push(t,e[0],e[1]);let r=[];for(let a=0;a<e.length-2;a++){let l=e[a],h=e[a+1],c=e[a+2],p=w.getBisectorNormals(this.t,l,h,c);r=r.concat(p)}let s=r.length;r=[r[s-1]].concat(r.slice(0,s-1));let o=[];for(let a=0;a<e.length-2;a++){let l=e[a],h=e[a+1];o.push(l);for(let c=0;c<=jc;c++){let p=w.getCubicValue(c/jc,l,r[a*2],r[a*2+1],h);o.push(p)}o.push(h)}return new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(_.parsePositions(o)))}},Qt=Na;var Eu={material:i.Cesium.Color.YELLOW.withAlpha(.6),fill:!0},Wa=class extends U{constructor(e){super(),this._maxAnchorSize=3,this._style={...Eu,...e},this._graphics=new Qt}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Cesium.Entity({polygon:{...this._style,hierarchy:new i.Cesium.CallbackProperty(()=>this._positions.length>1?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new Je(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(C.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(C.DRAW_STOP))}},Yc=Wa;var Ga=class extends We{constructor(e){super(e),this.headHeightFactor=.18,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this.tailWidthFactor=.1,this.headTailFactor=.8,this.swallowTailFactor=1}_createHierarchy(){let e=_.parsePolygonCoordToArray(u.transformCartesianArrayToWGS84Array(this._positions))[0],t=e[0],r=e[1];w.isClockWise(e[0],e[1],e[2])&&(t=e[1],r=e[0]);let o=[w.mid(t,r)].concat(e.slice(2)),a=this._getArrowHeadPoints(o,t,r),l=a[0],h=a[4],c=w.distance(t,r),p=w.getBaseLength(o),f=p*this.tailWidthFactor*this.swallowTailFactor,T=w.getThirdPoint(o[1],o[0],0,f,!0),y=c/p,m=this._getArrowBodyPoints(o,l,h,y),E=m.length,x=[t].concat(m.slice(0,E/2));x.push(l);let b=[r].concat(m.slice(E/2,E));return b.push(h),x=w.getQBSplinePoints(x),b=w.getQBSplinePoints(b),new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(_.parsePositions(x.concat(a,b.reverse(),[T,x[0]]))))}},$t=Ga;var Pu={material:i.Cesium.Color.YELLOW.withAlpha(.6),fill:!0},Ua=class extends U{constructor(e){super(),this._maxAnchorSize=3,this._style={...Pu,...e},this._graphics=new $t}_mountEntity(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Cesium.Entity({polygon:{...this._style,hierarchy:new i.Cesium.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new Ke(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(C.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(C.DRAW_STOP))}},Zc=Ua;var Ba=class{constructor(e){this._viewer=void 0,this._layer=void 0,this._overlay=e,this._overlay.show=!1,this._delegate=new i.Cesium.Entity,this._delegate.merge(e.delegate),this._options={},this._positions=[]}get editTool(){return this._viewer.editTool}_mountedHook(){}_stoppedHook(){this._overlay.positions=u.transformCartesianArrayToWGS84Array(this._positions),this._overlay.show=!0,this._options.onEditStop&&this._options.onEditStop(this._overlay)}_mountAnchor(){this._positions=[].concat(u.transformWGS84ArrayToCartesianArray(this._overlay.positions)),this._positions.forEach((e,t)=>{this.editTool.fire(C.CREATE_ANCHOR,{position:e,index:t})})}_onEditAnchorStop({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.Cesium.JulianDate.now());this._positions[r.index]=t}_onAnchorMoving({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.Cesium.JulianDate.now());this._positions[r.index]=t}_onEditStop({pickedAnchor:e,position:t}){this._unbindEvent(),this._viewer.editTool.deactivate(),this._layer.entities.remove(this._delegate),this._stoppedHook()}_bindEvent(){return this.editTool.on(C.ANCHOR_MOVING,this._onAnchorMoving,this),this.editTool.on(C.EDIT_ANCHOR_STOP,this._onEditAnchorStop,this),this.editTool.on(C.EDIT_STOP,this._onEditStop,this),this}_unbindEvent(){this.editTool.off(C.ANCHOR_MOVING,this._onAnchorMoving,this),this.editTool.off(C.EDIT_ANCHOR_STOP,this._onEditAnchorStop,this),this.editTool.off(C.EDIT_STOP,this._onEditStop,this)}start(e,t){return this._viewer=e.viewer,this._layer=e.layer,this._options=t,this._viewer.editTool.deactivate(),this._viewer.editTool.tooltipMess="\u70B9\u51FB\u951A\u70B9\u79FB\u52A8,\u53F3\u51FB\u7ED3\u675F\u7F16\u8F91",this._viewer.editTool.activate(t),this._mountedHook(),this._mountAnchor(),this._unbindEvent(),this._bindEvent(),this}stop(){return this.editTool.fire(C.EDIT_STOP,{pickedAnchor:null,position:null}),this}},B=Ba;var Va=class extends B{constructor(e){super(e),this._position=void 0}_mountedHook(){this.editTool.tooltipMess="\u53F3\u51FB\u7ED3\u675F\u7F16\u8F91",this._position=this._delegate.position.getValue(i.Cesium.JulianDate.now()),this._delegate.position=new i.Cesium.CallbackProperty(()=>this._position,!1),this._layer.entities.add(this._delegate)}_stoppedHook(){this._overlay.position=u.transformCartesianToWGS84(this._position),this._overlay.show=!0,this._options.onEditStop&&this._options.onEditStop(this._overlay)}_onAnchorMoving({pickedAnchor:e,position:t}){this._position=t}},qc=Va;var ja=class extends B{constructor(e){super(e)}_mountedHook(){this._delegate.polyline.positions=new i.Cesium.CallbackProperty(()=>this._positions.length>1?this._positions:null,!1),this._layer.entities.add(this._delegate)}_stoppedHook(){this._overlay.positions=u.transformCartesianArrayToWGS84Array(this._positions.filter((e,t)=>t%2===0)),this._overlay.show=!0,this._options.onEditStop&&this._options.onEditStop(this._overlay)}_mountAnchor(){this._positions=[];let e=this._overlay.delegate.polyline.positions.getValue(i.Cesium.JulianDate.now());for(let t=0;t<e.length-1;t++){let r=k(e[t],e[t+1]);this._positions.push(e[t]),this._positions.push(r)}this._positions.push(e[e.length-1]),this._positions.forEach((t,r)=>{this.editTool.fire(C.CREATE_ANCHOR,{position:t,index:r,isMid:r%2!==0})})}_onEditAnchorStop({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.Cesium.JulianDate.now()),s=r.index;if(r.isMid){let o=k(this._positions[s],this._positions[s-1]),a=k(this._positions[s],this._positions[s+1]);this._positions.splice(s,1,o,t,a),this.editTool.fire(C.CLEAR_ANCHOR),this._positions.forEach((l,h)=>{this.editTool.fire(C.CREATE_ANCHOR,{position:l,index:h,isMid:h%2!==0})})}}_onAnchorMoving({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.Cesium.JulianDate.now()),s=r.index;if(this._positions[s]=t,!r.isMid&&this._options.maxAnchorSize>2){let o=-1,a=-1,l=-1,h=-1,c=this._positions.length;if(s===0?(l=s+2,h=s+1):r.index===c-1?(o=s-2,a=s-1):(o=s-2,a=s-1,l=s+2,h=s+1),o>0){let p=k(this._positions[o],this._positions[s]);this._positions[a]=p,this.editTool.fire(C.UPDATE_ANCHOR,{index:a,position:p})}if(l>0){let p=k(this._positions[l],this._positions[s]);this._positions[h]=p,this.editTool.fire(C.UPDATE_ANCHOR,{index:h,position:p})}}}},Xc=ja;var Ya=class extends B{constructor(e){super(e)}_mountedHook(){this._delegate.polygon.hierarchy=new i.Cesium.CallbackProperty(e=>this._positions.length>2?new i.Cesium.PolygonHierarchy(this._positions.map(t=>t.clone())):null,!1),this._layer.entities.add(this._delegate)}_stoppedHook(){this._overlay.positions=u.transformCartesianArrayToWGS84Array(this._positions.filter((e,t)=>t%2===0)),this._overlay.show=!0,this._options.onEditStop&&this._options.onEditStop(this._overlay)}_mountAnchor(){this._positions=[];let e=this._overlay.delegate.polygon.hierarchy.getValue(i.Cesium.JulianDate.now()).positions;e.push(e[0]);for(let t=0;t<e.length-1;t++){let r=k(e[t],e[t+1]);this._positions.push(e[t]),this._positions.push(r)}this._positions.forEach((t,r)=>{this.editTool.fire(C.CREATE_ANCHOR,{position:t,index:r,isMid:r%2!==0})})}_onEditAnchorStop({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.Cesium.JulianDate.now()),s=r.index;if(r.isMid){let o,a,l=this._positions.length;s===l-1?(o=k(this._positions[s],this._positions[s-1]),a=k(this._positions[s],this._positions[0])):(o=k(this._positions[s],this._positions[s-1]),a=k(this._positions[s],this._positions[s+1])),this._positions.splice(s,1,o,t,a),this.editTool.fire(C.CLEAR_ANCHOR),this._positions.forEach((h,c)=>{this.editTool.fire(C.CREATE_ANCHOR,{position:h,index:c,isMid:c%2!==0})})}}_onAnchorMoving({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.Cesium.JulianDate.now()),s=r.index;this._positions[s]=t;let o=this._positions.length;if(!r.isMid){let a=-1,l=-1,h=-1,c=-1;s===0?(a=o-2,l=o-1,h=s+2,c=s+1):s===o-2?(a=s-2,l=s-1,h=0,c=o-1):(a=s-2,l=s-1,h=s+2,c=s+1);let p=k(this._positions[a],this._positions[s]),f=k(this._positions[h],this._positions[s]);this._positions[l]=p,this._positions[c]=f,this.editTool.fire(C.UPDATE_ANCHOR,{index:l,position:p}),this.editTool.fire(C.UPDATE_ANCHOR,{index:c,position:f})}}},Jc=Ya;var Za=class extends B{constructor(e){super(e),this._center=void 0,this._radius=0}_mountedHook(){this._radius=this._overlay.radius,this._center=u.transformWGS84ToCartesian(this._overlay.center),this._positions=[].concat([this._center,this._computeCirclePoints(this._center,this._radius)[0]]),this._delegate.polygon.hierarchy=new i.Cesium.CallbackProperty(e=>{if(this._positions.length>1){if(this._radius=i.Cesium.Cartesian3.distance(this._positions[0],this._positions[1]),this._radius<=0)return null;let t=this._computeCirclePoints(this._positions[0],this._radius);return t.push(t[0]),new i.Cesium.PolygonHierarchy(t)}else return null},!1),this._layer.entities.add(this._delegate)}_computeCirclePoints(e,t){let r=[],s=i.Cesium.EllipseGeometryLibrary.computeEllipsePositions({center:e,semiMajorAxis:t,semiMinorAxis:t,rotation:0,granularity:.005},!1,!0);return s&&s.outerPositions&&(r=i.Cesium.Cartesian3.unpackArray(s.outerPositions)),r}_stoppedHook(){this._overlay.center=u.transformCartesianToWGS84(this._positions[0]),this._overlay.radius=this._radius,this._overlay.show=!0,this._options.onEditStop&&this._options.onEditStop(this._overlay)}_mountAnchor(){this._positions.forEach((e,t)=>{this.editTool.fire(C.CREATE_ANCHOR,{position:e,index:t,isCenter:t%2===0})})}},Kc=Za;var qa=class extends B{constructor(e){super(e),this._overlay=e}_mountedHook(){this._delegate.rectangle.coordinates=new i.Cesium.CallbackProperty(e=>this._positions.length>1?i.Cesium.Rectangle.fromCartesianArray(this._positions):null,!1),this._layer.entities.add(this._delegate)}},Qc=qa;var Xa=class extends B{constructor(e){super(e),this._position=void 0}_mountedHook(){this.editTool.tooltipMess="\u53F3\u51FB\u7ED3\u675F\u7F16\u8F91",this._position=this._delegate.position.getValue(i.Cesium.JulianDate.now()),this._delegate.position=new i.Cesium.CallbackProperty(()=>this._position,!1),this._layer.entities.add(this._delegate)}_stoppedHook(){this._overlay.position=u.transformCartesianToWGS84(this._position),this._overlay.show=!0,this._options.onEditStop&&this._options.onEditStop(this._overlay)}_onAnchorMoving({pickedAnchor:e,position:t}){this._position=t}},$c=Xa;var Ja=class extends B{constructor(e){super(e),this._graphics=new We}_mountedHook(){this._delegate.polygon.hierarchy=new i.Cesium.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},ep=Ja;var Ka=class extends B{constructor(e){super(e),this._graphics=new Jt}_mountedHook(){this._delegate.polygon.hierarchy=new i.Cesium.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},tp=Ka;var Qa=class extends B{constructor(e){super(e),this._graphics=new Kt}_mountedHook(){this._delegate.polygon.hierarchy=new i.Cesium.CallbackProperty(()=>this._positions.length>1?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},ip=Qa;var $a=class extends B{constructor(e){super(e),this._graphics=new Qt}_mountedHook(){this._delegate.polygon.hierarchy=new i.Cesium.CallbackProperty(()=>this._positions.length>1?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},rp=$a;var en=class extends B{constructor(e){super(e),this._graphics=new $t}_mountedHook(){this._delegate.polygon.hierarchy=new i.Cesium.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},sp=en;var tn=class{constructor(e,t={}){this._viewer=e,this._options=t,this._layer=new i.Cesium.CustomDataSource("plot-layer"),this._viewer.dataSources.add(this._layer),this._currentWorker=void 0,this._state=void 0}get viewer(){return this._viewer}get layer(){return this._layer}get state(){return this._state}_createDrawWorker(e,t){let r;switch(e){case F.POINT:r=new kc(t);break;case F.POLYLINE:r=new Fc(t);break;case F.POLYGON:r=new zc(t);break;case F.CIRCLE:r=new Hc(t);break;case F.RECT:r=new Nc(t);break;case F.BILLBOARD:r=new Wc(t);break;case F.ATTACK_ARROW:r=new Gc(t);break;case F.DOUBLE_ARROW:r=new Uc(t);break;case F.FINE_ARROW:r=new Vc(t);break;case F.TAILED_ATTACK_ARROW:r=new Zc(t);break;case F.GATHERING_PLACE:r=new Yc(t);break;default:break}return r}_createEditWorker(e){let t;switch(e.type){case F.POINT:t=new qc(e);break;case F.POLYLINE:t=new Xc(e);break;case F.POLYGON:t=new Jc(e);break;case F.CIRCLE:t=new Kc(e);break;case F.RECT:t=new Qc(e);break;case F.BILLBOARD:t=new $c(e);break;case F.ATTACK_ARROW:t=new ep(e);break;case F.DOUBLE_ARROW:t=new tp(e);break;case F.FINE_ARROW:t=new ip(e);break;case F.TAILED_ATTACK_ARROW:t=new sp(e);break;case F.GATHERING_PLACE:t=new rp(e);break;default:break}return t}draw(e,t,r={},s=!1){var a;this._state="draw",this._currentWorker&&this._currentWorker.stop();let o=(r==null?void 0:r.maxAnchorSize)||999;return r&&delete r.maxAnchorSize,this._currentWorker=(a=this._createDrawWorker(e,r))==null?void 0:a.start(this,{...this._options,maxAnchorSize:o,onDrawStop:t,clampToModel:s!=null?s:this._options.clampToModel}),this}edit(e,t,r=!1){var s;return this._state="edit",this._currentWorker&&this._currentWorker.stop(),this._currentWorker=(s=this._createEditWorker(e))==null?void 0:s.start(this,{...this._options,onEditStop:t,clampToModel:r!=null?r:this._options.clampToModel}),this}stop(){this._currentWorker&&this._currentWorker.stop(),this._currentWorker=null}destroy(){return this._viewer.dataSources.remove(this._layer),this._viewer=void 0,this}},op=tn;var rn=class{constructor(e){this._viewer=e,this._options={}}_bindEvent(){}_unbindEvent(){}start(){if(this._viewer.clock.shouldAnimate=!0,this._unbindEvent(),this._options.duration){let e=setTimeout(()=>{this._unbindEvent(),this._options.callback&&this._options.callback.call(this._options.context||this),clearTimeout(e)},Number(this._options.duration)*1e3)}return this._bindEvent(),this}stop(){return this._unbindEvent(),this}},te=rn;var bu={},V=bu;var sn=class extends te{constructor(e,t={}){super(e),this._options=t,this._heading=e.camera.heading,this._aroundAmount=.2}get type(){return V.AROUND_VIEW}set aroundAmount(e){this._aroundAmount=e}_bindEvent(){this._viewer.clock.onTick.addEventListener(this._onAround,this)}_unbindEvent(){this._viewer.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),this._viewer.clock.onTick.removeEventListener(this._onAround,this)}_onAround(e,t){this._heading+=i.Cesium.Math.toRadians(this._aroundAmount),(this._heading>=Math.PI*2||this._heading<=-Math.PI*2)&&(this._heading=0),this._viewer.camera.setView({orientation:{heading:this._heading,pitch:this._options.pitch?i.Cesium.Math.toRadians(this._options.pitch):this._viewer.camera.pitch,roll:this._options.roll?i.Cesium.Math.toRadians(this._options.roll):this._viewer.camera.roll}})}};V.AROUND_VIEW="around_view";var on=sn;var an=class extends te{constructor(e,t,r={}){super(e),this._position=_.parsePosition(t),this._options=r,this._heading=e.camera.heading,this._aroundAmount=.2}get type(){return V.AROUND_POINT}set position(e){this._position=_.parsePosition(e)}set aroundAmount(e){this._aroundAmount=e}_bindEvent(){this._viewer.clock.onTick.addEventListener(this._onAround,this)}_unbindEvent(){this._viewer.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),this._viewer.clock.onTick.removeEventListener(this._onAround,this)}_onAround(e,t){this._heading+=i.Cesium.Math.toRadians(this._aroundAmount),(this._heading>=Math.PI*2||this._heading<=-Math.PI*2)&&(this._heading=0),this._viewer.camera.lookAt(u.transformWGS84ToCartesian(this._position),new i.Cesium.HeadingPitchRange(this._heading,i.Cesium.Math.toRadians(this._options.pitch||0),this._options.range||1e3))}};V.AROUND_POINT="around_point";var nn=an;var ap=`in vec2 v_textureCoordinates;
17260
+ `;i.Cesium.Material.WallDiffuseType="WallDiffuse";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.WallDiffuseType,{fabric:{type:i.Cesium.Material.WallDiffuseType,uniforms:{color:new i.Cesium.Color(1,0,0,.7)},source:V_},translucent:function(a){return!0}});i.Cesium.Material.WallImageTrailType="WallImageTrail";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.WallImageTrailType,{fabric:{type:i.Cesium.Material.WallImageTrailType,uniforms:{image:i.Cesium.Material.DefaultImageId,color:new i.Cesium.Color(1,0,0,.7),speed:3,repeat:new i.Cesium.Cartesian2(1,1)},source:j_},translucent:function(a){return!0}});i.Cesium.Material.WallLineTrailType="WallLineTrail";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.WallLineTrailType,{fabric:{type:i.Cesium.Material.WallLineTrailType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),image:i.Cesium.Material.DefaultImageId,repeat:new i.Cesium.Cartesian2(1,1),speed:3},source:q_},translucent:function(a){return!0}});i.Cesium.Material.WallTrailType="WallTrail";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.WallTrailType,{fabric:{type:i.Cesium.Material.WallTrailType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),image:i.Cesium.Material.DefaultImageId,speed:1},source:Y_},translucent:function(a){return!0}});var _n=class{constructor(e={}){this._definitionChanged=new i.Cesium.Event,this._color=void 0,this._colorSubscription=void 0,this._speed=void 0,this._speedSubscription=void 0,this.color=e.color||i.Cesium.Color.fromBytes(0,255,255,255),this.speed=e.speed||1}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(e){return null}getValue(e,t){return t=i.Cesium.defaultValue(t,{}),t}equals(e){return this===e}},L=_n;var ci=class a extends L{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.CircleBlurType}getValue(e,t){return t=i.Cesium.defaultValue(t,{}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof a&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(ci.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var fn=ci;var pi=class a extends L{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.CircleDiffuseType}getValue(e,t){return t=i.Cesium.defaultValue(t,{}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof a&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(pi.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var gn=pi;var di=class a extends L{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.CircleFadeType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof a&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(di.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var yn=di;var mi=class a extends L{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.CirclePulseType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof a&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(mi.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var vn=mi;var ui=class a extends L{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.CircleScanType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof a&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(ui.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var wn=ui;var _i=class a extends L{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.CircleSpiralType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof a&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(_i.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var Cn=_i;var fi=class a extends L{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.CircleVaryType}getValue(e,t){return t=i.Cesium.defaultValue(t,{}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof a&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(fi.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var Tn=fi;var gi=class a extends L{constructor(e={}){super(e),this.count=Math.max(e.count||3,1),this.gradient=i.Cesium.Math.clamp(e.gradient||.1,0,1)}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(e){return i.Cesium.Material.CircleWaveType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t.count=i.Cesium.Property.getValueOrUndefined(this._count,e),t.gradient=i.Cesium.Property.getValueOrUndefined(this._gradient,e),t}equals(e){return this===e||e instanceof a&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(gi.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var xn=gi;var yi=class a extends L{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.EllipsoidElectricType}getValue(e,t){return t=i.Cesium.defaultValue(t,{}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof a&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(yi.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var En=yi;var vi=class a extends L{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.EllipsoidTrailType}getValue(e,t){return t=i.Cesium.defaultValue(t,{}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof a&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(vi.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var Pn=vi;var wi=class a extends L{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.PolylineFlickerType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof a&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(wi.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var bn=wi;var Ci=class a extends L{constructor(e={}){super(e),this._percent=void 0,this._percentSubscription=void 0,this._gradient=void 0,this._gradientSubscription=void 0,this.percent=e.percent||.03,this.gradient=e.gradient||.1}getType(e){return i.Cesium.Material.PolylineFlowType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t.percent=i.Cesium.Property.getValueOrUndefined(this._percent,e),t.gradient=i.Cesium.Property.getValueOrUndefined(this._gradient,e),t}equals(e){return this===e||e instanceof a&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)&&i.Cesium.Property.equals(this._percent,e._percent)&&i.Cesium.Property.equals(this._gradient,e._gradient)}};Object.defineProperties(Ci.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed"),percent:i.Cesium.createPropertyDescriptor("percent"),gradient:i.Cesium.createPropertyDescriptor("gradient")});var Sn=Ci;var Ti=class a extends L{constructor(e={}){var t,r;super(e),this._image=void 0,this._imageSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.image=e.image,this.repeat=new i.Cesium.Cartesian2(((t=e.repeat)==null?void 0:t.x)||1,((r=e.repeat)==null?void 0:r.y)||1)}getType(e){return i.Cesium.Material.PolylineImageTrailType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.image=i.Cesium.Property.getValueOrUndefined(this._image,e),t.repeat=i.Cesium.Property.getValueOrUndefined(this._repeat,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof a&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._image,e._image)&&i.Cesium.Property.equals(this._repeat,e._repeat)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Ti.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed"),image:i.Cesium.createPropertyDescriptor("image"),repeat:i.Cesium.createPropertyDescriptor("repeat")});var An=Ti;var xi="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAACYCAYAAACS0lH9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAJ0GlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDIgMTE2LjE2NDY1NSwgMjAyMS8wMS8yNi0xNTo0MToyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0RXZ0PSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VFdmVudCMiIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iIHhtbG5zOmV4aWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vZXhpZi8xLjAvIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFw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DAAC7JsmP6xAAwC4FAAAK+S0AACikAABAoUny6zoEALDLHQAAKKQAAEAhRwAAUGiS/L4OAQDsUgAAoJAjAAAopAAAQKFJ8v91CABgly8BAkChSfK4DgEA7PIWAAAUsgAAQCFvAQBAIQsAABRSAACgkEuAAFDo+ToAALDPlwABoJACAACFFAAAKOQtAAAoZAEAgEIWAAAopAAAQCEFAAAKuQMAAIUsAABQyKeAAaCQBQAACrkDAACFHAEAQCELAAAUsgAAQCELAAAUsgAAQCELAAAUsgAAQCEFAAAKOQIAgEIWAAAo5LcAAKCQAgAAhRwBAEAhCwAAFLIAAEAhCwAAFLIAAEAhBQAACvkSIAAUsgAAQCEFAAAKKQAAUMhrgABQyAIAAIUUAAAo5AgAAApZAACgkAIAAIUUAAAo5A4AABT6A6gaPQ6/wRIfAAAAAElFTkSuQmCC";var Ei=class a extends L{constructor(e={}){super(e),this._image=void 0,this._imageSubscription=void 0,this.image=xi}getType(e){return i.Cesium.Material.PolylineLightingType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.image=i.Cesium.Property.getValueOrUndefined(this._image,e),t}equals(e){return this===e||e instanceof a&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._image,e._image)}};Object.defineProperties(Ei.prototype,{color:i.Cesium.createPropertyDescriptor("color"),image:i.Cesium.createPropertyDescriptor("image")});var Mn=Ei;var Pi=class a extends L{constructor(e={}){super(e),this._image=void 0,this._imageSubscription=void 0,this.image=xi}getType(e){return i.Cesium.Material.PolylineLightingTrailType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.image=i.Cesium.Property.getValueOrUndefined(this._image,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof a&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Pi.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed"),image:i.Cesium.createPropertyDescriptor("image")});var In=Pi;var bi=class a extends L{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.PolylineTrailType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=this._speed,t}equals(e){return this===e||e instanceof a&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(bi.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var Dn=bi;var Si=class a extends L{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.RadarLineType}getValue(e,t){return t=i.Cesium.defaultValue(t,{}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof a&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Si.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var Ln=Si;var Ai=class a extends L{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.RadarSweepType}getValue(e,t){return t=i.Cesium.defaultValue(t,{}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof a&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Ai.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var Rn=Ai;var Mi=class a extends L{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.RadarWaveType}getValue(e,t){return t=i.Cesium.defaultValue(t,{}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof a&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Mi.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var On=Mi;var Ii=class a extends L{constructor(e={}){var t,r;super(e),this._image=void 0,this._imageSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.image=e.image,this.repeat=new i.Cesium.Cartesian2(((t=e.repeat)==null?void 0:t.x)||1,((r=e.repeat)==null?void 0:r.y)||1)}getType(e){return i.Cesium.Material.WallImageTrailType}getValue(e,t){return t=i.Cesium.defaultValue(t,{}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.image=i.Cesium.Property.getValueOrUndefined(this._image,e),t.repeat=i.Cesium.Property.getValueOrUndefined(this._repeat,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof a&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._image,e._image)&&i.Cesium.Property.equals(this._repeat,e._repeat)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Ii.prototype,{image:i.Cesium.createPropertyDescriptor("image"),color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed"),repeat:i.Cesium.createPropertyDescriptor("repeat")});var kn=Ii;var Z_="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAVwAAABACAYAAABWdc94AAAACXBIWXMAAAsTAAALEwEAmpwYAAAGx2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDIgMTE2LjE2NDY1NSwgMjAyMS8wMS8yNi0xNTo0MToyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbn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Al5/1XdqYIXRiYQBULFf/svQeA/72nDwC4heACRAQXICK4ABHBBYgILkBEcAEiggsQEVyAiOACRAQXICK4ABHBBYgILkBkzYx9RoDAmpnn9BEAN/BSAIgILkBEcAEiggsQEVyAiOACRAQXICK4ABHBBYgILkBEcAEiggsQEVyAiOACRAQXIGKAHCBigBwg4qUAEBFcgIjgAkQEFyAiuAARwQWICC5ARHABIoILEBFcgIjgAkQEFyAiuAARwQWI2MMFiNjDBYh4KQBEBBcgIrgAEcEFiAguQERwASKCCxARXICI4AJEBBcgIrgAEcEFiAguQERwASIfRmAGiWTgoMYAAAAASUVORK5CYII=";var Di=class a extends L{constructor(e={}){var t,r;super(e),this._image=void 0,this._imageSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.image=Z_,this.repeat=new i.Cesium.Cartesian2(((t=e.repeat)==null?void 0:t.x)||1,((r=e.repeat)==null?void 0:r.y)||1)}getType(e){return i.Cesium.Material.WallLineTrailType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.image=i.Cesium.Property.getValueOrUndefined(this._image,e),t.repeat=i.Cesium.Property.getValueOrUndefined(this._repeat,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof a&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)&&i.Cesium.Property.equals(this._repeat,e._repeat)}};Object.defineProperties(Di.prototype,{color:i.Cesium.createPropertyDescriptor("color"),image:i.Cesium.createPropertyDescriptor("image"),repeat:i.Cesium.createPropertyDescriptor("repeat"),speed:i.Cesium.createPropertyDescriptor("speed")});var zn=Di;var X_="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAOhlWElmTU0AKgAAAAgABgESAAMAAAABAAEAAAEaAAUAAAABAAAAVgEbAAUAAAABAAAAXgExAAIAAAAkAAAAZgEyAAIAAAAUAAAAiodpA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ubscription=void 0,this.image=X_}getType(e){return i.Cesium.Material.WallTrailType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.image=i.Cesium.Property.getValueOrUndefined(this._image,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof a&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Li.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed"),image:i.Cesium.createPropertyDescriptor("image")});var Fn=Li;var Ri=class a{constructor(e){e=e||{},this._definitionChanged=new i.Cesium.Event,this._baseWaterColor=void 0,this._baseWaterColorSubscription=void 0,this.baseWaterColor=e.baseWaterColor||new i.Cesium.Color(.2,.3,.6,1),this._blendColor=void 0,this._blendColorSubscription=void 0,this.blendColor=e.blendColor||new i.Cesium.Color(0,1,.699,1),this._specularMap=void 0,this._specularMapSubscription=void 0,this.specularMap=e.specularMap||i.Cesium.Material.DefaultImageId,this._normalMap=void 0,this._normalMapSubscription=void 0,this.normalMap=e.normalMap||i.Cesium.Material.DefaultImageId,this.frequency=i.Cesium.defaultValue(e.frequency,1e3),this.animationSpeed=i.Cesium.defaultValue(e.animationSpeed,.01),this.amplitude=i.Cesium.defaultValue(e.amplitude,10),this.specularIntensity=i.Cesium.defaultValue(e.specularIntensity,.5)}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(e){return i.Cesium.Material.WaterType}getValue(e,t){return t||(t={}),t.baseWaterColor=i.Cesium.Property.getValueOrUndefined(this._baseWaterColor,e),t.blendColor=i.Cesium.Property.getValueOrUndefined(this._blendColor,e),t.specularMap=i.Cesium.Property.getValueOrUndefined(this._specularMap,e),t.normalMap=i.Cesium.Property.getValueOrUndefined(this._normalMap,e),t.frequency=this.frequency,t.animationSpeed=this.animationSpeed,t.amplitude=this.amplitude,t.specularIntensity=this.specularIntensity,t}equals(e){return this===e||e instanceof a&&i.Cesium.Property.equals(this._baseWaterColor,e._baseWaterColor)}};Object.defineProperties(Ri.prototype,{baseWaterColor:i.Cesium.createPropertyDescriptor("baseWaterColor"),blendColor:i.Cesium.createPropertyDescriptor("blendColor"),specularMap:i.Cesium.createPropertyDescriptor("specularMap"),normalMap:i.Cesium.createPropertyDescriptor("normalMap")});var Hn=Ri;var Nn=class{constructor(e){this._style=e,this._viewer=void 0,this._layer=void 0,this._delegate=void 0,this._options={},this._positions=[]}get drawTool(){return this._viewer.drawTool}_mountedHook(){}_stoppedHook(){}_onDrawAnchor(e){}_onAnchorMoving(e){this._positions.pop(),this._positions.push(e)}_onDrawStop(){this._unbindEvent(),this._viewer.drawTool.deactivate(),this._delegate&&this._layer.entities.remove(this._delegate),this._stoppedHook()}_bindEvent(){this.drawTool.on(x.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.on(x.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.on(x.DRAW_STOP,this._onDrawStop,this)}_unbindEvent(){this.drawTool.off(x.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.off(x.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.off(x.DRAW_STOP,this._onDrawStop,this)}start(e,t){return this._viewer=e.viewer,this._layer=e.layer,this._options=t,this._viewer.editTool.deactivate(),this._viewer.drawTool.activate(t),this._mountedHook(),this._unbindEvent(),this._bindEvent(),this}stop(){return this.drawTool.fire(x.DRAW_STOP),this}},j=Nn;var iP={pixelSize:10,outlineColor:i.Cesium.Color.BLUE,outlineWidth:5},Wn=class extends j{constructor(e){super(),this._position=i.Cesium.Cartesian3.ZERO,this._style={...iP,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Cesium.Entity({position:new i.Cesium.CallbackProperty(()=>this._position,!1),point:{...this._style}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._position&&(e=new It(u.transformCartesianToWGS84(this._position)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){this._position=e,this.drawTool.fire(x.DRAW_STOP,e)}_onAnchorMoving(e){this._position=e}},J_=Wn;var rP={width:3,material:i.Cesium.Color.YELLOW.withAlpha(.6)},Gn=class extends j{constructor(e){super(),this._style={...rP,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D,\u53F3\u51FB\u7ED3\u675F",this._delegate=new i.Cesium.Entity({polyline:{...this._style,positions:new i.Cesium.CallbackProperty(()=>this._positions,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new xe(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(x.CREATE_ANCHOR,{position:e}),t>=this._options.maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(x.DRAW_STOP))}},K_=Gn;var sP={material:i.Cesium.Color.YELLOW.withAlpha(.6),fill:!0},Un=class extends j{constructor(e){super(),this._style={...sP,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D,\u53F3\u51FB\u7ED3\u675F",this._delegate=new i.Cesium.Entity({polygon:{...this._style,hierarchy:new i.Cesium.CallbackProperty(()=>this._positions.length>2?new i.Cesium.PolygonHierarchy(this._positions.map(e=>e.clone())):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new Te(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){this._positions.push(e),this.drawTool.fire(x.CREATE_ANCHOR,{position:e})}},Q_=Un;var oP={material:i.Cesium.Color.YELLOW.withAlpha(.6),fill:!0},Bn=class extends j{constructor(e){super(),this._maxAnchorSize=2,this._radius=0,this._style={...oP,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Cesium.Entity({polygon:{...this._style,hierarchy:new i.Cesium.CallbackProperty(()=>{if(this._positions.length>1){if(this._radius=i.Cesium.Cartesian3.distance(this._positions[0],this._positions[1]),this._radius<=0)return null;let e=i.Cesium.EllipseGeometryLibrary.computeEllipsePositions({center:this._positions[0],semiMajorAxis:this._radius,semiMinorAxis:this._radius,rotation:0,granularity:.005},!1,!0),t=i.Cesium.Cartesian3.unpackArray(e.outerPositions);return t.push(t[0]),new i.Cesium.PolygonHierarchy(t)}else return null},!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new At(u.transformCartesianToWGS84(this._positions[0]),this._radius).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(x.CREATE_ANCHOR,{position:e,isCenter:t===1}),t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(x.DRAW_STOP))}},$_=Bn;var aP={material:i.Cesium.Color.YELLOW.withAlpha(.6)},Vn=class extends j{constructor(e){super(),this._maxAnchorSize=2,this._style={...aP,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Cesium.Entity({rectangle:{...this._style,coordinates:new i.Cesium.CallbackProperty(e=>this._positions.length>1?i.Cesium.Rectangle.fromCartesianArray(this._positions):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new Dt(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(x.CREATE_ANCHOR,{position:e}),t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(x.DRAW_STOP))}},ef=Vn;var jn=class extends j{constructor(e){super(),this._position=i.Cesium.Cartesian3.ZERO,this._style={image:tt,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Cesium.Entity({position:new i.Cesium.CallbackProperty(()=>this._position,!1),billboard:{...this._style}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._position&&(e=new Ce(u.transformCartesianToWGS84(this._position),this._style.image).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){this._position=e,this.drawTool.fire(x.DRAW_STOP)}_onAnchorMoving(e){this._position=e}},tf=jn;var Oi=Math.PI/2,qn=class{constructor(e){this._positions=(e==null?void 0:e.positions)||[],this.headHeightFactor=.18,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this.headTailFactor=.8}set positions(e){this._positions=e}get positions(){return this._positions}get hierarchy(){return this._createHierarchy()}_getArrowHeadPoints(e,t,r){let s=C.getBaseLength(e),o=s*this.headHeightFactor,n=e[e.length-1];s=C.distance(n,e[e.length-2]);let l=C.distance(t,r);o>l*this.headTailFactor&&(o=l*this.headTailFactor);let h=o*this.headWidthFactor,c=o*this.neckWidthFactor;o=o>s?s:o;let p=o*this.neckHeightFactor,_=C.getThirdPoint(e[e.length-2],n,0,o,!0),w=C.getThirdPoint(e[e.length-2],n,0,p,!0),y=C.getThirdPoint(n,_,Oi,h,!1),d=C.getThirdPoint(n,_,Oi,h,!0),E=C.getThirdPoint(n,w,Oi,c,!1),T=C.getThirdPoint(n,w,Oi,c,!0);return[E,y,n,d,T]}_getArrowBodyPoints(e,t,r,s){let o=C.wholeDistance(e),l=C.getBaseLength(e)*s,h=C.distance(t,r),c=(l-h)/2,p=0,_=[],w=[];for(let y=1;y<e.length-1;y++){let d=C.getAngleOfThreePoints(e[y-1],e[y],e[y+1])/2;p+=C.distance(e[y-1],e[y]);let E=(l/2-p/o*c)/Math.sin(d),T=C.getThirdPoint(e[y-1],e[y],Math.PI-d,E,!0),b=C.getThirdPoint(e[y-1],e[y],d,E,!1);_.push(T),w.push(b)}return _.concat(w)}_createHierarchy(){let e=f.parsePolygonCoordToArray(u.transformCartesianArrayToWGS84Array(this._positions))[0],t=e[0],r=e[1];C.isClockWise(e[0],e[1],e[2])&&(t=e[1],r=e[0]);let o=[C.mid(t,r)].concat(e.slice(2)),n=this._getArrowHeadPoints(o,t,r),l=n[0],h=n[4],c=C.distance(t,r)/C.getBaseLength(o),p=this._getArrowBodyPoints(o,l,h,c),_=p.length,w=[t].concat(p.slice(0,_/2));w.push(l);let y=[r].concat(p.slice(_/2,_));return y.push(h),w=C.getQBSplinePoints(w),y=C.getQBSplinePoints(y),new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(f.parsePositions(w.concat(n,y.reverse()))))}},it=qn;var nP={material:i.Cesium.Color.YELLOW.withAlpha(.6),fill:!0},Yn=class extends j{constructor(e){super(),this._maxAnchorSize=3,this._style={...nP,...e},this._graphics=new it}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Cesium.Entity({polygon:{...this._style,hierarchy:new i.Cesium.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new Fe(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(x.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(x.DRAW_STOP))}},rf=Yn;var $=Math.PI/2,Zn=class{constructor(e){this._positions=(e==null?void 0:e.positions)||[],this.headHeightFactor=.25,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15}set positions(e){this._positions=e}get positions(){return this._positions}get hierarchy(){return this._createHierarchy()}_getArrowPoints(e,t,r,s){let o=C.mid(e,t),n=C.distance(o,r),l=C.getThirdPoint(r,o,0,n*.3,!0),h=C.getThirdPoint(r,o,0,n*.5,!0);l=C.getThirdPoint(o,l,$,n/5,s),h=C.getThirdPoint(o,h,$,n/4,s);let c=[o,l,h,r],p=this._getArrowHeadPoints(c),_=p[0],w=p[4],y=C.distance(e,t)/C.getBaseLength(c)/2,d=this._getArrowBodyPoints(c,_,w,y),E=d.length,T=d.slice(0,E/2),b=d.slice(E/2,E);return T.push(_),b.push(w),T=T.reverse(),T.push(t),b=b.reverse(),b.push(e),T.reverse().concat(p,b)}_getArrowHeadPoints(e){let r=C.getBaseLength(e)*this.headHeightFactor,s=e[e.length-1],o=r*this.headWidthFactor,n=r*this.neckWidthFactor,l=r*this.neckHeightFactor,h=C.getThirdPoint(e[e.length-2],s,0,r,!0),c=C.getThirdPoint(e[e.length-2],s,0,l,!0),p=C.getThirdPoint(s,h,$,o,!1),_=C.getThirdPoint(s,h,$,o,!0),w=C.getThirdPoint(s,c,$,n,!1),y=C.getThirdPoint(s,c,$,n,!0);return[w,p,s,_,y]}_getArrowBodyPoints(e,t,r,s){let o=C.wholeDistance(e),l=C.getBaseLength(e)*s,h=C.distance(t,r),c=(l-h)/2,p=0,_=[],w=[];for(let y=1;y<e.length-1;y++){let d=C.getAngleOfThreePoints(e[y-1],e[y],e[y+1])/2;p+=C.distance(e[y-1],e[y]);let E=(l/2-p/o*c)/Math.sin(d),T=C.getThirdPoint(e[y-1],e[y],Math.PI-d,E,!0),b=C.getThirdPoint(e[y-1],e[y],d,E,!1);_.push(T),w.push(b)}return _.concat(w)}_getTempPoint4(e,t,r){let s=C.mid(e,t),o=C.distance(s,r),n=C.getAngleOfThreePoints(e,s,r),l,h,c,p;return n<$?(h=o*Math.sin(n),c=o*Math.cos(n),p=C.getThirdPoint(e,s,$,h,!1),l=C.getThirdPoint(s,p,$,c,!0)):n>=$&&n<Math.PI?(h=o*Math.sin(Math.PI-n),c=o*Math.cos(Math.PI-n),p=C.getThirdPoint(e,s,$,h,!1),l=C.getThirdPoint(s,p,$,c,!1)):n>=Math.PI&&n<Math.PI*1.5?(h=o*Math.sin(n-Math.PI),c=o*Math.cos(n-Math.PI),p=C.getThirdPoint(e,s,$,h,!0),l=C.getThirdPoint(s,p,$,c,!0)):(h=o*Math.sin(Math.PI*2-n),c=o*Math.cos(Math.PI*2-n),p=C.getThirdPoint(e,s,$,h,!0),l=C.getThirdPoint(s,p,$,c,!1)),l}_createHierarchy(){let e=this._positions.length,t,r,s=f.parsePolygonCoordToArray(u.transformCartesianArrayToWGS84Array(this._positions))[0],o=s[0],n=s[1],l=s[2];e===3?t=this._getTempPoint4(o,n,l):t=s[3],e===3||e===4?r=C.mid(o,n):r=s[4];let h,c;C.isClockWise(o,n,l)?(h=this._getArrowPoints(o,r,t,!1),c=this._getArrowPoints(r,n,l,!0)):(h=this._getArrowPoints(n,r,l,!1),c=this._getArrowPoints(r,o,t,!0));let p=h.length,_=(p-5)/2,w=h.slice(0,_),y=h.slice(_,_+5),d=h.slice(_+5,p),E=c.slice(0,_),T=c.slice(_,_+5),b=c.slice(_+5,p);E=C.getBezierPoints(E);let M=C.getBezierPoints(b.concat(w.slice(1)));return d=C.getBezierPoints(d),new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(f.parsePositions(E.concat(T,M,y,d))))}},ki=Zn;var lP={material:i.Cesium.Color.YELLOW.withAlpha(.6),fill:!0},Xn=class extends j{constructor(e){super(),this._maxAnchorSize=4,this._style={...lP,...e},this._graphics=new ki}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Cesium.Entity({polygon:{...this._style,hierarchy:new i.Cesium.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new pt(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(x.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(x.DRAW_STOP))}},sf=Xn;var of=Math.PI/2,Jn=class{constructor(e){this._positions=(e==null?void 0:e.positions)||[],this.tailWidthFactor=.15,this.neckWidthFactor=.2,this.headWidthFactor=.25,this.headAngle=Math.PI/8.5,this.neckAngle=Math.PI/13}set positions(e){this._positions=e}get positions(){return this._positions}get hierarchy(){return this._createHierarchy()}_createHierarchy(){let e=f.parsePolygonCoordToArray(u.transformCartesianArrayToWGS84Array(this._positions))[0],t=e[0],r=e[1],s=C.getBaseLength(e),o=s*this.tailWidthFactor,n=s*this.neckWidthFactor,l=s*this.headWidthFactor,h=C.getThirdPoint(r,t,of,o,!0),c=C.getThirdPoint(r,t,of,o,!1),p=C.getThirdPoint(t,r,this.headAngle,l,!1),_=C.getThirdPoint(t,r,this.headAngle,l,!0),w=C.getThirdPoint(t,r,this.neckAngle,n,!1),y=C.getThirdPoint(t,r,this.neckAngle,n,!0);return new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(f.parsePositions([h,w,p,r,_,y,c])))}},zi=Jn;var hP={material:i.Cesium.Color.YELLOW.withAlpha(.6),fill:!0},Kn=class extends j{constructor(e){super(),this._maxAnchorSize=2,this._style={...hP,...e},this._graphics=new zi}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Cesium.Entity({polygon:{...this._style,hierarchy:new i.Cesium.CallbackProperty(()=>this._positions.length>1?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new dt(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(x.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(x.DRAW_STOP))}},af=Kn;var cP=Math.PI/2,nf=100,Qn=class{constructor(e){this._positions=(e==null?void 0:e.positions)||[],this.t=.4}set positions(e){this._positions=e}get positions(){return this._positions}get hierarchy(){return this._createHierarchy()}_createHierarchy(){let e=f.parsePolygonCoordToArray(u.transformCartesianArrayToWGS84Array(this._positions))[0];if(this._positions.length===2){let n=C.mid(e[0],e[1]),l=C.distance(e[0],n)/.9,h=C.getThirdPoint(e[0],n,cP,l,!0);e=[e[0],h,e[1]]}let t=C.mid(e[0],e[2]);e.push(t,e[0],e[1]);let r=[];for(let n=0;n<e.length-2;n++){let l=e[n],h=e[n+1],c=e[n+2],p=C.getBisectorNormals(this.t,l,h,c);r=r.concat(p)}let s=r.length;r=[r[s-1]].concat(r.slice(0,s-1));let o=[];for(let n=0;n<e.length-2;n++){let l=e[n],h=e[n+1];o.push(l);for(let c=0;c<=nf;c++){let p=C.getCubicValue(c/nf,l,r[n*2],r[n*2+1],h);o.push(p)}o.push(h)}return new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(f.parsePositions(o)))}},Fi=Qn;var pP={material:i.Cesium.Color.YELLOW.withAlpha(.6),fill:!0},$n=class extends j{constructor(e){super(),this._maxAnchorSize=3,this._style={...pP,...e},this._graphics=new Fi}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Cesium.Entity({polygon:{...this._style,hierarchy:new i.Cesium.CallbackProperty(()=>this._positions.length>1?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new mt(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(x.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(x.DRAW_STOP))}},lf=$n;var el=class extends it{constructor(e){super(e),this.headHeightFactor=.18,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this.tailWidthFactor=.1,this.headTailFactor=.8,this.swallowTailFactor=1}_createHierarchy(){let e=f.parsePolygonCoordToArray(u.transformCartesianArrayToWGS84Array(this._positions))[0],t=e[0],r=e[1];C.isClockWise(e[0],e[1],e[2])&&(t=e[1],r=e[0]);let o=[C.mid(t,r)].concat(e.slice(2)),n=this._getArrowHeadPoints(o,t,r),l=n[0],h=n[4],c=C.distance(t,r),p=C.getBaseLength(o),_=p*this.tailWidthFactor*this.swallowTailFactor,w=C.getThirdPoint(o[1],o[0],0,_,!0),y=c/p,d=this._getArrowBodyPoints(o,l,h,y),E=d.length,T=[t].concat(d.slice(0,E/2));T.push(l);let b=[r].concat(d.slice(E/2,E));return b.push(h),T=C.getQBSplinePoints(T),b=C.getQBSplinePoints(b),new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(f.parsePositions(T.concat(n,b.reverse(),[w,T[0]]))))}},Hi=el;var dP={material:i.Cesium.Color.YELLOW.withAlpha(.6),fill:!0},tl=class extends j{constructor(e){super(),this._maxAnchorSize=3,this._style={...dP,...e},this._graphics=new Hi}_mountEntity(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Cesium.Entity({polygon:{...this._style,hierarchy:new i.Cesium.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new ut(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(x.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(x.DRAW_STOP))}},hf=tl;var il=class{constructor(e){this._viewer=void 0,this._layer=void 0,this._overlay=e,this._overlay.show=!1,this._delegate=new i.Cesium.Entity,this._delegate.merge(e.delegate),this._options={},this._positions=[]}get editTool(){return this._viewer.editTool}_mountedHook(){}_stoppedHook(){this._overlay.positions=u.transformCartesianArrayToWGS84Array(this._positions),this._overlay.show=!0,this._options.onEditStop&&this._options.onEditStop(this._overlay)}_mountAnchor(){this._positions=[].concat(u.transformWGS84ArrayToCartesianArray(this._overlay.positions)),this._positions.forEach((e,t)=>{this.editTool.fire(x.CREATE_ANCHOR,{position:e,index:t})})}_onEditAnchorStop({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.Cesium.JulianDate.now());this._positions[r.index]=t}_onAnchorMoving({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.Cesium.JulianDate.now());this._positions[r.index]=t}_onEditStop({pickedAnchor:e,position:t}){this._unbindEvent(),this._viewer.editTool.deactivate(),this._layer.entities.remove(this._delegate),this._stoppedHook()}_bindEvent(){return this.editTool.on(x.ANCHOR_MOVING,this._onAnchorMoving,this),this.editTool.on(x.EDIT_ANCHOR_STOP,this._onEditAnchorStop,this),this.editTool.on(x.EDIT_STOP,this._onEditStop,this),this}_unbindEvent(){this.editTool.off(x.ANCHOR_MOVING,this._onAnchorMoving,this),this.editTool.off(x.EDIT_ANCHOR_STOP,this._onEditAnchorStop,this),this.editTool.off(x.EDIT_STOP,this._onEditStop,this)}start(e,t){return this._viewer=e.viewer,this._layer=e.layer,this._options=t,this._viewer.editTool.deactivate(),this._viewer.editTool.tooltipMess="\u70B9\u51FB\u951A\u70B9\u79FB\u52A8,\u53F3\u51FB\u7ED3\u675F\u7F16\u8F91",this._viewer.editTool.activate(t),this._mountedHook(),this._mountAnchor(),this._unbindEvent(),this._bindEvent(),this}stop(){return this.editTool.fire(x.EDIT_STOP,{pickedAnchor:null,position:null}),this}},q=il;var rl=class extends q{constructor(e){super(e),this._position=void 0}_mountedHook(){this.editTool.tooltipMess="\u53F3\u51FB\u7ED3\u675F\u7F16\u8F91",this._position=this._delegate.position.getValue(i.Cesium.JulianDate.now()),this._delegate.position=new i.Cesium.CallbackProperty(()=>this._position,!1),this._layer.entities.add(this._delegate)}_stoppedHook(){this._overlay.position=u.transformCartesianToWGS84(this._position),this._overlay.show=!0,this._options.onEditStop&&this._options.onEditStop(this._overlay)}_onAnchorMoving({pickedAnchor:e,position:t}){this._position=t}},cf=rl;var sl=class extends q{constructor(e){super(e)}_mountedHook(){this._delegate.polyline.positions=new i.Cesium.CallbackProperty(()=>this._positions.length>1?this._positions:null,!1),this._layer.entities.add(this._delegate)}_stoppedHook(){this._overlay.positions=u.transformCartesianArrayToWGS84Array(this._positions.filter((e,t)=>t%2===0)),this._overlay.show=!0,this._options.onEditStop&&this._options.onEditStop(this._overlay)}_mountAnchor(){this._positions=[];let e=this._overlay.delegate.polyline.positions.getValue(i.Cesium.JulianDate.now());for(let t=0;t<e.length-1;t++){let r=z(e[t],e[t+1]);this._positions.push(e[t]),this._positions.push(r)}this._positions.push(e[e.length-1]),this._positions.forEach((t,r)=>{this.editTool.fire(x.CREATE_ANCHOR,{position:t,index:r,isMid:r%2!==0})})}_onEditAnchorStop({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.Cesium.JulianDate.now()),s=r.index;if(r.isMid){let o=z(this._positions[s],this._positions[s-1]),n=z(this._positions[s],this._positions[s+1]);this._positions.splice(s,1,o,t,n),this.editTool.fire(x.CLEAR_ANCHOR),this._positions.forEach((l,h)=>{this.editTool.fire(x.CREATE_ANCHOR,{position:l,index:h,isMid:h%2!==0})})}}_onAnchorMoving({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.Cesium.JulianDate.now()),s=r.index;if(this._positions[s]=t,!r.isMid&&this._options.maxAnchorSize>2){let o=-1,n=-1,l=-1,h=-1,c=this._positions.length;if(s===0?(l=s+2,h=s+1):r.index===c-1?(o=s-2,n=s-1):(o=s-2,n=s-1,l=s+2,h=s+1),o>0){let p=z(this._positions[o],this._positions[s]);this._positions[n]=p,this.editTool.fire(x.UPDATE_ANCHOR,{index:n,position:p})}if(l>0){let p=z(this._positions[l],this._positions[s]);this._positions[h]=p,this.editTool.fire(x.UPDATE_ANCHOR,{index:h,position:p})}}}},pf=sl;var ol=class extends q{constructor(e){super(e)}_mountedHook(){this._delegate.polygon.hierarchy=new i.Cesium.CallbackProperty(e=>this._positions.length>2?new i.Cesium.PolygonHierarchy(this._positions.map(t=>t.clone())):null,!1),this._layer.entities.add(this._delegate)}_stoppedHook(){this._overlay.positions=u.transformCartesianArrayToWGS84Array(this._positions.filter((e,t)=>t%2===0)),this._overlay.show=!0,this._options.onEditStop&&this._options.onEditStop(this._overlay)}_mountAnchor(){this._positions=[];let e=this._overlay.delegate.polygon.hierarchy.getValue(i.Cesium.JulianDate.now()).positions;e.push(e[0]);for(let t=0;t<e.length-1;t++){let r=z(e[t],e[t+1]);this._positions.push(e[t]),this._positions.push(r)}this._positions.forEach((t,r)=>{this.editTool.fire(x.CREATE_ANCHOR,{position:t,index:r,isMid:r%2!==0})})}_onEditAnchorStop({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.Cesium.JulianDate.now()),s=r.index;if(r.isMid){let o,n,l=this._positions.length;s===l-1?(o=z(this._positions[s],this._positions[s-1]),n=z(this._positions[s],this._positions[0])):(o=z(this._positions[s],this._positions[s-1]),n=z(this._positions[s],this._positions[s+1])),this._positions.splice(s,1,o,t,n),this.editTool.fire(x.CLEAR_ANCHOR),this._positions.forEach((h,c)=>{this.editTool.fire(x.CREATE_ANCHOR,{position:h,index:c,isMid:c%2!==0})})}}_onAnchorMoving({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.Cesium.JulianDate.now()),s=r.index;this._positions[s]=t;let o=this._positions.length;if(!r.isMid){let n=-1,l=-1,h=-1,c=-1;s===0?(n=o-2,l=o-1,h=s+2,c=s+1):s===o-2?(n=s-2,l=s-1,h=0,c=o-1):(n=s-2,l=s-1,h=s+2,c=s+1);let p=z(this._positions[n],this._positions[s]),_=z(this._positions[h],this._positions[s]);this._positions[l]=p,this._positions[c]=_,this.editTool.fire(x.UPDATE_ANCHOR,{index:l,position:p}),this.editTool.fire(x.UPDATE_ANCHOR,{index:c,position:_})}}},df=ol;var al=class extends q{constructor(e){super(e),this._center=void 0,this._radius=0}_mountedHook(){this._radius=this._overlay.radius,this._center=u.transformWGS84ToCartesian(this._overlay.center),this._positions=[].concat([this._center,this._computeCirclePoints(this._center,this._radius)[0]]),this._delegate.polygon.hierarchy=new i.Cesium.CallbackProperty(e=>{if(this._positions.length>1){if(this._radius=i.Cesium.Cartesian3.distance(this._positions[0],this._positions[1]),this._radius<=0)return null;let t=this._computeCirclePoints(this._positions[0],this._radius);return t.push(t[0]),new i.Cesium.PolygonHierarchy(t)}else return null},!1),this._layer.entities.add(this._delegate)}_computeCirclePoints(e,t){let r=[],s=i.Cesium.EllipseGeometryLibrary.computeEllipsePositions({center:e,semiMajorAxis:t,semiMinorAxis:t,rotation:0,granularity:.005},!1,!0);return s&&s.outerPositions&&(r=i.Cesium.Cartesian3.unpackArray(s.outerPositions)),r}_stoppedHook(){this._overlay.center=u.transformCartesianToWGS84(this._positions[0]),this._overlay.radius=this._radius,this._overlay.show=!0,this._options.onEditStop&&this._options.onEditStop(this._overlay)}_mountAnchor(){this._positions.forEach((e,t)=>{this.editTool.fire(x.CREATE_ANCHOR,{position:e,index:t,isCenter:t%2===0})})}},mf=al;var nl=class extends q{constructor(e){super(e),this._overlay=e}_mountedHook(){this._delegate.rectangle.coordinates=new i.Cesium.CallbackProperty(e=>this._positions.length>1?i.Cesium.Rectangle.fromCartesianArray(this._positions):null,!1),this._layer.entities.add(this._delegate)}},uf=nl;var ll=class extends q{constructor(e){super(e),this._position=void 0}_mountedHook(){this.editTool.tooltipMess="\u53F3\u51FB\u7ED3\u675F\u7F16\u8F91",this._position=this._delegate.position.getValue(i.Cesium.JulianDate.now()),this._delegate.position=new i.Cesium.CallbackProperty(()=>this._position,!1),this._layer.entities.add(this._delegate)}_stoppedHook(){this._overlay.position=u.transformCartesianToWGS84(this._position),this._overlay.show=!0,this._options.onEditStop&&this._options.onEditStop(this._overlay)}_onAnchorMoving({pickedAnchor:e,position:t}){this._position=t}},_f=ll;var hl=class extends q{constructor(e){super(e),this._graphics=new it}_mountedHook(){this._delegate.polygon.hierarchy=new i.Cesium.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},ff=hl;var cl=class extends q{constructor(e){super(e),this._graphics=new ki}_mountedHook(){this._delegate.polygon.hierarchy=new i.Cesium.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},gf=cl;var pl=class extends q{constructor(e){super(e),this._graphics=new zi}_mountedHook(){this._delegate.polygon.hierarchy=new i.Cesium.CallbackProperty(()=>this._positions.length>1?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},yf=pl;var dl=class extends q{constructor(e){super(e),this._graphics=new Fi}_mountedHook(){this._delegate.polygon.hierarchy=new i.Cesium.CallbackProperty(()=>this._positions.length>1?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},vf=dl;var ml=class extends q{constructor(e){super(e),this._graphics=new Hi}_mountedHook(){this._delegate.polygon.hierarchy=new i.Cesium.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},wf=ml;var ul=class{constructor(e,t={}){this._viewer=e,this._options=t,this._layer=new i.Cesium.CustomDataSource("plot-layer"),this._viewer.dataSources.add(this._layer),this._currentWorker=void 0,this._state=void 0}get viewer(){return this._viewer}get layer(){return this._layer}get state(){return this._state}_createDrawWorker(e,t){let r;switch(e){case F.POINT:r=new J_(t);break;case F.POLYLINE:r=new K_(t);break;case F.POLYGON:r=new Q_(t);break;case F.CIRCLE:r=new $_(t);break;case F.RECT:r=new ef(t);break;case F.BILLBOARD:r=new tf(t);break;case F.ATTACK_ARROW:r=new rf(t);break;case F.DOUBLE_ARROW:r=new sf(t);break;case F.FINE_ARROW:r=new af(t);break;case F.TAILED_ATTACK_ARROW:r=new hf(t);break;case F.GATHERING_PLACE:r=new lf(t);break;default:break}return r}_createEditWorker(e){let t;switch(e.type){case F.POINT:t=new cf(e);break;case F.POLYLINE:t=new pf(e);break;case F.POLYGON:t=new df(e);break;case F.CIRCLE:t=new mf(e);break;case F.RECT:t=new uf(e);break;case F.BILLBOARD:t=new _f(e);break;case F.ATTACK_ARROW:t=new ff(e);break;case F.DOUBLE_ARROW:t=new gf(e);break;case F.FINE_ARROW:t=new yf(e);break;case F.TAILED_ATTACK_ARROW:t=new wf(e);break;case F.GATHERING_PLACE:t=new vf(e);break;default:break}return t}draw(e,t,r={},s=!1){var n;this._state="draw",this._currentWorker&&this._currentWorker.stop();let o=(r==null?void 0:r.maxAnchorSize)||999;return r&&delete r.maxAnchorSize,this._currentWorker=(n=this._createDrawWorker(e,r))==null?void 0:n.start(this,{...this._options,maxAnchorSize:o,onDrawStop:t,clampToModel:s!=null?s:this._options.clampToModel}),this}edit(e,t,r=!1){var s;return this._state="edit",this._currentWorker&&this._currentWorker.stop(),this._currentWorker=(s=this._createEditWorker(e))==null?void 0:s.start(this,{...this._options,onEditStop:t,clampToModel:r!=null?r:this._options.clampToModel}),this}stop(){this._currentWorker&&this._currentWorker.stop(),this._currentWorker=null}destroy(){return this._viewer.dataSources.remove(this._layer),this._viewer=void 0,this}},Cf=ul;var _l=class{constructor(e){this._viewer=e,this._options={}}_bindEvent(){}_unbindEvent(){}start(){if(this._viewer.clock.shouldAnimate=!0,this._unbindEvent(),this._options.duration){let e=setTimeout(()=>{this._unbindEvent(),this._options.callback&&this._options.callback.call(this._options.context||this),clearTimeout(e)},Number(this._options.duration)*1e3)}return this._bindEvent(),this}stop(){return this._unbindEvent(),this}},oe=_l;var mP={},Y=mP;var fl=class extends oe{constructor(e,t={}){super(e),this._options=t,this._heading=e.camera.heading,this._aroundAmount=.2}get type(){return Y.AROUND_VIEW}set aroundAmount(e){this._aroundAmount=e}_bindEvent(){this._viewer.clock.onTick.addEventListener(this._onAround,this)}_unbindEvent(){this._viewer.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),this._viewer.clock.onTick.removeEventListener(this._onAround,this)}_onAround(e,t){this._heading+=i.Cesium.Math.toRadians(this._aroundAmount),(this._heading>=Math.PI*2||this._heading<=-Math.PI*2)&&(this._heading=0),this._viewer.camera.setView({orientation:{heading:this._heading,pitch:this._options.pitch?i.Cesium.Math.toRadians(this._options.pitch):this._viewer.camera.pitch,roll:this._options.roll?i.Cesium.Math.toRadians(this._options.roll):this._viewer.camera.roll}})}};Y.AROUND_VIEW="around_view";var gl=fl;var yl=class extends oe{constructor(e,t,r={}){super(e),this._position=f.parsePosition(t),this._options=r,this._heading=e.camera.heading,this._aroundAmount=.2}get type(){return Y.AROUND_POINT}set position(e){this._position=f.parsePosition(e)}set aroundAmount(e){this._aroundAmount=e}_bindEvent(){this._viewer.clock.onTick.addEventListener(this._onAround,this)}_unbindEvent(){this._viewer.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),this._viewer.clock.onTick.removeEventListener(this._onAround,this)}_onAround(e,t){this._heading+=i.Cesium.Math.toRadians(this._aroundAmount),(this._heading>=Math.PI*2||this._heading<=-Math.PI*2)&&(this._heading=0),this._viewer.camera.lookAt(u.transformWGS84ToCartesian(this._position),new i.Cesium.HeadingPitchRange(this._heading,i.Cesium.Math.toRadians(this._options.pitch||0),this._options.range||1e3))}};Y.AROUND_POINT="around_point";var vl=yl;var Tf=`in vec2 v_textureCoordinates;
17263
17261
  uniform sampler2D colorTexture;
17264
17262
  uniform sampler2D depthTexture;
17265
17263
  uniform vec3 centerWC;
@@ -17305,7 +17303,7 @@ void main() {
17305
17303
  out_FragColor = mix(out_FragColor, color, f);
17306
17304
  }
17307
17305
  }
17308
- `;var ln=class extends te{constructor(e,t,r,s={}){super(e),this._delegate=void 0,this._position=_.parsePosition(t),this._radius=r||100,this._color=s.color||i.Cesium.Color.RED,this._speed=s.speed||2}get type(){return V.CIRCLE_SCAN}_mountContent(){let e=u.transformWGS84ToCartesian(this._position),t=i.Cesium.Ellipsoid.WGS84.geodeticSurfaceNormal(e,new i.Cesium.Cartesian3),r=this;this._delegate=new i.Cesium.PostProcessStage({name:v.uuid(),fragmentShader:ap,uniforms:{centerWC:function(){return e},normalWC:function(){return t},radius:function(){return r._radius},speed:function(){return r._speed},color:function(){return r._color}}})}start(){return!this._delegate&&this._mountContent(),this._delegate&&this._viewer.scene.postProcessStages.add(this._delegate),this}stop(){return this._delegate&&this._viewer.scene.postProcessStages.remove(this._delegate),this._delegate=void 0,this}};V.CIRCLE_SCAN="circle_scan";var hn=ln;var cn=class extends te{constructor(e,t={}){super(e),this._options=t,this._positions=[],this._durations=[3],this._currentIndex=0,this._timer=void 0}get type(){return V.FLYING}set positions(e){this._positions=_.parsePositions(e)}get positions(){return this._positions}set durations(e){this._durations=e}get durations(){return this._durations}_cameraFly(){let e=this,t=this._viewer.camera,r=this._positions[this._currentIndex],s=()=>{let o=e._positions[e._currentIndex+1];o?(e._currentIndex++,e._currentIndex<=e._positions.length-1&&(e._timer=setTimeout(()=>{e._cameraFly()},(e._options.dwellTime||1)*1e3))):!o&&e._options.loop&&(e._currentIndex=0,e._timer=setTimeout(()=>{e._cameraFly()},(e._options.dwellTime||1)*1e3)),e._options.callback&&e._options.callback(e._currentIndex)};r&&t.flyTo({destination:u.transformWGS84ToCartesian(r),orientation:{heading:i.Cesium.Math.toRadians(r.heading),pitch:i.Cesium.Math.toRadians(r.pitch),roll:i.Cesium.Math.toRadians(r.roll)},complete:s,duration:this._durations.length===1?this._durations[0]:this._durations[this._currentIndex]})}start(){return this._positions&&this._positions.length&&(this._currentIndex=0,this._cameraFly()),this}pause(){return this._viewer.camera.cancelFlight(),this._timer&&clearTimeout(this._timer),this}restore(){return this._positions&&this._positions.length&&this._cameraFly(),this}};V.FLYING="flying";var pn=cn;var dn=class extends te{constructor(e,t={}){super(e),this._options=t}get type(){return V.GLOBE_ROTATE}_icrf(e,t){if(e.mode!==i.Cesium.SceneMode.SCENE3D)return!0;let r=i.Cesium.Transforms.computeIcrfToFixedMatrix(t);if(r){let s=this._viewer.camera,o=i.Cesium.Cartesian3.clone(s.position),a=i.Cesium.Matrix4.fromRotationTranslation(r);s.lookAtTransform(a,o)}}_bindEvent(){this._viewer.clock.multiplier=this._options.speed||12*1e3,this._viewer.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),this._viewer.scene.postUpdate.addEventListener(this._icrf,this)}_unbindEvent(){this._viewer.clock.multiplier=1,this._viewer.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),this._viewer.scene.postUpdate.removeEventListener(this._icrf,this)}};V.GLOBE_ROTATE="globe_rotate";var mn=dn;var np=`in vec2 v_textureCoordinates;
17306
+ `;var wl=class extends oe{constructor(e,t,r,s={}){super(e),this._delegate=void 0,this._position=f.parsePosition(t),this._radius=r||100,this._color=s.color||i.Cesium.Color.RED,this._speed=s.speed||2}get type(){return Y.CIRCLE_SCAN}_mountContent(){let e=u.transformWGS84ToCartesian(this._position),t=i.Cesium.Ellipsoid.WGS84.geodeticSurfaceNormal(e,new i.Cesium.Cartesian3),r=this;this._delegate=new i.Cesium.PostProcessStage({name:v.uuid(),fragmentShader:Tf,uniforms:{centerWC:function(){return e},normalWC:function(){return t},radius:function(){return r._radius},speed:function(){return r._speed},color:function(){return r._color}}})}start(){return!this._delegate&&this._mountContent(),this._delegate&&this._viewer.scene.postProcessStages.add(this._delegate),this}stop(){return this._delegate&&this._viewer.scene.postProcessStages.remove(this._delegate),this._delegate=void 0,this}};Y.CIRCLE_SCAN="circle_scan";var Cl=wl;var Tl=class extends oe{constructor(e,t={}){super(e),this._options=t,this._positions=[],this._durations=[3],this._currentIndex=0,this._timer=void 0}get type(){return Y.FLYING}set positions(e){this._positions=f.parsePositions(e)}get positions(){return this._positions}set durations(e){this._durations=e}get durations(){return this._durations}_cameraFly(){let e=this,t=this._viewer.camera,r=this._positions[this._currentIndex],s=()=>{let o=e._positions[e._currentIndex+1];o?(e._currentIndex++,e._currentIndex<=e._positions.length-1&&(e._timer=setTimeout(()=>{e._cameraFly()},(e._options.dwellTime||1)*1e3))):!o&&e._options.loop&&(e._currentIndex=0,e._timer=setTimeout(()=>{e._cameraFly()},(e._options.dwellTime||1)*1e3)),e._options.callback&&e._options.callback(e._currentIndex)};r&&t.flyTo({destination:u.transformWGS84ToCartesian(r),orientation:{heading:i.Cesium.Math.toRadians(r.heading),pitch:i.Cesium.Math.toRadians(r.pitch),roll:i.Cesium.Math.toRadians(r.roll)},complete:s,duration:this._durations.length===1?this._durations[0]:this._durations[this._currentIndex]})}start(){return this._positions&&this._positions.length&&(this._currentIndex=0,this._cameraFly()),this}pause(){return this._viewer.camera.cancelFlight(),this._timer&&clearTimeout(this._timer),this}restore(){return this._positions&&this._positions.length&&this._cameraFly(),this}};Y.FLYING="flying";var xl=Tl;var El=class extends oe{constructor(e,t={}){super(e),this._options=t}get type(){return Y.GLOBE_ROTATE}_icrf(e,t){if(e.mode!==i.Cesium.SceneMode.SCENE3D)return!0;let r=i.Cesium.Transforms.computeIcrfToFixedMatrix(t);if(r){let s=this._viewer.camera,o=i.Cesium.Cartesian3.clone(s.position),n=i.Cesium.Matrix4.fromRotationTranslation(r);s.lookAtTransform(n,o)}}_bindEvent(){this._viewer.clock.multiplier=this._options.speed||12*1e3,this._viewer.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),this._viewer.scene.postUpdate.addEventListener(this._icrf,this)}_unbindEvent(){this._viewer.clock.multiplier=1,this._viewer.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),this._viewer.scene.postUpdate.removeEventListener(this._icrf,this)}};Y.GLOBE_ROTATE="globe_rotate";var Pl=El;var xf=`in vec2 v_textureCoordinates;
17309
17307
  uniform sampler2D colorTexture;
17310
17308
  uniform sampler2D depthTexture;
17311
17309
  uniform vec3 centerWC;
@@ -17375,7 +17373,7 @@ void main() {
17375
17373
  out_FragColor = mix(out_FragColor, color, f + f0);
17376
17374
  }
17377
17375
  }
17378
- `;var un=class extends te{constructor(e,t,r,s={}){super(e),this._position=_.parsePosition(t),this._radius=r||100,this._color=s.color||i.Cesium.Color.BLUE,this._speed=s.speed||3,this._delegate=void 0}get type(){return V.RADAR_SCAN}_mountContent(){let e=u.transformWGS84ToCartesian(this._position),t=i.Cesium.Ellipsoid.WGS84.geodeticSurfaceNormal(e,new i.Cesium.Cartesian3),r=new Date().getTime(),s=this;this._delegate=new i.Cesium.PostProcessStage({name:v.uuid(),fragmentShader:np,uniforms:{centerWC:function(){return e},planeNormalWC:function(){return t},lineNormalWC:function(){let o=new i.Cesium.Quaternion,a=new i.Cesium.Matrix3,l=i.Cesium.Cartesian3.cross(i.Cesium.Cartesian3.UNIT_Z,t,new i.Cesium.Cartesian3),h=new Date().getTime(),c=i.Cesium.Math.PI*2*((h-r)/1e4)*s._speed;return i.Cesium.Quaternion.fromAxisAngle(t,c,o),i.Cesium.Matrix3.fromQuaternion(o,a),i.Cesium.Matrix3.multiplyByVector(a,l,l),i.Cesium.Cartesian3.normalize(l,l),l},radius:function(){return s._radius},color:function(){return s._color}}})}start(){return!this._delegate&&this._mountContent(),this._delegate&&this._viewer.scene.postProcessStages.add(this._delegate),this}stop(){return this._delegate&&this._viewer.scene.postProcessStages.remove(this._delegate),this._delegate=void 0,this}};V.RADAR_SCAN="radar_scan";var _n=un;var fn=class{constructor(e){this._viewer=e,this._delegate=void 0,this._enable=!1,this._gradations=1,this._selected=[],this._state=d.INITIALIZED}get type(){return"black_and_white"}set enable(e){this._enable=e,this._delegate||this._createPostProcessStage(),this._delegate.enabled=e,this._state=e?d.ENABLED:d.DISABLED}get enable(){return this._enable}set gradations(e){this._gradations=e,this._delegate&&(this._delegate.uniforms.gradations=e)}get gradations(){return this._gradations}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_createPostProcessStage(){this._delegate=i.Cesium.PostProcessStageLibrary.createBlackAndWhiteStage(),this._delegate&&(this._delegate.uniforms.gradations=this._gradations,this._viewer.scene.postProcessStages.add(this._delegate))}},lp=fn;var gn=class{constructor(e){this._viewer=e,this._enable=!1,this._contrast=128,this._brightness=-.3,this._glowOnly=!1,this._delta=1,this._sigma=3.8,this._stepSize=5,this._selected=[],this._state=d.INITIALIZED}get type(){return"bloom"}set enable(e){this._enable=e,this._delegate||this._createPostProcessStage(),this._delegate.enabled=e,this._state=e?d.ENABLED:d.DISABLED}get enable(){return this._enable}set contrast(e){this._contrast=e,this._delegate&&(this._delegate.uniforms.contrast=e)}get contrast(){return this._contrast}set brightness(e){this._brightness=e,this._delegate&&(this._delegate.uniforms.brightness=e)}get brightness(){return this._brightness}set glowOnly(e){this._glowOnly=e,this._delegate&&(this._delegate.uniforms.glowOnly=e)}get glowOnly(){return this._glowOnly}set delta(e){this._delta=e,this._delegate&&(this._delegate.uniforms.delta=e)}get delta(){return this._delta}set sigma(e){this._sigma=e,this._delegate&&(this._delegate.uniforms.sigma=e)}get sigma(){return this._sigma}set stepSize(e){this._stepSize=e,this._delegate&&(this._delegate.uniforms.stepSize=e)}get stepSize(){return this._stepSize}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_createPostProcessStage(){this._delegate=this._viewer.scene.postProcessStages.bloom,this._delegate.uniforms.contrast=this._contrast,this._delegate.uniforms.brightness=this._brightness,this._delegate.uniforms.glowOnly=this._glowOnly,this._delegate.uniforms.delta=this._delta,this._delegate.uniforms.sigma=this._sigma,this._delegate.uniforms.stepSize=this._stepSize}},hp=gn;var yn=class{constructor(e){this._viewer=e,this._delegate=void 0,this._enable=!1,this._intensity=1,this._selected=[],this._state=d.INITIALIZED}get type(){return"brightness"}set enable(e){this._enable=e,this._delegate||this._createPostProcessStage(),this._delegate.enabled=e,this._state=e?d.ENABLED:d.DISABLED}get enable(){return this._enable}set intensity(e){this._intensity=e,this._delegate&&(this._delegate.uniforms.brightness=e)}get intensity(){return this._intensity}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_createPostProcessStage(){this._delegate=i.Cesium.PostProcessStageLibrary.createBrightnessStage(),this._delegate&&(this._delegate.uniforms.brightness=this._intensity,this._viewer.scene.postProcessStages.add(this._delegate))}},cp=yn;var vn=class{constructor(e){this._viewer=e,this._delegate=void 0,this._enable=!1,this._focalDistance=87,this._delta=1,this._sigma=3.8,this._stepSize=2.5,this._selected=[],this._state=d.INITIALIZED}get type(){return"depth_of_field"}set enable(e){this._enable=e,i.Cesium.PostProcessStageLibrary.isDepthOfFieldSupported(this._viewer.scene)&&!this._delegate&&this._createPostProcessStage(),this._delegate&&(this._delegate.enabled=e),this._state=e?d.ENABLED:d.DISABLED}get enable(){return this._enable}set focalDistance(e){this._focalDistance=e,this._delegate&&(this._delegate.uniforms.focalDistance=e)}get focalDistance(){return this._focalDistance}set delta(e){this._delta=e,this._delegate&&(this._delegate.uniforms.delta=e)}get delta(){return this._delta}set sigma(e){this._sigma=e,this._delegate&&(this._delegate.uniforms.sigma=e)}get sigma(){return this._sigma}set stepSize(e){this._stepSize=e,this._delegate&&(this._delegate.uniforms.stepSize=e)}get stepSize(){return this._stepSize}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_createPostProcessStage(){this._delegate=i.Cesium.PostProcessStageLibrary.createDepthOfFieldStage(),this._delegate&&(this._delegate.uniforms.focalDistance=this._focalDistance,this._delegate.uniforms.delta=this._delta,this._delegate.uniforms.sigma=this._sigma,this._delegate.uniforms.stepSize=this._stepSize,this._viewer.scene.postProcessStages.add(this._delegate))}},pp=vn;var wn=class{constructor(e){this._viewer=e,this._delegate=void 0,this._enable=!1,this._intensity=6,this._distortion=61,this._dirtAmount=.4,this._haloWidth=.4,this._selected=[],this._state=d.INITIALIZED}get type(){return"lens_flare"}set enable(e){this._enable=e,this._delegate||this._createPostProcessStage(),this._delegate.enabled=e,this._state=e?d.ENABLED:d.DISABLED}get enable(){return this._enable}set intensity(e){this._intensity=e,this._delegate&&(this._delegate.uniforms.intensity=e)}get intensity(){return this._intensity}set distortion(e){this._distortion=e,this._delegate&&(this._delegate.uniforms.distortion=e)}get distortion(){return this._distortion}set dirtAmount(e){this._dirtAmount=e,this._delegate&&(this._delegate.uniforms.dirtAmount=e)}get dirtAmount(){return this._dirtAmount}set haloWidth(e){this._haloWidth=e,this._delegate&&(this._delegate.uniforms.haloWidth=e)}get haloWidth(){return this._haloWidth}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_createPostProcessStage(){this._delegate=i.Cesium.PostProcessStageLibrary.createLensFlareStage(),this._delegate&&(this._delegate.uniforms.intensity=this._intensity,this._delegate.uniforms.distortion=this._distortion,this._delegate.uniforms.dirtAmount=this._dirtAmount,this._delegate.uniforms.haloWidth=this._haloWidth,this._viewer.scene.postProcessStages.add(this._delegate))}},dp=wn;var Tn=class{constructor(e){this._viewer=e,this._enable=!1,this._selected=[],this._state=d.INITIALIZED}get type(){return"night"}set enable(e){this._enable=e,this._delegate||this._createPostProcessStage(),this._delegate.enabled=e,this._state=e?d.ENABLED:d.DISABLED}get enable(){return this._enable}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_createPostProcessStage(){this._delegate=i.Cesium.PostProcessStageLibrary.createNightVisionStage(),this._delegate&&this._viewer.scene.postProcessStages.add(this._delegate)}},mp=Tn;var Cn=class{constructor(e){this._viewer=e,this._delegate=void 0,this._enable=!1,this._color=i.Cesium.Color.GREEN,this._length=.5,this._selected=[],this._state=d.INITIALIZED}get type(){return"silhouette"}set enable(e){this._enable=e,i.Cesium.PostProcessStageLibrary.isSilhouetteSupported(this._viewer.scene)&&!this._delegate&&this._createPostProcessStage(),this._delegate&&(this._delegate.enabled=e),this._state=e?d.ENABLED:d.DISABLED}get enable(){return this._enable}set color(e){this._color=e,this._delegate&&(this._delegate.uniforms.color=e)}get color(){return this._color}set length(e){this._length=e,this._delegate&&(this._delegate.uniforms.length=e)}get length(){return this._length}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_createPostProcessStage(){this._delegate=i.Cesium.PostProcessStageLibrary.createSilhouetteStage(),this._delegate&&(this._delegate.uniforms.color=this._color,this._delegate.uniforms.length=this._length,this._viewer.scene.postProcessStages.add(this._delegate))}},up=Cn;var xn=class{constructor(e){if(!e)throw Error("missing viewer param");this._blackAndWhite=new lp(e),this._bloom=new hp(e),this._brightness=new cp(e),this._depthOfField=new pp(e),this._lensFlare=new dp(e),this._night=new mp(e),this._silhouette=new up(e)}get blackAndWhite(){return this._blackAndWhite}get bloom(){return this._bloom}get brightness(){return this._brightness}get depthOfField(){return this._depthOfField}get lensFlare(){return this._lensFlare}get night(){return this._night}get silhouette(){return this._silhouette}},_p=xn;var fp=`in vec2 v_textureCoordinates;
17376
+ `;var bl=class extends oe{constructor(e,t,r,s={}){super(e),this._position=f.parsePosition(t),this._radius=r||100,this._color=s.color||i.Cesium.Color.BLUE,this._speed=s.speed||3,this._delegate=void 0}get type(){return Y.RADAR_SCAN}_mountContent(){let e=u.transformWGS84ToCartesian(this._position),t=i.Cesium.Ellipsoid.WGS84.geodeticSurfaceNormal(e,new i.Cesium.Cartesian3),r=new Date().getTime(),s=this;this._delegate=new i.Cesium.PostProcessStage({name:v.uuid(),fragmentShader:xf,uniforms:{centerWC:function(){return e},planeNormalWC:function(){return t},lineNormalWC:function(){let o=new i.Cesium.Quaternion,n=new i.Cesium.Matrix3,l=i.Cesium.Cartesian3.cross(i.Cesium.Cartesian3.UNIT_Z,t,new i.Cesium.Cartesian3),h=new Date().getTime(),c=i.Cesium.Math.PI*2*((h-r)/1e4)*s._speed;return i.Cesium.Quaternion.fromAxisAngle(t,c,o),i.Cesium.Matrix3.fromQuaternion(o,n),i.Cesium.Matrix3.multiplyByVector(n,l,l),i.Cesium.Cartesian3.normalize(l,l),l},radius:function(){return s._radius},color:function(){return s._color}}})}start(){return!this._delegate&&this._mountContent(),this._delegate&&this._viewer.scene.postProcessStages.add(this._delegate),this}stop(){return this._delegate&&this._viewer.scene.postProcessStages.remove(this._delegate),this._delegate=void 0,this}};Y.RADAR_SCAN="radar_scan";var Sl=bl;var Al=class{constructor(e){this._viewer=e,this._delegate=void 0,this._enable=!1,this._gradations=1,this._selected=[],this._state=m.INITIALIZED}get type(){return"black_and_white"}set enable(e){this._enable=e,this._delegate||this._createPostProcessStage(),this._delegate.enabled=e,this._state=e?m.ENABLED:m.DISABLED}get enable(){return this._enable}set gradations(e){this._gradations=e,this._delegate&&(this._delegate.uniforms.gradations=e)}get gradations(){return this._gradations}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_createPostProcessStage(){this._delegate=i.Cesium.PostProcessStageLibrary.createBlackAndWhiteStage(),this._delegate&&(this._delegate.uniforms.gradations=this._gradations,this._viewer.scene.postProcessStages.add(this._delegate))}},Ef=Al;var Ml=class{constructor(e){this._viewer=e,this._enable=!1,this._contrast=128,this._brightness=-.3,this._glowOnly=!1,this._delta=1,this._sigma=3.8,this._stepSize=5,this._selected=[],this._state=m.INITIALIZED}get type(){return"bloom"}set enable(e){this._enable=e,this._delegate||this._createPostProcessStage(),this._delegate.enabled=e,this._state=e?m.ENABLED:m.DISABLED}get enable(){return this._enable}set contrast(e){this._contrast=e,this._delegate&&(this._delegate.uniforms.contrast=e)}get contrast(){return this._contrast}set brightness(e){this._brightness=e,this._delegate&&(this._delegate.uniforms.brightness=e)}get brightness(){return this._brightness}set glowOnly(e){this._glowOnly=e,this._delegate&&(this._delegate.uniforms.glowOnly=e)}get glowOnly(){return this._glowOnly}set delta(e){this._delta=e,this._delegate&&(this._delegate.uniforms.delta=e)}get delta(){return this._delta}set sigma(e){this._sigma=e,this._delegate&&(this._delegate.uniforms.sigma=e)}get sigma(){return this._sigma}set stepSize(e){this._stepSize=e,this._delegate&&(this._delegate.uniforms.stepSize=e)}get stepSize(){return this._stepSize}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_createPostProcessStage(){this._delegate=this._viewer.scene.postProcessStages.bloom,this._delegate.uniforms.contrast=this._contrast,this._delegate.uniforms.brightness=this._brightness,this._delegate.uniforms.glowOnly=this._glowOnly,this._delegate.uniforms.delta=this._delta,this._delegate.uniforms.sigma=this._sigma,this._delegate.uniforms.stepSize=this._stepSize}},Pf=Ml;var Il=class{constructor(e){this._viewer=e,this._delegate=void 0,this._enable=!1,this._intensity=1,this._selected=[],this._state=m.INITIALIZED}get type(){return"brightness"}set enable(e){this._enable=e,this._delegate||this._createPostProcessStage(),this._delegate.enabled=e,this._state=e?m.ENABLED:m.DISABLED}get enable(){return this._enable}set intensity(e){this._intensity=e,this._delegate&&(this._delegate.uniforms.brightness=e)}get intensity(){return this._intensity}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_createPostProcessStage(){this._delegate=i.Cesium.PostProcessStageLibrary.createBrightnessStage(),this._delegate&&(this._delegate.uniforms.brightness=this._intensity,this._viewer.scene.postProcessStages.add(this._delegate))}},bf=Il;var Dl=class{constructor(e){this._viewer=e,this._delegate=void 0,this._enable=!1,this._focalDistance=87,this._delta=1,this._sigma=3.8,this._stepSize=2.5,this._selected=[],this._state=m.INITIALIZED}get type(){return"depth_of_field"}set enable(e){this._enable=e,i.Cesium.PostProcessStageLibrary.isDepthOfFieldSupported(this._viewer.scene)&&!this._delegate&&this._createPostProcessStage(),this._delegate&&(this._delegate.enabled=e),this._state=e?m.ENABLED:m.DISABLED}get enable(){return this._enable}set focalDistance(e){this._focalDistance=e,this._delegate&&(this._delegate.uniforms.focalDistance=e)}get focalDistance(){return this._focalDistance}set delta(e){this._delta=e,this._delegate&&(this._delegate.uniforms.delta=e)}get delta(){return this._delta}set sigma(e){this._sigma=e,this._delegate&&(this._delegate.uniforms.sigma=e)}get sigma(){return this._sigma}set stepSize(e){this._stepSize=e,this._delegate&&(this._delegate.uniforms.stepSize=e)}get stepSize(){return this._stepSize}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_createPostProcessStage(){this._delegate=i.Cesium.PostProcessStageLibrary.createDepthOfFieldStage(),this._delegate&&(this._delegate.uniforms.focalDistance=this._focalDistance,this._delegate.uniforms.delta=this._delta,this._delegate.uniforms.sigma=this._sigma,this._delegate.uniforms.stepSize=this._stepSize,this._viewer.scene.postProcessStages.add(this._delegate))}},Sf=Dl;var Ll=class{constructor(e){this._viewer=e,this._delegate=void 0,this._enable=!1,this._intensity=6,this._distortion=61,this._dirtAmount=.4,this._haloWidth=.4,this._selected=[],this._state=m.INITIALIZED}get type(){return"lens_flare"}set enable(e){this._enable=e,this._delegate||this._createPostProcessStage(),this._delegate.enabled=e,this._state=e?m.ENABLED:m.DISABLED}get enable(){return this._enable}set intensity(e){this._intensity=e,this._delegate&&(this._delegate.uniforms.intensity=e)}get intensity(){return this._intensity}set distortion(e){this._distortion=e,this._delegate&&(this._delegate.uniforms.distortion=e)}get distortion(){return this._distortion}set dirtAmount(e){this._dirtAmount=e,this._delegate&&(this._delegate.uniforms.dirtAmount=e)}get dirtAmount(){return this._dirtAmount}set haloWidth(e){this._haloWidth=e,this._delegate&&(this._delegate.uniforms.haloWidth=e)}get haloWidth(){return this._haloWidth}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_createPostProcessStage(){this._delegate=i.Cesium.PostProcessStageLibrary.createLensFlareStage(),this._delegate&&(this._delegate.uniforms.intensity=this._intensity,this._delegate.uniforms.distortion=this._distortion,this._delegate.uniforms.dirtAmount=this._dirtAmount,this._delegate.uniforms.haloWidth=this._haloWidth,this._viewer.scene.postProcessStages.add(this._delegate))}},Af=Ll;var Rl=class{constructor(e){this._viewer=e,this._enable=!1,this._selected=[],this._state=m.INITIALIZED}get type(){return"night"}set enable(e){this._enable=e,this._delegate||this._createPostProcessStage(),this._delegate.enabled=e,this._state=e?m.ENABLED:m.DISABLED}get enable(){return this._enable}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_createPostProcessStage(){this._delegate=i.Cesium.PostProcessStageLibrary.createNightVisionStage(),this._delegate&&this._viewer.scene.postProcessStages.add(this._delegate)}},Mf=Rl;var Ol=class{constructor(e){this._viewer=e,this._delegate=void 0,this._enable=!1,this._color=i.Cesium.Color.GREEN,this._length=.5,this._selected=[],this._state=m.INITIALIZED}get type(){return"silhouette"}set enable(e){this._enable=e,i.Cesium.PostProcessStageLibrary.isSilhouetteSupported(this._viewer.scene)&&!this._delegate&&this._createPostProcessStage(),this._delegate&&(this._delegate.enabled=e),this._state=e?m.ENABLED:m.DISABLED}get enable(){return this._enable}set color(e){this._color=e,this._delegate&&(this._delegate.uniforms.color=e)}get color(){return this._color}set length(e){this._length=e,this._delegate&&(this._delegate.uniforms.length=e)}get length(){return this._length}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_createPostProcessStage(){this._delegate=i.Cesium.PostProcessStageLibrary.createSilhouetteStage(),this._delegate&&(this._delegate.uniforms.color=this._color,this._delegate.uniforms.length=this._length,this._viewer.scene.postProcessStages.add(this._delegate))}},If=Ol;var kl=class{constructor(e){if(!e)throw Error("missing viewer param");this._blackAndWhite=new Ef(e),this._bloom=new Pf(e),this._brightness=new bf(e),this._depthOfField=new Sf(e),this._lensFlare=new Af(e),this._night=new Mf(e),this._silhouette=new If(e)}get blackAndWhite(){return this._blackAndWhite}get bloom(){return this._bloom}get brightness(){return this._brightness}get depthOfField(){return this._depthOfField}get lensFlare(){return this._lensFlare}get night(){return this._night}get silhouette(){return this._silhouette}},Df=kl;var Lf=`in vec2 v_textureCoordinates;
17379
17377
  uniform sampler2D colorTexture;
17380
17378
  uniform sampler2D depthTexture;
17381
17379
  uniform vec4 fogByDistance;
@@ -17412,7 +17410,7 @@ void main(void){
17412
17410
  vec4 finalFogColor = vec4(fogColor.rgb, fogColor.a * blendAmount);
17413
17411
  out_FragColor = alphaBlend(finalFogColor, sceneColor);
17414
17412
  }
17415
- `;var En=class{constructor(e){this._id=v.uuid(),this._viewer=e,this._delegate=void 0,this._enable=!1,this._fogByDistance={near:10,nearValue:0,far:2e3,farValue:1},this._color=new i.Cesium.Color(0,0,0,1),this._state=d.INITIALIZED}get type(){return"fog"}set enable(e){this._enable=e,e&&this._viewer&&!this._delegate&&this._createPostProcessStage(),this._delegate&&(this._delegate.enabled=e)}get enable(){return this._enable}set fogByDistance(e){var t,r,s,o;this._fogByDistance=e,this._delegate&&(this._delegate.uniforms.fogByDistance=new i.Cesium.Cartesian4(((t=this._fogByDistance)==null?void 0:t.near)||10,((r=this._fogByDistance)==null?void 0:r.nearValue)||0,((s=this._fogByDistance)==null?void 0:s.far)||2e3,((o=this._fogByDistance)==null?void 0:o.farValue)||1))}get fogByDistance(){return this._fogByDistance}set color(e){this._color=e,this._delegate&&(this._delegate.uniforms.fogColor=e)}get color(){return this._color}_createPostProcessStage(){var e,t,r,s;this._delegate=new i.Cesium.PostProcessStage({name:this._id,fragmentShader:fp,uniforms:{fogByDistance:new i.Cesium.Cartesian4(((e=this._fogByDistance)==null?void 0:e.near)||10,((t=this._fogByDistance)==null?void 0:t.nearValue)||0,((r=this._fogByDistance)==null?void 0:r.far)||200,((s=this._fogByDistance)==null?void 0:s.farValue)||1),fogColor:this._color}}),this._viewer.scene.postProcessStages.add(this._delegate)}},gp=En;var yp=`in vec2 v_textureCoordinates;
17413
+ `;var zl=class{constructor(e){this._id=v.uuid(),this._viewer=e,this._delegate=void 0,this._enable=!1,this._fogByDistance={near:10,nearValue:0,far:2e3,farValue:1},this._color=new i.Cesium.Color(0,0,0,1),this._state=m.INITIALIZED}get type(){return"fog"}set enable(e){this._enable=e,e&&this._viewer&&!this._delegate&&this._createPostProcessStage(),this._delegate&&(this._delegate.enabled=e)}get enable(){return this._enable}set fogByDistance(e){var t,r,s,o;this._fogByDistance=e,this._delegate&&(this._delegate.uniforms.fogByDistance=new i.Cesium.Cartesian4(((t=this._fogByDistance)==null?void 0:t.near)||10,((r=this._fogByDistance)==null?void 0:r.nearValue)||0,((s=this._fogByDistance)==null?void 0:s.far)||2e3,((o=this._fogByDistance)==null?void 0:o.farValue)||1))}get fogByDistance(){return this._fogByDistance}set color(e){this._color=e,this._delegate&&(this._delegate.uniforms.fogColor=e)}get color(){return this._color}_createPostProcessStage(){var e,t,r,s;this._delegate=new i.Cesium.PostProcessStage({name:this._id,fragmentShader:Lf,uniforms:{fogByDistance:new i.Cesium.Cartesian4(((e=this._fogByDistance)==null?void 0:e.near)||10,((t=this._fogByDistance)==null?void 0:t.nearValue)||0,((r=this._fogByDistance)==null?void 0:r.far)||200,((s=this._fogByDistance)==null?void 0:s.farValue)||1),fogColor:this._color}}),this._viewer.scene.postProcessStages.add(this._delegate)}},Rf=zl;var Of=`in vec2 v_textureCoordinates;
17416
17414
  uniform sampler2D colorTexture;
17417
17415
  uniform float speed;
17418
17416
  uniform float mixNum;
@@ -17435,7 +17433,7 @@ void main(){
17435
17433
  c*=v*b;
17436
17434
  out_FragColor = mix(texture(colorTexture, v_textureCoordinates), vec4(c,1), mixNum);
17437
17435
  }
17438
- `;var Pn=class{constructor(e){this._id=v.uuid(),this._viewer=e,this._delegate=void 0,this._enable=!1,this._speed=10,this._mixNum=.5,this._state=d.INITIALIZED}get type(){return"rain"}set enable(e){this._enable=e,e&&this._viewer&&!this._delegate&&this._createPostProcessStage(),this._delegate&&(this._delegate.enabled=e)}get enable(){return this._enable}set speed(e){this._speed=e,this._delegate&&(this._delegate.uniforms.speed=e)}get speed(){return this._speed}set mixNum(e){this._mixNum=e,this._delegate&&(this._delegate.uniforms.mixNum=e)}get mixNum(){return this._mixNum}_createPostProcessStage(){this._delegate=new i.Cesium.PostProcessStage({name:this._id,fragmentShader:yp,uniforms:{speed:this._speed,mixNum:this._mixNum}}),this._viewer.scene.postProcessStages.add(this._delegate)}},vp=Pn;var wp=`in vec2 v_textureCoordinates;
17436
+ `;var Fl=class{constructor(e){this._id=v.uuid(),this._viewer=e,this._delegate=void 0,this._enable=!1,this._speed=10,this._mixNum=.5,this._state=m.INITIALIZED}get type(){return"rain"}set enable(e){this._enable=e,e&&this._viewer&&!this._delegate&&this._createPostProcessStage(),this._delegate&&(this._delegate.enabled=e)}get enable(){return this._enable}set speed(e){this._speed=e,this._delegate&&(this._delegate.uniforms.speed=e)}get speed(){return this._speed}set mixNum(e){this._mixNum=e,this._delegate&&(this._delegate.uniforms.mixNum=e)}get mixNum(){return this._mixNum}_createPostProcessStage(){this._delegate=new i.Cesium.PostProcessStage({name:this._id,fragmentShader:Of,uniforms:{speed:this._speed,mixNum:this._mixNum}}),this._viewer.scene.postProcessStages.add(this._delegate)}},kf=Fl;var zf=`in vec2 v_textureCoordinates;
17439
17437
  uniform sampler2D colorTexture;
17440
17438
  uniform float speed;
17441
17439
 
@@ -17468,7 +17466,7 @@ void main(){
17468
17466
  finalColor=(vec3(c));
17469
17467
  out_FragColor = mix(texture(colorTexture, v_textureCoordinates), vec4(finalColor,1), 0.3);
17470
17468
  }
17471
- `;var bn=class{constructor(e){this._id=v.uuid(),this._viewer=e,this._delegate=void 0,this._enable=!1,this._speed=10,this._state=d.INITIALIZED}get type(){return"snow"}set enable(e){this._enable=e,e&&this._viewer&&!this._delegate&&this._createPostProcessStage(),this._delegate&&(this._delegate.enabled=e)}get enable(){return this._enable}set speed(e){this._speed=e,this._delegate&&(this._delegate.uniforms.speed=e)}get speed(){return this._speed}_createPostProcessStage(){this._delegate=new i.Cesium.PostProcessStage({name:this._id,fragmentShader:wp,uniforms:{speed:this._speed}}),this._viewer.scene.postProcessStages.add(this._delegate)}},Tp=bn;var Cp="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAASABIAAD/4QCMRXhpZgAATU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAABIAAAAAQAAAEgAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAAgCgAwAEAAAAAQAAAQAAAAAA/+0AOFBob3Rvc2hvcCAzLjAAOEJJTQQEAAAAAAAAOEJJTQQlAAAAAAAQ1B2M2Y8AsgTpgAmY7PhCfv/AABEIAQACAAMBIgACEQEDEQH/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4eLj5OXm5+jp6vHy8/T19vf4+fr/xAAfAQADAQEBAQEBAQEBAAAAAAAAAQIDBAUGBwgJCgv/xAC1EQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2dri4+Tl5ufo6ery8/T19vf4+fr/2wBDABQQEBkSGScXFycyJh8mMi4mJiYmLj41NTU1NT5EQUFBQUFBRERERERERERERERERERERERERERERERERERERET/2wBDARUZGSAcICYYGCY2JiAmNkQ2Kys2REREQjVCRERERERERERERERERERERERERERERERERERERERERERERERERET/3QAEACD/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T6UAQnd6/rSYcd/1qx5Z9KNh9qAIlLDvSncepP0qTyzQIz7UAQFOOv60qqB3NTeWfajyj/kUARYFPDFehp3lH1FHlH1oATcT1Jpufen+V70eSPWgBm7FJnNS+WtLsHpQBHz6UeWW9Kl2CjFAELRkdaZg1ZIzTNpFAEJWkK1Pg0YYdqAKrCq8lXmBPUVVlX2oAoSVXPWrUq+1ViOaAP/2Q==";var Sn=class{constructor(e){this._id=v.uuid(),this._viewer=e,this._delegate=void 0,this._rotateAmount=0,this._enable=!1,this._heading=0,this._state=d.INITIALIZED}get type(){return"cloud"}set enable(e){!this._viewer.scene.mode!==i.Cesium.SceneMode.SCENE3D&&(this._delegate||this._createPrimitive(),this._enable=this._delegate.show=e,this._enable?this._viewer.scene.postUpdate.addEventListener(this._onRotate,this):this._viewer.scene.postUpdate.removeEventListener(this._onRotate,this))}get enable(){return this._enable}set rotateAmount(e){this._rotateAmount=e}get rotateAmount(){return this._rotateAmount}_onRotate(e,t){this._rotateAmount!==0&&(this._heading+=this._rotateAmount,(this._heading>=360||this._heading<=-360)&&(this._heading=0),this._delegate.modelMatrix=i.Cesium.Transforms.headingPitchRollToFixedFrame(new i.Cesium.Cartesian3,new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(this._heading),0,0)))}_createPrimitive(){this._delegate=new i.Cesium.Primitive({appearance:new i.Cesium.EllipsoidSurfaceAppearance({material:new i.Cesium.Material({fabric:{type:"Image",uniforms:{color:new i.Cesium.Color(1,1,1,1),image:Cp},components:{alpha:"texture(image, fract(repeat * materialInput.st)).r * color.a",diffuse:"vec3(1.0)"}}}),translucent:!0,aboveGround:!0})}),this._delegate.geometryInstances=new i.Cesium.GeometryInstance({geometry:new i.Cesium.EllipsoidGeometry({vertexFormat:i.Cesium.VertexFormat.POSITION_AND_ST,radii:this._viewer.scene.globe.ellipsoid.radii}),id:this._id}),this._delegate.show=this._enable,this._viewer.scene.primitives.add(this._delegate)}},xp=Sn;var In=class{constructor(e){if(!e)throw Error("missing viewer param");this._fog=new gp(e),this._rain=new vp(e),this._snow=new Tp(e),this._cloud=new xp(e)}get fog(){return this._fog}get rain(){return this._rain}get snow(){return this._snow}get cloud(){return this._cloud}},Ep=In;var Mn=class{constructor(e){this._viewer=e,this._enable=!1,this._moveRate=100,this._rotateRate=.01,this._flags={moveForward:!1,moveBackward:!1,moveUp:!1,moveDown:!1,moveLeft:!1,moveRight:!1,turnLeft:!1,turnRight:!1}}set enable(e){this._enable!==e&&this._viewer.scene.mode===i.Cesium.SceneMode.SCENE3D&&(this._enable=e,this._enable?this._bindEvent():this._unbindEvent())}get enable(){return this._enable}set moveRate(e){this._moveRate=e}get moveRate(){return this._moveRate}set rotateRate(e){this._rotateRate=e}get rotateRate(){return this._rotateRate}_bindEvent(){let e=this._viewer.scene.canvas;e.setAttribute("tabindex","0"),e.addEventListener("click",this._onClick.bind(this),!1),this._viewer.clock.onTick.addEventListener(this._onTick,this),document.addEventListener("keydown",this._onKeydown.bind(this),!1),document.addEventListener("keyup",this._onKeyup.bind(this),!1)}_unbindEvent(){Object.keys(this._flags).forEach(t=>{this._flags[t]=!1});let e=this._viewer.scene.canvas;e.removeAttribute("tabindex"),e.removeEventListener("click",this._onClick,!1),this._viewer.clock.onTick.removeEventListener(this._onTick,this),document.removeEventListener("keydown",this._onKeydown,!1),document.removeEventListener("keyup",this._onKeyup,!1)}_getFlagForKeyCode(e){let t;switch(e.keyCode){case 87:case 38:e.shiftKey?t="moveUp":t="moveForward";break;case 83:case 40:e.shiftKey?t="moveDown":t="moveBackward";break;case 65:case 37:t="moveLeft";break;case 68:case 39:t="moveRight";break;case 81:t="turnLeft";break;case 69:t="turnRight";break;default:break}return t}_onClick(){this._viewer.scene.canvas.focus()}_onKeydown(e){let t=this._getFlagForKeyCode(e);t&&(this._flags[t]=!0)}_onKeyup(e){Object.keys(this._flags).forEach(t=>{this._flags[t]=!1})}_onTick(){let e=this._viewer.scene.camera,r=this._viewer.scene.globe.ellipsoid.cartesianToCartographic(e.position).height/this._moveRate,s=i.Cesium.Cartesian3.clone(e.position,new i.Cesium.Cartesian3);this._flags.moveForward&&e.moveForward(r),this._flags.moveBackward&&e.moveBackward(r),this._flags.moveUp&&e.moveUp(r),this._flags.moveDown&&e.moveDown(r),this._flags.moveLeft&&e.moveLeft(r),this._flags.moveRight&&e.moveRight(r),this._flags.turnLeft&&e.rotate(s,-this._rotateRate),this._flags.turnRight&&e.rotate(s,this._rotateRate)}},An=Mn;var Dn=class{constructor(e){this._viewer=e,this._viewOption={},this._cache={},this._activedPath=void 0}_onPostRender(){if(!this._activedPath)return!1;this._activedPath.pathEvent&&this._activedPath.pathEvent.fire(se.POST_RENDER,{viewer:this._viewer,viewOption:this._viewOption})}addPath(e){return e&&!this._cache.hasOwnProperty(e.pathId)&&(e.pathEvent.fire(se.ADD),this._cache[e.pathId]=e),this}addPaths(e){return Array.isArray(e)&&e.forEach(t=>{this.addPath(t)}),this}removePath(e){return e&&this._cache.hasOwnProperty(e.pathId)&&(delete this._cache[e.pathId],e.pathEvent.fire(se.REMOVE)),this}getPath(e){let t=this.getPaths().filter(r=>r.id===e);return t&&t.length?t[0]:void 0}getPaths(){let e=[];return Object.keys(this._cache).forEach(t=>{e.push(this._cache[t])}),e}activate(e,t={}){var r;return!e||(e==null?void 0:e.pathId)===((r=this._activedPath)==null?void 0:r.pathId)||!this._cache.hasOwnProperty(e==null?void 0:e.pathId)?this:(this._viewOption=t,this._activedPath&&this.deactivate(),this._activedPath=e,this._activedPath.pathEvent&&this._activedPath.pathEvent.fire(se.RESET_TIME_LINE),this._viewer.on(A.POST_RENDER,this._onPostRender,this),this)}deactivate(){return this._activedPath&&(this._activedPath.actived=!1),this._activedPath=void 0,this._viewer.off(A.POST_RENDER,this._onPostRender,this),this._viewer.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),this}clear(){return this._cache={},this._activedPath&&(this._activedPath.actived=!1),this._activedPath=void 0,this._viewer.off(A.POST_RENDER,this._onPostRender,this),this._viewer.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),this}},Ln=Dn;var Rn=class{constructor(e,t,r){this._id=v.uuid(),this._bid=void 0,this._positions=_.parsePositions(e),this._duration=t||20,this._pathMode=r||"speed",this._timeLine=[],this._sampledPosition=void 0,this._actived=!1,this._endTime=i.Cesium.JulianDate.now(),this._pathEvent=new Ri,this._pathEvent.on(se.ADD,this._onAdd,this),this._pathEvent.on(se.REMOVE,this._onRemove,this),this._pathEvent.on(se.POST_RENDER,this._onPostRender,this),this._pathEvent.on(se.RESET_TIME_LINE,this._resetTimeLine,this),this._state=d.INITIALIZED}get pathId(){return this._id}set id(e){this._bid=e}get id(){return this._bid}set positions(e){this._positions=_.parsePositions(e)}get positions(){return this._positions}set duration(e){this._duration=e}get duration(){return this._duration}set pathMode(e){this._pathMode=e}get pathMode(){return this._pathMode}get pathEvent(){return this._pathEvent}set actived(e){this._actived=e}get actived(){return this._actived}get state(){return this._state}_onAdd(){this._state=d.ADDED}_onRemove(){this._state=d.REMOVED}_onPostRender({viewer:e,viewOption:t}){if(!this.actived)return!1;let r=i.Cesium.JulianDate.now();if(i.Cesium.JulianDate.lessThan(r,this._endTime)&&this._sampledPosition){let s=this._sampledPosition.getValue(r),o=this._sampledPosition.getValue(i.Cesium.JulianDate.addSeconds(r,.001,new i.Cesium.JulianDate));s&&o&&e.camera.lookAt(s,new i.Cesium.HeadingPitchRange(fe(s,o),i.Cesium.Math.toRadians((t==null?void 0:t.pitch)||-20),(t==null?void 0:t.range)||2e3))}else e.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),this._actived=!1}_resetTimeLine(){if(!this._positions||!this._positions.length)return!1;let e=i.Cesium.JulianDate.now(),t=0,r=[];if(this._pathMode==="speed"){let s=Q(this._positions)/this._duration;r=this._positions.map((o,a,l)=>(a!==0&&(t+=Q([l[a-1],o])/s),i.Cesium.JulianDate.addSeconds(e,t,new i.Cesium.JulianDate)))}else{let s=this._positions.length,o=(this._duration-this._duration%s)/s;r=this._positions.map((a,l)=>i.Cesium.JulianDate.addSeconds(e,l*o,new i.Cesium.JulianDate))}this._sampledPosition=new i.Cesium.SampledPositionProperty,this._sampledPosition.addSamples(r,u.transformWGS84ArrayToCartesianArray(this._positions)),this._sampledPosition.forwardExtrapolationType=i.Cesium.ExtrapolationType.HOLD,this._sampledPosition.setInterpolationOptions({interpolationDegree:2,interpolationAlgorithm:i.Cesium.HermitePolynomialApproximation}),this._endTime=r[r.length-1],this._actived=!0}},On=Rn;var Ru={FP:"1",TP:"2",TRACKED:"tracked",FREE:"free"},Ee=Ru;var kn=class{constructor(e){this._viewer=e,this._cache={},this._delegete=new i.Cesium.CustomDataSource("history-track-layer"),this._viewer.dataSources.add(this._delegete),this._activedTrack=void 0,this._viewOption={},this._stopTime=void 0,this._state=d.INITIALIZED}get delegate(){return this._delegete.entities}get state(){return this._state}_onPostRender(){Object.keys(this._cache).forEach(e=>{let t=this._cache[e];t.trackEvent&&t.trackEvent.fire(re.POST_RENDER,{viewer:this._viewer,viewOption:this._viewOption})}),this._viewer.scene.requestRender()}addTrack(e){return e&&e.trackEvent&&!this._cache.hasOwnProperty(e.trackId)&&(e.trackEvent.fire(re.ADD,this),this._cache[e.trackId]=e),this}addTracks(e){return Array.isArray(e)&&e.forEach(t=>{this.addTrack(t)}),this}getTrack(e){let t=this.getTracks().filter(r=>r.id===e);return t&&t.length?t[0]:void 0}removeTrack(e){return e&&e.trackEvent&&this._cache.hasOwnProperty(e.trackId)&&(e.trackEvent.fire(re.REMOVE,this),delete this._cache[e.trackId]),this}getTracks(){let e=[];return Object.keys(this._cache).forEach(t=>{e.push(this._cache[t])}),e}play(){let e=i.Cesium.JulianDate.now();return Object.keys(this._cache).forEach(t=>{let r=this._cache[t];r.startTime=e,r.viewed=!1}),this._activedTrack=void 0,this._stopTime=void 0,this._viewer.off(A.POST_RENDER,this._onPostRender,this),this._viewer.on(A.POST_RENDER,this._onPostRender,this),this._state=d.PLAY,this}pause(){return this._stopTime=i.Cesium.JulianDate.now(),this._viewer.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),this._viewer.delegate.trackedEntity=void 0,this._viewer.off(A.POST_RENDER,this._onPostRender,this),this._state=d.PAUSE,this}restore(){if(this._state!==d.PAUSE)return this;if(this._stopTime){let e=i.Cesium.JulianDate.now();Object.keys(this._cache).forEach(t=>{this._cache[t].trackEvent.fire(re.RESET_TIME_LINE,{stopTime:this._stopTime,duration:i.Cesium.JulianDate.secondsDifference(e,this._stopTime)})})}return this._viewer.off(A.POST_RENDER,this._onPostRender,this),this._viewer.on(A.POST_RENDER,this._onPostRender,this),this._state=d.PLAY,this}viewTrack(e,t={}){if(!this._cache.hasOwnProperty(e.trackId))throw new Error("TrackController: track does not added ");return this._viewOption=t,this._activedTrack&&(this._activedTrack.viewed=!1),e.viewed=!0,this._activedTrack=e,t.mode===Ee.FREE&&(this._viewer.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),this._viewer.delegate.trackedEntity=void 0),this}releaseTrack(e){if(!this._cache.hasOwnProperty(e.trackId))throw new Error("TrackController: track does not added ");return e.viewed&&(e.viewed=!1),this._activedTrack=void 0,this._viewer.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),this._viewer.delegate.trackedEntity=void 0,this}clear(){return Object.keys(this._cache).forEach(e=>{this.removeTrack(this._cache[e])}),this._activedTrack&&(this._activedTrack.viewed=!1),this._activedTrack=void 0,this._viewer.off(A.POST_RENDER,this._onPostRender,this),this._viewer.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),this._viewer.delegate.trackedEntity=void 0,this}},Fn=kn;var Ou={clampToGround:!1,clampToTileset:!1,interpolationType:"Linear",interpolationDegree:2,endDelayTime:.5,headingOffset:0},ku={width:2,material:i.Cesium.Color.ORANGE,clampToGround:!0,depthFailMaterial:i.Cesium.Color.ORANGE.withAlpha(.8)},zn=class{constructor(e,t,r,s){this._id=v.uuid(),this._bid=void 0,this._positions=_.parsePositions(e),this._duration=t||20,this._callback=r,this._options={...Ou,...s},this._controller=void 0,this._sampledPosition=void 0,this._velocityOrientation=void 0,this._viewed=!1,this._delegate=new i.Cesium.Entity,this._pathPositions=[],this._path=new i.Cesium.Entity({show:!1,polyline:{positions:new i.Cesium.CallbackProperty(()=>this._pathPositions,!1)}}),this._positionIndex=0,this._timeLine=[],this._startTime=void 0,this._endTime=void 0,this._trackEvent=new Di,this._trackEvent.on(re.POST_RENDER,this._onPostRender,this),this._trackEvent.on(re.ADD,this._onAdd,this),this._trackEvent.on(re.REMOVE,this._onRemove,this),this._trackEvent.on(re.RESET_TIME_LINE,this._resetTimeLine,this),this._state=d.INITIALIZED}get currentDistance(){return Q(_.parsePositions(this._pathPositions))}get currentPosition(){let[e]=this._pathPositions.slice(-1);return _.parsePosition(e)}get allDistance(){return Q(this._positions)}get trackId(){return this._id}set id(e){this._bid=e}get id(){return this._bid}set positions(e){this._positions=_.parsePositions(e),this._resetTimeLine({})}get positions(){return this._positions}set duration(e){this._duration=e,this._resetTimeLine({})}get duration(){return this._duration}set startTime(e){e instanceof Date?this._startTime=i.Cesium.JulianDate.fromDate(e):this._startTime=e,this._resetTimeLine({})}get startTime(){return this._startTime}set viewed(e){this._viewed=e}get viewed(){return this._viewed}get trackEvent(){return this._trackEvent}get state(){return this._state}_onAdd(e){if(!e)return!1;this._controller=e,this._controller.delegate.add(this._delegate),this._controller.delegate.add(this._path),!this._startTime&&(this._startTime=i.Cesium.JulianDate.now()),this._state=d.ADDED}_onRemove(){if(!this._controller)return!1;this._controller.delegate.remove(this._delegate),this._controller.delegate.remove(this._path),this._viewed=!1,this._startTime=void 0,this._state=d.REMOVED}_onPostRender({viewer:e,viewOption:t}){if(!this._startTime||!this._endTime)return!1;let r=i.Cesium.JulianDate.now();if(i.Cesium.JulianDate.lessThanOrEquals(r,this._endTime)){let s=this._sampledPosition.getValue(r);if(!s)return!1;this._pathPositions.push(s),this._options.clampToTileset?this._delegate.position=e.scene.clampToHeight(s,[this._delegate]):this._delegate.position=s;let o=this._velocityOrientation.getValue(r);if(o){let l=i.Cesium.Quaternion.fromHeadingPitchRoll(new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(this._options.headingOffset||0),0,0),new i.Cesium.Quaternion);this._delegate.orientation=i.Cesium.Quaternion.multiply(o,l,new i.Cesium.Quaternion)}let a=this._timeLine[this._positionIndex];if(a){let l=i.Cesium.JulianDate.secondsDifference(r,a);if(l>=0&&l<=1){let h=this._positions[this._positionIndex]||void 0;if(h&&o){let c=i.Cesium.Matrix3.fromQuaternion(o),p=i.Cesium.Matrix4.fromRotationTranslation(c,s),f=i.Cesium.Transforms.fixedFrameToHeadingPitchRoll(p);h.heading=i.Cesium.Math.toDegrees(f.heading),h.pitch=i.Cesium.Math.toDegrees(f.pitch),h.roll=i.Cesium.Math.toDegrees(f.roll)}this._callback&&this._callback(h,this._positionIndex+1===this._positions.length),this._positionIndex++,this._options.loop&&this._positionIndex===this._positions.length&&this._restart()}}}this._setCameraView(e,t)}_restart(){this._startTime=i.Cesium.JulianDate.now(),this._resetTimeLine({})}_setCameraView(e,t){var s,o,a;if(!this._viewed)return!1;let r=i.Cesium.JulianDate.now();if(i.Cesium.JulianDate.greaterThan(r,this._endTime))e.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),e.delegate.trackedEntity&&(e.delegate.trackedEntity=void 0),this._viewed=!1;else{let l=this._sampledPosition.getValue(r),h=this._sampledPosition.getValue(i.Cesium.JulianDate.addSeconds(r,1/60,new i.Cesium.JulianDate));l&&h&&((t==null?void 0:t.mode)===Ee.TRACKED&&((o=(s=e.delegate)==null?void 0:s.trackedEntity)==null?void 0:o.id)!==((a=this._delegate)==null?void 0:a.id)?e.delegate.trackedEntity=this._delegate:(t==null?void 0:t.mode)===Ee.FP?e.camera.lookAt(l,new i.Cesium.HeadingPitchRange(fe(l,h),i.Cesium.Math.toRadians((t==null?void 0:t.pitch)||0),(t==null?void 0:t.range)||10)):(t==null?void 0:t.mode)===Ee.TP&&e.camera.lookAt(l,new i.Cesium.HeadingPitchRange(0,i.Cesium.Math.toRadians((t==null?void 0:t.pitch)||-90),(t==null?void 0:t.range)||1e3)))}}_resetTimeLine(e){var r;if(!this._startTime||!this._duration||!((r=this._positions)!=null&&r.length))return!1;let t=0;if(!(e!=null&&e.stopTime)&&!(e!=null&&e.duration)){let s=Q(this._positions)/this._duration;this._timeLine=this._positions.map((o,a,l)=>(a!==0&&(t+=Q([l[a-1],o])/s),i.Cesium.JulianDate.addSeconds(this._startTime,t,new i.Cesium.JulianDate))),this._pathPositions=[],this._positionIndex=0}else e!=null&&e.stopTime&&(e!=null&&e.duration)&&(this._duration+=e.duration,this._timeLine=this._timeLine.map(s=>(i.Cesium.JulianDate.greaterThan(s,e.stopTime)&&(s=i.Cesium.JulianDate.addSeconds(s,e.duration,new i.Cesium.JulianDate)),s)));this._sampledPosition=new i.Cesium.SampledPositionProperty,this._sampledPosition.addSamples(this._timeLine,u.transformWGS84ArrayToCartesianArray(this._positions)),this._sampledPosition.forwardExtrapolationType=i.Cesium.ExtrapolationType.HOLD,this._options.interpolationType==="Hermite"?this._sampledPosition.setInterpolationOptions({interpolationDegree:this._options.interpolationDegree||2,interpolationAlgorithm:i.Cesium.HermitePolynomialApproximation}):this._options.interpolationType==="Linear"?this._sampledPosition.setInterpolationOptions({interpolationDegree:this._options.interpolationDegree||1,interpolationAlgorithm:i.Cesium.LinearApproximation}):this._options.interpolationType==="Lagrange"&&this._sampledPosition.setInterpolationOptions({interpolationDegree:this._options.interpolationDegree||5,interpolationAlgorithm:i.Cesium.LagrangePolynomialApproximation}),this._velocityOrientation=new i.Cesium.VelocityOrientationProperty(this._sampledPosition),this._endTime=i.Cesium.JulianDate.addSeconds(this._timeLine[this._timeLine.length-1],this._options.endDelayTime,new i.Cesium.JulianDate)}addPosition(e,t){return this._positions.push(_.parsePosition(e)),this._duration+=t,this._resetTimeLine({}),this}setModel(e,t){return this._delegate.model={...t,uri:e,heightReference:this._options.clampToGround?i.Cesium.HeightReference.CLAMP_TO_GROUND:i.Cesium.HeightReference.NONE},this}setBillboard(e,t){return this._delegate.billboard={...t,image:e,heightReference:this._options.clampToGround?i.Cesium.HeightReference.CLAMP_TO_GROUND:i.Cesium.HeightReference.NONE},this}setLabel(e,t){return this._delegate.label={...t,text:e,heightReference:this._options.clampToGround?i.Cesium.HeightReference.CLAMP_TO_GROUND:i.Cesium.HeightReference.NONE},this}setPath(e,t={}){return this._path.show=!!e,v.merge(this._path.polyline,ku,t),this}},Hn=zn;var Fu={ANGLE:"angle",AREA:"area",AREA_HEIGHT:"area_height",AREA_SURFACE:"area_surface",DISTANCE:"distance",DISTANCE_SURFACE:"distance_surface",HEADING:"heading",HEIGHT:"height",TRIANGLE_HEIGHT:"triangle_height"},ie=Fu;var Nn=class{constructor(e){this._style=e,this._viewer=void 0,this._layer=void 0,this._delegate=void 0,this._options={},this._positions=[]}get drawTool(){return this._viewer.drawTool}_mountedHook(){}_onDrawAnchor(e){}_onAnchorMoving(e){this._positions.pop(),this._positions.push(e),this._options.onCalc&&this._options.onCalc(this._positions)}_onDrawStop(){this._unbindEvent(),this._viewer.drawTool.deactivate(),this._options.onDrawStop&&this._options.onDrawStop(this._delegate)}_bindEvent(){this.drawTool.on(C.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.on(C.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.on(C.DRAW_STOP,this._onDrawStop,this)}_unbindEvent(){this.drawTool.off(C.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.off(C.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.off(C.DRAW_STOP,this._onDrawStop,this)}start(e,t){return this._viewer=e.viewer,this._layer=e.layer,this._options=t,this._viewer.editTool.deactivate(),this._viewer.drawTool.activate(t),this._mountedHook(),this._unbindEvent(),this._bindEvent(),this}},ei=Nn;var Wn=class extends ei{constructor(e){super(e)}_mountedHook(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D,\u53F3\u51FB\u7ED3\u675F",this._delegate=new i.Cesium.Entity({polyline:{...this._style,positions:new i.Cesium.CallbackProperty(()=>this._positions,!1)}}),this._layer.entities.add(this._delegate)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),t>0&&this.drawTool.fire(C.CREATE_ANCHOR,{position:e}),t>=this._options.maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(C.DRAW_STOP,e))}},oe=Wn;var Gn=class{constructor(e){this._viewer=void 0,this._layer=void 0,this._overlay=e,this._delegate=new i.Cesium.Entity,this._delegate.merge(e),this._options={},this._positions=[]}get editTool(){return this._viewer.editTool}_mountedHook(){}_mountAnchor(){}_onAnchorMoving({pickedAnchor:e,position:t}){}_onEditAnchorStop({pickedAnchor:e,position:t}){}_onEditStop({pickedAnchor:e,position:t}){this._unbindEvent(),this._viewer.editTool.deactivate()}_bindEvent(){return this.editTool.on(C.ANCHOR_MOVING,this._onAnchorMoving,this),this.editTool.on(C.EDIT_ANCHOR_STOP,this._onEditAnchorStop,this),this.editTool.on(C.EDIT_STOP,this._onEditStop,this),this}_unbindEvent(){this.editTool.off(C.ANCHOR_MOVING,this._onAnchorMoving,this),this.editTool.off(C.EDIT_ANCHOR_STOP,this._onEditAnchorStop,this),this.editTool.off(C.EDIT_STOP,this._onEditStop,this)}start(e,t){return this._viewer=e.viewer,this._layer=e.layer,this._options=t,this._viewer.editTool.deactivate(),this._viewer.editTool.activate(t),this._mountedHook(),this._mountAnchor(),this._unbindEvent(),this._bindEvent(),this}},ti=Gn;var Un=class extends ti{constructor(e){super(e)}_mountedHook(){this.editTool.tooltipMess="\u70B9\u51FB\u951A\u70B9\u79FB\u52A8,\u53F3\u51FB\u7ED3\u675F\u7F16\u8F91",this._delegate.polyline.positions=new i.Cesium.CallbackProperty(()=>this._positions.length>1?this._positions:null,!1),this._layer.entities.add(this._delegate)}_mountAnchor(){let e=[].concat(this._overlay.polyline.positions.getValue(i.Cesium.JulianDate.now()));if(this._options.maxAnchorSize>2){for(let t=0;t<e.length-1;t++){let r=k(e[t],e[t+1]);this._positions.push(e[t]),this._positions.push(r)}this._positions.push(e[e.length-1]),this._positions.forEach((t,r)=>{this.editTool.fire(C.CREATE_ANCHOR,{position:t,index:r,isMid:r%2!==0})})}else this._positions=e,this._positions.forEach((t,r)=>{this.editTool.fire(C.CREATE_ANCHOR,{position:t,index:r})});this._layer.entities.remove(this._overlay)}_onEditAnchorStop({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.Cesium.JulianDate.now()),s=r.index;if(r.isMid){let o=k(this._positions[s],this._positions[s-1]),a=k(this._positions[s],this._positions[s+1]);this._positions.splice(s,1,o,t,a),this.editTool.fire(C.CLEAR_ANCHOR),this._positions.forEach((l,h)=>{this.editTool.fire(C.CREATE_ANCHOR,{position:l,index:h,isMid:h%2!==0})})}}_onAnchorMoving({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.Cesium.JulianDate.now()),s=r.index;if(this._positions[s]=t,!r.isMid&&this._options.maxAnchorSize>2){let o=-1,a=-1,l=-1,h=-1,c=this._positions.length;if(s===0?(l=s+2,h=s+1):r.index===c-1?(o=s-2,a=s-1):(o=s-2,a=s-1,l=s+2,h=s+1),o>0){let p=k(this._positions[o],this._positions[s]);this._positions[a]=p,this.editTool.fire(C.UPDATE_ANCHOR,{index:a,position:p})}if(l>0){let p=k(this._positions[l],this._positions[s]);this._positions[h]=p,this.editTool.fire(C.UPDATE_ANCHOR,{index:h,position:p})}}this._options.onCalc&&this._options.onCalc(this._positions)}},ae=Un;var Bn=class{constructor(){this._viewer=void 0,this._layer=void 0,this._startLabel=new i.Cesium.Entity({label:{text:"\u5F00\u59CB",font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._resultLabel=new i.Cesium.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._options={}}_getSampledHeight(e,t=!1){let r=this._viewer.terrainProvider&&!(this._viewer.terrainProvider instanceof i.Cesium.EllipsoidTerrainProvider)?i.Cesium.sampleTerrainMostDetailed(this._viewer.terrainProvider,e.map(o=>i.Cesium.Cartographic.fromCartesian(o))):Promise.resolve(e.map(o=>i.Cesium.Cartographic.fromCartesian(o))),s=this._viewer.scene.clampToHeightSupported&&t?this._viewer.scene.clampToHeightMostDetailed(e,this._layer.entities.values):Promise.resolve(e);return Promise.all([r,s])}_onDrawStop(e){}_onCalc(e){}_startHook(e,t){this._viewer=e.viewer,this._layer=e.layer,this._options=t,this._options.onDrawStop=this._onDrawStop.bind(this),this._options.onCalc=this._onCalc.bind(this),this._layer.entities.add(this._startLabel),this._layer.entities.add(this._resultLabel)}start(e,t){return this}},q=Bn;var Vn=class extends q{constructor(){super(),this._maxAnchorSize=2,this._helpLinePositions=[],this._helpLine=new i.Cesium.Entity({polyline:{positions:new i.Cesium.CallbackProperty(()=>this._helpLinePositions.length>1?this._helpLinePositions:null,!1)}})}_onDrawStop(e){new ae(e).start({viewer:this._viewer,layer:this._layer},{...this._options,maxAnchorSize:this._maxAnchorSize})}_onCalc(e){if(e.length>0&&(this._startLabel.position=e[0]),e.length>1){this._resultLabel.position=e[1];let t=i.Cesium.Ellipsoid.WGS84.geodeticSurfaceNormal(e[0],new i.Cesium.Cartesian3),r=i.Cesium.Plane.fromPointNormal(e[0],t);this._helpLinePositions=[e[0],i.Cesium.Plane.projectPointOntoPlane(r,e[1],new i.Cesium.Cartesian3),e[1]];let s=Math.abs(i.Cesium.Plane.getPointDistance(r,e[1]));this._resultLabel.label.text=`\u89D2\u5EA6\uFF1A${i.Cesium.Math.toDegrees(Math.asin(s/i.Cesium.Cartesian3.distance(e[0],e[1]))).toFixed(2)} \u5EA6`}}start(e,t){this._startHook(e,t);let r=new i.Cesium.PolylineDashMaterialProperty({color:i.Cesium.Color.GREENYELLOW});return this._helpLine.polyline.material=r,this._helpLine.polyline.depthFailMaterial=r,this._layer.entities.add(this._helpLine),new oe({material:t.material||i.Cesium.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.Cesium.PolylineDashMaterialProperty({color:i.Cesium.Color.YELLOW.withAlpha(.6)}),width:t.width||2,clampToGround:!1}).start(e,{...t,maxAnchorSize:this._maxAnchorSize}),this}},Pp=Vn;var jn=class extends ei{constructor(e){super(e)}_mountedHook(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D,\u53F3\u51FB\u7ED3\u675F",this._delegate=new i.Cesium.Entity({polygon:{...this._style,hierarchy:new i.Cesium.CallbackProperty(()=>this._positions.length>2?new i.Cesium.PolygonHierarchy(this._positions.map(e=>e.clone())):null,!1)}}),this._layer.entities.add(this._delegate)}_onDrawAnchor(e){this._positions.push(e),this.drawTool.fire(C.CREATE_ANCHOR,{position:e})}},Ge=jn;var Yn=class extends ti{constructor(e){super(e)}_mountedHook(){this.editTool.tooltipMess="\u70B9\u51FB\u951A\u70B9\u79FB\u52A8,\u53F3\u51FB\u7ED3\u675F\u7F16\u8F91",this._delegate.polygon.hierarchy=new i.Cesium.CallbackProperty(e=>this._positions.length>2?new i.Cesium.PolygonHierarchy(this._positions):null,!1),this._layer.entities.add(this._delegate)}_mountAnchor(){let e=[].concat(this._overlay.polygon.hierarchy.getValue(i.Cesium.JulianDate.now()).positions);e.push(e[0]);for(let t=0;t<e.length-1;t++){let r=k(e[t],e[t+1]);this._positions.push(e[t]),this._positions.push(r)}this._positions.forEach((t,r)=>{this.editTool.fire(C.CREATE_ANCHOR,{position:t,index:r,isMid:r%2!==0})}),this._layer.entities.remove(this._overlay)}_onEditAnchorStop({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.Cesium.JulianDate.now()),s=r.index;if(r.isMid){let o,a,l=this._positions.length;s===l-1?(o=k(this._positions[s],this._positions[s-1]),a=k(this._positions[s],this._positions[0])):(o=k(this._positions[s],this._positions[s-1]),a=k(this._positions[s],this._positions[s+1])),this._positions.splice(s,1,o,t,a),this.editTool.fire(C.CLEAR_ANCHOR),this._positions.forEach((h,c)=>{this.editTool.fire(C.CREATE_ANCHOR,{position:h,index:c,isMid:c%2!==0})})}}_onAnchorMoving({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.Cesium.JulianDate.now()),s=r.index;this._positions[s]=t;let o=this._positions.length;if(!r.isMid){let a=-1,l=-1,h=-1,c=-1;s===0?(a=o-2,l=o-1,h=s+2,c=s+1):s===o-2?(a=s-2,l=s-1,h=0,c=o-1):(a=s-2,l=s-1,h=s+2,c=s+1);let p=k(this._positions[a],this._positions[s]),f=k(this._positions[h],this._positions[s]);this._positions[l]=p,this._positions[c]=f,this.editTool.fire(C.UPDATE_ANCHOR,{index:l,position:p}),this.editTool.fire(C.UPDATE_ANCHOR,{index:c,position:f})}this._options.onCalc&&this._options.onCalc(this._positions)}},Ue=Yn;var Zn=class extends q{constructor(){super()}_onDrawStop(e){new Ue(e).start({viewer:this._viewer,layer:this._layer},this._options)}_onCalc(e){var t;e.length>2&&(this._resultLabel.position=(t=i.Cesium.BoundingSphere.fromPoints(e))==null?void 0:t.center,this._resultLabel.label.text=`\u9762\u79EF\uFF1A${ue(e).toFixed(2)} \u5E73\u65B9\u7C73`)}start(e,t){return this._startHook(e,t),new Ge({material:t.material||i.Cesium.Color.YELLOW.withAlpha(.6),perPositionHeight:!0}).start(e,this._options),this}},bp=Zn;var qn=class extends q{constructor(){super()}_onDrawStop(e){new Ue(e).start({viewer:this._viewer,layer:this._layer},this._options)}_lerp(e,t=4){let r=[];for(let s=0;s<t;++s)for(let o=0;o<t;++o){let a=i.Cesium.Math.lerp(e.west,e.east,o/(t-1)),l=i.Cesium.Math.lerp(e.south,e.north,s/(t-1));r.push(i.Cesium.Cartesian3.fromRadians(a,l))}return r}_onCalc(e){if(e.length>2){let t=this._lerp(i.Cesium.Rectangle.fromCartesianArray(e),this._options.lerpNum);this._getSampledHeight(t,!0).then(([r,s])=>r.map((o,a)=>({lng:o.longitude,lat:o.latitude,alt:Math.max(o.height||0,s[a]?i.Cesium.Cartographic.fromCartesian(s[a]).height:0)}))).then(r=>{let s=0,o;r.forEach(a=>{a.alt>s&&(s=a.alt,o=a)}),o&&(this._resultLabel.position=i.Cesium.Cartesian3.fromRadians(o.lng,o.lat,o.alt),this._resultLabel.label.text=`\u9AD8\u5EA6\uFF1A${s.toFixed(2)} \u7C73`)})}}start(e,t){return this._startHook(e,t),new Ge({material:t.material||i.Cesium.Color.YELLOW.withAlpha(.6)}).start(e,this._options),this}},Sp=qn;var Xn=class extends q{constructor(){super()}_lerp(e,t=4){let r=[];for(let s=0;s<t;++s)for(let o=0;o<t;++o){let a=i.Cesium.Math.lerp(e.west,e.east,o/(t-1)),l=i.Cesium.Math.lerp(e.south,e.north,s/(t-1));r.push(i.Cesium.Cartesian3.fromRadians(a,l))}return r}_onDrawStop(e){new Ue(e).start({viewer:this._viewer,layer:this._layer},this._options)}_onCalc(e){var t;if(e.length>2){this._resultLabel.position=(t=i.Cesium.BoundingSphere.fromPoints(e))==null?void 0:t.center;let r=this._lerp(i.Cesium.Rectangle.fromCartesianArray(e),this._options.lerpNum);this._getSampledHeight(r.concat(e),!1).then(([s])=>s.map(o=>i.Cesium.Cartesian3.fromDegrees(i.Cesium.Math.toDegrees(o.longitude),i.Cesium.Math.toDegrees(o.latitude),o.height))).then(s=>{this._resultLabel.label.text=`\u9762\u79EF\uFF1A${ue(s).toFixed(2)} \u5E73\u65B9\u7C73`})}}start(e,t){return this._startHook(e,t),new Ge({material:t.material||i.Cesium.Color.YELLOW.withAlpha(.6)}).start(e,this._options),this}},Ip=Xn;var Jn=class extends q{constructor(){super(),this._maxAnchorSize=9999}_onDrawStop(e){new ae(e).start({viewer:this._viewer,layer:this._layer},{...this._options,maxAnchorSize:this._maxAnchorSize})}_onCalc(e){if(e.length>0&&(this._startLabel.position=e[0]),e.length>1){this._resultLabel.position=e[e.length-1];let t=0;for(let r=0;r<e.length-1;r++){let s=i.Cesium.Cartesian3.distance(e[r],e[r+1]);t+=s}this._resultLabel.label.text=t>1e3?`\u8DDD\u79BB\uFF1A${(t/1e3).toFixed(2)} \u516C\u91CC`:`\u8DDD\u79BB\uFF1A${t.toFixed(2)} \u7C73`}}start(e,t){return this._startHook(e,t),new oe({material:t.material||i.Cesium.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.Cesium.PolylineDashMaterialProperty({color:i.Cesium.Color.YELLOW.withAlpha(.6)}),width:t.width||2,clampToGround:!1}).start(e,{...t,maxAnchorSize:this._maxAnchorSize}),this}},Mp=Jn;var Kn=class extends q{constructor(){super(),this._maxAnchorSize=9999}_lerp(e,t,r=5){let s=[],o=i.Cesium.Cartographic.fromCartesian(e),a=i.Cesium.Cartographic.fromCartesian(t);for(let l=0;l<r;l++){let h=i.Cesium.Math.lerp(o.longitude,a.longitude,l/r),c=i.Cesium.Math.lerp(o.latitude,a.latitude,l/r),p=o.height-(o.height-a.height)*(l/r);s.push(i.Cesium.Cartesian3.fromRadians(h,c,p))}return s}_onDrawStop(e){new ae(e).start({viewer:this._viewer,layer:this._layer},{...this._options,maxAnchorSize:this._maxAnchorSize})}_onCalc(e){if(e.length>0&&(this._startLabel.position=e[0]),e.length>1){let t=[e[0]];this._resultLabel.position=e[e.length-1];for(let r=0;r<e.length-1;r++)t=t.concat(this._lerp(e[r],e[r+1],this._options.lerpNum));t.push(e[e.length-1]),this._getSampledHeight(t).then(([r,s])=>r.map((o,a)=>i.Cesium.Cartesian3.fromDegrees(i.Cesium.Math.toDegrees(o.longitude),i.Cesium.Math.toDegrees(o.latitude),Math.max(o.height||0,s[a]?i.Cesium.Cartographic.fromCartesian(s[a]).height:0)))).then(r=>{let s=0;for(let o=0;o<r.length-1;o++){let a=i.Cesium.Cartesian3.distance(r[o],r[o+1]);s+=a}this._resultLabel.label.text=s>1e3?`\u8DDD\u79BB\uFF1A${(s/1e3).toFixed(2)} \u516C\u91CC`:`\u8DDD\u79BB\uFF1A${s.toFixed(2)} \u7C73`})}}start(e,t){return this._startHook(e,t),new oe({material:t.material||i.Cesium.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.Cesium.PolylineDashMaterialProperty({color:i.Cesium.Color.YELLOW.withAlpha(.6)}),width:t.width||2,clampToGround:!0}).start(e,{...this._options,maxAnchorSize:this._maxAnchorSize}),this}},Ap=Kn;var Qn=class extends q{constructor(){super(),this._maxAnchorSize=2}_onDrawStop(e){new ae(e).start({viewer:this._viewer,layer:this._layer},{...this._options,maxAnchorSize:this._maxAnchorSize})}_onCalc(e){e.length>0&&(this._startLabel.position=e[0]),e.length>1&&(this._resultLabel.position=e[e.length-1],this._resultLabel.label.text=`\u504F\u822A\uFF1A${i.Cesium.Math.toDegrees(fe(e[0],e[1])).toFixed(1)} \u5EA6`)}start(e,t){return this._startHook(e,t),new oe({material:t.material||i.Cesium.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.Cesium.PolylineDashMaterialProperty({color:i.Cesium.Color.YELLOW.withAlpha(.6)}),width:t.width||2}).start(e,{...this._options,maxAnchorSize:this._maxAnchorSize}),this}},Dp=Qn;var $n=class extends q{constructor(){super(),this._maxAnchorSize=2,this._helpLinePositions=[],this._helpLine=new i.Cesium.Entity({polyline:{positions:new i.Cesium.CallbackProperty(()=>this._helpLinePositions.length>1?this._helpLinePositions:null,!1)}})}_onDrawStop(e){new ae(e).start({viewer:this._viewer,layer:this._layer},{...this._options,maxAnchorSize:this._maxAnchorSize})}_onCalc(e){if(e.length>0&&(this._startLabel.position=e[0]),e.length>1){this._resultLabel.position=e[1];let t=i.Cesium.Ellipsoid.WGS84.geodeticSurfaceNormal(e[0],new i.Cesium.Cartesian3),r=i.Cesium.Plane.fromPointNormal(e[0],t);this._helpLinePositions=[e[0],i.Cesium.Plane.projectPointOntoPlane(r,e[1],new i.Cesium.Cartesian3),e[1]];let s=Math.abs(i.Cesium.Plane.getPointDistance(r,e[1]));this._resultLabel.label.text=`\u9AD8\u5EA6\uFF1A${s.toFixed(2)} \u7C73`}}start(e,t){this._startHook(e,t);let r=new i.Cesium.PolylineDashMaterialProperty({color:i.Cesium.Color.GREENYELLOW});return this._helpLine.polyline.material=r,this._helpLine.polyline.depthFailMaterial=r,this._layer.entities.add(this._helpLine),new oe({material:t.material||i.Cesium.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.Cesium.PolylineDashMaterialProperty({color:i.Cesium.Color.YELLOW.withAlpha(.6)}),width:t.width||2}).start(e,{...this._options,maxAnchorSize:this._maxAnchorSize}),this}},Lp=$n;var el=class extends q{constructor(){super(),this._maxAnchorSize=2,this._helpLinePositions=[],this._helpLine=new i.Cesium.Entity({polyline:{positions:new i.Cesium.CallbackProperty(()=>this._helpLinePositions.length>1?this._helpLinePositions:null,!1)}}),this._lengthLabel=new i.Cesium.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._heightLabel=new i.Cesium.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._distanceLabel=new i.Cesium.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}})}_onDrawStop(e){new ae(e).start({viewer:this._viewer,layer:this._layer},{...this._options,maxAnchorSize:this._maxAnchorSize})}_onCalc(e){if(e.length>0&&(this._startLabel.position=e[0]),e.length>1){let t=i.Cesium.Ellipsoid.WGS84.geodeticSurfaceNormal(e[0],new i.Cesium.Cartesian3),r=i.Cesium.Plane.fromPointNormal(e[0],t),s=i.Cesium.Plane.projectPointOntoPlane(r,e[1],new i.Cesium.Cartesian3);this._helpLinePositions=[e[0],s,e[1]];let o=i.Cesium.Cartesian3.distance(e[0],s),a=Math.abs(i.Cesium.Plane.getPointDistance(r,e[1])),l=i.Cesium.Cartesian3.distance(e[0],e[1]);this._lengthLabel.position=i.Cesium.Cartesian3.midpoint(e[0],s,new i.Cesium.Cartesian3),this._lengthLabel.label.text=o>1e3?`${(o/1e3).toFixed(2)} \u516C\u91CC`:`${o.toFixed(2)} \u7C73`,this._distanceLabel.position=i.Cesium.Cartesian3.midpoint(e[0],e[1],new i.Cesium.Cartesian3),this._distanceLabel.label.text=l>1e3?`${(l/1e3).toFixed(2)} \u516C\u91CC`:`${l.toFixed(2)} \u7C73`,this._heightLabel.position=i.Cesium.Cartesian3.midpoint(s,e[1],new i.Cesium.Cartesian3),this._heightLabel.label.text=a>1e3?`${(a/1e3).toFixed(2)} \u516C\u91CC`:`${a.toFixed(2)} \u7C73`}}start(e,t){this._startHook(e,t);let r=new i.Cesium.PolylineDashMaterialProperty({color:i.Cesium.Color.GREENYELLOW});return this._helpLine.polyline.material=r,this._helpLine.polyline.depthFailMaterial=r,this._layer.entities.add(this._helpLine),this._layer.entities.add(this._lengthLabel),this._layer.entities.add(this._heightLabel),this._layer.entities.add(this._distanceLabel),new oe({material:t.material||i.Cesium.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.Cesium.PolylineDashMaterialProperty({color:i.Cesium.Color.YELLOW.withAlpha(.6)}),width:t.width||2,clampToGround:!1}).start(e,{...t,maxAnchorSize:this._maxAnchorSize}),this}},Rp=el;var tl=class{constructor(e){if(!e)throw Error("missing viewer param");this._viewer=e,this._layer=new i.Cesium.CustomDataSource("measure-layer"),this._viewer.dataSources.add(this._layer)}get viewer(){return this._viewer}get layer(){return this._layer}angle(e={}){return new Pp().start(this,e),this}area(e={}){return new bp().start(this,e),this}areaHeight(e={}){return new Sp().start(this,e),this}areaSurface(e={}){return new Ip().start(this,e),this}distance(e={}){return new Mp().start(this,e),this}distanceSurface(e={}){return new Ap().start(this,e),this}heading(e={}){return new Dp().start(this,e),this}height(e={}){return new Lp().start(this,e),this}triangleHeight(e={}){return new Rp().start(this,e),this}activate(e,t){switch(e){case ie.ANGLE:this.angle(t);break;case ie.AREA:this.area(t);break;case ie.AREA_HEIGHT:this.areaHeight(t);break;case ie.AREA_SURFACE:this.areaSurface(t);break;case ie.DISTANCE:this.distance(t);break;case ie.DISTANCE_SURFACE:this.distanceSurface(t);break;case ie.HEADING:this.heading(t);break;case ie.HEIGHT:this.height(t);break;case ie.TRIANGLE_HEIGHT:this.triangleHeight(t);break;default:break}return this}deactivate(){return this._layer.entities.removeAll(),this._viewer.drawTool.tooltipMess="",this._viewer.drawTool.deactivate(),this._viewer.editTool.tooltipMess="",this._viewer.editTool.deactivate(),this}},il=tl;var zu={SIGHT_LINE:"sightLine"},lt=zu;var Hu={PROFILE:"profile"},ht=Hu;var rl=class{constructor(e){this._id=v.uuid(),this._viewer=e,this._delegate=void 0,this._enable=!1,this._color=i.Cesium.Color.YELLOW,this._width=1,this._spacing=100,this._state=d.INITIALIZED}get type(){return"contourLine"}set enable(e){this._enable=e,e&&this._viewer?this._createAnalysis():(this._delegate&&(this._delegate=null),this._viewer&&(this._viewer.scene.globe.material=null))}get enable(){return this._enable}set color(e){this._color=e,this._delegate&&(this._delegate.uniforms.color=e)}get color(){return this._color}set width(e){this._width=e,this._delegate&&(this._delegate.uniforms.width=e)}get width(){return this._width}set spacing(e){this._spacing=e,this._delegate&&(this._delegate.uniforms.spacing=e)}get spacing(){return this._spacing}_init(e,t,r){this._enable=!0,this._color=e||i.Cesium.Color.YELLOW,this._width=t||1,this._spacing=r||100,this._enable&&this._viewer&&this._createAnalysis()}deactivate(){this._enable=!1,this._delegate&&(this._delegate=null),this._viewer&&(this._viewer.scene.globe.material=null)}_createAnalysis(){let e=this._viewer.scene.globe,t=i.Cesium.Material.fromType("ElevationContour"),r=t.uniforms;r.width=this._width,r.spacing=this._spacing,r.color=this._color,e.material=t,this._delegate=t}},Op=rl;var sl=class{constructor(e){this._id=v.uuid(),this._viewer=e,this._enable=!1,this._positions=[],this._maxDistance=5,this._speed=1e3,this._maxHeight=20,this._inRangeColor=i.Cesium.Color.YELLOW,this._outRangeColor=i.Cesium.Color.WHITE,this._state=d.INITIALIZED}get type(){return"tilesetShake"}set enable(e){this._enable=e,this.tileset_arr.forEach(t=>{let r=null;this._enable?r=this._getShader(t.tileset2):r=new window.GM.CustomShader,t.tileset.setCustomShader(r)})}get enable(){return this._enable}set maxDistance(e){this._maxDistance=e,this._enable&&this._changeSettings()}get maxDistance(){return this._maxDistance}set speed(e){this._speed=e,this._enable&&this._changeSettings()}get speed(){return this._speed}set maxHeight(e){this._maxHeight=e,this._enable&&this._changeSettings()}get maxHeight(){return this._maxHeight}_getShader(e){let t=e.boundingSphere.center.clone(),r=i.Cesium.Transforms.eastNorthUpToFixedFrame(t),s=i.Cesium.Matrix4.inverse(r,new i.Cesium.Matrix4);return new i.Cesium.CustomShader({uniforms:{M_LocaltoWorld:{type:i.Cesium.UniformType.MAT4,value:r},M_WorldtoLocal:{type:i.Cesium.UniformType.MAT4,value:s},center:{type:i.Cesium.UniformType.VEC3,value:t},MAX_Distance:{type:i.Cesium.UniformType.FLOAT,value:this._maxDistance},Speed:{type:i.Cesium.UniformType.FLOAT,value:this._speed},height:{type:i.Cesium.UniformType.FLOAT,value:this._maxHeight}},vertexShaderText:this._getVs(),fragmentShaderText:this._getFs()})}_changeSettings(){this.tileset_arr.forEach(e=>{let t=this._getShader(e.tileset2);e.tileset.setCustomShader(t)})}_getVs(){return`
17469
+ `;var Hl=class{constructor(e){this._id=v.uuid(),this._viewer=e,this._delegate=void 0,this._enable=!1,this._speed=10,this._state=m.INITIALIZED}get type(){return"snow"}set enable(e){this._enable=e,e&&this._viewer&&!this._delegate&&this._createPostProcessStage(),this._delegate&&(this._delegate.enabled=e)}get enable(){return this._enable}set speed(e){this._speed=e,this._delegate&&(this._delegate.uniforms.speed=e)}get speed(){return this._speed}_createPostProcessStage(){this._delegate=new i.Cesium.PostProcessStage({name:this._id,fragmentShader:zf,uniforms:{speed:this._speed}}),this._viewer.scene.postProcessStages.add(this._delegate)}},Ff=Hl;var Hf="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAASABIAAD/4QCMRXhpZgAATU0AKgAAAAgABQESAAMAA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cT1Jpufen+V70eSPWgBm7FJnNS+WtLsHpQBHz6UeWW9Kl2CjFAELRkdaZg1ZIzTNpFAEJWkK1Pg0YYdqAKrCq8lXmBPUVVlX2oAoSVXPWrUq+1ViOaAP/2Q==";var Nl=class{constructor(e){this._id=v.uuid(),this._viewer=e,this._delegate=void 0,this._rotateAmount=0,this._enable=!1,this._heading=0,this._state=m.INITIALIZED}get type(){return"cloud"}set enable(e){!this._viewer.scene.mode!==i.Cesium.SceneMode.SCENE3D&&(this._delegate||this._createPrimitive(),this._enable=this._delegate.show=e,this._enable?this._viewer.scene.postUpdate.addEventListener(this._onRotate,this):this._viewer.scene.postUpdate.removeEventListener(this._onRotate,this))}get enable(){return this._enable}set rotateAmount(e){this._rotateAmount=e}get rotateAmount(){return this._rotateAmount}_onRotate(e,t){this._rotateAmount!==0&&(this._heading+=this._rotateAmount,(this._heading>=360||this._heading<=-360)&&(this._heading=0),this._delegate.modelMatrix=i.Cesium.Transforms.headingPitchRollToFixedFrame(new i.Cesium.Cartesian3,new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(this._heading),0,0)))}_createPrimitive(){this._delegate=new i.Cesium.Primitive({appearance:new i.Cesium.EllipsoidSurfaceAppearance({material:new i.Cesium.Material({fabric:{type:"Image",uniforms:{color:new i.Cesium.Color(1,1,1,1),image:Hf},components:{alpha:"texture(image, fract(repeat * materialInput.st)).r * color.a",diffuse:"vec3(1.0)"}}}),translucent:!0,aboveGround:!0})}),this._delegate.geometryInstances=new i.Cesium.GeometryInstance({geometry:new i.Cesium.EllipsoidGeometry({vertexFormat:i.Cesium.VertexFormat.POSITION_AND_ST,radii:this._viewer.scene.globe.ellipsoid.radii}),id:this._id}),this._delegate.show=this._enable,this._viewer.scene.primitives.add(this._delegate)}},Nf=Nl;var Wl=class{constructor(e){if(!e)throw Error("missing viewer param");this._fog=new Rf(e),this._rain=new kf(e),this._snow=new Ff(e),this._cloud=new Nf(e)}get fog(){return this._fog}get rain(){return this._rain}get snow(){return this._snow}get cloud(){return this._cloud}},Wf=Wl;var Gl=class{constructor(e){this._viewer=e,this._enable=!1,this._moveRate=100,this._rotateRate=.01,this._flags={moveForward:!1,moveBackward:!1,moveUp:!1,moveDown:!1,moveLeft:!1,moveRight:!1,turnLeft:!1,turnRight:!1}}set enable(e){this._enable!==e&&this._viewer.scene.mode===i.Cesium.SceneMode.SCENE3D&&(this._enable=e,this._enable?this._bindEvent():this._unbindEvent())}get enable(){return this._enable}set moveRate(e){this._moveRate=e}get moveRate(){return this._moveRate}set rotateRate(e){this._rotateRate=e}get rotateRate(){return this._rotateRate}_bindEvent(){let e=this._viewer.scene.canvas;e.setAttribute("tabindex","0"),e.addEventListener("click",this._onClick.bind(this),!1),this._viewer.clock.onTick.addEventListener(this._onTick,this),document.addEventListener("keydown",this._onKeydown.bind(this),!1),document.addEventListener("keyup",this._onKeyup.bind(this),!1)}_unbindEvent(){Object.keys(this._flags).forEach(t=>{this._flags[t]=!1});let e=this._viewer.scene.canvas;e.removeAttribute("tabindex"),e.removeEventListener("click",this._onClick,!1),this._viewer.clock.onTick.removeEventListener(this._onTick,this),document.removeEventListener("keydown",this._onKeydown,!1),document.removeEventListener("keyup",this._onKeyup,!1)}_getFlagForKeyCode(e){let t;switch(e.keyCode){case 87:case 38:e.shiftKey?t="moveUp":t="moveForward";break;case 83:case 40:e.shiftKey?t="moveDown":t="moveBackward";break;case 65:case 37:t="moveLeft";break;case 68:case 39:t="moveRight";break;case 81:t="turnLeft";break;case 69:t="turnRight";break;default:break}return t}_onClick(){this._viewer.scene.canvas.focus()}_onKeydown(e){let t=this._getFlagForKeyCode(e);t&&(this._flags[t]=!0)}_onKeyup(e){Object.keys(this._flags).forEach(t=>{this._flags[t]=!1})}_onTick(){let e=this._viewer.scene.camera,r=this._viewer.scene.globe.ellipsoid.cartesianToCartographic(e.position).height/this._moveRate,s=i.Cesium.Cartesian3.clone(e.position,new i.Cesium.Cartesian3);this._flags.moveForward&&e.moveForward(r),this._flags.moveBackward&&e.moveBackward(r),this._flags.moveUp&&e.moveUp(r),this._flags.moveDown&&e.moveDown(r),this._flags.moveLeft&&e.moveLeft(r),this._flags.moveRight&&e.moveRight(r),this._flags.turnLeft&&e.rotate(s,-this._rotateRate),this._flags.turnRight&&e.rotate(s,this._rotateRate)}},Ul=Gl;var Bl=class{constructor(e){this._viewer=e,this._viewOption={},this._cache={},this._activedPath=void 0}_onPostRender(){if(!this._activedPath)return!1;this._activedPath.pathEvent&&this._activedPath.pathEvent.fire(le.POST_RENDER,{viewer:this._viewer,viewOption:this._viewOption})}addPath(e){return e&&!this._cache.hasOwnProperty(e.pathId)&&(e.pathEvent.fire(le.ADD),this._cache[e.pathId]=e),this}addPaths(e){return Array.isArray(e)&&e.forEach(t=>{this.addPath(t)}),this}removePath(e){return e&&this._cache.hasOwnProperty(e.pathId)&&(delete this._cache[e.pathId],e.pathEvent.fire(le.REMOVE)),this}getPath(e){let t=this.getPaths().filter(r=>r.id===e);return t&&t.length?t[0]:void 0}getPaths(){let e=[];return Object.keys(this._cache).forEach(t=>{e.push(this._cache[t])}),e}activate(e,t={}){var r;return!e||(e==null?void 0:e.pathId)===((r=this._activedPath)==null?void 0:r.pathId)||!this._cache.hasOwnProperty(e==null?void 0:e.pathId)?this:(this._viewOption=t,this._activedPath&&this.deactivate(),this._activedPath=e,this._activedPath.pathEvent&&this._activedPath.pathEvent.fire(le.RESET_TIME_LINE),this._viewer.on(D.POST_RENDER,this._onPostRender,this),this)}deactivate(){return this._activedPath&&(this._activedPath.actived=!1),this._activedPath=void 0,this._viewer.off(D.POST_RENDER,this._onPostRender,this),this._viewer.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),this}clear(){return this._cache={},this._activedPath&&(this._activedPath.actived=!1),this._activedPath=void 0,this._viewer.off(D.POST_RENDER,this._onPostRender,this),this._viewer.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),this}},Vl=Bl;var jl=class{constructor(e,t,r){this._id=v.uuid(),this._bid=void 0,this._positions=f.parsePositions(e),this._duration=t||20,this._pathMode=r||"speed",this._timeLine=[],this._sampledPosition=void 0,this._actived=!1,this._endTime=i.Cesium.JulianDate.now(),this._pathEvent=new yr,this._pathEvent.on(le.ADD,this._onAdd,this),this._pathEvent.on(le.REMOVE,this._onRemove,this),this._pathEvent.on(le.POST_RENDER,this._onPostRender,this),this._pathEvent.on(le.RESET_TIME_LINE,this._resetTimeLine,this),this._state=m.INITIALIZED}get pathId(){return this._id}set id(e){this._bid=e}get id(){return this._bid}set positions(e){this._positions=f.parsePositions(e)}get positions(){return this._positions}set duration(e){this._duration=e}get duration(){return this._duration}set pathMode(e){this._pathMode=e}get pathMode(){return this._pathMode}get pathEvent(){return this._pathEvent}set actived(e){this._actived=e}get actived(){return this._actived}get state(){return this._state}_onAdd(){this._state=m.ADDED}_onRemove(){this._state=m.REMOVED}_onPostRender({viewer:e,viewOption:t}){if(!this.actived)return!1;let r=i.Cesium.JulianDate.now();if(i.Cesium.JulianDate.lessThan(r,this._endTime)&&this._sampledPosition){let s=this._sampledPosition.getValue(r),o=this._sampledPosition.getValue(i.Cesium.JulianDate.addSeconds(r,.001,new i.Cesium.JulianDate));s&&o&&e.camera.lookAt(s,new i.Cesium.HeadingPitchRange(we(s,o),i.Cesium.Math.toRadians((t==null?void 0:t.pitch)||-20),(t==null?void 0:t.range)||2e3))}else e.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),this._actived=!1}_resetTimeLine(){if(!this._positions||!this._positions.length)return!1;let e=i.Cesium.JulianDate.now(),t=0,r=[];if(this._pathMode==="speed"){let s=te(this._positions)/this._duration;r=this._positions.map((o,n,l)=>(n!==0&&(t+=te([l[n-1],o])/s),i.Cesium.JulianDate.addSeconds(e,t,new i.Cesium.JulianDate)))}else{let s=this._positions.length,o=(this._duration-this._duration%s)/s;r=this._positions.map((n,l)=>i.Cesium.JulianDate.addSeconds(e,l*o,new i.Cesium.JulianDate))}this._sampledPosition=new i.Cesium.SampledPositionProperty,this._sampledPosition.addSamples(r,u.transformWGS84ArrayToCartesianArray(this._positions)),this._sampledPosition.forwardExtrapolationType=i.Cesium.ExtrapolationType.HOLD,this._sampledPosition.setInterpolationOptions({interpolationDegree:2,interpolationAlgorithm:i.Cesium.HermitePolynomialApproximation}),this._endTime=r[r.length-1],this._actived=!0}},ql=jl;var wP={FP:"1",TP:"2",TRACKED:"tracked",FREE:"free"},Ae=wP;var Yl=class{constructor(e){this._viewer=e,this._cache={},this._delegete=new i.Cesium.CustomDataSource("history-track-layer"),this._viewer.dataSources.add(this._delegete),this._activedTrack=void 0,this._viewOption={},this._stopTime=void 0,this._state=m.INITIALIZED}get delegate(){return this._delegete.entities}get state(){return this._state}_onPostRender(){Object.keys(this._cache).forEach(e=>{let t=this._cache[e];t.trackEvent&&t.trackEvent.fire(ne.POST_RENDER,{viewer:this._viewer,viewOption:this._viewOption})}),this._viewer.scene.requestRender()}addTrack(e){return e&&e.trackEvent&&!this._cache.hasOwnProperty(e.trackId)&&(e.trackEvent.fire(ne.ADD,this),this._cache[e.trackId]=e),this}addTracks(e){return Array.isArray(e)&&e.forEach(t=>{this.addTrack(t)}),this}getTrack(e){let t=this.getTracks().filter(r=>r.id===e);return t&&t.length?t[0]:void 0}removeTrack(e){return e&&e.trackEvent&&this._cache.hasOwnProperty(e.trackId)&&(e.trackEvent.fire(ne.REMOVE,this),delete this._cache[e.trackId]),this}getTracks(){let e=[];return Object.keys(this._cache).forEach(t=>{e.push(this._cache[t])}),e}play(){let e=i.Cesium.JulianDate.now();return Object.keys(this._cache).forEach(t=>{let r=this._cache[t];r.startTime=e,r.viewed=!1}),this._activedTrack=void 0,this._stopTime=void 0,this._viewer.off(D.POST_RENDER,this._onPostRender,this),this._viewer.on(D.POST_RENDER,this._onPostRender,this),this._state=m.PLAY,this}pause(){return this._stopTime=i.Cesium.JulianDate.now(),this._viewer.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),this._viewer.delegate.trackedEntity=void 0,this._viewer.off(D.POST_RENDER,this._onPostRender,this),this._state=m.PAUSE,this}restore(){if(this._state!==m.PAUSE)return this;if(this._stopTime){let e=i.Cesium.JulianDate.now();Object.keys(this._cache).forEach(t=>{this._cache[t].trackEvent.fire(ne.RESET_TIME_LINE,{stopTime:this._stopTime,duration:i.Cesium.JulianDate.secondsDifference(e,this._stopTime)})})}return this._viewer.off(D.POST_RENDER,this._onPostRender,this),this._viewer.on(D.POST_RENDER,this._onPostRender,this),this._state=m.PLAY,this}viewTrack(e,t={}){if(!this._cache.hasOwnProperty(e.trackId))throw new Error("TrackController: track does not added ");return this._viewOption=t,this._activedTrack&&(this._activedTrack.viewed=!1),e.viewed=!0,this._activedTrack=e,t.mode===Ae.FREE&&(this._viewer.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),this._viewer.delegate.trackedEntity=void 0),this}releaseTrack(e){if(!this._cache.hasOwnProperty(e.trackId))throw new Error("TrackController: track does not added ");return e.viewed&&(e.viewed=!1),this._activedTrack=void 0,this._viewer.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),this._viewer.delegate.trackedEntity=void 0,this}clear(){return Object.keys(this._cache).forEach(e=>{this.removeTrack(this._cache[e])}),this._activedTrack&&(this._activedTrack.viewed=!1),this._activedTrack=void 0,this._viewer.off(D.POST_RENDER,this._onPostRender,this),this._viewer.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),this._viewer.delegate.trackedEntity=void 0,this}},Zl=Yl;var CP={clampToGround:!1,clampToTileset:!1,interpolationType:"Linear",interpolationDegree:2,endDelayTime:.5,headingOffset:0},TP={width:2,material:i.Cesium.Color.ORANGE,clampToGround:!0,depthFailMaterial:i.Cesium.Color.ORANGE.withAlpha(.8)},Xl=class{constructor(e,t,r,s){this._id=v.uuid(),this._bid=void 0,this._positions=f.parsePositions(e),this._duration=t||20,this._callback=r,this._options={...CP,...s},this._controller=void 0,this._sampledPosition=void 0,this._velocityOrientation=void 0,this._viewed=!1,this._delegate=new i.Cesium.Entity,this._pathPositions=[],this._path=new i.Cesium.Entity({show:!1,polyline:{positions:new i.Cesium.CallbackProperty(()=>this._pathPositions,!1)}}),this._positionIndex=0,this._timeLine=[],this._startTime=void 0,this._endTime=void 0,this._trackEvent=new fr,this._trackEvent.on(ne.POST_RENDER,this._onPostRender,this),this._trackEvent.on(ne.ADD,this._onAdd,this),this._trackEvent.on(ne.REMOVE,this._onRemove,this),this._trackEvent.on(ne.RESET_TIME_LINE,this._resetTimeLine,this),this._state=m.INITIALIZED}get currentDistance(){return te(f.parsePositions(this._pathPositions))}get currentPosition(){let[e]=this._pathPositions.slice(-1);return f.parsePosition(e)}get allDistance(){return te(this._positions)}get trackId(){return this._id}set id(e){this._bid=e}get id(){return this._bid}set positions(e){this._positions=f.parsePositions(e),this._resetTimeLine({})}get positions(){return this._positions}set duration(e){this._duration=e,this._resetTimeLine({})}get duration(){return this._duration}set startTime(e){e instanceof Date?this._startTime=i.Cesium.JulianDate.fromDate(e):this._startTime=e,this._resetTimeLine({})}get startTime(){return this._startTime}set viewed(e){this._viewed=e}get viewed(){return this._viewed}get trackEvent(){return this._trackEvent}get state(){return this._state}_onAdd(e){if(!e)return!1;this._controller=e,this._controller.delegate.add(this._delegate),this._controller.delegate.add(this._path),!this._startTime&&(this._startTime=i.Cesium.JulianDate.now()),this._state=m.ADDED}_onRemove(){if(!this._controller)return!1;this._controller.delegate.remove(this._delegate),this._controller.delegate.remove(this._path),this._viewed=!1,this._startTime=void 0,this._state=m.REMOVED}_onPostRender({viewer:e,viewOption:t}){if(!this._startTime||!this._endTime)return!1;let r=i.Cesium.JulianDate.now();if(i.Cesium.JulianDate.lessThanOrEquals(r,this._endTime)){let s=this._sampledPosition.getValue(r);if(!s)return!1;this._pathPositions.push(s),this._options.clampToTileset?this._delegate.position=e.scene.clampToHeight(s,[this._delegate]):this._delegate.position=s;let o=this._velocityOrientation.getValue(r),n;if(o){let c=i.Cesium.Quaternion.fromHeadingPitchRoll(new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(this._options.headingOffset||0),0,0),new i.Cesium.Quaternion);this._delegate.orientation=i.Cesium.Quaternion.multiply(o,c,new i.Cesium.Quaternion);let p=i.Cesium.Matrix3.fromQuaternion(o),_=i.Cesium.Matrix4.fromRotationTranslation(p,s);n=i.Cesium.Transforms.fixedFrameToHeadingPitchRoll(_)}let l=this._timeLine[this._positionIndex],h;if(l){let c=i.Cesium.JulianDate.secondsDifference(r,l);c>=0&&c<=1&&(h=this._positions[this._positionIndex]||void 0,h&&o&&(h.heading=i.Cesium.Math.toDegrees(n.heading),h.pitch=i.Cesium.Math.toDegrees(n.pitch),h.roll=i.Cesium.Math.toDegrees(n.roll)),this._positionIndex++,this._options.loop&&this._positionIndex===this._positions.length&&this._restart()),this._callback&&this._callback(h,s,n?i.Cesium.Math.toDegrees(n.heading)+90:void 0,this._positionIndex===this._positions.length)}}this._setCameraView(e,t)}_restart(){this._startTime=i.Cesium.JulianDate.now(),this._resetTimeLine({})}_setCameraView(e,t){var s,o,n;if(!this._viewed)return!1;let r=i.Cesium.JulianDate.now();if(i.Cesium.JulianDate.greaterThan(r,this._endTime))e.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),e.delegate.trackedEntity&&(e.delegate.trackedEntity=void 0),this._viewed=!1;else{let l=this._sampledPosition.getValue(r),h=this._sampledPosition.getValue(i.Cesium.JulianDate.addSeconds(r,1/60,new i.Cesium.JulianDate));l&&h&&((t==null?void 0:t.mode)===Ae.TRACKED&&((o=(s=e.delegate)==null?void 0:s.trackedEntity)==null?void 0:o.id)!==((n=this._delegate)==null?void 0:n.id)?e.delegate.trackedEntity=this._delegate:(t==null?void 0:t.mode)===Ae.FP?e.camera.lookAt(l,new i.Cesium.HeadingPitchRange(we(l,h),i.Cesium.Math.toRadians((t==null?void 0:t.pitch)||0),(t==null?void 0:t.range)||10)):(t==null?void 0:t.mode)===Ae.TP&&e.camera.lookAt(l,new i.Cesium.HeadingPitchRange(0,i.Cesium.Math.toRadians((t==null?void 0:t.pitch)||-90),(t==null?void 0:t.range)||1e3)))}}_resetTimeLine(e){var r;if(!this._startTime||!this._duration||!((r=this._positions)!=null&&r.length))return!1;let t=0;if(!(e!=null&&e.stopTime)&&!(e!=null&&e.duration)){let s=te(this._positions)/this._duration;this._timeLine=this._positions.map((o,n,l)=>(n!==0&&(t+=te([l[n-1],o])/s),i.Cesium.JulianDate.addSeconds(this._startTime,t,new i.Cesium.JulianDate))),this._pathPositions=[],this._positionIndex=0}else e!=null&&e.stopTime&&(e!=null&&e.duration)&&(this._duration+=e.duration,this._timeLine=this._timeLine.map(s=>(i.Cesium.JulianDate.greaterThan(s,e.stopTime)&&(s=i.Cesium.JulianDate.addSeconds(s,e.duration,new i.Cesium.JulianDate)),s)));this._sampledPosition=new i.Cesium.SampledPositionProperty,this._sampledPosition.addSamples(this._timeLine,u.transformWGS84ArrayToCartesianArray(this._positions)),this._sampledPosition.forwardExtrapolationType=i.Cesium.ExtrapolationType.HOLD,this._options.interpolationType==="Hermite"?this._sampledPosition.setInterpolationOptions({interpolationDegree:this._options.interpolationDegree||2,interpolationAlgorithm:i.Cesium.HermitePolynomialApproximation}):this._options.interpolationType==="Linear"?this._sampledPosition.setInterpolationOptions({interpolationDegree:this._options.interpolationDegree||1,interpolationAlgorithm:i.Cesium.LinearApproximation}):this._options.interpolationType==="Lagrange"&&this._sampledPosition.setInterpolationOptions({interpolationDegree:this._options.interpolationDegree||5,interpolationAlgorithm:i.Cesium.LagrangePolynomialApproximation}),this._velocityOrientation=new i.Cesium.VelocityOrientationProperty(this._sampledPosition),this._endTime=i.Cesium.JulianDate.addSeconds(this._timeLine[this._timeLine.length-1],this._options.endDelayTime,new i.Cesium.JulianDate)}addPosition(e,t){return this._positions.push(f.parsePosition(e)),this._duration+=t,this._resetTimeLine({}),this}setModel(e,t){return this._delegate.model={...t,uri:e,heightReference:this._options.clampToGround?i.Cesium.HeightReference.CLAMP_TO_GROUND:i.Cesium.HeightReference.NONE},this}setBillboard(e,t){return this._delegate.billboard={...t,image:e,heightReference:this._options.clampToGround?i.Cesium.HeightReference.CLAMP_TO_GROUND:i.Cesium.HeightReference.NONE},this}setLabel(e,t){return this._delegate.label={...t,text:e,heightReference:this._options.clampToGround?i.Cesium.HeightReference.CLAMP_TO_GROUND:i.Cesium.HeightReference.NONE},this}setPath(e,t={}){return this._path.show=!!e,v.merge(this._path.polyline,TP,t),this}},Jl=Xl;var xP={ANGLE:"angle",AREA:"area",AREA_HEIGHT:"area_height",AREA_SURFACE:"area_surface",DISTANCE:"distance",DISTANCE_SURFACE:"distance_surface",HEADING:"heading",HEIGHT:"height",TRIANGLE_HEIGHT:"triangle_height"},ae=xP;var Kl=class{constructor(e){this._style=e,this._viewer=void 0,this._layer=void 0,this._delegate=void 0,this._options={},this._positions=[]}get drawTool(){return this._viewer.drawTool}_mountedHook(){}_onDrawAnchor(e){}_onAnchorMoving(e){this._positions.pop(),this._positions.push(e),this._options.onCalc&&this._options.onCalc(this._positions)}_onDrawStop(){this._unbindEvent(),this._viewer.drawTool.deactivate(),this._options.onDrawStop&&this._options.onDrawStop(this._delegate)}_bindEvent(){this.drawTool.on(x.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.on(x.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.on(x.DRAW_STOP,this._onDrawStop,this)}_unbindEvent(){this.drawTool.off(x.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.off(x.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.off(x.DRAW_STOP,this._onDrawStop,this)}start(e,t){return this._viewer=e.viewer,this._layer=e.layer,this._options=t,this._viewer.editTool.deactivate(),this._viewer.drawTool.activate(t),this._mountedHook(),this._unbindEvent(),this._bindEvent(),this}},Ni=Kl;var Ql=class extends Ni{constructor(e){super(e)}_mountedHook(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D,\u53F3\u51FB\u7ED3\u675F",this._delegate=new i.Cesium.Entity({polyline:{...this._style,positions:new i.Cesium.CallbackProperty(()=>this._positions,!1)}}),this._layer.entities.add(this._delegate)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),t>0&&this.drawTool.fire(x.CREATE_ANCHOR,{position:e}),t>=this._options.maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(x.DRAW_STOP,e))}},he=Ql;var $l=class{constructor(e){this._viewer=void 0,this._layer=void 0,this._overlay=e,this._delegate=new i.Cesium.Entity,this._delegate.merge(e),this._options={},this._positions=[]}get editTool(){return this._viewer.editTool}_mountedHook(){}_mountAnchor(){}_onAnchorMoving({pickedAnchor:e,position:t}){}_onEditAnchorStop({pickedAnchor:e,position:t}){}_onEditStop({pickedAnchor:e,position:t}){this._unbindEvent(),this._viewer.editTool.deactivate()}_bindEvent(){return this.editTool.on(x.ANCHOR_MOVING,this._onAnchorMoving,this),this.editTool.on(x.EDIT_ANCHOR_STOP,this._onEditAnchorStop,this),this.editTool.on(x.EDIT_STOP,this._onEditStop,this),this}_unbindEvent(){this.editTool.off(x.ANCHOR_MOVING,this._onAnchorMoving,this),this.editTool.off(x.EDIT_ANCHOR_STOP,this._onEditAnchorStop,this),this.editTool.off(x.EDIT_STOP,this._onEditStop,this)}start(e,t){return this._viewer=e.viewer,this._layer=e.layer,this._options=t,this._viewer.editTool.deactivate(),this._viewer.editTool.activate(t),this._mountedHook(),this._mountAnchor(),this._unbindEvent(),this._bindEvent(),this}},Wi=$l;var eh=class extends Wi{constructor(e){super(e)}_mountedHook(){this.editTool.tooltipMess="\u70B9\u51FB\u951A\u70B9\u79FB\u52A8,\u53F3\u51FB\u7ED3\u675F\u7F16\u8F91",this._delegate.polyline.positions=new i.Cesium.CallbackProperty(()=>this._positions.length>1?this._positions:null,!1),this._layer.entities.add(this._delegate)}_mountAnchor(){let e=[].concat(this._overlay.polyline.positions.getValue(i.Cesium.JulianDate.now()));if(this._options.maxAnchorSize>2){for(let t=0;t<e.length-1;t++){let r=z(e[t],e[t+1]);this._positions.push(e[t]),this._positions.push(r)}this._positions.push(e[e.length-1]),this._positions.forEach((t,r)=>{this.editTool.fire(x.CREATE_ANCHOR,{position:t,index:r,isMid:r%2!==0})})}else this._positions=e,this._positions.forEach((t,r)=>{this.editTool.fire(x.CREATE_ANCHOR,{position:t,index:r})});this._layer.entities.remove(this._overlay)}_onEditAnchorStop({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.Cesium.JulianDate.now()),s=r.index;if(r.isMid){let o=z(this._positions[s],this._positions[s-1]),n=z(this._positions[s],this._positions[s+1]);this._positions.splice(s,1,o,t,n),this.editTool.fire(x.CLEAR_ANCHOR),this._positions.forEach((l,h)=>{this.editTool.fire(x.CREATE_ANCHOR,{position:l,index:h,isMid:h%2!==0})})}}_onAnchorMoving({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.Cesium.JulianDate.now()),s=r.index;if(this._positions[s]=t,!r.isMid&&this._options.maxAnchorSize>2){let o=-1,n=-1,l=-1,h=-1,c=this._positions.length;if(s===0?(l=s+2,h=s+1):r.index===c-1?(o=s-2,n=s-1):(o=s-2,n=s-1,l=s+2,h=s+1),o>0){let p=z(this._positions[o],this._positions[s]);this._positions[n]=p,this.editTool.fire(x.UPDATE_ANCHOR,{index:n,position:p})}if(l>0){let p=z(this._positions[l],this._positions[s]);this._positions[h]=p,this.editTool.fire(x.UPDATE_ANCHOR,{index:h,position:p})}}this._options.onCalc&&this._options.onCalc(this._positions)}},ce=eh;var th=class{constructor(){this._viewer=void 0,this._layer=void 0,this._startLabel=new i.Cesium.Entity({label:{text:"\u5F00\u59CB",font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._resultLabel=new i.Cesium.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._options={}}_getSampledHeight(e,t=!1){let r=this._viewer.terrainProvider&&!(this._viewer.terrainProvider instanceof i.Cesium.EllipsoidTerrainProvider)?i.Cesium.sampleTerrainMostDetailed(this._viewer.terrainProvider,e.map(o=>i.Cesium.Cartographic.fromCartesian(o))):Promise.resolve(e.map(o=>i.Cesium.Cartographic.fromCartesian(o))),s=this._viewer.scene.clampToHeightSupported&&t?this._viewer.scene.clampToHeightMostDetailed(e,this._layer.entities.values):Promise.resolve(e);return Promise.all([r,s])}_onDrawStop(e){}_onCalc(e){}_startHook(e,t){this._viewer=e.viewer,this._layer=e.layer,this._options=t,this._options.onDrawStop=this._onDrawStop.bind(this),this._options.onCalc=this._onCalc.bind(this),this._layer.entities.add(this._startLabel),this._layer.entities.add(this._resultLabel)}start(e,t){return this}},K=th;var ih=class extends K{constructor(){super(),this._maxAnchorSize=2,this._helpLinePositions=[],this._helpLine=new i.Cesium.Entity({polyline:{positions:new i.Cesium.CallbackProperty(()=>this._helpLinePositions.length>1?this._helpLinePositions:null,!1)}})}_onDrawStop(e){new ce(e).start({viewer:this._viewer,layer:this._layer},{...this._options,maxAnchorSize:this._maxAnchorSize})}_onCalc(e){if(e.length>0&&(this._startLabel.position=e[0]),e.length>1){this._resultLabel.position=e[1];let t=i.Cesium.Ellipsoid.WGS84.geodeticSurfaceNormal(e[0],new i.Cesium.Cartesian3),r=i.Cesium.Plane.fromPointNormal(e[0],t);this._helpLinePositions=[e[0],i.Cesium.Plane.projectPointOntoPlane(r,e[1],new i.Cesium.Cartesian3),e[1]];let s=Math.abs(i.Cesium.Plane.getPointDistance(r,e[1]));this._resultLabel.label.text=`\u89D2\u5EA6\uFF1A${i.Cesium.Math.toDegrees(Math.asin(s/i.Cesium.Cartesian3.distance(e[0],e[1]))).toFixed(2)} \u5EA6`}}start(e,t){this._startHook(e,t);let r=new i.Cesium.PolylineDashMaterialProperty({color:i.Cesium.Color.GREENYELLOW});return this._helpLine.polyline.material=r,this._helpLine.polyline.depthFailMaterial=r,this._layer.entities.add(this._helpLine),new he({material:t.material||i.Cesium.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.Cesium.PolylineDashMaterialProperty({color:i.Cesium.Color.YELLOW.withAlpha(.6)}),width:t.width||2,clampToGround:!1}).start(e,{...t,maxAnchorSize:this._maxAnchorSize}),this}},Gf=ih;var rh=class extends Ni{constructor(e){super(e)}_mountedHook(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D,\u53F3\u51FB\u7ED3\u675F",this._delegate=new i.Cesium.Entity({polygon:{...this._style,hierarchy:new i.Cesium.CallbackProperty(()=>this._positions.length>2?new i.Cesium.PolygonHierarchy(this._positions.map(e=>e.clone())):null,!1)}}),this._layer.entities.add(this._delegate)}_onDrawAnchor(e){this._positions.push(e),this.drawTool.fire(x.CREATE_ANCHOR,{position:e})}},rt=rh;var sh=class extends Wi{constructor(e){super(e)}_mountedHook(){this.editTool.tooltipMess="\u70B9\u51FB\u951A\u70B9\u79FB\u52A8,\u53F3\u51FB\u7ED3\u675F\u7F16\u8F91",this._delegate.polygon.hierarchy=new i.Cesium.CallbackProperty(e=>this._positions.length>2?new i.Cesium.PolygonHierarchy(this._positions):null,!1),this._layer.entities.add(this._delegate)}_mountAnchor(){let e=[].concat(this._overlay.polygon.hierarchy.getValue(i.Cesium.JulianDate.now()).positions);e.push(e[0]);for(let t=0;t<e.length-1;t++){let r=z(e[t],e[t+1]);this._positions.push(e[t]),this._positions.push(r)}this._positions.forEach((t,r)=>{this.editTool.fire(x.CREATE_ANCHOR,{position:t,index:r,isMid:r%2!==0})}),this._layer.entities.remove(this._overlay)}_onEditAnchorStop({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.Cesium.JulianDate.now()),s=r.index;if(r.isMid){let o,n,l=this._positions.length;s===l-1?(o=z(this._positions[s],this._positions[s-1]),n=z(this._positions[s],this._positions[0])):(o=z(this._positions[s],this._positions[s-1]),n=z(this._positions[s],this._positions[s+1])),this._positions.splice(s,1,o,t,n),this.editTool.fire(x.CLEAR_ANCHOR),this._positions.forEach((h,c)=>{this.editTool.fire(x.CREATE_ANCHOR,{position:h,index:c,isMid:c%2!==0})})}}_onAnchorMoving({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.Cesium.JulianDate.now()),s=r.index;this._positions[s]=t;let o=this._positions.length;if(!r.isMid){let n=-1,l=-1,h=-1,c=-1;s===0?(n=o-2,l=o-1,h=s+2,c=s+1):s===o-2?(n=s-2,l=s-1,h=0,c=o-1):(n=s-2,l=s-1,h=s+2,c=s+1);let p=z(this._positions[n],this._positions[s]),_=z(this._positions[h],this._positions[s]);this._positions[l]=p,this._positions[c]=_,this.editTool.fire(x.UPDATE_ANCHOR,{index:l,position:p}),this.editTool.fire(x.UPDATE_ANCHOR,{index:c,position:_})}this._options.onCalc&&this._options.onCalc(this._positions)}},st=sh;var oh=class extends K{constructor(){super()}_onDrawStop(e){new st(e).start({viewer:this._viewer,layer:this._layer},this._options)}_onCalc(e){var t;e.length>2&&(this._resultLabel.position=(t=i.Cesium.BoundingSphere.fromPoints(e))==null?void 0:t.center,this._resultLabel.label.text=`\u9762\u79EF\uFF1A${ye(e).toFixed(2)} \u5E73\u65B9\u7C73`)}start(e,t){return this._startHook(e,t),new rt({material:t.material||i.Cesium.Color.YELLOW.withAlpha(.6),perPositionHeight:!0}).start(e,this._options),this}},Uf=oh;var ah=class extends K{constructor(){super()}_onDrawStop(e){new st(e).start({viewer:this._viewer,layer:this._layer},this._options)}_lerp(e,t=4){let r=[];for(let s=0;s<t;++s)for(let o=0;o<t;++o){let n=i.Cesium.Math.lerp(e.west,e.east,o/(t-1)),l=i.Cesium.Math.lerp(e.south,e.north,s/(t-1));r.push(i.Cesium.Cartesian3.fromRadians(n,l))}return r}_onCalc(e){if(e.length>2){let t=this._lerp(i.Cesium.Rectangle.fromCartesianArray(e),this._options.lerpNum);this._getSampledHeight(t,!0).then(([r,s])=>r.map((o,n)=>({lng:o.longitude,lat:o.latitude,alt:Math.max(o.height||0,s[n]?i.Cesium.Cartographic.fromCartesian(s[n]).height:0)}))).then(r=>{let s=0,o;r.forEach(n=>{n.alt>s&&(s=n.alt,o=n)}),o&&(this._resultLabel.position=i.Cesium.Cartesian3.fromRadians(o.lng,o.lat,o.alt),this._resultLabel.label.text=`\u9AD8\u5EA6\uFF1A${s.toFixed(2)} \u7C73`)})}}start(e,t){return this._startHook(e,t),new rt({material:t.material||i.Cesium.Color.YELLOW.withAlpha(.6)}).start(e,this._options),this}},Bf=ah;var nh=class extends K{constructor(){super()}_lerp(e,t=4){let r=[];for(let s=0;s<t;++s)for(let o=0;o<t;++o){let n=i.Cesium.Math.lerp(e.west,e.east,o/(t-1)),l=i.Cesium.Math.lerp(e.south,e.north,s/(t-1));r.push(i.Cesium.Cartesian3.fromRadians(n,l))}return r}_onDrawStop(e){new st(e).start({viewer:this._viewer,layer:this._layer},this._options)}_onCalc(e){var t;if(e.length>2){this._resultLabel.position=(t=i.Cesium.BoundingSphere.fromPoints(e))==null?void 0:t.center;let r=this._lerp(i.Cesium.Rectangle.fromCartesianArray(e),this._options.lerpNum);this._getSampledHeight(r.concat(e),!1).then(([s])=>s.map(o=>i.Cesium.Cartesian3.fromDegrees(i.Cesium.Math.toDegrees(o.longitude),i.Cesium.Math.toDegrees(o.latitude),o.height))).then(s=>{this._resultLabel.label.text=`\u9762\u79EF\uFF1A${ye(s).toFixed(2)} \u5E73\u65B9\u7C73`})}}start(e,t){return this._startHook(e,t),new rt({material:t.material||i.Cesium.Color.YELLOW.withAlpha(.6)}).start(e,this._options),this}},Vf=nh;var lh=class extends K{constructor(){super(),this._maxAnchorSize=9999}_onDrawStop(e){new ce(e).start({viewer:this._viewer,layer:this._layer},{...this._options,maxAnchorSize:this._maxAnchorSize})}_onCalc(e){if(e.length>0&&(this._startLabel.position=e[0]),e.length>1){this._resultLabel.position=e[e.length-1];let t=0;for(let r=0;r<e.length-1;r++){let s=i.Cesium.Cartesian3.distance(e[r],e[r+1]);t+=s}this._resultLabel.label.text=t>1e3?`\u8DDD\u79BB\uFF1A${(t/1e3).toFixed(2)} \u516C\u91CC`:`\u8DDD\u79BB\uFF1A${t.toFixed(2)} \u7C73`}}start(e,t){return this._startHook(e,t),new he({material:t.material||i.Cesium.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.Cesium.PolylineDashMaterialProperty({color:i.Cesium.Color.YELLOW.withAlpha(.6)}),width:t.width||2,clampToGround:!1}).start(e,{...t,maxAnchorSize:this._maxAnchorSize}),this}},jf=lh;var hh=class extends K{constructor(){super(),this._maxAnchorSize=9999}_lerp(e,t,r=5){let s=[],o=i.Cesium.Cartographic.fromCartesian(e),n=i.Cesium.Cartographic.fromCartesian(t);for(let l=0;l<r;l++){let h=i.Cesium.Math.lerp(o.longitude,n.longitude,l/r),c=i.Cesium.Math.lerp(o.latitude,n.latitude,l/r),p=o.height-(o.height-n.height)*(l/r);s.push(i.Cesium.Cartesian3.fromRadians(h,c,p))}return s}_onDrawStop(e){new ce(e).start({viewer:this._viewer,layer:this._layer},{...this._options,maxAnchorSize:this._maxAnchorSize})}_onCalc(e){if(e.length>0&&(this._startLabel.position=e[0]),e.length>1){let t=[e[0]];this._resultLabel.position=e[e.length-1];for(let r=0;r<e.length-1;r++)t=t.concat(this._lerp(e[r],e[r+1],this._options.lerpNum));t.push(e[e.length-1]),this._getSampledHeight(t).then(([r,s])=>r.map((o,n)=>i.Cesium.Cartesian3.fromDegrees(i.Cesium.Math.toDegrees(o.longitude),i.Cesium.Math.toDegrees(o.latitude),Math.max(o.height||0,s[n]?i.Cesium.Cartographic.fromCartesian(s[n]).height:0)))).then(r=>{let s=0;for(let o=0;o<r.length-1;o++){let n=i.Cesium.Cartesian3.distance(r[o],r[o+1]);s+=n}this._resultLabel.label.text=s>1e3?`\u8DDD\u79BB\uFF1A${(s/1e3).toFixed(2)} \u516C\u91CC`:`\u8DDD\u79BB\uFF1A${s.toFixed(2)} \u7C73`})}}start(e,t){return this._startHook(e,t),new he({material:t.material||i.Cesium.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.Cesium.PolylineDashMaterialProperty({color:i.Cesium.Color.YELLOW.withAlpha(.6)}),width:t.width||2,clampToGround:!0}).start(e,{...this._options,maxAnchorSize:this._maxAnchorSize}),this}},qf=hh;var ch=class extends K{constructor(){super(),this._maxAnchorSize=2}_onDrawStop(e){new ce(e).start({viewer:this._viewer,layer:this._layer},{...this._options,maxAnchorSize:this._maxAnchorSize})}_onCalc(e){e.length>0&&(this._startLabel.position=e[0]),e.length>1&&(this._resultLabel.position=e[e.length-1],this._resultLabel.label.text=`\u504F\u822A\uFF1A${i.Cesium.Math.toDegrees(we(e[0],e[1])).toFixed(1)} \u5EA6`)}start(e,t){return this._startHook(e,t),new he({material:t.material||i.Cesium.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.Cesium.PolylineDashMaterialProperty({color:i.Cesium.Color.YELLOW.withAlpha(.6)}),width:t.width||2}).start(e,{...this._options,maxAnchorSize:this._maxAnchorSize}),this}},Yf=ch;var ph=class extends K{constructor(){super(),this._maxAnchorSize=2,this._helpLinePositions=[],this._helpLine=new i.Cesium.Entity({polyline:{positions:new i.Cesium.CallbackProperty(()=>this._helpLinePositions.length>1?this._helpLinePositions:null,!1)}})}_onDrawStop(e){new ce(e).start({viewer:this._viewer,layer:this._layer},{...this._options,maxAnchorSize:this._maxAnchorSize})}_onCalc(e){if(e.length>0&&(this._startLabel.position=e[0]),e.length>1){this._resultLabel.position=e[1];let t=i.Cesium.Ellipsoid.WGS84.geodeticSurfaceNormal(e[0],new i.Cesium.Cartesian3),r=i.Cesium.Plane.fromPointNormal(e[0],t);this._helpLinePositions=[e[0],i.Cesium.Plane.projectPointOntoPlane(r,e[1],new i.Cesium.Cartesian3),e[1]];let s=Math.abs(i.Cesium.Plane.getPointDistance(r,e[1]));this._resultLabel.label.text=`\u9AD8\u5EA6\uFF1A${s.toFixed(2)} \u7C73`}}start(e,t){this._startHook(e,t);let r=new i.Cesium.PolylineDashMaterialProperty({color:i.Cesium.Color.GREENYELLOW});return this._helpLine.polyline.material=r,this._helpLine.polyline.depthFailMaterial=r,this._layer.entities.add(this._helpLine),new he({material:t.material||i.Cesium.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.Cesium.PolylineDashMaterialProperty({color:i.Cesium.Color.YELLOW.withAlpha(.6)}),width:t.width||2}).start(e,{...this._options,maxAnchorSize:this._maxAnchorSize}),this}},Zf=ph;var dh=class extends K{constructor(){super(),this._maxAnchorSize=2,this._helpLinePositions=[],this._helpLine=new i.Cesium.Entity({polyline:{positions:new i.Cesium.CallbackProperty(()=>this._helpLinePositions.length>1?this._helpLinePositions:null,!1)}}),this._lengthLabel=new i.Cesium.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._heightLabel=new i.Cesium.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._distanceLabel=new i.Cesium.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}})}_onDrawStop(e){new ce(e).start({viewer:this._viewer,layer:this._layer},{...this._options,maxAnchorSize:this._maxAnchorSize})}_onCalc(e){if(e.length>0&&(this._startLabel.position=e[0]),e.length>1){let t=i.Cesium.Ellipsoid.WGS84.geodeticSurfaceNormal(e[0],new i.Cesium.Cartesian3),r=i.Cesium.Plane.fromPointNormal(e[0],t),s=i.Cesium.Plane.projectPointOntoPlane(r,e[1],new i.Cesium.Cartesian3);this._helpLinePositions=[e[0],s,e[1]];let o=i.Cesium.Cartesian3.distance(e[0],s),n=Math.abs(i.Cesium.Plane.getPointDistance(r,e[1])),l=i.Cesium.Cartesian3.distance(e[0],e[1]);this._lengthLabel.position=i.Cesium.Cartesian3.midpoint(e[0],s,new i.Cesium.Cartesian3),this._lengthLabel.label.text=o>1e3?`${(o/1e3).toFixed(2)} \u516C\u91CC`:`${o.toFixed(2)} \u7C73`,this._distanceLabel.position=i.Cesium.Cartesian3.midpoint(e[0],e[1],new i.Cesium.Cartesian3),this._distanceLabel.label.text=l>1e3?`${(l/1e3).toFixed(2)} \u516C\u91CC`:`${l.toFixed(2)} \u7C73`,this._heightLabel.position=i.Cesium.Cartesian3.midpoint(s,e[1],new i.Cesium.Cartesian3),this._heightLabel.label.text=n>1e3?`${(n/1e3).toFixed(2)} \u516C\u91CC`:`${n.toFixed(2)} \u7C73`}}start(e,t){this._startHook(e,t);let r=new i.Cesium.PolylineDashMaterialProperty({color:i.Cesium.Color.GREENYELLOW});return this._helpLine.polyline.material=r,this._helpLine.polyline.depthFailMaterial=r,this._layer.entities.add(this._helpLine),this._layer.entities.add(this._lengthLabel),this._layer.entities.add(this._heightLabel),this._layer.entities.add(this._distanceLabel),new he({material:t.material||i.Cesium.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.Cesium.PolylineDashMaterialProperty({color:i.Cesium.Color.YELLOW.withAlpha(.6)}),width:t.width||2,clampToGround:!1}).start(e,{...t,maxAnchorSize:this._maxAnchorSize}),this}},Xf=dh;var mh=class{constructor(e){if(!e)throw Error("missing viewer param");this._viewer=e,this._layer=new i.Cesium.CustomDataSource("measure-layer"),this._viewer.dataSources.add(this._layer)}get viewer(){return this._viewer}get layer(){return this._layer}angle(e={}){return new Gf().start(this,e),this}area(e={}){return new Uf().start(this,e),this}areaHeight(e={}){return new Bf().start(this,e),this}areaSurface(e={}){return new Vf().start(this,e),this}distance(e={}){return new jf().start(this,e),this}distanceSurface(e={}){return new qf().start(this,e),this}heading(e={}){return new Yf().start(this,e),this}height(e={}){return new Zf().start(this,e),this}triangleHeight(e={}){return new Xf().start(this,e),this}activate(e,t){switch(e){case ae.ANGLE:this.angle(t);break;case ae.AREA:this.area(t);break;case ae.AREA_HEIGHT:this.areaHeight(t);break;case ae.AREA_SURFACE:this.areaSurface(t);break;case ae.DISTANCE:this.distance(t);break;case ae.DISTANCE_SURFACE:this.distanceSurface(t);break;case ae.HEADING:this.heading(t);break;case ae.HEIGHT:this.height(t);break;case ae.TRIANGLE_HEIGHT:this.triangleHeight(t);break;default:break}return this}deactivate(){return this._layer.entities.removeAll(),this._viewer.drawTool.tooltipMess="",this._viewer.drawTool.deactivate(),this._viewer.editTool.tooltipMess="",this._viewer.editTool.deactivate(),this}},uh=mh;var EP={SIGHT_LINE:"sightLine",VIEW_SHED:"viewshed"},ot=EP;var PP={PROFILE:"profile"},zt=PP;var _h=class{constructor(e){this._id=v.uuid(),this._viewer=e,this._delegate=void 0,this._enable=!1,this._color=i.Cesium.Color.YELLOW,this._width=1,this._spacing=100,this._state=m.INITIALIZED}get type(){return"contourLine"}set enable(e){this._enable=e,e&&this._viewer?this._createAnalysis():(this._delegate&&(this._delegate=null),this._viewer&&(this._viewer.scene.globe.material=null))}get enable(){return this._enable}set color(e){this._color=e,this._delegate&&(this._delegate.uniforms.color=e)}get color(){return this._color}set width(e){this._width=e,this._delegate&&(this._delegate.uniforms.width=e)}get width(){return this._width}set spacing(e){this._spacing=e,this._delegate&&(this._delegate.uniforms.spacing=e)}get spacing(){return this._spacing}_init(e,t,r){this._enable=!0,this._color=e||i.Cesium.Color.YELLOW,this._width=t||1,this._spacing=r||100,this._enable&&this._viewer&&this._createAnalysis()}deactivate(){this._enable=!1,this._delegate&&(this._delegate=null),this._viewer&&(this._viewer.scene.globe.material=null)}_createAnalysis(){let e=this._viewer.scene.globe,t=i.Cesium.Material.fromType("ElevationContour"),r=t.uniforms;r.width=this._width,r.spacing=this._spacing,r.color=this._color,e.material=t,this._delegate=t}},Jf=_h;var fh=class{constructor(e){this._id=v.uuid(),this._viewer=e,this._enable=!1,this._positions=[],this._maxDistance=5,this._speed=1e3,this._maxHeight=20,this._inRangeColor=i.Cesium.Color.YELLOW,this._outRangeColor=i.Cesium.Color.WHITE,this._state=m.INITIALIZED}get type(){return"tilesetShake"}set enable(e){this._enable=e,this.tileset_arr.forEach(t=>{let r=null;this._enable?r=this._getShader(t.tileset2):r=new window.GM.CustomShader,t.tileset.setCustomShader(r)})}get enable(){return this._enable}set maxDistance(e){this._maxDistance=e,this._enable&&this._changeSettings()}get maxDistance(){return this._maxDistance}set speed(e){this._speed=e,this._enable&&this._changeSettings()}get speed(){return this._speed}set maxHeight(e){this._maxHeight=e,this._enable&&this._changeSettings()}get maxHeight(){return this._maxHeight}_getShader(e){let t=e.boundingSphere.center.clone(),r=i.Cesium.Transforms.eastNorthUpToFixedFrame(t),s=i.Cesium.Matrix4.inverse(r,new i.Cesium.Matrix4);return new i.Cesium.CustomShader({uniforms:{M_LocaltoWorld:{type:i.Cesium.UniformType.MAT4,value:r},M_WorldtoLocal:{type:i.Cesium.UniformType.MAT4,value:s},center:{type:i.Cesium.UniformType.VEC3,value:t},MAX_Distance:{type:i.Cesium.UniformType.FLOAT,value:this._maxDistance},Speed:{type:i.Cesium.UniformType.FLOAT,value:this._speed},height:{type:i.Cesium.UniformType.FLOAT,value:this._maxHeight}},vertexShaderText:this._getVs(),fragmentShaderText:this._getFs()})}_changeSettings(){this.tileset_arr.forEach(e=>{let t=this._getShader(e.tileset2);e.tileset.setCustomShader(t)})}_getVs(){return`
17472
17470
  void vertexMain(VertexInput vsInput, inout czm_modelVertexOutput vsOutput) {
17473
17471
  vec3 positionMC = vsInput.attributes.positionMC;
17474
17472
  //\u4E16\u754C\u5750\u6807\u8F6C\u5C40\u90E8 \u8981\u5C06\u6A21\u578B\u5750\u6807\u8F6C\u4E3A\u4E16\u754C\u5750\u6807
@@ -17513,8 +17511,128 @@ void main(){
17513
17511
  void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material) {
17514
17512
  material.diffuse = vec3(0.2, 0.5, 1.0); // \u5C06\u6750\u8D28\u989C\u8272\u8BBE\u7F6E\u4E3A\u7EA2\u8272 vec3(1.0, 0.0, 0.0) vec3(0.945, 0.459, 0.620)
17515
17513
  }
17516
- `}_init(e,t={}){this._enable=!0,this._maxDistance=t.maxDistance||5,this._speed=t.speed||1e3,this._maxHeight=t.maxHeight||20,e&&(this._layer=e,this.tileset_arr=this._layer.delegate._primitives.map(r=>({overlayId:r.overlayId,tileset2:r,tileset:this._layer._cache[r.overlayId]||null})),this.tileset_arr.forEach(r=>{let s=this._getShader(r.tileset2);r.tileset.setCustomShader(s)}))}deactivate(){this._enable=!1,!(!this.tileset_arr||this.tileset_arr.length===0)&&this.tileset_arr.forEach(e=>{let t=new window.GM.CustomShader;e.tileset.setCustomShader(t)})}},kp=sl;var ol=class{constructor(e,t={}){if(!e)throw Error("missing viewer param");this._id=v.uuid(),this._viewer=e,this._delegate=void 0,this._layer=new i.Cesium.CustomDataSource("terrainClip"),e.dataSources.add(this._layer),this._minHeight=null,this._currentHeight=[],this._area=[],this._enable=t.enable||!0,this._clipOutSide=t.clipOutSide||!1,this._diffHeight=t.diffHeight||0,this._image=t.image||"//data.mars3d.cn/img/textures/poly-land.png",this._imageBottom=t.imageBottom||"//data.mars3d.cn/img/textures/poly-soil.jpg",this._splitNum=t.splitNum||30,this._clippingPolygons=new i.Cesium.ClippingPolygonCollection({enabled:this._enable,polygons:[],inverse:this._clipOutSide}),this._viewer.scene.globe.backFaceCulling=!0,this._viewer.scene.globe.showSkirts=!0,this._state=d.INITIALIZED,this._callback=null}get type(){return"terrainClip"}get layer(){return this._layer}set enable(e){this._enable=e,this._viewer.scene.globe.clippingPolygons.enabled=e}get enable(){return this._enable}set clipOutSide(e){this._clipOutSide=e,this._viewer.scene.globe.clippingPolygons.inverse=e}get clipOutSide(){return this._clipOutSide}set splitNum(e){this._splitNum=e}get splitNum(){return this._splitNum}set diffHeight(e){this._diffHeight=e}get diffHeight(){return this._diffHeight}addArea(e=[],t={},r){t!=null&&t.diffHeight&&(this._diffHeight=t.diffHeight);let s=e.map(a=>i.Cesium.Cartesian3.fromDegrees(a.lng,a.lat,a.alt)),o=new i.Cesium.ClippingPolygon({positions:s});this._id=v.uuid(),o.id=this._id,this._clippingPolygons.add(o),this._viewer.scene.globe.clippingPolygons=this._clippingPolygons,this._prepareWall(e,t),this._callback=r}_prepareWall(e,t={}){let r=e.concat([e[0]]);this._minHeight=null,this._currentHeight=[];let s=this._viewer.terrainProvider;if(s&&!(s instanceof i.Cesium.EllipsoidTerrainProvider)){let o=[];for(let l=0;l<r.length-1;l++){let h=this._lerp(r[l],r[l+1],this._splitNum);o=o.concat(h)}o.push(r[0]);let a=o.map(l=>i.Cesium.Cartographic.fromDegrees(l.lng,l.lat,l.alt));i.Cesium.sampleTerrainMostDetailed(s,a).then(l=>{let h=l.map(c=>{let p=i.Cesium.Math.toDegrees(c.longitude),f=i.Cesium.Math.toDegrees(c.latitude);return this._currentHeight.push(parseFloat(c.height)),(!this._minHeight||c.height<this._minHeight)&&(this._minHeight=c.height),{lng:p,lat:f,alt:c.height}});this._perCreateEntity(e,h,t)})}else r.forEach(o=>{this._currentHeight.push(parseFloat(o.alt)),(!this._minHeight||o.alt<this._minHeight)&&(this._minHeight=o.alt)}),this._perCreateEntity(r,r,t)}_perCreateEntity(e,t,r){let s=this._createWallSurface(t),o=this._createBottomSurface(e),a={id:this._id,diffHeight:this._diffHeight,original:r,positions:e,show:!0};this._area.push({id:this._id,diffHeight:this._diffHeight,original:r,positions:e,entityIds:[s,o],show:!0}),typeof this._callback=="function"&&this._callback(a)}_createWallSurface(e){let t=[];return e.forEach(s=>{t.push(parseFloat(s.lng)),t.push(parseFloat(s.lat))}),this._layer.entities.add({wall:{positions:i.Cesium.Cartesian3.fromDegreesArray(t),material:new i.Cesium.ImageMaterialProperty({image:this._image,repeat:new i.Cesium.Cartesian2(8,1)}),minimumHeights:this._getHeights(e.length,this._minHeight-this._diffHeight),maximumHeights:this._currentHeight}}).id}_createBottomSurface(e){let t=[];e.forEach(o=>{t.push(parseFloat(o.lng)),t.push(parseFloat(o.lat)),t.push(this._minHeight-this._diffHeight)});let r=new i.Cesium.PolygonHierarchy(i.Cesium.Cartesian3.fromDegreesArrayHeights(t));return this._layer.entities.add({polygon:{hierarchy:r,material:new i.Cesium.ImageMaterialProperty({image:this._imageBottom,repeat:new i.Cesium.Cartesian2(1,2)}),perPositionHeight:!0,outline:!1,outlineColor:i.Cesium.Color.BLUE}}).id}_getHeights(e,t){let r=[];for(let s=0;s<e;s++)r.push(t);return r}_lerp(e,t,r=10){let s=[],o=i.Cesium.Cartographic.fromDegrees(e.lng,e.lat,e.alt),a=i.Cesium.Cartographic.fromDegrees(t.lng,t.lat,t.alt);for(let l=0;l<r;l++){let h=i.Cesium.Math.lerp(o.longitude,a.longitude,l/r),c=i.Cesium.Math.lerp(o.latitude,a.latitude,l/r),p=o.height-(o.height-a.height)*(l/r);s.push({lng:i.Cesium.Math.toDegrees(h),lat:i.Cesium.Math.toDegrees(c),alt:p})}return s}getAreaById(e){let t=this._area.filter(r=>r.id===e);return t&&t.length>0?t[0]:null}removeArea(e){let t=this._area.findIndex(a=>a.id===e);if(t==null)throw Error("missing index result");let r=this._area[t];this._layer.entities.removeById(r.entityIds[0]),this._layer.entities.removeById(r.entityIds[1]);let s=this._clippingPolygons._polygons.findIndex(a=>a.id===e),o=this._clippingPolygons.get(s);return this._area.splice(t,1),o&&this._clippingPolygons.remove(o),this}showArea(e){let t=this._area.findIndex(a=>a.id===e);if(t==null)throw Error("missing index result");let r=this._area[t];if(r.show)return;r.show=!0,this._layer.entities.getById(r.entityIds[0]).show=!0,this._layer.entities.getById(r.entityIds[1]).show=!0;let s=r.positions.map(a=>i.Cesium.Cartesian3.fromDegrees(a.lng,a.lat,a.alt)),o=new i.Cesium.ClippingPolygon({positions:s});return o.id=e,this._clippingPolygons.add(o),this}hideArea(e){let t=this._area.findIndex(a=>a.id===e);if(t==null)throw Error("missing index result");let r=this._area[t];if(!r.show)return;r.show=!1,this._layer.entities.getById(r.entityIds[0]).show=!1,this._layer.entities.getById(r.entityIds[1]).show=!1;let s=this._clippingPolygons._polygons.findIndex(a=>a.id===e),o=this._clippingPolygons.get(s);return o&&this._clippingPolygons.remove(o),this}flyToArea(e){let t=this._area.findIndex(o=>o.id===e);if(t==null)throw Error("missing index result");let r=this._area[t],s=this._layer.entities.getById(r.entityIds[0]);return this._viewer.flyTo(s),this}toJSON(){return this._area}clear(){this._layer.entities.removeAll(),this._clippingPolygons.removeAll()}},Fp=ol;function ne(n,e){this.viewer=n,this.options=e||{},this._positions=[new i.Cesium.Cartesian3(-1.1825928630924462e6,5.5155809806405855e6,2966674365247578e-9),new i.Cesium.Cartesian3(-1183337777477057e-9,5515825617716778e-9,2.9659274345367434e6),new i.Cesium.Cartesian3(-1.1845084932830015e6,5515571328839522e-9,2965932974956288e-9),new i.Cesium.Cartesian3(-1.1855870332886775e6,5514889448799464e-9,2.9667642948399023e6),new i.Cesium.Cartesian3(-1.1850990292063756e6,5514576687407264e-9,2967535347584739e-9),new i.Cesium.Cartesian3(-1.1828409384216308e6,551522464431188e-8,2.9672341119776894e6)],this._height=this.options.height||0,this.bottomImg=e.bottomImg,this.wallImg=e.wallImg,this.splitNum=i.Cesium.defaultValue(e.splitNum,50),this._positions&&this._positions.length>0&&this.updateData(this._positions)}Object.defineProperties(ne.prototype,{show:{get:function(){return this._show},set:function(n){this._show=n,this.viewer.scene.globe.clippingPlanes&&(this.viewer.scene.globe.clippingPlanes.enabled=n),this._switchExcavate(n)}},height:{get:function(){return this._height},set:function(n){this._height=n,this._updateExcavateDepth(n)}}});ne.prototype.updateData=function(n){this.clear();var e=[],t=n.length,r=new i.Cesium.Cartesian3,s=i.Cesium.Cartesian3.subtract(n[0],n[1],r);s=s.x>0,this.excavateMinHeight=9999;for(var o=0;o<t;++o){var a=(o+1)%t,l=i.Cesium.Cartographic.fromCartesian(n[o]),h=viewer.scene.globe.getHeight(l)||l.height;h<this.excavateMinHeight&&(this.excavateMinHeight=h);var c=i.Cesium.Cartesian3.add(n[o],n[a],new i.Cesium.Cartesian3);c=i.Cesium.Cartesian3.multiplyByScalar(c,.5,c);var p=i.Cesium.Cartesian3.normalize(c,new i.Cesium.Cartesian3),f=i.Cesium.Cartesian3.subtract(n[a],c,new i.Cesium.Cartesian3);f=i.Cesium.Cartesian3.normalize(f,f);var T=i.Cesium.Cartesian3.cross(f,p,new i.Cesium.Cartesian3);T=i.Cesium.Cartesian3.normalize(T,T);var y=new i.Cesium.Plane(T,0),m=i.Cesium.Plane.getPointDistance(y,c);e.push(new i.Cesium.ClippingPlane(T,m))}this.viewer.scene.globe.clippingPlanes=new i.Cesium.ClippingPlaneCollection({planes:e,edgeWidth:1,edgeColor:i.Cesium.Color.WHITE,enabled:!0}),this._prepareWell(n),this._createWell(this.wellData)};ne.prototype.clear=function(){this.viewer.scene.globe.clippingPlanes&&(this.viewer.scene.globe.clippingPlanes.enabled=!1,this.viewer.scene.globe.clippingPlanes.removeAll(),this.viewer.scene.globe.clippingPlanes.isDestroyed()||this.viewer.scene.globe.clippingPlanes.destroy()),this.viewer.scene.globe.clippingPlanes=void 0,this.bottomSurface&&this.viewer.scene.primitives.remove(this.bottomSurface),this.wellWall&&this.viewer.scene.primitives.remove(this.wellWall),delete this.bottomSurface,delete this.wellWall,this.viewer.scene.render()};ne.prototype._prepareWell=function(n){var e=this.splitNum,t=n.length;if(t!=0){for(var r=this.excavateMinHeight-this.height,s=[],o=[],a=[],l=0;l<t;l++){var h=l==t-1?0:l+1,c=i.Cesium.Cartographic.fromCartesian(n[l]),p=i.Cesium.Cartographic.fromCartesian(n[h]),f=[c.longitude,c.latitude],T=[p.longitude,p.latitude];l==0&&(a.push(new i.Cesium.Cartographic(f[0],f[1])),o.push(i.Cesium.Cartesian3.fromRadians(f[0],f[1],r)),s.push(i.Cesium.Cartesian3.fromRadians(f[0],f[1],0)));for(var y=1;y<=e;y++){var m=i.Cesium.Math.lerp(f[0],T[0],y/e),E=i.Cesium.Math.lerp(f[1],T[1],y/e);l==t-1&&y==e||(a.push(new i.Cesium.Cartographic(m,E)),o.push(i.Cesium.Cartesian3.fromRadians(m,E,r)),s.push(i.Cesium.Cartesian3.fromRadians(m,E,0)))}}this.wellData={lerp_pos:a,bottom_pos:o,no_height_top:s}}};ne.prototype._createWell=function(n){if(this.viewer.terrainProvider._layers){var e=this;this._createBottomSurface(n.bottom_pos);var t=i.Cesium.sampleTerrainMostDetailed(this.viewer.terrainProvider,n.lerp_pos);i.Cesium.when(t,function(r){for(var s=r.length,o=[],a=0;a<s;a++){var l=i.Cesium.Cartesian3.fromRadians(r[a].longitude,r[a].latitude,r[a].height);o.push(l)}e._createWellWall(n.bottom_pos,o)})}else this._createBottomSurface(n.bottom_pos),this._createWellWall(n.bottom_pos,n.no_height_top)};ne.prototype._getMinHeight=function(n){let e=5e6,t=null;for(let r=0;r<n.length;r++){let s=n[r].z;s<e&&(e=s,t=this._ellipsoidToLonLat(n[r]))}return t.altitude};ne.prototype._ellipsoidToLonLat=function(n){let e=this.viewer.scene.globe.ellipsoid,t=new i.Cesium.Cartesian3(n.x,n.y,n.z),r=e.cartesianToCartographic(t),s=i.Cesium.Math.toDegrees(r.latitude),o=i.Cesium.Math.toDegrees(r.longitude),a=r.height;return{longitude:o,latitude:s,altitude:a}};ne.prototype._createBottomSurface=function(n){if(n.length){let r=this._getMinHeight(n),s=[];for(let l=0;l<n.length;l++){let h=this._ellipsoidToLonLat(n[l]);s.push(h.longitude),s.push(h.latitude),s.push(r)}let o=new i.Cesium.PolygonGeometry({polygonHierarchy:new i.Cesium.PolygonHierarchy(i.Cesium.Cartesian3.fromDegreesArrayHeights(s)),perPositionHeight:!0,closeBottom:!1}),a=i.Cesium.PolygonGeometry.createGeometry(o);var e=new i.Cesium.Material({fabric:{type:"Image",uniforms:{image:this.bottomImg}}}),t=new i.Cesium.MaterialAppearance({translucent:!1,flat:!0,material:e});this.bottomSurface=new i.Cesium.Primitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:a}),appearance:t,asynchronous:!1}),this.viewer.scene.primitives.add(this.bottomSurface)}};ne.prototype._createWellWall=function(n,e){let t=this._getMinHeight(n),r=[],s=[];for(let c=0;c<e.length;c++)r.push(this._ellipsoidToLonLat(e[c]).altitude),s.push(t);let o=new i.Cesium.WallGeometry({positions:e,maximumHeights:r,minimumHeights:s}),a=i.Cesium.WallGeometry.createGeometry(o);var l=new i.Cesium.Material({fabric:{type:"Image",uniforms:{image:this.wallImg}}}),h=new i.Cesium.MaterialAppearance({translucent:!1,flat:!0,material:l});this.wellWall=new i.Cesium.Primitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:a,attributes:{color:i.Cesium.ColorGeometryInstanceAttribute.fromColor(i.Cesium.Color.GREY)},id:"PitWall"}),appearance:h,asynchronous:!1}),this.viewer.scene.primitives.add(this.wellWall)};ne.prototype._switchExcavate=function(n){n?(this.viewer.scene.globe.material=i.Cesium.Material.fromType("WaJue"),this.wellWall.show=!0,this.bottomSurface.show=!0):(this.viewer.scene.globe.material=null,this.wellWall.show=!1,this.bottomSurface.show=!1)};ne.prototype._updateExcavateDepth=function(n){this.bottomSurface&&this.viewer.scene.primitives.remove(this.bottomSurface),this.wellWall&&this.viewer.scene.primitives.remove(this.wellWall);for(var e=this.wellData.lerp_pos,t=[],r=e.length,s=0;s<r;s++)t.push(i.Cesium.Cartesian3.fromRadians(e[s].longitude,e[s].latitude,this.excavateMinHeight-n));this.wellData.bottom_pos=t,this._createWell(this.wellData),this.viewer.scene.primitives.add(this.bottomSurface),this.viewer.scene.primitives.add(this.wellWall)};var zp=ne;var al=class{constructor(e,t={}){if(!e)throw Error("missing viewer param");this._id=v.uuid(),this._viewer=e,this._delegate=void 0,this._layer=new i.Cesium.CustomDataSource("TerrainUplift"),e.dataSources.add(this._layer),this._minHeight=null,this._currentHeight=[],this._area=[],this._enable=t.enable||!0,this._upHeight=t.upHeight||0,this._clipOutSide=t.clipOutSide||!1,this._diffHeight=t.diffHeight||0,this._image=t.image||"//data.mars3d.cn/img/textures/poly-land.png",this._imageBottom=t.imageBottom||"//data.mars3d.cn/img/textures/poly-soil.jpg",this._splitNum=t.splitNum||30,this._clippingPolygons=new i.Cesium.ClippingPolygonCollection({enabled:this._enable,polygons:[],inverse:this._clipOutSide}),this._viewer.scene.globe.backFaceCulling=!0,this._viewer.scene.globe.showSkirts=!0,this._state=d.INITIALIZED,this._callback=null}get type(){return"TerrainUplift"}get layer(){return this._layer}set enable(e){this._enable=e,this._viewer.scene.globe.clippingPolygons.enabled=e}get enable(){return this._enable}set clipOutSide(e){this._clipOutSide=e,this._viewer.scene.globe.clippingPolygons.inverse=e}get clipOutSide(){return this._clipOutSide}set splitNum(e){this._splitNum=e}get splitNum(){return this._splitNum}set diffHeight(e){this._diffHeight=e}get diffHeight(){return this._diffHeight}addArea(e=[],t={},r){t!=null&&t.diffHeight&&(this._diffHeight=t.diffHeight);let s=e.map(a=>i.Cesium.Cartesian3.fromDegrees(a.lng,a.lat,a.alt)),o=new i.Cesium.ClippingPolygon({positions:s});this._id=v.uuid(),o.id=this._id,this._clippingPolygons.add(o),this._viewer.scene.globe.clippingPolygons=this._clippingPolygons,this._prepareWall(e,t),this._callback=r}_prepareWall(e,t={}){let r=e.concat([e[0]]);this._minHeight=null,this._currentHeight=[];let s=this._viewer.terrainProvider;if(s&&!(s instanceof i.Cesium.EllipsoidTerrainProvider)){let o=[];for(let l=0;l<r.length-1;l++){let h=this._lerp(r[l],r[l+1],this._splitNum);o=o.concat(h)}o.push(r[0]);let a=o.map(l=>i.Cesium.Cartographic.fromDegrees(l.lng,l.lat,l.alt));i.Cesium.sampleTerrainMostDetailed(s,a).then(l=>{let h=l.map(c=>{let p=i.Cesium.Math.toDegrees(c.longitude),f=i.Cesium.Math.toDegrees(c.latitude);return this._currentHeight.push(parseFloat(c.height)),(!this._minHeight||c.height<this._minHeight)&&(this._minHeight=c.height),{lng:p,lat:f,alt:c.height}});this._perCreateEntity(e,h,t)})}else r.forEach(o=>{this._currentHeight.push(parseFloat(o.alt)),(!this._minHeight||o.alt<this._minHeight)&&(this._minHeight=o.alt)}),this._perCreateEntity(r,r,t)}_perCreateEntity(e,t,r){let s=this._createWallSurface(t),o=this._createBottomSurface(e),a=this._adjustTerrainHeight(e),l={id:this._id,diffHeight:this._diffHeight,original:r,positions:e,entityIds:[s,o],show:!0};this._area.push(l),typeof this._callback=="function"&&this._callback(l)}_adjustTerrainHeight(e,t=1e3){console.log(111111111111);let r=new i.Cesium.EllipsoidSurfaceAppearance({}),s=[];e.forEach(l=>{s.push(parseFloat(l.lng)),s.push(parseFloat(l.lat)),s.push(this._minHeight+t)});let o=new i.Cesium.PolygonHierarchy(i.Cesium.Cartesian3.fromDegreesArrayHeights(s));return this._layer.entities.add({polygon:{hierarchy:o,material:r.material,perPositionHeight:!0,outline:!1,outlineColor:i.Cesium.Color.BLUE}}).id}_createWallSurface(e){let t=[];return e.forEach(s=>{t.push(parseFloat(s.lng)),t.push(parseFloat(s.lat))}),this._layer.entities.add({wall:{positions:i.Cesium.Cartesian3.fromDegreesArray(t),material:new i.Cesium.ImageMaterialProperty({image:this._image,repeat:new i.Cesium.Cartesian2(8,1)}),minimumHeights:this._getHeights(e.length,this._minHeight-this._diffHeight),maximumHeights:this._currentHeight}}).id}_createBottomSurface(e){let t=[];e.forEach(o=>{t.push(parseFloat(o.lng)),t.push(parseFloat(o.lat)),t.push(this._minHeight-this._diffHeight)});let r=new i.Cesium.PolygonHierarchy(i.Cesium.Cartesian3.fromDegreesArrayHeights(t));return this._layer.entities.add({polygon:{hierarchy:r,material:new i.Cesium.ImageMaterialProperty({image:this._imageBottom,repeat:new i.Cesium.Cartesian2(1,2)}),perPositionHeight:!0,outline:!1,outlineColor:i.Cesium.Color.BLUE}}).id}_getHeights(e,t){let r=[];for(let s=0;s<e;s++)r.push(t);return r}_lerp(e,t,r=10){let s=[],o=i.Cesium.Cartographic.fromDegrees(e.lng,e.lat,e.alt),a=i.Cesium.Cartographic.fromDegrees(t.lng,t.lat,t.alt);for(let l=0;l<r;l++){let h=i.Cesium.Math.lerp(o.longitude,a.longitude,l/r),c=i.Cesium.Math.lerp(o.latitude,a.latitude,l/r),p=o.height-(o.height-a.height)*(l/r);s.push({lng:i.Cesium.Math.toDegrees(h),lat:i.Cesium.Math.toDegrees(c),alt:p})}return s}getAreaById(e){let t=this._area.filter(r=>r.id===e);return t&&t.length>0?t[0]:null}removeArea(e){let t=this._area.findIndex(a=>a.id===e);if(t==null)throw Error("missing index result");let r=this._area[t];this._layer.entities.removeById(r.entityIds[0]),this._layer.entities.removeById(r.entityIds[1]);let s=this._clippingPolygons._polygons.findIndex(a=>a.id===e),o=this._clippingPolygons.get(s);return this._area.splice(t,1),o&&this._clippingPolygons.remove(o),this}showArea(e){let t=this._area.findIndex(a=>a.id===e);if(t==null)throw Error("missing index result");let r=this._area[t];if(r.show)return;r.show=!0,this._layer.entities.getById(r.entityIds[0]).show=!0,this._layer.entities.getById(r.entityIds[1]).show=!0;let s=r.positions.map(a=>i.Cesium.Cartesian3.fromDegrees(a.lng,a.lat,a.alt)),o=new i.Cesium.ClippingPolygon({positions:s});return o.id=e,this._clippingPolygons.add(o),this}hideArea(e){let t=this._area.findIndex(a=>a.id===e);if(t==null)throw Error("missing index result");let r=this._area[t];if(!r.show)return;r.show=!1,this._layer.entities.getById(r.entityIds[0]).show=!1,this._layer.entities.getById(r.entityIds[1]).show=!1;let s=this._clippingPolygons._polygons.findIndex(a=>a.id===e),o=this._clippingPolygons.get(s);return o&&this._clippingPolygons.remove(o),this}flyToArea(e){let t=this._area.findIndex(o=>o.id===e);if(t==null)throw Error("missing index result");let r=this._area[t],s=this._layer.entities.getById(r.entityIds[0]);return this._viewer.flyTo(s),this}toJSON(){return this._area}clear(){this._layer.entities.removeAll(),this._clippingPolygons.removeAll()}},Hp=al;var nl=class{constructor(e){ni(this,"_analysisTerrainVisible",e=>{let t=this._viewer.terrainProvider,r=e.map(s=>i.Cesium.Cartographic.fromDegrees(s.lng,s.lat,s.alt));i.Cesium.sampleTerrainMostDetailed(t,r).then(s=>{let o=0,a=null;for(let l=0;l<s.length-1;l++){if(l<s.length-2){let h=e[l],c=e[l+1],p=i.Cesium.Cartesian3.fromDegrees(h.lng,h.lat,h.alt),f=i.Cesium.Cartesian3.fromDegrees(c.lng,c.lat,c.alt);if(a=this._analysisModelVisible([p,f]),i.Cesium.defined(a)&&i.Cesium.defined(a.object)){console.log("\u5728\u6A21\u578B\u4E0A.");let T=i.Cesium.Cartesian3.fromDegrees(e[0].lng,e[0].lat,e[0].alt),y=i.Cesium.Cartesian3.fromDegrees(e[e.length-1].lng,e[e.length-1].lat,e[e.length-1].alt);this._drawLine(a.position,T,i.Cesium.Color.GREEN),this._drawLine(a.position,y,i.Cesium.Color.RED);break}}if(s[l].height>=e[l].alt){console.log("\u5728\u5730\u5F62\u4E0A."),o=l;let h=i.Cesium.Cartesian3.fromDegrees(e[0].lng,e[0].lat,e[0].alt),c=i.Cesium.Cartesian3.fromDegrees(e[l].lng,e[l].lat,e[l].alt),p=i.Cesium.Cartesian3.fromDegrees(e[e.length-1].lng,e[e.length-1].lat,e[e.length-1].alt);this._drawLine(h,c,i.Cesium.Color.GREEN),this._drawLine(c,p,i.Cesium.Color.RED);break}}if(o===0&&a===null){console.log("\u5168\u90E8\u53EF\u89C6.");let l=i.Cesium.Cartesian3.fromDegrees(e[0].lng,e[0].lat,e[0].alt),h=i.Cesium.Cartesian3.fromDegrees(e[e.length-1].lng,e[e.length-1].lat,e[e.length-1].alt);this._drawLine(l,h,i.Cesium.Color.GREEN)}})});ni(this,"_analysisModelVisible",e=>{let t=i.Cesium.Cartesian3.normalize(i.Cesium.Cartesian3.subtract(e[1],e[0],new i.Cesium.Cartesian3),new i.Cesium.Cartesian3),r=new i.Cesium.Ray(e[0],t);return this._viewer.scene.pickFromRay(r)});this._id=v.uuid(),this._viewer=e,this._layer=new i.Cesium.CustomDataSource("sightLine"),this._viewer.dataSources.add(this._layer)}get type(){return"sightLine"}get layer(){return this._layer}_init(e,t,r=10){this._layer&&this._layer.entities.removeAll();let s=i.Cesium.Cartesian3.fromDegrees(e.lng,e.lat,e.alt),o=i.Cesium.Cartesian3.fromDegrees(t.lng,t.lat,t.alt),a=this._viewer.terrainProvider;if(a&&!(a instanceof i.Cesium.EllipsoidTerrainProvider)){let l=this._lerp(e,t,r).concat([t]);this._analysisTerrainVisible(l)}else this._analysisVisible([s,o])}_analysisVisible(e){let t=this._analysisModelVisible(e);if(i.Cesium.defined(t)&&i.Cesium.defined(t.object)){let r=this._drawLine(t.position,e[0],i.Cesium.Color.GREEN),s=this._drawLine(t.position,e[1],i.Cesium.Color.RED);console.log("\u5728\u6A21\u578B\u4E0A.",r,s)}else{let r=this._drawLine(e[0],e[1],i.Cesium.Color.GREEN);console.log("\u4E0D\u5728\u6A21\u578B\u4E0A",r)}}_drawLine(e,t,r){return this._layer||(this._layer=new i.Cesium.CustomDataSource("sightLine"),this._viewer.dataSources.add(this._layer)),this._layer&&this._layer.entities.add({polyline:{positions:[e,t],width:2,material:r,depthFailMaterial:r}}),this}_lerp(e,t,r=10){let s=[],o=i.Cesium.Cartographic.fromDegrees(e.lng,e.lat,e.alt),a=i.Cesium.Cartographic.fromDegrees(t.lng,t.lat,t.alt);for(let l=0;l<r;l++){let h=i.Cesium.Math.lerp(o.longitude,a.longitude,l/r),c=i.Cesium.Math.lerp(o.latitude,a.latitude,l/r),p=o.height-(o.height-a.height)*(l/r);s.push({lng:i.Cesium.Math.toDegrees(h),lat:i.Cesium.Math.toDegrees(c),alt:p})}return s}deactivate(){this._layer&&this._layer.entities.removeAll(),this._layer&&this._viewer.dataSources.remove(this._layer),this._layer=null}},Np=nl;var ll=class{constructor(e){if(!e)throw Error("missing viewer param");this._viewer=e,this._contourLine=new Op(e),this._tilesetShake=new kp(e),this._sightLine=new Np(e)}get ContourLine(){return this._contourLine}get TilesetShake(){return this._tilesetShake}get SightLine(){return this._sightLine}contourLine(e,t,r){this._contourLine._init(e,t,r)}tilesetShake(e,t){this._tilesetShake._init(e,t)}terrainClip(e={}){return new Fp(this._viewer,e)}terrainClipPlan(e={}){return new zp(this._viewer,e)}terrainUplift(e={}){return new Hp(this._viewer,e)}sightLine(e,t,r){return this._sightLine._init(e,t,r)}deactivate(e=null){switch(e){case lt.SIGHT_LINE:this._sightLine.deactivate();break;default:this._contourLine.deactivate(),this._tilesetShake.deactivate();break}return this}},hl=ll;var cl=class{constructor(e){this._style=e,this._viewer=void 0,this._layer=void 0,this._delegate=void 0,this._options={},this._positions=[]}get drawTool(){return this._viewer.drawTool}_mountedHook(){}_onDrawAnchor(e){}_onAnchorMoving(e){this._positions.pop(),this._positions.push(e),this._options.onCalc&&this._options.onCalc(this._positions)}_onDrawStop(){this._unbindEvent(),this._viewer.drawTool.deactivate(),this._options.onDrawStop&&this._options.onDrawStop(this._delegate)}_bindEvent(){this.drawTool.on(C.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.on(C.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.on(C.DRAW_STOP,this._onDrawStop,this)}_unbindEvent(){this.drawTool.off(C.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.off(C.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.off(C.DRAW_STOP,this._onDrawStop,this)}start(e,t){return this._viewer=e.viewer,this._layer=e.layer,this._options=t,this._viewer.editTool.deactivate(),this._viewer.drawTool.activate(t),this._mountedHook(),this._unbindEvent(),this._bindEvent(),this}},Wp=cl;var pl=class extends Wp{constructor(e){super(e)}_mountedHook(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D,\u53F3\u51FB\u7ED3\u675F",this._delegate=new i.Cesium.Entity({polyline:{...this._style,positions:new i.Cesium.CallbackProperty(()=>this._positions,!1)}}),this._layer.entities.add(this._delegate)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),t>0&&this.drawTool.fire(C.CREATE_ANCHOR,{position:e}),t>=this._options.maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(C.DRAW_STOP,e))}},Gp=pl;var dl=class{constructor(){this._viewer=void 0,this._layer=void 0,this._startLabel=new i.Cesium.Entity({label:{text:"\u5F00\u59CB",font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._resultLabel=new i.Cesium.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._options={}}_getSampledHeight(e,t=!1){let r=this._viewer.terrainProvider&&!(this._viewer.terrainProvider instanceof i.Cesium.EllipsoidTerrainProvider)?i.Cesium.sampleTerrainMostDetailed(this._viewer.terrainProvider,e.map(o=>i.Cesium.Cartographic.fromCartesian(o))):Promise.resolve(e.map(o=>i.Cesium.Cartographic.fromCartesian(o))),s=this._viewer.scene.clampToHeightSupported&&t?this._viewer.scene.clampToHeightMostDetailed(e,this._layer.entities.values):Promise.resolve(e);return Promise.all([r,s])}_onDrawStop(e){}_onComputedStop(e,t=!1){let r=[];return t?r=e.map((s,o)=>{let l=this._viewer.scene.globe.ellipsoid.cartesianToCartographic(s),h=0;for(let c=1;c<=o;c++){let p=i.Cesium.Cartesian3.distance(e[c-1],e[c]);h+=p}return{longitude:i.Cesium.Math.toDegrees(l.longitude),latitude:i.Cesium.Math.toDegrees(l.latitude),height:l.height,distance:h,cartesian3Position:s}}):r=e.map((s,o)=>{let a=0;for(let l=1;l<=o;l++){let h=i.Cesium.Cartesian3.fromRadians(e[l-1].longitude,e[l-1].latitude,e[l-1].height),c=i.Cesium.Cartesian3.fromRadians(e[l].longitude,e[l].latitude,e[l].height),p=i.Cesium.Cartesian3.distance(h,c);a+=p}return{longitude:i.Cesium.Math.toDegrees(s.longitude),latitude:i.Cesium.Math.toDegrees(s.latitude),height:s.height,distance:a,cartesian3Position:i.Cesium.Cartesian3.fromRadians(s.longitude,s.latitude,s.height)}}),r}_onCalc(e){}_startHook(e,t){this._viewer=e.viewer,this._layer=e.layer,this._options=t,this._options.onDrawStop=this._onDrawStop.bind(this),this._options.onCalc=this._onCalc.bind(this),this._layer.entities.add(this._startLabel),this._layer.entities.add(this._resultLabel)}start(e,t){return this}},Up=dl;var ml=class extends Up{constructor(){super(),this._maxAnchorSize=9999,this._positions=[],this._includeModel=!0,this._callback=null}_lerp(e,t,r=5){let s=[],o=i.Cesium.Cartographic.fromCartesian(e),a=i.Cesium.Cartographic.fromCartesian(t);for(let l=0;l<r;l++){let h=i.Cesium.Math.lerp(o.longitude,a.longitude,l/r),c=i.Cesium.Math.lerp(o.latitude,a.latitude,l/r),p=o.height-(o.height-a.height)*(l/r);s.push(i.Cesium.Cartesian3.fromRadians(h,c,p))}return s}async _onDrawStop(e){let t=this._positions.filter((s,o)=>o!==1),r=await this._onComputedStop(t,this._includeModel);typeof this._callback=="function"&&await this._callback(r)}_stoppedHook(){this._options.onDrawStop&&this._options.onDrawStop(entity)}_onCalc(e){if(e.length>0&&(this._startLabel.position=e[0]),e.length>1){let t=[e[0]];this._resultLabel.position=e[e.length-1];for(let r=0;r<e.length-1;r++)t=t.concat(this._lerp(e[r],e[r+1],this._options.lerpNum));t.push(e[e.length-1]),this._getSampledHeight(t,this._includeModel).then(([r,s])=>(this._includeModel||(this._positions=r),r.map((o,a)=>i.Cesium.Cartesian3.fromDegrees(i.Cesium.Math.toDegrees(o.longitude),i.Cesium.Math.toDegrees(o.latitude),Math.max(o.height||0,s[a]?i.Cesium.Cartographic.fromCartesian(s[a]).height:0))))).then(r=>{this._includeModel&&(this._positions=r);let s=0;for(let o=0;o<r.length-1;o++){let a=i.Cesium.Cartesian3.distance(r[o],r[o+1]);s+=a}this._resultLabel.label.text=s>1e3?`\u8DDD\u79BB\uFF1A${(s/1e3).toFixed(2)} \u516C\u91CC`:`\u8DDD\u79BB\uFF1A${s.toFixed(2)} \u7C73`})}}start(e,t,r={}){return this._startHook(e,r),new Gp({material:r.material||i.Cesium.Color.YELLOW.withAlpha(.6),depthFailMaterial:r.depthFailMaterial||new i.Cesium.PolylineDashMaterialProperty({color:i.Cesium.Color.YELLOW.withAlpha(.6)}),width:r.width||2,clampToGround:!0}).start(e,{...this._options,maxAnchorSize:this._maxAnchorSize}),this._includeModel=r==null?void 0:r.includeModel,this._callback=t,this}},Bp=ml;var ul=class{constructor(e){if(!e)throw Error("missing viewer param");this._viewer=e,this._layer=new i.Cesium.CustomDataSource("plotAnalysis-layer"),this._viewer.dataSources.add(this._layer)}get viewer(){return this._viewer}get layer(){return this._layer}profile(e,t={}){var r;return(r=new Bp)==null||r.start(this,e,t),this}activate(e,t){switch(e){case ht.PROFILE:this.profile(t);break;default:break}return this}deactivate(){return this._layer.entities.removeAll(),this._viewer.drawTool.tooltipMess="",this._viewer.drawTool.deactivate(),this._viewer.editTool.tooltipMess="",this._viewer.editTool.deactivate(),this}},_l=ul;var fl=class{static init(){let e=me("turf");if(!e)throw new Error("miss the turf lib");return e}static pointBuffer(e,t=50,r=8){let s=this.init(),o=_.parsePosition(e),a=s.point([o.lng,o.lat,o.alt]),l=s.buffer(a,t,{units:"meters",steps:r}),{coordinates:h}=l.geometry;return h&&h.length>0?h[0]:[]}static polylineBuffer(e,t=50,r=8){let s=this.init(),a=_.parsePositions(e).map(p=>[p.lng,p.lat,p.alt]),l=s.lineString(a),h=s.buffer(l,t,{units:"meters",steps:r}),{coordinates:c}=h.geometry;return c&&c.length>0?c[0]:[]}static polygonBuffer(e,t=50,r=8){let s=this.init(),o=_.parsePositions(e),a=o.concat(o[0]).map(p=>[p.lng,p.lat,p.alt]),l=s.polygon([a]),h=s.buffer(l,t,{units:"meters",steps:r}),{coordinates:c}=h.geometry;return c&&c.length>0?c[0]:[]}static transformPolylineScale(e,t=1){let r=this.init(),o=_.parsePositions(e).map(c=>[c.lng,c.lat,c.alt]),a=r.lineString(o),l=r.transformScale(a,t,{units:"meters"}),{coordinates:h}=l.geometry;return h}static transformPolygonScale(e,t){let r=this.init(),s=_.parsePositions(e),o=s.concat(s[0]).map(c=>[c.lng,c.lat,c.alt]),a=r.polygon([o]),l=r.transformScale(a,t,{units:"meters"}),{coordinates:h}=l.geometry;return h&&h.length>0?h[0]:[]}static transformPolylineRotate(e,t=0){let r=this.init(),o=_.parsePositions(e).map(c=>[c.lng,c.lat,c.alt]),a=r.lineString(o),l=r.transformRotate(a,t,{units:"meters"}),{coordinates:h}=l.geometry;return h}static transformPolygonRotate(e,t=0){let r=this.init(),s=_.parsePositions(e),o=s.concat(s[0]).map(c=>[c.lng,c.lat,c.alt]),a=r.polygon([o]),l=r.transformRotate(a,t,{units:"meters"}),{coordinates:h}=l.geometry;return h&&h.length>0?h[0]:[]}static sector(e,t,r,s){let o=this.init(),a=_.parsePosition(e),l=o.point([a.lng,a.lat,a.alt]),h=o.sector(l,t,r,s,{units:"meters"}),{coordinates:c}=h.geometry;return c&&c.length>0?c[0]:[]}static polygonEquivalent(e,t,r,s=null){let o=this.init(),a=[];for(let p=0,f=e.length;p<f;p++){let T=e[p];a.push({type:"Feature",properties:T,geometry:{type:"Point",coordinates:[T.x,T.y]}})}let l={type:"FeatureCollection",features:a};s&&s!==null&&(l=o.interpolate(l,s.cellSize||10,{gridType:"point",property:r,units:(s==null?void 0:s.units)||"kilometers",weight:(s==null?void 0:s.weight)||1}),l.features.map(p=>p.properties[r]=Number(p.properties[r].toFixed(2))));let h=o.isobands(l,t,{zProperty:r}),c=o.isolines(l,t,{zProperty:r});return{geojsonPoly:h,geojsonLine:c}}},gl=fl;var Nu=i.Cesium.Cartesian2,Wu=i.Cesium.Cartesian3,Gu=i.Cesium.Matrix3,Uu=i.Cesium.Matrix4,Bu=i.Cesium.Material,Vu=i.Cesium.SceneMode,ju=i.Cesium.SkyBox,Yu=i.Cesium.Color,Zu=i.Cesium.Rectangle,qu=i.Cesium.ShadowMode,Xu=i.Cesium.JulianDate,Ju=i.Cesium.HeightReference,Ku=i.Cesium.HorizontalOrigin,Qu=i.Cesium.VerticalOrigin,$u=i.Cesium.CallbackProperty,e_=i.Cesium.ClassificationType,t_=i.Cesium.Cesium3DTileStyle,i_=i.Cesium.GeographicTilingScheme,r_=i.Cesium.WebMercatorTilingScheme,s_=i.Cesium.ColorMaterialProperty,o_=i.Cesium.ImageMaterialProperty,a_=i.Cesium.PolylineDashMaterialProperty,n_=i.Cesium.PolylineGlowMaterialProperty,l_=i.Cesium.PolylineOutlineMaterialProperty,h_=i.Cesium.PolylineArrowMaterialProperty,c_=i.Cesium.writeTextToCanvas,p_=i.Cesium.CustomShaderMode,d_=i.Cesium.CustomShaderTranslucencyMode,m_=i.Cesium.CustomShader,u_=i.Cesium.UniformType,__=i.Cesium.Ellipsoid,f_=i.Cesium.Resource,g_=i.Cesium.createGooglePhotorealistic3DTileset,y_=i.Cesium.createElevationBandMaterial,v_=i.Cesium.ModelAnimationLoop,w_=i.Cesium.ClippingPlane,T_=i.Cesium.ClippingPlaneCollection,C_=i.Cesium.ClippingPolygon,x_=i.Cesium.ClippingPolygonCollection;var E_="./libs/gm-sdk/resources/",Vp=E_,jp=!1,P_={set baseUrl(n){Vp=n},get baseUrl(){return Vp}};function b_(n={}){return jp?Promise.resolve():(Yp&&Yp(),new Promise((e,t)=>{n.baseUrl&&(this.config.baseUrl=n.baseUrl),n.echarts&&(Gl(n.echarts),de("echarts",n.echarts)),n.turf&&de("turf",n.turf),n.shpUtil&&de("shpUtil",n.shpUtil),jp=!0,mt("isInitialized",!0),mt("baseUrl",this.config.baseUrl),e()}).catch(e=>{throw new Error(e.message)}))}function Yp(){console.clear(),console.log(`%c
17514
+ `}_init(e,t={}){this._enable=!0,this._maxDistance=t.maxDistance||5,this._speed=t.speed||1e3,this._maxHeight=t.maxHeight||20,e&&(this._layer=e,this.tileset_arr=this._layer.delegate._primitives.map(r=>({overlayId:r.overlayId,tileset2:r,tileset:this._layer._cache[r.overlayId]||null})),this.tileset_arr.forEach(r=>{let s=this._getShader(r.tileset2);r.tileset.setCustomShader(s)}))}deactivate(){this._enable=!1,!(!this.tileset_arr||this.tileset_arr.length===0)&&this.tileset_arr.forEach(e=>{let t=new window.GM.CustomShader;e.tileset.setCustomShader(t)})}},Kf=fh;var gh=class{constructor(e,t={}){if(!e)throw Error("missing viewer param");this._id=v.uuid(),this._viewer=e,this._delegate=void 0,this._layer=new i.Cesium.CustomDataSource("terrainClip"),e.dataSources.add(this._layer),this._minHeight=null,this._currentHeight=[],this._area=[],this._enable=t.enable||!0,this._clipOutSide=t.clipOutSide||!1,this._diffHeight=t.diffHeight||0,this._image=t.image||"//data.mars3d.cn/img/textures/poly-land.png",this._imageBottom=t.imageBottom||"//data.mars3d.cn/img/textures/poly-soil.jpg",this._splitNum=t.splitNum||30,this._clippingPolygons=new i.Cesium.ClippingPolygonCollection({enabled:this._enable,polygons:[],inverse:this._clipOutSide}),this._viewer.scene.globe.backFaceCulling=!0,this._viewer.scene.globe.showSkirts=!0,this._state=m.INITIALIZED,this._callback=null}get type(){return"terrainClip"}get layer(){return this._layer}set enable(e){this._enable=e,this._viewer.scene.globe.clippingPolygons.enabled=e}get enable(){return this._enable}set clipOutSide(e){this._clipOutSide=e,this._viewer.scene.globe.clippingPolygons.inverse=e}get clipOutSide(){return this._clipOutSide}set splitNum(e){this._splitNum=e}get splitNum(){return this._splitNum}set diffHeight(e){this._diffHeight=e}get diffHeight(){return this._diffHeight}addArea(e=[],t={},r){t!=null&&t.diffHeight&&(this._diffHeight=t.diffHeight);let s=e.map(n=>i.Cesium.Cartesian3.fromDegrees(n.lng,n.lat,n.alt)),o=new i.Cesium.ClippingPolygon({positions:s});this._id=v.uuid(),o.id=this._id,this._clippingPolygons.add(o),this._viewer.scene.globe.clippingPolygons=this._clippingPolygons,this._prepareWall(e,t),this._callback=r}_prepareWall(e,t={}){let r=e.concat([e[0]]);this._minHeight=null,this._currentHeight=[];let s=this._viewer.terrainProvider;if(s&&!(s instanceof i.Cesium.EllipsoidTerrainProvider)){let o=[];for(let l=0;l<r.length-1;l++){let h=this._lerp(r[l],r[l+1],this._splitNum);o=o.concat(h)}o.push(r[0]);let n=o.map(l=>i.Cesium.Cartographic.fromDegrees(l.lng,l.lat,l.alt));i.Cesium.sampleTerrainMostDetailed(s,n).then(l=>{let h=l.map(c=>{let p=i.Cesium.Math.toDegrees(c.longitude),_=i.Cesium.Math.toDegrees(c.latitude);return this._currentHeight.push(parseFloat(c.height)),(!this._minHeight||c.height<this._minHeight)&&(this._minHeight=c.height),{lng:p,lat:_,alt:c.height}});this._perCreateEntity(e,h,t)})}else r.forEach(o=>{this._currentHeight.push(parseFloat(o.alt)),(!this._minHeight||o.alt<this._minHeight)&&(this._minHeight=o.alt)}),this._perCreateEntity(r,r,t)}_perCreateEntity(e,t,r){let s=this._createWallSurface(t),o=this._createBottomSurface(e),n={id:this._id,diffHeight:this._diffHeight,original:r,positions:e,show:!0};this._area.push({id:this._id,diffHeight:this._diffHeight,original:r,positions:e,entityIds:[s,o],show:!0}),typeof this._callback=="function"&&this._callback(n)}_createWallSurface(e){let t=[];return e.forEach(s=>{t.push(parseFloat(s.lng)),t.push(parseFloat(s.lat))}),this._layer.entities.add({wall:{positions:i.Cesium.Cartesian3.fromDegreesArray(t),material:new i.Cesium.ImageMaterialProperty({image:this._image,repeat:new i.Cesium.Cartesian2(8,1)}),minimumHeights:this._getHeights(e.length,this._minHeight-this._diffHeight),maximumHeights:this._currentHeight}}).id}_createBottomSurface(e){let t=[];e.forEach(o=>{t.push(parseFloat(o.lng)),t.push(parseFloat(o.lat)),t.push(this._minHeight-this._diffHeight)});let r=new i.Cesium.PolygonHierarchy(i.Cesium.Cartesian3.fromDegreesArrayHeights(t));return this._layer.entities.add({polygon:{hierarchy:r,material:new i.Cesium.ImageMaterialProperty({image:this._imageBottom,repeat:new i.Cesium.Cartesian2(1,2)}),perPositionHeight:!0,outline:!1,outlineColor:i.Cesium.Color.BLUE}}).id}_getHeights(e,t){let r=[];for(let s=0;s<e;s++)r.push(t);return r}_lerp(e,t,r=10){let s=[],o=i.Cesium.Cartographic.fromDegrees(e.lng,e.lat,e.alt),n=i.Cesium.Cartographic.fromDegrees(t.lng,t.lat,t.alt);for(let l=0;l<r;l++){let h=i.Cesium.Math.lerp(o.longitude,n.longitude,l/r),c=i.Cesium.Math.lerp(o.latitude,n.latitude,l/r),p=o.height-(o.height-n.height)*(l/r);s.push({lng:i.Cesium.Math.toDegrees(h),lat:i.Cesium.Math.toDegrees(c),alt:p})}return s}getAreaById(e){let t=this._area.filter(r=>r.id===e);return t&&t.length>0?t[0]:null}removeArea(e){let t=this._area.findIndex(n=>n.id===e);if(t==null)throw Error("missing index result");let r=this._area[t];this._layer.entities.removeById(r.entityIds[0]),this._layer.entities.removeById(r.entityIds[1]);let s=this._clippingPolygons._polygons.findIndex(n=>n.id===e),o=this._clippingPolygons.get(s);return this._area.splice(t,1),o&&this._clippingPolygons.remove(o),this}showArea(e){let t=this._area.findIndex(n=>n.id===e);if(t==null)throw Error("missing index result");let r=this._area[t];if(r.show)return;r.show=!0,this._layer.entities.getById(r.entityIds[0]).show=!0,this._layer.entities.getById(r.entityIds[1]).show=!0;let s=r.positions.map(n=>i.Cesium.Cartesian3.fromDegrees(n.lng,n.lat,n.alt)),o=new i.Cesium.ClippingPolygon({positions:s});return o.id=e,this._clippingPolygons.add(o),this}hideArea(e){let t=this._area.findIndex(n=>n.id===e);if(t==null)throw Error("missing index result");let r=this._area[t];if(!r.show)return;r.show=!1,this._layer.entities.getById(r.entityIds[0]).show=!1,this._layer.entities.getById(r.entityIds[1]).show=!1;let s=this._clippingPolygons._polygons.findIndex(n=>n.id===e),o=this._clippingPolygons.get(s);return o&&this._clippingPolygons.remove(o),this}flyToArea(e){let t=this._area.findIndex(o=>o.id===e);if(t==null)throw Error("missing index result");let r=this._area[t],s=this._layer.entities.getById(r.entityIds[0]);return this._viewer.flyTo(s),this}toJSON(){return this._area}clear(){this._layer.entities.removeAll(),this._clippingPolygons.removeAll()}},Qf=gh;function pe(a,e){this.viewer=a,this.options=e||{},this._positions=[new i.Cesium.Cartesian3(-1.1825928630924462e6,5.5155809806405855e6,2966674365247578e-9),new i.Cesium.Cartesian3(-1183337777477057e-9,5515825617716778e-9,2.9659274345367434e6),new i.Cesium.Cartesian3(-1.1845084932830015e6,5515571328839522e-9,2965932974956288e-9),new i.Cesium.Cartesian3(-1.1855870332886775e6,5514889448799464e-9,2.9667642948399023e6),new i.Cesium.Cartesian3(-1.1850990292063756e6,5514576687407264e-9,2967535347584739e-9),new i.Cesium.Cartesian3(-1.1828409384216308e6,551522464431188e-8,2.9672341119776894e6)],this._height=this.options.height||0,this.bottomImg=e.bottomImg,this.wallImg=e.wallImg,this.splitNum=i.Cesium.defaultValue(e.splitNum,50),this._positions&&this._positions.length>0&&this.updateData(this._positions)}Object.defineProperties(pe.prototype,{show:{get:function(){return this._show},set:function(a){this._show=a,this.viewer.scene.globe.clippingPlanes&&(this.viewer.scene.globe.clippingPlanes.enabled=a),this._switchExcavate(a)}},height:{get:function(){return this._height},set:function(a){this._height=a,this._updateExcavateDepth(a)}}});pe.prototype.updateData=function(a){this.clear();var e=[],t=a.length,r=new i.Cesium.Cartesian3,s=i.Cesium.Cartesian3.subtract(a[0],a[1],r);s=s.x>0,this.excavateMinHeight=9999;for(var o=0;o<t;++o){var n=(o+1)%t,l=i.Cesium.Cartographic.fromCartesian(a[o]),h=viewer.scene.globe.getHeight(l)||l.height;h<this.excavateMinHeight&&(this.excavateMinHeight=h);var c=i.Cesium.Cartesian3.add(a[o],a[n],new i.Cesium.Cartesian3);c=i.Cesium.Cartesian3.multiplyByScalar(c,.5,c);var p=i.Cesium.Cartesian3.normalize(c,new i.Cesium.Cartesian3),_=i.Cesium.Cartesian3.subtract(a[n],c,new i.Cesium.Cartesian3);_=i.Cesium.Cartesian3.normalize(_,_);var w=i.Cesium.Cartesian3.cross(_,p,new i.Cesium.Cartesian3);w=i.Cesium.Cartesian3.normalize(w,w);var y=new i.Cesium.Plane(w,0),d=i.Cesium.Plane.getPointDistance(y,c);e.push(new i.Cesium.ClippingPlane(w,d))}this.viewer.scene.globe.clippingPlanes=new i.Cesium.ClippingPlaneCollection({planes:e,edgeWidth:1,edgeColor:i.Cesium.Color.WHITE,enabled:!0}),this._prepareWell(a),this._createWell(this.wellData)};pe.prototype.clear=function(){this.viewer.scene.globe.clippingPlanes&&(this.viewer.scene.globe.clippingPlanes.enabled=!1,this.viewer.scene.globe.clippingPlanes.removeAll(),this.viewer.scene.globe.clippingPlanes.isDestroyed()||this.viewer.scene.globe.clippingPlanes.destroy()),this.viewer.scene.globe.clippingPlanes=void 0,this.bottomSurface&&this.viewer.scene.primitives.remove(this.bottomSurface),this.wellWall&&this.viewer.scene.primitives.remove(this.wellWall),delete this.bottomSurface,delete this.wellWall,this.viewer.scene.render()};pe.prototype._prepareWell=function(a){var e=this.splitNum,t=a.length;if(t!=0){for(var r=this.excavateMinHeight-this.height,s=[],o=[],n=[],l=0;l<t;l++){var h=l==t-1?0:l+1,c=i.Cesium.Cartographic.fromCartesian(a[l]),p=i.Cesium.Cartographic.fromCartesian(a[h]),_=[c.longitude,c.latitude],w=[p.longitude,p.latitude];l==0&&(n.push(new i.Cesium.Cartographic(_[0],_[1])),o.push(i.Cesium.Cartesian3.fromRadians(_[0],_[1],r)),s.push(i.Cesium.Cartesian3.fromRadians(_[0],_[1],0)));for(var y=1;y<=e;y++){var d=i.Cesium.Math.lerp(_[0],w[0],y/e),E=i.Cesium.Math.lerp(_[1],w[1],y/e);l==t-1&&y==e||(n.push(new i.Cesium.Cartographic(d,E)),o.push(i.Cesium.Cartesian3.fromRadians(d,E,r)),s.push(i.Cesium.Cartesian3.fromRadians(d,E,0)))}}this.wellData={lerp_pos:n,bottom_pos:o,no_height_top:s}}};pe.prototype._createWell=function(a){if(this.viewer.terrainProvider._layers){var e=this;this._createBottomSurface(a.bottom_pos);var t=i.Cesium.sampleTerrainMostDetailed(this.viewer.terrainProvider,a.lerp_pos);i.Cesium.when(t,function(r){for(var s=r.length,o=[],n=0;n<s;n++){var l=i.Cesium.Cartesian3.fromRadians(r[n].longitude,r[n].latitude,r[n].height);o.push(l)}e._createWellWall(a.bottom_pos,o)})}else this._createBottomSurface(a.bottom_pos),this._createWellWall(a.bottom_pos,a.no_height_top)};pe.prototype._getMinHeight=function(a){let e=5e6,t=null;for(let r=0;r<a.length;r++){let s=a[r].z;s<e&&(e=s,t=this._ellipsoidToLonLat(a[r]))}return t.altitude};pe.prototype._ellipsoidToLonLat=function(a){let e=this.viewer.scene.globe.ellipsoid,t=new i.Cesium.Cartesian3(a.x,a.y,a.z),r=e.cartesianToCartographic(t),s=i.Cesium.Math.toDegrees(r.latitude),o=i.Cesium.Math.toDegrees(r.longitude),n=r.height;return{longitude:o,latitude:s,altitude:n}};pe.prototype._createBottomSurface=function(a){if(a.length){let r=this._getMinHeight(a),s=[];for(let l=0;l<a.length;l++){let h=this._ellipsoidToLonLat(a[l]);s.push(h.longitude),s.push(h.latitude),s.push(r)}let o=new i.Cesium.PolygonGeometry({polygonHierarchy:new i.Cesium.PolygonHierarchy(i.Cesium.Cartesian3.fromDegreesArrayHeights(s)),perPositionHeight:!0,closeBottom:!1}),n=i.Cesium.PolygonGeometry.createGeometry(o);var e=new i.Cesium.Material({fabric:{type:"Image",uniforms:{image:this.bottomImg}}}),t=new i.Cesium.MaterialAppearance({translucent:!1,flat:!0,material:e});this.bottomSurface=new i.Cesium.Primitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:n}),appearance:t,asynchronous:!1}),this.viewer.scene.primitives.add(this.bottomSurface)}};pe.prototype._createWellWall=function(a,e){let t=this._getMinHeight(a),r=[],s=[];for(let c=0;c<e.length;c++)r.push(this._ellipsoidToLonLat(e[c]).altitude),s.push(t);let o=new i.Cesium.WallGeometry({positions:e,maximumHeights:r,minimumHeights:s}),n=i.Cesium.WallGeometry.createGeometry(o);var l=new i.Cesium.Material({fabric:{type:"Image",uniforms:{image:this.wallImg}}}),h=new i.Cesium.MaterialAppearance({translucent:!1,flat:!0,material:l});this.wellWall=new i.Cesium.Primitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:n,attributes:{color:i.Cesium.ColorGeometryInstanceAttribute.fromColor(i.Cesium.Color.GREY)},id:"PitWall"}),appearance:h,asynchronous:!1}),this.viewer.scene.primitives.add(this.wellWall)};pe.prototype._switchExcavate=function(a){a?(this.viewer.scene.globe.material=i.Cesium.Material.fromType("WaJue"),this.wellWall.show=!0,this.bottomSurface.show=!0):(this.viewer.scene.globe.material=null,this.wellWall.show=!1,this.bottomSurface.show=!1)};pe.prototype._updateExcavateDepth=function(a){this.bottomSurface&&this.viewer.scene.primitives.remove(this.bottomSurface),this.wellWall&&this.viewer.scene.primitives.remove(this.wellWall);for(var e=this.wellData.lerp_pos,t=[],r=e.length,s=0;s<r;s++)t.push(i.Cesium.Cartesian3.fromRadians(e[s].longitude,e[s].latitude,this.excavateMinHeight-a));this.wellData.bottom_pos=t,this._createWell(this.wellData),this.viewer.scene.primitives.add(this.bottomSurface),this.viewer.scene.primitives.add(this.wellWall)};var $f=pe;var yh=class{constructor(e,t={}){if(!e)throw Error("missing viewer param");this._id=v.uuid(),this._viewer=e,this._delegate=void 0,this._layer=new i.Cesium.CustomDataSource("TerrainUplift"),e.dataSources.add(this._layer),this._layerUplift=new i.Cesium.CustomDataSource("TerrainUplift2"),e.dataSources.add(this._layerUplift),this._minHeight=null,this._currentHeight=[],this._area=[],this._enable=t.enable||!0,this._upHeight=t.upHeight||0,this._clipOutSide=t.clipOutSide||!1,this._diffHeight=t.diffHeight||0,this._upHeight=t.upHeight||0,this._image=t.image||"//data.mars3d.cn/img/textures/poly-land.png",this._imageBottom=t.imageBottom||"//data.mars3d.cn/img/textures/poly-soil.jpg",this._splitNum=t.splitNum||30,this._clippingPolygons=new i.Cesium.ClippingPolygonCollection({enabled:this._enable,polygons:[],inverse:this._clipOutSide}),this._viewer.scene.globe.backFaceCulling=!0,this._viewer.scene.globe.showSkirts=!0,this._state=m.INITIALIZED,this._callback=null}get type(){return"TerrainUplift"}get layer(){return this._layer}set enable(e){this._enable=e,this._viewer.scene.globe.clippingPolygons.enabled=e}get enable(){return this._enable}set clipOutSide(e){this._clipOutSide=e,this._viewer.scene.globe.clippingPolygons.inverse=e}get clipOutSide(){return this._clipOutSide}set splitNum(e){this._splitNum=e}get splitNum(){return this._splitNum}set diffHeight(e){this._diffHeight=e}get diffHeight(){return this._diffHeight}set upHeight(e){this._upHeight=e}get upHeight(){return this._upHeight}addArea(e=[],t={},r){t!=null&&t.diffHeight&&(this._diffHeight=t.diffHeight),t!=null&&t.upHeight&&(this._upHeight=t.upHeight);let s=e.map(n=>i.Cesium.Cartesian3.fromDegrees(n.lng,n.lat,n.alt)),o=new i.Cesium.ClippingPolygon({positions:s});this._id=v.uuid(),o.id=this._id,this._clippingPolygons.add(o),this._viewer.scene.globe.clippingPolygons=this._clippingPolygons,this._prepareWall(e,t),this._callback=r}_prepareWall(e,t={}){let r=e.concat([e[0]]);this._minHeight=null,this._currentHeight=[];let s=this._viewer.terrainProvider;if(s&&!(s instanceof i.Cesium.EllipsoidTerrainProvider)){let o=[];for(let l=0;l<r.length-1;l++){let h=this._lerp(r[l],r[l+1],this._splitNum);o=o.concat(h)}o.push(r[0]);let n=o.map(l=>i.Cesium.Cartographic.fromDegrees(l.lng,l.lat,l.alt));i.Cesium.sampleTerrainMostDetailed(s,n).then(l=>{let h=l.map(c=>{let p=i.Cesium.Math.toDegrees(c.longitude),_=i.Cesium.Math.toDegrees(c.latitude);return this._currentHeight.push(parseFloat(c.height)),(!this._minHeight||c.height<this._minHeight)&&(this._minHeight=c.height),{lng:p,lat:_,alt:c.height}});this._perCreateEntity(e,h,t),this._createUpliftArea(e,h)})}else r.forEach(o=>{this._currentHeight.push(parseFloat(o.alt)),(!this._minHeight||o.alt<this._minHeight)&&(this._minHeight=o.alt)}),this._perCreateEntity(r,r,t)}_createUpliftArea(e,t=[]){let r=this._viewer.terrainProvider,s=this._getTinPoints(e,t);i.Cesium.sampleTerrainMostDetailed(r,s).then(o=>{let n=se("turf"),l=o.map(function(p){return n.point([i.Cesium.Math.toDegrees(p.longitude),i.Cesium.Math.toDegrees(p.latitude),p.height],{z:p.height})}),h=n.featureCollection(l);n.tin(h,"z").features.forEach(p=>{let _=[];p.geometry.coordinates[0].forEach((d,E)=>{_.push(parseFloat(d[0])),_.push(parseFloat(d[1]));let T=E===1?p.properties.b:E===2?p.properties.c:p.properties.a;_.push(T+this._upHeight)});let w=new i.Cesium.PolygonHierarchy(i.Cesium.Cartesian3.fromDegreesArrayHeights(_)),y=this._layerUplift.entities.add({polygon:{hierarchy:w,material:new i.Cesium.ImageMaterialProperty({image:"/assets/data/aaa.png",repeat:new i.Cesium.Cartesian2(1,1)}),perPositionHeight:!0,outline:!1,outlineColor:i.Cesium.Color.BLUE}})})})}_getTinPoints(e,t=[],r=80){let s=se("turf"),o=e.reduce((T,b)=>T.lng<b.lng?T:b).lng,n=e.reduce((T,b)=>T.lng>b.lng?T:b).lng,l=e.reduce((T,b)=>T.lat<b.lat?T:b).lat,h=e.reduce((T,b)=>T.lat>b.lat?T:b).lat,c=i.Cesium.Rectangle.fromDegrees(o,l,n,h),p=JSON.parse(JSON.stringify(e)).concat(e[0]).map(T=>[T._lng,T._lat]),_=s.polygon([p]),w=r,y=r,d=[];for(let T=0;T<y;T++)for(var E=0;E<w;E++){let b=i.Cesium.Math.lerp(c.west,c.east,E/(w-1)),M=i.Cesium.Math.lerp(c.south,c.north,T/(y-1)),N=s.point([i.Cesium.Math.toDegrees(b),i.Cesium.Math.toDegrees(M)]);s.booleanPointInPolygon(N,_)&&d.push(i.Cesium.Cartographic.fromRadians(b,M))}for(let T=0;T<t.length;T++)d.push(i.Cesium.Cartographic.fromDegrees(t[T].lng,t[T].lat));return d}_perCreateEntity(e,t,r){let s=this._createWallSurface(t),o=this._createBottomSurface(e),n={id:this._id,diffHeight:this._diffHeight,original:r,positions:e,entityIds:[s[0],o[0]],entityUpliftIds:[s[1],o[1]],show:!0};this._area.push(n),typeof this._callback=="function"&&this._callback(n)}_createWallSurface(e){let t=[];e.forEach(o=>{t.push(parseFloat(o.lng)),t.push(parseFloat(o.lat))});let r=this._layer.entities.add({wall:{positions:i.Cesium.Cartesian3.fromDegreesArray(t),material:new i.Cesium.ImageMaterialProperty({image:this._image,repeat:new i.Cesium.Cartesian2(8,1)}),minimumHeights:this._getHeights(e.length,this._minHeight-this._diffHeight),maximumHeights:this._currentHeight}}),s=this._layerUplift.entities.add({wall:{positions:i.Cesium.Cartesian3.fromDegreesArray(t),material:new i.Cesium.ImageMaterialProperty({image:this._image,repeat:new i.Cesium.Cartesian2(8,1),transparent:!0}),minimumHeights:this._getHeights(e.length,this._minHeight-this._diffHeight,this._upHeight),maximumHeights:this._currentHeight.map(o=>o+this._upHeight)}});return[r.id,s.id]}_createBottomSurface(e){let t=[];e.forEach(h=>{t.push(parseFloat(h.lng)),t.push(parseFloat(h.lat)),t.push(this._minHeight-this._diffHeight)});let r=new i.Cesium.PolygonHierarchy(i.Cesium.Cartesian3.fromDegreesArrayHeights(t)),s=this._layer.entities.add({polygon:{hierarchy:r,material:new i.Cesium.ImageMaterialProperty({image:this._imageBottom,repeat:new i.Cesium.Cartesian2(1,2)}),perPositionHeight:!0,outline:!1,outlineColor:i.Cesium.Color.BLUE}}),o=[];e.forEach(h=>{o.push(parseFloat(h.lng)),o.push(parseFloat(h.lat)),o.push(this._minHeight-this._diffHeight+this._upHeight)});let n=new i.Cesium.PolygonHierarchy(i.Cesium.Cartesian3.fromDegreesArrayHeights(o)),l=this._layerUplift.entities.add({polygon:{hierarchy:n,material:new i.Cesium.ImageMaterialProperty({image:this._imageBottom,repeat:new i.Cesium.Cartesian2(1,2),transparent:!0}),perPositionHeight:!0,outline:!1,outlineColor:i.Cesium.Color.BLUE}});return[s.id,l.id]}_getHeights(e,t,r=0){let s=[];for(let o=0;o<e;o++)s.push(t+r);return s}_lerp(e,t,r=10){let s=[],o=i.Cesium.Cartographic.fromDegrees(e.lng,e.lat,e.alt),n=i.Cesium.Cartographic.fromDegrees(t.lng,t.lat,t.alt);for(let l=0;l<r;l++){let h=i.Cesium.Math.lerp(o.longitude,n.longitude,l/r),c=i.Cesium.Math.lerp(o.latitude,n.latitude,l/r),p=o.height-(o.height-n.height)*(l/r);s.push({lng:i.Cesium.Math.toDegrees(h),lat:i.Cesium.Math.toDegrees(c),alt:p})}return s}getAreaById(e){let t=this._area.filter(r=>r.id===e);return t&&t.length>0?t[0]:null}removeArea(e){let t=this._area.findIndex(n=>n.id===e);if(t==null)throw Error("missing index result");let r=this._area[t];this._layer.entities.removeById(r.entityIds[0]),this._layer.entities.removeById(r.entityIds[1]),this._layerUplift.entities.removeById(r.entityUpliftIds[0]),this._layerUplift.entities.removeById(r.entityUpliftIds[1]);let s=this._clippingPolygons._polygons.findIndex(n=>n.id===e),o=this._clippingPolygons.get(s);return this._area.splice(t,1),o&&this._clippingPolygons.remove(o),this}showArea(e){let t=this._area.findIndex(n=>n.id===e);if(t==null)throw Error("missing index result");let r=this._area[t];if(r.show)return;r.show=!0,this._layer.entities.getById(r.entityIds[0]).show=!0,this._layer.entities.getById(r.entityIds[1]).show=!0,this._layerUplift.entities.getById(r.entityUpliftIds[0]).show=!0,this._layerUplift.entities.getById(r.entityUpliftIds[1]).show=!0;let s=r.positions.map(n=>i.Cesium.Cartesian3.fromDegrees(n.lng,n.lat,n.alt)),o=new i.Cesium.ClippingPolygon({positions:s});return o.id=e,this._clippingPolygons.add(o),this}hideArea(e){let t=this._area.findIndex(n=>n.id===e);if(t==null)throw Error("missing index result");let r=this._area[t];if(!r.show)return;r.show=!1,this._layer.entities.getById(r.entityIds[0]).show=!1,this._layer.entities.getById(r.entityIds[1]).show=!1,this._layerUplift.entities.getById(r.entityUpliftIds[0]).show=!1,this._layerUplift.entities.getById(r.entityUpliftIds[1]).show=!1;let s=this._clippingPolygons._polygons.findIndex(n=>n.id===e),o=this._clippingPolygons.get(s);return o&&this._clippingPolygons.remove(o),this}flyToArea(e){let t=this._area.findIndex(o=>o.id===e);if(t==null)throw Error("missing index result");let r=this._area[t],s=this._layerUplift.entities.getById(r.entityUpliftIds[0]);return this._viewer.flyTo(s),this}toJSON(){return this._area}clear(){this._layer.entities.removeAll(),this._layerUplift.entities.removeAll(),this._clippingPolygons.removeAll()}},eg=yh;var vh=class{constructor(e){qi(this,"_analysisTerrainVisible",e=>{let t=this._viewer.terrainProvider,r=e.map(s=>i.Cesium.Cartographic.fromDegrees(s.lng,s.lat,s.alt));i.Cesium.sampleTerrainMostDetailed(t,r).then(s=>{let o=0,n=null;for(let l=0;l<s.length-1;l++){if(l<s.length-2){let h=e[l],c=e[l+1],p=i.Cesium.Cartesian3.fromDegrees(h.lng,h.lat,h.alt),_=i.Cesium.Cartesian3.fromDegrees(c.lng,c.lat,c.alt);if(n=this._analysisModelVisible([p,_]),i.Cesium.defined(n)&&i.Cesium.defined(n.object)){console.log("\u5728\u6A21\u578B\u4E0A.");let w=i.Cesium.Cartesian3.fromDegrees(e[0].lng,e[0].lat,e[0].alt),y=i.Cesium.Cartesian3.fromDegrees(e[e.length-1].lng,e[e.length-1].lat,e[e.length-1].alt);this._drawLine(n.position,w,i.Cesium.Color.GREEN),this._drawLine(n.position,y,i.Cesium.Color.RED);break}}if(s[l].height>=e[l].alt){console.log("\u5728\u5730\u5F62\u4E0A."),o=l;let h=i.Cesium.Cartesian3.fromDegrees(e[0].lng,e[0].lat,e[0].alt),c=i.Cesium.Cartesian3.fromDegrees(e[l].lng,e[l].lat,e[l].alt),p=i.Cesium.Cartesian3.fromDegrees(e[e.length-1].lng,e[e.length-1].lat,e[e.length-1].alt);this._drawLine(h,c,i.Cesium.Color.GREEN),this._drawLine(c,p,i.Cesium.Color.RED);break}}if(o===0&&n===null){console.log("\u5168\u90E8\u53EF\u89C6.");let l=i.Cesium.Cartesian3.fromDegrees(e[0].lng,e[0].lat,e[0].alt),h=i.Cesium.Cartesian3.fromDegrees(e[e.length-1].lng,e[e.length-1].lat,e[e.length-1].alt);this._drawLine(l,h,i.Cesium.Color.GREEN)}})});qi(this,"_analysisModelVisible",e=>{let t=i.Cesium.Cartesian3.normalize(i.Cesium.Cartesian3.subtract(e[1],e[0],new i.Cesium.Cartesian3),new i.Cesium.Cartesian3),r=new i.Cesium.Ray(e[0],t);return this._viewer.scene.pickFromRay(r)});this._id=v.uuid(),this._viewer=e,this._layer=new i.Cesium.CustomDataSource("sightLine"),this._viewer.dataSources.add(this._layer)}get type(){return"sightLine"}get layer(){return this._layer}_init(e,t,r=10){this._layer&&this._layer.entities.removeAll();let s=i.Cesium.Cartesian3.fromDegrees(e.lng,e.lat,e.alt),o=i.Cesium.Cartesian3.fromDegrees(t.lng,t.lat,t.alt),n=this._viewer.terrainProvider;if(n&&!(n instanceof i.Cesium.EllipsoidTerrainProvider)){let l=this._lerp(e,t,r).concat([t]);this._analysisTerrainVisible(l)}else this._analysisVisible([s,o])}_analysisVisible(e){let t=this._analysisModelVisible(e);if(i.Cesium.defined(t)&&i.Cesium.defined(t.object)){let r=this._drawLine(t.position,e[0],i.Cesium.Color.GREEN),s=this._drawLine(t.position,e[1],i.Cesium.Color.RED);console.log("\u5728\u6A21\u578B\u4E0A.",r,s)}else{let r=this._drawLine(e[0],e[1],i.Cesium.Color.GREEN);console.log("\u4E0D\u5728\u6A21\u578B\u4E0A",r)}}_drawLine(e,t,r){return this._layer||(this._layer=new i.Cesium.CustomDataSource("sightLine"),this._viewer.dataSources.add(this._layer)),this._layer&&this._layer.entities.add({polyline:{positions:[e,t],width:2,material:r,depthFailMaterial:r}}),this}_lerp(e,t,r=10){let s=[],o=i.Cesium.Cartographic.fromDegrees(e.lng,e.lat,e.alt),n=i.Cesium.Cartographic.fromDegrees(t.lng,t.lat,t.alt);for(let l=0;l<r;l++){let h=i.Cesium.Math.lerp(o.longitude,n.longitude,l/r),c=i.Cesium.Math.lerp(o.latitude,n.latitude,l/r),p=o.height-(o.height-n.height)*(l/r);s.push({lng:i.Cesium.Math.toDegrees(h),lat:i.Cesium.Math.toDegrees(c),alt:p})}return s}deactivate(){this._layer&&this._layer.entities.removeAll(),this._layer&&this._viewer.dataSources.remove(this._layer),this._layer=null}},tg=vh;var ig=`#define USE_CUBE_MAP_SHADOW true
17515
+ uniform sampler2D colorTexture;
17516
+ uniform sampler2D depthTexture;
17517
+ in vec2 v_textureCoordinates;
17518
+ out vec4 fragColor;
17519
+ uniform mat4 camera_projection_matrix;
17520
+ uniform mat4 camera_view_matrix;
17521
+ uniform samplerCube shadowMap_textureCube;
17522
+ uniform mat4 shadowMap_matrix;
17523
+ uniform vec4 shadowMap_lightPositionEC;
17524
+ uniform vec4 shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness;
17525
+ uniform vec4 shadowMap_texelSizeDepthBiasAndNormalShadingSmooth;
17526
+ uniform float helsing_viewDistance;
17527
+ uniform vec4 helsing_visibleAreaColor;
17528
+ uniform vec4 helsing_invisibleAreaColor;
17529
+ struct zx_shadowParameters
17530
+ {
17531
+ vec3 texCoords;
17532
+ float depthBias;
17533
+ float depth;
17534
+ float nDotL;
17535
+ vec2 texelStepSize;
17536
+ float normalShadingSmooth;
17537
+ float darkness;
17538
+ };
17539
+ float czm_shadowVisibility(samplerCube shadowMap, zx_shadowParameters shadowParameters)
17540
+ {
17541
+ float depthBias = shadowParameters.depthBias;
17542
+ float depth = shadowParameters.depth;
17543
+ float nDotL = shadowParameters.nDotL;
17544
+ float normalShadingSmooth = shadowParameters.normalShadingSmooth;
17545
+ float darkness = shadowParameters.darkness;
17546
+ vec3 uvw = shadowParameters.texCoords;
17547
+ depth -= depthBias;
17548
+ float visibility = czm_shadowDepthCompare(shadowMap, uvw, depth);
17549
+ return czm_private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);
17550
+ }
17551
+ vec4 getPositionEC(){
17552
+ return czm_windowToEyeCoordinates(gl_FragCoord);
17553
+ }
17554
+ vec3 getNormalEC(){
17555
+ return vec3(1.);
17556
+ }
17557
+ vec4 toEye(in vec2 uv,in float depth){
17558
+ vec2 xy=vec2((uv.x*2.-1.),(uv.y*2.-1.));
17559
+ vec4 posInCamera=czm_inverseProjection*vec4(xy,depth,1.);
17560
+ posInCamera=posInCamera/posInCamera.w;
17561
+ return posInCamera;
17562
+ }
17563
+ vec3 pointProjectOnPlane(in vec3 planeNormal,in vec3 planeOrigin,in vec3 point){
17564
+ vec3 v01=point-planeOrigin;
17565
+ float d=dot(planeNormal,v01);
17566
+ return(point-planeNormal*d);
17567
+ }
17568
+ float getDepth(in vec4 depth){
17569
+ float z_window=czm_unpackDepth(depth);
17570
+ z_window=czm_reverseLogDepth(z_window);
17571
+ float n_range=czm_depthRange.near;
17572
+ float f_range=czm_depthRange.far;
17573
+ return(2.*z_window-n_range-f_range)/(f_range-n_range);
17574
+ }
17575
+ float shadow(in vec4 positionEC){
17576
+ vec3 normalEC=getNormalEC();
17577
+ zx_shadowParameters shadowParameters;
17578
+ shadowParameters.texelStepSize=shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.xy;
17579
+ shadowParameters.depthBias=shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.z;
17580
+ shadowParameters.normalShadingSmooth=shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.w;
17581
+ shadowParameters.darkness=shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.w;
17582
+ vec3 directionEC=positionEC.xyz-shadowMap_lightPositionEC.xyz;
17583
+ float distance=length(directionEC);
17584
+ directionEC=normalize(directionEC);
17585
+ float radius=shadowMap_lightPositionEC.w;
17586
+ if(distance>radius)
17587
+ {
17588
+ return 2.0;
17589
+ }
17590
+ vec3 directionWC=czm_inverseViewRotation*directionEC;
17591
+ shadowParameters.depth=distance/radius-0.0003;
17592
+ shadowParameters.nDotL=clamp(dot(normalEC,-directionEC),0.,1.);
17593
+ shadowParameters.texCoords=directionWC;
17594
+ float visibility=czm_shadowVisibility(shadowMap_textureCube,shadowParameters);
17595
+ return visibility;
17596
+ }
17597
+ bool visible(in vec4 result)
17598
+ {
17599
+ result.x/=result.w;
17600
+ result.y/=result.w;
17601
+ result.z/=result.w;
17602
+ return result.x>=-1.&&result.x<=1.
17603
+ &&result.y>=-1.&&result.y<=1.
17604
+ &&result.z>=-1.&&result.z<=1.;
17605
+ }
17606
+ void main(){
17607
+ // \u91C9\u8272 = \u7ED3\u6784\u4E8C\u7EF4(\u989C\u8272\u7EB9\u7406, \u7EB9\u7406\u5750\u6807)
17608
+ fragColor = texture(colorTexture, v_textureCoordinates);
17609
+ // \u6DF1\u5EA6 = \u83B7\u53D6\u6DF1\u5EA6(\u7ED3\u6784\u4E8C\u7EF4(\u6DF1\u5EA6\u7EB9\u7406, \u7EB9\u7406\u5750\u6807))
17610
+ float depth = getDepth(texture(depthTexture, v_textureCoordinates));
17611
+ // \u89C6\u89D2 = (\u7EB9\u7406\u5750\u6807, \u6DF1\u5EA6)
17612
+ vec4 viewPos = toEye(v_textureCoordinates, depth);
17613
+ // \u4E16\u754C\u5750\u6807
17614
+ vec4 wordPos = czm_inverseView * viewPos;
17615
+ // \u865A\u62DF\u76F8\u673A\u4E2D\u5750\u6807
17616
+ vec4 vcPos = camera_view_matrix * wordPos;
17617
+ float near = .001 * helsing_viewDistance;
17618
+ float dis = length(vcPos.xyz);
17619
+ if(dis > near && dis < helsing_viewDistance){
17620
+ // \u900F\u89C6\u6295\u5F71
17621
+ vec4 posInEye = camera_projection_matrix * vcPos;
17622
+ // \u53EF\u89C6\u533A\u989C\u8272
17623
+ // vec4 helsing_visibleAreaColor=vec4(0.,1.,0.,.5);
17624
+ // vec4 helsing_invisibleAreaColor=vec4(1.,0.,0.,.5);
17625
+ if(visible(posInEye)){
17626
+ float vis = shadow(viewPos);
17627
+ if(vis > 0.3){
17628
+ fragColor = mix(fragColor,helsing_visibleAreaColor,.5);
17629
+ } else{
17630
+ fragColor = mix(fragColor,helsing_invisibleAreaColor,.5);
17631
+ }
17632
+ }
17633
+ }
17634
+ }`;var wh=class{constructor(e){this._id=v.uuid(),this._viewer=e,this._sketch=void 0,this._postStage=void 0,this._enable=!0,this._viewPosition=void 0,this._viewPositionEnd=void 0,this._viewDistance=void 0,this._viewHeading=void 0,this._viewPitch=void 0,this._horizontalViewAngle=90,this._verticalViewAngle=60,this._visibleAreaColor=i.Cesium.Color.GREEN,this._invisibleAreaColor=i.Cesium.Color.RED,this._softShadows=!0,this._size=2048}get type(){return"viewshed"}set enable(e){this._enable=e,this.update()}get enable(){return this._enable}set viewPosition(e){this._viewPosition=e,this.update()}get viewPosition(){return this._viewPosition}set viewDistance(e){this._viewDistance=e,this.update()}get viewDistance(){return this._viewDistance}set viewHeading(e){this._viewHeading=e,this.update()}get viewHeading(){return this._viewHeading}set viewPitch(e){this._viewPitch=e,this.update()}get viewPitch(){return this._viewPitch}set horizontalViewAngle(e){this._horizontalViewAngle=e,this.update()}get horizontalViewAngle(){return this._horizontalViewAngle}set verticalViewAngle(e){this._verticalViewAngle=e,this.update()}get verticalViewAngle(){return this._verticalViewAngle}set visibleAreaColor(e){this._visibleAreaColor=e,this.update()}get visibleAreaColor(){return this._visibleAreaColor}set invisibleAreaColor(e){this._invisibleAreaColor=e,this.update()}get invisibleAreaColor(){return this._invisibleAreaColor}_init(e,t={}){this._enable=typeof t.enable=="boolean"?t.enable:!0,this._viewPosition=u.transformWGS84ToCartesian(e),this._viewPositionEnd=u.transformWGS84ToCartesian(e),this._viewDistance=t.viewDistance||(this._viewPositionEnd?i.Cesium.Cartesian3.distance(this._viewPosition,this._viewPositionEnd):100),this._viewHeading=t.viewHeading||(this._viewPositionEnd?this._getHeading(this._viewPosition,this._viewPositionEnd):0),this._viewPitch=t.viewPitch||(this._viewPositionEnd?this._getPitch(this._viewPosition,this._viewPositionEnd):0),this._horizontalViewAngle=t.horizontalViewAngle||90,this._verticalViewAngle=t.verticalViewAngle||60,this._visibleAreaColor=t.visibleAreaColor||i.Cesium.Color.GREEN,this._invisibleAreaColor=t.invisibleAreaColor||i.Cesium.Color.RED,this._softShadows=typeof t.softShadows=="boolean"?t.softShadows:!0,this._size=t.size||2048}_add(){this._createLightCamera(),this._createShadowMap(),this._drawSketch(),this._createPostStage()}update(){this.deactivate(),this._add()}updatePosition(e){this._viewPositionEnd=e,this._viewDistance=i.Cesium.Cartesian3.distance(this._viewPosition,this._viewPositionEnd),this._viewHeading=this._getHeading(this._viewPosition,this._viewPositionEnd),this._viewPitch=this._getPitch(this._viewPosition,this._viewPositionEnd),this._sketch||this._drawSketch()}deactivate(){this._sketch&&(this._viewer.entities.remove(this._sketch),this._sketch=void 0),this._postStage&&(this._viewer.scene.postProcessStages.remove(this._postStage),this._postStage=void 0)}_createLightCamera(){this.lightCamera=new i.Cesium.Camera(this._viewer.scene),this.lightCamera.position=this._viewPosition,this.lightCamera.frustum.near=this._viewDistance*.001,this.lightCamera.frustum.far=this._viewDistance;let e=i.Cesium.Math.toRadians(this._horizontalViewAngle),t=i.Cesium.Math.toRadians(this._verticalViewAngle),r=this._viewDistance*Math.tan(e/2)*2/(this._viewDistance*Math.tan(t/2)*2);this.lightCamera.frustum.aspectRatio=r,e>t?this.lightCamera.frustum.fov=e:this.lightCamera.frustum.fov=t,this.lightCamera.setView({destination:this._viewPosition,orientation:{heading:i.Cesium.Math.toRadians(this._viewHeading||0),pitch:i.Cesium.Math.toRadians(this._viewPitch||0),roll:0}})}_createShadowMap(){this.shadowMap=new i.Cesium.ShadowMap({context:this._viewer.scene.context,lightCamera:this.lightCamera,enabled:this._enable,isPointLight:!0,pointLightRadius:this._viewDistance,cascadesEnabled:!1,size:this._size,softShadows:this._softShadows,normalOffset:!1,fromLightSource:!1,darkness:1}),this._viewer.scene.shadowMap=this.shadowMap}_createPostStage(){let e=new i.Cesium.PostProcessStage({fragmentShader:ig,uniforms:{shadowMap_textureCube:()=>(this.shadowMap.update(Reflect.get(this._viewer.scene,"_frameState")),Reflect.get(this.shadowMap,"_shadowMapTexture")),shadowMap_matrix:()=>(this.shadowMap.update(Reflect.get(this._viewer.scene,"_frameState")),Reflect.get(this.shadowMap,"_shadowMapMatrix")),shadowMap_lightPositionEC:()=>(this.shadowMap.update(Reflect.get(this._viewer.scene,"_frameState")),Reflect.get(this.shadowMap,"_lightPositionEC")),shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness:()=>{this.shadowMap.update(Reflect.get(this._viewer.scene,"_frameState"));let t=this.shadowMap._pointBias;return i.Cesium.Cartesian4.fromElements(t.normalOffsetScale,this.shadowMap._distance,this.shadowMap.maximumDistance,0,new i.Cesium.Cartesian4)},shadowMap_texelSizeDepthBiasAndNormalShadingSmooth:()=>{this.shadowMap.update(Reflect.get(this._viewer.scene,"_frameState"));let t=this.shadowMap._pointBias,s=new i.Cesium.Cartesian2;return s.x=1/this.shadowMap._textureSize.x,s.y=1/this.shadowMap._textureSize.y,i.Cesium.Cartesian4.fromElements(s.x,s.y,t.depthBias,t.normalShadingSmooth,new i.Cesium.Cartesian4)},camera_projection_matrix:this.lightCamera.frustum.projectionMatrix,camera_view_matrix:this.lightCamera.viewMatrix,helsing_viewDistance:()=>this._viewDistance,helsing_visibleAreaColor:this._visibleAreaColor,helsing_invisibleAreaColor:this._invisibleAreaColor}});this._postStage=this._viewer.scene.postProcessStages.add(e)}drawFrustumOutline(){let e=new i.Cesium.Cartesian3,t=new i.Cesium.Matrix3,r=new i.Cesium.Quaternion,s=this.lightCamera.positionWC,o=this.lightCamera.directionWC,n=this.lightCamera.upWC,l=this.lightCamera.rightWC;l=i.Cesium.Cartesian3.negate(l,e);let h=t;i.Cesium.Matrix3.setColumn(h,0,l,h),i.Cesium.Matrix3.setColumn(h,1,n,h),i.Cesium.Matrix3.setColumn(h,2,o,h);let c=i.Cesium.Quaternion.fromRotationMatrix(h,r),p=new i.Cesium.GeometryInstance({geometry:new i.Cesium.FrustumOutlineGeometry({frustum:this.lightCamera.frustum,origin:this._viewPosition,orientation:c}),id:Math.random().toString(36).substr(2),attributes:{color:i.Cesium.ColorGeometryInstanceAttribute.fromColor(i.Cesium.Color.YELLOWGREEN),show:new i.Cesium.ShowGeometryInstanceAttribute(!0)}});this.frustumOutline=this._viewer.scene.primitives.add(new i.Cesium.Primitive({geometryInstances:[p],appearance:new i.Cesium.PerInstanceColorAppearance({flat:!0,translucent:!1})}))}_drawSketch(){this._sketch=this._viewer.entities.add({name:"sketch",position:this._viewPosition,show:!0,orientation:new i.Cesium.CallbackProperty(()=>i.Cesium.Transforms.headingPitchRollQuaternion(this._viewPosition,i.Cesium.HeadingPitchRoll.fromDegrees(this._viewHeading-90,this._viewPitch,0)),!1),ellipsoid:{radii:new i.Cesium.CallbackProperty(()=>new i.Cesium.Cartesian3(this._viewDistance,this._viewDistance,this._viewDistance),!1),innerRadii:new i.Cesium.Cartesian3(2,2,2),minimumClock:i.Cesium.Math.toRadians(-this._horizontalViewAngle/2),maximumClock:i.Cesium.Math.toRadians(this._horizontalViewAngle/2),minimumCone:i.Cesium.Math.toRadians(this._verticalViewAngle+7.75),maximumCone:i.Cesium.Math.toRadians(180-this._verticalViewAngle-7.75),fill:!1,outline:!0,subdivisions:256,stackPartitions:64,slicePartitions:64,outlineColor:i.Cesium.Color.YELLOWGREEN}})}_getHeading(e,t){let r=new i.Cesium.Cartesian3,s=i.Cesium.Transforms.eastNorthUpToFixedFrame(e);return i.Cesium.Matrix4.inverse(s,s),i.Cesium.Matrix4.multiplyByPoint(s,t,r),i.Cesium.Cartesian3.normalize(r,r),i.Cesium.Math.toDegrees(Math.atan2(r.x,r.y))}_getPitch(e,t){let r=new i.Cesium.Cartesian3,s=i.Cesium.Transforms.eastNorthUpToFixedFrame(e);return i.Cesium.Matrix4.inverse(s,s),i.Cesium.Matrix4.multiplyByPoint(s,t,r),i.Cesium.Cartesian3.normalize(r,r),i.Cesium.Math.toDegrees(Math.asin(r.z))}},rg=wh;var Ch=class{constructor(e){if(!e)throw Error("missing viewer param");this._viewer=e,this._contourLine=new Jf(e),this._tilesetShake=new Kf(e),this._sightLine=new tg(e),this._viewshed=new rg(e)}get ContourLine(){return this._contourLine}get TilesetShake(){return this._tilesetShake}get SightLine(){return this._sightLine}get ViewShed(){return this._viewshed}contourLine(e,t,r){this._contourLine._init(e,t,r)}tilesetShake(e,t){this._tilesetShake._init(e,t)}terrainClip(e={}){return new Qf(this._viewer,e)}terrainClipPlan(e={}){return new $f(this._viewer,e)}terrainUplift(e={}){return new eg(this._viewer,e)}sightLine(e,t,r){return this._sightLine._init(e,t,r)}viewshed(e,t){return this._viewshed._init(e,t),this._viewshed}deactivate(e=null){switch(e){case ot.SIGHT_LINE:this._sightLine.deactivate();break;case ot.VIEW_SHED:this._viewshed.deactivate();break;default:this._contourLine.deactivate(),this._tilesetShake.deactivate();break}return this}},Th=Ch;var xh=class{constructor(e){this._style=e,this._viewer=void 0,this._layer=void 0,this._delegate=void 0,this._options={},this._positions=[]}get drawTool(){return this._viewer.drawTool}_mountedHook(){}_onDrawAnchor(e){}_onAnchorMoving(e){this._positions.pop(),this._positions.push(e),this._options.onCalc&&this._options.onCalc(this._positions)}_onDrawStop(){this._unbindEvent(),this._viewer.drawTool.deactivate(),this._options.onDrawStop&&this._options.onDrawStop(this._delegate)}_bindEvent(){this.drawTool.on(x.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.on(x.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.on(x.DRAW_STOP,this._onDrawStop,this)}_unbindEvent(){this.drawTool.off(x.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.off(x.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.off(x.DRAW_STOP,this._onDrawStop,this)}start(e,t){return this._viewer=e.viewer,this._layer=e.layer,this._options=t,this._viewer.editTool.deactivate(),this._viewer.drawTool.activate(t),this._mountedHook(),this._unbindEvent(),this._bindEvent(),this}},sg=xh;var Eh=class extends sg{constructor(e){super(e)}_mountedHook(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D,\u53F3\u51FB\u7ED3\u675F",this._delegate=new i.Cesium.Entity({polyline:{...this._style,positions:new i.Cesium.CallbackProperty(()=>this._positions,!1)}}),this._layer.entities.add(this._delegate)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),t>0&&this.drawTool.fire(x.CREATE_ANCHOR,{position:e}),t>=this._options.maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(x.DRAW_STOP,e))}},og=Eh;var Ph=class{constructor(){this._viewer=void 0,this._layer=void 0,this._startLabel=new i.Cesium.Entity({label:{text:"\u5F00\u59CB",font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._resultLabel=new i.Cesium.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._options={}}_getSampledHeight(e,t=!1){let r=this._viewer.terrainProvider&&!(this._viewer.terrainProvider instanceof i.Cesium.EllipsoidTerrainProvider)?i.Cesium.sampleTerrainMostDetailed(this._viewer.terrainProvider,e.map(o=>i.Cesium.Cartographic.fromCartesian(o))):Promise.resolve(e.map(o=>i.Cesium.Cartographic.fromCartesian(o))),s=this._viewer.scene.clampToHeightSupported&&t?this._viewer.scene.clampToHeightMostDetailed(e,this._layer.entities.values):Promise.resolve(e);return Promise.all([r,s])}_onDrawStop(e){}_onComputedStop(e,t=!1){let r=[];return t?r=e.map((s,o)=>{let l=this._viewer.scene.globe.ellipsoid.cartesianToCartographic(s),h=0;for(let c=1;c<=o;c++){let p=i.Cesium.Cartesian3.distance(e[c-1],e[c]);h+=p}return{longitude:i.Cesium.Math.toDegrees(l.longitude),latitude:i.Cesium.Math.toDegrees(l.latitude),height:l.height,distance:h,cartesian3Position:s}}):r=e.map((s,o)=>{let n=0;for(let l=1;l<=o;l++){let h=i.Cesium.Cartesian3.fromRadians(e[l-1].longitude,e[l-1].latitude,e[l-1].height),c=i.Cesium.Cartesian3.fromRadians(e[l].longitude,e[l].latitude,e[l].height),p=i.Cesium.Cartesian3.distance(h,c);n+=p}return{longitude:i.Cesium.Math.toDegrees(s.longitude),latitude:i.Cesium.Math.toDegrees(s.latitude),height:s.height,distance:n,cartesian3Position:i.Cesium.Cartesian3.fromRadians(s.longitude,s.latitude,s.height)}}),r}_onCalc(e){}_startHook(e,t){this._viewer=e.viewer,this._layer=e.layer,this._options=t,this._options.onDrawStop=this._onDrawStop.bind(this),this._options.onCalc=this._onCalc.bind(this),this._layer.entities.add(this._startLabel),this._layer.entities.add(this._resultLabel)}start(e,t){return this}},ag=Ph;var bh=class extends ag{constructor(){super(),this._maxAnchorSize=9999,this._positions=[],this._includeModel=!0,this._callback=null}_lerp(e,t,r=5){let s=[],o=i.Cesium.Cartographic.fromCartesian(e),n=i.Cesium.Cartographic.fromCartesian(t);for(let l=0;l<r;l++){let h=i.Cesium.Math.lerp(o.longitude,n.longitude,l/r),c=i.Cesium.Math.lerp(o.latitude,n.latitude,l/r),p=o.height-(o.height-n.height)*(l/r);s.push(i.Cesium.Cartesian3.fromRadians(h,c,p))}return s}async _onDrawStop(e){let t=this._positions.filter((s,o)=>o!==1),r=await this._onComputedStop(t,this._includeModel);typeof this._callback=="function"&&await this._callback(r)}_stoppedHook(){this._options.onDrawStop&&this._options.onDrawStop(entity)}_onCalc(e){if(e.length>0&&(this._startLabel.position=e[0]),e.length>1){let t=[e[0]];this._resultLabel.position=e[e.length-1];for(let r=0;r<e.length-1;r++)t=t.concat(this._lerp(e[r],e[r+1],this._options.lerpNum));t.push(e[e.length-1]),this._getSampledHeight(t,this._includeModel).then(([r,s])=>(this._includeModel||(this._positions=r),r.map((o,n)=>i.Cesium.Cartesian3.fromDegrees(i.Cesium.Math.toDegrees(o.longitude),i.Cesium.Math.toDegrees(o.latitude),Math.max(o.height||0,s[n]?i.Cesium.Cartographic.fromCartesian(s[n]).height:0))))).then(r=>{this._includeModel&&(this._positions=r);let s=0;for(let o=0;o<r.length-1;o++){let n=i.Cesium.Cartesian3.distance(r[o],r[o+1]);s+=n}this._resultLabel.label.text=s>1e3?`\u8DDD\u79BB\uFF1A${(s/1e3).toFixed(2)} \u516C\u91CC`:`\u8DDD\u79BB\uFF1A${s.toFixed(2)} \u7C73`})}}start(e,t,r={}){return this._startHook(e,r),new og({material:r.material||i.Cesium.Color.YELLOW.withAlpha(.6),depthFailMaterial:r.depthFailMaterial||new i.Cesium.PolylineDashMaterialProperty({color:i.Cesium.Color.YELLOW.withAlpha(.6)}),width:r.width||2,clampToGround:!0}).start(e,{...this._options,maxAnchorSize:this._maxAnchorSize}),this._includeModel=r==null?void 0:r.includeModel,this._callback=t,this}},ng=bh;var Sh=class{constructor(e){if(!e)throw Error("missing viewer param");this._viewer=e,this._layer=new i.Cesium.CustomDataSource("plotAnalysis-layer"),this._viewer.dataSources.add(this._layer)}get viewer(){return this._viewer}get layer(){return this._layer}profile(e,t={}){var r;return(r=new ng)==null||r.start(this,e,t),this}activate(e,t){switch(e){case zt.PROFILE:this.profile(t);break;default:break}return this}deactivate(){return this._layer.entities.removeAll(),this._viewer.drawTool.tooltipMess="",this._viewer.drawTool.deactivate(),this._viewer.editTool.tooltipMess="",this._viewer.editTool.deactivate(),this}},Ah=Sh;var Mh=class{static init(){let e=se("turf");if(!e)throw new Error("miss the turf lib");return e}static pointBuffer(e,t=50,r=8){let s=this.init(),o=f.parsePosition(e),n=s.point([o.lng,o.lat,o.alt]),l=s.buffer(n,t,{units:"meters",steps:r}),{coordinates:h}=l.geometry;return h&&h.length>0?h[0]:[]}static polylineBuffer(e,t=50,r=8){let s=this.init(),n=f.parsePositions(e).map(p=>[p.lng,p.lat,p.alt]),l=s.lineString(n),h=s.buffer(l,t,{units:"meters",steps:r}),{coordinates:c}=h.geometry;return c&&c.length>0?c[0]:[]}static polygonBuffer(e,t=50,r=8){let s=this.init(),o=f.parsePositions(e),n=o.concat(o[0]).map(p=>[p.lng,p.lat,p.alt]),l=s.polygon([n]),h=s.buffer(l,t,{units:"meters",steps:r}),{coordinates:c}=h.geometry;return c&&c.length>0?c[0]:[]}static transformPolylineScale(e,t=1){let r=this.init(),o=f.parsePositions(e).map(c=>[c.lng,c.lat,c.alt]),n=r.lineString(o),l=r.transformScale(n,t,{units:"meters"}),{coordinates:h}=l.geometry;return h}static transformPolygonScale(e,t){let r=this.init(),s=f.parsePositions(e),o=s.concat(s[0]).map(c=>[c.lng,c.lat,c.alt]),n=r.polygon([o]),l=r.transformScale(n,t,{units:"meters"}),{coordinates:h}=l.geometry;return h&&h.length>0?h[0]:[]}static transformPolylineRotate(e,t=0){let r=this.init(),o=f.parsePositions(e).map(c=>[c.lng,c.lat,c.alt]),n=r.lineString(o),l=r.transformRotate(n,t,{units:"meters"}),{coordinates:h}=l.geometry;return h}static transformPolygonRotate(e,t=0){let r=this.init(),s=f.parsePositions(e),o=s.concat(s[0]).map(c=>[c.lng,c.lat,c.alt]),n=r.polygon([o]),l=r.transformRotate(n,t,{units:"meters"}),{coordinates:h}=l.geometry;return h&&h.length>0?h[0]:[]}static sector(e,t,r,s){let o=this.init(),n=f.parsePosition(e),l=o.point([n.lng,n.lat,n.alt]),h=o.sector(l,t,r,s,{units:"meters"}),{coordinates:c}=h.geometry;return c&&c.length>0?c[0]:[]}static polygonEquivalent(e,t,r,s=null){let o=this.init(),n=[];for(let p=0,_=e.length;p<_;p++){let w=e[p];n.push({type:"Feature",properties:w,geometry:{type:"Point",coordinates:[w.x,w.y]}})}let l={type:"FeatureCollection",features:n};s&&s!==null&&(l=o.interpolate(l,s.cellSize||10,{gridType:"point",property:r,units:(s==null?void 0:s.units)||"kilometers",weight:(s==null?void 0:s.weight)||1}));let h=o.isobands(l,t,{zProperty:r}),c=o.isolines(l,t,{zProperty:r});return{geojsonPoly:h,geojsonLine:c}}},Ih=Mh;var SP=i.Cesium.Cartesian2,AP=i.Cesium.Cartesian3,MP=i.Cesium.Matrix3,IP=i.Cesium.Matrix4,DP=i.Cesium.Material,LP=i.Cesium.SceneMode,RP=i.Cesium.SkyBox,OP=i.Cesium.Color,kP=i.Cesium.Rectangle,zP=i.Cesium.ShadowMode,FP=i.Cesium.JulianDate,HP=i.Cesium.HeightReference,NP=i.Cesium.HorizontalOrigin,WP=i.Cesium.VerticalOrigin,GP=i.Cesium.CallbackProperty,UP=i.Cesium.ClassificationType,BP=i.Cesium.Cesium3DTileStyle,VP=i.Cesium.GeographicTilingScheme,jP=i.Cesium.WebMercatorTilingScheme,qP=i.Cesium.ColorMaterialProperty,YP=i.Cesium.ImageMaterialProperty,ZP=i.Cesium.PolylineDashMaterialProperty,XP=i.Cesium.PolylineGlowMaterialProperty,JP=i.Cesium.PolylineOutlineMaterialProperty,KP=i.Cesium.PolylineArrowMaterialProperty,QP=i.Cesium.writeTextToCanvas,$P=i.Cesium.CustomShaderMode,eb=i.Cesium.CustomShaderTranslucencyMode,tb=i.Cesium.CustomShader,ib=i.Cesium.UniformType,rb=i.Cesium.Ellipsoid,sb=i.Cesium.Resource,ob=i.Cesium.createGooglePhotorealistic3DTileset,ab=i.Cesium.createElevationBandMaterial,nb=i.Cesium.ModelAnimationLoop,lb=i.Cesium.ClippingPlane,hb=i.Cesium.ClippingPlaneCollection,cb=i.Cesium.ClippingPolygon,pb=i.Cesium.ClippingPolygonCollection;var db="./libs/gm-sdk/resources/",lg=db,hg=!1,mb={set baseUrl(a){lg=a},get baseUrl(){return lg}};function ub(a={}){return hg?Promise.resolve():(cg&&cg(),new Promise((e,t)=>{a.baseUrl&&(this.config.baseUrl=a.baseUrl),a.echarts&&(iu(a.echarts),ge("echarts",a.echarts)),a.turf&&ge("turf",a.turf),a.shpUtil&&ge("shpUtil",a.shpUtil),hg=!0,Wt("isInitialized",!0),Wt("baseUrl",this.config.baseUrl),e()}).catch(e=>{throw new Error(e.message)}))}function cg(){console.clear(),console.log(`%c
17517
17635
  GM-SDK %c %c
17518
17636
 
17519
- \u7248\u672C: 1.12.4 - 2025-03-14
17520
- \u7F51\u7AD9\u4E3B\u9875: http://127.0.0.1:8081/greatmap/gm-docs/zh/index.html`,"font-size:20px;padding-left:70px;color:#EEB422","font-size:14px;padding-left:50px;color:#EEB422;font-style:oblique","font-size:12px;color:#0865ba")}var S_="1.12.4";return id(I_);})();
17637
+ \u7248\u672C: 1.12.5 - 2025-07-24
17638
+ \u7F51\u7AD9\u4E3B\u9875: http://127.0.0.1:8081/greatmap/gm-docs/zh/index.html`,"font-size:20px;padding-left:70px;color:#EEB422","font-size:14px;padding-left:50px;color:#EEB422;font-style:oblique","font-size:12px;color:#0865ba")}var _b="1.12.5";return yg(fb);})();