@pggis/pg-sdk 5.1.16 → 5.2.0

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.
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  * 盘古地理信息系统 PanGu Gis
3
3
  * PanGu Gis For Cesium SDK
4
4
  *
5
- * 版本信息:5.1.16
5
+ * 版本信息:5.2.0
6
6
  * 编译日期:2025-10-24
7
7
  * 版权所有:Copyright by PanGu Gis http://www.pggis.com
8
8
  * 使用单位:智企华章
@@ -35,7 +35,7 @@ var Su=Object.create;var Ki=Object.defineProperty;var Iu=Object.getOwnPropertyDe
35
35
  * @property {number} LEFT_MIDDLE - 左键拖动,中键倾斜
36
36
  * @license MIT
37
37
  * @copyright © 2025 Company Name
38
- */var Hu={LEFT_RIGHT:0,LEFT_MIDDLE:1},we=Hu;var Wu="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),Ir=class{static uuid(e="D"){let i=[];i[8]=i[13]=i[18]=i[23]="-",i[14]="4";let s;for(let a=0;a<36;a++)i[a]||(s=0|Math.random()*16,i[a]=Wu[a===19?s&3|8:s]);return e+"-"+i.join("")}static merge(e,...i){let s,a,o,n;for(a=0,o=i.length;a<o;a++){n=i[a];for(s in n)e[s]=n[s]}return e}static splitWords(e){return this.trim(e).split(/\s+/)}static setOptions(e,i){e.hasOwnProperty("options")||(e.options=e.options?Object.create(e.options):{});for(let s in i)e.options[s]=i[s];return e.options}static formatNum(e,i){let s=Math.pow(10,i===void 0?6:i);return Math.round(e*s)/s}static trim(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}static getStrLength(e){}static template(e,i,s=!1){return!e||typeof e!="string"?"":e.replace(/\{([^{}]+)\}/g,(a,o)=>{let n=o.trim();return i&&typeof i=="object"&&i.hasOwnProperty(n)?i[n]:s?"":a})}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,i){let s=null;return function(){s&&clearTimeout(s),s=setTimeout(e,i)}}static throttle(e,i){let s=!0;return function(){if(!s)return!1;s=!1,setTimeout(()=>{e(),s=!0},i)}}static dataURLtoBlob(e){let i=e.split(","),s=i[0].match(/:(.*?);/)[1],a=atob(i[1]),o=a.length,n=new Uint8Array(o);for(;o--;)n[o]=a.charCodeAt(o);return new Blob([n],{type:s})}static isPromise(e){return Promise.resolve(e)===e}},T=Ir;var Lr=class{static get(e){return typeof e=="string"?document.getElementById(e):e}static getStyle(e,i){let s=e.style[i]||e.currentStyle&&e.currentStyle[i];if((!s||s==="auto")&&document.defaultView){let a=document.defaultView.getComputedStyle(e,null);s=a?a[i]:null}return s==="auto"?null:s}static create(e,i,s=null){let a=document.createElement(e);return a.className=i||"",s&&s.appendChild(a),a}static remove(e){let i=e.parentNode;i&&i.removeChild(e)}static empty(e){for(;e.firstChild;)e.removeChild(e.firstChild)}static hasClass(e,i){if(e.classList!==void 0)return e.classList.contains(i);let s=this.getClass(e);return s.length>0&&new RegExp("(^|\\s)"+i+"(\\s|$)").test(s)}static addClass(e,i){if(e.classList!==void 0){let s=T.splitWords(i);for(let a=0,o=s.length;a<o;a++)e.classList.add(s[a])}else if(!this.hasClass(e,i)){let s=this.getClass(e);this.setClass(e,(s?s+" ":"")+i)}}static removeClass(e,i){e.classList!==void 0?e.classList.remove(i):this.setClass(e,T.trim((" "+this.getClass(e)+" ").replace(" "+i+" "," ")))}static setClass(e,i){e.className.baseVal===void 0?e.className=i:e.className.baseVal=i}static getClass(e){return e.correspondingElement&&(e=e.correspondingElement),e.className.baseVal===void 0?e.className:e.className.baseVal}static createSvg(e,i,s,a){let o=document.createElementNS("http://www.w3.org/2000/svg","svg:svg");o.setAttribute("class","svg-path"),o.setAttribute("width",e),o.setAttribute("height",i),o.setAttribute("viewBox",`0 0 ${e} ${i}`);let n=document.createElementNS("http://www.w3.org/2000/svg","path");return n.setAttribute("d",s),o.appendChild(n),a&&a.appendChild(o),o}static parseDom(e,i,s){i=i!=null?i:!1;let a=document.createElement("div");return a.className=s||"",a.innerHTML=e,i?a:a.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,i,s=null){let a=this.create("video",i,s),o=this.create("source","",a);o.setAttribute("src",e),o.setAttribute("type","video/map4");let n=this.create("source","",a);return n.setAttribute("src",e),n.setAttribute("type","video/quicktime"),a}},D=Lr;var Dr=Math.PI*2,It=100,Rr=1e-4,Or=class{static distance(e,i){return Math.sqrt(Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2))}static wholeDistance(e){let i=0;for(let s=0;s<e.length-1;s++)i+=this.distance(e[s],e[s+1]);return i}static getBaseLength(e){return Math.pow(this.wholeDistance(e),.99)}static mid(e,i){return[(e[0]+i[0])/2,(e[1]+i[1])/2]}static getCircleCenterOfThreePoints(e,i,s){let a=[(e[0]+i[0])/2,(e[1]+i[1])/2],o=[a[0]-e[1]+i[1],a[1]+e[0]-i[0]],n=[(e[0]+s[0])/2,(e[1]+s[1])/2],h=[n[0]-e[1]+s[1],n[1]+e[0]-s[0]];return this.getIntersectPoint(a,o,n,h)}static getIntersectPoint(e,i,s,a){let o,n,h,c;return e[1]===i[1]?(h=(a[0]-s[0])/(a[1]-s[1]),o=h*(e[1]-s[1])+s[0],n=e[1],[o,n]):s[1]===a[1]?(c=(i[0]-e[0])/(i[1]-e[1]),o=c*(s[1]-e[1])+e[0],n=s[1],[o,n]):(c=(i[0]-e[0])/(i[1]-e[1]),h=(a[0]-s[0])/(a[1]-s[1]),n=(c*e[1]-e[0]-h*s[1]+s[0])/(c-h),o=c*n-c*e[1]+e[0],[o,n])}static getAzimuth(e,i){let s,a=Math.asin(Math.abs(i[1]-e[1])/this.distance(e,i));return i[1]>=e[1]&&i[0]>=e[0]?s=a+Math.PI:i[1]>=e[1]&&i[0]<e[0]?s=Dr-a:i[1]<e[1]&&i[0]<e[0]?s=a:i[1]<e[1]&&i[0]>=e[0]&&(s=Math.PI-a),s}static getAngleOfThreePoints(e,i,s){let a=this.getAzimuth(i,e)-this.getAzimuth(i,s);return a<0?a+Dr:a}static isClockWise(e,i,s){return(s[1]-e[1])*(i[0]-e[0])>(i[1]-e[1])*(s[0]-e[0])}static getPointOnLine(e,i,s){let a=i[0]+e*(s[0]-i[0]),o=i[1]+e*(s[1]-i[1]);return[a,o]}static getCubicValue(e,i,s,a,o){e=Math.max(Math.min(e,1),0);let n=1-e,h=e*e,c=h*e,d=n*n,p=d*n,f=p*i[0]+3*d*e*s[0]+3*n*h*a[0]+c*o[0],g=p*i[1]+3*d*e*s[1]+3*n*h*a[1]+c*o[1];return[f,g]}static getThirdPoint(e,i,s,a,o){let n=this.getAzimuth(e,i),h=o?n+s:n-s,c=a*Math.cos(h),d=a*Math.sin(h);return[i[0]+c,i[1]+d]}static getArcPoints(e,i,s,a){let o,n,h=[],c=a-s;c=c<0?c+Dr:c;for(let d=0;d<=It;d++){let p=s+c*d/It;o=e[0]+i*Math.cos(p),n=e[1]+i*Math.sin(p),h.push([o,n])}return h}static getBisectorNormals(e,i,s,a){let o=this.getNormal(i,s,a),n=Math.sqrt(o[0]*o[0]+o[1]*o[1]),h=o[0]/n,c=o[1]/n,d=this.distance(i,s),p=this.distance(s,a),f,g,u,m,E;return n>Rr?this.isClockWise(i,s,a)?(f=e*d,g=s[0]-f*c,u=s[1]+f*h,E=[g,u],f=e*p,g=s[0]+f*c,u=s[1]-f*h,m=[g,u]):(f=e*d,g=s[0]+f*c,u=s[1]-f*h,E=[g,u],f=e*p,g=s[0]-f*c,u=s[1]+f*h,m=[g,u]):(g=s[0]+e*(i[0]-s[0]),u=s[1]+e*(i[1]-s[1]),E=[g,u],g=s[0]+e*(a[0]-s[0]),u=s[1]+e*(a[1]-s[1]),m=[g,u]),[E,m]}static getNormal(e,i,s){let a=e[0]-i[0],o=e[1]-i[1],n=Math.sqrt(a*a+o*o);a/=n,o/=n;let h=s[0]-i[0],c=s[1]-i[1],d=Math.sqrt(h*h+c*c);h/=d,c/=d;let p=a+h,f=o+c;return[p,f]}static getCurvePoints(e,i){let a=[this.getLeftMostControlPoint(e,i)],o,n,h,c;for(let f=0;f<i.length-2;f++)o=i[f],n=i[f+1],h=i[f+2],c=this.getBisectorNormals(e,o,n,h),a=a.concat(c);let d=this.getRightMostControlPoint(e,i);a.push(d);let p=[];for(let f=0;f<i.length-1;f++){o=i[f],n=i[f+1],p.push(o);for(let g=0;g<It;g++){let u=this.getCubicValue(g/It,o,a[f*2],a[f*2+1],n);p.push(u)}p.push(n)}return p}static getLeftMostControlPoint(e,i){let s=i[0],a=i[1],o=i[2],h=this.getBisectorNormals(0,s,a,o)[0],c=this.getNormal(s,a,o),d=Math.sqrt(c[0]*c[0]+c[1]*c[1]),p,f;if(d>Rr){let g=this.mid(s,a),u=s[0]-g[0],m=s[1]-g[1],w=2/this.distance(s,a),P=-w*m,b=w*u,L=P*P-b*b,S=2*P*b,R=b*b-P*P,W=h[0]-g[0],A=h[1]-g[1];p=g[0]+L*W+S*A,f=g[1]+S*W+R*A}else p=s[0]+e*(a[0]-s[0]),f=s[1]+e*(a[1]-s[1]);return[p,f]}static getRightMostControlPoint(e,i){let s=i.length,a=i[s-3],o=i[s-2],n=i[s-1],c=this.getBisectorNormals(0,a,o,n)[1],d=this.getNormal(a,o,n),p=Math.sqrt(d[0]*d[0]+d[1]*d[1]),f,g;if(p>Rr){let u=this.mid(o,n),m=n[0]-u[0],E=n[1]-u[1],P=2/this.distance(o,n),b=-P*E,L=P*m,S=b*b-L*L,R=2*b*L,W=L*L-b*b,A=c[0]-u[0],O=c[1]-u[1];f=u[0]+S*A+R*O,g=u[1]+R*A+W*O}else f=n[0]+e*(o[0]-n[0]),g=n[1]+e*(o[1]-n[1]);return[f,g]}static getBezierPoints(e){if(e.length<=2)return e;let i=[],s=e.length-1;for(let a=0;a<=1;a+=.01){let o=0,n=0;for(let h=0;h<=s;h++){let c=this.getBinomialFactor(s,h),d=Math.pow(a,h),p=Math.pow(1-a,s-h);o+=c*d*p*e[h][0],n+=c*d*p*e[h][1]}i.push([o,n])}return i.push(e[s]),i}static getBinomialFactor(e,i){return this.getFactorial(e)/(this.getFactorial(i)*this.getFactorial(e-i))}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 i=1;for(let s=1;s<=e;s++)i*=s;return i}static getQBSplinePoints(e){if(e.length<=2)return e;let i=2,s=[],a=e.length-i-1;s.push(e[0]);for(let o=0;o<=a;o++)for(let n=0;n<=1;n+=.05){let h=0,c=0;for(let d=0;d<=i;d++){let p=this.getQuadricBSplineFactor(d,n);h+=p*e[o+d][0],c+=p*e[o+d][1]}s.push([h,c])}return s.push(e[e.length-1]),s}static getQuadricBSplineFactor(e,i){return e===0?Math.pow(i-1,2)/2:e===1?(-2*Math.pow(i,2)+2*i+1)/2:e===2?Math.pow(i,2)/2:0}},C=Or;var Bu=!0;function Lt(...l){console.warn(...l)}function je(...l){Bu&&console.error(...l)}var kr=class l{static getTransFun(e,i){if(!e||!i||(e=l.crsName2FunName(e),i=l.crsName2FunName(i),i===e))return!1;let s=e+"2"+i;return yt[s]?yt[s]:!1}static crsName2FunName(e){switch(e){case"GCJ02":return"gcj";case"BD09":return"bd";case"WGS84":default:return"wgs"}}static getPositionValue(e,i=r.JulianDate.now()){if(!e)return e;let s;return e instanceof r.Cartesian3?s=e:e._value&&e._value instanceof r.Cartesian3?s=e._value:typeof e.getValue=="function"&&(s=e.getValue(i||r.JulianDate.now())),s}static getMaxHeight(e,i=0){if(e==null||e.length===0)return i;for(let s=0;s<e.length;s++){let a=U.parse(e[s]);s===0&&(i=a.alt),a.alt>i&&(i=a.alt)}return T.formatNum(i,U.FormatAltLength)}static getMinHeight(e,i=0){if(e==null||e.length===0)return i;for(let s=0;s<e.length;s++){let a=r.Cartographic.fromCartesian(e[s]);(s===0||a.height<i)&&(i=a.height)}return T.formatNum(i,U.FormatAltLength)}static addPositionsHeight(e,i=0){if(i=Number(i),isNaN(i)||i===0)return e;if(Array.isArray(e)){let s=[];for(let a=0;a<e.length;a++){let o=r.Cartographic.fromCartesian(e[a]),n=r.Cartesian3.fromRadians(o.longitude,o.latitude,o.height+i);s.push(n)}return s}else{let s=r.Cartographic.fromCartesian(e);return r.Cartesian3.fromRadians(s.longitude,s.latitude,s.height+i)}}static setPositionsHeight(e,i=0){if(!e)return e;if(Array.isArray(e)){let s=[];for(let a=0;a<e.length;a++){let o=r.Cartographic.fromCartesian(e[a]),n=r.Cartesian3.fromRadians(o.longitude,o.latitude,i);s.push(n)}return s}else{let s=r.Cartographic.fromCartesian(e);return r.Cartesian3.fromRadians(s.longitude,s.latitude,i)}}static getHeight(e,i,s={}){var n;let a=U.toCartographic(i),o;if(e.getHeight?o=e.getHeight(a,s?s.heightReference:0):o=e.globe.getHeight(a),r.defined(o)&&o>((n=s?s.min:0)!=null?n:-999))return o;if(s&&s.original)return a.height}static pick3DTileset(e,i){if(!i)return null;i instanceof r.Cartesian3&&(i=[i]);for(let s=0,a=i.length;s<a;++s){let o=i[s],n=r.SceneTransforms.worldToWindowCoordinates(e,o);if(!r.defined(n))continue;let h=e.pick(n,10,10);if(r.defined(h)&&r.defined(h.primitive)&&h.primitive instanceof r.Cesium3DTileset)return h.primitive}return null}static getSurfaceHeight(e,i,s={}){return s.scene=e,s.position=i,new Dt(s).start()}static getSurfaceTerrainHeight(e,i){let s={scene:e,position:i,has3dtiles:!1};return new Dt(s).start()}static getSurfacePosition(e,i,s={}){var n;if(!i)return i;let a=U.toCartographic(i),o=l.getHeight(e,a,s);return!r.defined(o)||((n=s.greater)==null||n)&&o<a.height?i:(r.defined(s.maxHeight)&&(o=Math.min(o,s.maxHeight)),(s.heightReference===r.HeightReference.RELATIVE_TO_GROUND||s.heightReference===r.HeightReference.RELATIVE_TO_TERRAIN||s.heightReference===r.HeightReference.RELATIVE_TO_3D_TILE)&&(a.height+=o),r.Cartesian3.fromRadians(a.longitude,a.latitude,o))}static getCurrentMousePosition(e,i,s){let a;if(e.onlyVertexPosition){if(!e.vertexAdsorption)return e.vertexAdsorption=new VertexAdsorption(e),a=e.vertexAdsorption.pick(i,16,16),a}else e.vertexAdsorption&&e.vertexAdsorption.clear();let o;try{o=e.pick(i,5,5)}catch(n){Lt("getCurrentMousePosition: scene.pick \u62FE\u53D6\u65F6\u5F02\u5E38",n)}if(e.resultSupported&&!e.onlyPickTerrainPosition&&r.defined(o)){let n=l.hasPickedModel(o,s);if(n){if((n.billboard||n.point||n.label)&&!n.ellipse&&!n.model&&!n.ellipsoid)return l.getPositionValue(n.position);if(n.show){if(n.show=!1,e.requestRender(),a=l.getCurrentMousePosition(e,i,s),n.show=!0,a)return a;if(a=l._geetTargetMousePosition(e,i,o),r.defined(a))return a}if(!e.globe.show&&(a=l._geetTargetMousePosition(e,i,o),r.defined(a)))return a}else{if(r.defined(o.id)){let h=o.id;if((h.billboard||h.point||h.label)&&!h.ellipse&&!h.model&&!h.ellipsoid)return l.getPositionValue(h.position)}if(a=l._geetTargetMousePosition(e,i,o),r.defined(a))return a}}if(!e.onlyPickTerrainPosition&&e.onlyPickModelPosition)return a;if(e.mode===r.SceneMode.SCENE3D){let n=e.camera.getPickRay(i);a=e.globe.pick(n,e),!a&&(a=e.camera.pickEllipsoid(i,e.globe.ellipsoid))}else a=e.camera.pickEllipsoid(i,e.globe.ellipsoid);return r.defined(a)&&e.camera.positionCartographic.height<1e4&&r.Cartographic.fromCartesian(a).height<-5e3?null:a}static _geetTargetMousePosition(e,i,s){let a=e.result(i);if(r.defined(a)){let o=r.Cartographic.fromCartesian(a);if(o.height>=0||!r.defined(s?s.id:0)&&o.height>=-5e3)return a}}static hasPickedModel(e,i){if(r.defined(e.id)){let s=e.id;if(s._noMousePick||i&&s===i)return s}if(r.defined(e.primitive)){let s=e.primitive;if(s._noMousePick||i&&s===i)return s}if(r.defined(e.tileset)){let s=e.tileset;if(s._noMousePick||i&&s===i)return s}return null}static getCurrentMouseTerrainPosition(e,i){let s;if(e.mode===r.SceneMode.SCENE3D){let a=e.camera.getPickRay(i);s=e.globe.pick(a,e),s||(s=e.camera.pickEllipsoid(i,e.globe.ellipsoid))}else s=e.camera.pickEllipsoid(i,e.globe.ellipsoid);return s}static getMidpoint(e,i,s=.5){if(!i||!e)return;let a=U.toCartographic(e),o=U.toCartographic(i),n=(a.height+o.height)/2,h=new r.EllipsoidGeodesic(a,o).interpolateUsingFraction(s);return r.Cartesian3.fromRadians(h.longitude,h.latitude,n)}static isRepeatPoint(e,i){return!i||!e?!1:Math.abs(e.x-i.x)<.1&&Math.abs(e.y-i.y)<.1&&Math.abs(e.z-i.z)<.1}static getRotateCenterPoint(e,i,s){let a=r.Cartographic.fromCartesian(e);a.height=0;let o=r.Cartographic.toCartesian(a),n=r.Cartesian3.subtract(o,e,new r.Cartesian3);n=r.Cartesian3.normalize(n,new r.Cartesian3);let h=r.Quaternion.fromAxisAngle(n,r.Math.toRadians(s)),c=r.Matrix3.fromQuaternion(h),d=r.Matrix4.fromRotationTranslation(c),p=r.Cartesian3.subtract(i,e,new r.Cartesian3),f=r.Matrix4.multiplyByPoint(d,p,new r.Cartesian3);return r.Cartesian3.add(f,e,new r.Cartesian3)}static getOnLinePointByLen(e,i,s,a){let o=r.Transforms.eastNorthUpToFixedFrame(e),n=r.Matrix4.inverse(o,new r.Matrix4);e=r.Matrix4.multiplyByPoint(n,e,new r.Cartesian3),i=r.Matrix4.multiplyByPoint(n,i,new r.Cartesian3);let h=r.Cartesian3.subtract(i,e,new r.Cartesian3),c=r.Cartesian3.distance(e,i),d=s/c;a&&(d+=1);let p=r.Cartesian3.multiplyByScalar(h,d,new r.Cartesian3);return r.Matrix4.multiplyByPoint(o,p,new r.Cartesian3)}static getPositionByHprAndOffset(e,i,s,a,o){e=U.toCartesian(e),!s&&(s=new r.HeadingPitchRoll);let n=r.Transforms.headingPitchRollQuaternion(e,s,a,o),h=r.Matrix4.fromRotationTranslation(r.Matrix3.fromQuaternion(n,new r.Matrix3),e,new r.Matrix4);return r.Matrix4.multiplyByPoint(h,i,new r.Cartesian3)}static getPositionByDirectionAndLen(e,i,s){e=U.toCartesian(e);let a=r.Transforms.eastNorthUpToFixedFrame(e),o=r.Matrix3.fromRotationZ(r.Math.toRadians(360-(i||0))),n=r.Matrix4.fromRotationTranslation(o);return r.Matrix4.multiply(a,n,a),r.Matrix4.multiplyByPoint(a,new r.Cartesian3(s,0,0),new r.Cartesian3)}static getPositionByHprAndLen(e,i,s){e=U.toCartesian(e);let a=r.Transforms.headingPitchRollQuaternion(e,i),o=r.Matrix4.fromRotationTranslation(r.Matrix3.fromQuaternion(a,new r.Matrix3),e,new r.Matrix4);return r.Matrix4.multiplyByPoint(o,new r.Cartesian3(0,0,-s),new r.Cartesian3)}static getRayEarthPosition(e,i,s,a,o){if(!e||!i)return;i instanceof r.HeadingPitchRoll&&(i=r.Transforms.headingPitchRollQuaternion(e,i,a,o));let n=r.Matrix4.fromRotationTranslation(r.Matrix3.fromQuaternion(i,new r.Matrix3),e,new r.Matrix4);return l.getRayEarthPositionByMatrix(n,s,a)}static getRayEarthPositionByMatrix(e,i,s){let a=new r.Cartesian3,o=new r.Ray;r.Matrix4.multiplyByPoint(e,r.Cartesian3.ZERO,a),a.clone(o.origin);let n=new r.Cartesian3(0,0,i?-100:100);return l.extend2Earth(n,e,o,s)}extend2Earth(e,i,s,a){a=a||r.Ellipsoid.WGS84;let o=r.Matrix4.multiplyByPoint(i,e,new r.Cartesian3);r.Cartesian3.subtract(o,s.origin,s.direction),r.Cartesian3.normalize(s.direction,s.direction);let n=r.IntersectionTests.rayEllipsoid(s,a);if(!n)return;let h=n.start>0?n.start:n.stop,c=r.Ray.getPoint(s,h,new r.Cartesian3);if(c)try{r.Cartographic.fromCartesian(c,null,new r.Cartographic)}catch{return}return c}static getHeadingPitchRollByOrientation(e,i,s,a){if(!r.defined(i)||!r.defined(e))return new r.HeadingPitchRoll;let o=r.Matrix4.fromRotationTranslation(r.Matrix3.fromQuaternion(i,new r.Matrix3),e,new r.Matrix4);return l.getHeadingPitchRollByMatrix(o,s,a)}static getHeadingPitchRollByMatrix(e,i,s,a){return r.Transforms.fixedFrameToHeadingPitchRoll(e,i,s,a)}static getHeadingPitchRollForLine(e,i,s){e=U.toCartesian(e),i=U.toCartesian(i);let a=r.Ellipsoid.WGS84,o=new r.Cartesian3,n=new r.Matrix4,h=new r.Matrix3,c=r.Cartesian3.normalize(r.Cartesian3.subtract(i,e,o),o);r.Transforms.rotationMatrixFromPositionVelocity(e,c,a,h);let d=r.Matrix4.fromRotationTranslation(h,e,n);return s?r.Matrix4.multiplyTransformation(d,r.Axis.Z_UP_TO_X_UP,d):r.Matrix4.multiplyTransformation(d,r.Axis.X_UP_TO_Z_UP,d),r.Transforms.fixedFrameToHeadingPitchRoll(d,a)}static getReflectVector(e,i){let s=i.clone(),a=e.clone(),o=2*r.Cartesian3.dot(e,i);return r.Cartesian3.multiplyByScalar(i,o,s),r.Cartesian3.subtract(e,s,a)}static getPropertyIndex(e,i,s){let a=e&&e.property,o=a&&a.times,n=o.length;if(n===0)return{index:0};let h,c=r.Cartesian3,d=a.values,p=r.binarySearch(o,i,r.JulianDate.compare);if(p<0){if(p=~p,p===0){let A=o[p];if(h=a.backwardExtrapolationDuration,a.backwardExtrapolationType===r.ExtrapolationType.NONE||h!==0&&r.JulianDate.secondsDifference(A,i)>h)return{index:p};if(a.backwardExtrapolationType===r.ExtrapolationType.HOLD)return{position:c.unpack(d,0,s),index:p}}if(p>=n){p=n-1;let A=o[p];if(h=a.forwardExtrapolationDuration,a.forwardExtrapolationType===r.ExtrapolationType.NONE||h!==0&&r.JulianDate.secondsDifference(i,A)>h)return{index:p};if(a.forwardExtrapolationType===r.ExtrapolationType.HOLD)return p=n-1,{position:c.unpack(d,p*c.packedLength,s),index:p}}let f=a.xTable,g=a.yTable,u=a.interpolationAlgorithm,m=a.packedInterpolationLength,E=a.inputOrder;if(a.updateTableLength){a.updateTableLength=!1;let A=Math.min(u.getRequiredDataPoints(a.interpolationDegree,E),n);A!==a.numberOfPoints&&(a._numberOfPoints=A,f.length=A,g.length=A*m)}let w=a.numberOfPoints-1;if(w<1)return p=0,{index:p};let P=0,b=n-1;if(b-P+1>=w+1){let A=p-(w/2|0)-1;A<P&&(A=P);let O=A+w;O>b&&(O=b,A=O-w,A<P&&(A=P)),P=A,b=O}let S=b-P+1;for(let A=0;A<S;++A)f[A]=r.JulianDate.secondsDifference(o[P+A],o[j]);if(r.defined(c.convertPackedArrayForInterpolation))c.convertPackedArrayForInterpolation(d,P,b,g);else{let A=0,O=a.packedLength,F=P*O,N=(b+1)*O;for(;F<N;)g[A]=d[F],F++,A++}let R=r.JulianDate.secondsDifference(i,o[b]),W;if(E===0||!r.defined(u.interpolate))W=u.interpolateOrderZero(R,f,g,m,a.interpolationResult);else{let A=Math.floor(m/(E+1));W=u.interpolate(R,f,g,A,E,E,a.interpolationResult)}p=P;for(let A=P;A<=b;A++)if(r.JulianDate.compare(i,o[A])<=0){p=A-1;break}return r.defined(c.unpackInterpolationResult)?{position:c.unpackInterpolationResult(W,d,P,b,s),index:p}:{position:c.unpack(W,0,s),index:p}}return{position:c.unpack(d,p*a.packedLength,s),index:p}}},Se=kr;var Nr=class l{static degree2dms(e){let i=1;e<0&&(i=-1),e=Math.abs(e);let s=Math.floor(e),a=Math.floor((e-s)*60),o=Math.round((e-s)*3600%60);return o===60&&(a+=1,o=0),a===60&&(s+=1,a=0),s*=i,{degree:s,minute:a,second:o,str:s+"\xB0 "+a+"' "+o+'"'}}static dms2degree(e,i,s){let a=Math.abs(e)+i/60+s/3600;return e<0&&(a*=-1),a}static getCGCS2000EPSGByLng(e,i,s=!0){let a;if(i){let o=parseInt(e/6)+1;if(o<13||o>23)return;s?a=o+4478:a=o+4489}else{let o=parseInt((e-1.5)/3)+1;if(o<25||o>45)return;s?a=o+4488:a=o+4509}return"EPSG:"+a}static getCGCS2000EPSGByX(e){let i=parseInt(e.toString().slice(0,2));return i>=13&&i<=23?"EPSG:"+(i+4478):i>=25&&i<=45?"EPSG:"+(i+4488):void 0}static cartesian2lonlat(e,i){return U.toArray(e,i)}static cartesians2lonlats(e,i){return $e.toArray(e,i)}static cartesian2mercator(e){return e?U.fromCartesian(e).toMercator():null}static cartesians2mercators(e){let i=[];for(let s=0;s<e.length;s++){let a=l.cartesian2mercator(e[s]);a&&i.push(a)}return i}static lonlat2cartesian(e,i=0){return!e||e.length<2?null:r.Cartesian3.fromDegrees(e[0],e[1],e[2]||i)}static lonlats2cartesians(e,i){let s=[];for(let a=0;a<e.length;a++){let o=e[a];if(Array.isArray(o[0])){let n=l.lonlats2cartesians(o,i);n&&n.length>0&&s.push(n)}else{let n=l.lonlat2cartesian(o,i);n&&s.push(n)}}return s}static lonlat2mercator(e){return U.fromArray(e).toMercator()}static lonlats2mercators(e){let i=[];for(let s=0;s<e.length;s++){let a=l.lonlat2mercator(e[s]);i.push(a)}return i}static mercator2cartesian(e,i){if(isNaN(e[0])||isNaN(e[1]))return null;let s=U.fromMercator(e);return r.defined(i)&&(s.alt=i),s.toCartesian()}static mercators2cartesians(e,i){let s=[];for(let a=0;a<e.length;a++){let o=l.mercator2cartesian(e[a],i);o&&s.push(o)}return s}static mercator2lonlat(e){return U.fromMercator(e).toArray()}static mercators2lonlats(e){let i=[];for(let s=0;s<e.length;s++){let a=l.mercator2lonlat(e[s]);i.push(a)}return i}static bd2gcj(e){let i=Number(e[0]),s=Number(e[1]),a=i-.0065,o=s-.006,n=Math.sqrt(a*a+o*o)-2e-5*Math.sin(o*52.35987755982988),h=Math.atan2(o,a)-3e-6*Math.cos(a*52.35987755982988),c=n*Math.cos(h),d=n*Math.sin(h);return c=Number(c.toFixed(6)),d=Number(d.toFixed(6)),[c,d]}static gcj2bd(e){let i=Number(e[0]),s=Number(e[1]),a=Math.sqrt(i*i+s*s)+2e-5*Math.sin(s*52.35987755982988),o=Math.atan2(s,i)+3e-6*Math.cos(i*52.35987755982988),n=a*Math.cos(o)+.0065,h=a*Math.sin(o)+.006;return n=Number(n.toFixed(6)),h=Number(h.toFixed(6)),[n,h]}static wgs2gcj(e){let i=Number(e[0]),s=Number(e[1]);if(l.out_of_china(i,s))return[i,s];{let a=l.transformlat(i-105,s-35),o=l.transformlng(i-105,s-35),n=s/180*Math.PI,h=Math.sin(n);h=1-.00669342162296594*h*h;let c=Math.sqrt(h);a=a*180/(6335552717000426e-9/(h*c)*Math.PI),o=o*180/(6378245/c*Math.cos(n)*Math.PI);let d=s+a,p=i+o;return p=Number(p.toFixed(6)),d=Number(d.toFixed(6)),[p,d]}}static transformlat(e,i){let s=-100+2*e+3*i+.2*i*i+.1*e*i+.2*Math.sqrt(Math.abs(e));return s+=(20*Math.sin(6*e*Math.PI)+20*Math.sin(2*e*Math.PI))*2/3,s+=(20*Math.sin(i*Math.PI)+40*Math.sin(i/3*Math.PI))*2/3,s+=(160*Math.sin(i/12*Math.PI)+320*Math.sin(i*Math.PI/30))*2/3,s}static transformlng(e,i){let s=300+e+2*i+.1*e*e+.1*e*i+.1*Math.sqrt(Math.abs(e));return s+=(20*Math.sin(6*e*Math.PI)+20*Math.sin(2*e*Math.PI))*2/3,s+=(20*Math.sin(e*Math.PI)+40*Math.sin(e/3*Math.PI))*2/3,s+=(150*Math.sin(e/12*Math.PI)+300*Math.sin(e/30*Math.PI))*2/3,s}static out_of_china(e,i){return e<72.004||e>137.8347||i<.8293||i>55.8271||!1}static gcj2wgs(e){let i=Number(e[0]),s=Number(e[1]);if(l.out_of_china(i,s))return[i,s];{let a=l.transformlat(i-105,s-35),o=l.transformlng(i-105,s-35),n=s/180*Math.PI,h=Math.sin(n);h=1-.00669342162296594*h*h;let c=Math.sqrt(h);a=a*180/(6335552717000426e-9/(h*c)*Math.PI),o=o*180/(6378245/c*Math.cos(n)*Math.PI);let d=i*2-(i+o),p=s*2-(s+a);return d=Number(d.toFixed(6)),p=Number(p.toFixed(6)),[d,p]}}static bd2wgs(e){return l.gcj2wgs(l.bd2gcj(e))}static wgs2bd(e){return l.gcj2bd(l.wgs2gcj(e))}},yt=Nr;var zr=class{static getViewPosition(e,i){e=v.parsePosition(e);let s=r.Math.toRadians(e.heading),a=r.Math.toRadians(e.pitch),o=a>=0?i*Math.sin(a):-1*i*Math.sin(Math.abs(a)),n=i*Math.cos(a),h,c;s<=Math.PI/2?(h=n*Math.sin(s),c=n*Math.cos(s)):s>Math.PI/2&&s<Math.PI?(h=n*Math.cos(s-Math.PI/2),c=-1*n*Math.sin(s-Math.PI/2)):s>Math.PI&&s<Math.PI*3/2?(h=-1*n*Math.sin(s-Math.PI),c=-1*n*Math.cos(s-Math.PI)):(h=-1*n*Math.sin(Math.PI*2-s),c=n*Math.cos(Math.PI*2-s));let d=r.Cartesian3.fromDegrees(e.lng,e.lat,e.alt),p=Math.sin(r.Math.toRadians(e.lng)),f=Math.cos(r.Math.toRadians(e.lng)),g=Math.sin(r.Math.toRadians(e.lat)),u=Math.cos(r.Math.toRadians(e.lat)),m=u*o-g*c;return new r.Cartesian3(d.x+(f*m-p*h),d.y+(p*m+f*h),d.z+(g*o+u*c))}static getCameraOrientation(e){let i=new r.Matrix3;return r.Matrix3.setColumn(i,0,r.Cartesian3.negate(e.rightWC,new r.Cartesian3),i),r.Matrix3.setColumn(i,1,e.upWC,i),r.Matrix3.setColumn(i,2,e.directionWC,i),r.Quaternion.fromRotationMatrix(i,new r.Quaternion)}static setCamera(e,i,s,a){e.position=i,e.direction=r.Cartesian3.normalize(r.Cartesian3.subtract(s,i,new r.Cartesian3),new r.Cartesian3);let o=new r.Matrix3;r.Matrix3.fromRotationY(-r.Math.toRadians(a)/2,o);let n=new r.Cartesian3;r.Matrix3.multiplyByVector(o,i,n),r.Cartesian3.normalize(n,n),e.up=n}},he=zr;var Fr=class{constructor(e){this._viewer=e,this._options={}}_setViewerOption(){var e,i,s;return this._viewer.delegate.shadows=(i=(e=this._options)==null?void 0:e.shadows)!=null?i:!1,this._viewer.delegate.resolutionScale=((s=this._options)==null?void 0:s.resolutionScale)||1,this}_setCanvasOption(){return this._options.tabIndex&&this._viewer.scene.canvas.setAttribute("tabIndex",this._options.tabIndex),this}_setSceneOption(){var i,s,a,o;let e=this._viewer.scene;return e.skyAtmosphere.show=(i=this._options.showAtmosphere)!=null?i:!0,e.sun.show=(s=this._options.showSun)!=null?s:!0,e.moon.show=(a=this._options.showMoon)!=null?a:!0,e.postProcessStages.fxaa.enabled=(o=this._options.enableFxaa)!=null?o:!1,e.msaaSupported&&(e.msaaSamples=+this._options.msaaSamples||1),this}_setSkyBoxOption(){var i;if(!this._options.skyBox)return this;let e=this._options.skyBox;if(e instanceof r.SkyBox)this._viewer.scene.skyBox=e;else{let s=this._viewer.scene.skyBox;s.show=(i=e.show)!=null?i:!0,e.offsetAngle&&(s.offsetAngle=e.offsetAngle),e!=null&&e.sources&&(s.sources=e.sources)}return this}_setGlobeOption(){var s,a,o,n,h,c,d,p,f,g,u,m;if(!this._options.globe)return this;let e=this._viewer.scene.globe,i=this._options.globe;if(T.merge(e,{show:(s=i==null?void 0:i.show)!=null?s:!0,showGroundAtmosphere:(a=i==null?void 0:i.showGroundAtmosphere)!=null?a:!0,enableLighting:(o=i==null?void 0:i.enableLighting)!=null?o:!1,depthTestAgainstTerrain:(n=i==null?void 0:i.depthTestAgainstTerrain)!=null?n:!1,tileCacheSize:+(i==null?void 0:i.tileCacheSize)||100,preloadSiblings:(h=i==null?void 0:i.preloadSiblings)!=null?h:!1,showSkirts:(c=i==null?void 0:i.showSkirts)!=null?c:!0,baseColor:(i==null?void 0:i.baseColor)||new r.Color(0,0,.5,1),terrainExaggeration:(i==null?void 0:i.terrainExaggeration)||1,terrainExaggerationRelativeHeight:(i==null?void 0:i.terrainExaggerationRelativeHeight)||0}),T.merge(e.translucency,{enabled:(p=(d=i==null?void 0:i.translucency)==null?void 0:d.enabled)!=null?p:!1,backFaceAlpha:+((f=i==null?void 0:i.translucency)==null?void 0:f.backFaceAlpha)||1,backFaceAlphaByDistance:(g=i==null?void 0:i.translucency)==null?void 0:g.backFaceAlphaByDistance,frontFaceAlpha:+((u=i==null?void 0:i.translucency)==null?void 0:u.frontFaceAlpha)||1,frontFaceAlphaByDistance:(m=i==null?void 0:i.translucency)==null?void 0:m.frontFaceAlphaByDistance}),i!=null&&i.filterColor){let E=this._viewer.scene.globe._surfaceShaderSet.baseFragmentShaderSource,w=E.sources.pop();E.sources.push(w.replace("out_FragColor = finalColor;",`out_FragColor = finalColor * vec4${i.filterColor.toString()};`))}return this}_setCameraController(){var s,a,o,n,h,c,d;if(!((s=this._options)!=null&&s.cameraController))return this;let e=this._viewer.scene.screenSpaceCameraController,i=this._options.cameraController;return T.merge(e,{enableInputs:(a=i==null?void 0:i.enableInputs)!=null?a:!0,enableRotate:(o=i==null?void 0:i.enableRotate)!=null?o:!0,enableTilt:(n=i==null?void 0:i.enableTilt)!=null?n:!0,enableTranslate:(h=i==null?void 0:i.enableTranslate)!=null?h:!0,enableZoom:(c=i==null?void 0:i.enableZoom)!=null?c:!0,enableCollisionDetection:(d=i==null?void 0:i.enableCollisionDetection)!=null?d:!0,minimumZoomDistance:+(i==null?void 0:i.minimumZoomDistance)||1,maximumZoomDistance:+(i==null?void 0:i.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)}},Gr=Fr;var Hr=class{constructor(e){this._viewer=e,this._mouseMode=we.LEFT_RIGHT}setPitchRange(e,i){let s=new r.ScreenSpaceEventHandler(this._viewer.scene.canvas);this._viewer.scene.mode===r.SceneMode.SCENE3D&&(s.setInputAction(a=>{s.setInputAction(o=>{let n=!0,h=o.endPosition.y<o.startPosition.y;h&&this._viewer.camera.pitch>r.Math.toRadians(i)||!h&&this._viewer.camera.pitch<r.Math.toRadians(e)?n=!1:n=!0,this._viewer.scene.screenSpaceCameraController.enableTilt=n},r.ScreenSpaceEventType.MOUSE_MOVE)},this._mouseMode===we.LEFT_MIDDLE?r.ScreenSpaceEventType.MIDDLE_DOWN:r.ScreenSpaceEventType.RIGHT_DOWN),s.setInputAction(a=>{this._viewer.scene.screenSpaceCameraController.enableTilt=!0,s.removeInputAction(r.ScreenSpaceEventType.MOUSE_MOVE)},this._mouseMode===we.LEFT_MIDDLE?r.ScreenSpaceEventType.MIDDLE_UP:r.ScreenSpaceEventType.RIGHT_UP))}changeMouseMode(e){this._mouseMode=e||we.LEFT_RIGHT,e===we.LEFT_MIDDLE?(console.log("\u5207\u6362\u9F20\u6807\u6A21\u5F0F\u4E3A\uFF1A\u5DE6\u952E+\u4E2D\u952E"),this._viewer.scene.screenSpaceCameraController.tiltEventTypes=[r.CameraEventType.MIDDLE_DRAG,r.CameraEventType.PINCH,{eventType:r.CameraEventType.LEFT_DRAG,modifier:r.KeyboardEventModifier.CTRL},{eventType:r.CameraEventType.RIGHT_DRAG,modifier:r.KeyboardEventModifier.CTRL}],this._viewer.scene.screenSpaceCameraController.zoomEventTypes=[r.CameraEventType.RIGHT_DRAG,r.CameraEventType.WHEEL,r.CameraEventType.PINCH]):e===we.LEFT_RIGHT&&(console.log("\u5207\u6362\u9F20\u6807\u6A21\u5F0F\u4E3A\uFF1A\u5DE6\u952E+\u53F3\u952E"),this._viewer.scene.screenSpaceCameraController.tiltEventTypes=[r.CameraEventType.RIGHT_DRAG,r.CameraEventType.PINCH,{eventType:r.CameraEventType.LEFT_DRAG,modifier:r.KeyboardEventModifier.CTRL},{eventType:r.CameraEventType.RIGHT_DRAG,modifier:r.KeyboardEventModifier.CTRL}],this._viewer.scene.screenSpaceCameraController.zoomEventTypes=[r.CameraEventType.WHEEL,r.CameraEventType.PINCH,{eventType:r.CameraEventType.RIGHT_DRAG,modifier:r.KeyboardEventModifier.CTRL}])}},Wr=Hr;/**
38
+ */var Hu={LEFT_RIGHT:0,LEFT_MIDDLE:1},we=Hu;var Wu="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),Ir=class{static uuid(e="D"){let i=[];i[8]=i[13]=i[18]=i[23]="-",i[14]="4";let s;for(let a=0;a<36;a++)i[a]||(s=0|Math.random()*16,i[a]=Wu[a===19?s&3|8:s]);return e+"-"+i.join("")}static merge(e,...i){let s,a,o,n;for(a=0,o=i.length;a<o;a++){n=i[a];for(s in n)e[s]=n[s]}return e}static splitWords(e){return this.trim(e).split(/\s+/)}static setOptions(e,i){e.hasOwnProperty("options")||(e.options=e.options?Object.create(e.options):{});for(let s in i)e.options[s]=i[s];return e.options}static formatNum(e,i){let s=Math.pow(10,i===void 0?6:i);return Math.round(e*s)/s}static trim(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}static getStrLength(e){}static template(e,i,s=!1){return!e||typeof e!="string"?"":e.replace(/\{([^{}]+)\}/g,(a,o)=>{let n=o.trim();return i&&typeof i=="object"&&i.hasOwnProperty(n)?i[n]:s?"":a})}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,i){let s=null;return function(){s&&clearTimeout(s),s=setTimeout(e,i)}}static throttle(e,i){let s=!0;return function(){if(!s)return!1;s=!1,setTimeout(()=>{e(),s=!0},i)}}static dataURLtoBlob(e){let i=e.split(","),s=i[0].match(/:(.*?);/)[1],a=atob(i[1]),o=a.length,n=new Uint8Array(o);for(;o--;)n[o]=a.charCodeAt(o);return new Blob([n],{type:s})}static isPromise(e){return Promise.resolve(e)===e}},T=Ir;var Lr=class{static get(e){return typeof e=="string"?document.getElementById(e):e}static getStyle(e,i){let s=e.style[i]||e.currentStyle&&e.currentStyle[i];if((!s||s==="auto")&&document.defaultView){let a=document.defaultView.getComputedStyle(e,null);s=a?a[i]:null}return s==="auto"?null:s}static create(e,i,s=null){let a=document.createElement(e);return a.className=i||"",s&&s.appendChild(a),a}static remove(e){let i=e.parentNode;i&&i.removeChild(e)}static empty(e){for(;e.firstChild;)e.removeChild(e.firstChild)}static hasClass(e,i){if(e.classList!==void 0)return e.classList.contains(i);let s=this.getClass(e);return s.length>0&&new RegExp("(^|\\s)"+i+"(\\s|$)").test(s)}static addClass(e,i){if(e.classList!==void 0){let s=T.splitWords(i);for(let a=0,o=s.length;a<o;a++)e.classList.add(s[a])}else if(!this.hasClass(e,i)){let s=this.getClass(e);this.setClass(e,(s?s+" ":"")+i)}}static removeClass(e,i){e.classList!==void 0?e.classList.remove(i):this.setClass(e,T.trim((" "+this.getClass(e)+" ").replace(" "+i+" "," ")))}static setClass(e,i){e.className.baseVal===void 0?e.className=i:e.className.baseVal=i}static getClass(e){return e.correspondingElement&&(e=e.correspondingElement),e.className.baseVal===void 0?e.className:e.className.baseVal}static createSvg(e,i,s,a){let o=document.createElementNS("http://www.w3.org/2000/svg","svg:svg");o.setAttribute("class","svg-path"),o.setAttribute("width",e),o.setAttribute("height",i),o.setAttribute("viewBox",`0 0 ${e} ${i}`);let n=document.createElementNS("http://www.w3.org/2000/svg","path");return n.setAttribute("d",s),o.appendChild(n),a&&a.appendChild(o),o}static parseDom(e,i,s){i=i!=null?i:!1;let a=document.createElement("div");return a.className=s||"",a.innerHTML=e,i?a:a.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,i,s=null){let a=this.create("video",i,s),o=this.create("source","",a);o.setAttribute("src",e),o.setAttribute("type","video/map4");let n=this.create("source","",a);return n.setAttribute("src",e),n.setAttribute("type","video/quicktime"),a}},D=Lr;var Dr=Math.PI*2,It=100,Rr=1e-4,Or=class{static distance(e,i){return Math.sqrt(Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2))}static wholeDistance(e){let i=0;for(let s=0;s<e.length-1;s++)i+=this.distance(e[s],e[s+1]);return i}static getBaseLength(e){return Math.pow(this.wholeDistance(e),.99)}static mid(e,i){return[(e[0]+i[0])/2,(e[1]+i[1])/2]}static getCircleCenterOfThreePoints(e,i,s){let a=[(e[0]+i[0])/2,(e[1]+i[1])/2],o=[a[0]-e[1]+i[1],a[1]+e[0]-i[0]],n=[(e[0]+s[0])/2,(e[1]+s[1])/2],h=[n[0]-e[1]+s[1],n[1]+e[0]-s[0]];return this.getIntersectPoint(a,o,n,h)}static getIntersectPoint(e,i,s,a){let o,n,h,c;return e[1]===i[1]?(h=(a[0]-s[0])/(a[1]-s[1]),o=h*(e[1]-s[1])+s[0],n=e[1],[o,n]):s[1]===a[1]?(c=(i[0]-e[0])/(i[1]-e[1]),o=c*(s[1]-e[1])+e[0],n=s[1],[o,n]):(c=(i[0]-e[0])/(i[1]-e[1]),h=(a[0]-s[0])/(a[1]-s[1]),n=(c*e[1]-e[0]-h*s[1]+s[0])/(c-h),o=c*n-c*e[1]+e[0],[o,n])}static getAzimuth(e,i){let s,a=Math.asin(Math.abs(i[1]-e[1])/this.distance(e,i));return i[1]>=e[1]&&i[0]>=e[0]?s=a+Math.PI:i[1]>=e[1]&&i[0]<e[0]?s=Dr-a:i[1]<e[1]&&i[0]<e[0]?s=a:i[1]<e[1]&&i[0]>=e[0]&&(s=Math.PI-a),s}static getAngleOfThreePoints(e,i,s){let a=this.getAzimuth(i,e)-this.getAzimuth(i,s);return a<0?a+Dr:a}static isClockWise(e,i,s){return(s[1]-e[1])*(i[0]-e[0])>(i[1]-e[1])*(s[0]-e[0])}static getPointOnLine(e,i,s){let a=i[0]+e*(s[0]-i[0]),o=i[1]+e*(s[1]-i[1]);return[a,o]}static getCubicValue(e,i,s,a,o){e=Math.max(Math.min(e,1),0);let n=1-e,h=e*e,c=h*e,d=n*n,p=d*n,f=p*i[0]+3*d*e*s[0]+3*n*h*a[0]+c*o[0],g=p*i[1]+3*d*e*s[1]+3*n*h*a[1]+c*o[1];return[f,g]}static getThirdPoint(e,i,s,a,o){let n=this.getAzimuth(e,i),h=o?n+s:n-s,c=a*Math.cos(h),d=a*Math.sin(h);return[i[0]+c,i[1]+d]}static getArcPoints(e,i,s,a){let o,n,h=[],c=a-s;c=c<0?c+Dr:c;for(let d=0;d<=It;d++){let p=s+c*d/It;o=e[0]+i*Math.cos(p),n=e[1]+i*Math.sin(p),h.push([o,n])}return h}static getBisectorNormals(e,i,s,a){let o=this.getNormal(i,s,a),n=Math.sqrt(o[0]*o[0]+o[1]*o[1]),h=o[0]/n,c=o[1]/n,d=this.distance(i,s),p=this.distance(s,a),f,g,u,m,E;return n>Rr?this.isClockWise(i,s,a)?(f=e*d,g=s[0]-f*c,u=s[1]+f*h,E=[g,u],f=e*p,g=s[0]+f*c,u=s[1]-f*h,m=[g,u]):(f=e*d,g=s[0]+f*c,u=s[1]-f*h,E=[g,u],f=e*p,g=s[0]-f*c,u=s[1]+f*h,m=[g,u]):(g=s[0]+e*(i[0]-s[0]),u=s[1]+e*(i[1]-s[1]),E=[g,u],g=s[0]+e*(a[0]-s[0]),u=s[1]+e*(a[1]-s[1]),m=[g,u]),[E,m]}static getNormal(e,i,s){let a=e[0]-i[0],o=e[1]-i[1],n=Math.sqrt(a*a+o*o);a/=n,o/=n;let h=s[0]-i[0],c=s[1]-i[1],d=Math.sqrt(h*h+c*c);h/=d,c/=d;let p=a+h,f=o+c;return[p,f]}static getCurvePoints(e,i){let a=[this.getLeftMostControlPoint(e,i)],o,n,h,c;for(let f=0;f<i.length-2;f++)o=i[f],n=i[f+1],h=i[f+2],c=this.getBisectorNormals(e,o,n,h),a=a.concat(c);let d=this.getRightMostControlPoint(e,i);a.push(d);let p=[];for(let f=0;f<i.length-1;f++){o=i[f],n=i[f+1],p.push(o);for(let g=0;g<It;g++){let u=this.getCubicValue(g/It,o,a[f*2],a[f*2+1],n);p.push(u)}p.push(n)}return p}static getLeftMostControlPoint(e,i){let s=i[0],a=i[1],o=i[2],h=this.getBisectorNormals(0,s,a,o)[0],c=this.getNormal(s,a,o),d=Math.sqrt(c[0]*c[0]+c[1]*c[1]),p,f;if(d>Rr){let g=this.mid(s,a),u=s[0]-g[0],m=s[1]-g[1],w=2/this.distance(s,a),P=-w*m,b=w*u,L=P*P-b*b,S=2*P*b,R=b*b-P*P,W=h[0]-g[0],A=h[1]-g[1];p=g[0]+L*W+S*A,f=g[1]+S*W+R*A}else p=s[0]+e*(a[0]-s[0]),f=s[1]+e*(a[1]-s[1]);return[p,f]}static getRightMostControlPoint(e,i){let s=i.length,a=i[s-3],o=i[s-2],n=i[s-1],c=this.getBisectorNormals(0,a,o,n)[1],d=this.getNormal(a,o,n),p=Math.sqrt(d[0]*d[0]+d[1]*d[1]),f,g;if(p>Rr){let u=this.mid(o,n),m=n[0]-u[0],E=n[1]-u[1],P=2/this.distance(o,n),b=-P*E,L=P*m,S=b*b-L*L,R=2*b*L,W=L*L-b*b,A=c[0]-u[0],O=c[1]-u[1];f=u[0]+S*A+R*O,g=u[1]+R*A+W*O}else f=n[0]+e*(o[0]-n[0]),g=n[1]+e*(o[1]-n[1]);return[f,g]}static getBezierPoints(e){if(e.length<=2)return e;let i=[],s=e.length-1;for(let a=0;a<=1;a+=.01){let o=0,n=0;for(let h=0;h<=s;h++){let c=this.getBinomialFactor(s,h),d=Math.pow(a,h),p=Math.pow(1-a,s-h);o+=c*d*p*e[h][0],n+=c*d*p*e[h][1]}i.push([o,n])}return i.push(e[s]),i}static getBinomialFactor(e,i){return this.getFactorial(e)/(this.getFactorial(i)*this.getFactorial(e-i))}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 i=1;for(let s=1;s<=e;s++)i*=s;return i}static getQBSplinePoints(e){if(e.length<=2)return e;let i=2,s=[],a=e.length-i-1;s.push(e[0]);for(let o=0;o<=a;o++)for(let n=0;n<=1;n+=.05){let h=0,c=0;for(let d=0;d<=i;d++){let p=this.getQuadricBSplineFactor(d,n);h+=p*e[o+d][0],c+=p*e[o+d][1]}s.push([h,c])}return s.push(e[e.length-1]),s}static getQuadricBSplineFactor(e,i){return e===0?Math.pow(i-1,2)/2:e===1?(-2*Math.pow(i,2)+2*i+1)/2:e===2?Math.pow(i,2)/2:0}},C=Or;var Bu=!0;function Lt(...l){console.warn(...l)}function je(...l){Bu&&console.error(...l)}var kr=class l{static getTransFun(e,i){if(!e||!i||(e=l.crsName2FunName(e),i=l.crsName2FunName(i),i===e))return!1;let s=e+"2"+i;return yt[s]?yt[s]:!1}static crsName2FunName(e){switch(e){case"GCJ02":return"gcj";case"BD09":return"bd";case"WGS84":default:return"wgs"}}static getPositionValue(e,i=r.JulianDate.now()){if(!e)return e;let s;return e instanceof r.Cartesian3?s=e:e._value&&e._value instanceof r.Cartesian3?s=e._value:typeof e.getValue=="function"&&(s=e.getValue(i||r.JulianDate.now())),s}static getMaxHeight(e,i=0){if(e==null||e.length===0)return i;for(let s=0;s<e.length;s++){let a=U.parse(e[s]);s===0&&(i=a.alt),a.alt>i&&(i=a.alt)}return T.formatNum(i,U.FormatAltLength)}static getMinHeight(e,i=0){if(e==null||e.length===0)return i;for(let s=0;s<e.length;s++){let a=r.Cartographic.fromCartesian(e[s]);(s===0||a.height<i)&&(i=a.height)}return T.formatNum(i,U.FormatAltLength)}static addPositionsHeight(e,i=0){if(i=Number(i),isNaN(i)||i===0)return e;if(Array.isArray(e)){let s=[];for(let a=0;a<e.length;a++){let o=r.Cartographic.fromCartesian(e[a]),n=r.Cartesian3.fromRadians(o.longitude,o.latitude,o.height+i);s.push(n)}return s}else{let s=r.Cartographic.fromCartesian(e);return r.Cartesian3.fromRadians(s.longitude,s.latitude,s.height+i)}}static setPositionsHeight(e,i=0){if(!e)return e;if(Array.isArray(e)){let s=[];for(let a=0;a<e.length;a++){let o=r.Cartographic.fromCartesian(e[a]),n=r.Cartesian3.fromRadians(o.longitude,o.latitude,i);s.push(n)}return s}else{let s=r.Cartographic.fromCartesian(e);return r.Cartesian3.fromRadians(s.longitude,s.latitude,i)}}static getHeight(e,i,s={}){var n;let a=U.toCartographic(i),o;if(e.getHeight?o=e.getHeight(a,s?s.heightReference:0):o=e.globe.getHeight(a),r.defined(o)&&o>((n=s?s.min:0)!=null?n:-999))return o;if(s&&s.original)return a.height}static pick3DTileset(e,i){if(!i)return null;i instanceof r.Cartesian3&&(i=[i]);for(let s=0,a=i.length;s<a;++s){let o=i[s],n=r.SceneTransforms.worldToWindowCoordinates(e,o);if(!r.defined(n))continue;let h=e.pick(n,10,10);if(r.defined(h)&&r.defined(h.primitive)&&h.primitive instanceof r.Cesium3DTileset)return h.primitive}return null}static getSurfaceHeight(e,i,s={}){return s.scene=e,s.position=i,new Dt(s).start()}static getSurfaceTerrainHeight(e,i){let s={scene:e,position:i,has3dtiles:!1};return new Dt(s).start()}static getSurfacePosition(e,i,s={}){var n;if(!i)return i;let a=U.toCartographic(i),o=l.getHeight(e,a,s);return!r.defined(o)||((n=s.greater)==null||n)&&o<a.height?i:(r.defined(s.maxHeight)&&(o=Math.min(o,s.maxHeight)),(s.heightReference===r.HeightReference.RELATIVE_TO_GROUND||s.heightReference===r.HeightReference.RELATIVE_TO_TERRAIN||s.heightReference===r.HeightReference.RELATIVE_TO_3D_TILE)&&(a.height+=o),r.Cartesian3.fromRadians(a.longitude,a.latitude,o))}static getCurrentMousePosition(e,i,s){let a;if(e.onlyVertexPosition){if(!e.vertexAdsorption)return e.vertexAdsorption=new VertexAdsorption(e),a=e.vertexAdsorption.pick(i,16,16),a}else e.vertexAdsorption&&e.vertexAdsorption.clear();let o;try{o=e.pick(i,5,5)}catch(n){Lt("getCurrentMousePosition: scene.pick \u62FE\u53D6\u65F6\u5F02\u5E38",n)}if(e.resultSupported&&!e.onlyPickTerrainPosition&&r.defined(o)){let n=l.hasPickedModel(o,s);if(n){if((n.billboard||n.point||n.label)&&!n.ellipse&&!n.model&&!n.ellipsoid)return l.getPositionValue(n.position);if(n.show){if(n.show=!1,e.requestRender(),a=l.getCurrentMousePosition(e,i,s),n.show=!0,a)return a;if(a=l._geetTargetMousePosition(e,i,o),r.defined(a))return a}if(!e.globe.show&&(a=l._geetTargetMousePosition(e,i,o),r.defined(a)))return a}else{if(r.defined(o.id)){let h=o.id;if((h.billboard||h.point||h.label)&&!h.ellipse&&!h.model&&!h.ellipsoid)return l.getPositionValue(h.position)}if(a=l._geetTargetMousePosition(e,i,o),r.defined(a))return a}}if(!e.onlyPickTerrainPosition&&e.onlyPickModelPosition)return a;if(e.mode===r.SceneMode.SCENE3D){let n=e.camera.getPickRay(i);a=e.globe.pick(n,e),!a&&(a=e.camera.pickEllipsoid(i,e.globe.ellipsoid))}else a=e.camera.pickEllipsoid(i,e.globe.ellipsoid);return r.defined(a)&&e.camera.positionCartographic.height<1e4&&r.Cartographic.fromCartesian(a).height<-5e3?null:a}static _geetTargetMousePosition(e,i,s){let a=e.result(i);if(r.defined(a)){let o=r.Cartographic.fromCartesian(a);if(o.height>=0||!r.defined(s?s.id:0)&&o.height>=-5e3)return a}}static hasPickedModel(e,i){if(r.defined(e.id)){let s=e.id;if(s._noMousePick||i&&s===i)return s}if(r.defined(e.primitive)){let s=e.primitive;if(s._noMousePick||i&&s===i)return s}if(r.defined(e.tileset)){let s=e.tileset;if(s._noMousePick||i&&s===i)return s}return null}static getCurrentMouseTerrainPosition(e,i){let s;if(e.mode===r.SceneMode.SCENE3D){let a=e.camera.getPickRay(i);s=e.globe.pick(a,e),s||(s=e.camera.pickEllipsoid(i,e.globe.ellipsoid))}else s=e.camera.pickEllipsoid(i,e.globe.ellipsoid);return s}static getMidpoint(e,i,s=.5){if(!i||!e)return;let a=U.toCartographic(e),o=U.toCartographic(i),n=(a.height+o.height)/2,h=new r.EllipsoidGeodesic(a,o).interpolateUsingFraction(s);return r.Cartesian3.fromRadians(h.longitude,h.latitude,n)}static isRepeatPoint(e,i){return!i||!e?!1:Math.abs(e.x-i.x)<.1&&Math.abs(e.y-i.y)<.1&&Math.abs(e.z-i.z)<.1}static getRotateCenterPoint(e,i,s){let a=r.Cartographic.fromCartesian(e);a.height=0;let o=r.Cartographic.toCartesian(a),n=r.Cartesian3.subtract(o,e,new r.Cartesian3);n=r.Cartesian3.normalize(n,new r.Cartesian3);let h=r.Quaternion.fromAxisAngle(n,r.Math.toRadians(s)),c=r.Matrix3.fromQuaternion(h),d=r.Matrix4.fromRotationTranslation(c),p=r.Cartesian3.subtract(i,e,new r.Cartesian3),f=r.Matrix4.multiplyByPoint(d,p,new r.Cartesian3);return r.Cartesian3.add(f,e,new r.Cartesian3)}static getOnLinePointByLen(e,i,s,a){let o=r.Transforms.eastNorthUpToFixedFrame(e),n=r.Matrix4.inverse(o,new r.Matrix4);e=r.Matrix4.multiplyByPoint(n,e,new r.Cartesian3),i=r.Matrix4.multiplyByPoint(n,i,new r.Cartesian3);let h=r.Cartesian3.subtract(i,e,new r.Cartesian3),c=r.Cartesian3.distance(e,i),d=s/c;a&&(d+=1);let p=r.Cartesian3.multiplyByScalar(h,d,new r.Cartesian3);return r.Matrix4.multiplyByPoint(o,p,new r.Cartesian3)}static getPositionByHprAndOffset(e,i,s,a,o){e=U.toCartesian(e),!s&&(s=new r.HeadingPitchRoll);let n=r.Transforms.headingPitchRollQuaternion(e,s,a,o),h=r.Matrix4.fromRotationTranslation(r.Matrix3.fromQuaternion(n,new r.Matrix3),e,new r.Matrix4);return r.Matrix4.multiplyByPoint(h,i,new r.Cartesian3)}static getPositionByDirectionAndLen(e,i,s){e=U.toCartesian(e);let a=r.Transforms.eastNorthUpToFixedFrame(e),o=r.Matrix3.fromRotationZ(r.Math.toRadians(360-(i||0))),n=r.Matrix4.fromRotationTranslation(o);return r.Matrix4.multiply(a,n,a),r.Matrix4.multiplyByPoint(a,new r.Cartesian3(s,0,0),new r.Cartesian3)}static getPositionByHprAndLen(e,i,s){e=U.toCartesian(e);let a=r.Transforms.headingPitchRollQuaternion(e,i),o=r.Matrix4.fromRotationTranslation(r.Matrix3.fromQuaternion(a,new r.Matrix3),e,new r.Matrix4);return r.Matrix4.multiplyByPoint(o,new r.Cartesian3(0,0,-s),new r.Cartesian3)}static getRayEarthPosition(e,i,s,a,o){if(!e||!i)return;i instanceof r.HeadingPitchRoll&&(i=r.Transforms.headingPitchRollQuaternion(e,i,a,o));let n=r.Matrix4.fromRotationTranslation(r.Matrix3.fromQuaternion(i,new r.Matrix3),e,new r.Matrix4);return l.getRayEarthPositionByMatrix(n,s,a)}static getRayEarthPositionByMatrix(e,i,s){let a=new r.Cartesian3,o=new r.Ray;r.Matrix4.multiplyByPoint(e,r.Cartesian3.ZERO,a),a.clone(o.origin);let n=new r.Cartesian3(0,0,i?-100:100);return l.extend2Earth(n,e,o,s)}extend2Earth(e,i,s,a){a=a||r.Ellipsoid.WGS84;let o=r.Matrix4.multiplyByPoint(i,e,new r.Cartesian3);r.Cartesian3.subtract(o,s.origin,s.direction),r.Cartesian3.normalize(s.direction,s.direction);let n=r.IntersectionTests.rayEllipsoid(s,a);if(!n)return;let h=n.start>0?n.start:n.stop,c=r.Ray.getPoint(s,h,new r.Cartesian3);if(c)try{r.Cartographic.fromCartesian(c,null,new r.Cartographic)}catch{return}return c}static getHeadingPitchRollByOrientation(e,i,s,a){if(!r.defined(i)||!r.defined(e))return new r.HeadingPitchRoll;let o=r.Matrix4.fromRotationTranslation(r.Matrix3.fromQuaternion(i,new r.Matrix3),e,new r.Matrix4);return l.getHeadingPitchRollByMatrix(o,s,a)}static getHeadingPitchRollByMatrix(e,i,s,a){return r.Transforms.fixedFrameToHeadingPitchRoll(e,i,s,a)}static getHeadingPitchRollForLine(e,i,s){e=U.toCartesian(e),i=U.toCartesian(i);let a=r.Ellipsoid.WGS84,o=new r.Cartesian3,n=new r.Matrix4,h=new r.Matrix3,c=r.Cartesian3.normalize(r.Cartesian3.subtract(i,e,o),o);r.Transforms.rotationMatrixFromPositionVelocity(e,c,a,h);let d=r.Matrix4.fromRotationTranslation(h,e,n);return s?r.Matrix4.multiplyTransformation(d,r.Axis.Z_UP_TO_X_UP,d):r.Matrix4.multiplyTransformation(d,r.Axis.X_UP_TO_Z_UP,d),r.Transforms.fixedFrameToHeadingPitchRoll(d,a)}static getReflectVector(e,i){let s=i.clone(),a=e.clone(),o=2*r.Cartesian3.dot(e,i);return r.Cartesian3.multiplyByScalar(i,o,s),r.Cartesian3.subtract(e,s,a)}static getPropertyIndex(e,i,s){let a=e&&e.property,o=a&&a.times,n=o.length;if(n===0)return{index:0};let h,c=r.Cartesian3,d=a.values,p=r.binarySearch(o,i,r.JulianDate.compare);if(p<0){if(p=~p,p===0){let A=o[p];if(h=a.backwardExtrapolationDuration,a.backwardExtrapolationType===r.ExtrapolationType.NONE||h!==0&&r.JulianDate.secondsDifference(A,i)>h)return{index:p};if(a.backwardExtrapolationType===r.ExtrapolationType.HOLD)return{position:c.unpack(d,0,s),index:p}}if(p>=n){p=n-1;let A=o[p];if(h=a.forwardExtrapolationDuration,a.forwardExtrapolationType===r.ExtrapolationType.NONE||h!==0&&r.JulianDate.secondsDifference(i,A)>h)return{index:p};if(a.forwardExtrapolationType===r.ExtrapolationType.HOLD)return p=n-1,{position:c.unpack(d,p*c.packedLength,s),index:p}}let f=a.xTable,g=a.yTable,u=a.interpolationAlgorithm,m=a.packedInterpolationLength,E=a.inputOrder;if(a.updateTableLength){a.updateTableLength=!1;let A=Math.min(u.getRequiredDataPoints(a.interpolationDegree,E),n);A!==a.numberOfPoints&&(a._numberOfPoints=A,f.length=A,g.length=A*m)}let w=a.numberOfPoints-1;if(w<1)return p=0,{index:p};let P=0,b=n-1;if(b-P+1>=w+1){let A=p-(w/2|0)-1;A<P&&(A=P);let O=A+w;O>b&&(O=b,A=O-w,A<P&&(A=P)),P=A,b=O}let S=b-P+1;for(let A=0;A<S;++A)f[A]=r.JulianDate.secondsDifference(o[P+A],o[j]);if(r.defined(c.convertPackedArrayForInterpolation))c.convertPackedArrayForInterpolation(d,P,b,g);else{let A=0,O=a.packedLength,F=P*O,N=(b+1)*O;for(;F<N;)g[A]=d[F],F++,A++}let R=r.JulianDate.secondsDifference(i,o[b]),W;if(E===0||!r.defined(u.interpolate))W=u.interpolateOrderZero(R,f,g,m,a.interpolationResult);else{let A=Math.floor(m/(E+1));W=u.interpolate(R,f,g,A,E,E,a.interpolationResult)}p=P;for(let A=P;A<=b;A++)if(r.JulianDate.compare(i,o[A])<=0){p=A-1;break}return r.defined(c.unpackInterpolationResult)?{position:c.unpackInterpolationResult(W,d,P,b,s),index:p}:{position:c.unpack(W,0,s),index:p}}return{position:c.unpack(d,p*a.packedLength,s),index:p}}},Se=kr;var Nr=class l{static degree2dms(e){let i=1;e<0&&(i=-1),e=Math.abs(e);let s=Math.floor(e),a=Math.floor((e-s)*60),o=Math.round((e-s)*3600%60);return o===60&&(a+=1,o=0),a===60&&(s+=1,a=0),s*=i,{degree:s,minute:a,second:o,str:s+"\xB0 "+a+"' "+o+'"'}}static dms2degree(e,i,s){let a=Math.abs(e)+i/60+s/3600;return e<0&&(a*=-1),a}static getCGCS2000EPSGByLng(e,i,s=!0){let a;if(i){let o=parseInt(e/6)+1;if(o<13||o>23)return;s?a=o+4478:a=o+4489}else{let o=parseInt((e-1.5)/3)+1;if(o<25||o>45)return;s?a=o+4488:a=o+4509}return"EPSG:"+a}static getCGCS2000EPSGByX(e){let i=parseInt(e.toString().slice(0,2));return i>=13&&i<=23?"EPSG:"+(i+4478):i>=25&&i<=45?"EPSG:"+(i+4488):void 0}static cartesian2lonlat(e,i){return U.toArray(e,i)}static cartesians2lonlats(e,i){return $e.toArray(e,i)}static cartesian2mercator(e){return e?U.fromCartesian(e).toMercator():null}static cartesians2mercators(e){let i=[];for(let s=0;s<e.length;s++){let a=l.cartesian2mercator(e[s]);a&&i.push(a)}return i}static lonlat2cartesian(e,i=0){return!e||e.length<2?null:r.Cartesian3.fromDegrees(e[0],e[1],e[2]||i)}static lonlats2cartesians(e,i){let s=[];for(let a=0;a<e.length;a++){let o=e[a];if(Array.isArray(o[0])){let n=l.lonlats2cartesians(o,i);n&&n.length>0&&s.push(n)}else{let n=l.lonlat2cartesian(o,i);n&&s.push(n)}}return s}static lonlat2mercator(e){return U.fromArray(e).toMercator()}static lonlats2mercators(e){let i=[];for(let s=0;s<e.length;s++){let a=l.lonlat2mercator(e[s]);i.push(a)}return i}static mercator2cartesian(e,i){if(isNaN(e[0])||isNaN(e[1]))return null;let s=U.fromMercator(e);return r.defined(i)&&(s.alt=i),s.toCartesian()}static mercators2cartesians(e,i){let s=[];for(let a=0;a<e.length;a++){let o=l.mercator2cartesian(e[a],i);o&&s.push(o)}return s}static mercator2lonlat(e){return U.fromMercator(e).toArray()}static mercators2lonlats(e){let i=[];for(let s=0;s<e.length;s++){let a=l.mercator2lonlat(e[s]);i.push(a)}return i}static bd2gcj(e){let i=Number(e[0]),s=Number(e[1]),a=i-.0065,o=s-.006,n=Math.sqrt(a*a+o*o)-2e-5*Math.sin(o*52.35987755982988),h=Math.atan2(o,a)-3e-6*Math.cos(a*52.35987755982988),c=n*Math.cos(h),d=n*Math.sin(h);return c=Number(c.toFixed(6)),d=Number(d.toFixed(6)),[c,d]}static gcj2bd(e){let i=Number(e[0]),s=Number(e[1]),a=Math.sqrt(i*i+s*s)+2e-5*Math.sin(s*52.35987755982988),o=Math.atan2(s,i)+3e-6*Math.cos(i*52.35987755982988),n=a*Math.cos(o)+.0065,h=a*Math.sin(o)+.006;return n=Number(n.toFixed(6)),h=Number(h.toFixed(6)),[n,h]}static wgs2gcj(e){let i=Number(e[0]),s=Number(e[1]);if(l.out_of_china(i,s))return[i,s];{let a=l.transformlat(i-105,s-35),o=l.transformlng(i-105,s-35),n=s/180*Math.PI,h=Math.sin(n);h=1-.00669342162296594*h*h;let c=Math.sqrt(h);a=a*180/(6335552717000426e-9/(h*c)*Math.PI),o=o*180/(6378245/c*Math.cos(n)*Math.PI);let d=s+a,p=i+o;return p=Number(p.toFixed(6)),d=Number(d.toFixed(6)),[p,d]}}static transformlat(e,i){let s=-100+2*e+3*i+.2*i*i+.1*e*i+.2*Math.sqrt(Math.abs(e));return s+=(20*Math.sin(6*e*Math.PI)+20*Math.sin(2*e*Math.PI))*2/3,s+=(20*Math.sin(i*Math.PI)+40*Math.sin(i/3*Math.PI))*2/3,s+=(160*Math.sin(i/12*Math.PI)+320*Math.sin(i*Math.PI/30))*2/3,s}static transformlng(e,i){let s=300+e+2*i+.1*e*e+.1*e*i+.1*Math.sqrt(Math.abs(e));return s+=(20*Math.sin(6*e*Math.PI)+20*Math.sin(2*e*Math.PI))*2/3,s+=(20*Math.sin(e*Math.PI)+40*Math.sin(e/3*Math.PI))*2/3,s+=(150*Math.sin(e/12*Math.PI)+300*Math.sin(e/30*Math.PI))*2/3,s}static out_of_china(e,i){return e<72.004||e>137.8347||i<.8293||i>55.8271||!1}static gcj2wgs(e){let i=Number(e[0]),s=Number(e[1]);if(l.out_of_china(i,s))return[i,s];{let a=l.transformlat(i-105,s-35),o=l.transformlng(i-105,s-35),n=s/180*Math.PI,h=Math.sin(n);h=1-.00669342162296594*h*h;let c=Math.sqrt(h);a=a*180/(6335552717000426e-9/(h*c)*Math.PI),o=o*180/(6378245/c*Math.cos(n)*Math.PI);let d=i*2-(i+o),p=s*2-(s+a);return d=Number(d.toFixed(6)),p=Number(p.toFixed(6)),[d,p]}}static bd2wgs(e){return l.gcj2wgs(l.bd2gcj(e))}static wgs2bd(e){return l.gcj2bd(l.wgs2gcj(e))}},yt=Nr;var zr=class{static getViewPosition(e,i){e=v.parsePosition(e);let s=r.Math.toRadians(e.heading),a=r.Math.toRadians(e.pitch),o=a>=0?i*Math.sin(a):-1*i*Math.sin(Math.abs(a)),n=i*Math.cos(a),h,c;s<=Math.PI/2?(h=n*Math.sin(s),c=n*Math.cos(s)):s>Math.PI/2&&s<Math.PI?(h=n*Math.cos(s-Math.PI/2),c=-1*n*Math.sin(s-Math.PI/2)):s>Math.PI&&s<Math.PI*3/2?(h=-1*n*Math.sin(s-Math.PI),c=-1*n*Math.cos(s-Math.PI)):(h=-1*n*Math.sin(Math.PI*2-s),c=n*Math.cos(Math.PI*2-s));let d=r.Cartesian3.fromDegrees(e.lng,e.lat,e.alt),p=Math.sin(r.Math.toRadians(e.lng)),f=Math.cos(r.Math.toRadians(e.lng)),g=Math.sin(r.Math.toRadians(e.lat)),u=Math.cos(r.Math.toRadians(e.lat)),m=u*o-g*c;return new r.Cartesian3(d.x+(f*m-p*h),d.y+(p*m+f*h),d.z+(g*o+u*c))}static getCameraOrientation(e){let i=new r.Matrix3;return r.Matrix3.setColumn(i,0,r.Cartesian3.negate(e.rightWC,new r.Cartesian3),i),r.Matrix3.setColumn(i,1,e.upWC,i),r.Matrix3.setColumn(i,2,e.directionWC,i),r.Quaternion.fromRotationMatrix(i,new r.Quaternion)}static setCamera(e,i,s,a){e.position=i,e.direction=r.Cartesian3.normalize(r.Cartesian3.subtract(s,i,new r.Cartesian3),new r.Cartesian3);let o=new r.Matrix3;r.Matrix3.fromRotationY(-r.Math.toRadians(a)/2,o);let n=new r.Cartesian3;r.Matrix3.multiplyByVector(o,i,n),r.Cartesian3.normalize(n,n),e.up=n}},he=zr;var Fr=class{constructor(e){this._viewer=e,this._options={}}_setViewerOption(){var e,i,s;return this._viewer.delegate.shadows=(i=(e=this._options)==null?void 0:e.shadows)!=null?i:!1,this._viewer.delegate.resolutionScale=((s=this._options)==null?void 0:s.resolutionScale)||1,this}_setCanvasOption(){return this._options.tabIndex&&this._viewer.scene.canvas.setAttribute("tabIndex",this._options.tabIndex),this}_setSceneOption(){var i,s,a,o;let e=this._viewer.scene;return e.skyAtmosphere.show=(i=this._options.showAtmosphere)!=null?i:!0,e.sun.show=(s=this._options.showSun)!=null?s:!0,e.moon.show=(a=this._options.showMoon)!=null?a:!0,e.postProcessStages.fxaa.enabled=(o=this._options.enableFxaa)!=null?o:!1,e.msaaSupported&&(e.msaaSamples=+this._options.msaaSamples||1),this}_setSkyBoxOption(){var i;if(!this._options.skyBox)return this;let e=this._options.skyBox;if(e instanceof r.SkyBox)this._viewer.scene.skyBox=e;else{let s=this._viewer.scene.skyBox;s.show=(i=e.show)!=null?i:!0,e.offsetAngle&&(s.offsetAngle=e.offsetAngle),e!=null&&e.sources&&(s.sources=e.sources)}return this}_setGlobeOption(){var s,a,o,n,h,c,d,p,f,g,u,m;if(!this._options.globe)return this;let e=this._viewer.scene.globe,i=this._options.globe;if(T.merge(e,{show:(s=i==null?void 0:i.show)!=null?s:!0,showGroundAtmosphere:(a=i==null?void 0:i.showGroundAtmosphere)!=null?a:!0,enableLighting:(o=i==null?void 0:i.enableLighting)!=null?o:!1,depthTestAgainstTerrain:(n=i==null?void 0:i.depthTestAgainstTerrain)!=null?n:!1,tileCacheSize:+(i==null?void 0:i.tileCacheSize)||100,preloadSiblings:(h=i==null?void 0:i.preloadSiblings)!=null?h:!1,showSkirts:(c=i==null?void 0:i.showSkirts)!=null?c:!0,baseColor:(i==null?void 0:i.baseColor)||new r.Color(0,0,.5,1),terrainExaggeration:(i==null?void 0:i.terrainExaggeration)||1,terrainExaggerationRelativeHeight:(i==null?void 0:i.terrainExaggerationRelativeHeight)||0}),T.merge(e.translucency,{enabled:(p=(d=i==null?void 0:i.translucency)==null?void 0:d.enabled)!=null?p:!1,backFaceAlpha:+((f=i==null?void 0:i.translucency)==null?void 0:f.backFaceAlpha)||1,backFaceAlphaByDistance:(g=i==null?void 0:i.translucency)==null?void 0:g.backFaceAlphaByDistance,frontFaceAlpha:+((u=i==null?void 0:i.translucency)==null?void 0:u.frontFaceAlpha)||1,frontFaceAlphaByDistance:(m=i==null?void 0:i.translucency)==null?void 0:m.frontFaceAlphaByDistance}),i!=null&&i.filterColor){let E=this._viewer.scene.globe._surfaceShaderSet.baseFragmentShaderSource,w=E.sources.pop();E.sources.push(w.replace("out_FragColor = finalColor;",`out_FragColor = finalColor * vec4${i.filterColor.toString()};`))}return this}_setCameraController(){var s,a,o,n,h,c,d;if(!((s=this._options)!=null&&s.cameraController))return this;let e=this._viewer.scene.screenSpaceCameraController,i=this._options.cameraController;return T.merge(e,{enableInputs:(a=i==null?void 0:i.enableInputs)!=null?a:!0,enableRotate:(o=i==null?void 0:i.enableRotate)!=null?o:!0,enableTilt:(n=i==null?void 0:i.enableTilt)!=null?n:!0,enableTranslate:(h=i==null?void 0:i.enableTranslate)!=null?h:!0,enableZoom:(c=i==null?void 0:i.enableZoom)!=null?c:!0,enableCollisionDetection:(d=i==null?void 0:i.enableCollisionDetection)!=null?d:!0,minimumZoomDistance:+(i==null?void 0:i.minimumZoomDistance)||1,maximumZoomDistance:+(i==null?void 0:i.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)}},Gr=Fr;var Hr=class{constructor(e){this._viewer=e,this._mouseMode=we.LEFT_RIGHT}setPitchRange(e,i){let s=new r.ScreenSpaceEventHandler(this._viewer.scene.canvas);this._viewer.scene.mode===r.SceneMode.SCENE3D&&(s.setInputAction(a=>{s.setInputAction(o=>{let n=!0,h=o.endPosition.y<o.startPosition.y;h&&this._viewer.camera.pitch>r.Math.toRadians(i)||!h&&this._viewer.camera.pitch<r.Math.toRadians(e)?n=!1:n=!0,this._viewer.scene.screenSpaceCameraController.enableTilt=n},r.ScreenSpaceEventType.MOUSE_MOVE)},this._mouseMode===we.LEFT_MIDDLE?r.ScreenSpaceEventType.MIDDLE_DOWN:r.ScreenSpaceEventType.RIGHT_DOWN),s.setInputAction(a=>{this._viewer.scene.screenSpaceCameraController.enableTilt=!0,s.removeInputAction(r.ScreenSpaceEventType.MOUSE_MOVE)},this._mouseMode===we.LEFT_MIDDLE?r.ScreenSpaceEventType.MIDDLE_UP:r.ScreenSpaceEventType.RIGHT_UP))}changeMouseMode(e){this._mouseMode=e||we.LEFT_RIGHT,e===we.LEFT_MIDDLE?(console.log("\u5207\u6362\u9F20\u6807\u6A21\u5F0F\u4E3A\uFF1A\u5DE6\u952E+\u4E2D\u952E"),this._viewer.scene.screenSpaceCameraController.tiltEventTypes=[r.CameraEventType.MIDDLE_DRAG,r.CameraEventType.PINCH,{eventType:r.CameraEventType.LEFT_DRAG,modifier:r.KeyboardEventModifier.CTRL},{eventType:r.CameraEventType.RIGHT_DRAG,modifier:r.KeyboardEventModifier.CTRL}],this._viewer.scene.screenSpaceCameraController.zoomEventTypes=[r.CameraEventType.RIGHT_DRAG,r.CameraEventType.WHEEL,r.CameraEventType.PINCH]):e===we.LEFT_RIGHT&&(this._viewer.scene.screenSpaceCameraController.tiltEventTypes=[r.CameraEventType.RIGHT_DRAG,r.CameraEventType.PINCH,{eventType:r.CameraEventType.LEFT_DRAG,modifier:r.KeyboardEventModifier.CTRL},{eventType:r.CameraEventType.RIGHT_DRAG,modifier:r.KeyboardEventModifier.CTRL}],this._viewer.scene.screenSpaceCameraController.zoomEventTypes=[r.CameraEventType.WHEEL,r.CameraEventType.PINCH,{eventType:r.CameraEventType.RIGHT_DRAG,modifier:r.KeyboardEventModifier.CTRL}])}},Wr=Hr;/**
39
39
  * 选项配置模块入口
40
40
  * 提供鼠标模式、视图选项和相机选项的配置功能
41
41
  *
@@ -190,7 +190,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKwAAAA0CAYAAAAXBNP2AAAACXBIWXMAAA
190
190
  <span></span>
191
191
  <span></span>
192
192
  <span></span>
193
- `,!0,"loading");this._wrapper.appendChild(e),this._ready=!0}};k.registerType("loading_mask");var Xl=ts;var is=class extends k{constructor(){super(),this._wrapper=D.create("div","widget slider"),this._tileset=void 0,this._moveActive=!1,this._state=_.INITIALIZED}get type(){return k.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=D.parseDom(se.splitter,!0,"splitter");this._wrapper.appendChild(e);let i=new r.ScreenSpaceEventHandler(e),s=this;i.setInputAction(()=>{s._moveActive=!0},r.ScreenSpaceEventType.LEFT_DOWN),i.setInputAction(()=>{s._moveActive=!0},r.ScreenSpaceEventType.PINCH_START),i.setInputAction(a=>{s._moveHandler(a)},r.ScreenSpaceEventType.MOUSE_MOVE),i.setInputAction(a=>{s._moveHandler(a)},r.ScreenSpaceEventType.PINCH_MOVE),i.setInputAction(()=>{s._moveActive=!1},r.ScreenSpaceEventType.LEFT_UP),i.setInputAction(()=>{s._moveActive=!1},r.ScreenSpaceEventType.PINCH_END),this._ready=!0}_moveHandler(e){if(!this._moveActive||!this._enable)return;let i=e.endPosition.x,s=(this._wrapper.offsetLeft+i)/this._wrapper.parentElement.offsetWidth;this._wrapper.style.left=100*s+"%",this._viewer.scene.splitPosition=s}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)}};k.registerType("tileset_split");var Jl=is;var rs=class extends k{constructor(){super(),this._wrapper=D.create("div","widget slider"),this._tileset=void 0,this._baseLayer=void 0,this._moveActive=!1,this._state=_.INITIALIZED}get type(){return k.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=D.parseDom(se.splitter,!0,"splitter");this._wrapper.appendChild(e);let i=new r.ScreenSpaceEventHandler(e),s=this;i.setInputAction(()=>{s._moveActive=!0},r.ScreenSpaceEventType.LEFT_DOWN),i.setInputAction(()=>{s._moveActive=!0},r.ScreenSpaceEventType.PINCH_START),i.setInputAction(a=>{s._moveHandler(a)},r.ScreenSpaceEventType.MOUSE_MOVE),i.setInputAction(a=>{s._moveHandler(a)},r.ScreenSpaceEventType.PINCH_MOVE),i.setInputAction(()=>{s._moveActive=!1},r.ScreenSpaceEventType.LEFT_UP),i.setInputAction(()=>{s._moveActive=!1},r.ScreenSpaceEventType.PINCH_END),this._ready=!0}_moveHandler(e){if(!this._moveActive||!this._enable)return;let i=e.endPosition.x,s=(this._wrapper.offsetLeft+i)/this._wrapper.parentElement.offsetWidth;this._wrapper.style.left=100*s+"%",this._viewer.scene.splitPosition=s}addTileset(e){return!this._viewer||!this._enable?this:(e&&(this._tileset&&this._viewer.scene.primitives.remove(this._tileset),Promise.resolve(e.delegate||e).then(i=>{this._tileset=this._viewer.scene.primitives.add(i)})),this)}addBaseLayer(e){return!this._viewer||!this._enable?this:(e&&(this._baseLayer&&this._viewer.imageryLayers.remove(this._baseLayer),Promise.resolve(e).then(i=>{this._baseLayer=this._viewer.imageryLayers.addImageryProvider(i),this._baseLayer.splitDirection=1})),this)}};k.registerType("scene_split");var Ql=rs;var ss=class{constructor(){this._delegate=new r.ViewportQuad,this._viewer=void 0}update(e){this._delegate.update(e)}install(e){this._viewer=e;let i=!0,s=se.logo,a=[86,26];if(i&&!s)return!1;let o=i&&s?s:se.logo;this._delegate.rectangle=new r.BoundingRectangle(2,1,a[0]||86,a[1]||26),this._delegate.material=new r.Material({fabric:{type:"Logo-Image",uniforms:{image:o},components:{diffuse:"texture(image, materialInput.st).rgb",alpha:"texture(image, materialInput.st).a "}},translucent:function(n){return!1}}),this._viewer.scene.primitives.add(this),i||this._viewer.scene.postRender.addEventListener(()=>{this._viewer.scene.primitives.contains(this)||this._viewer.scene.primitives.add(this)})}isDestroyed(){return!1}destroy(){return this}};k.registerType("attribution");var Kl=ss;function as(){return{popup:new Bl,contextMenu:new Il,tooltip:new Ul,mapSwitch:new Wl,mapSplit:new Hl,locationBar:new Ll,hawkeyeMap:new Vl,compass:new Zl,distanceLegend:new Yl,zoomController:new ql,loadingMask:new Xl,tilesetSplit:new Jl,sceneSplit:new Ql,attribution:new Kl}}var et="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 Rt="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 rf={icon_center:Rt,icon_anchor:et,icon_size:[12,12],clampToModel:!1,maxAnchorSize:999},os=class{constructor(){this._viewer=void 0,this._anchorLayer=new r.CustomDataSource("draw-anchor-layer"),this._floatingAnchor=void 0,this._options={},this._plotEvent=new gt,this._tooltipMess=void 0,this._anchorIds=[]}set tooltipMess(e){this._tooltipMess=e}_getEventPosition(e){return this._options.clampToModel&&e.position?e.position:e.surfacePosition}_onClick(e){let i=this._getEventPosition(e);if(!i)return!1;this._floatingAnchor||(this._floatingAnchor=this._onCreateAnchor({position:i})),this._plotEvent.fire(M.DRAW_ANCHOR,i)}_onMouseMove(e){this._viewer.tooltip.showAt(e.windowPosition,this._tooltipMess);let i=this._getEventPosition(e);if(!i)return!1;this._floatingAnchor&&this._floatingAnchor.position.setValue(i),this._plotEvent.fire(M.ANCHOR_MOVING,i)}_onDoubleClick(e){this._plotEvent.fire(M.DRAW_STOP,this._getEventPosition(e))}_onRightClick(e){if(this._plotEvent.fire(M.DELETE_ANCHOR),this._anchorIds&&this._anchorIds.length>0){var i=this._anchorIds[this._anchorIds.length-1];this._anchorLayer.entities.removeById(i),this._anchorIds.splice(this._anchorIds.length-1,1)}}_onCreateAnchor({position:e,isCenter:i=!1}){var a;let s=this._anchorLayer.entities.add({position:e,billboard:{image:i?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 r.Cartesian2(0,0),eyeOffset:this._options.eyeOffset||new r.Cartesian3(0,0,-100),disableDepthTestDistance:(a=this._options.disableDepthTestDistance)!=null?a:0,heightReference:this._viewer.scene.mode===r.SceneMode.SCENE3D&&!this._options.clampToModel?r.HeightReference.CLAMP_TO_GROUND:r.HeightReference.NONE}});return this._anchorIds.push(s.id),s}_onClearAnchor(){this._anchorLayer.entities.removeAll(),this._anchorIds=[]}_bindEvent(){this._viewer.on(B.CLICK,this._onClick,this),this._viewer.on(B.MOUSE_MOVE,this._onMouseMove,this),this._viewer.on(B.DB_CLICK,this._onDoubleClick,this),this._viewer.on(B.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.on(M.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.on(M.CLEAR_ANCHOR,this._onClearAnchor,this)}_unbindEvent(){this._viewer.off(B.CLICK,this._onClick,this),this._viewer.off(B.MOUSE_MOVE,this._onMouseMove,this),this._viewer.off(B.DB_CLICK,this._onDoubleClick,this),this._viewer.off(B.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.off(M.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.off(M.CLEAR_ANCHOR,this._onClearAnchor,this)}on(e,i,s){return this._plotEvent.on(e,i,s||this),this}off(e,i,s){return this._plotEvent.off(e,i,s||this),this}fire(e,i={}){return this._plotEvent.fire(e,i),this}activate(e={}){return this._viewer.tooltip.enable=!0,this._options={...rf,...e},this._anchorIds=[],this._unbindEvent(),this._bindEvent(),this.fire(M.DRAW_START,this._options),this}deactivate(){return this._unbindEvent(),this._viewer.tooltip.enable=!1,this._anchorLayer.entities.removeAll(),this._floatingAnchor=void 0,this._anchorIds=[],this}install(e){this._viewer=e,this._viewer.dataSources.add(this._anchorLayer),Object.defineProperty(this._viewer,"drawTool",{value:this,writable:!1})}},$l=os;var eh="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 af={icon_center:Rt,icon_anchor:et,icon_midAnchor:eh,icon_size:[12,12],clampToModel:!0},ns=class{constructor(){this._viewer=void 0,this._anchorLayer=new r.CustomDataSource("edit-anchor-layer"),this._options={},this._plotEvent=new gt,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 i=this._options.clampToModel&&e.position?e.position:e.surfacePosition;if(!i)return!1;this._pickedAnchor&&this._pickedAnchor.position&&this._pickedAnchor.properties&&(this._pickedAnchor.position.setValue(i),this._plotEvent.fire(M.EDIT_ANCHOR_STOP,{pickedAnchor:this._pickedAnchor,position:i})),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 i=this._options.clampToModel&&e.position?e.position:e.surfacePosition;if(!i)return!1;this._pickedAnchor&&this._pickedAnchor.position&&this._pickedAnchor.properties?(this._pickedAnchor.position.setValue(i),this._plotEvent.fire(M.ANCHOR_MOVING,{pickedAnchor:this._pickedAnchor,position:i})):this._anchors.length===0&&this._plotEvent.fire(M.ANCHOR_MOVING,{position:i})}_onRightClick(e){let i=this._options.clampToModel&&e.position?e.position:e.surfacePosition;this._plotEvent.fire(M.EDIT_STOP,{pickedAnchor:this._pickedAnchor,position:i})}_onCreateAnchor({position:e,index:i,isCenter:s=!1,isMid:a=!1}){var h;let o=a?this._options.icon_midAnchor:s?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 r.Cartesian2(0,0),eyeOffset:this._options.eyeOffset||new r.Cartesian3(0,0,-100),disableDepthTestDistance:(h=this._options.disableDepthTestDistance)!=null?h:0,heightReference:this._viewer.scene.mode===r.SceneMode.SCENE3D&&!this._options.clampToModel?r.HeightReference.CLAMP_TO_GROUND:r.HeightReference.NONE},properties:{isMid:a,index:i}});this._anchors.push(n)}_onUpdateAnchor({index:e,position:i}){this._anchors[e]&&this._anchors[e].position.setValue(i)}_onClearAnchor(){this._anchorLayer.entities.removeAll(),this._anchors=[]}_bindEvent(){this._viewer.on(B.CLICK,this._onClick,this),this._viewer.on(B.MOUSE_MOVE,this._onMouseMove,this),this._viewer.on(B.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.on(M.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.on(M.UPDATE_ANCHOR,this._onUpdateAnchor,this),this._plotEvent.on(M.CLEAR_ANCHOR,this._onClearAnchor,this)}_unbindEvent(){this._viewer.off(B.CLICK,this._onClick,this),this._viewer.off(B.MOUSE_MOVE,this._onMouseMove,this),this._viewer.off(B.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.off(M.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.off(M.UPDATE_ANCHOR,this._onUpdateAnchor,this),this._plotEvent.off(M.CLEAR_ANCHOR,this._onClearAnchor,this)}on(e,i,s){return this._plotEvent.on(e,i,s||this),this}off(e,i,s){return this._plotEvent.off(e,i,s||this),this}fire(e,i){return this._plotEvent.fire(e,i),this}activate(e={}){return this._anchorLayer.entities.removeAll(),this._anchors=[],this._viewer.tooltip.enable=!0,this._options={...af,...e},this._unbindEvent(),this._bindEvent(),this.fire(M.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})}},th=ns;function ls(){return{drawTool:new $l,editTool:new th}}var{ImageryLayer:of}=r,hs=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}get selectedImageryLayer(){return this._selectedImageryLayer}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 i=0;i<this._selectedImageryLayer.cache.length;i++)this._globe.imageryLayers.remove(this._selectedImageryLayer.cache[i]);e.cache=[]}for(let i=e.layers.length-1;i>=0;i--){let s=e.layers[i],a=of.fromProviderAsync(s,e.options);s&&this._globe.imageryLayers.add(a,0),e.cache.push(a)}this._selectedImageryLayer=e}}addImageryLayer(e,i={}){let s=[];return Array.isArray(e)?s=e.slice(0):s=[e],this._count++,this._imageryLayers.push({id:`imagery-no-${this._count}`,layers:s,cache:[]}),this}changeImageryLayer(e){if(e>this._imageryLayers.length-1)throw new Error("index error");return this.selectedImageryLayer=this._imageryLayers[e],this}},cs=hs;var{BoxGeometry:ih,Cartesian3:nf,defined:Ie,DeveloperError:rh,GeometryPipeline:lf,Matrix3:sh,Matrix4:ds,Transforms:hf,VertexFormat:cf,BufferUsage:df,CubeMap:pf,loadCubeMap:mf,RenderState:uf,VertexArray:ff,BlendingState:_f,SceneMode:ah,ShaderProgram:gf,ShaderSource:yf,SkyBox:vf}=r,wf=`
193
+ `,!0,"loading");this._wrapper.appendChild(e),this._ready=!0}};k.registerType("loading_mask");var Xl=ts;var is=class extends k{constructor(){super(),this._wrapper=D.create("div","widget slider"),this._tileset=void 0,this._moveActive=!1,this._state=_.INITIALIZED}get type(){return k.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=D.parseDom(se.splitter,!0,"splitter");this._wrapper.appendChild(e);let i=new r.ScreenSpaceEventHandler(e),s=this;i.setInputAction(()=>{s._moveActive=!0},r.ScreenSpaceEventType.LEFT_DOWN),i.setInputAction(()=>{s._moveActive=!0},r.ScreenSpaceEventType.PINCH_START),i.setInputAction(a=>{s._moveHandler(a)},r.ScreenSpaceEventType.MOUSE_MOVE),i.setInputAction(a=>{s._moveHandler(a)},r.ScreenSpaceEventType.PINCH_MOVE),i.setInputAction(()=>{s._moveActive=!1},r.ScreenSpaceEventType.LEFT_UP),i.setInputAction(()=>{s._moveActive=!1},r.ScreenSpaceEventType.PINCH_END),this._ready=!0}_moveHandler(e){if(!this._moveActive||!this._enable)return;let i=e.endPosition.x,s=(this._wrapper.offsetLeft+i)/this._wrapper.parentElement.offsetWidth;this._wrapper.style.left=100*s+"%",this._viewer.scene.splitPosition=s}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)}};k.registerType("tileset_split");var Jl=is;var rs=class extends k{constructor(){super(),this._wrapper=D.create("div","widget slider"),this._tileset=void 0,this._baseLayer=void 0,this._moveActive=!1,this._state=_.INITIALIZED}get type(){return k.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=D.parseDom(se.splitter,!0,"splitter");this._wrapper.appendChild(e);let i=new r.ScreenSpaceEventHandler(e),s=this;i.setInputAction(()=>{s._moveActive=!0},r.ScreenSpaceEventType.LEFT_DOWN),i.setInputAction(()=>{s._moveActive=!0},r.ScreenSpaceEventType.PINCH_START),i.setInputAction(a=>{s._moveHandler(a)},r.ScreenSpaceEventType.MOUSE_MOVE),i.setInputAction(a=>{s._moveHandler(a)},r.ScreenSpaceEventType.PINCH_MOVE),i.setInputAction(()=>{s._moveActive=!1},r.ScreenSpaceEventType.LEFT_UP),i.setInputAction(()=>{s._moveActive=!1},r.ScreenSpaceEventType.PINCH_END),this._ready=!0}_moveHandler(e){if(!this._moveActive||!this._enable)return;let i=e.endPosition.x,s=(this._wrapper.offsetLeft+i)/this._wrapper.parentElement.offsetWidth;this._wrapper.style.left=100*s+"%",this._viewer.scene.splitPosition=s}addTileset(e){return!this._viewer||!this._enable?this:(e&&(this._tileset&&this._viewer.scene.primitives.remove(this._tileset),Promise.resolve(e.delegate||e).then(i=>{this._tileset=this._viewer.scene.primitives.add(i)})),this)}addBaseLayer(e){return!this._viewer||!this._enable?this:(e&&(this._baseLayer&&this._viewer.imageryLayers.remove(this._baseLayer),Promise.resolve(e).then(i=>{this._baseLayer=this._viewer.imageryLayers.addImageryProvider(i),this._baseLayer.splitDirection=1})),this)}};k.registerType("scene_split");var Ql=rs;var ss=class{constructor(){this._delegate=new r.ViewportQuad,this._viewer=void 0}update(e){this._delegate.update(e)}install(e){this._viewer=e;let i=!0,s=se.logo,a=[86,26];if(i&&!s)return!1;let o=i&&s?s:se.logo;this._delegate.rectangle=new r.BoundingRectangle(2,1,a[0]||86,a[1]||26),this._delegate.material=new r.Material({fabric:{type:"Logo-Image",uniforms:{image:o},components:{diffuse:"texture(image, materialInput.st).rgb",alpha:"texture(image, materialInput.st).a "}},translucent:function(n){return!1}}),this._viewer.scene.primitives.add(this),i||this._viewer.scene.postRender.addEventListener(()=>{this._viewer.scene.primitives.contains(this)||this._viewer.scene.primitives.add(this)})}isDestroyed(){return!1}destroy(){return this}};k.registerType("attribution");var Kl=ss;function as(){return{popup:new Bl,contextMenu:new Il,tooltip:new Ul,mapSwitch:new Wl,mapSplit:new Hl,locationBar:new Ll,hawkeyeMap:new Vl,compass:new Zl,distanceLegend:new Yl,zoomController:new ql,loadingMask:new Xl,tilesetSplit:new Jl,sceneSplit:new Ql,attribution:new Kl}}var et="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 Rt="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 rf={icon_center:Rt,icon_anchor:et,icon_size:[12,12],clampToModel:!1,maxAnchorSize:999},os=class{constructor(){this._viewer=void 0,this._anchorLayer=new r.CustomDataSource("draw-anchor-layer"),this._floatingAnchor=void 0,this._options={},this._plotEvent=new gt,this._tooltipMess=void 0,this._anchorIds=[]}set tooltipMess(e){this._tooltipMess=e}_getEventPosition(e){return this._options.clampToModel&&e.position?e.position:e.surfacePosition}_onClick(e){let i=this._getEventPosition(e);if(!i)return!1;this._floatingAnchor||(this._floatingAnchor=this._onCreateAnchor({position:i})),this._plotEvent.fire(M.DRAW_ANCHOR,i)}_onMouseMove(e){this._viewer.tooltip.showAt(e.windowPosition,this._tooltipMess);let i=this._getEventPosition(e);if(!i)return!1;this._floatingAnchor&&this._floatingAnchor.position.setValue(i),this._plotEvent.fire(M.ANCHOR_MOVING,i)}_onDoubleClick(e){this._plotEvent.fire(M.DRAW_STOP,this._getEventPosition(e))}_onRightClick(e){if(this._plotEvent.fire(M.DELETE_ANCHOR),this._anchorIds&&this._anchorIds.length>0){var i=this._anchorIds[this._anchorIds.length-1];this._anchorLayer.entities.removeById(i),this._anchorIds.splice(this._anchorIds.length-1,1)}}_onCreateAnchor({position:e,isCenter:i=!1}){var a;let s=this._anchorLayer.entities.add({position:e,billboard:{image:i?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 r.Cartesian2(0,0),eyeOffset:this._options.eyeOffset||new r.Cartesian3(0,0,-100),disableDepthTestDistance:(a=this._options.disableDepthTestDistance)!=null?a:0,heightReference:this._viewer.scene.mode===r.SceneMode.SCENE3D&&!this._options.clampToModel?r.HeightReference.CLAMP_TO_GROUND:r.HeightReference.NONE}});return this._anchorIds.push(s.id),s}_onClearAnchor(){this._anchorLayer.entities.removeAll(),this._anchorIds=[]}_bindEvent(){this._viewer.on(B.CLICK,this._onClick,this),this._viewer.on(B.MOUSE_MOVE,this._onMouseMove,this),this._viewer.on(B.DB_CLICK,this._onDoubleClick,this),this._viewer.on(B.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.on(M.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.on(M.CLEAR_ANCHOR,this._onClearAnchor,this)}_unbindEvent(){this._viewer.off(B.CLICK,this._onClick,this),this._viewer.off(B.MOUSE_MOVE,this._onMouseMove,this),this._viewer.off(B.DB_CLICK,this._onDoubleClick,this),this._viewer.off(B.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.off(M.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.off(M.CLEAR_ANCHOR,this._onClearAnchor,this)}on(e,i,s){return this._plotEvent.on(e,i,s||this),this}off(e,i,s){return this._plotEvent.off(e,i,s||this),this}fire(e,i={}){return this._plotEvent.fire(e,i),this}activate(e={}){return this._viewer.tooltip.enable=!0,this._options={...rf,...e},this._anchorIds=[],this._unbindEvent(),this._bindEvent(),this.fire(M.DRAW_START,this._options),this}deactivate(){return this._unbindEvent(),this._viewer.tooltip.enable=!1,this._anchorLayer.entities.removeAll(),this._floatingAnchor=void 0,this._anchorIds=[],this}install(e){this._viewer=e,this._viewer.dataSources.add(this._anchorLayer),Object.defineProperty(this._viewer,"drawTool",{value:this,writable:!1})}},$l=os;var eh="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 af={icon_center:Rt,icon_anchor:et,icon_midAnchor:eh,icon_size:[12,12],clampToModel:!1},ns=class{constructor(){this._viewer=void 0,this._anchorLayer=new r.CustomDataSource("edit-anchor-layer"),this._options={},this._plotEvent=new gt,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 i=this._options.clampToModel&&e.position?e.position:e.surfacePosition;if(!i)return!1;this._pickedAnchor&&this._pickedAnchor.position&&this._pickedAnchor.properties&&(this._pickedAnchor.position.setValue(i),this._plotEvent.fire(M.EDIT_ANCHOR_STOP,{pickedAnchor:this._pickedAnchor,position:i})),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 i=this._options.clampToModel&&e.position?e.position:e.surfacePosition;if(!i)return!1;this._pickedAnchor&&this._pickedAnchor.position&&this._pickedAnchor.properties?(this._pickedAnchor.position.setValue(i),this._plotEvent.fire(M.ANCHOR_MOVING,{pickedAnchor:this._pickedAnchor,position:i})):this._anchors.length===0&&this._plotEvent.fire(M.ANCHOR_MOVING,{position:i})}_onRightClick(e){let i=this._options.clampToModel&&e.position?e.position:e.surfacePosition;this._plotEvent.fire(M.EDIT_STOP,{pickedAnchor:this._pickedAnchor,position:i})}_onCreateAnchor({position:e,index:i,isCenter:s=!1,isMid:a=!1}){var h;let o=a?this._options.icon_midAnchor:s?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 r.Cartesian2(0,0),eyeOffset:this._options.eyeOffset||new r.Cartesian3(0,0,-100),disableDepthTestDistance:(h=this._options.disableDepthTestDistance)!=null?h:0,heightReference:this._viewer.scene.mode===r.SceneMode.SCENE3D&&!this._options.clampToModel?r.HeightReference.CLAMP_TO_GROUND:r.HeightReference.NONE},properties:{isMid:a,index:i}});this._anchors.push(n)}_onUpdateAnchor({index:e,position:i}){this._anchors[e]&&this._anchors[e].position.setValue(i)}_onClearAnchor(){this._anchorLayer.entities.removeAll(),this._anchors=[]}_bindEvent(){this._viewer.on(B.CLICK,this._onClick,this),this._viewer.on(B.MOUSE_MOVE,this._onMouseMove,this),this._viewer.on(B.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.on(M.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.on(M.UPDATE_ANCHOR,this._onUpdateAnchor,this),this._plotEvent.on(M.CLEAR_ANCHOR,this._onClearAnchor,this)}_unbindEvent(){this._viewer.off(B.CLICK,this._onClick,this),this._viewer.off(B.MOUSE_MOVE,this._onMouseMove,this),this._viewer.off(B.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.off(M.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.off(M.UPDATE_ANCHOR,this._onUpdateAnchor,this),this._plotEvent.off(M.CLEAR_ANCHOR,this._onClearAnchor,this)}on(e,i,s){return this._plotEvent.on(e,i,s||this),this}off(e,i,s){return this._plotEvent.off(e,i,s||this),this}fire(e,i){return this._plotEvent.fire(e,i),this}activate(e={}){return this._anchorLayer.entities.removeAll(),this._anchors=[],this._viewer.tooltip.enable=!0,this._options={...af,...e},this._unbindEvent(),this._bindEvent(),this.fire(M.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})}},th=ns;function ls(){return{drawTool:new $l,editTool:new th}}var{ImageryLayer:of}=r,hs=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}get selectedImageryLayer(){return this._selectedImageryLayer}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 i=0;i<this._selectedImageryLayer.cache.length;i++)this._globe.imageryLayers.remove(this._selectedImageryLayer.cache[i]);e.cache=[]}for(let i=e.layers.length-1;i>=0;i--){let s=e.layers[i],a=of.fromProviderAsync(s,e.options);s&&this._globe.imageryLayers.add(a,0),e.cache.push(a)}this._selectedImageryLayer=e}}addImageryLayer(e,i={}){let s=[];return Array.isArray(e)?s=e.slice(0):s=[e],this._count++,this._imageryLayers.push({id:`imagery-no-${this._count}`,layers:s,cache:[]}),this}changeImageryLayer(e){if(e>this._imageryLayers.length-1)throw new Error("index error");return this.selectedImageryLayer=this._imageryLayers[e],this}},cs=hs;var{BoxGeometry:ih,Cartesian3:nf,defined:Ie,DeveloperError:rh,GeometryPipeline:lf,Matrix3:sh,Matrix4:ds,Transforms:hf,VertexFormat:cf,BufferUsage:df,CubeMap:pf,loadCubeMap:mf,RenderState:uf,VertexArray:ff,BlendingState:_f,SceneMode:ah,ShaderProgram:gf,ShaderSource:yf,SkyBox:vf}=r,wf=`
194
194
  uniform samplerCube u_cubeMap;
195
195
  in vec3 v_texCoord;
196
196
  void main()
@@ -3278,7 +3278,7 @@ void main() {\r
3278
3278
  %c \u76D8\u53E4\u5730\u7406\u4FE1\u606F\u7CFB\u7EDF
3279
3279
  %c PanGu Gis For Cesium SDK
3280
3280
  %c \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
3281
- %c \u{1F680} \u7248\u672C: %c5.1.16 - 2025-10-24
3281
+ %c \u{1F680} \u7248\u672C: %c5.2.0 - 2025-10-24
3282
3282
  %c \u{1F310} EUM\u7248\u672C\uFF1A%c1.131.0
3283
3283
  %c \u{1F468}\u200D\u{1F4BB} \u5F00\u53D1\u4F5C\u8005: %cLucas Xu <xulei0857@qq.com>
3284
3284
  %c \u{1F4DC} \u6388\u6743\uFF1A%c\u667A\u4F01\u534E\u7AE0-\u6C38\u4E45\u4F7F\u7528\u6B64\u8F6F\u4EF6\u5F53\u524D\u7248\u672C\u3002
@@ -3287,4 +3287,4 @@ void main() {\r
3287
3287
  %c \u{1F3E0} \u5B98\u7F51: %chttps://www.pggis.com
3288
3288
 
3289
3289
  %c
3290
- `,'font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 24px; font-weight: 600; color: #008AFF; text-align: center;','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 24px; font-weight: 600; color: #F08519; text-align: center; ','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 16px; font-weight: 600; color: #FFC712; text-align: center;font-style:oblique','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #718096; text-align: center; letter-spacing: 0.5px; padding: 4px 0','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829',"font-family: monospace; font-size: 14px; color: transparent"))};var Au="./libs/pg-sdk/resources/",Mu=Au,bu=!1;Qe("baseUrl",Au);var MH={set baseUrl(l){Mu=l,Qe("baseUrl",l)},get baseUrl(){return Mu}};function bH(l={}){return bu?Promise.resolve():new Promise((e,i)=>{l.baseUrl&&(this.config.baseUrl=l.baseUrl),l.cesium&&registerLib("cesium",l.Cesium),l.echarts&&registerLib("echarts",l.echarts),l.turf&&registerLib("turf",l.turf),bu=!0,Qe("isInitialized",!0),Qe("baseUrl",this.config.baseUrl),e()}).catch(e=>{throw new Error(e.message)})}var AH="5.1.16";export{wu as Analysis,Ue as AnalysisType,ee as AnimationType,xm as AroundPoint,wm as AroundView,st as AttackArrow,at as Billboard,ei as BillboardPrimitive,jc as BounceBillboardPrimitive,qc as BounceLabelPrimitive,hd as Box,YG as CallbackProperty,he as CameraUtil,pu as CameraVideo,Rd as CameraVideoLayer,RG as Cartesian2,OG as Cartesian3,yu as ChartLayer,ii as Circle,Pp as CircleBlurMaterialProperty,Mp as CircleDiffuseMaterialProperty,bp as CircleFadeMaterialProperty,Ap as CirclePulseMaterialProperty,Tm as CircleScan,Sp as CircleScanMaterialProperty,Ip as CircleSpiralMaterialProperty,Lp as CircleVaryMaterialProperty,Dp as CircleWaveMaterialProperty,qG as ClassificationType,Pe as ClippingDirection,uH as ClippingPlane,fH as ClippingPlaneCollection,_H as ClippingPolygon,gH as ClippingPolygonCollection,Xc as CloudPrimitive,Lc as ClusterLayer,HG as Color,KG as ColorMaterialProperty,Ui as ContourLine,Ce as CoordTransform,cd as Corridor,kc as CustomBillboard,Ch as CustomGeographicTilingScheme,Nc as CustomLabel,Th as CustomMercatorTilingScheme,nH as CustomShader,aH as CustomShaderMode,oH as CustomShaderTranslucencyMode,dd as Cylinder,Dc as CzmlLayer,Jc as DiffuseWallPrimitive,Hc as DivIcon,D as DomUtil,Jt as DoubleArrow,zc as DynamicBillboard,Rc as DynamicLayer,Fc as DynamicModel,W0 as Effect,Qc as ElecEllipsoidPrimitive,pd as Ellipse,hH as Ellipsoid,Rp as EllipsoidElectricMaterialProperty,Op as EllipsoidTrailMaterialProperty,xH as FeatureDetection,Oc as FeatureGridLayer,Qt as FineArrow,Kc as FlowLinePrimitive,Em as Flying,Kt as GatheringPlace,Et as GeoJsonLayer,it as GeoTerrainProvider,Pu as GeoTools,JG as GeographicTilingScheme,xu as GlobeClipping,Pm as GlobeRotate,vd as GpxLayer,wd as GraticuleLayer,xd as GroundPrimitiveLayer,oh as GroundSkyBox,Pd as HeatMapLayer,VG as HeightReference,ZG as HorizontalOrigin,Md as HtmlLayer,Wc as I3S,bd as I3SLayer,$G as ImageMaterialProperty,xh as ImageryLayerFactory,V as ImageryType,UG as JulianDate,jm as KeyboardRoaming,Ad as KmlLayer,ri as Label,Sd as LabelLayer,ti as LabelPrimitive,I as Layer,Ic as LayerGroup,Tt as LayerType,ed as LightCylinderPrimitive,TH as LightingModel,$e as LngLatArray,U as LngLatPoint,zG as Material,Gc as Math,kG as Matrix3,NG as Matrix4,ou as Measure,ge as MeasureType,qt as Model,mH as ModelAnimationLoop,Ze as ModelEventType,Eu as ModelManager,td as ModelPrimitive,B as MouseEventType,we as MouseMode,LG as NearFarScalar,x as Overlay,Z as OverlayType,v as P,v as Parse,ud as Plane,uu as PlaneVideo,Od as PlaneVideoLayer,k0 as Plot,C as PlotUtil,si as Point,rd as PointPrimitive,ot as Polygon,nt as Polyline,yd as PolylineAdapter,rH as PolylineArrowMaterialProperty,eH as PolylineDashMaterialProperty,kp as PolylineFlickerMaterialProperty,Np as PolylineFlowMaterialProperty,tH as PolylineGlowMaterialProperty,zp as PolylineImageTrailMaterialProperty,Fp as PolylineLightingMaterialProperty,Gp as PolylineLightingTrailMaterialProperty,iH as PolylineOutlineMaterialProperty,sd as PolylinePrimitive,Ne as PolylineShape,Hp as PolylineTrailMaterialProperty,gd as PolylineVolume,X as Position,cu as PositionEditor,Wi as PositionEditorType,Id as PrimitiveLayer,Wp as RadarLineMaterialProperty,bm as RadarScan,Bp as RadarSweepMaterialProperty,Up as RadarWaveMaterialProperty,Ld as RasterTileLayer,ai as Rect,WG as Rectangle,cH as Resource,Ym as RoamingController,qm as RoamingPath,li as S3MLayer,ad as ScanCirclePrimitive,z as SceneEventType,FG as SceneMode,BG as ShadowMode,Vi as Shadows,Zi as SightLine,GG as SkyBox,md as Sphere,Dt as SurfacePoint,Sl as SurfacePoints,y as T,$t as TailedAttackArrow,Zt as TdtTerrainProvider,Cu as TerrainClipping,Ac as TerrainFactory,fe as TerrainType,CH as TextureUniform,jt as Thing,re as TileSetEventType,Bc as Tileset,Tu as TilesetClipping,li as TilesetLayer,XG as TilesetStyle,Dd as TopoJsonLayer,Jm as Track,Xm as TrackController,Be as TrackViewMode,od as TrailLinePrimitive,y as Transform,Sc as Underground,lH as UniformType,yH as UrlTemplateImageryProvider,T as Util,AH as VERSION,Je as VectorLayer,jG as VerticalOrigin,nd as VideoPrimitive,Tf as Viewer,ji as Viewshed,_d as Wall,Vp as WallImageTrailMaterialProperty,jp as WallLineTrailMaterialProperty,qp as WallTrailMaterialProperty,Xp as WaterMaterialProperty,ld as WaterPrimitive,j0 as Weather,wH as WebMapServiceImageryProvider,vH as WebMercatorProjection,QG as WebMercatorTilingScheme,zd as WindLayer,MH as config,pH as createElevationBandMaterial,dH as createGooglePhotorealistic3DTileset,ne as getLib,bH as ready,_l as registerLib,sH as writeTextToCanvas};
3290
+ `,'font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 24px; font-weight: 600; color: #008AFF; text-align: center;','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 24px; font-weight: 600; color: #F08519; text-align: center; ','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 16px; font-weight: 600; color: #FFC712; text-align: center;font-style:oblique','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #718096; text-align: center; letter-spacing: 0.5px; padding: 4px 0','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829',"font-family: monospace; font-size: 14px; color: transparent"))};var Au="./libs/pg-sdk/resources/",Mu=Au,bu=!1;Qe("baseUrl",Au);var MH={set baseUrl(l){Mu=l,Qe("baseUrl",l)},get baseUrl(){return Mu}};function bH(l={}){return bu?Promise.resolve():new Promise((e,i)=>{l.baseUrl&&(this.config.baseUrl=l.baseUrl),l.cesium&&registerLib("cesium",l.Cesium),l.echarts&&registerLib("echarts",l.echarts),l.turf&&registerLib("turf",l.turf),bu=!0,Qe("isInitialized",!0),Qe("baseUrl",this.config.baseUrl),e()}).catch(e=>{throw new Error(e.message)})}var AH="5.2.0";export{wu as Analysis,Ue as AnalysisType,ee as AnimationType,xm as AroundPoint,wm as AroundView,st as AttackArrow,at as Billboard,ei as BillboardPrimitive,jc as BounceBillboardPrimitive,qc as BounceLabelPrimitive,hd as Box,YG as CallbackProperty,he as CameraUtil,pu as CameraVideo,Rd as CameraVideoLayer,RG as Cartesian2,OG as Cartesian3,yu as ChartLayer,ii as Circle,Pp as CircleBlurMaterialProperty,Mp as CircleDiffuseMaterialProperty,bp as CircleFadeMaterialProperty,Ap as CirclePulseMaterialProperty,Tm as CircleScan,Sp as CircleScanMaterialProperty,Ip as CircleSpiralMaterialProperty,Lp as CircleVaryMaterialProperty,Dp as CircleWaveMaterialProperty,qG as ClassificationType,Pe as ClippingDirection,uH as ClippingPlane,fH as ClippingPlaneCollection,_H as ClippingPolygon,gH as ClippingPolygonCollection,Xc as CloudPrimitive,Lc as ClusterLayer,HG as Color,KG as ColorMaterialProperty,Ui as ContourLine,Ce as CoordTransform,cd as Corridor,kc as CustomBillboard,Ch as CustomGeographicTilingScheme,Nc as CustomLabel,Th as CustomMercatorTilingScheme,nH as CustomShader,aH as CustomShaderMode,oH as CustomShaderTranslucencyMode,dd as Cylinder,Dc as CzmlLayer,Jc as DiffuseWallPrimitive,Hc as DivIcon,D as DomUtil,Jt as DoubleArrow,zc as DynamicBillboard,Rc as DynamicLayer,Fc as DynamicModel,W0 as Effect,Qc as ElecEllipsoidPrimitive,pd as Ellipse,hH as Ellipsoid,Rp as EllipsoidElectricMaterialProperty,Op as EllipsoidTrailMaterialProperty,xH as FeatureDetection,Oc as FeatureGridLayer,Qt as FineArrow,Kc as FlowLinePrimitive,Em as Flying,Kt as GatheringPlace,Et as GeoJsonLayer,it as GeoTerrainProvider,Pu as GeoTools,JG as GeographicTilingScheme,xu as GlobeClipping,Pm as GlobeRotate,vd as GpxLayer,wd as GraticuleLayer,xd as GroundPrimitiveLayer,oh as GroundSkyBox,Pd as HeatMapLayer,VG as HeightReference,ZG as HorizontalOrigin,Md as HtmlLayer,Wc as I3S,bd as I3SLayer,$G as ImageMaterialProperty,xh as ImageryLayerFactory,V as ImageryType,UG as JulianDate,jm as KeyboardRoaming,Ad as KmlLayer,ri as Label,Sd as LabelLayer,ti as LabelPrimitive,I as Layer,Ic as LayerGroup,Tt as LayerType,ed as LightCylinderPrimitive,TH as LightingModel,$e as LngLatArray,U as LngLatPoint,zG as Material,Gc as Math,kG as Matrix3,NG as Matrix4,ou as Measure,ge as MeasureType,qt as Model,mH as ModelAnimationLoop,Ze as ModelEventType,Eu as ModelManager,td as ModelPrimitive,B as MouseEventType,we as MouseMode,LG as NearFarScalar,x as Overlay,Z as OverlayType,v as P,v as Parse,ud as Plane,uu as PlaneVideo,Od as PlaneVideoLayer,k0 as Plot,C as PlotUtil,si as Point,rd as PointPrimitive,ot as Polygon,nt as Polyline,yd as PolylineAdapter,rH as PolylineArrowMaterialProperty,eH as PolylineDashMaterialProperty,kp as PolylineFlickerMaterialProperty,Np as PolylineFlowMaterialProperty,tH as PolylineGlowMaterialProperty,zp as PolylineImageTrailMaterialProperty,Fp as PolylineLightingMaterialProperty,Gp as PolylineLightingTrailMaterialProperty,iH as PolylineOutlineMaterialProperty,sd as PolylinePrimitive,Ne as PolylineShape,Hp as PolylineTrailMaterialProperty,gd as PolylineVolume,X as Position,cu as PositionEditor,Wi as PositionEditorType,Id as PrimitiveLayer,Wp as RadarLineMaterialProperty,bm as RadarScan,Bp as RadarSweepMaterialProperty,Up as RadarWaveMaterialProperty,Ld as RasterTileLayer,ai as Rect,WG as Rectangle,cH as Resource,Ym as RoamingController,qm as RoamingPath,li as S3MLayer,ad as ScanCirclePrimitive,z as SceneEventType,FG as SceneMode,BG as ShadowMode,Vi as Shadows,Zi as SightLine,GG as SkyBox,md as Sphere,Dt as SurfacePoint,Sl as SurfacePoints,y as T,$t as TailedAttackArrow,Zt as TdtTerrainProvider,Cu as TerrainClipping,Ac as TerrainFactory,fe as TerrainType,CH as TextureUniform,jt as Thing,re as TileSetEventType,Bc as Tileset,Tu as TilesetClipping,li as TilesetLayer,XG as TilesetStyle,Dd as TopoJsonLayer,Jm as Track,Xm as TrackController,Be as TrackViewMode,od as TrailLinePrimitive,y as Transform,Sc as Underground,lH as UniformType,yH as UrlTemplateImageryProvider,T as Util,AH as VERSION,Je as VectorLayer,jG as VerticalOrigin,nd as VideoPrimitive,Tf as Viewer,ji as Viewshed,_d as Wall,Vp as WallImageTrailMaterialProperty,jp as WallLineTrailMaterialProperty,qp as WallTrailMaterialProperty,Xp as WaterMaterialProperty,ld as WaterPrimitive,j0 as Weather,wH as WebMapServiceImageryProvider,vH as WebMercatorProjection,QG as WebMercatorTilingScheme,zd as WindLayer,MH as config,pH as createElevationBandMaterial,dH as createGooglePhotorealistic3DTileset,ne as getLib,bH as ready,_l as registerLib,sH as writeTextToCanvas};
package/dist/pggis.min.js CHANGED
@@ -2,7 +2,7 @@
2
2
  * 盘古地理信息系统 PanGu Gis
3
3
  * PanGu Gis For Cesium SDK
4
4
  *
5
- * 版本信息:5.1.16
5
+ * 版本信息:5.2.0
6
6
  * 编译日期:2025-10-24
7
7
  * 版权所有:Copyright by PanGu Gis http://www.pggis.com
8
8
  * 使用单位:智企华章
@@ -16300,7 +16300,7 @@ var PG=(()=>{var Fu=Object.create;var ut=Object.defineProperty;var Gu=Object.get
16300
16300
  * @property {number} LEFT_MIDDLE - 左键拖动,中键倾斜
16301
16301
  * @license MIT
16302
16302
  * @copyright © 2025 Company Name
16303
- */var Xu={LEFT_RIGHT:0,LEFT_MIDDLE:1},ge=Xu;var Ju="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),Rr=class{static uuid(e="D"){let i=[];i[8]=i[13]=i[18]=i[23]="-",i[14]="4";let s;for(let a=0;a<36;a++)i[a]||(s=0|Math.random()*16,i[a]=Ju[a===19?s&3|8:s]);return e+"-"+i.join("")}static merge(e,...i){let s,a,o,n;for(a=0,o=i.length;a<o;a++){n=i[a];for(s in n)e[s]=n[s]}return e}static splitWords(e){return this.trim(e).split(/\s+/)}static setOptions(e,i){e.hasOwnProperty("options")||(e.options=e.options?Object.create(e.options):{});for(let s in i)e.options[s]=i[s];return e.options}static formatNum(e,i){let s=Math.pow(10,i===void 0?6:i);return Math.round(e*s)/s}static trim(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}static getStrLength(e){}static template(e,i,s=!1){return!e||typeof e!="string"?"":e.replace(/\{([^{}]+)\}/g,(a,o)=>{let n=o.trim();return i&&typeof i=="object"&&i.hasOwnProperty(n)?i[n]:s?"":a})}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,i){let s=null;return function(){s&&clearTimeout(s),s=setTimeout(e,i)}}static throttle(e,i){let s=!0;return function(){if(!s)return!1;s=!1,setTimeout(()=>{e(),s=!0},i)}}static dataURLtoBlob(e){let i=e.split(","),s=i[0].match(/:(.*?);/)[1],a=atob(i[1]),o=a.length,n=new Uint8Array(o);for(;o--;)n[o]=a.charCodeAt(o);return new Blob([n],{type:s})}static isPromise(e){return Promise.resolve(e)===e}},T=Rr;var Or=class{static get(e){return typeof e=="string"?document.getElementById(e):e}static getStyle(e,i){let s=e.style[i]||e.currentStyle&&e.currentStyle[i];if((!s||s==="auto")&&document.defaultView){let a=document.defaultView.getComputedStyle(e,null);s=a?a[i]:null}return s==="auto"?null:s}static create(e,i,s=null){let a=document.createElement(e);return a.className=i||"",s&&s.appendChild(a),a}static remove(e){let i=e.parentNode;i&&i.removeChild(e)}static empty(e){for(;e.firstChild;)e.removeChild(e.firstChild)}static hasClass(e,i){if(e.classList!==void 0)return e.classList.contains(i);let s=this.getClass(e);return s.length>0&&new RegExp("(^|\\s)"+i+"(\\s|$)").test(s)}static addClass(e,i){if(e.classList!==void 0){let s=T.splitWords(i);for(let a=0,o=s.length;a<o;a++)e.classList.add(s[a])}else if(!this.hasClass(e,i)){let s=this.getClass(e);this.setClass(e,(s?s+" ":"")+i)}}static removeClass(e,i){e.classList!==void 0?e.classList.remove(i):this.setClass(e,T.trim((" "+this.getClass(e)+" ").replace(" "+i+" "," ")))}static setClass(e,i){e.className.baseVal===void 0?e.className=i:e.className.baseVal=i}static getClass(e){return e.correspondingElement&&(e=e.correspondingElement),e.className.baseVal===void 0?e.className:e.className.baseVal}static createSvg(e,i,s,a){let o=document.createElementNS("http://www.w3.org/2000/svg","svg:svg");o.setAttribute("class","svg-path"),o.setAttribute("width",e),o.setAttribute("height",i),o.setAttribute("viewBox",`0 0 ${e} ${i}`);let n=document.createElementNS("http://www.w3.org/2000/svg","path");return n.setAttribute("d",s),o.appendChild(n),a&&a.appendChild(o),o}static parseDom(e,i,s){i=i!=null?i:!1;let a=document.createElement("div");return a.className=s||"",a.innerHTML=e,i?a:a.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,i,s=null){let a=this.create("video",i,s),o=this.create("source","",a);o.setAttribute("src",e),o.setAttribute("type","video/map4");let n=this.create("source","",a);return n.setAttribute("src",e),n.setAttribute("type","video/quicktime"),a}},D=Or;var kr=Math.PI*2,Qt=100,Nr=1e-4,zr=class{static distance(e,i){return Math.sqrt(Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2))}static wholeDistance(e){let i=0;for(let s=0;s<e.length-1;s++)i+=this.distance(e[s],e[s+1]);return i}static getBaseLength(e){return Math.pow(this.wholeDistance(e),.99)}static mid(e,i){return[(e[0]+i[0])/2,(e[1]+i[1])/2]}static getCircleCenterOfThreePoints(e,i,s){let a=[(e[0]+i[0])/2,(e[1]+i[1])/2],o=[a[0]-e[1]+i[1],a[1]+e[0]-i[0]],n=[(e[0]+s[0])/2,(e[1]+s[1])/2],h=[n[0]-e[1]+s[1],n[1]+e[0]-s[0]];return this.getIntersectPoint(a,o,n,h)}static getIntersectPoint(e,i,s,a){let o,n,h,c;return e[1]===i[1]?(h=(a[0]-s[0])/(a[1]-s[1]),o=h*(e[1]-s[1])+s[0],n=e[1],[o,n]):s[1]===a[1]?(c=(i[0]-e[0])/(i[1]-e[1]),o=c*(s[1]-e[1])+e[0],n=s[1],[o,n]):(c=(i[0]-e[0])/(i[1]-e[1]),h=(a[0]-s[0])/(a[1]-s[1]),n=(c*e[1]-e[0]-h*s[1]+s[0])/(c-h),o=c*n-c*e[1]+e[0],[o,n])}static getAzimuth(e,i){let s,a=Math.asin(Math.abs(i[1]-e[1])/this.distance(e,i));return i[1]>=e[1]&&i[0]>=e[0]?s=a+Math.PI:i[1]>=e[1]&&i[0]<e[0]?s=kr-a:i[1]<e[1]&&i[0]<e[0]?s=a:i[1]<e[1]&&i[0]>=e[0]&&(s=Math.PI-a),s}static getAngleOfThreePoints(e,i,s){let a=this.getAzimuth(i,e)-this.getAzimuth(i,s);return a<0?a+kr:a}static isClockWise(e,i,s){return(s[1]-e[1])*(i[0]-e[0])>(i[1]-e[1])*(s[0]-e[0])}static getPointOnLine(e,i,s){let a=i[0]+e*(s[0]-i[0]),o=i[1]+e*(s[1]-i[1]);return[a,o]}static getCubicValue(e,i,s,a,o){e=Math.max(Math.min(e,1),0);let n=1-e,h=e*e,c=h*e,d=n*n,p=d*n,f=p*i[0]+3*d*e*s[0]+3*n*h*a[0]+c*o[0],g=p*i[1]+3*d*e*s[1]+3*n*h*a[1]+c*o[1];return[f,g]}static getThirdPoint(e,i,s,a,o){let n=this.getAzimuth(e,i),h=o?n+s:n-s,c=a*Math.cos(h),d=a*Math.sin(h);return[i[0]+c,i[1]+d]}static getArcPoints(e,i,s,a){let o,n,h=[],c=a-s;c=c<0?c+kr:c;for(let d=0;d<=Qt;d++){let p=s+c*d/Qt;o=e[0]+i*Math.cos(p),n=e[1]+i*Math.sin(p),h.push([o,n])}return h}static getBisectorNormals(e,i,s,a){let o=this.getNormal(i,s,a),n=Math.sqrt(o[0]*o[0]+o[1]*o[1]),h=o[0]/n,c=o[1]/n,d=this.distance(i,s),p=this.distance(s,a),f,g,u,m,E;return n>Nr?this.isClockWise(i,s,a)?(f=e*d,g=s[0]-f*c,u=s[1]+f*h,E=[g,u],f=e*p,g=s[0]+f*c,u=s[1]-f*h,m=[g,u]):(f=e*d,g=s[0]+f*c,u=s[1]-f*h,E=[g,u],f=e*p,g=s[0]-f*c,u=s[1]+f*h,m=[g,u]):(g=s[0]+e*(i[0]-s[0]),u=s[1]+e*(i[1]-s[1]),E=[g,u],g=s[0]+e*(a[0]-s[0]),u=s[1]+e*(a[1]-s[1]),m=[g,u]),[E,m]}static getNormal(e,i,s){let a=e[0]-i[0],o=e[1]-i[1],n=Math.sqrt(a*a+o*o);a/=n,o/=n;let h=s[0]-i[0],c=s[1]-i[1],d=Math.sqrt(h*h+c*c);h/=d,c/=d;let p=a+h,f=o+c;return[p,f]}static getCurvePoints(e,i){let a=[this.getLeftMostControlPoint(e,i)],o,n,h,c;for(let f=0;f<i.length-2;f++)o=i[f],n=i[f+1],h=i[f+2],c=this.getBisectorNormals(e,o,n,h),a=a.concat(c);let d=this.getRightMostControlPoint(e,i);a.push(d);let p=[];for(let f=0;f<i.length-1;f++){o=i[f],n=i[f+1],p.push(o);for(let g=0;g<Qt;g++){let u=this.getCubicValue(g/Qt,o,a[f*2],a[f*2+1],n);p.push(u)}p.push(n)}return p}static getLeftMostControlPoint(e,i){let s=i[0],a=i[1],o=i[2],h=this.getBisectorNormals(0,s,a,o)[0],c=this.getNormal(s,a,o),d=Math.sqrt(c[0]*c[0]+c[1]*c[1]),p,f;if(d>Nr){let g=this.mid(s,a),u=s[0]-g[0],m=s[1]-g[1],w=2/this.distance(s,a),P=-w*m,b=w*u,L=P*P-b*b,S=2*P*b,R=b*b-P*P,B=h[0]-g[0],A=h[1]-g[1];p=g[0]+L*B+S*A,f=g[1]+S*B+R*A}else p=s[0]+e*(a[0]-s[0]),f=s[1]+e*(a[1]-s[1]);return[p,f]}static getRightMostControlPoint(e,i){let s=i.length,a=i[s-3],o=i[s-2],n=i[s-1],c=this.getBisectorNormals(0,a,o,n)[1],d=this.getNormal(a,o,n),p=Math.sqrt(d[0]*d[0]+d[1]*d[1]),f,g;if(p>Nr){let u=this.mid(o,n),m=n[0]-u[0],E=n[1]-u[1],P=2/this.distance(o,n),b=-P*E,L=P*m,S=b*b-L*L,R=2*b*L,B=L*L-b*b,A=c[0]-u[0],O=c[1]-u[1];f=u[0]+S*A+R*O,g=u[1]+R*A+B*O}else f=n[0]+e*(o[0]-n[0]),g=n[1]+e*(o[1]-n[1]);return[f,g]}static getBezierPoints(e){if(e.length<=2)return e;let i=[],s=e.length-1;for(let a=0;a<=1;a+=.01){let o=0,n=0;for(let h=0;h<=s;h++){let c=this.getBinomialFactor(s,h),d=Math.pow(a,h),p=Math.pow(1-a,s-h);o+=c*d*p*e[h][0],n+=c*d*p*e[h][1]}i.push([o,n])}return i.push(e[s]),i}static getBinomialFactor(e,i){return this.getFactorial(e)/(this.getFactorial(i)*this.getFactorial(e-i))}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 i=1;for(let s=1;s<=e;s++)i*=s;return i}static getQBSplinePoints(e){if(e.length<=2)return e;let i=2,s=[],a=e.length-i-1;s.push(e[0]);for(let o=0;o<=a;o++)for(let n=0;n<=1;n+=.05){let h=0,c=0;for(let d=0;d<=i;d++){let p=this.getQuadricBSplineFactor(d,n);h+=p*e[o+d][0],c+=p*e[o+d][1]}s.push([h,c])}return s.push(e[e.length-1]),s}static getQuadricBSplineFactor(e,i){return e===0?Math.pow(i-1,2)/2:e===1?(-2*Math.pow(i,2)+2*i+1)/2:e===2?Math.pow(i,2)/2:0}},C=zr;var Qu=!0;function Kt(...l){console.warn(...l)}function Ye(...l){Qu&&console.error(...l)}var Fr=class l{static getTransFun(e,i){if(!e||!i||(e=l.crsName2FunName(e),i=l.crsName2FunName(i),i===e))return!1;let s=e+"2"+i;return xt[s]?xt[s]:!1}static crsName2FunName(e){switch(e){case"GCJ02":return"gcj";case"BD09":return"bd";case"WGS84":default:return"wgs"}}static getPositionValue(e,i=r.JulianDate.now()){if(!e)return e;let s;return e instanceof r.Cartesian3?s=e:e._value&&e._value instanceof r.Cartesian3?s=e._value:typeof e.getValue=="function"&&(s=e.getValue(i||r.JulianDate.now())),s}static getMaxHeight(e,i=0){if(e==null||e.length===0)return i;for(let s=0;s<e.length;s++){let a=U.parse(e[s]);s===0&&(i=a.alt),a.alt>i&&(i=a.alt)}return T.formatNum(i,U.FormatAltLength)}static getMinHeight(e,i=0){if(e==null||e.length===0)return i;for(let s=0;s<e.length;s++){let a=r.Cartographic.fromCartesian(e[s]);(s===0||a.height<i)&&(i=a.height)}return T.formatNum(i,U.FormatAltLength)}static addPositionsHeight(e,i=0){if(i=Number(i),isNaN(i)||i===0)return e;if(Array.isArray(e)){let s=[];for(let a=0;a<e.length;a++){let o=r.Cartographic.fromCartesian(e[a]),n=r.Cartesian3.fromRadians(o.longitude,o.latitude,o.height+i);s.push(n)}return s}else{let s=r.Cartographic.fromCartesian(e);return r.Cartesian3.fromRadians(s.longitude,s.latitude,s.height+i)}}static setPositionsHeight(e,i=0){if(!e)return e;if(Array.isArray(e)){let s=[];for(let a=0;a<e.length;a++){let o=r.Cartographic.fromCartesian(e[a]),n=r.Cartesian3.fromRadians(o.longitude,o.latitude,i);s.push(n)}return s}else{let s=r.Cartographic.fromCartesian(e);return r.Cartesian3.fromRadians(s.longitude,s.latitude,i)}}static getHeight(e,i,s={}){var n;let a=U.toCartographic(i),o;if(e.getHeight?o=e.getHeight(a,s?s.heightReference:0):o=e.globe.getHeight(a),r.defined(o)&&o>((n=s?s.min:0)!=null?n:-999))return o;if(s&&s.original)return a.height}static pick3DTileset(e,i){if(!i)return null;i instanceof r.Cartesian3&&(i=[i]);for(let s=0,a=i.length;s<a;++s){let o=i[s],n=r.SceneTransforms.worldToWindowCoordinates(e,o);if(!r.defined(n))continue;let h=e.pick(n,10,10);if(r.defined(h)&&r.defined(h.primitive)&&h.primitive instanceof r.Cesium3DTileset)return h.primitive}return null}static getSurfaceHeight(e,i,s={}){return s.scene=e,s.position=i,new Ct(s).start()}static getSurfaceTerrainHeight(e,i){let s={scene:e,position:i,has3dtiles:!1};return new Ct(s).start()}static getSurfacePosition(e,i,s={}){var n;if(!i)return i;let a=U.toCartographic(i),o=l.getHeight(e,a,s);return!r.defined(o)||((n=s.greater)==null||n)&&o<a.height?i:(r.defined(s.maxHeight)&&(o=Math.min(o,s.maxHeight)),(s.heightReference===r.HeightReference.RELATIVE_TO_GROUND||s.heightReference===r.HeightReference.RELATIVE_TO_TERRAIN||s.heightReference===r.HeightReference.RELATIVE_TO_3D_TILE)&&(a.height+=o),r.Cartesian3.fromRadians(a.longitude,a.latitude,o))}static getCurrentMousePosition(e,i,s){let a;if(e.onlyVertexPosition){if(!e.vertexAdsorption)return e.vertexAdsorption=new VertexAdsorption(e),a=e.vertexAdsorption.pick(i,16,16),a}else e.vertexAdsorption&&e.vertexAdsorption.clear();let o;try{o=e.pick(i,5,5)}catch(n){Kt("getCurrentMousePosition: scene.pick \u62FE\u53D6\u65F6\u5F02\u5E38",n)}if(e.resultSupported&&!e.onlyPickTerrainPosition&&r.defined(o)){let n=l.hasPickedModel(o,s);if(n){if((n.billboard||n.point||n.label)&&!n.ellipse&&!n.model&&!n.ellipsoid)return l.getPositionValue(n.position);if(n.show){if(n.show=!1,e.requestRender(),a=l.getCurrentMousePosition(e,i,s),n.show=!0,a)return a;if(a=l._geetTargetMousePosition(e,i,o),r.defined(a))return a}if(!e.globe.show&&(a=l._geetTargetMousePosition(e,i,o),r.defined(a)))return a}else{if(r.defined(o.id)){let h=o.id;if((h.billboard||h.point||h.label)&&!h.ellipse&&!h.model&&!h.ellipsoid)return l.getPositionValue(h.position)}if(a=l._geetTargetMousePosition(e,i,o),r.defined(a))return a}}if(!e.onlyPickTerrainPosition&&e.onlyPickModelPosition)return a;if(e.mode===r.SceneMode.SCENE3D){let n=e.camera.getPickRay(i);a=e.globe.pick(n,e),!a&&(a=e.camera.pickEllipsoid(i,e.globe.ellipsoid))}else a=e.camera.pickEllipsoid(i,e.globe.ellipsoid);return r.defined(a)&&e.camera.positionCartographic.height<1e4&&r.Cartographic.fromCartesian(a).height<-5e3?null:a}static _geetTargetMousePosition(e,i,s){let a=e.result(i);if(r.defined(a)){let o=r.Cartographic.fromCartesian(a);if(o.height>=0||!r.defined(s?s.id:0)&&o.height>=-5e3)return a}}static hasPickedModel(e,i){if(r.defined(e.id)){let s=e.id;if(s._noMousePick||i&&s===i)return s}if(r.defined(e.primitive)){let s=e.primitive;if(s._noMousePick||i&&s===i)return s}if(r.defined(e.tileset)){let s=e.tileset;if(s._noMousePick||i&&s===i)return s}return null}static getCurrentMouseTerrainPosition(e,i){let s;if(e.mode===r.SceneMode.SCENE3D){let a=e.camera.getPickRay(i);s=e.globe.pick(a,e),s||(s=e.camera.pickEllipsoid(i,e.globe.ellipsoid))}else s=e.camera.pickEllipsoid(i,e.globe.ellipsoid);return s}static getMidpoint(e,i,s=.5){if(!i||!e)return;let a=U.toCartographic(e),o=U.toCartographic(i),n=(a.height+o.height)/2,h=new r.EllipsoidGeodesic(a,o).interpolateUsingFraction(s);return r.Cartesian3.fromRadians(h.longitude,h.latitude,n)}static isRepeatPoint(e,i){return!i||!e?!1:Math.abs(e.x-i.x)<.1&&Math.abs(e.y-i.y)<.1&&Math.abs(e.z-i.z)<.1}static getRotateCenterPoint(e,i,s){let a=r.Cartographic.fromCartesian(e);a.height=0;let o=r.Cartographic.toCartesian(a),n=r.Cartesian3.subtract(o,e,new r.Cartesian3);n=r.Cartesian3.normalize(n,new r.Cartesian3);let h=r.Quaternion.fromAxisAngle(n,r.Math.toRadians(s)),c=r.Matrix3.fromQuaternion(h),d=r.Matrix4.fromRotationTranslation(c),p=r.Cartesian3.subtract(i,e,new r.Cartesian3),f=r.Matrix4.multiplyByPoint(d,p,new r.Cartesian3);return r.Cartesian3.add(f,e,new r.Cartesian3)}static getOnLinePointByLen(e,i,s,a){let o=r.Transforms.eastNorthUpToFixedFrame(e),n=r.Matrix4.inverse(o,new r.Matrix4);e=r.Matrix4.multiplyByPoint(n,e,new r.Cartesian3),i=r.Matrix4.multiplyByPoint(n,i,new r.Cartesian3);let h=r.Cartesian3.subtract(i,e,new r.Cartesian3),c=r.Cartesian3.distance(e,i),d=s/c;a&&(d+=1);let p=r.Cartesian3.multiplyByScalar(h,d,new r.Cartesian3);return r.Matrix4.multiplyByPoint(o,p,new r.Cartesian3)}static getPositionByHprAndOffset(e,i,s,a,o){e=U.toCartesian(e),!s&&(s=new r.HeadingPitchRoll);let n=r.Transforms.headingPitchRollQuaternion(e,s,a,o),h=r.Matrix4.fromRotationTranslation(r.Matrix3.fromQuaternion(n,new r.Matrix3),e,new r.Matrix4);return r.Matrix4.multiplyByPoint(h,i,new r.Cartesian3)}static getPositionByDirectionAndLen(e,i,s){e=U.toCartesian(e);let a=r.Transforms.eastNorthUpToFixedFrame(e),o=r.Matrix3.fromRotationZ(r.Math.toRadians(360-(i||0))),n=r.Matrix4.fromRotationTranslation(o);return r.Matrix4.multiply(a,n,a),r.Matrix4.multiplyByPoint(a,new r.Cartesian3(s,0,0),new r.Cartesian3)}static getPositionByHprAndLen(e,i,s){e=U.toCartesian(e);let a=r.Transforms.headingPitchRollQuaternion(e,i),o=r.Matrix4.fromRotationTranslation(r.Matrix3.fromQuaternion(a,new r.Matrix3),e,new r.Matrix4);return r.Matrix4.multiplyByPoint(o,new r.Cartesian3(0,0,-s),new r.Cartesian3)}static getRayEarthPosition(e,i,s,a,o){if(!e||!i)return;i instanceof r.HeadingPitchRoll&&(i=r.Transforms.headingPitchRollQuaternion(e,i,a,o));let n=r.Matrix4.fromRotationTranslation(r.Matrix3.fromQuaternion(i,new r.Matrix3),e,new r.Matrix4);return l.getRayEarthPositionByMatrix(n,s,a)}static getRayEarthPositionByMatrix(e,i,s){let a=new r.Cartesian3,o=new r.Ray;r.Matrix4.multiplyByPoint(e,r.Cartesian3.ZERO,a),a.clone(o.origin);let n=new r.Cartesian3(0,0,i?-100:100);return l.extend2Earth(n,e,o,s)}extend2Earth(e,i,s,a){a=a||r.Ellipsoid.WGS84;let o=r.Matrix4.multiplyByPoint(i,e,new r.Cartesian3);r.Cartesian3.subtract(o,s.origin,s.direction),r.Cartesian3.normalize(s.direction,s.direction);let n=r.IntersectionTests.rayEllipsoid(s,a);if(!n)return;let h=n.start>0?n.start:n.stop,c=r.Ray.getPoint(s,h,new r.Cartesian3);if(c)try{r.Cartographic.fromCartesian(c,null,new r.Cartographic)}catch{return}return c}static getHeadingPitchRollByOrientation(e,i,s,a){if(!r.defined(i)||!r.defined(e))return new r.HeadingPitchRoll;let o=r.Matrix4.fromRotationTranslation(r.Matrix3.fromQuaternion(i,new r.Matrix3),e,new r.Matrix4);return l.getHeadingPitchRollByMatrix(o,s,a)}static getHeadingPitchRollByMatrix(e,i,s,a){return r.Transforms.fixedFrameToHeadingPitchRoll(e,i,s,a)}static getHeadingPitchRollForLine(e,i,s){e=U.toCartesian(e),i=U.toCartesian(i);let a=r.Ellipsoid.WGS84,o=new r.Cartesian3,n=new r.Matrix4,h=new r.Matrix3,c=r.Cartesian3.normalize(r.Cartesian3.subtract(i,e,o),o);r.Transforms.rotationMatrixFromPositionVelocity(e,c,a,h);let d=r.Matrix4.fromRotationTranslation(h,e,n);return s?r.Matrix4.multiplyTransformation(d,r.Axis.Z_UP_TO_X_UP,d):r.Matrix4.multiplyTransformation(d,r.Axis.X_UP_TO_Z_UP,d),r.Transforms.fixedFrameToHeadingPitchRoll(d,a)}static getReflectVector(e,i){let s=i.clone(),a=e.clone(),o=2*r.Cartesian3.dot(e,i);return r.Cartesian3.multiplyByScalar(i,o,s),r.Cartesian3.subtract(e,s,a)}static getPropertyIndex(e,i,s){let a=e&&e.property,o=a&&a.times,n=o.length;if(n===0)return{index:0};let h,c=r.Cartesian3,d=a.values,p=r.binarySearch(o,i,r.JulianDate.compare);if(p<0){if(p=~p,p===0){let A=o[p];if(h=a.backwardExtrapolationDuration,a.backwardExtrapolationType===r.ExtrapolationType.NONE||h!==0&&r.JulianDate.secondsDifference(A,i)>h)return{index:p};if(a.backwardExtrapolationType===r.ExtrapolationType.HOLD)return{position:c.unpack(d,0,s),index:p}}if(p>=n){p=n-1;let A=o[p];if(h=a.forwardExtrapolationDuration,a.forwardExtrapolationType===r.ExtrapolationType.NONE||h!==0&&r.JulianDate.secondsDifference(i,A)>h)return{index:p};if(a.forwardExtrapolationType===r.ExtrapolationType.HOLD)return p=n-1,{position:c.unpack(d,p*c.packedLength,s),index:p}}let f=a.xTable,g=a.yTable,u=a.interpolationAlgorithm,m=a.packedInterpolationLength,E=a.inputOrder;if(a.updateTableLength){a.updateTableLength=!1;let A=Math.min(u.getRequiredDataPoints(a.interpolationDegree,E),n);A!==a.numberOfPoints&&(a._numberOfPoints=A,f.length=A,g.length=A*m)}let w=a.numberOfPoints-1;if(w<1)return p=0,{index:p};let P=0,b=n-1;if(b-P+1>=w+1){let A=p-(w/2|0)-1;A<P&&(A=P);let O=A+w;O>b&&(O=b,A=O-w,A<P&&(A=P)),P=A,b=O}let S=b-P+1;for(let A=0;A<S;++A)f[A]=r.JulianDate.secondsDifference(o[P+A],o[j]);if(r.defined(c.convertPackedArrayForInterpolation))c.convertPackedArrayForInterpolation(d,P,b,g);else{let A=0,O=a.packedLength,F=P*O,N=(b+1)*O;for(;F<N;)g[A]=d[F],F++,A++}let R=r.JulianDate.secondsDifference(i,o[b]),B;if(E===0||!r.defined(u.interpolate))B=u.interpolateOrderZero(R,f,g,m,a.interpolationResult);else{let A=Math.floor(m/(E+1));B=u.interpolate(R,f,g,A,E,E,a.interpolationResult)}p=P;for(let A=P;A<=b;A++)if(r.JulianDate.compare(i,o[A])<=0){p=A-1;break}return r.defined(c.unpackInterpolationResult)?{position:c.unpackInterpolationResult(B,d,P,b,s),index:p}:{position:c.unpack(B,0,s),index:p}}return{position:c.unpack(d,p*a.packedLength,s),index:p}}},Ie=Fr;var Hr=class l{static degree2dms(e){let i=1;e<0&&(i=-1),e=Math.abs(e);let s=Math.floor(e),a=Math.floor((e-s)*60),o=Math.round((e-s)*3600%60);return o===60&&(a+=1,o=0),a===60&&(s+=1,a=0),s*=i,{degree:s,minute:a,second:o,str:s+"\xB0 "+a+"' "+o+'"'}}static dms2degree(e,i,s){let a=Math.abs(e)+i/60+s/3600;return e<0&&(a*=-1),a}static getCGCS2000EPSGByLng(e,i,s=!0){let a;if(i){let o=parseInt(e/6)+1;if(o<13||o>23)return;s?a=o+4478:a=o+4489}else{let o=parseInt((e-1.5)/3)+1;if(o<25||o>45)return;s?a=o+4488:a=o+4509}return"EPSG:"+a}static getCGCS2000EPSGByX(e){let i=parseInt(e.toString().slice(0,2));return i>=13&&i<=23?"EPSG:"+(i+4478):i>=25&&i<=45?"EPSG:"+(i+4488):void 0}static cartesian2lonlat(e,i){return U.toArray(e,i)}static cartesians2lonlats(e,i){return qe.toArray(e,i)}static cartesian2mercator(e){return e?U.fromCartesian(e).toMercator():null}static cartesians2mercators(e){let i=[];for(let s=0;s<e.length;s++){let a=l.cartesian2mercator(e[s]);a&&i.push(a)}return i}static lonlat2cartesian(e,i=0){return!e||e.length<2?null:r.Cartesian3.fromDegrees(e[0],e[1],e[2]||i)}static lonlats2cartesians(e,i){let s=[];for(let a=0;a<e.length;a++){let o=e[a];if(Array.isArray(o[0])){let n=l.lonlats2cartesians(o,i);n&&n.length>0&&s.push(n)}else{let n=l.lonlat2cartesian(o,i);n&&s.push(n)}}return s}static lonlat2mercator(e){return U.fromArray(e).toMercator()}static lonlats2mercators(e){let i=[];for(let s=0;s<e.length;s++){let a=l.lonlat2mercator(e[s]);i.push(a)}return i}static mercator2cartesian(e,i){if(isNaN(e[0])||isNaN(e[1]))return null;let s=U.fromMercator(e);return r.defined(i)&&(s.alt=i),s.toCartesian()}static mercators2cartesians(e,i){let s=[];for(let a=0;a<e.length;a++){let o=l.mercator2cartesian(e[a],i);o&&s.push(o)}return s}static mercator2lonlat(e){return U.fromMercator(e).toArray()}static mercators2lonlats(e){let i=[];for(let s=0;s<e.length;s++){let a=l.mercator2lonlat(e[s]);i.push(a)}return i}static bd2gcj(e){let i=Number(e[0]),s=Number(e[1]),a=i-.0065,o=s-.006,n=Math.sqrt(a*a+o*o)-2e-5*Math.sin(o*52.35987755982988),h=Math.atan2(o,a)-3e-6*Math.cos(a*52.35987755982988),c=n*Math.cos(h),d=n*Math.sin(h);return c=Number(c.toFixed(6)),d=Number(d.toFixed(6)),[c,d]}static gcj2bd(e){let i=Number(e[0]),s=Number(e[1]),a=Math.sqrt(i*i+s*s)+2e-5*Math.sin(s*52.35987755982988),o=Math.atan2(s,i)+3e-6*Math.cos(i*52.35987755982988),n=a*Math.cos(o)+.0065,h=a*Math.sin(o)+.006;return n=Number(n.toFixed(6)),h=Number(h.toFixed(6)),[n,h]}static wgs2gcj(e){let i=Number(e[0]),s=Number(e[1]);if(l.out_of_china(i,s))return[i,s];{let a=l.transformlat(i-105,s-35),o=l.transformlng(i-105,s-35),n=s/180*Math.PI,h=Math.sin(n);h=1-.00669342162296594*h*h;let c=Math.sqrt(h);a=a*180/(6335552717000426e-9/(h*c)*Math.PI),o=o*180/(6378245/c*Math.cos(n)*Math.PI);let d=s+a,p=i+o;return p=Number(p.toFixed(6)),d=Number(d.toFixed(6)),[p,d]}}static transformlat(e,i){let s=-100+2*e+3*i+.2*i*i+.1*e*i+.2*Math.sqrt(Math.abs(e));return s+=(20*Math.sin(6*e*Math.PI)+20*Math.sin(2*e*Math.PI))*2/3,s+=(20*Math.sin(i*Math.PI)+40*Math.sin(i/3*Math.PI))*2/3,s+=(160*Math.sin(i/12*Math.PI)+320*Math.sin(i*Math.PI/30))*2/3,s}static transformlng(e,i){let s=300+e+2*i+.1*e*e+.1*e*i+.1*Math.sqrt(Math.abs(e));return s+=(20*Math.sin(6*e*Math.PI)+20*Math.sin(2*e*Math.PI))*2/3,s+=(20*Math.sin(e*Math.PI)+40*Math.sin(e/3*Math.PI))*2/3,s+=(150*Math.sin(e/12*Math.PI)+300*Math.sin(e/30*Math.PI))*2/3,s}static out_of_china(e,i){return e<72.004||e>137.8347||i<.8293||i>55.8271||!1}static gcj2wgs(e){let i=Number(e[0]),s=Number(e[1]);if(l.out_of_china(i,s))return[i,s];{let a=l.transformlat(i-105,s-35),o=l.transformlng(i-105,s-35),n=s/180*Math.PI,h=Math.sin(n);h=1-.00669342162296594*h*h;let c=Math.sqrt(h);a=a*180/(6335552717000426e-9/(h*c)*Math.PI),o=o*180/(6378245/c*Math.cos(n)*Math.PI);let d=i*2-(i+o),p=s*2-(s+a);return d=Number(d.toFixed(6)),p=Number(p.toFixed(6)),[d,p]}}static bd2wgs(e){return l.gcj2wgs(l.bd2gcj(e))}static wgs2bd(e){return l.gcj2bd(l.wgs2gcj(e))}},xt=Hr;var Wr=class{static getViewPosition(e,i){e=v.parsePosition(e);let s=r.Math.toRadians(e.heading),a=r.Math.toRadians(e.pitch),o=a>=0?i*Math.sin(a):-1*i*Math.sin(Math.abs(a)),n=i*Math.cos(a),h,c;s<=Math.PI/2?(h=n*Math.sin(s),c=n*Math.cos(s)):s>Math.PI/2&&s<Math.PI?(h=n*Math.cos(s-Math.PI/2),c=-1*n*Math.sin(s-Math.PI/2)):s>Math.PI&&s<Math.PI*3/2?(h=-1*n*Math.sin(s-Math.PI),c=-1*n*Math.cos(s-Math.PI)):(h=-1*n*Math.sin(Math.PI*2-s),c=n*Math.cos(Math.PI*2-s));let d=r.Cartesian3.fromDegrees(e.lng,e.lat,e.alt),p=Math.sin(r.Math.toRadians(e.lng)),f=Math.cos(r.Math.toRadians(e.lng)),g=Math.sin(r.Math.toRadians(e.lat)),u=Math.cos(r.Math.toRadians(e.lat)),m=u*o-g*c;return new r.Cartesian3(d.x+(f*m-p*h),d.y+(p*m+f*h),d.z+(g*o+u*c))}static getCameraOrientation(e){let i=new r.Matrix3;return r.Matrix3.setColumn(i,0,r.Cartesian3.negate(e.rightWC,new r.Cartesian3),i),r.Matrix3.setColumn(i,1,e.upWC,i),r.Matrix3.setColumn(i,2,e.directionWC,i),r.Quaternion.fromRotationMatrix(i,new r.Quaternion)}static setCamera(e,i,s,a){e.position=i,e.direction=r.Cartesian3.normalize(r.Cartesian3.subtract(s,i,new r.Cartesian3),new r.Cartesian3);let o=new r.Matrix3;r.Matrix3.fromRotationY(-r.Math.toRadians(a)/2,o);let n=new r.Cartesian3;r.Matrix3.multiplyByVector(o,i,n),r.Cartesian3.normalize(n,n),e.up=n}},oe=Wr;var Br=class{constructor(e){this._viewer=e,this._options={}}_setViewerOption(){var e,i,s;return this._viewer.delegate.shadows=(i=(e=this._options)==null?void 0:e.shadows)!=null?i:!1,this._viewer.delegate.resolutionScale=((s=this._options)==null?void 0:s.resolutionScale)||1,this}_setCanvasOption(){return this._options.tabIndex&&this._viewer.scene.canvas.setAttribute("tabIndex",this._options.tabIndex),this}_setSceneOption(){var i,s,a,o;let e=this._viewer.scene;return e.skyAtmosphere.show=(i=this._options.showAtmosphere)!=null?i:!0,e.sun.show=(s=this._options.showSun)!=null?s:!0,e.moon.show=(a=this._options.showMoon)!=null?a:!0,e.postProcessStages.fxaa.enabled=(o=this._options.enableFxaa)!=null?o:!1,e.msaaSupported&&(e.msaaSamples=+this._options.msaaSamples||1),this}_setSkyBoxOption(){var i;if(!this._options.skyBox)return this;let e=this._options.skyBox;if(e instanceof r.SkyBox)this._viewer.scene.skyBox=e;else{let s=this._viewer.scene.skyBox;s.show=(i=e.show)!=null?i:!0,e.offsetAngle&&(s.offsetAngle=e.offsetAngle),e!=null&&e.sources&&(s.sources=e.sources)}return this}_setGlobeOption(){var s,a,o,n,h,c,d,p,f,g,u,m;if(!this._options.globe)return this;let e=this._viewer.scene.globe,i=this._options.globe;if(T.merge(e,{show:(s=i==null?void 0:i.show)!=null?s:!0,showGroundAtmosphere:(a=i==null?void 0:i.showGroundAtmosphere)!=null?a:!0,enableLighting:(o=i==null?void 0:i.enableLighting)!=null?o:!1,depthTestAgainstTerrain:(n=i==null?void 0:i.depthTestAgainstTerrain)!=null?n:!1,tileCacheSize:+(i==null?void 0:i.tileCacheSize)||100,preloadSiblings:(h=i==null?void 0:i.preloadSiblings)!=null?h:!1,showSkirts:(c=i==null?void 0:i.showSkirts)!=null?c:!0,baseColor:(i==null?void 0:i.baseColor)||new r.Color(0,0,.5,1),terrainExaggeration:(i==null?void 0:i.terrainExaggeration)||1,terrainExaggerationRelativeHeight:(i==null?void 0:i.terrainExaggerationRelativeHeight)||0}),T.merge(e.translucency,{enabled:(p=(d=i==null?void 0:i.translucency)==null?void 0:d.enabled)!=null?p:!1,backFaceAlpha:+((f=i==null?void 0:i.translucency)==null?void 0:f.backFaceAlpha)||1,backFaceAlphaByDistance:(g=i==null?void 0:i.translucency)==null?void 0:g.backFaceAlphaByDistance,frontFaceAlpha:+((u=i==null?void 0:i.translucency)==null?void 0:u.frontFaceAlpha)||1,frontFaceAlphaByDistance:(m=i==null?void 0:i.translucency)==null?void 0:m.frontFaceAlphaByDistance}),i!=null&&i.filterColor){let E=this._viewer.scene.globe._surfaceShaderSet.baseFragmentShaderSource,w=E.sources.pop();E.sources.push(w.replace("out_FragColor = finalColor;",`out_FragColor = finalColor * vec4${i.filterColor.toString()};`))}return this}_setCameraController(){var s,a,o,n,h,c,d;if(!((s=this._options)!=null&&s.cameraController))return this;let e=this._viewer.scene.screenSpaceCameraController,i=this._options.cameraController;return T.merge(e,{enableInputs:(a=i==null?void 0:i.enableInputs)!=null?a:!0,enableRotate:(o=i==null?void 0:i.enableRotate)!=null?o:!0,enableTilt:(n=i==null?void 0:i.enableTilt)!=null?n:!0,enableTranslate:(h=i==null?void 0:i.enableTranslate)!=null?h:!0,enableZoom:(c=i==null?void 0:i.enableZoom)!=null?c:!0,enableCollisionDetection:(d=i==null?void 0:i.enableCollisionDetection)!=null?d:!0,minimumZoomDistance:+(i==null?void 0:i.minimumZoomDistance)||1,maximumZoomDistance:+(i==null?void 0:i.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)}},Ur=Br;var Vr=class{constructor(e){this._viewer=e,this._mouseMode=ge.LEFT_RIGHT}setPitchRange(e,i){let s=new r.ScreenSpaceEventHandler(this._viewer.scene.canvas);this._viewer.scene.mode===r.SceneMode.SCENE3D&&(s.setInputAction(a=>{s.setInputAction(o=>{let n=!0,h=o.endPosition.y<o.startPosition.y;h&&this._viewer.camera.pitch>r.Math.toRadians(i)||!h&&this._viewer.camera.pitch<r.Math.toRadians(e)?n=!1:n=!0,this._viewer.scene.screenSpaceCameraController.enableTilt=n},r.ScreenSpaceEventType.MOUSE_MOVE)},this._mouseMode===ge.LEFT_MIDDLE?r.ScreenSpaceEventType.MIDDLE_DOWN:r.ScreenSpaceEventType.RIGHT_DOWN),s.setInputAction(a=>{this._viewer.scene.screenSpaceCameraController.enableTilt=!0,s.removeInputAction(r.ScreenSpaceEventType.MOUSE_MOVE)},this._mouseMode===ge.LEFT_MIDDLE?r.ScreenSpaceEventType.MIDDLE_UP:r.ScreenSpaceEventType.RIGHT_UP))}changeMouseMode(e){this._mouseMode=e||ge.LEFT_RIGHT,e===ge.LEFT_MIDDLE?(console.log("\u5207\u6362\u9F20\u6807\u6A21\u5F0F\u4E3A\uFF1A\u5DE6\u952E+\u4E2D\u952E"),this._viewer.scene.screenSpaceCameraController.tiltEventTypes=[r.CameraEventType.MIDDLE_DRAG,r.CameraEventType.PINCH,{eventType:r.CameraEventType.LEFT_DRAG,modifier:r.KeyboardEventModifier.CTRL},{eventType:r.CameraEventType.RIGHT_DRAG,modifier:r.KeyboardEventModifier.CTRL}],this._viewer.scene.screenSpaceCameraController.zoomEventTypes=[r.CameraEventType.RIGHT_DRAG,r.CameraEventType.WHEEL,r.CameraEventType.PINCH]):e===ge.LEFT_RIGHT&&(console.log("\u5207\u6362\u9F20\u6807\u6A21\u5F0F\u4E3A\uFF1A\u5DE6\u952E+\u53F3\u952E"),this._viewer.scene.screenSpaceCameraController.tiltEventTypes=[r.CameraEventType.RIGHT_DRAG,r.CameraEventType.PINCH,{eventType:r.CameraEventType.LEFT_DRAG,modifier:r.KeyboardEventModifier.CTRL},{eventType:r.CameraEventType.RIGHT_DRAG,modifier:r.KeyboardEventModifier.CTRL}],this._viewer.scene.screenSpaceCameraController.zoomEventTypes=[r.CameraEventType.WHEEL,r.CameraEventType.PINCH,{eventType:r.CameraEventType.RIGHT_DRAG,modifier:r.KeyboardEventModifier.CTRL}])}},Zr=Vr;/**
16303
+ */var Xu={LEFT_RIGHT:0,LEFT_MIDDLE:1},ge=Xu;var Ju="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),Rr=class{static uuid(e="D"){let i=[];i[8]=i[13]=i[18]=i[23]="-",i[14]="4";let s;for(let a=0;a<36;a++)i[a]||(s=0|Math.random()*16,i[a]=Ju[a===19?s&3|8:s]);return e+"-"+i.join("")}static merge(e,...i){let s,a,o,n;for(a=0,o=i.length;a<o;a++){n=i[a];for(s in n)e[s]=n[s]}return e}static splitWords(e){return this.trim(e).split(/\s+/)}static setOptions(e,i){e.hasOwnProperty("options")||(e.options=e.options?Object.create(e.options):{});for(let s in i)e.options[s]=i[s];return e.options}static formatNum(e,i){let s=Math.pow(10,i===void 0?6:i);return Math.round(e*s)/s}static trim(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}static getStrLength(e){}static template(e,i,s=!1){return!e||typeof e!="string"?"":e.replace(/\{([^{}]+)\}/g,(a,o)=>{let n=o.trim();return i&&typeof i=="object"&&i.hasOwnProperty(n)?i[n]:s?"":a})}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,i){let s=null;return function(){s&&clearTimeout(s),s=setTimeout(e,i)}}static throttle(e,i){let s=!0;return function(){if(!s)return!1;s=!1,setTimeout(()=>{e(),s=!0},i)}}static dataURLtoBlob(e){let i=e.split(","),s=i[0].match(/:(.*?);/)[1],a=atob(i[1]),o=a.length,n=new Uint8Array(o);for(;o--;)n[o]=a.charCodeAt(o);return new Blob([n],{type:s})}static isPromise(e){return Promise.resolve(e)===e}},T=Rr;var Or=class{static get(e){return typeof e=="string"?document.getElementById(e):e}static getStyle(e,i){let s=e.style[i]||e.currentStyle&&e.currentStyle[i];if((!s||s==="auto")&&document.defaultView){let a=document.defaultView.getComputedStyle(e,null);s=a?a[i]:null}return s==="auto"?null:s}static create(e,i,s=null){let a=document.createElement(e);return a.className=i||"",s&&s.appendChild(a),a}static remove(e){let i=e.parentNode;i&&i.removeChild(e)}static empty(e){for(;e.firstChild;)e.removeChild(e.firstChild)}static hasClass(e,i){if(e.classList!==void 0)return e.classList.contains(i);let s=this.getClass(e);return s.length>0&&new RegExp("(^|\\s)"+i+"(\\s|$)").test(s)}static addClass(e,i){if(e.classList!==void 0){let s=T.splitWords(i);for(let a=0,o=s.length;a<o;a++)e.classList.add(s[a])}else if(!this.hasClass(e,i)){let s=this.getClass(e);this.setClass(e,(s?s+" ":"")+i)}}static removeClass(e,i){e.classList!==void 0?e.classList.remove(i):this.setClass(e,T.trim((" "+this.getClass(e)+" ").replace(" "+i+" "," ")))}static setClass(e,i){e.className.baseVal===void 0?e.className=i:e.className.baseVal=i}static getClass(e){return e.correspondingElement&&(e=e.correspondingElement),e.className.baseVal===void 0?e.className:e.className.baseVal}static createSvg(e,i,s,a){let o=document.createElementNS("http://www.w3.org/2000/svg","svg:svg");o.setAttribute("class","svg-path"),o.setAttribute("width",e),o.setAttribute("height",i),o.setAttribute("viewBox",`0 0 ${e} ${i}`);let n=document.createElementNS("http://www.w3.org/2000/svg","path");return n.setAttribute("d",s),o.appendChild(n),a&&a.appendChild(o),o}static parseDom(e,i,s){i=i!=null?i:!1;let a=document.createElement("div");return a.className=s||"",a.innerHTML=e,i?a:a.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,i,s=null){let a=this.create("video",i,s),o=this.create("source","",a);o.setAttribute("src",e),o.setAttribute("type","video/map4");let n=this.create("source","",a);return n.setAttribute("src",e),n.setAttribute("type","video/quicktime"),a}},D=Or;var kr=Math.PI*2,Qt=100,Nr=1e-4,zr=class{static distance(e,i){return Math.sqrt(Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2))}static wholeDistance(e){let i=0;for(let s=0;s<e.length-1;s++)i+=this.distance(e[s],e[s+1]);return i}static getBaseLength(e){return Math.pow(this.wholeDistance(e),.99)}static mid(e,i){return[(e[0]+i[0])/2,(e[1]+i[1])/2]}static getCircleCenterOfThreePoints(e,i,s){let a=[(e[0]+i[0])/2,(e[1]+i[1])/2],o=[a[0]-e[1]+i[1],a[1]+e[0]-i[0]],n=[(e[0]+s[0])/2,(e[1]+s[1])/2],h=[n[0]-e[1]+s[1],n[1]+e[0]-s[0]];return this.getIntersectPoint(a,o,n,h)}static getIntersectPoint(e,i,s,a){let o,n,h,c;return e[1]===i[1]?(h=(a[0]-s[0])/(a[1]-s[1]),o=h*(e[1]-s[1])+s[0],n=e[1],[o,n]):s[1]===a[1]?(c=(i[0]-e[0])/(i[1]-e[1]),o=c*(s[1]-e[1])+e[0],n=s[1],[o,n]):(c=(i[0]-e[0])/(i[1]-e[1]),h=(a[0]-s[0])/(a[1]-s[1]),n=(c*e[1]-e[0]-h*s[1]+s[0])/(c-h),o=c*n-c*e[1]+e[0],[o,n])}static getAzimuth(e,i){let s,a=Math.asin(Math.abs(i[1]-e[1])/this.distance(e,i));return i[1]>=e[1]&&i[0]>=e[0]?s=a+Math.PI:i[1]>=e[1]&&i[0]<e[0]?s=kr-a:i[1]<e[1]&&i[0]<e[0]?s=a:i[1]<e[1]&&i[0]>=e[0]&&(s=Math.PI-a),s}static getAngleOfThreePoints(e,i,s){let a=this.getAzimuth(i,e)-this.getAzimuth(i,s);return a<0?a+kr:a}static isClockWise(e,i,s){return(s[1]-e[1])*(i[0]-e[0])>(i[1]-e[1])*(s[0]-e[0])}static getPointOnLine(e,i,s){let a=i[0]+e*(s[0]-i[0]),o=i[1]+e*(s[1]-i[1]);return[a,o]}static getCubicValue(e,i,s,a,o){e=Math.max(Math.min(e,1),0);let n=1-e,h=e*e,c=h*e,d=n*n,p=d*n,f=p*i[0]+3*d*e*s[0]+3*n*h*a[0]+c*o[0],g=p*i[1]+3*d*e*s[1]+3*n*h*a[1]+c*o[1];return[f,g]}static getThirdPoint(e,i,s,a,o){let n=this.getAzimuth(e,i),h=o?n+s:n-s,c=a*Math.cos(h),d=a*Math.sin(h);return[i[0]+c,i[1]+d]}static getArcPoints(e,i,s,a){let o,n,h=[],c=a-s;c=c<0?c+kr:c;for(let d=0;d<=Qt;d++){let p=s+c*d/Qt;o=e[0]+i*Math.cos(p),n=e[1]+i*Math.sin(p),h.push([o,n])}return h}static getBisectorNormals(e,i,s,a){let o=this.getNormal(i,s,a),n=Math.sqrt(o[0]*o[0]+o[1]*o[1]),h=o[0]/n,c=o[1]/n,d=this.distance(i,s),p=this.distance(s,a),f,g,u,m,E;return n>Nr?this.isClockWise(i,s,a)?(f=e*d,g=s[0]-f*c,u=s[1]+f*h,E=[g,u],f=e*p,g=s[0]+f*c,u=s[1]-f*h,m=[g,u]):(f=e*d,g=s[0]+f*c,u=s[1]-f*h,E=[g,u],f=e*p,g=s[0]-f*c,u=s[1]+f*h,m=[g,u]):(g=s[0]+e*(i[0]-s[0]),u=s[1]+e*(i[1]-s[1]),E=[g,u],g=s[0]+e*(a[0]-s[0]),u=s[1]+e*(a[1]-s[1]),m=[g,u]),[E,m]}static getNormal(e,i,s){let a=e[0]-i[0],o=e[1]-i[1],n=Math.sqrt(a*a+o*o);a/=n,o/=n;let h=s[0]-i[0],c=s[1]-i[1],d=Math.sqrt(h*h+c*c);h/=d,c/=d;let p=a+h,f=o+c;return[p,f]}static getCurvePoints(e,i){let a=[this.getLeftMostControlPoint(e,i)],o,n,h,c;for(let f=0;f<i.length-2;f++)o=i[f],n=i[f+1],h=i[f+2],c=this.getBisectorNormals(e,o,n,h),a=a.concat(c);let d=this.getRightMostControlPoint(e,i);a.push(d);let p=[];for(let f=0;f<i.length-1;f++){o=i[f],n=i[f+1],p.push(o);for(let g=0;g<Qt;g++){let u=this.getCubicValue(g/Qt,o,a[f*2],a[f*2+1],n);p.push(u)}p.push(n)}return p}static getLeftMostControlPoint(e,i){let s=i[0],a=i[1],o=i[2],h=this.getBisectorNormals(0,s,a,o)[0],c=this.getNormal(s,a,o),d=Math.sqrt(c[0]*c[0]+c[1]*c[1]),p,f;if(d>Nr){let g=this.mid(s,a),u=s[0]-g[0],m=s[1]-g[1],w=2/this.distance(s,a),P=-w*m,b=w*u,L=P*P-b*b,S=2*P*b,R=b*b-P*P,B=h[0]-g[0],A=h[1]-g[1];p=g[0]+L*B+S*A,f=g[1]+S*B+R*A}else p=s[0]+e*(a[0]-s[0]),f=s[1]+e*(a[1]-s[1]);return[p,f]}static getRightMostControlPoint(e,i){let s=i.length,a=i[s-3],o=i[s-2],n=i[s-1],c=this.getBisectorNormals(0,a,o,n)[1],d=this.getNormal(a,o,n),p=Math.sqrt(d[0]*d[0]+d[1]*d[1]),f,g;if(p>Nr){let u=this.mid(o,n),m=n[0]-u[0],E=n[1]-u[1],P=2/this.distance(o,n),b=-P*E,L=P*m,S=b*b-L*L,R=2*b*L,B=L*L-b*b,A=c[0]-u[0],O=c[1]-u[1];f=u[0]+S*A+R*O,g=u[1]+R*A+B*O}else f=n[0]+e*(o[0]-n[0]),g=n[1]+e*(o[1]-n[1]);return[f,g]}static getBezierPoints(e){if(e.length<=2)return e;let i=[],s=e.length-1;for(let a=0;a<=1;a+=.01){let o=0,n=0;for(let h=0;h<=s;h++){let c=this.getBinomialFactor(s,h),d=Math.pow(a,h),p=Math.pow(1-a,s-h);o+=c*d*p*e[h][0],n+=c*d*p*e[h][1]}i.push([o,n])}return i.push(e[s]),i}static getBinomialFactor(e,i){return this.getFactorial(e)/(this.getFactorial(i)*this.getFactorial(e-i))}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 i=1;for(let s=1;s<=e;s++)i*=s;return i}static getQBSplinePoints(e){if(e.length<=2)return e;let i=2,s=[],a=e.length-i-1;s.push(e[0]);for(let o=0;o<=a;o++)for(let n=0;n<=1;n+=.05){let h=0,c=0;for(let d=0;d<=i;d++){let p=this.getQuadricBSplineFactor(d,n);h+=p*e[o+d][0],c+=p*e[o+d][1]}s.push([h,c])}return s.push(e[e.length-1]),s}static getQuadricBSplineFactor(e,i){return e===0?Math.pow(i-1,2)/2:e===1?(-2*Math.pow(i,2)+2*i+1)/2:e===2?Math.pow(i,2)/2:0}},C=zr;var Qu=!0;function Kt(...l){console.warn(...l)}function Ye(...l){Qu&&console.error(...l)}var Fr=class l{static getTransFun(e,i){if(!e||!i||(e=l.crsName2FunName(e),i=l.crsName2FunName(i),i===e))return!1;let s=e+"2"+i;return xt[s]?xt[s]:!1}static crsName2FunName(e){switch(e){case"GCJ02":return"gcj";case"BD09":return"bd";case"WGS84":default:return"wgs"}}static getPositionValue(e,i=r.JulianDate.now()){if(!e)return e;let s;return e instanceof r.Cartesian3?s=e:e._value&&e._value instanceof r.Cartesian3?s=e._value:typeof e.getValue=="function"&&(s=e.getValue(i||r.JulianDate.now())),s}static getMaxHeight(e,i=0){if(e==null||e.length===0)return i;for(let s=0;s<e.length;s++){let a=U.parse(e[s]);s===0&&(i=a.alt),a.alt>i&&(i=a.alt)}return T.formatNum(i,U.FormatAltLength)}static getMinHeight(e,i=0){if(e==null||e.length===0)return i;for(let s=0;s<e.length;s++){let a=r.Cartographic.fromCartesian(e[s]);(s===0||a.height<i)&&(i=a.height)}return T.formatNum(i,U.FormatAltLength)}static addPositionsHeight(e,i=0){if(i=Number(i),isNaN(i)||i===0)return e;if(Array.isArray(e)){let s=[];for(let a=0;a<e.length;a++){let o=r.Cartographic.fromCartesian(e[a]),n=r.Cartesian3.fromRadians(o.longitude,o.latitude,o.height+i);s.push(n)}return s}else{let s=r.Cartographic.fromCartesian(e);return r.Cartesian3.fromRadians(s.longitude,s.latitude,s.height+i)}}static setPositionsHeight(e,i=0){if(!e)return e;if(Array.isArray(e)){let s=[];for(let a=0;a<e.length;a++){let o=r.Cartographic.fromCartesian(e[a]),n=r.Cartesian3.fromRadians(o.longitude,o.latitude,i);s.push(n)}return s}else{let s=r.Cartographic.fromCartesian(e);return r.Cartesian3.fromRadians(s.longitude,s.latitude,i)}}static getHeight(e,i,s={}){var n;let a=U.toCartographic(i),o;if(e.getHeight?o=e.getHeight(a,s?s.heightReference:0):o=e.globe.getHeight(a),r.defined(o)&&o>((n=s?s.min:0)!=null?n:-999))return o;if(s&&s.original)return a.height}static pick3DTileset(e,i){if(!i)return null;i instanceof r.Cartesian3&&(i=[i]);for(let s=0,a=i.length;s<a;++s){let o=i[s],n=r.SceneTransforms.worldToWindowCoordinates(e,o);if(!r.defined(n))continue;let h=e.pick(n,10,10);if(r.defined(h)&&r.defined(h.primitive)&&h.primitive instanceof r.Cesium3DTileset)return h.primitive}return null}static getSurfaceHeight(e,i,s={}){return s.scene=e,s.position=i,new Ct(s).start()}static getSurfaceTerrainHeight(e,i){let s={scene:e,position:i,has3dtiles:!1};return new Ct(s).start()}static getSurfacePosition(e,i,s={}){var n;if(!i)return i;let a=U.toCartographic(i),o=l.getHeight(e,a,s);return!r.defined(o)||((n=s.greater)==null||n)&&o<a.height?i:(r.defined(s.maxHeight)&&(o=Math.min(o,s.maxHeight)),(s.heightReference===r.HeightReference.RELATIVE_TO_GROUND||s.heightReference===r.HeightReference.RELATIVE_TO_TERRAIN||s.heightReference===r.HeightReference.RELATIVE_TO_3D_TILE)&&(a.height+=o),r.Cartesian3.fromRadians(a.longitude,a.latitude,o))}static getCurrentMousePosition(e,i,s){let a;if(e.onlyVertexPosition){if(!e.vertexAdsorption)return e.vertexAdsorption=new VertexAdsorption(e),a=e.vertexAdsorption.pick(i,16,16),a}else e.vertexAdsorption&&e.vertexAdsorption.clear();let o;try{o=e.pick(i,5,5)}catch(n){Kt("getCurrentMousePosition: scene.pick \u62FE\u53D6\u65F6\u5F02\u5E38",n)}if(e.resultSupported&&!e.onlyPickTerrainPosition&&r.defined(o)){let n=l.hasPickedModel(o,s);if(n){if((n.billboard||n.point||n.label)&&!n.ellipse&&!n.model&&!n.ellipsoid)return l.getPositionValue(n.position);if(n.show){if(n.show=!1,e.requestRender(),a=l.getCurrentMousePosition(e,i,s),n.show=!0,a)return a;if(a=l._geetTargetMousePosition(e,i,o),r.defined(a))return a}if(!e.globe.show&&(a=l._geetTargetMousePosition(e,i,o),r.defined(a)))return a}else{if(r.defined(o.id)){let h=o.id;if((h.billboard||h.point||h.label)&&!h.ellipse&&!h.model&&!h.ellipsoid)return l.getPositionValue(h.position)}if(a=l._geetTargetMousePosition(e,i,o),r.defined(a))return a}}if(!e.onlyPickTerrainPosition&&e.onlyPickModelPosition)return a;if(e.mode===r.SceneMode.SCENE3D){let n=e.camera.getPickRay(i);a=e.globe.pick(n,e),!a&&(a=e.camera.pickEllipsoid(i,e.globe.ellipsoid))}else a=e.camera.pickEllipsoid(i,e.globe.ellipsoid);return r.defined(a)&&e.camera.positionCartographic.height<1e4&&r.Cartographic.fromCartesian(a).height<-5e3?null:a}static _geetTargetMousePosition(e,i,s){let a=e.result(i);if(r.defined(a)){let o=r.Cartographic.fromCartesian(a);if(o.height>=0||!r.defined(s?s.id:0)&&o.height>=-5e3)return a}}static hasPickedModel(e,i){if(r.defined(e.id)){let s=e.id;if(s._noMousePick||i&&s===i)return s}if(r.defined(e.primitive)){let s=e.primitive;if(s._noMousePick||i&&s===i)return s}if(r.defined(e.tileset)){let s=e.tileset;if(s._noMousePick||i&&s===i)return s}return null}static getCurrentMouseTerrainPosition(e,i){let s;if(e.mode===r.SceneMode.SCENE3D){let a=e.camera.getPickRay(i);s=e.globe.pick(a,e),s||(s=e.camera.pickEllipsoid(i,e.globe.ellipsoid))}else s=e.camera.pickEllipsoid(i,e.globe.ellipsoid);return s}static getMidpoint(e,i,s=.5){if(!i||!e)return;let a=U.toCartographic(e),o=U.toCartographic(i),n=(a.height+o.height)/2,h=new r.EllipsoidGeodesic(a,o).interpolateUsingFraction(s);return r.Cartesian3.fromRadians(h.longitude,h.latitude,n)}static isRepeatPoint(e,i){return!i||!e?!1:Math.abs(e.x-i.x)<.1&&Math.abs(e.y-i.y)<.1&&Math.abs(e.z-i.z)<.1}static getRotateCenterPoint(e,i,s){let a=r.Cartographic.fromCartesian(e);a.height=0;let o=r.Cartographic.toCartesian(a),n=r.Cartesian3.subtract(o,e,new r.Cartesian3);n=r.Cartesian3.normalize(n,new r.Cartesian3);let h=r.Quaternion.fromAxisAngle(n,r.Math.toRadians(s)),c=r.Matrix3.fromQuaternion(h),d=r.Matrix4.fromRotationTranslation(c),p=r.Cartesian3.subtract(i,e,new r.Cartesian3),f=r.Matrix4.multiplyByPoint(d,p,new r.Cartesian3);return r.Cartesian3.add(f,e,new r.Cartesian3)}static getOnLinePointByLen(e,i,s,a){let o=r.Transforms.eastNorthUpToFixedFrame(e),n=r.Matrix4.inverse(o,new r.Matrix4);e=r.Matrix4.multiplyByPoint(n,e,new r.Cartesian3),i=r.Matrix4.multiplyByPoint(n,i,new r.Cartesian3);let h=r.Cartesian3.subtract(i,e,new r.Cartesian3),c=r.Cartesian3.distance(e,i),d=s/c;a&&(d+=1);let p=r.Cartesian3.multiplyByScalar(h,d,new r.Cartesian3);return r.Matrix4.multiplyByPoint(o,p,new r.Cartesian3)}static getPositionByHprAndOffset(e,i,s,a,o){e=U.toCartesian(e),!s&&(s=new r.HeadingPitchRoll);let n=r.Transforms.headingPitchRollQuaternion(e,s,a,o),h=r.Matrix4.fromRotationTranslation(r.Matrix3.fromQuaternion(n,new r.Matrix3),e,new r.Matrix4);return r.Matrix4.multiplyByPoint(h,i,new r.Cartesian3)}static getPositionByDirectionAndLen(e,i,s){e=U.toCartesian(e);let a=r.Transforms.eastNorthUpToFixedFrame(e),o=r.Matrix3.fromRotationZ(r.Math.toRadians(360-(i||0))),n=r.Matrix4.fromRotationTranslation(o);return r.Matrix4.multiply(a,n,a),r.Matrix4.multiplyByPoint(a,new r.Cartesian3(s,0,0),new r.Cartesian3)}static getPositionByHprAndLen(e,i,s){e=U.toCartesian(e);let a=r.Transforms.headingPitchRollQuaternion(e,i),o=r.Matrix4.fromRotationTranslation(r.Matrix3.fromQuaternion(a,new r.Matrix3),e,new r.Matrix4);return r.Matrix4.multiplyByPoint(o,new r.Cartesian3(0,0,-s),new r.Cartesian3)}static getRayEarthPosition(e,i,s,a,o){if(!e||!i)return;i instanceof r.HeadingPitchRoll&&(i=r.Transforms.headingPitchRollQuaternion(e,i,a,o));let n=r.Matrix4.fromRotationTranslation(r.Matrix3.fromQuaternion(i,new r.Matrix3),e,new r.Matrix4);return l.getRayEarthPositionByMatrix(n,s,a)}static getRayEarthPositionByMatrix(e,i,s){let a=new r.Cartesian3,o=new r.Ray;r.Matrix4.multiplyByPoint(e,r.Cartesian3.ZERO,a),a.clone(o.origin);let n=new r.Cartesian3(0,0,i?-100:100);return l.extend2Earth(n,e,o,s)}extend2Earth(e,i,s,a){a=a||r.Ellipsoid.WGS84;let o=r.Matrix4.multiplyByPoint(i,e,new r.Cartesian3);r.Cartesian3.subtract(o,s.origin,s.direction),r.Cartesian3.normalize(s.direction,s.direction);let n=r.IntersectionTests.rayEllipsoid(s,a);if(!n)return;let h=n.start>0?n.start:n.stop,c=r.Ray.getPoint(s,h,new r.Cartesian3);if(c)try{r.Cartographic.fromCartesian(c,null,new r.Cartographic)}catch{return}return c}static getHeadingPitchRollByOrientation(e,i,s,a){if(!r.defined(i)||!r.defined(e))return new r.HeadingPitchRoll;let o=r.Matrix4.fromRotationTranslation(r.Matrix3.fromQuaternion(i,new r.Matrix3),e,new r.Matrix4);return l.getHeadingPitchRollByMatrix(o,s,a)}static getHeadingPitchRollByMatrix(e,i,s,a){return r.Transforms.fixedFrameToHeadingPitchRoll(e,i,s,a)}static getHeadingPitchRollForLine(e,i,s){e=U.toCartesian(e),i=U.toCartesian(i);let a=r.Ellipsoid.WGS84,o=new r.Cartesian3,n=new r.Matrix4,h=new r.Matrix3,c=r.Cartesian3.normalize(r.Cartesian3.subtract(i,e,o),o);r.Transforms.rotationMatrixFromPositionVelocity(e,c,a,h);let d=r.Matrix4.fromRotationTranslation(h,e,n);return s?r.Matrix4.multiplyTransformation(d,r.Axis.Z_UP_TO_X_UP,d):r.Matrix4.multiplyTransformation(d,r.Axis.X_UP_TO_Z_UP,d),r.Transforms.fixedFrameToHeadingPitchRoll(d,a)}static getReflectVector(e,i){let s=i.clone(),a=e.clone(),o=2*r.Cartesian3.dot(e,i);return r.Cartesian3.multiplyByScalar(i,o,s),r.Cartesian3.subtract(e,s,a)}static getPropertyIndex(e,i,s){let a=e&&e.property,o=a&&a.times,n=o.length;if(n===0)return{index:0};let h,c=r.Cartesian3,d=a.values,p=r.binarySearch(o,i,r.JulianDate.compare);if(p<0){if(p=~p,p===0){let A=o[p];if(h=a.backwardExtrapolationDuration,a.backwardExtrapolationType===r.ExtrapolationType.NONE||h!==0&&r.JulianDate.secondsDifference(A,i)>h)return{index:p};if(a.backwardExtrapolationType===r.ExtrapolationType.HOLD)return{position:c.unpack(d,0,s),index:p}}if(p>=n){p=n-1;let A=o[p];if(h=a.forwardExtrapolationDuration,a.forwardExtrapolationType===r.ExtrapolationType.NONE||h!==0&&r.JulianDate.secondsDifference(i,A)>h)return{index:p};if(a.forwardExtrapolationType===r.ExtrapolationType.HOLD)return p=n-1,{position:c.unpack(d,p*c.packedLength,s),index:p}}let f=a.xTable,g=a.yTable,u=a.interpolationAlgorithm,m=a.packedInterpolationLength,E=a.inputOrder;if(a.updateTableLength){a.updateTableLength=!1;let A=Math.min(u.getRequiredDataPoints(a.interpolationDegree,E),n);A!==a.numberOfPoints&&(a._numberOfPoints=A,f.length=A,g.length=A*m)}let w=a.numberOfPoints-1;if(w<1)return p=0,{index:p};let P=0,b=n-1;if(b-P+1>=w+1){let A=p-(w/2|0)-1;A<P&&(A=P);let O=A+w;O>b&&(O=b,A=O-w,A<P&&(A=P)),P=A,b=O}let S=b-P+1;for(let A=0;A<S;++A)f[A]=r.JulianDate.secondsDifference(o[P+A],o[j]);if(r.defined(c.convertPackedArrayForInterpolation))c.convertPackedArrayForInterpolation(d,P,b,g);else{let A=0,O=a.packedLength,F=P*O,N=(b+1)*O;for(;F<N;)g[A]=d[F],F++,A++}let R=r.JulianDate.secondsDifference(i,o[b]),B;if(E===0||!r.defined(u.interpolate))B=u.interpolateOrderZero(R,f,g,m,a.interpolationResult);else{let A=Math.floor(m/(E+1));B=u.interpolate(R,f,g,A,E,E,a.interpolationResult)}p=P;for(let A=P;A<=b;A++)if(r.JulianDate.compare(i,o[A])<=0){p=A-1;break}return r.defined(c.unpackInterpolationResult)?{position:c.unpackInterpolationResult(B,d,P,b,s),index:p}:{position:c.unpack(B,0,s),index:p}}return{position:c.unpack(d,p*a.packedLength,s),index:p}}},Ie=Fr;var Hr=class l{static degree2dms(e){let i=1;e<0&&(i=-1),e=Math.abs(e);let s=Math.floor(e),a=Math.floor((e-s)*60),o=Math.round((e-s)*3600%60);return o===60&&(a+=1,o=0),a===60&&(s+=1,a=0),s*=i,{degree:s,minute:a,second:o,str:s+"\xB0 "+a+"' "+o+'"'}}static dms2degree(e,i,s){let a=Math.abs(e)+i/60+s/3600;return e<0&&(a*=-1),a}static getCGCS2000EPSGByLng(e,i,s=!0){let a;if(i){let o=parseInt(e/6)+1;if(o<13||o>23)return;s?a=o+4478:a=o+4489}else{let o=parseInt((e-1.5)/3)+1;if(o<25||o>45)return;s?a=o+4488:a=o+4509}return"EPSG:"+a}static getCGCS2000EPSGByX(e){let i=parseInt(e.toString().slice(0,2));return i>=13&&i<=23?"EPSG:"+(i+4478):i>=25&&i<=45?"EPSG:"+(i+4488):void 0}static cartesian2lonlat(e,i){return U.toArray(e,i)}static cartesians2lonlats(e,i){return qe.toArray(e,i)}static cartesian2mercator(e){return e?U.fromCartesian(e).toMercator():null}static cartesians2mercators(e){let i=[];for(let s=0;s<e.length;s++){let a=l.cartesian2mercator(e[s]);a&&i.push(a)}return i}static lonlat2cartesian(e,i=0){return!e||e.length<2?null:r.Cartesian3.fromDegrees(e[0],e[1],e[2]||i)}static lonlats2cartesians(e,i){let s=[];for(let a=0;a<e.length;a++){let o=e[a];if(Array.isArray(o[0])){let n=l.lonlats2cartesians(o,i);n&&n.length>0&&s.push(n)}else{let n=l.lonlat2cartesian(o,i);n&&s.push(n)}}return s}static lonlat2mercator(e){return U.fromArray(e).toMercator()}static lonlats2mercators(e){let i=[];for(let s=0;s<e.length;s++){let a=l.lonlat2mercator(e[s]);i.push(a)}return i}static mercator2cartesian(e,i){if(isNaN(e[0])||isNaN(e[1]))return null;let s=U.fromMercator(e);return r.defined(i)&&(s.alt=i),s.toCartesian()}static mercators2cartesians(e,i){let s=[];for(let a=0;a<e.length;a++){let o=l.mercator2cartesian(e[a],i);o&&s.push(o)}return s}static mercator2lonlat(e){return U.fromMercator(e).toArray()}static mercators2lonlats(e){let i=[];for(let s=0;s<e.length;s++){let a=l.mercator2lonlat(e[s]);i.push(a)}return i}static bd2gcj(e){let i=Number(e[0]),s=Number(e[1]),a=i-.0065,o=s-.006,n=Math.sqrt(a*a+o*o)-2e-5*Math.sin(o*52.35987755982988),h=Math.atan2(o,a)-3e-6*Math.cos(a*52.35987755982988),c=n*Math.cos(h),d=n*Math.sin(h);return c=Number(c.toFixed(6)),d=Number(d.toFixed(6)),[c,d]}static gcj2bd(e){let i=Number(e[0]),s=Number(e[1]),a=Math.sqrt(i*i+s*s)+2e-5*Math.sin(s*52.35987755982988),o=Math.atan2(s,i)+3e-6*Math.cos(i*52.35987755982988),n=a*Math.cos(o)+.0065,h=a*Math.sin(o)+.006;return n=Number(n.toFixed(6)),h=Number(h.toFixed(6)),[n,h]}static wgs2gcj(e){let i=Number(e[0]),s=Number(e[1]);if(l.out_of_china(i,s))return[i,s];{let a=l.transformlat(i-105,s-35),o=l.transformlng(i-105,s-35),n=s/180*Math.PI,h=Math.sin(n);h=1-.00669342162296594*h*h;let c=Math.sqrt(h);a=a*180/(6335552717000426e-9/(h*c)*Math.PI),o=o*180/(6378245/c*Math.cos(n)*Math.PI);let d=s+a,p=i+o;return p=Number(p.toFixed(6)),d=Number(d.toFixed(6)),[p,d]}}static transformlat(e,i){let s=-100+2*e+3*i+.2*i*i+.1*e*i+.2*Math.sqrt(Math.abs(e));return s+=(20*Math.sin(6*e*Math.PI)+20*Math.sin(2*e*Math.PI))*2/3,s+=(20*Math.sin(i*Math.PI)+40*Math.sin(i/3*Math.PI))*2/3,s+=(160*Math.sin(i/12*Math.PI)+320*Math.sin(i*Math.PI/30))*2/3,s}static transformlng(e,i){let s=300+e+2*i+.1*e*e+.1*e*i+.1*Math.sqrt(Math.abs(e));return s+=(20*Math.sin(6*e*Math.PI)+20*Math.sin(2*e*Math.PI))*2/3,s+=(20*Math.sin(e*Math.PI)+40*Math.sin(e/3*Math.PI))*2/3,s+=(150*Math.sin(e/12*Math.PI)+300*Math.sin(e/30*Math.PI))*2/3,s}static out_of_china(e,i){return e<72.004||e>137.8347||i<.8293||i>55.8271||!1}static gcj2wgs(e){let i=Number(e[0]),s=Number(e[1]);if(l.out_of_china(i,s))return[i,s];{let a=l.transformlat(i-105,s-35),o=l.transformlng(i-105,s-35),n=s/180*Math.PI,h=Math.sin(n);h=1-.00669342162296594*h*h;let c=Math.sqrt(h);a=a*180/(6335552717000426e-9/(h*c)*Math.PI),o=o*180/(6378245/c*Math.cos(n)*Math.PI);let d=i*2-(i+o),p=s*2-(s+a);return d=Number(d.toFixed(6)),p=Number(p.toFixed(6)),[d,p]}}static bd2wgs(e){return l.gcj2wgs(l.bd2gcj(e))}static wgs2bd(e){return l.gcj2bd(l.wgs2gcj(e))}},xt=Hr;var Wr=class{static getViewPosition(e,i){e=v.parsePosition(e);let s=r.Math.toRadians(e.heading),a=r.Math.toRadians(e.pitch),o=a>=0?i*Math.sin(a):-1*i*Math.sin(Math.abs(a)),n=i*Math.cos(a),h,c;s<=Math.PI/2?(h=n*Math.sin(s),c=n*Math.cos(s)):s>Math.PI/2&&s<Math.PI?(h=n*Math.cos(s-Math.PI/2),c=-1*n*Math.sin(s-Math.PI/2)):s>Math.PI&&s<Math.PI*3/2?(h=-1*n*Math.sin(s-Math.PI),c=-1*n*Math.cos(s-Math.PI)):(h=-1*n*Math.sin(Math.PI*2-s),c=n*Math.cos(Math.PI*2-s));let d=r.Cartesian3.fromDegrees(e.lng,e.lat,e.alt),p=Math.sin(r.Math.toRadians(e.lng)),f=Math.cos(r.Math.toRadians(e.lng)),g=Math.sin(r.Math.toRadians(e.lat)),u=Math.cos(r.Math.toRadians(e.lat)),m=u*o-g*c;return new r.Cartesian3(d.x+(f*m-p*h),d.y+(p*m+f*h),d.z+(g*o+u*c))}static getCameraOrientation(e){let i=new r.Matrix3;return r.Matrix3.setColumn(i,0,r.Cartesian3.negate(e.rightWC,new r.Cartesian3),i),r.Matrix3.setColumn(i,1,e.upWC,i),r.Matrix3.setColumn(i,2,e.directionWC,i),r.Quaternion.fromRotationMatrix(i,new r.Quaternion)}static setCamera(e,i,s,a){e.position=i,e.direction=r.Cartesian3.normalize(r.Cartesian3.subtract(s,i,new r.Cartesian3),new r.Cartesian3);let o=new r.Matrix3;r.Matrix3.fromRotationY(-r.Math.toRadians(a)/2,o);let n=new r.Cartesian3;r.Matrix3.multiplyByVector(o,i,n),r.Cartesian3.normalize(n,n),e.up=n}},oe=Wr;var Br=class{constructor(e){this._viewer=e,this._options={}}_setViewerOption(){var e,i,s;return this._viewer.delegate.shadows=(i=(e=this._options)==null?void 0:e.shadows)!=null?i:!1,this._viewer.delegate.resolutionScale=((s=this._options)==null?void 0:s.resolutionScale)||1,this}_setCanvasOption(){return this._options.tabIndex&&this._viewer.scene.canvas.setAttribute("tabIndex",this._options.tabIndex),this}_setSceneOption(){var i,s,a,o;let e=this._viewer.scene;return e.skyAtmosphere.show=(i=this._options.showAtmosphere)!=null?i:!0,e.sun.show=(s=this._options.showSun)!=null?s:!0,e.moon.show=(a=this._options.showMoon)!=null?a:!0,e.postProcessStages.fxaa.enabled=(o=this._options.enableFxaa)!=null?o:!1,e.msaaSupported&&(e.msaaSamples=+this._options.msaaSamples||1),this}_setSkyBoxOption(){var i;if(!this._options.skyBox)return this;let e=this._options.skyBox;if(e instanceof r.SkyBox)this._viewer.scene.skyBox=e;else{let s=this._viewer.scene.skyBox;s.show=(i=e.show)!=null?i:!0,e.offsetAngle&&(s.offsetAngle=e.offsetAngle),e!=null&&e.sources&&(s.sources=e.sources)}return this}_setGlobeOption(){var s,a,o,n,h,c,d,p,f,g,u,m;if(!this._options.globe)return this;let e=this._viewer.scene.globe,i=this._options.globe;if(T.merge(e,{show:(s=i==null?void 0:i.show)!=null?s:!0,showGroundAtmosphere:(a=i==null?void 0:i.showGroundAtmosphere)!=null?a:!0,enableLighting:(o=i==null?void 0:i.enableLighting)!=null?o:!1,depthTestAgainstTerrain:(n=i==null?void 0:i.depthTestAgainstTerrain)!=null?n:!1,tileCacheSize:+(i==null?void 0:i.tileCacheSize)||100,preloadSiblings:(h=i==null?void 0:i.preloadSiblings)!=null?h:!1,showSkirts:(c=i==null?void 0:i.showSkirts)!=null?c:!0,baseColor:(i==null?void 0:i.baseColor)||new r.Color(0,0,.5,1),terrainExaggeration:(i==null?void 0:i.terrainExaggeration)||1,terrainExaggerationRelativeHeight:(i==null?void 0:i.terrainExaggerationRelativeHeight)||0}),T.merge(e.translucency,{enabled:(p=(d=i==null?void 0:i.translucency)==null?void 0:d.enabled)!=null?p:!1,backFaceAlpha:+((f=i==null?void 0:i.translucency)==null?void 0:f.backFaceAlpha)||1,backFaceAlphaByDistance:(g=i==null?void 0:i.translucency)==null?void 0:g.backFaceAlphaByDistance,frontFaceAlpha:+((u=i==null?void 0:i.translucency)==null?void 0:u.frontFaceAlpha)||1,frontFaceAlphaByDistance:(m=i==null?void 0:i.translucency)==null?void 0:m.frontFaceAlphaByDistance}),i!=null&&i.filterColor){let E=this._viewer.scene.globe._surfaceShaderSet.baseFragmentShaderSource,w=E.sources.pop();E.sources.push(w.replace("out_FragColor = finalColor;",`out_FragColor = finalColor * vec4${i.filterColor.toString()};`))}return this}_setCameraController(){var s,a,o,n,h,c,d;if(!((s=this._options)!=null&&s.cameraController))return this;let e=this._viewer.scene.screenSpaceCameraController,i=this._options.cameraController;return T.merge(e,{enableInputs:(a=i==null?void 0:i.enableInputs)!=null?a:!0,enableRotate:(o=i==null?void 0:i.enableRotate)!=null?o:!0,enableTilt:(n=i==null?void 0:i.enableTilt)!=null?n:!0,enableTranslate:(h=i==null?void 0:i.enableTranslate)!=null?h:!0,enableZoom:(c=i==null?void 0:i.enableZoom)!=null?c:!0,enableCollisionDetection:(d=i==null?void 0:i.enableCollisionDetection)!=null?d:!0,minimumZoomDistance:+(i==null?void 0:i.minimumZoomDistance)||1,maximumZoomDistance:+(i==null?void 0:i.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)}},Ur=Br;var Vr=class{constructor(e){this._viewer=e,this._mouseMode=ge.LEFT_RIGHT}setPitchRange(e,i){let s=new r.ScreenSpaceEventHandler(this._viewer.scene.canvas);this._viewer.scene.mode===r.SceneMode.SCENE3D&&(s.setInputAction(a=>{s.setInputAction(o=>{let n=!0,h=o.endPosition.y<o.startPosition.y;h&&this._viewer.camera.pitch>r.Math.toRadians(i)||!h&&this._viewer.camera.pitch<r.Math.toRadians(e)?n=!1:n=!0,this._viewer.scene.screenSpaceCameraController.enableTilt=n},r.ScreenSpaceEventType.MOUSE_MOVE)},this._mouseMode===ge.LEFT_MIDDLE?r.ScreenSpaceEventType.MIDDLE_DOWN:r.ScreenSpaceEventType.RIGHT_DOWN),s.setInputAction(a=>{this._viewer.scene.screenSpaceCameraController.enableTilt=!0,s.removeInputAction(r.ScreenSpaceEventType.MOUSE_MOVE)},this._mouseMode===ge.LEFT_MIDDLE?r.ScreenSpaceEventType.MIDDLE_UP:r.ScreenSpaceEventType.RIGHT_UP))}changeMouseMode(e){this._mouseMode=e||ge.LEFT_RIGHT,e===ge.LEFT_MIDDLE?(console.log("\u5207\u6362\u9F20\u6807\u6A21\u5F0F\u4E3A\uFF1A\u5DE6\u952E+\u4E2D\u952E"),this._viewer.scene.screenSpaceCameraController.tiltEventTypes=[r.CameraEventType.MIDDLE_DRAG,r.CameraEventType.PINCH,{eventType:r.CameraEventType.LEFT_DRAG,modifier:r.KeyboardEventModifier.CTRL},{eventType:r.CameraEventType.RIGHT_DRAG,modifier:r.KeyboardEventModifier.CTRL}],this._viewer.scene.screenSpaceCameraController.zoomEventTypes=[r.CameraEventType.RIGHT_DRAG,r.CameraEventType.WHEEL,r.CameraEventType.PINCH]):e===ge.LEFT_RIGHT&&(this._viewer.scene.screenSpaceCameraController.tiltEventTypes=[r.CameraEventType.RIGHT_DRAG,r.CameraEventType.PINCH,{eventType:r.CameraEventType.LEFT_DRAG,modifier:r.KeyboardEventModifier.CTRL},{eventType:r.CameraEventType.RIGHT_DRAG,modifier:r.KeyboardEventModifier.CTRL}],this._viewer.scene.screenSpaceCameraController.zoomEventTypes=[r.CameraEventType.WHEEL,r.CameraEventType.PINCH,{eventType:r.CameraEventType.RIGHT_DRAG,modifier:r.KeyboardEventModifier.CTRL}])}},Zr=Vr;/**
16304
16304
  * 选项配置模块入口
16305
16305
  * 提供鼠标模式、视图选项和相机选项的配置功能
16306
16306
  *
@@ -16455,7 +16455,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKwAAAA0CAYAAAAXBNP2AAAACXBIWXMAAA
16455
16455
  <span></span>
16456
16456
  <span></span>
16457
16457
  <span></span>
16458
- `,!0,"loading");this._wrapper.appendChild(e),this._ready=!0}};k.registerType("loading_mask");var jc=as;var os=class extends k{constructor(){super(),this._wrapper=D.create("div","widget slider"),this._tileset=void 0,this._moveActive=!1,this._state=_.INITIALIZED}get type(){return k.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=D.parseDom(se.splitter,!0,"splitter");this._wrapper.appendChild(e);let i=new r.ScreenSpaceEventHandler(e),s=this;i.setInputAction(()=>{s._moveActive=!0},r.ScreenSpaceEventType.LEFT_DOWN),i.setInputAction(()=>{s._moveActive=!0},r.ScreenSpaceEventType.PINCH_START),i.setInputAction(a=>{s._moveHandler(a)},r.ScreenSpaceEventType.MOUSE_MOVE),i.setInputAction(a=>{s._moveHandler(a)},r.ScreenSpaceEventType.PINCH_MOVE),i.setInputAction(()=>{s._moveActive=!1},r.ScreenSpaceEventType.LEFT_UP),i.setInputAction(()=>{s._moveActive=!1},r.ScreenSpaceEventType.PINCH_END),this._ready=!0}_moveHandler(e){if(!this._moveActive||!this._enable)return;let i=e.endPosition.x,s=(this._wrapper.offsetLeft+i)/this._wrapper.parentElement.offsetWidth;this._wrapper.style.left=100*s+"%",this._viewer.scene.splitPosition=s}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)}};k.registerType("tileset_split");var Yc=os;var ns=class extends k{constructor(){super(),this._wrapper=D.create("div","widget slider"),this._tileset=void 0,this._baseLayer=void 0,this._moveActive=!1,this._state=_.INITIALIZED}get type(){return k.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=D.parseDom(se.splitter,!0,"splitter");this._wrapper.appendChild(e);let i=new r.ScreenSpaceEventHandler(e),s=this;i.setInputAction(()=>{s._moveActive=!0},r.ScreenSpaceEventType.LEFT_DOWN),i.setInputAction(()=>{s._moveActive=!0},r.ScreenSpaceEventType.PINCH_START),i.setInputAction(a=>{s._moveHandler(a)},r.ScreenSpaceEventType.MOUSE_MOVE),i.setInputAction(a=>{s._moveHandler(a)},r.ScreenSpaceEventType.PINCH_MOVE),i.setInputAction(()=>{s._moveActive=!1},r.ScreenSpaceEventType.LEFT_UP),i.setInputAction(()=>{s._moveActive=!1},r.ScreenSpaceEventType.PINCH_END),this._ready=!0}_moveHandler(e){if(!this._moveActive||!this._enable)return;let i=e.endPosition.x,s=(this._wrapper.offsetLeft+i)/this._wrapper.parentElement.offsetWidth;this._wrapper.style.left=100*s+"%",this._viewer.scene.splitPosition=s}addTileset(e){return!this._viewer||!this._enable?this:(e&&(this._tileset&&this._viewer.scene.primitives.remove(this._tileset),Promise.resolve(e.delegate||e).then(i=>{this._tileset=this._viewer.scene.primitives.add(i)})),this)}addBaseLayer(e){return!this._viewer||!this._enable?this:(e&&(this._baseLayer&&this._viewer.imageryLayers.remove(this._baseLayer),Promise.resolve(e).then(i=>{this._baseLayer=this._viewer.imageryLayers.addImageryProvider(i),this._baseLayer.splitDirection=1})),this)}};k.registerType("scene_split");var qc=ns;var ls=class{constructor(){this._delegate=new r.ViewportQuad,this._viewer=void 0}update(e){this._delegate.update(e)}install(e){this._viewer=e;let i=!0,s=se.logo,a=[86,26];if(i&&!s)return!1;let o=i&&s?s:se.logo;this._delegate.rectangle=new r.BoundingRectangle(2,1,a[0]||86,a[1]||26),this._delegate.material=new r.Material({fabric:{type:"Logo-Image",uniforms:{image:o},components:{diffuse:"texture(image, materialInput.st).rgb",alpha:"texture(image, materialInput.st).a "}},translucent:function(n){return!1}}),this._viewer.scene.primitives.add(this),i||this._viewer.scene.postRender.addEventListener(()=>{this._viewer.scene.primitives.contains(this)||this._viewer.scene.primitives.add(this)})}isDestroyed(){return!1}destroy(){return this}};k.registerType("attribution");var Xc=ls;function hs(){return{popup:new Gc,contextMenu:new bc,tooltip:new Hc,mapSwitch:new Fc,mapSplit:new zc,locationBar:new Ac,hawkeyeMap:new Wc,compass:new Bc,distanceLegend:new Vc,zoomController:new Zc,loadingMask:new jc,tilesetSplit:new Yc,sceneSplit:new qc,attribution:new Xc}}var at="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 $t="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 pf={icon_center:$t,icon_anchor:at,icon_size:[12,12],clampToModel:!1,maxAnchorSize:999},cs=class{constructor(){this._viewer=void 0,this._anchorLayer=new r.CustomDataSource("draw-anchor-layer"),this._floatingAnchor=void 0,this._options={},this._plotEvent=new wt,this._tooltipMess=void 0,this._anchorIds=[]}set tooltipMess(e){this._tooltipMess=e}_getEventPosition(e){return this._options.clampToModel&&e.position?e.position:e.surfacePosition}_onClick(e){let i=this._getEventPosition(e);if(!i)return!1;this._floatingAnchor||(this._floatingAnchor=this._onCreateAnchor({position:i})),this._plotEvent.fire(M.DRAW_ANCHOR,i)}_onMouseMove(e){this._viewer.tooltip.showAt(e.windowPosition,this._tooltipMess);let i=this._getEventPosition(e);if(!i)return!1;this._floatingAnchor&&this._floatingAnchor.position.setValue(i),this._plotEvent.fire(M.ANCHOR_MOVING,i)}_onDoubleClick(e){this._plotEvent.fire(M.DRAW_STOP,this._getEventPosition(e))}_onRightClick(e){if(this._plotEvent.fire(M.DELETE_ANCHOR),this._anchorIds&&this._anchorIds.length>0){var i=this._anchorIds[this._anchorIds.length-1];this._anchorLayer.entities.removeById(i),this._anchorIds.splice(this._anchorIds.length-1,1)}}_onCreateAnchor({position:e,isCenter:i=!1}){var a;let s=this._anchorLayer.entities.add({position:e,billboard:{image:i?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 r.Cartesian2(0,0),eyeOffset:this._options.eyeOffset||new r.Cartesian3(0,0,-100),disableDepthTestDistance:(a=this._options.disableDepthTestDistance)!=null?a:0,heightReference:this._viewer.scene.mode===r.SceneMode.SCENE3D&&!this._options.clampToModel?r.HeightReference.CLAMP_TO_GROUND:r.HeightReference.NONE}});return this._anchorIds.push(s.id),s}_onClearAnchor(){this._anchorLayer.entities.removeAll(),this._anchorIds=[]}_bindEvent(){this._viewer.on(W.CLICK,this._onClick,this),this._viewer.on(W.MOUSE_MOVE,this._onMouseMove,this),this._viewer.on(W.DB_CLICK,this._onDoubleClick,this),this._viewer.on(W.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.on(M.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.on(M.CLEAR_ANCHOR,this._onClearAnchor,this)}_unbindEvent(){this._viewer.off(W.CLICK,this._onClick,this),this._viewer.off(W.MOUSE_MOVE,this._onMouseMove,this),this._viewer.off(W.DB_CLICK,this._onDoubleClick,this),this._viewer.off(W.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.off(M.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.off(M.CLEAR_ANCHOR,this._onClearAnchor,this)}on(e,i,s){return this._plotEvent.on(e,i,s||this),this}off(e,i,s){return this._plotEvent.off(e,i,s||this),this}fire(e,i={}){return this._plotEvent.fire(e,i),this}activate(e={}){return this._viewer.tooltip.enable=!0,this._options={...pf,...e},this._anchorIds=[],this._unbindEvent(),this._bindEvent(),this.fire(M.DRAW_START,this._options),this}deactivate(){return this._unbindEvent(),this._viewer.tooltip.enable=!1,this._anchorLayer.entities.removeAll(),this._floatingAnchor=void 0,this._anchorIds=[],this}install(e){this._viewer=e,this._viewer.dataSources.add(this._anchorLayer),Object.defineProperty(this._viewer,"drawTool",{value:this,writable:!1})}},Jc=cs;var Qc="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 uf={icon_center:$t,icon_anchor:at,icon_midAnchor:Qc,icon_size:[12,12],clampToModel:!0},ds=class{constructor(){this._viewer=void 0,this._anchorLayer=new r.CustomDataSource("edit-anchor-layer"),this._options={},this._plotEvent=new wt,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 i=this._options.clampToModel&&e.position?e.position:e.surfacePosition;if(!i)return!1;this._pickedAnchor&&this._pickedAnchor.position&&this._pickedAnchor.properties&&(this._pickedAnchor.position.setValue(i),this._plotEvent.fire(M.EDIT_ANCHOR_STOP,{pickedAnchor:this._pickedAnchor,position:i})),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 i=this._options.clampToModel&&e.position?e.position:e.surfacePosition;if(!i)return!1;this._pickedAnchor&&this._pickedAnchor.position&&this._pickedAnchor.properties?(this._pickedAnchor.position.setValue(i),this._plotEvent.fire(M.ANCHOR_MOVING,{pickedAnchor:this._pickedAnchor,position:i})):this._anchors.length===0&&this._plotEvent.fire(M.ANCHOR_MOVING,{position:i})}_onRightClick(e){let i=this._options.clampToModel&&e.position?e.position:e.surfacePosition;this._plotEvent.fire(M.EDIT_STOP,{pickedAnchor:this._pickedAnchor,position:i})}_onCreateAnchor({position:e,index:i,isCenter:s=!1,isMid:a=!1}){var h;let o=a?this._options.icon_midAnchor:s?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 r.Cartesian2(0,0),eyeOffset:this._options.eyeOffset||new r.Cartesian3(0,0,-100),disableDepthTestDistance:(h=this._options.disableDepthTestDistance)!=null?h:0,heightReference:this._viewer.scene.mode===r.SceneMode.SCENE3D&&!this._options.clampToModel?r.HeightReference.CLAMP_TO_GROUND:r.HeightReference.NONE},properties:{isMid:a,index:i}});this._anchors.push(n)}_onUpdateAnchor({index:e,position:i}){this._anchors[e]&&this._anchors[e].position.setValue(i)}_onClearAnchor(){this._anchorLayer.entities.removeAll(),this._anchors=[]}_bindEvent(){this._viewer.on(W.CLICK,this._onClick,this),this._viewer.on(W.MOUSE_MOVE,this._onMouseMove,this),this._viewer.on(W.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.on(M.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.on(M.UPDATE_ANCHOR,this._onUpdateAnchor,this),this._plotEvent.on(M.CLEAR_ANCHOR,this._onClearAnchor,this)}_unbindEvent(){this._viewer.off(W.CLICK,this._onClick,this),this._viewer.off(W.MOUSE_MOVE,this._onMouseMove,this),this._viewer.off(W.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.off(M.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.off(M.UPDATE_ANCHOR,this._onUpdateAnchor,this),this._plotEvent.off(M.CLEAR_ANCHOR,this._onClearAnchor,this)}on(e,i,s){return this._plotEvent.on(e,i,s||this),this}off(e,i,s){return this._plotEvent.off(e,i,s||this),this}fire(e,i){return this._plotEvent.fire(e,i),this}activate(e={}){return this._anchorLayer.entities.removeAll(),this._anchors=[],this._viewer.tooltip.enable=!0,this._options={...uf,...e},this._unbindEvent(),this._bindEvent(),this.fire(M.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})}},Kc=ds;function ps(){return{drawTool:new Jc,editTool:new Kc}}var{ImageryLayer:ff}=r,ms=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}get selectedImageryLayer(){return this._selectedImageryLayer}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 i=0;i<this._selectedImageryLayer.cache.length;i++)this._globe.imageryLayers.remove(this._selectedImageryLayer.cache[i]);e.cache=[]}for(let i=e.layers.length-1;i>=0;i--){let s=e.layers[i],a=ff.fromProviderAsync(s,e.options);s&&this._globe.imageryLayers.add(a,0),e.cache.push(a)}this._selectedImageryLayer=e}}addImageryLayer(e,i={}){let s=[];return Array.isArray(e)?s=e.slice(0):s=[e],this._count++,this._imageryLayers.push({id:`imagery-no-${this._count}`,layers:s,cache:[]}),this}changeImageryLayer(e){if(e>this._imageryLayers.length-1)throw new Error("index error");return this.selectedImageryLayer=this._imageryLayers[e],this}},us=ms;var{BoxGeometry:$c,Cartesian3:_f,defined:Le,DeveloperError:ed,GeometryPipeline:gf,Matrix3:td,Matrix4:fs,Transforms:yf,VertexFormat:vf,BufferUsage:wf,CubeMap:xf,loadCubeMap:Cf,RenderState:Tf,VertexArray:Ef,BlendingState:Pf,SceneMode:id,ShaderProgram:Mf,ShaderSource:bf,SkyBox:Af}=r,Sf=`
16458
+ `,!0,"loading");this._wrapper.appendChild(e),this._ready=!0}};k.registerType("loading_mask");var jc=as;var os=class extends k{constructor(){super(),this._wrapper=D.create("div","widget slider"),this._tileset=void 0,this._moveActive=!1,this._state=_.INITIALIZED}get type(){return k.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=D.parseDom(se.splitter,!0,"splitter");this._wrapper.appendChild(e);let i=new r.ScreenSpaceEventHandler(e),s=this;i.setInputAction(()=>{s._moveActive=!0},r.ScreenSpaceEventType.LEFT_DOWN),i.setInputAction(()=>{s._moveActive=!0},r.ScreenSpaceEventType.PINCH_START),i.setInputAction(a=>{s._moveHandler(a)},r.ScreenSpaceEventType.MOUSE_MOVE),i.setInputAction(a=>{s._moveHandler(a)},r.ScreenSpaceEventType.PINCH_MOVE),i.setInputAction(()=>{s._moveActive=!1},r.ScreenSpaceEventType.LEFT_UP),i.setInputAction(()=>{s._moveActive=!1},r.ScreenSpaceEventType.PINCH_END),this._ready=!0}_moveHandler(e){if(!this._moveActive||!this._enable)return;let i=e.endPosition.x,s=(this._wrapper.offsetLeft+i)/this._wrapper.parentElement.offsetWidth;this._wrapper.style.left=100*s+"%",this._viewer.scene.splitPosition=s}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)}};k.registerType("tileset_split");var Yc=os;var ns=class extends k{constructor(){super(),this._wrapper=D.create("div","widget slider"),this._tileset=void 0,this._baseLayer=void 0,this._moveActive=!1,this._state=_.INITIALIZED}get type(){return k.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=D.parseDom(se.splitter,!0,"splitter");this._wrapper.appendChild(e);let i=new r.ScreenSpaceEventHandler(e),s=this;i.setInputAction(()=>{s._moveActive=!0},r.ScreenSpaceEventType.LEFT_DOWN),i.setInputAction(()=>{s._moveActive=!0},r.ScreenSpaceEventType.PINCH_START),i.setInputAction(a=>{s._moveHandler(a)},r.ScreenSpaceEventType.MOUSE_MOVE),i.setInputAction(a=>{s._moveHandler(a)},r.ScreenSpaceEventType.PINCH_MOVE),i.setInputAction(()=>{s._moveActive=!1},r.ScreenSpaceEventType.LEFT_UP),i.setInputAction(()=>{s._moveActive=!1},r.ScreenSpaceEventType.PINCH_END),this._ready=!0}_moveHandler(e){if(!this._moveActive||!this._enable)return;let i=e.endPosition.x,s=(this._wrapper.offsetLeft+i)/this._wrapper.parentElement.offsetWidth;this._wrapper.style.left=100*s+"%",this._viewer.scene.splitPosition=s}addTileset(e){return!this._viewer||!this._enable?this:(e&&(this._tileset&&this._viewer.scene.primitives.remove(this._tileset),Promise.resolve(e.delegate||e).then(i=>{this._tileset=this._viewer.scene.primitives.add(i)})),this)}addBaseLayer(e){return!this._viewer||!this._enable?this:(e&&(this._baseLayer&&this._viewer.imageryLayers.remove(this._baseLayer),Promise.resolve(e).then(i=>{this._baseLayer=this._viewer.imageryLayers.addImageryProvider(i),this._baseLayer.splitDirection=1})),this)}};k.registerType("scene_split");var qc=ns;var ls=class{constructor(){this._delegate=new r.ViewportQuad,this._viewer=void 0}update(e){this._delegate.update(e)}install(e){this._viewer=e;let i=!0,s=se.logo,a=[86,26];if(i&&!s)return!1;let o=i&&s?s:se.logo;this._delegate.rectangle=new r.BoundingRectangle(2,1,a[0]||86,a[1]||26),this._delegate.material=new r.Material({fabric:{type:"Logo-Image",uniforms:{image:o},components:{diffuse:"texture(image, materialInput.st).rgb",alpha:"texture(image, materialInput.st).a "}},translucent:function(n){return!1}}),this._viewer.scene.primitives.add(this),i||this._viewer.scene.postRender.addEventListener(()=>{this._viewer.scene.primitives.contains(this)||this._viewer.scene.primitives.add(this)})}isDestroyed(){return!1}destroy(){return this}};k.registerType("attribution");var Xc=ls;function hs(){return{popup:new Gc,contextMenu:new bc,tooltip:new Hc,mapSwitch:new Fc,mapSplit:new zc,locationBar:new Ac,hawkeyeMap:new Wc,compass:new Bc,distanceLegend:new Vc,zoomController:new Zc,loadingMask:new jc,tilesetSplit:new Yc,sceneSplit:new qc,attribution:new Xc}}var at="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 $t="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 pf={icon_center:$t,icon_anchor:at,icon_size:[12,12],clampToModel:!1,maxAnchorSize:999},cs=class{constructor(){this._viewer=void 0,this._anchorLayer=new r.CustomDataSource("draw-anchor-layer"),this._floatingAnchor=void 0,this._options={},this._plotEvent=new wt,this._tooltipMess=void 0,this._anchorIds=[]}set tooltipMess(e){this._tooltipMess=e}_getEventPosition(e){return this._options.clampToModel&&e.position?e.position:e.surfacePosition}_onClick(e){let i=this._getEventPosition(e);if(!i)return!1;this._floatingAnchor||(this._floatingAnchor=this._onCreateAnchor({position:i})),this._plotEvent.fire(M.DRAW_ANCHOR,i)}_onMouseMove(e){this._viewer.tooltip.showAt(e.windowPosition,this._tooltipMess);let i=this._getEventPosition(e);if(!i)return!1;this._floatingAnchor&&this._floatingAnchor.position.setValue(i),this._plotEvent.fire(M.ANCHOR_MOVING,i)}_onDoubleClick(e){this._plotEvent.fire(M.DRAW_STOP,this._getEventPosition(e))}_onRightClick(e){if(this._plotEvent.fire(M.DELETE_ANCHOR),this._anchorIds&&this._anchorIds.length>0){var i=this._anchorIds[this._anchorIds.length-1];this._anchorLayer.entities.removeById(i),this._anchorIds.splice(this._anchorIds.length-1,1)}}_onCreateAnchor({position:e,isCenter:i=!1}){var a;let s=this._anchorLayer.entities.add({position:e,billboard:{image:i?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 r.Cartesian2(0,0),eyeOffset:this._options.eyeOffset||new r.Cartesian3(0,0,-100),disableDepthTestDistance:(a=this._options.disableDepthTestDistance)!=null?a:0,heightReference:this._viewer.scene.mode===r.SceneMode.SCENE3D&&!this._options.clampToModel?r.HeightReference.CLAMP_TO_GROUND:r.HeightReference.NONE}});return this._anchorIds.push(s.id),s}_onClearAnchor(){this._anchorLayer.entities.removeAll(),this._anchorIds=[]}_bindEvent(){this._viewer.on(W.CLICK,this._onClick,this),this._viewer.on(W.MOUSE_MOVE,this._onMouseMove,this),this._viewer.on(W.DB_CLICK,this._onDoubleClick,this),this._viewer.on(W.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.on(M.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.on(M.CLEAR_ANCHOR,this._onClearAnchor,this)}_unbindEvent(){this._viewer.off(W.CLICK,this._onClick,this),this._viewer.off(W.MOUSE_MOVE,this._onMouseMove,this),this._viewer.off(W.DB_CLICK,this._onDoubleClick,this),this._viewer.off(W.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.off(M.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.off(M.CLEAR_ANCHOR,this._onClearAnchor,this)}on(e,i,s){return this._plotEvent.on(e,i,s||this),this}off(e,i,s){return this._plotEvent.off(e,i,s||this),this}fire(e,i={}){return this._plotEvent.fire(e,i),this}activate(e={}){return this._viewer.tooltip.enable=!0,this._options={...pf,...e},this._anchorIds=[],this._unbindEvent(),this._bindEvent(),this.fire(M.DRAW_START,this._options),this}deactivate(){return this._unbindEvent(),this._viewer.tooltip.enable=!1,this._anchorLayer.entities.removeAll(),this._floatingAnchor=void 0,this._anchorIds=[],this}install(e){this._viewer=e,this._viewer.dataSources.add(this._anchorLayer),Object.defineProperty(this._viewer,"drawTool",{value:this,writable:!1})}},Jc=cs;var Qc="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 uf={icon_center:$t,icon_anchor:at,icon_midAnchor:Qc,icon_size:[12,12],clampToModel:!1},ds=class{constructor(){this._viewer=void 0,this._anchorLayer=new r.CustomDataSource("edit-anchor-layer"),this._options={},this._plotEvent=new wt,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 i=this._options.clampToModel&&e.position?e.position:e.surfacePosition;if(!i)return!1;this._pickedAnchor&&this._pickedAnchor.position&&this._pickedAnchor.properties&&(this._pickedAnchor.position.setValue(i),this._plotEvent.fire(M.EDIT_ANCHOR_STOP,{pickedAnchor:this._pickedAnchor,position:i})),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 i=this._options.clampToModel&&e.position?e.position:e.surfacePosition;if(!i)return!1;this._pickedAnchor&&this._pickedAnchor.position&&this._pickedAnchor.properties?(this._pickedAnchor.position.setValue(i),this._plotEvent.fire(M.ANCHOR_MOVING,{pickedAnchor:this._pickedAnchor,position:i})):this._anchors.length===0&&this._plotEvent.fire(M.ANCHOR_MOVING,{position:i})}_onRightClick(e){let i=this._options.clampToModel&&e.position?e.position:e.surfacePosition;this._plotEvent.fire(M.EDIT_STOP,{pickedAnchor:this._pickedAnchor,position:i})}_onCreateAnchor({position:e,index:i,isCenter:s=!1,isMid:a=!1}){var h;let o=a?this._options.icon_midAnchor:s?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 r.Cartesian2(0,0),eyeOffset:this._options.eyeOffset||new r.Cartesian3(0,0,-100),disableDepthTestDistance:(h=this._options.disableDepthTestDistance)!=null?h:0,heightReference:this._viewer.scene.mode===r.SceneMode.SCENE3D&&!this._options.clampToModel?r.HeightReference.CLAMP_TO_GROUND:r.HeightReference.NONE},properties:{isMid:a,index:i}});this._anchors.push(n)}_onUpdateAnchor({index:e,position:i}){this._anchors[e]&&this._anchors[e].position.setValue(i)}_onClearAnchor(){this._anchorLayer.entities.removeAll(),this._anchors=[]}_bindEvent(){this._viewer.on(W.CLICK,this._onClick,this),this._viewer.on(W.MOUSE_MOVE,this._onMouseMove,this),this._viewer.on(W.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.on(M.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.on(M.UPDATE_ANCHOR,this._onUpdateAnchor,this),this._plotEvent.on(M.CLEAR_ANCHOR,this._onClearAnchor,this)}_unbindEvent(){this._viewer.off(W.CLICK,this._onClick,this),this._viewer.off(W.MOUSE_MOVE,this._onMouseMove,this),this._viewer.off(W.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.off(M.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.off(M.UPDATE_ANCHOR,this._onUpdateAnchor,this),this._plotEvent.off(M.CLEAR_ANCHOR,this._onClearAnchor,this)}on(e,i,s){return this._plotEvent.on(e,i,s||this),this}off(e,i,s){return this._plotEvent.off(e,i,s||this),this}fire(e,i){return this._plotEvent.fire(e,i),this}activate(e={}){return this._anchorLayer.entities.removeAll(),this._anchors=[],this._viewer.tooltip.enable=!0,this._options={...uf,...e},this._unbindEvent(),this._bindEvent(),this.fire(M.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})}},Kc=ds;function ps(){return{drawTool:new Jc,editTool:new Kc}}var{ImageryLayer:ff}=r,ms=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}get selectedImageryLayer(){return this._selectedImageryLayer}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 i=0;i<this._selectedImageryLayer.cache.length;i++)this._globe.imageryLayers.remove(this._selectedImageryLayer.cache[i]);e.cache=[]}for(let i=e.layers.length-1;i>=0;i--){let s=e.layers[i],a=ff.fromProviderAsync(s,e.options);s&&this._globe.imageryLayers.add(a,0),e.cache.push(a)}this._selectedImageryLayer=e}}addImageryLayer(e,i={}){let s=[];return Array.isArray(e)?s=e.slice(0):s=[e],this._count++,this._imageryLayers.push({id:`imagery-no-${this._count}`,layers:s,cache:[]}),this}changeImageryLayer(e){if(e>this._imageryLayers.length-1)throw new Error("index error");return this.selectedImageryLayer=this._imageryLayers[e],this}},us=ms;var{BoxGeometry:$c,Cartesian3:_f,defined:Le,DeveloperError:ed,GeometryPipeline:gf,Matrix3:td,Matrix4:fs,Transforms:yf,VertexFormat:vf,BufferUsage:wf,CubeMap:xf,loadCubeMap:Cf,RenderState:Tf,VertexArray:Ef,BlendingState:Pf,SceneMode:id,ShaderProgram:Mf,ShaderSource:bf,SkyBox:Af}=r,Sf=`
16459
16459
  uniform samplerCube u_cubeMap;
16460
16460
  in vec3 v_texCoord;
16461
16461
  void main()
@@ -19543,7 +19543,7 @@ void main() {\r
19543
19543
  %c \u76D8\u53E4\u5730\u7406\u4FE1\u606F\u7CFB\u7EDF
19544
19544
  %c PanGu Gis For Cesium SDK
19545
19545
  %c \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
19546
- %c \u{1F680} \u7248\u672C: %c5.1.16 - 2025-10-24
19546
+ %c \u{1F680} \u7248\u672C: %c5.2.0 - 2025-10-24
19547
19547
  %c \u{1F310} EUM\u7248\u672C\uFF1A%c1.131.0
19548
19548
  %c \u{1F468}\u200D\u{1F4BB} \u5F00\u53D1\u4F5C\u8005: %cLucas Xu <xulei0857@qq.com>
19549
19549
  %c \u{1F4DC} \u6388\u6743\uFF1A%c\u667A\u4F01\u534E\u7AE0-\u6C38\u4E45\u4F7F\u7528\u6B64\u8F6F\u4EF6\u5F53\u524D\u7248\u672C\u3002
@@ -19552,4 +19552,4 @@ void main() {\r
19552
19552
  %c \u{1F3E0} \u5B98\u7F51: %chttps://www.pggis.com
19553
19553
 
19554
19554
  %c
19555
- `,'font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 24px; font-weight: 600; color: #008AFF; text-align: center;','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 24px; font-weight: 600; color: #F08519; text-align: center; ','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 16px; font-weight: 600; color: #FFC712; text-align: center;font-style:oblique','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #718096; text-align: center; letter-spacing: 0.5px; padding: 4px 0','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829',"font-family: monospace; font-size: 14px; color: transparent"))};var zu="./libs/pg-sdk/resources/",ku=zu,Nu=!1;rt("baseUrl",zu);var oy={set baseUrl(l){ku=l,rt("baseUrl",l)},get baseUrl(){return ku}};function ny(l={}){return Nu?Promise.resolve():new Promise((e,i)=>{l.baseUrl&&(this.config.baseUrl=l.baseUrl),l.cesium&&registerLib("cesium",l.Cesium),l.echarts&&registerLib("echarts",l.echarts),l.turf&&registerLib("turf",l.turf),Nu=!0,rt("isInitialized",!0),rt("baseUrl",this.config.baseUrl),e()}).catch(e=>{throw new Error(e.message)})}var ly="5.1.16";return Zu(hy);})();
19555
+ `,'font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 24px; font-weight: 600; color: #008AFF; text-align: center;','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 24px; font-weight: 600; color: #F08519; text-align: center; ','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 16px; font-weight: 600; color: #FFC712; text-align: center;font-style:oblique','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #718096; text-align: center; letter-spacing: 0.5px; padding: 4px 0','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829',"font-family: monospace; font-size: 14px; color: transparent"))};var zu="./libs/pg-sdk/resources/",ku=zu,Nu=!1;rt("baseUrl",zu);var oy={set baseUrl(l){ku=l,rt("baseUrl",l)},get baseUrl(){return ku}};function ny(l={}){return Nu?Promise.resolve():new Promise((e,i)=>{l.baseUrl&&(this.config.baseUrl=l.baseUrl),l.cesium&&registerLib("cesium",l.Cesium),l.echarts&&registerLib("echarts",l.echarts),l.turf&&registerLib("turf",l.turf),Nu=!0,rt("isInitialized",!0),rt("baseUrl",this.config.baseUrl),e()}).catch(e=>{throw new Error(e.message)})}var ly="5.2.0";return Zu(hy);})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pggis/pg-sdk",
3
- "version": "5.1.16",
3
+ "version": "5.2.0",
4
4
  "license": "MIT",
5
5
  "description": "盘古 Gis SDK 是基于开源项目 Cesium 进行二次开发的二三维一体的 WebGis 应用框架,该框架优化了部分 Cesium 的使用方式和增添一些通用功能,旨在为开发者快速构建 WebGis 应用。",
6
6
  "repository": "https://git.pgio.cn/xulei0857/pg-gis-sdk.git",