mars3d-cesium 1.96.4 → 1.96.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. package/Build/Cesium/Cesium.js +4 -4
  2. package/Build/Cesium/ThirdParty/Workers/basis_transcoder.js +1 -1
  3. package/Build/Cesium/ThirdParty/Workers/draco_decoder_nodejs.js +1 -1
  4. package/Build/Cesium/ThirdParty/Workers/package.js +1 -1
  5. package/Build/Cesium/ThirdParty/Workers/pako_deflate.min.js +1 -1
  6. package/Build/Cesium/ThirdParty/Workers/pako_inflate.min.js +1 -1
  7. package/Build/Cesium/ThirdParty/Workers/z-worker-pako.js +1 -1
  8. package/Build/Cesium/ThirdParty/google-earth-dbroot-parser.js +1 -1
  9. package/Build/Cesium/Workers/ArcType-8a3a359b.js +1 -1
  10. package/Build/Cesium/Workers/{ArcType-2a3adffe.js → ArcType-c753acd1.js} +1 -1
  11. package/Build/Cesium/Workers/{AttributeCompression-62b0e919.js → AttributeCompression-2cbecc1c.js} +2 -2
  12. package/Build/Cesium/Workers/{AxisAlignedBoundingBox-f7daa7b3.js → AxisAlignedBoundingBox-2d411e6e.js} +2 -2
  13. package/Build/Cesium/Workers/{BoundingRectangle-32cfbde7.js → BoundingRectangle-02ab6a66.js} +2 -2
  14. package/Build/Cesium/Workers/{BoxGeometry-5923382d.js → BoxGeometry-851375ae.js} +2 -2
  15. package/Build/Cesium/Workers/{Color-12a018a9.js → Color-4dcd08f7.js} +2 -2
  16. package/Build/Cesium/Workers/{ComponentDatatype-94a172c0.js → ComponentDatatype-81d31044.js} +2 -2
  17. package/Build/Cesium/Workers/ComponentDatatype-98788316.js +1 -1
  18. package/Build/Cesium/Workers/{CoplanarPolygonGeometryLibrary-c2f2cb73.js → CoplanarPolygonGeometryLibrary-8f821450.js} +2 -2
  19. package/Build/Cesium/Workers/{CorridorGeometryLibrary-55a354d3.js → CorridorGeometryLibrary-5158fd4f.js} +2 -2
  20. package/Build/Cesium/Workers/{CylinderGeometry-79e44bab.js → CylinderGeometry-cca064fb.js} +2 -2
  21. package/Build/Cesium/Workers/{CylinderGeometryLibrary-8ab6de01.js → CylinderGeometryLibrary-9202fc0d.js} +2 -2
  22. package/Build/Cesium/Workers/CylinderGeometryLibrary-d4a4174d.js +1 -1
  23. package/Build/Cesium/Workers/{EllipseGeometry-7b3fe578.js → EllipseGeometry-8e641e30.js} +2 -2
  24. package/Build/Cesium/Workers/{EllipseGeometryLibrary-ad4a5b4c.js → EllipseGeometryLibrary-53b7ed54.js} +2 -2
  25. package/Build/Cesium/Workers/{EllipseOutlineGeometry-3068b696.js → EllipseOutlineGeometry-201e5569.js} +2 -2
  26. package/Build/Cesium/Workers/{EllipsoidGeodesic-11e914fe.js → EllipsoidGeodesic-9cb80907.js} +2 -2
  27. package/Build/Cesium/Workers/{EllipsoidGeometry-32972807.js → EllipsoidGeometry-fa8d3727.js} +2 -2
  28. package/Build/Cesium/Workers/{EllipsoidOutlineGeometry-ec57863c.js → EllipsoidOutlineGeometry-9e072bdd.js} +2 -2
  29. package/Build/Cesium/Workers/{EllipsoidRhumbLine-49eb2f6d.js → EllipsoidRhumbLine-9f9950ac.js} +2 -2
  30. package/Build/Cesium/Workers/{EllipsoidTangentPlane-ecc006c3.js → EllipsoidTangentPlane-93b39b4c.js} +2 -2
  31. package/Build/Cesium/Workers/{EncodedCartesian3-222548c7.js → EncodedCartesian3-f855dac4.js} +2 -2
  32. package/Build/Cesium/Workers/{FrustumGeometry-5b18c3b7.js → FrustumGeometry-7c5b894d.js} +2 -2
  33. package/Build/Cesium/Workers/{GeometryAttribute-4daab906.js → GeometryAttribute-441303c5.js} +2 -2
  34. package/Build/Cesium/Workers/GeometryAttributes-98e858da.js +1 -1
  35. package/Build/Cesium/Workers/{GeometryAttributes-a490dcf1.js → GeometryAttributes-ee43e6f6.js} +2 -2
  36. package/Build/Cesium/Workers/{GeometryInstance-19520f53.js → GeometryInstance-efe11238.js} +2 -2
  37. package/Build/Cesium/Workers/{GeometryOffsetAttribute-62f885db.js → GeometryOffsetAttribute-1eefd1bc.js} +1 -1
  38. package/Build/Cesium/Workers/GeometryOffsetAttribute-da11568b.js +1 -1
  39. package/Build/Cesium/Workers/{GeometryPipeline-f0a1ad88.js → GeometryPipeline-8e69d2b4.js} +2 -2
  40. package/Build/Cesium/Workers/{IndexDatatype-33d13dff.js → IndexDatatype-481ce88d.js} +2 -2
  41. package/Build/Cesium/Workers/IndexDatatype-be82b350.js +1 -1
  42. package/Build/Cesium/Workers/{IntersectionTests-8b7c8657.js → IntersectionTests-b3ca82c3.js} +2 -2
  43. package/Build/Cesium/Workers/{Matrix2-c788e106.js → Matrix2-379cdf69.js} +2 -2
  44. package/Build/Cesium/Workers/{OrientedBoundingBox-917a4be5.js → OrientedBoundingBox-4e54ecf4.js} +2 -2
  45. package/Build/Cesium/Workers/{Plane-f81558db.js → Plane-9fd0da4b.js} +2 -2
  46. package/Build/Cesium/Workers/{PolygonGeometryLibrary-343a1da6.js → PolygonGeometryLibrary-bfa1fe61.js} +2 -2
  47. package/Build/Cesium/Workers/{PolygonPipeline-38b4288d.js → PolygonPipeline-4809453d.js} +2 -2
  48. package/Build/Cesium/Workers/{PolylinePipeline-91ecbec7.js → PolylinePipeline-81384d93.js} +2 -2
  49. package/Build/Cesium/Workers/PolylineVolumeGeometryLibrary-facadbb9.js +25 -0
  50. package/Build/Cesium/Workers/{PrimitivePipeline-98819346.js → PrimitivePipeline-bca8a076.js} +2 -2
  51. package/Build/Cesium/Workers/RectangleGeometryLibrary-cb560a26.js +25 -0
  52. package/Build/Cesium/Workers/RuntimeError-a977b8e0.js +1 -1
  53. package/Build/Cesium/Workers/{RuntimeError-50f3c270.js → RuntimeError-b731fbf0.js} +2 -2
  54. package/Build/Cesium/Workers/{TerrainEncoding-fef638a6.js → TerrainEncoding-1afccf51.js} +2 -2
  55. package/Build/Cesium/Workers/{Transforms-fae4cdf7.js → Transforms-80e65cd8.js} +2 -2
  56. package/Build/Cesium/Workers/VertexFormat-3518f543.js +1 -1
  57. package/Build/Cesium/Workers/{VertexFormat-a34558d6.js → VertexFormat-761c1626.js} +2 -2
  58. package/Build/Cesium/Workers/{WallGeometryLibrary-91f03d48.js → WallGeometryLibrary-b3336200.js} +2 -2
  59. package/Build/Cesium/Workers/WebGLConstants-0ff1ce58.js +1 -1
  60. package/Build/Cesium/Workers/{WebGLConstants-cbf0dab7.js → WebGLConstants-cd19b574.js} +1 -1
  61. package/Build/Cesium/Workers/{WebMercatorProjection-3ff867a8.js → WebMercatorProjection-2a6ab096.js} +2 -2
  62. package/Build/Cesium/Workers/_commonjsHelpers-3aae1032-f55dc0c4.js +1 -1
  63. package/Build/Cesium/Workers/{_commonjsHelpers-d90b2ade.js → _commonjsHelpers-7329702c.js} +1 -1
  64. package/Build/Cesium/Workers/arrayRemoveDuplicates-568a8f01.js +1 -1
  65. package/Build/Cesium/Workers/arrayRemoveDuplicates-8b2cf911.js +25 -0
  66. package/Build/Cesium/Workers/cesiumWorkerBootstrapper.js +1 -1
  67. package/Build/Cesium/Workers/combine-13bb426d.js +1 -1
  68. package/Build/Cesium/Workers/{combine-4bf14979.js → combine-81c399be.js} +2 -2
  69. package/Build/Cesium/Workers/combineGeometry.js +2 -2
  70. package/Build/Cesium/Workers/createBoxGeometry.js +2 -2
  71. package/Build/Cesium/Workers/createBoxOutlineGeometry.js +2 -2
  72. package/Build/Cesium/Workers/createCircleGeometry.js +2 -2
  73. package/Build/Cesium/Workers/createCircleOutlineGeometry.js +2 -2
  74. package/Build/Cesium/Workers/createCoplanarPolygonGeometry.js +2 -2
  75. package/Build/Cesium/Workers/createCoplanarPolygonOutlineGeometry.js +2 -2
  76. package/Build/Cesium/Workers/createCorridorGeometry.js +2 -2
  77. package/Build/Cesium/Workers/createCorridorOutlineGeometry.js +2 -2
  78. package/Build/Cesium/Workers/createCylinderGeometry.js +2 -2
  79. package/Build/Cesium/Workers/createCylinderOutlineGeometry.js +2 -2
  80. package/Build/Cesium/Workers/createEllipseGeometry.js +2 -2
  81. package/Build/Cesium/Workers/createEllipseOutlineGeometry.js +2 -2
  82. package/Build/Cesium/Workers/createEllipsoidGeometry.js +2 -2
  83. package/Build/Cesium/Workers/createEllipsoidOutlineGeometry.js +2 -2
  84. package/Build/Cesium/Workers/createFrustumGeometry.js +2 -2
  85. package/Build/Cesium/Workers/createFrustumOutlineGeometry.js +2 -2
  86. package/Build/Cesium/Workers/createGeometry.js +2 -2
  87. package/Build/Cesium/Workers/createGroundPolylineGeometry.js +2 -2
  88. package/Build/Cesium/Workers/createPlaneGeometry.js +2 -2
  89. package/Build/Cesium/Workers/createPlaneOutlineGeometry.js +2 -2
  90. package/Build/Cesium/Workers/createPolygonGeometry.js +2 -2
  91. package/Build/Cesium/Workers/createPolygonOutlineGeometry.js +2 -2
  92. package/Build/Cesium/Workers/createPolylineGeometry.js +2 -2
  93. package/Build/Cesium/Workers/createPolylineVolumeGeometry.js +2 -2
  94. package/Build/Cesium/Workers/createPolylineVolumeOutlineGeometry.js +2 -2
  95. package/Build/Cesium/Workers/createRectangleGeometry.js +2 -2
  96. package/Build/Cesium/Workers/createRectangleOutlineGeometry.js +2 -2
  97. package/Build/Cesium/Workers/createSimplePolylineGeometry.js +2 -2
  98. package/Build/Cesium/Workers/createSphereGeometry.js +2 -2
  99. package/Build/Cesium/Workers/createSphereOutlineGeometry.js +2 -2
  100. package/Build/Cesium/Workers/createTaskProcessorWorker.js +2 -2
  101. package/Build/Cesium/Workers/createVectorTileClampedPolylines.js +2 -2
  102. package/Build/Cesium/Workers/createVectorTileGeometries.js +2 -2
  103. package/Build/Cesium/Workers/createVectorTilePoints.js +2 -2
  104. package/Build/Cesium/Workers/createVectorTilePolygons.js +2 -2
  105. package/Build/Cesium/Workers/createVectorTilePolylines.js +2 -2
  106. package/Build/Cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +2 -2
  107. package/Build/Cesium/Workers/createVerticesFromHeightmap.js +2 -2
  108. package/Build/Cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +2 -2
  109. package/Build/Cesium/Workers/createWallGeometry.js +2 -2
  110. package/Build/Cesium/Workers/createWallOutlineGeometry.js +2 -2
  111. package/Build/Cesium/Workers/decodeDraco.js +2 -2
  112. package/Build/Cesium/Workers/decodeGoogleEarthEnterprisePacket.js +2 -2
  113. package/Build/Cesium/Workers/defaultValue-028a8a27.js +1 -1
  114. package/Build/Cesium/Workers/{defaultValue-77c08f32.js → defaultValue-c2fc243d.js} +1 -1
  115. package/Build/Cesium/Workers/package.js +1 -1
  116. package/Build/Cesium/Workers/transcodeKTX2.js +2 -2
  117. package/Build/Cesium/Workers/transferTypedArrayTest.js +1 -1
  118. package/Build/Cesium/Workers/upsampleQuantizedTerrainMesh.js +2 -2
  119. package/Build/Cesium/index.cjs +4 -4
  120. package/Build/Cesium/index.js +4 -4
  121. package/package.json +2 -2
  122. package/Build/Cesium/Workers/PolylineVolumeGeometryLibrary-eae5ef7f.js +0 -25
  123. package/Build/Cesium/Workers/RectangleGeometryLibrary-46c88be3.js +0 -25
  124. package/Build/Cesium/Workers/arrayRemoveDuplicates-50333467.js +0 -25
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.96.3
4
+ * Version 1.96.5
5
5
  *
6
6
  * Copyright 2011-2022 Cesium Contributors
7
7
  *
@@ -93,7 +93,7 @@ ${this.stack.toString()}`),e};var fe=rS;function Ke(e,t,n,i,o,r,s,a,c,u,f,d,p,_,
93
93
  (${this[3]}, ${this[7]}, ${this[11]}, ${this[15]})`};var B=Ke;function On(e,t,n,i){this.west=y(e,0),this.south=y(t,0),this.east=y(n,0),this.north=y(i,0)}Object.defineProperties(On.prototype,{width:{get:function(){return On.computeWidth(this)}},height:{get:function(){return On.computeHeight(this)}}});On.packedLength=4;On.pack=function(e,t,n){return n=y(n,0),t[n++]=e.west,t[n++]=e.south,t[n++]=e.east,t[n]=e.north,t};On.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new On),n.west=e[t++],n.south=e[t++],n.east=e[t++],n.north=e[t],n};On.computeWidth=function(e){let t=e.east,n=e.west;return t<n&&(t+=R.TWO_PI),t-n};On.computeHeight=function(e){return e.north-e.south};On.fromDegrees=function(e,t,n,i,o){return e=R.toRadians(y(e,0)),t=R.toRadians(y(t,0)),n=R.toRadians(y(n,0)),i=R.toRadians(y(i,0)),l(o)?(o.west=e,o.south=t,o.east=n,o.north=i,o):new On(e,t,n,i)};On.fromRadians=function(e,t,n,i,o){return l(o)?(o.west=y(e,0),o.south=y(t,0),o.east=y(n,0),o.north=y(i,0),o):new On(e,t,n,i)};On.fromCartographicArray=function(e,t){let n=Number.MAX_VALUE,i=-Number.MAX_VALUE,o=Number.MAX_VALUE,r=-Number.MAX_VALUE,s=Number.MAX_VALUE,a=-Number.MAX_VALUE;for(let c=0,u=e.length;c<u;c++){let f=e[c];n=Math.min(n,f.longitude),i=Math.max(i,f.longitude),s=Math.min(s,f.latitude),a=Math.max(a,f.latitude);let d=f.longitude>=0?f.longitude:f.longitude+R.TWO_PI;o=Math.min(o,d),r=Math.max(r,d)}return i-n>r-o&&(n=o,i=r,i>R.PI&&(i=i-R.TWO_PI),n>R.PI&&(n=n-R.TWO_PI)),l(t)?(t.west=n,t.south=s,t.east=i,t.north=a,t):new On(n,s,i,a)};On.fromCartesianArray=function(e,t,n){t=y(t,re.WGS84);let i=Number.MAX_VALUE,o=-Number.MAX_VALUE,r=Number.MAX_VALUE,s=-Number.MAX_VALUE,a=Number.MAX_VALUE,c=-Number.MAX_VALUE;for(let u=0,f=e.length;u<f;u++){let d=t.cartesianToCartographic(e[u]);i=Math.min(i,d.longitude),o=Math.max(o,d.longitude),a=Math.min(a,d.latitude),c=Math.max(c,d.latitude);let p=d.longitude>=0?d.longitude:d.longitude+R.TWO_PI;r=Math.min(r,p),s=Math.max(s,p)}return o-i>s-r&&(i=r,o=s,o>R.PI&&(o=o-R.TWO_PI),i>R.PI&&(i=i-R.TWO_PI)),l(n)?(n.west=i,n.south=a,n.east=o,n.north=c,n):new On(i,a,o,c)};On.clone=function(e,t){if(!!l(e))return l(t)?(t.west=e.west,t.south=e.south,t.east=e.east,t.north=e.north,t):new On(e.west,e.south,e.east,e.north)};On.equalsEpsilon=function(e,t,n){return n=y(n,0),e===t||l(e)&&l(t)&&Math.abs(e.west-t.west)<=n&&Math.abs(e.south-t.south)<=n&&Math.abs(e.east-t.east)<=n&&Math.abs(e.north-t.north)<=n};On.prototype.clone=function(e){return On.clone(this,e)};On.prototype.equals=function(e){return On.equals(this,e)};On.equals=function(e,t){return e===t||l(e)&&l(t)&&e.west===t.west&&e.south===t.south&&e.east===t.east&&e.north===t.north};On.prototype.equalsEpsilon=function(e,t){return On.equalsEpsilon(this,e,t)};On.validate=function(e){};On.southwest=function(e,t){return l(t)?(t.longitude=e.west,t.latitude=e.south,t.height=0,t):new me(e.west,e.south)};On.northwest=function(e,t){return l(t)?(t.longitude=e.west,t.latitude=e.north,t.height=0,t):new me(e.west,e.north)};On.northeast=function(e,t){return l(t)?(t.longitude=e.east,t.latitude=e.north,t.height=0,t):new me(e.east,e.north)};On.southeast=function(e,t){return l(t)?(t.longitude=e.east,t.latitude=e.south,t.height=0,t):new me(e.east,e.south)};On.center=function(e,t){let n=e.east,i=e.west;n<i&&(n+=R.TWO_PI);let o=R.negativePiToPi((i+n)*.5),r=(e.south+e.north)*.5;return l(t)?(t.longitude=o,t.latitude=r,t.height=0,t):new me(o,r)};On.intersection=function(e,t,n){let i=e.east,o=e.west,r=t.east,s=t.west;i<o&&r>0?i+=R.TWO_PI:r<s&&i>0&&(r+=R.TWO_PI),i<o&&s<0?s+=R.TWO_PI:r<s&&o<0&&(o+=R.TWO_PI);let a=R.negativePiToPi(Math.max(o,s)),c=R.negativePiToPi(Math.min(i,r));if((e.west<e.east||t.west<t.east)&&c<=a)return;let u=Math.max(e.south,t.south),f=Math.min(e.north,t.north);if(!(u>=f))return l(n)?(n.west=a,n.south=u,n.east=c,n.north=f,n):new On(a,u,c,f)};On.simpleIntersection=function(e,t,n){let i=Math.max(e.west,t.west),o=Math.max(e.south,t.south),r=Math.min(e.east,t.east),s=Math.min(e.north,t.north);if(!(o>=s||i>=r))return l(n)?(n.west=i,n.south=o,n.east=r,n.north=s,n):new On(i,o,r,s)};On.union=function(e,t,n){l(n)||(n=new On);let i=e.east,o=e.west,r=t.east,s=t.west;i<o&&r>0?i+=R.TWO_PI:r<s&&i>0&&(r+=R.TWO_PI),i<o&&s<0?s+=R.TWO_PI:r<s&&o<0&&(o+=R.TWO_PI);let a=R.negativePiToPi(Math.min(o,s)),c=R.negativePiToPi(Math.max(i,r));return n.west=a,n.south=Math.min(e.south,t.south),n.east=c,n.north=Math.max(e.north,t.north),n};On.expand=function(e,t,n){return l(n)||(n=new On),n.west=Math.min(e.west,t.longitude),n.south=Math.min(e.south,t.latitude),n.east=Math.max(e.east,t.longitude),n.north=Math.max(e.north,t.latitude),n};On.contains=function(e,t){let n=t.longitude,i=t.latitude,o=e.west,r=e.east;return r<o&&(r+=R.TWO_PI,n<0&&(n+=R.TWO_PI)),(n>o||R.equalsEpsilon(n,o,R.EPSILON14))&&(n<r||R.equalsEpsilon(n,r,R.EPSILON14))&&i>=e.south&&i<=e.north};var FTe=new me;On.subsample=function(e,t,n,i){t=y(t,re.WGS84),n=y(n,0),l(i)||(i=[]);let o=0,r=e.north,s=e.south,a=e.east,c=e.west,u=FTe;u.height=n,u.longitude=c,u.latitude=r,i[o]=t.cartographicToCartesian(u,i[o]),o++,u.longitude=a,i[o]=t.cartographicToCartesian(u,i[o]),o++,u.latitude=s,i[o]=t.cartographicToCartesian(u,i[o]),o++,u.longitude=c,i[o]=t.cartographicToCartesian(u,i[o]),o++,r<0?u.latitude=r:s>0?u.latitude=s:u.latitude=0;for(let f=1;f<8;++f)u.longitude=-Math.PI+f*R.PI_OVER_TWO,On.contains(e,u)&&(i[o]=t.cartographicToCartesian(u,i[o]),o++);return u.latitude===0&&(u.longitude=c,i[o]=t.cartographicToCartesian(u,i[o]),o++,u.longitude=a,i[o]=t.cartographicToCartesian(u,i[o]),o++),i.length=o,i};On.subsection=function(e,t,n,i,o,r){if(l(r)||(r=new On),e.west<=e.east){let a=e.east-e.west;r.west=e.west+t*a,r.east=e.west+i*a}else{let a=R.TWO_PI+e.east-e.west;r.west=R.negativePiToPi(e.west+t*a),r.east=R.negativePiToPi(e.west+i*a)}let s=e.north-e.south;return r.south=e.south+n*s,r.north=e.south+o*s,t===1&&(r.west=e.east),i===1&&(r.east=e.east),n===1&&(r.south=e.north),o===1&&(r.north=e.north),r};On.MAX_VALUE=Object.freeze(new On(-Math.PI,-R.PI_OVER_TWO,Math.PI,R.PI_OVER_TWO));var de=On;function cn(e,t){this.center=h.clone(y(e,h.ZERO)),this.radius=y(t,0)}var v8=new h,D8=new h,P8=new h,I8=new h,O8=new h,R8=new h,M8=new h,Ns=new h,B8=new h,L8=new h,N8=new h,F8=new h,VTe=4/3*R.PI;cn.fromPoints=function(e,t){if(l(t)||(t=new cn),!l(e)||e.length===0)return t.center=h.clone(h.ZERO,t.center),t.radius=0,t;let n=h.clone(e[0],M8),i=h.clone(n,v8),o=h.clone(n,D8),r=h.clone(n,P8),s=h.clone(n,I8),a=h.clone(n,O8),c=h.clone(n,R8),u=e.length,f;for(f=1;f<u;f++){h.clone(e[f],n);let I=n.x,L=n.y,N=n.z;I<i.x&&h.clone(n,i),I>s.x&&h.clone(n,s),L<o.y&&h.clone(n,o),L>a.y&&h.clone(n,a),N<r.z&&h.clone(n,r),N>c.z&&h.clone(n,c)}let d=h.magnitudeSquared(h.subtract(s,i,Ns)),p=h.magnitudeSquared(h.subtract(a,o,Ns)),_=h.magnitudeSquared(h.subtract(c,r,Ns)),m=i,x=s,C=d;p>C&&(C=p,m=o,x=a),_>C&&(C=_,m=r,x=c);let A=B8;A.x=(m.x+x.x)*.5,A.y=(m.y+x.y)*.5,A.z=(m.z+x.z)*.5;let T=h.magnitudeSquared(h.subtract(x,A,Ns)),b=Math.sqrt(T),S=L8;S.x=i.x,S.y=o.y,S.z=r.z;let w=N8;w.x=s.x,w.y=a.y,w.z=c.z;let D=h.midpoint(S,w,F8),O=0;for(f=0;f<u;f++){h.clone(e[f],n);let I=h.magnitude(h.subtract(n,D,Ns));I>O&&(O=I);let L=h.magnitudeSquared(h.subtract(n,A,Ns));if(L>T){let N=Math.sqrt(L);b=(b+N)*.5,T=b*b;let g=N-b;A.x=(b*A.x+g*n.x)/N,A.y=(b*A.y+g*n.y)/N,A.z=(b*A.z+g*n.z)/N}}return b<O?(h.clone(A,t.center),t.radius=b):(h.clone(D,t.center),t.radius=O),t};var kTe=new Si,UTe=new h,zTe=new h,S8=new me,w8=new me;cn.fromRectangle2D=function(e,t,n){return cn.fromRectangleWithHeights2D(e,t,0,0,n)};cn.fromRectangleWithHeights2D=function(e,t,n,i,o){if(l(o)||(o=new cn),!l(e))return o.center=h.clone(h.ZERO,o.center),o.radius=0,o;t=y(t,kTe),de.southwest(e,S8),S8.height=n,de.northeast(e,w8),w8.height=i;let r=t.project(S8,UTe),s=t.project(w8,zTe),a=s.x-r.x,c=s.y-r.y,u=s.z-r.z;o.radius=Math.sqrt(a*a+c*c+u*u)*.5;let f=o.center;return f.x=r.x+a*.5,f.y=r.y+c*.5,f.z=r.z+u*.5,o};var HTe=[];cn.fromRectangle3D=function(e,t,n,i){if(t=y(t,re.WGS84),n=y(n,0),l(i)||(i=new cn),!l(e))return i.center=h.clone(h.ZERO,i.center),i.radius=0,i;let o=de.subsample(e,t,n,HTe);return cn.fromPoints(o,i)};cn.fromVertices=function(e,t,n,i){if(l(i)||(i=new cn),!l(e)||e.length===0)return i.center=h.clone(h.ZERO,i.center),i.radius=0,i;t=y(t,h.ZERO),n=y(n,3);let o=M8;o.x=e[0]+t.x,o.y=e[1]+t.y,o.z=e[2]+t.z;let r=h.clone(o,v8),s=h.clone(o,D8),a=h.clone(o,P8),c=h.clone(o,I8),u=h.clone(o,O8),f=h.clone(o,R8),d=e.length,p;for(p=0;p<d;p+=n){let N=e[p]+t.x,g=e[p+1]+t.y,E=e[p+2]+t.z;o.x=N,o.y=g,o.z=E,N<r.x&&h.clone(o,r),N>c.x&&h.clone(o,c),g<s.y&&h.clone(o,s),g>u.y&&h.clone(o,u),E<a.z&&h.clone(o,a),E>f.z&&h.clone(o,f)}let _=h.magnitudeSquared(h.subtract(c,r,Ns)),m=h.magnitudeSquared(h.subtract(u,s,Ns)),x=h.magnitudeSquared(h.subtract(f,a,Ns)),C=r,A=c,T=_;m>T&&(T=m,C=s,A=u),x>T&&(T=x,C=a,A=f);let b=B8;b.x=(C.x+A.x)*.5,b.y=(C.y+A.y)*.5,b.z=(C.z+A.z)*.5;let S=h.magnitudeSquared(h.subtract(A,b,Ns)),w=Math.sqrt(S),D=L8;D.x=r.x,D.y=s.y,D.z=a.z;let O=N8;O.x=c.x,O.y=u.y,O.z=f.z;let I=h.midpoint(D,O,F8),L=0;for(p=0;p<d;p+=n){o.x=e[p]+t.x,o.y=e[p+1]+t.y,o.z=e[p+2]+t.z;let N=h.magnitude(h.subtract(o,I,Ns));N>L&&(L=N);let g=h.magnitudeSquared(h.subtract(o,b,Ns));if(g>S){let E=Math.sqrt(g);w=(w+E)*.5,S=w*w;let v=E-w;b.x=(w*b.x+v*o.x)/E,b.y=(w*b.y+v*o.y)/E,b.z=(w*b.z+v*o.z)/E}}return w<L?(h.clone(b,i.center),i.radius=w):(h.clone(I,i.center),i.radius=L),i};cn.fromEncodedCartesianVertices=function(e,t,n){if(l(n)||(n=new cn),!l(e)||!l(t)||e.length!==t.length||e.length===0)return n.center=h.clone(h.ZERO,n.center),n.radius=0,n;let i=M8;i.x=e[0]+t[0],i.y=e[1]+t[1],i.z=e[2]+t[2];let o=h.clone(i,v8),r=h.clone(i,D8),s=h.clone(i,P8),a=h.clone(i,I8),c=h.clone(i,O8),u=h.clone(i,R8),f=e.length,d;for(d=0;d<f;d+=3){let L=e[d]+t[d],N=e[d+1]+t[d+1],g=e[d+2]+t[d+2];i.x=L,i.y=N,i.z=g,L<o.x&&h.clone(i,o),L>a.x&&h.clone(i,a),N<r.y&&h.clone(i,r),N>c.y&&h.clone(i,c),g<s.z&&h.clone(i,s),g>u.z&&h.clone(i,u)}let p=h.magnitudeSquared(h.subtract(a,o,Ns)),_=h.magnitudeSquared(h.subtract(c,r,Ns)),m=h.magnitudeSquared(h.subtract(u,s,Ns)),x=o,C=a,A=p;_>A&&(A=_,x=r,C=c),m>A&&(A=m,x=s,C=u);let T=B8;T.x=(x.x+C.x)*.5,T.y=(x.y+C.y)*.5,T.z=(x.z+C.z)*.5;let b=h.magnitudeSquared(h.subtract(C,T,Ns)),S=Math.sqrt(b),w=L8;w.x=o.x,w.y=r.y,w.z=s.z;let D=N8;D.x=a.x,D.y=c.y,D.z=u.z;let O=h.midpoint(w,D,F8),I=0;for(d=0;d<f;d+=3){i.x=e[d]+t[d],i.y=e[d+1]+t[d+1],i.z=e[d+2]+t[d+2];let L=h.magnitude(h.subtract(i,O,Ns));L>I&&(I=L);let N=h.magnitudeSquared(h.subtract(i,T,Ns));if(N>b){let g=Math.sqrt(N);S=(S+g)*.5,b=S*S;let E=g-S;T.x=(S*T.x+E*i.x)/g,T.y=(S*T.y+E*i.y)/g,T.z=(S*T.z+E*i.z)/g}}return S<I?(h.clone(T,n.center),n.radius=S):(h.clone(O,n.center),n.radius=I),n};cn.fromCornerPoints=function(e,t,n){l(n)||(n=new cn);let i=h.midpoint(e,t,n.center);return n.radius=h.distance(i,t),n};cn.fromEllipsoid=function(e,t){return l(t)||(t=new cn),h.clone(h.ZERO,t.center),t.radius=e.maximumRadius,t};var GTe=new h;cn.fromBoundingSpheres=function(e,t){if(l(t)||(t=new cn),!l(e)||e.length===0)return t.center=h.clone(h.ZERO,t.center),t.radius=0,t;let n=e.length;if(n===1)return cn.clone(e[0],t);if(n===2)return cn.union(e[0],e[1],t);let i=[],o;for(o=0;o<n;o++)i.push(e[o].center);t=cn.fromPoints(i,t);let r=t.center,s=t.radius;for(o=0;o<n;o++){let a=e[o];s=Math.max(s,h.distance(r,a.center,GTe)+a.radius)}return t.radius=s,t};var WTe=new h,jTe=new h,qTe=new h;cn.fromOrientedBoundingBox=function(e,t){l(t)||(t=new cn);let n=e.halfAxes,i=Q.getColumn(n,0,WTe),o=Q.getColumn(n,1,jTe),r=Q.getColumn(n,2,qTe);return h.add(i,o,i),h.add(i,r,i),t.center=h.clone(e.center,t.center),t.radius=h.magnitude(i),t};var YTe=new h,XTe=new h;cn.fromTransformation=function(e,t){l(t)||(t=new cn);let n=B.getTranslation(e,YTe),i=B.getScale(e,XTe),o=.5*h.magnitude(i);return t.center=h.clone(n,t.center),t.radius=o,t};cn.clone=function(e,t){if(!!l(e))return l(t)?(t.center=h.clone(e.center,t.center),t.radius=e.radius,t):new cn(e.center,e.radius)};cn.packedLength=4;cn.pack=function(e,t,n){n=y(n,0);let i=e.center;return t[n++]=i.x,t[n++]=i.y,t[n++]=i.z,t[n]=e.radius,t};cn.unpack=function(e,t,n){t=y(t,0),l(n)||(n=new cn);let i=n.center;return i.x=e[t++],i.y=e[t++],i.z=e[t++],n.radius=e[t],n};var KTe=new h,$Te=new h;cn.union=function(e,t,n){l(n)||(n=new cn);let i=e.center,o=e.radius,r=t.center,s=t.radius,a=h.subtract(r,i,KTe),c=h.magnitude(a);if(o>=c+s)return e.clone(n),n;if(s>=c+o)return t.clone(n),n;let u=(o+c+s)*.5,f=h.multiplyByScalar(a,(-o+u)/c,$Te);return h.add(f,i,f),h.clone(f,n.center),n.radius=u,n};var ZTe=new h;cn.expand=function(e,t,n){n=cn.clone(e,n);let i=h.magnitude(h.subtract(t,n.center,ZTe));return i>n.radius&&(n.radius=i),n};cn.intersectPlane=function(e,t){let n=e.center,i=e.radius,o=t.normal,r=h.dot(o,n)+t.distance;return r<-i?Zt.OUTSIDE:r<i?Zt.INTERSECTING:Zt.INSIDE};cn.transform=function(e,t,n){return l(n)||(n=new cn),n.center=B.multiplyByPoint(t,e.center,n.center),n.radius=B.getMaximumScale(t)*e.radius,n};var JTe=new h;cn.distanceSquaredTo=function(e,t){let n=h.subtract(e.center,t,JTe),i=h.magnitude(n)-e.radius;return i<=0?0:i*i};cn.transformWithoutScale=function(e,t,n){return l(n)||(n=new cn),n.center=B.multiplyByPoint(t,e.center,n.center),n.radius=e.radius,n};var QTe=new h;cn.computePlaneDistances=function(e,t,n,i){l(i)||(i=new Jc);let o=h.subtract(e.center,t,QTe),r=h.dot(n,o);return i.start=r-e.radius,i.stop=r+e.radius,i};var KX=new h,ebe=new h,tbe=new h,nbe=new h,ibe=new h,obe=new me,$X=new Array(8);for(let e=0;e<8;++e)$X[e]=new h;var rbe=new Si;cn.projectTo2D=function(e,t,n){t=y(t,rbe);let i=t.ellipsoid,o=e.center,r=e.radius,s;h.equals(o,h.ZERO)?s=h.clone(h.UNIT_X,KX):s=i.geodeticSurfaceNormal(o,KX);let a=h.cross(h.UNIT_Z,s,ebe);h.normalize(a,a);let c=h.cross(s,a,tbe);h.normalize(c,c),h.multiplyByScalar(s,r,s),h.multiplyByScalar(c,r,c),h.multiplyByScalar(a,r,a);let u=h.negate(c,ibe),f=h.negate(a,nbe),d=$X,p=d[0];h.add(s,c,p),h.add(p,a,p),p=d[1],h.add(s,c,p),h.add(p,f,p),p=d[2],h.add(s,u,p),h.add(p,f,p),p=d[3],h.add(s,u,p),h.add(p,a,p),h.negate(s,s),p=d[4],h.add(s,c,p),h.add(p,a,p),p=d[5],h.add(s,c,p),h.add(p,f,p),p=d[6],h.add(s,u,p),h.add(p,f,p),p=d[7],h.add(s,u,p),h.add(p,a,p);let _=d.length;for(let A=0;A<_;++A){let T=d[A];h.add(o,T,T);let b=i.cartesianToCartographic(T,obe);t.project(b,T)}n=cn.fromPoints(d,n),o=n.center;let m=o.x,x=o.y,C=o.z;return o.x=C,o.y=m,o.z=x,n};cn.isOccluded=function(e,t){return!t.isBoundingSphereVisible(e)};cn.equals=function(e,t){return e===t||l(e)&&l(t)&&h.equals(e.center,t.center)&&e.radius===t.radius};cn.prototype.intersectPlane=function(e){return cn.intersectPlane(this,e)};cn.prototype.distanceSquaredTo=function(e){return cn.distanceSquaredTo(this,e)};cn.prototype.computePlaneDistances=function(e,t,n){return cn.computePlaneDistances(this,e,t,n)};cn.prototype.isOccluded=function(e){return cn.isOccluded(this,e)};cn.prototype.equals=function(e){return cn.equals(this,e)};cn.prototype.clone=function(e){return cn.clone(this,e)};cn.prototype.volume=function(){let e=this.radius;return VTe*e*e*e};var oe=cn;var ei=Zc(iK());function V8(e,t){let n;return typeof document<"u"&&(n=document),V8._implementation(e,t,n)}V8._implementation=function(e,t,n){if(!l(t)){if(typeof n>"u")return e;t=y(n.baseURI,n.location.href)}let i=new ei.default(e);return i.scheme()!==""?i.toString():i.absoluteTo(t).toString()};var qf=V8;function oK(e,t){if(e===null||typeof e!="object")return e;t=y(t,!1);let n=new e.constructor;for(let i in e)if(e.hasOwnProperty(i)){let o=e[i];t&&(o=oK(o,t)),n[i]=o}return n}var Qe=oK;function rK(e,t,n){n=y(n,!1);let i={},o=l(e),r=l(t),s,a,c;if(o)for(s in e)e.hasOwnProperty(s)&&(a=e[s],r&&n&&typeof a=="object"&&t.hasOwnProperty(s)?(c=t[s],typeof c=="object"?i[s]=rK(a,c,n):i[s]=a):i[s]=a);if(r)for(s in t)t.hasOwnProperty(s)&&!i.hasOwnProperty(s)&&(c=t[s],i[s]=c);return i}var at=rK;function sbe(){let e,t,n=new Promise(function(i,o){e=i,t=o});return{resolve:e,reject:t,promise:n}}var Qr=sbe;function abe(e,t){let n="",i=e.lastIndexOf("/");return i!==-1&&(n=e.substring(0,i+1)),t&&(e=new ei.default(e),e.query().length!==0&&(n+=`?${e.query()}`),e.fragment().length!==0&&(n+=`#${e.fragment()}`)),n}var bP=abe;function cbe(e){let t=new ei.default(e);t.normalize();let n=t.path(),i=n.lastIndexOf("/");return i!==-1&&(n=n.substr(i+1)),i=n.lastIndexOf("."),i===-1?n="":n=n.substr(i+1),n}var jC=cbe;var sK={};function lbe(e,t,n){l(t)||(t=e.width),l(n)||(n=e.height);let i=sK[t];l(i)||(i={},sK[t]=i);let o=i[n];if(!l(o)){let r=document.createElement("canvas");r.width=t,r.height=n,o=r.getContext("2d"),o.globalCompositeOperation="copy",i[n]=o}return o.drawImage(e,0,0,t,n),o.getImageData(0,0,t,n).data}var ch=lbe;var ube=/^blob:/i;function fbe(e){return ube.test(e)}var qC=fbe;var lh;function dbe(e){l(lh)||(lh=document.createElement("a")),lh.href=window.location.href;let t=lh.host,n=lh.protocol;return lh.href=e,lh.href=lh.href,n!==lh.protocol||t!==lh.host}var YC=dbe;var hbe=/^data:/i;function mbe(e){return hbe.test(e)}var __=mbe;function pbe(e){let t=document.createElement("script");return t.async=!0,t.src=e,new Promise((n,i)=>{window.crossOriginIsolated&&t.setAttribute("crossorigin","anonymous");let o=document.getElementsByTagName("head")[0];t.onload=function(){t.onload=void 0,o.removeChild(t),n()},t.onerror=function(r){i(r)},o.appendChild(t)})}var XC=pbe;function _be(e){let t="";for(let n in e)if(e.hasOwnProperty(n)){let i=e[n],o=`${encodeURIComponent(n)}=`;if(Array.isArray(i))for(let r=0,s=i.length;r<s;++r)t+=`${o+encodeURIComponent(i[r])}&`;else t+=`${o+encodeURIComponent(i)}&`}return t=t.slice(0,-1),t}var KC=_be;function gbe(e){let t={};if(e==="")return t;let n=e.replace(/\+/g,"%20").split(/[&;]/);for(let i=0,o=n.length;i<o;++i){let r=n[i].split("="),s=decodeURIComponent(r[0]),a=r[1];l(a)?a=decodeURIComponent(a):a="";let c=t[s];typeof c=="string"?t[s]=[c,a]:Array.isArray(c)?c.push(a):t[s]=a}return t}var Mu=gbe;var ybe={UNISSUED:0,ISSUED:1,ACTIVE:2,RECEIVED:3,CANCELLED:4,FAILED:5},ui=Object.freeze(ybe);var xbe={TERRAIN:0,IMAGERY:1,TILES3D:2,OTHER:3},or=Object.freeze(xbe);function EP(e){e=y(e,y.EMPTY_OBJECT);let t=y(e.throttleByServer,!1),n=y(e.throttle,!1);this.url=e.url,this.requestFunction=e.requestFunction,this.cancelFunction=e.cancelFunction,this.priorityFunction=e.priorityFunction,this.priority=y(e.priority,0),this.throttle=n,this.throttleByServer=t,this.type=y(e.type,or.OTHER),this.serverKey=void 0,this.state=ui.UNISSUED,this.deferred=void 0,this.cancelled=!1}EP.prototype.cancel=function(){this.cancelled=!0};EP.prototype.clone=function(e){return l(e)?(e.url=this.url,e.requestFunction=this.requestFunction,e.cancelFunction=this.cancelFunction,e.priorityFunction=this.priorityFunction,e.priority=this.priority,e.throttle=this.throttle,e.throttleByServer=this.throttleByServer,e.type=this.type,e.serverKey=this.serverKey,e.state=this.RequestState.UNISSUED,e.deferred=void 0,e.cancelled=!1,e):new EP(this)};var rr=EP;function Cbe(e){let t={};if(!e)return t;let n=e.split(`\r
94
94
  `);for(let i=0;i<n.length;++i){let o=n[i],r=o.indexOf(": ");if(r>0){let s=o.substring(0,r),a=o.substring(r+2);t[s]=a}}return t}var SP=Cbe;function aK(e,t,n){this.statusCode=e,this.response=t,this.responseHeaders=n,typeof this.responseHeaders=="string"&&(this.responseHeaders=SP(this.responseHeaders))}aK.prototype.toString=function(){let e="Request has failed.";return l(this.statusCode)&&(e+=` Status Code: ${this.statusCode}`),e};var Lm=aK;function aS(){this._listeners=[],this._scopes=[],this._toRemove=[],this._insideRaiseEvent=!1}Object.defineProperties(aS.prototype,{numberOfListeners:{get:function(){return this._listeners.length-this._toRemove.length}}});aS.prototype.addEventListener=function(e,t){this._listeners.push(e),this._scopes.push(t);let n=this;return function(){n.removeEventListener(e,t)}};aS.prototype.removeEventListener=function(e,t){let n=this._listeners,i=this._scopes,o=-1;for(let r=0;r<n.length;r++)if(n[r]===e&&i[r]===t){o=r;break}return o!==-1?(this._insideRaiseEvent?(this._toRemove.push(o),n[o]=void 0,i[o]=void 0):(n.splice(o,1),i.splice(o,1)),!0):!1};function Abe(e,t){return t-e}aS.prototype.raiseEvent=function(){this._insideRaiseEvent=!0;let e,t=this._listeners,n=this._scopes,i=t.length;for(e=0;e<i;e++){let r=t[e];l(r)&&t[e].apply(n[e],arguments)}let o=this._toRemove;if(i=o.length,i>0){for(o.sort(Abe),e=0;e<i;e++){let r=o[e];t.splice(r,1),n.splice(r,1)}o.length=0}this._insideRaiseEvent=!1};var _e=aS;function ty(e){this._comparator=e.comparator,this._array=[],this._length=0,this._maximumLength=void 0}Object.defineProperties(ty.prototype,{length:{get:function(){return this._length}},internalArray:{get:function(){return this._array}},maximumLength:{get:function(){return this._maximumLength},set:function(e){let t=this._length;if(e<t){let n=this._array;for(let i=e;i<t;++i)n[i]=void 0;this._length=e,n.length=e}this._maximumLength=e}},comparator:{get:function(){return this._comparator}}});function k8(e,t,n){let i=e[t];e[t]=e[n],e[n]=i}ty.prototype.reserve=function(e){e=y(e,this._length),this._array.length=e};ty.prototype.heapify=function(e){e=y(e,0);let t=this._length,n=this._comparator,i=this._array,o=-1,r=!0;for(;r;){let s=2*(e+1),a=s-1;a<t&&n(i[a],i[e])<0?o=a:o=e,s<t&&n(i[s],i[o])<0&&(o=s),o!==e?(k8(i,o,e),e=o):r=!1}};ty.prototype.resort=function(){let e=this._length;for(let t=Math.ceil(e/2);t>=0;--t)this.heapify(t)};ty.prototype.insert=function(e){let t=this._array,n=this._comparator,i=this._maximumLength,o=this._length++;for(o<t.length?t[o]=e:t.push(e);o!==0;){let s=Math.floor((o-1)/2);if(n(t[o],t[s])<0)k8(t,o,s),o=s;else break}let r;return l(i)&&this._length>i&&(r=t[i],this._length=i),r};ty.prototype.pop=function(e){if(e=y(e,0),this._length===0)return;let t=this._array,n=t[e];return k8(t,e,--this._length),this.heapify(e),t[this._length]=void 0,n};var wP=ty;function Tbe(e,t){return e.priority-t.priority}var Yi={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0},$C=20,Ba=new wP({comparator:Tbe});Ba.maximumLength=$C;Ba.reserve($C);var uh=[],Nm={},bbe=typeof document<"u"?new ei.default(document.location.href):new ei.default,vP=new _e;function qo(){}qo.maximumRequests=50;qo.maximumRequestsPerServer=6;qo.requestsByServer={"api.cesium.com:443":18,"assets.cesium.com:443":18};qo.throttleRequests=!0;qo.debugShowStatistics=!1;qo.requestCompletedEvent=vP;Object.defineProperties(qo,{statistics:{get:function(){return Yi}},priorityHeapLength:{get:function(){return $C},set:function(e){if(e<$C)for(;Ba.length>e;){let t=Ba.pop();ny(t)}$C=e,Ba.maximumLength=e,Ba.reserve(e)}}});function cK(e){l(e.priorityFunction)&&(e.priority=e.priorityFunction())}qo.serverHasOpenSlots=function(e,t){t=y(t,1);let n=y(qo.requestsByServer[e],qo.maximumRequestsPerServer);return Nm[e]+t<=n};qo.heapHasOpenSlots=function(e){return Ba.length+e<=$C};function lK(e){return e.state===ui.UNISSUED&&(e.state=ui.ISSUED,e.deferred=Qr()),e.deferred.promise}function Ebe(e){return function(t){if(e.state===ui.CANCELLED)return;let n=e.deferred;--Yi.numberOfActiveRequests,--Nm[e.serverKey],vP.raiseEvent(),e.state=ui.RECEIVED,e.deferred=void 0,n.resolve(t)}}function Sbe(e){return function(t){e.state!==ui.CANCELLED&&(++Yi.numberOfFailedRequests,--Yi.numberOfActiveRequests,--Nm[e.serverKey],vP.raiseEvent(t),e.state=ui.FAILED,e.deferred.reject(t))}}function uK(e){let t=lK(e);return e.state=ui.ACTIVE,uh.push(e),++Yi.numberOfActiveRequests,++Yi.numberOfActiveRequestsEver,++Nm[e.serverKey],e.requestFunction().then(Ebe(e)).catch(Sbe(e)),t}function ny(e){let t=e.state===ui.ACTIVE;if(e.state=ui.CANCELLED,++Yi.numberOfCancelledRequests,l(e.deferred)){let n=e.deferred;e.deferred=void 0,n.reject()}t&&(--Yi.numberOfActiveRequests,--Nm[e.serverKey],++Yi.numberOfCancelledActiveRequests),l(e.cancelFunction)&&e.cancelFunction()}qo.update=function(){let e,t,n=0,i=uh.length;for(e=0;e<i;++e){if(t=uh[e],t.cancelled&&ny(t),t.state!==ui.ACTIVE){++n;continue}n>0&&(uh[e-n]=t)}uh.length-=n;let o=Ba.internalArray,r=Ba.length;for(e=0;e<r;++e)cK(o[e]);Ba.resort();let s=Math.max(qo.maximumRequests-uh.length,0),a=0;for(;a<s&&Ba.length>0;){if(t=Ba.pop(),t.cancelled){ny(t);continue}if(t.throttleByServer&&!qo.serverHasOpenSlots(t.serverKey)){ny(t);continue}uK(t),++a}wbe()};qo.getServerKey=function(e){let t=new ei.default(e);t.scheme()===""&&(t=new ei.default(e).absoluteTo(bbe),t.normalize());let n=t.authority();/:/.test(n)||(n=`${n}:${t.scheme()==="https"?"443":"80"}`);let i=Nm[n];return l(i)||(Nm[n]=0),n};qo.request=function(e){if(__(e.url)||qC(e.url))return vP.raiseEvent(),e.state=ui.RECEIVED,e.requestFunction();if(++Yi.numberOfAttemptedRequests,l(e.serverKey)||(e.serverKey=qo.getServerKey(e.url)),qo.throttleRequests&&e.throttleByServer&&!qo.serverHasOpenSlots(e.serverKey))return;if(!qo.throttleRequests||!e.throttle)return uK(e);if(uh.length>=qo.maximumRequests)return;cK(e);let t=Ba.insert(e);if(l(t)){if(t===e)return;ny(t)}return lK(e)};function wbe(){!qo.debugShowStatistics||(Yi.numberOfActiveRequests===0&&Yi.lastNumberOfActiveRequests>0&&(Yi.numberOfAttemptedRequests>0&&(console.log(`Number of attempted requests: ${Yi.numberOfAttemptedRequests}`),Yi.numberOfAttemptedRequests=0),Yi.numberOfCancelledRequests>0&&(console.log(`Number of cancelled requests: ${Yi.numberOfCancelledRequests}`),Yi.numberOfCancelledRequests=0),Yi.numberOfCancelledActiveRequests>0&&(console.log(`Number of cancelled active requests: ${Yi.numberOfCancelledActiveRequests}`),Yi.numberOfCancelledActiveRequests=0),Yi.numberOfFailedRequests>0&&(console.log(`Number of failed requests: ${Yi.numberOfFailedRequests}`),Yi.numberOfFailedRequests=0)),Yi.lastNumberOfActiveRequests=Yi.numberOfActiveRequests)}qo.clearForSpecs=function(){for(;Ba.length>0;){let t=Ba.pop();ny(t)}let e=uh.length;for(let t=0;t<e;++t)ny(uh[t]);uh.length=0,Nm={},Yi.numberOfAttemptedRequests=0,Yi.numberOfActiveRequests=0,Yi.numberOfCancelledRequests=0,Yi.numberOfCancelledActiveRequests=0,Yi.numberOfFailedRequests=0,Yi.numberOfActiveRequestsEver=0,Yi.lastNumberOfActiveRequests=0};qo.numberOfActiveRequestsByServer=function(e){return Nm[e]};qo.requestHeap=Ba;var fc=qo;var cS={},ZC={};cS.add=function(e,t){let n=`${e.toLowerCase()}:${t}`;l(ZC[n])||(ZC[n]=!0)};cS.remove=function(e,t){let n=`${e.toLowerCase()}:${t}`;l(ZC[n])&&delete ZC[n]};function vbe(e){let t=new ei.default(e);t.normalize();let n=t.authority();if(n.length!==0){if(t.authority(n),n.indexOf("@")!==-1&&(n=n.split("@")[1]),n.indexOf(":")===-1){let i=t.scheme();if(i.length===0&&(i=window.location.protocol,i=i.substring(0,i.length-1)),i==="http")n+=":80";else if(i==="https")n+=":443";else return}return n}}cS.contains=function(e){let t=vbe(e);return!!(l(t)&&l(ZC[t]))};cS.clear=function(){ZC={}};var lS=cS;var hK=function(){try{let e=new XMLHttpRequest;return e.open("GET","#",!0),e.responseType="blob",e.responseType==="blob"}catch{return!1}}();function z8(e,t,n,i){let o=e.query();if(o.length===0)return{};let r;if(o.indexOf("=")===-1){let s={};s[o]=void 0,r=s}else r=Mu(o);n?t._queryParameters=PP(r,t._queryParameters,i):t._queryParameters=r,e.search("")}function Dbe(e,t){let n=t._queryParameters,i=Object.keys(n);i.length===1&&!l(n[i[0]])?e.search(i[0]):e.search(KC(n))}function fh(e,t){return l(e)?l(e.clone)?e.clone():Qe(e):t}function H8(e){if(e.state===ui.ISSUED||e.state===ui.ACTIVE)throw new fe("The Resource is already being fetched.");e.state=ui.UNISSUED,e.deferred=void 0}function PP(e,t,n){if(!n)return at(e,t);let i=Qe(e,!0);for(let o in t)if(t.hasOwnProperty(o)){let r=i[o],s=t[o];l(r)?(Array.isArray(r)||(r=i[o]=[r]),i[o]=r.concat(s)):i[o]=Array.isArray(s)?s.slice():s}return i}function Ct(e){e=y(e,y.EMPTY_OBJECT),typeof e=="string"&&(e={url:e}),this._url=void 0,this._templateValues=fh(e.templateValues,{}),this._queryParameters=fh(e.queryParameters,{}),this.headers=fh(e.headers,{}),this.request=y(e.request,new rr),this.proxy=e.proxy,this.retryCallback=e.retryCallback,this.retryAttempts=y(e.retryAttempts,0),this._retryCount=0;let t=new ei.default(e.url);z8(t,this,!0,!0),t.fragment(""),this._url=t.toString()}Ct.createIfNeeded=function(e){return e instanceof Ct?e.getDerivedResource({request:e.request}):typeof e!="string"?e:new Ct({url:e})};var JC;Ct.supportsImageBitmapOptions=function(){if(l(JC))return JC;if(typeof createImageBitmap!="function")return JC=Promise.resolve(!1),JC;let e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAAE4g3rEiDgAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADElEQVQI12Ng6GAAAAEUAIngE3ZiAAAAAElFTkSuQmCC";return JC=Ct.fetchBlob({url:e}).then(function(t){let n={imageOrientation:"flipY",premultiplyAlpha:"none",colorSpaceConversion:"none"};return Promise.all([createImageBitmap(t,n),createImageBitmap(t)])}).then(function(t){let n=ch(t[0]),i=ch(t[1]);return n[1]!==i[1]}).catch(function(){return!1}),JC};Object.defineProperties(Ct,{isBlobSupported:{get:function(){return hK}}});Object.defineProperties(Ct.prototype,{queryParameters:{get:function(){return this._queryParameters}},templateValues:{get:function(){return this._templateValues}},url:{get:function(){return this.getUrlComponent(!0,!0)},set:function(e){let t=new ei.default(e);z8(t,this,!1),t.fragment(""),this._url=t.toString()}},extension:{get:function(){return jC(this._url)}},isDataUri:{get:function(){return __(this._url)}},isBlobUri:{get:function(){return qC(this._url)}},isCrossOriginUrl:{get:function(){return YC(this._url)}},hasHeaders:{get:function(){return Object.keys(this.headers).length>0}}});Ct.prototype.toString=function(){return this.getUrlComponent(!0,!0)};Ct.prototype.getUrlComponent=function(e,t){if(this.isDataUri)return this._url;let n=new ei.default(this._url);e&&Dbe(n,this);let i=n.toString().replace(/%7B/g,"{").replace(/%7D/g,"}"),o=this._templateValues;return i=i.replace(/{(.*?)}/g,function(r,s){let a=o[s];return l(a)?encodeURIComponent(a):r}),t&&l(this.proxy)&&(i=this.proxy.getURL(i)),i};Ct.prototype.setQueryParameters=function(e,t){t?this._queryParameters=PP(this._queryParameters,e,!1):this._queryParameters=PP(e,this._queryParameters,!1)};Ct.prototype.appendQueryParameters=function(e){this._queryParameters=PP(e,this._queryParameters,!0)};Ct.prototype.setTemplateValues=function(e,t){t?this._templateValues=at(this._templateValues,e):this._templateValues=at(e,this._templateValues)};Ct.prototype.getDerivedResource=function(e){let t=this.clone();if(t._retryCount=0,l(e.url)){let n=new ei.default(e.url),i=y(e.preserveQueryParameters,!1);z8(n,t,!0,i),n.fragment(""),n.scheme()!==""?t._url=n.toString():t._url=n.absoluteTo(new ei.default(qf(this._url))).toString()}return l(e.queryParameters)&&(t._queryParameters=at(e.queryParameters,t._queryParameters)),l(e.templateValues)&&(t._templateValues=at(e.templateValues,t.templateValues)),l(e.headers)&&(t.headers=at(e.headers,t.headers)),l(e.proxy)&&(t.proxy=e.proxy),l(e.request)&&(t.request=e.request),l(e.retryCallback)&&(t.retryCallback=e.retryCallback),l(e.retryAttempts)&&(t.retryAttempts=e.retryAttempts),t};Ct.prototype.retryOnError=function(e){let t=this.retryCallback;if(typeof t!="function"||this._retryCount>=this.retryAttempts)return Promise.resolve(!1);let n=this;return Promise.resolve(t(this,e)).then(function(i){return++n._retryCount,i})};Ct.prototype.clone=function(e){return l(e)||(e=new Ct({url:this._url})),e._url=this._url,e._queryParameters=Qe(this._queryParameters),e._templateValues=Qe(this._templateValues),e.headers=Qe(this.headers),e.proxy=this.proxy,e.retryCallback=this.retryCallback,e.retryAttempts=this.retryAttempts,e._retryCount=0,e.request=this.request.clone(),e};Ct.prototype.getBaseUri=function(e){return bP(this.getUrlComponent(e),e)};Ct.prototype.appendForwardSlash=function(){this._url=hP(this._url)};Ct.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})};Ct.fetchArrayBuffer=function(e){return new Ct(e).fetchArrayBuffer()};Ct.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})};Ct.fetchBlob=function(e){return new Ct(e).fetchBlob()};Ct.prototype.fetchImage=function(e){e=y(e,y.EMPTY_OBJECT);let t=y(e.preferImageBitmap,!1),n=y(e.preferBlob,!1),i=y(e.flipY,!1),o=y(e.skipColorSpaceConversion,!1);if(H8(this.request),!hK||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!n)return U8({resource:this,flipY:i,skipColorSpaceConversion:o,preferImageBitmap:t});let r=this.fetchBlob();if(!l(r))return;let s,a,c,u;return Ct.supportsImageBitmapOptions().then(function(f){return s=f,a=s&&t,r}).then(function(f){if(!l(f))return;if(u=f,a)return Ct.createImageBitmapFromBlob(f,{flipY:i,premultiplyAlpha:!1,skipColorSpaceConversion:o});let d=window.URL.createObjectURL(f);return c=new Ct({url:d}),U8({resource:c,flipY:i,skipColorSpaceConversion:o,preferImageBitmap:!1})}).then(function(f){if(!!l(f))return f.blob=u,a||window.URL.revokeObjectURL(c.url),f}).catch(function(f){return l(c)&&window.URL.revokeObjectURL(c.url),f.blob=u,Promise.reject(f)})};function U8(e){let t=e.resource,n=e.flipY,i=e.skipColorSpaceConversion,o=e.preferImageBitmap,r=t.request;r.url=t.url,r.requestFunction=function(){let a=!1;!t.isDataUri&&!t.isBlobUri&&(a=t.isCrossOriginUrl);let c=Qr();return Ct._Implementations.createImage(r,a,c,n,i,o),c.promise};let s=fc.request(r);if(!!l(s))return s.catch(function(a){return r.state!==ui.FAILED?Promise.reject(a):t.retryOnError(a).then(function(c){return c?(r.state=ui.UNISSUED,r.deferred=void 0,U8({resource:t,flipY:n,skipColorSpaceConversion:i,preferImageBitmap:o})):Promise.reject(a)})})}Ct.fetchImage=function(e){return new Ct(e).fetchImage({flipY:e.flipY,skipColorSpaceConversion:e.skipColorSpaceConversion,preferBlob:e.preferBlob,preferImageBitmap:e.preferImageBitmap})};Ct.prototype.fetchText=function(){return this.fetch({responseType:"text"})};Ct.fetchText=function(e){return new Ct(e).fetchText()};Ct.prototype.fetchJson=function(){let e=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if(!!l(e))return e.then(function(t){if(!!l(t))return JSON.parse(t)})};Ct.fetchJson=function(e){return new Ct(e).fetchJson()};Ct.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})};Ct.fetchXML=function(e){return new Ct(e).fetchXML()};Ct.prototype.fetchJsonp=function(e){e=y(e,"callback"),H8(this.request);let t;do t=`loadJsonp${R.nextRandomNumber().toString().substring(2,8)}`;while(l(window[t]));return mK(this,e,t)};function mK(e,t,n){let i={};i[t]=n,e.setQueryParameters(i);let o=e.request;o.url=e.url,o.requestFunction=function(){let s=Qr();return window[n]=function(a){s.resolve(a);try{delete window[n]}catch{window[n]=void 0}},Ct._Implementations.loadAndExecuteScript(e.url,n,s),s.promise};let r=fc.request(o);if(!!l(r))return r.catch(function(s){return o.state!==ui.FAILED?Promise.reject(s):e.retryOnError(s).then(function(a){return a?(o.state=ui.UNISSUED,o.deferred=void 0,mK(e,t,n)):Promise.reject(s)})})}Ct.fetchJsonp=function(e){return new Ct(e).fetchJsonp(e.callbackParameterName)};Ct.prototype._makeRequest=function(e){let t=this;H8(t.request);let n=t.request;n.url=t.url,n.requestFunction=function(){let o=e.responseType,r=at(e.headers,t.headers),s=e.overrideMimeType,a=e.method,c=e.data,u=Qr(),f=Ct._Implementations.loadWithXhr(t.url,o,a,c,r,u,s);return l(f)&&l(f.abort)&&(n.cancelFunction=function(){f.abort()}),u.promise};let i=fc.request(n);if(!!l(i))return i.then(function(o){return n.cancelFunction=void 0,o}).catch(function(o){return n.cancelFunction=void 0,n.state!==ui.FAILED?Promise.reject(o):t.retryOnError(o).then(function(r){return r?(n.state=ui.UNISSUED,n.deferred=void 0,t.fetch(e)):Promise.reject(o)})})};var Pbe=/^data:(.*?)(;base64)?,(.*)$/;function DP(e,t){let n=decodeURIComponent(t);return e?atob(n):n}function fK(e,t){let n=DP(e,t),i=new ArrayBuffer(n.length),o=new Uint8Array(i);for(let r=0;r<n.length;r++)o[r]=n.charCodeAt(r);return i}function Ibe(e,t){t=y(t,"");let n=e[1],i=!!e[2],o=e[3],r,s;switch(t){case"":case"text":return DP(i,o);case"arraybuffer":return fK(i,o);case"blob":return r=fK(i,o),new Blob([r],{type:n});case"document":return s=new DOMParser,s.parseFromString(DP(i,o),n);case"json":return JSON.parse(DP(i,o));default:}}Ct.prototype.fetch=function(e){return e=fh(e,{}),e.method="GET",this._makeRequest(e)};Ct.fetch=function(e){return new Ct(e).fetch({responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Ct.prototype.delete=function(e){return e=fh(e,{}),e.method="DELETE",this._makeRequest(e)};Ct.delete=function(e){return new Ct(e).delete({responseType:e.responseType,overrideMimeType:e.overrideMimeType,data:e.data})};Ct.prototype.head=function(e){return e=fh(e,{}),e.method="HEAD",this._makeRequest(e)};Ct.head=function(e){return new Ct(e).head({responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Ct.prototype.options=function(e){return e=fh(e,{}),e.method="OPTIONS",this._makeRequest(e)};Ct.options=function(e){return new Ct(e).options({responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Ct.prototype.post=function(e,t){return Nl.defined("data",e),t=fh(t,{}),t.method="POST",t.data=e,this._makeRequest(t)};Ct.post=function(e){return new Ct(e).post(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Ct.prototype.put=function(e,t){return Nl.defined("data",e),t=fh(t,{}),t.method="PUT",t.data=e,this._makeRequest(t)};Ct.put=function(e){return new Ct(e).put(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Ct.prototype.patch=function(e,t){return Nl.defined("data",e),t=fh(t,{}),t.method="PATCH",t.data=e,this._makeRequest(t)};Ct.patch=function(e){return new Ct(e).patch(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Ct._Implementations={};Ct._Implementations.loadImageElement=function(e,t,n){let i=new Image;i.onload=function(){i.naturalWidth===0&&i.naturalHeight===0&&i.width===0&&i.height===0&&(i.width=300,i.height=150),n.resolve(i)},i.onerror=function(o){n.reject(o)},t&&(lS.contains(e)?i.crossOrigin="use-credentials":i.crossOrigin=""),i.src=e};Ct._Implementations.createImage=function(e,t,n,i,o,r){let s=e.url;Ct.supportsImageBitmapOptions().then(function(a){if(!(a&&r)){Ct._Implementations.loadImageElement(s,t,n);return}let c="blob",u="GET",f=Qr(),d=Ct._Implementations.loadWithXhr(s,c,u,void 0,void 0,f,void 0,void 0,void 0);return l(d)&&l(d.abort)&&(e.cancelFunction=function(){d.abort()}),f.promise.then(function(p){if(!l(p)){n.reject(new fe(`Successfully retrieved ${s} but it contained no content.`));return}return Ct.createImageBitmapFromBlob(p,{flipY:i,premultiplyAlpha:!1,skipColorSpaceConversion:o})}).then(function(p){n.resolve(p)})}).catch(function(a){n.reject(a)})};Ct.createImageBitmapFromBlob=function(e,t){return Nl.defined("options",t),Nl.typeOf.bool("options.flipY",t.flipY),Nl.typeOf.bool("options.premultiplyAlpha",t.premultiplyAlpha),Nl.typeOf.bool("options.skipColorSpaceConversion",t.skipColorSpaceConversion),createImageBitmap(e,{imageOrientation:t.flipY?"flipY":"none",premultiplyAlpha:t.premultiplyAlpha?"premultiply":"none",colorSpaceConversion:t.skipColorSpaceConversion?"none":"default"})};function dK(e,t){switch(t){case"text":return e.toString("utf8");case"json":return JSON.parse(e.toString("utf8"));default:return new Uint8Array(e).buffer}}function Obe(e,t,n,i,o,r,s){let a=p_("url").parse(e),c=a.protocol==="https:"?p_("https"):p_("http"),u=p_("zlib"),f={protocol:a.protocol,hostname:a.hostname,port:a.port,path:a.path,query:a.query,method:n,headers:o};c.request(f).on("response",function(d){if(d.statusCode<200||d.statusCode>=300){r.reject(new Lm(d.statusCode,d,d.headers));return}let p=[];d.on("data",function(_){p.push(_)}),d.on("end",function(){let _=Buffer.concat(p);d.headers["content-encoding"]==="gzip"?u.gunzip(_,function(m,x){m?r.reject(new fe("Error decompressing response.")):r.resolve(dK(x,t))}):r.resolve(dK(_,t))})}).on("error",function(d){r.reject(new Lm)}).end()}var Rbe=typeof XMLHttpRequest>"u";Ct._Implementations.loadWithXhr=function(e,t,n,i,o,r,s){let a=Pbe.exec(e);if(a!==null){r.resolve(Ibe(a,t));return}if(Rbe){Obe(e,t,n,i,o,r,s);return}let c=new XMLHttpRequest;if(lS.contains(e)&&(c.withCredentials=!0),c.open(n,e,!0),l(s)&&l(c.overrideMimeType)&&c.overrideMimeType(s),l(o))for(let f in o)o.hasOwnProperty(f)&&c.setRequestHeader(f,o[f]);l(t)&&(c.responseType=t);let u=!1;return typeof e=="string"&&(u=e.indexOf("file://")===0||typeof window<"u"&&window.location.origin==="file://"),c.onload=function(){if((c.status<200||c.status>=300)&&!(u&&c.status===0)){r.reject(new Lm(c.status,c.response,c.getAllResponseHeaders()));return}let f=c.response,d=c.responseType;if(n==="HEAD"||n==="OPTIONS"){let _=c.getAllResponseHeaders().trim().split(/[\r\n]+/),m={};_.forEach(function(x){let C=x.split(": "),A=C.shift();m[A]=C.join(": ")}),r.resolve(m);return}if(c.status===204)r.resolve();else if(l(f)&&(!l(t)||d===t))r.resolve(f);else if(t==="json"&&typeof f=="string")try{r.resolve(JSON.parse(f))}catch(p){r.reject(p)}else(d===""||d==="document")&&l(c.responseXML)&&c.responseXML.hasChildNodes()?r.resolve(c.responseXML):(d===""||d==="text")&&l(c.responseText)?r.resolve(c.responseText):r.reject(new fe("Invalid XMLHttpRequest response type."))},c.onerror=function(f){r.reject(new Lm)},c.send(i),c};Ct._Implementations.loadAndExecuteScript=function(e,t,n){return XC(e,t).catch(function(i){n.reject(i)})};Ct._DefaultImplementations={};Ct._DefaultImplementations.createImage=Ct._Implementations.createImage;Ct._DefaultImplementations.loadWithXhr=Ct._Implementations.loadWithXhr;Ct._DefaultImplementations.loadAndExecuteScript=Ct._Implementations.loadAndExecuteScript;Ct.DEFAULT=Object.freeze(new Ct({url:typeof document>"u"?"":document.location.href.split("?")[0]}));var De=Ct;var pK=/((?:.*\/)|^)Cesium\.js(?:\?|\#|$)/;function Mbe(){let e=document.getElementsByTagName("script");for(let t=0,n=e.length;t<n;++t){let i=e[t].getAttribute("src"),o=pK.exec(i);if(o!==null)return o[1]}}var QC;function _K(e){return typeof document>"u"?e:(l(QC)||(QC=document.createElement("a")),QC.href=e,QC.href=QC.href,QC.href)}var iy;function gK(){if(l(iy))return iy;let e;return typeof CESIUM_BASE_URL<"u"?e=CESIUM_BASE_URL:typeof define=="object"&&l(define.amd)&&!define.amd.toUrlUndefined&&l(p_.toUrl)?e=qf("..",oy("Core/buildModuleUrl.js")):e=Mbe(),iy=new De({url:_K(e)}),iy.appendForwardSlash(),iy}function Bbe(e){return _K(p_.toUrl(`../${e}`))}function yK(e){return gK().getDerivedResource({url:e}).url}var IP;function oy(e){return l(IP)||(typeof define=="object"&&l(define.amd)&&!define.amd.toUrlUndefined&&l(p_.toUrl)?IP=Bbe:IP=yK),IP(e)}oy._cesiumScriptRegex=pK;oy._buildModuleUrlFromBaseUrl=yK;oy._clearBaseResource=function(){iy=void 0};oy.setBaseUrl=function(e){iy=De.DEFAULT.getDerivedResource({url:e})};oy.getCesiumBaseUrl=gK;var Jt=oy;function bt(e,t){this.x=y(e,0),this.y=y(t,0)}bt.fromElements=function(e,t,n){return l(n)?(n.x=e,n.y=t,n):new bt(e,t)};bt.clone=function(e,t){if(!!l(e))return l(t)?(t.x=e.x,t.y=e.y,t):new bt(e.x,e.y)};bt.fromCartesian3=bt.clone;bt.fromCartesian4=bt.clone;bt.packedLength=2;bt.pack=function(e,t,n){return n=y(n,0),t[n++]=e.x,t[n]=e.y,t};bt.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new bt),n.x=e[t++],n.y=e[t],n};bt.packArray=function(e,t){let n=e.length,i=n*2;l(t)?!Array.isArray(t)&&t.length!==i||t.length!==i&&(t.length=i):t=new Array(i);for(let o=0;o<n;++o)bt.pack(e[o],t,o*2);return t};bt.unpackArray=function(e,t){let n=e.length;l(t)?t.length=n/2:t=new Array(n/2);for(let i=0;i<n;i+=2){let o=i/2;t[o]=bt.unpack(e,i,t[o])}return t};bt.fromArray=bt.unpack;bt.maximumComponent=function(e){return Math.max(e.x,e.y)};bt.minimumComponent=function(e){return Math.min(e.x,e.y)};bt.minimumByComponent=function(e,t,n){return n.x=Math.min(e.x,t.x),n.y=Math.min(e.y,t.y),n};bt.maximumByComponent=function(e,t,n){return n.x=Math.max(e.x,t.x),n.y=Math.max(e.y,t.y),n};bt.clamp=function(e,t,n,i){let o=R.clamp(e.x,t.x,n.x),r=R.clamp(e.y,t.y,n.y);return i.x=o,i.y=r,i};bt.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y};bt.magnitude=function(e){return Math.sqrt(bt.magnitudeSquared(e))};var OP=new bt;bt.distance=function(e,t){return bt.subtract(e,t,OP),bt.magnitude(OP)};bt.distanceSquared=function(e,t){return bt.subtract(e,t,OP),bt.magnitudeSquared(OP)};bt.normalize=function(e,t){let n=bt.magnitude(e);return t.x=e.x/n,t.y=e.y/n,t};bt.dot=function(e,t){return e.x*t.x+e.y*t.y};bt.cross=function(e,t){return e.x*t.y-e.y*t.x};bt.multiplyComponents=function(e,t,n){return n.x=e.x*t.x,n.y=e.y*t.y,n};bt.divideComponents=function(e,t,n){return n.x=e.x/t.x,n.y=e.y/t.y,n};bt.add=function(e,t,n){return n.x=e.x+t.x,n.y=e.y+t.y,n};bt.subtract=function(e,t,n){return n.x=e.x-t.x,n.y=e.y-t.y,n};bt.multiplyByScalar=function(e,t,n){return n.x=e.x*t,n.y=e.y*t,n};bt.divideByScalar=function(e,t,n){return n.x=e.x/t,n.y=e.y/t,n};bt.negate=function(e,t){return t.x=-e.x,t.y=-e.y,t};bt.abs=function(e,t){return t.x=Math.abs(e.x),t.y=Math.abs(e.y),t};var xK=new bt;bt.lerp=function(e,t,n,i){return bt.multiplyByScalar(t,n,xK),i=bt.multiplyByScalar(e,1-n,i),bt.add(xK,i,i)};var CK=new bt,AK=new bt;bt.angleBetween=function(e,t){return bt.normalize(e,CK),bt.normalize(t,AK),R.acosClamped(bt.dot(CK,AK))};var Lbe=new bt;bt.mostOrthogonalAxis=function(e,t){let n=bt.normalize(e,Lbe);return bt.abs(n,n),n.x<=n.y?t=bt.clone(bt.UNIT_X,t):t=bt.clone(bt.UNIT_Y,t),t};bt.equals=function(e,t){return e===t||l(e)&&l(t)&&e.x===t.x&&e.y===t.y};bt.equalsArray=function(e,t,n){return e.x===t[n]&&e.y===t[n+1]};bt.equalsEpsilon=function(e,t,n,i){return e===t||l(e)&&l(t)&&R.equalsEpsilon(e.x,t.x,n,i)&&R.equalsEpsilon(e.y,t.y,n,i)};bt.ZERO=Object.freeze(new bt(0,0));bt.ONE=Object.freeze(new bt(1,1));bt.UNIT_X=Object.freeze(new bt(1,0));bt.UNIT_Y=Object.freeze(new bt(0,1));bt.prototype.clone=function(e){return bt.clone(this,e)};bt.prototype.equals=function(e){return bt.equals(this,e)};bt.prototype.equalsEpsilon=function(e,t,n){return bt.equalsEpsilon(this,e,t,n)};bt.prototype.toString=function(){return`(${this.x}, ${this.y})`};var G=bt;function g_(e){e=y(e,y.EMPTY_OBJECT),this._ellipsoid=y(e.ellipsoid,re.WGS84),this._rectangle=y(e.rectangle,de.MAX_VALUE),this._projection=new Si(this._ellipsoid),this._numberOfLevelZeroTilesX=y(e.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=y(e.numberOfLevelZeroTilesY,1)}Object.defineProperties(g_.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}});g_.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<<e};g_.prototype.getNumberOfYTilesAtLevel=function(e){return this._numberOfLevelZeroTilesY<<e};g_.prototype.rectangleToNativeRectangle=function(e,t){let n=R.toDegrees(e.west),i=R.toDegrees(e.south),o=R.toDegrees(e.east),r=R.toDegrees(e.north);return l(t)?(t.west=n,t.south=i,t.east=o,t.north=r,t):new de(n,i,o,r)};g_.prototype.tileXYToNativeRectangle=function(e,t,n,i){let o=this.tileXYToRectangle(e,t,n,i);return o.west=R.toDegrees(o.west),o.south=R.toDegrees(o.south),o.east=R.toDegrees(o.east),o.north=R.toDegrees(o.north),o};g_.prototype.tileXYToRectangle=function(e,t,n,i){let o=this._rectangle,r=this.getNumberOfXTilesAtLevel(n),s=this.getNumberOfYTilesAtLevel(n),a=o.width/r,c=e*a+o.west,u=(e+1)*a+o.west,f=o.height/s,d=o.north-t*f,p=o.north-(t+1)*f;return l(i)||(i=new de(c,p,u,d)),i.west=c,i.south=p,i.east=u,i.north=d,i};g_.prototype.positionToTileXY=function(e,t,n){let i=this._rectangle;if(!de.contains(i,e))return;let o=this.getNumberOfXTilesAtLevel(t),r=this.getNumberOfYTilesAtLevel(t),s=i.width/o,a=i.height/r,c=e.longitude;i.east<i.west&&(c+=R.TWO_PI);let u=(c-i.west)/s|0;u>=o&&(u=o-1);let f=(i.north-e.latitude)/a|0;return f>=r&&(f=r-1),l(n)?(n.x=u,n.y=f,n):new G(u,f)};var Xi=g_;var TK=new h,bK=new h,EK=new me,G8=new h,Nbe=new h,SK=new oe,Fbe=new Xi,uS=[new me,new me,new me,new me],fS=new G,Ur={};Ur.initialize=function(){let e=Ur._initPromise;return l(e)||(e=De.fetchJson(Jt("Assets/approximateTerrainHeights.json")).then(function(t){Ur._terrainHeights=t}),Ur._initPromise=e),e};Ur.getMinimumMaximumHeights=function(e,t){t=y(t,re.WGS84);let n=wK(e),i=Ur._defaultMinTerrainHeight,o=Ur._defaultMaxTerrainHeight;if(l(n)){let r=`${n.level}-${n.x}-${n.y}`,s=Ur._terrainHeights[r];l(s)&&(i=s[0],o=s[1]),t.cartographicToCartesian(de.northeast(e,EK),TK),t.cartographicToCartesian(de.southwest(e,EK),bK),h.midpoint(bK,TK,G8);let a=t.scaleToGeodeticSurface(G8,Nbe);if(l(a)){let c=h.distance(G8,a);i=Math.min(i,-c)}else i=Ur._defaultMinTerrainHeight}return i=Math.max(Ur._defaultMinTerrainHeight,i),{minimumTerrainHeight:i,maximumTerrainHeight:o}};Ur.getBoundingSphere=function(e,t){t=y(t,re.WGS84);let n=wK(e),i=Ur._defaultMaxTerrainHeight;if(l(n)){let r=`${n.level}-${n.x}-${n.y}`,s=Ur._terrainHeights[r];l(s)&&(i=s[1])}let o=oe.fromRectangle3D(e,t,0);return oe.fromRectangle3D(e,t,i,SK),oe.union(o,SK,o)};function wK(e){me.fromRadians(e.east,e.north,0,uS[0]),me.fromRadians(e.west,e.north,0,uS[1]),me.fromRadians(e.east,e.south,0,uS[2]),me.fromRadians(e.west,e.south,0,uS[3]);let t=0,n=0,i=0,o=0,r=Ur._terrainHeightsMaxLevel,s;for(s=0;s<=r;++s){let a=!1;for(let c=0;c<4;++c){let u=uS[c];if(Fbe.positionToTileXY(u,s,fS),c===0)i=fS.x,o=fS.y;else if(i!==fS.x||o!==fS.y){a=!0;break}}if(a)break;t=i,n=o}if(s!==0)return{x:t,y:n,level:s>r?r:s-1}}Ur._terrainHeightsMaxLevel=6;Ur._defaultMaxTerrainHeight=9e3;Ur._defaultMinTerrainHeight=-1e5;Ur._terrainHeights=void 0;Ur._initPromise=void 0;Object.defineProperties(Ur,{initialized:{get:function(){return l(Ur._terrainHeights)}}});var ai=Ur;var dS=Zc(vK());var Vbe=0,q8={};function Fm(e,t){let n,i=e;l(q8[i])?n=q8[i]:(n=Vbe++,q8[i]=n),t=y(t,!1),this._id=n,this._html=e,this._showOnScreen=t,this._element=void 0}Object.defineProperties(Fm.prototype,{html:{get:function(){return this._html}},id:{get:function(){return this._id}},showOnScreen:{get:function(){return this._showOnScreen},set:function(e){this._showOnScreen=e}},element:{get:function(){if(!l(this._element)){let e=dS.default.sanitize(this._html),t=document.createElement("div");t._creditId=this._id,t.style.display="inline",t.innerHTML=e;let n=t.querySelectorAll("a");for(let i=0;i<n.length;i++)n[i].setAttribute("target","_blank");this._element=t}return this._element}}});Fm.equals=function(e,t){return e===t||l(e)&&l(t)&&e._id===t._id&&e._showOnScreen===t._showOnScreen};Fm.prototype.equals=function(e){return Fm.equals(this,e)};Fm.getIonCredit=function(e){let t=l(e.collapsible)&&!e.collapsible,n=new Fm(e.html,t);return n._isIon=n.html.indexOf("ion-credit.png")!==-1,n};Fm.clone=function(e){if(l(e))return new Fm(e.html,e.showOnScreen)};var Ht=Fm;var kbe={NONE:0,LERC:1},Vm=Object.freeze(kbe);function dc(e,t,n){this.minimum=h.clone(y(e,h.ZERO)),this.maximum=h.clone(y(t,h.ZERO)),l(n)?n=h.clone(n):n=h.midpoint(this.minimum,this.maximum,new h),this.center=n}dc.fromCorners=function(e,t,n){return l(n)||(n=new dc),n.minimum=h.clone(e,n.minimum),n.maximum=h.clone(t,n.maximum),n.center=h.midpoint(e,t,n.center),n};dc.fromPoints=function(e,t){if(l(t)||(t=new dc),!l(e)||e.length===0)return t.minimum=h.clone(h.ZERO,t.minimum),t.maximum=h.clone(h.ZERO,t.maximum),t.center=h.clone(h.ZERO,t.center),t;let n=e[0].x,i=e[0].y,o=e[0].z,r=e[0].x,s=e[0].y,a=e[0].z,c=e.length;for(let d=1;d<c;d++){let p=e[d],_=p.x,m=p.y,x=p.z;n=Math.min(_,n),r=Math.max(_,r),i=Math.min(m,i),s=Math.max(m,s),o=Math.min(x,o),a=Math.max(x,a)}let u=t.minimum;u.x=n,u.y=i,u.z=o;let f=t.maximum;return f.x=r,f.y=s,f.z=a,t.center=h.midpoint(u,f,t.center),t};dc.clone=function(e,t){if(!!l(e))return l(t)?(t.minimum=h.clone(e.minimum,t.minimum),t.maximum=h.clone(e.maximum,t.maximum),t.center=h.clone(e.center,t.center),t):new dc(e.minimum,e.maximum,e.center)};dc.equals=function(e,t){return e===t||l(e)&&l(t)&&h.equals(e.center,t.center)&&h.equals(e.minimum,t.minimum)&&h.equals(e.maximum,t.maximum)};var RP=new h;dc.intersectPlane=function(e,t){RP=h.subtract(e.maximum,e.minimum,RP);let n=h.multiplyByScalar(RP,.5,RP),i=t.normal,o=n.x*Math.abs(i.x)+n.y*Math.abs(i.y)+n.z*Math.abs(i.z),r=h.dot(e.center,i)+t.distance;return r-o>0?Zt.INSIDE:r+o<0?Zt.OUTSIDE:Zt.INTERSECTING};dc.prototype.clone=function(e){return dc.clone(this,e)};dc.prototype.intersectPlane=function(e){return dc.intersectPlane(this,e)};dc.prototype.equals=function(e){return dc.equals(this,e)};var ry=dc;function dh(e,t){this._ellipsoid=e,this._cameraPosition=new h,this._cameraPositionInScaledSpace=new h,this._distanceToLimbInScaledSpaceSquared=0,l(t)&&(this.cameraPosition=t)}Object.defineProperties(dh.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},cameraPosition:{get:function(){return this._cameraPosition},set:function(e){let n=this._ellipsoid.transformPositionToScaledSpace(e,this._cameraPositionInScaledSpace),i=h.magnitudeSquared(n)-1;h.clone(e,this._cameraPosition),this._cameraPositionInScaledSpace=n,this._distanceToLimbInScaledSpaceSquared=i}}});var DK=new h;dh.prototype.isPointVisible=function(e){let n=this._ellipsoid.transformPositionToScaledSpace(e,DK);return X8(n,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};dh.prototype.isScaledSpacePointVisible=function(e){return X8(e,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};var Ube=new h;dh.prototype.isScaledSpacePointVisiblePossiblyUnderEllipsoid=function(e,t){let n=this._ellipsoid,i,o;return l(t)&&t<0&&n.minimumRadius>-t?(o=Ube,o.x=this._cameraPosition.x/(n.radii.x+t),o.y=this._cameraPosition.y/(n.radii.y+t),o.z=this._cameraPosition.z/(n.radii.z+t),i=o.x*o.x+o.y*o.y+o.z*o.z-1):(o=this._cameraPositionInScaledSpace,i=this._distanceToLimbInScaledSpaceSquared),X8(e,o,i)};dh.prototype.computeHorizonCullingPoint=function(e,t,n){return OK(this._ellipsoid,e,t,n)};var PK=re.clone(re.UNIT_SPHERE);dh.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid=function(e,t,n,i){let o=IK(this._ellipsoid,n,PK);return OK(o,e,t,i)};dh.prototype.computeHorizonCullingPointFromVertices=function(e,t,n,i,o){return RK(this._ellipsoid,e,t,n,i,o)};dh.prototype.computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid=function(e,t,n,i,o,r){let s=IK(this._ellipsoid,o,PK);return RK(s,e,t,n,i,r)};var zbe=[];dh.prototype.computeHorizonCullingPointFromRectangle=function(e,t,n){let i=de.subsample(e,t,0,zbe),o=oe.fromPoints(i);if(!(h.magnitude(o.center)<.1*t.minimumRadius))return this.computeHorizonCullingPoint(o.center,i,n)};var Hbe=new h;function IK(e,t,n){if(l(t)&&t<0&&e.minimumRadius>-t){let i=h.fromElements(e.radii.x+t,e.radii.y+t,e.radii.z+t,Hbe);e=re.fromCartesian3(i,n)}return e}function OK(e,t,n,i){l(i)||(i=new h);let o=LK(e,t),r=0;for(let s=0,a=n.length;s<a;++s){let c=n[s],u=MK(e,c,o);if(u<0)return;r=Math.max(r,u)}return BK(o,r,i)}var MP=new h;function RK(e,t,n,i,o,r){l(r)||(r=new h),i=y(i,3),o=y(o,h.ZERO);let s=LK(e,t),a=0;for(let c=0,u=n.length;c<u;c+=i){MP.x=n[c]+o.x,MP.y=n[c+1]+o.y,MP.z=n[c+2]+o.z;let f=MK(e,MP,s);if(f<0)return;a=Math.max(a,f)}return BK(s,a,r)}function X8(e,t,n){let i=t,o=n,r=h.subtract(e,i,DK),s=-h.dot(r,i);return!(o<0?s>0:s>o&&s*s/h.magnitudeSquared(r)>o)}var Gbe=new h,Wbe=new h;function MK(e,t,n){let i=e.transformPositionToScaledSpace(t,Gbe),o=h.magnitudeSquared(i),r=Math.sqrt(o),s=h.divideByScalar(i,r,Wbe);o=Math.max(1,o),r=Math.max(1,r);let a=h.dot(s,n),c=h.magnitude(h.cross(s,n,s)),u=1/r,f=Math.sqrt(o-1)*u;return 1/(a*u-c*f)}function BK(e,t,n){if(!(t<=0||t===1/0||t!==t))return h.multiplyByScalar(e,t,n)}var Y8=new h;function LK(e,t){return h.equals(t,h.ZERO)?t:(e.transformPositionToScaledSpace(t,Y8),h.normalize(Y8,Y8))}var y_=dh;var K8={};K8.computeDiscriminant=function(e,t,n){return t*t-4*e*n};function NK(e,t,n){let i=e+t;return R.sign(e)!==R.sign(t)&&Math.abs(i/Math.max(Math.abs(e),Math.abs(t)))<n?0:i}K8.computeRealRoots=function(e,t,n){let i;if(e===0)return t===0?[]:[-n/t];if(t===0){if(n===0)return[0,0];let c=Math.abs(n),u=Math.abs(e);if(c<u&&c/u<R.EPSILON14)return[0,0];if(c>u&&u/c<R.EPSILON14)return[];if(i=-n/e,i<0)return[];let f=Math.sqrt(i);return[-f,f]}else if(n===0)return i=-t/e,i<0?[i,0]:[0,i];let o=t*t,r=4*e*n,s=NK(o,-r,R.EPSILON14);if(s<0)return[];let a=-.5*NK(t,R.sign(t)*Math.sqrt(s),R.EPSILON14);return t>0?[a/e,n/a]:[n/a,a/e]};var Qc=K8;var Z8={};Z8.computeDiscriminant=function(e,t,n,i){let o=e*e,r=t*t,s=n*n,a=i*i;return 18*e*t*n*i+r*s-27*o*a-4*(e*s*n+r*t*i)};function $8(e,t,n,i){let o=e,r=t/3,s=n/3,a=i,c=o*s,u=r*a,f=r*r,d=s*s,p=o*s-f,_=o*a-r*s,m=r*a-d,x=4*p*m-_*_,C,A;if(x<0){let Y,j,X;f*u>=c*d?(Y=o,j=p,X=-2*r*p+o*_):(Y=a,j=m,X=-a*_+2*s*m);let $=-(X<0?-1:1)*Math.abs(Y)*Math.sqrt(-x);A=-X+$;let J=A/2,ce=J<0?-Math.pow(-J,1/3):Math.pow(J,1/3),he=A===$?-ce:-j/ce;return C=j<=0?ce+he:-X/(ce*ce+he*he+j),f*u>=c*d?[(C-r)/o]:[-a/(C+s)]}let T=p,b=-2*r*p+o*_,S=m,w=-a*_+2*s*m,D=Math.sqrt(x),O=Math.sqrt(3)/2,I=Math.abs(Math.atan2(o*D,-b)/3);C=2*Math.sqrt(-T);let L=Math.cos(I);A=C*L;let N=C*(-L/2-O*Math.sin(I)),g=A+N>2*r?A-r:N-r,E=o,v=g/E;I=Math.abs(Math.atan2(a*D,-w)/3),C=2*Math.sqrt(-S),L=Math.cos(I),A=C*L,N=C*(-L/2-O*Math.sin(I));let P=-a,M=A+N<2*s?A+s:N+s,V=P/M,U=E*M,k=-g*M-E*P,H=g*P,F=(s*k-r*H)/(-r*k+s*U);return v<=F?v<=V?F<=V?[v,F,V]:[v,V,F]:[V,v,F]:v<=V?[F,v,V]:F<=V?[F,V,v]:[V,F,v]}Z8.computeRealRoots=function(e,t,n,i){let o,r;if(e===0)return Qc.computeRealRoots(t,n,i);if(t===0){if(n===0){if(i===0)return[0,0,0];r=-i/e;let s=r<0?-Math.pow(-r,1/3):Math.pow(r,1/3);return[s,s,s]}else if(i===0)return o=Qc.computeRealRoots(e,0,n),o.Length===0?[0]:[o[0],0,o[1]];return $8(e,0,n,i)}else{if(n===0)return i===0?(r=-t/e,r<0?[r,0,0]:[0,0,r]):$8(e,t,0,i);if(i===0)return o=Qc.computeRealRoots(e,t,n),o.length===0?[0]:o[1]<=0?[o[0],o[1],0]:o[0]>=0?[0,o[0],o[1]]:[o[0],0,o[1]]}return $8(e,t,n,i)};var eA=Z8;var J8={};J8.computeDiscriminant=function(e,t,n,i,o){let r=e*e,s=r*e,a=t*t,c=a*t,u=n*n,f=u*n,d=i*i,p=d*i,_=o*o,m=_*o;return a*u*d-4*c*p-4*e*f*d+18*e*t*n*p-27*r*d*d+256*s*m+o*(18*c*n*i-4*a*f+16*e*u*u-80*e*t*u*i-6*e*a*d+144*r*n*d)+_*(144*e*a*n-27*a*a-128*r*u-192*r*t*i)};function Yf(e,t,n,i){let o=e*e,r=t-3*o/8,s=n-t*e/2+o*e/8,a=i-n*e/4+t*o/16-3*o*o/256,c=eA.computeRealRoots(1,2*r,r*r-4*a,-s*s);if(c.length>0){let u=-e/4,f=c[c.length-1];if(Math.abs(f)<R.EPSILON14){let d=Qc.computeRealRoots(1,r,a);if(d.length===2){let p=d[0],_=d[1],m;if(p>=0&&_>=0){let x=Math.sqrt(p),C=Math.sqrt(_);return[u-C,u-x,u+x,u+C]}else{if(p>=0&&_<0)return m=Math.sqrt(p),[u-m,u+m];if(p<0&&_>=0)return m=Math.sqrt(_),[u-m,u+m]}}return[]}else if(f>0){let d=Math.sqrt(f),p=(r+f-s/d)/2,_=(r+f+s/d)/2,m=Qc.computeRealRoots(1,d,p),x=Qc.computeRealRoots(1,-d,_);return m.length!==0?(m[0]+=u,m[1]+=u,x.length!==0?(x[0]+=u,x[1]+=u,m[1]<=x[0]?[m[0],m[1],x[0],x[1]]:x[1]<=m[0]?[x[0],x[1],m[0],m[1]]:m[0]>=x[0]&&m[1]<=x[1]?[x[0],m[0],m[1],x[1]]:x[0]>=m[0]&&x[1]<=m[1]?[m[0],x[0],x[1],m[1]]:m[0]>x[0]&&m[0]<x[1]?[x[0],m[0],x[1],m[1]]:[m[0],x[0],m[1],x[1]]):m):x.length!==0?(x[0]+=u,x[1]+=u,x):[]}}return[]}function hS(e,t,n,i){let o=n*n,r=t*t,s=e*e,a=-2*t,c=n*e+r-4*i,u=s*i-n*t*e+o,f=eA.computeRealRoots(1,a,c,u);if(f.length>0){let d=f[0],p=t-d,_=p*p,m=e/2,x=p/2,C=_-4*i,A=_+4*Math.abs(i),T=s-4*d,b=s+4*Math.abs(d),S,w;if(d<0||C*b<T*A){let E=Math.sqrt(T);S=E/2,w=E===0?0:(e*x-n)/E}else{let E=Math.sqrt(C);S=E===0?0:(e*x-n)/E,w=E/2}let D,O;m===0&&S===0?(D=0,O=0):R.sign(m)===R.sign(S)?(D=m+S,O=d/D):(O=m-S,D=d/O);let I,L;x===0&&w===0?(I=0,L=0):R.sign(x)===R.sign(w)?(I=x+w,L=i/I):(L=x-w,I=i/L);let N=Qc.computeRealRoots(1,D,I),g=Qc.computeRealRoots(1,O,L);if(N.length!==0)return g.length!==0?N[1]<=g[0]?[N[0],N[1],g[0],g[1]]:g[1]<=N[0]?[g[0],g[1],N[0],N[1]]:N[0]>=g[0]&&N[1]<=g[1]?[g[0],N[0],N[1],g[1]]:g[0]>=N[0]&&g[1]<=N[1]?[N[0],g[0],g[1],N[1]]:N[0]>g[0]&&N[0]<g[1]?[g[0],N[0],g[1],N[1]]:[N[0],g[0],N[1],g[1]]:N;if(g.length!==0)return g}return[]}J8.computeRealRoots=function(e,t,n,i,o){if(Math.abs(e)<R.EPSILON15)return eA.computeRealRoots(t,n,i,o);let r=t/e,s=n/e,a=i/e,c=o/e,u=r<0?1:0;switch(u+=s<0?u+1:u,u+=a<0?u+1:u,u+=c<0?u+1:u,u){case 0:return Yf(r,s,a,c);case 1:return hS(r,s,a,c);case 2:return hS(r,s,a,c);case 3:return Yf(r,s,a,c);case 4:return Yf(r,s,a,c);case 5:return hS(r,s,a,c);case 6:return Yf(r,s,a,c);case 7:return Yf(r,s,a,c);case 8:return hS(r,s,a,c);case 9:return Yf(r,s,a,c);case 10:return Yf(r,s,a,c);case 11:return hS(r,s,a,c);case 12:return Yf(r,s,a,c);case 13:return Yf(r,s,a,c);case 14:return Yf(r,s,a,c);case 15:return Yf(r,s,a,c);default:return}};var BP=J8;function LP(e,t){t=h.clone(y(t,h.ZERO)),h.equals(t,h.ZERO)||h.normalize(t,t),this.origin=h.clone(y(e,h.ZERO)),this.direction=t}LP.clone=function(e,t){if(!!l(e))return l(t)?(t.origin=h.clone(e.origin),t.direction=h.clone(e.direction),t):new LP(e.origin,e.direction)};LP.getPoint=function(e,t,n){return l(n)||(n=new h),n=h.multiplyByScalar(e.direction,t,n),h.add(e.origin,n,n)};var bn=LP;var sr={};sr.rayPlane=function(e,t,n){l(n)||(n=new h);let i=e.origin,o=e.direction,r=t.normal,s=h.dot(r,o);if(Math.abs(s)<R.EPSILON15)return;let a=(-t.distance-h.dot(r,i))/s;if(!(a<0))return n=h.multiplyByScalar(o,a,n),h.add(i,n,n)};var jbe=new h,qbe=new h,WK=new h,FK=new h,VK=new h;sr.rayTriangleParametric=function(e,t,n,i,o){o=y(o,!1);let r=e.origin,s=e.direction,a=h.subtract(n,t,jbe),c=h.subtract(i,t,qbe),u=h.cross(s,c,WK),f=h.dot(a,u),d,p,_,m,x;if(o){if(f<R.EPSILON6||(d=h.subtract(r,t,FK),_=h.dot(d,u),_<0||_>f)||(p=h.cross(d,a,VK),m=h.dot(s,p),m<0||_+m>f))return;x=h.dot(c,p)/f}else{if(Math.abs(f)<R.EPSILON6)return;let C=1/f;if(d=h.subtract(r,t,FK),_=h.dot(d,u)*C,_<0||_>1||(p=h.cross(d,a,VK),m=h.dot(s,p)*C,m<0||_+m>1))return;x=h.dot(c,p)*C}return x};sr.rayTriangle=function(e,t,n,i,o,r){let s=sr.rayTriangleParametric(e,t,n,i,o);if(!(!l(s)||s<0))return l(r)||(r=new h),h.multiplyByScalar(e.direction,s,r),h.add(e.origin,r,r)};var Ybe=new bn;sr.lineSegmentTriangle=function(e,t,n,i,o,r,s){let a=Ybe;h.clone(e,a.origin),h.subtract(t,e,a.direction),h.normalize(a.direction,a.direction);let c=sr.rayTriangleParametric(a,n,i,o,r);if(!(!l(c)||c<0||c>h.distance(e,t)))return l(s)||(s=new h),h.multiplyByScalar(a.direction,c,s),h.add(a.origin,s,s)};function Xbe(e,t,n,i){let o=t*t-4*e*n;if(o<0)return;if(o>0){let s=1/(2*e),a=Math.sqrt(o),c=(-t+a)*s,u=(-t-a)*s;return c<u?(i.root0=c,i.root1=u):(i.root0=u,i.root1=c),i}let r=-t/(2*e);if(r!==0)return i.root0=i.root1=r,i}var Kbe={root0:0,root1:0};function jK(e,t,n){l(n)||(n=new Jc);let i=e.origin,o=e.direction,r=t.center,s=t.radius*t.radius,a=h.subtract(i,r,WK),c=h.dot(o,o),u=2*h.dot(o,a),f=h.magnitudeSquared(a)-s,d=Xbe(c,u,f,Kbe);if(!!l(d))return n.start=d.root0,n.stop=d.root1,n}sr.raySphere=function(e,t,n){if(n=jK(e,t,n),!(!l(n)||n.stop<0))return n.start=Math.max(n.start,0),n};var $be=new bn;sr.lineSegmentSphere=function(e,t,n,i){let o=$be;h.clone(e,o.origin);let r=h.subtract(t,e,o.direction),s=h.magnitude(r);if(h.normalize(r,r),i=jK(o,n,i),!(!l(i)||i.stop<0||i.start>s))return i.start=Math.max(i.start,0),i.stop=Math.min(i.stop,s),i};var Zbe=new h,Jbe=new h;sr.rayEllipsoid=function(e,t){let n=t.oneOverRadii,i=h.multiplyComponents(n,e.origin,Zbe),o=h.multiplyComponents(n,e.direction,Jbe),r=h.magnitudeSquared(i),s=h.dot(i,o),a,c,u,f,d;if(r>1){if(s>=0)return;let p=s*s;if(a=r-1,c=h.magnitudeSquared(o),u=c*a,p<u)return;if(p>u){f=s*s-u,d=-s+Math.sqrt(f);let m=d/c,x=a/d;return m<x?new Jc(m,x):{start:x,stop:m}}let _=Math.sqrt(a/c);return new Jc(_,_)}else if(r<1)return a=r-1,c=h.magnitudeSquared(o),u=c*a,f=s*s-u,d=-s+Math.sqrt(f),new Jc(0,d/c);if(s<0)return c=h.magnitudeSquared(o),new Jc(0,-s/c)};function sy(e,t,n){let i=e+t;return R.sign(e)!==R.sign(t)&&Math.abs(i/Math.max(Math.abs(e),Math.abs(t)))<n?0:i}function Qbe(e,t,n,i,o){let r=i*i,s=o*o,a=(e[Q.COLUMN1ROW1]-e[Q.COLUMN2ROW2])*s,c=o*(i*sy(e[Q.COLUMN1ROW0],e[Q.COLUMN0ROW1],R.EPSILON15)+t.y),u=e[Q.COLUMN0ROW0]*r+e[Q.COLUMN2ROW2]*s+i*t.x+n,f=s*sy(e[Q.COLUMN2ROW1],e[Q.COLUMN1ROW2],R.EPSILON15),d=o*(i*sy(e[Q.COLUMN2ROW0],e[Q.COLUMN0ROW2])+t.z),p,_=[];if(d===0&&f===0){if(p=Qc.computeRealRoots(a,c,u),p.length===0)return _;let I=p[0],L=Math.sqrt(Math.max(1-I*I,0));if(_.push(new h(i,o*I,o*-L)),_.push(new h(i,o*I,o*L)),p.length===2){let N=p[1],g=Math.sqrt(Math.max(1-N*N,0));_.push(new h(i,o*N,o*-g)),_.push(new h(i,o*N,o*g))}return _}let m=d*d,x=f*f,C=a*a,A=d*f,T=C+x,b=2*(c*a+A),S=2*u*a+c*c-x+m,w=2*(u*c-A),D=u*u-m;if(T===0&&b===0&&S===0&&w===0)return _;p=BP.computeRealRoots(T,b,S,w,D);let O=p.length;if(O===0)return _;for(let I=0;I<O;++I){let L=p[I],N=L*L,g=Math.max(1-N,0),E=Math.sqrt(g),v;R.sign(a)===R.sign(u)?v=sy(a*N+u,c*L,R.EPSILON12):R.sign(u)===R.sign(c*L)?v=sy(a*N,c*L+u,R.EPSILON12):v=sy(a*N+c*L,u,R.EPSILON12);let P=sy(f*L,d,R.EPSILON15),M=v*P;M<0?_.push(new h(i,o*L,o*E)):M>0?_.push(new h(i,o*L,o*-E)):E!==0?(_.push(new h(i,o*L,o*-E)),_.push(new h(i,o*L,o*E)),++I):_.push(new h(i,o*L,o*E))}return _}var Q8=new h,kK=new h,UK=new h,NP=new h,eEe=new h,tEe=new Q,nEe=new Q,iEe=new Q,oEe=new Q,rEe=new Q,zK=new Q,HK=new Q,GK=new h,sEe=new h,aEe=new me;sr.grazingAltitudeLocation=function(e,t){let n=e.origin,i=e.direction;if(!h.equals(n,h.ZERO)){let D=t.geodeticSurfaceNormal(n,Q8);if(h.dot(i,D)>=0)return n}let o=l(this.rayEllipsoid(e,t)),r=t.transformPositionToScaledSpace(i,Q8),s=h.normalize(r,r),a=h.mostOrthogonalAxis(r,NP),c=h.normalize(h.cross(a,s,kK),kK),u=h.normalize(h.cross(s,c,UK),UK),f=tEe;f[0]=s.x,f[1]=s.y,f[2]=s.z,f[3]=c.x,f[4]=c.y,f[5]=c.z,f[6]=u.x,f[7]=u.y,f[8]=u.z;let d=Q.transpose(f,nEe),p=Q.fromScale(t.radii,iEe),_=Q.fromScale(t.oneOverRadii,oEe),m=rEe;m[0]=0,m[1]=-i.z,m[2]=i.y,m[3]=i.z,m[4]=0,m[5]=-i.x,m[6]=-i.y,m[7]=i.x,m[8]=0;let x=Q.multiply(Q.multiply(d,_,zK),m,zK),C=Q.multiply(Q.multiply(x,p,HK),f,HK),A=Q.multiplyByVector(x,n,eEe),T=Qbe(C,h.negate(A,Q8),0,0,1),b,S,w=T.length;if(w>0){let D=h.clone(h.ZERO,sEe),O=Number.NEGATIVE_INFINITY;for(let L=0;L<w;++L){b=Q.multiplyByVector(p,Q.multiplyByVector(f,T[L],GK),GK);let N=h.normalize(h.subtract(b,n,NP),NP),g=h.dot(N,i);g>O&&(O=g,D=h.clone(b,D))}let I=t.cartesianToCartographic(D,aEe);return O=R.clamp(O,0,1),S=h.magnitude(h.subtract(D,n,NP))*Math.sqrt(1-O*O),S=o?-S:S,I.height=S,t.cartographicToCartesian(I,new h)}};var cEe=new h;sr.lineSegmentPlane=function(e,t,n,i){l(i)||(i=new h);let o=h.subtract(t,e,cEe),r=n.normal,s=h.dot(r,o);if(Math.abs(s)<R.EPSILON6)return;let a=h.dot(r,e),c=-(n.distance+a)/s;if(!(c<0||c>1))return h.multiplyByScalar(o,c,i),h.add(e,i,i),i};sr.trianglePlaneIntersection=function(e,t,n,i){let o=i.normal,r=i.distance,s=h.dot(o,e)+r<0,a=h.dot(o,t)+r<0,c=h.dot(o,n)+r<0,u=0;u+=s?1:0,u+=a?1:0,u+=c?1:0;let f,d;if((u===1||u===2)&&(f=new h,d=new h),u===1){if(s)return sr.lineSegmentPlane(e,t,i,f),sr.lineSegmentPlane(e,n,i,d),{positions:[e,t,n,f,d],indices:[0,3,4,1,2,4,1,4,3]};if(a)return sr.lineSegmentPlane(t,n,i,f),sr.lineSegmentPlane(t,e,i,d),{positions:[e,t,n,f,d],indices:[1,3,4,2,0,4,2,4,3]};if(c)return sr.lineSegmentPlane(n,e,i,f),sr.lineSegmentPlane(n,t,i,d),{positions:[e,t,n,f,d],indices:[2,3,4,0,1,4,0,4,3]}}else if(u===2)if(s)if(a){if(!c)return sr.lineSegmentPlane(e,n,i,f),sr.lineSegmentPlane(t,n,i,d),{positions:[e,t,n,f,d],indices:[0,1,4,0,4,3,2,3,4]}}else return sr.lineSegmentPlane(n,t,i,f),sr.lineSegmentPlane(e,t,i,d),{positions:[e,t,n,f,d],indices:[2,0,4,2,4,3,1,3,4]};else return sr.lineSegmentPlane(t,e,i,f),sr.lineSegmentPlane(n,e,i,d),{positions:[e,t,n,f,d],indices:[1,2,4,1,4,3,0,3,4]}};var Ki=sr;function Ts(e,t){this.normal=h.clone(e),this.distance=t}Ts.fromPointNormal=function(e,t,n){let i=-h.dot(t,e);return l(n)?(h.clone(t,n.normal),n.distance=i,n):new Ts(t,i)};var lEe=new h;Ts.fromCartesian4=function(e,t){let n=h.fromCartesian4(e,lEe),i=e.w;return l(t)?(h.clone(n,t.normal),t.distance=i,t):new Ts(n,i)};Ts.getPointDistance=function(e,t){return h.dot(e.normal,t)+e.distance};var uEe=new h;Ts.projectPointOntoPlane=function(e,t,n){l(n)||(n=new h);let i=Ts.getPointDistance(e,t),o=h.multiplyByScalar(e.normal,i,uEe);return h.subtract(t,o,n)};var fEe=new B,dEe=new se,hEe=new h;Ts.transform=function(e,t,n){let i=e.normal,o=e.distance,r=B.inverseTranspose(t,fEe),s=se.fromElements(i.x,i.y,i.z,o,dEe);s=B.multiplyByVector(r,s,s);let a=h.fromCartesian4(s,hEe);return s=se.divideByScalar(s,h.magnitude(a),s),Ts.fromCartesian4(s,n)};Ts.clone=function(e,t){return l(t)?(h.clone(e.normal,t.normal),t.distance=e.distance,t):new Ts(e.normal,e.distance)};Ts.equals=function(e,t){return e.distance===t.distance&&h.equals(e.normal,t.normal)};Ts.ORIGIN_XY_PLANE=Object.freeze(new Ts(h.UNIT_Z,0));Ts.ORIGIN_YZ_PLANE=Object.freeze(new Ts(h.UNIT_X,0));Ts.ORIGIN_ZX_PLANE=Object.freeze(new Ts(h.UNIT_Y,0));var rn=Ts;function mEe(e,t,n){let i=0,o=e.length-1,r,s;for(;i<=o;){if(r=~~((i+o)/2),s=n(e[r],t),s<0){i=r+1;continue}if(s>0){o=r-1;continue}return r}return~(o+1)}var ar=mEe;function pEe(e,t,n,i,o){this.xPoleWander=e,this.yPoleWander=t,this.xPoleOffset=n,this.yPoleOffset=i,this.ut1MinusUtc=o}var ay=pEe;function _Ee(e,t,n,i,o,r,s,a){this.year=e,this.month=t,this.day=n,this.hour=i,this.minute=o,this.second=r,this.millisecond=s,this.isLeapSecond=a}var x_=_Ee;function gEe(e){return e%4===0&&e%100!==0||e%400===0}var C_=gEe;function yEe(e,t){this.julianDate=e,this.offset=t}var ki=yEe;var xEe={SECONDS_PER_MILLISECOND:.001,SECONDS_PER_MINUTE:60,MINUTES_PER_HOUR:60,HOURS_PER_DAY:24,SECONDS_PER_HOUR:3600,MINUTES_PER_DAY:1440,SECONDS_PER_DAY:86400,DAYS_PER_JULIAN_CENTURY:36525,PICOSECOND:1e-9,MODIFIED_JULIAN_DATE_DIFFERENCE:24000005e-1},jn=Object.freeze(xEe);var CEe={UTC:0,TAI:1},Hn=Object.freeze(CEe);var YK=new x_,eH=[31,28,31,30,31,30,31,31,30,31,30,31],tH=29;function nH(e,t){return At.compare(e.julianDate,t.julianDate)}var tA=new ki;function VP(e){tA.julianDate=e;let t=At.leapSeconds,n=ar(t,tA,nH);n<0&&(n=~n),n>=t.length&&(n=t.length-1);let i=t[n].offset;n>0&&At.secondsDifference(t[n].julianDate,e)>i&&(n--,i=t[n].offset),At.addSeconds(e,i,e)}function qK(e,t){tA.julianDate=e;let n=At.leapSeconds,i=ar(n,tA,nH);if(i<0&&(i=~i),i===0)return At.addSeconds(e,-n[0].offset,t);if(i>=n.length)return At.addSeconds(e,-n[i-1].offset,t);let o=At.secondsDifference(n[i].julianDate,e);if(o===0)return At.addSeconds(e,-n[i].offset,t);if(!(o<=1))return At.addSeconds(e,-n[--i].offset,t)}function A_(e,t,n){let i=t/jn.SECONDS_PER_DAY|0;return e+=i,t-=jn.SECONDS_PER_DAY*i,t<0&&(e--,t+=jn.SECONDS_PER_DAY),n.dayNumber=e,n.secondsOfDay=t,n}function iH(e,t,n,i,o,r,s){let a=(t-14)/12|0,c=e+4800+a,u=(1461*c/4|0)+(367*(t-2-12*a)/12|0)-(3*((c+100)/100|0)/4|0)+n-32075;i=i-12,i<0&&(i+=24);let f=r+(i*jn.SECONDS_PER_HOUR+o*jn.SECONDS_PER_MINUTE+s*jn.SECONDS_PER_MILLISECOND);return f>=43200&&(u-=1),[u,f]}var AEe=/^(\d{4})$/,TEe=/^(\d{4})-(\d{2})$/,bEe=/^(\d{4})-?(\d{3})$/,EEe=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,SEe=/^(\d{4})-?(\d{2})-?(\d{2})$/,oH=/([Z+\-])?(\d{2})?:?(\d{2})?$/,wEe=/^(\d{2})(\.\d+)?/.source+oH.source,vEe=/^(\d{2}):?(\d{2})(\.\d+)?/.source+oH.source,DEe=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+oH.source;function At(e,t,n){this.dayNumber=void 0,this.secondsOfDay=void 0,e=y(e,0),t=y(t,0),n=y(n,Hn.UTC);let i=e|0;t=t+(e-i)*jn.SECONDS_PER_DAY,A_(i,t,this),n===Hn.UTC&&VP(this)}At.fromGregorianDate=function(e,t){let n=iH(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond);return l(t)?(A_(n[0],n[1],t),VP(t),t):new At(n[0],n[1],Hn.UTC)};At.fromDate=function(e,t){let n=iH(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return l(t)?(A_(n[0],n[1],t),VP(t),t):new At(n[0],n[1],Hn.UTC)};At.fromIso8601=function(e,t){e=e.replace(",",".");let n=e.split("T"),i,o=1,r=1,s=0,a=0,c=0,u=0,f=n[0],d=n[1],p,_;if(n=f.match(SEe),n!==null)i=+n[1],o=+n[2],r=+n[3];else if(n=f.match(TEe),n!==null)i=+n[1],o=+n[2];else if(n=f.match(AEe),n!==null)i=+n[1];else{let A;if(n=f.match(bEe),n!==null)i=+n[1],A=+n[2],_=C_(i);else if(n=f.match(EEe),n!==null){i=+n[1];let T=+n[2],b=+n[3]||0,S=new Date(Date.UTC(i,0,4));A=T*7+b-S.getUTCDay()-3}p=new Date(Date.UTC(i,0,1)),p.setUTCDate(A),o=p.getUTCMonth()+1,r=p.getUTCDate()}_=C_(i);let m;if(l(d)){n=d.match(DEe),n!==null?(s=+n[1],a=+n[2],c=+n[3],u=+(n[4]||0)*1e3,m=5):(n=d.match(vEe),n!==null?(s=+n[1],a=+n[2],c=+(n[3]||0)*60,m=4):(n=d.match(wEe),n!==null&&(s=+n[1],a=+(n[2]||0)*60,m=3)));let A=n[m],T=+n[m+1],b=+(n[m+2]||0);switch(A){case"+":s=s-T,a=a-b;break;case"-":s=s+T,a=a+b;break;case"Z":break;default:a=a+new Date(Date.UTC(i,o-1,r,s,a)).getTimezoneOffset();break}}let x=c===60;for(x&&c--;a>=60;)a-=60,s++;for(;s>=24;)s-=24,r++;for(p=_&&o===2?tH:eH[o-1];r>p;)r-=p,o++,o>12&&(o-=12,i++),p=_&&o===2?tH:eH[o-1];for(;a<0;)a+=60,s--;for(;s<0;)s+=24,r--;for(;r<1;)o--,o<1&&(o+=12,i--),p=_&&o===2?tH:eH[o-1],r+=p;let C=iH(i,o,r,s,a,c,u);return l(t)?(A_(C[0],C[1],t),VP(t)):t=new At(C[0],C[1],Hn.UTC),x&&At.addSeconds(t,1,t),t};At.now=function(e){return At.fromDate(new Date,e)};var FP=new At(0,0,Hn.TAI);At.toGregorianDate=function(e,t){let n=!1,i=qK(e,FP);l(i)||(At.addSeconds(e,-1,FP),i=qK(FP,FP),n=!0);let o=i.dayNumber,r=i.secondsOfDay;r>=43200&&(o+=1);let s=o+68569|0,a=4*s/146097|0;s=s-((146097*a+3)/4|0)|0;let c=4e3*(s+1)/1461001|0;s=s-(1461*c/4|0)+31|0;let u=80*s/2447|0,f=s-(2447*u/80|0)|0;s=u/11|0;let d=u+2-12*s|0,p=100*(a-49)+c+s|0,_=r/jn.SECONDS_PER_HOUR|0,m=r-_*jn.SECONDS_PER_HOUR,x=m/jn.SECONDS_PER_MINUTE|0;m=m-x*jn.SECONDS_PER_MINUTE;let C=m|0,A=(m-C)/jn.SECONDS_PER_MILLISECOND;return _+=12,_>23&&(_-=24),n&&(C+=1),l(t)?(t.year=p,t.month=d,t.day=f,t.hour=_,t.minute=x,t.second=C,t.millisecond=A,t.isLeapSecond=n,t):new x_(p,d,f,_,x,C,A,n)};At.toDate=function(e){let t=At.toGregorianDate(e,YK),n=t.second;return t.isLeapSecond&&(n-=1),new Date(Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,n,t.millisecond))};At.toIso8601=function(e,t){let n=At.toGregorianDate(e,YK),i=n.year,o=n.month,r=n.day,s=n.hour,a=n.minute,c=n.second,u=n.millisecond;i===1e4&&o===1&&r===1&&s===0&&a===0&&c===0&&u===0&&(i=9999,o=12,r=31,s=24);let f;return!l(t)&&u!==0?(f=(u*.01).toString().replace(".",""),`${i.toString().padStart(4,"0")}-${o.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${s.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}.${f}Z`):!l(t)||t===0?`${i.toString().padStart(4,"0")}-${o.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${s.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}Z`:(f=(u*.01).toFixed(t).replace(".","").slice(0,t),`${i.toString().padStart(4,"0")}-${o.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${s.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}.${f}Z`)};At.clone=function(e,t){if(!!l(e))return l(t)?(t.dayNumber=e.dayNumber,t.secondsOfDay=e.secondsOfDay,t):new At(e.dayNumber,e.secondsOfDay,Hn.TAI)};At.compare=function(e,t){let n=e.dayNumber-t.dayNumber;return n!==0?n:e.secondsOfDay-t.secondsOfDay};At.equals=function(e,t){return e===t||l(e)&&l(t)&&e.dayNumber===t.dayNumber&&e.secondsOfDay===t.secondsOfDay};At.equalsEpsilon=function(e,t,n){return n=y(n,0),e===t||l(e)&&l(t)&&Math.abs(At.secondsDifference(e,t))<=n};At.totalDays=function(e){return e.dayNumber+e.secondsOfDay/jn.SECONDS_PER_DAY};At.secondsDifference=function(e,t){return(e.dayNumber-t.dayNumber)*jn.SECONDS_PER_DAY+(e.secondsOfDay-t.secondsOfDay)};At.daysDifference=function(e,t){let n=e.dayNumber-t.dayNumber,i=(e.secondsOfDay-t.secondsOfDay)/jn.SECONDS_PER_DAY;return n+i};At.computeTaiMinusUtc=function(e){tA.julianDate=e;let t=At.leapSeconds,n=ar(t,tA,nH);return n<0&&(n=~n,--n,n<0&&(n=0)),t[n].offset};At.addSeconds=function(e,t,n){return A_(e.dayNumber,e.secondsOfDay+t,n)};At.addMinutes=function(e,t,n){let i=e.secondsOfDay+t*jn.SECONDS_PER_MINUTE;return A_(e.dayNumber,i,n)};At.addHours=function(e,t,n){let i=e.secondsOfDay+t*jn.SECONDS_PER_HOUR;return A_(e.dayNumber,i,n)};At.addDays=function(e,t,n){let i=e.dayNumber+t;return A_(i,e.secondsOfDay,n)};At.lessThan=function(e,t){return At.compare(e,t)<0};At.lessThanOrEquals=function(e,t){return At.compare(e,t)<=0};At.greaterThan=function(e,t){return At.compare(e,t)>0};At.greaterThanOrEquals=function(e,t){return At.compare(e,t)>=0};At.prototype.clone=function(e){return At.clone(this,e)};At.prototype.equals=function(e){return At.equals(this,e)};At.prototype.equalsEpsilon=function(e,t){return At.equalsEpsilon(this,e,t)};At.prototype.toString=function(){return At.toIso8601(this)};At.leapSeconds=[new ki(new At(2441317,43210,Hn.TAI),10),new ki(new At(2441499,43211,Hn.TAI),11),new ki(new At(2441683,43212,Hn.TAI),12),new ki(new At(2442048,43213,Hn.TAI),13),new ki(new At(2442413,43214,Hn.TAI),14),new ki(new At(2442778,43215,Hn.TAI),15),new ki(new At(2443144,43216,Hn.TAI),16),new ki(new At(2443509,43217,Hn.TAI),17),new ki(new At(2443874,43218,Hn.TAI),18),new ki(new At(2444239,43219,Hn.TAI),19),new ki(new At(2444786,43220,Hn.TAI),20),new ki(new At(2445151,43221,Hn.TAI),21),new ki(new At(2445516,43222,Hn.TAI),22),new ki(new At(2446247,43223,Hn.TAI),23),new ki(new At(2447161,43224,Hn.TAI),24),new ki(new At(2447892,43225,Hn.TAI),25),new ki(new At(2448257,43226,Hn.TAI),26),new ki(new At(2448804,43227,Hn.TAI),27),new ki(new At(2449169,43228,Hn.TAI),28),new ki(new At(2449534,43229,Hn.TAI),29),new ki(new At(2450083,43230,Hn.TAI),30),new ki(new At(2450630,43231,Hn.TAI),31),new ki(new At(2451179,43232,Hn.TAI),32),new ki(new At(2453736,43233,Hn.TAI),33),new ki(new At(2454832,43234,Hn.TAI),34),new ki(new At(2456109,43235,Hn.TAI),35),new ki(new At(2457204,43236,Hn.TAI),36),new ki(new At(2457754,43237,Hn.TAI),37)];var ee=At;function kP(e){if(e=y(e,y.EMPTY_OBJECT),this._dates=void 0,this._samples=void 0,this._dateColumn=-1,this._xPoleWanderRadiansColumn=-1,this._yPoleWanderRadiansColumn=-1,this._ut1MinusUtcSecondsColumn=-1,this._xCelestialPoleOffsetRadiansColumn=-1,this._yCelestialPoleOffsetRadiansColumn=-1,this._taiMinusUtcSecondsColumn=-1,this._columnCount=0,this._lastIndex=-1,this._downloadPromise=void 0,this._dataError=void 0,this._addNewLeapSeconds=y(e.addNewLeapSeconds,!0),l(e.data))rH(this,e.data);else if(l(e.url)){let t=De.createIfNeeded(e.url),n=this;this._downloadPromise=t.fetchJson().then(function(i){rH(n,i)}).catch(function(){n._dataError=`An error occurred while retrieving the EOP data from the URL ${t.url}.`})}else rH(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}kP.NONE=Object.freeze({getPromiseToLoad:function(){return Promise.resolve()},compute:function(e,t){return l(t)?(t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0):t=new ay(0,0,0,0,0),t}});kP.prototype.getPromiseToLoad=function(){return Promise.resolve(this._downloadPromise)};kP.prototype.compute=function(e,t){if(!l(this._samples)){if(l(this._dataError))throw new fe(this._dataError);return}if(l(t)||(t=new ay(0,0,0,0,0)),this._samples.length===0)return t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0,t;let n=this._dates,i=this._lastIndex,o=0,r=0;if(l(i)){let a=n[i],c=n[i+1],u=ee.lessThanOrEquals(a,e),f=!l(c),d=f||ee.greaterThanOrEquals(c,e);if(u&&d)return o=i,!f&&c.equals(e)&&++o,r=o+1,KK(this,n,this._samples,e,o,r,t),t}let s=ar(n,e,ee.compare,this._dateColumn);return s>=0?(s<n.length-1&&n[s+1].equals(e)&&++s,o=s,r=s):(r=~s,o=r-1,o<0&&(o=0)),this._lastIndex=o,KK(this,n,this._samples,e,o,r,t),t};function PEe(e,t){return ee.compare(e.julianDate,t)}function rH(e,t){if(!l(t.columnNames)){e._dataError="Error in loaded EOP data: The columnNames property is required.";return}if(!l(t.samples)){e._dataError="Error in loaded EOP data: The samples property is required.";return}let n=t.columnNames.indexOf("modifiedJulianDateUtc"),i=t.columnNames.indexOf("xPoleWanderRadians"),o=t.columnNames.indexOf("yPoleWanderRadians"),r=t.columnNames.indexOf("ut1MinusUtcSeconds"),s=t.columnNames.indexOf("xCelestialPoleOffsetRadians"),a=t.columnNames.indexOf("yCelestialPoleOffsetRadians"),c=t.columnNames.indexOf("taiMinusUtcSeconds");if(n<0||i<0||o<0||r<0||s<0||a<0||c<0){e._dataError="Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns";return}let u=e._samples=t.samples,f=e._dates=[];e._dateColumn=n,e._xPoleWanderRadiansColumn=i,e._yPoleWanderRadiansColumn=o,e._ut1MinusUtcSecondsColumn=r,e._xCelestialPoleOffsetRadiansColumn=s,e._yCelestialPoleOffsetRadiansColumn=a,e._taiMinusUtcSecondsColumn=c,e._columnCount=t.columnNames.length,e._lastIndex=void 0;let d,p=e._addNewLeapSeconds;for(let _=0,m=u.length;_<m;_+=e._columnCount){let x=u[_+n],C=u[_+c],A=x+jn.MODIFIED_JULIAN_DATE_DIFFERENCE,T=new ee(A,C,Hn.TAI);if(f.push(T),p){if(C!==d&&l(d)){let b=ee.leapSeconds,S=ar(b,T,PEe);if(S<0){let w=new ki(T,C);b.splice(~S,0,w)}}d=C}}}function XK(e,t,n,i,o){let r=n*i;o.xPoleWander=t[r+e._xPoleWanderRadiansColumn],o.yPoleWander=t[r+e._yPoleWanderRadiansColumn],o.xPoleOffset=t[r+e._xCelestialPoleOffsetRadiansColumn],o.yPoleOffset=t[r+e._yCelestialPoleOffsetRadiansColumn],o.ut1MinusUtc=t[r+e._ut1MinusUtcSecondsColumn]}function mS(e,t,n){return t+e*(n-t)}function KK(e,t,n,i,o,r,s){let a=e._columnCount;if(r>t.length-1)return s.xPoleWander=0,s.yPoleWander=0,s.xPoleOffset=0,s.yPoleOffset=0,s.ut1MinusUtc=0,s;let c=t[o],u=t[r];if(c.equals(u)||i.equals(c))return XK(e,n,o,a,s),s;if(i.equals(u))return XK(e,n,r,a,s),s;let f=ee.secondsDifference(i,c)/ee.secondsDifference(u,c),d=o*a,p=r*a,_=n[d+e._ut1MinusUtcSecondsColumn],m=n[p+e._ut1MinusUtcSecondsColumn],x=m-_;if(x>.5||x<-.5){let C=n[d+e._taiMinusUtcSecondsColumn],A=n[p+e._taiMinusUtcSecondsColumn];C!==A&&(u.equals(i)?_=m:m-=A-C)}return s.xPoleWander=mS(f,n[d+e._xPoleWanderRadiansColumn],n[p+e._xPoleWanderRadiansColumn]),s.yPoleWander=mS(f,n[d+e._yPoleWanderRadiansColumn],n[p+e._yPoleWanderRadiansColumn]),s.xPoleOffset=mS(f,n[d+e._xCelestialPoleOffsetRadiansColumn],n[p+e._xCelestialPoleOffsetRadiansColumn]),s.yPoleOffset=mS(f,n[d+e._yCelestialPoleOffsetRadiansColumn],n[p+e._yCelestialPoleOffsetRadiansColumn]),s.ut1MinusUtc=mS(f,_,m),s}var UP=kP;function La(e,t,n){this.heading=y(e,0),this.pitch=y(t,0),this.roll=y(n,0)}La.fromQuaternion=function(e,t){l(t)||(t=new La);let n=2*(e.w*e.y-e.z*e.x),i=1-2*(e.x*e.x+e.y*e.y),o=2*(e.w*e.x+e.y*e.z),r=1-2*(e.y*e.y+e.z*e.z),s=2*(e.w*e.z+e.x*e.y);return t.heading=-Math.atan2(s,r),t.roll=Math.atan2(o,i),t.pitch=-R.asinClamped(n),t};La.fromDegrees=function(e,t,n,i){return l(i)||(i=new La),i.heading=e*R.RADIANS_PER_DEGREE,i.pitch=t*R.RADIANS_PER_DEGREE,i.roll=n*R.RADIANS_PER_DEGREE,i};La.clone=function(e,t){if(!!l(e))return l(t)?(t.heading=e.heading,t.pitch=e.pitch,t.roll=e.roll,t):new La(e.heading,e.pitch,e.roll)};La.equals=function(e,t){return e===t||l(e)&&l(t)&&e.heading===t.heading&&e.pitch===t.pitch&&e.roll===t.roll};La.equalsEpsilon=function(e,t,n,i){return e===t||l(e)&&l(t)&&R.equalsEpsilon(e.heading,t.heading,n,i)&&R.equalsEpsilon(e.pitch,t.pitch,n,i)&&R.equalsEpsilon(e.roll,t.roll,n,i)};La.prototype.clone=function(e){return La.clone(this,e)};La.prototype.equals=function(e){return La.equals(this,e)};La.prototype.equalsEpsilon=function(e,t,n){return La.equalsEpsilon(this,e,t,n)};La.prototype.toString=function(){return`(${this.heading}, ${this.pitch}, ${this.roll})`};var Xf=La;function IEe(e,t,n){this.x=e,this.y=t,this.s=n}var nA=IEe;function cH(e){e=y(e,y.EMPTY_OBJECT),this._xysFileUrlTemplate=De.createIfNeeded(e.xysFileUrlTemplate),this._interpolationOrder=y(e.interpolationOrder,9),this._sampleZeroJulianEphemerisDate=y(e.sampleZeroJulianEphemerisDate,24423965e-1),this._sampleZeroDateTT=new ee(this._sampleZeroJulianEphemerisDate,0,Hn.TAI),this._stepSizeDays=y(e.stepSizeDays,1),this._samplesPerXysFile=y(e.samplesPerXysFile,1e3),this._totalSamples=y(e.totalSamples,27426),this._samples=new Array(this._totalSamples*3),this._chunkDownloadsInProgress=[];let t=this._interpolationOrder,n=this._denominators=new Array(t+1),i=this._xTable=new Array(t+1),o=Math.pow(this._stepSizeDays,t);for(let r=0;r<=t;++r){n[r]=o,i[r]=r*this._stepSizeDays;for(let s=0;s<=t;++s)s!==r&&(n[r]*=r-s);n[r]=1/n[r]}this._work=new Array(t+1),this._coef=new Array(t+1)}var OEe=new ee(0,0,Hn.TAI);function sH(e,t,n){let i=OEe;return i.dayNumber=t,i.secondsOfDay=n,ee.daysDifference(i,e._sampleZeroDateTT)}cH.prototype.preload=function(e,t,n,i){let o=sH(this,e,t),r=sH(this,n,i),s=o/this._stepSizeDays-this._interpolationOrder/2|0;s<0&&(s=0);let a=r/this._stepSizeDays-this._interpolationOrder/2|0+this._interpolationOrder;a>=this._totalSamples&&(a=this._totalSamples-1);let c=s/this._samplesPerXysFile|0,u=a/this._samplesPerXysFile|0,f=[];for(let d=c;d<=u;++d)f.push(aH(this,d));return Promise.all(f)};cH.prototype.computeXysRadians=function(e,t,n){let i=sH(this,e,t);if(i<0)return;let o=i/this._stepSizeDays|0;if(o>=this._totalSamples)return;let r=this._interpolationOrder,s=o-(r/2|0);s<0&&(s=0);let a=s+r;a>=this._totalSamples&&(a=this._totalSamples-1,s=a-r,s<0&&(s=0));let c=!1,u=this._samples;if(l(u[s*3])||(aH(this,s/this._samplesPerXysFile|0),c=!0),l(u[a*3])||(aH(this,a/this._samplesPerXysFile|0),c=!0),c)return;l(n)?(n.x=0,n.y=0,n.s=0):n=new nA(0,0,0);let f=i-s*this._stepSizeDays,d=this._work,p=this._denominators,_=this._coef,m=this._xTable,x,C;for(x=0;x<=r;++x)d[x]=f-m[x];for(x=0;x<=r;++x){for(_[x]=1,C=0;C<=r;++C)C!==x&&(_[x]*=d[C]);_[x]*=p[x];let A=(s+x)*3;n.x+=_[x]*u[A++],n.y+=_[x]*u[A++],n.s+=_[x]*u[A]}return n};function aH(e,t){if(e._chunkDownloadsInProgress[t])return e._chunkDownloadsInProgress[t];let n,i=e._xysFileUrlTemplate;l(i)?n=i.getDerivedResource({templateValues:{0:t}}):n=new De({url:Jt(`Assets/IAU2006_XYS/IAU2006_XYS_${t}.json`)});let o=n.fetchJson().then(function(r){e._chunkDownloadsInProgress[t]=!1;let s=e._samples,a=r.samples,c=t*e._samplesPerXysFile*3;for(let u=0,f=a.length;u<f;++u)s[c+u]=a[u]});return e._chunkDownloadsInProgress[t]=o,o}var zP=cH;var T_,Ir={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},el={};Object.defineProperties(el,{element:{get:function(){if(!!el.supportsFullscreen())return document[Ir.fullscreenElement]}},changeEventName:{get:function(){if(!!el.supportsFullscreen())return Ir.fullscreenchange}},errorEventName:{get:function(){if(!!el.supportsFullscreen())return Ir.fullscreenerror}},enabled:{get:function(){if(!!el.supportsFullscreen())return document[Ir.fullscreenEnabled]}},fullscreen:{get:function(){if(!!el.supportsFullscreen())return el.element!==null}}});el.supportsFullscreen=function(){if(l(T_))return T_;T_=!1;let e=document.body;if(typeof e.requestFullscreen=="function")return Ir.requestFullscreen="requestFullscreen",Ir.exitFullscreen="exitFullscreen",Ir.fullscreenEnabled="fullscreenEnabled",Ir.fullscreenElement="fullscreenElement",Ir.fullscreenchange="fullscreenchange",Ir.fullscreenerror="fullscreenerror",T_=!0,T_;let t=["webkit","moz","o","ms","khtml"],n;for(let i=0,o=t.length;i<o;++i){let r=t[i];n=`${r}RequestFullscreen`,typeof e[n]=="function"?(Ir.requestFullscreen=n,T_=!0):(n=`${r}RequestFullScreen`,typeof e[n]=="function"&&(Ir.requestFullscreen=n,T_=!0)),n=`${r}ExitFullscreen`,typeof document[n]=="function"?Ir.exitFullscreen=n:(n=`${r}CancelFullScreen`,typeof document[n]=="function"&&(Ir.exitFullscreen=n)),n=`${r}FullscreenEnabled`,document[n]!==void 0?Ir.fullscreenEnabled=n:(n=`${r}FullScreenEnabled`,document[n]!==void 0&&(Ir.fullscreenEnabled=n)),n=`${r}FullscreenElement`,document[n]!==void 0?Ir.fullscreenElement=n:(n=`${r}FullScreenElement`,document[n]!==void 0&&(Ir.fullscreenElement=n)),n=`${r}fullscreenchange`,document[`on${n}`]!==void 0&&(r==="ms"&&(n="MSFullscreenChange"),Ir.fullscreenchange=n),n=`${r}fullscreenerror`,document[`on${n}`]!==void 0&&(r==="ms"&&(n="MSFullscreenError"),Ir.fullscreenerror=n)}return T_};el.requestFullscreen=function(e,t){!el.supportsFullscreen()||e[Ir.requestFullscreen]({vrDisplay:t})};el.exitFullscreen=function(){!el.supportsFullscreen()||document[Ir.exitFullscreen]()};el._names=Ir;var Or=el;var Na;typeof navigator<"u"?Na=navigator:Na={};function cy(e){let t=e.split(".");for(let n=0,i=t.length;n<i;++n)t[n]=parseInt(t[n],10);return t}var HP,$K;function mH(){if(!l(HP)&&(HP=!1,!XP())){let e=/ Chrome\/([\.0-9]+)/.exec(Na.userAgent);e!==null&&(HP=!0,$K=cy(e[1]))}return HP}function REe(){return mH()&&$K}var GP,ZK;function JK(){if(!l(GP)&&(GP=!1,!mH()&&!XP()&&/ Safari\/[\.0-9]+/.test(Na.userAgent))){let e=/ Version\/([\.0-9]+)/.exec(Na.userAgent);e!==null&&(GP=!0,ZK=cy(e[1]))}return GP}function MEe(){return JK()&&ZK}var WP,dH;function QK(){if(!l(WP)){WP=!1;let e=/ AppleWebKit\/([\.0-9]+)(\+?)/.exec(Na.userAgent);e!==null&&(WP=!0,dH=cy(e[1]),dH.isNightly=!!e[2])}return WP}function BEe(){return QK()&&dH}var pS,hH;function e$(){if(!l(pS)){pS=!1;let e;Na.appName==="Microsoft Internet Explorer"?(e=/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(Na.userAgent),e!==null&&(pS=!0,hH=cy(e[1]))):Na.appName==="Netscape"&&(e=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(Na.userAgent),e!==null&&(pS=!0,hH=cy(e[1])))}return pS}function LEe(){return e$()&&hH}var jP,t$;function XP(){if(!l(jP)){jP=!1;let e=/ Edg\/([\.0-9]+)/.exec(Na.userAgent);e!==null&&(jP=!0,t$=cy(e[1]))}return jP}function NEe(){return XP()&&t$}var qP,n$;function pH(){if(!l(qP)){qP=!1;let e=/Firefox\/([\.0-9]+)/.exec(Na.userAgent);e!==null&&(qP=!0,n$=cy(e[1]))}return qP}var lH;function FEe(){return l(lH)||(lH=/Windows/i.test(Na.appVersion)),lH}var uH;function VEe(){return l(uH)||(uH=navigator.platform==="iPhone"||navigator.platform==="iPod"||navigator.platform==="iPad"),uH}function kEe(){return pH()&&n$}var fH;function UEe(){return l(fH)||(fH=!pH()&&typeof PointerEvent<"u"&&(!l(Na.pointerEnabled)||Na.pointerEnabled)),fH}var i$,YP;function o$(){if(!l(YP)){let e=document.createElement("canvas");e.setAttribute("style","image-rendering: -moz-crisp-edges;image-rendering: pixelated;");let t=e.style.imageRendering;YP=l(t)&&t!=="",YP&&(i$=t)}return YP}function zEe(){return o$()?i$:void 0}function hc(){return hc._result}hc._promise=void 0;hc._result=void 0;hc.initialize=function(){return l(hc._promise)||(hc._promise=new Promise(e=>{let t=new Image;t.onload=function(){hc._result=t.width>0&&t.height>0,e(hc._result)},t.onerror=function(){hc._result=!1,e(hc._result)},t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"})),hc._promise};Object.defineProperties(hc,{initialized:{get:function(){return l(hc._result)}}});var iA=[];typeof ArrayBuffer<"u"&&(iA.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),typeof Uint8ClampedArray<"u"&&iA.push(Uint8ClampedArray),typeof Uint8ClampedArray<"u"&&iA.push(Uint8ClampedArray),typeof BigInt64Array<"u"&&iA.push(BigInt64Array),typeof BigUint64Array<"u"&&iA.push(BigUint64Array));var hh={isChrome:mH,chromeVersion:REe,isSafari:JK,safariVersion:MEe,isWebkit:QK,webkitVersion:BEe,isInternetExplorer:e$,internetExplorerVersion:LEe,isEdge:XP,edgeVersion:NEe,isFirefox:pH,firefoxVersion:kEe,isWindows:FEe,isIPadOrIOS:VEe,hardwareConcurrency:y(Na.hardwareConcurrency,3),supportsPointerEvents:UEe,supportsImageRenderingPixelated:o$,supportsWebP:hc,imageRenderingValue:zEe,typedArrayTypes:iA};hh.supportsBasis=function(e){return hh.supportsWebAssembly()&&e.context.supportsBasis};hh.supportsFullscreen=function(){return Or.supportsFullscreen()};hh.supportsTypedArrays=function(){return typeof ArrayBuffer<"u"};hh.supportsBigInt64Array=function(){return typeof BigInt64Array<"u"};hh.supportsBigUint64Array=function(){return typeof BigUint64Array<"u"};hh.supportsBigInt=function(){return typeof BigInt<"u"};hh.supportsWebWorkers=function(){return typeof Worker<"u"};hh.supportsWebAssembly=function(){return typeof WebAssembly<"u"};var Et=hh;function tt(e,t,n,i){this.x=y(e,0),this.y=y(t,0),this.z=y(n,0),this.w=y(i,0)}var _S=new h;tt.fromAxisAngle=function(e,t,n){let i=t/2,o=Math.sin(i);_S=h.normalize(e,_S);let r=_S.x*o,s=_S.y*o,a=_S.z*o,c=Math.cos(i);return l(n)?(n.x=r,n.y=s,n.z=a,n.w=c,n):new tt(r,s,a,c)};var HEe=[1,2,0],GEe=new Array(3);tt.fromRotationMatrix=function(e,t){let n,i,o,r,s,a=e[Q.COLUMN0ROW0],c=e[Q.COLUMN1ROW1],u=e[Q.COLUMN2ROW2],f=a+c+u;if(f>0)n=Math.sqrt(f+1),s=.5*n,n=.5/n,i=(e[Q.COLUMN1ROW2]-e[Q.COLUMN2ROW1])*n,o=(e[Q.COLUMN2ROW0]-e[Q.COLUMN0ROW2])*n,r=(e[Q.COLUMN0ROW1]-e[Q.COLUMN1ROW0])*n;else{let d=HEe,p=0;c>a&&(p=1),u>a&&u>c&&(p=2);let _=d[p],m=d[_];n=Math.sqrt(e[Q.getElementIndex(p,p)]-e[Q.getElementIndex(_,_)]-e[Q.getElementIndex(m,m)]+1);let x=GEe;x[p]=.5*n,n=.5/n,s=(e[Q.getElementIndex(m,_)]-e[Q.getElementIndex(_,m)])*n,x[_]=(e[Q.getElementIndex(_,p)]+e[Q.getElementIndex(p,_)])*n,x[m]=(e[Q.getElementIndex(m,p)]+e[Q.getElementIndex(p,m)])*n,i=-x[0],o=-x[1],r=-x[2]}return l(t)?(t.x=i,t.y=o,t.z=r,t.w=s,t):new tt(i,o,r,s)};var r$=new tt,s$=new tt,_H=new tt,a$=new tt;tt.fromHeadingPitchRoll=function(e,t){return a$=tt.fromAxisAngle(h.UNIT_X,e.roll,r$),_H=tt.fromAxisAngle(h.UNIT_Y,-e.pitch,t),t=tt.multiply(_H,a$,_H),s$=tt.fromAxisAngle(h.UNIT_Z,-e.heading,r$),tt.multiply(s$,t,t)};var KP=new h,gH=new h,Kf=new tt,c$=new tt,$P=new tt;tt.packedLength=4;tt.pack=function(e,t,n){return n=y(n,0),t[n++]=e.x,t[n++]=e.y,t[n++]=e.z,t[n]=e.w,t};tt.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new tt),n.x=e[t],n.y=e[t+1],n.z=e[t+2],n.w=e[t+3],n};tt.packedInterpolationLength=3;tt.convertPackedArrayForInterpolation=function(e,t,n,i){tt.unpack(e,n*4,$P),tt.conjugate($P,$P);for(let o=0,r=n-t+1;o<r;o++){let s=o*3;tt.unpack(e,(t+o)*4,Kf),tt.multiply(Kf,$P,Kf),Kf.w<0&&tt.negate(Kf,Kf),tt.computeAxis(Kf,KP);let a=tt.computeAngle(Kf);l(i)||(i=[]),i[s]=KP.x*a,i[s+1]=KP.y*a,i[s+2]=KP.z*a}};tt.unpackInterpolationResult=function(e,t,n,i,o){l(o)||(o=new tt),h.fromArray(e,0,gH);let r=h.magnitude(gH);return tt.unpack(t,i*4,c$),r===0?tt.clone(tt.IDENTITY,Kf):tt.fromAxisAngle(gH,r,Kf),tt.multiply(Kf,c$,o)};tt.clone=function(e,t){if(!!l(e))return l(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new tt(e.x,e.y,e.z,e.w)};tt.conjugate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=e.w,t};tt.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w};tt.magnitude=function(e){return Math.sqrt(tt.magnitudeSquared(e))};tt.normalize=function(e,t){let n=1/tt.magnitude(e),i=e.x*n,o=e.y*n,r=e.z*n,s=e.w*n;return t.x=i,t.y=o,t.z=r,t.w=s,t};tt.inverse=function(e,t){let n=tt.magnitudeSquared(e);return t=tt.conjugate(e,t),tt.multiplyByScalar(t,1/n,t)};tt.add=function(e,t,n){return n.x=e.x+t.x,n.y=e.y+t.y,n.z=e.z+t.z,n.w=e.w+t.w,n};tt.subtract=function(e,t,n){return n.x=e.x-t.x,n.y=e.y-t.y,n.z=e.z-t.z,n.w=e.w-t.w,n};tt.negate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t};tt.dot=function(e,t){return e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w};tt.multiply=function(e,t,n){let i=e.x,o=e.y,r=e.z,s=e.w,a=t.x,c=t.y,u=t.z,f=t.w,d=s*a+i*f+o*u-r*c,p=s*c-i*u+o*f+r*a,_=s*u+i*c-o*a+r*f,m=s*f-i*a-o*c-r*u;return n.x=d,n.y=p,n.z=_,n.w=m,n};tt.multiplyByScalar=function(e,t,n){return n.x=e.x*t,n.y=e.y*t,n.z=e.z*t,n.w=e.w*t,n};tt.divideByScalar=function(e,t,n){return n.x=e.x/t,n.y=e.y/t,n.z=e.z/t,n.w=e.w/t,n};tt.computeAxis=function(e,t){let n=e.w;if(Math.abs(n-1)<R.EPSILON6)return t.x=t.y=t.z=0,t;let i=1/Math.sqrt(1-n*n);return t.x=e.x*i,t.y=e.y*i,t.z=e.z*i,t};tt.computeAngle=function(e){return Math.abs(e.w-1)<R.EPSILON6?0:2*Math.acos(e.w)};var yH=new tt;tt.lerp=function(e,t,n,i){return yH=tt.multiplyByScalar(t,n,yH),i=tt.multiplyByScalar(e,1-n,i),tt.add(yH,i,i)};var l$=new tt,xH=new tt,CH=new tt;tt.slerp=function(e,t,n,i){let o=tt.dot(e,t),r=t;if(o<0&&(o=-o,r=l$=tt.negate(t,l$)),1-o<R.EPSILON6)return tt.lerp(e,r,n,i);let s=Math.acos(o);return xH=tt.multiplyByScalar(e,Math.sin((1-n)*s),xH),CH=tt.multiplyByScalar(r,Math.sin(n*s),CH),i=tt.add(xH,CH,i),tt.multiplyByScalar(i,1/Math.sin(s),i)};tt.log=function(e,t){let n=R.acosClamped(e.w),i=0;return n!==0&&(i=n/Math.sin(n)),h.multiplyByScalar(e,i,t)};tt.exp=function(e,t){let n=h.magnitude(e),i=0;return n!==0&&(i=Math.sin(n)/n),t.x=e.x*i,t.y=e.y*i,t.z=e.z*i,t.w=Math.cos(n),t};var WEe=new h,jEe=new h,gS=new tt,oA=new tt;tt.computeInnerQuadrangle=function(e,t,n,i){let o=tt.conjugate(t,gS);tt.multiply(o,n,oA);let r=tt.log(oA,WEe);tt.multiply(o,e,oA);let s=tt.log(oA,jEe);return h.add(r,s,r),h.multiplyByScalar(r,.25,r),h.negate(r,r),tt.exp(r,gS),tt.multiply(t,gS,i)};tt.squad=function(e,t,n,i,o,r){let s=tt.slerp(e,t,o,gS),a=tt.slerp(n,i,o,oA);return tt.slerp(s,a,2*o*(1-o),r)};var qEe=new tt,u$=1.9011074535173003,ZP=Et.supportsTypedArrays()?new Float32Array(8):[],JP=Et.supportsTypedArrays()?new Float32Array(8):[],km=Et.supportsTypedArrays()?new Float32Array(8):[],Um=Et.supportsTypedArrays()?new Float32Array(8):[];for(let e=0;e<7;++e){let t=e+1,n=2*t+1;ZP[e]=1/(t*n),JP[e]=t/n}ZP[7]=u$/(8*17);JP[7]=u$*8/17;tt.fastSlerp=function(e,t,n,i){let o=tt.dot(e,t),r;o>=0?r=1:(r=-1,o=-o);let s=o-1,a=1-n,c=n*n,u=a*a;for(let _=7;_>=0;--_)km[_]=(ZP[_]*c-JP[_])*s,Um[_]=(ZP[_]*u-JP[_])*s;let f=r*n*(1+km[0]*(1+km[1]*(1+km[2]*(1+km[3]*(1+km[4]*(1+km[5]*(1+km[6]*(1+km[7])))))))),d=a*(1+Um[0]*(1+Um[1]*(1+Um[2]*(1+Um[3]*(1+Um[4]*(1+Um[5]*(1+Um[6]*(1+Um[7])))))))),p=tt.multiplyByScalar(e,d,qEe);return tt.multiplyByScalar(t,f,i),tt.add(p,i,i)};tt.fastSquad=function(e,t,n,i,o,r){let s=tt.fastSlerp(e,t,o,gS),a=tt.fastSlerp(n,i,o,oA);return tt.fastSlerp(s,a,2*o*(1-o),r)};tt.equals=function(e,t){return e===t||l(e)&&l(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w};tt.equalsEpsilon=function(e,t,n){return n=y(n,0),e===t||l(e)&&l(t)&&Math.abs(e.x-t.x)<=n&&Math.abs(e.y-t.y)<=n&&Math.abs(e.z-t.z)<=n&&Math.abs(e.w-t.w)<=n};tt.ZERO=Object.freeze(new tt(0,0,0,0));tt.IDENTITY=Object.freeze(new tt(0,0,0,1));tt.prototype.clone=function(e){return tt.clone(this,e)};tt.prototype.equals=function(e){return tt.equals(this,e)};tt.prototype.equalsEpsilon=function(e,t){return tt.equalsEpsilon(this,e,t)};tt.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};var Me=tt;var Li={},AH={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},rA={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},TH={},tl={east:new h,north:new h,up:new h,west:new h,south:new h,down:new h},b_=new h,E_=new h,S_=new h;Li.localFrameToFixedFrameGenerator=function(e,t){if(!AH.hasOwnProperty(e)||!AH[e].hasOwnProperty(t))throw new ye("firstAxis and secondAxis must be east, north, up, west, south or down.");let n=AH[e][t],i,o=e+t;return l(TH[o])?i=TH[o]:(i=function(r,s,a){if(l(a)||(a=new B),h.equalsEpsilon(r,h.ZERO,R.EPSILON14))h.unpack(rA[e],0,b_),h.unpack(rA[t],0,E_),h.unpack(rA[n],0,S_);else if(R.equalsEpsilon(r.x,0,R.EPSILON14)&&R.equalsEpsilon(r.y,0,R.EPSILON14)){let c=R.sign(r.z);h.unpack(rA[e],0,b_),e!=="east"&&e!=="west"&&h.multiplyByScalar(b_,c,b_),h.unpack(rA[t],0,E_),t!=="east"&&t!=="west"&&h.multiplyByScalar(E_,c,E_),h.unpack(rA[n],0,S_),n!=="east"&&n!=="west"&&h.multiplyByScalar(S_,c,S_)}else{s=y(s,re.WGS84),s.geodeticSurfaceNormal(r,tl.up);let c=tl.up,u=tl.east;u.x=-r.y,u.y=r.x,u.z=0,h.normalize(u,tl.east),h.cross(c,u,tl.north),h.multiplyByScalar(tl.up,-1,tl.down),h.multiplyByScalar(tl.east,-1,tl.west),h.multiplyByScalar(tl.north,-1,tl.south),b_=tl[e],E_=tl[t],S_=tl[n]}return a[0]=b_.x,a[1]=b_.y,a[2]=b_.z,a[3]=0,a[4]=E_.x,a[5]=E_.y,a[6]=E_.z,a[7]=0,a[8]=S_.x,a[9]=S_.y,a[10]=S_.z,a[11]=0,a[12]=r.x,a[13]=r.y,a[14]=r.z,a[15]=1,a},TH[o]=i),i};Li.eastNorthUpToFixedFrame=Li.localFrameToFixedFrameGenerator("east","north");Li.northEastDownToFixedFrame=Li.localFrameToFixedFrameGenerator("north","east");Li.northUpEastToFixedFrame=Li.localFrameToFixedFrameGenerator("north","up");Li.northWestUpToFixedFrame=Li.localFrameToFixedFrameGenerator("north","west");var YEe=new Me,XEe=new h(1,1,1),KEe=new B;Li.headingPitchRollToFixedFrame=function(e,t,n,i,o){i=y(i,Li.eastNorthUpToFixedFrame);let r=Me.fromHeadingPitchRoll(t,YEe),s=B.fromTranslationQuaternionRotationScale(h.ZERO,r,XEe,KEe);return o=i(e,n,o),B.multiply(o,s,o)};var $Ee=new B,ZEe=new Q;Li.headingPitchRollQuaternion=function(e,t,n,i,o){let r=Li.headingPitchRollToFixedFrame(e,t,n,i,$Ee),s=B.getMatrix3(r,ZEe);return Me.fromRotationMatrix(s,o)};var JEe=new h(1,1,1),QEe=new h,f$=new B,eSe=new B,tSe=new Q,nSe=new Me;Li.fixedFrameToHeadingPitchRoll=function(e,t,n,i){t=y(t,re.WGS84),n=y(n,Li.eastNorthUpToFixedFrame),l(i)||(i=new Xf);let o=B.getTranslation(e,QEe);if(h.equals(o,h.ZERO))return i.heading=0,i.pitch=0,i.roll=0,i;let r=B.inverseTransformation(n(o,t,f$),f$),s=B.setScale(e,JEe,eSe);s=B.setTranslation(s,h.ZERO,s),r=B.multiply(r,s,r);let a=Me.fromRotationMatrix(B.getMatrix3(r,tSe),nSe);return a=Me.normalize(a,a),Xf.fromQuaternion(a,i)};var iSe=6*3600+41*60+50.54841,oSe=8640184812866e-6,rSe=.093104,sSe=-62e-7,aSe=11772758384668e-32,cSe=72921158553e-15,lSe=R.TWO_PI/86400,QP=new ee;Li.computeTemeToPseudoFixedMatrix=function(e,t){QP=ee.addSeconds(e,-ee.computeTaiMinusUtc(e),QP);let n=QP.dayNumber,i=QP.secondsOfDay,o,r=n-2451545;i>=43200?o=(r+.5)/jn.DAYS_PER_JULIAN_CENTURY:o=(r-.5)/jn.DAYS_PER_JULIAN_CENTURY;let a=(iSe+o*(oSe+o*(rSe+o*sSe)))*lSe%R.TWO_PI,c=cSe+aSe*(n-24515455e-1),u=(i+jn.SECONDS_PER_DAY*.5)%jn.SECONDS_PER_DAY,f=a+c*u,d=Math.cos(f),p=Math.sin(f);return l(t)?(t[0]=d,t[1]=-p,t[2]=0,t[3]=p,t[4]=d,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new Q(d,p,0,-p,d,0,0,0,1)};Li.iau2006XysData=new zP;Li.earthOrientationParameters=UP.NONE;var SH=32.184,uSe=2451545;Li.preloadIcrfFixed=function(e){let t=e.start.dayNumber,n=e.start.secondsOfDay+SH,i=e.stop.dayNumber,o=e.stop.secondsOfDay+SH,r=Li.iau2006XysData.preload(t,n,i,o),s=Li.earthOrientationParameters.getPromiseToLoad();return Promise.all([r,s])};Li.computeIcrfToFixedMatrix=function(e,t){l(t)||(t=new Q);let n=Li.computeFixedToIcrfMatrix(e,t);if(!!l(n))return Q.transpose(n,t)};var fSe=new nA(0,0,0),dSe=new ay(0,0,0,0,0,0),bH=new Q,EH=new Q;Li.computeFixedToIcrfMatrix=function(e,t){l(t)||(t=new Q);let n=Li.earthOrientationParameters.compute(e,dSe);if(!l(n))return;let i=e.dayNumber,o=e.secondsOfDay+SH,r=Li.iau2006XysData.computeXysRadians(i,o,fSe);if(!l(r))return;let s=r.x+n.xPoleOffset,a=r.y+n.yPoleOffset,c=1/(1+Math.sqrt(1-s*s-a*a)),u=bH;u[0]=1-c*s*s,u[3]=-c*s*a,u[6]=s,u[1]=-c*s*a,u[4]=1-c*a*a,u[7]=a,u[2]=-s,u[5]=-a,u[8]=1-c*(s*s+a*a);let f=Q.fromRotationZ(-r.s,EH),d=Q.multiply(u,f,bH),p=e.dayNumber,_=e.secondsOfDay-ee.computeTaiMinusUtc(e)+n.ut1MinusUtc,m=p-2451545,x=_/jn.SECONDS_PER_DAY,C=.779057273264+x+.00273781191135448*(m+x);C=C%1*R.TWO_PI;let A=Q.fromRotationZ(C,EH),T=Q.multiply(d,A,bH),b=Math.cos(n.xPoleWander),S=Math.cos(n.yPoleWander),w=Math.sin(n.xPoleWander),D=Math.sin(n.yPoleWander),O=i-uSe+o/jn.SECONDS_PER_DAY;O/=36525;let I=-47e-6*O*R.RADIANS_PER_DEGREE/3600,L=Math.cos(I),N=Math.sin(I),g=EH;return g[0]=b*L,g[1]=b*N,g[2]=w,g[3]=-S*N+D*w*L,g[4]=S*L+D*w*N,g[5]=-D*b,g[6]=-D*N-S*w*L,g[7]=D*L-S*w*N,g[8]=S*b,Q.multiply(T,g,t)};var hSe=new se;Li.pointToWindowCoordinates=function(e,t,n,i){return i=Li.pointToGLWindowCoordinates(e,t,n,i),i.y=2*t[5]-i.y,i};Li.pointToGLWindowCoordinates=function(e,t,n,i){l(i)||(i=new G);let o=hSe;return B.multiplyByVector(e,se.fromElements(n.x,n.y,n.z,1,o),o),se.multiplyByScalar(o,1/o.w,o),B.multiplyByVector(t,o,o),G.fromCartesian4(o,i)};var mSe=new h,pSe=new h,_Se=new h;Li.rotationMatrixFromPositionVelocity=function(e,t,n,i){let o=y(n,re.WGS84).geodeticSurfaceNormal(e,mSe),r=h.cross(t,o,pSe);h.equalsEpsilon(r,h.ZERO,R.EPSILON6)&&(r=h.clone(h.UNIT_X,r));let s=h.cross(r,t,_Se);return h.normalize(s,s),h.cross(t,s,r),h.negate(r,r),h.normalize(r,r),l(i)||(i=new Q),i[0]=t.x,i[1]=t.y,i[2]=t.z,i[3]=r.x,i[4]=r.y,i[5]=r.z,i[6]=s.x,i[7]=s.y,i[8]=s.z,i};var d$=new B(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),h$=new me,m$=new h,gSe=new h,ySe=new Q,wH=new B,p$=new B;Li.basisTo2D=function(e,t,n){let i=B.getTranslation(t,gSe),o=e.ellipsoid,r=o.cartesianToCartographic(i,h$),s=e.project(r,m$);h.fromElements(s.z,s.x,s.y,s);let a=Li.eastNorthUpToFixedFrame(i,o,wH),c=B.inverseTransformation(a,p$),u=B.getMatrix3(t,ySe),f=B.multiplyByMatrix3(c,u,n);return B.multiply(d$,f,n),B.setTranslation(n,s,n),n};Li.wgs84To2DModelMatrix=function(e,t,n){let i=e.ellipsoid,o=Li.eastNorthUpToFixedFrame(t,i,wH),r=B.inverseTransformation(o,p$),s=i.cartesianToCartographic(t,h$),a=e.project(s,m$);h.fromElements(a.z,a.x,a.y,a);let c=B.fromTranslation(a,wH);return B.multiply(d$,r,n),B.multiply(c,n,n),n};var _t=Li;var vH=new se;function mh(e,t){t=y(t,re.WGS84),e=t.scaleToGeodeticSurface(e);let n=_t.eastNorthUpToFixedFrame(e,t);this._ellipsoid=t,this._origin=e,this._xAxis=h.fromCartesian4(B.getColumn(n,0,vH)),this._yAxis=h.fromCartesian4(B.getColumn(n,1,vH));let i=h.fromCartesian4(B.getColumn(n,2,vH));this._plane=rn.fromPointNormal(e,i)}Object.defineProperties(mh.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},origin:{get:function(){return this._origin}},plane:{get:function(){return this._plane}},xAxis:{get:function(){return this._xAxis}},yAxis:{get:function(){return this._yAxis}},zAxis:{get:function(){return this._plane.normal}}});var xSe=new ry;mh.fromPoints=function(e,t){let n=ry.fromPoints(e,xSe);return new mh(n.center,t)};var _$=new bn,eI=new h;mh.prototype.projectPointOntoPlane=function(e,t){let n=_$;n.origin=e,h.normalize(e,n.direction);let i=Ki.rayPlane(n,this._plane,eI);if(l(i)||(h.negate(n.direction,n.direction),i=Ki.rayPlane(n,this._plane,eI)),l(i)){let o=h.subtract(i,this._origin,i),r=h.dot(this._xAxis,o),s=h.dot(this._yAxis,o);return l(t)?(t.x=r,t.y=s,t):new G(r,s)}};mh.prototype.projectPointsOntoPlane=function(e,t){l(t)||(t=[]);let n=0,i=e.length;for(let o=0;o<i;o++){let r=this.projectPointOntoPlane(e[o],t[n]);l(r)&&(t[n]=r,n++)}return t.length=n,t};mh.prototype.projectPointToNearestOnPlane=function(e,t){l(t)||(t=new G);let n=_$;n.origin=e,h.clone(this._plane.normal,n.direction);let i=Ki.rayPlane(n,this._plane,eI);l(i)||(h.negate(n.direction,n.direction),i=Ki.rayPlane(n,this._plane,eI));let o=h.subtract(i,this._origin,i),r=h.dot(this._xAxis,o),s=h.dot(this._yAxis,o);return t.x=r,t.y=s,t};mh.prototype.projectPointsToNearestOnPlane=function(e,t){l(t)||(t=[]);let n=e.length;t.length=n;for(let i=0;i<n;i++)t[i]=this.projectPointToNearestOnPlane(e[i],t[i]);return t};var CSe=new h;mh.prototype.projectPointOntoEllipsoid=function(e,t){l(t)||(t=new h);let n=this._ellipsoid,i=this._origin,o=this._xAxis,r=this._yAxis,s=CSe;return h.multiplyByScalar(o,e.x,s),t=h.add(i,s,t),h.multiplyByScalar(r,e.y,s),h.add(t,s,t),n.scaleToGeocentricSurface(t,t),t};mh.prototype.projectPointsOntoEllipsoid=function(e,t){let n=e.length;l(t)?t.length=n:t=new Array(n);for(let i=0;i<n;++i)t[i]=this.projectPointOntoEllipsoid(e[i],t[i]);return t};var Fa=mh;function wi(e,t){this.center=h.clone(y(e,h.ZERO)),this.halfAxes=Q.clone(y(t,Q.ZERO))}wi.packedLength=h.packedLength+Q.packedLength;wi.pack=function(e,t,n){return n=y(n,0),h.pack(e.center,t,n),Q.pack(e.halfAxes,t,n+h.packedLength),t};wi.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new wi),h.unpack(e,t,n.center),Q.unpack(e,t+h.packedLength,n.halfAxes),n};var ASe=new h,TSe=new h,bSe=new h,ESe=new h,SSe=new h,wSe=new h,vSe=new Q,DSe={unitary:new Q,diagonal:new Q};wi.fromPoints=function(e,t){if(l(t)||(t=new wi),!l(e)||e.length===0)return t.halfAxes=Q.ZERO,t.center=h.ZERO,t;let n,i=e.length,o=h.clone(e[0],ASe);for(n=1;n<i;n++)h.add(o,e[n],o);let r=1/i;h.multiplyByScalar(o,r,o);let s=0,a=0,c=0,u=0,f=0,d=0,p;for(n=0;n<i;n++)p=h.subtract(e[n],o,TSe),s+=p.x*p.x,a+=p.x*p.y,c+=p.x*p.z,u+=p.y*p.y,f+=p.y*p.z,d+=p.z*p.z;s*=r,a*=r,c*=r,u*=r,f*=r,d*=r;let _=vSe;_[0]=s,_[1]=a,_[2]=c,_[3]=a,_[4]=u,_[5]=f,_[6]=c,_[7]=f,_[8]=d;let m=Q.computeEigenDecomposition(_,DSe),x=Q.clone(m.unitary,t.halfAxes),C=Q.getColumn(x,0,ESe),A=Q.getColumn(x,1,SSe),T=Q.getColumn(x,2,wSe),b=-Number.MAX_VALUE,S=-Number.MAX_VALUE,w=-Number.MAX_VALUE,D=Number.MAX_VALUE,O=Number.MAX_VALUE,I=Number.MAX_VALUE;for(n=0;n<i;n++)p=e[n],b=Math.max(h.dot(C,p),b),S=Math.max(h.dot(A,p),S),w=Math.max(h.dot(T,p),w),D=Math.min(h.dot(C,p),D),O=Math.min(h.dot(A,p),O),I=Math.min(h.dot(T,p),I);C=h.multiplyByScalar(C,.5*(D+b),C),A=h.multiplyByScalar(A,.5*(O+S),A),T=h.multiplyByScalar(T,.5*(I+w),T);let L=h.add(C,A,t.center);h.add(L,T,L);let N=bSe;return N.x=b-D,N.y=S-O,N.z=w-I,h.multiplyByScalar(N,.5,N),Q.multiplyByScale(t.halfAxes,N,t.halfAxes),t};var T$=new h,PSe=new h;function g$(e,t,n,i,o,r,s,a,c,u,f){l(f)||(f=new wi);let d=f.halfAxes;Q.setColumn(d,0,t,d),Q.setColumn(d,1,n,d),Q.setColumn(d,2,i,d);let p=T$;p.x=(o+r)/2,p.y=(s+a)/2,p.z=(c+u)/2;let _=PSe;_.x=(r-o)/2,_.y=(a-s)/2,_.z=(u-c)/2;let m=f.center;return p=Q.multiplyByVector(d,p,p),h.add(e,p,m),Q.multiplyByScale(d,_,d),f}var y$=new me,ISe=new h,OSe=new me,RSe=new me,MSe=new me,BSe=new me,LSe=new me,NSe=new h,x$=new h,FSe=new h,C$=new h,VSe=new h,kSe=new G,USe=new G,zSe=new G,HSe=new G,GSe=new G,WSe=new h,jSe=new h,qSe=new h,YSe=new h,XSe=new G,KSe=new h,$Se=new h,ZSe=new h,JSe=new rn(h.UNIT_X,0);wi.fromRectangle=function(e,t,n,i,o){t=y(t,0),n=y(n,0),i=y(i,re.WGS84);let r,s,a,c,u,f,d;if(e.width<=R.PI){let O=de.center(e,y$),I=i.cartographicToCartesian(O,ISe),L=new Fa(I,i);d=L.plane;let N=O.longitude,g=e.south<0&&e.north>0?0:O.latitude,E=me.fromRadians(N,e.north,n,OSe),v=me.fromRadians(e.west,e.north,n,RSe),P=me.fromRadians(e.west,g,n,MSe),M=me.fromRadians(e.west,e.south,n,BSe),V=me.fromRadians(N,e.south,n,LSe),U=i.cartographicToCartesian(E,NSe),k=i.cartographicToCartesian(v,x$),H=i.cartographicToCartesian(P,FSe),F=i.cartographicToCartesian(M,C$),Y=i.cartographicToCartesian(V,VSe),j=L.projectPointToNearestOnPlane(U,kSe),X=L.projectPointToNearestOnPlane(k,USe),W=L.projectPointToNearestOnPlane(H,zSe),$=L.projectPointToNearestOnPlane(F,HSe),J=L.projectPointToNearestOnPlane(Y,GSe);return r=Math.min(X.x,W.x,$.x),s=-r,c=Math.max(X.y,j.y),a=Math.min($.y,J.y),v.height=M.height=t,k=i.cartographicToCartesian(v,x$),F=i.cartographicToCartesian(M,C$),u=Math.min(rn.getPointDistance(d,k),rn.getPointDistance(d,F)),f=n,g$(L.origin,L.xAxis,L.yAxis,L.zAxis,r,s,a,c,u,f,o)}let p=e.south>0,_=e.north<0,m=p?e.south:_?e.north:0,x=de.center(e,y$).longitude,C=h.fromRadians(x,m,n,i,WSe);C.z=0;let T=Math.abs(C.x)<R.EPSILON10&&Math.abs(C.y)<R.EPSILON10?h.UNIT_X:h.normalize(C,jSe),b=h.UNIT_Z,S=h.cross(T,b,qSe);d=rn.fromPointNormal(C,T,JSe);let w=h.fromRadians(x+R.PI_OVER_TWO,m,n,i,YSe);s=h.dot(rn.projectPointOntoPlane(d,w,XSe),S),r=-s,c=h.fromRadians(0,e.north,_?t:n,i,KSe).z,a=h.fromRadians(0,e.south,p?t:n,i,$Se).z;let D=h.fromRadians(e.east,m,n,i,ZSe);return u=rn.getPointDistance(d,D),f=0,g$(C,S,b,T,r,s,a,c,u,f,o)};wi.fromTransformation=function(e,t){return l(t)||(t=new wi),t.center=B.getTranslation(e,t.center),t.halfAxes=B.getMatrix3(e,t.halfAxes),t.halfAxes=Q.multiplyByScalar(t.halfAxes,.5,t.halfAxes),t};wi.clone=function(e,t){if(!!l(e))return l(t)?(h.clone(e.center,t.center),Q.clone(e.halfAxes,t.halfAxes),t):new wi(e.center,e.halfAxes)};wi.intersectPlane=function(e,t){let n=e.center,i=t.normal,o=e.halfAxes,r=i.x,s=i.y,a=i.z,c=Math.abs(r*o[Q.COLUMN0ROW0]+s*o[Q.COLUMN0ROW1]+a*o[Q.COLUMN0ROW2])+Math.abs(r*o[Q.COLUMN1ROW0]+s*o[Q.COLUMN1ROW1]+a*o[Q.COLUMN1ROW2])+Math.abs(r*o[Q.COLUMN2ROW0]+s*o[Q.COLUMN2ROW1]+a*o[Q.COLUMN2ROW2]),u=h.dot(i,n)+t.distance;return u<=-c?Zt.OUTSIDE:u>=c?Zt.INSIDE:Zt.INTERSECTING};var b$=new h,E$=new h,S$=new h,QSe=new h,A$=new h,ewe=new h;wi.distanceSquaredTo=function(e,t){let n=h.subtract(t,e.center,T$),i=e.halfAxes,o=Q.getColumn(i,0,b$),r=Q.getColumn(i,1,E$),s=Q.getColumn(i,2,S$),a=h.magnitude(o),c=h.magnitude(r),u=h.magnitude(s),f=!0,d=!0,p=!0;a>0?h.divideByScalar(o,a,o):f=!1,c>0?h.divideByScalar(r,c,r):d=!1,u>0?h.divideByScalar(s,u,s):p=!1;let _=!f+!d+!p,m,x,C;if(_===1){let S=o;m=r,x=s,d?p||(S=s,x=o):(S=r,m=o),C=h.cross(m,x,A$),S===o?o=C:S===r?r=C:S===s&&(s=C)}else if(_===2){m=o,d?m=r:p&&(m=s);let S=h.UNIT_Y;S.equalsEpsilon(m,R.EPSILON3)&&(S=h.UNIT_X),x=h.cross(m,S,QSe),h.normalize(x,x),C=h.cross(m,x,A$),h.normalize(C,C),m===o?(r=x,s=C):m===r?(s=x,o=C):m===s&&(o=x,r=C)}else _===3&&(o=h.UNIT_X,r=h.UNIT_Y,s=h.UNIT_Z);let A=ewe;A.x=h.dot(n,o),A.y=h.dot(n,r),A.z=h.dot(n,s);let T=0,b;return A.x<-a?(b=A.x+a,T+=b*b):A.x>a&&(b=A.x-a,T+=b*b),A.y<-c?(b=A.y+c,T+=b*b):A.y>c&&(b=A.y-c,T+=b*b),A.z<-u?(b=A.z+u,T+=b*b):A.z>u&&(b=A.z-u,T+=b*b),T};var twe=new h,nwe=new h;wi.computePlaneDistances=function(e,t,n,i){l(i)||(i=new Jc);let o=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,s=e.center,a=e.halfAxes,c=Q.getColumn(a,0,b$),u=Q.getColumn(a,1,E$),f=Q.getColumn(a,2,S$),d=h.add(c,u,twe);h.add(d,f,d),h.add(d,s,d);let p=h.subtract(d,t,nwe),_=h.dot(n,p);return o=Math.min(_,o),r=Math.max(_,r),h.add(s,c,d),h.add(d,u,d),h.subtract(d,f,d),h.subtract(d,t,p),_=h.dot(n,p),o=Math.min(_,o),r=Math.max(_,r),h.add(s,c,d),h.subtract(d,u,d),h.add(d,f,d),h.subtract(d,t,p),_=h.dot(n,p),o=Math.min(_,o),r=Math.max(_,r),h.add(s,c,d),h.subtract(d,u,d),h.subtract(d,f,d),h.subtract(d,t,p),_=h.dot(n,p),o=Math.min(_,o),r=Math.max(_,r),h.subtract(s,c,d),h.add(d,u,d),h.add(d,f,d),h.subtract(d,t,p),_=h.dot(n,p),o=Math.min(_,o),r=Math.max(_,r),h.subtract(s,c,d),h.add(d,u,d),h.subtract(d,f,d),h.subtract(d,t,p),_=h.dot(n,p),o=Math.min(_,o),r=Math.max(_,r),h.subtract(s,c,d),h.subtract(d,u,d),h.add(d,f,d),h.subtract(d,t,p),_=h.dot(n,p),o=Math.min(_,o),r=Math.max(_,r),h.subtract(s,c,d),h.subtract(d,u,d),h.subtract(d,f,d),h.subtract(d,t,p),_=h.dot(n,p),o=Math.min(_,o),r=Math.max(_,r),i.start=o,i.stop=r,i};var iwe=new h,owe=new h,rwe=new h;wi.computeCorners=function(e,t){l(t)||(t=[new h,new h,new h,new h,new h,new h,new h,new h]);let n=e.center,i=e.halfAxes,o=Q.getColumn(i,0,iwe),r=Q.getColumn(i,1,owe),s=Q.getColumn(i,2,rwe);return h.clone(n,t[0]),h.subtract(t[0],o,t[0]),h.subtract(t[0],r,t[0]),h.subtract(t[0],s,t[0]),h.clone(n,t[1]),h.subtract(t[1],o,t[1]),h.subtract(t[1],r,t[1]),h.add(t[1],s,t[1]),h.clone(n,t[2]),h.subtract(t[2],o,t[2]),h.add(t[2],r,t[2]),h.subtract(t[2],s,t[2]),h.clone(n,t[3]),h.subtract(t[3],o,t[3]),h.add(t[3],r,t[3]),h.add(t[3],s,t[3]),h.clone(n,t[4]),h.add(t[4],o,t[4]),h.subtract(t[4],r,t[4]),h.subtract(t[4],s,t[4]),h.clone(n,t[5]),h.add(t[5],o,t[5]),h.subtract(t[5],r,t[5]),h.add(t[5],s,t[5]),h.clone(n,t[6]),h.add(t[6],o,t[6]),h.add(t[6],r,t[6]),h.subtract(t[6],s,t[6]),h.clone(n,t[7]),h.add(t[7],o,t[7]),h.add(t[7],r,t[7]),h.add(t[7],s,t[7]),t};var swe=new Q;wi.computeTransformation=function(e,t){l(t)||(t=new B);let n=e.center,i=Q.multiplyByUniformScale(e.halfAxes,2,swe);return B.fromRotationTranslation(i,n,t)};var awe=new oe;wi.isOccluded=function(e,t){let n=oe.fromOrientedBoundingBox(e,awe);return!t.isBoundingSphereVisible(n)};wi.prototype.intersectPlane=function(e){return wi.intersectPlane(this,e)};wi.prototype.distanceSquaredTo=function(e){return wi.distanceSquaredTo(this,e)};wi.prototype.computePlaneDistances=function(e,t,n){return wi.computePlaneDistances(this,e,t,n)};wi.prototype.computeCorners=function(e){return wi.computeCorners(this,e)};wi.prototype.computeTransformation=function(e){return wi.computeTransformation(this,e)};wi.prototype.isOccluded=function(e){return wi.isOccluded(this,e)};wi.equals=function(e,t){return e===t||l(e)&&l(t)&&h.equals(e.center,t.center)&&Q.equals(e.halfAxes,t.halfAxes)};wi.prototype.clone=function(e){return wi.clone(this,e)};wi.prototype.equals=function(e){return wi.equals(this,e)};var gi=wi;var cwe={DEPTH_BUFFER_BIT:256,STENCIL_BUFFER_BIT:1024,COLOR_BUFFER_BIT:16384,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,ZERO:0,ONE:1,SRC_COLOR:768,ONE_MINUS_SRC_COLOR:769,SRC_ALPHA:770,ONE_MINUS_SRC_ALPHA:771,DST_ALPHA:772,ONE_MINUS_DST_ALPHA:773,DST_COLOR:774,ONE_MINUS_DST_COLOR:775,SRC_ALPHA_SATURATE:776,FUNC_ADD:32774,BLEND_EQUATION:32777,BLEND_EQUATION_RGB:32777,BLEND_EQUATION_ALPHA:34877,FUNC_SUBTRACT:32778,FUNC_REVERSE_SUBTRACT:32779,BLEND_DST_RGB:32968,BLEND_SRC_RGB:32969,BLEND_DST_ALPHA:32970,BLEND_SRC_ALPHA:32971,CONSTANT_COLOR:32769,ONE_MINUS_CONSTANT_COLOR:32770,CONSTANT_ALPHA:32771,ONE_MINUS_CONSTANT_ALPHA:32772,BLEND_COLOR:32773,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,ARRAY_BUFFER_BINDING:34964,ELEMENT_ARRAY_BUFFER_BINDING:34965,STREAM_DRAW:35040,STATIC_DRAW:35044,DYNAMIC_DRAW:35048,BUFFER_SIZE:34660,BUFFER_USAGE:34661,CURRENT_VERTEX_ATTRIB:34342,FRONT:1028,BACK:1029,FRONT_AND_BACK:1032,CULL_FACE:2884,BLEND:3042,DITHER:3024,STENCIL_TEST:2960,DEPTH_TEST:2929,SCISSOR_TEST:3089,POLYGON_OFFSET_FILL:32823,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_COVERAGE:32928,NO_ERROR:0,INVALID_ENUM:1280,INVALID_VALUE:1281,INVALID_OPERATION:1282,OUT_OF_MEMORY:1285,CW:2304,CCW:2305,LINE_WIDTH:2849,ALIASED_POINT_SIZE_RANGE:33901,ALIASED_LINE_WIDTH_RANGE:33902,CULL_FACE_MODE:2885,FRONT_FACE:2886,DEPTH_RANGE:2928,DEPTH_WRITEMASK:2930,DEPTH_CLEAR_VALUE:2931,DEPTH_FUNC:2932,STENCIL_CLEAR_VALUE:2961,STENCIL_FUNC:2962,STENCIL_FAIL:2964,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STENCIL_BACK_FUNC:34816,STENCIL_BACK_FAIL:34817,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,VIEWPORT:2978,SCISSOR_BOX:3088,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,UNPACK_ALIGNMENT:3317,PACK_ALIGNMENT:3333,MAX_TEXTURE_SIZE:3379,MAX_VIEWPORT_DIMS:3386,SUBPIXEL_BITS:3408,RED_BITS:3410,GREEN_BITS:3411,BLUE_BITS:3412,ALPHA_BITS:3413,DEPTH_BITS:3414,STENCIL_BITS:3415,POLYGON_OFFSET_UNITS:10752,POLYGON_OFFSET_FACTOR:32824,TEXTURE_BINDING_2D:32873,SAMPLE_BUFFERS:32936,SAMPLES:32937,SAMPLE_COVERAGE_VALUE:32938,SAMPLE_COVERAGE_INVERT:32939,COMPRESSED_TEXTURE_FORMATS:34467,DONT_CARE:4352,FASTEST:4353,NICEST:4354,GENERATE_MIPMAP_HINT:33170,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DEPTH_COMPONENT:6402,ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,FRAGMENT_SHADER:35632,VERTEX_SHADER:35633,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VARYING_VECTORS:36348,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_FRAGMENT_UNIFORM_VECTORS:36349,SHADER_TYPE:35663,DELETE_STATUS:35712,LINK_STATUS:35714,VALIDATE_STATUS:35715,ATTACHED_SHADERS:35717,ACTIVE_UNIFORMS:35718,ACTIVE_ATTRIBUTES:35721,SHADING_LANGUAGE_VERSION:35724,CURRENT_PROGRAM:35725,NEVER:512,LESS:513,EQUAL:514,LEQUAL:515,GREATER:516,NOTEQUAL:517,GEQUAL:518,ALWAYS:519,KEEP:7680,REPLACE:7681,INCR:7682,DECR:7683,INVERT:5386,INCR_WRAP:34055,DECR_WRAP:34056,VENDOR:7936,RENDERER:7937,VERSION:7938,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TEXTURE_2D:3553,TEXTURE:5890,TEXTURE_CUBE_MAP:34067,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,MAX_CUBE_MAP_TEXTURE_SIZE:34076,TEXTURE0:33984,TEXTURE1:33985,TEXTURE2:33986,TEXTURE3:33987,TEXTURE4:33988,TEXTURE5:33989,TEXTURE6:33990,TEXTURE7:33991,TEXTURE8:33992,TEXTURE9:33993,TEXTURE10:33994,TEXTURE11:33995,TEXTURE12:33996,TEXTURE13:33997,TEXTURE14:33998,TEXTURE15:33999,TEXTURE16:34e3,TEXTURE17:34001,TEXTURE18:34002,TEXTURE19:34003,TEXTURE20:34004,TEXTURE21:34005,TEXTURE22:34006,TEXTURE23:34007,TEXTURE24:34008,TEXTURE25:34009,TEXTURE26:34010,TEXTURE27:34011,TEXTURE28:34012,TEXTURE29:34013,TEXTURE30:34014,TEXTURE31:34015,ACTIVE_TEXTURE:34016,REPEAT:10497,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,SAMPLER_2D:35678,SAMPLER_CUBE:35680,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,IMPLEMENTATION_COLOR_READ_TYPE:35738,IMPLEMENTATION_COLOR_READ_FORMAT:35739,COMPILE_STATUS:35713,LOW_FLOAT:36336,MEDIUM_FLOAT:36337,HIGH_FLOAT:36338,LOW_INT:36339,MEDIUM_INT:36340,HIGH_INT:36341,FRAMEBUFFER:36160,RENDERBUFFER:36161,RGBA4:32854,RGB5_A1:32855,RGB565:36194,DEPTH_COMPONENT16:33189,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,DEPTH_STENCIL:34041,RENDERBUFFER_WIDTH:36162,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_STENCIL_SIZE:36181,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,COLOR_ATTACHMENT0:36064,DEPTH_ATTACHMENT:36096,STENCIL_ATTACHMENT:36128,DEPTH_STENCIL_ATTACHMENT:33306,NONE:0,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_UNSUPPORTED:36061,FRAMEBUFFER_BINDING:36006,RENDERBUFFER_BINDING:36007,MAX_RENDERBUFFER_SIZE:34024,INVALID_FRAMEBUFFER_OPERATION:1286,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,CONTEXT_LOST_WEBGL:37442,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,BROWSER_DEFAULT_WEBGL:37444,COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGBA_ASTC_4x4_WEBGL:37808,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGBA_BPTC_UNORM:36492,HALF_FLOAT_OES:36193,DOUBLE:5130,READ_BUFFER:3074,UNPACK_ROW_LENGTH:3314,UNPACK_SKIP_ROWS:3315,UNPACK_SKIP_PIXELS:3316,PACK_ROW_LENGTH:3330,PACK_SKIP_ROWS:3331,PACK_SKIP_PIXELS:3332,COLOR:6144,DEPTH:6145,STENCIL:6146,RED:6403,RGB8:32849,RGBA8:32856,RGB10_A2:32857,TEXTURE_BINDING_3D:32874,UNPACK_SKIP_IMAGES:32877,UNPACK_IMAGE_HEIGHT:32878,TEXTURE_3D:32879,TEXTURE_WRAP_R:32882,MAX_3D_TEXTURE_SIZE:32883,UNSIGNED_INT_2_10_10_10_REV:33640,MAX_ELEMENTS_VERTICES:33e3,MAX_ELEMENTS_INDICES:33001,TEXTURE_MIN_LOD:33082,TEXTURE_MAX_LOD:33083,TEXTURE_BASE_LEVEL:33084,TEXTURE_MAX_LEVEL:33085,MIN:32775,MAX:32776,DEPTH_COMPONENT24:33190,MAX_TEXTURE_LOD_BIAS:34045,TEXTURE_COMPARE_MODE:34892,TEXTURE_COMPARE_FUNC:34893,CURRENT_QUERY:34917,QUERY_RESULT:34918,QUERY_RESULT_AVAILABLE:34919,STREAM_READ:35041,STREAM_COPY:35042,STATIC_READ:35045,STATIC_COPY:35046,DYNAMIC_READ:35049,DYNAMIC_COPY:35050,MAX_DRAW_BUFFERS:34852,DRAW_BUFFER0:34853,DRAW_BUFFER1:34854,DRAW_BUFFER2:34855,DRAW_BUFFER3:34856,DRAW_BUFFER4:34857,DRAW_BUFFER5:34858,DRAW_BUFFER6:34859,DRAW_BUFFER7:34860,DRAW_BUFFER8:34861,DRAW_BUFFER9:34862,DRAW_BUFFER10:34863,DRAW_BUFFER11:34864,DRAW_BUFFER12:34865,DRAW_BUFFER13:34866,DRAW_BUFFER14:34867,DRAW_BUFFER15:34868,MAX_FRAGMENT_UNIFORM_COMPONENTS:35657,MAX_VERTEX_UNIFORM_COMPONENTS:35658,SAMPLER_3D:35679,SAMPLER_2D_SHADOW:35682,FRAGMENT_SHADER_DERIVATIVE_HINT:35723,PIXEL_PACK_BUFFER:35051,PIXEL_UNPACK_BUFFER:35052,PIXEL_PACK_BUFFER_BINDING:35053,PIXEL_UNPACK_BUFFER_BINDING:35055,FLOAT_MAT2x3:35685,FLOAT_MAT2x4:35686,FLOAT_MAT3x2:35687,FLOAT_MAT3x4:35688,FLOAT_MAT4x2:35689,FLOAT_MAT4x3:35690,SRGB:35904,SRGB8:35905,SRGB8_ALPHA8:35907,COMPARE_REF_TO_TEXTURE:34894,RGBA32F:34836,RGB32F:34837,RGBA16F:34842,RGB16F:34843,VERTEX_ATTRIB_ARRAY_INTEGER:35069,MAX_ARRAY_TEXTURE_LAYERS:35071,MIN_PROGRAM_TEXEL_OFFSET:35076,MAX_PROGRAM_TEXEL_OFFSET:35077,MAX_VARYING_COMPONENTS:35659,TEXTURE_2D_ARRAY:35866,TEXTURE_BINDING_2D_ARRAY:35869,R11F_G11F_B10F:35898,UNSIGNED_INT_10F_11F_11F_REV:35899,RGB9_E5:35901,UNSIGNED_INT_5_9_9_9_REV:35902,TRANSFORM_FEEDBACK_BUFFER_MODE:35967,MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:35968,TRANSFORM_FEEDBACK_VARYINGS:35971,TRANSFORM_FEEDBACK_BUFFER_START:35972,TRANSFORM_FEEDBACK_BUFFER_SIZE:35973,TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:35976,RASTERIZER_DISCARD:35977,MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:35978,MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:35979,INTERLEAVED_ATTRIBS:35980,SEPARATE_ATTRIBS:35981,TRANSFORM_FEEDBACK_BUFFER:35982,TRANSFORM_FEEDBACK_BUFFER_BINDING:35983,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,RED_INTEGER:36244,RGB_INTEGER:36248,RGBA_INTEGER:36249,SAMPLER_2D_ARRAY:36289,SAMPLER_2D_ARRAY_SHADOW:36292,SAMPLER_CUBE_SHADOW:36293,UNSIGNED_INT_VEC2:36294,UNSIGNED_INT_VEC3:36295,UNSIGNED_INT_VEC4:36296,INT_SAMPLER_2D:36298,INT_SAMPLER_3D:36299,INT_SAMPLER_CUBE:36300,INT_SAMPLER_2D_ARRAY:36303,UNSIGNED_INT_SAMPLER_2D:36306,UNSIGNED_INT_SAMPLER_3D:36307,UNSIGNED_INT_SAMPLER_CUBE:36308,UNSIGNED_INT_SAMPLER_2D_ARRAY:36311,DEPTH_COMPONENT32F:36012,DEPTH32F_STENCIL8:36013,FLOAT_32_UNSIGNED_INT_24_8_REV:36269,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:33296,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:33297,FRAMEBUFFER_ATTACHMENT_RED_SIZE:33298,FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:33299,FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:33300,FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:33301,FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:33302,FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:33303,FRAMEBUFFER_DEFAULT:33304,UNSIGNED_INT_24_8:34042,DEPTH24_STENCIL8:35056,UNSIGNED_NORMALIZED:35863,DRAW_FRAMEBUFFER_BINDING:36006,READ_FRAMEBUFFER:36008,DRAW_FRAMEBUFFER:36009,READ_FRAMEBUFFER_BINDING:36010,RENDERBUFFER_SAMPLES:36011,FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER:36052,MAX_COLOR_ATTACHMENTS:36063,COLOR_ATTACHMENT1:36065,COLOR_ATTACHMENT2:36066,COLOR_ATTACHMENT3:36067,COLOR_ATTACHMENT4:36068,COLOR_ATTACHMENT5:36069,COLOR_ATTACHMENT6:36070,COLOR_ATTACHMENT7:36071,COLOR_ATTACHMENT8:36072,COLOR_ATTACHMENT9:36073,COLOR_ATTACHMENT10:36074,COLOR_ATTACHMENT11:36075,COLOR_ATTACHMENT12:36076,COLOR_ATTACHMENT13:36077,COLOR_ATTACHMENT14:36078,COLOR_ATTACHMENT15:36079,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:36182,MAX_SAMPLES:36183,HALF_FLOAT:5131,RG:33319,RG_INTEGER:33320,R8:33321,RG8:33323,R16F:33325,R32F:33326,RG16F:33327,RG32F:33328,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,VERTEX_ARRAY_BINDING:34229,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,SIGNED_NORMALIZED:36764,COPY_READ_BUFFER:36662,COPY_WRITE_BUFFER:36663,COPY_READ_BUFFER_BINDING:36662,COPY_WRITE_BUFFER_BINDING:36663,UNIFORM_BUFFER:35345,UNIFORM_BUFFER_BINDING:35368,UNIFORM_BUFFER_START:35369,UNIFORM_BUFFER_SIZE:35370,MAX_VERTEX_UNIFORM_BLOCKS:35371,MAX_FRAGMENT_UNIFORM_BLOCKS:35373,MAX_COMBINED_UNIFORM_BLOCKS:35374,MAX_UNIFORM_BUFFER_BINDINGS:35375,MAX_UNIFORM_BLOCK_SIZE:35376,MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:35377,MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:35379,UNIFORM_BUFFER_OFFSET_ALIGNMENT:35380,ACTIVE_UNIFORM_BLOCKS:35382,UNIFORM_TYPE:35383,UNIFORM_SIZE:35384,UNIFORM_BLOCK_INDEX:35386,UNIFORM_OFFSET:35387,UNIFORM_ARRAY_STRIDE:35388,UNIFORM_MATRIX_STRIDE:35389,UNIFORM_IS_ROW_MAJOR:35390,UNIFORM_BLOCK_BINDING:35391,UNIFORM_BLOCK_DATA_SIZE:35392,UNIFORM_BLOCK_ACTIVE_UNIFORMS:35394,UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES:35395,UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER:35396,UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER:35398,INVALID_INDEX:4294967295,MAX_VERTEX_OUTPUT_COMPONENTS:37154,MAX_FRAGMENT_INPUT_COMPONENTS:37157,MAX_SERVER_WAIT_TIMEOUT:37137,OBJECT_TYPE:37138,SYNC_CONDITION:37139,SYNC_STATUS:37140,SYNC_FLAGS:37141,SYNC_FENCE:37142,SYNC_GPU_COMMANDS_COMPLETE:37143,UNSIGNALED:37144,SIGNALED:37145,ALREADY_SIGNALED:37146,TIMEOUT_EXPIRED:37147,CONDITION_SATISFIED:37148,WAIT_FAILED:37149,SYNC_FLUSH_COMMANDS_BIT:1,VERTEX_ATTRIB_ARRAY_DIVISOR:35070,ANY_SAMPLES_PASSED:35887,ANY_SAMPLES_PASSED_CONSERVATIVE:36202,SAMPLER_BINDING:35097,RGB10_A2UI:36975,INT_2_10_10_10_REV:36255,TRANSFORM_FEEDBACK:36386,TRANSFORM_FEEDBACK_PAUSED:36387,TRANSFORM_FEEDBACK_ACTIVE:36388,TRANSFORM_FEEDBACK_BINDING:36389,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_SRGB8_ETC2:37493,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37494,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37495,COMPRESSED_RGBA8_ETC2_EAC:37496,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37497,TEXTURE_IMMUTABLE_FORMAT:37167,MAX_ELEMENT_INDEX:36203,TEXTURE_IMMUTABLE_LEVELS:33503,MAX_TEXTURE_MAX_ANISOTROPY_EXT:34047},Z=Object.freeze(cwe);var gn={BYTE:Z.BYTE,UNSIGNED_BYTE:Z.UNSIGNED_BYTE,SHORT:Z.SHORT,UNSIGNED_SHORT:Z.UNSIGNED_SHORT,INT:Z.INT,UNSIGNED_INT:Z.UNSIGNED_INT,FLOAT:Z.FLOAT,DOUBLE:Z.DOUBLE};gn.getSizeInBytes=function(e){switch(e){case gn.BYTE:return Int8Array.BYTES_PER_ELEMENT;case gn.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case gn.SHORT:return Int16Array.BYTES_PER_ELEMENT;case gn.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case gn.INT:return Int32Array.BYTES_PER_ELEMENT;case gn.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case gn.FLOAT:return Float32Array.BYTES_PER_ELEMENT;case gn.DOUBLE:return Float64Array.BYTES_PER_ELEMENT}};gn.fromTypedArray=function(e){if(e instanceof Int8Array)return gn.BYTE;if(e instanceof Uint8Array)return gn.UNSIGNED_BYTE;if(e instanceof Int16Array)return gn.SHORT;if(e instanceof Uint16Array)return gn.UNSIGNED_SHORT;if(e instanceof Int32Array)return gn.INT;if(e instanceof Uint32Array)return gn.UNSIGNED_INT;if(e instanceof Float32Array)return gn.FLOAT;if(e instanceof Float64Array)return gn.DOUBLE};gn.validate=function(e){return l(e)&&(e===gn.BYTE||e===gn.UNSIGNED_BYTE||e===gn.SHORT||e===gn.UNSIGNED_SHORT||e===gn.INT||e===gn.UNSIGNED_INT||e===gn.FLOAT||e===gn.DOUBLE)};gn.createTypedArray=function(e,t){switch(e){case gn.BYTE:return new Int8Array(t);case gn.UNSIGNED_BYTE:return new Uint8Array(t);case gn.SHORT:return new Int16Array(t);case gn.UNSIGNED_SHORT:return new Uint16Array(t);case gn.INT:return new Int32Array(t);case gn.UNSIGNED_INT:return new Uint32Array(t);case gn.FLOAT:return new Float32Array(t);case gn.DOUBLE:return new Float64Array(t)}};gn.createArrayBufferView=function(e,t,n,i){switch(n=y(n,0),i=y(i,(t.byteLength-n)/gn.getSizeInBytes(e)),e){case gn.BYTE:return new Int8Array(t,n,i);case gn.UNSIGNED_BYTE:return new Uint8Array(t,n,i);case gn.SHORT:return new Int16Array(t,n,i);case gn.UNSIGNED_SHORT:return new Uint16Array(t,n,i);case gn.INT:return new Int32Array(t,n,i);case gn.UNSIGNED_INT:return new Uint32Array(t,n,i);case gn.FLOAT:return new Float32Array(t,n,i);case gn.DOUBLE:return new Float64Array(t,n,i)}};gn.fromName=function(e){switch(e){case"BYTE":return gn.BYTE;case"UNSIGNED_BYTE":return gn.UNSIGNED_BYTE;case"SHORT":return gn.SHORT;case"UNSIGNED_SHORT":return gn.UNSIGNED_SHORT;case"INT":return gn.INT;case"UNSIGNED_INT":return gn.UNSIGNED_INT;case"FLOAT":return gn.FLOAT;case"DOUBLE":return gn.DOUBLE}};var K=Object.freeze(gn);function zt(e,t,n,i){this[0]=y(e,0),this[1]=y(n,0),this[2]=y(t,0),this[3]=y(i,0)}zt.packedLength=4;zt.pack=function(e,t,n){return n=y(n,0),t[n++]=e[0],t[n++]=e[1],t[n++]=e[2],t[n++]=e[3],t};zt.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new zt),n[0]=e[t++],n[1]=e[t++],n[2]=e[t++],n[3]=e[t++],n};zt.packArray=function(e,t){let n=e.length,i=n*4;l(t)?!Array.isArray(t)&&t.length!==i||t.length!==i&&(t.length=i):t=new Array(i);for(let o=0;o<n;++o)zt.pack(e[o],t,o*4);return t};zt.unpackArray=function(e,t){let n=e.length;l(t)?t.length=n/4:t=new Array(n/4);for(let i=0;i<n;i+=4){let o=i/4;t[o]=zt.unpack(e,i,t[o])}return t};zt.clone=function(e,t){if(!!l(e))return l(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):new zt(e[0],e[2],e[1],e[3])};zt.fromArray=zt.unpack;zt.fromColumnMajorArray=function(e,t){return zt.clone(e,t)};zt.fromRowMajorArray=function(e,t){return l(t)?(t[0]=e[0],t[1]=e[2],t[2]=e[1],t[3]=e[3],t):new zt(e[0],e[1],e[2],e[3])};zt.fromScale=function(e,t){return l(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=e.y,t):new zt(e.x,0,0,e.y)};zt.fromUniformScale=function(e,t){return l(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=e,t):new zt(e,0,0,e)};zt.fromRotation=function(e,t){let n=Math.cos(e),i=Math.sin(e);return l(t)?(t[0]=n,t[1]=i,t[2]=-i,t[3]=n,t):new zt(n,-i,i,n)};zt.toArray=function(e,t){return l(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):[e[0],e[1],e[2],e[3]]};zt.getElementIndex=function(e,t){return e*2+t};zt.getColumn=function(e,t,n){let i=t*2,o=e[i],r=e[i+1];return n.x=o,n.y=r,n};zt.setColumn=function(e,t,n,i){i=zt.clone(e,i);let o=t*2;return i[o]=n.x,i[o+1]=n.y,i};zt.getRow=function(e,t,n){let i=e[t],o=e[t+2];return n.x=i,n.y=o,n};zt.setRow=function(e,t,n,i){return i=zt.clone(e,i),i[t]=n.x,i[t+2]=n.y,i};var lwe=new G;zt.setScale=function(e,t,n){let i=zt.getScale(e,lwe),o=t.x/i.x,r=t.y/i.y;return n[0]=e[0]*o,n[1]=e[1]*o,n[2]=e[2]*r,n[3]=e[3]*r,n};var uwe=new G;zt.setUniformScale=function(e,t,n){let i=zt.getScale(e,uwe),o=t/i.x,r=t/i.y;return n[0]=e[0]*o,n[1]=e[1]*o,n[2]=e[2]*r,n[3]=e[3]*r,n};var w$=new G;zt.getScale=function(e,t){return t.x=G.magnitude(G.fromElements(e[0],e[1],w$)),t.y=G.magnitude(G.fromElements(e[2],e[3],w$)),t};var v$=new G;zt.getMaximumScale=function(e){return zt.getScale(e,v$),G.maximumComponent(v$)};var fwe=new G;zt.setRotation=function(e,t,n){let i=zt.getScale(e,fwe);return n[0]=t[0]*i.x,n[1]=t[1]*i.x,n[2]=t[2]*i.y,n[3]=t[3]*i.y,n};var dwe=new G;zt.getRotation=function(e,t){let n=zt.getScale(e,dwe);return t[0]=e[0]/n.x,t[1]=e[1]/n.x,t[2]=e[2]/n.y,t[3]=e[3]/n.y,t};zt.multiply=function(e,t,n){let i=e[0]*t[0]+e[2]*t[1],o=e[0]*t[2]+e[2]*t[3],r=e[1]*t[0]+e[3]*t[1],s=e[1]*t[2]+e[3]*t[3];return n[0]=i,n[1]=r,n[2]=o,n[3]=s,n};zt.add=function(e,t,n){return n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n[3]=e[3]+t[3],n};zt.subtract=function(e,t,n){return n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n[3]=e[3]-t[3],n};zt.multiplyByVector=function(e,t,n){let i=e[0]*t.x+e[2]*t.y,o=e[1]*t.x+e[3]*t.y;return n.x=i,n.y=o,n};zt.multiplyByScalar=function(e,t,n){return n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n};zt.multiplyByScale=function(e,t,n){return n[0]=e[0]*t.x,n[1]=e[1]*t.x,n[2]=e[2]*t.y,n[3]=e[3]*t.y,n};zt.multiplyByUniformScale=function(e,t,n){return n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n};zt.negate=function(e,t){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t};zt.transpose=function(e,t){let n=e[0],i=e[2],o=e[1],r=e[3];return t[0]=n,t[1]=i,t[2]=o,t[3]=r,t};zt.abs=function(e,t){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t};zt.equals=function(e,t){return e===t||l(e)&&l(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]};zt.equalsArray=function(e,t,n){return e[0]===t[n]&&e[1]===t[n+1]&&e[2]===t[n+2]&&e[3]===t[n+3]};zt.equalsEpsilon=function(e,t,n){return n=y(n,0),e===t||l(e)&&l(t)&&Math.abs(e[0]-t[0])<=n&&Math.abs(e[1]-t[1])<=n&&Math.abs(e[2]-t[2])<=n&&Math.abs(e[3]-t[3])<=n};zt.IDENTITY=Object.freeze(new zt(1,0,0,1));zt.ZERO=Object.freeze(new zt(0,0,0,0));zt.COLUMN0ROW0=0;zt.COLUMN0ROW1=1;zt.COLUMN1ROW0=2;zt.COLUMN1ROW1=3;Object.defineProperties(zt.prototype,{length:{get:function(){return zt.packedLength}}});zt.prototype.clone=function(e){return zt.clone(this,e)};zt.prototype.equals=function(e){return zt.equals(this,e)};zt.prototype.equalsEpsilon=function(e,t){return zt.equalsEpsilon(this,e,t)};zt.prototype.toString=function(){return`(${this[0]}, ${this[2]})
95
95
  (${this[1]}, ${this[3]})`};var vi=zt;var $i={SCALAR:"SCALAR",VEC2:"VEC2",VEC3:"VEC3",VEC4:"VEC4",MAT2:"MAT2",MAT3:"MAT3",MAT4:"MAT4"};$i.getMathType=function(e){switch(e){case $i.SCALAR:return Number;case $i.VEC2:return G;case $i.VEC3:return h;case $i.VEC4:return se;case $i.MAT2:return vi;case $i.MAT3:return Q;case $i.MAT4:return B}};$i.getNumberOfComponents=function(e){switch(e){case $i.SCALAR:return 1;case $i.VEC2:return 2;case $i.VEC3:return 3;case $i.VEC4:case $i.MAT2:return 4;case $i.MAT3:return 9;case $i.MAT4:return 16}};$i.getAttributeLocationCount=function(e){switch(e){case $i.SCALAR:case $i.VEC2:case $i.VEC3:case $i.VEC4:return 1;case $i.MAT2:return 2;case $i.MAT3:return 3;case $i.MAT4:return 4}};$i.getGlslType=function(e){switch(e){case $i.SCALAR:return"float";case $i.VEC2:return"vec2";case $i.VEC3:return"vec3";case $i.VEC4:return"vec4";case $i.MAT2:return"mat2";case $i.MAT3:return"mat3";case $i.MAT4:return"mat4"}};var jt=Object.freeze($i);var D$=1/256,P$=256,go={};go.octEncodeInRange=function(e,t,n){if(n.x=e.x/(Math.abs(e.x)+Math.abs(e.y)+Math.abs(e.z)),n.y=e.y/(Math.abs(e.x)+Math.abs(e.y)+Math.abs(e.z)),e.z<0){let i=n.x,o=n.y;n.x=(1-Math.abs(o))*R.signNotZero(i),n.y=(1-Math.abs(i))*R.signNotZero(o)}return n.x=R.toSNorm(n.x,t),n.y=R.toSNorm(n.y,t),n};go.octEncode=function(e,t){return go.octEncodeInRange(e,255,t)};var yS=new G,I$=new Uint8Array(1);function tI(e){return I$[0]=e,I$[0]}go.octEncodeToCartesian4=function(e,t){return go.octEncodeInRange(e,65535,yS),t.x=tI(yS.x*D$),t.y=tI(yS.x),t.z=tI(yS.y*D$),t.w=tI(yS.y),t};go.octDecodeInRange=function(e,t,n,i){if(i.x=R.fromSNorm(e,n),i.y=R.fromSNorm(t,n),i.z=1-(Math.abs(i.x)+Math.abs(i.y)),i.z<0){let o=i.x;i.x=(1-Math.abs(i.y))*R.signNotZero(o),i.y=(1-Math.abs(o))*R.signNotZero(i.y)}return h.normalize(i,i)};go.octDecode=function(e,t,n){return go.octDecodeInRange(e,t,255,n)};go.octDecodeFromCartesian4=function(e,t){let n=e.x,i=e.y,o=e.z,r=e.w,s=n*P$+i,a=o*P$+r;return go.octDecodeInRange(s,a,65535,t)};go.octPackFloat=function(e){return 256*e.x+e.y};var PH=new G;go.octEncodeFloat=function(e){return go.octEncode(e,PH),go.octPackFloat(PH)};go.octDecodeFloat=function(e,t){let n=e/256,i=Math.floor(n),o=(n-i)*256;return go.octDecode(i,o,t)};go.octPack=function(e,t,n,i){let o=go.octEncodeFloat(e),r=go.octEncodeFloat(t),s=go.octEncode(n,PH);return i.x=65536*s.x+o,i.y=65536*s.y+r,i};go.octUnpack=function(e,t,n,i){let o=e.x/65536,r=Math.floor(o),s=(o-r)*65536;o=e.y/65536;let a=Math.floor(o),c=(o-a)*65536;go.octDecodeFloat(s,t),go.octDecodeFloat(c,n),go.octDecode(r,a,i)};go.compressTextureCoordinates=function(e){let t=e.x*4095|0,n=e.y*4095|0;return 4096*t+n};go.decompressTextureCoordinates=function(e,t){let n=e/4096,i=Math.floor(n);return t.x=i/4095,t.y=(e-i*4096)/4095,t};function DH(e){return e>>1^-(e&1)}go.zigZagDeltaDecode=function(e,t,n){let i=e.length,o=0,r=0,s=0;for(let a=0;a<i;++a)o+=DH(e[a]),r+=DH(t[a]),e[a]=o,t[a]=r,l(n)&&(s+=DH(n[a]),n[a]=s)};go.dequantize=function(e,t,n,i){let o=jt.getNumberOfComponents(n),r;switch(t){case K.BYTE:r=127;break;case K.UNSIGNED_BYTE:r=255;break;case K.SHORT:r=32767;break;case K.UNSIGNED_SHORT:r=65535;break;case K.INT:r=2147483647;break;case K.UNSIGNED_INT:r=4294967295;break}let s=new Float32Array(i*o);for(let a=0;a<i;a++)for(let c=0;c<o;c++){let u=a*o+c;s[u]=Math.max(e[u]/r,-1)}return s};go.decodeRGB565=function(e,t){let n=e.length;l(t)||(t=new Float32Array(n*3));let i=(1<<5)-1,o=(1<<6)-1,r=1/31,s=1/63;for(let a=0;a<n;a++){let c=e[a],u=c>>11,f=c>>5&o,d=c&i,p=3*a;t[p]=u*r,t[p+1]=f*s,t[p+2]=d*r}return t};var Pn=go;var nI={};nI.getHeight=function(e,t,n){return(e-n)*t+n};var hwe=new h;nI.getPosition=function(e,t,n,i,o){let r=t.cartesianToCartographic(e,hwe),s=nI.getHeight(r.height,n,i);return h.fromRadians(r.longitude,r.latitude,s,t,o)};var nl=nI;var mwe={NONE:0,BITS12:1},Fs=Object.freeze(mwe);var ly=new h,pwe=new h,Bu=new G,iI=new B,_we=new B,gwe=Math.pow(2,12);function Va(e,t,n,i,o,r,s,a,c,u){let f=Fs.NONE,d,p;if(l(t)&&l(n)&&l(i)&&l(o)){let _=t.minimum,m=t.maximum,x=h.subtract(m,_,pwe),C=i-n;Math.max(h.maximumComponent(x),C)<gwe-1?f=Fs.BITS12:f=Fs.NONE,d=B.inverseTransformation(o,new B);let T=h.negate(_,ly);B.multiply(B.fromTranslation(T,iI),d,d);let b=ly;b.x=1/x.x,b.y=1/x.y,b.z=1/x.z,B.multiply(B.fromScale(b,iI),d,d),p=B.clone(o),B.setTranslation(p,h.ZERO,p),o=B.clone(o,new B);let S=B.fromTranslation(_,iI),w=B.fromScale(x,_we),D=B.multiply(S,w,iI);B.multiply(o,D,o),B.multiply(p,D,p)}this.quantization=f,this.minimumHeight=n,this.maximumHeight=i,this.center=h.clone(e),this.toScaledENU=d,this.fromScaledENU=o,this.matrix=p,this.hasVertexNormals=r,this.hasWebMercatorT=y(s,!1),this.hasGeodeticSurfaceNormals=y(a,!1),this.exaggeration=y(c,1),this.exaggerationRelativeHeight=y(u,0),this.stride=0,this._offsetGeodeticSurfaceNormal=0,this._offsetVertexNormal=0,this._calculateStrideAndOffsets()}Va.prototype.encode=function(e,t,n,i,o,r,s,a){let c=i.x,u=i.y;if(this.quantization===Fs.BITS12){n=B.multiplyByPoint(this.toScaledENU,n,ly),n.x=R.clamp(n.x,0,1),n.y=R.clamp(n.y,0,1),n.z=R.clamp(n.z,0,1);let f=this.maximumHeight-this.minimumHeight,d=R.clamp((o-this.minimumHeight)/f,0,1);G.fromElements(n.x,n.y,Bu);let p=Pn.compressTextureCoordinates(Bu);G.fromElements(n.z,d,Bu);let _=Pn.compressTextureCoordinates(Bu);G.fromElements(c,u,Bu);let m=Pn.compressTextureCoordinates(Bu);if(e[t++]=p,e[t++]=_,e[t++]=m,this.hasWebMercatorT){G.fromElements(s,0,Bu);let x=Pn.compressTextureCoordinates(Bu);e[t++]=x}}else h.subtract(n,this.center,ly),e[t++]=ly.x,e[t++]=ly.y,e[t++]=ly.z,e[t++]=o,e[t++]=c,e[t++]=u,this.hasWebMercatorT&&(e[t++]=s);return this.hasVertexNormals&&(e[t++]=Pn.octPackFloat(r)),this.hasGeodeticSurfaceNormals&&(e[t++]=a.x,e[t++]=a.y,e[t++]=a.z),t};var ywe=new h,O$=new h;Va.prototype.addGeodeticSurfaceNormals=function(e,t,n){if(this.hasGeodeticSurfaceNormals)return;let i=this.stride,o=e.length/i;this.hasGeodeticSurfaceNormals=!0,this._calculateStrideAndOffsets();let r=this.stride;for(let s=0;s<o;s++){for(let f=0;f<i;f++){let d=s*i+f,p=s*r+f;t[p]=e[d]}let a=this.decodePosition(t,s,ywe),c=n.geodeticSurfaceNormal(a,O$),u=s*r+this._offsetGeodeticSurfaceNormal;t[u]=c.x,t[u+1]=c.y,t[u+2]=c.z}};Va.prototype.removeGeodeticSurfaceNormals=function(e,t){if(!this.hasGeodeticSurfaceNormals)return;let n=this.stride,i=e.length/n;this.hasGeodeticSurfaceNormals=!1,this._calculateStrideAndOffsets();let o=this.stride;for(let r=0;r<i;r++)for(let s=0;s<o;s++){let a=r*n+s,c=r*o+s;t[c]=e[a]}};Va.prototype.decodePosition=function(e,t,n){if(l(n)||(n=new h),t*=this.stride,this.quantization===Fs.BITS12){let i=Pn.decompressTextureCoordinates(e[t],Bu);n.x=i.x,n.y=i.y;let o=Pn.decompressTextureCoordinates(e[t+1],Bu);return n.z=o.x,B.multiplyByPoint(this.fromScaledENU,n,n)}return n.x=e[t],n.y=e[t+1],n.z=e[t+2],h.add(n,this.center,n)};Va.prototype.getExaggeratedPosition=function(e,t,n){n=this.decodePosition(e,t,n);let i=this.exaggeration,o=this.exaggerationRelativeHeight;if(i!==1&&this.hasGeodeticSurfaceNormals){let s=this.decodeGeodeticSurfaceNormal(e,t,O$),a=this.decodeHeight(e,t),c=nl.getHeight(a,i,o)-a;n.x+=s.x*c,n.y+=s.y*c,n.z+=s.z*c}return n};Va.prototype.decodeTextureCoordinates=function(e,t,n){return l(n)||(n=new G),t*=this.stride,this.quantization===Fs.BITS12?Pn.decompressTextureCoordinates(e[t+2],n):G.fromElements(e[t+4],e[t+5],n)};Va.prototype.decodeHeight=function(e,t){return t*=this.stride,this.quantization===Fs.BITS12?Pn.decompressTextureCoordinates(e[t+1],Bu).y*(this.maximumHeight-this.minimumHeight)+this.minimumHeight:e[t+3]};Va.prototype.decodeWebMercatorT=function(e,t){return t*=this.stride,this.quantization===Fs.BITS12?Pn.decompressTextureCoordinates(e[t+3],Bu).x:e[t+6]};Va.prototype.getOctEncodedNormal=function(e,t,n){t=t*this.stride+this._offsetVertexNormal;let i=e[t]/256,o=Math.floor(i),r=(i-o)*256;return G.fromElements(o,r,n)};Va.prototype.decodeGeodeticSurfaceNormal=function(e,t,n){return t=t*this.stride+this._offsetGeodeticSurfaceNormal,n.x=e[t],n.y=e[t+1],n.z=e[t+2],n};Va.prototype._calculateStrideAndOffsets=function(){let e=0;switch(this.quantization){case Fs.BITS12:e+=3;break;default:e+=6}this.hasWebMercatorT&&(e+=1),this.hasVertexNormals&&(this._offsetVertexNormal=e,e+=1),this.hasGeodeticSurfaceNormals&&(this._offsetGeodeticSurfaceNormal=e,e+=3),this.stride=e};var oI={position3DAndHeight:0,textureCoordAndEncodedNormals:1,geodeticSurfaceNormal:2},rI={compressed0:0,compressed1:1,geodeticSurfaceNormal:2};Va.prototype.getAttributes=function(e){let t=K.FLOAT,n=K.getSizeInBytes(t),i=this.stride*n,o=0,r=[];function s(a,c){r.push({index:a,vertexBuffer:e,componentDatatype:t,componentsPerAttribute:c,offsetInBytes:o,strideInBytes:i}),o+=c*n}if(this.quantization===Fs.NONE){s(oI.position3DAndHeight,4);let a=2;a+=this.hasWebMercatorT?1:0,a+=this.hasVertexNormals?1:0,s(oI.textureCoordAndEncodedNormals,a),this.hasGeodeticSurfaceNormals&&s(oI.geodeticSurfaceNormal,3)}else{let a=this.hasWebMercatorT||this.hasVertexNormals,c=this.hasWebMercatorT&&this.hasVertexNormals;s(rI.compressed0,a?4:3),c&&s(rI.compressed1,1),this.hasGeodeticSurfaceNormals&&s(rI.geodeticSurfaceNormal,3)}return r};Va.prototype.getAttributeLocations=function(){return this.quantization===Fs.NONE?oI:rI};Va.clone=function(e,t){if(!!l(e))return l(t)||(t=new Va),t.quantization=e.quantization,t.minimumHeight=e.minimumHeight,t.maximumHeight=e.maximumHeight,t.center=h.clone(e.center),t.toScaledENU=B.clone(e.toScaledENU),t.fromScaledENU=B.clone(e.fromScaledENU),t.matrix=B.clone(e.matrix),t.hasVertexNormals=e.hasVertexNormals,t.hasWebMercatorT=e.hasWebMercatorT,t.hasGeodeticSurfaceNormals=e.hasGeodeticSurfaceNormals,t.exaggeration=e.exaggeration,t.exaggerationRelativeHeight=e.exaggerationRelativeHeight,t._calculateStrideAndOffsets(),t};var mc=Va;function il(e){this._ellipsoid=y(e,re.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Object.defineProperties(il.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});il.mercatorAngleToGeodeticLatitude=function(e){return R.PI_OVER_TWO-2*Math.atan(Math.exp(-e))};il.geodeticLatitudeToMercatorAngle=function(e){e>il.MaximumLatitude?e=il.MaximumLatitude:e<-il.MaximumLatitude&&(e=-il.MaximumLatitude);let t=Math.sin(e);return .5*Math.log((1+t)/(1-t))};il.MaximumLatitude=il.mercatorAngleToGeodeticLatitude(Math.PI);il.prototype.project=function(e,t){let n=this._semimajorAxis,i=e.longitude*n,o=il.geodeticLatitudeToMercatorAngle(e.latitude)*n,r=e.height;return l(t)?(t.x=i,t.y=o,t.z=r,t):new h(i,o,r)};il.prototype.unproject=function(e,t){let n=this._oneOverSemimajorAxis,i=e.x*n,o=il.mercatorAngleToGeodeticLatitude(e.y*n),r=e.z;return l(t)?(t.longitude=i,t.latitude=o,t.height=r,t):new me(i,o,r)};var Ui=il;var ph={};ph.DEFAULT_STRUCTURE=Object.freeze({heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1});var IH=new h,xwe=new B,Cwe=new h,Awe=new h;ph.computeVertices=function(e){let t=Math.cos,n=Math.sin,i=Math.sqrt,o=Math.atan,r=Math.exp,s=R.PI_OVER_TWO,a=R.toRadians,c=e.heightmap,u=e.width,f=e.height,d=e.skirtHeight,p=d>0,_=y(e.isGeographic,!0),m=y(e.ellipsoid,re.WGS84),x=1/m.maximumRadius,C=de.clone(e.nativeRectangle),A=de.clone(e.rectangle),T,b,S,w;l(A)?(T=A.west,b=A.south,S=A.east,w=A.north):_?(T=a(C.west),b=a(C.south),S=a(C.east),w=a(C.north)):(T=C.west*x,b=s-2*o(r(-C.south*x)),S=C.east*x,w=s-2*o(r(-C.north*x)));let D=e.relativeToCenter,O=l(D);D=O?D:h.ZERO;let I=y(e.includeWebMercatorT,!1),L=y(e.exaggeration,1),N=y(e.exaggerationRelativeHeight,0),E=L!==1,v=y(e.structure,ph.DEFAULT_STRUCTURE),P=y(v.heightScale,ph.DEFAULT_STRUCTURE.heightScale),M=y(v.heightOffset,ph.DEFAULT_STRUCTURE.heightOffset),V=y(v.elementsPerHeight,ph.DEFAULT_STRUCTURE.elementsPerHeight),U=y(v.stride,ph.DEFAULT_STRUCTURE.stride),k=y(v.elementMultiplier,ph.DEFAULT_STRUCTURE.elementMultiplier),H=y(v.isBigEndian,ph.DEFAULT_STRUCTURE.isBigEndian),F=de.computeWidth(C),Y=de.computeHeight(C),j=F/(u-1),X=Y/(f-1);_||(F*=x,Y*=x);let W=m.radiiSquared,$=W.x,J=W.y,ce=W.z,he=65536,ie=-65536,ae=_t.eastNorthUpToFixedFrame(D,m),ge=B.inverseTransformation(ae,xwe),Se,be;I&&(Se=Ui.geodeticLatitudeToMercatorAngle(b),be=1/(Ui.geodeticLatitudeToMercatorAngle(w)-Se));let Be=Cwe;Be.x=Number.POSITIVE_INFINITY,Be.y=Number.POSITIVE_INFINITY,Be.z=Number.POSITIVE_INFINITY;let Ae=Awe;Ae.x=Number.NEGATIVE_INFINITY,Ae.y=Number.NEGATIVE_INFINITY,Ae.z=Number.NEGATIVE_INFINITY;let Oe=Number.POSITIVE_INFINITY,Ge=u*f,ot=d>0?u*2+f*2:0,nt=Ge+ot,Tn=new Array(nt),Zn=new Array(nt),st=new Array(nt),kt=I?new Array(nt):[],Qn=E?new Array(nt):[],ve=0,yt=f,Kt=0,ji=u;p&&(--ve,++yt,--Kt,++ji);let si=1e-5;for(let Ye=ve;Ye<yt;++Ye){let We=Ye;We<0&&(We=0),We>=f&&(We=f-1);let $e=C.north-X*We;_?$e=a($e):$e=s-2*o(r(-$e*x));let xt=($e-b)/(w-b);xt=R.clamp(xt,0,1);let an=Ye===ve,Nn=Ye===yt-1;d>0&&(an?$e+=si*Y:Nn&&($e-=si*Y));let mo=t($e),Wo=n($e),io=ce*Wo,_i;I&&(_i=(Ui.geodeticLatitudeToMercatorAngle($e)-Se)*be);for(let Pr=Kt;Pr<ji;++Pr){let Zr=Pr;Zr<0&&(Zr=0),Zr>=u&&(Zr=u-1);let Xc=We*(u*U)+Zr*U,jo;if(V===1)jo=c[Xc];else{jo=0;let Pa;if(H)for(Pa=0;Pa<V;++Pa)jo=jo*k+c[Xc+Pa];else for(Pa=V-1;Pa>=0;--Pa)jo=jo*k+c[Xc+Pa]}jo=jo*P+M,ie=Math.max(ie,jo),he=Math.min(he,jo);let gr=C.west+j*Zr;_?gr=a(gr):gr=gr*x;let aa=(gr-T)/(S-T);aa=R.clamp(aa,0,1);let Do=We*u+Zr;if(d>0){let Pa=Pr===Kt,Q0=Pr===ji-1,h_=an||Nn||Pa||Q0;if((an||Nn)&&(Pa||Q0))continue;h_&&(jo-=d,Pa?(Do=Ge+(f-We-1),gr-=si*F):Nn?Do=Ge+f+(u-Zr-1):Q0?(Do=Ge+f+u+We,gr+=si*F):an&&(Do=Ge+f+u+f+Zr))}let Ls=mo*t(gr),oo=mo*n(gr),J0=$*Ls,po=J*oo,Ll=i(J0*Ls+po*oo+io*Wo),Kc=1/Ll,d_=J0*Kc,ca=po*Kc,$c=io*Kc,uc=new h;uc.x=d_+Ls*jo,uc.y=ca+oo*jo,uc.z=$c+Wo*jo,B.multiplyByPoint(ge,uc,IH),h.minimumByComponent(IH,Be,Be),h.maximumByComponent(IH,Ae,Ae),Oe=Math.min(Oe,jo),Tn[Do]=uc,st[Do]=new G(aa,xt),Zn[Do]=jo,I&&(kt[Do]=_i),E&&(Qn[Do]=m.geodeticSurfaceNormal(uc))}}let vo=oe.fromPoints(Tn),ir;l(A)&&(ir=gi.fromRectangle(A,he,ie,m));let _r;O&&(_r=new y_(m).computeHorizonCullingPointPossiblyUnderEllipsoid(D,Tn,he));let Vi=new ry(Be,Ae,D),Lo=new mc(D,Vi,Oe,ie,ae,!1,I,E,L,N),Bs=new Float32Array(nt*Lo.stride),ke=0;for(let Ye=0;Ye<nt;++Ye)ke=Lo.encode(Bs,ke,Tn[Ye],st[Ye],Zn[Ye],void 0,kt[Ye],Qn[Ye]);return{vertices:Bs,maximumHeight:ie,minimumHeight:he,encoding:Lo,boundingSphere3D:vo,orientedBoundingBox:ir,occludeePointInScaledSpace:_r}};var xS=ph;function Twe(){return!0}function bwe(e,t){t=y(t,"This object was destroyed, i.e., destroy() was called.");function n(){}for(let i in e)typeof e[i]=="function"&&(e[i]=n);e.isDestroyed=Twe}var ue=bwe;function R$(){if(!l(la._canTransferArrayBuffer)){let e=new Worker(B$("Workers/transferTypedArrayTest.js"));e.postMessage=y(e.webkitPostMessage,e.postMessage);let t=99,n=new Int8Array([t]);try{e.postMessage({array:n},[n.buffer])}catch{return la._canTransferArrayBuffer=!1,la._canTransferArrayBuffer}let i=Qr();e.onmessage=function(o){let r=o.data.array,s=l(r)&&r[0]===t;i.resolve(s),e.terminate(),la._canTransferArrayBuffer=s},la._canTransferArrayBuffer=i.promise}return la._canTransferArrayBuffer}var RH=new _e;function M$(e,t){--e._activeTasks;let n=t.id;if(!l(n))return;let i=e._deferreds,o=i[n];if(l(t.error)){let r=t.error;r.name==="RuntimeError"?(r=new fe(t.error.message),r.stack=t.error.stack):r.name==="DeveloperError"&&(r=new ye(t.error.message),r.stack=t.error.stack),RH.raiseEvent(r),o.reject(r)}else RH.raiseEvent(),o.resolve(t.result);delete i[n]}function B$(e){let t=Jt(e);if(YC(t)){let n=`importScripts("${t}");`,i;try{i=new Blob([n],{type:"application/javascript"})}catch{let s=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,a=new s;a.append(n),i=a.getBlob("application/javascript")}t=(window.URL||window.webkitURL).createObjectURL(i)}return t}var OH;function Ewe(){return l(OH)||(OH=B$("Workers/cesiumWorkerBootstrapper.js")),OH}function L$(e){let t=new Worker(Ewe());t.postMessage=y(t.webkitPostMessage,t.postMessage);let n={loaderConfig:{paths:{Workers:Jt("Workers")},baseUrl:Jt.getCesiumBaseUrl().url},workerModule:e._workerPath};return t.postMessage(n),t.onmessage=function(i){M$(e,i.data)},t}function Swe(e,t){let n={modulePath:void 0,wasmBinaryFile:void 0,wasmBinary:void 0};if(!Et.supportsWebAssembly()){if(!l(t.fallbackModulePath))throw new fe(`This browser does not support Web Assembly, and no backup module was provided for ${e._workerPath}`);return n.modulePath=Jt(t.fallbackModulePath),Promise.resolve(n)}return n.modulePath=Jt(t.modulePath),n.wasmBinaryFile=Jt(t.wasmBinaryFile),De.fetchArrayBuffer({url:n.wasmBinaryFile}).then(function(i){return n.wasmBinary=i,n})}function la(e,t){let n=new ei.default(e);this._workerPath=n.scheme().length!==0&&n.fragment().length===0?e:la._workerModulePrefix+e,this._maximumActiveTasks=y(t,Number.POSITIVE_INFINITY),this._activeTasks=0,this._deferreds={},this._nextID=0}var wwe=[];la.prototype.scheduleTask=function(e,t){if(l(this._worker)||(this._worker=L$(this)),this._activeTasks>=this._maximumActiveTasks)return;++this._activeTasks;let n=this;return Promise.resolve(R$()).then(function(i){l(t)?i||(t.length=0):t=wwe;let o=n._nextID++,r=Qr();return n._deferreds[o]=r,n._worker.postMessage({id:o,parameters:e,canTransferArrayBuffer:i},t),r.promise})};la.prototype.initWebAssemblyModule=function(e){l(this._worker)||(this._worker=L$(this));let t=Qr(),n=this,i=this._worker;return Swe(this,e).then(function(o){return Promise.resolve(R$()).then(function(r){let s,a=o.wasmBinary;l(a)&&r&&(s=[a]),i.onmessage=function(c){i.onmessage=function(u){M$(n,u.data)},t.resolve(c.data)},i.postMessage({webAssemblyConfig:o},s)})}),t.promise};la.prototype.isDestroyed=function(){return!1};la.prototype.destroy=function(){return l(this._worker)&&this._worker.terminate(),ue(this)};la.taskCompletedEvent=RH;la._defaultWorkerModulePrefix="Workers/";la._workerModulePrefix=la._defaultWorkerModulePrefix;la._canTransferArrayBuffer=void 0;var Di=la;function w_(){ye.throwInstantiationError()}Object.defineProperties(w_.prototype,{credits:{get:ye.throwInstantiationError},waterMask:{get:ye.throwInstantiationError}});w_.prototype.interpolateHeight=ye.throwInstantiationError;w_.prototype.isChildAvailable=ye.throwInstantiationError;w_.prototype.createMesh=ye.throwInstantiationError;w_.prototype.upsample=ye.throwInstantiationError;w_.prototype.wasCreatedByUpsampling=ye.throwInstantiationError;w_.maximumAsynchronousTasks=5;var _h=w_;function vwe(e,t,n,i,o,r,s,a,c,u,f,d,p,_,m,x){this.center=e,this.vertices=t,this.stride=y(u,6),this.indices=n,this.indexCountWithoutSkirts=i,this.vertexCountWithoutSkirts=o,this.minimumHeight=r,this.maximumHeight=s,this.boundingSphere3D=a,this.occludeePointInScaledSpace=c,this.orientedBoundingBox=f,this.encoding=d,this.westIndicesSouthToNorth=p,this.southIndicesEastToWest=_,this.eastIndicesNorthToSouth=m,this.northIndicesWestToEast=x}var $f=vwe;var bs={UNSIGNED_BYTE:Z.UNSIGNED_BYTE,UNSIGNED_SHORT:Z.UNSIGNED_SHORT,UNSIGNED_INT:Z.UNSIGNED_INT};bs.getSizeInBytes=function(e){switch(e){case bs.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case bs.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case bs.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT}};bs.fromSizeInBytes=function(e){switch(e){case 2:return bs.UNSIGNED_SHORT;case 4:return bs.UNSIGNED_INT;case 1:return bs.UNSIGNED_BYTE}};bs.validate=function(e){return l(e)&&(e===bs.UNSIGNED_BYTE||e===bs.UNSIGNED_SHORT||e===bs.UNSIGNED_INT)};bs.createTypedArray=function(e,t){return e>=R.SIXTY_FOUR_KILOBYTES?new Uint32Array(t):new Uint16Array(t)};bs.createTypedArrayFromArrayBuffer=function(e,t,n,i){return e>=R.SIXTY_FOUR_KILOBYTES?new Uint32Array(t,n,i):new Uint16Array(t,n,i)};bs.fromTypedArray=function(e){if(e instanceof Uint8Array)return bs.UNSIGNED_BYTE;if(e instanceof Uint16Array)return bs.UNSIGNED_SHORT;if(e instanceof Uint32Array)return bs.UNSIGNED_INT};var Ne=Object.freeze(bs);function pc(){ye.throwInstantiationError()}Object.defineProperties(pc.prototype,{errorEvent:{get:ye.throwInstantiationError},credit:{get:ye.throwInstantiationError},tilingScheme:{get:ye.throwInstantiationError},ready:{get:ye.throwInstantiationError},readyPromise:{get:ye.throwInstantiationError},hasWaterMask:{get:ye.throwInstantiationError},hasVertexNormals:{get:ye.throwInstantiationError},availability:{get:ye.throwInstantiationError}});var N$=[];pc.getRegularGridIndices=function(e,t){let n=N$[e];l(n)||(N$[e]=n=[]);let i=n[t];return l(i)||(e*t<R.SIXTY_FOUR_KILOBYTES?i=n[t]=new Uint16Array((e-1)*(t-1)*6):i=n[t]=new Uint32Array((e-1)*(t-1)*6),U$(e,t,i,0)),i};var F$=[];pc.getRegularGridIndicesAndEdgeIndices=function(e,t){let n=F$[e];l(n)||(F$[e]=n=[]);let i=n[t];if(!l(i)){let o=pc.getRegularGridIndices(e,t),r=k$(e,t),s=r.westIndicesSouthToNorth,a=r.southIndicesEastToWest,c=r.eastIndicesNorthToSouth,u=r.northIndicesWestToEast;i=n[t]={indices:o,westIndicesSouthToNorth:s,southIndicesEastToWest:a,eastIndicesNorthToSouth:c,northIndicesWestToEast:u}}return i};var V$=[];pc.getRegularGridAndSkirtIndicesAndEdgeIndices=function(e,t){let n=V$[e];l(n)||(V$[e]=n=[]);let i=n[t];if(!l(i)){let o=e*t,r=(e-1)*(t-1)*6,s=e*2+t*2,a=Math.max(0,s-4)*6,c=o+s,u=r+a,f=k$(e,t),d=f.westIndicesSouthToNorth,p=f.southIndicesEastToWest,_=f.eastIndicesNorthToSouth,m=f.northIndicesWestToEast,x=Ne.createTypedArray(c,u);U$(e,t,x,0),pc.addSkirtIndices(d,p,_,m,o,x,r),i=n[t]={indices:x,westIndicesSouthToNorth:d,southIndicesEastToWest:p,eastIndicesNorthToSouth:_,northIndicesWestToEast:m,indexCountWithoutSkirts:r}}return i};pc.addSkirtIndices=function(e,t,n,i,o,r,s){let a=o;s=sI(e,a,r,s),a+=e.length,s=sI(t,a,r,s),a+=t.length,s=sI(n,a,r,s),a+=n.length,sI(i,a,r,s)};function k$(e,t){let n=new Array(t),i=new Array(e),o=new Array(t),r=new Array(e),s;for(s=0;s<e;++s)r[s]=s,i[s]=e*t-1-s;for(s=0;s<t;++s)o[s]=(s+1)*e-1,n[s]=(t-s-1)*e;return{westIndicesSouthToNorth:n,southIndicesEastToWest:i,eastIndicesNorthToSouth:o,northIndicesWestToEast:r}}function U$(e,t,n,i){let o=0;for(let r=0;r<t-1;++r){for(let s=0;s<e-1;++s){let a=o,c=a+e,u=c+1,f=a+1;n[i++]=a,n[i++]=c,n[i++]=f,n[i++]=f,n[i++]=c,n[i++]=u,++o}++o}}function sI(e,t,n,i){let o=e[0],r=e.length;for(let s=1;s<r;++s){let a=e[s];n[i++]=o,n[i++]=a,n[i++]=t,n[i++]=t,n[i++]=a,n[i++]=t+1,o=a,++t}return i}pc.heightmapTerrainQuality=.25;pc.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(e,t,n){return e.maximumRadius*2*Math.PI*pc.heightmapTerrainQuality/(t*n)};pc.prototype.requestTileGeometry=ye.throwInstantiationError;pc.prototype.getLevelMaximumGeometricError=ye.throwInstantiationError;pc.prototype.getTileDataAvailable=ye.throwInstantiationError;pc.prototype.loadTileDataAvailability=ye.throwInstantiationError;var es=pc;function zm(e){this._buffer=e.buffer,this._width=e.width,this._height=e.height,this._childTileMask=y(e.childTileMask,15),this._encoding=y(e.encoding,Vm.NONE);let t=xS.DEFAULT_STRUCTURE,n=e.structure;l(n)?n!==t&&(n.heightScale=y(n.heightScale,t.heightScale),n.heightOffset=y(n.heightOffset,t.heightOffset),n.elementsPerHeight=y(n.elementsPerHeight,t.elementsPerHeight),n.stride=y(n.stride,t.stride),n.elementMultiplier=y(n.elementMultiplier,t.elementMultiplier),n.isBigEndian=y(n.isBigEndian,t.isBigEndian)):n=t,this._structure=n,this._createdByUpsampling=y(e.createdByUpsampling,!1),this._waterMask=e.waterMask,this._skirtHeight=void 0,this._bufferType=this._encoding===Vm.LERC?Float32Array:this._buffer.constructor,this._mesh=void 0}Object.defineProperties(zm.prototype,{credits:{get:function(){}},waterMask:{get:function(){return this._waterMask}},childTileMask:{get:function(){return this._childTileMask}}});var z$="createVerticesFromHeightmap",Dwe=new Di(z$),Pwe=new Di(z$,_h.maximumAsynchronousTasks);zm.prototype.createMesh=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.tilingScheme,n=e.x,i=e.y,o=e.level,r=y(e.exaggeration,1),s=y(e.exaggerationRelativeHeight,0),a=y(e.throttle,!0),c=t.ellipsoid,u=t.tileXYToNativeRectangle(n,i,o),f=t.tileXYToRectangle(n,i,o),d=c.cartographicToCartesian(de.center(f)),p=this._structure,m=es.getEstimatedLevelZeroGeometricErrorForAHeightmap(c,this._width,t.getNumberOfXTilesAtLevel(0))/(1<<o);this._skirtHeight=Math.min(m*4,1e3);let C=(a?Pwe:Dwe).scheduleTask({heightmap:this._buffer,structure:p,includeWebMercatorT:!0,width:this._width,height:this._height,nativeRectangle:u,rectangle:f,relativeToCenter:d,ellipsoid:c,skirtHeight:this._skirtHeight,isGeographic:t.projection instanceof Si,exaggeration:r,exaggerationRelativeHeight:s,encoding:this._encoding});if(!l(C))return;let A=this;return Promise.resolve(C).then(function(T){let b;A._skirtHeight>0?b=es.getRegularGridAndSkirtIndicesAndEdgeIndices(T.gridWidth,T.gridHeight):b=es.getRegularGridIndicesAndEdgeIndices(T.gridWidth,T.gridHeight);let S=T.gridWidth*T.gridHeight;return A._mesh=new $f(d,new Float32Array(T.vertices),b.indices,b.indexCountWithoutSkirts,S,T.minimumHeight,T.maximumHeight,oe.clone(T.boundingSphere3D),h.clone(T.occludeePointInScaledSpace),T.numberOfAttributes,gi.clone(T.orientedBoundingBox),mc.clone(T.encoding),b.westIndicesSouthToNorth,b.southIndicesEastToWest,b.eastIndicesNorthToSouth,b.northIndicesWestToEast),A._buffer=void 0,A._mesh})};zm.prototype._createMeshSync=function(e){let t=e.tilingScheme,n=e.x,i=e.y,o=e.level,r=y(e.exaggeration,1),s=y(e.exaggerationRelativeHeight,0),a=t.ellipsoid,c=t.tileXYToNativeRectangle(n,i,o),u=t.tileXYToRectangle(n,i,o),f=a.cartographicToCartesian(de.center(u)),d=this._structure,_=es.getEstimatedLevelZeroGeometricErrorForAHeightmap(a,this._width,t.getNumberOfXTilesAtLevel(0))/(1<<o);this._skirtHeight=Math.min(_*4,1e3);let m=xS.computeVertices({heightmap:this._buffer,structure:d,includeWebMercatorT:!0,width:this._width,height:this._height,nativeRectangle:c,rectangle:u,relativeToCenter:f,ellipsoid:a,skirtHeight:this._skirtHeight,isGeographic:t.projection instanceof Si,exaggeration:r,exaggerationRelativeHeight:s});this._buffer=void 0;let x;this._skirtHeight>0?x=es.getRegularGridAndSkirtIndicesAndEdgeIndices(this._width,this._height):x=es.getRegularGridIndicesAndEdgeIndices(this._width,this._height);let C=m.gridWidth*m.gridHeight;return this._mesh=new $f(f,m.vertices,x.indices,x.indexCountWithoutSkirts,C,m.minimumHeight,m.maximumHeight,m.boundingSphere3D,m.occludeePointInScaledSpace,m.encoding.stride,m.orientedBoundingBox,m.encoding,x.westIndicesSouthToNorth,x.southIndicesEastToWest,x.eastIndicesNorthToSouth,x.northIndicesWestToEast),this._mesh};zm.prototype.interpolateHeight=function(e,t,n){let i=this._width,o=this._height,r=this._structure,s=r.stride,a=r.elementsPerHeight,c=r.elementMultiplier,u=r.isBigEndian,f=r.heightOffset,d=r.heightScale,p=l(this._mesh),_=this._encoding===Vm.LERC;if(!p&&_)return;let x;if(p){let C=this._mesh.vertices,A=this._mesh.encoding;x=H$(C,A,f,d,e,i,o,t,n)}else x=Iwe(this._buffer,a,c,s,u,e,i,o,t,n),x=x*d+f;return x};zm.prototype.upsample=function(e,t,n,i,o,r,s){let a=this._mesh;if(!l(a))return;let c=this._width,u=this._height,f=this._structure,d=f.stride,p=new this._bufferType(c*u*d),_=a.vertices,m=a.encoding,x=e.tileXYToRectangle(t,n,i),C=e.tileXYToRectangle(o,r,s),A=f.heightOffset,T=f.heightScale,b=f.elementsPerHeight,S=f.elementMultiplier,w=f.isBigEndian,D=Math.pow(S,b-1);for(let O=0;O<u;++O){let I=R.lerp(C.north,C.south,O/(u-1));for(let L=0;L<c;++L){let N=R.lerp(C.west,C.east,L/(c-1)),g=H$(_,m,A,T,x,c,u,N,I);g=g<f.lowestEncodedHeight?f.lowestEncodedHeight:g,g=g>f.highestEncodedHeight?f.highestEncodedHeight:g,Owe(p,b,S,D,d,w,O*c+L,g)}}return Promise.resolve(new zm({buffer:p,width:c,height:u,childTileMask:0,structure:this._structure,createdByUpsampling:!0}))};zm.prototype.isChildAvailable=function(e,t,n,i){let o=2;return n!==e*2&&++o,i!==t*2&&(o-=2),(this._childTileMask&1<<o)!==0};zm.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};function Iwe(e,t,n,i,o,r,s,a,c,u){let f=(c-r.west)*(s-1)/(r.east-r.west),d=(u-r.south)*(a-1)/(r.north-r.south),p=f|0,_=p+1;_>=s&&(_=s-1,p=s-2);let m=d|0,x=m+1;x>=a&&(x=a-1,m=a-2);let C=f-p,A=d-m;m=a-1-m,x=a-1-x;let T=aI(e,t,n,i,o,m*s+p),b=aI(e,t,n,i,o,m*s+_),S=aI(e,t,n,i,o,x*s+p),w=aI(e,t,n,i,o,x*s+_);return G$(C,A,T,b,S,w)}function H$(e,t,n,i,o,r,s,a,c){let u=(a-o.west)*(r-1)/(o.east-o.west),f=(c-o.south)*(s-1)/(o.north-o.south),d=u|0,p=d+1;p>=r&&(p=r-1,d=r-2);let _=f|0,m=_+1;m>=s&&(m=s-1,_=s-2);let x=u-d,C=f-_;_=s-1-_,m=s-1-m;let A=(t.decodeHeight(e,_*r+d)-n)/i,T=(t.decodeHeight(e,_*r+p)-n)/i,b=(t.decodeHeight(e,m*r+d)-n)/i,S=(t.decodeHeight(e,m*r+p)-n)/i;return G$(x,C,A,T,b,S)}function G$(e,t,n,i,o,r){return t<e?n+e*(i-n)+t*(r-i):n+e*(r-o)+t*(o-n)}function aI(e,t,n,i,o,r){r*=i;let s=0,a;if(o)for(a=0;a<t;++a)s=s*n+e[r+a];else for(a=t-1;a>=0;--a)s=s*n+e[r+a];return s}function Owe(e,t,n,i,o,r,s,a){s*=o;let c;if(r)for(c=0;c<t-1;++c)e[s+c]=a/i|0,a-=e[s+c]*i,i/=n;else for(c=t-1;c>0;--c)e[s+c]=a/i|0,a-=e[s+c]*i,i/=n;e[s+c]=a}var ka=zm;function cA(e,t){this._tilingScheme=e,this._maximumLevel=t,this._rootNodes=[]}var uy=new de;function Rwe(e,t,n,i){let o=i.length;for(let r=0;r<o;++r){let s=i[r];if(s.x===t&&s.y===n&&s.level===e)return!0}return!1}cA.prototype.addAvailableTileRange=function(e,t,n,i,o){let r=this._tilingScheme,s=this._rootNodes;if(e===0)for(let p=n;p<=o;++p)for(let _=t;_<=i;++_)Rwe(e,_,p,s)||s.push(new sA(r,void 0,0,_,p));r.tileXYToRectangle(t,n,e,uy);let a=uy.west,c=uy.north;r.tileXYToRectangle(i,o,e,uy);let u=uy.east,f=uy.south,d=new Fwe(e,a,f,u,c);for(let p=0;p<s.length;++p){let _=s[p];MH(_.extent,d)&&Vwe(this._maximumLevel,_,d)}};cA.prototype.computeMaximumLevelAtPosition=function(e){let t;for(let n=0;n<this._rootNodes.length;++n){let i=this._rootNodes[n];if(aA(i.extent,e)){t=i;break}}return l(t)?CS(void 0,t,e):-1};var Mwe=[],Bwe=[],Lwe=new de,Nwe=new de;cA.prototype.computeBestAvailableLevelOverRectangle=function(e){let t=Mwe;t.length=0,e.east<e.west?(t.push(de.fromRadians(-Math.PI,e.south,e.east,e.north,Lwe)),t.push(de.fromRadians(e.west,e.south,Math.PI,e.north,Nwe))):t.push(e);let n=Bwe;n.length=0;let i;for(i=0;i<this._rootNodes.length;++i)AS(n,this._rootNodes[i],t);for(i=n.length-1;i>=0;--i)if(l(n[i])&&n[i].length===0)return i;return 0};var W$=new me;cA.prototype.isTileAvailable=function(e,t,n){let i=this._tilingScheme.tileXYToRectangle(t,n,e,uy);return de.center(i,W$),this.computeMaximumLevelAtPosition(W$)>=e};cA.prototype.computeChildMaskForTile=function(e,t,n){let i=e+1;if(i>=this._maximumLevel)return 0;let o=0;return o|=this.isTileAvailable(i,2*t,2*n+1)?1:0,o|=this.isTileAvailable(i,2*t+1,2*n+1)?2:0,o|=this.isTileAvailable(i,2*t,2*n)?4:0,o|=this.isTileAvailable(i,2*t+1,2*n)?8:0,o};function sA(e,t,n,i,o){this.tilingScheme=e,this.parent=t,this.level=n,this.x=i,this.y=o,this.extent=e.tileXYToRectangle(i,o,n),this.rectangles=[],this._sw=void 0,this._se=void 0,this._nw=void 0,this._ne=void 0}Object.defineProperties(sA.prototype,{nw:{get:function(){return this._nw||(this._nw=new sA(this.tilingScheme,this,this.level+1,this.x*2,this.y*2)),this._nw}},ne:{get:function(){return this._ne||(this._ne=new sA(this.tilingScheme,this,this.level+1,this.x*2+1,this.y*2)),this._ne}},sw:{get:function(){return this._sw||(this._sw=new sA(this.tilingScheme,this,this.level+1,this.x*2,this.y*2+1)),this._sw}},se:{get:function(){return this._se||(this._se=new sA(this.tilingScheme,this,this.level+1,this.x*2+1,this.y*2+1)),this._se}}});function Fwe(e,t,n,i,o){this.level=e,this.west=t,this.south=n,this.east=i,this.north=o}function MH(e,t){let n=Math.max(e.west,t.west),i=Math.max(e.south,t.south),o=Math.min(e.east,t.east),r=Math.min(e.north,t.north);return i<r&&n<o}function Vwe(e,t,n){for(;t.level<e;)if(cI(t.nw.extent,n))t=t.nw;else if(cI(t.ne.extent,n))t=t.ne;else if(cI(t.sw.extent,n))t=t.sw;else if(cI(t.se.extent,n))t=t.se;else break;if(t.rectangles.length===0||t.rectangles[t.rectangles.length-1].level<=n.level)t.rectangles.push(n);else{let i=ar(t.rectangles,n.level,kwe);i<0&&(i=~i),t.rectangles.splice(i,0,n)}}function kwe(e,t){return e.level-t}function cI(e,t){return t.west>=e.west&&t.east<=e.east&&t.south>=e.south&&t.north<=e.north}function aA(e,t){return t.longitude>=e.west&&t.longitude<=e.east&&t.latitude>=e.south&&t.latitude<=e.north}function CS(e,t,n){let i=0,o=!1;for(;!o;){let r=t._nw&&aA(t._nw.extent,n),s=t._ne&&aA(t._ne.extent,n),a=t._sw&&aA(t._sw.extent,n),c=t._se&&aA(t._se.extent,n);if(r+s+a+c>1){r&&(i=Math.max(i,CS(t,t._nw,n))),s&&(i=Math.max(i,CS(t,t._ne,n))),a&&(i=Math.max(i,CS(t,t._sw,n))),c&&(i=Math.max(i,CS(t,t._se,n)));break}else r?t=t._nw:s?t=t._ne:a?t=t._sw:c?t=t._se:o=!0}for(;t!==e;){let r=t.rectangles;for(let s=r.length-1;s>=0&&r[s].level>i;--s){let a=r[s];aA(a,n)&&(i=a.level)}t=t.parent}return i}function AS(e,t,n){if(!t)return;let i,o=!1;for(i=0;i<n.length;++i)o=o||MH(t.extent,n[i]);if(!o)return;let r=t.rectangles;for(i=0;i<r.length;++i){let s=r[i];e[s.level]||(e[s.level]=n),e[s.level]=Uwe(e[s.level],s)}AS(e,t._nw,n),AS(e,t._ne,n),AS(e,t._sw,n),AS(e,t._se,n)}function Uwe(e,t){let n=[];for(let i=0;i<e.length;++i){let o=e[i];MH(o,t)?(o.west<t.west&&n.push(new de(o.west,o.south,t.west,o.north)),o.east>t.east&&n.push(new de(t.east,o.south,o.east,o.north)),o.south<t.south&&n.push(new de(Math.max(t.west,o.west),o.south,Math.min(t.east,o.east),t.south)),o.north>t.north&&n.push(new de(Math.max(t.west,o.west),t.north,Math.min(t.east,o.east),o.north))):n.push(o)}return n}var gh=cA;var j$={};function TS(e,t){l(j$[e])||(j$[e]=!0,console.warn(y(t,e)))}TS.geometryOutlines="Entity geometry outlines are unsupported on terrain. Outlines will be disabled. To enable outlines, disable geometry terrain clamping by explicitly setting height to 0.";TS.geometryZIndex="Entity geometry with zIndex are unsupported when height or extrudedHeight are defined. zIndex will be ignored";TS.geometryHeightReference="Entity corridor, ellipse, polygon or rectangle with heightReference must also have a defined height. heightReference will be ignored";TS.geometryExtrudedHeightReference="Entity corridor, ellipse, polygon or rectangle with extrudedHeightReference must also have a defined extrudedHeight. extrudedHeightReference will be ignored";var Mt=TS;function zwe(e,t){Mt(e,t)}var ci=zwe;function Hwe(e){let t,n=e.name,i=e.message;l(n)&&l(i)?t=`${n}: ${i}`:t=e.toString();let o=e.stack;return l(o)&&(t+=`
96
- ${o}`),t}var Hm=Hwe;function v_(e,t,n,i,o,r,s){this.provider=e,this.message=t,this.x=n,this.y=i,this.level=o,this.timesRetried=y(r,0),this.retry=!1,this.error=s}v_.reportError=function(e,t,n,i,o,r,s,a){let c=e;return l(e)?(c.provider=t,c.message=i,c.x=o,c.y=r,c.level=s,c.retry=!1,c.error=a,++c.timesRetried):c=new v_(t,i,o,r,s,0,a),n.numberOfListeners>0?n.raiseEvent(c):console.log(`An error occurred in "${t.constructor.name}": ${Hm(i)}`),c};v_.handleError=function(e,t,n,i,o,r,s,a,c){ci("TileProviderError.handleError","TileProviderError.handleError was deprecated in CesiumJS 1.96 and will be removed in 1.97. Use TileProviderError.reportError instead.");let u=v_.reportError(e,t,n,i,o,r,s,c);return u.retry&&l(a)&&a(),u};v_.reportSuccess=function(e){l(e)&&(e.timesRetried=-1)};v_.handleSuccess=function(e){ci("TileProviderError.handleSuccess","TileProviderError.handleSuccess was deprecated in CesiumJS 1.96 and will be removed in 1.97. Use TileProviderError.reportSuccess instead."),v_.reportSuccess(e)};var Gn=v_;function D_(e){if(e=y(e,y.EMPTY_OBJECT),this._ellipsoid=y(e.ellipsoid,re.WGS84),this._numberOfLevelZeroTilesX=y(e.numberOfLevelZeroTilesX,1),this._numberOfLevelZeroTilesY=y(e.numberOfLevelZeroTilesY,1),this._projection=new Ui(this._ellipsoid),l(e.rectangleSouthwestInMeters)&&l(e.rectangleNortheastInMeters))this._rectangleSouthwestInMeters=e.rectangleSouthwestInMeters,this._rectangleNortheastInMeters=e.rectangleNortheastInMeters;else{let i=this._ellipsoid.maximumRadius*Math.PI;this._rectangleSouthwestInMeters=new G(-i,-i),this._rectangleNortheastInMeters=new G(i,i)}let t=this._projection.unproject(this._rectangleSouthwestInMeters),n=this._projection.unproject(this._rectangleNortheastInMeters);this._rectangle=new de(t.longitude,t.latitude,n.longitude,n.latitude)}Object.defineProperties(D_.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}});D_.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<<e};D_.prototype.getNumberOfYTilesAtLevel=function(e){return this._numberOfLevelZeroTilesY<<e};D_.prototype.rectangleToNativeRectangle=function(e,t){let n=this._projection,i=n.project(de.southwest(e)),o=n.project(de.northeast(e));return l(t)?(t.west=i.x,t.south=i.y,t.east=o.x,t.north=o.y,t):new de(i.x,i.y,o.x,o.y)};D_.prototype.tileXYToNativeRectangle=function(e,t,n,i){let o=this.getNumberOfXTilesAtLevel(n),r=this.getNumberOfYTilesAtLevel(n),s=(this._rectangleNortheastInMeters.x-this._rectangleSouthwestInMeters.x)/o,a=this._rectangleSouthwestInMeters.x+e*s,c=this._rectangleSouthwestInMeters.x+(e+1)*s,u=(this._rectangleNortheastInMeters.y-this._rectangleSouthwestInMeters.y)/r,f=this._rectangleNortheastInMeters.y-t*u,d=this._rectangleNortheastInMeters.y-(t+1)*u;return l(i)?(i.west=a,i.south=d,i.east=c,i.north=f,i):new de(a,d,c,f)};D_.prototype.tileXYToRectangle=function(e,t,n,i){let o=this.tileXYToNativeRectangle(e,t,n,i),r=this._projection,s=r.unproject(new G(o.west,o.south)),a=r.unproject(new G(o.east,o.north));return o.west=s.longitude,o.south=s.latitude,o.east=a.longitude,o.north=a.latitude,o};D_.prototype.positionToTileXY=function(e,t,n){let i=this._rectangle;if(!de.contains(i,e))return;let o=this.getNumberOfXTilesAtLevel(t),r=this.getNumberOfYTilesAtLevel(t),a=(this._rectangleNortheastInMeters.x-this._rectangleSouthwestInMeters.x)/o,u=(this._rectangleNortheastInMeters.y-this._rectangleSouthwestInMeters.y)/r,d=this._projection.project(e),p=d.x-this._rectangleSouthwestInMeters.x,_=this._rectangleNortheastInMeters.y-d.y,m=p/a|0;m>=o&&(m=o-1);let x=_/u|0;return x>=r&&(x=r-1),l(n)?(n.x=m,n.y=x,n):new G(m,x)};var ts=D_;var Gwe=15;function lA(e){this._resource=void 0,this._credit=void 0,this._tilingScheme=void 0,this._levelZeroMaximumGeometricError=void 0,this._maxLevel=void 0,this._terrainDataStructure=void 0,this._ready=!1,this._width=void 0,this._height=void 0,this._encoding=void 0;let t=e.token;this._hasAvailability=!1,this._tilesAvailable=void 0,this._tilesAvailablityLoaded=void 0,this._availableCache={};let n=this,i=y(e.ellipsoid,re.WGS84);this._readyPromise=Promise.resolve(e.url).then(function(o){let r=De.createIfNeeded(o);return r.appendForwardSlash(),l(t)&&(r=r.getDerivedResource({queryParameters:{token:t}})),n._resource=r,r.getDerivedResource({queryParameters:{f:"pjson"}}).fetchJson()}).then(function(o){let r=o.copyrightText;l(r)&&(n._credit=new Ht(r));let s=o.spatialReference,a=y(s.latestWkid,s.wkid),c=o.extent,u={ellipsoid:i};if(a===4326)u.rectangle=de.fromDegrees(c.xmin,c.ymin,c.xmax,c.ymax),n._tilingScheme=new Xi(u);else if(a===3857)u.rectangleSouthwestInMeters=new G(c.xmin,c.ymin),u.rectangleNortheastInMeters=new G(c.xmax,c.ymax),n._tilingScheme=new ts(u);else return Promise.reject(new fe("Invalid spatial reference"));let f=o.tileInfo;return l(f)?(n._width=f.rows+1,n._height=f.cols+1,n._encoding=f.format==="LERC"?Vm.LERC:Vm.NONE,n._lodCount=f.lods.length-1,(n._hasAvailability=o.capabilities.indexOf("Tilemap")!==-1)&&(n._tilesAvailable=new gh(n._tilingScheme,n._lodCount),n._tilesAvailable.addAvailableTileRange(0,0,0,n._tilingScheme.getNumberOfXTilesAtLevel(0),n._tilingScheme.getNumberOfYTilesAtLevel(0)),n._tilesAvailablityLoaded=new gh(n._tilingScheme,n._lodCount)),n._levelZeroMaximumGeometricError=es.getEstimatedLevelZeroGeometricErrorForAHeightmap(n._tilingScheme.ellipsoid,n._width,n._tilingScheme.getNumberOfXTilesAtLevel(0)),o.bandCount>1&&console.log("ArcGISTiledElevationTerrainProvider: Terrain data has more than 1 band. Using the first one."),n._terrainDataStructure={elementMultiplier:1,lowestEncodedHeight:o.minValues[0],highestEncodedHeight:o.maxValues[0]},n._ready=!0,!0):Promise.reject(new fe("tileInfo is required"))}).catch(function(o){let r=`An error occurred while accessing ${n._resource.url}.`;return Gn.reportError(void 0,n,n._errorEvent,r),Promise.reject(o)}),this._errorEvent=new _e}Object.defineProperties(lA.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){return this._tilesAvailable}}});lA.prototype.requestTileGeometry=function(e,t,n,i){let o=this._resource.getDerivedResource({url:`tile/${n}/${t}/${e}`,request:i}),r=this._hasAvailability,s=Promise.resolve(!0),a;if(r&&!l(BH(this,n+1,e*2,t*2))){let d=q$(this,n+1,e*2,t*2);s=d.promise,a=d.request}let c=o.fetchArrayBuffer();if(!l(c)||!l(s))return;let u=this,f=this._tilesAvailable;return Promise.all([c,s]).then(function(d){return new ka({buffer:d[0],width:u._width,height:u._height,childTileMask:r?f.computeChildMaskForTile(n,e,t):Gwe,structure:u._terrainDataStructure,encoding:u._encoding})}).catch(function(d){return l(a)&&a.state===ui.CANCELLED?(i.cancel(),i.deferred.promise.finally(function(){return i.state=ui.CANCELLED,Promise.reject(d)})):Promise.reject(d)})};function BH(e,t,n,i){if(!e._hasAvailability)return;let o=e._tilesAvailablityLoaded,r=e._tilesAvailable;if(t>e._lodCount)return!1;if(r.isTileAvailable(t,n,i))return!0;if(o.isTileAvailable(t,n,i))return!1}lA.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};lA.prototype.getTileDataAvailable=function(e,t,n){if(!this._hasAvailability)return;let i=BH(this,n,e,t);if(l(i))return i;q$(this,n,e,t)};lA.prototype.loadTileDataAvailability=function(e,t,n){};function Wwe(e,t,n,i){let o=t-1,r=n-1,s=i[e.y*t+e.x],a=[],c={startX:e.x,startY:e.y,endX:0,endY:0},u=new G(e.x+1,e.y+1),f=!1,d=!1;for(;!(f&&d);){let p=u.x,_=d?u.y+1:u.y;if(!f){for(let m=e.y;m<_;++m)if(i[m*t+u.x]!==s){f=!0;break}f?(a.push(new G(u.x,e.y)),--u.x,--p,c.endX=u.x):u.x===o?(c.endX=u.x,f=!0):++u.x}if(!d){let m=u.y*t;for(let x=e.x;x<=p;++x)if(i[m+x]!==s){d=!0;break}d?(a.push(new G(e.x,u.y)),--u.y,c.endY=u.y):u.y===r?(c.endY=u.y,d=!0):++u.y}}return{endingIndices:a,range:c,value:s}}function jwe(e,t,n,i,o){let r=[];if(o.every(function(c){return c===o[0]}))return o[0]===1&&r.push({startX:e,startY:t,endX:e+n-1,endY:t+i-1}),r;let a=[new G(0,0)];for(;a.length>0;){let c=a.pop(),u=Wwe(c,n,i,o);if(u.value===1){let d=u.range;d.startX+=e,d.endX+=e,d.startY+=t,d.endY+=t,r.push(d)}let f=u.endingIndices;f.length>0&&(a=a.concat(f))}return r}function q$(e,t,n,i){if(!e._hasAvailability)return{};let o=Math.floor(n/128)*128,r=Math.floor(i/128)*128,s=Math.min(1<<t,128),a=`tilemap/${t}/${r}/${o}/${s}/${s}`,c=e._availableCache;if(l(c[a]))return c[a];let u=new rr({throttle:!1,throttleByServer:!0,type:or.TERRAIN}),d=e._resource.getDerivedResource({url:a,request:u}).fetchJson();return l(d)?(d=d.then(function(p){let _=jwe(o,r,s,s,p.data);e._tilesAvailablityLoaded.addAvailableTileRange(t,o,r,o+s,r+s);let m=e._tilesAvailable;for(let x=0;x<_.length;++x){let C=_[x];m.addAvailableTileRange(t,C.startX,C.startY,C.endX,C.endY)}return BH(e,t,n,i)}),c[a]={promise:d,request:u},d=d.finally(function(p){return delete c[a],p}),{promise:d,request:u}):{}}var Y$=lA;var qwe={NONE:0,GEODESIC:1,RHUMB:2},Yt=Object.freeze(qwe);var X$=R.EPSILON10;function Ywe(e,t,n,i){if(!l(e))return;n=y(n,!1);let o=l(i),r=e.length;if(r<2)return e;let s,a=e[0],c,u,f=0,d=-1;for(s=1;s<r;++s)c=e[s],t(a,c,X$)?(l(u)||(u=e.slice(0,s),f=s-1,d=0),o&&i.push(s)):(l(u)&&(u.push(c),f=s,o&&(d=i.length)),a=c);return n&&t(e[0],e[r-1],X$)&&(o&&(l(u)?i.splice(d,0,f):i.push(r-1)),l(u)?u.length-=1:u=e.slice(0,-1)),l(u)?u:e}var So=Ywe;var Xwe={XTRANSLATE:"xTranslate",YTRANSLATE:"yTranslate",ZTRANSLATE:"zTranslate",XROTATE:"xRotate",YROTATE:"yRotate",ZROTATE:"zRotate",XSCALE:"xScale",YSCALE:"yScale",ZSCALE:"zScale",UNIFORMSCALE:"uniformScale"},_c=Object.freeze(Xwe);function fy(){this._array=[],this._hash={}}Object.defineProperties(fy.prototype,{length:{get:function(){return this._array.length}},values:{get:function(){return this._array}}});fy.prototype.contains=function(e){return l(this._hash[e])};fy.prototype.set=function(e,t){let n=this._hash[e];t!==n&&(this.remove(e),this._hash[e]=t,this._array.push(t))};fy.prototype.get=function(e){return this._hash[e]};fy.prototype.remove=function(e){let t=this._hash[e],n=l(t);if(n){let i=this._array;i.splice(i.indexOf(t),1),delete this._hash[e]}return n};fy.prototype.removeAll=function(){let e=this._array;e.length>0&&(this._hash={},e.length=0)};var gt=fy;var K$=new h,$$=new h,Z$=new h;function Kwe(e,t,n,i,o){l(o)||(o=new h);let r,s,a,c,u,f,d,p;if(l(t.z)){if(h.equalsEpsilon(e,t,R.EPSILON14))return h.clone(h.UNIT_X,o);if(h.equalsEpsilon(e,n,R.EPSILON14))return h.clone(h.UNIT_Y,o);if(h.equalsEpsilon(e,i,R.EPSILON14))return h.clone(h.UNIT_Z,o);r=h.subtract(n,t,K$),s=h.subtract(i,t,$$),a=h.subtract(e,t,Z$),c=h.dot(r,r),u=h.dot(r,s),f=h.dot(r,a),d=h.dot(s,s),p=h.dot(s,a)}else{if(G.equalsEpsilon(e,t,R.EPSILON14))return h.clone(h.UNIT_X,o);if(G.equalsEpsilon(e,n,R.EPSILON14))return h.clone(h.UNIT_Y,o);if(G.equalsEpsilon(e,i,R.EPSILON14))return h.clone(h.UNIT_Z,o);r=G.subtract(n,t,K$),s=G.subtract(i,t,$$),a=G.subtract(e,t,Z$),c=G.dot(r,r),u=G.dot(r,s),f=G.dot(r,a),d=G.dot(s,s),p=G.dot(s,a)}o.y=d*f-u*p,o.z=c*p-u*f;let _=c*d-u*u;if(_!==0)return o.y/=_,o.z/=_,o.x=1-o.y-o.z,o}var uA=Kwe;var J$="https://dev.virtualearth.net/REST/v1/Locations";function LH(e){e=y(e,y.EMPTY_OBJECT);let t=e.key;this._key=t;let n={key:t};l(e.culture)&&(n.culture=e.culture),this._resource=new De({url:J$,queryParameters:n})}Object.defineProperties(LH.prototype,{url:{get:function(){return J$}},key:{get:function(){return this._key}}});LH.prototype.geocode=function(e){return this._resource.getDerivedResource({queryParameters:{query:e}}).fetchJsonp("jsonp").then(function(n){return n.resourceSets.length===0?[]:n.resourceSets[0].resources.map(function(o){let r=o.bbox,s=r[0],a=r[1],c=r[2],u=r[3];return{displayName:o.name,destination:de.fromDegrees(a,s,u,c)}})})};var Q$=LH;function Rr(e,t,n,i){this.x=y(e,0),this.y=y(t,0),this.width=y(n,0),this.height=y(i,0)}Rr.packedLength=4;Rr.pack=function(e,t,n){return n=y(n,0),t[n++]=e.x,t[n++]=e.y,t[n++]=e.width,t[n]=e.height,t};Rr.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new Rr),n.x=e[t++],n.y=e[t++],n.width=e[t++],n.height=e[t],n};Rr.fromPoints=function(e,t){if(l(t)||(t=new Rr),!l(e)||e.length===0)return t.x=0,t.y=0,t.width=0,t.height=0,t;let n=e.length,i=e[0].x,o=e[0].y,r=e[0].x,s=e[0].y;for(let a=1;a<n;a++){let c=e[a],u=c.x,f=c.y;i=Math.min(u,i),r=Math.max(u,r),o=Math.min(f,o),s=Math.max(f,s)}return t.x=i,t.y=o,t.width=r-i,t.height=s-o,t};var $we=new Si,Zwe=new me,Jwe=new me;Rr.fromRectangle=function(e,t,n){if(l(n)||(n=new Rr),!l(e))return n.x=0,n.y=0,n.width=0,n.height=0,n;t=y(t,$we);let i=t.project(de.southwest(e,Zwe)),o=t.project(de.northeast(e,Jwe));return G.subtract(o,i,o),n.x=i.x,n.y=i.y,n.width=o.x,n.height=o.y,n};Rr.clone=function(e,t){if(!!l(e))return l(t)?(t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height,t):new Rr(e.x,e.y,e.width,e.height)};Rr.union=function(e,t,n){l(n)||(n=new Rr);let i=Math.min(e.x,t.x),o=Math.min(e.y,t.y),r=Math.max(e.x+e.width,t.x+t.width),s=Math.max(e.y+e.height,t.y+t.height);return n.x=i,n.y=o,n.width=r-i,n.height=s-o,n};Rr.expand=function(e,t,n){n=Rr.clone(e,n);let i=t.x-n.x,o=t.y-n.y;return i>n.width?n.width=i:i<0&&(n.width-=i,n.x=t.x),o>n.height?n.height=o:o<0&&(n.height-=o,n.y=t.y),n};Rr.intersect=function(e,t){let n=e.x,i=e.y,o=t.x,r=t.y;return n>o+t.width||n+e.width<o||i+e.height<r||i>r+t.height?Zt.OUTSIDE:Zt.INTERSECTING};Rr.equals=function(e,t){return e===t||l(e)&&l(t)&&e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height};Rr.prototype.clone=function(e){return Rr.clone(this,e)};Rr.prototype.intersect=function(e){return Rr.intersect(this,e)};Rr.prototype.equals=function(e){return Rr.equals(this,e)};var qe=Rr;var Qwe={NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3},Zf=Object.freeze(Qwe);var ua={POINTS:Z.POINTS,LINES:Z.LINES,LINE_LOOP:Z.LINE_LOOP,LINE_STRIP:Z.LINE_STRIP,TRIANGLES:Z.TRIANGLES,TRIANGLE_STRIP:Z.TRIANGLE_STRIP,TRIANGLE_FAN:Z.TRIANGLE_FAN};ua.isLines=function(e){return e===ua.LINES||e===ua.LINE_LOOP||e===ua.LINE_STRIP};ua.isTriangles=function(e){return e===ua.TRIANGLES||e===ua.TRIANGLE_STRIP||e===ua.TRIANGLE_FAN};ua.validate=function(e){return e===ua.POINTS||e===ua.LINES||e===ua.LINE_LOOP||e===ua.LINE_STRIP||e===ua.TRIANGLES||e===ua.TRIANGLE_STRIP||e===ua.TRIANGLE_FAN};var Le=Object.freeze(ua);function NH(e){e=y(e,y.EMPTY_OBJECT),this.attributes=e.attributes,this.indices=e.indices,this.primitiveType=y(e.primitiveType,Le.TRIANGLES),this.boundingSphere=e.boundingSphere,this.geometryType=y(e.geometryType,Zf.NONE),this.boundingSphereCV=e.boundingSphereCV,this.offsetAttribute=e.offsetAttribute}NH.computeNumberOfVertices=function(e){let t=-1;for(let n in e.attributes)if(e.attributes.hasOwnProperty(n)&&l(e.attributes[n])&&l(e.attributes[n].values)){let i=e.attributes[n];t=i.values.length/i.componentsPerAttribute}return t};var eve=new me,tve=new h,eZ=new B,nve=[new me,new me,new me],ive=[new G,new G,new G],ove=[new G,new G,new G],rve=new h,sve=new Me,ave=new B,cve=new vi;NH._textureCoordinateRotationPoints=function(e,t,n,i){let o,r=de.center(i,eve),s=me.toCartesian(r,n,tve),a=_t.eastNorthUpToFixedFrame(s,n,eZ),c=B.inverse(a,eZ),u=ive,f=nve;f[0].longitude=i.west,f[0].latitude=i.south,f[1].longitude=i.west,f[1].latitude=i.north,f[2].longitude=i.east,f[2].latitude=i.south;let d=rve;for(o=0;o<3;o++)me.toCartesian(f[o],n,d),d=B.multiplyByPointAsVector(c,d,d),u[o].x=d.x,u[o].y=d.y;let p=Me.fromAxisAngle(h.UNIT_Z,-t,sve),_=Q.fromQuaternion(p,ave),m=e.length,x=Number.POSITIVE_INFINITY,C=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY,T=Number.NEGATIVE_INFINITY;for(o=0;o<m;o++)d=B.multiplyByPointAsVector(c,e[o],d),d=Q.multiplyByVector(_,d,d),x=Math.min(x,d.x),C=Math.min(C,d.y),A=Math.max(A,d.x),T=Math.max(T,d.y);let b=vi.fromRotation(t,cve),S=ove;S[0].x=x,S[0].y=C,S[1].x=x,S[1].y=T,S[2].x=A,S[2].y=C;let w=u[0],D=u[2].x-w.x,O=u[1].y-w.y;for(o=0;o<3;o++){let E=S[o];vi.multiplyByVector(b,E,E),E.x=(E.x-w.x)/D,E.y=(E.y-w.y)/O}let I=S[0],L=S[1],N=S[2],g=new Array(6);return G.pack(I,g),G.pack(L,g,2),G.pack(N,g,4),g};var ct=NH;function lve(e){e=y(e,y.EMPTY_OBJECT),this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=y(e.normalize,!1),this.values=e.values}var Ee=lve;function uve(e){e=y(e,y.EMPTY_OBJECT),this.position=e.position,this.normal=e.normal,this.st=e.st,this.bitangent=e.bitangent,this.tangent=e.tangent,this.color=e.color}var ln=uve;var fve={NONE:0,TOP:1,ALL:2},tn=Object.freeze(fve);function ns(e){e=y(e,y.EMPTY_OBJECT),this.position=y(e.position,!1),this.normal=y(e.normal,!1),this.st=y(e.st,!1),this.bitangent=y(e.bitangent,!1),this.tangent=y(e.tangent,!1),this.color=y(e.color,!1)}ns.POSITION_ONLY=Object.freeze(new ns({position:!0}));ns.POSITION_AND_NORMAL=Object.freeze(new ns({position:!0,normal:!0}));ns.POSITION_NORMAL_AND_ST=Object.freeze(new ns({position:!0,normal:!0,st:!0}));ns.POSITION_AND_ST=Object.freeze(new ns({position:!0,st:!0}));ns.POSITION_AND_COLOR=Object.freeze(new ns({position:!0,color:!0}));ns.ALL=Object.freeze(new ns({position:!0,normal:!0,st:!0,tangent:!0,bitangent:!0}));ns.DEFAULT=ns.POSITION_NORMAL_AND_ST;ns.packedLength=6;ns.pack=function(e,t,n){return n=y(n,0),t[n++]=e.position?1:0,t[n++]=e.normal?1:0,t[n++]=e.st?1:0,t[n++]=e.tangent?1:0,t[n++]=e.bitangent?1:0,t[n]=e.color?1:0,t};ns.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new ns),n.position=e[t++]===1,n.normal=e[t++]===1,n.st=e[t++]===1,n.tangent=e[t++]===1,n.bitangent=e[t++]===1,n.color=e[t]===1,n};ns.clone=function(e,t){if(!!l(e))return l(t)||(t=new ns),t.position=e.position,t.normal=e.normal,t.st=e.st,t.tangent=e.tangent,t.bitangent=e.bitangent,t.color=e.color,t};var Pe=ns;var dve=new h;function Fl(e){e=y(e,y.EMPTY_OBJECT);let t=e.minimum,n=e.maximum,i=y(e.vertexFormat,Pe.DEFAULT);this._minimum=h.clone(t),this._maximum=h.clone(n),this._vertexFormat=i,this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxGeometry"}Fl.fromDimensions=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.dimensions,n=h.multiplyByScalar(t,.5,new h);return new Fl({minimum:h.negate(n,new h),maximum:n,vertexFormat:e.vertexFormat,offsetAttribute:e.offsetAttribute})};Fl.fromAxisAlignedBoundingBox=function(e){return new Fl({minimum:e.minimum,maximum:e.maximum})};Fl.packedLength=2*h.packedLength+Pe.packedLength+1;Fl.pack=function(e,t,n){return n=y(n,0),h.pack(e._minimum,t,n),h.pack(e._maximum,t,n+h.packedLength),Pe.pack(e._vertexFormat,t,n+2*h.packedLength),t[n+2*h.packedLength+Pe.packedLength]=y(e._offsetAttribute,-1),t};var nZ=new h,iZ=new h,oZ=new Pe,tZ={minimum:nZ,maximum:iZ,vertexFormat:oZ,offsetAttribute:void 0};Fl.unpack=function(e,t,n){t=y(t,0);let i=h.unpack(e,t,nZ),o=h.unpack(e,t+h.packedLength,iZ),r=Pe.unpack(e,t+2*h.packedLength,oZ),s=e[t+2*h.packedLength+Pe.packedLength];return l(n)?(n._minimum=h.clone(i,n._minimum),n._maximum=h.clone(o,n._maximum),n._vertexFormat=Pe.clone(r,n._vertexFormat),n._offsetAttribute=s===-1?void 0:s,n):(tZ.offsetAttribute=s===-1?void 0:s,new Fl(tZ))};Fl.createGeometry=function(e){let t=e._minimum,n=e._maximum,i=e._vertexFormat;if(h.equals(t,n))return;let o=new ln,r,s;if(i.position&&(i.st||i.normal||i.tangent||i.bitangent)){if(i.position&&(s=new Float64Array(6*4*3),s[0]=t.x,s[1]=t.y,s[2]=n.z,s[3]=n.x,s[4]=t.y,s[5]=n.z,s[6]=n.x,s[7]=n.y,s[8]=n.z,s[9]=t.x,s[10]=n.y,s[11]=n.z,s[12]=t.x,s[13]=t.y,s[14]=t.z,s[15]=n.x,s[16]=t.y,s[17]=t.z,s[18]=n.x,s[19]=n.y,s[20]=t.z,s[21]=t.x,s[22]=n.y,s[23]=t.z,s[24]=n.x,s[25]=t.y,s[26]=t.z,s[27]=n.x,s[28]=n.y,s[29]=t.z,s[30]=n.x,s[31]=n.y,s[32]=n.z,s[33]=n.x,s[34]=t.y,s[35]=n.z,s[36]=t.x,s[37]=t.y,s[38]=t.z,s[39]=t.x,s[40]=n.y,s[41]=t.z,s[42]=t.x,s[43]=n.y,s[44]=n.z,s[45]=t.x,s[46]=t.y,s[47]=n.z,s[48]=t.x,s[49]=n.y,s[50]=t.z,s[51]=n.x,s[52]=n.y,s[53]=t.z,s[54]=n.x,s[55]=n.y,s[56]=n.z,s[57]=t.x,s[58]=n.y,s[59]=n.z,s[60]=t.x,s[61]=t.y,s[62]=t.z,s[63]=n.x,s[64]=t.y,s[65]=t.z,s[66]=n.x,s[67]=t.y,s[68]=n.z,s[69]=t.x,s[70]=t.y,s[71]=n.z,o.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:s})),i.normal){let u=new Float32Array(72);u[0]=0,u[1]=0,u[2]=1,u[3]=0,u[4]=0,u[5]=1,u[6]=0,u[7]=0,u[8]=1,u[9]=0,u[10]=0,u[11]=1,u[12]=0,u[13]=0,u[14]=-1,u[15]=0,u[16]=0,u[17]=-1,u[18]=0,u[19]=0,u[20]=-1,u[21]=0,u[22]=0,u[23]=-1,u[24]=1,u[25]=0,u[26]=0,u[27]=1,u[28]=0,u[29]=0,u[30]=1,u[31]=0,u[32]=0,u[33]=1,u[34]=0,u[35]=0,u[36]=-1,u[37]=0,u[38]=0,u[39]=-1,u[40]=0,u[41]=0,u[42]=-1,u[43]=0,u[44]=0,u[45]=-1,u[46]=0,u[47]=0,u[48]=0,u[49]=1,u[50]=0,u[51]=0,u[52]=1,u[53]=0,u[54]=0,u[55]=1,u[56]=0,u[57]=0,u[58]=1,u[59]=0,u[60]=0,u[61]=-1,u[62]=0,u[63]=0,u[64]=-1,u[65]=0,u[66]=0,u[67]=-1,u[68]=0,u[69]=0,u[70]=-1,u[71]=0,o.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:u})}if(i.st){let u=new Float32Array(48);u[0]=0,u[1]=0,u[2]=1,u[3]=0,u[4]=1,u[5]=1,u[6]=0,u[7]=1,u[8]=1,u[9]=0,u[10]=0,u[11]=0,u[12]=0,u[13]=1,u[14]=1,u[15]=1,u[16]=0,u[17]=0,u[18]=1,u[19]=0,u[20]=1,u[21]=1,u[22]=0,u[23]=1,u[24]=1,u[25]=0,u[26]=0,u[27]=0,u[28]=0,u[29]=1,u[30]=1,u[31]=1,u[32]=1,u[33]=0,u[34]=0,u[35]=0,u[36]=0,u[37]=1,u[38]=1,u[39]=1,u[40]=0,u[41]=0,u[42]=1,u[43]=0,u[44]=1,u[45]=1,u[46]=0,u[47]=1,o.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:u})}if(i.tangent){let u=new Float32Array(72);u[0]=1,u[1]=0,u[2]=0,u[3]=1,u[4]=0,u[5]=0,u[6]=1,u[7]=0,u[8]=0,u[9]=1,u[10]=0,u[11]=0,u[12]=-1,u[13]=0,u[14]=0,u[15]=-1,u[16]=0,u[17]=0,u[18]=-1,u[19]=0,u[20]=0,u[21]=-1,u[22]=0,u[23]=0,u[24]=0,u[25]=1,u[26]=0,u[27]=0,u[28]=1,u[29]=0,u[30]=0,u[31]=1,u[32]=0,u[33]=0,u[34]=1,u[35]=0,u[36]=0,u[37]=-1,u[38]=0,u[39]=0,u[40]=-1,u[41]=0,u[42]=0,u[43]=-1,u[44]=0,u[45]=0,u[46]=-1,u[47]=0,u[48]=-1,u[49]=0,u[50]=0,u[51]=-1,u[52]=0,u[53]=0,u[54]=-1,u[55]=0,u[56]=0,u[57]=-1,u[58]=0,u[59]=0,u[60]=1,u[61]=0,u[62]=0,u[63]=1,u[64]=0,u[65]=0,u[66]=1,u[67]=0,u[68]=0,u[69]=1,u[70]=0,u[71]=0,o.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:u})}if(i.bitangent){let u=new Float32Array(72);u[0]=0,u[1]=1,u[2]=0,u[3]=0,u[4]=1,u[5]=0,u[6]=0,u[7]=1,u[8]=0,u[9]=0,u[10]=1,u[11]=0,u[12]=0,u[13]=1,u[14]=0,u[15]=0,u[16]=1,u[17]=0,u[18]=0,u[19]=1,u[20]=0,u[21]=0,u[22]=1,u[23]=0,u[24]=0,u[25]=0,u[26]=1,u[27]=0,u[28]=0,u[29]=1,u[30]=0,u[31]=0,u[32]=1,u[33]=0,u[34]=0,u[35]=1,u[36]=0,u[37]=0,u[38]=1,u[39]=0,u[40]=0,u[41]=1,u[42]=0,u[43]=0,u[44]=1,u[45]=0,u[46]=0,u[47]=1,u[48]=0,u[49]=0,u[50]=1,u[51]=0,u[52]=0,u[53]=1,u[54]=0,u[55]=0,u[56]=1,u[57]=0,u[58]=0,u[59]=1,u[60]=0,u[61]=0,u[62]=1,u[63]=0,u[64]=0,u[65]=1,u[66]=0,u[67]=0,u[68]=1,u[69]=0,u[70]=0,u[71]=1,o.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:u})}r=new Uint16Array(6*2*3),r[0]=0,r[1]=1,r[2]=2,r[3]=0,r[4]=2,r[5]=3,r[6]=4+2,r[7]=4+1,r[8]=4+0,r[9]=4+3,r[10]=4+2,r[11]=4+0,r[12]=8+0,r[13]=8+1,r[14]=8+2,r[15]=8+0,r[16]=8+2,r[17]=8+3,r[18]=12+2,r[19]=12+1,r[20]=12+0,r[21]=12+3,r[22]=12+2,r[23]=12+0,r[24]=16+2,r[25]=16+1,r[26]=16+0,r[27]=16+3,r[28]=16+2,r[29]=16+0,r[30]=20+0,r[31]=20+1,r[32]=20+2,r[33]=20+0,r[34]=20+2,r[35]=20+3}else s=new Float64Array(8*3),s[0]=t.x,s[1]=t.y,s[2]=t.z,s[3]=n.x,s[4]=t.y,s[5]=t.z,s[6]=n.x,s[7]=n.y,s[8]=t.z,s[9]=t.x,s[10]=n.y,s[11]=t.z,s[12]=t.x,s[13]=t.y,s[14]=n.z,s[15]=n.x,s[16]=t.y,s[17]=n.z,s[18]=n.x,s[19]=n.y,s[20]=n.z,s[21]=t.x,s[22]=n.y,s[23]=n.z,o.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:s}),r=new Uint16Array(6*2*3),r[0]=4,r[1]=5,r[2]=6,r[3]=4,r[4]=6,r[5]=7,r[6]=1,r[7]=0,r[8]=3,r[9]=1,r[10]=3,r[11]=2,r[12]=1,r[13]=6,r[14]=5,r[15]=1,r[16]=2,r[17]=6,r[18]=2,r[19]=3,r[20]=7,r[21]=2,r[22]=7,r[23]=6,r[24]=3,r[25]=0,r[26]=4,r[27]=3,r[28]=4,r[29]=7,r[30]=0,r[31]=1,r[32]=5,r[33]=0,r[34]=5,r[35]=4;let a=h.subtract(n,t,dve),c=h.magnitude(a)*.5;if(l(e._offsetAttribute)){let u=s.length,f=e._offsetAttribute===tn.NONE?0:1,d=new Uint8Array(u/3).fill(f);o.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:d})}return new ct({attributes:o,indices:r,primitiveType:Le.TRIANGLES,boundingSphere:new oe(h.ZERO,c),offsetAttribute:e._offsetAttribute})};var FH;Fl.getUnitBox=function(){return l(FH)||(FH=Fl.createGeometry(Fl.fromDimensions({dimensions:new h(1,1,1),vertexFormat:Pe.POSITION_ONLY}))),FH};var Vl=Fl;var hve=new h;function yh(e){e=y(e,y.EMPTY_OBJECT);let t=e.minimum,n=e.maximum;this._min=h.clone(t),this._max=h.clone(n),this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxOutlineGeometry"}yh.fromDimensions=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.dimensions,n=h.multiplyByScalar(t,.5,new h);return new yh({minimum:h.negate(n,new h),maximum:n,offsetAttribute:e.offsetAttribute})};yh.fromAxisAlignedBoundingBox=function(e){return new yh({minimum:e.minimum,maximum:e.maximum})};yh.packedLength=2*h.packedLength+1;yh.pack=function(e,t,n){return n=y(n,0),h.pack(e._min,t,n),h.pack(e._max,t,n+h.packedLength),t[n+h.packedLength*2]=y(e._offsetAttribute,-1),t};var sZ=new h,aZ=new h,rZ={minimum:sZ,maximum:aZ,offsetAttribute:void 0};yh.unpack=function(e,t,n){t=y(t,0);let i=h.unpack(e,t,sZ),o=h.unpack(e,t+h.packedLength,aZ),r=e[t+h.packedLength*2];return l(n)?(n._min=h.clone(i,n._min),n._max=h.clone(o,n._max),n._offsetAttribute=r===-1?void 0:r,n):(rZ.offsetAttribute=r===-1?void 0:r,new yh(rZ))};yh.createGeometry=function(e){let t=e._min,n=e._max;if(h.equals(t,n))return;let i=new ln,o=new Uint16Array(12*2),r=new Float64Array(8*3);r[0]=t.x,r[1]=t.y,r[2]=t.z,r[3]=n.x,r[4]=t.y,r[5]=t.z,r[6]=n.x,r[7]=n.y,r[8]=t.z,r[9]=t.x,r[10]=n.y,r[11]=t.z,r[12]=t.x,r[13]=t.y,r[14]=n.z,r[15]=n.x,r[16]=t.y,r[17]=n.z,r[18]=n.x,r[19]=n.y,r[20]=n.z,r[21]=t.x,r[22]=n.y,r[23]=n.z,i.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:r}),o[0]=4,o[1]=5,o[2]=5,o[3]=6,o[4]=6,o[5]=7,o[6]=7,o[7]=4,o[8]=0,o[9]=1,o[10]=1,o[11]=2,o[12]=2,o[13]=3,o[14]=3,o[15]=0,o[16]=0,o[17]=4,o[18]=1,o[19]=5,o[20]=2,o[21]=6,o[22]=3,o[23]=7;let s=h.subtract(n,t,hve),a=h.magnitude(s)*.5;if(l(e._offsetAttribute)){let c=r.length,u=e._offsetAttribute===tn.NONE?0:1,f=new Uint8Array(c/3).fill(u);i.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:f})}return new ct({attributes:i,indices:o,primitiveType:Le.LINES,boundingSphere:new oe(h.ZERO,a),offsetAttribute:e._offsetAttribute})};var xh=yh;var Gm;typeof cancelAnimationFrame<"u"&&(Gm=cancelAnimationFrame);(function(){if(!l(Gm)&&typeof window<"u"){let e=["webkit","moz","ms","o"],t=0,n=e.length;for(;t<n&&!l(Gm);)Gm=window[`${e[t]}CancelAnimationFrame`],l(Gm)||(Gm=window[`${e[t]}CancelRequestAnimationFrame`]),++t}l(Gm)||(Gm=clearTimeout)})();function mve(e){ci("Cesium.cancelAnimationFrame","Cesium.cancelAnimationFrame was deprecated in CesiumJS 1.96 and will be removed in 1.99. Use the native cancelAnimationFrame method instead."),Gm(e)}var cZ=mve;function lZ(){}lZ.prototype.geocode=function(e){let t=e.match(/[^\s,\n]+/g);if(t.length===2||t.length===3){let n=+t[0],i=+t[1],o=t.length===3?+t[2]:300;if(isNaN(n)&&isNaN(i)){let r=/^(\d+.?\d*)([nsew])/i;for(let s=0;s<t.length;++s){let a=t[s].match(r);r.test(t[s])&&a.length===3&&(/^[ns]/i.test(a[2])?i=/^[n]/i.test(a[2])?+a[1]:-a[1]:/^[ew]/i.test(a[2])&&(n=/^[e]/i.test(a[2])?+a[1]:-a[1]))}}if(!isNaN(n)&&!isNaN(i)&&!isNaN(o)){let r={displayName:e,destination:h.fromDegrees(n,i,o)};return Promise.resolve([r])}}return Promise.resolve([])};var lI=lZ;function fA(){this.times=void 0,this.points=void 0,ye.throwInstantiationError()}fA.getPointType=function(e){if(typeof e=="number")return Number;if(e instanceof h)return h;if(e instanceof Me)return Me};fA.prototype.evaluate=ye.throwInstantiationError;fA.prototype.findTimeInterval=function(e,t){let n=this.times,i=n.length;if(t=y(t,0),e>=n[t]){if(t+1<i&&e<n[t+1])return t;if(t+2<i&&e<n[t+2])return t+1}else if(t-1>=0&&e>=n[t-1])return t-1;let o;if(e>n[t])for(o=t;o<i-1&&!(e>=n[o]&&e<n[o+1]);++o);else for(o=t-1;o>=0&&!(e>=n[o]&&e<n[o+1]);--o);return o===i-1&&(o=i-2),o};fA.prototype.wrapTime=function(e){let t=this.times,n=t[t.length-1],i=t[0],o=n-i,r;return e<i&&(r=Math.floor((i-e)/o)+1,e+=r*o),e>n&&(r=Math.floor((e-n)/o)+1,e-=r*o),e};fA.prototype.clampTime=function(e){let t=this.times;return R.clamp(e,t[0],t[t.length-1])};var zi=fA;function dA(e){e=y(e,y.EMPTY_OBJECT);let t=e.points,n=e.times;this._times=n,this._points=t,this._pointType=zi.getPointType(t[0]),this._lastTimeIndex=0}Object.defineProperties(dA.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}});dA.prototype.findTimeInterval=zi.prototype.findTimeInterval;dA.prototype.wrapTime=zi.prototype.wrapTime;dA.prototype.clampTime=zi.prototype.clampTime;dA.prototype.evaluate=function(e,t){let n=this.points,i=this.times,o=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),r=(e-i[o])/(i[o+1]-i[o]);return this._pointType===Number?(1-r)*n[o]+r*n[o+1]:(l(t)||(t=new h),h.lerp(n[o],n[o+1],r,t))};var Wm=dA;var uZ={};uZ.solve=function(e,t,n,i){let o=new Array(n.length),r=new Array(i.length),s=new Array(i.length),a;for(a=0;a<r.length;a++)r[a]=new h,s[a]=new h;o[0]=n[0]/t[0],r[0]=h.multiplyByScalar(i[0],1/t[0],r[0]);let c;for(a=1;a<o.length;++a)c=1/(t[a]-o[a-1]*e[a-1]),o[a]=n[a]*c,r[a]=h.subtract(i[a],h.multiplyByScalar(r[a-1],e[a-1],r[a]),r[a]),r[a]=h.multiplyByScalar(r[a],c,r[a]);for(c=1/(t[a]-o[a-1]*e[a-1]),r[a]=h.subtract(i[a],h.multiplyByScalar(r[a-1],e[a-1],r[a]),r[a]),r[a]=h.multiplyByScalar(r[a],c,r[a]),s[s.length-1]=r[r.length-1],a=s.length-2;a>=0;--a)s[a]=h.subtract(r[a],h.multiplyByScalar(s[a+1],o[a],s[a]),s[a]);return s};var bS=uZ;var fZ=[],dZ=[],hZ=[],mZ=[];function pve(e,t,n){let i=fZ,o=hZ,r=dZ,s=mZ;i.length=o.length=e.length-1,r.length=s.length=e.length;let a;i[0]=r[0]=1,o[0]=0;let c=s[0];for(l(c)||(c=s[0]=new h),h.clone(t,c),a=1;a<i.length-1;++a)i[a]=o[a]=1,r[a]=4,c=s[a],l(c)||(c=s[a]=new h),h.subtract(e[a+1],e[a-1],c),h.multiplyByScalar(c,3,c);return i[a]=0,o[a]=1,r[a]=4,c=s[a],l(c)||(c=s[a]=new h),h.subtract(e[a+1],e[a-1],c),h.multiplyByScalar(c,3,c),r[a+1]=1,c=s[a+1],l(c)||(c=s[a+1]=new h),h.clone(n,c),bS.solve(i,r,o,s)}function _ve(e){let t=fZ,n=hZ,i=dZ,o=mZ;t.length=n.length=e.length-1,i.length=o.length=e.length;let r;t[0]=n[0]=1,i[0]=2;let s=o[0];for(l(s)||(s=o[0]=new h),h.subtract(e[1],e[0],s),h.multiplyByScalar(s,3,s),r=1;r<t.length;++r)t[r]=n[r]=1,i[r]=4,s=o[r],l(s)||(s=o[r]=new h),h.subtract(e[r+1],e[r-1],s),h.multiplyByScalar(s,3,s);return i[r]=2,s=o[r],l(s)||(s=o[r]=new h),h.subtract(e[r],e[r-1],s),h.multiplyByScalar(s,3,s),bS.solve(t,i,n,o)}function ol(e){e=y(e,y.EMPTY_OBJECT);let t=e.points,n=e.times,i=e.inTangents,o=e.outTangents;this._times=n,this._points=t,this._pointType=zi.getPointType(t[0]),this._inTangents=i,this._outTangents=o,this._lastTimeIndex=0}Object.defineProperties(ol.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}},inTangents:{get:function(){return this._inTangents}},outTangents:{get:function(){return this._outTangents}}});ol.createC1=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.times,n=e.points,i=e.tangents,o=i.slice(0,i.length-1),r=i.slice(1,i.length);return new ol({times:t,points:n,inTangents:r,outTangents:o})};ol.createNaturalCubic=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.times,n=e.points;if(n.length<3)return new Wm({points:n,times:t});let i=_ve(n),o=i.slice(0,i.length-1),r=i.slice(1,i.length);return new ol({times:t,points:n,inTangents:r,outTangents:o})};ol.createClampedCubic=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.times,n=e.points,i=e.firstTangent,o=e.lastTangent,r=zi.getPointType(n[0]);if(n.length<3)return new Wm({points:n,times:t});let s=pve(n,i,o),a=s.slice(0,s.length-1),c=s.slice(1,s.length);return new ol({times:t,points:n,inTangents:c,outTangents:a})};ol.hermiteCoefficientMatrix=new B(2,-3,0,1,-2,3,0,0,1,-2,1,0,1,-1,0,0);ol.prototype.findTimeInterval=zi.prototype.findTimeInterval;var gve=new se,hA=new h;ol.prototype.wrapTime=zi.prototype.wrapTime;ol.prototype.clampTime=zi.prototype.clampTime;ol.prototype.evaluate=function(e,t){let n=this.points,i=this.times,o=this.inTangents,r=this.outTangents;this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex);let s=this._lastTimeIndex,a=i[s+1]-i[s],c=(e-i[s])/a,u=gve;u.z=c,u.y=c*c,u.x=u.y*c,u.w=1;let f=B.multiplyByVector(ol.hermiteCoefficientMatrix,u,u);f.z*=a,f.w*=a;let d=this._pointType;return d===Number?n[s]*f.x+n[s+1]*f.y+r[s]*f.z+o[s]*f.w:(l(t)||(t=new d),t=d.multiplyByScalar(n[s],f.x,t),d.multiplyByScalar(n[s+1],f.y,hA),d.add(t,hA,t),d.multiplyByScalar(r[s],f.z,hA),d.add(t,hA,t),d.multiplyByScalar(o[s],f.w,hA),d.add(t,hA,t))};var dy=ol;var yve=new se,pZ=new h,mA=new h;function xve(e){let t=e.points,n=e.times;if(t.length<3){let i=n[0],o=1/(n[1]-i),r=t[0],s=t[1];return function(a,c){l(c)||(c=new h);let u=(a-i)*o;return h.lerp(r,s,u,c)}}return function(i,o){l(o)||(o=new h);let r=e._lastTimeIndex=e.findTimeInterval(i,e._lastTimeIndex),s=(i-n[r])/(n[r+1]-n[r]),a=yve;a.z=s,a.y=s*s,a.x=a.y*s,a.w=1;let c,u,f,d,p;return r===0?(c=t[0],u=t[1],f=e.firstTangent,d=h.subtract(t[2],c,pZ),h.multiplyByScalar(d,.5,d),p=B.multiplyByVector(dy.hermiteCoefficientMatrix,a,a)):r===t.length-2?(c=t[r],u=t[r+1],d=e.lastTangent,f=h.subtract(u,t[r-1],pZ),h.multiplyByScalar(f,.5,f),p=B.multiplyByVector(dy.hermiteCoefficientMatrix,a,a)):(c=t[r-1],u=t[r],f=t[r+1],d=t[r+2],p=B.multiplyByVector(P_.catmullRomCoefficientMatrix,a,a)),o=h.multiplyByScalar(c,p.x,o),h.multiplyByScalar(u,p.y,mA),h.add(o,mA,o),h.multiplyByScalar(f,p.z,mA),h.add(o,mA,o),h.multiplyByScalar(d,p.w,mA),h.add(o,mA,o)}}var Cve=new h,Ave=new h;function P_(e){e=y(e,y.EMPTY_OBJECT);let t=e.points,n=e.times,i=e.firstTangent,o=e.lastTangent;if(t.length>2&&(l(i)||(i=Cve,h.multiplyByScalar(t[1],2,i),h.subtract(i,t[2],i),h.subtract(i,t[0],i),h.multiplyByScalar(i,.5,i)),!l(o))){let r=t.length-1;o=Ave,h.multiplyByScalar(t[r-1],2,o),h.subtract(t[r],o,o),h.add(o,t[r-2],o),h.multiplyByScalar(o,.5,o)}this._times=n,this._points=t,this._firstTangent=h.clone(i),this._lastTangent=h.clone(o),this._evaluateFunction=xve(this),this._lastTimeIndex=0}Object.defineProperties(P_.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}},firstTangent:{get:function(){return this._firstTangent}},lastTangent:{get:function(){return this._lastTangent}}});P_.catmullRomCoefficientMatrix=new B(-.5,1,-.5,0,1.5,-2.5,0,1,-1.5,2,.5,0,.5,-.5,0,0);P_.prototype.findTimeInterval=zi.prototype.findTimeInterval;P_.prototype.wrapTime=zi.prototype.wrapTime;P_.prototype.clampTime=zi.prototype.clampTime;P_.prototype.evaluate=function(e,t){return this._evaluateFunction(e,t)};var _Z=P_;function I_(e,t,n){return t=y(t,0),n=y(n,e.byteLength-t),e=e.subarray(t,t+n),I_.decode(e)}I_.decodeWithTextDecoder=function(e){return new TextDecoder("utf-8").decode(e)};I_.decodeWithFromCharCode=function(e){let t="",n=Tve(e),i=n.length;for(let o=0;o<i;++o){let r=n[o];r<=65535?t+=String.fromCharCode(r):(r-=65536,t+=String.fromCharCode((r>>10)+55296,(r&1023)+56320))}return t};function ES(e,t,n){return t<=e&&e<=n}function Tve(e){let t=0,n=0,i=0,o=128,r=191,s=[],a=e.length;for(let c=0;c<a;++c){let u=e[c];if(i===0){if(ES(u,0,127)){s.push(u);continue}if(ES(u,194,223)){i=1,t=u&31;continue}if(ES(u,224,239)){u===224&&(o=160),u===237&&(r=159),i=2,t=u&15;continue}if(ES(u,240,244)){u===240&&(o=144),u===244&&(r=143),i=3,t=u&7;continue}throw new fe("String decoding failed.")}if(!ES(u,o,r)){t=i=n=0,o=128,r=191,--c;continue}o=128,r=191,t=t<<6|u&63,++n,n===i&&(s.push(t),t=i=n=0)}return s}typeof TextDecoder<"u"?I_.decode=I_.decodeWithTextDecoder:I_.decode=I_.decodeWithFromCharCode;var fa=I_;function bve(e,t,n){return JSON.parse(fa(e,t,n))}var No=bve;var uI={};uI.clipTriangleAtAxisAlignedThreshold=function(e,t,n,i,o,r){l(r)?r.length=0:r=[];let s,a,c;t?(s=n<e,a=i<e,c=o<e):(s=n>e,a=i>e,c=o>e);let u=s+a+c,f,d,p,_,m,x;return u===1?s?(f=(e-n)/(i-n),d=(e-n)/(o-n),r.push(1),r.push(2),d!==1&&(r.push(-1),r.push(0),r.push(2),r.push(d)),f!==1&&(r.push(-1),r.push(0),r.push(1),r.push(f))):a?(p=(e-i)/(o-i),_=(e-i)/(n-i),r.push(2),r.push(0),_!==1&&(r.push(-1),r.push(1),r.push(0),r.push(_)),p!==1&&(r.push(-1),r.push(1),r.push(2),r.push(p))):c&&(m=(e-o)/(n-o),x=(e-o)/(i-o),r.push(0),r.push(1),x!==1&&(r.push(-1),r.push(2),r.push(1),r.push(x)),m!==1&&(r.push(-1),r.push(2),r.push(0),r.push(m))):u===2?!s&&n!==e?(_=(e-i)/(n-i),m=(e-o)/(n-o),r.push(0),r.push(-1),r.push(1),r.push(0),r.push(_),r.push(-1),r.push(2),r.push(0),r.push(m)):!a&&i!==e?(x=(e-o)/(i-o),f=(e-n)/(i-n),r.push(1),r.push(-1),r.push(2),r.push(1),r.push(x),r.push(-1),r.push(0),r.push(1),r.push(f)):!c&&o!==e&&(d=(e-n)/(o-n),p=(e-i)/(o-i),r.push(2),r.push(-1),r.push(0),r.push(2),r.push(d),r.push(-1),r.push(1),r.push(2),r.push(p)):u!==3&&(r.push(0),r.push(1),r.push(2)),r};uI.computeBarycentricCoordinates=function(e,t,n,i,o,r,s,a,c){let u=n-s,f=s-o,d=r-a,p=i-a,_=1/(d*u+f*p),m=t-a,x=e-s,C=(d*x+f*m)*_,A=(-p*x+u*m)*_,T=1-C-A;return l(c)?(c.x=C,c.y=A,c.z=T,c):new h(C,A,T)};uI.computeLineSegmentLineSegmentIntersection=function(e,t,n,i,o,r,s,a,c){let u=(s-o)*(t-r)-(a-r)*(e-o),f=(n-e)*(t-r)-(i-t)*(e-o),d=(a-r)*(n-e)-(s-o)*(i-t);if(d===0)return;let p=u/d,_=f/d;if(p>=0&&p<=1&&_>=0&&_<=1)return l(c)||(c=new G),c.x=e+p*(n-e),c.y=t+p*(i-t),c};var O_=uI;function R_(e){this._quantizedVertices=e.quantizedVertices,this._encodedNormals=e.encodedNormals,this._indices=e.indices,this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._boundingSphere=e.boundingSphere,this._orientedBoundingBox=e.orientedBoundingBox,this._horizonOcclusionPoint=e.horizonOcclusionPoint,this._credits=e.credits;let t=this._quantizedVertices.length/3,n=this._uValues=this._quantizedVertices.subarray(0,t),i=this._vValues=this._quantizedVertices.subarray(t,2*t);this._heightValues=this._quantizedVertices.subarray(2*t,3*t);function o(s,a){return i[s]-i[a]}function r(s,a){return n[s]-n[a]}this._westIndices=dI(e.westIndices,o,t),this._southIndices=dI(e.southIndices,r,t),this._eastIndices=dI(e.eastIndices,o,t),this._northIndices=dI(e.northIndices,r,t),this._westSkirtHeight=e.westSkirtHeight,this._southSkirtHeight=e.southSkirtHeight,this._eastSkirtHeight=e.eastSkirtHeight,this._northSkirtHeight=e.northSkirtHeight,this._childTileMask=y(e.childTileMask,15),this._createdByUpsampling=y(e.createdByUpsampling,!1),this._waterMask=e.waterMask,this._mesh=void 0}Object.defineProperties(R_.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){return this._waterMask}},childTileMask:{get:function(){return this._childTileMask}},canUpsample:{get:function(){return l(this._mesh)}}});var fI=[];function dI(e,t,n){fI.length=e.length;let i=!1;for(let o=0,r=e.length;o<r;++o)fI[o]=e[o],i=i||o>0&&t(e[o-1],e[o])>0;return i?(fI.sort(t),Ne.createTypedArray(n,fI)):e}var gZ="createVerticesFromQuantizedTerrainMesh",Eve=new Di(gZ),Sve=new Di(gZ,_h.maximumAsynchronousTasks);R_.prototype.createMesh=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.tilingScheme,n=e.x,i=e.y,o=e.level,r=y(e.exaggeration,1),s=y(e.exaggerationRelativeHeight,0),a=y(e.throttle,!0),c=t.ellipsoid,u=t.tileXYToRectangle(n,i,o),d=(a?Sve:Eve).scheduleTask({minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,quantizedVertices:this._quantizedVertices,octEncodedNormals:this._encodedNormals,includeWebMercatorT:!0,indices:this._indices,westIndices:this._westIndices,southIndices:this._southIndices,eastIndices:this._eastIndices,northIndices:this._northIndices,westSkirtHeight:this._westSkirtHeight,southSkirtHeight:this._southSkirtHeight,eastSkirtHeight:this._eastSkirtHeight,northSkirtHeight:this._northSkirtHeight,rectangle:u,relativeToCenter:this._boundingSphere.center,ellipsoid:c,exaggeration:r,exaggerationRelativeHeight:s});if(!l(d))return;let p=this;return Promise.resolve(d).then(function(_){let m=p._quantizedVertices.length/3,x=m+p._westIndices.length+p._southIndices.length+p._eastIndices.length+p._northIndices.length,C=Ne.createTypedArray(x,_.indices),A=new Float32Array(_.vertices),T=_.center,b=_.minimumHeight,S=_.maximumHeight,w=p._boundingSphere,D=p._orientedBoundingBox,O=y(h.clone(_.occludeePointInScaledSpace),p._horizonOcclusionPoint),I=_.vertexStride,L=mc.clone(_.encoding);return p._mesh=new $f(T,A,C,_.indexCountWithoutSkirts,m,b,S,w,O,I,D,L,_.westIndicesSouthToNorth,_.southIndicesEastToWest,_.eastIndicesNorthToSouth,_.northIndicesWestToEast),p._quantizedVertices=void 0,p._encodedNormals=void 0,p._indices=void 0,p._uValues=void 0,p._vValues=void 0,p._heightValues=void 0,p._westIndices=void 0,p._southIndices=void 0,p._eastIndices=void 0,p._northIndices=void 0,p._mesh})};var wve=new Di("upsampleQuantizedTerrainMesh",_h.maximumAsynchronousTasks);R_.prototype.upsample=function(e,t,n,i,o,r,s){let a=this._mesh;if(!l(this._mesh))return;let c=t*2!==o,u=n*2===r,f=e.ellipsoid,d=e.tileXYToRectangle(o,r,s),p=wve.scheduleTask({vertices:a.vertices,vertexCountWithoutSkirts:a.vertexCountWithoutSkirts,indices:a.indices,indexCountWithoutSkirts:a.indexCountWithoutSkirts,encoding:a.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,isEastChild:c,isNorthChild:u,childRectangle:d,ellipsoid:f});if(!l(p))return;let _=Math.min(this._westSkirtHeight,this._eastSkirtHeight);_=Math.min(_,this._southSkirtHeight),_=Math.min(_,this._northSkirtHeight);let m=c?_*.5:this._westSkirtHeight,x=u?_*.5:this._southSkirtHeight,C=c?this._eastSkirtHeight:_*.5,A=u?this._northSkirtHeight:_*.5,T=this._credits;return Promise.resolve(p).then(function(b){let S=new Uint16Array(b.vertices),w=Ne.createTypedArray(S.length/3,b.indices),D;return l(b.encodedNormals)&&(D=new Uint8Array(b.encodedNormals)),new R_({quantizedVertices:S,indices:w,encodedNormals:D,minimumHeight:b.minimumHeight,maximumHeight:b.maximumHeight,boundingSphere:oe.clone(b.boundingSphere),orientedBoundingBox:gi.clone(b.orientedBoundingBox),horizonOcclusionPoint:h.clone(b.horizonOcclusionPoint),westIndices:b.westIndices,southIndices:b.southIndices,eastIndices:b.eastIndices,northIndices:b.northIndices,westSkirtHeight:m,southSkirtHeight:x,eastSkirtHeight:C,northSkirtHeight:A,childTileMask:0,credits:T,createdByUpsampling:!0})})};var VH=32767,yZ=new h;R_.prototype.interpolateHeight=function(e,t,n){let i=R.clamp((t-e.west)/e.width,0,1);i*=VH;let o=R.clamp((n-e.south)/e.height,0,1);return o*=VH,l(this._mesh)?Ive(this,i,o):Ove(this,i,o)};function xZ(e,t,n,i,o,r,s,a){let c=Math.min(n,o,s),u=Math.max(n,o,s),f=Math.min(i,r,a),d=Math.max(i,r,a);return e>=c&&e<=u&&t>=f&&t<=d}var vve=new G,Dve=new G,Pve=new G;function Ive(e,t,n){let i=e._mesh,o=i.vertices,r=i.encoding,s=i.indices;for(let a=0,c=s.length;a<c;a+=3){let u=s[a],f=s[a+1],d=s[a+2],p=r.decodeTextureCoordinates(o,u,vve),_=r.decodeTextureCoordinates(o,f,Dve),m=r.decodeTextureCoordinates(o,d,Pve);if(xZ(t,n,p.x,p.y,_.x,_.y,m.x,m.y)){let x=O_.computeBarycentricCoordinates(t,n,p.x,p.y,_.x,_.y,m.x,m.y,yZ);if(x.x>=-1e-15&&x.y>=-1e-15&&x.z>=-1e-15){let C=r.decodeHeight(o,u),A=r.decodeHeight(o,f),T=r.decodeHeight(o,d);return x.x*C+x.y*A+x.z*T}}}}function Ove(e,t,n){let i=e._uValues,o=e._vValues,r=e._heightValues,s=e._indices;for(let a=0,c=s.length;a<c;a+=3){let u=s[a],f=s[a+1],d=s[a+2],p=i[u],_=i[f],m=i[d],x=o[u],C=o[f],A=o[d];if(xZ(t,n,p,x,_,C,m,A)){let T=O_.computeBarycentricCoordinates(t,n,p,x,_,C,m,A,yZ);if(T.x>=-1e-15&&T.y>=-1e-15&&T.z>=-1e-15){let b=T.x*r[u]+T.y*r[f]+T.z*r[d];return R.lerp(e._minimumHeight,e._maximumHeight,b/VH)}}}}R_.prototype.isChildAvailable=function(e,t,n,i){let o=2;return n!==e*2&&++o,i!==t*2&&(o-=2),(this._childTileMask&1<<o)!==0};R_.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var pA=R_;function Rve(e){this.resource=e.resource,this.version=e.version,this.isHeightmap=e.isHeightmap,this.tileUrlTemplates=e.tileUrlTemplates,this.availability=e.availability,this.hasVertexNormals=e.hasVertexNormals,this.hasWaterMask=e.hasWaterMask,this.hasMetadata=e.hasMetadata,this.availabilityLevels=e.availabilityLevels,this.availabilityTilesLoaded=e.availabilityTilesLoaded,this.littleEndianExtensionSize=e.littleEndianExtensionSize,this.availabilityPromiseCache={}}function hy(e){this._heightmapWidth=65,this._heightmapStructure=void 0,this._hasWaterMask=!1,this._hasVertexNormals=!1,this._ellipsoid=e.ellipsoid,this._requestVertexNormals=y(e.requestVertexNormals,!1),this._requestWaterMask=y(e.requestWaterMask,!1),this._requestMetadata=y(e.requestMetadata,!0),this._errorEvent=new _e;let t=e.credit;typeof t=="string"&&(t=new Ht(t)),this._credit=t,this._availability=void 0,this._ready=!1,this._tileCredits=void 0;let n=this,i,o,r,s=this._layers=[],a="",c=[],u=0;this._readyPromise=Promise.resolve(e.url).then(function(x){let C=De.createIfNeeded(x);return C.appendForwardSlash(),i=C,o=i.getDerivedResource({url:"layer.json"}),n._tileCredits=C.credits,m()});function f(x){let C;if(!x.format)return C="The tile format is not specified in the layer.json file.",r=Gn.reportError(r,n,n._errorEvent,C),r.retry?m():Promise.reject(new fe(C));if(!x.tiles||x.tiles.length===0)return C="The layer.json file does not specify any tile URL templates.",r=Gn.reportError(r,n,n._errorEvent,C),r.retry?m():Promise.reject(new fe(C));let A=!1,T=!1,b=!1,S=!0,w=!1;if(x.format==="heightmap-1.0")w=!0,l(n._heightmapStructure)||(n._heightmapStructure={heightScale:1/5,heightOffset:-1e3,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1,lowestEncodedHeight:0,highestEncodedHeight:256*256-1}),T=!0,n._requestWaterMask=!0;else if(x.format.indexOf("quantized-mesh-1.")!==0)return C=`The tile format "${x.format}" is invalid or not supported.`,r=Gn.reportError(r,n,n._errorEvent,C),r.retry?m():Promise.reject(new fe(C));let D=x.tiles,O=x.maxzoom;if(u=Math.max(u,O),!x.projection||x.projection==="EPSG:4326")n._tilingScheme=new Xi({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:1,ellipsoid:n._ellipsoid});else if(x.projection==="EPSG:3857")n._tilingScheme=new ts({numberOfLevelZeroTilesX:1,numberOfLevelZeroTilesY:1,ellipsoid:n._ellipsoid});else return C=`The projection "${x.projection}" is invalid or not supported.`,r=Gn.reportError(r,n,n._errorEvent,C),r.retry?m():Promise.reject(new fe(C));if(n._levelZeroMaximumGeometricError=es.getEstimatedLevelZeroGeometricErrorForAHeightmap(n._tilingScheme.ellipsoid,n._heightmapWidth,n._tilingScheme.getNumberOfXTilesAtLevel(0)),!x.scheme||x.scheme==="tms"||x.scheme==="slippyMap")n._scheme=x.scheme;else return C=`The scheme "${x.scheme}" is invalid or not supported.`,r=Gn.reportError(r,n,n._errorEvent,C),r.retry?m():Promise.reject(new fe(C));let I;l(x.extensions)&&x.extensions.indexOf("octvertexnormals")!==-1?A=!0:l(x.extensions)&&x.extensions.indexOf("vertexnormals")!==-1&&(A=!0,S=!1),l(x.extensions)&&x.extensions.indexOf("watermask")!==-1&&(T=!0),l(x.extensions)&&x.extensions.indexOf("metadata")!==-1&&(b=!0);let L=x.metadataAvailability,N=x.available,g;if(l(N)&&!l(L)){g=new gh(n._tilingScheme,N.length);for(let v=0;v<N.length;++v){let P=N[v],M=n._tilingScheme.getNumberOfYTilesAtLevel(v);l(c[v])||(c[v]=[]);for(let V=0;V<P.length;++V){let U=P[V],k=M-U.endY-1,H=M-U.startY-1;c[v].push([U.startX,k,U.endX,H]),g.addAvailableTileRange(v,U.startX,k,U.endX,H)}}}else l(L)&&(I=new gh(n._tilingScheme,O),g=new gh(n._tilingScheme,O),c[0]=[[0,0,1,0]],g.addAvailableTileRange(0,0,0,1,0));n._hasWaterMask=n._hasWaterMask||T,n._hasVertexNormals=n._hasVertexNormals||A,n._hasMetadata=n._hasMetadata||b,l(x.attribution)&&(a.length>0&&(a+=" "),a+=x.attribution),s.push(new Rve({resource:i,version:x.version,isHeightmap:w,tileUrlTemplates:D,availability:g,hasVertexNormals:A,hasWaterMask:T,hasMetadata:b,availabilityLevels:L,availabilityTilesLoaded:I,littleEndianExtensionSize:S}));let E=x.parentUrl;if(l(E)){if(!l(g))return console.log("A layer.json can't have a parentUrl if it does't have an available array."),Promise.resolve(!0);i=i.getDerivedResource({url:E}),i.appendForwardSlash(),o=i.getDerivedResource({url:"layer.json"});let v=o.fetchJson();return Promise.resolve(v).then(f).catch(d)}return Promise.resolve(!0)}function d(x){let C=`An error occurred while accessing ${o.url}.`;return r=Gn.reportError(r,n,n._errorEvent,C),r.retry?m():Promise.reject(new fe(C))}function p(x){return f(x).then(function(){if(l(r))return;let C=c.length;if(C>0){let A=n._availability=new gh(n._tilingScheme,u);for(let T=0;T<C;++T){let b=c[T];for(let S=0;S<b.length;++S){let w=b[S];A.addAvailableTileRange(T,w[0],w[1],w[2],w[3])}}}if(a.length>0){let A=new Ht(a);l(n._tileCredits)?n._tileCredits.push(A):n._tileCredits=[A]}return n._ready=!0,Promise.resolve(!0)})}function _(x){return l(x)&&x.statusCode===404?p({tilejson:"2.1.0",format:"heightmap-1.0",version:"1.0.0",scheme:"tms",tiles:["{z}/{x}/{y}.terrain?v={version}"]}):d(x)}function m(){return Promise.resolve(o.fetchJson()).then(p).catch(_)}}var kH={OCT_VERTEX_NORMALS:1,WATER_MASK:2,METADATA:4};function CZ(e){return!l(e)||e.length===0?{Accept:"application/vnd.quantized-mesh,application/octet-stream;q=0.9,*/*;q=0.01"}:{Accept:`application/vnd.quantized-mesh;extensions=${e.join("-")},application/octet-stream;q=0.9,*/*;q=0.01`}}function Mve(e,t,n,i,o){let r=new Uint16Array(t,0,e._heightmapWidth*e._heightmapWidth);return new ka({buffer:r,childTileMask:new Uint8Array(t,r.byteLength,1)[0],waterMask:new Uint8Array(t,r.byteLength+1,t.byteLength-r.byteLength-1),width:e._heightmapWidth,height:e._heightmapWidth,structure:e._heightmapStructure,credits:e._tileCredits})}function Bve(e,t,n,i,o,r){let s=r.littleEndianExtensionSize,a=0,c=3,u=c+1,f=Float64Array.BYTES_PER_ELEMENT*c,d=Float64Array.BYTES_PER_ELEMENT*u,p=3,_=Uint16Array.BYTES_PER_ELEMENT*p,m=3,x=Uint16Array.BYTES_PER_ELEMENT,C=x*m,A=new DataView(t),T=new h(A.getFloat64(a,!0),A.getFloat64(a+8,!0),A.getFloat64(a+16,!0));a+=f;let b=A.getFloat32(a,!0);a+=Float32Array.BYTES_PER_ELEMENT;let S=A.getFloat32(a,!0);a+=Float32Array.BYTES_PER_ELEMENT;let w=new oe(new h(A.getFloat64(a,!0),A.getFloat64(a+8,!0),A.getFloat64(a+16,!0)),A.getFloat64(a+f,!0));a+=d;let D=new h(A.getFloat64(a,!0),A.getFloat64(a+8,!0),A.getFloat64(a+16,!0));a+=f;let O=A.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let I=new Uint16Array(t,a,O*3);a+=O*_,O>64*1024&&(x=Uint32Array.BYTES_PER_ELEMENT,C=x*m);let L=I.subarray(0,O),N=I.subarray(O,2*O),g=I.subarray(O*2,3*O);Pn.zigZagDeltaDecode(L,N,g),a%x!==0&&(a+=x-a%x);let E=A.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let v=Ne.createTypedArrayFromArrayBuffer(O,t,a,E*m);a+=E*C;let P=0,M=v.length;for(let ie=0;ie<M;++ie){let ae=v[ie];v[ie]=P-ae,ae===0&&++P}let V=A.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let U=Ne.createTypedArrayFromArrayBuffer(O,t,a,V);a+=V*x;let k=A.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let H=Ne.createTypedArrayFromArrayBuffer(O,t,a,k);a+=k*x;let F=A.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let Y=Ne.createTypedArrayFromArrayBuffer(O,t,a,F);a+=F*x;let j=A.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let X=Ne.createTypedArrayFromArrayBuffer(O,t,a,j);a+=j*x;let W,$;for(;a<A.byteLength;){let ie=A.getUint8(a,!0);a+=Uint8Array.BYTES_PER_ELEMENT;let ae=A.getUint32(a,s);if(a+=Uint32Array.BYTES_PER_ELEMENT,ie===kH.OCT_VERTEX_NORMALS&&e._requestVertexNormals)W=new Uint8Array(t,a,O*2);else if(ie===kH.WATER_MASK&&e._requestWaterMask)$=new Uint8Array(t,a,ae);else if(ie===kH.METADATA&&e._requestMetadata){let ge=A.getUint32(a,!0);if(ge>0){let be=No(new Uint8Array(t),a+Uint32Array.BYTES_PER_ELEMENT,ge).available;if(l(be))for(let Be=0;Be<be.length;++Be){let Ae=n+Be+1,Oe=be[Be],Ge=e._tilingScheme.getNumberOfYTilesAtLevel(Ae);for(let ot=0;ot<Oe.length;++ot){let nt=Oe[ot],Tn=Ge-nt.endY-1,Zn=Ge-nt.startY-1;e.availability.addAvailableTileRange(Ae,nt.startX,Tn,nt.endX,Zn),r.availability.addAvailableTileRange(Ae,nt.startX,Tn,nt.endX,Zn)}}}r.availabilityTilesLoaded.addAvailableTileRange(n,i,o,i,o)}a+=ae}let J=e.getLevelMaximumGeometricError(n)*5,ce=e._tilingScheme.tileXYToRectangle(i,o,n),he=gi.fromRectangle(ce,b,S,e._tilingScheme.ellipsoid);return new pA({center:T,minimumHeight:b,maximumHeight:S,boundingSphere:w,orientedBoundingBox:he,horizonOcclusionPoint:D,quantizedVertices:I,encodedNormals:W,indices:v,westIndices:U,southIndices:H,eastIndices:Y,northIndices:X,westSkirtHeight:J,southSkirtHeight:J,eastSkirtHeight:J,northSkirtHeight:J,childTileMask:e.availability.computeChildMaskForTile(n,i,o),waterMask:$,credits:e._tileCredits})}hy.prototype.requestTileGeometry=function(e,t,n,i){let o=this._layers,r,s=o.length;if(s===1)r=o[0];else for(let a=0;a<s;++a){let c=o[a];if(!l(c.availability)||c.availability.isTileAvailable(n,e,t)){r=c;break}}return AZ(this,e,t,n,r,i)};function AZ(e,t,n,i,o,r){if(!l(o))return Promise.reject(new fe("Terrain tile doesn't exist"));let s=o.tileUrlTemplates;if(s.length===0)return;let a;!e._scheme||e._scheme==="tms"?a=e._tilingScheme.getNumberOfYTilesAtLevel(i)-n-1:a=n;let c=[];e._requestVertexNormals&&o.hasVertexNormals&&c.push(o.littleEndianExtensionSize?"octvertexnormals":"vertexnormals"),e._requestWaterMask&&o.hasWaterMask&&c.push("watermask"),e._requestMetadata&&o.hasMetadata&&c.push("metadata");let u,f,d=s[(t+a+i)%s.length],p=o.resource;l(p._ionEndpoint)&&!l(p._ionEndpoint.externalType)?(c.length!==0&&(f={extensions:c.join("-")}),u=CZ(void 0)):u=CZ(c);let _=p.getDerivedResource({url:d,templateValues:{version:o.version,z:i,x:t,y:a},queryParameters:f,headers:u,request:r}).fetchArrayBuffer();if(!!l(_))return _.then(function(m){return l(m)?l(e._heightmapStructure)?Mve(e,m,i,t,n):Bve(e,m,i,t,n,o):Promise.reject(new fe("Mesh buffer doesn't exist."))})}Object.defineProperties(hy.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return this._hasWaterMask&&this._requestWaterMask}},hasVertexNormals:{get:function(){return this._hasVertexNormals&&this._requestVertexNormals}},hasMetadata:{get:function(){return this._hasMetadata&&this._requestMetadata}},requestVertexNormals:{get:function(){return this._requestVertexNormals}},requestWaterMask:{get:function(){return this._requestWaterMask}},requestMetadata:{get:function(){return this._requestMetadata}},availability:{get:function(){return this._availability}}});hy.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};hy.prototype.getTileDataAvailable=function(e,t,n){if(!l(this._availability))return;if(n>this._availability._maximumLevel)return!1;if(this._availability.isTileAvailable(n,e,t))return!0;if(!this._hasMetadata)return!1;let i=this._layers,o=i.length;for(let r=0;r<o;++r)if(TZ(this,e,t,n,i[r],r===0).result)return;return!1};hy.prototype.loadTileDataAvailability=function(e,t,n){if(!l(this._availability)||n>this._availability._maximumLevel||this._availability.isTileAvailable(n,e,t)||!this._hasMetadata)return;let i=this._layers,o=i.length;for(let r=0;r<o;++r){let s=TZ(this,e,t,n,i[r],r===0);if(l(s.promise))return s.promise}};function UH(e,t,n,i){if(i===0)return;let o=e.availabilityLevels,r=i%o===0?i-o:(i/o|0)*o,s=1<<i-r,a=t/s|0,c=n/s|0;return{level:r,x:a,y:c}}function TZ(e,t,n,i,o,r){if(!l(o.availabilityLevels))return{result:!1};let s,a=function(){delete o.availabilityPromiseCache[s]},c=o.availabilityTilesLoaded,u=o.availability,f=UH(o,t,n,i);for(;l(f);){if(u.isTileAvailable(f.level,f.x,f.y)&&!c.isTileAvailable(f.level,f.x,f.y)){let d;if(!r&&(s=`${f.level}-${f.x}-${f.y}`,d=o.availabilityPromiseCache[s],!l(d))){let p=new rr({throttle:!1,throttleByServer:!0,type:or.TERRAIN});d=AZ(e,f.x,f.y,f.level,o,p),l(d)&&(o.availabilityPromiseCache[s]=d,d.then(a))}return{result:!0,promise:d}}f=UH(o,f.x,f.y,f.level)}return{result:!1}}hy._getAvailabilityTile=UH;var hI=hy;var HH={},mI=new h,bZ=new h,EZ=new Me,SZ=new Q;function _A(e,t,n,i,o,r,s,a,c,u){let f=e+t;h.multiplyByScalar(i,Math.cos(f),mI),h.multiplyByScalar(n,Math.sin(f),bZ),h.add(mI,bZ,mI);let d=Math.cos(e);d=d*d;let p=Math.sin(e);p=p*p;let m=r/Math.sqrt(s*d+o*p)/a;return Me.fromAxisAngle(mI,m,EZ),Q.fromQuaternion(EZ,SZ),Q.multiplyByVector(SZ,c,u),h.normalize(u,u),h.multiplyByScalar(u,a,u),u}var wZ=new h,vZ=new h,zH=new h,Lve=new h;HH.raisePositionsToHeight=function(e,t,n){let i=t.ellipsoid,o=t.height,r=t.extrudedHeight,s=n?e.length/3*2:e.length/3,a=new Float64Array(s*3),c=e.length,u=n?c:0;for(let f=0;f<c;f+=3){let d=f+1,p=f+2,_=h.fromArray(e,f,wZ);i.scaleToGeodeticSurface(_,_);let m=h.clone(_,vZ),x=i.geodeticSurfaceNormal(_,Lve),C=h.multiplyByScalar(x,o,zH);h.add(_,C,_),n&&(h.multiplyByScalar(x,r,C),h.add(m,C,m),a[f+u]=m.x,a[d+u]=m.y,a[p+u]=m.z),a[f]=_.x,a[d]=_.y,a[p]=_.z}return a};var Nve=new h,Fve=new h,Vve=new h;HH.computeEllipsePositions=function(e,t,n){let i=e.semiMinorAxis,o=e.semiMajorAxis,r=e.rotation,s=e.center,a=e.granularity*8,c=i*i,u=o*o,f=o*i,d=h.magnitude(s),p=h.normalize(s,Nve),_=h.cross(h.UNIT_Z,s,Fve);_=h.normalize(_,_);let m=h.cross(p,_,Vve),x=1+Math.ceil(R.PI_OVER_TWO/a),C=R.PI_OVER_TWO/(x-1),A=R.PI_OVER_TWO-x*C;A<0&&(x-=Math.ceil(Math.abs(A)/C));let T=2*(x*(x+2)),b=t?new Array(T*3):void 0,S=0,w=wZ,D=vZ,O=x*4*3,I=O-1,L=0,N=n?new Array(O):void 0,g,E,v,P,M;for(A=R.PI_OVER_TWO,w=_A(A,r,m,_,c,f,u,d,p,w),t&&(b[S++]=w.x,b[S++]=w.y,b[S++]=w.z),n&&(N[I--]=w.z,N[I--]=w.y,N[I--]=w.x),A=R.PI_OVER_TWO-C,g=1;g<x+1;++g){if(w=_A(A,r,m,_,c,f,u,d,p,w),D=_A(Math.PI-A,r,m,_,c,f,u,d,p,D),t){for(b[S++]=w.x,b[S++]=w.y,b[S++]=w.z,v=2*g+2,E=1;E<v-1;++E)P=E/(v-1),M=h.lerp(w,D,P,zH),b[S++]=M.x,b[S++]=M.y,b[S++]=M.z;b[S++]=D.x,b[S++]=D.y,b[S++]=D.z}n&&(N[I--]=w.z,N[I--]=w.y,N[I--]=w.x,N[L++]=D.x,N[L++]=D.y,N[L++]=D.z),A=R.PI_OVER_TWO-(g+1)*C}for(g=x;g>1;--g){if(A=R.PI_OVER_TWO-(g-1)*C,w=_A(-A,r,m,_,c,f,u,d,p,w),D=_A(A+Math.PI,r,m,_,c,f,u,d,p,D),t){for(b[S++]=w.x,b[S++]=w.y,b[S++]=w.z,v=2*(g-1)+2,E=1;E<v-1;++E)P=E/(v-1),M=h.lerp(w,D,P,zH),b[S++]=M.x,b[S++]=M.y,b[S++]=M.z;b[S++]=D.x,b[S++]=D.y,b[S++]=D.z}n&&(N[I--]=w.z,N[I--]=w.y,N[I--]=w.x,N[L++]=D.x,N[L++]=D.y,N[L++]=D.z)}A=R.PI_OVER_TWO,w=_A(-A,r,m,_,c,f,u,d,p,w);let V={};return t&&(b[S++]=w.x,b[S++]=w.y,b[S++]=w.z,V.positions=b,V.numPts=x),n&&(N[I--]=w.z,N[I--]=w.y,N[I--]=w.x,V.outerPositions=N),V};var kl=HH;function kve(e){e=y(e,y.EMPTY_OBJECT),this.geometry=e.geometry,this.modelMatrix=B.clone(y(e.modelMatrix,B.IDENTITY)),this.id=e.id,this.pickPrimitive=e.pickPrimitive,this.attributes=y(e.attributes,{}),this.westHemisphereGeometry=void 0,this.eastHemisphereGeometry=void 0}var pt=kve;function Ch(){this.high=h.clone(h.ZERO),this.low=h.clone(h.ZERO)}Ch.encode=function(e,t){l(t)||(t={high:0,low:0});let n;return e>=0?(n=Math.floor(e/65536)*65536,t.high=n,t.low=e-n):(n=Math.floor(-e/65536)*65536,t.high=-n,t.low=e+n),t};var jm={high:0,low:0};Ch.fromCartesian=function(e,t){l(t)||(t=new Ch);let n=t.high,i=t.low;return Ch.encode(e.x,jm),n.x=jm.high,i.x=jm.low,Ch.encode(e.y,jm),n.y=jm.high,i.y=jm.low,Ch.encode(e.z,jm),n.z=jm.high,i.z=jm.low,t};var GH=new Ch;Ch.writeElements=function(e,t,n){Ch.fromCartesian(e,GH);let i=GH.high,o=GH.low;t[n]=i.x,t[n+1]=i.y,t[n+2]=i.z,t[n+3]=o.x,t[n+4]=o.y,t[n+5]=o.z};var kn=Ch;var WH={};WH.calculateACMR=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.indices,n=e.maximumIndex,i=y(e.cacheSize,24),o=t.length;if(!l(n)){n=0;let a=0,c=t[a];for(;a<o;)c>n&&(n=c),++a,c=t[a]}let r=[];for(let a=0;a<n+1;a++)r[a]=0;let s=i+1;for(let a=0;a<o;++a)s-r[t[a]]>i&&(r[t[a]]=s,++s);return(s-i+1)/(o/3)};WH.tipsify=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.indices,n=e.maximumIndex,i=y(e.cacheSize,24),o;function r(g,E,v,P){for(;E.length>=1;){let M=E[E.length-1];if(E.splice(E.length-1,1),g[M].numLiveTriangles>0)return M}for(;o<P;){if(g[o].numLiveTriangles>0)return++o,o-1;++o}return-1}function s(g,E,v,P,M,V,U){let k=-1,H,F=-1,Y=0;for(;Y<v.length;){let j=v[Y];P[j].numLiveTriangles&&(H=0,M-P[j].timeStamp+2*P[j].numLiveTriangles<=E&&(H=M-P[j].timeStamp),(H>F||F===-1)&&(F=H,k=j)),++Y}return k===-1?r(P,V,g,U):k}let a=t.length,c=0,u=0,f=t[u],d=a;if(l(n))c=n+1;else{for(;u<d;)f>c&&(c=f),++u,f=t[u];if(c===-1)return 0;++c}let p=[],_;for(_=0;_<c;_++)p[_]={numLiveTriangles:0,timeStamp:0,vertexTriangles:[]};u=0;let m=0;for(;u<d;)p[t[u]].vertexTriangles.push(m),++p[t[u]].numLiveTriangles,p[t[u+1]].vertexTriangles.push(m),++p[t[u+1]].numLiveTriangles,p[t[u+2]].vertexTriangles.push(m),++p[t[u+2]].numLiveTriangles,++m,u+=3;let x=0,C=i+1;o=1;let A=[],T=[],b,S,w=0,D=[],O=a/3,I=[];for(_=0;_<O;_++)I[_]=!1;let L,N;for(;x!==-1;){A=[],S=p[x],N=S.vertexTriangles.length;for(let g=0;g<N;++g)if(m=S.vertexTriangles[g],!I[m]){I[m]=!0,u=m+m+m;for(let E=0;E<3;++E)L=t[u],A.push(L),T.push(L),D[w]=L,++w,b=p[L],--b.numLiveTriangles,C-b.timeStamp>i&&(b.timeStamp=C,++C),++u}x=s(t,i,A,p,C,T,c)}return D};var pI=WH;var gc={};function TI(e,t,n,i,o){e[t++]=n,e[t++]=i,e[t++]=i,e[t++]=o,e[t++]=o,e[t]=n}function Uve(e){let t=e.length,n=t/3*6,i=Ne.createTypedArray(t,n),o=0;for(let r=0;r<t;r+=3,o+=6)TI(i,o,e[r],e[r+1],e[r+2]);return i}function zve(e){let t=e.length;if(t>=3){let n=(t-2)*6,i=Ne.createTypedArray(t,n);TI(i,0,e[0],e[1],e[2]);let o=6;for(let r=3;r<t;++r,o+=6)TI(i,o,e[r-1],e[r],e[r-2]);return i}return new Uint16Array}function Hve(e){if(e.length>0){let t=e.length-1,n=(t-1)*6,i=Ne.createTypedArray(t,n),o=e[0],r=0;for(let s=1;s<t;++s,r+=6)TI(i,r,o,e[s],e[s+1]);return i}return new Uint16Array}gc.toWireframe=function(e){let t=e.indices;if(l(t)){switch(e.primitiveType){case Le.TRIANGLES:e.indices=Uve(t);break;case Le.TRIANGLE_STRIP:e.indices=zve(t);break;case Le.TRIANGLE_FAN:e.indices=Hve(t);break}e.primitiveType=Le.LINES}return e};gc.createLineSegmentsForVectors=function(e,t,n){t=y(t,"normal"),n=y(n,1e4);let i=e.attributes.position.values,o=e.attributes[t].values,r=i.length,s=new Float64Array(2*r),a=0;for(let f=0;f<r;f+=3)s[a++]=i[f],s[a++]=i[f+1],s[a++]=i[f+2],s[a++]=i[f]+o[f]*n,s[a++]=i[f+1]+o[f+1]*n,s[a++]=i[f+2]+o[f+2]*n;let c,u=e.boundingSphere;return l(u)&&(c=new oe(u.center,u.radius+n)),new ct({attributes:{position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:s})},primitiveType:Le.LINES,boundingSphere:c})};gc.createAttributeLocations=function(e){let t=["position","positionHigh","positionLow","position3DHigh","position3DLow","position2DHigh","position2DLow","pickColor","normal","st","tangent","bitangent","extrudeDirection","compressedAttributes"],n=e.attributes,i={},o=0,r,s=t.length;for(r=0;r<s;++r){let a=t[r];l(n[a])&&(i[a]=o++)}for(let a in n)n.hasOwnProperty(a)&&!l(i[a])&&(i[a]=o++);return i};gc.reorderForPreVertexCache=function(e){let t=ct.computeNumberOfVertices(e),n=e.indices;if(l(n)){let i=new Int32Array(t);for(let p=0;p<t;p++)i[p]=-1;let o=n,r=o.length,s=Ne.createTypedArray(t,r),a=0,c=0,u=0,f;for(;a<r;)f=i[o[a]],f!==-1?s[c]=f:(f=o[a],i[f]=u,s[c]=u,++u),++a,++c;e.indices=s;let d=e.attributes;for(let p in d)if(d.hasOwnProperty(p)&&l(d[p])&&l(d[p].values)){let _=d[p],m=_.values,x=0,C=_.componentsPerAttribute,A=K.createTypedArray(_.componentDatatype,u*C);for(;x<t;){let T=i[x];if(T!==-1)for(let b=0;b<C;b++)A[C*T+b]=m[C*x+b];++x}_.values=A}}return e};gc.reorderForPostVertexCache=function(e,t){let n=e.indices;if(e.primitiveType===Le.TRIANGLES&&l(n)){let i=n.length,o=0;for(let r=0;r<i;r++)n[r]>o&&(o=n[r]);e.indices=pI.tipsify({indices:n,maximumIndex:o,cacheSize:t})}return e};function DZ(e){let t={};for(let n in e)if(e.hasOwnProperty(n)&&l(e[n])&&l(e[n].values)){let i=e[n];t[n]=new Ee({componentDatatype:i.componentDatatype,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize,values:[]})}return t}function Gve(e,t,n){for(let i in t)if(t.hasOwnProperty(i)&&l(t[i])&&l(t[i].values)){let o=t[i];for(let r=0;r<o.componentsPerAttribute;++r)e[i].values.push(o.values[n*o.componentsPerAttribute+r])}}gc.fitToUnsignedShortIndices=function(e){let t=[],n=ct.computeNumberOfVertices(e);if(l(e.indices)&&n>=R.SIXTY_FOUR_KILOBYTES){let i=[],o=[],r=0,s=DZ(e.attributes),a=e.indices,c=a.length,u;e.primitiveType===Le.TRIANGLES?u=3:e.primitiveType===Le.LINES?u=2:e.primitiveType===Le.POINTS&&(u=1);for(let f=0;f<c;f+=u){for(let d=0;d<u;++d){let p=a[f+d],_=i[p];l(_)||(_=r++,i[p]=_,Gve(s,e.attributes,p)),o.push(_)}r+u>=R.SIXTY_FOUR_KILOBYTES&&(t.push(new ct({attributes:s,indices:o,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV})),i=[],o=[],r=0,s=DZ(e.attributes))}o.length!==0&&t.push(new ct({attributes:s,indices:o,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV}))}else t.push(e);return t};var PZ=new h,Wve=new me;gc.projectTo2D=function(e,t,n,i,o){let r=e.attributes[t];o=l(o)?o:new Si;let s=o.ellipsoid,a=r.values,c=new Float64Array(a.length),u=0;for(let f=0;f<a.length;f+=3){let d=h.fromArray(a,f,PZ),p=s.cartesianToCartographic(d,Wve),_=o.project(p,PZ);c[u++]=_.x,c[u++]=_.y,c[u++]=_.z}return e.attributes[n]=r,e.attributes[i]=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:c}),delete e.attributes[t],e};var jH={high:0,low:0};gc.encodeAttribute=function(e,t,n,i){let o=e.attributes[t],r=o.values,s=r.length,a=new Float32Array(s),c=new Float32Array(s);for(let f=0;f<s;++f)kn.encode(r[f],jH),a[f]=jH.high,c[f]=jH.low;let u=o.componentsPerAttribute;return e.attributes[n]=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:u,values:a}),e.attributes[i]=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:u,values:c}),delete e.attributes[t],e};var Qf=new h;function qH(e,t){if(l(t)){let n=t.values,i=n.length;for(let o=0;o<i;o+=3)h.unpack(n,o,Qf),B.multiplyByPoint(e,Qf,Qf),h.pack(Qf,n,o)}}function YH(e,t){if(l(t)){let n=t.values,i=n.length;for(let o=0;o<i;o+=3)h.unpack(n,o,Qf),Q.multiplyByVector(e,Qf,Qf),Qf=h.normalize(Qf,Qf),h.pack(Qf,n,o)}}var _I=new B,gI=new Q;gc.transformToWorldCoordinates=function(e){let t=e.modelMatrix;if(B.equals(t,B.IDENTITY))return e;let n=e.geometry.attributes;qH(t,n.position),qH(t,n.prevPosition),qH(t,n.nextPosition),(l(n.normal)||l(n.tangent)||l(n.bitangent))&&(B.inverse(t,_I),B.transpose(_I,_I),B.getMatrix3(_I,gI),YH(gI,n.normal),YH(gI,n.tangent),YH(gI,n.bitangent));let i=e.geometry.boundingSphere;return l(i)&&(e.geometry.boundingSphere=oe.transform(i,t,i)),e.modelMatrix=B.clone(B.IDENTITY),e};function jve(e,t){let n=e.length,i={},o=e[0][t].attributes,r;for(r in o)if(o.hasOwnProperty(r)&&l(o[r])&&l(o[r].values)){let s=o[r],a=s.values.length,c=!0;for(let u=1;u<n;++u){let f=e[u][t].attributes[r];if(!l(f)||s.componentDatatype!==f.componentDatatype||s.componentsPerAttribute!==f.componentsPerAttribute||s.normalize!==f.normalize){c=!1;break}a+=f.values.length}c&&(i[r]=new Ee({componentDatatype:s.componentDatatype,componentsPerAttribute:s.componentsPerAttribute,normalize:s.normalize,values:K.createTypedArray(s.componentDatatype,a)}))}return i}var qve=new h;function XH(e,t){let n=e.length,i,o,r,s,a=e[0].modelMatrix,c=l(e[0][t].indices),u=e[0][t].primitiveType,f=jve(e,t),d,p,_;for(i in f)if(f.hasOwnProperty(i))for(d=f[i].values,s=0,o=0;o<n;++o)for(p=e[o][t].attributes[i].values,_=p.length,r=0;r<_;++r)d[s++]=p[r];let m;if(c){let T=0;for(o=0;o<n;++o)T+=e[o][t].indices.length;let b=ct.computeNumberOfVertices(new ct({attributes:f,primitiveType:Le.POINTS})),S=Ne.createTypedArray(b,T),w=0,D=0;for(o=0;o<n;++o){let O=e[o][t].indices,I=O.length;for(s=0;s<I;++s)S[w++]=D+O[s];D+=ct.computeNumberOfVertices(e[o][t])}m=S}let x=new h,C=0,A;for(o=0;o<n;++o){if(A=e[o][t].boundingSphere,!l(A)){x=void 0;break}h.add(A.center,x,x)}if(l(x))for(h.divideByScalar(x,n,x),o=0;o<n;++o){A=e[o][t].boundingSphere;let T=h.magnitude(h.subtract(A.center,x,qve))+A.radius;T>C&&(C=T)}return new ct({attributes:f,indices:m,primitiveType:u,boundingSphere:l(x)?new oe(x,C):void 0})}gc.combineInstances=function(e){let t=[],n=[],i=e.length;for(let r=0;r<i;++r){let s=e[r];l(s.geometry)?t.push(s):l(s.westHemisphereGeometry)&&l(s.eastHemisphereGeometry)&&n.push(s)}let o=[];return t.length>0&&o.push(XH(t,"geometry")),n.length>0&&(o.push(XH(n,"westHemisphereGeometry")),o.push(XH(n,"eastHemisphereGeometry"))),o};var Lu=new h,SS=new h,gA=new h,yA=new h;gc.computeNormal=function(e){let t=e.indices,n=e.attributes,i=n.position.values,o=n.position.values.length/3,r=t.length,s=new Array(o),a=new Array(r/3),c=new Array(r),u;for(u=0;u<o;u++)s[u]={indexOffset:0,count:0,currentCount:0};let f=0;for(u=0;u<r;u+=3){let m=t[u],x=t[u+1],C=t[u+2],A=m*3,T=x*3,b=C*3;SS.x=i[A],SS.y=i[A+1],SS.z=i[A+2],gA.x=i[T],gA.y=i[T+1],gA.z=i[T+2],yA.x=i[b],yA.y=i[b+1],yA.z=i[b+2],s[m].count++,s[x].count++,s[C].count++,h.subtract(gA,SS,gA),h.subtract(yA,SS,yA),a[f]=h.cross(gA,yA,new h),f++}let d=0;for(u=0;u<o;u++)s[u].indexOffset+=d,d+=s[u].count;f=0;let p;for(u=0;u<r;u+=3){p=s[t[u]];let m=p.indexOffset+p.currentCount;c[m]=f,p.currentCount++,p=s[t[u+1]],m=p.indexOffset+p.currentCount,c[m]=f,p.currentCount++,p=s[t[u+2]],m=p.indexOffset+p.currentCount,c[m]=f,p.currentCount++,f++}let _=new Float32Array(o*3);for(u=0;u<o;u++){let m=u*3;if(p=s[u],h.clone(h.ZERO,Lu),p.count>0){for(f=0;f<p.count;f++)h.add(Lu,a[c[p.indexOffset+f]],Lu);h.equalsEpsilon(h.ZERO,Lu,R.EPSILON10)&&h.clone(a[c[p.indexOffset]],Lu)}h.equalsEpsilon(h.ZERO,Lu,R.EPSILON10)&&(Lu.z=1),h.normalize(Lu,Lu),_[m]=Lu.x,_[m+1]=Lu.y,_[m+2]=Lu.z}return e.attributes.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:_}),e};var Yve=new h,IZ=new h,Xve=new h;gc.computeTangentAndBitangent=function(e){let t=e.attributes,n=e.indices,i=e.attributes.position.values,o=e.attributes.normal.values,r=e.attributes.st.values,s=e.attributes.position.values.length/3,a=n.length,c=new Array(s*3),u;for(u=0;u<c.length;u++)c[u]=0;let f,d,p;for(u=0;u<a;u+=3){let x=n[u],C=n[u+1],A=n[u+2];f=x*3,d=C*3,p=A*3;let T=x*2,b=C*2,S=A*2,w=i[f],D=i[f+1],O=i[f+2],I=r[T],L=r[T+1],N=r[b+1]-L,g=r[S+1]-L,E=1/((r[b]-I)*g-(r[S]-I)*N),v=(g*(i[d]-w)-N*(i[p]-w))*E,P=(g*(i[d+1]-D)-N*(i[p+1]-D))*E,M=(g*(i[d+2]-O)-N*(i[p+2]-O))*E;c[f]+=v,c[f+1]+=P,c[f+2]+=M,c[d]+=v,c[d+1]+=P,c[d+2]+=M,c[p]+=v,c[p+1]+=P,c[p+2]+=M}let _=new Float32Array(s*3),m=new Float32Array(s*3);for(u=0;u<s;u++){f=u*3,d=f+1,p=f+2;let x=h.fromArray(o,f,Yve),C=h.fromArray(c,f,Xve),A=h.dot(x,C);h.multiplyByScalar(x,A,IZ),h.normalize(h.subtract(C,IZ,C),C),_[f]=C.x,_[d]=C.y,_[p]=C.z,h.normalize(h.cross(x,C,C),C),m[f]=C.x,m[d]=C.y,m[p]=C.z}return e.attributes.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:_}),e.attributes.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:m}),e};var wS=new G,Jf=new h,OZ=new h,RZ=new h,yI=new G;gc.compressVertices=function(e){let t=e.attributes.extrudeDirection,n,i;if(l(t)){let D=t.values;i=D.length/3;let O=new Float32Array(i*2),I=0;for(n=0;n<i;++n){if(h.fromArray(D,n*3,Jf),h.equals(Jf,h.ZERO)){I+=2;continue}yI=Pn.octEncodeInRange(Jf,65535,yI),O[I++]=yI.x,O[I++]=yI.y}return e.attributes.compressedAttributes=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:O}),delete e.attributes.extrudeDirection,e}let o=e.attributes.normal,r=e.attributes.st,s=l(o),a=l(r);if(!s&&!a)return e;let c=e.attributes.tangent,u=e.attributes.bitangent,f=l(c),d=l(u),p,_,m,x;s&&(p=o.values),a&&(_=r.values),f&&(m=c.values),d&&(x=u.values),i=(s?p.length:_.length)/(s?3:2);let T=i,b=a&&s?2:1;b+=f||d?1:0,T*=b;let S=new Float32Array(T),w=0;for(n=0;n<i;++n){a&&(G.fromArray(_,n*2,wS),S[w++]=Pn.compressTextureCoordinates(wS));let D=n*3;s&&l(m)&&l(x)?(h.fromArray(p,D,Jf),h.fromArray(m,D,OZ),h.fromArray(x,D,RZ),Pn.octPack(Jf,OZ,RZ,wS),S[w++]=wS.x,S[w++]=wS.y):(s&&(h.fromArray(p,D,Jf),S[w++]=Pn.octEncodeFloat(Jf)),f&&(h.fromArray(m,D,Jf),S[w++]=Pn.octEncodeFloat(Jf)),d&&(h.fromArray(x,D,Jf),S[w++]=Pn.octEncodeFloat(Jf)))}return e.attributes.compressedAttributes=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:b,values:S}),s&&delete e.attributes.normal,a&&delete e.attributes.st,d&&delete e.attributes.bitangent,f&&delete e.attributes.tangent,e};function Kve(e){if(l(e.indices))return e;let t=ct.computeNumberOfVertices(e),n=Ne.createTypedArray(t,t);for(let i=0;i<t;++i)n[i]=i;return e.indices=n,e}function $ve(e){let t=ct.computeNumberOfVertices(e),n=Ne.createTypedArray(t,(t-2)*3);n[0]=1,n[1]=0,n[2]=2;let i=3;for(let o=3;o<t;++o)n[i++]=o-1,n[i++]=0,n[i++]=o;return e.indices=n,e.primitiveType=Le.TRIANGLES,e}function Zve(e){let t=ct.computeNumberOfVertices(e),n=Ne.createTypedArray(t,(t-2)*3);n[0]=0,n[1]=1,n[2]=2,t>3&&(n[3]=0,n[4]=2,n[5]=3);let i=6;for(let o=3;o<t-1;o+=2)n[i++]=o,n[i++]=o-1,n[i++]=o+1,o+2<t&&(n[i++]=o,n[i++]=o+1,n[i++]=o+2);return e.indices=n,e.primitiveType=Le.TRIANGLES,e}function Jve(e){if(l(e.indices))return e;let t=ct.computeNumberOfVertices(e),n=Ne.createTypedArray(t,t);for(let i=0;i<t;++i)n[i]=i;return e.indices=n,e}function Qve(e){let t=ct.computeNumberOfVertices(e),n=Ne.createTypedArray(t,(t-1)*2);n[0]=0,n[1]=1;let i=2;for(let o=2;o<t;++o)n[i++]=o-1,n[i++]=o;return e.indices=n,e.primitiveType=Le.LINES,e}function eDe(e){let t=ct.computeNumberOfVertices(e),n=Ne.createTypedArray(t,t*2);n[0]=0,n[1]=1;let i=2;for(let o=2;o<t;++o)n[i++]=o-1,n[i++]=o;return n[i++]=t-1,n[i]=0,e.indices=n,e.primitiveType=Le.LINES,e}function tDe(e){switch(e.primitiveType){case Le.TRIANGLE_FAN:return $ve(e);case Le.TRIANGLE_STRIP:return Zve(e);case Le.TRIANGLES:return Kve(e);case Le.LINE_STRIP:return Qve(e);case Le.LINE_LOOP:return eDe(e);case Le.LINES:return Jve(e)}return e}function M_(e,t){Math.abs(e.y)<R.EPSILON6&&(t?e.y=-R.EPSILON6:e.y=R.EPSILON6)}function nDe(e,t,n){if(e.y!==0&&t.y!==0&&n.y!==0){M_(e,e.y<0),M_(t,t.y<0),M_(n,n.y<0);return}let i=Math.abs(e.y),o=Math.abs(t.y),r=Math.abs(n.y),s;i>o?i>r?s=R.sign(e.y):s=R.sign(n.y):o>r?s=R.sign(t.y):s=R.sign(n.y);let a=s<0;M_(e,a),M_(t,a),M_(n,a)}var MZ=new h;function Nu(e,t,n,i){h.add(e,h.multiplyByScalar(h.subtract(t,e,MZ),e.y/(e.y-t.y),MZ),n),h.clone(n,i),M_(n,!0),M_(i,!1)}var my=new h,py=new h,_y=new h,gy=new h,KH={positions:new Array(7),indices:new Array(3*3)};function iDe(e,t,n){if(e.x>=0||t.x>=0||n.x>=0)return;nDe(e,t,n);let i=e.y<0,o=t.y<0,r=n.y<0,s=0;s+=i?1:0,s+=o?1:0,s+=r?1:0;let a=KH.indices;s===1?(a[1]=3,a[2]=4,a[5]=6,a[7]=6,a[8]=5,i?(Nu(e,t,my,_y),Nu(e,n,py,gy),a[0]=0,a[3]=1,a[4]=2,a[6]=1):o?(Nu(t,n,my,_y),Nu(t,e,py,gy),a[0]=1,a[3]=2,a[4]=0,a[6]=2):r&&(Nu(n,e,my,_y),Nu(n,t,py,gy),a[0]=2,a[3]=0,a[4]=1,a[6]=0)):s===2&&(a[2]=4,a[4]=4,a[5]=3,a[7]=5,a[8]=6,i?o?r||(Nu(n,e,my,_y),Nu(n,t,py,gy),a[0]=0,a[1]=1,a[3]=0,a[6]=2):(Nu(t,n,my,_y),Nu(t,e,py,gy),a[0]=2,a[1]=0,a[3]=2,a[6]=1):(Nu(e,t,my,_y),Nu(e,n,py,gy),a[0]=1,a[1]=2,a[3]=1,a[6]=0));let c=KH.positions;return c[0]=e,c[1]=t,c[2]=n,c.length=3,(s===1||s===2)&&(c[3]=my,c[4]=py,c[5]=_y,c[6]=gy,c.length=7),KH}function BZ(e,t){let n=e.attributes;if(n.position.values.length===0)return;for(let o in n)if(n.hasOwnProperty(o)&&l(n[o])&&l(n[o].values)){let r=n[o];r.values=K.createTypedArray(r.componentDatatype,r.values)}let i=ct.computeNumberOfVertices(e);return e.indices=Ne.createTypedArray(i,e.indices),t&&(e.boundingSphere=oe.fromVertices(n.position.values)),e}function CA(e){let t=e.attributes,n={};for(let i in t)if(t.hasOwnProperty(i)&&l(t[i])&&l(t[i].values)){let o=t[i];n[i]=new Ee({componentDatatype:o.componentDatatype,componentsPerAttribute:o.componentsPerAttribute,normalize:o.normalize,values:[]})}return new ct({attributes:n,indices:[],primitiveType:e.primitiveType})}function QH(e,t,n){let i=l(e.geometry.boundingSphere);t=BZ(t,i),n=BZ(n,i),l(n)&&!l(t)?e.geometry=n:!l(n)&&l(t)?e.geometry=t:(e.westHemisphereGeometry=t,e.eastHemisphereGeometry=n,e.geometry=void 0)}function e5(e,t){let n=new e,i=new e,o=new e;return function(r,s,a,c,u,f,d,p){let _=e.fromArray(u,r*t,n),m=e.fromArray(u,s*t,i),x=e.fromArray(u,a*t,o);e.multiplyByScalar(_,c.x,_),e.multiplyByScalar(m,c.y,m),e.multiplyByScalar(x,c.z,x);let C=e.add(_,m,_);e.add(C,x,C),p&&e.normalize(C,C),e.pack(C,f,d*t)}}var oDe=e5(se,4),AI=e5(h,3),UZ=e5(G,2),rDe=function(e,t,n,i,o,r,s){let a=o[e]*i.x,c=o[t]*i.y,u=o[n]*i.z;r[s]=a+c+u>R.EPSILON6?1:0},vS=new h,$H=new h,ZH=new h,sDe=new h;function xI(e,t,n,i,o,r,s,a,c,u,f,d,p,_,m,x){if(!l(r)&&!l(s)&&!l(a)&&!l(c)&&!l(u)&&_===0)return;let C=h.fromArray(o,e*3,vS),A=h.fromArray(o,t*3,$H),T=h.fromArray(o,n*3,ZH),b=uA(i,C,A,T,sDe);if(!!l(b)){if(l(r)&&AI(e,t,n,b,r,d.normal.values,x,!0),l(u)){let S=h.fromArray(u,e*3,vS),w=h.fromArray(u,t*3,$H),D=h.fromArray(u,n*3,ZH);h.multiplyByScalar(S,b.x,S),h.multiplyByScalar(w,b.y,w),h.multiplyByScalar(D,b.z,D);let O;!h.equals(S,h.ZERO)||!h.equals(w,h.ZERO)||!h.equals(D,h.ZERO)?(O=h.add(S,w,S),h.add(O,D,O),h.normalize(O,O)):(O=vS,O.x=0,O.y=0,O.z=0),h.pack(O,d.extrudeDirection.values,x*3)}if(l(f)&&rDe(e,t,n,b,f,d.applyOffset.values,x),l(s)&&AI(e,t,n,b,s,d.tangent.values,x,!0),l(a)&&AI(e,t,n,b,a,d.bitangent.values,x,!0),l(c)&&UZ(e,t,n,b,c,d.st.values,x),_>0)for(let S=0;S<_;S++){let w=p[S];aDe(e,t,n,b,x,m[w],d[w])}}}function aDe(e,t,n,i,o,r,s){let a=r.componentsPerAttribute,c=r.values,u=s.values;switch(a){case 4:oDe(e,t,n,i,c,u,o,!1);break;case 3:AI(e,t,n,i,c,u,o,!1);break;case 2:UZ(e,t,n,i,c,u,o,!1);break;default:u[o]=c[e]*i.x+c[t]*i.y+c[n]*i.z}}function Ah(e,t,n,i,o,r){let s=e.position.values.length/3;if(o!==-1){let a=i[o],c=n[a];return c===-1?(n[a]=s,e.position.values.push(r.x,r.y,r.z),t.push(s),s):(t.push(c),c)}return e.position.values.push(r.x,r.y,r.z),t.push(s),s}var cDe={position:!0,normal:!0,bitangent:!0,tangent:!0,st:!0,extrudeDirection:!0,applyOffset:!0};function LZ(e){let t=e.geometry,n=t.attributes,i=n.position.values,o=l(n.normal)?n.normal.values:void 0,r=l(n.bitangent)?n.bitangent.values:void 0,s=l(n.tangent)?n.tangent.values:void 0,a=l(n.st)?n.st.values:void 0,c=l(n.extrudeDirection)?n.extrudeDirection.values:void 0,u=l(n.applyOffset)?n.applyOffset.values:void 0,f=t.indices,d=[];for(let O in n)n.hasOwnProperty(O)&&!cDe[O]&&l(n[O])&&d.push(O);let p=d.length,_=CA(t),m=CA(t),x,C,A,T,b,S=[];S.length=i.length/3;let w=[];for(w.length=i.length/3,b=0;b<S.length;++b)S[b]=-1,w[b]=-1;let D=f.length;for(b=0;b<D;b+=3){let O=f[b],I=f[b+1],L=f[b+2],N=h.fromArray(i,O*3),g=h.fromArray(i,I*3),E=h.fromArray(i,L*3),v=iDe(N,g,E);if(l(v)&&v.positions.length>3){let P=v.positions,M=v.indices,V=M.length;for(let U=0;U<V;++U){let k=M[U],H=P[k];H.y<0?(x=m.attributes,C=m.indices,A=S):(x=_.attributes,C=_.indices,A=w),T=Ah(x,C,A,f,k<3?b+k:-1,H),xI(O,I,L,H,i,o,s,r,a,c,u,x,d,p,n,T)}}else l(v)&&(N=v.positions[0],g=v.positions[1],E=v.positions[2]),N.y<0?(x=m.attributes,C=m.indices,A=S):(x=_.attributes,C=_.indices,A=w),T=Ah(x,C,A,f,b,N),xI(O,I,L,N,i,o,s,r,a,c,u,x,d,p,n,T),T=Ah(x,C,A,f,b+1,g),xI(O,I,L,g,i,o,s,r,a,c,u,x,d,p,n,T),T=Ah(x,C,A,f,b+2,E),xI(O,I,L,E,i,o,s,r,a,c,u,x,d,p,n,T)}QH(e,m,_)}var zZ=rn.fromPointNormal(h.ZERO,h.UNIT_Y),lDe=new h,uDe=new h;function xA(e,t,n,i,o,r,s){if(!l(s))return;let a=h.fromArray(i,e*3,vS);h.equalsEpsilon(a,n,R.EPSILON10)?r.applyOffset.values[o]=s[e]:r.applyOffset.values[o]=s[t]}function NZ(e){let t=e.geometry,n=t.attributes,i=n.position.values,o=l(n.applyOffset)?n.applyOffset.values:void 0,r=t.indices,s=CA(t),a=CA(t),c,u=r.length,f=[];f.length=i.length/3;let d=[];for(d.length=i.length/3,c=0;c<f.length;++c)f[c]=-1,d[c]=-1;for(c=0;c<u;c+=2){let p=r[c],_=r[c+1],m=h.fromArray(i,p*3,vS),x=h.fromArray(i,_*3,$H),C;Math.abs(m.y)<R.EPSILON6&&(m.y<0?m.y=-R.EPSILON6:m.y=R.EPSILON6),Math.abs(x.y)<R.EPSILON6&&(x.y<0?x.y=-R.EPSILON6:x.y=R.EPSILON6);let A=s.attributes,T=s.indices,b=d,S=a.attributes,w=a.indices,D=f,O=Ki.lineSegmentPlane(m,x,zZ,ZH);if(l(O)){let I=h.multiplyByScalar(h.UNIT_Y,5*R.EPSILON9,lDe);m.y<0&&(h.negate(I,I),A=a.attributes,T=a.indices,b=f,S=s.attributes,w=s.indices,D=d);let L=h.add(O,I,uDe);C=Ah(A,T,b,r,c,m),xA(p,_,m,i,C,A,o),C=Ah(A,T,b,r,-1,L),xA(p,_,L,i,C,A,o),h.negate(I,I),h.add(O,I,L),C=Ah(S,w,D,r,-1,L),xA(p,_,L,i,C,S,o),C=Ah(S,w,D,r,c+1,x),xA(p,_,x,i,C,S,o)}else{let I,L,N;m.y<0?(I=a.attributes,L=a.indices,N=f):(I=s.attributes,L=s.indices,N=d),C=Ah(I,L,N,r,c,m),xA(p,_,m,i,C,I,o),C=Ah(I,L,N,r,c+1,x),xA(p,_,x,i,C,I,o)}}QH(e,a,s)}var FZ=new G,fDe=new G,HZ=new h,GZ=new h,JH=new h,dDe=new h,hDe=new h,mDe=new h,VZ=new se;function kZ(e){let t=e.attributes,n=t.position.values,i=t.prevPosition.values,o=t.nextPosition.values,r=n.length;for(let s=0;s<r;s+=3){let a=h.unpack(n,s,HZ);if(a.x>0)continue;let c=h.unpack(i,s,GZ);(a.y<0&&c.y>0||a.y>0&&c.y<0)&&(s-3>0?(i[s]=n[s-3],i[s+1]=n[s-2],i[s+2]=n[s-1]):h.pack(a,i,s));let u=h.unpack(o,s,JH);(a.y<0&&u.y>0||a.y>0&&u.y<0)&&(s+3<r?(o[s]=n[s+3],o[s+1]=n[s+4],o[s+2]=n[s+5]):h.pack(a,o,s))}}var pDe=5*R.EPSILON9,CI=R.EPSILON6;function _De(e){let t=e.geometry,n=t.attributes,i=n.position.values,o=n.prevPosition.values,r=n.nextPosition.values,s=n.expandAndWidth.values,a=l(n.st)?n.st.values:void 0,c=l(n.color)?n.color.values:void 0,u=CA(t),f=CA(t),d,p,_,m=!1,x=i.length/3;for(d=0;d<x;d+=4){let C=d,A=d+2,T=h.fromArray(i,C*3,HZ),b=h.fromArray(i,A*3,GZ);if(Math.abs(T.y)<CI)for(T.y=CI*(b.y<0?-1:1),i[d*3+1]=T.y,i[(d+1)*3+1]=T.y,p=C*3;p<C*3+4*3;p+=3)o[p]=i[d*3],o[p+1]=i[d*3+1],o[p+2]=i[d*3+2];if(Math.abs(b.y)<CI)for(b.y=CI*(T.y<0?-1:1),i[(d+2)*3+1]=b.y,i[(d+3)*3+1]=b.y,p=C*3;p<C*3+4*3;p+=3)r[p]=i[(d+2)*3],r[p+1]=i[(d+2)*3+1],r[p+2]=i[(d+2)*3+2];let S=u.attributes,w=u.indices,D=f.attributes,O=f.indices,I=Ki.lineSegmentPlane(T,b,zZ,dDe);if(l(I)){m=!0;let L=h.multiplyByScalar(h.UNIT_Y,pDe,hDe);T.y<0&&(h.negate(L,L),S=f.attributes,w=f.indices,D=u.attributes,O=u.indices);let N=h.add(I,L,mDe);S.position.values.push(T.x,T.y,T.z,T.x,T.y,T.z),S.position.values.push(N.x,N.y,N.z),S.position.values.push(N.x,N.y,N.z),S.prevPosition.values.push(o[C*3],o[C*3+1],o[C*3+2]),S.prevPosition.values.push(o[C*3+3],o[C*3+4],o[C*3+5]),S.prevPosition.values.push(T.x,T.y,T.z,T.x,T.y,T.z),S.nextPosition.values.push(N.x,N.y,N.z),S.nextPosition.values.push(N.x,N.y,N.z),S.nextPosition.values.push(N.x,N.y,N.z),S.nextPosition.values.push(N.x,N.y,N.z),h.negate(L,L),h.add(I,L,N),D.position.values.push(N.x,N.y,N.z),D.position.values.push(N.x,N.y,N.z),D.position.values.push(b.x,b.y,b.z,b.x,b.y,b.z),D.prevPosition.values.push(N.x,N.y,N.z),D.prevPosition.values.push(N.x,N.y,N.z),D.prevPosition.values.push(N.x,N.y,N.z),D.prevPosition.values.push(N.x,N.y,N.z),D.nextPosition.values.push(b.x,b.y,b.z,b.x,b.y,b.z),D.nextPosition.values.push(r[A*3],r[A*3+1],r[A*3+2]),D.nextPosition.values.push(r[A*3+3],r[A*3+4],r[A*3+5]);let g=G.fromArray(s,C*2,FZ),E=Math.abs(g.y);S.expandAndWidth.values.push(-1,E,1,E),S.expandAndWidth.values.push(-1,-E,1,-E),D.expandAndWidth.values.push(-1,E,1,E),D.expandAndWidth.values.push(-1,-E,1,-E);let v=h.magnitudeSquared(h.subtract(I,T,JH));if(v/=h.magnitudeSquared(h.subtract(b,T,JH)),l(c)){let P=se.fromArray(c,C*4,VZ),M=se.fromArray(c,A*4,VZ),V=R.lerp(P.x,M.x,v),U=R.lerp(P.y,M.y,v),k=R.lerp(P.z,M.z,v),H=R.lerp(P.w,M.w,v);for(p=C*4;p<C*4+2*4;++p)S.color.values.push(c[p]);for(S.color.values.push(V,U,k,H),S.color.values.push(V,U,k,H),D.color.values.push(V,U,k,H),D.color.values.push(V,U,k,H),p=A*4;p<A*4+2*4;++p)D.color.values.push(c[p])}if(l(a)){let P=G.fromArray(a,C*2,FZ),M=G.fromArray(a,(d+3)*2,fDe),V=R.lerp(P.x,M.x,v);for(p=C*2;p<C*2+2*2;++p)S.st.values.push(a[p]);for(S.st.values.push(V,P.y),S.st.values.push(V,M.y),D.st.values.push(V,P.y),D.st.values.push(V,M.y),p=A*2;p<A*2+2*2;++p)D.st.values.push(a[p])}_=S.position.values.length/3-4,w.push(_,_+2,_+1),w.push(_+1,_+2,_+3),_=D.position.values.length/3-4,O.push(_,_+2,_+1),O.push(_+1,_+2,_+3)}else{let L,N;for(T.y<0?(L=f.attributes,N=f.indices):(L=u.attributes,N=u.indices),L.position.values.push(T.x,T.y,T.z),L.position.values.push(T.x,T.y,T.z),L.position.values.push(b.x,b.y,b.z),L.position.values.push(b.x,b.y,b.z),p=d*3;p<d*3+4*3;++p)L.prevPosition.values.push(o[p]),L.nextPosition.values.push(r[p]);for(p=d*2;p<d*2+4*2;++p)L.expandAndWidth.values.push(s[p]),l(a)&&L.st.values.push(a[p]);if(l(c))for(p=d*4;p<d*4+4*4;++p)L.color.values.push(c[p]);_=L.position.values.length/3-4,N.push(_,_+2,_+1),N.push(_+1,_+2,_+3)}}m&&(kZ(f),kZ(u)),QH(e,f,u)}gc.splitLongitude=function(e){let t=e.geometry,n=t.boundingSphere;if(l(n)&&(n.center.x-n.radius>0||oe.intersectPlane(n,rn.ORIGIN_ZX_PLANE)!==Zt.INTERSECTING))return e;if(t.geometryType!==Zf.NONE)switch(t.geometryType){case Zf.POLYLINES:_De(e);break;case Zf.TRIANGLES:LZ(e);break;case Zf.LINES:NZ(e);break}else tDe(t),t.primitiveType===Le.TRIANGLES?LZ(e):t.primitiveType===Le.LINES&&NZ(e);return e};var Rn=gc;var AA=new h,t5=new h,n5=new h,WZ=new h,us=new G,jZ=new Q,gDe=new Q,i5=new Me,qZ=new h,YZ=new h,XZ=new h,SI=new me,KZ=new h,$Z=new G,ZZ=new G;function JZ(e,t,n){let i=t.vertexFormat,o=t.center,r=t.semiMajorAxis,s=t.semiMinorAxis,a=t.ellipsoid,c=t.stRotation,u=n?e.length/3*2:e.length/3,f=t.shadowVolume,d=i.st?new Float32Array(u*2):void 0,p=i.normal?new Float32Array(u*3):void 0,_=i.tangent?new Float32Array(u*3):void 0,m=i.bitangent?new Float32Array(u*3):void 0,x=f?new Float32Array(u*3):void 0,C=0,A=qZ,T=YZ,b=XZ,S=new Si(a),w=S.project(a.cartesianToCartographic(o,SI),KZ),D=a.scaleToGeodeticSurface(o,AA);a.geodeticSurfaceNormal(D,D);let O=jZ,I=gDe;if(c!==0){let M=Me.fromAxisAngle(D,c,i5);O=Q.fromQuaternion(M,O),M=Me.fromAxisAngle(D,-c,i5),I=Q.fromQuaternion(M,I)}else O=Q.clone(Q.IDENTITY,O),I=Q.clone(Q.IDENTITY,I);let L=G.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,$Z),N=G.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,ZZ),g=e.length,E=n?g:0,v=E/3*2;for(let M=0;M<g;M+=3){let V=M+1,U=M+2,k=h.fromArray(e,M,AA);if(i.st){let H=Q.multiplyByVector(O,k,t5),F=S.project(a.cartesianToCartographic(H,SI),n5);h.subtract(F,w,F),us.x=(F.x+r)/(2*r),us.y=(F.y+s)/(2*s),L.x=Math.min(us.x,L.x),L.y=Math.min(us.y,L.y),N.x=Math.max(us.x,N.x),N.y=Math.max(us.y,N.y),n&&(d[C+v]=us.x,d[C+1+v]=us.y),d[C++]=us.x,d[C++]=us.y}(i.normal||i.tangent||i.bitangent||f)&&(A=a.geodeticSurfaceNormal(k,A),f&&(x[M+E]=-A.x,x[V+E]=-A.y,x[U+E]=-A.z),(i.normal||i.tangent||i.bitangent)&&((i.tangent||i.bitangent)&&(T=h.normalize(h.cross(h.UNIT_Z,A,T),T),Q.multiplyByVector(I,T,T)),i.normal&&(p[M]=A.x,p[V]=A.y,p[U]=A.z,n&&(p[M+E]=-A.x,p[V+E]=-A.y,p[U+E]=-A.z)),i.tangent&&(_[M]=T.x,_[V]=T.y,_[U]=T.z,n&&(_[M+E]=-T.x,_[V+E]=-T.y,_[U+E]=-T.z)),i.bitangent&&(b=h.normalize(h.cross(A,T,b),b),m[M]=b.x,m[V]=b.y,m[U]=b.z,n&&(m[M+E]=b.x,m[V+E]=b.y,m[U+E]=b.z))))}if(i.st){g=d.length;for(let M=0;M<g;M+=2)d[M]=(d[M]-L.x)/(N.x-L.x),d[M+1]=(d[M+1]-L.y)/(N.y-L.y)}let P=new ln;if(i.position){let M=kl.raisePositionsToHeight(e,t,n);P.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:M})}if(i.st&&(P.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:d})),i.normal&&(P.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:p})),i.tangent&&(P.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:_})),i.bitangent&&(P.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:m})),f&&(P.extrudeDirection=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:x})),n&&l(t.offsetAttribute)){let M=new Uint8Array(u);if(t.offsetAttribute===tn.TOP)M=M.fill(1,0,u/2);else{let V=t.offsetAttribute===tn.NONE?0:1;M=M.fill(V)}P.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:M})}return P}function QZ(e){let t=new Array(12*(e*(e+1))-6),n=0,i,o,r,s,a;for(i=0,r=1,s=0;s<3;s++)t[n++]=r++,t[n++]=i,t[n++]=r;for(s=2;s<e+1;++s){for(r=s*(s+1)-1,i=(s-1)*s-1,t[n++]=r++,t[n++]=i,t[n++]=r,o=2*s,a=0;a<o-1;++a)t[n++]=r,t[n++]=i++,t[n++]=i,t[n++]=r++,t[n++]=i,t[n++]=r;t[n++]=r++,t[n++]=i,t[n++]=r}for(o=e*2,++r,++i,s=0;s<o-1;++s)t[n++]=r,t[n++]=i++,t[n++]=i,t[n++]=r++,t[n++]=i,t[n++]=r;for(t[n++]=r,t[n++]=i++,t[n++]=i,t[n++]=r++,t[n++]=i++,t[n++]=i,++i,s=e-1;s>1;--s){for(t[n++]=i++,t[n++]=i,t[n++]=r,o=2*s,a=0;a<o-1;++a)t[n++]=r,t[n++]=i++,t[n++]=i,t[n++]=r++,t[n++]=i,t[n++]=r;t[n++]=i++,t[n++]=i++,t[n++]=r++}for(s=0;s<3;s++)t[n++]=i++,t[n++]=i,t[n++]=r;return t}var yy=new h;function yDe(e){let t=e.center;yy=h.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,yy),e.height,yy),yy=h.add(t,yy,yy);let n=new oe(yy,e.semiMajorAxis),i=kl.computeEllipsePositions(e,!0,!1),o=i.positions,r=i.numPts,s=JZ(o,e,!1),a=QZ(r);return a=Ne.createTypedArray(o.length/3,a),{boundingSphere:n,attributes:s,indices:a}}function xDe(e,t){let n=t.vertexFormat,i=t.center,o=t.semiMajorAxis,r=t.semiMinorAxis,s=t.ellipsoid,a=t.height,c=t.extrudedHeight,u=t.stRotation,f=e.length/3*2,d=new Float64Array(f*3),p=n.st?new Float32Array(f*2):void 0,_=n.normal?new Float32Array(f*3):void 0,m=n.tangent?new Float32Array(f*3):void 0,x=n.bitangent?new Float32Array(f*3):void 0,C=t.shadowVolume,A=C?new Float32Array(f*3):void 0,T=0,b=qZ,S=YZ,w=XZ,D=new Si(s),O=D.project(s.cartesianToCartographic(i,SI),KZ),I=s.scaleToGeodeticSurface(i,AA);s.geodeticSurfaceNormal(I,I);let L=Me.fromAxisAngle(I,u,i5),N=Q.fromQuaternion(L,jZ),g=G.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,$Z),E=G.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,ZZ),v=e.length,P=v/3*2;for(let V=0;V<v;V+=3){let U=V+1,k=V+2,H=h.fromArray(e,V,AA),F;if(n.st){let j=Q.multiplyByVector(N,H,t5),X=D.project(s.cartesianToCartographic(j,SI),n5);h.subtract(X,O,X),us.x=(X.x+o)/(2*o),us.y=(X.y+r)/(2*r),g.x=Math.min(us.x,g.x),g.y=Math.min(us.y,g.y),E.x=Math.max(us.x,E.x),E.y=Math.max(us.y,E.y),p[T+P]=us.x,p[T+1+P]=us.y,p[T++]=us.x,p[T++]=us.y}H=s.scaleToGeodeticSurface(H,H),F=h.clone(H,t5),b=s.geodeticSurfaceNormal(H,b),C&&(A[V+v]=-b.x,A[U+v]=-b.y,A[k+v]=-b.z);let Y=h.multiplyByScalar(b,a,WZ);if(H=h.add(H,Y,H),Y=h.multiplyByScalar(b,c,Y),F=h.add(F,Y,F),n.position&&(d[V+v]=F.x,d[U+v]=F.y,d[k+v]=F.z,d[V]=H.x,d[U]=H.y,d[k]=H.z),n.normal||n.tangent||n.bitangent){w=h.clone(b,w);let j=h.fromArray(e,(V+3)%v,WZ);h.subtract(j,H,j);let X=h.subtract(F,H,n5);b=h.normalize(h.cross(X,j,b),b),n.normal&&(_[V]=b.x,_[U]=b.y,_[k]=b.z,_[V+v]=b.x,_[U+v]=b.y,_[k+v]=b.z),n.tangent&&(S=h.normalize(h.cross(w,b,S),S),m[V]=S.x,m[U]=S.y,m[k]=S.z,m[V+v]=S.x,m[V+1+v]=S.y,m[V+2+v]=S.z),n.bitangent&&(x[V]=w.x,x[U]=w.y,x[k]=w.z,x[V+v]=w.x,x[U+v]=w.y,x[k+v]=w.z)}}if(n.st){v=p.length;for(let V=0;V<v;V+=2)p[V]=(p[V]-g.x)/(E.x-g.x),p[V+1]=(p[V+1]-g.y)/(E.y-g.y)}let M=new ln;if(n.position&&(M.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:d})),n.st&&(M.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:p})),n.normal&&(M.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:_})),n.tangent&&(M.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:m})),n.bitangent&&(M.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:x})),C&&(M.extrudeDirection=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:A})),l(t.offsetAttribute)){let V=new Uint8Array(f);if(t.offsetAttribute===tn.TOP)V=V.fill(1,0,f/2);else{let U=t.offsetAttribute===tn.NONE?0:1;V=V.fill(U)}M.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:V})}return M}function CDe(e){let t=e.length/3,n=Ne.createTypedArray(t,t*6),i=0;for(let o=0;o<t;o++){let r=o,s=o+t,a=(r+1)%t,c=a+t;n[i++]=r,n[i++]=s,n[i++]=a,n[i++]=a,n[i++]=s,n[i++]=c}return n}var bI=new oe,EI=new oe;function ADe(e){let t=e.center,n=e.ellipsoid,i=e.semiMajorAxis,o=h.multiplyByScalar(n.geodeticSurfaceNormal(t,AA),e.height,AA);bI.center=h.add(t,o,bI.center),bI.radius=i,o=h.multiplyByScalar(n.geodeticSurfaceNormal(t,o),e.extrudedHeight,o),EI.center=h.add(t,o,EI.center),EI.radius=i;let r=kl.computeEllipsePositions(e,!0,!0),s=r.positions,a=r.numPts,c=r.outerPositions,u=oe.union(bI,EI),f=JZ(s,e,!0),d=QZ(a),p=d.length;d.length=p*2;let _=s.length/3;for(let S=0;S<p;S+=3)d[S+p]=d[S+2]+_,d[S+1+p]=d[S+1]+_,d[S+2+p]=d[S]+_;let m=Ne.createTypedArray(_*2/3,d),x=new ct({attributes:f,indices:m,primitiveType:Le.TRIANGLES}),C=xDe(c,e);d=CDe(c);let A=Ne.createTypedArray(c.length*2/3,d),T=new ct({attributes:C,indices:A,primitiveType:Le.TRIANGLES}),b=Rn.combineInstances([new pt({geometry:x}),new pt({geometry:T})]);return{boundingSphere:u,attributes:b[0].attributes,indices:b[0].indices}}function eJ(e,t,n,i,o,r,s){let c=kl.computeEllipsePositions({center:e,semiMajorAxis:t,semiMinorAxis:n,rotation:i,granularity:o},!1,!0).outerPositions,u=c.length/3,f=new Array(u);for(let p=0;p<u;++p)f[p]=h.fromArray(c,p*3);let d=de.fromCartesianArray(f,r,s);return d.width>R.PI&&(d.north=d.north>0?R.PI_OVER_TWO-R.EPSILON7:d.north,d.south=d.south<0?R.EPSILON7-R.PI_OVER_TWO:d.south,d.east=R.PI,d.west=-R.PI),d}function bh(e){e=y(e,y.EMPTY_OBJECT);let t=e.center,n=y(e.ellipsoid,re.WGS84),i=e.semiMajorAxis,o=e.semiMinorAxis,r=y(e.granularity,R.RADIANS_PER_DEGREE),s=y(e.vertexFormat,Pe.DEFAULT),a=y(e.height,0),c=y(e.extrudedHeight,a);this._center=h.clone(t),this._semiMajorAxis=i,this._semiMinorAxis=o,this._ellipsoid=re.clone(n),this._rotation=y(e.rotation,0),this._stRotation=y(e.stRotation,0),this._height=Math.max(c,a),this._granularity=r,this._vertexFormat=Pe.clone(s),this._extrudedHeight=Math.min(c,a),this._shadowVolume=y(e.shadowVolume,!1),this._workerName="createEllipseGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0}bh.packedLength=h.packedLength+re.packedLength+Pe.packedLength+9;bh.pack=function(e,t,n){return n=y(n,0),h.pack(e._center,t,n),n+=h.packedLength,re.pack(e._ellipsoid,t,n),n+=re.packedLength,Pe.pack(e._vertexFormat,t,n),n+=Pe.packedLength,t[n++]=e._semiMajorAxis,t[n++]=e._semiMinorAxis,t[n++]=e._rotation,t[n++]=e._stRotation,t[n++]=e._height,t[n++]=e._granularity,t[n++]=e._extrudedHeight,t[n++]=e._shadowVolume?1:0,t[n]=y(e._offsetAttribute,-1),t};var tJ=new h,nJ=new re,iJ=new Pe,Th={center:tJ,ellipsoid:nJ,vertexFormat:iJ,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,stRotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};bh.unpack=function(e,t,n){t=y(t,0);let i=h.unpack(e,t,tJ);t+=h.packedLength;let o=re.unpack(e,t,nJ);t+=re.packedLength;let r=Pe.unpack(e,t,iJ);t+=Pe.packedLength;let s=e[t++],a=e[t++],c=e[t++],u=e[t++],f=e[t++],d=e[t++],p=e[t++],_=e[t++]===1,m=e[t];return l(n)?(n._center=h.clone(i,n._center),n._ellipsoid=re.clone(o,n._ellipsoid),n._vertexFormat=Pe.clone(r,n._vertexFormat),n._semiMajorAxis=s,n._semiMinorAxis=a,n._rotation=c,n._stRotation=u,n._height=f,n._granularity=d,n._extrudedHeight=p,n._shadowVolume=_,n._offsetAttribute=m===-1?void 0:m,n):(Th.height=f,Th.extrudedHeight=p,Th.granularity=d,Th.stRotation=u,Th.rotation=c,Th.semiMajorAxis=s,Th.semiMinorAxis=a,Th.shadowVolume=_,Th.offsetAttribute=m===-1?void 0:m,new bh(Th))};bh.computeRectangle=function(e,t){e=y(e,y.EMPTY_OBJECT);let n=e.center,i=y(e.ellipsoid,re.WGS84),o=e.semiMajorAxis,r=e.semiMinorAxis,s=y(e.granularity,R.RADIANS_PER_DEGREE),a=y(e.rotation,0);return eJ(n,o,r,a,s,i,t)};bh.createGeometry=function(e){if(e._semiMajorAxis<=0||e._semiMinorAxis<=0)return;let t=e._height,n=e._extrudedHeight,i=!R.equalsEpsilon(t,n,0,R.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);let o={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:t,granularity:e._granularity,vertexFormat:e._vertexFormat,stRotation:e._stRotation},r;if(i)o.extrudedHeight=n,o.shadowVolume=e._shadowVolume,o.offsetAttribute=e._offsetAttribute,r=ADe(o);else if(r=yDe(o),l(e._offsetAttribute)){let s=r.attributes.position.values.length,a=e._offsetAttribute===tn.NONE?0:1,c=new Uint8Array(s/3).fill(a);r.attributes.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:c})}return new ct({attributes:r.attributes,indices:r.indices,primitiveType:Le.TRIANGLES,boundingSphere:r.boundingSphere,offsetAttribute:e._offsetAttribute})};bh.createShadowVolume=function(e,t,n){let i=e._granularity,o=e._ellipsoid,r=t(i,o),s=n(i,o);return new bh({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:o,rotation:e._rotation,stRotation:e._stRotation,granularity:i,extrudedHeight:r,height:s,vertexFormat:Pe.POSITION_ONLY,shadowVolume:!0})};function TDe(e){let t=-e._stRotation;if(t===0)return[0,0,0,1,1,0];let i=kl.computeEllipsePositions({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,rotation:e._rotation,granularity:e._granularity},!1,!0).outerPositions,o=i.length/3,r=new Array(o);for(let c=0;c<o;++c)r[c]=h.fromArray(i,c*3);let s=e._ellipsoid,a=e.rectangle;return ct._textureCoordinateRotationPoints(r,t,s,a)}Object.defineProperties(bh.prototype,{rectangle:{get:function(){return l(this._rectangle)||(this._rectangle=eJ(this._center,this._semiMajorAxis,this._semiMinorAxis,this._rotation,this._granularity,this._ellipsoid)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return l(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=TDe(this)),this._textureCoordinateRotationPoints}}});var rl=bh;function qm(e){e=y(e,y.EMPTY_OBJECT);let t=e.radius,n={center:e.center,semiMajorAxis:t,semiMinorAxis:t,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,vertexFormat:e.vertexFormat,stRotation:e.stRotation,shadowVolume:e.shadowVolume};this._ellipseGeometry=new rl(n),this._workerName="createCircleGeometry"}qm.packedLength=rl.packedLength;qm.pack=function(e,t,n){return rl.pack(e._ellipseGeometry,t,n)};var bDe=new rl({center:new h,semiMajorAxis:1,semiMinorAxis:1}),Ua={center:new h,radius:void 0,ellipsoid:re.clone(re.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new Pe,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};qm.unpack=function(e,t,n){let i=rl.unpack(e,t,bDe);return Ua.center=h.clone(i._center,Ua.center),Ua.ellipsoid=re.clone(i._ellipsoid,Ua.ellipsoid),Ua.height=i._height,Ua.extrudedHeight=i._extrudedHeight,Ua.granularity=i._granularity,Ua.vertexFormat=Pe.clone(i._vertexFormat,Ua.vertexFormat),Ua.stRotation=i._stRotation,Ua.shadowVolume=i._shadowVolume,l(n)?(Ua.semiMajorAxis=i._semiMajorAxis,Ua.semiMinorAxis=i._semiMinorAxis,n._ellipseGeometry=new rl(Ua),n):(Ua.radius=i._semiMajorAxis,new qm(Ua))};qm.createGeometry=function(e){return rl.createGeometry(e._ellipseGeometry)};qm.createShadowVolume=function(e,t,n){let i=e._ellipseGeometry._granularity,o=e._ellipseGeometry._ellipsoid,r=t(i,o),s=n(i,o);return new qm({center:e._ellipseGeometry._center,radius:e._ellipseGeometry._semiMajorAxis,ellipsoid:o,stRotation:e._ellipseGeometry._stRotation,granularity:i,extrudedHeight:r,height:s,vertexFormat:Pe.POSITION_ONLY,shadowVolume:!0})};Object.defineProperties(qm.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}});var oJ=qm;var rJ=new h,xy=new h;function EDe(e){let t=e.center;xy=h.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,xy),e.height,xy),xy=h.add(t,xy,xy);let n=new oe(xy,e.semiMajorAxis),i=kl.computeEllipsePositions(e,!1,!0).outerPositions,o=new ln({position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:kl.raisePositionsToHeight(i,e,!1)})}),r=i.length/3,s=Ne.createTypedArray(r,r*2),a=0;for(let c=0;c<r;++c)s[a++]=c,s[a++]=(c+1)%r;return{boundingSphere:n,attributes:o,indices:s}}var wI=new oe,vI=new oe;function SDe(e){let t=e.center,n=e.ellipsoid,i=e.semiMajorAxis,o=h.multiplyByScalar(n.geodeticSurfaceNormal(t,rJ),e.height,rJ);wI.center=h.add(t,o,wI.center),wI.radius=i,o=h.multiplyByScalar(n.geodeticSurfaceNormal(t,o),e.extrudedHeight,o),vI.center=h.add(t,o,vI.center),vI.radius=i;let r=kl.computeEllipsePositions(e,!1,!0).outerPositions,s=new ln({position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:kl.raisePositionsToHeight(r,e,!0)})});r=s.position.values;let a=oe.union(wI,vI),c=r.length/3;if(l(e.offsetAttribute)){let m=new Uint8Array(c);if(e.offsetAttribute===tn.TOP)m=m.fill(1,0,c/2);else{let x=e.offsetAttribute===tn.NONE?0:1;m=m.fill(x)}s.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:m})}let u=y(e.numberOfVerticalLines,16);u=R.clamp(u,0,c/2);let f=Ne.createTypedArray(c,c*2+u*2);c/=2;let d=0,p;for(p=0;p<c;++p)f[d++]=p,f[d++]=(p+1)%c,f[d++]=p+c,f[d++]=(p+1)%c+c;let _;if(u>0){let m=Math.min(u,c);_=Math.round(c/m);let x=Math.min(_*u,c);for(p=0;p<x;p+=_)f[d++]=p,f[d++]=p+c}return{boundingSphere:a,attributes:s,indices:f}}function TA(e){e=y(e,y.EMPTY_OBJECT);let t=e.center,n=y(e.ellipsoid,re.WGS84),i=e.semiMajorAxis,o=e.semiMinorAxis,r=y(e.granularity,R.RADIANS_PER_DEGREE),s=y(e.height,0),a=y(e.extrudedHeight,s);this._center=h.clone(t),this._semiMajorAxis=i,this._semiMinorAxis=o,this._ellipsoid=re.clone(n),this._rotation=y(e.rotation,0),this._height=Math.max(a,s),this._granularity=r,this._extrudedHeight=Math.min(a,s),this._numberOfVerticalLines=Math.max(y(e.numberOfVerticalLines,16),0),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipseOutlineGeometry"}TA.packedLength=h.packedLength+re.packedLength+8;TA.pack=function(e,t,n){return n=y(n,0),h.pack(e._center,t,n),n+=h.packedLength,re.pack(e._ellipsoid,t,n),n+=re.packedLength,t[n++]=e._semiMajorAxis,t[n++]=e._semiMinorAxis,t[n++]=e._rotation,t[n++]=e._height,t[n++]=e._granularity,t[n++]=e._extrudedHeight,t[n++]=e._numberOfVerticalLines,t[n]=y(e._offsetAttribute,-1),t};var sJ=new h,aJ=new re,Ym={center:sJ,ellipsoid:aJ,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};TA.unpack=function(e,t,n){t=y(t,0);let i=h.unpack(e,t,sJ);t+=h.packedLength;let o=re.unpack(e,t,aJ);t+=re.packedLength;let r=e[t++],s=e[t++],a=e[t++],c=e[t++],u=e[t++],f=e[t++],d=e[t++],p=e[t];return l(n)?(n._center=h.clone(i,n._center),n._ellipsoid=re.clone(o,n._ellipsoid),n._semiMajorAxis=r,n._semiMinorAxis=s,n._rotation=a,n._height=c,n._granularity=u,n._extrudedHeight=f,n._numberOfVerticalLines=d,n._offsetAttribute=p===-1?void 0:p,n):(Ym.height=c,Ym.extrudedHeight=f,Ym.granularity=u,Ym.rotation=a,Ym.semiMajorAxis=r,Ym.semiMinorAxis=s,Ym.numberOfVerticalLines=d,Ym.offsetAttribute=p===-1?void 0:p,new TA(Ym))};TA.createGeometry=function(e){if(e._semiMajorAxis<=0||e._semiMinorAxis<=0)return;let t=e._height,n=e._extrudedHeight,i=!R.equalsEpsilon(t,n,0,R.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);let o={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:t,granularity:e._granularity,numberOfVerticalLines:e._numberOfVerticalLines},r;if(i)o.extrudedHeight=n,o.offsetAttribute=e._offsetAttribute,r=SDe(o);else if(r=EDe(o),l(e._offsetAttribute)){let s=r.attributes.position.values.length,a=e._offsetAttribute===tn.NONE?0:1,c=new Uint8Array(s/3).fill(a);r.attributes.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:c})}return new ct({attributes:r.attributes,indices:r.indices,primitiveType:Le.LINES,boundingSphere:r.boundingSphere,offsetAttribute:e._offsetAttribute})};var Fu=TA;function bA(e){e=y(e,y.EMPTY_OBJECT);let t=e.radius,n={center:e.center,semiMajorAxis:t,semiMinorAxis:t,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,numberOfVerticalLines:e.numberOfVerticalLines};this._ellipseGeometry=new Fu(n),this._workerName="createCircleOutlineGeometry"}bA.packedLength=Fu.packedLength;bA.pack=function(e,t,n){return Fu.pack(e._ellipseGeometry,t,n)};var wDe=new Fu({center:new h,semiMajorAxis:1,semiMinorAxis:1}),Ul={center:new h,radius:void 0,ellipsoid:re.clone(re.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,numberOfVerticalLines:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0};bA.unpack=function(e,t,n){let i=Fu.unpack(e,t,wDe);return Ul.center=h.clone(i._center,Ul.center),Ul.ellipsoid=re.clone(i._ellipsoid,Ul.ellipsoid),Ul.height=i._height,Ul.extrudedHeight=i._extrudedHeight,Ul.granularity=i._granularity,Ul.numberOfVerticalLines=i._numberOfVerticalLines,l(n)?(Ul.semiMajorAxis=i._semiMajorAxis,Ul.semiMinorAxis=i._semiMinorAxis,n._ellipseGeometry=new Fu(Ul),n):(Ul.radius=i._semiMajorAxis,new bA(Ul))};bA.createGeometry=function(e){return Fu.createGeometry(e._ellipseGeometry)};var cJ=bA;var vDe={UNBOUNDED:0,CLAMPED:1,LOOP_STOP:2},zr=Object.freeze(vDe);var DDe={TICK_DEPENDENT:0,SYSTEM_CLOCK_MULTIPLIER:1,SYSTEM_CLOCK:2},yo=Object.freeze(DDe);var o5;typeof performance<"u"&&typeof performance.now=="function"&&isFinite(performance.now())?o5=function(){return performance.now()}:o5=function(){return Date.now()};var Pi=o5;function r5(e){e=y(e,y.EMPTY_OBJECT);let t=e.currentTime,n=e.startTime,i=e.stopTime;l(t)?t=ee.clone(t):l(n)?t=ee.clone(n):l(i)?t=ee.addDays(i,-1,new ee):t=ee.now(),l(n)?n=ee.clone(n):n=ee.clone(t),l(i)?i=ee.clone(i):i=ee.addDays(n,1,new ee),this.startTime=n,this.stopTime=i,this.clockRange=y(e.clockRange,zr.UNBOUNDED),this.canAnimate=y(e.canAnimate,!0),this.onTick=new _e,this.onStop=new _e,this._currentTime=void 0,this._multiplier=void 0,this._clockStep=void 0,this._shouldAnimate=void 0,this._lastSystemTime=Pi(),this.currentTime=t,this.multiplier=y(e.multiplier,1),this.shouldAnimate=y(e.shouldAnimate,!1),this.clockStep=y(e.clockStep,yo.SYSTEM_CLOCK_MULTIPLIER)}Object.defineProperties(r5.prototype,{currentTime:{get:function(){return this._currentTime},set:function(e){ee.equals(this._currentTime,e)||(this._clockStep===yo.SYSTEM_CLOCK&&(this._clockStep=yo.SYSTEM_CLOCK_MULTIPLIER),this._currentTime=e)}},multiplier:{get:function(){return this._multiplier},set:function(e){this._multiplier!==e&&(this._clockStep===yo.SYSTEM_CLOCK&&(this._clockStep=yo.SYSTEM_CLOCK_MULTIPLIER),this._multiplier=e)}},clockStep:{get:function(){return this._clockStep},set:function(e){e===yo.SYSTEM_CLOCK&&(this._multiplier=1,this._shouldAnimate=!0,this._currentTime=ee.now()),this._clockStep=e}},shouldAnimate:{get:function(){return this._shouldAnimate},set:function(e){this._shouldAnimate!==e&&(this._clockStep===yo.SYSTEM_CLOCK&&(this._clockStep=yo.SYSTEM_CLOCK_MULTIPLIER),this._shouldAnimate=e)}}});r5.prototype.tick=function(){let e=Pi(),t=ee.clone(this._currentTime);if(this.canAnimate&&this._shouldAnimate){let n=this._clockStep;if(n===yo.SYSTEM_CLOCK)t=ee.now(t);else{let i=this._multiplier;if(n===yo.TICK_DEPENDENT)t=ee.addSeconds(t,i,t);else{let a=e-this._lastSystemTime;t=ee.addSeconds(t,i*(a/1e3),t)}let o=this.clockRange,r=this.startTime,s=this.stopTime;if(o===zr.CLAMPED)ee.lessThan(t,r)?t=ee.clone(r,t):ee.greaterThan(t,s)&&(t=ee.clone(s,t),this.onStop.raiseEvent(this));else if(o===zr.LOOP_STOP)for(ee.lessThan(t,r)&&(t=ee.clone(r,t));ee.greaterThan(t,s);)t=ee.addSeconds(r,ee.secondsDifference(t,s),t),this.onStop.raiseEvent(this)}}return this._currentTime=t,this._lastSystemTime=e,this.onTick.raiseEvent(this),t};var Eh=r5;function s5(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n*6<1?e+(t-e)*6*n:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function ne(e,t,n,i){this.red=y(e,1),this.green=y(t,1),this.blue=y(n,1),this.alpha=y(i,1)}ne.fromCartesian4=function(e,t){return l(t)?(t.red=e.x,t.green=e.y,t.blue=e.z,t.alpha=e.w,t):new ne(e.x,e.y,e.z,e.w)};ne.fromBytes=function(e,t,n,i,o){return e=ne.byteToFloat(y(e,255)),t=ne.byteToFloat(y(t,255)),n=ne.byteToFloat(y(n,255)),i=ne.byteToFloat(y(i,255)),l(o)?(o.red=e,o.green=t,o.blue=n,o.alpha=i,o):new ne(e,t,n,i)};ne.fromAlpha=function(e,t,n){return l(n)?(n.red=e.red,n.green=e.green,n.blue=e.blue,n.alpha=t,n):new ne(e.red,e.green,e.blue,t)};var a5,c5,Xm;Et.supportsTypedArrays()&&(a5=new ArrayBuffer(4),c5=new Uint32Array(a5),Xm=new Uint8Array(a5));ne.fromRgba=function(e,t){return c5[0]=e,ne.fromBytes(Xm[0],Xm[1],Xm[2],Xm[3],t)};ne.fromHsl=function(e,t,n,i,o){e=y(e,0)%1,t=y(t,0),n=y(n,0),i=y(i,1);let r=n,s=n,a=n;if(t!==0){let c;n<.5?c=n*(1+t):c=n+t-n*t;let u=2*n-c;r=s5(u,c,e+1/3),s=s5(u,c,e),a=s5(u,c,e-1/3)}return l(o)?(o.red=r,o.green=s,o.blue=a,o.alpha=i,o):new ne(r,s,a,i)};ne.fromRandom=function(e,t){e=y(e,y.EMPTY_OBJECT);let n=e.red;if(!l(n)){let s=y(e.minimumRed,0),a=y(e.maximumRed,1);n=s+R.nextRandomNumber()*(a-s)}let i=e.green;if(!l(i)){let s=y(e.minimumGreen,0),a=y(e.maximumGreen,1);i=s+R.nextRandomNumber()*(a-s)}let o=e.blue;if(!l(o)){let s=y(e.minimumBlue,0),a=y(e.maximumBlue,1);o=s+R.nextRandomNumber()*(a-s)}let r=e.alpha;if(!l(r)){let s=y(e.minimumAlpha,0),a=y(e.maximumAlpha,1);r=s+R.nextRandomNumber()*(a-s)}return l(t)?(t.red=n,t.green=i,t.blue=o,t.alpha=r,t):new ne(n,i,o,r)};var PDe=/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i,IDe=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i,ODe=/^rgba?\(\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)(?:\s*,\s*([0-9.]+))?\s*\)$/i,RDe=/^hsla?\(\s*([0-9.]+)\s*,\s*([0-9.]+%)\s*,\s*([0-9.]+%)(?:\s*,\s*([0-9.]+))?\s*\)$/i;ne.fromCssColorString=function(e,t){l(t)||(t=new ne),e=e.replace(/\s/g,"");let n=ne[e.toUpperCase()];if(l(n))return ne.clone(n,t),t;let i=PDe.exec(e);return i!==null?(t.red=parseInt(i[1],16)/15,t.green=parseInt(i[2],16)/15,t.blue=parseInt(i[3],16)/15,t.alpha=parseInt(y(i[4],"f"),16)/15,t):(i=IDe.exec(e),i!==null?(t.red=parseInt(i[1],16)/255,t.green=parseInt(i[2],16)/255,t.blue=parseInt(i[3],16)/255,t.alpha=parseInt(y(i[4],"ff"),16)/255,t):(i=ODe.exec(e),i!==null?(t.red=parseFloat(i[1])/(i[1].substr(-1)==="%"?100:255),t.green=parseFloat(i[2])/(i[2].substr(-1)==="%"?100:255),t.blue=parseFloat(i[3])/(i[3].substr(-1)==="%"?100:255),t.alpha=parseFloat(y(i[4],"1.0")),t):(i=RDe.exec(e),i!==null?ne.fromHsl(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,parseFloat(y(i[4],"1.0")),t):(t=void 0,t))))};ne.packedLength=4;ne.pack=function(e,t,n){return n=y(n,0),t[n++]=e.red,t[n++]=e.green,t[n++]=e.blue,t[n]=e.alpha,t};ne.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new ne),n.red=e[t++],n.green=e[t++],n.blue=e[t++],n.alpha=e[t],n};ne.byteToFloat=function(e){return e/255};ne.floatToByte=function(e){return e===1?255:e*256|0};ne.clone=function(e,t){if(!!l(e))return l(t)?(t.red=e.red,t.green=e.green,t.blue=e.blue,t.alpha=e.alpha,t):new ne(e.red,e.green,e.blue,e.alpha)};ne.equals=function(e,t){return e===t||l(e)&&l(t)&&e.red===t.red&&e.green===t.green&&e.blue===t.blue&&e.alpha===t.alpha};ne.equalsArray=function(e,t,n){return e.red===t[n]&&e.green===t[n+1]&&e.blue===t[n+2]&&e.alpha===t[n+3]};ne.prototype.clone=function(e){return ne.clone(this,e)};ne.prototype.equals=function(e){return ne.equals(this,e)};ne.prototype.equalsEpsilon=function(e,t){return this===e||l(e)&&Math.abs(this.red-e.red)<=t&&Math.abs(this.green-e.green)<=t&&Math.abs(this.blue-e.blue)<=t&&Math.abs(this.alpha-e.alpha)<=t};ne.prototype.toString=function(){return`(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`};ne.prototype.toCssColorString=function(){let e=ne.floatToByte(this.red),t=ne.floatToByte(this.green),n=ne.floatToByte(this.blue);return this.alpha===1?`rgb(${e},${t},${n})`:`rgba(${e},${t},${n},${this.alpha})`};ne.prototype.toCssHexString=function(){let e=ne.floatToByte(this.red).toString(16);e.length<2&&(e=`0${e}`);let t=ne.floatToByte(this.green).toString(16);t.length<2&&(t=`0${t}`);let n=ne.floatToByte(this.blue).toString(16);if(n.length<2&&(n=`0${n}`),this.alpha<1){let i=ne.floatToByte(this.alpha).toString(16);return i.length<2&&(i=`0${i}`),`#${e}${t}${n}${i}`}return`#${e}${t}${n}`};ne.prototype.toBytes=function(e){let t=ne.floatToByte(this.red),n=ne.floatToByte(this.green),i=ne.floatToByte(this.blue),o=ne.floatToByte(this.alpha);return l(e)?(e[0]=t,e[1]=n,e[2]=i,e[3]=o,e):[t,n,i,o]};ne.prototype.toRgba=function(){return Xm[0]=ne.floatToByte(this.red),Xm[1]=ne.floatToByte(this.green),Xm[2]=ne.floatToByte(this.blue),Xm[3]=ne.floatToByte(this.alpha),c5[0]};ne.prototype.brighten=function(e,t){return e=1-e,t.red=1-(1-this.red)*e,t.green=1-(1-this.green)*e,t.blue=1-(1-this.blue)*e,t.alpha=this.alpha,t};ne.prototype.darken=function(e,t){return e=1-e,t.red=this.red*e,t.green=this.green*e,t.blue=this.blue*e,t.alpha=this.alpha,t};ne.prototype.withAlpha=function(e,t){return ne.fromAlpha(this,e,t)};ne.add=function(e,t,n){return n.red=e.red+t.red,n.green=e.green+t.green,n.blue=e.blue+t.blue,n.alpha=e.alpha+t.alpha,n};ne.subtract=function(e,t,n){return n.red=e.red-t.red,n.green=e.green-t.green,n.blue=e.blue-t.blue,n.alpha=e.alpha-t.alpha,n};ne.multiply=function(e,t,n){return n.red=e.red*t.red,n.green=e.green*t.green,n.blue=e.blue*t.blue,n.alpha=e.alpha*t.alpha,n};ne.divide=function(e,t,n){return n.red=e.red/t.red,n.green=e.green/t.green,n.blue=e.blue/t.blue,n.alpha=e.alpha/t.alpha,n};ne.mod=function(e,t,n){return n.red=e.red%t.red,n.green=e.green%t.green,n.blue=e.blue%t.blue,n.alpha=e.alpha%t.alpha,n};ne.lerp=function(e,t,n,i){return i.red=R.lerp(e.red,t.red,n),i.green=R.lerp(e.green,t.green,n),i.blue=R.lerp(e.blue,t.blue,n),i.alpha=R.lerp(e.alpha,t.alpha,n),i};ne.multiplyByScalar=function(e,t,n){return n.red=e.red*t,n.green=e.green*t,n.blue=e.blue*t,n.alpha=e.alpha*t,n};ne.divideByScalar=function(e,t,n){return n.red=e.red/t,n.green=e.green/t,n.blue=e.blue/t,n.alpha=e.alpha/t,n};ne.ALICEBLUE=Object.freeze(ne.fromCssColorString("#F0F8FF"));ne.ANTIQUEWHITE=Object.freeze(ne.fromCssColorString("#FAEBD7"));ne.AQUA=Object.freeze(ne.fromCssColorString("#00FFFF"));ne.AQUAMARINE=Object.freeze(ne.fromCssColorString("#7FFFD4"));ne.AZURE=Object.freeze(ne.fromCssColorString("#F0FFFF"));ne.BEIGE=Object.freeze(ne.fromCssColorString("#F5F5DC"));ne.BISQUE=Object.freeze(ne.fromCssColorString("#FFE4C4"));ne.BLACK=Object.freeze(ne.fromCssColorString("#000000"));ne.BLANCHEDALMOND=Object.freeze(ne.fromCssColorString("#FFEBCD"));ne.BLUE=Object.freeze(ne.fromCssColorString("#0000FF"));ne.BLUEVIOLET=Object.freeze(ne.fromCssColorString("#8A2BE2"));ne.BROWN=Object.freeze(ne.fromCssColorString("#A52A2A"));ne.BURLYWOOD=Object.freeze(ne.fromCssColorString("#DEB887"));ne.CADETBLUE=Object.freeze(ne.fromCssColorString("#5F9EA0"));ne.CHARTREUSE=Object.freeze(ne.fromCssColorString("#7FFF00"));ne.CHOCOLATE=Object.freeze(ne.fromCssColorString("#D2691E"));ne.CORAL=Object.freeze(ne.fromCssColorString("#FF7F50"));ne.CORNFLOWERBLUE=Object.freeze(ne.fromCssColorString("#6495ED"));ne.CORNSILK=Object.freeze(ne.fromCssColorString("#FFF8DC"));ne.CRIMSON=Object.freeze(ne.fromCssColorString("#DC143C"));ne.CYAN=Object.freeze(ne.fromCssColorString("#00FFFF"));ne.DARKBLUE=Object.freeze(ne.fromCssColorString("#00008B"));ne.DARKCYAN=Object.freeze(ne.fromCssColorString("#008B8B"));ne.DARKGOLDENROD=Object.freeze(ne.fromCssColorString("#B8860B"));ne.DARKGRAY=Object.freeze(ne.fromCssColorString("#A9A9A9"));ne.DARKGREEN=Object.freeze(ne.fromCssColorString("#006400"));ne.DARKGREY=ne.DARKGRAY;ne.DARKKHAKI=Object.freeze(ne.fromCssColorString("#BDB76B"));ne.DARKMAGENTA=Object.freeze(ne.fromCssColorString("#8B008B"));ne.DARKOLIVEGREEN=Object.freeze(ne.fromCssColorString("#556B2F"));ne.DARKORANGE=Object.freeze(ne.fromCssColorString("#FF8C00"));ne.DARKORCHID=Object.freeze(ne.fromCssColorString("#9932CC"));ne.DARKRED=Object.freeze(ne.fromCssColorString("#8B0000"));ne.DARKSALMON=Object.freeze(ne.fromCssColorString("#E9967A"));ne.DARKSEAGREEN=Object.freeze(ne.fromCssColorString("#8FBC8F"));ne.DARKSLATEBLUE=Object.freeze(ne.fromCssColorString("#483D8B"));ne.DARKSLATEGRAY=Object.freeze(ne.fromCssColorString("#2F4F4F"));ne.DARKSLATEGREY=ne.DARKSLATEGRAY;ne.DARKTURQUOISE=Object.freeze(ne.fromCssColorString("#00CED1"));ne.DARKVIOLET=Object.freeze(ne.fromCssColorString("#9400D3"));ne.DEEPPINK=Object.freeze(ne.fromCssColorString("#FF1493"));ne.DEEPSKYBLUE=Object.freeze(ne.fromCssColorString("#00BFFF"));ne.DIMGRAY=Object.freeze(ne.fromCssColorString("#696969"));ne.DIMGREY=ne.DIMGRAY;ne.DODGERBLUE=Object.freeze(ne.fromCssColorString("#1E90FF"));ne.FIREBRICK=Object.freeze(ne.fromCssColorString("#B22222"));ne.FLORALWHITE=Object.freeze(ne.fromCssColorString("#FFFAF0"));ne.FORESTGREEN=Object.freeze(ne.fromCssColorString("#228B22"));ne.FUCHSIA=Object.freeze(ne.fromCssColorString("#FF00FF"));ne.GAINSBORO=Object.freeze(ne.fromCssColorString("#DCDCDC"));ne.GHOSTWHITE=Object.freeze(ne.fromCssColorString("#F8F8FF"));ne.GOLD=Object.freeze(ne.fromCssColorString("#FFD700"));ne.GOLDENROD=Object.freeze(ne.fromCssColorString("#DAA520"));ne.GRAY=Object.freeze(ne.fromCssColorString("#808080"));ne.GREEN=Object.freeze(ne.fromCssColorString("#008000"));ne.GREENYELLOW=Object.freeze(ne.fromCssColorString("#ADFF2F"));ne.GREY=ne.GRAY;ne.HONEYDEW=Object.freeze(ne.fromCssColorString("#F0FFF0"));ne.HOTPINK=Object.freeze(ne.fromCssColorString("#FF69B4"));ne.INDIANRED=Object.freeze(ne.fromCssColorString("#CD5C5C"));ne.INDIGO=Object.freeze(ne.fromCssColorString("#4B0082"));ne.IVORY=Object.freeze(ne.fromCssColorString("#FFFFF0"));ne.KHAKI=Object.freeze(ne.fromCssColorString("#F0E68C"));ne.LAVENDER=Object.freeze(ne.fromCssColorString("#E6E6FA"));ne.LAVENDAR_BLUSH=Object.freeze(ne.fromCssColorString("#FFF0F5"));ne.LAWNGREEN=Object.freeze(ne.fromCssColorString("#7CFC00"));ne.LEMONCHIFFON=Object.freeze(ne.fromCssColorString("#FFFACD"));ne.LIGHTBLUE=Object.freeze(ne.fromCssColorString("#ADD8E6"));ne.LIGHTCORAL=Object.freeze(ne.fromCssColorString("#F08080"));ne.LIGHTCYAN=Object.freeze(ne.fromCssColorString("#E0FFFF"));ne.LIGHTGOLDENRODYELLOW=Object.freeze(ne.fromCssColorString("#FAFAD2"));ne.LIGHTGRAY=Object.freeze(ne.fromCssColorString("#D3D3D3"));ne.LIGHTGREEN=Object.freeze(ne.fromCssColorString("#90EE90"));ne.LIGHTGREY=ne.LIGHTGRAY;ne.LIGHTPINK=Object.freeze(ne.fromCssColorString("#FFB6C1"));ne.LIGHTSEAGREEN=Object.freeze(ne.fromCssColorString("#20B2AA"));ne.LIGHTSKYBLUE=Object.freeze(ne.fromCssColorString("#87CEFA"));ne.LIGHTSLATEGRAY=Object.freeze(ne.fromCssColorString("#778899"));ne.LIGHTSLATEGREY=ne.LIGHTSLATEGRAY;ne.LIGHTSTEELBLUE=Object.freeze(ne.fromCssColorString("#B0C4DE"));ne.LIGHTYELLOW=Object.freeze(ne.fromCssColorString("#FFFFE0"));ne.LIME=Object.freeze(ne.fromCssColorString("#00FF00"));ne.LIMEGREEN=Object.freeze(ne.fromCssColorString("#32CD32"));ne.LINEN=Object.freeze(ne.fromCssColorString("#FAF0E6"));ne.MAGENTA=Object.freeze(ne.fromCssColorString("#FF00FF"));ne.MAROON=Object.freeze(ne.fromCssColorString("#800000"));ne.MEDIUMAQUAMARINE=Object.freeze(ne.fromCssColorString("#66CDAA"));ne.MEDIUMBLUE=Object.freeze(ne.fromCssColorString("#0000CD"));ne.MEDIUMORCHID=Object.freeze(ne.fromCssColorString("#BA55D3"));ne.MEDIUMPURPLE=Object.freeze(ne.fromCssColorString("#9370DB"));ne.MEDIUMSEAGREEN=Object.freeze(ne.fromCssColorString("#3CB371"));ne.MEDIUMSLATEBLUE=Object.freeze(ne.fromCssColorString("#7B68EE"));ne.MEDIUMSPRINGGREEN=Object.freeze(ne.fromCssColorString("#00FA9A"));ne.MEDIUMTURQUOISE=Object.freeze(ne.fromCssColorString("#48D1CC"));ne.MEDIUMVIOLETRED=Object.freeze(ne.fromCssColorString("#C71585"));ne.MIDNIGHTBLUE=Object.freeze(ne.fromCssColorString("#191970"));ne.MINTCREAM=Object.freeze(ne.fromCssColorString("#F5FFFA"));ne.MISTYROSE=Object.freeze(ne.fromCssColorString("#FFE4E1"));ne.MOCCASIN=Object.freeze(ne.fromCssColorString("#FFE4B5"));ne.NAVAJOWHITE=Object.freeze(ne.fromCssColorString("#FFDEAD"));ne.NAVY=Object.freeze(ne.fromCssColorString("#000080"));ne.OLDLACE=Object.freeze(ne.fromCssColorString("#FDF5E6"));ne.OLIVE=Object.freeze(ne.fromCssColorString("#808000"));ne.OLIVEDRAB=Object.freeze(ne.fromCssColorString("#6B8E23"));ne.ORANGE=Object.freeze(ne.fromCssColorString("#FFA500"));ne.ORANGERED=Object.freeze(ne.fromCssColorString("#FF4500"));ne.ORCHID=Object.freeze(ne.fromCssColorString("#DA70D6"));ne.PALEGOLDENROD=Object.freeze(ne.fromCssColorString("#EEE8AA"));ne.PALEGREEN=Object.freeze(ne.fromCssColorString("#98FB98"));ne.PALETURQUOISE=Object.freeze(ne.fromCssColorString("#AFEEEE"));ne.PALEVIOLETRED=Object.freeze(ne.fromCssColorString("#DB7093"));ne.PAPAYAWHIP=Object.freeze(ne.fromCssColorString("#FFEFD5"));ne.PEACHPUFF=Object.freeze(ne.fromCssColorString("#FFDAB9"));ne.PERU=Object.freeze(ne.fromCssColorString("#CD853F"));ne.PINK=Object.freeze(ne.fromCssColorString("#FFC0CB"));ne.PLUM=Object.freeze(ne.fromCssColorString("#DDA0DD"));ne.POWDERBLUE=Object.freeze(ne.fromCssColorString("#B0E0E6"));ne.PURPLE=Object.freeze(ne.fromCssColorString("#800080"));ne.RED=Object.freeze(ne.fromCssColorString("#FF0000"));ne.ROSYBROWN=Object.freeze(ne.fromCssColorString("#BC8F8F"));ne.ROYALBLUE=Object.freeze(ne.fromCssColorString("#4169E1"));ne.SADDLEBROWN=Object.freeze(ne.fromCssColorString("#8B4513"));ne.SALMON=Object.freeze(ne.fromCssColorString("#FA8072"));ne.SANDYBROWN=Object.freeze(ne.fromCssColorString("#F4A460"));ne.SEAGREEN=Object.freeze(ne.fromCssColorString("#2E8B57"));ne.SEASHELL=Object.freeze(ne.fromCssColorString("#FFF5EE"));ne.SIENNA=Object.freeze(ne.fromCssColorString("#A0522D"));ne.SILVER=Object.freeze(ne.fromCssColorString("#C0C0C0"));ne.SKYBLUE=Object.freeze(ne.fromCssColorString("#87CEEB"));ne.SLATEBLUE=Object.freeze(ne.fromCssColorString("#6A5ACD"));ne.SLATEGRAY=Object.freeze(ne.fromCssColorString("#708090"));ne.SLATEGREY=ne.SLATEGRAY;ne.SNOW=Object.freeze(ne.fromCssColorString("#FFFAFA"));ne.SPRINGGREEN=Object.freeze(ne.fromCssColorString("#00FF7F"));ne.STEELBLUE=Object.freeze(ne.fromCssColorString("#4682B4"));ne.TAN=Object.freeze(ne.fromCssColorString("#D2B48C"));ne.TEAL=Object.freeze(ne.fromCssColorString("#008080"));ne.THISTLE=Object.freeze(ne.fromCssColorString("#D8BFD8"));ne.TOMATO=Object.freeze(ne.fromCssColorString("#FF6347"));ne.TURQUOISE=Object.freeze(ne.fromCssColorString("#40E0D0"));ne.VIOLET=Object.freeze(ne.fromCssColorString("#EE82EE"));ne.WHEAT=Object.freeze(ne.fromCssColorString("#F5DEB3"));ne.WHITE=Object.freeze(ne.fromCssColorString("#FFFFFF"));ne.WHITESMOKE=Object.freeze(ne.fromCssColorString("#F5F5F5"));ne.YELLOW=Object.freeze(ne.fromCssColorString("#FFFF00"));ne.YELLOWGREEN=Object.freeze(ne.fromCssColorString("#9ACD32"));ne.TRANSPARENT=Object.freeze(new ne(0,0,0,0));var z=ne;function EA(e,t,n,i){e=y(e,1),t=y(t,1),n=y(n,1),i=y(i,1),this.value=new Uint8Array([z.floatToByte(e),z.floatToByte(t),z.floatToByte(n),z.floatToByte(i)])}Object.defineProperties(EA.prototype,{componentDatatype:{get:function(){return K.UNSIGNED_BYTE}},componentsPerAttribute:{get:function(){return 4}},normalize:{get:function(){return!0}}});EA.fromColor=function(e){return new EA(e.red,e.green,e.blue,e.alpha)};EA.toValue=function(e,t){return l(t)?e.toBytes(t):new Uint8Array(e.toBytes())};EA.equals=function(e,t){return e===t||l(e)&&l(t)&&e.value[0]===t.value[0]&&e.value[1]===t.value[1]&&e.value[2]===t.value[2]&&e.value[3]===t.value[3]};var It=EA;function SA(e,t,n,i,o){this._format=e,this._datatype=t,this._width=n,this._height=i,this._buffer=o}Object.defineProperties(SA.prototype,{internalFormat:{get:function(){return this._format}},pixelDatatype:{get:function(){return this._datatype}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},bufferView:{get:function(){return this._buffer}}});SA.clone=function(e){if(!!l(e))return new SA(e._format,e._datatype,e._width,e._height,e._buffer)};SA.prototype.clone=function(){return SA.clone(this)};var DI=SA;function wA(e){this._value=e,this._valueType=zi.getPointType(e)}Object.defineProperties(wA.prototype,{value:{get:function(){return this._value}}});wA.prototype.findTimeInterval=function(e){};wA.prototype.wrapTime=function(e){return 0};wA.prototype.clampTime=function(e){return 0};wA.prototype.evaluate=function(e,t){let n=this._value,i=this._valueType;return i===Number?n:i.clone(n,t)};var vA=wA;var DS={},MDe=new h,lJ=new h,uJ=new h,fJ=new h,dJ=new gi;DS.validOutline=function(e){let n=gi.fromPoints(e,dJ).halfAxes,i=Q.getColumn(n,0,lJ),o=Q.getColumn(n,1,uJ),r=Q.getColumn(n,2,fJ),s=h.magnitude(i),a=h.magnitude(o),c=h.magnitude(r);return!(s===0&&(a===0||c===0)||a===0&&c===0)};DS.computeProjectTo2DArguments=function(e,t,n,i){let o=gi.fromPoints(e,dJ),r=o.halfAxes,s=Q.getColumn(r,0,lJ),a=Q.getColumn(r,1,uJ),c=Q.getColumn(r,2,fJ),u=h.magnitude(s),f=h.magnitude(a),d=h.magnitude(c),p=Math.min(u,f,d);if(u===0&&(f===0||d===0)||f===0&&d===0)return!1;let _,m;return(p===f||p===d)&&(_=s),p===u?_=a:p===d&&(m=a),(p===u||p===f)&&(m=c),h.normalize(_,n),h.normalize(m,i),h.clone(o.center,t),!0};function hJ(e,t,n,i,o){let r=h.subtract(e,t,MDe),s=h.dot(n,r),a=h.dot(i,r);return G.fromElements(s,a,o)}DS.createProjectPointsTo2DFunction=function(e,t,n){return function(i){let o=new Array(i.length);for(let r=0;r<i.length;r++)o[r]=hJ(i[r],e,t,n);return o}};DS.createProjectPointTo2DFunction=function(e,t,n){return function(i,o){return hJ(i,e,t,n,o)}};var B_=DS;function u5(e,t,n){if(e===0)return t*n;let i=e*e,o=i*i,r=o*i,s=r*i,a=s*i,c=a*i,u=n,f=Math.sin(2*u),d=Math.sin(4*u),p=Math.sin(6*u),_=Math.sin(8*u),m=Math.sin(10*u),x=Math.sin(12*u);return t*((1-i/4-3*o/64-5*r/256-175*s/16384-441*a/65536-4851*c/1048576)*u-(3*i/8+3*o/32+45*r/1024+105*s/4096+2205*a/131072+6237*c/524288)*f+(15*o/256+45*r/1024+525*s/16384+1575*a/65536+155925*c/8388608)*d-(35*r/3072+175*s/12288+3675*a/262144+13475*c/1048576)*p+(315*s/131072+2205*a/524288+43659*c/8388608)*_-(693*a/1310720+6237*c/5242880)*m+1001*c/8388608*x)}function BDe(e,t,n){let i=e/n;if(t===0)return i;let o=i*i,r=o*i,s=r*i,a=t,c=a*a,u=c*c,f=u*c,d=f*c,p=d*c,_=p*c,m=Math.sin(2*i),x=Math.cos(2*i),C=Math.sin(4*i),A=Math.cos(4*i),T=Math.sin(6*i),b=Math.cos(6*i),S=Math.sin(8*i),w=Math.cos(8*i),D=Math.sin(10*i),O=Math.cos(10*i),I=Math.sin(12*i);return i+i*c/4+7*i*u/64+15*i*f/256+579*i*d/16384+1515*i*p/65536+16837*i*_/1048576+(3*i*u/16+45*i*f/256-i*(32*o-561)*d/4096-i*(232*o-1677)*p/16384+i*(399985-90560*o+512*s)*_/5242880)*x+(21*i*f/256+483*i*d/4096-i*(224*o-1969)*p/16384-i*(33152*o-112599)*_/1048576)*A+(151*i*d/4096+4681*i*p/65536+1479*i*_/16384-453*r*_/32768)*b+(1097*i*p/65536+42783*i*_/1048576)*w+8011*i*_/1048576*O+(3*c/8+3*u/16+213*f/2048-3*o*f/64+255*d/4096-33*o*d/512+20861*p/524288-33*o*p/512+s*p/1024+28273*_/1048576-471*o*_/8192+9*s*_/4096)*m+(21*u/256+21*f/256+533*d/8192-21*o*d/512+197*p/4096-315*o*p/4096+584039*_/16777216-12517*o*_/131072+7*s*_/2048)*C+(151*f/6144+151*d/4096+5019*p/131072-453*o*p/16384+26965*_/786432-8607*o*_/131072)*T+(1097*d/131072+1097*p/65536+225797*_/10485760-1097*o*_/65536)*S+(8011*p/2621440+8011*_/1048576)*D+293393*_/251658240*I}function DA(e,t){if(e===0)return Math.log(Math.tan(.5*(R.PI_OVER_TWO+t)));let n=e*Math.sin(t);return Math.log(Math.tan(.5*(R.PI_OVER_TWO+t)))-e/2*Math.log((1+n)/(1-n))}function LDe(e,t,n,i,o){let r=DA(e._ellipticity,n),s=DA(e._ellipticity,o);return Math.atan2(R.negativePiToPi(i-t),s-r)}function NDe(e,t,n,i,o,r,s){let a=e._heading,c=r-i,u=0;if(R.equalsEpsilon(Math.abs(a),R.PI_OVER_TWO,R.EPSILON8))if(t===n)u=t*Math.cos(o)*R.negativePiToPi(c);else{let f=Math.sin(o);u=t*Math.cos(o)*R.negativePiToPi(c)/Math.sqrt(1-e._ellipticitySquared*f*f)}else{let f=u5(e._ellipticity,t,o);u=(u5(e._ellipticity,t,s)-f)/Math.cos(a)}return Math.abs(u)}var FDe=new h,l5=new h;function mJ(e,t,n,i){let o=h.normalize(i.cartographicToCartesian(t,l5),FDe),r=h.normalize(i.cartographicToCartesian(n,l5),l5),s=i.maximumRadius,a=i.minimumRadius,c=s*s,u=a*a;e._ellipticitySquared=(c-u)/c,e._ellipticity=Math.sqrt(e._ellipticitySquared),e._start=me.clone(t,e._start),e._start.height=0,e._end=me.clone(n,e._end),e._end.height=0,e._heading=LDe(e,t.longitude,t.latitude,n.longitude,n.latitude),e._distance=NDe(e,i.maximumRadius,i.minimumRadius,t.longitude,t.latitude,n.longitude,n.latitude)}function pJ(e,t,n,i,o,r){if(n===0)return me.clone(e,r);let s=o*o,a,c,u;if(Math.abs(R.PI_OVER_TWO-Math.abs(t))>R.EPSILON8){let f=u5(o,i,e.latitude),d=n*Math.cos(t),p=f+d;c=BDe(p,o,i);let _=DA(o,e.latitude),m=DA(o,c);u=Math.tan(t)*(m-_),a=R.negativePiToPi(e.longitude+u)}else{c=e.latitude;let f;if(o===0)f=i*Math.cos(e.latitude);else{let d=Math.sin(e.latitude);f=i*Math.cos(e.latitude)/Math.sqrt(1-s*d*d)}u=n/f,t>0?a=R.negativePiToPi(e.longitude+u):a=R.negativePiToPi(e.longitude-u)}return l(r)?(r.longitude=a,r.latitude=c,r.height=0,r):new me(a,c,0)}function Km(e,t,n){let i=y(n,re.WGS84);this._ellipsoid=i,this._start=new me,this._end=new me,this._heading=void 0,this._distance=void 0,this._ellipticity=void 0,this._ellipticitySquared=void 0,l(e)&&l(t)&&mJ(this,e,t,i)}Object.defineProperties(Km.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},heading:{get:function(){return this._heading}}});Km.fromStartHeadingDistance=function(e,t,n,i,o){let r=y(i,re.WGS84),s=r.maximumRadius,a=r.minimumRadius,c=s*s,u=a*a,f=Math.sqrt((c-u)/c);t=R.negativePiToPi(t);let d=pJ(e,t,n,r.maximumRadius,f);return!l(o)||l(i)&&!i.equals(o.ellipsoid)?new Km(e,d,r):(o.setEndPoints(e,d),o)};Km.prototype.setEndPoints=function(e,t){mJ(this,e,t,this._ellipsoid)};Km.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(e*this._distance,t)};Km.prototype.interpolateUsingSurfaceDistance=function(e,t){return pJ(this._start,this._heading,e,this._ellipsoid.maximumRadius,this._ellipticity,t)};Km.prototype.findIntersectionWithLongitude=function(e,t){let n=this._ellipticity,i=this._heading,o=Math.abs(i),r=this._start;if(e=R.negativePiToPi(e),R.equalsEpsilon(Math.abs(e),Math.PI,R.EPSILON14)&&(e=R.sign(r.longitude)*Math.PI),l(t)||(t=new me),Math.abs(R.PI_OVER_TWO-o)<=R.EPSILON8)return t.longitude=e,t.latitude=r.latitude,t.height=0,t;if(R.equalsEpsilon(Math.abs(R.PI_OVER_TWO-o),R.PI_OVER_TWO,R.EPSILON8))return R.equalsEpsilon(e,r.longitude,R.EPSILON12)?void 0:(t.longitude=e,t.latitude=R.PI_OVER_TWO*R.sign(R.PI_OVER_TWO-i),t.height=0,t);let s=r.latitude,a=n*Math.sin(s),c=Math.tan(.5*(R.PI_OVER_TWO+s))*Math.exp((e-r.longitude)/Math.tan(i)),u=(1+a)/(1-a),f=r.latitude,d;do{d=f;let p=n*Math.sin(d),_=(1+p)/(1-p);f=2*Math.atan(c*Math.pow(_/u,n/2))-R.PI_OVER_TWO}while(!R.equalsEpsilon(f,d,R.EPSILON12));return t.longitude=e,t.latitude=f,t.height=0,t};Km.prototype.findIntersectionWithLatitude=function(e,t){let n=this._ellipticity,i=this._heading,o=this._start;if(R.equalsEpsilon(Math.abs(i),R.PI_OVER_TWO,R.EPSILON8))return;let r=DA(n,o.latitude),s=DA(n,e),a=Math.tan(i)*(s-r),c=R.negativePiToPi(o.longitude+a);return l(t)?(t.longitude=c,t.latitude=e,t.height=0,t):new me(c,e,0)};var za=Km;var RS=Zc(CJ());var MI={CLOCKWISE:Z.CW,COUNTER_CLOCKWISE:Z.CCW};MI.validate=function(e){return e===MI.CLOCKWISE||e===MI.COUNTER_CLOCKWISE};var fs=Object.freeze(MI);var QDe=new h,e1e=new h,L_={};L_.computeArea2D=function(e){let t=e.length,n=0;for(let i=t-1,o=0;o<t;i=o++){let r=e[i],s=e[o];n+=r.x*s.y-s.x*r.y}return n*.5};L_.computeWindingOrder2D=function(e){return L_.computeArea2D(e)>0?fs.COUNTER_CLOCKWISE:fs.CLOCKWISE};L_.triangulate=function(e,t){let n=G.packArray(e);return(0,RS.default)(n,t,2)};var EJ=new h,SJ=new h,wJ=new h,AJ=new h,TJ=new h,bJ=new h,$m=new h,vJ=new G,DJ=new G,PJ=new G,IA=new G;L_.computeSubdivision=function(e,t,n,i,o){o=y(o,R.RADIANS_PER_DEGREE);let r=l(i),s=n.slice(0),a,c=t.length,u=new Array(c*3),f=new Array(c*2),d=0,p=0;for(a=0;a<c;a++){let b=t[a];if(u[d++]=b.x,u[d++]=b.y,u[d++]=b.z,r){let S=i[a];f[p++]=S.x,f[p++]=S.y}}let _=[],m={},x=e.maximumRadius,C=R.chordLength(o,x),A=C*C;for(;s.length>0;){let b=s.pop(),S=s.pop(),w=s.pop(),D=h.fromArray(u,w*3,EJ),O=h.fromArray(u,S*3,SJ),I=h.fromArray(u,b*3,wJ),L,N,g;r&&(L=G.fromArray(f,w*2,vJ),N=G.fromArray(f,S*2,DJ),g=G.fromArray(f,b*2,PJ));let E=h.multiplyByScalar(h.normalize(D,AJ),x,AJ),v=h.multiplyByScalar(h.normalize(O,TJ),x,TJ),P=h.multiplyByScalar(h.normalize(I,bJ),x,bJ),M=h.magnitudeSquared(h.subtract(E,v,$m)),V=h.magnitudeSquared(h.subtract(v,P,$m)),U=h.magnitudeSquared(h.subtract(P,E,$m)),k=Math.max(M,V,U),H,F,Y;k>A?M===k?(H=`${Math.min(w,S)} ${Math.max(w,S)}`,a=m[H],l(a)||(F=h.add(D,O,$m),h.multiplyByScalar(F,.5,F),u.push(F.x,F.y,F.z),a=u.length/3-1,m[H]=a,r&&(Y=G.add(L,N,IA),G.multiplyByScalar(Y,.5,Y),f.push(Y.x,Y.y))),s.push(w,a,b),s.push(a,S,b)):V===k?(H=`${Math.min(S,b)} ${Math.max(S,b)}`,a=m[H],l(a)||(F=h.add(O,I,$m),h.multiplyByScalar(F,.5,F),u.push(F.x,F.y,F.z),a=u.length/3-1,m[H]=a,r&&(Y=G.add(N,g,IA),G.multiplyByScalar(Y,.5,Y),f.push(Y.x,Y.y))),s.push(S,a,w),s.push(a,b,w)):U===k&&(H=`${Math.min(b,w)} ${Math.max(b,w)}`,a=m[H],l(a)||(F=h.add(I,D,$m),h.multiplyByScalar(F,.5,F),u.push(F.x,F.y,F.z),a=u.length/3-1,m[H]=a,r&&(Y=G.add(g,L,IA),G.multiplyByScalar(Y,.5,Y),f.push(Y.x,Y.y))),s.push(b,a,S),s.push(a,w,S)):(_.push(w),_.push(S),_.push(b))}let T={attributes:{position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:u})},indices:_,primitiveType:Le.TRIANGLES};return r&&(T.attributes.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:f})),new ct(T)};var t1e=new me,n1e=new me,i1e=new me,p5=new me;L_.computeRhumbLineSubdivision=function(e,t,n,i,o){o=y(o,R.RADIANS_PER_DEGREE);let r=l(i),s=n.slice(0),a,c=t.length,u=new Array(c*3),f=new Array(c*2),d=0,p=0;for(a=0;a<c;a++){let w=t[a];if(u[d++]=w.x,u[d++]=w.y,u[d++]=w.z,r){let D=i[a];f[p++]=D.x,f[p++]=D.y}}let _=[],m={},x=e.maximumRadius,C=R.chordLength(o,x),A=new za(void 0,void 0,e),T=new za(void 0,void 0,e),b=new za(void 0,void 0,e);for(;s.length>0;){let w=s.pop(),D=s.pop(),O=s.pop(),I=h.fromArray(u,O*3,EJ),L=h.fromArray(u,D*3,SJ),N=h.fromArray(u,w*3,wJ),g,E,v;r&&(g=G.fromArray(f,O*2,vJ),E=G.fromArray(f,D*2,DJ),v=G.fromArray(f,w*2,PJ));let P=e.cartesianToCartographic(I,t1e),M=e.cartesianToCartographic(L,n1e),V=e.cartesianToCartographic(N,i1e);A.setEndPoints(P,M);let U=A.surfaceDistance;T.setEndPoints(M,V);let k=T.surfaceDistance;b.setEndPoints(V,P);let H=b.surfaceDistance,F=Math.max(U,k,H),Y,j,X,W,$;F>C?U===F?(Y=`${Math.min(O,D)} ${Math.max(O,D)}`,a=m[Y],l(a)||(j=A.interpolateUsingFraction(.5,p5),X=(P.height+M.height)*.5,W=h.fromRadians(j.longitude,j.latitude,X,e,$m),u.push(W.x,W.y,W.z),a=u.length/3-1,m[Y]=a,r&&($=G.add(g,E,IA),G.multiplyByScalar($,.5,$),f.push($.x,$.y))),s.push(O,a,w),s.push(a,D,w)):k===F?(Y=`${Math.min(D,w)} ${Math.max(D,w)}`,a=m[Y],l(a)||(j=T.interpolateUsingFraction(.5,p5),X=(M.height+V.height)*.5,W=h.fromRadians(j.longitude,j.latitude,X,e,$m),u.push(W.x,W.y,W.z),a=u.length/3-1,m[Y]=a,r&&($=G.add(E,v,IA),G.multiplyByScalar($,.5,$),f.push($.x,$.y))),s.push(D,a,O),s.push(a,w,O)):H===F&&(Y=`${Math.min(w,O)} ${Math.max(w,O)}`,a=m[Y],l(a)||(j=b.interpolateUsingFraction(.5,p5),X=(V.height+P.height)*.5,W=h.fromRadians(j.longitude,j.latitude,X,e,$m),u.push(W.x,W.y,W.z),a=u.length/3-1,m[Y]=a,r&&($=G.add(v,g,IA),G.multiplyByScalar($,.5,$),f.push($.x,$.y))),s.push(w,a,D),s.push(a,O,D)):(_.push(O),_.push(D),_.push(w))}let S={attributes:{position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:u})},indices:_,primitiveType:Le.TRIANGLES};return r&&(S.attributes.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:f})),new ct(S)};L_.scaleToGeodeticHeight=function(e,t,n,i){n=y(n,re.WGS84);let o=QDe,r=e1e;if(t=y(t,0),i=y(i,!0),l(e)){let s=e.length;for(let a=0;a<s;a+=3)h.fromArray(e,a,r),i&&(r=n.scaleToGeodeticSurface(r,r)),t!==0&&(o=n.geodeticSurfaceNormal(r,o),h.multiplyByScalar(o,t,o),h.add(r,o,r)),e[a]=r.x,e[a+1]=r.y,e[a+2]=r.z}return e};var ti=L_;function N_(){this._array=[],this._offset=0,this._length=0}Object.defineProperties(N_.prototype,{length:{get:function(){return this._length}}});N_.prototype.enqueue=function(e){this._array.push(e),this._length++};N_.prototype.dequeue=function(){if(this._length===0)return;let e=this._array,t=this._offset,n=e[t];return e[t]=void 0,t++,t>10&&t*2>e.length&&(this._array=e.slice(t),t=0),this._offset=t,this._length--,n};N_.prototype.peek=function(){if(this._length!==0)return this._array[this._offset]};N_.prototype.contains=function(e){return this._array.indexOf(e)!==-1};N_.prototype.clear=function(){this._array.length=this._offset=this._length=0};N_.prototype.sort=function(e){this._offset>0&&(this._array=this._array.slice(this._offset),this._offset=0),this._array.sort(e)};var sl=N_;var cr={};cr.computeHierarchyPackedLength=function(e,t){let n=0,i=[e];for(;i.length>0;){let o=i.pop();if(!l(o))continue;n+=2;let r=o.positions,s=o.holes;if(l(r)&&r.length>0&&(n+=r.length*t.packedLength),l(s)){let a=s.length;for(let c=0;c<a;++c)i.push(s[c])}}return n};cr.packPolygonHierarchy=function(e,t,n,i){let o=[e];for(;o.length>0;){let r=o.pop();if(!l(r))continue;let s=r.positions,a=r.holes;if(t[n++]=l(s)?s.length:0,t[n++]=l(a)?a.length:0,l(s)){let c=s.length;for(let u=0;u<c;++u,n+=i.packedLength)i.pack(s[u],t,n)}if(l(a)){let c=a.length;for(let u=0;u<c;++u)o.push(a[u])}}return n};cr.unpackPolygonHierarchy=function(e,t,n){let i=e[t++],o=e[t++],r=new Array(i),s=o>0?new Array(o):void 0;for(let a=0;a<i;++a,t+=n.packedLength)r[a]=n.unpack(e,t);for(let a=0;a<o;++a)s[a]=cr.unpackPolygonHierarchy(e,t,n),t=s[a].startingIndex,delete s[a].startingIndex;return{positions:r,holes:s,startingIndex:t}};var Ay=new G;function MJ(e,t,n,i){return G.subtract(t,e,Ay),G.multiplyByScalar(Ay,n/i,Ay),G.add(e,Ay,Ay),[Ay.x,Ay.y]}var F_=new h;function o1e(e,t,n,i){return h.subtract(t,e,F_),h.multiplyByScalar(F_,n/i,F_),h.add(e,F_,F_),[F_.x,F_.y,F_.z]}cr.subdivideLineCount=function(e,t,n){let o=h.distance(e,t)/n,r=Math.max(0,Math.ceil(R.log2(o)));return Math.pow(2,r)};var _5=new me,g5=new me,r1e=new me,s1e=new h,IJ=new za;cr.subdivideRhumbLineCount=function(e,t,n,i){let o=e.cartesianToCartographic(t,_5),r=e.cartesianToCartographic(n,g5),a=new za(o,r,e).surfaceDistance/i,c=Math.max(0,Math.ceil(R.log2(a)));return Math.pow(2,c)};cr.subdivideTexcoordLine=function(e,t,n,i,o,r){let s=cr.subdivideLineCount(n,i,o),a=G.distance(e,t),c=a/s,u=r;u.length=s*2;let f=0;for(let d=0;d<s;d++){let p=MJ(e,t,d*c,a);u[f++]=p[0],u[f++]=p[1]}return u};cr.subdivideLine=function(e,t,n,i){let o=cr.subdivideLineCount(e,t,n),r=h.distance(e,t),s=r/o;l(i)||(i=[]);let a=i;a.length=o*3;let c=0;for(let u=0;u<o;u++){let f=o1e(e,t,u*s,r);a[c++]=f[0],a[c++]=f[1],a[c++]=f[2]}return a};cr.subdivideTexcoordRhumbLine=function(e,t,n,i,o,r,s){let a=n.cartesianToCartographic(i,_5),c=n.cartesianToCartographic(o,g5);IJ.setEndPoints(a,c);let u=IJ.surfaceDistance/r,f=Math.max(0,Math.ceil(R.log2(u))),d=Math.pow(2,f),p=G.distance(e,t),_=p/d,m=s;m.length=d*2;let x=0;for(let C=0;C<d;C++){let A=MJ(e,t,C*_,p);m[x++]=A[0],m[x++]=A[1]}return m};cr.subdivideRhumbLine=function(e,t,n,i,o){let r=e.cartesianToCartographic(t,_5),s=e.cartesianToCartographic(n,g5),a=new za(r,s,e),c=a.surfaceDistance/i,u=Math.max(0,Math.ceil(R.log2(c))),f=Math.pow(2,u),d=a.surfaceDistance/f;l(o)||(o=[]);let p=o;p.length=f*3;let _=0;for(let m=0;m<f;m++){let x=a.interpolateUsingSurfaceDistance(m*d,r1e),C=e.cartographicToCartesian(x,s1e);p[_++]=C.x,p[_++]=C.y,p[_++]=C.z}return p};var a1e=new h,c1e=new h,l1e=new h,u1e=new h;cr.scaleToGeodeticHeightExtruded=function(e,t,n,i,o){i=y(i,re.WGS84);let r=a1e,s=c1e,a=l1e,c=u1e;if(l(e)&&l(e.attributes)&&l(e.attributes.position)){let u=e.attributes.position.values,f=u.length/2;for(let d=0;d<f;d+=3)h.fromArray(u,d,a),i.geodeticSurfaceNormal(a,r),c=i.scaleToGeodeticSurface(a,c),s=h.multiplyByScalar(r,n,s),s=h.add(c,s,s),u[d+f]=s.x,u[d+1+f]=s.y,u[d+2+f]=s.z,o&&(c=h.clone(a,c)),s=h.multiplyByScalar(r,t,s),s=h.add(c,s,s),u[d]=s.x,u[d+1]=s.y,u[d+2]=s.z}return e};cr.polygonOutlinesFromHierarchy=function(e,t,n){let i=[],o=new sl;o.enqueue(e);let r,s,a;for(;o.length!==0;){let c=o.dequeue(),u=c.positions;if(t)for(a=u.length,r=0;r<a;r++)n.scaleToGeodeticSurface(u[r],u[r]);if(u=So(u,h.equalsEpsilon,!0),u.length<3)continue;let f=c.holes?c.holes.length:0;for(r=0;r<f;r++){let d=c.holes[r],p=d.positions;if(t)for(a=p.length,s=0;s<a;++s)n.scaleToGeodeticSurface(p[s],p[s]);if(p=So(p,h.equalsEpsilon,!0),p.length<3)continue;i.push(p);let _=0;for(l(d.holes)&&(_=d.holes.length),s=0;s<_;s++)o.enqueue(d.holes[s])}i.push(u)}return i};cr.polygonsFromHierarchy=function(e,t,n,i,o){let r=[],s=[],a=new sl;for(a.enqueue(e);a.length!==0;){let c=a.dequeue(),u=c.positions,f=c.holes,d,p;if(i)for(p=u.length,d=0;d<p;d++)o.scaleToGeodeticSurface(u[d],u[d]);if(t||(u=So(u,h.equalsEpsilon,!0)),u.length<3)continue;let _=n(u);if(!l(_))continue;let m=[],x=ti.computeWindingOrder2D(_);x===fs.CLOCKWISE&&(_.reverse(),u=u.slice().reverse());let C=u.slice(),A=l(f)?f.length:0,T=[],b;for(d=0;d<A;d++){let S=f[d],w=S.positions;if(i)for(p=w.length,b=0;b<p;++b)o.scaleToGeodeticSurface(w[b],w[b]);if(t||(w=So(w,h.equalsEpsilon,!0)),w.length<3)continue;let D=n(w);if(!l(D))continue;x=ti.computeWindingOrder2D(D),x===fs.CLOCKWISE&&(D.reverse(),w=w.slice().reverse()),T.push(w),m.push(C.length),C=C.concat(w),_=_.concat(D);let O=0;for(l(S.holes)&&(O=S.holes.length),b=0;b<O;b++)a.enqueue(S.holes[b])}r.push({outerRing:u,holes:T}),s.push({positions:C,positions2D:_,holes:m})}return{hierarchy:r,polygons:s}};var f1e=new G,d1e=new h,h1e=new Me,m1e=new Q;cr.computeBoundingRectangle=function(e,t,n,i,o){let r=Me.fromAxisAngle(e,i,h1e),s=Q.fromQuaternion(r,m1e),a=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,u=Number.POSITIVE_INFINITY,f=Number.NEGATIVE_INFINITY,d=n.length;for(let p=0;p<d;++p){let _=h.clone(n[p],d1e);Q.multiplyByVector(s,_,_);let m=t(_,f1e);l(m)&&(a=Math.min(a,m.x),c=Math.max(c,m.x),u=Math.min(u,m.y),f=Math.max(f,m.y))}return o.x=a,o.y=u,o.width=c-a,o.height=f-u,o};cr.createGeometryFromPositions=function(e,t,n,i,o,r,s){let a=ti.triangulate(t.positions2D,t.holes);a.length<3&&(a=[0,1,2]);let c=t.positions,u=l(n),f=u?n.positions:void 0;if(o){let d=c.length,p=new Array(d*3),_=0;for(let C=0;C<d;C++){let A=c[C];p[_++]=A.x,p[_++]=A.y,p[_++]=A.z}let m={attributes:{position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:p})},indices:a,primitiveType:Le.TRIANGLES};u&&(m.attributes.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:G.packArray(f)}));let x=new ct(m);return r.normal?Rn.computeNormal(x):x}if(s===Yt.GEODESIC)return ti.computeSubdivision(e,c,a,f,i);if(s===Yt.RHUMB)return ti.computeRhumbLineSubdivision(e,c,a,f,i)};var OJ=[],RJ=[],p1e=new h,_1e=new h;cr.computeWallGeometry=function(e,t,n,i,o,r){let s,a,c,u,f,d,p,_,m,x=e.length,C=0,A=0,T=l(t),b=T?t.positions:void 0;if(o)for(a=x*3*2,s=new Array(a*2),T&&(m=x*2*2,_=new Array(m*2)),c=0;c<x;c++)u=e[c],f=e[(c+1)%x],s[C]=s[C+a]=u.x,++C,s[C]=s[C+a]=u.y,++C,s[C]=s[C+a]=u.z,++C,s[C]=s[C+a]=f.x,++C,s[C]=s[C+a]=f.y,++C,s[C]=s[C+a]=f.z,++C,T&&(d=b[c],p=b[(c+1)%x],_[A]=_[A+m]=d.x,++A,_[A]=_[A+m]=d.y,++A,_[A]=_[A+m]=p.x,++A,_[A]=_[A+m]=p.y,++A);else{let I=R.chordLength(i,n.maximumRadius),L=0;if(r===Yt.GEODESIC)for(c=0;c<x;c++)L+=cr.subdivideLineCount(e[c],e[(c+1)%x],I);else if(r===Yt.RHUMB)for(c=0;c<x;c++)L+=cr.subdivideRhumbLineCount(n,e[c],e[(c+1)%x],I);for(a=(L+x)*3,s=new Array(a*2),T&&(m=(L+x)*2,_=new Array(m*2)),c=0;c<x;c++){u=e[c],f=e[(c+1)%x];let N,g;T&&(d=b[c],p=b[(c+1)%x]),r===Yt.GEODESIC?(N=cr.subdivideLine(u,f,I,RJ),T&&(g=cr.subdivideTexcoordLine(d,p,u,f,I,OJ))):r===Yt.RHUMB&&(N=cr.subdivideRhumbLine(n,u,f,I,RJ),T&&(g=cr.subdivideTexcoordRhumbLine(d,p,n,u,f,I,OJ)));let E=N.length;for(let v=0;v<E;++v,++C)s[C]=N[v],s[C+a]=N[v];if(s[C]=f.x,s[C+a]=f.x,++C,s[C]=f.y,s[C+a]=f.y,++C,s[C]=f.z,s[C+a]=f.z,++C,T){let v=g.length;for(let P=0;P<v;++P,++A)_[A]=g[P],_[A+m]=g[P];_[A]=p.x,_[A+m]=p.x,++A,_[A]=p.y,_[A+m]=p.y,++A}}}x=s.length;let S=Ne.createTypedArray(x/3,x-e.length*6),w=0;for(x/=6,c=0;c<x;c++){let I=c,L=I+1,N=I+x,g=N+1;u=h.fromArray(s,I*3,p1e),f=h.fromArray(s,L*3,_1e),!h.equalsEpsilon(u,f,R.EPSILON10,R.EPSILON10)&&(S[w++]=I,S[w++]=N,S[w++]=L,S[w++]=L,S[w++]=N,S[w++]=g)}let D={attributes:new ln({position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:s})}),indices:S,primitiveType:Le.TRIANGLES};return T&&(D.attributes.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:_})),new ct(D)};var Un=cr;var g1e=new h,y1e=new qe,x1e=new G,C1e=new G,A1e=new h,T1e=new h,b1e=new h,MS=new h,E1e=new h,S1e=new h,BJ=new Me,w1e=new Q,v1e=new Q,D1e=new h;function P1e(e,t,n,i,o,r,s,a,c){let u=e.positions,f=ti.triangulate(e.positions2D,e.holes);f.length<3&&(f=[0,1,2]);let d=Ne.createTypedArray(u.length,f.length);d.set(f);let p=w1e;if(i!==0){let g=Me.fromAxisAngle(s,i,BJ);if(p=Q.fromQuaternion(g,p),t.tangent||t.bitangent){g=Me.fromAxisAngle(s,-i,BJ);let E=Q.fromQuaternion(g,v1e);a=h.normalize(Q.multiplyByVector(E,a,a),a),t.bitangent&&(c=h.normalize(h.cross(s,a,c),c))}}else p=Q.clone(Q.IDENTITY,p);let _=C1e;t.st&&(_.x=n.x,_.y=n.y);let m=u.length,x=m*3,C=new Float64Array(x),A=t.normal?new Float32Array(x):void 0,T=t.tangent?new Float32Array(x):void 0,b=t.bitangent?new Float32Array(x):void 0,S=t.st?new Float32Array(m*2):void 0,w=0,D=0,O=0,I=0,L=0;for(let g=0;g<m;g++){let E=u[g];if(C[w++]=E.x,C[w++]=E.y,C[w++]=E.z,t.st)if(l(o)&&o.positions.length===m)S[L++]=o.positions[g].x,S[L++]=o.positions[g].y;else{let v=Q.multiplyByVector(p,E,g1e),P=r(v,x1e);G.subtract(P,_,P);let M=R.clamp(P.x/n.width,0,1),V=R.clamp(P.y/n.height,0,1);S[L++]=M,S[L++]=V}t.normal&&(A[D++]=s.x,A[D++]=s.y,A[D++]=s.z),t.tangent&&(T[I++]=a.x,T[I++]=a.y,T[I++]=a.z),t.bitangent&&(b[O++]=c.x,b[O++]=c.y,b[O++]=c.z)}let N=new ln;return t.position&&(N.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:C})),t.normal&&(N.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:A})),t.tangent&&(N.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:T})),t.bitangent&&(N.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:b})),t.st&&(N.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:S})),new ct({attributes:N,indices:d,primitiveType:Le.TRIANGLES})}function Ty(e){e=y(e,y.EMPTY_OBJECT);let t=e.polygonHierarchy,n=e.textureCoordinates,i=y(e.vertexFormat,Pe.DEFAULT);this._vertexFormat=Pe.clone(i),this._polygonHierarchy=t,this._stRotation=y(e.stRotation,0),this._ellipsoid=re.clone(y(e.ellipsoid,re.WGS84)),this._workerName="createCoplanarPolygonGeometry",this._textureCoordinates=n,this.packedLength=Un.computeHierarchyPackedLength(t,h)+Pe.packedLength+re.packedLength+(l(n)?Un.computeHierarchyPackedLength(n,G):1)+2}Ty.fromPositions=function(e){e=y(e,y.EMPTY_OBJECT);let t={polygonHierarchy:{positions:e.positions},vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,textureCoordinates:e.textureCoordinates};return new Ty(t)};Ty.pack=function(e,t,n){return n=y(n,0),n=Un.packPolygonHierarchy(e._polygonHierarchy,t,n,h),re.pack(e._ellipsoid,t,n),n+=re.packedLength,Pe.pack(e._vertexFormat,t,n),n+=Pe.packedLength,t[n++]=e._stRotation,l(e._textureCoordinates)?n=Un.packPolygonHierarchy(e._textureCoordinates,t,n,G):t[n++]=-1,t[n++]=e.packedLength,t};var I1e=re.clone(re.UNIT_SPHERE),O1e=new Pe,R1e={polygonHierarchy:{}};Ty.unpack=function(e,t,n){t=y(t,0);let i=Un.unpackPolygonHierarchy(e,t,h);t=i.startingIndex,delete i.startingIndex;let o=re.unpack(e,t,I1e);t+=re.packedLength;let r=Pe.unpack(e,t,O1e);t+=Pe.packedLength;let s=e[t++],a=e[t]===-1?void 0:Un.unpackPolygonHierarchy(e,t,G);l(a)?(t=a.startingIndex,delete a.startingIndex):t++;let c=e[t++];return l(n)||(n=new Ty(R1e)),n._polygonHierarchy=i,n._ellipsoid=re.clone(o,n._ellipsoid),n._vertexFormat=Pe.clone(r,n._vertexFormat),n._stRotation=s,n._textureCoordinates=a,n.packedLength=c,n};Ty.createGeometry=function(e){let t=e._vertexFormat,n=e._polygonHierarchy,i=e._stRotation,o=e._textureCoordinates,r=l(o),s=n.positions;if(s=So(s,h.equalsEpsilon,!0),s.length<3)return;let a=A1e,c=T1e,u=b1e,f=E1e,d=S1e;if(!B_.computeProjectTo2DArguments(s,MS,f,d))return;if(a=h.cross(f,d,a),a=h.normalize(a,a),!h.equalsEpsilon(MS,h.ZERO,R.EPSILON6)){let L=e._ellipsoid.geodeticSurfaceNormal(MS,D1e);h.dot(a,L)<0&&(a=h.negate(a,a),f=h.negate(f,f))}let _=B_.createProjectPointsTo2DFunction(MS,f,d),m=B_.createProjectPointTo2DFunction(MS,f,d);t.tangent&&(c=h.clone(f,c)),t.bitangent&&(u=h.clone(d,u));let x=Un.polygonsFromHierarchy(n,r,_,!1),C=x.hierarchy,A=x.polygons,T=function(L){return L},b=r?Un.polygonsFromHierarchy(o,!0,T,!1).polygons:void 0;if(C.length===0)return;s=C[0].outerRing;let S=oe.fromPoints(s),w=Un.computeBoundingRectangle(a,m,s,i,y1e),D=[];for(let L=0;L<A.length;L++){let N=new pt({geometry:P1e(A[L],t,w,i,r?b[L]:void 0,m,a,c,u)});D.push(N)}let O=Rn.combineInstances(D)[0];O.attributes.position.values=new Float64Array(O.attributes.position.values),O.indices=Ne.createTypedArray(O.attributes.position.values.length/3,O.indices);let I=O.attributes;return t.position||delete I.position,new ct({attributes:I,indices:O.indices,primitiveType:O.primitiveType,boundingSphere:S})};var BI=Ty;function M1e(e){let t=e.length,n=new Float64Array(t*3),i=Ne.createTypedArray(t,t*2),o=0,r=0;for(let a=0;a<t;a++){let c=e[a];n[o++]=c.x,n[o++]=c.y,n[o++]=c.z,i[r++]=a,i[r++]=(a+1)%t}let s=new ln({position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:n})});return new ct({attributes:s,indices:i,primitiveType:Le.LINES})}function by(e){e=y(e,y.EMPTY_OBJECT);let t=e.polygonHierarchy;this._polygonHierarchy=t,this._workerName="createCoplanarPolygonOutlineGeometry",this.packedLength=Un.computeHierarchyPackedLength(t,h)+1}by.fromPositions=function(e){e=y(e,y.EMPTY_OBJECT);let t={polygonHierarchy:{positions:e.positions}};return new by(t)};by.pack=function(e,t,n){return n=y(n,0),n=Un.packPolygonHierarchy(e._polygonHierarchy,t,n,h),t[n]=e.packedLength,t};var B1e={polygonHierarchy:{}};by.unpack=function(e,t,n){t=y(t,0);let i=Un.unpackPolygonHierarchy(e,t,h);t=i.startingIndex,delete i.startingIndex;let o=e[t];return l(n)||(n=new by(B1e)),n._polygonHierarchy=i,n.packedLength=o,n};by.createGeometry=function(e){let t=e._polygonHierarchy,n=t.positions;if(n=So(n,h.equalsEpsilon,!0),n.length<3||!B_.validOutline(n))return;let o=Un.polygonOutlinesFromHierarchy(t,!1);if(o.length===0)return;let r=[];for(let c=0;c<o.length;c++){let u=new pt({geometry:M1e(o[c])});r.push(u)}let s=Rn.combineInstances(r)[0],a=oe.fromPoints(t.positions);return new ct({attributes:s.attributes,indices:s.indices,primitiveType:s.primitiveType,boundingSphere:a})};var ed=by;var L1e={ROUNDED:0,MITERED:1,BEVELED:2},Ii=Object.freeze(L1e);function N1e(e){let t=e._uSquared,n=e._ellipsoid.maximumRadius,i=e._ellipsoid.minimumRadius,o=(n-i)/n,r=Math.cos(e._startHeading),s=Math.sin(e._startHeading),a=(1-o)*Math.tan(e._start.latitude),c=1/Math.sqrt(1+a*a),u=c*a,f=Math.atan2(a,r),d=c*s,p=d*d,_=1-p,m=Math.sqrt(_),x=t/4,C=x*x,A=C*x,T=C*C,b=1+x-3*C/4+5*A/4-175*T/64,S=1-x+15*C/8-35*A/8,w=1-3*x+35*C/4,D=1-5*x,O=b*f-S*Math.sin(2*f)*x/2-w*Math.sin(4*f)*C/16-D*Math.sin(6*f)*A/48-Math.sin(8*f)*5*T/512,I=e._constants;I.a=n,I.b=i,I.f=o,I.cosineHeading=r,I.sineHeading=s,I.tanU=a,I.cosineU=c,I.sineU=u,I.sigma=f,I.sineAlpha=d,I.sineSquaredAlpha=p,I.cosineSquaredAlpha=_,I.cosineAlpha=m,I.u2Over4=x,I.u4Over16=C,I.u6Over64=A,I.u8Over256=T,I.a0=b,I.a1=S,I.a2=w,I.a3=D,I.distanceRatio=O}function F1e(e,t){return e*t*(4+e*(4-3*t))/16}function LJ(e,t,n,i,o,r,s){let a=F1e(e,n);return(1-a)*e*t*(i+a*o*(s+a*r*(2*s*s-1)))}function V1e(e,t,n,i,o,r,s){let a=(t-n)/t,c=r-i,u=Math.atan((1-a)*Math.tan(o)),f=Math.atan((1-a)*Math.tan(s)),d=Math.cos(u),p=Math.sin(u),_=Math.cos(f),m=Math.sin(f),x=d*_,C=d*m,A=p*m,T=p*_,b=c,S=R.TWO_PI,w=Math.cos(b),D=Math.sin(b),O,I,L,N,g;do{w=Math.cos(b),D=Math.sin(b);let F=C-T*w;L=Math.sqrt(_*_*D*D+F*F),I=A+x*w,O=Math.atan2(L,I);let Y;L===0?(Y=0,N=1):(Y=x*D/L,N=1-Y*Y),S=b,g=I-2*A/N,isFinite(g)||(g=0),b=c+LJ(a,Y,N,O,L,I,g)}while(Math.abs(b-S)>R.EPSILON12);let E=N*(t*t-n*n)/(n*n),v=1+E*(4096+E*(E*(320-175*E)-768))/16384,P=E*(256+E*(E*(74-47*E)-128))/1024,M=g*g,V=P*L*(g+P*(I*(2*M-1)-P*g*(4*L*L-3)*(4*M-3)/6)/4),U=n*v*(O-V),k=Math.atan2(_*D,C-T*w),H=Math.atan2(d*D,C*w-T);e._distance=U,e._startHeading=k,e._endHeading=H,e._uSquared=E}var k1e=new h,y5=new h;function NJ(e,t,n,i){let o=h.normalize(i.cartographicToCartesian(t,y5),k1e),r=h.normalize(i.cartographicToCartesian(n,y5),y5);V1e(e,i.maximumRadius,i.minimumRadius,t.longitude,t.latitude,n.longitude,n.latitude),e._start=me.clone(t,e._start),e._end=me.clone(n,e._end),e._start.height=0,e._end.height=0,N1e(e)}function BS(e,t,n){let i=y(n,re.WGS84);this._ellipsoid=i,this._start=new me,this._end=new me,this._constants={},this._startHeading=void 0,this._endHeading=void 0,this._distance=void 0,this._uSquared=void 0,l(e)&&l(t)&&NJ(this,e,t,i)}Object.defineProperties(BS.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},startHeading:{get:function(){return this._startHeading}},endHeading:{get:function(){return this._endHeading}}});BS.prototype.setEndPoints=function(e,t){NJ(this,e,t,this._ellipsoid)};BS.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(this._distance*e,t)};BS.prototype.interpolateUsingSurfaceDistance=function(e,t){let n=this._constants,i=n.distanceRatio+e/n.b,o=Math.cos(2*i),r=Math.cos(4*i),s=Math.cos(6*i),a=Math.sin(2*i),c=Math.sin(4*i),u=Math.sin(6*i),f=Math.sin(8*i),d=i*i,p=i*d,_=n.u8Over256,m=n.u2Over4,x=n.u6Over64,C=n.u4Over16,A=2*p*_*o/3+i*(1-m+7*C/4-15*x/4+579*_/64-(C-15*x/4+187*_/16)*o-(5*x/4-115*_/16)*r-29*_*s/16)+(m/2-C+71*x/32-85*_/16)*a+(5*C/16-5*x/4+383*_/96)*c-d*((x-11*_/2)*a+5*_*c/2)+(29*x/96-29*_/16)*u+539*_*f/1536,T=Math.asin(Math.sin(A)*n.cosineAlpha),b=Math.atan(n.a/n.b*Math.tan(T));A=A-n.sigma;let S=Math.cos(2*n.sigma+A),w=Math.sin(A),D=Math.cos(A),O=n.cosineU*D,I=n.sineU*w,N=Math.atan2(w*n.sineHeading,O-I*n.cosineHeading)-LJ(n.f,n.sineAlpha,n.cosineSquaredAlpha,A,w,D,S);return l(t)?(t.longitude=this._start.longitude+N,t.latitude=b,t.height=0,t):new me(this._start.longitude+N,b,0)};var td=BS;var yc={};yc.numberOfPoints=function(e,t,n){let i=h.distance(e,t);return Math.ceil(i/n)};yc.numberOfPointsRhumbLine=function(e,t,n){let i=Math.pow(e.longitude-t.longitude,2)+Math.pow(e.latitude-t.latitude,2);return Math.max(1,Math.ceil(Math.sqrt(i/(n*n))))};var U1e=new me;yc.extractHeights=function(e,t){let n=e.length,i=new Array(n);for(let o=0;o<n;o++){let r=e[o];i[o]=t.cartesianToCartographic(r,U1e).height}return i};var z1e=new B,H1e=new h,FJ=new h,G1e=new rn(h.UNIT_X,0),VJ=new h,W1e=new rn(h.UNIT_X,0),j1e=new h,q1e=new h,C5=[];function UJ(e,t,n){let i=C5;i.length=e;let o;if(t===n){for(o=0;o<e;o++)i[o]=t;return i}let s=(n-t)/e;for(o=0;o<e;o++){let a=t+o*s;i[o]=a}return i}var NI=new me,LI=new me,V_=new h,A5=new h,Y1e=new h,x5=new td,LS=new za;function X1e(e,t,n,i,o,r,s,a){let c=i.scaleToGeodeticSurface(e,A5),u=i.scaleToGeodeticSurface(t,Y1e),f=yc.numberOfPoints(e,t,n),d=i.cartesianToCartographic(c,NI),p=i.cartesianToCartographic(u,LI),_=UJ(f,o,r);x5.setEndPoints(d,p);let m=x5.surfaceDistance/f,x=a;d.height=o;let C=i.cartographicToCartesian(d,V_);h.pack(C,s,x),x+=3;for(let A=1;A<f;A++){let T=x5.interpolateUsingSurfaceDistance(A*m,LI);T.height=_[A],C=i.cartographicToCartesian(T,V_),h.pack(C,s,x),x+=3}return x}function K1e(e,t,n,i,o,r,s,a){let c=i.cartesianToCartographic(e,NI),u=i.cartesianToCartographic(t,LI),f=yc.numberOfPointsRhumbLine(c,u,n);c.height=0,u.height=0;let d=UJ(f,o,r);LS.ellipsoid.equals(i)||(LS=new za(void 0,void 0,i)),LS.setEndPoints(c,u);let p=LS.surfaceDistance/f,_=a;c.height=o;let m=i.cartographicToCartesian(c,V_);h.pack(m,s,_),_+=3;for(let x=1;x<f;x++){let C=LS.interpolateUsingSurfaceDistance(x*p,LI);C.height=d[x],m=i.cartographicToCartesian(C,V_),h.pack(m,s,_),_+=3}return _}yc.wrapLongitude=function(e,t){let n=[],i=[];if(l(e)&&e.length>0){t=y(t,B.IDENTITY);let o=B.inverseTransformation(t,z1e),r=B.multiplyByPoint(o,h.ZERO,H1e),s=h.normalize(B.multiplyByPointAsVector(o,h.UNIT_Y,FJ),FJ),a=rn.fromPointNormal(r,s,G1e),c=h.normalize(B.multiplyByPointAsVector(o,h.UNIT_X,VJ),VJ),u=rn.fromPointNormal(r,c,W1e),f=1;n.push(h.clone(e[0]));let d=n[0],p=e.length;for(let _=1;_<p;++_){let m=e[_];if(rn.getPointDistance(u,d)<0||rn.getPointDistance(u,m)<0){let x=Ki.lineSegmentPlane(d,m,a,j1e);if(l(x)){let C=h.multiplyByScalar(s,5e-9,q1e);rn.getPointDistance(a,d)<0&&h.negate(C,C),n.push(h.add(x,C,new h)),i.push(f+1),h.negate(C,C),n.push(h.add(x,C,new h)),f=1}}n.push(h.clone(e[_])),f++,d=m}i.push(f)}return{positions:n,lengths:i}};yc.generateArc=function(e){l(e)||(e={});let t=e.positions,n=t.length,i=y(e.ellipsoid,re.WGS84),o=y(e.height,0),r=Array.isArray(o);if(n<1)return[];if(n===1){let x=i.scaleToGeodeticSurface(t[0],A5);if(o=r?o[0]:o,o!==0){let C=i.geodeticSurfaceNormal(x,V_);h.multiplyByScalar(C,o,C),h.add(x,C,x)}return[x.x,x.y,x.z]}let s=e.minDistance;if(!l(s)){let x=y(e.granularity,R.RADIANS_PER_DEGREE);s=R.chordLength(x,i.maximumRadius)}let a=0,c;for(c=0;c<n-1;c++)a+=yc.numberOfPoints(t[c],t[c+1],s);let u=(a+1)*3,f=new Array(u),d=0;for(c=0;c<n-1;c++){let x=t[c],C=t[c+1],A=r?o[c]:o,T=r?o[c+1]:o;d=X1e(x,C,s,i,A,T,f,d)}C5.length=0;let p=t[n-1],_=i.cartesianToCartographic(p,NI);_.height=r?o[n-1]:o;let m=i.cartographicToCartesian(_,V_);return h.pack(m,f,u-3),f};var kJ=new me,$1e=new me;yc.generateRhumbArc=function(e){l(e)||(e={});let t=e.positions,n=t.length,i=y(e.ellipsoid,re.WGS84),o=y(e.height,0),r=Array.isArray(o);if(n<1)return[];if(n===1){let A=i.scaleToGeodeticSurface(t[0],A5);if(o=r?o[0]:o,o!==0){let T=i.geodeticSurfaceNormal(A,V_);h.multiplyByScalar(T,o,T),h.add(A,T,A)}return[A.x,A.y,A.z]}let s=y(e.granularity,R.RADIANS_PER_DEGREE),a=0,c,u=i.cartesianToCartographic(t[0],kJ),f;for(c=0;c<n-1;c++)f=i.cartesianToCartographic(t[c+1],$1e),a+=yc.numberOfPointsRhumbLine(u,f,s),u=me.clone(f,kJ);let d=(a+1)*3,p=new Array(d),_=0;for(c=0;c<n-1;c++){let A=t[c],T=t[c+1],b=r?o[c]:o,S=r?o[c+1]:o;_=K1e(A,T,s,i,b,S,p,_)}C5.length=0;let m=t[n-1],x=i.cartesianToCartographic(m,NI);x.height=r?o[n-1]:o;let C=i.cartographicToCartesian(x,V_);return h.pack(C,p,d-3),p};yc.generateCartesianArc=function(e){let t=yc.generateArc(e),n=t.length/3,i=new Array(n);for(let o=0;o<n;o++)i[o]=h.unpack(t,o*3);return i};yc.generateCartesianRhumbArc=function(e){let t=yc.generateRhumbArc(e),n=t.length/3,i=new Array(n);for(let o=0;o<n;o++)i[o]=h.unpack(t,o*3);return i};var Oi=yc;var Vs=[new h,new h],Z1e=new h,J1e=new h,Q1e=new h,ePe=new h,tPe=new h,nPe=new h,iPe=new h,oPe=new h,rPe=new h,OA=new h,FI=new h,NS={},T5=new me;function sPe(e,t){let n=new Array(e.length);for(let i=0;i<e.length;i++){let o=e[i];T5=t.cartesianToCartographic(o,T5),n[i]=T5.height,e[i]=t.scaleToGeodeticSurface(o,o)}return n}function b5(e,t,n,i){let o=e[0],r=e[1],s=h.angleBetween(o,r),a=Math.ceil(s/i),c=new Array(a),u;if(t===n){for(u=0;u<a;u++)c[u]=t;return c.push(n),c}let d=(n-t)/a;for(u=1;u<a;u++){let p=t+u*d;c[u]=p}return c[0]=t,c.push(n),c}var VI=new h,kI=new h;function aPe(e,t,n,i){let o=new Fa(n,i),r=o.projectPointOntoPlane(h.add(n,e,VI),VI),s=o.projectPointOntoPlane(h.add(n,t,kI),kI),a=G.angleBetween(r,s);return s.x*r.y-s.y*r.x>=0?-a:a}var cPe=new h(-1,0,0),Ey=new B,lPe=new B,E5=new Q,uPe=Q.IDENTITY.clone(),fPe=new h,dPe=new se,zJ=new h;function Zm(e,t,n,i,o,r,s,a){let c=fPe,u=dPe;Ey=_t.eastNorthUpToFixedFrame(e,o,Ey),c=B.multiplyByPointAsVector(Ey,cPe,c),c=h.normalize(c,c);let f=aPe(c,t,e,o);E5=Q.fromRotationZ(f,E5),zJ.z=r,Ey=B.multiplyTransformation(Ey,B.fromRotationTranslation(E5,zJ,lPe),Ey);let d=uPe;d[0]=s;for(let p=0;p<a;p++)for(let _=0;_<n.length;_+=3)u=h.fromArray(n,_,u),u=Q.multiplyByVector(d,u,u),u=B.multiplyByPoint(Ey,u,u),i.push(u.x,u.y,u.z);return i}var hPe=new h;function S5(e,t,n,i,o,r,s){for(let a=0;a<e.length;a+=3){let c=h.fromArray(e,a,hPe);i=Zm(c,t,n,i,o,r[a/3],s,1)}return i}function mPe(e,t){let n=e.length,i=new Array(n*6),o=0,r=t.x+t.width/2,s=t.y+t.height/2,a=e[0];i[o++]=a.x-r,i[o++]=0,i[o++]=a.y-s;for(let c=1;c<n;c++){a=e[c];let u=a.x-r,f=a.y-s;i[o++]=u,i[o++]=0,i[o++]=f,i[o++]=u,i[o++]=0,i[o++]=f}return a=e[0],i[o++]=a.x-r,i[o++]=0,i[o++]=a.y-s,i}function HJ(e,t){let n=e.length,i=new Array(n*3),o=0,r=t.x+t.width/2,s=t.y+t.height/2;for(let a=0;a<n;a++)i[o++]=e[a].x-r,i[o++]=0,i[o++]=e[a].y-s;return i}var GJ=new Me,WJ=new h,jJ=new Q;function qJ(e,t,n,i,o,r,s,a,c,u){let f=h.angleBetween(h.subtract(t,e,OA),h.subtract(n,e,FI)),d=i===Ii.BEVELED?0:Math.ceil(f/R.toRadians(5)),p;o?p=Q.fromQuaternion(Me.fromAxisAngle(h.negate(e,OA),f/(d+1),GJ),jJ):p=Q.fromQuaternion(Me.fromAxisAngle(e,f/(d+1),GJ),jJ);let _,m;if(t=h.clone(t,WJ),d>0){let x=u?2:1;for(let C=0;C<d;C++)t=Q.multiplyByVector(p,t,t),_=h.subtract(t,e,OA),_=h.normalize(_,_),o||(_=h.negate(_,_)),m=r.scaleToGeodeticSurface(t,FI),s=Zm(m,_,a,s,r,c,1,x)}else _=h.subtract(t,e,OA),_=h.normalize(_,_),o||(_=h.negate(_,_)),m=r.scaleToGeodeticSurface(t,FI),s=Zm(m,_,a,s,r,c,1,1),n=h.clone(n,WJ),_=h.subtract(n,e,OA),_=h.normalize(_,_),o||(_=h.negate(_,_)),m=r.scaleToGeodeticSurface(n,FI),s=Zm(m,_,a,s,r,c,1,1);return s}NS.removeDuplicatesFromShape=function(e){let t=e.length,n=[];for(let i=t-1,o=0;o<t;i=o++){let r=e[i],s=e[o];G.equals(r,s)||n.push(s)}return n};NS.angleIsGreaterThanPi=function(e,t,n,i){let o=new Fa(n,i),r=o.projectPointOntoPlane(h.add(n,e,VI),VI),s=o.projectPointOntoPlane(h.add(n,t,kI),kI);return s.x*r.y-s.y*r.x>=0};var pPe=new h,_Pe=new h;NS.computePositions=function(e,t,n,i,o){let r=i._ellipsoid,s=sPe(e,r),a=i._granularity,c=i._cornerType,u=o?mPe(t,n):HJ(t,n),f=o?HJ(t,n):void 0,d=n.height/2,p=n.width/2,_=e.length,m=[],x=o?[]:void 0,C=Z1e,A=J1e,T=Q1e,b=ePe,S=tPe,w=nPe,D=iPe,O=oPe,I=rPe,L=e[0],N=e[1];b=r.geodeticSurfaceNormal(L,b),C=h.subtract(N,L,C),C=h.normalize(C,C),O=h.cross(b,C,O),O=h.normalize(O,O);let g=s[0],E=s[1];o&&(x=Zm(L,O,f,x,r,g+d,1,1)),I=h.clone(L,I),L=N,A=h.negate(C,A);let v,P;for(let U=1;U<_-1;U++){let k=o?2:1;if(N=e[U+1],L.equals(N)){Mt("Positions are too close and are considered equivalent with rounding error.");continue}C=h.subtract(N,L,C),C=h.normalize(C,C),T=h.add(C,A,T),T=h.normalize(T,T),b=r.geodeticSurfaceNormal(L,b);let H=h.multiplyByScalar(b,h.dot(C,b),pPe);h.subtract(C,H,H),h.normalize(H,H);let F=h.multiplyByScalar(b,h.dot(A,b),_Pe);if(h.subtract(A,F,F),h.normalize(F,F),!R.equalsEpsilon(Math.abs(h.dot(H,F)),1,R.EPSILON7)){T=h.cross(T,b,T),T=h.cross(b,T,T),T=h.normalize(T,T);let j=1/Math.max(.25,h.magnitude(h.cross(T,A,OA))),X=NS.angleIsGreaterThanPi(C,A,L,r);X?(S=h.add(L,h.multiplyByScalar(T,j*p,T),S),w=h.add(S,h.multiplyByScalar(O,p,w),w),Vs[0]=h.clone(I,Vs[0]),Vs[1]=h.clone(w,Vs[1]),v=b5(Vs,g+d,E+d,a),P=Oi.generateArc({positions:Vs,granularity:a,ellipsoid:r}),m=S5(P,O,u,m,r,v,1),O=h.cross(b,C,O),O=h.normalize(O,O),D=h.add(S,h.multiplyByScalar(O,p,D),D),c===Ii.ROUNDED||c===Ii.BEVELED?qJ(S,w,D,c,X,r,m,u,E+d,o):(T=h.negate(T,T),m=Zm(L,T,u,m,r,E+d,j,k)),I=h.clone(D,I)):(S=h.add(L,h.multiplyByScalar(T,j*p,T),S),w=h.add(S,h.multiplyByScalar(O,-p,w),w),Vs[0]=h.clone(I,Vs[0]),Vs[1]=h.clone(w,Vs[1]),v=b5(Vs,g+d,E+d,a),P=Oi.generateArc({positions:Vs,granularity:a,ellipsoid:r}),m=S5(P,O,u,m,r,v,1),O=h.cross(b,C,O),O=h.normalize(O,O),D=h.add(S,h.multiplyByScalar(O,-p,D),D),c===Ii.ROUNDED||c===Ii.BEVELED?qJ(S,w,D,c,X,r,m,u,E+d,o):m=Zm(L,T,u,m,r,E+d,j,k),I=h.clone(D,I)),A=h.negate(C,A)}else m=Zm(I,O,u,m,r,g+d,1,1),I=L;g=E,E=s[U+1],L=N}Vs[0]=h.clone(I,Vs[0]),Vs[1]=h.clone(L,Vs[1]),v=b5(Vs,g+d,E+d,a),P=Oi.generateArc({positions:Vs,granularity:a,ellipsoid:r}),m=S5(P,O,u,m,r,v,1),o&&(x=Zm(L,O,f,x,r,E+d,1,1)),_=m.length;let M=o?_+x.length:_,V=new Float64Array(M);return V.set(m),o&&V.set(x,_),V};var Sh=NS;var v5={},RA=new h,ZJ=new h,gPe=new h,YJ=new h,xc=[new h,new h],JJ=new h,QJ=new h,eQ=new h,yPe=new h,xPe=new h,CPe=new h,APe=new h,TPe=new h,bPe=new h,EPe=new h,XJ=new Me,KJ=new Q;function UI(e,t,n,i,o){let r=h.angleBetween(h.subtract(t,e,RA),h.subtract(n,e,ZJ)),s=i===Ii.BEVELED?1:Math.ceil(r/R.toRadians(5))+1,a=s*3,c=new Array(a);c[a-3]=n.x,c[a-2]=n.y,c[a-1]=n.z;let u;o?u=Q.fromQuaternion(Me.fromAxisAngle(h.negate(e,RA),r/s,XJ),KJ):u=Q.fromQuaternion(Me.fromAxisAngle(e,r/s,XJ),KJ);let f=0;t=h.clone(t,RA);for(let d=0;d<s;d++)t=Q.multiplyByVector(u,t,t),c[f++]=t.x,c[f++]=t.y,c[f++]=t.z;return c}function SPe(e){let t=JJ,n=QJ,i=eQ,o=e[1];n=h.fromArray(e[1],o.length-3,n),i=h.fromArray(e[0],0,i),t=h.midpoint(n,i,t);let r=UI(t,n,i,Ii.ROUNDED,!1),s=e.length-1,a=e[s-1];o=e[s],n=h.fromArray(a,a.length-3,n),i=h.fromArray(o,0,i),t=h.midpoint(n,i,t);let c=UI(t,n,i,Ii.ROUNDED,!1);return[r,c]}function $J(e,t,n,i){let o=RA;return i?o=h.add(e,t,o):(t=h.negate(t,t),o=h.add(e,t,o)),[o.x,o.y,o.z,n.x,n.y,n.z]}function w5(e,t,n,i){let o=new Array(e.length),r=new Array(e.length),s=h.multiplyByScalar(t,n,RA),a=h.negate(s,ZJ),c=0,u=e.length-1;for(let f=0;f<e.length;f+=3){let d=h.fromArray(e,f,gPe),p=h.add(d,a,YJ);o[c++]=p.x,o[c++]=p.y,o[c++]=p.z;let _=h.add(d,s,YJ);r[u--]=_.z,r[u--]=_.y,r[u--]=_.x}return i.push(o,r),i}v5.addAttribute=function(e,t,n,i){let o=t.x,r=t.y,s=t.z;l(n)&&(e[n]=o,e[n+1]=r,e[n+2]=s),l(i)&&(e[i]=s,e[i-1]=r,e[i-2]=o)};var wPe=new h,vPe=new h;v5.computePositions=function(e){let t=e.granularity,n=e.positions,i=e.ellipsoid,o=e.width/2,r=e.cornerType,s=e.saveAttributes,a=JJ,c=QJ,u=eQ,f=yPe,d=xPe,p=CPe,_=APe,m=TPe,x=bPe,C=EPe,A=[],T=s?[]:void 0,b=s?[]:void 0,S=n[0],w=n[1];c=h.normalize(h.subtract(w,S,c),c),a=i.geodeticSurfaceNormal(S,a),f=h.normalize(h.cross(a,c,f),f),s&&(T.push(f.x,f.y,f.z),b.push(a.x,a.y,a.z)),_=h.clone(S,_),S=w,u=h.negate(c,u);let D,O=[],I,L=n.length;for(I=1;I<L-1;I++){a=i.geodeticSurfaceNormal(S,a),w=n[I+1],c=h.normalize(h.subtract(w,S,c),c),d=h.normalize(h.add(c,u,d),d);let g=h.multiplyByScalar(a,h.dot(c,a),wPe);h.subtract(c,g,g),h.normalize(g,g);let E=h.multiplyByScalar(a,h.dot(u,a),vPe);if(h.subtract(u,E,E),h.normalize(E,E),!R.equalsEpsilon(Math.abs(h.dot(g,E)),1,R.EPSILON7)){d=h.cross(d,a,d),d=h.cross(a,d,d),d=h.normalize(d,d);let P=o/Math.max(.25,h.magnitude(h.cross(d,u,RA))),M=Sh.angleIsGreaterThanPi(c,u,S,i);d=h.multiplyByScalar(d,P,d),M?(m=h.add(S,d,m),C=h.add(m,h.multiplyByScalar(f,o,C),C),x=h.add(m,h.multiplyByScalar(f,o*2,x),x),xc[0]=h.clone(_,xc[0]),xc[1]=h.clone(C,xc[1]),D=Oi.generateArc({positions:xc,granularity:t,ellipsoid:i}),A=w5(D,f,o,A),s&&(T.push(f.x,f.y,f.z),b.push(a.x,a.y,a.z)),p=h.clone(x,p),f=h.normalize(h.cross(a,c,f),f),x=h.add(m,h.multiplyByScalar(f,o*2,x),x),_=h.add(m,h.multiplyByScalar(f,o,_),_),r===Ii.ROUNDED||r===Ii.BEVELED?O.push({leftPositions:UI(m,p,x,r,M)}):O.push({leftPositions:$J(S,h.negate(d,d),x,M)})):(x=h.add(S,d,x),C=h.add(x,h.negate(h.multiplyByScalar(f,o,C),C),C),m=h.add(x,h.negate(h.multiplyByScalar(f,o*2,m),m),m),xc[0]=h.clone(_,xc[0]),xc[1]=h.clone(C,xc[1]),D=Oi.generateArc({positions:xc,granularity:t,ellipsoid:i}),A=w5(D,f,o,A),s&&(T.push(f.x,f.y,f.z),b.push(a.x,a.y,a.z)),p=h.clone(m,p),f=h.normalize(h.cross(a,c,f),f),m=h.add(x,h.negate(h.multiplyByScalar(f,o*2,m),m),m),_=h.add(x,h.negate(h.multiplyByScalar(f,o,_),_),_),r===Ii.ROUNDED||r===Ii.BEVELED?O.push({rightPositions:UI(x,p,m,r,M)}):O.push({rightPositions:$J(S,d,m,M)})),u=h.negate(c,u)}S=w}a=i.geodeticSurfaceNormal(S,a),xc[0]=h.clone(_,xc[0]),xc[1]=h.clone(S,xc[1]),D=Oi.generateArc({positions:xc,granularity:t,ellipsoid:i}),A=w5(D,f,o,A),s&&(T.push(f.x,f.y,f.z),b.push(a.x,a.y,a.z));let N;return r===Ii.ROUNDED&&(N=SPe(A)),{positions:A,corners:O,lefts:T,normals:b,endPositions:N}};var Ni=v5;var iQ=new h,oQ=new h,zI=new h,HI=new h,DPe=new h,rQ=new h,k_=new h,MA=new h;function sQ(e,t){for(let n=0;n<e.length;n++)e[n]=t.scaleToGeodeticSurface(e[n],e[n]);return e}function nd(e,t,n,i,o,r){let s=e.normals,a=e.tangents,c=e.bitangents,u=h.normalize(h.cross(n,t,k_),k_);r.normal&&Ni.addAttribute(s,t,i,o),r.tangent&&Ni.addAttribute(a,u,i,o),r.bitangent&&Ni.addAttribute(c,n,i,o)}function aQ(e,t,n){let i=e.positions,o=e.corners,r=e.endPositions,s=e.lefts,a=e.normals,c=new ln,u,f=0,d=0,p,_=0,m;for(p=0;p<i.length;p+=2)m=i[p].length-3,f+=m,_+=m*2,d+=i[p+1].length-3;for(f+=3,d+=3,p=0;p<o.length;p++){u=o[p];let J=o[p].leftPositions;l(J)?(m=J.length,f+=m,_+=m):(m=o[p].rightPositions.length,d+=m,_+=m)}let x=l(r),C;x&&(C=r[0].length-3,f+=C,d+=C,C/=3,_+=C*6);let A=f+d,T=new Float64Array(A),b=t.normal?new Float32Array(A):void 0,S=t.tangent?new Float32Array(A):void 0,w=t.bitangent?new Float32Array(A):void 0,D={normals:b,tangents:S,bitangents:w},O=0,I=A-1,L,N,g,E,v=iQ,P=oQ,M,V,U=C/2,k=Ne.createTypedArray(A/3,_),H=0;if(x){V=zI,M=HI;let J=r[0];for(v=h.fromArray(a,0,v),P=h.fromArray(s,0,P),p=0;p<U;p++)V=h.fromArray(J,(U-1-p)*3,V),M=h.fromArray(J,(U+p)*3,M),Ni.addAttribute(T,M,O),Ni.addAttribute(T,V,void 0,I),nd(D,v,P,O,I,t),N=O/3,E=N+1,L=(I-2)/3,g=L-1,k[H++]=L,k[H++]=N,k[H++]=g,k[H++]=g,k[H++]=N,k[H++]=E,O+=3,I-=3}let F=0,Y=0,j=i[F++],X=i[F++];T.set(j,O),T.set(X,I-X.length+1),P=h.fromArray(s,Y,P);let W,$;for(m=X.length-3,p=0;p<m;p+=3)W=n.geodeticSurfaceNormal(h.fromArray(j,p,k_),k_),$=n.geodeticSurfaceNormal(h.fromArray(X,m-p,MA),MA),v=h.normalize(h.add(W,$,v),v),nd(D,v,P,O,I,t),N=O/3,E=N+1,L=(I-2)/3,g=L-1,k[H++]=L,k[H++]=N,k[H++]=g,k[H++]=g,k[H++]=N,k[H++]=E,O+=3,I-=3;for(W=n.geodeticSurfaceNormal(h.fromArray(j,m,k_),k_),$=n.geodeticSurfaceNormal(h.fromArray(X,m,MA),MA),v=h.normalize(h.add(W,$,v),v),Y+=3,p=0;p<o.length;p++){let J;u=o[p];let ce=u.leftPositions,he=u.rightPositions,ie,ae,ge=rQ,Se=zI,be=HI;if(v=h.fromArray(a,Y,v),l(ce)){for(nd(D,v,P,void 0,I,t),I-=3,ie=E,ae=g,J=0;J<ce.length/3;J++)ge=h.fromArray(ce,J*3,ge),k[H++]=ie,k[H++]=ae-J-1,k[H++]=ae-J,Ni.addAttribute(T,ge,void 0,I),Se=h.fromArray(T,(ae-J-1)*3,Se),be=h.fromArray(T,ie*3,be),P=h.normalize(h.subtract(Se,be,P),P),nd(D,v,P,void 0,I,t),I-=3;ge=h.fromArray(T,ie*3,ge),Se=h.subtract(h.fromArray(T,ae*3,Se),ge,Se),be=h.subtract(h.fromArray(T,(ae-J)*3,be),ge,be),P=h.normalize(h.add(Se,be,P),P),nd(D,v,P,O,void 0,t),O+=3}else{for(nd(D,v,P,O,void 0,t),O+=3,ie=g,ae=E,J=0;J<he.length/3;J++)ge=h.fromArray(he,J*3,ge),k[H++]=ie,k[H++]=ae+J,k[H++]=ae+J+1,Ni.addAttribute(T,ge,O),Se=h.fromArray(T,ie*3,Se),be=h.fromArray(T,(ae+J)*3,be),P=h.normalize(h.subtract(Se,be,P),P),nd(D,v,P,O,void 0,t),O+=3;ge=h.fromArray(T,ie*3,ge),Se=h.subtract(h.fromArray(T,(ae+J)*3,Se),ge,Se),be=h.subtract(h.fromArray(T,ae*3,be),ge,be),P=h.normalize(h.negate(h.add(be,Se,P),P),P),nd(D,v,P,void 0,I,t),I-=3}for(j=i[F++],X=i[F++],j.splice(0,3),X.splice(X.length-3,3),T.set(j,O),T.set(X,I-X.length+1),m=X.length-3,Y+=3,P=h.fromArray(s,Y,P),J=0;J<X.length;J+=3)W=n.geodeticSurfaceNormal(h.fromArray(j,J,k_),k_),$=n.geodeticSurfaceNormal(h.fromArray(X,m-J,MA),MA),v=h.normalize(h.add(W,$,v),v),nd(D,v,P,O,I,t),E=O/3,N=E-1,g=(I-2)/3,L=g+1,k[H++]=L,k[H++]=N,k[H++]=g,k[H++]=g,k[H++]=N,k[H++]=E,O+=3,I-=3;O-=3,I+=3}if(v=h.fromArray(a,a.length-3,v),nd(D,v,P,O,I,t),x){O+=3,I-=3,V=zI,M=HI;let J=r[1];for(p=0;p<U;p++)V=h.fromArray(J,(C-p-1)*3,V),M=h.fromArray(J,p*3,M),Ni.addAttribute(T,V,void 0,I),Ni.addAttribute(T,M,O),nd(D,v,P,O,I,t),E=O/3,N=E-1,g=(I-2)/3,L=g+1,k[H++]=L,k[H++]=N,k[H++]=g,k[H++]=g,k[H++]=N,k[H++]=E,O+=3,I-=3}if(c.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:T}),t.st){let J=new Float32Array(A/3*2),ce,he,ie=0;if(x){f/=3,d/=3;let ae=Math.PI/(C+1);he=1/(f-C+1),ce=1/(d-C+1);let ge,Se=C/2;for(p=Se+1;p<C+1;p++)ge=R.PI_OVER_TWO+ae*p,J[ie++]=ce*(1+Math.cos(ge)),J[ie++]=.5*(1+Math.sin(ge));for(p=1;p<d-C+1;p++)J[ie++]=p*ce,J[ie++]=0;for(p=C;p>Se;p--)ge=R.PI_OVER_TWO-p*ae,J[ie++]=1-ce*(1+Math.cos(ge)),J[ie++]=.5*(1+Math.sin(ge));for(p=Se;p>0;p--)ge=R.PI_OVER_TWO-ae*p,J[ie++]=1-he*(1+Math.cos(ge)),J[ie++]=.5*(1+Math.sin(ge));for(p=f-C;p>0;p--)J[ie++]=p*he,J[ie++]=1;for(p=1;p<Se+1;p++)ge=R.PI_OVER_TWO+ae*p,J[ie++]=he*(1+Math.cos(ge)),J[ie++]=.5*(1+Math.sin(ge))}else{for(f/=3,d/=3,he=1/(f-1),ce=1/(d-1),p=0;p<d;p++)J[ie++]=p*ce,J[ie++]=0;for(p=f;p>0;p--)J[ie++]=(p-1)*he,J[ie++]=1}c.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:J})}return t.normal&&(c.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:D.normals})),t.tangent&&(c.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:D.tangents})),t.bitangent&&(c.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:D.bitangents})),{attributes:c,indices:k}}function PPe(e,t){if(!t.normal&&!t.tangent&&!t.bitangent&&!t.st)return e;let n=e.position.values,i,o;(t.normal||t.bitangent)&&(i=e.normal.values,o=e.bitangent.values);let r=e.position.values.length/18,s=r*3,a=r*2,c=s*2,u;if(t.normal||t.bitangent||t.tangent){let f=t.normal?new Float32Array(s*6):void 0,d=t.tangent?new Float32Array(s*6):void 0,p=t.bitangent?new Float32Array(s*6):void 0,_=iQ,m=oQ,x=zI,C=HI,A=DPe,T=rQ,b=c;for(u=0;u<s;u+=3){let S=b+c;_=h.fromArray(n,u,_),m=h.fromArray(n,u+s,m),x=h.fromArray(n,(u+3)%s,x),m=h.subtract(m,_,m),x=h.subtract(x,_,x),C=h.normalize(h.cross(m,x,C),C),t.normal&&(Ni.addAttribute(f,C,S),Ni.addAttribute(f,C,S+3),Ni.addAttribute(f,C,b),Ni.addAttribute(f,C,b+3)),(t.tangent||t.bitangent)&&(T=h.fromArray(i,u,T),t.bitangent&&(Ni.addAttribute(p,T,S),Ni.addAttribute(p,T,S+3),Ni.addAttribute(p,T,b),Ni.addAttribute(p,T,b+3)),t.tangent&&(A=h.normalize(h.cross(T,C,A),A),Ni.addAttribute(d,A,S),Ni.addAttribute(d,A,S+3),Ni.addAttribute(d,A,b),Ni.addAttribute(d,A,b+3))),b+=6}if(t.normal){for(f.set(i),u=0;u<s;u+=3)f[u+s]=-i[u],f[u+s+1]=-i[u+1],f[u+s+2]=-i[u+2];e.normal.values=f}else e.normal=void 0;if(t.bitangent?(p.set(o),p.set(o,s),e.bitangent.values=p):e.bitangent=void 0,t.tangent){let S=e.tangent.values;d.set(S),d.set(S,s),e.tangent.values=d}}if(t.st){let f=e.st.values,d=new Float32Array(a*6);d.set(f),d.set(f,a);let p=a*2;for(let _=0;_<2;_++){for(d[p++]=f[0],d[p++]=f[1],u=2;u<a;u+=2){let m=f[u],x=f[u+1];d[p++]=m,d[p++]=x,d[p++]=m,d[p++]=x}d[p++]=f[0],d[p++]=f[1]}e.st.values=d}return e}function D5(e,t,n){n[t++]=e[0],n[t++]=e[1],n[t++]=e[2];for(let i=3;i<e.length;i+=3){let o=e[i],r=e[i+1],s=e[i+2];n[t++]=o,n[t++]=r,n[t++]=s,n[t++]=o,n[t++]=r,n[t++]=s}return n[t++]=e[0],n[t++]=e[1],n[t++]=e[2],n}function IPe(e,t){let n=new Pe({position:t.position,normal:t.normal||t.bitangent||e.shadowVolume,tangent:t.tangent,bitangent:t.normal||t.bitangent,st:t.st}),i=e.ellipsoid,o=Ni.computePositions(e),r=aQ(o,n,i),s=e.height,a=e.extrudedHeight,c=r.attributes,u=r.indices,f=c.position.values,d=f.length,p=new Float64Array(d*6),_=new Float64Array(d);_.set(f);let m=new Float64Array(d*4);f=ti.scaleToGeodeticHeight(f,s,i),m=D5(f,0,m),_=ti.scaleToGeodeticHeight(_,a,i),m=D5(_,d*2,m),p.set(f),p.set(_,d),p.set(m,d*2),c.position.values=p,c=PPe(c,t);let x,C=d/3;if(e.shadowVolume){let L=c.normal.values;d=L.length;let N=new Float32Array(d*6);for(x=0;x<d;x++)L[x]=-L[x];N.set(L,d),N=D5(L,d*4,N),c.extrudeDirection=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:N}),t.normal||(c.normal=void 0)}if(l(e.offsetAttribute)){let L=new Uint8Array(C*6);if(e.offsetAttribute===tn.TOP)L=L.fill(1,0,C).fill(1,C*2,C*4);else{let N=e.offsetAttribute===tn.NONE?0:1;L=L.fill(N)}c.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:L})}let A=u.length,T=C+C,b=Ne.createTypedArray(p.length/3,A*2+T*3);b.set(u);let S=A;for(x=0;x<A;x+=3){let L=u[x],N=u[x+1],g=u[x+2];b[S++]=g+C,b[S++]=N+C,b[S++]=L+C}let w,D,O,I;for(x=0;x<T;x+=2)w=x+T,D=w+T,O=w+1,I=D+1,b[S++]=w,b[S++]=D,b[S++]=O,b[S++]=O,b[S++]=D,b[S++]=I;return{attributes:c,indices:b}}var tQ=new h,FS=new h,ku=new me;function nQ(e,t,n,i,o,r){let s=h.subtract(t,e,tQ);h.normalize(s,s);let a=n.geodeticSurfaceNormal(e,FS),c=h.cross(s,a,tQ);h.multiplyByScalar(c,i,c);let u=o.latitude,f=o.longitude,d=r.latitude,p=r.longitude;h.add(e,c,FS),n.cartesianToCartographic(FS,ku);let _=ku.latitude,m=ku.longitude;u=Math.min(u,_),f=Math.min(f,m),d=Math.max(d,_),p=Math.max(p,m),h.subtract(e,c,FS),n.cartesianToCartographic(FS,ku),_=ku.latitude,m=ku.longitude,u=Math.min(u,_),f=Math.min(f,m),d=Math.max(d,_),p=Math.max(p,m),o.latitude=u,o.longitude=f,r.latitude=d,r.longitude=p}var Vu=new h,VS=new h,al=new me,cl=new me;function cQ(e,t,n,i,o){e=sQ(e,t);let r=So(e,h.equalsEpsilon),s=r.length;if(s<2||n<=0)return new de;let a=n*.5;al.latitude=Number.POSITIVE_INFINITY,al.longitude=Number.POSITIVE_INFINITY,cl.latitude=Number.NEGATIVE_INFINITY,cl.longitude=Number.NEGATIVE_INFINITY;let c,u;if(i===Ii.ROUNDED){let p=r[0];h.subtract(p,r[1],Vu),h.normalize(Vu,Vu),h.multiplyByScalar(Vu,a,Vu),h.add(p,Vu,VS),t.cartesianToCartographic(VS,ku),c=ku.latitude,u=ku.longitude,al.latitude=Math.min(al.latitude,c),al.longitude=Math.min(al.longitude,u),cl.latitude=Math.max(cl.latitude,c),cl.longitude=Math.max(cl.longitude,u)}for(let p=0;p<s-1;++p)nQ(r[p],r[p+1],t,a,al,cl);let f=r[s-1];h.subtract(f,r[s-2],Vu),h.normalize(Vu,Vu),h.multiplyByScalar(Vu,a,Vu),h.add(f,Vu,VS),nQ(f,VS,t,a,al,cl),i===Ii.ROUNDED&&(t.cartesianToCartographic(VS,ku),c=ku.latitude,u=ku.longitude,al.latitude=Math.min(al.latitude,c),al.longitude=Math.min(al.longitude,u),cl.latitude=Math.max(cl.latitude,c),cl.longitude=Math.max(cl.longitude,u));let d=l(o)?o:new de;return d.north=cl.latitude,d.south=al.latitude,d.east=cl.longitude,d.west=al.longitude,d}function Qm(e){e=y(e,y.EMPTY_OBJECT);let t=e.positions,n=e.width,i=y(e.height,0),o=y(e.extrudedHeight,i);this._positions=t,this._ellipsoid=re.clone(y(e.ellipsoid,re.WGS84)),this._vertexFormat=Pe.clone(y(e.vertexFormat,Pe.DEFAULT)),this._width=n,this._height=Math.max(i,o),this._extrudedHeight=Math.min(i,o),this._cornerType=y(e.cornerType,Ii.ROUNDED),this._granularity=y(e.granularity,R.RADIANS_PER_DEGREE),this._shadowVolume=y(e.shadowVolume,!1),this._workerName="createCorridorGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this.packedLength=1+t.length*h.packedLength+re.packedLength+Pe.packedLength+7}Qm.pack=function(e,t,n){n=y(n,0);let i=e._positions,o=i.length;t[n++]=o;for(let r=0;r<o;++r,n+=h.packedLength)h.pack(i[r],t,n);return re.pack(e._ellipsoid,t,n),n+=re.packedLength,Pe.pack(e._vertexFormat,t,n),n+=Pe.packedLength,t[n++]=e._width,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._cornerType,t[n++]=e._granularity,t[n++]=e._shadowVolume?1:0,t[n]=y(e._offsetAttribute,-1),t};var lQ=re.clone(re.UNIT_SPHERE),uQ=new Pe,Jm={positions:void 0,ellipsoid:lQ,vertexFormat:uQ,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,shadowVolume:void 0,offsetAttribute:void 0};Qm.unpack=function(e,t,n){t=y(t,0);let i=e[t++],o=new Array(i);for(let m=0;m<i;++m,t+=h.packedLength)o[m]=h.unpack(e,t);let r=re.unpack(e,t,lQ);t+=re.packedLength;let s=Pe.unpack(e,t,uQ);t+=Pe.packedLength;let a=e[t++],c=e[t++],u=e[t++],f=e[t++],d=e[t++],p=e[t++]===1,_=e[t];return l(n)?(n._positions=o,n._ellipsoid=re.clone(r,n._ellipsoid),n._vertexFormat=Pe.clone(s,n._vertexFormat),n._width=a,n._height=c,n._extrudedHeight=u,n._cornerType=f,n._granularity=d,n._shadowVolume=p,n._offsetAttribute=_===-1?void 0:_,n):(Jm.positions=o,Jm.width=a,Jm.height=c,Jm.extrudedHeight=u,Jm.cornerType=f,Jm.granularity=d,Jm.shadowVolume=p,Jm.offsetAttribute=_===-1?void 0:_,new Qm(Jm))};Qm.computeRectangle=function(e,t){e=y(e,y.EMPTY_OBJECT);let n=e.positions,i=e.width,o=y(e.ellipsoid,re.WGS84),r=y(e.cornerType,Ii.ROUNDED);return cQ(n,o,i,r,t)};Qm.createGeometry=function(e){let t=e._positions,n=e._width,i=e._ellipsoid;t=sQ(t,i);let o=So(t,h.equalsEpsilon);if(o.length<2||n<=0)return;let r=e._height,s=e._extrudedHeight,a=!R.equalsEpsilon(r,s,0,R.EPSILON2),c=e._vertexFormat,u={ellipsoid:i,positions:o,width:n,cornerType:e._cornerType,granularity:e._granularity,saveAttributes:!0},f;if(a)u.height=r,u.extrudedHeight=s,u.shadowVolume=e._shadowVolume,u.offsetAttribute=e._offsetAttribute,f=IPe(u,c);else{let _=Ni.computePositions(u);if(f=aQ(_,c,i),f.attributes.position.values=ti.scaleToGeodeticHeight(f.attributes.position.values,r,i),l(e._offsetAttribute)){let m=e._offsetAttribute===tn.NONE?0:1,x=f.attributes.position.values.length,C=new Uint8Array(x/3).fill(m);f.attributes.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:C})}}let d=f.attributes,p=oe.fromVertices(d.position.values,void 0,3);return c.position||(f.attributes.position.values=void 0),new ct({attributes:d,indices:f.indices,primitiveType:Le.TRIANGLES,boundingSphere:p,offsetAttribute:e._offsetAttribute})};Qm.createShadowVolume=function(e,t,n){let i=e._granularity,o=e._ellipsoid,r=t(i,o),s=n(i,o);return new Qm({positions:e._positions,width:e._width,cornerType:e._cornerType,ellipsoid:o,granularity:i,extrudedHeight:r,height:s,vertexFormat:Pe.POSITION_ONLY,shadowVolume:!0})};Object.defineProperties(Qm.prototype,{rectangle:{get:function(){return l(this._rectangle)||(this._rectangle=cQ(this._positions,this._ellipsoid,this._width,this._cornerType)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return[0,0,0,1,1,0]}}});var BA=Qm;var fQ=new h,dQ=new h,OPe=new h;function RPe(e,t){for(let n=0;n<e.length;n++)e[n]=t.scaleToGeodeticSurface(e[n],e[n]);return e}function hQ(e,t){let n=[],i=e.positions,o=e.corners,r=e.endPositions,s=new ln,a,c=0,u=0,f,d=0,p;for(f=0;f<i.length;f+=2)p=i[f].length-3,c+=p,d+=p/3*4,u+=i[f+1].length-3;for(c+=3,u+=3,f=0;f<o.length;f++){a=o[f];let M=o[f].leftPositions;l(M)?(p=M.length,c+=p,d+=p/3*2):(p=o[f].rightPositions.length,u+=p,d+=p/3*2)}let _=l(r),m;_&&(m=r[0].length-3,c+=m,u+=m,m/=3,d+=m*4);let x=c+u,C=new Float64Array(x),A=0,T=x-1,b,S,w,D,O,I,L=m/2,N=Ne.createTypedArray(x/3,d+4),g=0;if(N[g++]=A/3,N[g++]=(T-2)/3,_){n.push(A/3),I=fQ,O=dQ;let M=r[0];for(f=0;f<L;f++)I=h.fromArray(M,(L-1-f)*3,I),O=h.fromArray(M,(L+f)*3,O),Ni.addAttribute(C,O,A),Ni.addAttribute(C,I,void 0,T),S=A/3,D=S+1,b=(T-2)/3,w=b-1,N[g++]=b,N[g++]=w,N[g++]=S,N[g++]=D,A+=3,T-=3}let E=0,v=i[E++],P=i[E++];for(C.set(v,A),C.set(P,T-P.length+1),p=P.length-3,n.push(A/3,(T-2)/3),f=0;f<p;f+=3)S=A/3,D=S+1,b=(T-2)/3,w=b-1,N[g++]=b,N[g++]=w,N[g++]=S,N[g++]=D,A+=3,T-=3;for(f=0;f<o.length;f++){let M;a=o[f];let V=a.leftPositions,U=a.rightPositions,k,H=OPe;if(l(V)){for(T-=3,k=w,n.push(D),M=0;M<V.length/3;M++)H=h.fromArray(V,M*3,H),N[g++]=k-M-1,N[g++]=k-M,Ni.addAttribute(C,H,void 0,T),T-=3;n.push(k-Math.floor(V.length/6)),t===Ii.BEVELED&&n.push((T-2)/3+1),A+=3}else{for(A+=3,k=D,n.push(w),M=0;M<U.length/3;M++)H=h.fromArray(U,M*3,H),N[g++]=k+M,N[g++]=k+M+1,Ni.addAttribute(C,H,A),A+=3;n.push(k+Math.floor(U.length/6)),t===Ii.BEVELED&&n.push(A/3-1),T-=3}for(v=i[E++],P=i[E++],v.splice(0,3),P.splice(P.length-3,3),C.set(v,A),C.set(P,T-P.length+1),p=P.length-3,M=0;M<P.length;M+=3)D=A/3,S=D-1,w=(T-2)/3,b=w+1,N[g++]=b,N[g++]=w,N[g++]=S,N[g++]=D,A+=3,T-=3;A-=3,T+=3,n.push(A/3,(T-2)/3)}if(_){A+=3,T-=3,I=fQ,O=dQ;let M=r[1];for(f=0;f<L;f++)I=h.fromArray(M,(m-f-1)*3,I),O=h.fromArray(M,f*3,O),Ni.addAttribute(C,I,void 0,T),Ni.addAttribute(C,O,A),D=A/3,S=D-1,w=(T-2)/3,b=w+1,N[g++]=b,N[g++]=w,N[g++]=S,N[g++]=D,A+=3,T-=3;n.push(A/3)}else n.push(A/3,(T-2)/3);return N[g++]=A/3,N[g++]=(T-2)/3,s.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:C}),{attributes:s,indices:N,wallIndices:n}}function MPe(e){let t=e.ellipsoid,n=Ni.computePositions(e),i=hQ(n,e.cornerType),o=i.wallIndices,r=e.height,s=e.extrudedHeight,a=i.attributes,c=i.indices,u=a.position.values,f=u.length,d=new Float64Array(f);d.set(u);let p=new Float64Array(f*2);if(u=ti.scaleToGeodeticHeight(u,r,t),d=ti.scaleToGeodeticHeight(d,s,t),p.set(u),p.set(d,f),a.position.values=p,f/=3,l(e.offsetAttribute)){let b=new Uint8Array(f*2);if(e.offsetAttribute===tn.TOP)b=b.fill(1,0,f);else{let S=e.offsetAttribute===tn.NONE?0:1;b=b.fill(S)}a.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:b})}let _,m=c.length,x=Ne.createTypedArray(p.length/3,(m+o.length)*2);x.set(c);let C=m;for(_=0;_<m;_+=2){let b=c[_],S=c[_+1];x[C++]=b+f,x[C++]=S+f}let A,T;for(_=0;_<o.length;_++)A=o[_],T=A+f,x[C++]=A,x[C++]=T;return{attributes:a,indices:x}}function kS(e){e=y(e,y.EMPTY_OBJECT);let t=e.positions,n=e.width,i=y(e.height,0),o=y(e.extrudedHeight,i);this._positions=t,this._ellipsoid=re.clone(y(e.ellipsoid,re.WGS84)),this._width=n,this._height=Math.max(i,o),this._extrudedHeight=Math.min(i,o),this._cornerType=y(e.cornerType,Ii.ROUNDED),this._granularity=y(e.granularity,R.RADIANS_PER_DEGREE),this._offsetAttribute=e.offsetAttribute,this._workerName="createCorridorOutlineGeometry",this.packedLength=1+t.length*h.packedLength+re.packedLength+6}kS.pack=function(e,t,n){n=y(n,0);let i=e._positions,o=i.length;t[n++]=o;for(let r=0;r<o;++r,n+=h.packedLength)h.pack(i[r],t,n);return re.pack(e._ellipsoid,t,n),n+=re.packedLength,t[n++]=e._width,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._cornerType,t[n++]=e._granularity,t[n]=y(e._offsetAttribute,-1),t};var mQ=re.clone(re.UNIT_SPHERE),U_={positions:void 0,ellipsoid:mQ,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,offsetAttribute:void 0};kS.unpack=function(e,t,n){t=y(t,0);let i=e[t++],o=new Array(i);for(let p=0;p<i;++p,t+=h.packedLength)o[p]=h.unpack(e,t);let r=re.unpack(e,t,mQ);t+=re.packedLength;let s=e[t++],a=e[t++],c=e[t++],u=e[t++],f=e[t++],d=e[t];return l(n)?(n._positions=o,n._ellipsoid=re.clone(r,n._ellipsoid),n._width=s,n._height=a,n._extrudedHeight=c,n._cornerType=u,n._granularity=f,n._offsetAttribute=d===-1?void 0:d,n):(U_.positions=o,U_.width=s,U_.height=a,U_.extrudedHeight=c,U_.cornerType=u,U_.granularity=f,U_.offsetAttribute=d===-1?void 0:d,new kS(U_))};kS.createGeometry=function(e){let t=e._positions,n=e._width,i=e._ellipsoid;t=RPe(t,i);let o=So(t,h.equalsEpsilon);if(o.length<2||n<=0)return;let r=e._height,s=e._extrudedHeight,a=!R.equalsEpsilon(r,s,0,R.EPSILON2),c={ellipsoid:i,positions:o,width:n,cornerType:e._cornerType,granularity:e._granularity,saveAttributes:!1},u;if(a)c.height=r,c.extrudedHeight=s,c.offsetAttribute=e._offsetAttribute,u=MPe(c);else{let p=Ni.computePositions(c);if(u=hQ(p,c.cornerType),u.attributes.position.values=ti.scaleToGeodeticHeight(u.attributes.position.values,r,i),l(e._offsetAttribute)){let _=u.attributes.position.values.length,m=e._offsetAttribute===tn.NONE?0:1,x=new Uint8Array(_/3).fill(m);u.attributes.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:x})}}let f=u.attributes,d=oe.fromVertices(f.position.values,void 0,3);return new ct({attributes:f,indices:u.indices,primitiveType:Le.LINES,boundingSphere:d,offsetAttribute:e._offsetAttribute})};var GI=kS;function BPe(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}var Mn=BPe;var P5,pQ="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIyNDBiMjBhOS1jZWE5LTRmYWYtOGI3Yy05ZDg3ODBiZDZiZjUiLCJpZCI6MjU5LCJpYXQiOjE2NTkzNjE0MTJ9.tXPPvw93XpCGHG71h7s_mMLlWGCuAL55o8LC309hLAg",WI={};WI.defaultAccessToken=pQ;WI.defaultServer=new De({url:"https://api.cesium.com/"});WI.getDefaultTokenCredit=function(e){if(e===pQ){if(!l(P5)){let t=`<b> This application is using Cesium's default ion access token. Please assign <i>Cesium.Ion.defaultAccessToken</i> with an access token from your ion account before making any Cesium API calls. You can sign up for a free ion account at <a href="https://cesium.com">https://cesium.com</a>.</b>`;P5=new Ht(t,!0)}return P5}};var wh=WI;function Cc(e,t){let n,i=e.externalType,o=l(i);if(!o)n={url:e.url,retryAttempts:1,retryCallback:LPe};else if(i==="3DTILES"||i==="STK_TERRAIN_SERVER")n={url:e.options.url};else throw new fe("Ion.createResource does not support external imagery assets; use IonImageryProvider instead.");De.call(this,n),this._ionEndpoint=e,this._ionEndpointDomain=o?void 0:new ei.default(e.url).authority(),this._ionEndpointResource=t,this._ionRoot=void 0,this._pendingPromise=void 0,this._credits=void 0,this._isExternal=o}l(Object.create)&&(Cc.prototype=Object.create(De.prototype),Cc.prototype.constructor=Cc);Cc.fromAssetId=function(e,t){let n=Cc._createEndpointResource(e,t);return n.fetchJson().then(function(i){return new Cc(i,n)})};Object.defineProperties(Cc.prototype,{credits:{get:function(){return l(this._ionRoot)?this._ionRoot.credits:l(this._credits)?this._credits:(this._credits=Cc.getCreditsFromEndpoint(this._ionEndpoint,this._ionEndpointResource),this._credits)}}});Cc.getCreditsFromEndpoint=function(e,t){let n=e.attributions.map(Ht.getIonCredit),i=wh.getDefaultTokenCredit(t.queryParameters.access_token);return l(i)&&n.push(Ht.clone(i)),n};Cc.prototype.clone=function(e){let t=y(this._ionRoot,this);return l(e)||(e=new Cc(t._ionEndpoint,t._ionEndpointResource)),e=De.prototype.clone.call(this,e),e._ionRoot=t,e._isExternal=this._isExternal,e};Cc.prototype.fetchImage=function(e){if(!this._isExternal){let t=e;e={preferBlob:!0},l(t)&&(e.flipY=t.flipY,e.preferImageBitmap=t.preferImageBitmap)}return De.prototype.fetchImage.call(this,e)};Cc.prototype._makeRequest=function(e){return this._isExternal||new ei.default(this.url).authority()!==this._ionEndpointDomain?De.prototype._makeRequest.call(this,e):(l(e.headers)||(e.headers={}),e.headers.Authorization=`Bearer ${this._ionEndpoint.accessToken}`,De.prototype._makeRequest.call(this,e))};Cc._createEndpointResource=function(e,t){t=y(t,y.EMPTY_OBJECT);let n=y(t.server,wh.defaultServer),i=y(t.accessToken,wh.defaultAccessToken);n=De.createIfNeeded(n);let o={url:`v1/assets/${e}/endpoint`};return l(i)&&(o.queryParameters={access_token:i}),n.getDerivedResource(o)};function LPe(e,t){let n=y(e._ionRoot,e),i=n._ionEndpointResource,o=typeof Image<"u";return!l(t)||t.statusCode!==401&&!(o&&t.target instanceof Image)?Promise.resolve(!1):(l(n._pendingPromise)||(n._pendingPromise=i.fetchJson().then(function(r){return n._ionEndpoint=r,r}).finally(function(r){return n._pendingPromise=void 0,r})),n._pendingPromise.then(function(r){return e._ionEndpoint=r,!0}))}var vh=Cc;function NPe(e){return e=y(e,y.EMPTY_OBJECT),new hI({url:vh.fromAssetId(1),requestVertexNormals:y(e.requestVertexNormals,!1),requestWaterMask:y(e.requestWaterMask,!1)})}var jI=NPe;function Uu(e){this.planes=y(e,[])}var US=[new h,new h,new h];h.clone(h.UNIT_X,US[0]);h.clone(h.UNIT_Y,US[1]);h.clone(h.UNIT_Z,US[2]);var z_=new h,FPe=new h,_Q=new rn(new h(1,0,0),0);Uu.fromBoundingSphere=function(e,t){l(t)||(t=new Uu);let n=US.length,i=t.planes;i.length=2*n;let o=e.center,r=e.radius,s=0;for(let a=0;a<n;++a){let c=US[a],u=i[s],f=i[s+1];l(u)||(u=i[s]=new se),l(f)||(f=i[s+1]=new se),h.multiplyByScalar(c,-r,z_),h.add(o,z_,z_),u.x=c.x,u.y=c.y,u.z=c.z,u.w=-h.dot(c,z_),h.multiplyByScalar(c,r,z_),h.add(o,z_,z_),f.x=-c.x,f.y=-c.y,f.z=-c.z,f.w=-h.dot(h.negate(c,FPe),z_),s+=2}return t};Uu.prototype.computeVisibility=function(e){let t=this.planes,n=!1;for(let i=0,o=t.length;i<o;++i){let r=e.intersectPlane(rn.fromCartesian4(t[i],_Q));if(r===Zt.OUTSIDE)return Zt.OUTSIDE;r===Zt.INTERSECTING&&(n=!0)}return n?Zt.INTERSECTING:Zt.INSIDE};Uu.prototype.computeVisibilityWithPlaneMask=function(e,t){if(t===Uu.MASK_OUTSIDE||t===Uu.MASK_INSIDE)return t;let n=Uu.MASK_INSIDE,i=this.planes;for(let o=0,r=i.length;o<r;++o){let s=o<31?1<<o:0;if(o<31&&(t&s)===0)continue;let a=e.intersectPlane(rn.fromCartesian4(i[o],_Q));if(a===Zt.OUTSIDE)return Uu.MASK_OUTSIDE;a===Zt.INTERSECTING&&(n|=s)}return n};Uu.MASK_OUTSIDE=4294967295;Uu.MASK_INSIDE=0;Uu.MASK_INDETERMINATE=2147483647;var da=Uu;function LA(e){e=y(e,y.EMPTY_OBJECT),this._callback=e.callback,this._tilingScheme=e.tilingScheme,l(this._tilingScheme)||(this._tilingScheme=new Xi({ellipsoid:y(e.ellipsoid,re.WGS84)})),this._width=e.width,this._height=e.height;let t=Math.max(this._width,this._height);this._levelZeroMaximumGeometricError=es.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,t,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._errorEvent=new _e;let n=e.credit;typeof n=="string"&&(n=new Ht(n)),this._credit=n,this._readyPromise=Promise.resolve(!0)}Object.defineProperties(LA.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}});LA.prototype.requestTileGeometry=function(e,t,n,i){let o=this._callback(e,t,n);if(!l(o))return;let r=this._width,s=this._height;return Promise.resolve(o).then(function(a){let c=a;return Array.isArray(c)&&(c=new Float64Array(c)),new ka({buffer:c,width:r,height:s})})};LA.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};LA.prototype.getTileDataAvailable=function(e,t,n){};LA.prototype.loadTileDataAvailability=function(e,t,n){};var gQ=LA;var yQ={};yQ.computePositions=function(e,t,n,i,o){let r=e*.5,s=-r,a=i+i,c=o?2*a:a,u=new Float64Array(c*3),f,d=0,p=0,_=o?a*3:0,m=o?(a+i)*3:i*3;for(f=0;f<i;f++){let x=f/i*R.TWO_PI,C=Math.cos(x),A=Math.sin(x),T=C*n,b=A*n,S=C*t,w=A*t;u[p+_]=T,u[p+_+1]=b,u[p+_+2]=s,u[p+m]=S,u[p+m+1]=w,u[p+m+2]=r,p+=3,o&&(u[d++]=T,u[d++]=b,u[d++]=s,u[d++]=S,u[d++]=w,u[d++]=r)}return u};var NA=yQ;var I5=new G,VPe=new h,kPe=new h,UPe=new h,zPe=new h;function ep(e){e=y(e,y.EMPTY_OBJECT);let t=e.length,n=e.topRadius,i=e.bottomRadius,o=y(e.vertexFormat,Pe.DEFAULT),r=y(e.slices,128);this._length=t,this._topRadius=n,this._bottomRadius=i,this._vertexFormat=Pe.clone(o),this._slices=r,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderGeometry"}ep.packedLength=Pe.packedLength+5;ep.pack=function(e,t,n){return n=y(n,0),Pe.pack(e._vertexFormat,t,n),n+=Pe.packedLength,t[n++]=e._length,t[n++]=e._topRadius,t[n++]=e._bottomRadius,t[n++]=e._slices,t[n]=y(e._offsetAttribute,-1),t};var xQ=new Pe,FA={vertexFormat:xQ,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0};ep.unpack=function(e,t,n){t=y(t,0);let i=Pe.unpack(e,t,xQ);t+=Pe.packedLength;let o=e[t++],r=e[t++],s=e[t++],a=e[t++],c=e[t];return l(n)?(n._vertexFormat=Pe.clone(i,n._vertexFormat),n._length=o,n._topRadius=r,n._bottomRadius=s,n._slices=a,n._offsetAttribute=c===-1?void 0:c,n):(FA.length=o,FA.topRadius=r,FA.bottomRadius=s,FA.slices=a,FA.offsetAttribute=c===-1?void 0:c,new ep(FA))};ep.createGeometry=function(e){let t=e._length,n=e._topRadius,i=e._bottomRadius,o=e._vertexFormat,r=e._slices;if(t<=0||n<0||i<0||n===0&&i===0)return;let s=r+r,a=r+s,c=s+s,u=NA.computePositions(t,n,i,r,!0),f=o.st?new Float32Array(c*2):void 0,d=o.normal?new Float32Array(c*3):void 0,p=o.tangent?new Float32Array(c*3):void 0,_=o.bitangent?new Float32Array(c*3):void 0,m,x=o.normal||o.tangent||o.bitangent;if(x){let O=o.tangent||o.bitangent,I=0,L=0,N=0,g=Math.atan2(i-n,t),E=VPe;E.z=Math.sin(g);let v=Math.cos(g),P=UPe,M=kPe;for(m=0;m<r;m++){let V=m/r*R.TWO_PI,U=v*Math.cos(V),k=v*Math.sin(V);x&&(E.x=U,E.y=k,O&&(P=h.normalize(h.cross(h.UNIT_Z,E,P),P)),o.normal&&(d[I++]=E.x,d[I++]=E.y,d[I++]=E.z,d[I++]=E.x,d[I++]=E.y,d[I++]=E.z),o.tangent&&(p[L++]=P.x,p[L++]=P.y,p[L++]=P.z,p[L++]=P.x,p[L++]=P.y,p[L++]=P.z),o.bitangent&&(M=h.normalize(h.cross(E,P,M),M),_[N++]=M.x,_[N++]=M.y,_[N++]=M.z,_[N++]=M.x,_[N++]=M.y,_[N++]=M.z))}for(m=0;m<r;m++)o.normal&&(d[I++]=0,d[I++]=0,d[I++]=-1),o.tangent&&(p[L++]=1,p[L++]=0,p[L++]=0),o.bitangent&&(_[N++]=0,_[N++]=-1,_[N++]=0);for(m=0;m<r;m++)o.normal&&(d[I++]=0,d[I++]=0,d[I++]=1),o.tangent&&(p[L++]=1,p[L++]=0,p[L++]=0),o.bitangent&&(_[N++]=0,_[N++]=1,_[N++]=0)}let C=12*r-12,A=Ne.createTypedArray(c,C),T=0,b=0;for(m=0;m<r-1;m++)A[T++]=b,A[T++]=b+2,A[T++]=b+3,A[T++]=b,A[T++]=b+3,A[T++]=b+1,b+=2;for(A[T++]=s-2,A[T++]=0,A[T++]=1,A[T++]=s-2,A[T++]=1,A[T++]=s-1,m=1;m<r-1;m++)A[T++]=s+m+1,A[T++]=s+m,A[T++]=s;for(m=1;m<r-1;m++)A[T++]=a,A[T++]=a+m,A[T++]=a+m+1;let S=0;if(o.st){let O=Math.max(n,i);for(m=0;m<c;m++){let I=h.fromArray(u,m*3,zPe);f[S++]=(I.x+O)/(2*O),f[S++]=(I.y+O)/(2*O)}}let w=new ln;o.position&&(w.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:u})),o.normal&&(w.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:d})),o.tangent&&(w.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:p})),o.bitangent&&(w.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:_})),o.st&&(w.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:f})),I5.x=t*.5,I5.y=Math.max(i,n);let D=new oe(h.ZERO,G.magnitude(I5));if(l(e._offsetAttribute)){t=u.length;let O=e._offsetAttribute===tn.NONE?0:1,I=new Uint8Array(t/3).fill(O);w.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:I})}return new ct({attributes:w,indices:A,primitiveType:Le.TRIANGLES,boundingSphere:D,offsetAttribute:e._offsetAttribute})};var O5;ep.getUnitCylinder=function(){return l(O5)||(O5=ep.createGeometry(new ep({topRadius:1,bottomRadius:1,length:1,vertexFormat:Pe.POSITION_ONLY}))),O5};var qI=ep;var R5=new G;function VA(e){e=y(e,y.EMPTY_OBJECT);let t=e.length,n=e.topRadius,i=e.bottomRadius,o=y(e.slices,128),r=Math.max(y(e.numberOfVerticalLines,16),0);this._length=t,this._topRadius=n,this._bottomRadius=i,this._slices=o,this._numberOfVerticalLines=r,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderOutlineGeometry"}VA.packedLength=6;VA.pack=function(e,t,n){return n=y(n,0),t[n++]=e._length,t[n++]=e._topRadius,t[n++]=e._bottomRadius,t[n++]=e._slices,t[n++]=e._numberOfVerticalLines,t[n]=y(e._offsetAttribute,-1),t};var Sy={length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};VA.unpack=function(e,t,n){t=y(t,0);let i=e[t++],o=e[t++],r=e[t++],s=e[t++],a=e[t++],c=e[t];return l(n)?(n._length=i,n._topRadius=o,n._bottomRadius=r,n._slices=s,n._numberOfVerticalLines=a,n._offsetAttribute=c===-1?void 0:c,n):(Sy.length=i,Sy.topRadius=o,Sy.bottomRadius=r,Sy.slices=s,Sy.numberOfVerticalLines=a,Sy.offsetAttribute=c===-1?void 0:c,new VA(Sy))};VA.createGeometry=function(e){let t=e._length,n=e._topRadius,i=e._bottomRadius,o=e._slices,r=e._numberOfVerticalLines;if(t<=0||n<0||i<0||n===0&&i===0)return;let s=o*2,a=NA.computePositions(t,n,i,o,!1),c=o*2,u;if(r>0){let x=Math.min(r,o);u=Math.round(o/x),c+=x}let f=Ne.createTypedArray(s,c*2),d=0,p;for(p=0;p<o-1;p++)f[d++]=p,f[d++]=p+1,f[d++]=p+o,f[d++]=p+1+o;if(f[d++]=o-1,f[d++]=0,f[d++]=o+o-1,f[d++]=o,r>0)for(p=0;p<o;p+=u)f[d++]=p,f[d++]=p+o;let _=new ln;_.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:a}),R5.x=t*.5,R5.y=Math.max(i,n);let m=new oe(h.ZERO,G.magnitude(R5));if(l(e._offsetAttribute)){t=a.length;let x=e._offsetAttribute===tn.NONE?0:1,C=new Uint8Array(t/3).fill(x);_.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:C})}return new ct({attributes:_,indices:f,primitiveType:Le.LINES,boundingSphere:m,offsetAttribute:e._offsetAttribute})};var YI=VA;var HPe=1953029805,GPe=2917034100;function M5(e,t){if(M5.passThroughDataForTesting)return t;let n=e.byteLength;if(n===0||n%4!==0)throw new fe("The length of key must be greater than 0 and a multiple of 4.");let i=new DataView(t),o=i.getUint32(0,!0);if(o===HPe||o===GPe)return t;let r=new DataView(e),s=0,a=t.byteLength,c=a-a%8,u=n,f,d=8;for(;s<c;)for(d=(d+8)%24,f=d;s<c&&f<u;)i.setUint32(s,i.getUint32(s,!0)^r.getUint32(f,!0),!0),i.setUint32(s+4,i.getUint32(s+4,!0)^r.getUint32(f+4,!0),!0),s+=8,f+=24;if(s<a)for(f>=u&&(d=(d+8)%24,f=d);s<a;)i.setUint8(s,i.getUint8(s)^r.getUint8(f)),s++,f++}M5.passThroughDataForTesting=!1;var XI=M5;var B5=32767,WPe=new me,jPe=new h;function qPe(e,t,n,i,o){let r=e.length/3,s=e.subarray(0,r),a=e.subarray(r,2*r),c=e.subarray(2*r,3*r);Pn.zigZagDeltaDecode(s,a,c);let u=new Float64Array(e.length);for(let f=0;f<r;++f){let d=s[f],p=a[f],_=c[f],m=R.lerp(t.west,t.east,d/B5),x=R.lerp(t.south,t.north,p/B5),C=R.lerp(n,i,_/B5),A=me.fromRadians(m,x,C,WPe),T=o.cartographicToCartesian(A,jPe);h.pack(T,u,f*3)}return u}var KI=qPe;function CQ(e){this.proxy=e}CQ.prototype.getURL=function(e){let t=this.proxy.indexOf("?")===-1?"?":"";return this.proxy+t+encodeURIComponent(e)};var AQ=CQ;function zl(e,t){e=y(e,0),this._near=e,t=y(t,Number.MAX_VALUE),this._far=t}Object.defineProperties(zl.prototype,{near:{get:function(){return this._near},set:function(e){this._near=e}},far:{get:function(){return this._far},set:function(e){this._far=e}}});zl.packedLength=2;zl.pack=function(e,t,n){return n=y(n,0),t[n++]=e.near,t[n]=e.far,t};zl.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new zl),n.near=e[t++],n.far=e[t],n};zl.equals=function(e,t){return e===t||l(e)&&l(t)&&e.near===t.near&&e.far===t.far};zl.clone=function(e,t){if(!!l(e))return l(t)||(t=new zl),t.near=e.near,t.far=e.far,t};zl.prototype.clone=function(e){return zl.clone(this,e)};zl.prototype.equals=function(e){return zl.equals(this,e)};var Tt=zl;function zS(e,t){e=y(e,0),t=y(t,Number.MAX_VALUE),this.value=new Float32Array([e,t])}Object.defineProperties(zS.prototype,{componentDatatype:{get:function(){return K.FLOAT}},componentsPerAttribute:{get:function(){return 2}},normalize:{get:function(){return!1}}});zS.fromDistanceDisplayCondition=function(e){return new zS(e.near,e.far)};zS.toValue=function(e,t){return l(t)?(t[0]=e.near,t[1]=e.far,t):new Float32Array([e.near,e.far])};var Fn=zS;function id(e){this._comparator=e.comparator,this._maximumLength=e.maximumLength,this._array=l(e.maximumLength)?new Array(e.maximumLength):[],this._length=0}Object.defineProperties(id.prototype,{length:{get:function(){return this._length}},maximumLength:{get:function(){return this._maximumLength},set:function(e){if(l(e)){for(;this._length>e;)this.removeMinimum();this._array.length=e}this._maximumLength=e}},internalArray:{get:function(){return this._array}},comparator:{get:function(){return this._comparator}}});id.prototype.clone=function(){let e=this._maximumLength,t=this._comparator,n=this._array,i=this._length,o=new id({comparator:t,maximumLength:e});o._length=i;for(let r=0;r<i;r++)o._array[r]=n[r];return o};id.prototype.reset=function(){this._length=0;let e=this._maximumLength;if(l(e))for(let t=0;t<e;t++)this._array[t]=void 0;else this._array.length=0};id.prototype.resort=function(){let e=this._length;for(let t=0;t<e;t++)TQ(this,t)};id.prototype.insert=function(e){let t,n=this._maximumLength;if(l(n)){if(n===0)return;if(this._length===n){let o=this._array[0];if(this._comparator(e,o)<=0)return e;t=this.removeMinimum()}}let i=this._length;return this._array[i]=e,this._length++,TQ(this,i),t};id.prototype.removeMinimum=function(){let e=this._length;if(e===0)return;this._length--;let t=this._array[0];return e>=2&&(this._array[0]=this._array[e-1],bQ(this,0)),this._array[e-1]=void 0,t};id.prototype.removeMaximum=function(){let e=this._length;if(e===0)return;this._length--;let t;if(e<=2)t=this._array[e-1];else{let n=L5(this,1,2)?1:2;t=this._array[n],this._array[n]=this._array[e-1],e>=4&&bQ(this,n)}return this._array[e-1]=void 0,t};id.prototype.getMinimum=function(){if(this._length!==0)return this._array[0]};id.prototype.getMaximum=function(){let e=this._length;if(e!==0)return e<=2?this._array[e-1]:this._array[L5(this,1,2)?1:2]};function $I(e,t,n){let i=e._array,o=i[t];i[t]=i[n],i[n]=o}function HS(e,t,n){return e._comparator(e._array[t],e._array[n])<0}function L5(e,t,n){return e._comparator(e._array[t],e._array[n])>0}function TQ(e,t){if(t===0)return;let n=Math.floor(R.log2(t+1))%2===0,i=Math.floor((t-1)/2),o=HS(e,t,i);for(o!==n&&($I(e,t,i),t=i);t>=3;){let r=Math.floor((t-3)/4);if(HS(e,t,r)!==o)break;$I(e,t,r),t=r}}function bQ(e,t){let n=e._length,i=Math.floor(R.log2(t+1))%2===0,o;for(;(o=2*t+1)<n;){let r=o,s=o+1;if(s<n){HS(e,s,r)===i&&(r=s);let a=2*o+1,c=Math.max(Math.min(n-a,4),0);for(let u=0;u<c;u++){let f=a+u;HS(e,f,r)===i&&(r=f)}}if(HS(e,r,t)===i&&($I(e,r,t),r!==o&&r!==s)){let a=Math.floor((r-1)/2);L5(e,r,a)===i&&$I(e,r,a)}t=r}}var EQ=id;function GS(){this.head=void 0,this.tail=void 0,this._length=0}Object.defineProperties(GS.prototype,{length:{get:function(){return this._length}}});function YPe(e,t,n){this.item=e,this.previous=t,this.next=n}GS.prototype.add=function(e){let t=new YPe(e,this.tail,void 0);return l(this.tail)?(this.tail.next=t,this.tail=t):(this.head=t,this.tail=t),++this._length,t};function SQ(e,t){l(t.previous)&&l(t.next)?(t.previous.next=t.next,t.next.previous=t.previous):l(t.previous)?(t.previous.next=void 0,e.tail=t.previous):l(t.next)?(t.next.previous=void 0,e.head=t.next):(e.head=void 0,e.tail=void 0),t.next=void 0,t.previous=void 0}GS.prototype.remove=function(e){!l(e)||(SQ(this,e),--this._length)};GS.prototype.splice=function(e,t){if(e===t)return;SQ(this,t);let n=e.next;e.next=t,this.tail===e?this.tail=t:n.previous=t,t.next=n,t.previous=e};var ZI=GS;var yi=Zc(wQ());var XPe={LINEAR_NONE:yi.default.Easing.Linear.None,QUADRATIC_IN:yi.default.Easing.Quadratic.In,QUADRATIC_OUT:yi.default.Easing.Quadratic.Out,QUADRATIC_IN_OUT:yi.default.Easing.Quadratic.InOut,CUBIC_IN:yi.default.Easing.Cubic.In,CUBIC_OUT:yi.default.Easing.Cubic.Out,CUBIC_IN_OUT:yi.default.Easing.Cubic.InOut,QUARTIC_IN:yi.default.Easing.Quartic.In,QUARTIC_OUT:yi.default.Easing.Quartic.Out,QUARTIC_IN_OUT:yi.default.Easing.Quartic.InOut,QUINTIC_IN:yi.default.Easing.Quintic.In,QUINTIC_OUT:yi.default.Easing.Quintic.Out,QUINTIC_IN_OUT:yi.default.Easing.Quintic.InOut,SINUSOIDAL_IN:yi.default.Easing.Sinusoidal.In,SINUSOIDAL_OUT:yi.default.Easing.Sinusoidal.Out,SINUSOIDAL_IN_OUT:yi.default.Easing.Sinusoidal.InOut,EXPONENTIAL_IN:yi.default.Easing.Exponential.In,EXPONENTIAL_OUT:yi.default.Easing.Exponential.Out,EXPONENTIAL_IN_OUT:yi.default.Easing.Exponential.InOut,CIRCULAR_IN:yi.default.Easing.Circular.In,CIRCULAR_OUT:yi.default.Easing.Circular.Out,CIRCULAR_IN_OUT:yi.default.Easing.Circular.InOut,ELASTIC_IN:yi.default.Easing.Elastic.In,ELASTIC_OUT:yi.default.Easing.Elastic.Out,ELASTIC_IN_OUT:yi.default.Easing.Elastic.InOut,BACK_IN:yi.default.Easing.Back.In,BACK_OUT:yi.default.Easing.Back.Out,BACK_IN_OUT:yi.default.Easing.Back.InOut,BOUNCE_IN:yi.default.Easing.Bounce.In,BOUNCE_OUT:yi.default.Easing.Bounce.Out,BOUNCE_IN_OUT:yi.default.Easing.Bounce.InOut},Hr=Object.freeze(XPe);var KPe=new h,$Pe=new h,ZPe=new h,JPe=new h,QPe=new h,eIe=new h(1,1,1),vQ=Math.cos,DQ=Math.sin;function tp(e){e=y(e,y.EMPTY_OBJECT);let t=y(e.radii,eIe),n=y(e.innerRadii,t),i=y(e.minimumClock,0),o=y(e.maximumClock,R.TWO_PI),r=y(e.minimumCone,0),s=y(e.maximumCone,R.PI),a=Math.round(y(e.stackPartitions,64)),c=Math.round(y(e.slicePartitions,64)),u=y(e.vertexFormat,Pe.DEFAULT);this._radii=h.clone(t),this._innerRadii=h.clone(n),this._minimumClock=i,this._maximumClock=o,this._minimumCone=r,this._maximumCone=s,this._stackPartitions=a,this._slicePartitions=c,this._vertexFormat=Pe.clone(u),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidGeometry"}tp.packedLength=2*h.packedLength+Pe.packedLength+7;tp.pack=function(e,t,n){return n=y(n,0),h.pack(e._radii,t,n),n+=h.packedLength,h.pack(e._innerRadii,t,n),n+=h.packedLength,Pe.pack(e._vertexFormat,t,n),n+=Pe.packedLength,t[n++]=e._minimumClock,t[n++]=e._maximumClock,t[n++]=e._minimumCone,t[n++]=e._maximumCone,t[n++]=e._stackPartitions,t[n++]=e._slicePartitions,t[n]=y(e._offsetAttribute,-1),t};var PQ=new h,IQ=new h,OQ=new Pe,H_={radii:PQ,innerRadii:IQ,vertexFormat:OQ,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,offsetAttribute:void 0};tp.unpack=function(e,t,n){t=y(t,0);let i=h.unpack(e,t,PQ);t+=h.packedLength;let o=h.unpack(e,t,IQ);t+=h.packedLength;let r=Pe.unpack(e,t,OQ);t+=Pe.packedLength;let s=e[t++],a=e[t++],c=e[t++],u=e[t++],f=e[t++],d=e[t++],p=e[t];return l(n)?(n._radii=h.clone(i,n._radii),n._innerRadii=h.clone(o,n._innerRadii),n._vertexFormat=Pe.clone(r,n._vertexFormat),n._minimumClock=s,n._maximumClock=a,n._minimumCone=c,n._maximumCone=u,n._stackPartitions=f,n._slicePartitions=d,n._offsetAttribute=p===-1?void 0:p,n):(H_.minimumClock=s,H_.maximumClock=a,H_.minimumCone=c,H_.maximumCone=u,H_.stackPartitions=f,H_.slicePartitions=d,H_.offsetAttribute=p===-1?void 0:p,new tp(H_))};tp.createGeometry=function(e){let t=e._radii;if(t.x<=0||t.y<=0||t.z<=0)return;let n=e._innerRadii;if(n.x<=0||n.y<=0||n.z<=0)return;let i=e._minimumClock,o=e._maximumClock,r=e._minimumCone,s=e._maximumCone,a=e._vertexFormat,c=e._slicePartitions+1,u=e._stackPartitions+1;c=Math.round(c*Math.abs(o-i)/R.TWO_PI),u=Math.round(u*Math.abs(s-r)/R.PI),c<2&&(c=2),u<2&&(u=2);let f,d,p=0,_=[r],m=[i];for(f=0;f<u;f++)_.push(r+f*(s-r)/(u-1));for(_.push(s),d=0;d<c;d++)m.push(i+d*(o-i)/(c-1));m.push(o);let x=_.length,C=m.length,A=0,T=1,b=n.x!==t.x||n.y!==t.y||n.z!==t.z,S=!1,w=!1,D=!1;b&&(T=2,r>0&&(S=!0,A+=c-1),s<Math.PI&&(w=!0,A+=c-1),(o-i)%R.TWO_PI?(D=!0,A+=(u-1)*2+1):A+=1);let O=C*x*T,I=new Float64Array(O*3),L=new Array(O).fill(!1),N=new Array(O).fill(!1),g=c*u*T,E=6*(g+A+1-(c+u)*T),v=Ne.createTypedArray(g,E),P=a.normal?new Float32Array(O*3):void 0,M=a.tangent?new Float32Array(O*3):void 0,V=a.bitangent?new Float32Array(O*3):void 0,U=a.st?new Float32Array(O*2):void 0,k=new Array(x),H=new Array(x);for(f=0;f<x;f++)k[f]=DQ(_[f]),H[f]=vQ(_[f]);let F=new Array(C),Y=new Array(C);for(d=0;d<C;d++)Y[d]=vQ(m[d]),F[d]=DQ(m[d]);for(f=0;f<x;f++)for(d=0;d<C;d++)I[p++]=t.x*k[f]*Y[d],I[p++]=t.y*k[f]*F[d],I[p++]=t.z*H[f];let j=O/2;if(b)for(f=0;f<x;f++)for(d=0;d<C;d++)I[p++]=n.x*k[f]*Y[d],I[p++]=n.y*k[f]*F[d],I[p++]=n.z*H[f],L[j]=!0,f>0&&f!==x-1&&d!==0&&d!==C-1&&(N[j]=!0),j++;p=0;let X,W;for(f=1;f<x-2;f++)for(X=f*C,W=(f+1)*C,d=1;d<C-2;d++)v[p++]=W+d,v[p++]=W+d+1,v[p++]=X+d+1,v[p++]=W+d,v[p++]=X+d+1,v[p++]=X+d;if(b){let Oe=x*C;for(f=1;f<x-2;f++)for(X=Oe+f*C,W=Oe+(f+1)*C,d=1;d<C-2;d++)v[p++]=W+d,v[p++]=X+d,v[p++]=X+d+1,v[p++]=W+d,v[p++]=X+d+1,v[p++]=W+d+1}let $,J;if(b){if(S)for(J=x*C,f=1;f<C-2;f++)v[p++]=f,v[p++]=f+1,v[p++]=J+f+1,v[p++]=f,v[p++]=J+f+1,v[p++]=J+f;if(w)for($=x*C-C,J=x*C*T-C,f=1;f<C-2;f++)v[p++]=$+f+1,v[p++]=$+f,v[p++]=J+f,v[p++]=$+f+1,v[p++]=J+f,v[p++]=J+f+1}if(D){for(f=1;f<x-2;f++)J=C*x+C*f,$=C*f,v[p++]=J,v[p++]=$+C,v[p++]=$,v[p++]=J,v[p++]=J+C,v[p++]=$+C;for(f=1;f<x-2;f++)J=C*x+C*(f+1)-1,$=C*(f+1)-1,v[p++]=$+C,v[p++]=J,v[p++]=$,v[p++]=$+C,v[p++]=J+C,v[p++]=J}let ce=new ln;a.position&&(ce.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:I}));let he=0,ie=0,ae=0,ge=0,Se=O/2,be,Be=re.fromCartesian3(t),Ae=re.fromCartesian3(n);if(a.st||a.normal||a.tangent||a.bitangent){for(f=0;f<O;f++){be=L[f]?Ae:Be;let Oe=h.fromArray(I,f*3,KPe),Ge=be.geodeticSurfaceNormal(Oe,$Pe);if(N[f]&&h.negate(Ge,Ge),a.st){let ot=G.negate(Ge,QPe);U[he++]=Math.atan2(ot.y,ot.x)/R.TWO_PI+.5,U[he++]=Math.asin(Ge.z)/Math.PI+.5}if(a.normal&&(P[ie++]=Ge.x,P[ie++]=Ge.y,P[ie++]=Ge.z),a.tangent||a.bitangent){let ot=ZPe,nt=0,Tn;if(L[f]&&(nt=Se),!S&&f>=nt&&f<nt+C*2?Tn=h.UNIT_X:Tn=h.UNIT_Z,h.cross(Tn,Ge,ot),h.normalize(ot,ot),a.tangent&&(M[ae++]=ot.x,M[ae++]=ot.y,M[ae++]=ot.z),a.bitangent){let Zn=h.cross(Ge,ot,JPe);h.normalize(Zn,Zn),V[ge++]=Zn.x,V[ge++]=Zn.y,V[ge++]=Zn.z}}}a.st&&(ce.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:U})),a.normal&&(ce.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:P})),a.tangent&&(ce.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:M})),a.bitangent&&(ce.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:V}))}if(l(e._offsetAttribute)){let Oe=I.length,Ge=e._offsetAttribute===tn.NONE?0:1,ot=new Uint8Array(Oe/3).fill(Ge);ce.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:ot})}return new ct({attributes:ce,indices:v,primitiveType:Le.TRIANGLES,boundingSphere:oe.fromEllipsoid(Be),offsetAttribute:e._offsetAttribute})};var V5;tp.getUnitEllipsoid=function(){return l(V5)||(V5=tp.createGeometry(new tp({radii:new h(1,1,1),vertexFormat:Pe.POSITION_ONLY}))),V5};var ks=tp;var tIe=new h(1,1,1),JI=Math.cos,QI=Math.sin;function kA(e){e=y(e,y.EMPTY_OBJECT);let t=y(e.radii,tIe),n=y(e.innerRadii,t),i=y(e.minimumClock,0),o=y(e.maximumClock,R.TWO_PI),r=y(e.minimumCone,0),s=y(e.maximumCone,R.PI),a=Math.round(y(e.stackPartitions,10)),c=Math.round(y(e.slicePartitions,8)),u=Math.round(y(e.subdivisions,128));this._radii=h.clone(t),this._innerRadii=h.clone(n),this._minimumClock=i,this._maximumClock=o,this._minimumCone=r,this._maximumCone=s,this._stackPartitions=a,this._slicePartitions=c,this._subdivisions=u,this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidOutlineGeometry"}kA.packedLength=2*h.packedLength+8;kA.pack=function(e,t,n){return n=y(n,0),h.pack(e._radii,t,n),n+=h.packedLength,h.pack(e._innerRadii,t,n),n+=h.packedLength,t[n++]=e._minimumClock,t[n++]=e._maximumClock,t[n++]=e._minimumCone,t[n++]=e._maximumCone,t[n++]=e._stackPartitions,t[n++]=e._slicePartitions,t[n++]=e._subdivisions,t[n]=y(e._offsetAttribute,-1),t};var RQ=new h,MQ=new h,np={radii:RQ,innerRadii:MQ,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0,offsetAttribute:void 0};kA.unpack=function(e,t,n){t=y(t,0);let i=h.unpack(e,t,RQ);t+=h.packedLength;let o=h.unpack(e,t,MQ);t+=h.packedLength;let r=e[t++],s=e[t++],a=e[t++],c=e[t++],u=e[t++],f=e[t++],d=e[t++],p=e[t];return l(n)?(n._radii=h.clone(i,n._radii),n._innerRadii=h.clone(o,n._innerRadii),n._minimumClock=r,n._maximumClock=s,n._minimumCone=a,n._maximumCone=c,n._stackPartitions=u,n._slicePartitions=f,n._subdivisions=d,n._offsetAttribute=p===-1?void 0:p,n):(np.minimumClock=r,np.maximumClock=s,np.minimumCone=a,np.maximumCone=c,np.stackPartitions=u,np.slicePartitions=f,np.subdivisions=d,np.offsetAttribute=p===-1?void 0:p,new kA(np))};kA.createGeometry=function(e){let t=e._radii;if(t.x<=0||t.y<=0||t.z<=0)return;let n=e._innerRadii;if(n.x<=0||n.y<=0||n.z<=0)return;let i=e._minimumClock,o=e._maximumClock,r=e._minimumCone,s=e._maximumCone,a=e._subdivisions,c=re.fromCartesian3(t),u=e._slicePartitions+1,f=e._stackPartitions+1;u=Math.round(u*Math.abs(o-i)/R.TWO_PI),f=Math.round(f*Math.abs(s-r)/R.PI),u<2&&(u=2),f<2&&(f=2);let d=0,p=1,_=n.x!==t.x||n.y!==t.y||n.z!==t.z,m=!1,x=!1;_&&(p=2,r>0&&(m=!0,d+=u),s<Math.PI&&(x=!0,d+=u));let C=a*p*(f+u),A=new Float64Array(C*3),T=2*(C+d-(u+f)*p),b=Ne.createTypedArray(C,T),S,w,D,O,I=0,L=new Array(f),N=new Array(f);for(S=0;S<f;S++)O=r+S*(s-r)/(f-1),L[S]=QI(O),N[S]=JI(O);let g=new Array(a),E=new Array(a);for(S=0;S<a;S++)D=i+S*(o-i)/(a-1),g[S]=QI(D),E[S]=JI(D);for(S=0;S<f;S++)for(w=0;w<a;w++)A[I++]=t.x*L[S]*E[w],A[I++]=t.y*L[S]*g[w],A[I++]=t.z*N[S];if(_)for(S=0;S<f;S++)for(w=0;w<a;w++)A[I++]=n.x*L[S]*E[w],A[I++]=n.y*L[S]*g[w],A[I++]=n.z*N[S];for(L.length=a,N.length=a,S=0;S<a;S++)O=r+S*(s-r)/(a-1),L[S]=QI(O),N[S]=JI(O);for(g.length=u,E.length=u,S=0;S<u;S++)D=i+S*(o-i)/(u-1),g[S]=QI(D),E[S]=JI(D);for(S=0;S<a;S++)for(w=0;w<u;w++)A[I++]=t.x*L[S]*E[w],A[I++]=t.y*L[S]*g[w],A[I++]=t.z*N[S];if(_)for(S=0;S<a;S++)for(w=0;w<u;w++)A[I++]=n.x*L[S]*E[w],A[I++]=n.y*L[S]*g[w],A[I++]=n.z*N[S];for(I=0,S=0;S<f*p;S++){let M=S*a;for(w=0;w<a-1;w++)b[I++]=M+w,b[I++]=M+w+1}let v=f*a*p;for(S=0;S<u;S++)for(w=0;w<a-1;w++)b[I++]=v+S+w*u,b[I++]=v+S+(w+1)*u;if(_)for(v=f*a*p+u*a,S=0;S<u;S++)for(w=0;w<a-1;w++)b[I++]=v+S+w*u,b[I++]=v+S+(w+1)*u;if(_){let M=f*a*p,V=M+a*u;if(m)for(S=0;S<u;S++)b[I++]=M+S,b[I++]=V+S;if(x)for(M+=a*u-u,V+=a*u-u,S=0;S<u;S++)b[I++]=M+S,b[I++]=V+S}let P=new ln({position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:A})});if(l(e._offsetAttribute)){let M=A.length,V=e._offsetAttribute===tn.NONE?0:1,U=new Uint8Array(M/3).fill(V);P.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:U})}return new ct({attributes:P,indices:b,primitiveType:Le.LINES,boundingSphere:oe.fromEllipsoid(c),offsetAttribute:e._offsetAttribute})};var zu=kA;function UA(e){e=y(e,y.EMPTY_OBJECT),this._tilingScheme=e.tilingScheme,l(this._tilingScheme)||(this._tilingScheme=new Xi({ellipsoid:y(e.ellipsoid,re.WGS84)})),this._levelZeroMaximumGeometricError=es.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,64,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._errorEvent=new _e,this._readyPromise=Promise.resolve(!0)}Object.defineProperties(UA.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}});UA.prototype.requestTileGeometry=function(e,t,n,i){return Promise.resolve(new ka({buffer:new Uint8Array(16*16),width:16,height:16}))};UA.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};UA.prototype.getTileDataAvailable=function(e,t,n){};UA.prototype.loadTileDataAvailability=function(e,t,n){};var G_=UA;function k5(){this._removalFunctions=[]}k5.prototype.add=function(e,t,n){let i=e.addEventListener(t,n);this._removalFunctions.push(i);let o=this;return function(){i();let r=o._removalFunctions;r.splice(r.indexOf(i),1)}};k5.prototype.removeAll=function(){let e=this._removalFunctions;for(let t=0,n=e.length;t<n;++t)e[t]();e.length=0};var Gr=k5;var nIe={enableModelExperimental:!1},zA=nIe;var iIe={NONE:0,HOLD:1,EXTRAPOLATE:2},Hu=Object.freeze(iIe);function Dh(e){e=y(e,y.EMPTY_OBJECT),this.left=e.left,this._left=void 0,this.right=e.right,this._right=void 0,this.top=e.top,this._top=void 0,this.bottom=e.bottom,this._bottom=void 0,this.near=y(e.near,1),this._near=this.near,this.far=y(e.far,5e8),this._far=this.far,this._cullingVolume=new da,this._orthographicMatrix=new B}function BQ(e){(e.top!==e._top||e.bottom!==e._bottom||e.left!==e._left||e.right!==e._right||e.near!==e._near||e.far!==e._far)&&(e._left=e.left,e._right=e.right,e._top=e.top,e._bottom=e.bottom,e._near=e.near,e._far=e.far,e._orthographicMatrix=B.computeOrthographicOffCenter(e.left,e.right,e.bottom,e.top,e.near,e.far,e._orthographicMatrix))}Object.defineProperties(Dh.prototype,{projectionMatrix:{get:function(){return BQ(this),this._orthographicMatrix}}});var oIe=new h,rIe=new h,sIe=new h,U5=new h;Dh.prototype.computeCullingVolume=function(e,t,n){let i=this._cullingVolume.planes,o=this.top,r=this.bottom,s=this.right,a=this.left,c=this.near,u=this.far,f=h.cross(t,n,oIe);h.normalize(f,f);let d=rIe;h.multiplyByScalar(t,c,d),h.add(e,d,d);let p=sIe;h.multiplyByScalar(f,a,p),h.add(d,p,p);let _=i[0];return l(_)||(_=i[0]=new se),_.x=f.x,_.y=f.y,_.z=f.z,_.w=-h.dot(f,p),h.multiplyByScalar(f,s,p),h.add(d,p,p),_=i[1],l(_)||(_=i[1]=new se),_.x=-f.x,_.y=-f.y,_.z=-f.z,_.w=-h.dot(h.negate(f,U5),p),h.multiplyByScalar(n,r,p),h.add(d,p,p),_=i[2],l(_)||(_=i[2]=new se),_.x=n.x,_.y=n.y,_.z=n.z,_.w=-h.dot(n,p),h.multiplyByScalar(n,o,p),h.add(d,p,p),_=i[3],l(_)||(_=i[3]=new se),_.x=-n.x,_.y=-n.y,_.z=-n.z,_.w=-h.dot(h.negate(n,U5),p),_=i[4],l(_)||(_=i[4]=new se),_.x=t.x,_.y=t.y,_.z=t.z,_.w=-h.dot(t,d),h.multiplyByScalar(t,u,p),h.add(e,p,p),_=i[5],l(_)||(_=i[5]=new se),_.x=-t.x,_.y=-t.y,_.z=-t.z,_.w=-h.dot(h.negate(t,U5),p),this._cullingVolume};Dh.prototype.getPixelDimensions=function(e,t,n,i,o){BQ(this);let r=this.right-this.left,s=this.top-this.bottom,a=i*r/e,c=i*s/t;return o.x=a,o.y=c,o};Dh.prototype.clone=function(e){return l(e)||(e=new Dh),e.left=this.left,e.right=this.right,e.top=this.top,e.bottom=this.bottom,e.near=this.near,e.far=this.far,e._left=void 0,e._right=void 0,e._top=void 0,e._bottom=void 0,e._near=void 0,e._far=void 0,e};Dh.prototype.equals=function(e){return l(e)&&e instanceof Dh&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far};Dh.prototype.equalsEpsilon=function(e,t,n){return e===this||l(e)&&e instanceof Dh&&R.equalsEpsilon(this.right,e.right,t,n)&&R.equalsEpsilon(this.left,e.left,t,n)&&R.equalsEpsilon(this.top,e.top,t,n)&&R.equalsEpsilon(this.bottom,e.bottom,t,n)&&R.equalsEpsilon(this.near,e.near,t,n)&&R.equalsEpsilon(this.far,e.far,t,n)};var Wr=Dh;function ll(e){e=y(e,y.EMPTY_OBJECT),this._offCenterFrustum=new Wr,this.width=e.width,this._width=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=y(e.near,1),this._near=this.near,this.far=y(e.far,5e8),this._far=this.far}ll.packedLength=4;ll.pack=function(e,t,n){return n=y(n,0),t[n++]=e.width,t[n++]=e.aspectRatio,t[n++]=e.near,t[n]=e.far,t};ll.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new ll),n.width=e[t++],n.aspectRatio=e[t++],n.near=e[t++],n.far=e[t],n};function wy(e){let t=e._offCenterFrustum;if(e.width!==e._width||e.aspectRatio!==e._aspectRatio||e.near!==e._near||e.far!==e._far){e._aspectRatio=e.aspectRatio,e._width=e.width,e._near=e.near,e._far=e.far;let n=1/e.aspectRatio;t.right=e.width*.5,t.left=-t.right,t.top=n*t.right,t.bottom=-t.top,t.near=e.near,t.far=e.far}}Object.defineProperties(ll.prototype,{projectionMatrix:{get:function(){return wy(this),this._offCenterFrustum.projectionMatrix}}});ll.prototype.computeCullingVolume=function(e,t,n){return wy(this),this._offCenterFrustum.computeCullingVolume(e,t,n)};ll.prototype.getPixelDimensions=function(e,t,n,i,o){return wy(this),this._offCenterFrustum.getPixelDimensions(e,t,n,i,o)};ll.prototype.clone=function(e){return l(e)||(e=new ll),e.aspectRatio=this.aspectRatio,e.width=this.width,e.near=this.near,e.far=this.far,e._aspectRatio=void 0,e._width=void 0,e._near=void 0,e._far=void 0,this._offCenterFrustum.clone(e._offCenterFrustum),e};ll.prototype.equals=function(e){return!l(e)||!(e instanceof ll)?!1:(wy(this),wy(e),this.width===e.width&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))};ll.prototype.equalsEpsilon=function(e,t,n){return!l(e)||!(e instanceof ll)?!1:(wy(this),wy(e),R.equalsEpsilon(this.width,e.width,t,n)&&R.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,n)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,n))};var Qt=ll;function Ph(e){e=y(e,y.EMPTY_OBJECT),this.left=e.left,this._left=void 0,this.right=e.right,this._right=void 0,this.top=e.top,this._top=void 0,this.bottom=e.bottom,this._bottom=void 0,this.near=y(e.near,1),this._near=this.near,this.far=y(e.far,5e8),this._far=this.far,this._cullingVolume=new da,this._perspectiveMatrix=new B,this._infinitePerspective=new B}function z5(e){let t=e.top,n=e.bottom,i=e.right,o=e.left,r=e.near,s=e.far;(t!==e._top||n!==e._bottom||o!==e._left||i!==e._right||r!==e._near||s!==e._far)&&(e._left=o,e._right=i,e._top=t,e._bottom=n,e._near=r,e._far=s,e._perspectiveMatrix=B.computePerspectiveOffCenter(o,i,n,t,r,s,e._perspectiveMatrix),e._infinitePerspective=B.computeInfinitePerspectiveOffCenter(o,i,n,t,r,e._infinitePerspective))}Object.defineProperties(Ph.prototype,{projectionMatrix:{get:function(){return z5(this),this._perspectiveMatrix}},infiniteProjectionMatrix:{get:function(){return z5(this),this._infinitePerspective}}});var aIe=new h,cIe=new h,lIe=new h,uIe=new h;Ph.prototype.computeCullingVolume=function(e,t,n){let i=this._cullingVolume.planes,o=this.top,r=this.bottom,s=this.right,a=this.left,c=this.near,u=this.far,f=h.cross(t,n,aIe),d=cIe;h.multiplyByScalar(t,c,d),h.add(e,d,d);let p=lIe;h.multiplyByScalar(t,u,p),h.add(e,p,p);let _=uIe;h.multiplyByScalar(f,a,_),h.add(d,_,_),h.subtract(_,e,_),h.normalize(_,_),h.cross(_,n,_),h.normalize(_,_);let m=i[0];return l(m)||(m=i[0]=new se),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-h.dot(_,e),h.multiplyByScalar(f,s,_),h.add(d,_,_),h.subtract(_,e,_),h.cross(n,_,_),h.normalize(_,_),m=i[1],l(m)||(m=i[1]=new se),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-h.dot(_,e),h.multiplyByScalar(n,r,_),h.add(d,_,_),h.subtract(_,e,_),h.cross(f,_,_),h.normalize(_,_),m=i[2],l(m)||(m=i[2]=new se),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-h.dot(_,e),h.multiplyByScalar(n,o,_),h.add(d,_,_),h.subtract(_,e,_),h.cross(_,f,_),h.normalize(_,_),m=i[3],l(m)||(m=i[3]=new se),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-h.dot(_,e),m=i[4],l(m)||(m=i[4]=new se),m.x=t.x,m.y=t.y,m.z=t.z,m.w=-h.dot(t,d),h.negate(t,_),m=i[5],l(m)||(m=i[5]=new se),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-h.dot(_,p),this._cullingVolume};Ph.prototype.getPixelDimensions=function(e,t,n,i,o){z5(this);let r=1/this.near,s=this.top*r,a=2*i*n*s/t;s=this.right*r;let c=2*i*n*s/e;return o.x=c,o.y=a,o};Ph.prototype.clone=function(e){return l(e)||(e=new Ph),e.right=this.right,e.left=this.left,e.top=this.top,e.bottom=this.bottom,e.near=this.near,e.far=this.far,e._left=void 0,e._right=void 0,e._top=void 0,e._bottom=void 0,e._near=void 0,e._far=void 0,e};Ph.prototype.equals=function(e){return l(e)&&e instanceof Ph&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far};Ph.prototype.equalsEpsilon=function(e,t,n){return e===this||l(e)&&e instanceof Ph&&R.equalsEpsilon(this.right,e.right,t,n)&&R.equalsEpsilon(this.left,e.left,t,n)&&R.equalsEpsilon(this.top,e.top,t,n)&&R.equalsEpsilon(this.bottom,e.bottom,t,n)&&R.equalsEpsilon(this.near,e.near,t,n)&&R.equalsEpsilon(this.far,e.far,t,n)};var ul=Ph;function fl(e){e=y(e,y.EMPTY_OBJECT),this._offCenterFrustum=new ul,this.fov=e.fov,this._fov=void 0,this._fovy=void 0,this._sseDenominator=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=y(e.near,1),this._near=this.near,this.far=y(e.far,5e8),this._far=this.far,this.xOffset=y(e.xOffset,0),this._xOffset=this.xOffset,this.yOffset=y(e.yOffset,0),this._yOffset=this.yOffset}fl.packedLength=6;fl.pack=function(e,t,n){return n=y(n,0),t[n++]=e.fov,t[n++]=e.aspectRatio,t[n++]=e.near,t[n++]=e.far,t[n++]=e.xOffset,t[n]=e.yOffset,t};fl.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new fl),n.fov=e[t++],n.aspectRatio=e[t++],n.near=e[t++],n.far=e[t++],n.xOffset=e[t++],n.yOffset=e[t],n};function Ih(e){let t=e._offCenterFrustum;(e.fov!==e._fov||e.aspectRatio!==e._aspectRatio||e.near!==e._near||e.far!==e._far||e.xOffset!==e._xOffset||e.yOffset!==e._yOffset)&&(e._aspectRatio=e.aspectRatio,e._fov=e.fov,e._fovy=e.aspectRatio<=1?e.fov:Math.atan(Math.tan(e.fov*.5)/e.aspectRatio)*2,e._near=e.near,e._far=e.far,e._sseDenominator=2*Math.tan(.5*e._fovy),e._xOffset=e.xOffset,e._yOffset=e.yOffset,t.top=e.near*Math.tan(.5*e._fovy),t.bottom=-t.top,t.right=e.aspectRatio*t.top,t.left=-t.right,t.near=e.near,t.far=e.far,t.right+=e.xOffset,t.left+=e.xOffset,t.top+=e.yOffset,t.bottom+=e.yOffset)}Object.defineProperties(fl.prototype,{projectionMatrix:{get:function(){return Ih(this),this._offCenterFrustum.projectionMatrix}},infiniteProjectionMatrix:{get:function(){return Ih(this),this._offCenterFrustum.infiniteProjectionMatrix}},fovy:{get:function(){return Ih(this),this._fovy}},sseDenominator:{get:function(){return Ih(this),this._sseDenominator}}});fl.prototype.computeCullingVolume=function(e,t,n){return Ih(this),this._offCenterFrustum.computeCullingVolume(e,t,n)};fl.prototype.getPixelDimensions=function(e,t,n,i,o){return Ih(this),this._offCenterFrustum.getPixelDimensions(e,t,n,i,o)};fl.prototype.clone=function(e){return l(e)||(e=new fl),e.aspectRatio=this.aspectRatio,e.fov=this.fov,e.near=this.near,e.far=this.far,e._aspectRatio=void 0,e._fov=void 0,e._near=void 0,e._far=void 0,this._offCenterFrustum.clone(e._offCenterFrustum),e};fl.prototype.equals=function(e){return!l(e)||!(e instanceof fl)?!1:(Ih(this),Ih(e),this.fov===e.fov&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))};fl.prototype.equalsEpsilon=function(e,t,n){return!l(e)||!(e instanceof fl)?!1:(Ih(this),Ih(e),R.equalsEpsilon(this.fov,e.fov,t,n)&&R.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,n)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,n))};var xi=fl;var eO=0,fIe=1;function vy(e){let t=e.frustum,n=e.orientation,i=e.origin,o=y(e.vertexFormat,Pe.DEFAULT),r=y(e._drawNearPlane,!0),s,a;t instanceof xi?(s=eO,a=xi.packedLength):t instanceof Qt&&(s=fIe,a=Qt.packedLength),this._frustumType=s,this._frustum=t.clone(),this._origin=h.clone(i),this._orientation=Me.clone(n),this._drawNearPlane=r,this._vertexFormat=o,this._workerName="createFrustumGeometry",this.packedLength=2+a+h.packedLength+Me.packedLength+Pe.packedLength}vy.pack=function(e,t,n){n=y(n,0);let i=e._frustumType,o=e._frustum;return t[n++]=i,i===eO?(xi.pack(o,t,n),n+=xi.packedLength):(Qt.pack(o,t,n),n+=Qt.packedLength),h.pack(e._origin,t,n),n+=h.packedLength,Me.pack(e._orientation,t,n),n+=Me.packedLength,Pe.pack(e._vertexFormat,t,n),n+=Pe.packedLength,t[n]=e._drawNearPlane?1:0,t};var dIe=new xi,hIe=new Qt,mIe=new Me,pIe=new h,_Ie=new Pe;vy.unpack=function(e,t,n){t=y(t,0);let i=e[t++],o;i===eO?(o=xi.unpack(e,t,dIe),t+=xi.packedLength):(o=Qt.unpack(e,t,hIe),t+=Qt.packedLength);let r=h.unpack(e,t,pIe);t+=h.packedLength;let s=Me.unpack(e,t,mIe);t+=Me.packedLength;let a=Pe.unpack(e,t,_Ie);t+=Pe.packedLength;let c=e[t]===1;if(!l(n))return new vy({frustum:o,origin:r,orientation:s,vertexFormat:a,_drawNearPlane:c});let u=i===n._frustumType?n._frustum:void 0;return n._frustum=o.clone(u),n._frustumType=i,n._origin=h.clone(r,n._origin),n._orientation=Me.clone(s,n._orientation),n._vertexFormat=Pe.clone(a,n._vertexFormat),n._drawNearPlane=c,n};function HA(e,t,n,i,o,r,s,a){let c=e/3*2;for(let u=0;u<4;++u)l(t)&&(t[e]=r.x,t[e+1]=r.y,t[e+2]=r.z),l(n)&&(n[e]=s.x,n[e+1]=s.y,n[e+2]=s.z),l(i)&&(i[e]=a.x,i[e+1]=a.y,i[e+2]=a.z),e+=3;o[c]=0,o[c+1]=0,o[c+2]=1,o[c+3]=0,o[c+4]=1,o[c+5]=1,o[c+6]=0,o[c+7]=1}var gIe=new Q,yIe=new B,H5=new B,LQ=new h,NQ=new h,FQ=new h,xIe=new h,CIe=new h,AIe=new h,W_=new Array(3),WS=new Array(4);WS[0]=new se(-1,-1,1,1);WS[1]=new se(1,-1,1,1);WS[2]=new se(1,1,1,1);WS[3]=new se(-1,1,1,1);var VQ=new Array(4);for(let e=0;e<4;++e)VQ[e]=new se;vy._computeNearFarPlanes=function(e,t,n,i,o,r,s,a){let c=Q.fromQuaternion(t,gIe),u=y(r,LQ),f=y(s,NQ),d=y(a,FQ);u=Q.getColumn(c,0,u),f=Q.getColumn(c,1,f),d=Q.getColumn(c,2,d),h.normalize(u,u),h.normalize(f,f),h.normalize(d,d),h.negate(u,u);let p=B.computeView(e,d,f,u,yIe),_,m;if(n===eO){let x=i.projectionMatrix,C=B.multiply(x,p,H5);m=B.inverse(C,H5)}else _=B.inverseTransformation(p,H5);l(m)?(W_[0]=i.near,W_[1]=i.far):(W_[0]=0,W_[1]=i.near,W_[2]=i.far);for(let x=0;x<2;++x)for(let C=0;C<4;++C){let A=se.clone(WS[C],VQ[C]);if(l(m)){A=B.multiplyByVector(m,A,A);let T=1/A.w;h.multiplyByScalar(A,T,A),h.subtract(A,e,A),h.normalize(A,A);let b=h.dot(d,A);h.multiplyByScalar(A,W_[x]/b,A),h.add(A,e,A)}else{l(i._offCenterFrustum)&&(i=i._offCenterFrustum);let T=W_[x],b=W_[x+1];A.x=(A.x*(i.right-i.left)+i.left+i.right)*.5,A.y=(A.y*(i.top-i.bottom)+i.bottom+i.top)*.5,A.z=(A.z*(T-b)-T-b)*.5,A.w=1,B.multiplyByVector(_,A,A)}o[12*x+C*3]=A.x,o[12*x+C*3+1]=A.y,o[12*x+C*3+2]=A.z}};vy.createGeometry=function(e){let t=e._frustumType,n=e._frustum,i=e._origin,o=e._orientation,r=e._drawNearPlane,s=e._vertexFormat,a=r?6:5,c=new Float64Array(3*4*6);vy._computeNearFarPlanes(i,o,t,n,c);let u=3*4*2;c[u]=c[3*4],c[u+1]=c[3*4+1],c[u+2]=c[3*4+2],c[u+3]=c[0],c[u+4]=c[1],c[u+5]=c[2],c[u+6]=c[3*3],c[u+7]=c[3*3+1],c[u+8]=c[3*3+2],c[u+9]=c[3*7],c[u+10]=c[3*7+1],c[u+11]=c[3*7+2],u+=3*4,c[u]=c[3*5],c[u+1]=c[3*5+1],c[u+2]=c[3*5+2],c[u+3]=c[3],c[u+4]=c[3+1],c[u+5]=c[3+2],c[u+6]=c[0],c[u+7]=c[1],c[u+8]=c[2],c[u+9]=c[3*4],c[u+10]=c[3*4+1],c[u+11]=c[3*4+2],u+=3*4,c[u]=c[3],c[u+1]=c[3+1],c[u+2]=c[3+2],c[u+3]=c[3*5],c[u+4]=c[3*5+1],c[u+5]=c[3*5+2],c[u+6]=c[3*6],c[u+7]=c[3*6+1],c[u+8]=c[3*6+2],c[u+9]=c[3*2],c[u+10]=c[3*2+1],c[u+11]=c[3*2+2],u+=3*4,c[u]=c[3*2],c[u+1]=c[3*2+1],c[u+2]=c[3*2+2],c[u+3]=c[3*6],c[u+4]=c[3*6+1],c[u+5]=c[3*6+2],c[u+6]=c[3*7],c[u+7]=c[3*7+1],c[u+8]=c[3*7+2],c[u+9]=c[3*3],c[u+10]=c[3*3+1],c[u+11]=c[3*3+2],r||(c=c.subarray(3*4));let f=new ln({position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:c})});if(l(s.normal)||l(s.tangent)||l(s.bitangent)||l(s.st)){let p=l(s.normal)?new Float32Array(12*a):void 0,_=l(s.tangent)?new Float32Array(3*4*a):void 0,m=l(s.bitangent)?new Float32Array(3*4*a):void 0,x=l(s.st)?new Float32Array(2*4*a):void 0,C=LQ,A=NQ,T=FQ,b=h.negate(C,xIe),S=h.negate(A,CIe),w=h.negate(T,AIe);u=0,r&&(HA(u,p,_,m,x,w,C,A),u+=3*4),HA(u,p,_,m,x,T,b,A),u+=3*4,HA(u,p,_,m,x,b,w,A),u+=3*4,HA(u,p,_,m,x,S,w,b),u+=3*4,HA(u,p,_,m,x,C,T,A),u+=3*4,HA(u,p,_,m,x,A,T,b),l(p)&&(f.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:p})),l(_)&&(f.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:_})),l(m)&&(f.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:m})),l(x)&&(f.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:x}))}let d=new Uint16Array(6*a);for(let p=0;p<a;++p){let _=p*6,m=p*4;d[_]=m,d[_+1]=m+1,d[_+2]=m+2,d[_+3]=m,d[_+4]=m+2,d[_+5]=m+3}return new ct({attributes:f,indices:d,primitiveType:Le.TRIANGLES,boundingSphere:oe.fromVertices(c)})};var GA=vy;var G5=0,TIe=1;function jS(e){let t=e.frustum,n=e.orientation,i=e.origin,o=y(e._drawNearPlane,!0),r,s;t instanceof xi?(r=G5,s=xi.packedLength):t instanceof Qt&&(r=TIe,s=Qt.packedLength),this._frustumType=r,this._frustum=t.clone(),this._origin=h.clone(i),this._orientation=Me.clone(n),this._drawNearPlane=o,this._workerName="createFrustumOutlineGeometry",this.packedLength=2+s+h.packedLength+Me.packedLength}jS.pack=function(e,t,n){n=y(n,0);let i=e._frustumType,o=e._frustum;return t[n++]=i,i===G5?(xi.pack(o,t,n),n+=xi.packedLength):(Qt.pack(o,t,n),n+=Qt.packedLength),h.pack(e._origin,t,n),n+=h.packedLength,Me.pack(e._orientation,t,n),n+=Me.packedLength,t[n]=e._drawNearPlane?1:0,t};var bIe=new xi,EIe=new Qt,SIe=new Me,wIe=new h;jS.unpack=function(e,t,n){t=y(t,0);let i=e[t++],o;i===G5?(o=xi.unpack(e,t,bIe),t+=xi.packedLength):(o=Qt.unpack(e,t,EIe),t+=Qt.packedLength);let r=h.unpack(e,t,wIe);t+=h.packedLength;let s=Me.unpack(e,t,SIe);t+=Me.packedLength;let a=e[t]===1;if(!l(n))return new jS({frustum:o,origin:r,orientation:s,_drawNearPlane:a});let c=i===n._frustumType?n._frustum:void 0;return n._frustum=o.clone(c),n._frustumType=i,n._origin=h.clone(r,n._origin),n._orientation=Me.clone(s,n._orientation),n._drawNearPlane=a,n};jS.createGeometry=function(e){let t=e._frustumType,n=e._frustum,i=e._origin,o=e._orientation,r=e._drawNearPlane,s=new Float64Array(3*4*2);GA._computeNearFarPlanes(i,o,t,n,s);let a=new ln({position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:s})}),c,u,f=r?2:1,d=new Uint16Array(8*(f+1)),p=r?0:1;for(;p<2;++p)c=r?p*8:0,u=p*4,d[c]=u,d[c+1]=u+1,d[c+2]=u+1,d[c+3]=u+2,d[c+4]=u+2,d[c+5]=u+3,d[c+6]=u+3,d[c+7]=u;for(p=0;p<2;++p)c=(f+p)*8,u=p*4,d[c]=u,d[c+1]=u+4,d[c+2]=u+1,d[c+3]=u+5,d[c+4]=u+2,d[c+5]=u+6,d[c+6]=u+3,d[c+7]=u+7;return new ct({attributes:a,indices:d,primitiveType:Le.LINES,boundingSphere:oe.fromVertices(s)})};var tO=jS;function kQ(){}kQ.prototype.geocode=ye.throwInstantiationError;var UQ=kQ;var vIe={SEARCH:0,AUTOCOMPLETE:1},Dy=Object.freeze(vIe);function zQ(){ye.throwInstantiationError()}zQ.createGeometry=function(e){ye.throwInstantiationError()};var HQ=zQ;function DIe(e){e=y(e,y.EMPTY_OBJECT),this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=y(e.normalize,!1),this.value=e.value}var Ac=DIe;function PIe(e){let t=new ei.default(e);t.normalize();let n=t.path(),i=n.lastIndexOf("/");return i!==-1&&(n=n.substr(i+1)),n}var j_=PIe;function IIe(e,t,n){let i=new Uint8ClampedArray(e.buffer),o=new ImageData(i,t,n),r=document.createElement("canvas");return r.width=t,r.height=n,r.getContext("2d").putImageData(o,0,0),r}var nO=IIe;function OIe(e,t){return t=y(t,0),fa(e,t,Math.min(4,e.length))}var Gu=OIe;var WA=Zc(GQ());function RIe(e,t){return(e&t)!==0}var Tc=RIe;var MIe=[1,2,4,8],WQ=15,BIe=16,LIe=64,NIe=128;function Oh(e,t,n,i,o,r){this._bits=e,this.cnodeVersion=t,this.imageryVersion=n,this.terrainVersion=i,this.imageryProvider=o,this.terrainProvider=r,this.ancestorHasTerrain=!1,this.terrainState=void 0}Oh.clone=function(e,t){return l(t)?(t._bits=e._bits,t.cnodeVersion=e.cnodeVersion,t.imageryVersion=e.imageryVersion,t.terrainVersion=e.terrainVersion,t.imageryProvider=e.imageryProvider,t.terrainProvider=e.terrainProvider):t=new Oh(e._bits,e.cnodeVersion,e.imageryVersion,e.terrainVersion,e.imageryProvider,e.terrainProvider),t.ancestorHasTerrain=e.ancestorHasTerrain,t.terrainState=e.terrainState,t};Oh.prototype.setParent=function(e){this.ancestorHasTerrain=e.ancestorHasTerrain||this.hasTerrain()};Oh.prototype.hasSubtree=function(){return Tc(this._bits,BIe)};Oh.prototype.hasImagery=function(){return Tc(this._bits,LIe)};Oh.prototype.hasTerrain=function(){return Tc(this._bits,NIe)};Oh.prototype.hasChildren=function(){return Tc(this._bits,WQ)};Oh.prototype.hasChild=function(e){return Tc(this._bits,MIe[e])};Oh.prototype.getChildBitmask=function(){return this._bits&WQ};var iO=Oh;function FIe(e){let t=e.length,n=new ArrayBuffer(t),i=new Uint8Array(n);for(let o=0;o<t;++o)i[o]=e.charCodeAt(o);return n}var VIe=FIe(`E\xF4\xBD\vy\xE2jE"\x92,\xCDq\xF8IFgQ\0B%\xC6\xE8a,f)\b\xC64\xDCjb%y
96
+ ${o}`),t}var Hm=Hwe;function v_(e,t,n,i,o,r,s){this.provider=e,this.message=t,this.x=n,this.y=i,this.level=o,this.timesRetried=y(r,0),this.retry=!1,this.error=s}v_.reportError=function(e,t,n,i,o,r,s,a){let c=e;return l(e)?(c.provider=t,c.message=i,c.x=o,c.y=r,c.level=s,c.retry=!1,c.error=a,++c.timesRetried):c=new v_(t,i,o,r,s,0,a),n.numberOfListeners>0?n.raiseEvent(c):console.log(`An error occurred in "${t.constructor.name}": ${Hm(i)}`),c};v_.handleError=function(e,t,n,i,o,r,s,a,c){ci("TileProviderError.handleError","TileProviderError.handleError was deprecated in CesiumJS 1.96 and will be removed in 1.97. Use TileProviderError.reportError instead.");let u=v_.reportError(e,t,n,i,o,r,s,c);return u.retry&&l(a)&&a(),u};v_.reportSuccess=function(e){l(e)&&(e.timesRetried=-1)};v_.handleSuccess=function(e){ci("TileProviderError.handleSuccess","TileProviderError.handleSuccess was deprecated in CesiumJS 1.96 and will be removed in 1.97. Use TileProviderError.reportSuccess instead."),v_.reportSuccess(e)};var Gn=v_;function D_(e){if(e=y(e,y.EMPTY_OBJECT),this._ellipsoid=y(e.ellipsoid,re.WGS84),this._numberOfLevelZeroTilesX=y(e.numberOfLevelZeroTilesX,1),this._numberOfLevelZeroTilesY=y(e.numberOfLevelZeroTilesY,1),this._projection=new Ui(this._ellipsoid),l(e.rectangleSouthwestInMeters)&&l(e.rectangleNortheastInMeters))this._rectangleSouthwestInMeters=e.rectangleSouthwestInMeters,this._rectangleNortheastInMeters=e.rectangleNortheastInMeters;else{let i=this._ellipsoid.maximumRadius*Math.PI;this._rectangleSouthwestInMeters=new G(-i,-i),this._rectangleNortheastInMeters=new G(i,i)}let t=this._projection.unproject(this._rectangleSouthwestInMeters),n=this._projection.unproject(this._rectangleNortheastInMeters);this._rectangle=new de(t.longitude,t.latitude,n.longitude,n.latitude)}Object.defineProperties(D_.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}});D_.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<<e};D_.prototype.getNumberOfYTilesAtLevel=function(e){return this._numberOfLevelZeroTilesY<<e};D_.prototype.rectangleToNativeRectangle=function(e,t){let n=this._projection,i=n.project(de.southwest(e)),o=n.project(de.northeast(e));return l(t)?(t.west=i.x,t.south=i.y,t.east=o.x,t.north=o.y,t):new de(i.x,i.y,o.x,o.y)};D_.prototype.tileXYToNativeRectangle=function(e,t,n,i){let o=this.getNumberOfXTilesAtLevel(n),r=this.getNumberOfYTilesAtLevel(n),s=(this._rectangleNortheastInMeters.x-this._rectangleSouthwestInMeters.x)/o,a=this._rectangleSouthwestInMeters.x+e*s,c=this._rectangleSouthwestInMeters.x+(e+1)*s,u=(this._rectangleNortheastInMeters.y-this._rectangleSouthwestInMeters.y)/r,f=this._rectangleNortheastInMeters.y-t*u,d=this._rectangleNortheastInMeters.y-(t+1)*u;return l(i)?(i.west=a,i.south=d,i.east=c,i.north=f,i):new de(a,d,c,f)};D_.prototype.tileXYToRectangle=function(e,t,n,i){let o=this.tileXYToNativeRectangle(e,t,n,i),r=this._projection,s=r.unproject(new G(o.west,o.south)),a=r.unproject(new G(o.east,o.north));return o.west=s.longitude,o.south=s.latitude,o.east=a.longitude,o.north=a.latitude,o};D_.prototype.positionToTileXY=function(e,t,n){let i=this._rectangle;if(!de.contains(i,e))return;let o=this.getNumberOfXTilesAtLevel(t),r=this.getNumberOfYTilesAtLevel(t),a=(this._rectangleNortheastInMeters.x-this._rectangleSouthwestInMeters.x)/o,u=(this._rectangleNortheastInMeters.y-this._rectangleSouthwestInMeters.y)/r,d=this._projection.project(e),p=d.x-this._rectangleSouthwestInMeters.x,_=this._rectangleNortheastInMeters.y-d.y,m=p/a|0;m>=o&&(m=o-1);let x=_/u|0;return x>=r&&(x=r-1),l(n)?(n.x=m,n.y=x,n):new G(m,x)};var ts=D_;var Gwe=15;function lA(e){this._resource=void 0,this._credit=void 0,this._tilingScheme=void 0,this._levelZeroMaximumGeometricError=void 0,this._maxLevel=void 0,this._terrainDataStructure=void 0,this._ready=!1,this._width=void 0,this._height=void 0,this._encoding=void 0;let t=e.token;this._hasAvailability=!1,this._tilesAvailable=void 0,this._tilesAvailablityLoaded=void 0,this._availableCache={};let n=this,i=y(e.ellipsoid,re.WGS84);this._readyPromise=Promise.resolve(e.url).then(function(o){let r=De.createIfNeeded(o);return r.appendForwardSlash(),l(t)&&(r=r.getDerivedResource({queryParameters:{token:t}})),n._resource=r,r.getDerivedResource({queryParameters:{f:"pjson"}}).fetchJson()}).then(function(o){let r=o.copyrightText;l(r)&&(n._credit=new Ht(r));let s=o.spatialReference,a=y(s.latestWkid,s.wkid),c=o.extent,u={ellipsoid:i};if(a===4326)u.rectangle=de.fromDegrees(c.xmin,c.ymin,c.xmax,c.ymax),n._tilingScheme=new Xi(u);else if(a===3857)u.rectangleSouthwestInMeters=new G(c.xmin,c.ymin),u.rectangleNortheastInMeters=new G(c.xmax,c.ymax),n._tilingScheme=new ts(u);else return Promise.reject(new fe("Invalid spatial reference"));let f=o.tileInfo;return l(f)?(n._width=f.rows+1,n._height=f.cols+1,n._encoding=f.format==="LERC"?Vm.LERC:Vm.NONE,n._lodCount=f.lods.length-1,(n._hasAvailability=o.capabilities.indexOf("Tilemap")!==-1)&&(n._tilesAvailable=new gh(n._tilingScheme,n._lodCount),n._tilesAvailable.addAvailableTileRange(0,0,0,n._tilingScheme.getNumberOfXTilesAtLevel(0),n._tilingScheme.getNumberOfYTilesAtLevel(0)),n._tilesAvailablityLoaded=new gh(n._tilingScheme,n._lodCount)),n._levelZeroMaximumGeometricError=es.getEstimatedLevelZeroGeometricErrorForAHeightmap(n._tilingScheme.ellipsoid,n._width,n._tilingScheme.getNumberOfXTilesAtLevel(0)),o.bandCount>1&&console.log("ArcGISTiledElevationTerrainProvider: Terrain data has more than 1 band. Using the first one."),n._terrainDataStructure={elementMultiplier:1,lowestEncodedHeight:o.minValues[0],highestEncodedHeight:o.maxValues[0]},n._ready=!0,!0):Promise.reject(new fe("tileInfo is required"))}).catch(function(o){let r=`An error occurred while accessing ${n._resource.url}.`;return Gn.reportError(void 0,n,n._errorEvent,r),Promise.reject(o)}),this._errorEvent=new _e}Object.defineProperties(lA.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){return this._tilesAvailable}}});lA.prototype.requestTileGeometry=function(e,t,n,i){let o=this._resource.getDerivedResource({url:`tile/${n}/${t}/${e}`,request:i}),r=this._hasAvailability,s=Promise.resolve(!0),a;if(r&&!l(BH(this,n+1,e*2,t*2))){let d=q$(this,n+1,e*2,t*2);s=d.promise,a=d.request}let c=o.fetchArrayBuffer();if(!l(c)||!l(s))return;let u=this,f=this._tilesAvailable;return Promise.all([c,s]).then(function(d){return new ka({buffer:d[0],width:u._width,height:u._height,childTileMask:r?f.computeChildMaskForTile(n,e,t):Gwe,structure:u._terrainDataStructure,encoding:u._encoding})}).catch(function(d){return l(a)&&a.state===ui.CANCELLED?(i.cancel(),i.deferred.promise.finally(function(){return i.state=ui.CANCELLED,Promise.reject(d)})):Promise.reject(d)})};function BH(e,t,n,i){if(!e._hasAvailability)return;let o=e._tilesAvailablityLoaded,r=e._tilesAvailable;if(t>e._lodCount)return!1;if(r.isTileAvailable(t,n,i))return!0;if(o.isTileAvailable(t,n,i))return!1}lA.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};lA.prototype.getTileDataAvailable=function(e,t,n){if(!this._hasAvailability)return;let i=BH(this,n,e,t);if(l(i))return i;q$(this,n,e,t)};lA.prototype.loadTileDataAvailability=function(e,t,n){};function Wwe(e,t,n,i){let o=t-1,r=n-1,s=i[e.y*t+e.x],a=[],c={startX:e.x,startY:e.y,endX:0,endY:0},u=new G(e.x+1,e.y+1),f=!1,d=!1;for(;!(f&&d);){let p=u.x,_=d?u.y+1:u.y;if(!f){for(let m=e.y;m<_;++m)if(i[m*t+u.x]!==s){f=!0;break}f?(a.push(new G(u.x,e.y)),--u.x,--p,c.endX=u.x):u.x===o?(c.endX=u.x,f=!0):++u.x}if(!d){let m=u.y*t;for(let x=e.x;x<=p;++x)if(i[m+x]!==s){d=!0;break}d?(a.push(new G(e.x,u.y)),--u.y,c.endY=u.y):u.y===r?(c.endY=u.y,d=!0):++u.y}}return{endingIndices:a,range:c,value:s}}function jwe(e,t,n,i,o){let r=[];if(o.every(function(c){return c===o[0]}))return o[0]===1&&r.push({startX:e,startY:t,endX:e+n-1,endY:t+i-1}),r;let a=[new G(0,0)];for(;a.length>0;){let c=a.pop(),u=Wwe(c,n,i,o);if(u.value===1){let d=u.range;d.startX+=e,d.endX+=e,d.startY+=t,d.endY+=t,r.push(d)}let f=u.endingIndices;f.length>0&&(a=a.concat(f))}return r}function q$(e,t,n,i){if(!e._hasAvailability)return{};let o=Math.floor(n/128)*128,r=Math.floor(i/128)*128,s=Math.min(1<<t,128),a=`tilemap/${t}/${r}/${o}/${s}/${s}`,c=e._availableCache;if(l(c[a]))return c[a];let u=new rr({throttle:!1,throttleByServer:!0,type:or.TERRAIN}),d=e._resource.getDerivedResource({url:a,request:u}).fetchJson();return l(d)?(d=d.then(function(p){let _=jwe(o,r,s,s,p.data);e._tilesAvailablityLoaded.addAvailableTileRange(t,o,r,o+s,r+s);let m=e._tilesAvailable;for(let x=0;x<_.length;++x){let C=_[x];m.addAvailableTileRange(t,C.startX,C.startY,C.endX,C.endY)}return BH(e,t,n,i)}),c[a]={promise:d,request:u},d=d.finally(function(p){return delete c[a],p}),{promise:d,request:u}):{}}var Y$=lA;var qwe={NONE:0,GEODESIC:1,RHUMB:2},Yt=Object.freeze(qwe);var X$=R.EPSILON10;function Ywe(e,t,n,i){if(!l(e))return;n=y(n,!1);let o=l(i),r=e.length;if(r<2)return e;let s,a=e[0],c,u,f=0,d=-1;for(s=1;s<r;++s)c=e[s],t(a,c,X$)?(l(u)||(u=e.slice(0,s),f=s-1,d=0),o&&i.push(s)):(l(u)&&(u.push(c),f=s,o&&(d=i.length)),a=c);return n&&t(e[0],e[r-1],X$)&&(o&&(l(u)?i.splice(d,0,f):i.push(r-1)),l(u)?u.length-=1:u=e.slice(0,-1)),l(u)?u:e}var So=Ywe;var Xwe={XTRANSLATE:"xTranslate",YTRANSLATE:"yTranslate",ZTRANSLATE:"zTranslate",XROTATE:"xRotate",YROTATE:"yRotate",ZROTATE:"zRotate",XSCALE:"xScale",YSCALE:"yScale",ZSCALE:"zScale",UNIFORMSCALE:"uniformScale"},_c=Object.freeze(Xwe);function fy(){this._array=[],this._hash={}}Object.defineProperties(fy.prototype,{length:{get:function(){return this._array.length}},values:{get:function(){return this._array}}});fy.prototype.contains=function(e){return l(this._hash[e])};fy.prototype.set=function(e,t){let n=this._hash[e];t!==n&&(this.remove(e),this._hash[e]=t,this._array.push(t))};fy.prototype.get=function(e){return this._hash[e]};fy.prototype.remove=function(e){let t=this._hash[e],n=l(t);if(n){let i=this._array;i.splice(i.indexOf(t),1),delete this._hash[e]}return n};fy.prototype.removeAll=function(){let e=this._array;e.length>0&&(this._hash={},e.length=0)};var gt=fy;var K$=new h,$$=new h,Z$=new h;function Kwe(e,t,n,i,o){l(o)||(o=new h);let r,s,a,c,u,f,d,p;if(l(t.z)){if(h.equalsEpsilon(e,t,R.EPSILON14))return h.clone(h.UNIT_X,o);if(h.equalsEpsilon(e,n,R.EPSILON14))return h.clone(h.UNIT_Y,o);if(h.equalsEpsilon(e,i,R.EPSILON14))return h.clone(h.UNIT_Z,o);r=h.subtract(n,t,K$),s=h.subtract(i,t,$$),a=h.subtract(e,t,Z$),c=h.dot(r,r),u=h.dot(r,s),f=h.dot(r,a),d=h.dot(s,s),p=h.dot(s,a)}else{if(G.equalsEpsilon(e,t,R.EPSILON14))return h.clone(h.UNIT_X,o);if(G.equalsEpsilon(e,n,R.EPSILON14))return h.clone(h.UNIT_Y,o);if(G.equalsEpsilon(e,i,R.EPSILON14))return h.clone(h.UNIT_Z,o);r=G.subtract(n,t,K$),s=G.subtract(i,t,$$),a=G.subtract(e,t,Z$),c=G.dot(r,r),u=G.dot(r,s),f=G.dot(r,a),d=G.dot(s,s),p=G.dot(s,a)}o.y=d*f-u*p,o.z=c*p-u*f;let _=c*d-u*u;if(_!==0)return o.y/=_,o.z/=_,o.x=1-o.y-o.z,o}var uA=Kwe;var J$="https://dev.virtualearth.net/REST/v1/Locations";function LH(e){e=y(e,y.EMPTY_OBJECT);let t=e.key;this._key=t;let n={key:t};l(e.culture)&&(n.culture=e.culture),this._resource=new De({url:J$,queryParameters:n})}Object.defineProperties(LH.prototype,{url:{get:function(){return J$}},key:{get:function(){return this._key}}});LH.prototype.geocode=function(e){return this._resource.getDerivedResource({queryParameters:{query:e}}).fetchJsonp("jsonp").then(function(n){return n.resourceSets.length===0?[]:n.resourceSets[0].resources.map(function(o){let r=o.bbox,s=r[0],a=r[1],c=r[2],u=r[3];return{displayName:o.name,destination:de.fromDegrees(a,s,u,c)}})})};var Q$=LH;function Rr(e,t,n,i){this.x=y(e,0),this.y=y(t,0),this.width=y(n,0),this.height=y(i,0)}Rr.packedLength=4;Rr.pack=function(e,t,n){return n=y(n,0),t[n++]=e.x,t[n++]=e.y,t[n++]=e.width,t[n]=e.height,t};Rr.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new Rr),n.x=e[t++],n.y=e[t++],n.width=e[t++],n.height=e[t],n};Rr.fromPoints=function(e,t){if(l(t)||(t=new Rr),!l(e)||e.length===0)return t.x=0,t.y=0,t.width=0,t.height=0,t;let n=e.length,i=e[0].x,o=e[0].y,r=e[0].x,s=e[0].y;for(let a=1;a<n;a++){let c=e[a],u=c.x,f=c.y;i=Math.min(u,i),r=Math.max(u,r),o=Math.min(f,o),s=Math.max(f,s)}return t.x=i,t.y=o,t.width=r-i,t.height=s-o,t};var $we=new Si,Zwe=new me,Jwe=new me;Rr.fromRectangle=function(e,t,n){if(l(n)||(n=new Rr),!l(e))return n.x=0,n.y=0,n.width=0,n.height=0,n;t=y(t,$we);let i=t.project(de.southwest(e,Zwe)),o=t.project(de.northeast(e,Jwe));return G.subtract(o,i,o),n.x=i.x,n.y=i.y,n.width=o.x,n.height=o.y,n};Rr.clone=function(e,t){if(!!l(e))return l(t)?(t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height,t):new Rr(e.x,e.y,e.width,e.height)};Rr.union=function(e,t,n){l(n)||(n=new Rr);let i=Math.min(e.x,t.x),o=Math.min(e.y,t.y),r=Math.max(e.x+e.width,t.x+t.width),s=Math.max(e.y+e.height,t.y+t.height);return n.x=i,n.y=o,n.width=r-i,n.height=s-o,n};Rr.expand=function(e,t,n){n=Rr.clone(e,n);let i=t.x-n.x,o=t.y-n.y;return i>n.width?n.width=i:i<0&&(n.width-=i,n.x=t.x),o>n.height?n.height=o:o<0&&(n.height-=o,n.y=t.y),n};Rr.intersect=function(e,t){let n=e.x,i=e.y,o=t.x,r=t.y;return n>o+t.width||n+e.width<o||i+e.height<r||i>r+t.height?Zt.OUTSIDE:Zt.INTERSECTING};Rr.equals=function(e,t){return e===t||l(e)&&l(t)&&e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height};Rr.prototype.clone=function(e){return Rr.clone(this,e)};Rr.prototype.intersect=function(e){return Rr.intersect(this,e)};Rr.prototype.equals=function(e){return Rr.equals(this,e)};var qe=Rr;var Qwe={NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3},Zf=Object.freeze(Qwe);var ua={POINTS:Z.POINTS,LINES:Z.LINES,LINE_LOOP:Z.LINE_LOOP,LINE_STRIP:Z.LINE_STRIP,TRIANGLES:Z.TRIANGLES,TRIANGLE_STRIP:Z.TRIANGLE_STRIP,TRIANGLE_FAN:Z.TRIANGLE_FAN};ua.isLines=function(e){return e===ua.LINES||e===ua.LINE_LOOP||e===ua.LINE_STRIP};ua.isTriangles=function(e){return e===ua.TRIANGLES||e===ua.TRIANGLE_STRIP||e===ua.TRIANGLE_FAN};ua.validate=function(e){return e===ua.POINTS||e===ua.LINES||e===ua.LINE_LOOP||e===ua.LINE_STRIP||e===ua.TRIANGLES||e===ua.TRIANGLE_STRIP||e===ua.TRIANGLE_FAN};var Le=Object.freeze(ua);function NH(e){e=y(e,y.EMPTY_OBJECT),this.attributes=e.attributes,this.indices=e.indices,this.primitiveType=y(e.primitiveType,Le.TRIANGLES),this.boundingSphere=e.boundingSphere,this.geometryType=y(e.geometryType,Zf.NONE),this.boundingSphereCV=e.boundingSphereCV,this.offsetAttribute=e.offsetAttribute}NH.computeNumberOfVertices=function(e){let t=-1;for(let n in e.attributes)if(e.attributes.hasOwnProperty(n)&&l(e.attributes[n])&&l(e.attributes[n].values)){let i=e.attributes[n];t=i.values.length/i.componentsPerAttribute}return t};var eve=new me,tve=new h,eZ=new B,nve=[new me,new me,new me],ive=[new G,new G,new G],ove=[new G,new G,new G],rve=new h,sve=new Me,ave=new B,cve=new vi;NH._textureCoordinateRotationPoints=function(e,t,n,i){let o,r=de.center(i,eve),s=me.toCartesian(r,n,tve),a=_t.eastNorthUpToFixedFrame(s,n,eZ),c=B.inverse(a,eZ),u=ive,f=nve;f[0].longitude=i.west,f[0].latitude=i.south,f[1].longitude=i.west,f[1].latitude=i.north,f[2].longitude=i.east,f[2].latitude=i.south;let d=rve;for(o=0;o<3;o++)me.toCartesian(f[o],n,d),d=B.multiplyByPointAsVector(c,d,d),u[o].x=d.x,u[o].y=d.y;let p=Me.fromAxisAngle(h.UNIT_Z,-t,sve),_=Q.fromQuaternion(p,ave),m=e.length,x=Number.POSITIVE_INFINITY,C=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY,T=Number.NEGATIVE_INFINITY;for(o=0;o<m;o++)d=B.multiplyByPointAsVector(c,e[o],d),d=Q.multiplyByVector(_,d,d),x=Math.min(x,d.x),C=Math.min(C,d.y),A=Math.max(A,d.x),T=Math.max(T,d.y);let b=vi.fromRotation(t,cve),S=ove;S[0].x=x,S[0].y=C,S[1].x=x,S[1].y=T,S[2].x=A,S[2].y=C;let w=u[0],D=u[2].x-w.x,O=u[1].y-w.y;for(o=0;o<3;o++){let E=S[o];vi.multiplyByVector(b,E,E),E.x=(E.x-w.x)/D,E.y=(E.y-w.y)/O}let I=S[0],L=S[1],N=S[2],g=new Array(6);return G.pack(I,g),G.pack(L,g,2),G.pack(N,g,4),g};var ct=NH;function lve(e){e=y(e,y.EMPTY_OBJECT),this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=y(e.normalize,!1),this.values=e.values}var Ee=lve;function uve(e){e=y(e,y.EMPTY_OBJECT),this.position=e.position,this.normal=e.normal,this.st=e.st,this.bitangent=e.bitangent,this.tangent=e.tangent,this.color=e.color}var ln=uve;var fve={NONE:0,TOP:1,ALL:2},tn=Object.freeze(fve);function ns(e){e=y(e,y.EMPTY_OBJECT),this.position=y(e.position,!1),this.normal=y(e.normal,!1),this.st=y(e.st,!1),this.bitangent=y(e.bitangent,!1),this.tangent=y(e.tangent,!1),this.color=y(e.color,!1)}ns.POSITION_ONLY=Object.freeze(new ns({position:!0}));ns.POSITION_AND_NORMAL=Object.freeze(new ns({position:!0,normal:!0}));ns.POSITION_NORMAL_AND_ST=Object.freeze(new ns({position:!0,normal:!0,st:!0}));ns.POSITION_AND_ST=Object.freeze(new ns({position:!0,st:!0}));ns.POSITION_AND_COLOR=Object.freeze(new ns({position:!0,color:!0}));ns.ALL=Object.freeze(new ns({position:!0,normal:!0,st:!0,tangent:!0,bitangent:!0}));ns.DEFAULT=ns.POSITION_NORMAL_AND_ST;ns.packedLength=6;ns.pack=function(e,t,n){return n=y(n,0),t[n++]=e.position?1:0,t[n++]=e.normal?1:0,t[n++]=e.st?1:0,t[n++]=e.tangent?1:0,t[n++]=e.bitangent?1:0,t[n]=e.color?1:0,t};ns.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new ns),n.position=e[t++]===1,n.normal=e[t++]===1,n.st=e[t++]===1,n.tangent=e[t++]===1,n.bitangent=e[t++]===1,n.color=e[t]===1,n};ns.clone=function(e,t){if(!!l(e))return l(t)||(t=new ns),t.position=e.position,t.normal=e.normal,t.st=e.st,t.tangent=e.tangent,t.bitangent=e.bitangent,t.color=e.color,t};var Pe=ns;var dve=new h;function Fl(e){e=y(e,y.EMPTY_OBJECT);let t=e.minimum,n=e.maximum,i=y(e.vertexFormat,Pe.DEFAULT);this._minimum=h.clone(t),this._maximum=h.clone(n),this._vertexFormat=i,this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxGeometry"}Fl.fromDimensions=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.dimensions,n=h.multiplyByScalar(t,.5,new h);return new Fl({minimum:h.negate(n,new h),maximum:n,vertexFormat:e.vertexFormat,offsetAttribute:e.offsetAttribute})};Fl.fromAxisAlignedBoundingBox=function(e){return new Fl({minimum:e.minimum,maximum:e.maximum})};Fl.packedLength=2*h.packedLength+Pe.packedLength+1;Fl.pack=function(e,t,n){return n=y(n,0),h.pack(e._minimum,t,n),h.pack(e._maximum,t,n+h.packedLength),Pe.pack(e._vertexFormat,t,n+2*h.packedLength),t[n+2*h.packedLength+Pe.packedLength]=y(e._offsetAttribute,-1),t};var nZ=new h,iZ=new h,oZ=new Pe,tZ={minimum:nZ,maximum:iZ,vertexFormat:oZ,offsetAttribute:void 0};Fl.unpack=function(e,t,n){t=y(t,0);let i=h.unpack(e,t,nZ),o=h.unpack(e,t+h.packedLength,iZ),r=Pe.unpack(e,t+2*h.packedLength,oZ),s=e[t+2*h.packedLength+Pe.packedLength];return l(n)?(n._minimum=h.clone(i,n._minimum),n._maximum=h.clone(o,n._maximum),n._vertexFormat=Pe.clone(r,n._vertexFormat),n._offsetAttribute=s===-1?void 0:s,n):(tZ.offsetAttribute=s===-1?void 0:s,new Fl(tZ))};Fl.createGeometry=function(e){let t=e._minimum,n=e._maximum,i=e._vertexFormat;if(h.equals(t,n))return;let o=new ln,r,s;if(i.position&&(i.st||i.normal||i.tangent||i.bitangent)){if(i.position&&(s=new Float64Array(6*4*3),s[0]=t.x,s[1]=t.y,s[2]=n.z,s[3]=n.x,s[4]=t.y,s[5]=n.z,s[6]=n.x,s[7]=n.y,s[8]=n.z,s[9]=t.x,s[10]=n.y,s[11]=n.z,s[12]=t.x,s[13]=t.y,s[14]=t.z,s[15]=n.x,s[16]=t.y,s[17]=t.z,s[18]=n.x,s[19]=n.y,s[20]=t.z,s[21]=t.x,s[22]=n.y,s[23]=t.z,s[24]=n.x,s[25]=t.y,s[26]=t.z,s[27]=n.x,s[28]=n.y,s[29]=t.z,s[30]=n.x,s[31]=n.y,s[32]=n.z,s[33]=n.x,s[34]=t.y,s[35]=n.z,s[36]=t.x,s[37]=t.y,s[38]=t.z,s[39]=t.x,s[40]=n.y,s[41]=t.z,s[42]=t.x,s[43]=n.y,s[44]=n.z,s[45]=t.x,s[46]=t.y,s[47]=n.z,s[48]=t.x,s[49]=n.y,s[50]=t.z,s[51]=n.x,s[52]=n.y,s[53]=t.z,s[54]=n.x,s[55]=n.y,s[56]=n.z,s[57]=t.x,s[58]=n.y,s[59]=n.z,s[60]=t.x,s[61]=t.y,s[62]=t.z,s[63]=n.x,s[64]=t.y,s[65]=t.z,s[66]=n.x,s[67]=t.y,s[68]=n.z,s[69]=t.x,s[70]=t.y,s[71]=n.z,o.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:s})),i.normal){let u=new Float32Array(72);u[0]=0,u[1]=0,u[2]=1,u[3]=0,u[4]=0,u[5]=1,u[6]=0,u[7]=0,u[8]=1,u[9]=0,u[10]=0,u[11]=1,u[12]=0,u[13]=0,u[14]=-1,u[15]=0,u[16]=0,u[17]=-1,u[18]=0,u[19]=0,u[20]=-1,u[21]=0,u[22]=0,u[23]=-1,u[24]=1,u[25]=0,u[26]=0,u[27]=1,u[28]=0,u[29]=0,u[30]=1,u[31]=0,u[32]=0,u[33]=1,u[34]=0,u[35]=0,u[36]=-1,u[37]=0,u[38]=0,u[39]=-1,u[40]=0,u[41]=0,u[42]=-1,u[43]=0,u[44]=0,u[45]=-1,u[46]=0,u[47]=0,u[48]=0,u[49]=1,u[50]=0,u[51]=0,u[52]=1,u[53]=0,u[54]=0,u[55]=1,u[56]=0,u[57]=0,u[58]=1,u[59]=0,u[60]=0,u[61]=-1,u[62]=0,u[63]=0,u[64]=-1,u[65]=0,u[66]=0,u[67]=-1,u[68]=0,u[69]=0,u[70]=-1,u[71]=0,o.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:u})}if(i.st){let u=new Float32Array(48);u[0]=0,u[1]=0,u[2]=1,u[3]=0,u[4]=1,u[5]=1,u[6]=0,u[7]=1,u[8]=1,u[9]=0,u[10]=0,u[11]=0,u[12]=0,u[13]=1,u[14]=1,u[15]=1,u[16]=0,u[17]=0,u[18]=1,u[19]=0,u[20]=1,u[21]=1,u[22]=0,u[23]=1,u[24]=1,u[25]=0,u[26]=0,u[27]=0,u[28]=0,u[29]=1,u[30]=1,u[31]=1,u[32]=1,u[33]=0,u[34]=0,u[35]=0,u[36]=0,u[37]=1,u[38]=1,u[39]=1,u[40]=0,u[41]=0,u[42]=1,u[43]=0,u[44]=1,u[45]=1,u[46]=0,u[47]=1,o.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:u})}if(i.tangent){let u=new Float32Array(72);u[0]=1,u[1]=0,u[2]=0,u[3]=1,u[4]=0,u[5]=0,u[6]=1,u[7]=0,u[8]=0,u[9]=1,u[10]=0,u[11]=0,u[12]=-1,u[13]=0,u[14]=0,u[15]=-1,u[16]=0,u[17]=0,u[18]=-1,u[19]=0,u[20]=0,u[21]=-1,u[22]=0,u[23]=0,u[24]=0,u[25]=1,u[26]=0,u[27]=0,u[28]=1,u[29]=0,u[30]=0,u[31]=1,u[32]=0,u[33]=0,u[34]=1,u[35]=0,u[36]=0,u[37]=-1,u[38]=0,u[39]=0,u[40]=-1,u[41]=0,u[42]=0,u[43]=-1,u[44]=0,u[45]=0,u[46]=-1,u[47]=0,u[48]=-1,u[49]=0,u[50]=0,u[51]=-1,u[52]=0,u[53]=0,u[54]=-1,u[55]=0,u[56]=0,u[57]=-1,u[58]=0,u[59]=0,u[60]=1,u[61]=0,u[62]=0,u[63]=1,u[64]=0,u[65]=0,u[66]=1,u[67]=0,u[68]=0,u[69]=1,u[70]=0,u[71]=0,o.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:u})}if(i.bitangent){let u=new Float32Array(72);u[0]=0,u[1]=1,u[2]=0,u[3]=0,u[4]=1,u[5]=0,u[6]=0,u[7]=1,u[8]=0,u[9]=0,u[10]=1,u[11]=0,u[12]=0,u[13]=1,u[14]=0,u[15]=0,u[16]=1,u[17]=0,u[18]=0,u[19]=1,u[20]=0,u[21]=0,u[22]=1,u[23]=0,u[24]=0,u[25]=0,u[26]=1,u[27]=0,u[28]=0,u[29]=1,u[30]=0,u[31]=0,u[32]=1,u[33]=0,u[34]=0,u[35]=1,u[36]=0,u[37]=0,u[38]=1,u[39]=0,u[40]=0,u[41]=1,u[42]=0,u[43]=0,u[44]=1,u[45]=0,u[46]=0,u[47]=1,u[48]=0,u[49]=0,u[50]=1,u[51]=0,u[52]=0,u[53]=1,u[54]=0,u[55]=0,u[56]=1,u[57]=0,u[58]=0,u[59]=1,u[60]=0,u[61]=0,u[62]=1,u[63]=0,u[64]=0,u[65]=1,u[66]=0,u[67]=0,u[68]=1,u[69]=0,u[70]=0,u[71]=1,o.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:u})}r=new Uint16Array(6*2*3),r[0]=0,r[1]=1,r[2]=2,r[3]=0,r[4]=2,r[5]=3,r[6]=4+2,r[7]=4+1,r[8]=4+0,r[9]=4+3,r[10]=4+2,r[11]=4+0,r[12]=8+0,r[13]=8+1,r[14]=8+2,r[15]=8+0,r[16]=8+2,r[17]=8+3,r[18]=12+2,r[19]=12+1,r[20]=12+0,r[21]=12+3,r[22]=12+2,r[23]=12+0,r[24]=16+2,r[25]=16+1,r[26]=16+0,r[27]=16+3,r[28]=16+2,r[29]=16+0,r[30]=20+0,r[31]=20+1,r[32]=20+2,r[33]=20+0,r[34]=20+2,r[35]=20+3}else s=new Float64Array(8*3),s[0]=t.x,s[1]=t.y,s[2]=t.z,s[3]=n.x,s[4]=t.y,s[5]=t.z,s[6]=n.x,s[7]=n.y,s[8]=t.z,s[9]=t.x,s[10]=n.y,s[11]=t.z,s[12]=t.x,s[13]=t.y,s[14]=n.z,s[15]=n.x,s[16]=t.y,s[17]=n.z,s[18]=n.x,s[19]=n.y,s[20]=n.z,s[21]=t.x,s[22]=n.y,s[23]=n.z,o.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:s}),r=new Uint16Array(6*2*3),r[0]=4,r[1]=5,r[2]=6,r[3]=4,r[4]=6,r[5]=7,r[6]=1,r[7]=0,r[8]=3,r[9]=1,r[10]=3,r[11]=2,r[12]=1,r[13]=6,r[14]=5,r[15]=1,r[16]=2,r[17]=6,r[18]=2,r[19]=3,r[20]=7,r[21]=2,r[22]=7,r[23]=6,r[24]=3,r[25]=0,r[26]=4,r[27]=3,r[28]=4,r[29]=7,r[30]=0,r[31]=1,r[32]=5,r[33]=0,r[34]=5,r[35]=4;let a=h.subtract(n,t,dve),c=h.magnitude(a)*.5;if(l(e._offsetAttribute)){let u=s.length,f=e._offsetAttribute===tn.NONE?0:1,d=new Uint8Array(u/3).fill(f);o.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:d})}return new ct({attributes:o,indices:r,primitiveType:Le.TRIANGLES,boundingSphere:new oe(h.ZERO,c),offsetAttribute:e._offsetAttribute})};var FH;Fl.getUnitBox=function(){return l(FH)||(FH=Fl.createGeometry(Fl.fromDimensions({dimensions:new h(1,1,1),vertexFormat:Pe.POSITION_ONLY}))),FH};var Vl=Fl;var hve=new h;function yh(e){e=y(e,y.EMPTY_OBJECT);let t=e.minimum,n=e.maximum;this._min=h.clone(t),this._max=h.clone(n),this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxOutlineGeometry"}yh.fromDimensions=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.dimensions,n=h.multiplyByScalar(t,.5,new h);return new yh({minimum:h.negate(n,new h),maximum:n,offsetAttribute:e.offsetAttribute})};yh.fromAxisAlignedBoundingBox=function(e){return new yh({minimum:e.minimum,maximum:e.maximum})};yh.packedLength=2*h.packedLength+1;yh.pack=function(e,t,n){return n=y(n,0),h.pack(e._min,t,n),h.pack(e._max,t,n+h.packedLength),t[n+h.packedLength*2]=y(e._offsetAttribute,-1),t};var sZ=new h,aZ=new h,rZ={minimum:sZ,maximum:aZ,offsetAttribute:void 0};yh.unpack=function(e,t,n){t=y(t,0);let i=h.unpack(e,t,sZ),o=h.unpack(e,t+h.packedLength,aZ),r=e[t+h.packedLength*2];return l(n)?(n._min=h.clone(i,n._min),n._max=h.clone(o,n._max),n._offsetAttribute=r===-1?void 0:r,n):(rZ.offsetAttribute=r===-1?void 0:r,new yh(rZ))};yh.createGeometry=function(e){let t=e._min,n=e._max;if(h.equals(t,n))return;let i=new ln,o=new Uint16Array(12*2),r=new Float64Array(8*3);r[0]=t.x,r[1]=t.y,r[2]=t.z,r[3]=n.x,r[4]=t.y,r[5]=t.z,r[6]=n.x,r[7]=n.y,r[8]=t.z,r[9]=t.x,r[10]=n.y,r[11]=t.z,r[12]=t.x,r[13]=t.y,r[14]=n.z,r[15]=n.x,r[16]=t.y,r[17]=n.z,r[18]=n.x,r[19]=n.y,r[20]=n.z,r[21]=t.x,r[22]=n.y,r[23]=n.z,i.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:r}),o[0]=4,o[1]=5,o[2]=5,o[3]=6,o[4]=6,o[5]=7,o[6]=7,o[7]=4,o[8]=0,o[9]=1,o[10]=1,o[11]=2,o[12]=2,o[13]=3,o[14]=3,o[15]=0,o[16]=0,o[17]=4,o[18]=1,o[19]=5,o[20]=2,o[21]=6,o[22]=3,o[23]=7;let s=h.subtract(n,t,hve),a=h.magnitude(s)*.5;if(l(e._offsetAttribute)){let c=r.length,u=e._offsetAttribute===tn.NONE?0:1,f=new Uint8Array(c/3).fill(u);i.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:f})}return new ct({attributes:i,indices:o,primitiveType:Le.LINES,boundingSphere:new oe(h.ZERO,a),offsetAttribute:e._offsetAttribute})};var xh=yh;var Gm;typeof cancelAnimationFrame<"u"&&(Gm=cancelAnimationFrame);(function(){if(!l(Gm)&&typeof window<"u"){let e=["webkit","moz","ms","o"],t=0,n=e.length;for(;t<n&&!l(Gm);)Gm=window[`${e[t]}CancelAnimationFrame`],l(Gm)||(Gm=window[`${e[t]}CancelRequestAnimationFrame`]),++t}l(Gm)||(Gm=clearTimeout)})();function mve(e){ci("Cesium.cancelAnimationFrame","Cesium.cancelAnimationFrame was deprecated in CesiumJS 1.96 and will be removed in 1.99. Use the native cancelAnimationFrame method instead."),Gm(e)}var cZ=mve;function lZ(){}lZ.prototype.geocode=function(e){let t=e.match(/[^\s,\n]+/g);if(t.length===2||t.length===3){let n=+t[0],i=+t[1],o=t.length===3?+t[2]:300;if(isNaN(n)&&isNaN(i)){let r=/^(\d+.?\d*)([nsew])/i;for(let s=0;s<t.length;++s){let a=t[s].match(r);r.test(t[s])&&a.length===3&&(/^[ns]/i.test(a[2])?i=/^[n]/i.test(a[2])?+a[1]:-a[1]:/^[ew]/i.test(a[2])&&(n=/^[e]/i.test(a[2])?+a[1]:-a[1]))}}if(!isNaN(n)&&!isNaN(i)&&!isNaN(o)){let r={displayName:e,destination:h.fromDegrees(n,i,o)};return Promise.resolve([r])}}return Promise.resolve([])};var lI=lZ;function fA(){this.times=void 0,this.points=void 0,ye.throwInstantiationError()}fA.getPointType=function(e){if(typeof e=="number")return Number;if(e instanceof h)return h;if(e instanceof Me)return Me};fA.prototype.evaluate=ye.throwInstantiationError;fA.prototype.findTimeInterval=function(e,t){let n=this.times,i=n.length;if(t=y(t,0),e>=n[t]){if(t+1<i&&e<n[t+1])return t;if(t+2<i&&e<n[t+2])return t+1}else if(t-1>=0&&e>=n[t-1])return t-1;let o;if(e>n[t])for(o=t;o<i-1&&!(e>=n[o]&&e<n[o+1]);++o);else for(o=t-1;o>=0&&!(e>=n[o]&&e<n[o+1]);--o);return o===i-1&&(o=i-2),o};fA.prototype.wrapTime=function(e){let t=this.times,n=t[t.length-1],i=t[0],o=n-i,r;return e<i&&(r=Math.floor((i-e)/o)+1,e+=r*o),e>n&&(r=Math.floor((e-n)/o)+1,e-=r*o),e};fA.prototype.clampTime=function(e){let t=this.times;return R.clamp(e,t[0],t[t.length-1])};var zi=fA;function dA(e){e=y(e,y.EMPTY_OBJECT);let t=e.points,n=e.times;this._times=n,this._points=t,this._pointType=zi.getPointType(t[0]),this._lastTimeIndex=0}Object.defineProperties(dA.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}});dA.prototype.findTimeInterval=zi.prototype.findTimeInterval;dA.prototype.wrapTime=zi.prototype.wrapTime;dA.prototype.clampTime=zi.prototype.clampTime;dA.prototype.evaluate=function(e,t){let n=this.points,i=this.times,o=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),r=(e-i[o])/(i[o+1]-i[o]);return this._pointType===Number?(1-r)*n[o]+r*n[o+1]:(l(t)||(t=new h),h.lerp(n[o],n[o+1],r,t))};var Wm=dA;var uZ={};uZ.solve=function(e,t,n,i){let o=new Array(n.length),r=new Array(i.length),s=new Array(i.length),a;for(a=0;a<r.length;a++)r[a]=new h,s[a]=new h;o[0]=n[0]/t[0],r[0]=h.multiplyByScalar(i[0],1/t[0],r[0]);let c;for(a=1;a<o.length;++a)c=1/(t[a]-o[a-1]*e[a-1]),o[a]=n[a]*c,r[a]=h.subtract(i[a],h.multiplyByScalar(r[a-1],e[a-1],r[a]),r[a]),r[a]=h.multiplyByScalar(r[a],c,r[a]);for(c=1/(t[a]-o[a-1]*e[a-1]),r[a]=h.subtract(i[a],h.multiplyByScalar(r[a-1],e[a-1],r[a]),r[a]),r[a]=h.multiplyByScalar(r[a],c,r[a]),s[s.length-1]=r[r.length-1],a=s.length-2;a>=0;--a)s[a]=h.subtract(r[a],h.multiplyByScalar(s[a+1],o[a],s[a]),s[a]);return s};var bS=uZ;var fZ=[],dZ=[],hZ=[],mZ=[];function pve(e,t,n){let i=fZ,o=hZ,r=dZ,s=mZ;i.length=o.length=e.length-1,r.length=s.length=e.length;let a;i[0]=r[0]=1,o[0]=0;let c=s[0];for(l(c)||(c=s[0]=new h),h.clone(t,c),a=1;a<i.length-1;++a)i[a]=o[a]=1,r[a]=4,c=s[a],l(c)||(c=s[a]=new h),h.subtract(e[a+1],e[a-1],c),h.multiplyByScalar(c,3,c);return i[a]=0,o[a]=1,r[a]=4,c=s[a],l(c)||(c=s[a]=new h),h.subtract(e[a+1],e[a-1],c),h.multiplyByScalar(c,3,c),r[a+1]=1,c=s[a+1],l(c)||(c=s[a+1]=new h),h.clone(n,c),bS.solve(i,r,o,s)}function _ve(e){let t=fZ,n=hZ,i=dZ,o=mZ;t.length=n.length=e.length-1,i.length=o.length=e.length;let r;t[0]=n[0]=1,i[0]=2;let s=o[0];for(l(s)||(s=o[0]=new h),h.subtract(e[1],e[0],s),h.multiplyByScalar(s,3,s),r=1;r<t.length;++r)t[r]=n[r]=1,i[r]=4,s=o[r],l(s)||(s=o[r]=new h),h.subtract(e[r+1],e[r-1],s),h.multiplyByScalar(s,3,s);return i[r]=2,s=o[r],l(s)||(s=o[r]=new h),h.subtract(e[r],e[r-1],s),h.multiplyByScalar(s,3,s),bS.solve(t,i,n,o)}function ol(e){e=y(e,y.EMPTY_OBJECT);let t=e.points,n=e.times,i=e.inTangents,o=e.outTangents;this._times=n,this._points=t,this._pointType=zi.getPointType(t[0]),this._inTangents=i,this._outTangents=o,this._lastTimeIndex=0}Object.defineProperties(ol.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}},inTangents:{get:function(){return this._inTangents}},outTangents:{get:function(){return this._outTangents}}});ol.createC1=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.times,n=e.points,i=e.tangents,o=i.slice(0,i.length-1),r=i.slice(1,i.length);return new ol({times:t,points:n,inTangents:r,outTangents:o})};ol.createNaturalCubic=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.times,n=e.points;if(n.length<3)return new Wm({points:n,times:t});let i=_ve(n),o=i.slice(0,i.length-1),r=i.slice(1,i.length);return new ol({times:t,points:n,inTangents:r,outTangents:o})};ol.createClampedCubic=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.times,n=e.points,i=e.firstTangent,o=e.lastTangent,r=zi.getPointType(n[0]);if(n.length<3)return new Wm({points:n,times:t});let s=pve(n,i,o),a=s.slice(0,s.length-1),c=s.slice(1,s.length);return new ol({times:t,points:n,inTangents:c,outTangents:a})};ol.hermiteCoefficientMatrix=new B(2,-3,0,1,-2,3,0,0,1,-2,1,0,1,-1,0,0);ol.prototype.findTimeInterval=zi.prototype.findTimeInterval;var gve=new se,hA=new h;ol.prototype.wrapTime=zi.prototype.wrapTime;ol.prototype.clampTime=zi.prototype.clampTime;ol.prototype.evaluate=function(e,t){let n=this.points,i=this.times,o=this.inTangents,r=this.outTangents;this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex);let s=this._lastTimeIndex,a=i[s+1]-i[s],c=(e-i[s])/a,u=gve;u.z=c,u.y=c*c,u.x=u.y*c,u.w=1;let f=B.multiplyByVector(ol.hermiteCoefficientMatrix,u,u);f.z*=a,f.w*=a;let d=this._pointType;return d===Number?n[s]*f.x+n[s+1]*f.y+r[s]*f.z+o[s]*f.w:(l(t)||(t=new d),t=d.multiplyByScalar(n[s],f.x,t),d.multiplyByScalar(n[s+1],f.y,hA),d.add(t,hA,t),d.multiplyByScalar(r[s],f.z,hA),d.add(t,hA,t),d.multiplyByScalar(o[s],f.w,hA),d.add(t,hA,t))};var dy=ol;var yve=new se,pZ=new h,mA=new h;function xve(e){let t=e.points,n=e.times;if(t.length<3){let i=n[0],o=1/(n[1]-i),r=t[0],s=t[1];return function(a,c){l(c)||(c=new h);let u=(a-i)*o;return h.lerp(r,s,u,c)}}return function(i,o){l(o)||(o=new h);let r=e._lastTimeIndex=e.findTimeInterval(i,e._lastTimeIndex),s=(i-n[r])/(n[r+1]-n[r]),a=yve;a.z=s,a.y=s*s,a.x=a.y*s,a.w=1;let c,u,f,d,p;return r===0?(c=t[0],u=t[1],f=e.firstTangent,d=h.subtract(t[2],c,pZ),h.multiplyByScalar(d,.5,d),p=B.multiplyByVector(dy.hermiteCoefficientMatrix,a,a)):r===t.length-2?(c=t[r],u=t[r+1],d=e.lastTangent,f=h.subtract(u,t[r-1],pZ),h.multiplyByScalar(f,.5,f),p=B.multiplyByVector(dy.hermiteCoefficientMatrix,a,a)):(c=t[r-1],u=t[r],f=t[r+1],d=t[r+2],p=B.multiplyByVector(P_.catmullRomCoefficientMatrix,a,a)),o=h.multiplyByScalar(c,p.x,o),h.multiplyByScalar(u,p.y,mA),h.add(o,mA,o),h.multiplyByScalar(f,p.z,mA),h.add(o,mA,o),h.multiplyByScalar(d,p.w,mA),h.add(o,mA,o)}}var Cve=new h,Ave=new h;function P_(e){e=y(e,y.EMPTY_OBJECT);let t=e.points,n=e.times,i=e.firstTangent,o=e.lastTangent;if(t.length>2&&(l(i)||(i=Cve,h.multiplyByScalar(t[1],2,i),h.subtract(i,t[2],i),h.subtract(i,t[0],i),h.multiplyByScalar(i,.5,i)),!l(o))){let r=t.length-1;o=Ave,h.multiplyByScalar(t[r-1],2,o),h.subtract(t[r],o,o),h.add(o,t[r-2],o),h.multiplyByScalar(o,.5,o)}this._times=n,this._points=t,this._firstTangent=h.clone(i),this._lastTangent=h.clone(o),this._evaluateFunction=xve(this),this._lastTimeIndex=0}Object.defineProperties(P_.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}},firstTangent:{get:function(){return this._firstTangent}},lastTangent:{get:function(){return this._lastTangent}}});P_.catmullRomCoefficientMatrix=new B(-.5,1,-.5,0,1.5,-2.5,0,1,-1.5,2,.5,0,.5,-.5,0,0);P_.prototype.findTimeInterval=zi.prototype.findTimeInterval;P_.prototype.wrapTime=zi.prototype.wrapTime;P_.prototype.clampTime=zi.prototype.clampTime;P_.prototype.evaluate=function(e,t){return this._evaluateFunction(e,t)};var _Z=P_;function I_(e,t,n){return t=y(t,0),n=y(n,e.byteLength-t),e=e.subarray(t,t+n),I_.decode(e)}I_.decodeWithTextDecoder=function(e){return new TextDecoder("utf-8").decode(e)};I_.decodeWithFromCharCode=function(e){let t="",n=Tve(e),i=n.length;for(let o=0;o<i;++o){let r=n[o];r<=65535?t+=String.fromCharCode(r):(r-=65536,t+=String.fromCharCode((r>>10)+55296,(r&1023)+56320))}return t};function ES(e,t,n){return t<=e&&e<=n}function Tve(e){let t=0,n=0,i=0,o=128,r=191,s=[],a=e.length;for(let c=0;c<a;++c){let u=e[c];if(i===0){if(ES(u,0,127)){s.push(u);continue}if(ES(u,194,223)){i=1,t=u&31;continue}if(ES(u,224,239)){u===224&&(o=160),u===237&&(r=159),i=2,t=u&15;continue}if(ES(u,240,244)){u===240&&(o=144),u===244&&(r=143),i=3,t=u&7;continue}throw new fe("String decoding failed.")}if(!ES(u,o,r)){t=i=n=0,o=128,r=191,--c;continue}o=128,r=191,t=t<<6|u&63,++n,n===i&&(s.push(t),t=i=n=0)}return s}typeof TextDecoder<"u"?I_.decode=I_.decodeWithTextDecoder:I_.decode=I_.decodeWithFromCharCode;var fa=I_;function bve(e,t,n){return JSON.parse(fa(e,t,n))}var No=bve;var uI={};uI.clipTriangleAtAxisAlignedThreshold=function(e,t,n,i,o,r){l(r)?r.length=0:r=[];let s,a,c;t?(s=n<e,a=i<e,c=o<e):(s=n>e,a=i>e,c=o>e);let u=s+a+c,f,d,p,_,m,x;return u===1?s?(f=(e-n)/(i-n),d=(e-n)/(o-n),r.push(1),r.push(2),d!==1&&(r.push(-1),r.push(0),r.push(2),r.push(d)),f!==1&&(r.push(-1),r.push(0),r.push(1),r.push(f))):a?(p=(e-i)/(o-i),_=(e-i)/(n-i),r.push(2),r.push(0),_!==1&&(r.push(-1),r.push(1),r.push(0),r.push(_)),p!==1&&(r.push(-1),r.push(1),r.push(2),r.push(p))):c&&(m=(e-o)/(n-o),x=(e-o)/(i-o),r.push(0),r.push(1),x!==1&&(r.push(-1),r.push(2),r.push(1),r.push(x)),m!==1&&(r.push(-1),r.push(2),r.push(0),r.push(m))):u===2?!s&&n!==e?(_=(e-i)/(n-i),m=(e-o)/(n-o),r.push(0),r.push(-1),r.push(1),r.push(0),r.push(_),r.push(-1),r.push(2),r.push(0),r.push(m)):!a&&i!==e?(x=(e-o)/(i-o),f=(e-n)/(i-n),r.push(1),r.push(-1),r.push(2),r.push(1),r.push(x),r.push(-1),r.push(0),r.push(1),r.push(f)):!c&&o!==e&&(d=(e-n)/(o-n),p=(e-i)/(o-i),r.push(2),r.push(-1),r.push(0),r.push(2),r.push(d),r.push(-1),r.push(1),r.push(2),r.push(p)):u!==3&&(r.push(0),r.push(1),r.push(2)),r};uI.computeBarycentricCoordinates=function(e,t,n,i,o,r,s,a,c){let u=n-s,f=s-o,d=r-a,p=i-a,_=1/(d*u+f*p),m=t-a,x=e-s,C=(d*x+f*m)*_,A=(-p*x+u*m)*_,T=1-C-A;return l(c)?(c.x=C,c.y=A,c.z=T,c):new h(C,A,T)};uI.computeLineSegmentLineSegmentIntersection=function(e,t,n,i,o,r,s,a,c){let u=(s-o)*(t-r)-(a-r)*(e-o),f=(n-e)*(t-r)-(i-t)*(e-o),d=(a-r)*(n-e)-(s-o)*(i-t);if(d===0)return;let p=u/d,_=f/d;if(p>=0&&p<=1&&_>=0&&_<=1)return l(c)||(c=new G),c.x=e+p*(n-e),c.y=t+p*(i-t),c};var O_=uI;function R_(e){this._quantizedVertices=e.quantizedVertices,this._encodedNormals=e.encodedNormals,this._indices=e.indices,this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._boundingSphere=e.boundingSphere,this._orientedBoundingBox=e.orientedBoundingBox,this._horizonOcclusionPoint=e.horizonOcclusionPoint,this._credits=e.credits;let t=this._quantizedVertices.length/3,n=this._uValues=this._quantizedVertices.subarray(0,t),i=this._vValues=this._quantizedVertices.subarray(t,2*t);this._heightValues=this._quantizedVertices.subarray(2*t,3*t);function o(s,a){return i[s]-i[a]}function r(s,a){return n[s]-n[a]}this._westIndices=dI(e.westIndices,o,t),this._southIndices=dI(e.southIndices,r,t),this._eastIndices=dI(e.eastIndices,o,t),this._northIndices=dI(e.northIndices,r,t),this._westSkirtHeight=e.westSkirtHeight,this._southSkirtHeight=e.southSkirtHeight,this._eastSkirtHeight=e.eastSkirtHeight,this._northSkirtHeight=e.northSkirtHeight,this._childTileMask=y(e.childTileMask,15),this._createdByUpsampling=y(e.createdByUpsampling,!1),this._waterMask=e.waterMask,this._mesh=void 0}Object.defineProperties(R_.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){return this._waterMask}},childTileMask:{get:function(){return this._childTileMask}},canUpsample:{get:function(){return l(this._mesh)}}});var fI=[];function dI(e,t,n){fI.length=e.length;let i=!1;for(let o=0,r=e.length;o<r;++o)fI[o]=e[o],i=i||o>0&&t(e[o-1],e[o])>0;return i?(fI.sort(t),Ne.createTypedArray(n,fI)):e}var gZ="createVerticesFromQuantizedTerrainMesh",Eve=new Di(gZ),Sve=new Di(gZ,_h.maximumAsynchronousTasks);R_.prototype.createMesh=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.tilingScheme,n=e.x,i=e.y,o=e.level,r=y(e.exaggeration,1),s=y(e.exaggerationRelativeHeight,0),a=y(e.throttle,!0),c=t.ellipsoid,u=t.tileXYToRectangle(n,i,o),d=(a?Sve:Eve).scheduleTask({minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,quantizedVertices:this._quantizedVertices,octEncodedNormals:this._encodedNormals,includeWebMercatorT:!0,indices:this._indices,westIndices:this._westIndices,southIndices:this._southIndices,eastIndices:this._eastIndices,northIndices:this._northIndices,westSkirtHeight:this._westSkirtHeight,southSkirtHeight:this._southSkirtHeight,eastSkirtHeight:this._eastSkirtHeight,northSkirtHeight:this._northSkirtHeight,rectangle:u,relativeToCenter:this._boundingSphere.center,ellipsoid:c,exaggeration:r,exaggerationRelativeHeight:s});if(!l(d))return;let p=this;return Promise.resolve(d).then(function(_){let m=p._quantizedVertices.length/3,x=m+p._westIndices.length+p._southIndices.length+p._eastIndices.length+p._northIndices.length,C=Ne.createTypedArray(x,_.indices),A=new Float32Array(_.vertices),T=_.center,b=_.minimumHeight,S=_.maximumHeight,w=p._boundingSphere,D=p._orientedBoundingBox,O=y(h.clone(_.occludeePointInScaledSpace),p._horizonOcclusionPoint),I=_.vertexStride,L=mc.clone(_.encoding);return p._mesh=new $f(T,A,C,_.indexCountWithoutSkirts,m,b,S,w,O,I,D,L,_.westIndicesSouthToNorth,_.southIndicesEastToWest,_.eastIndicesNorthToSouth,_.northIndicesWestToEast),p._quantizedVertices=void 0,p._encodedNormals=void 0,p._indices=void 0,p._uValues=void 0,p._vValues=void 0,p._heightValues=void 0,p._westIndices=void 0,p._southIndices=void 0,p._eastIndices=void 0,p._northIndices=void 0,p._mesh})};var wve=new Di("upsampleQuantizedTerrainMesh",_h.maximumAsynchronousTasks);R_.prototype.upsample=function(e,t,n,i,o,r,s){let a=this._mesh;if(!l(this._mesh))return;let c=t*2!==o,u=n*2===r,f=e.ellipsoid,d=e.tileXYToRectangle(o,r,s),p=wve.scheduleTask({vertices:a.vertices,vertexCountWithoutSkirts:a.vertexCountWithoutSkirts,indices:a.indices,indexCountWithoutSkirts:a.indexCountWithoutSkirts,encoding:a.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,isEastChild:c,isNorthChild:u,childRectangle:d,ellipsoid:f});if(!l(p))return;let _=Math.min(this._westSkirtHeight,this._eastSkirtHeight);_=Math.min(_,this._southSkirtHeight),_=Math.min(_,this._northSkirtHeight);let m=c?_*.5:this._westSkirtHeight,x=u?_*.5:this._southSkirtHeight,C=c?this._eastSkirtHeight:_*.5,A=u?this._northSkirtHeight:_*.5,T=this._credits;return Promise.resolve(p).then(function(b){let S=new Uint16Array(b.vertices),w=Ne.createTypedArray(S.length/3,b.indices),D;return l(b.encodedNormals)&&(D=new Uint8Array(b.encodedNormals)),new R_({quantizedVertices:S,indices:w,encodedNormals:D,minimumHeight:b.minimumHeight,maximumHeight:b.maximumHeight,boundingSphere:oe.clone(b.boundingSphere),orientedBoundingBox:gi.clone(b.orientedBoundingBox),horizonOcclusionPoint:h.clone(b.horizonOcclusionPoint),westIndices:b.westIndices,southIndices:b.southIndices,eastIndices:b.eastIndices,northIndices:b.northIndices,westSkirtHeight:m,southSkirtHeight:x,eastSkirtHeight:C,northSkirtHeight:A,childTileMask:0,credits:T,createdByUpsampling:!0})})};var VH=32767,yZ=new h;R_.prototype.interpolateHeight=function(e,t,n){let i=R.clamp((t-e.west)/e.width,0,1);i*=VH;let o=R.clamp((n-e.south)/e.height,0,1);return o*=VH,l(this._mesh)?Ive(this,i,o):Ove(this,i,o)};function xZ(e,t,n,i,o,r,s,a){let c=Math.min(n,o,s),u=Math.max(n,o,s),f=Math.min(i,r,a),d=Math.max(i,r,a);return e>=c&&e<=u&&t>=f&&t<=d}var vve=new G,Dve=new G,Pve=new G;function Ive(e,t,n){let i=e._mesh,o=i.vertices,r=i.encoding,s=i.indices;for(let a=0,c=s.length;a<c;a+=3){let u=s[a],f=s[a+1],d=s[a+2],p=r.decodeTextureCoordinates(o,u,vve),_=r.decodeTextureCoordinates(o,f,Dve),m=r.decodeTextureCoordinates(o,d,Pve);if(xZ(t,n,p.x,p.y,_.x,_.y,m.x,m.y)){let x=O_.computeBarycentricCoordinates(t,n,p.x,p.y,_.x,_.y,m.x,m.y,yZ);if(x.x>=-1e-15&&x.y>=-1e-15&&x.z>=-1e-15){let C=r.decodeHeight(o,u),A=r.decodeHeight(o,f),T=r.decodeHeight(o,d);return x.x*C+x.y*A+x.z*T}}}}function Ove(e,t,n){let i=e._uValues,o=e._vValues,r=e._heightValues,s=e._indices;for(let a=0,c=s.length;a<c;a+=3){let u=s[a],f=s[a+1],d=s[a+2],p=i[u],_=i[f],m=i[d],x=o[u],C=o[f],A=o[d];if(xZ(t,n,p,x,_,C,m,A)){let T=O_.computeBarycentricCoordinates(t,n,p,x,_,C,m,A,yZ);if(T.x>=-1e-15&&T.y>=-1e-15&&T.z>=-1e-15){let b=T.x*r[u]+T.y*r[f]+T.z*r[d];return R.lerp(e._minimumHeight,e._maximumHeight,b/VH)}}}}R_.prototype.isChildAvailable=function(e,t,n,i){let o=2;return n!==e*2&&++o,i!==t*2&&(o-=2),(this._childTileMask&1<<o)!==0};R_.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var pA=R_;function Rve(e){this.resource=e.resource,this.version=e.version,this.isHeightmap=e.isHeightmap,this.tileUrlTemplates=e.tileUrlTemplates,this.availability=e.availability,this.hasVertexNormals=e.hasVertexNormals,this.hasWaterMask=e.hasWaterMask,this.hasMetadata=e.hasMetadata,this.availabilityLevels=e.availabilityLevels,this.availabilityTilesLoaded=e.availabilityTilesLoaded,this.littleEndianExtensionSize=e.littleEndianExtensionSize,this.availabilityPromiseCache={}}function hy(e){this._heightmapWidth=65,this._heightmapStructure=void 0,this._hasWaterMask=!1,this._hasVertexNormals=!1,this._ellipsoid=e.ellipsoid,this._requestVertexNormals=y(e.requestVertexNormals,!1),this._requestWaterMask=y(e.requestWaterMask,!1),this._requestMetadata=y(e.requestMetadata,!0),this._errorEvent=new _e;let t=e.credit;typeof t=="string"&&(t=new Ht(t)),this._credit=t,this._availability=void 0,this._ready=!1,this._tileCredits=void 0,this._marsOptions=y(e.marsOptions,{});let n=this,i,o,r,s=this._layers=[],a="",c=[],u=0;this._readyPromise=Promise.resolve(e.url).then(function(x){let C=De.createIfNeeded(x);return C.appendForwardSlash(),i=C,o=i.getDerivedResource({url:"layer.json"}),n._tileCredits=C.credits,m()}).catch(function(x){n._marsOptions.onLoadError&&n._marsOptions.onLoadError(x)});function f(x){let C;if(!x.format)return C="The tile format is not specified in the layer.json file.",r=Gn.reportError(r,n,n._errorEvent,C),r.retry?m():Promise.reject(new fe(C));if(!x.tiles||x.tiles.length===0)return C="The layer.json file does not specify any tile URL templates.",r=Gn.reportError(r,n,n._errorEvent,C),r.retry?m():Promise.reject(new fe(C));let A=!1,T=!1,b=!1,S=!0,w=!1;if(x.format==="heightmap-1.0")w=!0,l(n._heightmapStructure)||(n._heightmapStructure={heightScale:1/5,heightOffset:-1e3,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1,lowestEncodedHeight:0,highestEncodedHeight:256*256-1}),T=!0,n._requestWaterMask=!0;else if(x.format.indexOf("quantized-mesh-1.")!==0)return C=`The tile format "${x.format}" is invalid or not supported.`,r=Gn.reportError(r,n,n._errorEvent,C),r.retry?m():Promise.reject(new fe(C));let D=x.tiles,O=x.maxzoom;if(u=Math.max(u,O),!x.projection||x.projection==="EPSG:4326")n._tilingScheme=new Xi({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:1,ellipsoid:n._ellipsoid});else if(x.projection==="EPSG:3857")n._tilingScheme=new ts({numberOfLevelZeroTilesX:1,numberOfLevelZeroTilesY:1,ellipsoid:n._ellipsoid});else return C=`The projection "${x.projection}" is invalid or not supported.`,r=Gn.reportError(r,n,n._errorEvent,C),r.retry?m():Promise.reject(new fe(C));if(n._levelZeroMaximumGeometricError=es.getEstimatedLevelZeroGeometricErrorForAHeightmap(n._tilingScheme.ellipsoid,n._heightmapWidth,n._tilingScheme.getNumberOfXTilesAtLevel(0)),!x.scheme||x.scheme==="tms"||x.scheme==="slippyMap")n._scheme=x.scheme;else return C=`The scheme "${x.scheme}" is invalid or not supported.`,r=Gn.reportError(r,n,n._errorEvent,C),r.retry?m():Promise.reject(new fe(C));let I;l(x.extensions)&&x.extensions.indexOf("octvertexnormals")!==-1?A=!0:l(x.extensions)&&x.extensions.indexOf("vertexnormals")!==-1&&(A=!0,S=!1),l(x.extensions)&&x.extensions.indexOf("watermask")!==-1&&(T=!0),l(x.extensions)&&x.extensions.indexOf("metadata")!==-1&&(b=!0);let L=x.metadataAvailability,N=x.available,g;if(l(N)&&!l(L)){g=new gh(n._tilingScheme,N.length);for(let v=0;v<N.length;++v){let P=N[v],M=n._tilingScheme.getNumberOfYTilesAtLevel(v);l(c[v])||(c[v]=[]);for(let V=0;V<P.length;++V){let U=P[V],k=M-U.endY-1,H=M-U.startY-1;c[v].push([U.startX,k,U.endX,H]),g.addAvailableTileRange(v,U.startX,k,U.endX,H)}}}else l(L)&&(I=new gh(n._tilingScheme,O),g=new gh(n._tilingScheme,O),c[0]=[[0,0,1,0]],g.addAvailableTileRange(0,0,0,1,0));n._hasWaterMask=n._hasWaterMask||T,n._hasVertexNormals=n._hasVertexNormals||A,n._hasMetadata=n._hasMetadata||b,l(x.attribution)&&(a.length>0&&(a+=" "),a+=x.attribution),s.push(new Rve({resource:i,version:x.version,isHeightmap:w,tileUrlTemplates:D,availability:g,hasVertexNormals:A,hasWaterMask:T,hasMetadata:b,availabilityLevels:L,availabilityTilesLoaded:I,littleEndianExtensionSize:S}));let E=x.parentUrl;if(l(E)){if(!l(g))return console.log("A layer.json can't have a parentUrl if it does't have an available array."),Promise.resolve(!0);i=i.getDerivedResource({url:E}),i.appendForwardSlash(),o=i.getDerivedResource({url:"layer.json"});let v=o.fetchJson();return Promise.resolve(v).then(f).catch(d)}return Promise.resolve(!0)}function d(x){let C=`An error occurred while accessing ${o.url}.`;return r=Gn.reportError(r,n,n._errorEvent,C),r.retry?m():(n._marsOptions.onLoadError&&n._marsOptions.onLoadError(x),Promise.reject(new fe(C)))}function p(x){return f(x).then(function(){if(l(r)){n._marsOptions.onLoadError&&n._marsOptions.onLoadError(r);return}let C=c.length;if(C>0){let A=n._availability=new gh(n._tilingScheme,u);for(let T=0;T<C;++T){let b=c[T];for(let S=0;S<b.length;++S){let w=b[S];A.addAvailableTileRange(T,w[0],w[1],w[2],w[3])}}}if(a.length>0){let A=new Ht(a);l(n._tileCredits)?n._tileCredits.push(A):n._tileCredits=[A]}return n._marsOptions.onLoadSuccess&&n._marsOptions.onLoadSuccess(x),n._ready=!0,Promise.resolve(!0)})}function _(x){return l(x)&&x.statusCode===404?p({tilejson:"2.1.0",format:"heightmap-1.0",version:"1.0.0",scheme:"tms",tiles:["{z}/{x}/{y}.terrain?v={version}"]}):d(x)}function m(){return Promise.resolve(o.fetchJson()).then(p).catch(_)}}var kH={OCT_VERTEX_NORMALS:1,WATER_MASK:2,METADATA:4};function CZ(e){return!l(e)||e.length===0?{Accept:"application/vnd.quantized-mesh,application/octet-stream;q=0.9,*/*;q=0.01"}:{Accept:`application/vnd.quantized-mesh;extensions=${e.join("-")},application/octet-stream;q=0.9,*/*;q=0.01`}}function Mve(e,t,n,i,o){let r=new Uint16Array(t,0,e._heightmapWidth*e._heightmapWidth);return new ka({buffer:r,childTileMask:new Uint8Array(t,r.byteLength,1)[0],waterMask:new Uint8Array(t,r.byteLength+1,t.byteLength-r.byteLength-1),width:e._heightmapWidth,height:e._heightmapWidth,structure:e._heightmapStructure,credits:e._tileCredits})}function Bve(e,t,n,i,o,r){let s=r.littleEndianExtensionSize,a=0,c=3,u=c+1,f=Float64Array.BYTES_PER_ELEMENT*c,d=Float64Array.BYTES_PER_ELEMENT*u,p=3,_=Uint16Array.BYTES_PER_ELEMENT*p,m=3,x=Uint16Array.BYTES_PER_ELEMENT,C=x*m,A=new DataView(t),T=new h(A.getFloat64(a,!0),A.getFloat64(a+8,!0),A.getFloat64(a+16,!0));a+=f;let b=A.getFloat32(a,!0);a+=Float32Array.BYTES_PER_ELEMENT;let S=A.getFloat32(a,!0);a+=Float32Array.BYTES_PER_ELEMENT;let w=new oe(new h(A.getFloat64(a,!0),A.getFloat64(a+8,!0),A.getFloat64(a+16,!0)),A.getFloat64(a+f,!0));a+=d;let D=new h(A.getFloat64(a,!0),A.getFloat64(a+8,!0),A.getFloat64(a+16,!0));a+=f;let O=A.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let I=new Uint16Array(t,a,O*3);a+=O*_,O>64*1024&&(x=Uint32Array.BYTES_PER_ELEMENT,C=x*m);let L=I.subarray(0,O),N=I.subarray(O,2*O),g=I.subarray(O*2,3*O);Pn.zigZagDeltaDecode(L,N,g),a%x!==0&&(a+=x-a%x);let E=A.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let v=Ne.createTypedArrayFromArrayBuffer(O,t,a,E*m);a+=E*C;let P=0,M=v.length;for(let ie=0;ie<M;++ie){let ae=v[ie];v[ie]=P-ae,ae===0&&++P}let V=A.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let U=Ne.createTypedArrayFromArrayBuffer(O,t,a,V);a+=V*x;let k=A.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let H=Ne.createTypedArrayFromArrayBuffer(O,t,a,k);a+=k*x;let F=A.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let Y=Ne.createTypedArrayFromArrayBuffer(O,t,a,F);a+=F*x;let j=A.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let X=Ne.createTypedArrayFromArrayBuffer(O,t,a,j);a+=j*x;let W,$;for(;a<A.byteLength;){let ie=A.getUint8(a,!0);a+=Uint8Array.BYTES_PER_ELEMENT;let ae=A.getUint32(a,s);if(a+=Uint32Array.BYTES_PER_ELEMENT,ie===kH.OCT_VERTEX_NORMALS&&e._requestVertexNormals)W=new Uint8Array(t,a,O*2);else if(ie===kH.WATER_MASK&&e._requestWaterMask)$=new Uint8Array(t,a,ae);else if(ie===kH.METADATA&&e._requestMetadata){let ge=A.getUint32(a,!0);if(ge>0){let be=No(new Uint8Array(t),a+Uint32Array.BYTES_PER_ELEMENT,ge).available;if(l(be))for(let Be=0;Be<be.length;++Be){let Ae=n+Be+1,Oe=be[Be],Ge=e._tilingScheme.getNumberOfYTilesAtLevel(Ae);for(let ot=0;ot<Oe.length;++ot){let nt=Oe[ot],Tn=Ge-nt.endY-1,Zn=Ge-nt.startY-1;e.availability.addAvailableTileRange(Ae,nt.startX,Tn,nt.endX,Zn),r.availability.addAvailableTileRange(Ae,nt.startX,Tn,nt.endX,Zn)}}}r.availabilityTilesLoaded.addAvailableTileRange(n,i,o,i,o)}a+=ae}let J=e.getLevelMaximumGeometricError(n)*5,ce=e._tilingScheme.tileXYToRectangle(i,o,n),he=gi.fromRectangle(ce,b,S,e._tilingScheme.ellipsoid);return new pA({center:T,minimumHeight:b,maximumHeight:S,boundingSphere:w,orientedBoundingBox:he,horizonOcclusionPoint:D,quantizedVertices:I,encodedNormals:W,indices:v,westIndices:U,southIndices:H,eastIndices:Y,northIndices:X,westSkirtHeight:J,southSkirtHeight:J,eastSkirtHeight:J,northSkirtHeight:J,childTileMask:e.availability.computeChildMaskForTile(n,i,o),waterMask:$,credits:e._tileCredits})}hy.prototype.requestTileGeometry=function(e,t,n,i){let o=this._layers,r,s=o.length;if(s===1)r=o[0];else for(let a=0;a<s;++a){let c=o[a];if(!l(c.availability)||c.availability.isTileAvailable(n,e,t)){r=c;break}}return AZ(this,e,t,n,r,i)};function AZ(e,t,n,i,o,r){if(!l(o))return Promise.reject(new fe("Terrain tile doesn't exist"));let s=o.tileUrlTemplates;if(s.length===0)return;let a;!e._scheme||e._scheme==="tms"?a=e._tilingScheme.getNumberOfYTilesAtLevel(i)-n-1:a=n;let c=[];e._requestVertexNormals&&o.hasVertexNormals&&c.push(o.littleEndianExtensionSize?"octvertexnormals":"vertexnormals"),e._requestWaterMask&&o.hasWaterMask&&c.push("watermask"),e._requestMetadata&&o.hasMetadata&&c.push("metadata");let u,f,d=s[(t+a+i)%s.length],p=o.resource;l(p._ionEndpoint)&&!l(p._ionEndpoint.externalType)?(c.length!==0&&(f={extensions:c.join("-")}),u=CZ(void 0)):u=CZ(c);let _=p.getDerivedResource({url:d,templateValues:{version:o.version,z:i,x:t,y:a},queryParameters:f,headers:u,request:r}).fetchArrayBuffer();if(!!l(_))return _.then(function(m){return l(m)?l(e._heightmapStructure)?Mve(e,m,i,t,n):Bve(e,m,i,t,n,o):Promise.reject(new fe("Mesh buffer doesn't exist."))})}Object.defineProperties(hy.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return this._hasWaterMask&&this._requestWaterMask}},hasVertexNormals:{get:function(){return this._hasVertexNormals&&this._requestVertexNormals}},hasMetadata:{get:function(){return this._hasMetadata&&this._requestMetadata}},requestVertexNormals:{get:function(){return this._requestVertexNormals}},requestWaterMask:{get:function(){return this._requestWaterMask}},requestMetadata:{get:function(){return this._requestMetadata}},availability:{get:function(){return this._availability}}});hy.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};hy.prototype.getTileDataAvailable=function(e,t,n){if(!l(this._availability))return;if(n>this._availability._maximumLevel)return!1;if(this._availability.isTileAvailable(n,e,t))return!0;if(!this._hasMetadata)return!1;let i=this._layers,o=i.length;for(let r=0;r<o;++r)if(TZ(this,e,t,n,i[r],r===0).result)return;return!1};hy.prototype.loadTileDataAvailability=function(e,t,n){if(!l(this._availability)||n>this._availability._maximumLevel||this._availability.isTileAvailable(n,e,t)||!this._hasMetadata)return;let i=this._layers,o=i.length;for(let r=0;r<o;++r){let s=TZ(this,e,t,n,i[r],r===0);if(l(s.promise))return s.promise}};function UH(e,t,n,i){if(i===0)return;let o=e.availabilityLevels,r=i%o===0?i-o:(i/o|0)*o,s=1<<i-r,a=t/s|0,c=n/s|0;return{level:r,x:a,y:c}}function TZ(e,t,n,i,o,r){if(!l(o.availabilityLevels))return{result:!1};let s,a=function(){delete o.availabilityPromiseCache[s]},c=o.availabilityTilesLoaded,u=o.availability,f=UH(o,t,n,i);for(;l(f);){if(u.isTileAvailable(f.level,f.x,f.y)&&!c.isTileAvailable(f.level,f.x,f.y)){let d;if(!r&&(s=`${f.level}-${f.x}-${f.y}`,d=o.availabilityPromiseCache[s],!l(d))){let p=new rr({throttle:!1,throttleByServer:!0,type:or.TERRAIN});d=AZ(e,f.x,f.y,f.level,o,p),l(d)&&(o.availabilityPromiseCache[s]=d,d.then(a))}return{result:!0,promise:d}}f=UH(o,f.x,f.y,f.level)}return{result:!1}}hy._getAvailabilityTile=UH;var hI=hy;var HH={},mI=new h,bZ=new h,EZ=new Me,SZ=new Q;function _A(e,t,n,i,o,r,s,a,c,u){let f=e+t;h.multiplyByScalar(i,Math.cos(f),mI),h.multiplyByScalar(n,Math.sin(f),bZ),h.add(mI,bZ,mI);let d=Math.cos(e);d=d*d;let p=Math.sin(e);p=p*p;let m=r/Math.sqrt(s*d+o*p)/a;return Me.fromAxisAngle(mI,m,EZ),Q.fromQuaternion(EZ,SZ),Q.multiplyByVector(SZ,c,u),h.normalize(u,u),h.multiplyByScalar(u,a,u),u}var wZ=new h,vZ=new h,zH=new h,Lve=new h;HH.raisePositionsToHeight=function(e,t,n){let i=t.ellipsoid,o=t.height,r=t.extrudedHeight,s=n?e.length/3*2:e.length/3,a=new Float64Array(s*3),c=e.length,u=n?c:0;for(let f=0;f<c;f+=3){let d=f+1,p=f+2,_=h.fromArray(e,f,wZ);i.scaleToGeodeticSurface(_,_);let m=h.clone(_,vZ),x=i.geodeticSurfaceNormal(_,Lve),C=h.multiplyByScalar(x,o,zH);h.add(_,C,_),n&&(h.multiplyByScalar(x,r,C),h.add(m,C,m),a[f+u]=m.x,a[d+u]=m.y,a[p+u]=m.z),a[f]=_.x,a[d]=_.y,a[p]=_.z}return a};var Nve=new h,Fve=new h,Vve=new h;HH.computeEllipsePositions=function(e,t,n){let i=e.semiMinorAxis,o=e.semiMajorAxis,r=e.rotation,s=e.center,a=e.granularity*8,c=i*i,u=o*o,f=o*i,d=h.magnitude(s),p=h.normalize(s,Nve),_=h.cross(h.UNIT_Z,s,Fve);_=h.normalize(_,_);let m=h.cross(p,_,Vve),x=1+Math.ceil(R.PI_OVER_TWO/a),C=R.PI_OVER_TWO/(x-1),A=R.PI_OVER_TWO-x*C;A<0&&(x-=Math.ceil(Math.abs(A)/C));let T=2*(x*(x+2)),b=t?new Array(T*3):void 0,S=0,w=wZ,D=vZ,O=x*4*3,I=O-1,L=0,N=n?new Array(O):void 0,g,E,v,P,M;for(A=R.PI_OVER_TWO,w=_A(A,r,m,_,c,f,u,d,p,w),t&&(b[S++]=w.x,b[S++]=w.y,b[S++]=w.z),n&&(N[I--]=w.z,N[I--]=w.y,N[I--]=w.x),A=R.PI_OVER_TWO-C,g=1;g<x+1;++g){if(w=_A(A,r,m,_,c,f,u,d,p,w),D=_A(Math.PI-A,r,m,_,c,f,u,d,p,D),t){for(b[S++]=w.x,b[S++]=w.y,b[S++]=w.z,v=2*g+2,E=1;E<v-1;++E)P=E/(v-1),M=h.lerp(w,D,P,zH),b[S++]=M.x,b[S++]=M.y,b[S++]=M.z;b[S++]=D.x,b[S++]=D.y,b[S++]=D.z}n&&(N[I--]=w.z,N[I--]=w.y,N[I--]=w.x,N[L++]=D.x,N[L++]=D.y,N[L++]=D.z),A=R.PI_OVER_TWO-(g+1)*C}for(g=x;g>1;--g){if(A=R.PI_OVER_TWO-(g-1)*C,w=_A(-A,r,m,_,c,f,u,d,p,w),D=_A(A+Math.PI,r,m,_,c,f,u,d,p,D),t){for(b[S++]=w.x,b[S++]=w.y,b[S++]=w.z,v=2*(g-1)+2,E=1;E<v-1;++E)P=E/(v-1),M=h.lerp(w,D,P,zH),b[S++]=M.x,b[S++]=M.y,b[S++]=M.z;b[S++]=D.x,b[S++]=D.y,b[S++]=D.z}n&&(N[I--]=w.z,N[I--]=w.y,N[I--]=w.x,N[L++]=D.x,N[L++]=D.y,N[L++]=D.z)}A=R.PI_OVER_TWO,w=_A(-A,r,m,_,c,f,u,d,p,w);let V={};return t&&(b[S++]=w.x,b[S++]=w.y,b[S++]=w.z,V.positions=b,V.numPts=x),n&&(N[I--]=w.z,N[I--]=w.y,N[I--]=w.x,V.outerPositions=N),V};var kl=HH;function kve(e){e=y(e,y.EMPTY_OBJECT),this.geometry=e.geometry,this.modelMatrix=B.clone(y(e.modelMatrix,B.IDENTITY)),this.id=e.id,this.pickPrimitive=e.pickPrimitive,this.attributes=y(e.attributes,{}),this.westHemisphereGeometry=void 0,this.eastHemisphereGeometry=void 0}var pt=kve;function Ch(){this.high=h.clone(h.ZERO),this.low=h.clone(h.ZERO)}Ch.encode=function(e,t){l(t)||(t={high:0,low:0});let n;return e>=0?(n=Math.floor(e/65536)*65536,t.high=n,t.low=e-n):(n=Math.floor(-e/65536)*65536,t.high=-n,t.low=e+n),t};var jm={high:0,low:0};Ch.fromCartesian=function(e,t){l(t)||(t=new Ch);let n=t.high,i=t.low;return Ch.encode(e.x,jm),n.x=jm.high,i.x=jm.low,Ch.encode(e.y,jm),n.y=jm.high,i.y=jm.low,Ch.encode(e.z,jm),n.z=jm.high,i.z=jm.low,t};var GH=new Ch;Ch.writeElements=function(e,t,n){Ch.fromCartesian(e,GH);let i=GH.high,o=GH.low;t[n]=i.x,t[n+1]=i.y,t[n+2]=i.z,t[n+3]=o.x,t[n+4]=o.y,t[n+5]=o.z};var kn=Ch;var WH={};WH.calculateACMR=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.indices,n=e.maximumIndex,i=y(e.cacheSize,24),o=t.length;if(!l(n)){n=0;let a=0,c=t[a];for(;a<o;)c>n&&(n=c),++a,c=t[a]}let r=[];for(let a=0;a<n+1;a++)r[a]=0;let s=i+1;for(let a=0;a<o;++a)s-r[t[a]]>i&&(r[t[a]]=s,++s);return(s-i+1)/(o/3)};WH.tipsify=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.indices,n=e.maximumIndex,i=y(e.cacheSize,24),o;function r(g,E,v,P){for(;E.length>=1;){let M=E[E.length-1];if(E.splice(E.length-1,1),g[M].numLiveTriangles>0)return M}for(;o<P;){if(g[o].numLiveTriangles>0)return++o,o-1;++o}return-1}function s(g,E,v,P,M,V,U){let k=-1,H,F=-1,Y=0;for(;Y<v.length;){let j=v[Y];P[j].numLiveTriangles&&(H=0,M-P[j].timeStamp+2*P[j].numLiveTriangles<=E&&(H=M-P[j].timeStamp),(H>F||F===-1)&&(F=H,k=j)),++Y}return k===-1?r(P,V,g,U):k}let a=t.length,c=0,u=0,f=t[u],d=a;if(l(n))c=n+1;else{for(;u<d;)f>c&&(c=f),++u,f=t[u];if(c===-1)return 0;++c}let p=[],_;for(_=0;_<c;_++)p[_]={numLiveTriangles:0,timeStamp:0,vertexTriangles:[]};u=0;let m=0;for(;u<d;)p[t[u]].vertexTriangles.push(m),++p[t[u]].numLiveTriangles,p[t[u+1]].vertexTriangles.push(m),++p[t[u+1]].numLiveTriangles,p[t[u+2]].vertexTriangles.push(m),++p[t[u+2]].numLiveTriangles,++m,u+=3;let x=0,C=i+1;o=1;let A=[],T=[],b,S,w=0,D=[],O=a/3,I=[];for(_=0;_<O;_++)I[_]=!1;let L,N;for(;x!==-1;){A=[],S=p[x],N=S.vertexTriangles.length;for(let g=0;g<N;++g)if(m=S.vertexTriangles[g],!I[m]){I[m]=!0,u=m+m+m;for(let E=0;E<3;++E)L=t[u],A.push(L),T.push(L),D[w]=L,++w,b=p[L],--b.numLiveTriangles,C-b.timeStamp>i&&(b.timeStamp=C,++C),++u}x=s(t,i,A,p,C,T,c)}return D};var pI=WH;var gc={};function TI(e,t,n,i,o){e[t++]=n,e[t++]=i,e[t++]=i,e[t++]=o,e[t++]=o,e[t]=n}function Uve(e){let t=e.length,n=t/3*6,i=Ne.createTypedArray(t,n),o=0;for(let r=0;r<t;r+=3,o+=6)TI(i,o,e[r],e[r+1],e[r+2]);return i}function zve(e){let t=e.length;if(t>=3){let n=(t-2)*6,i=Ne.createTypedArray(t,n);TI(i,0,e[0],e[1],e[2]);let o=6;for(let r=3;r<t;++r,o+=6)TI(i,o,e[r-1],e[r],e[r-2]);return i}return new Uint16Array}function Hve(e){if(e.length>0){let t=e.length-1,n=(t-1)*6,i=Ne.createTypedArray(t,n),o=e[0],r=0;for(let s=1;s<t;++s,r+=6)TI(i,r,o,e[s],e[s+1]);return i}return new Uint16Array}gc.toWireframe=function(e){let t=e.indices;if(l(t)){switch(e.primitiveType){case Le.TRIANGLES:e.indices=Uve(t);break;case Le.TRIANGLE_STRIP:e.indices=zve(t);break;case Le.TRIANGLE_FAN:e.indices=Hve(t);break}e.primitiveType=Le.LINES}return e};gc.createLineSegmentsForVectors=function(e,t,n){t=y(t,"normal"),n=y(n,1e4);let i=e.attributes.position.values,o=e.attributes[t].values,r=i.length,s=new Float64Array(2*r),a=0;for(let f=0;f<r;f+=3)s[a++]=i[f],s[a++]=i[f+1],s[a++]=i[f+2],s[a++]=i[f]+o[f]*n,s[a++]=i[f+1]+o[f+1]*n,s[a++]=i[f+2]+o[f+2]*n;let c,u=e.boundingSphere;return l(u)&&(c=new oe(u.center,u.radius+n)),new ct({attributes:{position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:s})},primitiveType:Le.LINES,boundingSphere:c})};gc.createAttributeLocations=function(e){let t=["position","positionHigh","positionLow","position3DHigh","position3DLow","position2DHigh","position2DLow","pickColor","normal","st","tangent","bitangent","extrudeDirection","compressedAttributes"],n=e.attributes,i={},o=0,r,s=t.length;for(r=0;r<s;++r){let a=t[r];l(n[a])&&(i[a]=o++)}for(let a in n)n.hasOwnProperty(a)&&!l(i[a])&&(i[a]=o++);return i};gc.reorderForPreVertexCache=function(e){let t=ct.computeNumberOfVertices(e),n=e.indices;if(l(n)){let i=new Int32Array(t);for(let p=0;p<t;p++)i[p]=-1;let o=n,r=o.length,s=Ne.createTypedArray(t,r),a=0,c=0,u=0,f;for(;a<r;)f=i[o[a]],f!==-1?s[c]=f:(f=o[a],i[f]=u,s[c]=u,++u),++a,++c;e.indices=s;let d=e.attributes;for(let p in d)if(d.hasOwnProperty(p)&&l(d[p])&&l(d[p].values)){let _=d[p],m=_.values,x=0,C=_.componentsPerAttribute,A=K.createTypedArray(_.componentDatatype,u*C);for(;x<t;){let T=i[x];if(T!==-1)for(let b=0;b<C;b++)A[C*T+b]=m[C*x+b];++x}_.values=A}}return e};gc.reorderForPostVertexCache=function(e,t){let n=e.indices;if(e.primitiveType===Le.TRIANGLES&&l(n)){let i=n.length,o=0;for(let r=0;r<i;r++)n[r]>o&&(o=n[r]);e.indices=pI.tipsify({indices:n,maximumIndex:o,cacheSize:t})}return e};function DZ(e){let t={};for(let n in e)if(e.hasOwnProperty(n)&&l(e[n])&&l(e[n].values)){let i=e[n];t[n]=new Ee({componentDatatype:i.componentDatatype,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize,values:[]})}return t}function Gve(e,t,n){for(let i in t)if(t.hasOwnProperty(i)&&l(t[i])&&l(t[i].values)){let o=t[i];for(let r=0;r<o.componentsPerAttribute;++r)e[i].values.push(o.values[n*o.componentsPerAttribute+r])}}gc.fitToUnsignedShortIndices=function(e){let t=[],n=ct.computeNumberOfVertices(e);if(l(e.indices)&&n>=R.SIXTY_FOUR_KILOBYTES){let i=[],o=[],r=0,s=DZ(e.attributes),a=e.indices,c=a.length,u;e.primitiveType===Le.TRIANGLES?u=3:e.primitiveType===Le.LINES?u=2:e.primitiveType===Le.POINTS&&(u=1);for(let f=0;f<c;f+=u){for(let d=0;d<u;++d){let p=a[f+d],_=i[p];l(_)||(_=r++,i[p]=_,Gve(s,e.attributes,p)),o.push(_)}r+u>=R.SIXTY_FOUR_KILOBYTES&&(t.push(new ct({attributes:s,indices:o,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV})),i=[],o=[],r=0,s=DZ(e.attributes))}o.length!==0&&t.push(new ct({attributes:s,indices:o,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV}))}else t.push(e);return t};var PZ=new h,Wve=new me;gc.projectTo2D=function(e,t,n,i,o){let r=e.attributes[t];o=l(o)?o:new Si;let s=o.ellipsoid,a=r.values,c=new Float64Array(a.length),u=0;for(let f=0;f<a.length;f+=3){let d=h.fromArray(a,f,PZ),p=s.cartesianToCartographic(d,Wve),_=o.project(p,PZ);c[u++]=_.x,c[u++]=_.y,c[u++]=_.z}return e.attributes[n]=r,e.attributes[i]=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:c}),delete e.attributes[t],e};var jH={high:0,low:0};gc.encodeAttribute=function(e,t,n,i){let o=e.attributes[t],r=o.values,s=r.length,a=new Float32Array(s),c=new Float32Array(s);for(let f=0;f<s;++f)kn.encode(r[f],jH),a[f]=jH.high,c[f]=jH.low;let u=o.componentsPerAttribute;return e.attributes[n]=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:u,values:a}),e.attributes[i]=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:u,values:c}),delete e.attributes[t],e};var Qf=new h;function qH(e,t){if(l(t)){let n=t.values,i=n.length;for(let o=0;o<i;o+=3)h.unpack(n,o,Qf),B.multiplyByPoint(e,Qf,Qf),h.pack(Qf,n,o)}}function YH(e,t){if(l(t)){let n=t.values,i=n.length;for(let o=0;o<i;o+=3)h.unpack(n,o,Qf),Q.multiplyByVector(e,Qf,Qf),Qf=h.normalize(Qf,Qf),h.pack(Qf,n,o)}}var _I=new B,gI=new Q;gc.transformToWorldCoordinates=function(e){let t=e.modelMatrix;if(B.equals(t,B.IDENTITY))return e;let n=e.geometry.attributes;qH(t,n.position),qH(t,n.prevPosition),qH(t,n.nextPosition),(l(n.normal)||l(n.tangent)||l(n.bitangent))&&(B.inverse(t,_I),B.transpose(_I,_I),B.getMatrix3(_I,gI),YH(gI,n.normal),YH(gI,n.tangent),YH(gI,n.bitangent));let i=e.geometry.boundingSphere;return l(i)&&(e.geometry.boundingSphere=oe.transform(i,t,i)),e.modelMatrix=B.clone(B.IDENTITY),e};function jve(e,t){let n=e.length,i={},o=e[0][t].attributes,r;for(r in o)if(o.hasOwnProperty(r)&&l(o[r])&&l(o[r].values)){let s=o[r],a=s.values.length,c=!0;for(let u=1;u<n;++u){let f=e[u][t].attributes[r];if(!l(f)||s.componentDatatype!==f.componentDatatype||s.componentsPerAttribute!==f.componentsPerAttribute||s.normalize!==f.normalize){c=!1;break}a+=f.values.length}c&&(i[r]=new Ee({componentDatatype:s.componentDatatype,componentsPerAttribute:s.componentsPerAttribute,normalize:s.normalize,values:K.createTypedArray(s.componentDatatype,a)}))}return i}var qve=new h;function XH(e,t){let n=e.length,i,o,r,s,a=e[0].modelMatrix,c=l(e[0][t].indices),u=e[0][t].primitiveType,f=jve(e,t),d,p,_;for(i in f)if(f.hasOwnProperty(i))for(d=f[i].values,s=0,o=0;o<n;++o)for(p=e[o][t].attributes[i].values,_=p.length,r=0;r<_;++r)d[s++]=p[r];let m;if(c){let T=0;for(o=0;o<n;++o)T+=e[o][t].indices.length;let b=ct.computeNumberOfVertices(new ct({attributes:f,primitiveType:Le.POINTS})),S=Ne.createTypedArray(b,T),w=0,D=0;for(o=0;o<n;++o){let O=e[o][t].indices,I=O.length;for(s=0;s<I;++s)S[w++]=D+O[s];D+=ct.computeNumberOfVertices(e[o][t])}m=S}let x=new h,C=0,A;for(o=0;o<n;++o){if(A=e[o][t].boundingSphere,!l(A)){x=void 0;break}h.add(A.center,x,x)}if(l(x))for(h.divideByScalar(x,n,x),o=0;o<n;++o){A=e[o][t].boundingSphere;let T=h.magnitude(h.subtract(A.center,x,qve))+A.radius;T>C&&(C=T)}return new ct({attributes:f,indices:m,primitiveType:u,boundingSphere:l(x)?new oe(x,C):void 0})}gc.combineInstances=function(e){let t=[],n=[],i=e.length;for(let r=0;r<i;++r){let s=e[r];l(s.geometry)?t.push(s):l(s.westHemisphereGeometry)&&l(s.eastHemisphereGeometry)&&n.push(s)}let o=[];return t.length>0&&o.push(XH(t,"geometry")),n.length>0&&(o.push(XH(n,"westHemisphereGeometry")),o.push(XH(n,"eastHemisphereGeometry"))),o};var Lu=new h,SS=new h,gA=new h,yA=new h;gc.computeNormal=function(e){let t=e.indices,n=e.attributes,i=n.position.values,o=n.position.values.length/3,r=t.length,s=new Array(o),a=new Array(r/3),c=new Array(r),u;for(u=0;u<o;u++)s[u]={indexOffset:0,count:0,currentCount:0};let f=0;for(u=0;u<r;u+=3){let m=t[u],x=t[u+1],C=t[u+2],A=m*3,T=x*3,b=C*3;SS.x=i[A],SS.y=i[A+1],SS.z=i[A+2],gA.x=i[T],gA.y=i[T+1],gA.z=i[T+2],yA.x=i[b],yA.y=i[b+1],yA.z=i[b+2],s[m].count++,s[x].count++,s[C].count++,h.subtract(gA,SS,gA),h.subtract(yA,SS,yA),a[f]=h.cross(gA,yA,new h),f++}let d=0;for(u=0;u<o;u++)s[u].indexOffset+=d,d+=s[u].count;f=0;let p;for(u=0;u<r;u+=3){p=s[t[u]];let m=p.indexOffset+p.currentCount;c[m]=f,p.currentCount++,p=s[t[u+1]],m=p.indexOffset+p.currentCount,c[m]=f,p.currentCount++,p=s[t[u+2]],m=p.indexOffset+p.currentCount,c[m]=f,p.currentCount++,f++}let _=new Float32Array(o*3);for(u=0;u<o;u++){let m=u*3;if(p=s[u],h.clone(h.ZERO,Lu),p.count>0){for(f=0;f<p.count;f++)h.add(Lu,a[c[p.indexOffset+f]],Lu);h.equalsEpsilon(h.ZERO,Lu,R.EPSILON10)&&h.clone(a[c[p.indexOffset]],Lu)}h.equalsEpsilon(h.ZERO,Lu,R.EPSILON10)&&(Lu.z=1),h.normalize(Lu,Lu),_[m]=Lu.x,_[m+1]=Lu.y,_[m+2]=Lu.z}return e.attributes.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:_}),e};var Yve=new h,IZ=new h,Xve=new h;gc.computeTangentAndBitangent=function(e){let t=e.attributes,n=e.indices,i=e.attributes.position.values,o=e.attributes.normal.values,r=e.attributes.st.values,s=e.attributes.position.values.length/3,a=n.length,c=new Array(s*3),u;for(u=0;u<c.length;u++)c[u]=0;let f,d,p;for(u=0;u<a;u+=3){let x=n[u],C=n[u+1],A=n[u+2];f=x*3,d=C*3,p=A*3;let T=x*2,b=C*2,S=A*2,w=i[f],D=i[f+1],O=i[f+2],I=r[T],L=r[T+1],N=r[b+1]-L,g=r[S+1]-L,E=1/((r[b]-I)*g-(r[S]-I)*N),v=(g*(i[d]-w)-N*(i[p]-w))*E,P=(g*(i[d+1]-D)-N*(i[p+1]-D))*E,M=(g*(i[d+2]-O)-N*(i[p+2]-O))*E;c[f]+=v,c[f+1]+=P,c[f+2]+=M,c[d]+=v,c[d+1]+=P,c[d+2]+=M,c[p]+=v,c[p+1]+=P,c[p+2]+=M}let _=new Float32Array(s*3),m=new Float32Array(s*3);for(u=0;u<s;u++){f=u*3,d=f+1,p=f+2;let x=h.fromArray(o,f,Yve),C=h.fromArray(c,f,Xve),A=h.dot(x,C);h.multiplyByScalar(x,A,IZ),h.normalize(h.subtract(C,IZ,C),C),_[f]=C.x,_[d]=C.y,_[p]=C.z,h.normalize(h.cross(x,C,C),C),m[f]=C.x,m[d]=C.y,m[p]=C.z}return e.attributes.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:_}),e.attributes.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:m}),e};var wS=new G,Jf=new h,OZ=new h,RZ=new h,yI=new G;gc.compressVertices=function(e){let t=e.attributes.extrudeDirection,n,i;if(l(t)){let D=t.values;i=D.length/3;let O=new Float32Array(i*2),I=0;for(n=0;n<i;++n){if(h.fromArray(D,n*3,Jf),h.equals(Jf,h.ZERO)){I+=2;continue}yI=Pn.octEncodeInRange(Jf,65535,yI),O[I++]=yI.x,O[I++]=yI.y}return e.attributes.compressedAttributes=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:O}),delete e.attributes.extrudeDirection,e}let o=e.attributes.normal,r=e.attributes.st,s=l(o),a=l(r);if(!s&&!a)return e;let c=e.attributes.tangent,u=e.attributes.bitangent,f=l(c),d=l(u),p,_,m,x;s&&(p=o.values),a&&(_=r.values),f&&(m=c.values),d&&(x=u.values),i=(s?p.length:_.length)/(s?3:2);let T=i,b=a&&s?2:1;b+=f||d?1:0,T*=b;let S=new Float32Array(T),w=0;for(n=0;n<i;++n){a&&(G.fromArray(_,n*2,wS),S[w++]=Pn.compressTextureCoordinates(wS));let D=n*3;s&&l(m)&&l(x)?(h.fromArray(p,D,Jf),h.fromArray(m,D,OZ),h.fromArray(x,D,RZ),Pn.octPack(Jf,OZ,RZ,wS),S[w++]=wS.x,S[w++]=wS.y):(s&&(h.fromArray(p,D,Jf),S[w++]=Pn.octEncodeFloat(Jf)),f&&(h.fromArray(m,D,Jf),S[w++]=Pn.octEncodeFloat(Jf)),d&&(h.fromArray(x,D,Jf),S[w++]=Pn.octEncodeFloat(Jf)))}return e.attributes.compressedAttributes=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:b,values:S}),s&&delete e.attributes.normal,a&&delete e.attributes.st,d&&delete e.attributes.bitangent,f&&delete e.attributes.tangent,e};function Kve(e){if(l(e.indices))return e;let t=ct.computeNumberOfVertices(e),n=Ne.createTypedArray(t,t);for(let i=0;i<t;++i)n[i]=i;return e.indices=n,e}function $ve(e){let t=ct.computeNumberOfVertices(e),n=Ne.createTypedArray(t,(t-2)*3);n[0]=1,n[1]=0,n[2]=2;let i=3;for(let o=3;o<t;++o)n[i++]=o-1,n[i++]=0,n[i++]=o;return e.indices=n,e.primitiveType=Le.TRIANGLES,e}function Zve(e){let t=ct.computeNumberOfVertices(e),n=Ne.createTypedArray(t,(t-2)*3);n[0]=0,n[1]=1,n[2]=2,t>3&&(n[3]=0,n[4]=2,n[5]=3);let i=6;for(let o=3;o<t-1;o+=2)n[i++]=o,n[i++]=o-1,n[i++]=o+1,o+2<t&&(n[i++]=o,n[i++]=o+1,n[i++]=o+2);return e.indices=n,e.primitiveType=Le.TRIANGLES,e}function Jve(e){if(l(e.indices))return e;let t=ct.computeNumberOfVertices(e),n=Ne.createTypedArray(t,t);for(let i=0;i<t;++i)n[i]=i;return e.indices=n,e}function Qve(e){let t=ct.computeNumberOfVertices(e),n=Ne.createTypedArray(t,(t-1)*2);n[0]=0,n[1]=1;let i=2;for(let o=2;o<t;++o)n[i++]=o-1,n[i++]=o;return e.indices=n,e.primitiveType=Le.LINES,e}function eDe(e){let t=ct.computeNumberOfVertices(e),n=Ne.createTypedArray(t,t*2);n[0]=0,n[1]=1;let i=2;for(let o=2;o<t;++o)n[i++]=o-1,n[i++]=o;return n[i++]=t-1,n[i]=0,e.indices=n,e.primitiveType=Le.LINES,e}function tDe(e){switch(e.primitiveType){case Le.TRIANGLE_FAN:return $ve(e);case Le.TRIANGLE_STRIP:return Zve(e);case Le.TRIANGLES:return Kve(e);case Le.LINE_STRIP:return Qve(e);case Le.LINE_LOOP:return eDe(e);case Le.LINES:return Jve(e)}return e}function M_(e,t){Math.abs(e.y)<R.EPSILON6&&(t?e.y=-R.EPSILON6:e.y=R.EPSILON6)}function nDe(e,t,n){if(e.y!==0&&t.y!==0&&n.y!==0){M_(e,e.y<0),M_(t,t.y<0),M_(n,n.y<0);return}let i=Math.abs(e.y),o=Math.abs(t.y),r=Math.abs(n.y),s;i>o?i>r?s=R.sign(e.y):s=R.sign(n.y):o>r?s=R.sign(t.y):s=R.sign(n.y);let a=s<0;M_(e,a),M_(t,a),M_(n,a)}var MZ=new h;function Nu(e,t,n,i){h.add(e,h.multiplyByScalar(h.subtract(t,e,MZ),e.y/(e.y-t.y),MZ),n),h.clone(n,i),M_(n,!0),M_(i,!1)}var my=new h,py=new h,_y=new h,gy=new h,KH={positions:new Array(7),indices:new Array(3*3)};function iDe(e,t,n){if(e.x>=0||t.x>=0||n.x>=0)return;nDe(e,t,n);let i=e.y<0,o=t.y<0,r=n.y<0,s=0;s+=i?1:0,s+=o?1:0,s+=r?1:0;let a=KH.indices;s===1?(a[1]=3,a[2]=4,a[5]=6,a[7]=6,a[8]=5,i?(Nu(e,t,my,_y),Nu(e,n,py,gy),a[0]=0,a[3]=1,a[4]=2,a[6]=1):o?(Nu(t,n,my,_y),Nu(t,e,py,gy),a[0]=1,a[3]=2,a[4]=0,a[6]=2):r&&(Nu(n,e,my,_y),Nu(n,t,py,gy),a[0]=2,a[3]=0,a[4]=1,a[6]=0)):s===2&&(a[2]=4,a[4]=4,a[5]=3,a[7]=5,a[8]=6,i?o?r||(Nu(n,e,my,_y),Nu(n,t,py,gy),a[0]=0,a[1]=1,a[3]=0,a[6]=2):(Nu(t,n,my,_y),Nu(t,e,py,gy),a[0]=2,a[1]=0,a[3]=2,a[6]=1):(Nu(e,t,my,_y),Nu(e,n,py,gy),a[0]=1,a[1]=2,a[3]=1,a[6]=0));let c=KH.positions;return c[0]=e,c[1]=t,c[2]=n,c.length=3,(s===1||s===2)&&(c[3]=my,c[4]=py,c[5]=_y,c[6]=gy,c.length=7),KH}function BZ(e,t){let n=e.attributes;if(n.position.values.length===0)return;for(let o in n)if(n.hasOwnProperty(o)&&l(n[o])&&l(n[o].values)){let r=n[o];r.values=K.createTypedArray(r.componentDatatype,r.values)}let i=ct.computeNumberOfVertices(e);return e.indices=Ne.createTypedArray(i,e.indices),t&&(e.boundingSphere=oe.fromVertices(n.position.values)),e}function CA(e){let t=e.attributes,n={};for(let i in t)if(t.hasOwnProperty(i)&&l(t[i])&&l(t[i].values)){let o=t[i];n[i]=new Ee({componentDatatype:o.componentDatatype,componentsPerAttribute:o.componentsPerAttribute,normalize:o.normalize,values:[]})}return new ct({attributes:n,indices:[],primitiveType:e.primitiveType})}function QH(e,t,n){let i=l(e.geometry.boundingSphere);t=BZ(t,i),n=BZ(n,i),l(n)&&!l(t)?e.geometry=n:!l(n)&&l(t)?e.geometry=t:(e.westHemisphereGeometry=t,e.eastHemisphereGeometry=n,e.geometry=void 0)}function e5(e,t){let n=new e,i=new e,o=new e;return function(r,s,a,c,u,f,d,p){let _=e.fromArray(u,r*t,n),m=e.fromArray(u,s*t,i),x=e.fromArray(u,a*t,o);e.multiplyByScalar(_,c.x,_),e.multiplyByScalar(m,c.y,m),e.multiplyByScalar(x,c.z,x);let C=e.add(_,m,_);e.add(C,x,C),p&&e.normalize(C,C),e.pack(C,f,d*t)}}var oDe=e5(se,4),AI=e5(h,3),UZ=e5(G,2),rDe=function(e,t,n,i,o,r,s){let a=o[e]*i.x,c=o[t]*i.y,u=o[n]*i.z;r[s]=a+c+u>R.EPSILON6?1:0},vS=new h,$H=new h,ZH=new h,sDe=new h;function xI(e,t,n,i,o,r,s,a,c,u,f,d,p,_,m,x){if(!l(r)&&!l(s)&&!l(a)&&!l(c)&&!l(u)&&_===0)return;let C=h.fromArray(o,e*3,vS),A=h.fromArray(o,t*3,$H),T=h.fromArray(o,n*3,ZH),b=uA(i,C,A,T,sDe);if(!!l(b)){if(l(r)&&AI(e,t,n,b,r,d.normal.values,x,!0),l(u)){let S=h.fromArray(u,e*3,vS),w=h.fromArray(u,t*3,$H),D=h.fromArray(u,n*3,ZH);h.multiplyByScalar(S,b.x,S),h.multiplyByScalar(w,b.y,w),h.multiplyByScalar(D,b.z,D);let O;!h.equals(S,h.ZERO)||!h.equals(w,h.ZERO)||!h.equals(D,h.ZERO)?(O=h.add(S,w,S),h.add(O,D,O),h.normalize(O,O)):(O=vS,O.x=0,O.y=0,O.z=0),h.pack(O,d.extrudeDirection.values,x*3)}if(l(f)&&rDe(e,t,n,b,f,d.applyOffset.values,x),l(s)&&AI(e,t,n,b,s,d.tangent.values,x,!0),l(a)&&AI(e,t,n,b,a,d.bitangent.values,x,!0),l(c)&&UZ(e,t,n,b,c,d.st.values,x),_>0)for(let S=0;S<_;S++){let w=p[S];aDe(e,t,n,b,x,m[w],d[w])}}}function aDe(e,t,n,i,o,r,s){let a=r.componentsPerAttribute,c=r.values,u=s.values;switch(a){case 4:oDe(e,t,n,i,c,u,o,!1);break;case 3:AI(e,t,n,i,c,u,o,!1);break;case 2:UZ(e,t,n,i,c,u,o,!1);break;default:u[o]=c[e]*i.x+c[t]*i.y+c[n]*i.z}}function Ah(e,t,n,i,o,r){let s=e.position.values.length/3;if(o!==-1){let a=i[o],c=n[a];return c===-1?(n[a]=s,e.position.values.push(r.x,r.y,r.z),t.push(s),s):(t.push(c),c)}return e.position.values.push(r.x,r.y,r.z),t.push(s),s}var cDe={position:!0,normal:!0,bitangent:!0,tangent:!0,st:!0,extrudeDirection:!0,applyOffset:!0};function LZ(e){let t=e.geometry,n=t.attributes,i=n.position.values,o=l(n.normal)?n.normal.values:void 0,r=l(n.bitangent)?n.bitangent.values:void 0,s=l(n.tangent)?n.tangent.values:void 0,a=l(n.st)?n.st.values:void 0,c=l(n.extrudeDirection)?n.extrudeDirection.values:void 0,u=l(n.applyOffset)?n.applyOffset.values:void 0,f=t.indices,d=[];for(let O in n)n.hasOwnProperty(O)&&!cDe[O]&&l(n[O])&&d.push(O);let p=d.length,_=CA(t),m=CA(t),x,C,A,T,b,S=[];S.length=i.length/3;let w=[];for(w.length=i.length/3,b=0;b<S.length;++b)S[b]=-1,w[b]=-1;let D=f.length;for(b=0;b<D;b+=3){let O=f[b],I=f[b+1],L=f[b+2],N=h.fromArray(i,O*3),g=h.fromArray(i,I*3),E=h.fromArray(i,L*3),v=iDe(N,g,E);if(l(v)&&v.positions.length>3){let P=v.positions,M=v.indices,V=M.length;for(let U=0;U<V;++U){let k=M[U],H=P[k];H.y<0?(x=m.attributes,C=m.indices,A=S):(x=_.attributes,C=_.indices,A=w),T=Ah(x,C,A,f,k<3?b+k:-1,H),xI(O,I,L,H,i,o,s,r,a,c,u,x,d,p,n,T)}}else l(v)&&(N=v.positions[0],g=v.positions[1],E=v.positions[2]),N.y<0?(x=m.attributes,C=m.indices,A=S):(x=_.attributes,C=_.indices,A=w),T=Ah(x,C,A,f,b,N),xI(O,I,L,N,i,o,s,r,a,c,u,x,d,p,n,T),T=Ah(x,C,A,f,b+1,g),xI(O,I,L,g,i,o,s,r,a,c,u,x,d,p,n,T),T=Ah(x,C,A,f,b+2,E),xI(O,I,L,E,i,o,s,r,a,c,u,x,d,p,n,T)}QH(e,m,_)}var zZ=rn.fromPointNormal(h.ZERO,h.UNIT_Y),lDe=new h,uDe=new h;function xA(e,t,n,i,o,r,s){if(!l(s))return;let a=h.fromArray(i,e*3,vS);h.equalsEpsilon(a,n,R.EPSILON10)?r.applyOffset.values[o]=s[e]:r.applyOffset.values[o]=s[t]}function NZ(e){let t=e.geometry,n=t.attributes,i=n.position.values,o=l(n.applyOffset)?n.applyOffset.values:void 0,r=t.indices,s=CA(t),a=CA(t),c,u=r.length,f=[];f.length=i.length/3;let d=[];for(d.length=i.length/3,c=0;c<f.length;++c)f[c]=-1,d[c]=-1;for(c=0;c<u;c+=2){let p=r[c],_=r[c+1],m=h.fromArray(i,p*3,vS),x=h.fromArray(i,_*3,$H),C;Math.abs(m.y)<R.EPSILON6&&(m.y<0?m.y=-R.EPSILON6:m.y=R.EPSILON6),Math.abs(x.y)<R.EPSILON6&&(x.y<0?x.y=-R.EPSILON6:x.y=R.EPSILON6);let A=s.attributes,T=s.indices,b=d,S=a.attributes,w=a.indices,D=f,O=Ki.lineSegmentPlane(m,x,zZ,ZH);if(l(O)){let I=h.multiplyByScalar(h.UNIT_Y,5*R.EPSILON9,lDe);m.y<0&&(h.negate(I,I),A=a.attributes,T=a.indices,b=f,S=s.attributes,w=s.indices,D=d);let L=h.add(O,I,uDe);C=Ah(A,T,b,r,c,m),xA(p,_,m,i,C,A,o),C=Ah(A,T,b,r,-1,L),xA(p,_,L,i,C,A,o),h.negate(I,I),h.add(O,I,L),C=Ah(S,w,D,r,-1,L),xA(p,_,L,i,C,S,o),C=Ah(S,w,D,r,c+1,x),xA(p,_,x,i,C,S,o)}else{let I,L,N;m.y<0?(I=a.attributes,L=a.indices,N=f):(I=s.attributes,L=s.indices,N=d),C=Ah(I,L,N,r,c,m),xA(p,_,m,i,C,I,o),C=Ah(I,L,N,r,c+1,x),xA(p,_,x,i,C,I,o)}}QH(e,a,s)}var FZ=new G,fDe=new G,HZ=new h,GZ=new h,JH=new h,dDe=new h,hDe=new h,mDe=new h,VZ=new se;function kZ(e){let t=e.attributes,n=t.position.values,i=t.prevPosition.values,o=t.nextPosition.values,r=n.length;for(let s=0;s<r;s+=3){let a=h.unpack(n,s,HZ);if(a.x>0)continue;let c=h.unpack(i,s,GZ);(a.y<0&&c.y>0||a.y>0&&c.y<0)&&(s-3>0?(i[s]=n[s-3],i[s+1]=n[s-2],i[s+2]=n[s-1]):h.pack(a,i,s));let u=h.unpack(o,s,JH);(a.y<0&&u.y>0||a.y>0&&u.y<0)&&(s+3<r?(o[s]=n[s+3],o[s+1]=n[s+4],o[s+2]=n[s+5]):h.pack(a,o,s))}}var pDe=5*R.EPSILON9,CI=R.EPSILON6;function _De(e){let t=e.geometry,n=t.attributes,i=n.position.values,o=n.prevPosition.values,r=n.nextPosition.values,s=n.expandAndWidth.values,a=l(n.st)?n.st.values:void 0,c=l(n.color)?n.color.values:void 0,u=CA(t),f=CA(t),d,p,_,m=!1,x=i.length/3;for(d=0;d<x;d+=4){let C=d,A=d+2,T=h.fromArray(i,C*3,HZ),b=h.fromArray(i,A*3,GZ);if(Math.abs(T.y)<CI)for(T.y=CI*(b.y<0?-1:1),i[d*3+1]=T.y,i[(d+1)*3+1]=T.y,p=C*3;p<C*3+4*3;p+=3)o[p]=i[d*3],o[p+1]=i[d*3+1],o[p+2]=i[d*3+2];if(Math.abs(b.y)<CI)for(b.y=CI*(T.y<0?-1:1),i[(d+2)*3+1]=b.y,i[(d+3)*3+1]=b.y,p=C*3;p<C*3+4*3;p+=3)r[p]=i[(d+2)*3],r[p+1]=i[(d+2)*3+1],r[p+2]=i[(d+2)*3+2];let S=u.attributes,w=u.indices,D=f.attributes,O=f.indices,I=Ki.lineSegmentPlane(T,b,zZ,dDe);if(l(I)){m=!0;let L=h.multiplyByScalar(h.UNIT_Y,pDe,hDe);T.y<0&&(h.negate(L,L),S=f.attributes,w=f.indices,D=u.attributes,O=u.indices);let N=h.add(I,L,mDe);S.position.values.push(T.x,T.y,T.z,T.x,T.y,T.z),S.position.values.push(N.x,N.y,N.z),S.position.values.push(N.x,N.y,N.z),S.prevPosition.values.push(o[C*3],o[C*3+1],o[C*3+2]),S.prevPosition.values.push(o[C*3+3],o[C*3+4],o[C*3+5]),S.prevPosition.values.push(T.x,T.y,T.z,T.x,T.y,T.z),S.nextPosition.values.push(N.x,N.y,N.z),S.nextPosition.values.push(N.x,N.y,N.z),S.nextPosition.values.push(N.x,N.y,N.z),S.nextPosition.values.push(N.x,N.y,N.z),h.negate(L,L),h.add(I,L,N),D.position.values.push(N.x,N.y,N.z),D.position.values.push(N.x,N.y,N.z),D.position.values.push(b.x,b.y,b.z,b.x,b.y,b.z),D.prevPosition.values.push(N.x,N.y,N.z),D.prevPosition.values.push(N.x,N.y,N.z),D.prevPosition.values.push(N.x,N.y,N.z),D.prevPosition.values.push(N.x,N.y,N.z),D.nextPosition.values.push(b.x,b.y,b.z,b.x,b.y,b.z),D.nextPosition.values.push(r[A*3],r[A*3+1],r[A*3+2]),D.nextPosition.values.push(r[A*3+3],r[A*3+4],r[A*3+5]);let g=G.fromArray(s,C*2,FZ),E=Math.abs(g.y);S.expandAndWidth.values.push(-1,E,1,E),S.expandAndWidth.values.push(-1,-E,1,-E),D.expandAndWidth.values.push(-1,E,1,E),D.expandAndWidth.values.push(-1,-E,1,-E);let v=h.magnitudeSquared(h.subtract(I,T,JH));if(v/=h.magnitudeSquared(h.subtract(b,T,JH)),l(c)){let P=se.fromArray(c,C*4,VZ),M=se.fromArray(c,A*4,VZ),V=R.lerp(P.x,M.x,v),U=R.lerp(P.y,M.y,v),k=R.lerp(P.z,M.z,v),H=R.lerp(P.w,M.w,v);for(p=C*4;p<C*4+2*4;++p)S.color.values.push(c[p]);for(S.color.values.push(V,U,k,H),S.color.values.push(V,U,k,H),D.color.values.push(V,U,k,H),D.color.values.push(V,U,k,H),p=A*4;p<A*4+2*4;++p)D.color.values.push(c[p])}if(l(a)){let P=G.fromArray(a,C*2,FZ),M=G.fromArray(a,(d+3)*2,fDe),V=R.lerp(P.x,M.x,v);for(p=C*2;p<C*2+2*2;++p)S.st.values.push(a[p]);for(S.st.values.push(V,P.y),S.st.values.push(V,M.y),D.st.values.push(V,P.y),D.st.values.push(V,M.y),p=A*2;p<A*2+2*2;++p)D.st.values.push(a[p])}_=S.position.values.length/3-4,w.push(_,_+2,_+1),w.push(_+1,_+2,_+3),_=D.position.values.length/3-4,O.push(_,_+2,_+1),O.push(_+1,_+2,_+3)}else{let L,N;for(T.y<0?(L=f.attributes,N=f.indices):(L=u.attributes,N=u.indices),L.position.values.push(T.x,T.y,T.z),L.position.values.push(T.x,T.y,T.z),L.position.values.push(b.x,b.y,b.z),L.position.values.push(b.x,b.y,b.z),p=d*3;p<d*3+4*3;++p)L.prevPosition.values.push(o[p]),L.nextPosition.values.push(r[p]);for(p=d*2;p<d*2+4*2;++p)L.expandAndWidth.values.push(s[p]),l(a)&&L.st.values.push(a[p]);if(l(c))for(p=d*4;p<d*4+4*4;++p)L.color.values.push(c[p]);_=L.position.values.length/3-4,N.push(_,_+2,_+1),N.push(_+1,_+2,_+3)}}m&&(kZ(f),kZ(u)),QH(e,f,u)}gc.splitLongitude=function(e){let t=e.geometry,n=t.boundingSphere;if(l(n)&&(n.center.x-n.radius>0||oe.intersectPlane(n,rn.ORIGIN_ZX_PLANE)!==Zt.INTERSECTING))return e;if(t.geometryType!==Zf.NONE)switch(t.geometryType){case Zf.POLYLINES:_De(e);break;case Zf.TRIANGLES:LZ(e);break;case Zf.LINES:NZ(e);break}else tDe(t),t.primitiveType===Le.TRIANGLES?LZ(e):t.primitiveType===Le.LINES&&NZ(e);return e};var Rn=gc;var AA=new h,t5=new h,n5=new h,WZ=new h,us=new G,jZ=new Q,gDe=new Q,i5=new Me,qZ=new h,YZ=new h,XZ=new h,SI=new me,KZ=new h,$Z=new G,ZZ=new G;function JZ(e,t,n){let i=t.vertexFormat,o=t.center,r=t.semiMajorAxis,s=t.semiMinorAxis,a=t.ellipsoid,c=t.stRotation,u=n?e.length/3*2:e.length/3,f=t.shadowVolume,d=i.st?new Float32Array(u*2):void 0,p=i.normal?new Float32Array(u*3):void 0,_=i.tangent?new Float32Array(u*3):void 0,m=i.bitangent?new Float32Array(u*3):void 0,x=f?new Float32Array(u*3):void 0,C=0,A=qZ,T=YZ,b=XZ,S=new Si(a),w=S.project(a.cartesianToCartographic(o,SI),KZ),D=a.scaleToGeodeticSurface(o,AA);a.geodeticSurfaceNormal(D,D);let O=jZ,I=gDe;if(c!==0){let M=Me.fromAxisAngle(D,c,i5);O=Q.fromQuaternion(M,O),M=Me.fromAxisAngle(D,-c,i5),I=Q.fromQuaternion(M,I)}else O=Q.clone(Q.IDENTITY,O),I=Q.clone(Q.IDENTITY,I);let L=G.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,$Z),N=G.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,ZZ),g=e.length,E=n?g:0,v=E/3*2;for(let M=0;M<g;M+=3){let V=M+1,U=M+2,k=h.fromArray(e,M,AA);if(i.st){let H=Q.multiplyByVector(O,k,t5),F=S.project(a.cartesianToCartographic(H,SI),n5);h.subtract(F,w,F),us.x=(F.x+r)/(2*r),us.y=(F.y+s)/(2*s),L.x=Math.min(us.x,L.x),L.y=Math.min(us.y,L.y),N.x=Math.max(us.x,N.x),N.y=Math.max(us.y,N.y),n&&(d[C+v]=us.x,d[C+1+v]=us.y),d[C++]=us.x,d[C++]=us.y}(i.normal||i.tangent||i.bitangent||f)&&(A=a.geodeticSurfaceNormal(k,A),f&&(x[M+E]=-A.x,x[V+E]=-A.y,x[U+E]=-A.z),(i.normal||i.tangent||i.bitangent)&&((i.tangent||i.bitangent)&&(T=h.normalize(h.cross(h.UNIT_Z,A,T),T),Q.multiplyByVector(I,T,T)),i.normal&&(p[M]=A.x,p[V]=A.y,p[U]=A.z,n&&(p[M+E]=-A.x,p[V+E]=-A.y,p[U+E]=-A.z)),i.tangent&&(_[M]=T.x,_[V]=T.y,_[U]=T.z,n&&(_[M+E]=-T.x,_[V+E]=-T.y,_[U+E]=-T.z)),i.bitangent&&(b=h.normalize(h.cross(A,T,b),b),m[M]=b.x,m[V]=b.y,m[U]=b.z,n&&(m[M+E]=b.x,m[V+E]=b.y,m[U+E]=b.z))))}if(i.st){g=d.length;for(let M=0;M<g;M+=2)d[M]=(d[M]-L.x)/(N.x-L.x),d[M+1]=(d[M+1]-L.y)/(N.y-L.y)}let P=new ln;if(i.position){let M=kl.raisePositionsToHeight(e,t,n);P.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:M})}if(i.st&&(P.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:d})),i.normal&&(P.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:p})),i.tangent&&(P.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:_})),i.bitangent&&(P.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:m})),f&&(P.extrudeDirection=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:x})),n&&l(t.offsetAttribute)){let M=new Uint8Array(u);if(t.offsetAttribute===tn.TOP)M=M.fill(1,0,u/2);else{let V=t.offsetAttribute===tn.NONE?0:1;M=M.fill(V)}P.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:M})}return P}function QZ(e){let t=new Array(12*(e*(e+1))-6),n=0,i,o,r,s,a;for(i=0,r=1,s=0;s<3;s++)t[n++]=r++,t[n++]=i,t[n++]=r;for(s=2;s<e+1;++s){for(r=s*(s+1)-1,i=(s-1)*s-1,t[n++]=r++,t[n++]=i,t[n++]=r,o=2*s,a=0;a<o-1;++a)t[n++]=r,t[n++]=i++,t[n++]=i,t[n++]=r++,t[n++]=i,t[n++]=r;t[n++]=r++,t[n++]=i,t[n++]=r}for(o=e*2,++r,++i,s=0;s<o-1;++s)t[n++]=r,t[n++]=i++,t[n++]=i,t[n++]=r++,t[n++]=i,t[n++]=r;for(t[n++]=r,t[n++]=i++,t[n++]=i,t[n++]=r++,t[n++]=i++,t[n++]=i,++i,s=e-1;s>1;--s){for(t[n++]=i++,t[n++]=i,t[n++]=r,o=2*s,a=0;a<o-1;++a)t[n++]=r,t[n++]=i++,t[n++]=i,t[n++]=r++,t[n++]=i,t[n++]=r;t[n++]=i++,t[n++]=i++,t[n++]=r++}for(s=0;s<3;s++)t[n++]=i++,t[n++]=i,t[n++]=r;return t}var yy=new h;function yDe(e){let t=e.center;yy=h.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,yy),e.height,yy),yy=h.add(t,yy,yy);let n=new oe(yy,e.semiMajorAxis),i=kl.computeEllipsePositions(e,!0,!1),o=i.positions,r=i.numPts,s=JZ(o,e,!1),a=QZ(r);return a=Ne.createTypedArray(o.length/3,a),{boundingSphere:n,attributes:s,indices:a}}function xDe(e,t){let n=t.vertexFormat,i=t.center,o=t.semiMajorAxis,r=t.semiMinorAxis,s=t.ellipsoid,a=t.height,c=t.extrudedHeight,u=t.stRotation,f=e.length/3*2,d=new Float64Array(f*3),p=n.st?new Float32Array(f*2):void 0,_=n.normal?new Float32Array(f*3):void 0,m=n.tangent?new Float32Array(f*3):void 0,x=n.bitangent?new Float32Array(f*3):void 0,C=t.shadowVolume,A=C?new Float32Array(f*3):void 0,T=0,b=qZ,S=YZ,w=XZ,D=new Si(s),O=D.project(s.cartesianToCartographic(i,SI),KZ),I=s.scaleToGeodeticSurface(i,AA);s.geodeticSurfaceNormal(I,I);let L=Me.fromAxisAngle(I,u,i5),N=Q.fromQuaternion(L,jZ),g=G.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,$Z),E=G.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,ZZ),v=e.length,P=v/3*2;for(let V=0;V<v;V+=3){let U=V+1,k=V+2,H=h.fromArray(e,V,AA),F;if(n.st){let j=Q.multiplyByVector(N,H,t5),X=D.project(s.cartesianToCartographic(j,SI),n5);h.subtract(X,O,X),us.x=(X.x+o)/(2*o),us.y=(X.y+r)/(2*r),g.x=Math.min(us.x,g.x),g.y=Math.min(us.y,g.y),E.x=Math.max(us.x,E.x),E.y=Math.max(us.y,E.y),p[T+P]=us.x,p[T+1+P]=us.y,p[T++]=us.x,p[T++]=us.y}H=s.scaleToGeodeticSurface(H,H),F=h.clone(H,t5),b=s.geodeticSurfaceNormal(H,b),C&&(A[V+v]=-b.x,A[U+v]=-b.y,A[k+v]=-b.z);let Y=h.multiplyByScalar(b,a,WZ);if(H=h.add(H,Y,H),Y=h.multiplyByScalar(b,c,Y),F=h.add(F,Y,F),n.position&&(d[V+v]=F.x,d[U+v]=F.y,d[k+v]=F.z,d[V]=H.x,d[U]=H.y,d[k]=H.z),n.normal||n.tangent||n.bitangent){w=h.clone(b,w);let j=h.fromArray(e,(V+3)%v,WZ);h.subtract(j,H,j);let X=h.subtract(F,H,n5);b=h.normalize(h.cross(X,j,b),b),n.normal&&(_[V]=b.x,_[U]=b.y,_[k]=b.z,_[V+v]=b.x,_[U+v]=b.y,_[k+v]=b.z),n.tangent&&(S=h.normalize(h.cross(w,b,S),S),m[V]=S.x,m[U]=S.y,m[k]=S.z,m[V+v]=S.x,m[V+1+v]=S.y,m[V+2+v]=S.z),n.bitangent&&(x[V]=w.x,x[U]=w.y,x[k]=w.z,x[V+v]=w.x,x[U+v]=w.y,x[k+v]=w.z)}}if(n.st){v=p.length;for(let V=0;V<v;V+=2)p[V]=(p[V]-g.x)/(E.x-g.x),p[V+1]=(p[V+1]-g.y)/(E.y-g.y)}let M=new ln;if(n.position&&(M.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:d})),n.st&&(M.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:p})),n.normal&&(M.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:_})),n.tangent&&(M.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:m})),n.bitangent&&(M.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:x})),C&&(M.extrudeDirection=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:A})),l(t.offsetAttribute)){let V=new Uint8Array(f);if(t.offsetAttribute===tn.TOP)V=V.fill(1,0,f/2);else{let U=t.offsetAttribute===tn.NONE?0:1;V=V.fill(U)}M.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:V})}return M}function CDe(e){let t=e.length/3,n=Ne.createTypedArray(t,t*6),i=0;for(let o=0;o<t;o++){let r=o,s=o+t,a=(r+1)%t,c=a+t;n[i++]=r,n[i++]=s,n[i++]=a,n[i++]=a,n[i++]=s,n[i++]=c}return n}var bI=new oe,EI=new oe;function ADe(e){let t=e.center,n=e.ellipsoid,i=e.semiMajorAxis,o=h.multiplyByScalar(n.geodeticSurfaceNormal(t,AA),e.height,AA);bI.center=h.add(t,o,bI.center),bI.radius=i,o=h.multiplyByScalar(n.geodeticSurfaceNormal(t,o),e.extrudedHeight,o),EI.center=h.add(t,o,EI.center),EI.radius=i;let r=kl.computeEllipsePositions(e,!0,!0),s=r.positions,a=r.numPts,c=r.outerPositions,u=oe.union(bI,EI),f=JZ(s,e,!0),d=QZ(a),p=d.length;d.length=p*2;let _=s.length/3;for(let S=0;S<p;S+=3)d[S+p]=d[S+2]+_,d[S+1+p]=d[S+1]+_,d[S+2+p]=d[S]+_;let m=Ne.createTypedArray(_*2/3,d),x=new ct({attributes:f,indices:m,primitiveType:Le.TRIANGLES}),C=xDe(c,e);d=CDe(c);let A=Ne.createTypedArray(c.length*2/3,d),T=new ct({attributes:C,indices:A,primitiveType:Le.TRIANGLES}),b=Rn.combineInstances([new pt({geometry:x}),new pt({geometry:T})]);return{boundingSphere:u,attributes:b[0].attributes,indices:b[0].indices}}function eJ(e,t,n,i,o,r,s){let c=kl.computeEllipsePositions({center:e,semiMajorAxis:t,semiMinorAxis:n,rotation:i,granularity:o},!1,!0).outerPositions,u=c.length/3,f=new Array(u);for(let p=0;p<u;++p)f[p]=h.fromArray(c,p*3);let d=de.fromCartesianArray(f,r,s);return d.width>R.PI&&(d.north=d.north>0?R.PI_OVER_TWO-R.EPSILON7:d.north,d.south=d.south<0?R.EPSILON7-R.PI_OVER_TWO:d.south,d.east=R.PI,d.west=-R.PI),d}function bh(e){e=y(e,y.EMPTY_OBJECT);let t=e.center,n=y(e.ellipsoid,re.WGS84),i=e.semiMajorAxis,o=e.semiMinorAxis,r=y(e.granularity,R.RADIANS_PER_DEGREE),s=y(e.vertexFormat,Pe.DEFAULT),a=y(e.height,0),c=y(e.extrudedHeight,a);this._center=h.clone(t),this._semiMajorAxis=i,this._semiMinorAxis=o,this._ellipsoid=re.clone(n),this._rotation=y(e.rotation,0),this._stRotation=y(e.stRotation,0),this._height=Math.max(c,a),this._granularity=r,this._vertexFormat=Pe.clone(s),this._extrudedHeight=Math.min(c,a),this._shadowVolume=y(e.shadowVolume,!1),this._workerName="createEllipseGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0}bh.packedLength=h.packedLength+re.packedLength+Pe.packedLength+9;bh.pack=function(e,t,n){return n=y(n,0),h.pack(e._center,t,n),n+=h.packedLength,re.pack(e._ellipsoid,t,n),n+=re.packedLength,Pe.pack(e._vertexFormat,t,n),n+=Pe.packedLength,t[n++]=e._semiMajorAxis,t[n++]=e._semiMinorAxis,t[n++]=e._rotation,t[n++]=e._stRotation,t[n++]=e._height,t[n++]=e._granularity,t[n++]=e._extrudedHeight,t[n++]=e._shadowVolume?1:0,t[n]=y(e._offsetAttribute,-1),t};var tJ=new h,nJ=new re,iJ=new Pe,Th={center:tJ,ellipsoid:nJ,vertexFormat:iJ,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,stRotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};bh.unpack=function(e,t,n){t=y(t,0);let i=h.unpack(e,t,tJ);t+=h.packedLength;let o=re.unpack(e,t,nJ);t+=re.packedLength;let r=Pe.unpack(e,t,iJ);t+=Pe.packedLength;let s=e[t++],a=e[t++],c=e[t++],u=e[t++],f=e[t++],d=e[t++],p=e[t++],_=e[t++]===1,m=e[t];return l(n)?(n._center=h.clone(i,n._center),n._ellipsoid=re.clone(o,n._ellipsoid),n._vertexFormat=Pe.clone(r,n._vertexFormat),n._semiMajorAxis=s,n._semiMinorAxis=a,n._rotation=c,n._stRotation=u,n._height=f,n._granularity=d,n._extrudedHeight=p,n._shadowVolume=_,n._offsetAttribute=m===-1?void 0:m,n):(Th.height=f,Th.extrudedHeight=p,Th.granularity=d,Th.stRotation=u,Th.rotation=c,Th.semiMajorAxis=s,Th.semiMinorAxis=a,Th.shadowVolume=_,Th.offsetAttribute=m===-1?void 0:m,new bh(Th))};bh.computeRectangle=function(e,t){e=y(e,y.EMPTY_OBJECT);let n=e.center,i=y(e.ellipsoid,re.WGS84),o=e.semiMajorAxis,r=e.semiMinorAxis,s=y(e.granularity,R.RADIANS_PER_DEGREE),a=y(e.rotation,0);return eJ(n,o,r,a,s,i,t)};bh.createGeometry=function(e){if(e._semiMajorAxis<=0||e._semiMinorAxis<=0)return;let t=e._height,n=e._extrudedHeight,i=!R.equalsEpsilon(t,n,0,R.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);let o={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:t,granularity:e._granularity,vertexFormat:e._vertexFormat,stRotation:e._stRotation},r;if(i)o.extrudedHeight=n,o.shadowVolume=e._shadowVolume,o.offsetAttribute=e._offsetAttribute,r=ADe(o);else if(r=yDe(o),l(e._offsetAttribute)){let s=r.attributes.position.values.length,a=e._offsetAttribute===tn.NONE?0:1,c=new Uint8Array(s/3).fill(a);r.attributes.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:c})}return new ct({attributes:r.attributes,indices:r.indices,primitiveType:Le.TRIANGLES,boundingSphere:r.boundingSphere,offsetAttribute:e._offsetAttribute})};bh.createShadowVolume=function(e,t,n){let i=e._granularity,o=e._ellipsoid,r=t(i,o),s=n(i,o);return new bh({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:o,rotation:e._rotation,stRotation:e._stRotation,granularity:i,extrudedHeight:r,height:s,vertexFormat:Pe.POSITION_ONLY,shadowVolume:!0})};function TDe(e){let t=-e._stRotation;if(t===0)return[0,0,0,1,1,0];let i=kl.computeEllipsePositions({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,rotation:e._rotation,granularity:e._granularity},!1,!0).outerPositions,o=i.length/3,r=new Array(o);for(let c=0;c<o;++c)r[c]=h.fromArray(i,c*3);let s=e._ellipsoid,a=e.rectangle;return ct._textureCoordinateRotationPoints(r,t,s,a)}Object.defineProperties(bh.prototype,{rectangle:{get:function(){return l(this._rectangle)||(this._rectangle=eJ(this._center,this._semiMajorAxis,this._semiMinorAxis,this._rotation,this._granularity,this._ellipsoid)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return l(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=TDe(this)),this._textureCoordinateRotationPoints}}});var rl=bh;function qm(e){e=y(e,y.EMPTY_OBJECT);let t=e.radius,n={center:e.center,semiMajorAxis:t,semiMinorAxis:t,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,vertexFormat:e.vertexFormat,stRotation:e.stRotation,shadowVolume:e.shadowVolume};this._ellipseGeometry=new rl(n),this._workerName="createCircleGeometry"}qm.packedLength=rl.packedLength;qm.pack=function(e,t,n){return rl.pack(e._ellipseGeometry,t,n)};var bDe=new rl({center:new h,semiMajorAxis:1,semiMinorAxis:1}),Ua={center:new h,radius:void 0,ellipsoid:re.clone(re.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new Pe,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};qm.unpack=function(e,t,n){let i=rl.unpack(e,t,bDe);return Ua.center=h.clone(i._center,Ua.center),Ua.ellipsoid=re.clone(i._ellipsoid,Ua.ellipsoid),Ua.height=i._height,Ua.extrudedHeight=i._extrudedHeight,Ua.granularity=i._granularity,Ua.vertexFormat=Pe.clone(i._vertexFormat,Ua.vertexFormat),Ua.stRotation=i._stRotation,Ua.shadowVolume=i._shadowVolume,l(n)?(Ua.semiMajorAxis=i._semiMajorAxis,Ua.semiMinorAxis=i._semiMinorAxis,n._ellipseGeometry=new rl(Ua),n):(Ua.radius=i._semiMajorAxis,new qm(Ua))};qm.createGeometry=function(e){return rl.createGeometry(e._ellipseGeometry)};qm.createShadowVolume=function(e,t,n){let i=e._ellipseGeometry._granularity,o=e._ellipseGeometry._ellipsoid,r=t(i,o),s=n(i,o);return new qm({center:e._ellipseGeometry._center,radius:e._ellipseGeometry._semiMajorAxis,ellipsoid:o,stRotation:e._ellipseGeometry._stRotation,granularity:i,extrudedHeight:r,height:s,vertexFormat:Pe.POSITION_ONLY,shadowVolume:!0})};Object.defineProperties(qm.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}});var oJ=qm;var rJ=new h,xy=new h;function EDe(e){let t=e.center;xy=h.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,xy),e.height,xy),xy=h.add(t,xy,xy);let n=new oe(xy,e.semiMajorAxis),i=kl.computeEllipsePositions(e,!1,!0).outerPositions,o=new ln({position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:kl.raisePositionsToHeight(i,e,!1)})}),r=i.length/3,s=Ne.createTypedArray(r,r*2),a=0;for(let c=0;c<r;++c)s[a++]=c,s[a++]=(c+1)%r;return{boundingSphere:n,attributes:o,indices:s}}var wI=new oe,vI=new oe;function SDe(e){let t=e.center,n=e.ellipsoid,i=e.semiMajorAxis,o=h.multiplyByScalar(n.geodeticSurfaceNormal(t,rJ),e.height,rJ);wI.center=h.add(t,o,wI.center),wI.radius=i,o=h.multiplyByScalar(n.geodeticSurfaceNormal(t,o),e.extrudedHeight,o),vI.center=h.add(t,o,vI.center),vI.radius=i;let r=kl.computeEllipsePositions(e,!1,!0).outerPositions,s=new ln({position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:kl.raisePositionsToHeight(r,e,!0)})});r=s.position.values;let a=oe.union(wI,vI),c=r.length/3;if(l(e.offsetAttribute)){let m=new Uint8Array(c);if(e.offsetAttribute===tn.TOP)m=m.fill(1,0,c/2);else{let x=e.offsetAttribute===tn.NONE?0:1;m=m.fill(x)}s.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:m})}let u=y(e.numberOfVerticalLines,16);u=R.clamp(u,0,c/2);let f=Ne.createTypedArray(c,c*2+u*2);c/=2;let d=0,p;for(p=0;p<c;++p)f[d++]=p,f[d++]=(p+1)%c,f[d++]=p+c,f[d++]=(p+1)%c+c;let _;if(u>0){let m=Math.min(u,c);_=Math.round(c/m);let x=Math.min(_*u,c);for(p=0;p<x;p+=_)f[d++]=p,f[d++]=p+c}return{boundingSphere:a,attributes:s,indices:f}}function TA(e){e=y(e,y.EMPTY_OBJECT);let t=e.center,n=y(e.ellipsoid,re.WGS84),i=e.semiMajorAxis,o=e.semiMinorAxis,r=y(e.granularity,R.RADIANS_PER_DEGREE),s=y(e.height,0),a=y(e.extrudedHeight,s);this._center=h.clone(t),this._semiMajorAxis=i,this._semiMinorAxis=o,this._ellipsoid=re.clone(n),this._rotation=y(e.rotation,0),this._height=Math.max(a,s),this._granularity=r,this._extrudedHeight=Math.min(a,s),this._numberOfVerticalLines=Math.max(y(e.numberOfVerticalLines,16),0),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipseOutlineGeometry"}TA.packedLength=h.packedLength+re.packedLength+8;TA.pack=function(e,t,n){return n=y(n,0),h.pack(e._center,t,n),n+=h.packedLength,re.pack(e._ellipsoid,t,n),n+=re.packedLength,t[n++]=e._semiMajorAxis,t[n++]=e._semiMinorAxis,t[n++]=e._rotation,t[n++]=e._height,t[n++]=e._granularity,t[n++]=e._extrudedHeight,t[n++]=e._numberOfVerticalLines,t[n]=y(e._offsetAttribute,-1),t};var sJ=new h,aJ=new re,Ym={center:sJ,ellipsoid:aJ,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};TA.unpack=function(e,t,n){t=y(t,0);let i=h.unpack(e,t,sJ);t+=h.packedLength;let o=re.unpack(e,t,aJ);t+=re.packedLength;let r=e[t++],s=e[t++],a=e[t++],c=e[t++],u=e[t++],f=e[t++],d=e[t++],p=e[t];return l(n)?(n._center=h.clone(i,n._center),n._ellipsoid=re.clone(o,n._ellipsoid),n._semiMajorAxis=r,n._semiMinorAxis=s,n._rotation=a,n._height=c,n._granularity=u,n._extrudedHeight=f,n._numberOfVerticalLines=d,n._offsetAttribute=p===-1?void 0:p,n):(Ym.height=c,Ym.extrudedHeight=f,Ym.granularity=u,Ym.rotation=a,Ym.semiMajorAxis=r,Ym.semiMinorAxis=s,Ym.numberOfVerticalLines=d,Ym.offsetAttribute=p===-1?void 0:p,new TA(Ym))};TA.createGeometry=function(e){if(e._semiMajorAxis<=0||e._semiMinorAxis<=0)return;let t=e._height,n=e._extrudedHeight,i=!R.equalsEpsilon(t,n,0,R.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);let o={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:t,granularity:e._granularity,numberOfVerticalLines:e._numberOfVerticalLines},r;if(i)o.extrudedHeight=n,o.offsetAttribute=e._offsetAttribute,r=SDe(o);else if(r=EDe(o),l(e._offsetAttribute)){let s=r.attributes.position.values.length,a=e._offsetAttribute===tn.NONE?0:1,c=new Uint8Array(s/3).fill(a);r.attributes.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:c})}return new ct({attributes:r.attributes,indices:r.indices,primitiveType:Le.LINES,boundingSphere:r.boundingSphere,offsetAttribute:e._offsetAttribute})};var Fu=TA;function bA(e){e=y(e,y.EMPTY_OBJECT);let t=e.radius,n={center:e.center,semiMajorAxis:t,semiMinorAxis:t,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,numberOfVerticalLines:e.numberOfVerticalLines};this._ellipseGeometry=new Fu(n),this._workerName="createCircleOutlineGeometry"}bA.packedLength=Fu.packedLength;bA.pack=function(e,t,n){return Fu.pack(e._ellipseGeometry,t,n)};var wDe=new Fu({center:new h,semiMajorAxis:1,semiMinorAxis:1}),Ul={center:new h,radius:void 0,ellipsoid:re.clone(re.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,numberOfVerticalLines:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0};bA.unpack=function(e,t,n){let i=Fu.unpack(e,t,wDe);return Ul.center=h.clone(i._center,Ul.center),Ul.ellipsoid=re.clone(i._ellipsoid,Ul.ellipsoid),Ul.height=i._height,Ul.extrudedHeight=i._extrudedHeight,Ul.granularity=i._granularity,Ul.numberOfVerticalLines=i._numberOfVerticalLines,l(n)?(Ul.semiMajorAxis=i._semiMajorAxis,Ul.semiMinorAxis=i._semiMinorAxis,n._ellipseGeometry=new Fu(Ul),n):(Ul.radius=i._semiMajorAxis,new bA(Ul))};bA.createGeometry=function(e){return Fu.createGeometry(e._ellipseGeometry)};var cJ=bA;var vDe={UNBOUNDED:0,CLAMPED:1,LOOP_STOP:2},zr=Object.freeze(vDe);var DDe={TICK_DEPENDENT:0,SYSTEM_CLOCK_MULTIPLIER:1,SYSTEM_CLOCK:2},yo=Object.freeze(DDe);var o5;typeof performance<"u"&&typeof performance.now=="function"&&isFinite(performance.now())?o5=function(){return performance.now()}:o5=function(){return Date.now()};var Pi=o5;function r5(e){e=y(e,y.EMPTY_OBJECT);let t=e.currentTime,n=e.startTime,i=e.stopTime;l(t)?t=ee.clone(t):l(n)?t=ee.clone(n):l(i)?t=ee.addDays(i,-1,new ee):t=ee.now(),l(n)?n=ee.clone(n):n=ee.clone(t),l(i)?i=ee.clone(i):i=ee.addDays(n,1,new ee),this.startTime=n,this.stopTime=i,this.clockRange=y(e.clockRange,zr.UNBOUNDED),this.canAnimate=y(e.canAnimate,!0),this.onTick=new _e,this.onStop=new _e,this._currentTime=void 0,this._multiplier=void 0,this._clockStep=void 0,this._shouldAnimate=void 0,this._lastSystemTime=Pi(),this.currentTime=t,this.multiplier=y(e.multiplier,1),this.shouldAnimate=y(e.shouldAnimate,!1),this.clockStep=y(e.clockStep,yo.SYSTEM_CLOCK_MULTIPLIER)}Object.defineProperties(r5.prototype,{currentTime:{get:function(){return this._currentTime},set:function(e){ee.equals(this._currentTime,e)||(this._clockStep===yo.SYSTEM_CLOCK&&(this._clockStep=yo.SYSTEM_CLOCK_MULTIPLIER),this._currentTime=e)}},multiplier:{get:function(){return this._multiplier},set:function(e){this._multiplier!==e&&(this._clockStep===yo.SYSTEM_CLOCK&&(this._clockStep=yo.SYSTEM_CLOCK_MULTIPLIER),this._multiplier=e)}},clockStep:{get:function(){return this._clockStep},set:function(e){e===yo.SYSTEM_CLOCK&&(this._multiplier=1,this._shouldAnimate=!0,this._currentTime=ee.now()),this._clockStep=e}},shouldAnimate:{get:function(){return this._shouldAnimate},set:function(e){this._shouldAnimate!==e&&(this._clockStep===yo.SYSTEM_CLOCK&&(this._clockStep=yo.SYSTEM_CLOCK_MULTIPLIER),this._shouldAnimate=e)}}});r5.prototype.tick=function(){let e=Pi(),t=ee.clone(this._currentTime);if(this.canAnimate&&this._shouldAnimate){let n=this._clockStep;if(n===yo.SYSTEM_CLOCK)t=ee.now(t);else{let i=this._multiplier;if(n===yo.TICK_DEPENDENT)t=ee.addSeconds(t,i,t);else{let a=e-this._lastSystemTime;t=ee.addSeconds(t,i*(a/1e3),t)}let o=this.clockRange,r=this.startTime,s=this.stopTime;if(o===zr.CLAMPED)ee.lessThan(t,r)?t=ee.clone(r,t):ee.greaterThan(t,s)&&(t=ee.clone(s,t),this.onStop.raiseEvent(this));else if(o===zr.LOOP_STOP)for(ee.lessThan(t,r)&&(t=ee.clone(r,t));ee.greaterThan(t,s);)t=ee.addSeconds(r,ee.secondsDifference(t,s),t),this.onStop.raiseEvent(this)}}return this._currentTime=t,this._lastSystemTime=e,this.onTick.raiseEvent(this),t};var Eh=r5;function s5(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n*6<1?e+(t-e)*6*n:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function ne(e,t,n,i){this.red=y(e,1),this.green=y(t,1),this.blue=y(n,1),this.alpha=y(i,1)}ne.fromCartesian4=function(e,t){return l(t)?(t.red=e.x,t.green=e.y,t.blue=e.z,t.alpha=e.w,t):new ne(e.x,e.y,e.z,e.w)};ne.fromBytes=function(e,t,n,i,o){return e=ne.byteToFloat(y(e,255)),t=ne.byteToFloat(y(t,255)),n=ne.byteToFloat(y(n,255)),i=ne.byteToFloat(y(i,255)),l(o)?(o.red=e,o.green=t,o.blue=n,o.alpha=i,o):new ne(e,t,n,i)};ne.fromAlpha=function(e,t,n){return l(n)?(n.red=e.red,n.green=e.green,n.blue=e.blue,n.alpha=t,n):new ne(e.red,e.green,e.blue,t)};var a5,c5,Xm;Et.supportsTypedArrays()&&(a5=new ArrayBuffer(4),c5=new Uint32Array(a5),Xm=new Uint8Array(a5));ne.fromRgba=function(e,t){return c5[0]=e,ne.fromBytes(Xm[0],Xm[1],Xm[2],Xm[3],t)};ne.fromHsl=function(e,t,n,i,o){e=y(e,0)%1,t=y(t,0),n=y(n,0),i=y(i,1);let r=n,s=n,a=n;if(t!==0){let c;n<.5?c=n*(1+t):c=n+t-n*t;let u=2*n-c;r=s5(u,c,e+1/3),s=s5(u,c,e),a=s5(u,c,e-1/3)}return l(o)?(o.red=r,o.green=s,o.blue=a,o.alpha=i,o):new ne(r,s,a,i)};ne.fromRandom=function(e,t){e=y(e,y.EMPTY_OBJECT);let n=e.red;if(!l(n)){let s=y(e.minimumRed,0),a=y(e.maximumRed,1);n=s+R.nextRandomNumber()*(a-s)}let i=e.green;if(!l(i)){let s=y(e.minimumGreen,0),a=y(e.maximumGreen,1);i=s+R.nextRandomNumber()*(a-s)}let o=e.blue;if(!l(o)){let s=y(e.minimumBlue,0),a=y(e.maximumBlue,1);o=s+R.nextRandomNumber()*(a-s)}let r=e.alpha;if(!l(r)){let s=y(e.minimumAlpha,0),a=y(e.maximumAlpha,1);r=s+R.nextRandomNumber()*(a-s)}return l(t)?(t.red=n,t.green=i,t.blue=o,t.alpha=r,t):new ne(n,i,o,r)};var PDe=/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i,IDe=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i,ODe=/^rgba?\(\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)(?:\s*,\s*([0-9.]+))?\s*\)$/i,RDe=/^hsla?\(\s*([0-9.]+)\s*,\s*([0-9.]+%)\s*,\s*([0-9.]+%)(?:\s*,\s*([0-9.]+))?\s*\)$/i;ne.fromCssColorString=function(e,t){l(t)||(t=new ne),e=e.replace(/\s/g,"");let n=ne[e.toUpperCase()];if(l(n))return ne.clone(n,t),t;let i=PDe.exec(e);return i!==null?(t.red=parseInt(i[1],16)/15,t.green=parseInt(i[2],16)/15,t.blue=parseInt(i[3],16)/15,t.alpha=parseInt(y(i[4],"f"),16)/15,t):(i=IDe.exec(e),i!==null?(t.red=parseInt(i[1],16)/255,t.green=parseInt(i[2],16)/255,t.blue=parseInt(i[3],16)/255,t.alpha=parseInt(y(i[4],"ff"),16)/255,t):(i=ODe.exec(e),i!==null?(t.red=parseFloat(i[1])/(i[1].substr(-1)==="%"?100:255),t.green=parseFloat(i[2])/(i[2].substr(-1)==="%"?100:255),t.blue=parseFloat(i[3])/(i[3].substr(-1)==="%"?100:255),t.alpha=parseFloat(y(i[4],"1.0")),t):(i=RDe.exec(e),i!==null?ne.fromHsl(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,parseFloat(y(i[4],"1.0")),t):(t=void 0,t))))};ne.packedLength=4;ne.pack=function(e,t,n){return n=y(n,0),t[n++]=e.red,t[n++]=e.green,t[n++]=e.blue,t[n]=e.alpha,t};ne.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new ne),n.red=e[t++],n.green=e[t++],n.blue=e[t++],n.alpha=e[t],n};ne.byteToFloat=function(e){return e/255};ne.floatToByte=function(e){return e===1?255:e*256|0};ne.clone=function(e,t){if(!!l(e))return l(t)?(t.red=e.red,t.green=e.green,t.blue=e.blue,t.alpha=e.alpha,t):new ne(e.red,e.green,e.blue,e.alpha)};ne.equals=function(e,t){return e===t||l(e)&&l(t)&&e.red===t.red&&e.green===t.green&&e.blue===t.blue&&e.alpha===t.alpha};ne.equalsArray=function(e,t,n){return e.red===t[n]&&e.green===t[n+1]&&e.blue===t[n+2]&&e.alpha===t[n+3]};ne.prototype.clone=function(e){return ne.clone(this,e)};ne.prototype.equals=function(e){return ne.equals(this,e)};ne.prototype.equalsEpsilon=function(e,t){return this===e||l(e)&&Math.abs(this.red-e.red)<=t&&Math.abs(this.green-e.green)<=t&&Math.abs(this.blue-e.blue)<=t&&Math.abs(this.alpha-e.alpha)<=t};ne.prototype.toString=function(){return`(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`};ne.prototype.toCssColorString=function(){let e=ne.floatToByte(this.red),t=ne.floatToByte(this.green),n=ne.floatToByte(this.blue);return this.alpha===1?`rgb(${e},${t},${n})`:`rgba(${e},${t},${n},${this.alpha})`};ne.prototype.toCssHexString=function(){let e=ne.floatToByte(this.red).toString(16);e.length<2&&(e=`0${e}`);let t=ne.floatToByte(this.green).toString(16);t.length<2&&(t=`0${t}`);let n=ne.floatToByte(this.blue).toString(16);if(n.length<2&&(n=`0${n}`),this.alpha<1){let i=ne.floatToByte(this.alpha).toString(16);return i.length<2&&(i=`0${i}`),`#${e}${t}${n}${i}`}return`#${e}${t}${n}`};ne.prototype.toBytes=function(e){let t=ne.floatToByte(this.red),n=ne.floatToByte(this.green),i=ne.floatToByte(this.blue),o=ne.floatToByte(this.alpha);return l(e)?(e[0]=t,e[1]=n,e[2]=i,e[3]=o,e):[t,n,i,o]};ne.prototype.toRgba=function(){return Xm[0]=ne.floatToByte(this.red),Xm[1]=ne.floatToByte(this.green),Xm[2]=ne.floatToByte(this.blue),Xm[3]=ne.floatToByte(this.alpha),c5[0]};ne.prototype.brighten=function(e,t){return e=1-e,t.red=1-(1-this.red)*e,t.green=1-(1-this.green)*e,t.blue=1-(1-this.blue)*e,t.alpha=this.alpha,t};ne.prototype.darken=function(e,t){return e=1-e,t.red=this.red*e,t.green=this.green*e,t.blue=this.blue*e,t.alpha=this.alpha,t};ne.prototype.withAlpha=function(e,t){return ne.fromAlpha(this,e,t)};ne.add=function(e,t,n){return n.red=e.red+t.red,n.green=e.green+t.green,n.blue=e.blue+t.blue,n.alpha=e.alpha+t.alpha,n};ne.subtract=function(e,t,n){return n.red=e.red-t.red,n.green=e.green-t.green,n.blue=e.blue-t.blue,n.alpha=e.alpha-t.alpha,n};ne.multiply=function(e,t,n){return n.red=e.red*t.red,n.green=e.green*t.green,n.blue=e.blue*t.blue,n.alpha=e.alpha*t.alpha,n};ne.divide=function(e,t,n){return n.red=e.red/t.red,n.green=e.green/t.green,n.blue=e.blue/t.blue,n.alpha=e.alpha/t.alpha,n};ne.mod=function(e,t,n){return n.red=e.red%t.red,n.green=e.green%t.green,n.blue=e.blue%t.blue,n.alpha=e.alpha%t.alpha,n};ne.lerp=function(e,t,n,i){return i.red=R.lerp(e.red,t.red,n),i.green=R.lerp(e.green,t.green,n),i.blue=R.lerp(e.blue,t.blue,n),i.alpha=R.lerp(e.alpha,t.alpha,n),i};ne.multiplyByScalar=function(e,t,n){return n.red=e.red*t,n.green=e.green*t,n.blue=e.blue*t,n.alpha=e.alpha*t,n};ne.divideByScalar=function(e,t,n){return n.red=e.red/t,n.green=e.green/t,n.blue=e.blue/t,n.alpha=e.alpha/t,n};ne.ALICEBLUE=Object.freeze(ne.fromCssColorString("#F0F8FF"));ne.ANTIQUEWHITE=Object.freeze(ne.fromCssColorString("#FAEBD7"));ne.AQUA=Object.freeze(ne.fromCssColorString("#00FFFF"));ne.AQUAMARINE=Object.freeze(ne.fromCssColorString("#7FFFD4"));ne.AZURE=Object.freeze(ne.fromCssColorString("#F0FFFF"));ne.BEIGE=Object.freeze(ne.fromCssColorString("#F5F5DC"));ne.BISQUE=Object.freeze(ne.fromCssColorString("#FFE4C4"));ne.BLACK=Object.freeze(ne.fromCssColorString("#000000"));ne.BLANCHEDALMOND=Object.freeze(ne.fromCssColorString("#FFEBCD"));ne.BLUE=Object.freeze(ne.fromCssColorString("#0000FF"));ne.BLUEVIOLET=Object.freeze(ne.fromCssColorString("#8A2BE2"));ne.BROWN=Object.freeze(ne.fromCssColorString("#A52A2A"));ne.BURLYWOOD=Object.freeze(ne.fromCssColorString("#DEB887"));ne.CADETBLUE=Object.freeze(ne.fromCssColorString("#5F9EA0"));ne.CHARTREUSE=Object.freeze(ne.fromCssColorString("#7FFF00"));ne.CHOCOLATE=Object.freeze(ne.fromCssColorString("#D2691E"));ne.CORAL=Object.freeze(ne.fromCssColorString("#FF7F50"));ne.CORNFLOWERBLUE=Object.freeze(ne.fromCssColorString("#6495ED"));ne.CORNSILK=Object.freeze(ne.fromCssColorString("#FFF8DC"));ne.CRIMSON=Object.freeze(ne.fromCssColorString("#DC143C"));ne.CYAN=Object.freeze(ne.fromCssColorString("#00FFFF"));ne.DARKBLUE=Object.freeze(ne.fromCssColorString("#00008B"));ne.DARKCYAN=Object.freeze(ne.fromCssColorString("#008B8B"));ne.DARKGOLDENROD=Object.freeze(ne.fromCssColorString("#B8860B"));ne.DARKGRAY=Object.freeze(ne.fromCssColorString("#A9A9A9"));ne.DARKGREEN=Object.freeze(ne.fromCssColorString("#006400"));ne.DARKGREY=ne.DARKGRAY;ne.DARKKHAKI=Object.freeze(ne.fromCssColorString("#BDB76B"));ne.DARKMAGENTA=Object.freeze(ne.fromCssColorString("#8B008B"));ne.DARKOLIVEGREEN=Object.freeze(ne.fromCssColorString("#556B2F"));ne.DARKORANGE=Object.freeze(ne.fromCssColorString("#FF8C00"));ne.DARKORCHID=Object.freeze(ne.fromCssColorString("#9932CC"));ne.DARKRED=Object.freeze(ne.fromCssColorString("#8B0000"));ne.DARKSALMON=Object.freeze(ne.fromCssColorString("#E9967A"));ne.DARKSEAGREEN=Object.freeze(ne.fromCssColorString("#8FBC8F"));ne.DARKSLATEBLUE=Object.freeze(ne.fromCssColorString("#483D8B"));ne.DARKSLATEGRAY=Object.freeze(ne.fromCssColorString("#2F4F4F"));ne.DARKSLATEGREY=ne.DARKSLATEGRAY;ne.DARKTURQUOISE=Object.freeze(ne.fromCssColorString("#00CED1"));ne.DARKVIOLET=Object.freeze(ne.fromCssColorString("#9400D3"));ne.DEEPPINK=Object.freeze(ne.fromCssColorString("#FF1493"));ne.DEEPSKYBLUE=Object.freeze(ne.fromCssColorString("#00BFFF"));ne.DIMGRAY=Object.freeze(ne.fromCssColorString("#696969"));ne.DIMGREY=ne.DIMGRAY;ne.DODGERBLUE=Object.freeze(ne.fromCssColorString("#1E90FF"));ne.FIREBRICK=Object.freeze(ne.fromCssColorString("#B22222"));ne.FLORALWHITE=Object.freeze(ne.fromCssColorString("#FFFAF0"));ne.FORESTGREEN=Object.freeze(ne.fromCssColorString("#228B22"));ne.FUCHSIA=Object.freeze(ne.fromCssColorString("#FF00FF"));ne.GAINSBORO=Object.freeze(ne.fromCssColorString("#DCDCDC"));ne.GHOSTWHITE=Object.freeze(ne.fromCssColorString("#F8F8FF"));ne.GOLD=Object.freeze(ne.fromCssColorString("#FFD700"));ne.GOLDENROD=Object.freeze(ne.fromCssColorString("#DAA520"));ne.GRAY=Object.freeze(ne.fromCssColorString("#808080"));ne.GREEN=Object.freeze(ne.fromCssColorString("#008000"));ne.GREENYELLOW=Object.freeze(ne.fromCssColorString("#ADFF2F"));ne.GREY=ne.GRAY;ne.HONEYDEW=Object.freeze(ne.fromCssColorString("#F0FFF0"));ne.HOTPINK=Object.freeze(ne.fromCssColorString("#FF69B4"));ne.INDIANRED=Object.freeze(ne.fromCssColorString("#CD5C5C"));ne.INDIGO=Object.freeze(ne.fromCssColorString("#4B0082"));ne.IVORY=Object.freeze(ne.fromCssColorString("#FFFFF0"));ne.KHAKI=Object.freeze(ne.fromCssColorString("#F0E68C"));ne.LAVENDER=Object.freeze(ne.fromCssColorString("#E6E6FA"));ne.LAVENDAR_BLUSH=Object.freeze(ne.fromCssColorString("#FFF0F5"));ne.LAWNGREEN=Object.freeze(ne.fromCssColorString("#7CFC00"));ne.LEMONCHIFFON=Object.freeze(ne.fromCssColorString("#FFFACD"));ne.LIGHTBLUE=Object.freeze(ne.fromCssColorString("#ADD8E6"));ne.LIGHTCORAL=Object.freeze(ne.fromCssColorString("#F08080"));ne.LIGHTCYAN=Object.freeze(ne.fromCssColorString("#E0FFFF"));ne.LIGHTGOLDENRODYELLOW=Object.freeze(ne.fromCssColorString("#FAFAD2"));ne.LIGHTGRAY=Object.freeze(ne.fromCssColorString("#D3D3D3"));ne.LIGHTGREEN=Object.freeze(ne.fromCssColorString("#90EE90"));ne.LIGHTGREY=ne.LIGHTGRAY;ne.LIGHTPINK=Object.freeze(ne.fromCssColorString("#FFB6C1"));ne.LIGHTSEAGREEN=Object.freeze(ne.fromCssColorString("#20B2AA"));ne.LIGHTSKYBLUE=Object.freeze(ne.fromCssColorString("#87CEFA"));ne.LIGHTSLATEGRAY=Object.freeze(ne.fromCssColorString("#778899"));ne.LIGHTSLATEGREY=ne.LIGHTSLATEGRAY;ne.LIGHTSTEELBLUE=Object.freeze(ne.fromCssColorString("#B0C4DE"));ne.LIGHTYELLOW=Object.freeze(ne.fromCssColorString("#FFFFE0"));ne.LIME=Object.freeze(ne.fromCssColorString("#00FF00"));ne.LIMEGREEN=Object.freeze(ne.fromCssColorString("#32CD32"));ne.LINEN=Object.freeze(ne.fromCssColorString("#FAF0E6"));ne.MAGENTA=Object.freeze(ne.fromCssColorString("#FF00FF"));ne.MAROON=Object.freeze(ne.fromCssColorString("#800000"));ne.MEDIUMAQUAMARINE=Object.freeze(ne.fromCssColorString("#66CDAA"));ne.MEDIUMBLUE=Object.freeze(ne.fromCssColorString("#0000CD"));ne.MEDIUMORCHID=Object.freeze(ne.fromCssColorString("#BA55D3"));ne.MEDIUMPURPLE=Object.freeze(ne.fromCssColorString("#9370DB"));ne.MEDIUMSEAGREEN=Object.freeze(ne.fromCssColorString("#3CB371"));ne.MEDIUMSLATEBLUE=Object.freeze(ne.fromCssColorString("#7B68EE"));ne.MEDIUMSPRINGGREEN=Object.freeze(ne.fromCssColorString("#00FA9A"));ne.MEDIUMTURQUOISE=Object.freeze(ne.fromCssColorString("#48D1CC"));ne.MEDIUMVIOLETRED=Object.freeze(ne.fromCssColorString("#C71585"));ne.MIDNIGHTBLUE=Object.freeze(ne.fromCssColorString("#191970"));ne.MINTCREAM=Object.freeze(ne.fromCssColorString("#F5FFFA"));ne.MISTYROSE=Object.freeze(ne.fromCssColorString("#FFE4E1"));ne.MOCCASIN=Object.freeze(ne.fromCssColorString("#FFE4B5"));ne.NAVAJOWHITE=Object.freeze(ne.fromCssColorString("#FFDEAD"));ne.NAVY=Object.freeze(ne.fromCssColorString("#000080"));ne.OLDLACE=Object.freeze(ne.fromCssColorString("#FDF5E6"));ne.OLIVE=Object.freeze(ne.fromCssColorString("#808000"));ne.OLIVEDRAB=Object.freeze(ne.fromCssColorString("#6B8E23"));ne.ORANGE=Object.freeze(ne.fromCssColorString("#FFA500"));ne.ORANGERED=Object.freeze(ne.fromCssColorString("#FF4500"));ne.ORCHID=Object.freeze(ne.fromCssColorString("#DA70D6"));ne.PALEGOLDENROD=Object.freeze(ne.fromCssColorString("#EEE8AA"));ne.PALEGREEN=Object.freeze(ne.fromCssColorString("#98FB98"));ne.PALETURQUOISE=Object.freeze(ne.fromCssColorString("#AFEEEE"));ne.PALEVIOLETRED=Object.freeze(ne.fromCssColorString("#DB7093"));ne.PAPAYAWHIP=Object.freeze(ne.fromCssColorString("#FFEFD5"));ne.PEACHPUFF=Object.freeze(ne.fromCssColorString("#FFDAB9"));ne.PERU=Object.freeze(ne.fromCssColorString("#CD853F"));ne.PINK=Object.freeze(ne.fromCssColorString("#FFC0CB"));ne.PLUM=Object.freeze(ne.fromCssColorString("#DDA0DD"));ne.POWDERBLUE=Object.freeze(ne.fromCssColorString("#B0E0E6"));ne.PURPLE=Object.freeze(ne.fromCssColorString("#800080"));ne.RED=Object.freeze(ne.fromCssColorString("#FF0000"));ne.ROSYBROWN=Object.freeze(ne.fromCssColorString("#BC8F8F"));ne.ROYALBLUE=Object.freeze(ne.fromCssColorString("#4169E1"));ne.SADDLEBROWN=Object.freeze(ne.fromCssColorString("#8B4513"));ne.SALMON=Object.freeze(ne.fromCssColorString("#FA8072"));ne.SANDYBROWN=Object.freeze(ne.fromCssColorString("#F4A460"));ne.SEAGREEN=Object.freeze(ne.fromCssColorString("#2E8B57"));ne.SEASHELL=Object.freeze(ne.fromCssColorString("#FFF5EE"));ne.SIENNA=Object.freeze(ne.fromCssColorString("#A0522D"));ne.SILVER=Object.freeze(ne.fromCssColorString("#C0C0C0"));ne.SKYBLUE=Object.freeze(ne.fromCssColorString("#87CEEB"));ne.SLATEBLUE=Object.freeze(ne.fromCssColorString("#6A5ACD"));ne.SLATEGRAY=Object.freeze(ne.fromCssColorString("#708090"));ne.SLATEGREY=ne.SLATEGRAY;ne.SNOW=Object.freeze(ne.fromCssColorString("#FFFAFA"));ne.SPRINGGREEN=Object.freeze(ne.fromCssColorString("#00FF7F"));ne.STEELBLUE=Object.freeze(ne.fromCssColorString("#4682B4"));ne.TAN=Object.freeze(ne.fromCssColorString("#D2B48C"));ne.TEAL=Object.freeze(ne.fromCssColorString("#008080"));ne.THISTLE=Object.freeze(ne.fromCssColorString("#D8BFD8"));ne.TOMATO=Object.freeze(ne.fromCssColorString("#FF6347"));ne.TURQUOISE=Object.freeze(ne.fromCssColorString("#40E0D0"));ne.VIOLET=Object.freeze(ne.fromCssColorString("#EE82EE"));ne.WHEAT=Object.freeze(ne.fromCssColorString("#F5DEB3"));ne.WHITE=Object.freeze(ne.fromCssColorString("#FFFFFF"));ne.WHITESMOKE=Object.freeze(ne.fromCssColorString("#F5F5F5"));ne.YELLOW=Object.freeze(ne.fromCssColorString("#FFFF00"));ne.YELLOWGREEN=Object.freeze(ne.fromCssColorString("#9ACD32"));ne.TRANSPARENT=Object.freeze(new ne(0,0,0,0));var z=ne;function EA(e,t,n,i){e=y(e,1),t=y(t,1),n=y(n,1),i=y(i,1),this.value=new Uint8Array([z.floatToByte(e),z.floatToByte(t),z.floatToByte(n),z.floatToByte(i)])}Object.defineProperties(EA.prototype,{componentDatatype:{get:function(){return K.UNSIGNED_BYTE}},componentsPerAttribute:{get:function(){return 4}},normalize:{get:function(){return!0}}});EA.fromColor=function(e){return new EA(e.red,e.green,e.blue,e.alpha)};EA.toValue=function(e,t){return l(t)?e.toBytes(t):new Uint8Array(e.toBytes())};EA.equals=function(e,t){return e===t||l(e)&&l(t)&&e.value[0]===t.value[0]&&e.value[1]===t.value[1]&&e.value[2]===t.value[2]&&e.value[3]===t.value[3]};var It=EA;function SA(e,t,n,i,o){this._format=e,this._datatype=t,this._width=n,this._height=i,this._buffer=o}Object.defineProperties(SA.prototype,{internalFormat:{get:function(){return this._format}},pixelDatatype:{get:function(){return this._datatype}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},bufferView:{get:function(){return this._buffer}}});SA.clone=function(e){if(!!l(e))return new SA(e._format,e._datatype,e._width,e._height,e._buffer)};SA.prototype.clone=function(){return SA.clone(this)};var DI=SA;function wA(e){this._value=e,this._valueType=zi.getPointType(e)}Object.defineProperties(wA.prototype,{value:{get:function(){return this._value}}});wA.prototype.findTimeInterval=function(e){};wA.prototype.wrapTime=function(e){return 0};wA.prototype.clampTime=function(e){return 0};wA.prototype.evaluate=function(e,t){let n=this._value,i=this._valueType;return i===Number?n:i.clone(n,t)};var vA=wA;var DS={},MDe=new h,lJ=new h,uJ=new h,fJ=new h,dJ=new gi;DS.validOutline=function(e){let n=gi.fromPoints(e,dJ).halfAxes,i=Q.getColumn(n,0,lJ),o=Q.getColumn(n,1,uJ),r=Q.getColumn(n,2,fJ),s=h.magnitude(i),a=h.magnitude(o),c=h.magnitude(r);return!(s===0&&(a===0||c===0)||a===0&&c===0)};DS.computeProjectTo2DArguments=function(e,t,n,i){let o=gi.fromPoints(e,dJ),r=o.halfAxes,s=Q.getColumn(r,0,lJ),a=Q.getColumn(r,1,uJ),c=Q.getColumn(r,2,fJ),u=h.magnitude(s),f=h.magnitude(a),d=h.magnitude(c),p=Math.min(u,f,d);if(u===0&&(f===0||d===0)||f===0&&d===0)return!1;let _,m;return(p===f||p===d)&&(_=s),p===u?_=a:p===d&&(m=a),(p===u||p===f)&&(m=c),h.normalize(_,n),h.normalize(m,i),h.clone(o.center,t),!0};function hJ(e,t,n,i,o){let r=h.subtract(e,t,MDe),s=h.dot(n,r),a=h.dot(i,r);return G.fromElements(s,a,o)}DS.createProjectPointsTo2DFunction=function(e,t,n){return function(i){let o=new Array(i.length);for(let r=0;r<i.length;r++)o[r]=hJ(i[r],e,t,n);return o}};DS.createProjectPointTo2DFunction=function(e,t,n){return function(i,o){return hJ(i,e,t,n,o)}};var B_=DS;function u5(e,t,n){if(e===0)return t*n;let i=e*e,o=i*i,r=o*i,s=r*i,a=s*i,c=a*i,u=n,f=Math.sin(2*u),d=Math.sin(4*u),p=Math.sin(6*u),_=Math.sin(8*u),m=Math.sin(10*u),x=Math.sin(12*u);return t*((1-i/4-3*o/64-5*r/256-175*s/16384-441*a/65536-4851*c/1048576)*u-(3*i/8+3*o/32+45*r/1024+105*s/4096+2205*a/131072+6237*c/524288)*f+(15*o/256+45*r/1024+525*s/16384+1575*a/65536+155925*c/8388608)*d-(35*r/3072+175*s/12288+3675*a/262144+13475*c/1048576)*p+(315*s/131072+2205*a/524288+43659*c/8388608)*_-(693*a/1310720+6237*c/5242880)*m+1001*c/8388608*x)}function BDe(e,t,n){let i=e/n;if(t===0)return i;let o=i*i,r=o*i,s=r*i,a=t,c=a*a,u=c*c,f=u*c,d=f*c,p=d*c,_=p*c,m=Math.sin(2*i),x=Math.cos(2*i),C=Math.sin(4*i),A=Math.cos(4*i),T=Math.sin(6*i),b=Math.cos(6*i),S=Math.sin(8*i),w=Math.cos(8*i),D=Math.sin(10*i),O=Math.cos(10*i),I=Math.sin(12*i);return i+i*c/4+7*i*u/64+15*i*f/256+579*i*d/16384+1515*i*p/65536+16837*i*_/1048576+(3*i*u/16+45*i*f/256-i*(32*o-561)*d/4096-i*(232*o-1677)*p/16384+i*(399985-90560*o+512*s)*_/5242880)*x+(21*i*f/256+483*i*d/4096-i*(224*o-1969)*p/16384-i*(33152*o-112599)*_/1048576)*A+(151*i*d/4096+4681*i*p/65536+1479*i*_/16384-453*r*_/32768)*b+(1097*i*p/65536+42783*i*_/1048576)*w+8011*i*_/1048576*O+(3*c/8+3*u/16+213*f/2048-3*o*f/64+255*d/4096-33*o*d/512+20861*p/524288-33*o*p/512+s*p/1024+28273*_/1048576-471*o*_/8192+9*s*_/4096)*m+(21*u/256+21*f/256+533*d/8192-21*o*d/512+197*p/4096-315*o*p/4096+584039*_/16777216-12517*o*_/131072+7*s*_/2048)*C+(151*f/6144+151*d/4096+5019*p/131072-453*o*p/16384+26965*_/786432-8607*o*_/131072)*T+(1097*d/131072+1097*p/65536+225797*_/10485760-1097*o*_/65536)*S+(8011*p/2621440+8011*_/1048576)*D+293393*_/251658240*I}function DA(e,t){if(e===0)return Math.log(Math.tan(.5*(R.PI_OVER_TWO+t)));let n=e*Math.sin(t);return Math.log(Math.tan(.5*(R.PI_OVER_TWO+t)))-e/2*Math.log((1+n)/(1-n))}function LDe(e,t,n,i,o){let r=DA(e._ellipticity,n),s=DA(e._ellipticity,o);return Math.atan2(R.negativePiToPi(i-t),s-r)}function NDe(e,t,n,i,o,r,s){let a=e._heading,c=r-i,u=0;if(R.equalsEpsilon(Math.abs(a),R.PI_OVER_TWO,R.EPSILON8))if(t===n)u=t*Math.cos(o)*R.negativePiToPi(c);else{let f=Math.sin(o);u=t*Math.cos(o)*R.negativePiToPi(c)/Math.sqrt(1-e._ellipticitySquared*f*f)}else{let f=u5(e._ellipticity,t,o);u=(u5(e._ellipticity,t,s)-f)/Math.cos(a)}return Math.abs(u)}var FDe=new h,l5=new h;function mJ(e,t,n,i){let o=h.normalize(i.cartographicToCartesian(t,l5),FDe),r=h.normalize(i.cartographicToCartesian(n,l5),l5),s=i.maximumRadius,a=i.minimumRadius,c=s*s,u=a*a;e._ellipticitySquared=(c-u)/c,e._ellipticity=Math.sqrt(e._ellipticitySquared),e._start=me.clone(t,e._start),e._start.height=0,e._end=me.clone(n,e._end),e._end.height=0,e._heading=LDe(e,t.longitude,t.latitude,n.longitude,n.latitude),e._distance=NDe(e,i.maximumRadius,i.minimumRadius,t.longitude,t.latitude,n.longitude,n.latitude)}function pJ(e,t,n,i,o,r){if(n===0)return me.clone(e,r);let s=o*o,a,c,u;if(Math.abs(R.PI_OVER_TWO-Math.abs(t))>R.EPSILON8){let f=u5(o,i,e.latitude),d=n*Math.cos(t),p=f+d;c=BDe(p,o,i);let _=DA(o,e.latitude),m=DA(o,c);u=Math.tan(t)*(m-_),a=R.negativePiToPi(e.longitude+u)}else{c=e.latitude;let f;if(o===0)f=i*Math.cos(e.latitude);else{let d=Math.sin(e.latitude);f=i*Math.cos(e.latitude)/Math.sqrt(1-s*d*d)}u=n/f,t>0?a=R.negativePiToPi(e.longitude+u):a=R.negativePiToPi(e.longitude-u)}return l(r)?(r.longitude=a,r.latitude=c,r.height=0,r):new me(a,c,0)}function Km(e,t,n){let i=y(n,re.WGS84);this._ellipsoid=i,this._start=new me,this._end=new me,this._heading=void 0,this._distance=void 0,this._ellipticity=void 0,this._ellipticitySquared=void 0,l(e)&&l(t)&&mJ(this,e,t,i)}Object.defineProperties(Km.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},heading:{get:function(){return this._heading}}});Km.fromStartHeadingDistance=function(e,t,n,i,o){let r=y(i,re.WGS84),s=r.maximumRadius,a=r.minimumRadius,c=s*s,u=a*a,f=Math.sqrt((c-u)/c);t=R.negativePiToPi(t);let d=pJ(e,t,n,r.maximumRadius,f);return!l(o)||l(i)&&!i.equals(o.ellipsoid)?new Km(e,d,r):(o.setEndPoints(e,d),o)};Km.prototype.setEndPoints=function(e,t){mJ(this,e,t,this._ellipsoid)};Km.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(e*this._distance,t)};Km.prototype.interpolateUsingSurfaceDistance=function(e,t){return pJ(this._start,this._heading,e,this._ellipsoid.maximumRadius,this._ellipticity,t)};Km.prototype.findIntersectionWithLongitude=function(e,t){let n=this._ellipticity,i=this._heading,o=Math.abs(i),r=this._start;if(e=R.negativePiToPi(e),R.equalsEpsilon(Math.abs(e),Math.PI,R.EPSILON14)&&(e=R.sign(r.longitude)*Math.PI),l(t)||(t=new me),Math.abs(R.PI_OVER_TWO-o)<=R.EPSILON8)return t.longitude=e,t.latitude=r.latitude,t.height=0,t;if(R.equalsEpsilon(Math.abs(R.PI_OVER_TWO-o),R.PI_OVER_TWO,R.EPSILON8))return R.equalsEpsilon(e,r.longitude,R.EPSILON12)?void 0:(t.longitude=e,t.latitude=R.PI_OVER_TWO*R.sign(R.PI_OVER_TWO-i),t.height=0,t);let s=r.latitude,a=n*Math.sin(s),c=Math.tan(.5*(R.PI_OVER_TWO+s))*Math.exp((e-r.longitude)/Math.tan(i)),u=(1+a)/(1-a),f=r.latitude,d;do{d=f;let p=n*Math.sin(d),_=(1+p)/(1-p);f=2*Math.atan(c*Math.pow(_/u,n/2))-R.PI_OVER_TWO}while(!R.equalsEpsilon(f,d,R.EPSILON12));return t.longitude=e,t.latitude=f,t.height=0,t};Km.prototype.findIntersectionWithLatitude=function(e,t){let n=this._ellipticity,i=this._heading,o=this._start;if(R.equalsEpsilon(Math.abs(i),R.PI_OVER_TWO,R.EPSILON8))return;let r=DA(n,o.latitude),s=DA(n,e),a=Math.tan(i)*(s-r),c=R.negativePiToPi(o.longitude+a);return l(t)?(t.longitude=c,t.latitude=e,t.height=0,t):new me(c,e,0)};var za=Km;var RS=Zc(CJ());var MI={CLOCKWISE:Z.CW,COUNTER_CLOCKWISE:Z.CCW};MI.validate=function(e){return e===MI.CLOCKWISE||e===MI.COUNTER_CLOCKWISE};var fs=Object.freeze(MI);var QDe=new h,e1e=new h,L_={};L_.computeArea2D=function(e){let t=e.length,n=0;for(let i=t-1,o=0;o<t;i=o++){let r=e[i],s=e[o];n+=r.x*s.y-s.x*r.y}return n*.5};L_.computeWindingOrder2D=function(e){return L_.computeArea2D(e)>0?fs.COUNTER_CLOCKWISE:fs.CLOCKWISE};L_.triangulate=function(e,t){let n=G.packArray(e);return(0,RS.default)(n,t,2)};var EJ=new h,SJ=new h,wJ=new h,AJ=new h,TJ=new h,bJ=new h,$m=new h,vJ=new G,DJ=new G,PJ=new G,IA=new G;L_.computeSubdivision=function(e,t,n,i,o){o=y(o,R.RADIANS_PER_DEGREE);let r=l(i),s=n.slice(0),a,c=t.length,u=new Array(c*3),f=new Array(c*2),d=0,p=0;for(a=0;a<c;a++){let b=t[a];if(u[d++]=b.x,u[d++]=b.y,u[d++]=b.z,r){let S=i[a];f[p++]=S.x,f[p++]=S.y}}let _=[],m={},x=e.maximumRadius,C=R.chordLength(o,x),A=C*C;for(;s.length>0;){let b=s.pop(),S=s.pop(),w=s.pop(),D=h.fromArray(u,w*3,EJ),O=h.fromArray(u,S*3,SJ),I=h.fromArray(u,b*3,wJ),L,N,g;r&&(L=G.fromArray(f,w*2,vJ),N=G.fromArray(f,S*2,DJ),g=G.fromArray(f,b*2,PJ));let E=h.multiplyByScalar(h.normalize(D,AJ),x,AJ),v=h.multiplyByScalar(h.normalize(O,TJ),x,TJ),P=h.multiplyByScalar(h.normalize(I,bJ),x,bJ),M=h.magnitudeSquared(h.subtract(E,v,$m)),V=h.magnitudeSquared(h.subtract(v,P,$m)),U=h.magnitudeSquared(h.subtract(P,E,$m)),k=Math.max(M,V,U),H,F,Y;k>A?M===k?(H=`${Math.min(w,S)} ${Math.max(w,S)}`,a=m[H],l(a)||(F=h.add(D,O,$m),h.multiplyByScalar(F,.5,F),u.push(F.x,F.y,F.z),a=u.length/3-1,m[H]=a,r&&(Y=G.add(L,N,IA),G.multiplyByScalar(Y,.5,Y),f.push(Y.x,Y.y))),s.push(w,a,b),s.push(a,S,b)):V===k?(H=`${Math.min(S,b)} ${Math.max(S,b)}`,a=m[H],l(a)||(F=h.add(O,I,$m),h.multiplyByScalar(F,.5,F),u.push(F.x,F.y,F.z),a=u.length/3-1,m[H]=a,r&&(Y=G.add(N,g,IA),G.multiplyByScalar(Y,.5,Y),f.push(Y.x,Y.y))),s.push(S,a,w),s.push(a,b,w)):U===k&&(H=`${Math.min(b,w)} ${Math.max(b,w)}`,a=m[H],l(a)||(F=h.add(I,D,$m),h.multiplyByScalar(F,.5,F),u.push(F.x,F.y,F.z),a=u.length/3-1,m[H]=a,r&&(Y=G.add(g,L,IA),G.multiplyByScalar(Y,.5,Y),f.push(Y.x,Y.y))),s.push(b,a,S),s.push(a,w,S)):(_.push(w),_.push(S),_.push(b))}let T={attributes:{position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:u})},indices:_,primitiveType:Le.TRIANGLES};return r&&(T.attributes.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:f})),new ct(T)};var t1e=new me,n1e=new me,i1e=new me,p5=new me;L_.computeRhumbLineSubdivision=function(e,t,n,i,o){o=y(o,R.RADIANS_PER_DEGREE);let r=l(i),s=n.slice(0),a,c=t.length,u=new Array(c*3),f=new Array(c*2),d=0,p=0;for(a=0;a<c;a++){let w=t[a];if(u[d++]=w.x,u[d++]=w.y,u[d++]=w.z,r){let D=i[a];f[p++]=D.x,f[p++]=D.y}}let _=[],m={},x=e.maximumRadius,C=R.chordLength(o,x),A=new za(void 0,void 0,e),T=new za(void 0,void 0,e),b=new za(void 0,void 0,e);for(;s.length>0;){let w=s.pop(),D=s.pop(),O=s.pop(),I=h.fromArray(u,O*3,EJ),L=h.fromArray(u,D*3,SJ),N=h.fromArray(u,w*3,wJ),g,E,v;r&&(g=G.fromArray(f,O*2,vJ),E=G.fromArray(f,D*2,DJ),v=G.fromArray(f,w*2,PJ));let P=e.cartesianToCartographic(I,t1e),M=e.cartesianToCartographic(L,n1e),V=e.cartesianToCartographic(N,i1e);A.setEndPoints(P,M);let U=A.surfaceDistance;T.setEndPoints(M,V);let k=T.surfaceDistance;b.setEndPoints(V,P);let H=b.surfaceDistance,F=Math.max(U,k,H),Y,j,X,W,$;F>C?U===F?(Y=`${Math.min(O,D)} ${Math.max(O,D)}`,a=m[Y],l(a)||(j=A.interpolateUsingFraction(.5,p5),X=(P.height+M.height)*.5,W=h.fromRadians(j.longitude,j.latitude,X,e,$m),u.push(W.x,W.y,W.z),a=u.length/3-1,m[Y]=a,r&&($=G.add(g,E,IA),G.multiplyByScalar($,.5,$),f.push($.x,$.y))),s.push(O,a,w),s.push(a,D,w)):k===F?(Y=`${Math.min(D,w)} ${Math.max(D,w)}`,a=m[Y],l(a)||(j=T.interpolateUsingFraction(.5,p5),X=(M.height+V.height)*.5,W=h.fromRadians(j.longitude,j.latitude,X,e,$m),u.push(W.x,W.y,W.z),a=u.length/3-1,m[Y]=a,r&&($=G.add(E,v,IA),G.multiplyByScalar($,.5,$),f.push($.x,$.y))),s.push(D,a,O),s.push(a,w,O)):H===F&&(Y=`${Math.min(w,O)} ${Math.max(w,O)}`,a=m[Y],l(a)||(j=b.interpolateUsingFraction(.5,p5),X=(V.height+P.height)*.5,W=h.fromRadians(j.longitude,j.latitude,X,e,$m),u.push(W.x,W.y,W.z),a=u.length/3-1,m[Y]=a,r&&($=G.add(v,g,IA),G.multiplyByScalar($,.5,$),f.push($.x,$.y))),s.push(w,a,D),s.push(a,O,D)):(_.push(O),_.push(D),_.push(w))}let S={attributes:{position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:u})},indices:_,primitiveType:Le.TRIANGLES};return r&&(S.attributes.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:f})),new ct(S)};L_.scaleToGeodeticHeight=function(e,t,n,i){n=y(n,re.WGS84);let o=QDe,r=e1e;if(t=y(t,0),i=y(i,!0),l(e)){let s=e.length;for(let a=0;a<s;a+=3)h.fromArray(e,a,r),i&&(r=n.scaleToGeodeticSurface(r,r)),t!==0&&(o=n.geodeticSurfaceNormal(r,o),h.multiplyByScalar(o,t,o),h.add(r,o,r)),e[a]=r.x,e[a+1]=r.y,e[a+2]=r.z}return e};var ti=L_;function N_(){this._array=[],this._offset=0,this._length=0}Object.defineProperties(N_.prototype,{length:{get:function(){return this._length}}});N_.prototype.enqueue=function(e){this._array.push(e),this._length++};N_.prototype.dequeue=function(){if(this._length===0)return;let e=this._array,t=this._offset,n=e[t];return e[t]=void 0,t++,t>10&&t*2>e.length&&(this._array=e.slice(t),t=0),this._offset=t,this._length--,n};N_.prototype.peek=function(){if(this._length!==0)return this._array[this._offset]};N_.prototype.contains=function(e){return this._array.indexOf(e)!==-1};N_.prototype.clear=function(){this._array.length=this._offset=this._length=0};N_.prototype.sort=function(e){this._offset>0&&(this._array=this._array.slice(this._offset),this._offset=0),this._array.sort(e)};var sl=N_;var cr={};cr.computeHierarchyPackedLength=function(e,t){let n=0,i=[e];for(;i.length>0;){let o=i.pop();if(!l(o))continue;n+=2;let r=o.positions,s=o.holes;if(l(r)&&r.length>0&&(n+=r.length*t.packedLength),l(s)){let a=s.length;for(let c=0;c<a;++c)i.push(s[c])}}return n};cr.packPolygonHierarchy=function(e,t,n,i){let o=[e];for(;o.length>0;){let r=o.pop();if(!l(r))continue;let s=r.positions,a=r.holes;if(t[n++]=l(s)?s.length:0,t[n++]=l(a)?a.length:0,l(s)){let c=s.length;for(let u=0;u<c;++u,n+=i.packedLength)i.pack(s[u],t,n)}if(l(a)){let c=a.length;for(let u=0;u<c;++u)o.push(a[u])}}return n};cr.unpackPolygonHierarchy=function(e,t,n){let i=e[t++],o=e[t++],r=new Array(i),s=o>0?new Array(o):void 0;for(let a=0;a<i;++a,t+=n.packedLength)r[a]=n.unpack(e,t);for(let a=0;a<o;++a)s[a]=cr.unpackPolygonHierarchy(e,t,n),t=s[a].startingIndex,delete s[a].startingIndex;return{positions:r,holes:s,startingIndex:t}};var Ay=new G;function MJ(e,t,n,i){return G.subtract(t,e,Ay),G.multiplyByScalar(Ay,n/i,Ay),G.add(e,Ay,Ay),[Ay.x,Ay.y]}var F_=new h;function o1e(e,t,n,i){return h.subtract(t,e,F_),h.multiplyByScalar(F_,n/i,F_),h.add(e,F_,F_),[F_.x,F_.y,F_.z]}cr.subdivideLineCount=function(e,t,n){let o=h.distance(e,t)/n,r=Math.max(0,Math.ceil(R.log2(o)));return Math.pow(2,r)};var _5=new me,g5=new me,r1e=new me,s1e=new h,IJ=new za;cr.subdivideRhumbLineCount=function(e,t,n,i){let o=e.cartesianToCartographic(t,_5),r=e.cartesianToCartographic(n,g5),a=new za(o,r,e).surfaceDistance/i,c=Math.max(0,Math.ceil(R.log2(a)));return Math.pow(2,c)};cr.subdivideTexcoordLine=function(e,t,n,i,o,r){let s=cr.subdivideLineCount(n,i,o),a=G.distance(e,t),c=a/s,u=r;u.length=s*2;let f=0;for(let d=0;d<s;d++){let p=MJ(e,t,d*c,a);u[f++]=p[0],u[f++]=p[1]}return u};cr.subdivideLine=function(e,t,n,i){let o=cr.subdivideLineCount(e,t,n),r=h.distance(e,t),s=r/o;l(i)||(i=[]);let a=i;a.length=o*3;let c=0;for(let u=0;u<o;u++){let f=o1e(e,t,u*s,r);a[c++]=f[0],a[c++]=f[1],a[c++]=f[2]}return a};cr.subdivideTexcoordRhumbLine=function(e,t,n,i,o,r,s){let a=n.cartesianToCartographic(i,_5),c=n.cartesianToCartographic(o,g5);IJ.setEndPoints(a,c);let u=IJ.surfaceDistance/r,f=Math.max(0,Math.ceil(R.log2(u))),d=Math.pow(2,f),p=G.distance(e,t),_=p/d,m=s;m.length=d*2;let x=0;for(let C=0;C<d;C++){let A=MJ(e,t,C*_,p);m[x++]=A[0],m[x++]=A[1]}return m};cr.subdivideRhumbLine=function(e,t,n,i,o){let r=e.cartesianToCartographic(t,_5),s=e.cartesianToCartographic(n,g5),a=new za(r,s,e),c=a.surfaceDistance/i,u=Math.max(0,Math.ceil(R.log2(c))),f=Math.pow(2,u),d=a.surfaceDistance/f;l(o)||(o=[]);let p=o;p.length=f*3;let _=0;for(let m=0;m<f;m++){let x=a.interpolateUsingSurfaceDistance(m*d,r1e),C=e.cartographicToCartesian(x,s1e);p[_++]=C.x,p[_++]=C.y,p[_++]=C.z}return p};var a1e=new h,c1e=new h,l1e=new h,u1e=new h;cr.scaleToGeodeticHeightExtruded=function(e,t,n,i,o){i=y(i,re.WGS84);let r=a1e,s=c1e,a=l1e,c=u1e;if(l(e)&&l(e.attributes)&&l(e.attributes.position)){let u=e.attributes.position.values,f=u.length/2;for(let d=0;d<f;d+=3)h.fromArray(u,d,a),i.geodeticSurfaceNormal(a,r),c=i.scaleToGeodeticSurface(a,c),s=h.multiplyByScalar(r,n,s),s=h.add(c,s,s),u[d+f]=s.x,u[d+1+f]=s.y,u[d+2+f]=s.z,o&&(c=h.clone(a,c)),s=h.multiplyByScalar(r,t,s),s=h.add(c,s,s),u[d]=s.x,u[d+1]=s.y,u[d+2]=s.z}return e};cr.polygonOutlinesFromHierarchy=function(e,t,n){let i=[],o=new sl;o.enqueue(e);let r,s,a;for(;o.length!==0;){let c=o.dequeue(),u=c.positions;if(t)for(a=u.length,r=0;r<a;r++)n.scaleToGeodeticSurface(u[r],u[r]);if(u=So(u,h.equalsEpsilon,!0),u.length<3)continue;let f=c.holes?c.holes.length:0;for(r=0;r<f;r++){let d=c.holes[r],p=d.positions;if(t)for(a=p.length,s=0;s<a;++s)n.scaleToGeodeticSurface(p[s],p[s]);if(p=So(p,h.equalsEpsilon,!0),p.length<3)continue;i.push(p);let _=0;for(l(d.holes)&&(_=d.holes.length),s=0;s<_;s++)o.enqueue(d.holes[s])}i.push(u)}return i};cr.polygonsFromHierarchy=function(e,t,n,i,o){let r=[],s=[],a=new sl;for(a.enqueue(e);a.length!==0;){let c=a.dequeue(),u=c.positions,f=c.holes,d,p;if(i)for(p=u.length,d=0;d<p;d++)o.scaleToGeodeticSurface(u[d],u[d]);if(t||(u=So(u,h.equalsEpsilon,!0)),u.length<3)continue;let _=n(u);if(!l(_))continue;let m=[],x=ti.computeWindingOrder2D(_);x===fs.CLOCKWISE&&(_.reverse(),u=u.slice().reverse());let C=u.slice(),A=l(f)?f.length:0,T=[],b;for(d=0;d<A;d++){let S=f[d],w=S.positions;if(i)for(p=w.length,b=0;b<p;++b)o.scaleToGeodeticSurface(w[b],w[b]);if(t||(w=So(w,h.equalsEpsilon,!0)),w.length<3)continue;let D=n(w);if(!l(D))continue;x=ti.computeWindingOrder2D(D),x===fs.CLOCKWISE&&(D.reverse(),w=w.slice().reverse()),T.push(w),m.push(C.length),C=C.concat(w),_=_.concat(D);let O=0;for(l(S.holes)&&(O=S.holes.length),b=0;b<O;b++)a.enqueue(S.holes[b])}r.push({outerRing:u,holes:T}),s.push({positions:C,positions2D:_,holes:m})}return{hierarchy:r,polygons:s}};var f1e=new G,d1e=new h,h1e=new Me,m1e=new Q;cr.computeBoundingRectangle=function(e,t,n,i,o){let r=Me.fromAxisAngle(e,i,h1e),s=Q.fromQuaternion(r,m1e),a=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,u=Number.POSITIVE_INFINITY,f=Number.NEGATIVE_INFINITY,d=n.length;for(let p=0;p<d;++p){let _=h.clone(n[p],d1e);Q.multiplyByVector(s,_,_);let m=t(_,f1e);l(m)&&(a=Math.min(a,m.x),c=Math.max(c,m.x),u=Math.min(u,m.y),f=Math.max(f,m.y))}return o.x=a,o.y=u,o.width=c-a,o.height=f-u,o};cr.createGeometryFromPositions=function(e,t,n,i,o,r,s){let a=ti.triangulate(t.positions2D,t.holes);a.length<3&&(a=[0,1,2]);let c=t.positions,u=l(n),f=u?n.positions:void 0;if(o){let d=c.length,p=new Array(d*3),_=0;for(let C=0;C<d;C++){let A=c[C];p[_++]=A.x,p[_++]=A.y,p[_++]=A.z}let m={attributes:{position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:p})},indices:a,primitiveType:Le.TRIANGLES};u&&(m.attributes.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:G.packArray(f)}));let x=new ct(m);return r.normal?Rn.computeNormal(x):x}if(s===Yt.GEODESIC)return ti.computeSubdivision(e,c,a,f,i);if(s===Yt.RHUMB)return ti.computeRhumbLineSubdivision(e,c,a,f,i)};var OJ=[],RJ=[],p1e=new h,_1e=new h;cr.computeWallGeometry=function(e,t,n,i,o,r){let s,a,c,u,f,d,p,_,m,x=e.length,C=0,A=0,T=l(t),b=T?t.positions:void 0;if(o)for(a=x*3*2,s=new Array(a*2),T&&(m=x*2*2,_=new Array(m*2)),c=0;c<x;c++)u=e[c],f=e[(c+1)%x],s[C]=s[C+a]=u.x,++C,s[C]=s[C+a]=u.y,++C,s[C]=s[C+a]=u.z,++C,s[C]=s[C+a]=f.x,++C,s[C]=s[C+a]=f.y,++C,s[C]=s[C+a]=f.z,++C,T&&(d=b[c],p=b[(c+1)%x],_[A]=_[A+m]=d.x,++A,_[A]=_[A+m]=d.y,++A,_[A]=_[A+m]=p.x,++A,_[A]=_[A+m]=p.y,++A);else{let I=R.chordLength(i,n.maximumRadius),L=0;if(r===Yt.GEODESIC)for(c=0;c<x;c++)L+=cr.subdivideLineCount(e[c],e[(c+1)%x],I);else if(r===Yt.RHUMB)for(c=0;c<x;c++)L+=cr.subdivideRhumbLineCount(n,e[c],e[(c+1)%x],I);for(a=(L+x)*3,s=new Array(a*2),T&&(m=(L+x)*2,_=new Array(m*2)),c=0;c<x;c++){u=e[c],f=e[(c+1)%x];let N,g;T&&(d=b[c],p=b[(c+1)%x]),r===Yt.GEODESIC?(N=cr.subdivideLine(u,f,I,RJ),T&&(g=cr.subdivideTexcoordLine(d,p,u,f,I,OJ))):r===Yt.RHUMB&&(N=cr.subdivideRhumbLine(n,u,f,I,RJ),T&&(g=cr.subdivideTexcoordRhumbLine(d,p,n,u,f,I,OJ)));let E=N.length;for(let v=0;v<E;++v,++C)s[C]=N[v],s[C+a]=N[v];if(s[C]=f.x,s[C+a]=f.x,++C,s[C]=f.y,s[C+a]=f.y,++C,s[C]=f.z,s[C+a]=f.z,++C,T){let v=g.length;for(let P=0;P<v;++P,++A)_[A]=g[P],_[A+m]=g[P];_[A]=p.x,_[A+m]=p.x,++A,_[A]=p.y,_[A+m]=p.y,++A}}}x=s.length;let S=Ne.createTypedArray(x/3,x-e.length*6),w=0;for(x/=6,c=0;c<x;c++){let I=c,L=I+1,N=I+x,g=N+1;u=h.fromArray(s,I*3,p1e),f=h.fromArray(s,L*3,_1e),!h.equalsEpsilon(u,f,R.EPSILON10,R.EPSILON10)&&(S[w++]=I,S[w++]=N,S[w++]=L,S[w++]=L,S[w++]=N,S[w++]=g)}let D={attributes:new ln({position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:s})}),indices:S,primitiveType:Le.TRIANGLES};return T&&(D.attributes.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:_})),new ct(D)};var Un=cr;var g1e=new h,y1e=new qe,x1e=new G,C1e=new G,A1e=new h,T1e=new h,b1e=new h,MS=new h,E1e=new h,S1e=new h,BJ=new Me,w1e=new Q,v1e=new Q,D1e=new h;function P1e(e,t,n,i,o,r,s,a,c){let u=e.positions,f=ti.triangulate(e.positions2D,e.holes);f.length<3&&(f=[0,1,2]);let d=Ne.createTypedArray(u.length,f.length);d.set(f);let p=w1e;if(i!==0){let g=Me.fromAxisAngle(s,i,BJ);if(p=Q.fromQuaternion(g,p),t.tangent||t.bitangent){g=Me.fromAxisAngle(s,-i,BJ);let E=Q.fromQuaternion(g,v1e);a=h.normalize(Q.multiplyByVector(E,a,a),a),t.bitangent&&(c=h.normalize(h.cross(s,a,c),c))}}else p=Q.clone(Q.IDENTITY,p);let _=C1e;t.st&&(_.x=n.x,_.y=n.y);let m=u.length,x=m*3,C=new Float64Array(x),A=t.normal?new Float32Array(x):void 0,T=t.tangent?new Float32Array(x):void 0,b=t.bitangent?new Float32Array(x):void 0,S=t.st?new Float32Array(m*2):void 0,w=0,D=0,O=0,I=0,L=0;for(let g=0;g<m;g++){let E=u[g];if(C[w++]=E.x,C[w++]=E.y,C[w++]=E.z,t.st)if(l(o)&&o.positions.length===m)S[L++]=o.positions[g].x,S[L++]=o.positions[g].y;else{let v=Q.multiplyByVector(p,E,g1e),P=r(v,x1e);G.subtract(P,_,P);let M=R.clamp(P.x/n.width,0,1),V=R.clamp(P.y/n.height,0,1);S[L++]=M,S[L++]=V}t.normal&&(A[D++]=s.x,A[D++]=s.y,A[D++]=s.z),t.tangent&&(T[I++]=a.x,T[I++]=a.y,T[I++]=a.z),t.bitangent&&(b[O++]=c.x,b[O++]=c.y,b[O++]=c.z)}let N=new ln;return t.position&&(N.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:C})),t.normal&&(N.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:A})),t.tangent&&(N.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:T})),t.bitangent&&(N.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:b})),t.st&&(N.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:S})),new ct({attributes:N,indices:d,primitiveType:Le.TRIANGLES})}function Ty(e){e=y(e,y.EMPTY_OBJECT);let t=e.polygonHierarchy,n=e.textureCoordinates,i=y(e.vertexFormat,Pe.DEFAULT);this._vertexFormat=Pe.clone(i),this._polygonHierarchy=t,this._stRotation=y(e.stRotation,0),this._ellipsoid=re.clone(y(e.ellipsoid,re.WGS84)),this._workerName="createCoplanarPolygonGeometry",this._textureCoordinates=n,this.packedLength=Un.computeHierarchyPackedLength(t,h)+Pe.packedLength+re.packedLength+(l(n)?Un.computeHierarchyPackedLength(n,G):1)+2}Ty.fromPositions=function(e){e=y(e,y.EMPTY_OBJECT);let t={polygonHierarchy:{positions:e.positions},vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,textureCoordinates:e.textureCoordinates};return new Ty(t)};Ty.pack=function(e,t,n){return n=y(n,0),n=Un.packPolygonHierarchy(e._polygonHierarchy,t,n,h),re.pack(e._ellipsoid,t,n),n+=re.packedLength,Pe.pack(e._vertexFormat,t,n),n+=Pe.packedLength,t[n++]=e._stRotation,l(e._textureCoordinates)?n=Un.packPolygonHierarchy(e._textureCoordinates,t,n,G):t[n++]=-1,t[n++]=e.packedLength,t};var I1e=re.clone(re.UNIT_SPHERE),O1e=new Pe,R1e={polygonHierarchy:{}};Ty.unpack=function(e,t,n){t=y(t,0);let i=Un.unpackPolygonHierarchy(e,t,h);t=i.startingIndex,delete i.startingIndex;let o=re.unpack(e,t,I1e);t+=re.packedLength;let r=Pe.unpack(e,t,O1e);t+=Pe.packedLength;let s=e[t++],a=e[t]===-1?void 0:Un.unpackPolygonHierarchy(e,t,G);l(a)?(t=a.startingIndex,delete a.startingIndex):t++;let c=e[t++];return l(n)||(n=new Ty(R1e)),n._polygonHierarchy=i,n._ellipsoid=re.clone(o,n._ellipsoid),n._vertexFormat=Pe.clone(r,n._vertexFormat),n._stRotation=s,n._textureCoordinates=a,n.packedLength=c,n};Ty.createGeometry=function(e){let t=e._vertexFormat,n=e._polygonHierarchy,i=e._stRotation,o=e._textureCoordinates,r=l(o),s=n.positions;if(s=So(s,h.equalsEpsilon,!0),s.length<3)return;let a=A1e,c=T1e,u=b1e,f=E1e,d=S1e;if(!B_.computeProjectTo2DArguments(s,MS,f,d))return;if(a=h.cross(f,d,a),a=h.normalize(a,a),!h.equalsEpsilon(MS,h.ZERO,R.EPSILON6)){let L=e._ellipsoid.geodeticSurfaceNormal(MS,D1e);h.dot(a,L)<0&&(a=h.negate(a,a),f=h.negate(f,f))}let _=B_.createProjectPointsTo2DFunction(MS,f,d),m=B_.createProjectPointTo2DFunction(MS,f,d);t.tangent&&(c=h.clone(f,c)),t.bitangent&&(u=h.clone(d,u));let x=Un.polygonsFromHierarchy(n,r,_,!1),C=x.hierarchy,A=x.polygons,T=function(L){return L},b=r?Un.polygonsFromHierarchy(o,!0,T,!1).polygons:void 0;if(C.length===0)return;s=C[0].outerRing;let S=oe.fromPoints(s),w=Un.computeBoundingRectangle(a,m,s,i,y1e),D=[];for(let L=0;L<A.length;L++){let N=new pt({geometry:P1e(A[L],t,w,i,r?b[L]:void 0,m,a,c,u)});D.push(N)}let O=Rn.combineInstances(D)[0];O.attributes.position.values=new Float64Array(O.attributes.position.values),O.indices=Ne.createTypedArray(O.attributes.position.values.length/3,O.indices);let I=O.attributes;return t.position||delete I.position,new ct({attributes:I,indices:O.indices,primitiveType:O.primitiveType,boundingSphere:S})};var BI=Ty;function M1e(e){let t=e.length,n=new Float64Array(t*3),i=Ne.createTypedArray(t,t*2),o=0,r=0;for(let a=0;a<t;a++){let c=e[a];n[o++]=c.x,n[o++]=c.y,n[o++]=c.z,i[r++]=a,i[r++]=(a+1)%t}let s=new ln({position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:n})});return new ct({attributes:s,indices:i,primitiveType:Le.LINES})}function by(e){e=y(e,y.EMPTY_OBJECT);let t=e.polygonHierarchy;this._polygonHierarchy=t,this._workerName="createCoplanarPolygonOutlineGeometry",this.packedLength=Un.computeHierarchyPackedLength(t,h)+1}by.fromPositions=function(e){e=y(e,y.EMPTY_OBJECT);let t={polygonHierarchy:{positions:e.positions}};return new by(t)};by.pack=function(e,t,n){return n=y(n,0),n=Un.packPolygonHierarchy(e._polygonHierarchy,t,n,h),t[n]=e.packedLength,t};var B1e={polygonHierarchy:{}};by.unpack=function(e,t,n){t=y(t,0);let i=Un.unpackPolygonHierarchy(e,t,h);t=i.startingIndex,delete i.startingIndex;let o=e[t];return l(n)||(n=new by(B1e)),n._polygonHierarchy=i,n.packedLength=o,n};by.createGeometry=function(e){let t=e._polygonHierarchy,n=t.positions;if(n=So(n,h.equalsEpsilon,!0),n.length<3||!B_.validOutline(n))return;let o=Un.polygonOutlinesFromHierarchy(t,!1);if(o.length===0)return;let r=[];for(let c=0;c<o.length;c++){let u=new pt({geometry:M1e(o[c])});r.push(u)}let s=Rn.combineInstances(r)[0],a=oe.fromPoints(t.positions);return new ct({attributes:s.attributes,indices:s.indices,primitiveType:s.primitiveType,boundingSphere:a})};var ed=by;var L1e={ROUNDED:0,MITERED:1,BEVELED:2},Ii=Object.freeze(L1e);function N1e(e){let t=e._uSquared,n=e._ellipsoid.maximumRadius,i=e._ellipsoid.minimumRadius,o=(n-i)/n,r=Math.cos(e._startHeading),s=Math.sin(e._startHeading),a=(1-o)*Math.tan(e._start.latitude),c=1/Math.sqrt(1+a*a),u=c*a,f=Math.atan2(a,r),d=c*s,p=d*d,_=1-p,m=Math.sqrt(_),x=t/4,C=x*x,A=C*x,T=C*C,b=1+x-3*C/4+5*A/4-175*T/64,S=1-x+15*C/8-35*A/8,w=1-3*x+35*C/4,D=1-5*x,O=b*f-S*Math.sin(2*f)*x/2-w*Math.sin(4*f)*C/16-D*Math.sin(6*f)*A/48-Math.sin(8*f)*5*T/512,I=e._constants;I.a=n,I.b=i,I.f=o,I.cosineHeading=r,I.sineHeading=s,I.tanU=a,I.cosineU=c,I.sineU=u,I.sigma=f,I.sineAlpha=d,I.sineSquaredAlpha=p,I.cosineSquaredAlpha=_,I.cosineAlpha=m,I.u2Over4=x,I.u4Over16=C,I.u6Over64=A,I.u8Over256=T,I.a0=b,I.a1=S,I.a2=w,I.a3=D,I.distanceRatio=O}function F1e(e,t){return e*t*(4+e*(4-3*t))/16}function LJ(e,t,n,i,o,r,s){let a=F1e(e,n);return(1-a)*e*t*(i+a*o*(s+a*r*(2*s*s-1)))}function V1e(e,t,n,i,o,r,s){let a=(t-n)/t,c=r-i,u=Math.atan((1-a)*Math.tan(o)),f=Math.atan((1-a)*Math.tan(s)),d=Math.cos(u),p=Math.sin(u),_=Math.cos(f),m=Math.sin(f),x=d*_,C=d*m,A=p*m,T=p*_,b=c,S=R.TWO_PI,w=Math.cos(b),D=Math.sin(b),O,I,L,N,g;do{w=Math.cos(b),D=Math.sin(b);let F=C-T*w;L=Math.sqrt(_*_*D*D+F*F),I=A+x*w,O=Math.atan2(L,I);let Y;L===0?(Y=0,N=1):(Y=x*D/L,N=1-Y*Y),S=b,g=I-2*A/N,isFinite(g)||(g=0),b=c+LJ(a,Y,N,O,L,I,g)}while(Math.abs(b-S)>R.EPSILON12);let E=N*(t*t-n*n)/(n*n),v=1+E*(4096+E*(E*(320-175*E)-768))/16384,P=E*(256+E*(E*(74-47*E)-128))/1024,M=g*g,V=P*L*(g+P*(I*(2*M-1)-P*g*(4*L*L-3)*(4*M-3)/6)/4),U=n*v*(O-V),k=Math.atan2(_*D,C-T*w),H=Math.atan2(d*D,C*w-T);e._distance=U,e._startHeading=k,e._endHeading=H,e._uSquared=E}var k1e=new h,y5=new h;function NJ(e,t,n,i){let o=h.normalize(i.cartographicToCartesian(t,y5),k1e),r=h.normalize(i.cartographicToCartesian(n,y5),y5);V1e(e,i.maximumRadius,i.minimumRadius,t.longitude,t.latitude,n.longitude,n.latitude),e._start=me.clone(t,e._start),e._end=me.clone(n,e._end),e._start.height=0,e._end.height=0,N1e(e)}function BS(e,t,n){let i=y(n,re.WGS84);this._ellipsoid=i,this._start=new me,this._end=new me,this._constants={},this._startHeading=void 0,this._endHeading=void 0,this._distance=void 0,this._uSquared=void 0,l(e)&&l(t)&&NJ(this,e,t,i)}Object.defineProperties(BS.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},startHeading:{get:function(){return this._startHeading}},endHeading:{get:function(){return this._endHeading}}});BS.prototype.setEndPoints=function(e,t){NJ(this,e,t,this._ellipsoid)};BS.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(this._distance*e,t)};BS.prototype.interpolateUsingSurfaceDistance=function(e,t){let n=this._constants,i=n.distanceRatio+e/n.b,o=Math.cos(2*i),r=Math.cos(4*i),s=Math.cos(6*i),a=Math.sin(2*i),c=Math.sin(4*i),u=Math.sin(6*i),f=Math.sin(8*i),d=i*i,p=i*d,_=n.u8Over256,m=n.u2Over4,x=n.u6Over64,C=n.u4Over16,A=2*p*_*o/3+i*(1-m+7*C/4-15*x/4+579*_/64-(C-15*x/4+187*_/16)*o-(5*x/4-115*_/16)*r-29*_*s/16)+(m/2-C+71*x/32-85*_/16)*a+(5*C/16-5*x/4+383*_/96)*c-d*((x-11*_/2)*a+5*_*c/2)+(29*x/96-29*_/16)*u+539*_*f/1536,T=Math.asin(Math.sin(A)*n.cosineAlpha),b=Math.atan(n.a/n.b*Math.tan(T));A=A-n.sigma;let S=Math.cos(2*n.sigma+A),w=Math.sin(A),D=Math.cos(A),O=n.cosineU*D,I=n.sineU*w,N=Math.atan2(w*n.sineHeading,O-I*n.cosineHeading)-LJ(n.f,n.sineAlpha,n.cosineSquaredAlpha,A,w,D,S);return l(t)?(t.longitude=this._start.longitude+N,t.latitude=b,t.height=0,t):new me(this._start.longitude+N,b,0)};var td=BS;var yc={};yc.numberOfPoints=function(e,t,n){let i=h.distance(e,t);return Math.ceil(i/n)};yc.numberOfPointsRhumbLine=function(e,t,n){let i=Math.pow(e.longitude-t.longitude,2)+Math.pow(e.latitude-t.latitude,2);return Math.max(1,Math.ceil(Math.sqrt(i/(n*n))))};var U1e=new me;yc.extractHeights=function(e,t){let n=e.length,i=new Array(n);for(let o=0;o<n;o++){let r=e[o];i[o]=t.cartesianToCartographic(r,U1e).height}return i};var z1e=new B,H1e=new h,FJ=new h,G1e=new rn(h.UNIT_X,0),VJ=new h,W1e=new rn(h.UNIT_X,0),j1e=new h,q1e=new h,C5=[];function UJ(e,t,n){let i=C5;i.length=e;let o;if(t===n){for(o=0;o<e;o++)i[o]=t;return i}let s=(n-t)/e;for(o=0;o<e;o++){let a=t+o*s;i[o]=a}return i}var NI=new me,LI=new me,V_=new h,A5=new h,Y1e=new h,x5=new td,LS=new za;function X1e(e,t,n,i,o,r,s,a){let c=i.scaleToGeodeticSurface(e,A5),u=i.scaleToGeodeticSurface(t,Y1e),f=yc.numberOfPoints(e,t,n),d=i.cartesianToCartographic(c,NI),p=i.cartesianToCartographic(u,LI),_=UJ(f,o,r);x5.setEndPoints(d,p);let m=x5.surfaceDistance/f,x=a;d.height=o;let C=i.cartographicToCartesian(d,V_);h.pack(C,s,x),x+=3;for(let A=1;A<f;A++){let T=x5.interpolateUsingSurfaceDistance(A*m,LI);T.height=_[A],C=i.cartographicToCartesian(T,V_),h.pack(C,s,x),x+=3}return x}function K1e(e,t,n,i,o,r,s,a){let c=i.cartesianToCartographic(e,NI),u=i.cartesianToCartographic(t,LI),f=yc.numberOfPointsRhumbLine(c,u,n);c.height=0,u.height=0;let d=UJ(f,o,r);LS.ellipsoid.equals(i)||(LS=new za(void 0,void 0,i)),LS.setEndPoints(c,u);let p=LS.surfaceDistance/f,_=a;c.height=o;let m=i.cartographicToCartesian(c,V_);h.pack(m,s,_),_+=3;for(let x=1;x<f;x++){let C=LS.interpolateUsingSurfaceDistance(x*p,LI);C.height=d[x],m=i.cartographicToCartesian(C,V_),h.pack(m,s,_),_+=3}return _}yc.wrapLongitude=function(e,t){let n=[],i=[];if(l(e)&&e.length>0){t=y(t,B.IDENTITY);let o=B.inverseTransformation(t,z1e),r=B.multiplyByPoint(o,h.ZERO,H1e),s=h.normalize(B.multiplyByPointAsVector(o,h.UNIT_Y,FJ),FJ),a=rn.fromPointNormal(r,s,G1e),c=h.normalize(B.multiplyByPointAsVector(o,h.UNIT_X,VJ),VJ),u=rn.fromPointNormal(r,c,W1e),f=1;n.push(h.clone(e[0]));let d=n[0],p=e.length;for(let _=1;_<p;++_){let m=e[_];if(rn.getPointDistance(u,d)<0||rn.getPointDistance(u,m)<0){let x=Ki.lineSegmentPlane(d,m,a,j1e);if(l(x)){let C=h.multiplyByScalar(s,5e-9,q1e);rn.getPointDistance(a,d)<0&&h.negate(C,C),n.push(h.add(x,C,new h)),i.push(f+1),h.negate(C,C),n.push(h.add(x,C,new h)),f=1}}n.push(h.clone(e[_])),f++,d=m}i.push(f)}return{positions:n,lengths:i}};yc.generateArc=function(e){l(e)||(e={});let t=e.positions,n=t.length,i=y(e.ellipsoid,re.WGS84),o=y(e.height,0),r=Array.isArray(o);if(n<1)return[];if(n===1){let x=i.scaleToGeodeticSurface(t[0],A5);if(o=r?o[0]:o,o!==0){let C=i.geodeticSurfaceNormal(x,V_);h.multiplyByScalar(C,o,C),h.add(x,C,x)}return[x.x,x.y,x.z]}let s=e.minDistance;if(!l(s)){let x=y(e.granularity,R.RADIANS_PER_DEGREE);s=R.chordLength(x,i.maximumRadius)}let a=0,c;for(c=0;c<n-1;c++)a+=yc.numberOfPoints(t[c],t[c+1],s);let u=(a+1)*3,f=new Array(u),d=0;for(c=0;c<n-1;c++){let x=t[c],C=t[c+1],A=r?o[c]:o,T=r?o[c+1]:o;d=X1e(x,C,s,i,A,T,f,d)}C5.length=0;let p=t[n-1],_=i.cartesianToCartographic(p,NI);_.height=r?o[n-1]:o;let m=i.cartographicToCartesian(_,V_);return h.pack(m,f,u-3),f};var kJ=new me,$1e=new me;yc.generateRhumbArc=function(e){l(e)||(e={});let t=e.positions,n=t.length,i=y(e.ellipsoid,re.WGS84),o=y(e.height,0),r=Array.isArray(o);if(n<1)return[];if(n===1){let A=i.scaleToGeodeticSurface(t[0],A5);if(o=r?o[0]:o,o!==0){let T=i.geodeticSurfaceNormal(A,V_);h.multiplyByScalar(T,o,T),h.add(A,T,A)}return[A.x,A.y,A.z]}let s=y(e.granularity,R.RADIANS_PER_DEGREE),a=0,c,u=i.cartesianToCartographic(t[0],kJ),f;for(c=0;c<n-1;c++)f=i.cartesianToCartographic(t[c+1],$1e),a+=yc.numberOfPointsRhumbLine(u,f,s),u=me.clone(f,kJ);let d=(a+1)*3,p=new Array(d),_=0;for(c=0;c<n-1;c++){let A=t[c],T=t[c+1],b=r?o[c]:o,S=r?o[c+1]:o;_=K1e(A,T,s,i,b,S,p,_)}C5.length=0;let m=t[n-1],x=i.cartesianToCartographic(m,NI);x.height=r?o[n-1]:o;let C=i.cartographicToCartesian(x,V_);return h.pack(C,p,d-3),p};yc.generateCartesianArc=function(e){let t=yc.generateArc(e),n=t.length/3,i=new Array(n);for(let o=0;o<n;o++)i[o]=h.unpack(t,o*3);return i};yc.generateCartesianRhumbArc=function(e){let t=yc.generateRhumbArc(e),n=t.length/3,i=new Array(n);for(let o=0;o<n;o++)i[o]=h.unpack(t,o*3);return i};var Oi=yc;var Vs=[new h,new h],Z1e=new h,J1e=new h,Q1e=new h,ePe=new h,tPe=new h,nPe=new h,iPe=new h,oPe=new h,rPe=new h,OA=new h,FI=new h,NS={},T5=new me;function sPe(e,t){let n=new Array(e.length);for(let i=0;i<e.length;i++){let o=e[i];T5=t.cartesianToCartographic(o,T5),n[i]=T5.height,e[i]=t.scaleToGeodeticSurface(o,o)}return n}function b5(e,t,n,i){let o=e[0],r=e[1],s=h.angleBetween(o,r),a=Math.ceil(s/i),c=new Array(a),u;if(t===n){for(u=0;u<a;u++)c[u]=t;return c.push(n),c}let d=(n-t)/a;for(u=1;u<a;u++){let p=t+u*d;c[u]=p}return c[0]=t,c.push(n),c}var VI=new h,kI=new h;function aPe(e,t,n,i){let o=new Fa(n,i),r=o.projectPointOntoPlane(h.add(n,e,VI),VI),s=o.projectPointOntoPlane(h.add(n,t,kI),kI),a=G.angleBetween(r,s);return s.x*r.y-s.y*r.x>=0?-a:a}var cPe=new h(-1,0,0),Ey=new B,lPe=new B,E5=new Q,uPe=Q.IDENTITY.clone(),fPe=new h,dPe=new se,zJ=new h;function Zm(e,t,n,i,o,r,s,a){let c=fPe,u=dPe;Ey=_t.eastNorthUpToFixedFrame(e,o,Ey),c=B.multiplyByPointAsVector(Ey,cPe,c),c=h.normalize(c,c);let f=aPe(c,t,e,o);E5=Q.fromRotationZ(f,E5),zJ.z=r,Ey=B.multiplyTransformation(Ey,B.fromRotationTranslation(E5,zJ,lPe),Ey);let d=uPe;d[0]=s;for(let p=0;p<a;p++)for(let _=0;_<n.length;_+=3)u=h.fromArray(n,_,u),u=Q.multiplyByVector(d,u,u),u=B.multiplyByPoint(Ey,u,u),i.push(u.x,u.y,u.z);return i}var hPe=new h;function S5(e,t,n,i,o,r,s){for(let a=0;a<e.length;a+=3){let c=h.fromArray(e,a,hPe);i=Zm(c,t,n,i,o,r[a/3],s,1)}return i}function mPe(e,t){let n=e.length,i=new Array(n*6),o=0,r=t.x+t.width/2,s=t.y+t.height/2,a=e[0];i[o++]=a.x-r,i[o++]=0,i[o++]=a.y-s;for(let c=1;c<n;c++){a=e[c];let u=a.x-r,f=a.y-s;i[o++]=u,i[o++]=0,i[o++]=f,i[o++]=u,i[o++]=0,i[o++]=f}return a=e[0],i[o++]=a.x-r,i[o++]=0,i[o++]=a.y-s,i}function HJ(e,t){let n=e.length,i=new Array(n*3),o=0,r=t.x+t.width/2,s=t.y+t.height/2;for(let a=0;a<n;a++)i[o++]=e[a].x-r,i[o++]=0,i[o++]=e[a].y-s;return i}var GJ=new Me,WJ=new h,jJ=new Q;function qJ(e,t,n,i,o,r,s,a,c,u){let f=h.angleBetween(h.subtract(t,e,OA),h.subtract(n,e,FI)),d=i===Ii.BEVELED?0:Math.ceil(f/R.toRadians(5)),p;o?p=Q.fromQuaternion(Me.fromAxisAngle(h.negate(e,OA),f/(d+1),GJ),jJ):p=Q.fromQuaternion(Me.fromAxisAngle(e,f/(d+1),GJ),jJ);let _,m;if(t=h.clone(t,WJ),d>0){let x=u?2:1;for(let C=0;C<d;C++)t=Q.multiplyByVector(p,t,t),_=h.subtract(t,e,OA),_=h.normalize(_,_),o||(_=h.negate(_,_)),m=r.scaleToGeodeticSurface(t,FI),s=Zm(m,_,a,s,r,c,1,x)}else _=h.subtract(t,e,OA),_=h.normalize(_,_),o||(_=h.negate(_,_)),m=r.scaleToGeodeticSurface(t,FI),s=Zm(m,_,a,s,r,c,1,1),n=h.clone(n,WJ),_=h.subtract(n,e,OA),_=h.normalize(_,_),o||(_=h.negate(_,_)),m=r.scaleToGeodeticSurface(n,FI),s=Zm(m,_,a,s,r,c,1,1);return s}NS.removeDuplicatesFromShape=function(e){let t=e.length,n=[];for(let i=t-1,o=0;o<t;i=o++){let r=e[i],s=e[o];G.equals(r,s)||n.push(s)}return n};NS.angleIsGreaterThanPi=function(e,t,n,i){let o=new Fa(n,i),r=o.projectPointOntoPlane(h.add(n,e,VI),VI),s=o.projectPointOntoPlane(h.add(n,t,kI),kI);return s.x*r.y-s.y*r.x>=0};var pPe=new h,_Pe=new h;NS.computePositions=function(e,t,n,i,o){let r=i._ellipsoid,s=sPe(e,r),a=i._granularity,c=i._cornerType,u=o?mPe(t,n):HJ(t,n),f=o?HJ(t,n):void 0,d=n.height/2,p=n.width/2,_=e.length,m=[],x=o?[]:void 0,C=Z1e,A=J1e,T=Q1e,b=ePe,S=tPe,w=nPe,D=iPe,O=oPe,I=rPe,L=e[0],N=e[1];b=r.geodeticSurfaceNormal(L,b),C=h.subtract(N,L,C),C=h.normalize(C,C),O=h.cross(b,C,O),O=h.normalize(O,O);let g=s[0],E=s[1];o&&(x=Zm(L,O,f,x,r,g+d,1,1)),I=h.clone(L,I),L=N,A=h.negate(C,A);let v,P;for(let U=1;U<_-1;U++){let k=o?2:1;if(N=e[U+1],L.equals(N)){Mt("Positions are too close and are considered equivalent with rounding error.");continue}C=h.subtract(N,L,C),C=h.normalize(C,C),T=h.add(C,A,T),T=h.normalize(T,T),b=r.geodeticSurfaceNormal(L,b);let H=h.multiplyByScalar(b,h.dot(C,b),pPe);h.subtract(C,H,H),h.normalize(H,H);let F=h.multiplyByScalar(b,h.dot(A,b),_Pe);if(h.subtract(A,F,F),h.normalize(F,F),!R.equalsEpsilon(Math.abs(h.dot(H,F)),1,R.EPSILON7)){T=h.cross(T,b,T),T=h.cross(b,T,T),T=h.normalize(T,T);let j=1/Math.max(.25,h.magnitude(h.cross(T,A,OA))),X=NS.angleIsGreaterThanPi(C,A,L,r);X?(S=h.add(L,h.multiplyByScalar(T,j*p,T),S),w=h.add(S,h.multiplyByScalar(O,p,w),w),Vs[0]=h.clone(I,Vs[0]),Vs[1]=h.clone(w,Vs[1]),v=b5(Vs,g+d,E+d,a),P=Oi.generateArc({positions:Vs,granularity:a,ellipsoid:r}),m=S5(P,O,u,m,r,v,1),O=h.cross(b,C,O),O=h.normalize(O,O),D=h.add(S,h.multiplyByScalar(O,p,D),D),c===Ii.ROUNDED||c===Ii.BEVELED?qJ(S,w,D,c,X,r,m,u,E+d,o):(T=h.negate(T,T),m=Zm(L,T,u,m,r,E+d,j,k)),I=h.clone(D,I)):(S=h.add(L,h.multiplyByScalar(T,j*p,T),S),w=h.add(S,h.multiplyByScalar(O,-p,w),w),Vs[0]=h.clone(I,Vs[0]),Vs[1]=h.clone(w,Vs[1]),v=b5(Vs,g+d,E+d,a),P=Oi.generateArc({positions:Vs,granularity:a,ellipsoid:r}),m=S5(P,O,u,m,r,v,1),O=h.cross(b,C,O),O=h.normalize(O,O),D=h.add(S,h.multiplyByScalar(O,-p,D),D),c===Ii.ROUNDED||c===Ii.BEVELED?qJ(S,w,D,c,X,r,m,u,E+d,o):m=Zm(L,T,u,m,r,E+d,j,k),I=h.clone(D,I)),A=h.negate(C,A)}else m=Zm(I,O,u,m,r,g+d,1,1),I=L;g=E,E=s[U+1],L=N}Vs[0]=h.clone(I,Vs[0]),Vs[1]=h.clone(L,Vs[1]),v=b5(Vs,g+d,E+d,a),P=Oi.generateArc({positions:Vs,granularity:a,ellipsoid:r}),m=S5(P,O,u,m,r,v,1),o&&(x=Zm(L,O,f,x,r,E+d,1,1)),_=m.length;let M=o?_+x.length:_,V=new Float64Array(M);return V.set(m),o&&V.set(x,_),V};var Sh=NS;var v5={},RA=new h,ZJ=new h,gPe=new h,YJ=new h,xc=[new h,new h],JJ=new h,QJ=new h,eQ=new h,yPe=new h,xPe=new h,CPe=new h,APe=new h,TPe=new h,bPe=new h,EPe=new h,XJ=new Me,KJ=new Q;function UI(e,t,n,i,o){let r=h.angleBetween(h.subtract(t,e,RA),h.subtract(n,e,ZJ)),s=i===Ii.BEVELED?1:Math.ceil(r/R.toRadians(5))+1,a=s*3,c=new Array(a);c[a-3]=n.x,c[a-2]=n.y,c[a-1]=n.z;let u;o?u=Q.fromQuaternion(Me.fromAxisAngle(h.negate(e,RA),r/s,XJ),KJ):u=Q.fromQuaternion(Me.fromAxisAngle(e,r/s,XJ),KJ);let f=0;t=h.clone(t,RA);for(let d=0;d<s;d++)t=Q.multiplyByVector(u,t,t),c[f++]=t.x,c[f++]=t.y,c[f++]=t.z;return c}function SPe(e){let t=JJ,n=QJ,i=eQ,o=e[1];n=h.fromArray(e[1],o.length-3,n),i=h.fromArray(e[0],0,i),t=h.midpoint(n,i,t);let r=UI(t,n,i,Ii.ROUNDED,!1),s=e.length-1,a=e[s-1];o=e[s],n=h.fromArray(a,a.length-3,n),i=h.fromArray(o,0,i),t=h.midpoint(n,i,t);let c=UI(t,n,i,Ii.ROUNDED,!1);return[r,c]}function $J(e,t,n,i){let o=RA;return i?o=h.add(e,t,o):(t=h.negate(t,t),o=h.add(e,t,o)),[o.x,o.y,o.z,n.x,n.y,n.z]}function w5(e,t,n,i){let o=new Array(e.length),r=new Array(e.length),s=h.multiplyByScalar(t,n,RA),a=h.negate(s,ZJ),c=0,u=e.length-1;for(let f=0;f<e.length;f+=3){let d=h.fromArray(e,f,gPe),p=h.add(d,a,YJ);o[c++]=p.x,o[c++]=p.y,o[c++]=p.z;let _=h.add(d,s,YJ);r[u--]=_.z,r[u--]=_.y,r[u--]=_.x}return i.push(o,r),i}v5.addAttribute=function(e,t,n,i){let o=t.x,r=t.y,s=t.z;l(n)&&(e[n]=o,e[n+1]=r,e[n+2]=s),l(i)&&(e[i]=s,e[i-1]=r,e[i-2]=o)};var wPe=new h,vPe=new h;v5.computePositions=function(e){let t=e.granularity,n=e.positions,i=e.ellipsoid,o=e.width/2,r=e.cornerType,s=e.saveAttributes,a=JJ,c=QJ,u=eQ,f=yPe,d=xPe,p=CPe,_=APe,m=TPe,x=bPe,C=EPe,A=[],T=s?[]:void 0,b=s?[]:void 0,S=n[0],w=n[1];c=h.normalize(h.subtract(w,S,c),c),a=i.geodeticSurfaceNormal(S,a),f=h.normalize(h.cross(a,c,f),f),s&&(T.push(f.x,f.y,f.z),b.push(a.x,a.y,a.z)),_=h.clone(S,_),S=w,u=h.negate(c,u);let D,O=[],I,L=n.length;for(I=1;I<L-1;I++){a=i.geodeticSurfaceNormal(S,a),w=n[I+1],c=h.normalize(h.subtract(w,S,c),c),d=h.normalize(h.add(c,u,d),d);let g=h.multiplyByScalar(a,h.dot(c,a),wPe);h.subtract(c,g,g),h.normalize(g,g);let E=h.multiplyByScalar(a,h.dot(u,a),vPe);if(h.subtract(u,E,E),h.normalize(E,E),!R.equalsEpsilon(Math.abs(h.dot(g,E)),1,R.EPSILON7)){d=h.cross(d,a,d),d=h.cross(a,d,d),d=h.normalize(d,d);let P=o/Math.max(.25,h.magnitude(h.cross(d,u,RA))),M=Sh.angleIsGreaterThanPi(c,u,S,i);d=h.multiplyByScalar(d,P,d),M?(m=h.add(S,d,m),C=h.add(m,h.multiplyByScalar(f,o,C),C),x=h.add(m,h.multiplyByScalar(f,o*2,x),x),xc[0]=h.clone(_,xc[0]),xc[1]=h.clone(C,xc[1]),D=Oi.generateArc({positions:xc,granularity:t,ellipsoid:i}),A=w5(D,f,o,A),s&&(T.push(f.x,f.y,f.z),b.push(a.x,a.y,a.z)),p=h.clone(x,p),f=h.normalize(h.cross(a,c,f),f),x=h.add(m,h.multiplyByScalar(f,o*2,x),x),_=h.add(m,h.multiplyByScalar(f,o,_),_),r===Ii.ROUNDED||r===Ii.BEVELED?O.push({leftPositions:UI(m,p,x,r,M)}):O.push({leftPositions:$J(S,h.negate(d,d),x,M)})):(x=h.add(S,d,x),C=h.add(x,h.negate(h.multiplyByScalar(f,o,C),C),C),m=h.add(x,h.negate(h.multiplyByScalar(f,o*2,m),m),m),xc[0]=h.clone(_,xc[0]),xc[1]=h.clone(C,xc[1]),D=Oi.generateArc({positions:xc,granularity:t,ellipsoid:i}),A=w5(D,f,o,A),s&&(T.push(f.x,f.y,f.z),b.push(a.x,a.y,a.z)),p=h.clone(m,p),f=h.normalize(h.cross(a,c,f),f),m=h.add(x,h.negate(h.multiplyByScalar(f,o*2,m),m),m),_=h.add(x,h.negate(h.multiplyByScalar(f,o,_),_),_),r===Ii.ROUNDED||r===Ii.BEVELED?O.push({rightPositions:UI(x,p,m,r,M)}):O.push({rightPositions:$J(S,d,m,M)})),u=h.negate(c,u)}S=w}a=i.geodeticSurfaceNormal(S,a),xc[0]=h.clone(_,xc[0]),xc[1]=h.clone(S,xc[1]),D=Oi.generateArc({positions:xc,granularity:t,ellipsoid:i}),A=w5(D,f,o,A),s&&(T.push(f.x,f.y,f.z),b.push(a.x,a.y,a.z));let N;return r===Ii.ROUNDED&&(N=SPe(A)),{positions:A,corners:O,lefts:T,normals:b,endPositions:N}};var Ni=v5;var iQ=new h,oQ=new h,zI=new h,HI=new h,DPe=new h,rQ=new h,k_=new h,MA=new h;function sQ(e,t){for(let n=0;n<e.length;n++)e[n]=t.scaleToGeodeticSurface(e[n],e[n]);return e}function nd(e,t,n,i,o,r){let s=e.normals,a=e.tangents,c=e.bitangents,u=h.normalize(h.cross(n,t,k_),k_);r.normal&&Ni.addAttribute(s,t,i,o),r.tangent&&Ni.addAttribute(a,u,i,o),r.bitangent&&Ni.addAttribute(c,n,i,o)}function aQ(e,t,n){let i=e.positions,o=e.corners,r=e.endPositions,s=e.lefts,a=e.normals,c=new ln,u,f=0,d=0,p,_=0,m;for(p=0;p<i.length;p+=2)m=i[p].length-3,f+=m,_+=m*2,d+=i[p+1].length-3;for(f+=3,d+=3,p=0;p<o.length;p++){u=o[p];let J=o[p].leftPositions;l(J)?(m=J.length,f+=m,_+=m):(m=o[p].rightPositions.length,d+=m,_+=m)}let x=l(r),C;x&&(C=r[0].length-3,f+=C,d+=C,C/=3,_+=C*6);let A=f+d,T=new Float64Array(A),b=t.normal?new Float32Array(A):void 0,S=t.tangent?new Float32Array(A):void 0,w=t.bitangent?new Float32Array(A):void 0,D={normals:b,tangents:S,bitangents:w},O=0,I=A-1,L,N,g,E,v=iQ,P=oQ,M,V,U=C/2,k=Ne.createTypedArray(A/3,_),H=0;if(x){V=zI,M=HI;let J=r[0];for(v=h.fromArray(a,0,v),P=h.fromArray(s,0,P),p=0;p<U;p++)V=h.fromArray(J,(U-1-p)*3,V),M=h.fromArray(J,(U+p)*3,M),Ni.addAttribute(T,M,O),Ni.addAttribute(T,V,void 0,I),nd(D,v,P,O,I,t),N=O/3,E=N+1,L=(I-2)/3,g=L-1,k[H++]=L,k[H++]=N,k[H++]=g,k[H++]=g,k[H++]=N,k[H++]=E,O+=3,I-=3}let F=0,Y=0,j=i[F++],X=i[F++];T.set(j,O),T.set(X,I-X.length+1),P=h.fromArray(s,Y,P);let W,$;for(m=X.length-3,p=0;p<m;p+=3)W=n.geodeticSurfaceNormal(h.fromArray(j,p,k_),k_),$=n.geodeticSurfaceNormal(h.fromArray(X,m-p,MA),MA),v=h.normalize(h.add(W,$,v),v),nd(D,v,P,O,I,t),N=O/3,E=N+1,L=(I-2)/3,g=L-1,k[H++]=L,k[H++]=N,k[H++]=g,k[H++]=g,k[H++]=N,k[H++]=E,O+=3,I-=3;for(W=n.geodeticSurfaceNormal(h.fromArray(j,m,k_),k_),$=n.geodeticSurfaceNormal(h.fromArray(X,m,MA),MA),v=h.normalize(h.add(W,$,v),v),Y+=3,p=0;p<o.length;p++){let J;u=o[p];let ce=u.leftPositions,he=u.rightPositions,ie,ae,ge=rQ,Se=zI,be=HI;if(v=h.fromArray(a,Y,v),l(ce)){for(nd(D,v,P,void 0,I,t),I-=3,ie=E,ae=g,J=0;J<ce.length/3;J++)ge=h.fromArray(ce,J*3,ge),k[H++]=ie,k[H++]=ae-J-1,k[H++]=ae-J,Ni.addAttribute(T,ge,void 0,I),Se=h.fromArray(T,(ae-J-1)*3,Se),be=h.fromArray(T,ie*3,be),P=h.normalize(h.subtract(Se,be,P),P),nd(D,v,P,void 0,I,t),I-=3;ge=h.fromArray(T,ie*3,ge),Se=h.subtract(h.fromArray(T,ae*3,Se),ge,Se),be=h.subtract(h.fromArray(T,(ae-J)*3,be),ge,be),P=h.normalize(h.add(Se,be,P),P),nd(D,v,P,O,void 0,t),O+=3}else{for(nd(D,v,P,O,void 0,t),O+=3,ie=g,ae=E,J=0;J<he.length/3;J++)ge=h.fromArray(he,J*3,ge),k[H++]=ie,k[H++]=ae+J,k[H++]=ae+J+1,Ni.addAttribute(T,ge,O),Se=h.fromArray(T,ie*3,Se),be=h.fromArray(T,(ae+J)*3,be),P=h.normalize(h.subtract(Se,be,P),P),nd(D,v,P,O,void 0,t),O+=3;ge=h.fromArray(T,ie*3,ge),Se=h.subtract(h.fromArray(T,(ae+J)*3,Se),ge,Se),be=h.subtract(h.fromArray(T,ae*3,be),ge,be),P=h.normalize(h.negate(h.add(be,Se,P),P),P),nd(D,v,P,void 0,I,t),I-=3}for(j=i[F++],X=i[F++],j.splice(0,3),X.splice(X.length-3,3),T.set(j,O),T.set(X,I-X.length+1),m=X.length-3,Y+=3,P=h.fromArray(s,Y,P),J=0;J<X.length;J+=3)W=n.geodeticSurfaceNormal(h.fromArray(j,J,k_),k_),$=n.geodeticSurfaceNormal(h.fromArray(X,m-J,MA),MA),v=h.normalize(h.add(W,$,v),v),nd(D,v,P,O,I,t),E=O/3,N=E-1,g=(I-2)/3,L=g+1,k[H++]=L,k[H++]=N,k[H++]=g,k[H++]=g,k[H++]=N,k[H++]=E,O+=3,I-=3;O-=3,I+=3}if(v=h.fromArray(a,a.length-3,v),nd(D,v,P,O,I,t),x){O+=3,I-=3,V=zI,M=HI;let J=r[1];for(p=0;p<U;p++)V=h.fromArray(J,(C-p-1)*3,V),M=h.fromArray(J,p*3,M),Ni.addAttribute(T,V,void 0,I),Ni.addAttribute(T,M,O),nd(D,v,P,O,I,t),E=O/3,N=E-1,g=(I-2)/3,L=g+1,k[H++]=L,k[H++]=N,k[H++]=g,k[H++]=g,k[H++]=N,k[H++]=E,O+=3,I-=3}if(c.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:T}),t.st){let J=new Float32Array(A/3*2),ce,he,ie=0;if(x){f/=3,d/=3;let ae=Math.PI/(C+1);he=1/(f-C+1),ce=1/(d-C+1);let ge,Se=C/2;for(p=Se+1;p<C+1;p++)ge=R.PI_OVER_TWO+ae*p,J[ie++]=ce*(1+Math.cos(ge)),J[ie++]=.5*(1+Math.sin(ge));for(p=1;p<d-C+1;p++)J[ie++]=p*ce,J[ie++]=0;for(p=C;p>Se;p--)ge=R.PI_OVER_TWO-p*ae,J[ie++]=1-ce*(1+Math.cos(ge)),J[ie++]=.5*(1+Math.sin(ge));for(p=Se;p>0;p--)ge=R.PI_OVER_TWO-ae*p,J[ie++]=1-he*(1+Math.cos(ge)),J[ie++]=.5*(1+Math.sin(ge));for(p=f-C;p>0;p--)J[ie++]=p*he,J[ie++]=1;for(p=1;p<Se+1;p++)ge=R.PI_OVER_TWO+ae*p,J[ie++]=he*(1+Math.cos(ge)),J[ie++]=.5*(1+Math.sin(ge))}else{for(f/=3,d/=3,he=1/(f-1),ce=1/(d-1),p=0;p<d;p++)J[ie++]=p*ce,J[ie++]=0;for(p=f;p>0;p--)J[ie++]=(p-1)*he,J[ie++]=1}c.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:J})}return t.normal&&(c.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:D.normals})),t.tangent&&(c.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:D.tangents})),t.bitangent&&(c.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:D.bitangents})),{attributes:c,indices:k}}function PPe(e,t){if(!t.normal&&!t.tangent&&!t.bitangent&&!t.st)return e;let n=e.position.values,i,o;(t.normal||t.bitangent)&&(i=e.normal.values,o=e.bitangent.values);let r=e.position.values.length/18,s=r*3,a=r*2,c=s*2,u;if(t.normal||t.bitangent||t.tangent){let f=t.normal?new Float32Array(s*6):void 0,d=t.tangent?new Float32Array(s*6):void 0,p=t.bitangent?new Float32Array(s*6):void 0,_=iQ,m=oQ,x=zI,C=HI,A=DPe,T=rQ,b=c;for(u=0;u<s;u+=3){let S=b+c;_=h.fromArray(n,u,_),m=h.fromArray(n,u+s,m),x=h.fromArray(n,(u+3)%s,x),m=h.subtract(m,_,m),x=h.subtract(x,_,x),C=h.normalize(h.cross(m,x,C),C),t.normal&&(Ni.addAttribute(f,C,S),Ni.addAttribute(f,C,S+3),Ni.addAttribute(f,C,b),Ni.addAttribute(f,C,b+3)),(t.tangent||t.bitangent)&&(T=h.fromArray(i,u,T),t.bitangent&&(Ni.addAttribute(p,T,S),Ni.addAttribute(p,T,S+3),Ni.addAttribute(p,T,b),Ni.addAttribute(p,T,b+3)),t.tangent&&(A=h.normalize(h.cross(T,C,A),A),Ni.addAttribute(d,A,S),Ni.addAttribute(d,A,S+3),Ni.addAttribute(d,A,b),Ni.addAttribute(d,A,b+3))),b+=6}if(t.normal){for(f.set(i),u=0;u<s;u+=3)f[u+s]=-i[u],f[u+s+1]=-i[u+1],f[u+s+2]=-i[u+2];e.normal.values=f}else e.normal=void 0;if(t.bitangent?(p.set(o),p.set(o,s),e.bitangent.values=p):e.bitangent=void 0,t.tangent){let S=e.tangent.values;d.set(S),d.set(S,s),e.tangent.values=d}}if(t.st){let f=e.st.values,d=new Float32Array(a*6);d.set(f),d.set(f,a);let p=a*2;for(let _=0;_<2;_++){for(d[p++]=f[0],d[p++]=f[1],u=2;u<a;u+=2){let m=f[u],x=f[u+1];d[p++]=m,d[p++]=x,d[p++]=m,d[p++]=x}d[p++]=f[0],d[p++]=f[1]}e.st.values=d}return e}function D5(e,t,n){n[t++]=e[0],n[t++]=e[1],n[t++]=e[2];for(let i=3;i<e.length;i+=3){let o=e[i],r=e[i+1],s=e[i+2];n[t++]=o,n[t++]=r,n[t++]=s,n[t++]=o,n[t++]=r,n[t++]=s}return n[t++]=e[0],n[t++]=e[1],n[t++]=e[2],n}function IPe(e,t){let n=new Pe({position:t.position,normal:t.normal||t.bitangent||e.shadowVolume,tangent:t.tangent,bitangent:t.normal||t.bitangent,st:t.st}),i=e.ellipsoid,o=Ni.computePositions(e),r=aQ(o,n,i),s=e.height,a=e.extrudedHeight,c=r.attributes,u=r.indices,f=c.position.values,d=f.length,p=new Float64Array(d*6),_=new Float64Array(d);_.set(f);let m=new Float64Array(d*4);f=ti.scaleToGeodeticHeight(f,s,i),m=D5(f,0,m),_=ti.scaleToGeodeticHeight(_,a,i),m=D5(_,d*2,m),p.set(f),p.set(_,d),p.set(m,d*2),c.position.values=p,c=PPe(c,t);let x,C=d/3;if(e.shadowVolume){let L=c.normal.values;d=L.length;let N=new Float32Array(d*6);for(x=0;x<d;x++)L[x]=-L[x];N.set(L,d),N=D5(L,d*4,N),c.extrudeDirection=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:N}),t.normal||(c.normal=void 0)}if(l(e.offsetAttribute)){let L=new Uint8Array(C*6);if(e.offsetAttribute===tn.TOP)L=L.fill(1,0,C).fill(1,C*2,C*4);else{let N=e.offsetAttribute===tn.NONE?0:1;L=L.fill(N)}c.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:L})}let A=u.length,T=C+C,b=Ne.createTypedArray(p.length/3,A*2+T*3);b.set(u);let S=A;for(x=0;x<A;x+=3){let L=u[x],N=u[x+1],g=u[x+2];b[S++]=g+C,b[S++]=N+C,b[S++]=L+C}let w,D,O,I;for(x=0;x<T;x+=2)w=x+T,D=w+T,O=w+1,I=D+1,b[S++]=w,b[S++]=D,b[S++]=O,b[S++]=O,b[S++]=D,b[S++]=I;return{attributes:c,indices:b}}var tQ=new h,FS=new h,ku=new me;function nQ(e,t,n,i,o,r){let s=h.subtract(t,e,tQ);h.normalize(s,s);let a=n.geodeticSurfaceNormal(e,FS),c=h.cross(s,a,tQ);h.multiplyByScalar(c,i,c);let u=o.latitude,f=o.longitude,d=r.latitude,p=r.longitude;h.add(e,c,FS),n.cartesianToCartographic(FS,ku);let _=ku.latitude,m=ku.longitude;u=Math.min(u,_),f=Math.min(f,m),d=Math.max(d,_),p=Math.max(p,m),h.subtract(e,c,FS),n.cartesianToCartographic(FS,ku),_=ku.latitude,m=ku.longitude,u=Math.min(u,_),f=Math.min(f,m),d=Math.max(d,_),p=Math.max(p,m),o.latitude=u,o.longitude=f,r.latitude=d,r.longitude=p}var Vu=new h,VS=new h,al=new me,cl=new me;function cQ(e,t,n,i,o){e=sQ(e,t);let r=So(e,h.equalsEpsilon),s=r.length;if(s<2||n<=0)return new de;let a=n*.5;al.latitude=Number.POSITIVE_INFINITY,al.longitude=Number.POSITIVE_INFINITY,cl.latitude=Number.NEGATIVE_INFINITY,cl.longitude=Number.NEGATIVE_INFINITY;let c,u;if(i===Ii.ROUNDED){let p=r[0];h.subtract(p,r[1],Vu),h.normalize(Vu,Vu),h.multiplyByScalar(Vu,a,Vu),h.add(p,Vu,VS),t.cartesianToCartographic(VS,ku),c=ku.latitude,u=ku.longitude,al.latitude=Math.min(al.latitude,c),al.longitude=Math.min(al.longitude,u),cl.latitude=Math.max(cl.latitude,c),cl.longitude=Math.max(cl.longitude,u)}for(let p=0;p<s-1;++p)nQ(r[p],r[p+1],t,a,al,cl);let f=r[s-1];h.subtract(f,r[s-2],Vu),h.normalize(Vu,Vu),h.multiplyByScalar(Vu,a,Vu),h.add(f,Vu,VS),nQ(f,VS,t,a,al,cl),i===Ii.ROUNDED&&(t.cartesianToCartographic(VS,ku),c=ku.latitude,u=ku.longitude,al.latitude=Math.min(al.latitude,c),al.longitude=Math.min(al.longitude,u),cl.latitude=Math.max(cl.latitude,c),cl.longitude=Math.max(cl.longitude,u));let d=l(o)?o:new de;return d.north=cl.latitude,d.south=al.latitude,d.east=cl.longitude,d.west=al.longitude,d}function Qm(e){e=y(e,y.EMPTY_OBJECT);let t=e.positions,n=e.width,i=y(e.height,0),o=y(e.extrudedHeight,i);this._positions=t,this._ellipsoid=re.clone(y(e.ellipsoid,re.WGS84)),this._vertexFormat=Pe.clone(y(e.vertexFormat,Pe.DEFAULT)),this._width=n,this._height=Math.max(i,o),this._extrudedHeight=Math.min(i,o),this._cornerType=y(e.cornerType,Ii.ROUNDED),this._granularity=y(e.granularity,R.RADIANS_PER_DEGREE),this._shadowVolume=y(e.shadowVolume,!1),this._workerName="createCorridorGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this.packedLength=1+t.length*h.packedLength+re.packedLength+Pe.packedLength+7}Qm.pack=function(e,t,n){n=y(n,0);let i=e._positions,o=i.length;t[n++]=o;for(let r=0;r<o;++r,n+=h.packedLength)h.pack(i[r],t,n);return re.pack(e._ellipsoid,t,n),n+=re.packedLength,Pe.pack(e._vertexFormat,t,n),n+=Pe.packedLength,t[n++]=e._width,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._cornerType,t[n++]=e._granularity,t[n++]=e._shadowVolume?1:0,t[n]=y(e._offsetAttribute,-1),t};var lQ=re.clone(re.UNIT_SPHERE),uQ=new Pe,Jm={positions:void 0,ellipsoid:lQ,vertexFormat:uQ,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,shadowVolume:void 0,offsetAttribute:void 0};Qm.unpack=function(e,t,n){t=y(t,0);let i=e[t++],o=new Array(i);for(let m=0;m<i;++m,t+=h.packedLength)o[m]=h.unpack(e,t);let r=re.unpack(e,t,lQ);t+=re.packedLength;let s=Pe.unpack(e,t,uQ);t+=Pe.packedLength;let a=e[t++],c=e[t++],u=e[t++],f=e[t++],d=e[t++],p=e[t++]===1,_=e[t];return l(n)?(n._positions=o,n._ellipsoid=re.clone(r,n._ellipsoid),n._vertexFormat=Pe.clone(s,n._vertexFormat),n._width=a,n._height=c,n._extrudedHeight=u,n._cornerType=f,n._granularity=d,n._shadowVolume=p,n._offsetAttribute=_===-1?void 0:_,n):(Jm.positions=o,Jm.width=a,Jm.height=c,Jm.extrudedHeight=u,Jm.cornerType=f,Jm.granularity=d,Jm.shadowVolume=p,Jm.offsetAttribute=_===-1?void 0:_,new Qm(Jm))};Qm.computeRectangle=function(e,t){e=y(e,y.EMPTY_OBJECT);let n=e.positions,i=e.width,o=y(e.ellipsoid,re.WGS84),r=y(e.cornerType,Ii.ROUNDED);return cQ(n,o,i,r,t)};Qm.createGeometry=function(e){let t=e._positions,n=e._width,i=e._ellipsoid;t=sQ(t,i);let o=So(t,h.equalsEpsilon);if(o.length<2||n<=0)return;let r=e._height,s=e._extrudedHeight,a=!R.equalsEpsilon(r,s,0,R.EPSILON2),c=e._vertexFormat,u={ellipsoid:i,positions:o,width:n,cornerType:e._cornerType,granularity:e._granularity,saveAttributes:!0},f;if(a)u.height=r,u.extrudedHeight=s,u.shadowVolume=e._shadowVolume,u.offsetAttribute=e._offsetAttribute,f=IPe(u,c);else{let _=Ni.computePositions(u);if(f=aQ(_,c,i),f.attributes.position.values=ti.scaleToGeodeticHeight(f.attributes.position.values,r,i),l(e._offsetAttribute)){let m=e._offsetAttribute===tn.NONE?0:1,x=f.attributes.position.values.length,C=new Uint8Array(x/3).fill(m);f.attributes.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:C})}}let d=f.attributes,p=oe.fromVertices(d.position.values,void 0,3);return c.position||(f.attributes.position.values=void 0),new ct({attributes:d,indices:f.indices,primitiveType:Le.TRIANGLES,boundingSphere:p,offsetAttribute:e._offsetAttribute})};Qm.createShadowVolume=function(e,t,n){let i=e._granularity,o=e._ellipsoid,r=t(i,o),s=n(i,o);return new Qm({positions:e._positions,width:e._width,cornerType:e._cornerType,ellipsoid:o,granularity:i,extrudedHeight:r,height:s,vertexFormat:Pe.POSITION_ONLY,shadowVolume:!0})};Object.defineProperties(Qm.prototype,{rectangle:{get:function(){return l(this._rectangle)||(this._rectangle=cQ(this._positions,this._ellipsoid,this._width,this._cornerType)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return[0,0,0,1,1,0]}}});var BA=Qm;var fQ=new h,dQ=new h,OPe=new h;function RPe(e,t){for(let n=0;n<e.length;n++)e[n]=t.scaleToGeodeticSurface(e[n],e[n]);return e}function hQ(e,t){let n=[],i=e.positions,o=e.corners,r=e.endPositions,s=new ln,a,c=0,u=0,f,d=0,p;for(f=0;f<i.length;f+=2)p=i[f].length-3,c+=p,d+=p/3*4,u+=i[f+1].length-3;for(c+=3,u+=3,f=0;f<o.length;f++){a=o[f];let M=o[f].leftPositions;l(M)?(p=M.length,c+=p,d+=p/3*2):(p=o[f].rightPositions.length,u+=p,d+=p/3*2)}let _=l(r),m;_&&(m=r[0].length-3,c+=m,u+=m,m/=3,d+=m*4);let x=c+u,C=new Float64Array(x),A=0,T=x-1,b,S,w,D,O,I,L=m/2,N=Ne.createTypedArray(x/3,d+4),g=0;if(N[g++]=A/3,N[g++]=(T-2)/3,_){n.push(A/3),I=fQ,O=dQ;let M=r[0];for(f=0;f<L;f++)I=h.fromArray(M,(L-1-f)*3,I),O=h.fromArray(M,(L+f)*3,O),Ni.addAttribute(C,O,A),Ni.addAttribute(C,I,void 0,T),S=A/3,D=S+1,b=(T-2)/3,w=b-1,N[g++]=b,N[g++]=w,N[g++]=S,N[g++]=D,A+=3,T-=3}let E=0,v=i[E++],P=i[E++];for(C.set(v,A),C.set(P,T-P.length+1),p=P.length-3,n.push(A/3,(T-2)/3),f=0;f<p;f+=3)S=A/3,D=S+1,b=(T-2)/3,w=b-1,N[g++]=b,N[g++]=w,N[g++]=S,N[g++]=D,A+=3,T-=3;for(f=0;f<o.length;f++){let M;a=o[f];let V=a.leftPositions,U=a.rightPositions,k,H=OPe;if(l(V)){for(T-=3,k=w,n.push(D),M=0;M<V.length/3;M++)H=h.fromArray(V,M*3,H),N[g++]=k-M-1,N[g++]=k-M,Ni.addAttribute(C,H,void 0,T),T-=3;n.push(k-Math.floor(V.length/6)),t===Ii.BEVELED&&n.push((T-2)/3+1),A+=3}else{for(A+=3,k=D,n.push(w),M=0;M<U.length/3;M++)H=h.fromArray(U,M*3,H),N[g++]=k+M,N[g++]=k+M+1,Ni.addAttribute(C,H,A),A+=3;n.push(k+Math.floor(U.length/6)),t===Ii.BEVELED&&n.push(A/3-1),T-=3}for(v=i[E++],P=i[E++],v.splice(0,3),P.splice(P.length-3,3),C.set(v,A),C.set(P,T-P.length+1),p=P.length-3,M=0;M<P.length;M+=3)D=A/3,S=D-1,w=(T-2)/3,b=w+1,N[g++]=b,N[g++]=w,N[g++]=S,N[g++]=D,A+=3,T-=3;A-=3,T+=3,n.push(A/3,(T-2)/3)}if(_){A+=3,T-=3,I=fQ,O=dQ;let M=r[1];for(f=0;f<L;f++)I=h.fromArray(M,(m-f-1)*3,I),O=h.fromArray(M,f*3,O),Ni.addAttribute(C,I,void 0,T),Ni.addAttribute(C,O,A),D=A/3,S=D-1,w=(T-2)/3,b=w+1,N[g++]=b,N[g++]=w,N[g++]=S,N[g++]=D,A+=3,T-=3;n.push(A/3)}else n.push(A/3,(T-2)/3);return N[g++]=A/3,N[g++]=(T-2)/3,s.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:C}),{attributes:s,indices:N,wallIndices:n}}function MPe(e){let t=e.ellipsoid,n=Ni.computePositions(e),i=hQ(n,e.cornerType),o=i.wallIndices,r=e.height,s=e.extrudedHeight,a=i.attributes,c=i.indices,u=a.position.values,f=u.length,d=new Float64Array(f);d.set(u);let p=new Float64Array(f*2);if(u=ti.scaleToGeodeticHeight(u,r,t),d=ti.scaleToGeodeticHeight(d,s,t),p.set(u),p.set(d,f),a.position.values=p,f/=3,l(e.offsetAttribute)){let b=new Uint8Array(f*2);if(e.offsetAttribute===tn.TOP)b=b.fill(1,0,f);else{let S=e.offsetAttribute===tn.NONE?0:1;b=b.fill(S)}a.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:b})}let _,m=c.length,x=Ne.createTypedArray(p.length/3,(m+o.length)*2);x.set(c);let C=m;for(_=0;_<m;_+=2){let b=c[_],S=c[_+1];x[C++]=b+f,x[C++]=S+f}let A,T;for(_=0;_<o.length;_++)A=o[_],T=A+f,x[C++]=A,x[C++]=T;return{attributes:a,indices:x}}function kS(e){e=y(e,y.EMPTY_OBJECT);let t=e.positions,n=e.width,i=y(e.height,0),o=y(e.extrudedHeight,i);this._positions=t,this._ellipsoid=re.clone(y(e.ellipsoid,re.WGS84)),this._width=n,this._height=Math.max(i,o),this._extrudedHeight=Math.min(i,o),this._cornerType=y(e.cornerType,Ii.ROUNDED),this._granularity=y(e.granularity,R.RADIANS_PER_DEGREE),this._offsetAttribute=e.offsetAttribute,this._workerName="createCorridorOutlineGeometry",this.packedLength=1+t.length*h.packedLength+re.packedLength+6}kS.pack=function(e,t,n){n=y(n,0);let i=e._positions,o=i.length;t[n++]=o;for(let r=0;r<o;++r,n+=h.packedLength)h.pack(i[r],t,n);return re.pack(e._ellipsoid,t,n),n+=re.packedLength,t[n++]=e._width,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._cornerType,t[n++]=e._granularity,t[n]=y(e._offsetAttribute,-1),t};var mQ=re.clone(re.UNIT_SPHERE),U_={positions:void 0,ellipsoid:mQ,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,offsetAttribute:void 0};kS.unpack=function(e,t,n){t=y(t,0);let i=e[t++],o=new Array(i);for(let p=0;p<i;++p,t+=h.packedLength)o[p]=h.unpack(e,t);let r=re.unpack(e,t,mQ);t+=re.packedLength;let s=e[t++],a=e[t++],c=e[t++],u=e[t++],f=e[t++],d=e[t];return l(n)?(n._positions=o,n._ellipsoid=re.clone(r,n._ellipsoid),n._width=s,n._height=a,n._extrudedHeight=c,n._cornerType=u,n._granularity=f,n._offsetAttribute=d===-1?void 0:d,n):(U_.positions=o,U_.width=s,U_.height=a,U_.extrudedHeight=c,U_.cornerType=u,U_.granularity=f,U_.offsetAttribute=d===-1?void 0:d,new kS(U_))};kS.createGeometry=function(e){let t=e._positions,n=e._width,i=e._ellipsoid;t=RPe(t,i);let o=So(t,h.equalsEpsilon);if(o.length<2||n<=0)return;let r=e._height,s=e._extrudedHeight,a=!R.equalsEpsilon(r,s,0,R.EPSILON2),c={ellipsoid:i,positions:o,width:n,cornerType:e._cornerType,granularity:e._granularity,saveAttributes:!1},u;if(a)c.height=r,c.extrudedHeight=s,c.offsetAttribute=e._offsetAttribute,u=MPe(c);else{let p=Ni.computePositions(c);if(u=hQ(p,c.cornerType),u.attributes.position.values=ti.scaleToGeodeticHeight(u.attributes.position.values,r,i),l(e._offsetAttribute)){let _=u.attributes.position.values.length,m=e._offsetAttribute===tn.NONE?0:1,x=new Uint8Array(_/3).fill(m);u.attributes.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:x})}}let f=u.attributes,d=oe.fromVertices(f.position.values,void 0,3);return new ct({attributes:f,indices:u.indices,primitiveType:Le.LINES,boundingSphere:d,offsetAttribute:e._offsetAttribute})};var GI=kS;function BPe(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}var Mn=BPe;var P5,pQ="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIyNDBiMjBhOS1jZWE5LTRmYWYtOGI3Yy05ZDg3ODBiZDZiZjUiLCJpZCI6MjU5LCJpYXQiOjE2NTkzNjE0MTJ9.tXPPvw93XpCGHG71h7s_mMLlWGCuAL55o8LC309hLAg",WI={};WI.defaultAccessToken=pQ;WI.defaultServer=new De({url:"https://api.cesium.com/"});WI.getDefaultTokenCredit=function(e){if(e===pQ){if(!l(P5)){let t=`<b> This application is using Cesium's default ion access token. Please assign <i>Cesium.Ion.defaultAccessToken</i> with an access token from your ion account before making any Cesium API calls. You can sign up for a free ion account at <a href="https://cesium.com">https://cesium.com</a>.</b>`;P5=new Ht(t,!0)}return P5}};var wh=WI;function Cc(e,t){let n,i=e.externalType,o=l(i);if(!o)n={url:e.url,retryAttempts:1,retryCallback:LPe};else if(i==="3DTILES"||i==="STK_TERRAIN_SERVER")n={url:e.options.url};else throw new fe("Ion.createResource does not support external imagery assets; use IonImageryProvider instead.");De.call(this,n),this._ionEndpoint=e,this._ionEndpointDomain=o?void 0:new ei.default(e.url).authority(),this._ionEndpointResource=t,this._ionRoot=void 0,this._pendingPromise=void 0,this._credits=void 0,this._isExternal=o}l(Object.create)&&(Cc.prototype=Object.create(De.prototype),Cc.prototype.constructor=Cc);Cc.fromAssetId=function(e,t){let n=Cc._createEndpointResource(e,t);return n.fetchJson().then(function(i){return new Cc(i,n)})};Object.defineProperties(Cc.prototype,{credits:{get:function(){return l(this._ionRoot)?this._ionRoot.credits:l(this._credits)?this._credits:(this._credits=Cc.getCreditsFromEndpoint(this._ionEndpoint,this._ionEndpointResource),this._credits)}}});Cc.getCreditsFromEndpoint=function(e,t){let n=e.attributions.map(Ht.getIonCredit),i=wh.getDefaultTokenCredit(t.queryParameters.access_token);return l(i)&&n.push(Ht.clone(i)),n};Cc.prototype.clone=function(e){let t=y(this._ionRoot,this);return l(e)||(e=new Cc(t._ionEndpoint,t._ionEndpointResource)),e=De.prototype.clone.call(this,e),e._ionRoot=t,e._isExternal=this._isExternal,e};Cc.prototype.fetchImage=function(e){if(!this._isExternal){let t=e;e={preferBlob:!0},l(t)&&(e.flipY=t.flipY,e.preferImageBitmap=t.preferImageBitmap)}return De.prototype.fetchImage.call(this,e)};Cc.prototype._makeRequest=function(e){return this._isExternal||new ei.default(this.url).authority()!==this._ionEndpointDomain?De.prototype._makeRequest.call(this,e):(l(e.headers)||(e.headers={}),e.headers.Authorization=`Bearer ${this._ionEndpoint.accessToken}`,De.prototype._makeRequest.call(this,e))};Cc._createEndpointResource=function(e,t){t=y(t,y.EMPTY_OBJECT);let n=y(t.server,wh.defaultServer),i=y(t.accessToken,wh.defaultAccessToken);n=De.createIfNeeded(n);let o={url:`v1/assets/${e}/endpoint`};return l(i)&&(o.queryParameters={access_token:i}),n.getDerivedResource(o)};function LPe(e,t){let n=y(e._ionRoot,e),i=n._ionEndpointResource,o=typeof Image<"u";return!l(t)||t.statusCode!==401&&!(o&&t.target instanceof Image)?Promise.resolve(!1):(l(n._pendingPromise)||(n._pendingPromise=i.fetchJson().then(function(r){return n._ionEndpoint=r,r}).finally(function(r){return n._pendingPromise=void 0,r})),n._pendingPromise.then(function(r){return e._ionEndpoint=r,!0}))}var vh=Cc;function NPe(e){return e=y(e,y.EMPTY_OBJECT),new hI({url:vh.fromAssetId(1),requestVertexNormals:y(e.requestVertexNormals,!1),requestWaterMask:y(e.requestWaterMask,!1)})}var jI=NPe;function Uu(e){this.planes=y(e,[])}var US=[new h,new h,new h];h.clone(h.UNIT_X,US[0]);h.clone(h.UNIT_Y,US[1]);h.clone(h.UNIT_Z,US[2]);var z_=new h,FPe=new h,_Q=new rn(new h(1,0,0),0);Uu.fromBoundingSphere=function(e,t){l(t)||(t=new Uu);let n=US.length,i=t.planes;i.length=2*n;let o=e.center,r=e.radius,s=0;for(let a=0;a<n;++a){let c=US[a],u=i[s],f=i[s+1];l(u)||(u=i[s]=new se),l(f)||(f=i[s+1]=new se),h.multiplyByScalar(c,-r,z_),h.add(o,z_,z_),u.x=c.x,u.y=c.y,u.z=c.z,u.w=-h.dot(c,z_),h.multiplyByScalar(c,r,z_),h.add(o,z_,z_),f.x=-c.x,f.y=-c.y,f.z=-c.z,f.w=-h.dot(h.negate(c,FPe),z_),s+=2}return t};Uu.prototype.computeVisibility=function(e){let t=this.planes,n=!1;for(let i=0,o=t.length;i<o;++i){let r=e.intersectPlane(rn.fromCartesian4(t[i],_Q));if(r===Zt.OUTSIDE)return Zt.OUTSIDE;r===Zt.INTERSECTING&&(n=!0)}return n?Zt.INTERSECTING:Zt.INSIDE};Uu.prototype.computeVisibilityWithPlaneMask=function(e,t){if(t===Uu.MASK_OUTSIDE||t===Uu.MASK_INSIDE)return t;let n=Uu.MASK_INSIDE,i=this.planes;for(let o=0,r=i.length;o<r;++o){let s=o<31?1<<o:0;if(o<31&&(t&s)===0)continue;let a=e.intersectPlane(rn.fromCartesian4(i[o],_Q));if(a===Zt.OUTSIDE)return Uu.MASK_OUTSIDE;a===Zt.INTERSECTING&&(n|=s)}return n};Uu.MASK_OUTSIDE=4294967295;Uu.MASK_INSIDE=0;Uu.MASK_INDETERMINATE=2147483647;var da=Uu;function LA(e){e=y(e,y.EMPTY_OBJECT),this._callback=e.callback,this._tilingScheme=e.tilingScheme,l(this._tilingScheme)||(this._tilingScheme=new Xi({ellipsoid:y(e.ellipsoid,re.WGS84)})),this._width=e.width,this._height=e.height;let t=Math.max(this._width,this._height);this._levelZeroMaximumGeometricError=es.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,t,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._errorEvent=new _e;let n=e.credit;typeof n=="string"&&(n=new Ht(n)),this._credit=n,this._readyPromise=Promise.resolve(!0)}Object.defineProperties(LA.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}});LA.prototype.requestTileGeometry=function(e,t,n,i){let o=this._callback(e,t,n);if(!l(o))return;let r=this._width,s=this._height;return Promise.resolve(o).then(function(a){let c=a;return Array.isArray(c)&&(c=new Float64Array(c)),new ka({buffer:c,width:r,height:s})})};LA.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};LA.prototype.getTileDataAvailable=function(e,t,n){};LA.prototype.loadTileDataAvailability=function(e,t,n){};var gQ=LA;var yQ={};yQ.computePositions=function(e,t,n,i,o){let r=e*.5,s=-r,a=i+i,c=o?2*a:a,u=new Float64Array(c*3),f,d=0,p=0,_=o?a*3:0,m=o?(a+i)*3:i*3;for(f=0;f<i;f++){let x=f/i*R.TWO_PI,C=Math.cos(x),A=Math.sin(x),T=C*n,b=A*n,S=C*t,w=A*t;u[p+_]=T,u[p+_+1]=b,u[p+_+2]=s,u[p+m]=S,u[p+m+1]=w,u[p+m+2]=r,p+=3,o&&(u[d++]=T,u[d++]=b,u[d++]=s,u[d++]=S,u[d++]=w,u[d++]=r)}return u};var NA=yQ;var I5=new G,VPe=new h,kPe=new h,UPe=new h,zPe=new h;function ep(e){e=y(e,y.EMPTY_OBJECT);let t=e.length,n=e.topRadius,i=e.bottomRadius,o=y(e.vertexFormat,Pe.DEFAULT),r=y(e.slices,128);this._length=t,this._topRadius=n,this._bottomRadius=i,this._vertexFormat=Pe.clone(o),this._slices=r,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderGeometry"}ep.packedLength=Pe.packedLength+5;ep.pack=function(e,t,n){return n=y(n,0),Pe.pack(e._vertexFormat,t,n),n+=Pe.packedLength,t[n++]=e._length,t[n++]=e._topRadius,t[n++]=e._bottomRadius,t[n++]=e._slices,t[n]=y(e._offsetAttribute,-1),t};var xQ=new Pe,FA={vertexFormat:xQ,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0};ep.unpack=function(e,t,n){t=y(t,0);let i=Pe.unpack(e,t,xQ);t+=Pe.packedLength;let o=e[t++],r=e[t++],s=e[t++],a=e[t++],c=e[t];return l(n)?(n._vertexFormat=Pe.clone(i,n._vertexFormat),n._length=o,n._topRadius=r,n._bottomRadius=s,n._slices=a,n._offsetAttribute=c===-1?void 0:c,n):(FA.length=o,FA.topRadius=r,FA.bottomRadius=s,FA.slices=a,FA.offsetAttribute=c===-1?void 0:c,new ep(FA))};ep.createGeometry=function(e){let t=e._length,n=e._topRadius,i=e._bottomRadius,o=e._vertexFormat,r=e._slices;if(t<=0||n<0||i<0||n===0&&i===0)return;let s=r+r,a=r+s,c=s+s,u=NA.computePositions(t,n,i,r,!0),f=o.st?new Float32Array(c*2):void 0,d=o.normal?new Float32Array(c*3):void 0,p=o.tangent?new Float32Array(c*3):void 0,_=o.bitangent?new Float32Array(c*3):void 0,m,x=o.normal||o.tangent||o.bitangent;if(x){let O=o.tangent||o.bitangent,I=0,L=0,N=0,g=Math.atan2(i-n,t),E=VPe;E.z=Math.sin(g);let v=Math.cos(g),P=UPe,M=kPe;for(m=0;m<r;m++){let V=m/r*R.TWO_PI,U=v*Math.cos(V),k=v*Math.sin(V);x&&(E.x=U,E.y=k,O&&(P=h.normalize(h.cross(h.UNIT_Z,E,P),P)),o.normal&&(d[I++]=E.x,d[I++]=E.y,d[I++]=E.z,d[I++]=E.x,d[I++]=E.y,d[I++]=E.z),o.tangent&&(p[L++]=P.x,p[L++]=P.y,p[L++]=P.z,p[L++]=P.x,p[L++]=P.y,p[L++]=P.z),o.bitangent&&(M=h.normalize(h.cross(E,P,M),M),_[N++]=M.x,_[N++]=M.y,_[N++]=M.z,_[N++]=M.x,_[N++]=M.y,_[N++]=M.z))}for(m=0;m<r;m++)o.normal&&(d[I++]=0,d[I++]=0,d[I++]=-1),o.tangent&&(p[L++]=1,p[L++]=0,p[L++]=0),o.bitangent&&(_[N++]=0,_[N++]=-1,_[N++]=0);for(m=0;m<r;m++)o.normal&&(d[I++]=0,d[I++]=0,d[I++]=1),o.tangent&&(p[L++]=1,p[L++]=0,p[L++]=0),o.bitangent&&(_[N++]=0,_[N++]=1,_[N++]=0)}let C=12*r-12,A=Ne.createTypedArray(c,C),T=0,b=0;for(m=0;m<r-1;m++)A[T++]=b,A[T++]=b+2,A[T++]=b+3,A[T++]=b,A[T++]=b+3,A[T++]=b+1,b+=2;for(A[T++]=s-2,A[T++]=0,A[T++]=1,A[T++]=s-2,A[T++]=1,A[T++]=s-1,m=1;m<r-1;m++)A[T++]=s+m+1,A[T++]=s+m,A[T++]=s;for(m=1;m<r-1;m++)A[T++]=a,A[T++]=a+m,A[T++]=a+m+1;let S=0;if(o.st){let O=Math.max(n,i);for(m=0;m<c;m++){let I=h.fromArray(u,m*3,zPe);f[S++]=(I.x+O)/(2*O),f[S++]=(I.y+O)/(2*O)}}let w=new ln;o.position&&(w.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:u})),o.normal&&(w.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:d})),o.tangent&&(w.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:p})),o.bitangent&&(w.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:_})),o.st&&(w.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:f})),I5.x=t*.5,I5.y=Math.max(i,n);let D=new oe(h.ZERO,G.magnitude(I5));if(l(e._offsetAttribute)){t=u.length;let O=e._offsetAttribute===tn.NONE?0:1,I=new Uint8Array(t/3).fill(O);w.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:I})}return new ct({attributes:w,indices:A,primitiveType:Le.TRIANGLES,boundingSphere:D,offsetAttribute:e._offsetAttribute})};var O5;ep.getUnitCylinder=function(){return l(O5)||(O5=ep.createGeometry(new ep({topRadius:1,bottomRadius:1,length:1,vertexFormat:Pe.POSITION_ONLY}))),O5};var qI=ep;var R5=new G;function VA(e){e=y(e,y.EMPTY_OBJECT);let t=e.length,n=e.topRadius,i=e.bottomRadius,o=y(e.slices,128),r=Math.max(y(e.numberOfVerticalLines,16),0);this._length=t,this._topRadius=n,this._bottomRadius=i,this._slices=o,this._numberOfVerticalLines=r,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderOutlineGeometry"}VA.packedLength=6;VA.pack=function(e,t,n){return n=y(n,0),t[n++]=e._length,t[n++]=e._topRadius,t[n++]=e._bottomRadius,t[n++]=e._slices,t[n++]=e._numberOfVerticalLines,t[n]=y(e._offsetAttribute,-1),t};var Sy={length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};VA.unpack=function(e,t,n){t=y(t,0);let i=e[t++],o=e[t++],r=e[t++],s=e[t++],a=e[t++],c=e[t];return l(n)?(n._length=i,n._topRadius=o,n._bottomRadius=r,n._slices=s,n._numberOfVerticalLines=a,n._offsetAttribute=c===-1?void 0:c,n):(Sy.length=i,Sy.topRadius=o,Sy.bottomRadius=r,Sy.slices=s,Sy.numberOfVerticalLines=a,Sy.offsetAttribute=c===-1?void 0:c,new VA(Sy))};VA.createGeometry=function(e){let t=e._length,n=e._topRadius,i=e._bottomRadius,o=e._slices,r=e._numberOfVerticalLines;if(t<=0||n<0||i<0||n===0&&i===0)return;let s=o*2,a=NA.computePositions(t,n,i,o,!1),c=o*2,u;if(r>0){let x=Math.min(r,o);u=Math.round(o/x),c+=x}let f=Ne.createTypedArray(s,c*2),d=0,p;for(p=0;p<o-1;p++)f[d++]=p,f[d++]=p+1,f[d++]=p+o,f[d++]=p+1+o;if(f[d++]=o-1,f[d++]=0,f[d++]=o+o-1,f[d++]=o,r>0)for(p=0;p<o;p+=u)f[d++]=p,f[d++]=p+o;let _=new ln;_.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:a}),R5.x=t*.5,R5.y=Math.max(i,n);let m=new oe(h.ZERO,G.magnitude(R5));if(l(e._offsetAttribute)){t=a.length;let x=e._offsetAttribute===tn.NONE?0:1,C=new Uint8Array(t/3).fill(x);_.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:C})}return new ct({attributes:_,indices:f,primitiveType:Le.LINES,boundingSphere:m,offsetAttribute:e._offsetAttribute})};var YI=VA;var HPe=1953029805,GPe=2917034100;function M5(e,t){if(M5.passThroughDataForTesting)return t;let n=e.byteLength;if(n===0||n%4!==0)throw new fe("The length of key must be greater than 0 and a multiple of 4.");let i=new DataView(t),o=i.getUint32(0,!0);if(o===HPe||o===GPe)return t;let r=new DataView(e),s=0,a=t.byteLength,c=a-a%8,u=n,f,d=8;for(;s<c;)for(d=(d+8)%24,f=d;s<c&&f<u;)i.setUint32(s,i.getUint32(s,!0)^r.getUint32(f,!0),!0),i.setUint32(s+4,i.getUint32(s+4,!0)^r.getUint32(f+4,!0),!0),s+=8,f+=24;if(s<a)for(f>=u&&(d=(d+8)%24,f=d);s<a;)i.setUint8(s,i.getUint8(s)^r.getUint8(f)),s++,f++}M5.passThroughDataForTesting=!1;var XI=M5;var B5=32767,WPe=new me,jPe=new h;function qPe(e,t,n,i,o){let r=e.length/3,s=e.subarray(0,r),a=e.subarray(r,2*r),c=e.subarray(2*r,3*r);Pn.zigZagDeltaDecode(s,a,c);let u=new Float64Array(e.length);for(let f=0;f<r;++f){let d=s[f],p=a[f],_=c[f],m=R.lerp(t.west,t.east,d/B5),x=R.lerp(t.south,t.north,p/B5),C=R.lerp(n,i,_/B5),A=me.fromRadians(m,x,C,WPe),T=o.cartographicToCartesian(A,jPe);h.pack(T,u,f*3)}return u}var KI=qPe;function CQ(e){this.proxy=e}CQ.prototype.getURL=function(e){let t=this.proxy.indexOf("?")===-1?"?":"";return this.proxy+t+encodeURIComponent(e)};var AQ=CQ;function zl(e,t){e=y(e,0),this._near=e,t=y(t,Number.MAX_VALUE),this._far=t}Object.defineProperties(zl.prototype,{near:{get:function(){return this._near},set:function(e){this._near=e}},far:{get:function(){return this._far},set:function(e){this._far=e}}});zl.packedLength=2;zl.pack=function(e,t,n){return n=y(n,0),t[n++]=e.near,t[n]=e.far,t};zl.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new zl),n.near=e[t++],n.far=e[t],n};zl.equals=function(e,t){return e===t||l(e)&&l(t)&&e.near===t.near&&e.far===t.far};zl.clone=function(e,t){if(!!l(e))return l(t)||(t=new zl),t.near=e.near,t.far=e.far,t};zl.prototype.clone=function(e){return zl.clone(this,e)};zl.prototype.equals=function(e){return zl.equals(this,e)};var Tt=zl;function zS(e,t){e=y(e,0),t=y(t,Number.MAX_VALUE),this.value=new Float32Array([e,t])}Object.defineProperties(zS.prototype,{componentDatatype:{get:function(){return K.FLOAT}},componentsPerAttribute:{get:function(){return 2}},normalize:{get:function(){return!1}}});zS.fromDistanceDisplayCondition=function(e){return new zS(e.near,e.far)};zS.toValue=function(e,t){return l(t)?(t[0]=e.near,t[1]=e.far,t):new Float32Array([e.near,e.far])};var Fn=zS;function id(e){this._comparator=e.comparator,this._maximumLength=e.maximumLength,this._array=l(e.maximumLength)?new Array(e.maximumLength):[],this._length=0}Object.defineProperties(id.prototype,{length:{get:function(){return this._length}},maximumLength:{get:function(){return this._maximumLength},set:function(e){if(l(e)){for(;this._length>e;)this.removeMinimum();this._array.length=e}this._maximumLength=e}},internalArray:{get:function(){return this._array}},comparator:{get:function(){return this._comparator}}});id.prototype.clone=function(){let e=this._maximumLength,t=this._comparator,n=this._array,i=this._length,o=new id({comparator:t,maximumLength:e});o._length=i;for(let r=0;r<i;r++)o._array[r]=n[r];return o};id.prototype.reset=function(){this._length=0;let e=this._maximumLength;if(l(e))for(let t=0;t<e;t++)this._array[t]=void 0;else this._array.length=0};id.prototype.resort=function(){let e=this._length;for(let t=0;t<e;t++)TQ(this,t)};id.prototype.insert=function(e){let t,n=this._maximumLength;if(l(n)){if(n===0)return;if(this._length===n){let o=this._array[0];if(this._comparator(e,o)<=0)return e;t=this.removeMinimum()}}let i=this._length;return this._array[i]=e,this._length++,TQ(this,i),t};id.prototype.removeMinimum=function(){let e=this._length;if(e===0)return;this._length--;let t=this._array[0];return e>=2&&(this._array[0]=this._array[e-1],bQ(this,0)),this._array[e-1]=void 0,t};id.prototype.removeMaximum=function(){let e=this._length;if(e===0)return;this._length--;let t;if(e<=2)t=this._array[e-1];else{let n=L5(this,1,2)?1:2;t=this._array[n],this._array[n]=this._array[e-1],e>=4&&bQ(this,n)}return this._array[e-1]=void 0,t};id.prototype.getMinimum=function(){if(this._length!==0)return this._array[0]};id.prototype.getMaximum=function(){let e=this._length;if(e!==0)return e<=2?this._array[e-1]:this._array[L5(this,1,2)?1:2]};function $I(e,t,n){let i=e._array,o=i[t];i[t]=i[n],i[n]=o}function HS(e,t,n){return e._comparator(e._array[t],e._array[n])<0}function L5(e,t,n){return e._comparator(e._array[t],e._array[n])>0}function TQ(e,t){if(t===0)return;let n=Math.floor(R.log2(t+1))%2===0,i=Math.floor((t-1)/2),o=HS(e,t,i);for(o!==n&&($I(e,t,i),t=i);t>=3;){let r=Math.floor((t-3)/4);if(HS(e,t,r)!==o)break;$I(e,t,r),t=r}}function bQ(e,t){let n=e._length,i=Math.floor(R.log2(t+1))%2===0,o;for(;(o=2*t+1)<n;){let r=o,s=o+1;if(s<n){HS(e,s,r)===i&&(r=s);let a=2*o+1,c=Math.max(Math.min(n-a,4),0);for(let u=0;u<c;u++){let f=a+u;HS(e,f,r)===i&&(r=f)}}if(HS(e,r,t)===i&&($I(e,r,t),r!==o&&r!==s)){let a=Math.floor((r-1)/2);L5(e,r,a)===i&&$I(e,r,a)}t=r}}var EQ=id;function GS(){this.head=void 0,this.tail=void 0,this._length=0}Object.defineProperties(GS.prototype,{length:{get:function(){return this._length}}});function YPe(e,t,n){this.item=e,this.previous=t,this.next=n}GS.prototype.add=function(e){let t=new YPe(e,this.tail,void 0);return l(this.tail)?(this.tail.next=t,this.tail=t):(this.head=t,this.tail=t),++this._length,t};function SQ(e,t){l(t.previous)&&l(t.next)?(t.previous.next=t.next,t.next.previous=t.previous):l(t.previous)?(t.previous.next=void 0,e.tail=t.previous):l(t.next)?(t.next.previous=void 0,e.head=t.next):(e.head=void 0,e.tail=void 0),t.next=void 0,t.previous=void 0}GS.prototype.remove=function(e){!l(e)||(SQ(this,e),--this._length)};GS.prototype.splice=function(e,t){if(e===t)return;SQ(this,t);let n=e.next;e.next=t,this.tail===e?this.tail=t:n.previous=t,t.next=n,t.previous=e};var ZI=GS;var yi=Zc(wQ());var XPe={LINEAR_NONE:yi.default.Easing.Linear.None,QUADRATIC_IN:yi.default.Easing.Quadratic.In,QUADRATIC_OUT:yi.default.Easing.Quadratic.Out,QUADRATIC_IN_OUT:yi.default.Easing.Quadratic.InOut,CUBIC_IN:yi.default.Easing.Cubic.In,CUBIC_OUT:yi.default.Easing.Cubic.Out,CUBIC_IN_OUT:yi.default.Easing.Cubic.InOut,QUARTIC_IN:yi.default.Easing.Quartic.In,QUARTIC_OUT:yi.default.Easing.Quartic.Out,QUARTIC_IN_OUT:yi.default.Easing.Quartic.InOut,QUINTIC_IN:yi.default.Easing.Quintic.In,QUINTIC_OUT:yi.default.Easing.Quintic.Out,QUINTIC_IN_OUT:yi.default.Easing.Quintic.InOut,SINUSOIDAL_IN:yi.default.Easing.Sinusoidal.In,SINUSOIDAL_OUT:yi.default.Easing.Sinusoidal.Out,SINUSOIDAL_IN_OUT:yi.default.Easing.Sinusoidal.InOut,EXPONENTIAL_IN:yi.default.Easing.Exponential.In,EXPONENTIAL_OUT:yi.default.Easing.Exponential.Out,EXPONENTIAL_IN_OUT:yi.default.Easing.Exponential.InOut,CIRCULAR_IN:yi.default.Easing.Circular.In,CIRCULAR_OUT:yi.default.Easing.Circular.Out,CIRCULAR_IN_OUT:yi.default.Easing.Circular.InOut,ELASTIC_IN:yi.default.Easing.Elastic.In,ELASTIC_OUT:yi.default.Easing.Elastic.Out,ELASTIC_IN_OUT:yi.default.Easing.Elastic.InOut,BACK_IN:yi.default.Easing.Back.In,BACK_OUT:yi.default.Easing.Back.Out,BACK_IN_OUT:yi.default.Easing.Back.InOut,BOUNCE_IN:yi.default.Easing.Bounce.In,BOUNCE_OUT:yi.default.Easing.Bounce.Out,BOUNCE_IN_OUT:yi.default.Easing.Bounce.InOut},Hr=Object.freeze(XPe);var KPe=new h,$Pe=new h,ZPe=new h,JPe=new h,QPe=new h,eIe=new h(1,1,1),vQ=Math.cos,DQ=Math.sin;function tp(e){e=y(e,y.EMPTY_OBJECT);let t=y(e.radii,eIe),n=y(e.innerRadii,t),i=y(e.minimumClock,0),o=y(e.maximumClock,R.TWO_PI),r=y(e.minimumCone,0),s=y(e.maximumCone,R.PI),a=Math.round(y(e.stackPartitions,64)),c=Math.round(y(e.slicePartitions,64)),u=y(e.vertexFormat,Pe.DEFAULT);this._radii=h.clone(t),this._innerRadii=h.clone(n),this._minimumClock=i,this._maximumClock=o,this._minimumCone=r,this._maximumCone=s,this._stackPartitions=a,this._slicePartitions=c,this._vertexFormat=Pe.clone(u),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidGeometry"}tp.packedLength=2*h.packedLength+Pe.packedLength+7;tp.pack=function(e,t,n){return n=y(n,0),h.pack(e._radii,t,n),n+=h.packedLength,h.pack(e._innerRadii,t,n),n+=h.packedLength,Pe.pack(e._vertexFormat,t,n),n+=Pe.packedLength,t[n++]=e._minimumClock,t[n++]=e._maximumClock,t[n++]=e._minimumCone,t[n++]=e._maximumCone,t[n++]=e._stackPartitions,t[n++]=e._slicePartitions,t[n]=y(e._offsetAttribute,-1),t};var PQ=new h,IQ=new h,OQ=new Pe,H_={radii:PQ,innerRadii:IQ,vertexFormat:OQ,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,offsetAttribute:void 0};tp.unpack=function(e,t,n){t=y(t,0);let i=h.unpack(e,t,PQ);t+=h.packedLength;let o=h.unpack(e,t,IQ);t+=h.packedLength;let r=Pe.unpack(e,t,OQ);t+=Pe.packedLength;let s=e[t++],a=e[t++],c=e[t++],u=e[t++],f=e[t++],d=e[t++],p=e[t];return l(n)?(n._radii=h.clone(i,n._radii),n._innerRadii=h.clone(o,n._innerRadii),n._vertexFormat=Pe.clone(r,n._vertexFormat),n._minimumClock=s,n._maximumClock=a,n._minimumCone=c,n._maximumCone=u,n._stackPartitions=f,n._slicePartitions=d,n._offsetAttribute=p===-1?void 0:p,n):(H_.minimumClock=s,H_.maximumClock=a,H_.minimumCone=c,H_.maximumCone=u,H_.stackPartitions=f,H_.slicePartitions=d,H_.offsetAttribute=p===-1?void 0:p,new tp(H_))};tp.createGeometry=function(e){let t=e._radii;if(t.x<=0||t.y<=0||t.z<=0)return;let n=e._innerRadii;if(n.x<=0||n.y<=0||n.z<=0)return;let i=e._minimumClock,o=e._maximumClock,r=e._minimumCone,s=e._maximumCone,a=e._vertexFormat,c=e._slicePartitions+1,u=e._stackPartitions+1;c=Math.round(c*Math.abs(o-i)/R.TWO_PI),u=Math.round(u*Math.abs(s-r)/R.PI),c<2&&(c=2),u<2&&(u=2);let f,d,p=0,_=[r],m=[i];for(f=0;f<u;f++)_.push(r+f*(s-r)/(u-1));for(_.push(s),d=0;d<c;d++)m.push(i+d*(o-i)/(c-1));m.push(o);let x=_.length,C=m.length,A=0,T=1,b=n.x!==t.x||n.y!==t.y||n.z!==t.z,S=!1,w=!1,D=!1;b&&(T=2,r>0&&(S=!0,A+=c-1),s<Math.PI&&(w=!0,A+=c-1),(o-i)%R.TWO_PI?(D=!0,A+=(u-1)*2+1):A+=1);let O=C*x*T,I=new Float64Array(O*3),L=new Array(O).fill(!1),N=new Array(O).fill(!1),g=c*u*T,E=6*(g+A+1-(c+u)*T),v=Ne.createTypedArray(g,E),P=a.normal?new Float32Array(O*3):void 0,M=a.tangent?new Float32Array(O*3):void 0,V=a.bitangent?new Float32Array(O*3):void 0,U=a.st?new Float32Array(O*2):void 0,k=new Array(x),H=new Array(x);for(f=0;f<x;f++)k[f]=DQ(_[f]),H[f]=vQ(_[f]);let F=new Array(C),Y=new Array(C);for(d=0;d<C;d++)Y[d]=vQ(m[d]),F[d]=DQ(m[d]);for(f=0;f<x;f++)for(d=0;d<C;d++)I[p++]=t.x*k[f]*Y[d],I[p++]=t.y*k[f]*F[d],I[p++]=t.z*H[f];let j=O/2;if(b)for(f=0;f<x;f++)for(d=0;d<C;d++)I[p++]=n.x*k[f]*Y[d],I[p++]=n.y*k[f]*F[d],I[p++]=n.z*H[f],L[j]=!0,f>0&&f!==x-1&&d!==0&&d!==C-1&&(N[j]=!0),j++;p=0;let X,W;for(f=1;f<x-2;f++)for(X=f*C,W=(f+1)*C,d=1;d<C-2;d++)v[p++]=W+d,v[p++]=W+d+1,v[p++]=X+d+1,v[p++]=W+d,v[p++]=X+d+1,v[p++]=X+d;if(b){let Oe=x*C;for(f=1;f<x-2;f++)for(X=Oe+f*C,W=Oe+(f+1)*C,d=1;d<C-2;d++)v[p++]=W+d,v[p++]=X+d,v[p++]=X+d+1,v[p++]=W+d,v[p++]=X+d+1,v[p++]=W+d+1}let $,J;if(b){if(S)for(J=x*C,f=1;f<C-2;f++)v[p++]=f,v[p++]=f+1,v[p++]=J+f+1,v[p++]=f,v[p++]=J+f+1,v[p++]=J+f;if(w)for($=x*C-C,J=x*C*T-C,f=1;f<C-2;f++)v[p++]=$+f+1,v[p++]=$+f,v[p++]=J+f,v[p++]=$+f+1,v[p++]=J+f,v[p++]=J+f+1}if(D){for(f=1;f<x-2;f++)J=C*x+C*f,$=C*f,v[p++]=J,v[p++]=$+C,v[p++]=$,v[p++]=J,v[p++]=J+C,v[p++]=$+C;for(f=1;f<x-2;f++)J=C*x+C*(f+1)-1,$=C*(f+1)-1,v[p++]=$+C,v[p++]=J,v[p++]=$,v[p++]=$+C,v[p++]=J+C,v[p++]=J}let ce=new ln;a.position&&(ce.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:I}));let he=0,ie=0,ae=0,ge=0,Se=O/2,be,Be=re.fromCartesian3(t),Ae=re.fromCartesian3(n);if(a.st||a.normal||a.tangent||a.bitangent){for(f=0;f<O;f++){be=L[f]?Ae:Be;let Oe=h.fromArray(I,f*3,KPe),Ge=be.geodeticSurfaceNormal(Oe,$Pe);if(N[f]&&h.negate(Ge,Ge),a.st){let ot=G.negate(Ge,QPe);U[he++]=Math.atan2(ot.y,ot.x)/R.TWO_PI+.5,U[he++]=Math.asin(Ge.z)/Math.PI+.5}if(a.normal&&(P[ie++]=Ge.x,P[ie++]=Ge.y,P[ie++]=Ge.z),a.tangent||a.bitangent){let ot=ZPe,nt=0,Tn;if(L[f]&&(nt=Se),!S&&f>=nt&&f<nt+C*2?Tn=h.UNIT_X:Tn=h.UNIT_Z,h.cross(Tn,Ge,ot),h.normalize(ot,ot),a.tangent&&(M[ae++]=ot.x,M[ae++]=ot.y,M[ae++]=ot.z),a.bitangent){let Zn=h.cross(Ge,ot,JPe);h.normalize(Zn,Zn),V[ge++]=Zn.x,V[ge++]=Zn.y,V[ge++]=Zn.z}}}a.st&&(ce.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:U})),a.normal&&(ce.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:P})),a.tangent&&(ce.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:M})),a.bitangent&&(ce.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:V}))}if(l(e._offsetAttribute)){let Oe=I.length,Ge=e._offsetAttribute===tn.NONE?0:1,ot=new Uint8Array(Oe/3).fill(Ge);ce.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:ot})}return new ct({attributes:ce,indices:v,primitiveType:Le.TRIANGLES,boundingSphere:oe.fromEllipsoid(Be),offsetAttribute:e._offsetAttribute})};var V5;tp.getUnitEllipsoid=function(){return l(V5)||(V5=tp.createGeometry(new tp({radii:new h(1,1,1),vertexFormat:Pe.POSITION_ONLY}))),V5};var ks=tp;var tIe=new h(1,1,1),JI=Math.cos,QI=Math.sin;function kA(e){e=y(e,y.EMPTY_OBJECT);let t=y(e.radii,tIe),n=y(e.innerRadii,t),i=y(e.minimumClock,0),o=y(e.maximumClock,R.TWO_PI),r=y(e.minimumCone,0),s=y(e.maximumCone,R.PI),a=Math.round(y(e.stackPartitions,10)),c=Math.round(y(e.slicePartitions,8)),u=Math.round(y(e.subdivisions,128));this._radii=h.clone(t),this._innerRadii=h.clone(n),this._minimumClock=i,this._maximumClock=o,this._minimumCone=r,this._maximumCone=s,this._stackPartitions=a,this._slicePartitions=c,this._subdivisions=u,this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidOutlineGeometry"}kA.packedLength=2*h.packedLength+8;kA.pack=function(e,t,n){return n=y(n,0),h.pack(e._radii,t,n),n+=h.packedLength,h.pack(e._innerRadii,t,n),n+=h.packedLength,t[n++]=e._minimumClock,t[n++]=e._maximumClock,t[n++]=e._minimumCone,t[n++]=e._maximumCone,t[n++]=e._stackPartitions,t[n++]=e._slicePartitions,t[n++]=e._subdivisions,t[n]=y(e._offsetAttribute,-1),t};var RQ=new h,MQ=new h,np={radii:RQ,innerRadii:MQ,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0,offsetAttribute:void 0};kA.unpack=function(e,t,n){t=y(t,0);let i=h.unpack(e,t,RQ);t+=h.packedLength;let o=h.unpack(e,t,MQ);t+=h.packedLength;let r=e[t++],s=e[t++],a=e[t++],c=e[t++],u=e[t++],f=e[t++],d=e[t++],p=e[t];return l(n)?(n._radii=h.clone(i,n._radii),n._innerRadii=h.clone(o,n._innerRadii),n._minimumClock=r,n._maximumClock=s,n._minimumCone=a,n._maximumCone=c,n._stackPartitions=u,n._slicePartitions=f,n._subdivisions=d,n._offsetAttribute=p===-1?void 0:p,n):(np.minimumClock=r,np.maximumClock=s,np.minimumCone=a,np.maximumCone=c,np.stackPartitions=u,np.slicePartitions=f,np.subdivisions=d,np.offsetAttribute=p===-1?void 0:p,new kA(np))};kA.createGeometry=function(e){let t=e._radii;if(t.x<=0||t.y<=0||t.z<=0)return;let n=e._innerRadii;if(n.x<=0||n.y<=0||n.z<=0)return;let i=e._minimumClock,o=e._maximumClock,r=e._minimumCone,s=e._maximumCone,a=e._subdivisions,c=re.fromCartesian3(t),u=e._slicePartitions+1,f=e._stackPartitions+1;u=Math.round(u*Math.abs(o-i)/R.TWO_PI),f=Math.round(f*Math.abs(s-r)/R.PI),u<2&&(u=2),f<2&&(f=2);let d=0,p=1,_=n.x!==t.x||n.y!==t.y||n.z!==t.z,m=!1,x=!1;_&&(p=2,r>0&&(m=!0,d+=u),s<Math.PI&&(x=!0,d+=u));let C=a*p*(f+u),A=new Float64Array(C*3),T=2*(C+d-(u+f)*p),b=Ne.createTypedArray(C,T),S,w,D,O,I=0,L=new Array(f),N=new Array(f);for(S=0;S<f;S++)O=r+S*(s-r)/(f-1),L[S]=QI(O),N[S]=JI(O);let g=new Array(a),E=new Array(a);for(S=0;S<a;S++)D=i+S*(o-i)/(a-1),g[S]=QI(D),E[S]=JI(D);for(S=0;S<f;S++)for(w=0;w<a;w++)A[I++]=t.x*L[S]*E[w],A[I++]=t.y*L[S]*g[w],A[I++]=t.z*N[S];if(_)for(S=0;S<f;S++)for(w=0;w<a;w++)A[I++]=n.x*L[S]*E[w],A[I++]=n.y*L[S]*g[w],A[I++]=n.z*N[S];for(L.length=a,N.length=a,S=0;S<a;S++)O=r+S*(s-r)/(a-1),L[S]=QI(O),N[S]=JI(O);for(g.length=u,E.length=u,S=0;S<u;S++)D=i+S*(o-i)/(u-1),g[S]=QI(D),E[S]=JI(D);for(S=0;S<a;S++)for(w=0;w<u;w++)A[I++]=t.x*L[S]*E[w],A[I++]=t.y*L[S]*g[w],A[I++]=t.z*N[S];if(_)for(S=0;S<a;S++)for(w=0;w<u;w++)A[I++]=n.x*L[S]*E[w],A[I++]=n.y*L[S]*g[w],A[I++]=n.z*N[S];for(I=0,S=0;S<f*p;S++){let M=S*a;for(w=0;w<a-1;w++)b[I++]=M+w,b[I++]=M+w+1}let v=f*a*p;for(S=0;S<u;S++)for(w=0;w<a-1;w++)b[I++]=v+S+w*u,b[I++]=v+S+(w+1)*u;if(_)for(v=f*a*p+u*a,S=0;S<u;S++)for(w=0;w<a-1;w++)b[I++]=v+S+w*u,b[I++]=v+S+(w+1)*u;if(_){let M=f*a*p,V=M+a*u;if(m)for(S=0;S<u;S++)b[I++]=M+S,b[I++]=V+S;if(x)for(M+=a*u-u,V+=a*u-u,S=0;S<u;S++)b[I++]=M+S,b[I++]=V+S}let P=new ln({position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:A})});if(l(e._offsetAttribute)){let M=A.length,V=e._offsetAttribute===tn.NONE?0:1,U=new Uint8Array(M/3).fill(V);P.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:U})}return new ct({attributes:P,indices:b,primitiveType:Le.LINES,boundingSphere:oe.fromEllipsoid(c),offsetAttribute:e._offsetAttribute})};var zu=kA;function UA(e){e=y(e,y.EMPTY_OBJECT),this._tilingScheme=e.tilingScheme,l(this._tilingScheme)||(this._tilingScheme=new Xi({ellipsoid:y(e.ellipsoid,re.WGS84)})),this._levelZeroMaximumGeometricError=es.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,64,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._errorEvent=new _e,this._readyPromise=Promise.resolve(!0)}Object.defineProperties(UA.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}});UA.prototype.requestTileGeometry=function(e,t,n,i){return Promise.resolve(new ka({buffer:new Uint8Array(16*16),width:16,height:16}))};UA.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};UA.prototype.getTileDataAvailable=function(e,t,n){};UA.prototype.loadTileDataAvailability=function(e,t,n){};var G_=UA;function k5(){this._removalFunctions=[]}k5.prototype.add=function(e,t,n){let i=e.addEventListener(t,n);this._removalFunctions.push(i);let o=this;return function(){i();let r=o._removalFunctions;r.splice(r.indexOf(i),1)}};k5.prototype.removeAll=function(){let e=this._removalFunctions;for(let t=0,n=e.length;t<n;++t)e[t]();e.length=0};var Gr=k5;var nIe={enableModelExperimental:!1},zA=nIe;var iIe={NONE:0,HOLD:1,EXTRAPOLATE:2},Hu=Object.freeze(iIe);function Dh(e){e=y(e,y.EMPTY_OBJECT),this.left=e.left,this._left=void 0,this.right=e.right,this._right=void 0,this.top=e.top,this._top=void 0,this.bottom=e.bottom,this._bottom=void 0,this.near=y(e.near,1),this._near=this.near,this.far=y(e.far,5e8),this._far=this.far,this._cullingVolume=new da,this._orthographicMatrix=new B}function BQ(e){(e.top!==e._top||e.bottom!==e._bottom||e.left!==e._left||e.right!==e._right||e.near!==e._near||e.far!==e._far)&&(e._left=e.left,e._right=e.right,e._top=e.top,e._bottom=e.bottom,e._near=e.near,e._far=e.far,e._orthographicMatrix=B.computeOrthographicOffCenter(e.left,e.right,e.bottom,e.top,e.near,e.far,e._orthographicMatrix))}Object.defineProperties(Dh.prototype,{projectionMatrix:{get:function(){return BQ(this),this._orthographicMatrix}}});var oIe=new h,rIe=new h,sIe=new h,U5=new h;Dh.prototype.computeCullingVolume=function(e,t,n){let i=this._cullingVolume.planes,o=this.top,r=this.bottom,s=this.right,a=this.left,c=this.near,u=this.far,f=h.cross(t,n,oIe);h.normalize(f,f);let d=rIe;h.multiplyByScalar(t,c,d),h.add(e,d,d);let p=sIe;h.multiplyByScalar(f,a,p),h.add(d,p,p);let _=i[0];return l(_)||(_=i[0]=new se),_.x=f.x,_.y=f.y,_.z=f.z,_.w=-h.dot(f,p),h.multiplyByScalar(f,s,p),h.add(d,p,p),_=i[1],l(_)||(_=i[1]=new se),_.x=-f.x,_.y=-f.y,_.z=-f.z,_.w=-h.dot(h.negate(f,U5),p),h.multiplyByScalar(n,r,p),h.add(d,p,p),_=i[2],l(_)||(_=i[2]=new se),_.x=n.x,_.y=n.y,_.z=n.z,_.w=-h.dot(n,p),h.multiplyByScalar(n,o,p),h.add(d,p,p),_=i[3],l(_)||(_=i[3]=new se),_.x=-n.x,_.y=-n.y,_.z=-n.z,_.w=-h.dot(h.negate(n,U5),p),_=i[4],l(_)||(_=i[4]=new se),_.x=t.x,_.y=t.y,_.z=t.z,_.w=-h.dot(t,d),h.multiplyByScalar(t,u,p),h.add(e,p,p),_=i[5],l(_)||(_=i[5]=new se),_.x=-t.x,_.y=-t.y,_.z=-t.z,_.w=-h.dot(h.negate(t,U5),p),this._cullingVolume};Dh.prototype.getPixelDimensions=function(e,t,n,i,o){BQ(this);let r=this.right-this.left,s=this.top-this.bottom,a=i*r/e,c=i*s/t;return o.x=a,o.y=c,o};Dh.prototype.clone=function(e){return l(e)||(e=new Dh),e.left=this.left,e.right=this.right,e.top=this.top,e.bottom=this.bottom,e.near=this.near,e.far=this.far,e._left=void 0,e._right=void 0,e._top=void 0,e._bottom=void 0,e._near=void 0,e._far=void 0,e};Dh.prototype.equals=function(e){return l(e)&&e instanceof Dh&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far};Dh.prototype.equalsEpsilon=function(e,t,n){return e===this||l(e)&&e instanceof Dh&&R.equalsEpsilon(this.right,e.right,t,n)&&R.equalsEpsilon(this.left,e.left,t,n)&&R.equalsEpsilon(this.top,e.top,t,n)&&R.equalsEpsilon(this.bottom,e.bottom,t,n)&&R.equalsEpsilon(this.near,e.near,t,n)&&R.equalsEpsilon(this.far,e.far,t,n)};var Wr=Dh;function ll(e){e=y(e,y.EMPTY_OBJECT),this._offCenterFrustum=new Wr,this.width=e.width,this._width=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=y(e.near,1),this._near=this.near,this.far=y(e.far,5e8),this._far=this.far}ll.packedLength=4;ll.pack=function(e,t,n){return n=y(n,0),t[n++]=e.width,t[n++]=e.aspectRatio,t[n++]=e.near,t[n]=e.far,t};ll.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new ll),n.width=e[t++],n.aspectRatio=e[t++],n.near=e[t++],n.far=e[t],n};function wy(e){let t=e._offCenterFrustum;if(e.width!==e._width||e.aspectRatio!==e._aspectRatio||e.near!==e._near||e.far!==e._far){e._aspectRatio=e.aspectRatio,e._width=e.width,e._near=e.near,e._far=e.far;let n=1/e.aspectRatio;t.right=e.width*.5,t.left=-t.right,t.top=n*t.right,t.bottom=-t.top,t.near=e.near,t.far=e.far}}Object.defineProperties(ll.prototype,{projectionMatrix:{get:function(){return wy(this),this._offCenterFrustum.projectionMatrix}}});ll.prototype.computeCullingVolume=function(e,t,n){return wy(this),this._offCenterFrustum.computeCullingVolume(e,t,n)};ll.prototype.getPixelDimensions=function(e,t,n,i,o){return wy(this),this._offCenterFrustum.getPixelDimensions(e,t,n,i,o)};ll.prototype.clone=function(e){return l(e)||(e=new ll),e.aspectRatio=this.aspectRatio,e.width=this.width,e.near=this.near,e.far=this.far,e._aspectRatio=void 0,e._width=void 0,e._near=void 0,e._far=void 0,this._offCenterFrustum.clone(e._offCenterFrustum),e};ll.prototype.equals=function(e){return!l(e)||!(e instanceof ll)?!1:(wy(this),wy(e),this.width===e.width&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))};ll.prototype.equalsEpsilon=function(e,t,n){return!l(e)||!(e instanceof ll)?!1:(wy(this),wy(e),R.equalsEpsilon(this.width,e.width,t,n)&&R.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,n)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,n))};var Qt=ll;function Ph(e){e=y(e,y.EMPTY_OBJECT),this.left=e.left,this._left=void 0,this.right=e.right,this._right=void 0,this.top=e.top,this._top=void 0,this.bottom=e.bottom,this._bottom=void 0,this.near=y(e.near,1),this._near=this.near,this.far=y(e.far,5e8),this._far=this.far,this._cullingVolume=new da,this._perspectiveMatrix=new B,this._infinitePerspective=new B}function z5(e){let t=e.top,n=e.bottom,i=e.right,o=e.left,r=e.near,s=e.far;(t!==e._top||n!==e._bottom||o!==e._left||i!==e._right||r!==e._near||s!==e._far)&&(e._left=o,e._right=i,e._top=t,e._bottom=n,e._near=r,e._far=s,e._perspectiveMatrix=B.computePerspectiveOffCenter(o,i,n,t,r,s,e._perspectiveMatrix),e._infinitePerspective=B.computeInfinitePerspectiveOffCenter(o,i,n,t,r,e._infinitePerspective))}Object.defineProperties(Ph.prototype,{projectionMatrix:{get:function(){return z5(this),this._perspectiveMatrix}},infiniteProjectionMatrix:{get:function(){return z5(this),this._infinitePerspective}}});var aIe=new h,cIe=new h,lIe=new h,uIe=new h;Ph.prototype.computeCullingVolume=function(e,t,n){let i=this._cullingVolume.planes,o=this.top,r=this.bottom,s=this.right,a=this.left,c=this.near,u=this.far,f=h.cross(t,n,aIe),d=cIe;h.multiplyByScalar(t,c,d),h.add(e,d,d);let p=lIe;h.multiplyByScalar(t,u,p),h.add(e,p,p);let _=uIe;h.multiplyByScalar(f,a,_),h.add(d,_,_),h.subtract(_,e,_),h.normalize(_,_),h.cross(_,n,_),h.normalize(_,_);let m=i[0];return l(m)||(m=i[0]=new se),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-h.dot(_,e),h.multiplyByScalar(f,s,_),h.add(d,_,_),h.subtract(_,e,_),h.cross(n,_,_),h.normalize(_,_),m=i[1],l(m)||(m=i[1]=new se),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-h.dot(_,e),h.multiplyByScalar(n,r,_),h.add(d,_,_),h.subtract(_,e,_),h.cross(f,_,_),h.normalize(_,_),m=i[2],l(m)||(m=i[2]=new se),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-h.dot(_,e),h.multiplyByScalar(n,o,_),h.add(d,_,_),h.subtract(_,e,_),h.cross(_,f,_),h.normalize(_,_),m=i[3],l(m)||(m=i[3]=new se),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-h.dot(_,e),m=i[4],l(m)||(m=i[4]=new se),m.x=t.x,m.y=t.y,m.z=t.z,m.w=-h.dot(t,d),h.negate(t,_),m=i[5],l(m)||(m=i[5]=new se),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-h.dot(_,p),this._cullingVolume};Ph.prototype.getPixelDimensions=function(e,t,n,i,o){z5(this);let r=1/this.near,s=this.top*r,a=2*i*n*s/t;s=this.right*r;let c=2*i*n*s/e;return o.x=c,o.y=a,o};Ph.prototype.clone=function(e){return l(e)||(e=new Ph),e.right=this.right,e.left=this.left,e.top=this.top,e.bottom=this.bottom,e.near=this.near,e.far=this.far,e._left=void 0,e._right=void 0,e._top=void 0,e._bottom=void 0,e._near=void 0,e._far=void 0,e};Ph.prototype.equals=function(e){return l(e)&&e instanceof Ph&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far};Ph.prototype.equalsEpsilon=function(e,t,n){return e===this||l(e)&&e instanceof Ph&&R.equalsEpsilon(this.right,e.right,t,n)&&R.equalsEpsilon(this.left,e.left,t,n)&&R.equalsEpsilon(this.top,e.top,t,n)&&R.equalsEpsilon(this.bottom,e.bottom,t,n)&&R.equalsEpsilon(this.near,e.near,t,n)&&R.equalsEpsilon(this.far,e.far,t,n)};var ul=Ph;function fl(e){e=y(e,y.EMPTY_OBJECT),this._offCenterFrustum=new ul,this.fov=e.fov,this._fov=void 0,this._fovy=void 0,this._sseDenominator=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=y(e.near,1),this._near=this.near,this.far=y(e.far,5e8),this._far=this.far,this.xOffset=y(e.xOffset,0),this._xOffset=this.xOffset,this.yOffset=y(e.yOffset,0),this._yOffset=this.yOffset}fl.packedLength=6;fl.pack=function(e,t,n){return n=y(n,0),t[n++]=e.fov,t[n++]=e.aspectRatio,t[n++]=e.near,t[n++]=e.far,t[n++]=e.xOffset,t[n]=e.yOffset,t};fl.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new fl),n.fov=e[t++],n.aspectRatio=e[t++],n.near=e[t++],n.far=e[t++],n.xOffset=e[t++],n.yOffset=e[t],n};function Ih(e){let t=e._offCenterFrustum;(e.fov!==e._fov||e.aspectRatio!==e._aspectRatio||e.near!==e._near||e.far!==e._far||e.xOffset!==e._xOffset||e.yOffset!==e._yOffset)&&(e._aspectRatio=e.aspectRatio,e._fov=e.fov,e._fovy=e.aspectRatio<=1?e.fov:Math.atan(Math.tan(e.fov*.5)/e.aspectRatio)*2,e._near=e.near,e._far=e.far,e._sseDenominator=2*Math.tan(.5*e._fovy),e._xOffset=e.xOffset,e._yOffset=e.yOffset,t.top=e.near*Math.tan(.5*e._fovy),t.bottom=-t.top,t.right=e.aspectRatio*t.top,t.left=-t.right,t.near=e.near,t.far=e.far,t.right+=e.xOffset,t.left+=e.xOffset,t.top+=e.yOffset,t.bottom+=e.yOffset)}Object.defineProperties(fl.prototype,{projectionMatrix:{get:function(){return Ih(this),this._offCenterFrustum.projectionMatrix}},infiniteProjectionMatrix:{get:function(){return Ih(this),this._offCenterFrustum.infiniteProjectionMatrix}},fovy:{get:function(){return Ih(this),this._fovy}},sseDenominator:{get:function(){return Ih(this),this._sseDenominator}}});fl.prototype.computeCullingVolume=function(e,t,n){return Ih(this),this._offCenterFrustum.computeCullingVolume(e,t,n)};fl.prototype.getPixelDimensions=function(e,t,n,i,o){return Ih(this),this._offCenterFrustum.getPixelDimensions(e,t,n,i,o)};fl.prototype.clone=function(e){return l(e)||(e=new fl),e.aspectRatio=this.aspectRatio,e.fov=this.fov,e.near=this.near,e.far=this.far,e._aspectRatio=void 0,e._fov=void 0,e._near=void 0,e._far=void 0,this._offCenterFrustum.clone(e._offCenterFrustum),e};fl.prototype.equals=function(e){return!l(e)||!(e instanceof fl)?!1:(Ih(this),Ih(e),this.fov===e.fov&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))};fl.prototype.equalsEpsilon=function(e,t,n){return!l(e)||!(e instanceof fl)?!1:(Ih(this),Ih(e),R.equalsEpsilon(this.fov,e.fov,t,n)&&R.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,n)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,n))};var xi=fl;var eO=0,fIe=1;function vy(e){let t=e.frustum,n=e.orientation,i=e.origin,o=y(e.vertexFormat,Pe.DEFAULT),r=y(e._drawNearPlane,!0),s,a;t instanceof xi?(s=eO,a=xi.packedLength):t instanceof Qt&&(s=fIe,a=Qt.packedLength),this._frustumType=s,this._frustum=t.clone(),this._origin=h.clone(i),this._orientation=Me.clone(n),this._drawNearPlane=r,this._vertexFormat=o,this._workerName="createFrustumGeometry",this.packedLength=2+a+h.packedLength+Me.packedLength+Pe.packedLength}vy.pack=function(e,t,n){n=y(n,0);let i=e._frustumType,o=e._frustum;return t[n++]=i,i===eO?(xi.pack(o,t,n),n+=xi.packedLength):(Qt.pack(o,t,n),n+=Qt.packedLength),h.pack(e._origin,t,n),n+=h.packedLength,Me.pack(e._orientation,t,n),n+=Me.packedLength,Pe.pack(e._vertexFormat,t,n),n+=Pe.packedLength,t[n]=e._drawNearPlane?1:0,t};var dIe=new xi,hIe=new Qt,mIe=new Me,pIe=new h,_Ie=new Pe;vy.unpack=function(e,t,n){t=y(t,0);let i=e[t++],o;i===eO?(o=xi.unpack(e,t,dIe),t+=xi.packedLength):(o=Qt.unpack(e,t,hIe),t+=Qt.packedLength);let r=h.unpack(e,t,pIe);t+=h.packedLength;let s=Me.unpack(e,t,mIe);t+=Me.packedLength;let a=Pe.unpack(e,t,_Ie);t+=Pe.packedLength;let c=e[t]===1;if(!l(n))return new vy({frustum:o,origin:r,orientation:s,vertexFormat:a,_drawNearPlane:c});let u=i===n._frustumType?n._frustum:void 0;return n._frustum=o.clone(u),n._frustumType=i,n._origin=h.clone(r,n._origin),n._orientation=Me.clone(s,n._orientation),n._vertexFormat=Pe.clone(a,n._vertexFormat),n._drawNearPlane=c,n};function HA(e,t,n,i,o,r,s,a){let c=e/3*2;for(let u=0;u<4;++u)l(t)&&(t[e]=r.x,t[e+1]=r.y,t[e+2]=r.z),l(n)&&(n[e]=s.x,n[e+1]=s.y,n[e+2]=s.z),l(i)&&(i[e]=a.x,i[e+1]=a.y,i[e+2]=a.z),e+=3;o[c]=0,o[c+1]=0,o[c+2]=1,o[c+3]=0,o[c+4]=1,o[c+5]=1,o[c+6]=0,o[c+7]=1}var gIe=new Q,yIe=new B,H5=new B,LQ=new h,NQ=new h,FQ=new h,xIe=new h,CIe=new h,AIe=new h,W_=new Array(3),WS=new Array(4);WS[0]=new se(-1,-1,1,1);WS[1]=new se(1,-1,1,1);WS[2]=new se(1,1,1,1);WS[3]=new se(-1,1,1,1);var VQ=new Array(4);for(let e=0;e<4;++e)VQ[e]=new se;vy._computeNearFarPlanes=function(e,t,n,i,o,r,s,a){let c=Q.fromQuaternion(t,gIe),u=y(r,LQ),f=y(s,NQ),d=y(a,FQ);u=Q.getColumn(c,0,u),f=Q.getColumn(c,1,f),d=Q.getColumn(c,2,d),h.normalize(u,u),h.normalize(f,f),h.normalize(d,d),h.negate(u,u);let p=B.computeView(e,d,f,u,yIe),_,m;if(n===eO){let x=i.projectionMatrix,C=B.multiply(x,p,H5);m=B.inverse(C,H5)}else _=B.inverseTransformation(p,H5);l(m)?(W_[0]=i.near,W_[1]=i.far):(W_[0]=0,W_[1]=i.near,W_[2]=i.far);for(let x=0;x<2;++x)for(let C=0;C<4;++C){let A=se.clone(WS[C],VQ[C]);if(l(m)){A=B.multiplyByVector(m,A,A);let T=1/A.w;h.multiplyByScalar(A,T,A),h.subtract(A,e,A),h.normalize(A,A);let b=h.dot(d,A);h.multiplyByScalar(A,W_[x]/b,A),h.add(A,e,A)}else{l(i._offCenterFrustum)&&(i=i._offCenterFrustum);let T=W_[x],b=W_[x+1];A.x=(A.x*(i.right-i.left)+i.left+i.right)*.5,A.y=(A.y*(i.top-i.bottom)+i.bottom+i.top)*.5,A.z=(A.z*(T-b)-T-b)*.5,A.w=1,B.multiplyByVector(_,A,A)}o[12*x+C*3]=A.x,o[12*x+C*3+1]=A.y,o[12*x+C*3+2]=A.z}};vy.createGeometry=function(e){let t=e._frustumType,n=e._frustum,i=e._origin,o=e._orientation,r=e._drawNearPlane,s=e._vertexFormat,a=r?6:5,c=new Float64Array(3*4*6);vy._computeNearFarPlanes(i,o,t,n,c);let u=3*4*2;c[u]=c[3*4],c[u+1]=c[3*4+1],c[u+2]=c[3*4+2],c[u+3]=c[0],c[u+4]=c[1],c[u+5]=c[2],c[u+6]=c[3*3],c[u+7]=c[3*3+1],c[u+8]=c[3*3+2],c[u+9]=c[3*7],c[u+10]=c[3*7+1],c[u+11]=c[3*7+2],u+=3*4,c[u]=c[3*5],c[u+1]=c[3*5+1],c[u+2]=c[3*5+2],c[u+3]=c[3],c[u+4]=c[3+1],c[u+5]=c[3+2],c[u+6]=c[0],c[u+7]=c[1],c[u+8]=c[2],c[u+9]=c[3*4],c[u+10]=c[3*4+1],c[u+11]=c[3*4+2],u+=3*4,c[u]=c[3],c[u+1]=c[3+1],c[u+2]=c[3+2],c[u+3]=c[3*5],c[u+4]=c[3*5+1],c[u+5]=c[3*5+2],c[u+6]=c[3*6],c[u+7]=c[3*6+1],c[u+8]=c[3*6+2],c[u+9]=c[3*2],c[u+10]=c[3*2+1],c[u+11]=c[3*2+2],u+=3*4,c[u]=c[3*2],c[u+1]=c[3*2+1],c[u+2]=c[3*2+2],c[u+3]=c[3*6],c[u+4]=c[3*6+1],c[u+5]=c[3*6+2],c[u+6]=c[3*7],c[u+7]=c[3*7+1],c[u+8]=c[3*7+2],c[u+9]=c[3*3],c[u+10]=c[3*3+1],c[u+11]=c[3*3+2],r||(c=c.subarray(3*4));let f=new ln({position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:c})});if(l(s.normal)||l(s.tangent)||l(s.bitangent)||l(s.st)){let p=l(s.normal)?new Float32Array(12*a):void 0,_=l(s.tangent)?new Float32Array(3*4*a):void 0,m=l(s.bitangent)?new Float32Array(3*4*a):void 0,x=l(s.st)?new Float32Array(2*4*a):void 0,C=LQ,A=NQ,T=FQ,b=h.negate(C,xIe),S=h.negate(A,CIe),w=h.negate(T,AIe);u=0,r&&(HA(u,p,_,m,x,w,C,A),u+=3*4),HA(u,p,_,m,x,T,b,A),u+=3*4,HA(u,p,_,m,x,b,w,A),u+=3*4,HA(u,p,_,m,x,S,w,b),u+=3*4,HA(u,p,_,m,x,C,T,A),u+=3*4,HA(u,p,_,m,x,A,T,b),l(p)&&(f.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:p})),l(_)&&(f.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:_})),l(m)&&(f.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:m})),l(x)&&(f.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:x}))}let d=new Uint16Array(6*a);for(let p=0;p<a;++p){let _=p*6,m=p*4;d[_]=m,d[_+1]=m+1,d[_+2]=m+2,d[_+3]=m,d[_+4]=m+2,d[_+5]=m+3}return new ct({attributes:f,indices:d,primitiveType:Le.TRIANGLES,boundingSphere:oe.fromVertices(c)})};var GA=vy;var G5=0,TIe=1;function jS(e){let t=e.frustum,n=e.orientation,i=e.origin,o=y(e._drawNearPlane,!0),r,s;t instanceof xi?(r=G5,s=xi.packedLength):t instanceof Qt&&(r=TIe,s=Qt.packedLength),this._frustumType=r,this._frustum=t.clone(),this._origin=h.clone(i),this._orientation=Me.clone(n),this._drawNearPlane=o,this._workerName="createFrustumOutlineGeometry",this.packedLength=2+s+h.packedLength+Me.packedLength}jS.pack=function(e,t,n){n=y(n,0);let i=e._frustumType,o=e._frustum;return t[n++]=i,i===G5?(xi.pack(o,t,n),n+=xi.packedLength):(Qt.pack(o,t,n),n+=Qt.packedLength),h.pack(e._origin,t,n),n+=h.packedLength,Me.pack(e._orientation,t,n),n+=Me.packedLength,t[n]=e._drawNearPlane?1:0,t};var bIe=new xi,EIe=new Qt,SIe=new Me,wIe=new h;jS.unpack=function(e,t,n){t=y(t,0);let i=e[t++],o;i===G5?(o=xi.unpack(e,t,bIe),t+=xi.packedLength):(o=Qt.unpack(e,t,EIe),t+=Qt.packedLength);let r=h.unpack(e,t,wIe);t+=h.packedLength;let s=Me.unpack(e,t,SIe);t+=Me.packedLength;let a=e[t]===1;if(!l(n))return new jS({frustum:o,origin:r,orientation:s,_drawNearPlane:a});let c=i===n._frustumType?n._frustum:void 0;return n._frustum=o.clone(c),n._frustumType=i,n._origin=h.clone(r,n._origin),n._orientation=Me.clone(s,n._orientation),n._drawNearPlane=a,n};jS.createGeometry=function(e){let t=e._frustumType,n=e._frustum,i=e._origin,o=e._orientation,r=e._drawNearPlane,s=new Float64Array(3*4*2);GA._computeNearFarPlanes(i,o,t,n,s);let a=new ln({position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:s})}),c,u,f=r?2:1,d=new Uint16Array(8*(f+1)),p=r?0:1;for(;p<2;++p)c=r?p*8:0,u=p*4,d[c]=u,d[c+1]=u+1,d[c+2]=u+1,d[c+3]=u+2,d[c+4]=u+2,d[c+5]=u+3,d[c+6]=u+3,d[c+7]=u;for(p=0;p<2;++p)c=(f+p)*8,u=p*4,d[c]=u,d[c+1]=u+4,d[c+2]=u+1,d[c+3]=u+5,d[c+4]=u+2,d[c+5]=u+6,d[c+6]=u+3,d[c+7]=u+7;return new ct({attributes:a,indices:d,primitiveType:Le.LINES,boundingSphere:oe.fromVertices(s)})};var tO=jS;function kQ(){}kQ.prototype.geocode=ye.throwInstantiationError;var UQ=kQ;var vIe={SEARCH:0,AUTOCOMPLETE:1},Dy=Object.freeze(vIe);function zQ(){ye.throwInstantiationError()}zQ.createGeometry=function(e){ye.throwInstantiationError()};var HQ=zQ;function DIe(e){e=y(e,y.EMPTY_OBJECT),this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=y(e.normalize,!1),this.value=e.value}var Ac=DIe;function PIe(e){let t=new ei.default(e);t.normalize();let n=t.path(),i=n.lastIndexOf("/");return i!==-1&&(n=n.substr(i+1)),n}var j_=PIe;function IIe(e,t,n){let i=new Uint8ClampedArray(e.buffer),o=new ImageData(i,t,n),r=document.createElement("canvas");return r.width=t,r.height=n,r.getContext("2d").putImageData(o,0,0),r}var nO=IIe;function OIe(e,t){return t=y(t,0),fa(e,t,Math.min(4,e.length))}var Gu=OIe;var WA=Zc(GQ());function RIe(e,t){return(e&t)!==0}var Tc=RIe;var MIe=[1,2,4,8],WQ=15,BIe=16,LIe=64,NIe=128;function Oh(e,t,n,i,o,r){this._bits=e,this.cnodeVersion=t,this.imageryVersion=n,this.terrainVersion=i,this.imageryProvider=o,this.terrainProvider=r,this.ancestorHasTerrain=!1,this.terrainState=void 0}Oh.clone=function(e,t){return l(t)?(t._bits=e._bits,t.cnodeVersion=e.cnodeVersion,t.imageryVersion=e.imageryVersion,t.terrainVersion=e.terrainVersion,t.imageryProvider=e.imageryProvider,t.terrainProvider=e.terrainProvider):t=new Oh(e._bits,e.cnodeVersion,e.imageryVersion,e.terrainVersion,e.imageryProvider,e.terrainProvider),t.ancestorHasTerrain=e.ancestorHasTerrain,t.terrainState=e.terrainState,t};Oh.prototype.setParent=function(e){this.ancestorHasTerrain=e.ancestorHasTerrain||this.hasTerrain()};Oh.prototype.hasSubtree=function(){return Tc(this._bits,BIe)};Oh.prototype.hasImagery=function(){return Tc(this._bits,LIe)};Oh.prototype.hasTerrain=function(){return Tc(this._bits,NIe)};Oh.prototype.hasChildren=function(){return Tc(this._bits,WQ)};Oh.prototype.hasChild=function(e){return Tc(this._bits,MIe[e])};Oh.prototype.getChildBitmask=function(){return this._bits&WQ};var iO=Oh;function FIe(e){let t=e.length,n=new ArrayBuffer(t),i=new Uint8Array(n);for(let o=0;o<t;++o)i[o]=e.charCodeAt(o);return n}var VIe=FIe(`E\xF4\xBD\vy\xE2jE"\x92,\xCDq\xF8IFgQ\0B%\xC6\xE8a,f)\b\xC64\xDCjb%y
97
97
  wmi\xD6\xF0\x9Ck\x93\xA1\xBDNu\xE0A[\xDF@V\f\xD9\xBBr\x9B\x81|3S\xEEOl\xD4q\xB0{\xC0\x7FEVZ\xADwUe\v3\x92*\xACl5\xC50s\xF83>mF8J\xB4\xDD\xF0.\xDDu\xDA\x8CDt"\xFAa"\f3"So\xAF9D\v\x8C9\xD99L\xB9\xBF\x7F\xAB\\\x8CP_\x9F"ux\xE9\x07q\x91h;\xC1\xC4\x9B\x7F\xF0<VqH\x82'UfYNe\x98u\xA3aF}a?A\0\x9F\xD7\xB44M\xCE\x87F\xB0\xD5\xB8\x8A'{\x8B\xDC+\xBBMg0\xC8\xD1\xF6\\\x8FP\xFA[/F\x9Bn5/'C.\xEB
98
98
  \f^\xA5s\x1Be4\xE5l.jC'c#U\xA9?q{gC}:\xAF\xCD\xE2TU\x9C\xFDK\xC6\xE2\x9F/(\xED\xCB\\\xC6-f\x07\x88\xA7;/*"N\xB0k.\xDD\r\x95}}G\xBAC\xB2\xB2+>M\xAA>}\xE6\xCEI\x89\xC6\xE6x\fa1-\xA4O\xA5~q \x88\xEC\r1\xE8N\v\0nPh}=\b\r\x95\xA6n\xA3h\x97$[k\xF3#\xF3\xB6s\xB3\r\v@\xC0\x9F\xD8Q]\xFA".j\xDFI\0\xB9\xA0wU\xC6\xEFj\xBF{GL\x7F\x83\xEE\xDC\xDCF\x85\xA9\xADS\x07+S4\x07\xFF\x94Y\xE48\xE81\x83N\xB9XFk\xCB-#\x86\x92p\x005\x88"\xCF1\xB2&/\xE7\xC3u-6,rt\xB0#G\xB7\xD3\xD1&\x857r\xE2\0\x8CD\xCF\xDA3-\xDE\`\x86i#i*|\xCDKQ\r\x95T9w.)\xEA\x1B\xA6P\xA2j\x8FoP\x99\\>T\xFB\xEFP[\v\x07E\x89m(w7\xDB\x8EJfJo\x99 \xE5p\xE2\xB9q~\fmI-z\xFEr\xC7\xF2Y0\x8F\xBB]s\xE5\xC9 \xEAx\xEC \x90\xF0\x8A\x7FB|G\`\xB0\xBD&\xB7q\xB6\xC7\x9F\xD13\x82=\xD3\xAB\xEEc\x99\xC8+S\xA0D\\q\xC6\xCCD2O<\xCA\xC0)=R\xD3aX\xA9}e\xB4\xDC\xCF\r\xF4=\xF1\b\xA9B\xDA# \xD8\xBF^PI\xF8M\xC0\xCBGLO\xF7{+\xD8\xC51\x92;\xB5o\xDCl\r\x92\x88\xD1\x9E\xDB?\xE2\xE9\xDA_\xD4\x84\xE2FaZ\xDEU\xCF\xA4\0\xBE\xFD\xCEg\xF1Ji\x97\xE6 H\xD8]\x7F~\xAEq N\xAE\xC0V\xA9\x91<\x82r\xE7v\xEC)I\xD6]-\x83\xE3\xDB6\xA9;f\x97\x87j\xD5\xB6=P^R\xB9K\xC7sWx\xC9\xF4.Y\x07\x95\x93o\xD0KW>''\xC7\`\xDB;\xED\x9ASD>?\x8D\x92mw\xA2
99
99
  \xEB?R\xA8\xC6U^1I7\x85\xF4\xC5&-\xA9\xBF\x8B'T\xDA\xC3j \xE5*x\xB0\xD6\x90pr\xAA\x8Bh\xBD\x88\xF7_H\xB1~\xC0XL?f\xF9>\xE1e\xC0p\xA7\xCF8i\xAF\xF0VldI\x9C'\xADxtO\xC2\x87\xDEV9\0\xDAw\v\xCB-\x1B\x89\xFB5O\xF5\bQ\`\xC1
@@ -8309,7 +8309,7 @@ ${m?` // Draw cascade colors for debugging
8309
8309
  float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters);
8310
8310
  `,S+=` gl_FragColor.rgb *= visibility;
8311
8311
  }
8312
- `,T.push(S),new Ve({defines:A,sources:T})};var s_=dC;function Em(e){e=y(e,y.EMPTY_OBJECT);let t=e.context;this._enabled=y(e.enabled,!0),this._softShadows=y(e.softShadows,!1),this._normalOffset=y(e.normalOffset,!0),this.dirty=!0,this.fromLightSource=y(e.fromLightSource,!0),this.darkness=y(e.darkness,.3),this._darkness=this.darkness,this.fadingEnabled=y(e.fadingEnabled,!0),this.maximumDistance=y(e.maximumDistance,5e3),this._outOfView=!1,this._outOfViewPrevious=!1,this._needsUpdate=!0;let n=!0;(Et.isInternetExplorer()||Et.isEdge()||(Et.isChrome()||Et.isFirefox())&&Et.isWindows()&&!t.depthTexture)&&(n=!1),this._polygonOffsetSupported=n,this._terrainBias={polygonOffset:n,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:.5,normalShading:!0,normalShadingSmooth:.3,depthBias:1e-4},this._primitiveBias={polygonOffset:n,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:.1,normalShading:!0,normalShadingSmooth:.05,depthBias:2e-5},this._pointBias={polygonOffset:!1,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:0,normalShading:!0,normalShadingSmooth:.1,depthBias:5e-4},this._depthAttachment=void 0,this._colorAttachment=void 0,this._shadowMapMatrix=new B,this._shadowMapTexture=void 0,this._lightDirectionEC=new h,this._lightPositionEC=new se,this._distance=0,this._lightCamera=e.lightCamera,this._shadowMapCamera=new GU,this._shadowMapCullingVolume=void 0,this._sceneCamera=void 0,this._boundingSphere=new oe,this._isPointLight=y(e.isPointLight,!1),this._pointLightRadius=y(e.pointLightRadius,100),this._cascadesEnabled=this._isPointLight?!1:y(e.cascadesEnabled,!0),this._numberOfCascades=this._cascadesEnabled?y(e.numberOfCascades,4):0,this._fitNearFar=!0,this._maximumCascadeDistances=[25,150,700,Number.MAX_VALUE],this._textureSize=new G,this._isSpotLight=!1,this._cascadesEnabled?this._shadowMapCamera.frustum=new Wr:l(this._lightCamera.frustum.fov)&&(this._isSpotLight=!0),this._cascadeSplits=[new se,new se],this._cascadeMatrices=[new B,new B,new B,new B],this._cascadeDistances=new se;let i;this._isPointLight?i=6:this._cascadesEnabled?i=this._numberOfCascades:i=1,this._passes=new Array(i);for(let o=0;o<i;++o)this._passes[o]=new Hdt(t);this.debugShow=!1,this.debugFreezeFrame=!1,this._debugFreezeFrame=!1,this._debugCascadeColors=!1,this._debugLightFrustum=void 0,this._debugCameraFrustum=void 0,this._debugCascadeFrustums=new Array(this._numberOfCascades),this._debugShadowViewCommand=void 0,this._usesDepthTexture=t.depthTexture,this._isPointLight&&(this._usesDepthTexture=!1),this._primitiveRenderState=void 0,this._terrainRenderState=void 0,this._pointRenderState=void 0,tY(this),this._clearCommand=new oi({depth:1,color:new z}),this._clearPassState=new Uc(t),this._size=y(e.size,2048),this.size=this._size}Em.MAXIMUM_DISTANCE=2e4;function Hdt(e){this.camera=new GU,this.passState=new Uc(e),this.framebuffer=void 0,this.textureOffsets=void 0,this.commandList=[],this.cullingVolume=void 0}function eY(e,t){return Ue.fromCache({cull:{enabled:!0,face:Hi.BACK},depthTest:{enabled:!0},colorMask:{red:e,green:e,blue:e,alpha:e},depthMask:!0,polygonOffset:{enabled:t.polygonOffset,factor:t.polygonOffsetFactor,units:t.polygonOffsetUnits}})}function tY(e){let t=!e._usesDepthTexture;e._primitiveRenderState=eY(t,e._primitiveBias),e._terrainRenderState=eY(t,e._terrainBias),e._pointRenderState=eY(t,e._pointBias)}Em.prototype.debugCreateRenderStates=function(){tY(this)};Object.defineProperties(Em.prototype,{enabled:{get:function(){return this._enabled},set:function(e){this.dirty=this._enabled!==e,this._enabled=e}},normalOffset:{get:function(){return this._normalOffset},set:function(e){this.dirty=this._normalOffset!==e,this._normalOffset=e,this._terrainBias.normalOffset=e,this._primitiveBias.normalOffset=e,this._pointBias.normalOffset=e}},softShadows:{get:function(){return this._softShadows},set:function(e){this.dirty=this._softShadows!==e,this._softShadows=e}},size:{get:function(){return this._size},set:function(e){Xdt(this,e)}},outOfView:{get:function(){return this._outOfView}},shadowMapCullingVolume:{get:function(){return this._shadowMapCullingVolume}},passes:{get:function(){return this._passes}},isPointLight:{get:function(){return this._isPointLight}},debugCascadeColors:{get:function(){return this._debugCascadeColors},set:function(e){this.dirty=this._debugCascadeColors!==e,this._debugCascadeColors=e}}});function nY(e){let t=e._passes.length;for(let n=0;n<t;++n){let i=e._passes[n],o=i.framebuffer;l(o)&&!o.isDestroyed()&&o.destroy(),i.framebuffer=void 0}e._depthAttachment=e._depthAttachment&&e._depthAttachment.destroy(),e._colorAttachment=e._colorAttachment&&e._colorAttachment.destroy()}function Gdt(e,t){let n=new sf({context:t,width:e._textureSize.x,height:e._textureSize.y,format:Tl.DEPTH_COMPONENT16}),i=new vt({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:ft.RGBA,pixelDatatype:Xe.UNSIGNED_BYTE,sampler:on.NEAREST}),o=new ya({context:t,depthRenderbuffer:n,colorTextures:[i],destroyAttachments:!1}),r=e._passes.length;for(let s=0;s<r;++s){let a=e._passes[s];a.framebuffer=o,a.passState.framebuffer=o}e._shadowMapTexture=i,e._depthAttachment=n,e._colorAttachment=i}function Wdt(e,t){let n=new vt({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:ft.DEPTH_STENCIL,pixelDatatype:Xe.UNSIGNED_INT_24_8,sampler:on.NEAREST}),i=new ya({context:t,depthStencilTexture:n,destroyAttachments:!1}),o=e._passes.length;for(let r=0;r<o;++r){let s=e._passes[r];s.framebuffer=i,s.passState.framebuffer=i}e._shadowMapTexture=n,e._depthAttachment=n}function jdt(e,t){let n=new sf({context:t,width:e._textureSize.x,height:e._textureSize.y,format:Tl.DEPTH_COMPONENT16}),i=new Sc({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:ft.RGBA,pixelDatatype:Xe.UNSIGNED_BYTE,sampler:on.NEAREST}),o=[i.negativeX,i.negativeY,i.negativeZ,i.positiveX,i.positiveY,i.positiveZ];for(let r=0;r<6;++r){let s=new ya({context:t,depthRenderbuffer:n,colorTextures:[o[r]],destroyAttachments:!1}),a=e._passes[r];a.framebuffer=s,a.passState.framebuffer=s}e._shadowMapTexture=i,e._depthAttachment=n,e._colorAttachment=i}function eye(e,t){e._isPointLight?jdt(e,t):e._usesDepthTexture?Wdt(e,t):Gdt(e,t)}function qdt(e,t){e._usesDepthTexture&&e._passes[0].framebuffer.status!==Z.FRAMEBUFFER_COMPLETE&&(e._usesDepthTexture=!1,tY(e),nY(e),eye(e,t))}function Ydt(e,t){(!l(e._passes[0].framebuffer)||e._shadowMapTexture.width!==e._textureSize.x)&&(nY(e),eye(e,t),qdt(e,t),tye(e,t))}function tye(e,t,n){n=y(n,0),(e._isPointLight||n===0)&&(e._clearCommand.framebuffer=e._passes[n].framebuffer,e._clearCommand.execute(t,e._clearPassState))}function Xdt(e,t){e._size=t;let n=e._passes,i=n.length,o=e._textureSize;if(e._isPointLight){t=Rt.maximumCubeMapSize>=t?t:Rt.maximumCubeMapSize,o.x=t,o.y=t;let r=new qe(0,0,t,t);n[0].passState.viewport=r,n[1].passState.viewport=r,n[2].passState.viewport=r,n[3].passState.viewport=r,n[4].passState.viewport=r,n[5].passState.viewport=r}else i===1?(t=Rt.maximumTextureSize>=t?t:Rt.maximumTextureSize,o.x=t,o.y=t,n[0].passState.viewport=new qe(0,0,t,t)):i===4&&(t=Rt.maximumTextureSize>=t*2?t:Rt.maximumTextureSize/2,o.x=t*2,o.y=t*2,n[0].passState.viewport=new qe(0,0,t,t),n[1].passState.viewport=new qe(t,0,t,t),n[2].passState.viewport=new qe(0,t,t,t),n[3].passState.viewport=new qe(t,t,t,t));e._clearPassState.viewport=new qe(0,0,o.x,o.y);for(let r=0;r<i;++r){let s=n[r],a=s.passState.viewport,c=a.x/o.x,u=a.y/o.y,f=a.width/o.x,d=a.height/o.y;s.textureOffsets=new B(f,0,0,c,0,d,0,u,0,0,1,0,0,0,0,1)}}var Kdt=new qe;function $dt(e,t){let n;e._isPointLight?n=`uniform samplerCube shadowMap_textureCube;
8312
+ `,T.push(S),new Ve({defines:A,sources:T})};var s_=dC;function Em(e){e=y(e,y.EMPTY_OBJECT);let t=e.context;this._enabled=y(e.enabled,!0),this._softShadows=y(e.softShadows,!1),this._normalOffset=y(e.normalOffset,!0),this.dirty=!0,this.fromLightSource=y(e.fromLightSource,!0),this.darkness=y(e.darkness,.3),this._darkness=this.darkness,this.fadingEnabled=y(e.fadingEnabled,!0),this.maximumDistance=y(e.maximumDistance,5e3),this._outOfView=!1,this._outOfViewPrevious=!1,this._needsUpdate=!0;let n=!0;(Et.isInternetExplorer()||Et.isEdge()||(Et.isChrome()||Et.isFirefox())&&Et.isWindows()&&!t.depthTexture)&&(n=!1),this._polygonOffsetSupported=n;let i=y(e.depthBiasStep,1);this._terrainBias={polygonOffset:n,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:.5,normalShading:!0,normalShadingSmooth:.3,depthBias:1e-4*i},this._primitiveBias={polygonOffset:n,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:.1,normalShading:!0,normalShadingSmooth:.05,depthBias:2e-5*i},this._pointBias={polygonOffset:!1,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:0,normalShading:!0,normalShadingSmooth:.1,depthBias:5e-4*i},this._depthAttachment=void 0,this._colorAttachment=void 0,this._shadowMapMatrix=new B,this._shadowMapTexture=void 0,this._lightDirectionEC=new h,this._lightPositionEC=new se,this._distance=0,this._lightCamera=e.lightCamera,this._shadowMapCamera=new GU,this._shadowMapCullingVolume=void 0,this._sceneCamera=void 0,this._boundingSphere=new oe,this._isPointLight=y(e.isPointLight,!1),this._pointLightRadius=y(e.pointLightRadius,100),this._cascadesEnabled=this._isPointLight?!1:y(e.cascadesEnabled,!0),this._numberOfCascades=this._cascadesEnabled?y(e.numberOfCascades,4):0,this._fitNearFar=!0,this._maximumCascadeDistances=[25,150,700,Number.MAX_VALUE],this._textureSize=new G,this._isSpotLight=!1,this._cascadesEnabled?this._shadowMapCamera.frustum=new Wr:l(this._lightCamera.frustum.fov)&&(this._isSpotLight=!0),this._cascadeSplits=[new se,new se],this._cascadeMatrices=[new B,new B,new B,new B],this._cascadeDistances=new se;let o;this._isPointLight?o=6:this._cascadesEnabled?o=this._numberOfCascades:o=1,this._passes=new Array(o);for(let r=0;r<o;++r)this._passes[r]=new Hdt(t);this.debugShow=!1,this.debugFreezeFrame=!1,this._debugFreezeFrame=!1,this._debugCascadeColors=!1,this._debugLightFrustum=void 0,this._debugCameraFrustum=void 0,this._debugCascadeFrustums=new Array(this._numberOfCascades),this._debugShadowViewCommand=void 0,this._usesDepthTexture=t.depthTexture,this._isPointLight&&(this._usesDepthTexture=!1),this._primitiveRenderState=void 0,this._terrainRenderState=void 0,this._pointRenderState=void 0,tY(this),this._clearCommand=new oi({depth:1,color:new z}),this._clearPassState=new Uc(t),this._size=y(e.size,2048),this.size=this._size}Em.MAXIMUM_DISTANCE=2e4;function Hdt(e){this.camera=new GU,this.passState=new Uc(e),this.framebuffer=void 0,this.textureOffsets=void 0,this.commandList=[],this.cullingVolume=void 0}function eY(e,t){return Ue.fromCache({cull:{enabled:!0,face:Hi.BACK},depthTest:{enabled:!0},colorMask:{red:e,green:e,blue:e,alpha:e},depthMask:!0,polygonOffset:{enabled:t.polygonOffset,factor:t.polygonOffsetFactor,units:t.polygonOffsetUnits}})}function tY(e){let t=!e._usesDepthTexture;e._primitiveRenderState=eY(t,e._primitiveBias),e._terrainRenderState=eY(t,e._terrainBias),e._pointRenderState=eY(t,e._pointBias)}Em.prototype.debugCreateRenderStates=function(){tY(this)};Object.defineProperties(Em.prototype,{enabled:{get:function(){return this._enabled},set:function(e){this.dirty=this._enabled!==e,this._enabled=e}},normalOffset:{get:function(){return this._normalOffset},set:function(e){this.dirty=this._normalOffset!==e,this._normalOffset=e,this._terrainBias.normalOffset=e,this._primitiveBias.normalOffset=e,this._pointBias.normalOffset=e}},softShadows:{get:function(){return this._softShadows},set:function(e){this.dirty=this._softShadows!==e,this._softShadows=e}},size:{get:function(){return this._size},set:function(e){Xdt(this,e)}},outOfView:{get:function(){return this._outOfView}},shadowMapCullingVolume:{get:function(){return this._shadowMapCullingVolume}},passes:{get:function(){return this._passes}},isPointLight:{get:function(){return this._isPointLight}},debugCascadeColors:{get:function(){return this._debugCascadeColors},set:function(e){this.dirty=this._debugCascadeColors!==e,this._debugCascadeColors=e}}});function nY(e){let t=e._passes.length;for(let n=0;n<t;++n){let i=e._passes[n],o=i.framebuffer;l(o)&&!o.isDestroyed()&&o.destroy(),i.framebuffer=void 0}e._depthAttachment=e._depthAttachment&&e._depthAttachment.destroy(),e._colorAttachment=e._colorAttachment&&e._colorAttachment.destroy()}function Gdt(e,t){let n=new sf({context:t,width:e._textureSize.x,height:e._textureSize.y,format:Tl.DEPTH_COMPONENT16}),i=new vt({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:ft.RGBA,pixelDatatype:Xe.UNSIGNED_BYTE,sampler:on.NEAREST}),o=new ya({context:t,depthRenderbuffer:n,colorTextures:[i],destroyAttachments:!1}),r=e._passes.length;for(let s=0;s<r;++s){let a=e._passes[s];a.framebuffer=o,a.passState.framebuffer=o}e._shadowMapTexture=i,e._depthAttachment=n,e._colorAttachment=i}function Wdt(e,t){let n=new vt({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:ft.DEPTH_STENCIL,pixelDatatype:Xe.UNSIGNED_INT_24_8,sampler:on.NEAREST}),i=new ya({context:t,depthStencilTexture:n,destroyAttachments:!1}),o=e._passes.length;for(let r=0;r<o;++r){let s=e._passes[r];s.framebuffer=i,s.passState.framebuffer=i}e._shadowMapTexture=n,e._depthAttachment=n}function jdt(e,t){let n=new sf({context:t,width:e._textureSize.x,height:e._textureSize.y,format:Tl.DEPTH_COMPONENT16}),i=new Sc({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:ft.RGBA,pixelDatatype:Xe.UNSIGNED_BYTE,sampler:on.NEAREST}),o=[i.negativeX,i.negativeY,i.negativeZ,i.positiveX,i.positiveY,i.positiveZ];for(let r=0;r<6;++r){let s=new ya({context:t,depthRenderbuffer:n,colorTextures:[o[r]],destroyAttachments:!1}),a=e._passes[r];a.framebuffer=s,a.passState.framebuffer=s}e._shadowMapTexture=i,e._depthAttachment=n,e._colorAttachment=i}function eye(e,t){e._isPointLight?jdt(e,t):e._usesDepthTexture?Wdt(e,t):Gdt(e,t)}function qdt(e,t){e._usesDepthTexture&&e._passes[0].framebuffer.status!==Z.FRAMEBUFFER_COMPLETE&&(e._usesDepthTexture=!1,tY(e),nY(e),eye(e,t))}function Ydt(e,t){(!l(e._passes[0].framebuffer)||e._shadowMapTexture.width!==e._textureSize.x)&&(nY(e),eye(e,t),qdt(e,t),tye(e,t))}function tye(e,t,n){n=y(n,0),(e._isPointLight||n===0)&&(e._clearCommand.framebuffer=e._passes[n].framebuffer,e._clearCommand.execute(t,e._clearPassState))}function Xdt(e,t){e._size=t;let n=e._passes,i=n.length,o=e._textureSize;if(e._isPointLight){t=Rt.maximumCubeMapSize>=t?t:Rt.maximumCubeMapSize,o.x=t,o.y=t;let r=new qe(0,0,t,t);n[0].passState.viewport=r,n[1].passState.viewport=r,n[2].passState.viewport=r,n[3].passState.viewport=r,n[4].passState.viewport=r,n[5].passState.viewport=r}else i===1?(t=Rt.maximumTextureSize>=t?t:Rt.maximumTextureSize,o.x=t,o.y=t,n[0].passState.viewport=new qe(0,0,t,t)):i===4&&(t=Rt.maximumTextureSize>=t*2?t:Rt.maximumTextureSize/2,o.x=t*2,o.y=t*2,n[0].passState.viewport=new qe(0,0,t,t),n[1].passState.viewport=new qe(t,0,t,t),n[2].passState.viewport=new qe(0,t,t,t),n[3].passState.viewport=new qe(t,t,t,t));e._clearPassState.viewport=new qe(0,0,o.x,o.y);for(let r=0;r<i;++r){let s=n[r],a=s.passState.viewport,c=a.x/o.x,u=a.y/o.y,f=a.width/o.x,d=a.height/o.y;s.textureOffsets=new B(f,0,0,c,0,d,0,u,0,0,1,0,0,0,0,1)}}var Kdt=new qe;function $dt(e,t){let n;e._isPointLight?n=`uniform samplerCube shadowMap_textureCube;
8313
8313
  varying vec2 v_textureCoordinates;
8314
8314
  void main()
8315
8315
  {
@@ -9760,4 +9760,4 @@ http://www.naturalearthdata.com/`,category:"Cesium ion",creationFunction:functio
9760
9760
  `);n.value=n.value.slice(0,i)+f+n.value.slice(o),n.selectionStart=i!==o?i:r,n.selectionEnd=r}else t.ctrlKey&&(t.keyCode===10||t.keyCode===13)&&this.compileStyle();return!0};sa.prototype._update=function(){let e=this._tileset;if(this.performance&&this._performanceDisplay.update(),l(e)){if(e.isDestroyed()){this.tile=void 0,this.feature=void 0,this.tileset=void 0;return}let t=e.style;this._style!==e.style&&(this._shouldStyle?(e.style=this._style,this._shouldStyle=!1):(this._style=t,this.styleString=JSON.stringify(t.style,null," ")))}this.showStatistics&&(this._statisticsText=sP(e,!1),this._pickStatisticsText=sP(e,!0),this._resourceCacheStatisticsText=uAe())};sa.prototype.isDestroyed=function(){return!1};sa.prototype.destroy=function(){this._eventHandler.destroy(),this._removePostRenderEvent();let e=this;return this._definedProperties.forEach(function(t){xe.getObservable(e,t).dispose()}),ue(this)};sa.getStatistics=sP;var xz=sa;function Cz(e,t){e=Dn(e);let n=document.createElement("div"),i=document.createElement("div");i.setAttribute("data-bind","visible: performance");let o=new xz(t,i);this._viewModel=o,this._container=e,this._element=n;let r=document.createElement("div");r.textContent="3D Tiles Inspector",r.className="cesium-cesiumInspector-button",r.setAttribute("data-bind","click: toggleInspector"),n.appendChild(r),n.className="cesium-cesiumInspector cesium-3DTilesInspector",n.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : inspectorVisible, "cesium-cesiumInspector-hidden" : !inspectorVisible}'),e.appendChild(n);let s=document.createElement("div");this._panel=s,s.className="cesium-cesiumInspector-dropDown",n.appendChild(s);let a=Y0.createSection,c=Y0.createCheckbox,u=a(s,"Tileset","tilesetVisible","toggleTileset"),f=a(s,"Display","displayVisible","toggleDisplay"),d=a(s,"Update","updateVisible","toggleUpdate"),p=a(s,"Logging","loggingVisible","toggleLogging"),_=a(s,"Tile Debug Labels","tileDebugLabelsVisible","toggleTileDebugLabels"),m=a(s,"Style","styleVisible","toggleStyle"),x=a(s,"Optimization","optimizationVisible","toggleOptimization"),C=document.createElement("div");C.className="field-group";let A=document.createElement("label");A.className="field-label",A.appendChild(document.createTextNode("Properties: "));let T=document.createElement("div");T.setAttribute("data-bind","text: properties"),C.appendChild(A),C.appendChild(T),u.appendChild(C),u.appendChild(mX("togglePickTileset","Pick Tileset","pickActive")),u.appendChild(mX("trimTilesCache","Trim Tiles Cache")),u.appendChild(c("Enable Picking","picking")),f.appendChild(c("Colorize","colorize")),f.appendChild(c("Wireframe","wireframe")),f.appendChild(c("Bounding Volumes","showBoundingVolumes")),f.appendChild(c("Content Volumes","showContentBoundingVolumes")),f.appendChild(c("Request Volumes","showRequestVolumes")),f.appendChild(c("Point Cloud Shading","pointCloudShading"));let b=document.createElement("div");b.setAttribute("data-bind","visible: pointCloudShading"),b.appendChild(sh("geometricErrorScale",0,2,.01,"Geometric Error Scale")),b.appendChild(sh("maximumAttenuation",0,32,1,"Maximum Attenuation")),b.appendChild(sh("baseResolution",0,1,.01,"Base Resolution")),b.appendChild(c("Eye Dome Lighting (EDL)","eyeDomeLighting")),f.appendChild(b);let S=document.createElement("div");S.setAttribute("data-bind","visible: eyeDomeLighting"),S.appendChild(sh("eyeDomeLightingStrength",0,2,.1,"EDL Strength")),S.appendChild(sh("eyeDomeLightingRadius",0,4,.1,"EDL Radius")),b.appendChild(S),d.appendChild(c("Freeze Frame","freezeFrame")),d.appendChild(c("Dynamic Screen Space Error","dynamicScreenSpaceError"));let w=document.createElement("div");w.appendChild(sh("maximumScreenSpaceError",0,128,1,"Maximum Screen Space Error")),d.appendChild(w);let D=document.createElement("div");D.setAttribute("data-bind","visible: dynamicScreenSpaceError"),D.appendChild(sh("dynamicScreenSpaceErrorDensitySliderValue",0,1,.005,"Screen Space Error Density","dynamicScreenSpaceErrorDensity")),D.appendChild(sh("dynamicScreenSpaceErrorFactor",1,10,.1,"Screen Space Error Factor")),d.appendChild(D),p.appendChild(c("Performance","performance")),p.appendChild(i),p.appendChild(c("Statistics","showStatistics"));let O=document.createElement("div");O.className="cesium-3dTilesInspector-statistics",O.setAttribute("data-bind","html: statisticsText, visible: showStatistics"),p.appendChild(O),p.appendChild(c("Pick Statistics","showPickStatistics"));let I=document.createElement("div");I.className="cesium-3dTilesInspector-statistics",I.setAttribute("data-bind","html: pickStatisticsText, visible: showPickStatistics"),p.appendChild(I),p.appendChild(c("Resource Cache Statistics","showResourceCacheStatistics"));let L=document.createElement("div");L.className="cesium-3dTilesInspector-statistics",L.setAttribute("data-bind","html: resourceCacheStatisticsText, visible: showResourceCacheStatistics"),p.appendChild(L);let N=document.createElement("div");m.appendChild(N),N.appendChild(document.createTextNode("Color Blend Mode: "));let g=document.createElement("select");g.setAttribute("data-bind",'options: colorBlendModes, optionsText: "text", optionsValue: "value", value: colorBlendMode'),N.appendChild(g);let E=document.createElement("textarea");E.setAttribute("data-bind","textInput: styleString, event: { keydown: styleEditorKeyPress }"),N.className="cesium-cesiumInspector-styleEditor",N.appendChild(E);let v=mX("compileStyle","Compile (Ctrl+Enter)");N.appendChild(v);let P=document.createElement("div");P.className="cesium-cesiumInspector-error",P.setAttribute("data-bind","text: editorError"),N.appendChild(P),_.appendChild(c("Show Picked Only","showOnlyPickedTileDebugLabel")),_.appendChild(c("Geometric Error","showGeometricError")),_.appendChild(c("Rendering Statistics","showRenderingStatistics")),_.appendChild(c("Memory Usage (MB)","showMemoryUsage")),_.appendChild(c("Url","showUrl")),x.appendChild(c("Skip Tile LODs","skipLevelOfDetail"));let M=document.createElement("div");M.appendChild(sh("skipScreenSpaceErrorFactor",1,50,1,"Skip SSE Factor")),x.appendChild(M);let V=document.createElement("div");V.appendChild(sh("baseScreenSpaceError",0,4096,1,"SSE before skipping LOD")),x.appendChild(V);let U=document.createElement("div");U.appendChild(sh("skipLevels",0,10,1,"Min. levels to skip")),x.appendChild(U),x.appendChild(c("Load only tiles that meet the max SSE.","immediatelyLoadDesiredLevelOfDetail")),x.appendChild(c("Load siblings of visible tiles","loadSiblings")),xe.applyBindings(o,n)}Object.defineProperties(Cz.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Cz.prototype.isDestroyed=function(){return!1};Cz.prototype.destroy=function(){return xe.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),ue(this)};function sh(e,t,n,i,o,r){r=y(r,e);let s=document.createElement("input");s.setAttribute("data-bind",`value: ${r}`),s.type="number";let a=document.createElement("input");a.type="range",a.min=t,a.max=n,a.step=i,a.setAttribute("data-bind",`valueUpdate: "input", value: ${e}`);let c=document.createElement("div");c.appendChild(a);let u=document.createElement("div");return u.className="cesium-cesiumInspector-slider",u.appendChild(document.createTextNode(o)),u.appendChild(s),u.appendChild(c),u}function mX(e,t,n){let i=document.createElement("button");i.type="button",i.textContent=t,i.className="cesium-cesiumInspector-pickButton";let o=`click: ${e}`;return l(n)&&(o+=`, css: {"cesium-cesiumInspector-pickButtonHighlight" : ${n}}`),i.setAttribute("data-bind",o),i}var Az=Cz;function Pyt(e){let t;if(l(e)){t="Command Statistics";let n=e.commandsInFrustums;for(let i in n)if(n.hasOwnProperty(i)){let o=parseInt(i,10),r;if(o===7)r="1, 2 and 3";else{let s=[];for(let a=2;a>=0;a--){let c=Math.pow(2,a);o>=c&&(s.push(a+1),o-=c)}r=s.reverse().join(" and ")}t+=`<br>&nbsp;&nbsp;&nbsp;&nbsp;${n[i]} in frustum ${r}`}t+=`<br>Total: ${e.totalCommands}`}return t}function pX(e,t,n){let i=Math.min(n,t);return i=Math.max(i,e),i}var Iyt=new bn,Oyt=new h;function aP(e,t){let n=this,i=e.canvas,o=new Ku(i);this._eventHandler=o,this._scene=e,this._canvas=i,this._primitive=void 0,this._tile=void 0,this._modelMatrixPrimitive=void 0,this._performanceDisplay=void 0,this._performanceContainer=t;let r=this._scene.globe;r.depthTestAgainstTerrain=!0,this.frustums=!1,this.frustumPlanes=!1,this.performance=!1,this.shaderCacheText="",this.primitiveBoundingSphere=!1,this.primitiveReferenceFrame=!1,this.filterPrimitive=!1,this.tileBoundingSphere=!1,this.filterTile=!1,this.wireframe=!1,this.depthFrustum=1,this._numberOfFrustums=1,this.suspendUpdates=!1,this.tileCoordinates=!1,this.frustumStatisticText=!1,this.tileText="",this.hasPickedPrimitive=!1,this.hasPickedTile=!1,this.pickPrimitiveActive=!1,this.pickTileActive=!1,this.dropDownVisible=!0,this.generalVisible=!0,this.primitivesVisible=!1,this.terrainVisible=!1,this.depthFrustumText="",xe.track(this,["frustums","frustumPlanes","performance","shaderCacheText","primitiveBoundingSphere","primitiveReferenceFrame","filterPrimitive","tileBoundingSphere","filterTile","wireframe","depthFrustum","suspendUpdates","tileCoordinates","frustumStatisticText","tileText","hasPickedPrimitive","hasPickedTile","pickPrimitiveActive","pickTileActive","dropDownVisible","generalVisible","primitivesVisible","terrainVisible","depthFrustumText"]),this._toggleDropDown=xn(function(){n.dropDownVisible=!n.dropDownVisible}),this._toggleGeneral=xn(function(){n.generalVisible=!n.generalVisible}),this._togglePrimitives=xn(function(){n.primitivesVisible=!n.primitivesVisible}),this._toggleTerrain=xn(function(){n.terrainVisible=!n.terrainVisible}),this._frustumsSubscription=xe.getObservable(this,"frustums").subscribe(function(u){n._scene.debugShowFrustums=u,n._scene.requestRender()}),this._frustumPlanesSubscription=xe.getObservable(this,"frustumPlanes").subscribe(function(u){n._scene.debugShowFrustumPlanes=u,n._scene.requestRender()}),this._performanceSubscription=xe.getObservable(this,"performance").subscribe(function(u){u?n._performanceDisplay=new z0({container:n._performanceContainer}):n._performanceContainer.innerHTML=""}),this._showPrimitiveBoundingSphere=xn(function(){return n._primitive.debugShowBoundingVolume=n.primitiveBoundingSphere,n._scene.requestRender(),!0}),this._primitiveBoundingSphereSubscription=xe.getObservable(this,"primitiveBoundingSphere").subscribe(function(){n._showPrimitiveBoundingSphere()}),this._showPrimitiveReferenceFrame=xn(function(){if(n.primitiveReferenceFrame){let u=n._primitive.modelMatrix;n._modelMatrixPrimitive=new Fk({modelMatrix:u}),n._scene.primitives.add(n._modelMatrixPrimitive)}else l(n._modelMatrixPrimitive)&&(n._scene.primitives.remove(n._modelMatrixPrimitive),n._modelMatrixPrimitive=void 0);return n._scene.requestRender(),!0}),this._primitiveReferenceFrameSubscription=xe.getObservable(this,"primitiveReferenceFrame").subscribe(function(){n._showPrimitiveReferenceFrame()}),this._doFilterPrimitive=xn(function(){return n.filterPrimitive?n._scene.debugCommandFilter=function(u){return l(n._modelMatrixPrimitive)&&u.owner===n._modelMatrixPrimitive._primitive?!0:l(n._primitive)?u.owner===n._primitive||u.owner===n._primitive._billboardCollection||u.owner.primitive===n._primitive:!1}:n._scene.debugCommandFilter=void 0,!0}),this._filterPrimitiveSubscription=xe.getObservable(this,"filterPrimitive").subscribe(function(){n._doFilterPrimitive(),n._scene.requestRender()}),this._wireframeSubscription=xe.getObservable(this,"wireframe").subscribe(function(u){r._surface.tileProvider._debug.wireframe=u,n._scene.requestRender()}),this._depthFrustumSubscription=xe.getObservable(this,"depthFrustum").subscribe(function(u){n._scene.debugShowDepthFrustum=u,n._scene.requestRender()}),this._incrementDepthFrustum=xn(function(){let u=n.depthFrustum+1;return n.depthFrustum=pX(1,n._numberOfFrustums,u),n._scene.requestRender(),!0}),this._decrementDepthFrustum=xn(function(){let u=n.depthFrustum-1;return n.depthFrustum=pX(1,n._numberOfFrustums,u),n._scene.requestRender(),!0}),this._suspendUpdatesSubscription=xe.getObservable(this,"suspendUpdates").subscribe(function(u){r._surface._debug.suspendLodUpdate=u,u||(n.filterTile=!1)});let s;this._showTileCoordinates=xn(function(){return n.tileCoordinates&&!l(s)?s=e.imageryLayers.addImageryProvider(new j4({tilingScheme:e.terrainProvider.tilingScheme})):!n.tileCoordinates&&l(s)&&(e.imageryLayers.remove(s),s=void 0),!0}),this._tileCoordinatesSubscription=xe.getObservable(this,"tileCoordinates").subscribe(function(){n._showTileCoordinates(),n._scene.requestRender()}),this._tileBoundingSphereSubscription=xe.getObservable(this,"tileBoundingSphere").subscribe(function(){n._showTileBoundingSphere(),n._scene.requestRender()}),this._showTileBoundingSphere=xn(function(){return n.tileBoundingSphere?r._surface.tileProvider._debug.boundingSphereTile=n._tile:r._surface.tileProvider._debug.boundingSphereTile=void 0,n._scene.requestRender(),!0}),this._doFilterTile=xn(function(){return n.filterTile?(n.suspendUpdates=!0,r._surface._tilesToRender=[],l(n._tile)&&n._tile.renderable&&r._surface._tilesToRender.push(n._tile)):n.suspendUpdates=!1,!0}),this._filterTileSubscription=xe.getObservable(this,"filterTile").subscribe(function(){n.doFilterTile(),n._scene.requestRender()});function a(u){let f=n._scene.pick({x:u.position.x,y:u.position.y});l(f)&&(n.primitive=l(f.collection)?f.collection:f.primitive),n._scene.requestRender(),n.pickPrimitiveActive=!1}this._pickPrimitive=xn(function(){n.pickPrimitiveActive=!n.pickPrimitiveActive}),this._pickPrimitiveActiveSubscription=xe.getObservable(this,"pickPrimitiveActive").subscribe(function(u){u?o.setInputAction(a,mn.LEFT_CLICK):o.removeInputAction(mn.LEFT_CLICK)});function c(u){let f,d=r.ellipsoid,p=n._scene.camera.getPickRay(u.position,Iyt),_=r.pick(p,n._scene,Oyt);if(l(_)){let m=d.cartesianToCartographic(_),x=r._surface.tileProvider._tilesToRenderByTextureCount;for(let C=0;!f&&C<x.length;++C){let A=x[C];if(!!l(A))for(let T=0;!f&&T<A.length;++T){let b=A[T];de.contains(b.rectangle,m)&&(f=b)}}}n.tile=f,n.pickTileActive=!1}this._pickTile=xn(function(){n.pickTileActive=!n.pickTileActive}),this._pickTileActiveSubscription=xe.getObservable(this,"pickTileActive").subscribe(function(u){u?o.setInputAction(c,mn.LEFT_CLICK):o.removeInputAction(mn.LEFT_CLICK)}),this._removePostRenderEvent=e.postRender.addEventListener(function(){n._update()})}Object.defineProperties(aP.prototype,{scene:{get:function(){return this._scene}},performanceContainer:{get:function(){return this._performanceContainer}},toggleDropDown:{get:function(){return this._toggleDropDown}},showPrimitiveBoundingSphere:{get:function(){return this._showPrimitiveBoundingSphere}},showPrimitiveReferenceFrame:{get:function(){return this._showPrimitiveReferenceFrame}},doFilterPrimitive:{get:function(){return this._doFilterPrimitive}},incrementDepthFrustum:{get:function(){return this._incrementDepthFrustum}},decrementDepthFrustum:{get:function(){return this._decrementDepthFrustum}},showTileCoordinates:{get:function(){return this._showTileCoordinates}},showTileBoundingSphere:{get:function(){return this._showTileBoundingSphere}},doFilterTile:{get:function(){return this._doFilterTile}},toggleGeneral:{get:function(){return this._toggleGeneral}},togglePrimitives:{get:function(){return this._togglePrimitives}},toggleTerrain:{get:function(){return this._toggleTerrain}},pickPrimitive:{get:function(){return this._pickPrimitive}},pickTile:{get:function(){return this._pickTile}},selectParent:{get:function(){let e=this;return xn(function(){e.tile=e.tile.parent})}},selectNW:{get:function(){let e=this;return xn(function(){e.tile=e.tile.northwestChild})}},selectNE:{get:function(){let e=this;return xn(function(){e.tile=e.tile.northeastChild})}},selectSW:{get:function(){let e=this;return xn(function(){e.tile=e.tile.southwestChild})}},selectSE:{get:function(){let e=this;return xn(function(){e.tile=e.tile.southeastChild})}},primitive:{get:function(){return this._primitive},set:function(e){let t=this._primitive;e!==t&&(this.hasPickedPrimitive=!0,l(t)&&(t.debugShowBoundingVolume=!1),this._scene.debugCommandFilter=void 0,l(this._modelMatrixPrimitive)&&(this._scene.primitives.remove(this._modelMatrixPrimitive),this._modelMatrixPrimitive=void 0),this._primitive=e,e.show=!1,setTimeout(function(){e.show=!0},50),this.showPrimitiveBoundingSphere(),this.showPrimitiveReferenceFrame(),this.doFilterPrimitive())}},tile:{get:function(){return this._tile},set:function(e){if(l(e)){this.hasPickedTile=!0;let t=this._tile;if(e!==t){this.tileText=`L: ${e.level} X: ${e.x} Y: ${e.y}`,this.tileText+=`<br>SW corner: ${e.rectangle.west}, ${e.rectangle.south}`,this.tileText+=`<br>NE corner: ${e.rectangle.east}, ${e.rectangle.north}`;let n=e.data;l(n)&&l(n.tileBoundingRegion)?this.tileText+=`<br>Min: ${n.tileBoundingRegion.minimumHeight} Max: ${n.tileBoundingRegion.maximumHeight}`:this.tileText+="<br>(Tile is not loaded)"}this._tile=e,this.showTileBoundingSphere(),this.doFilterTile()}else this.hasPickedTile=!1,this._tile=void 0}}});aP.prototype._update=function(){this.frustums&&(this.frustumStatisticText=Pyt(this._scene.debugFrustumStatistics));let e=this._scene.numberOfFrustums;this._numberOfFrustums=e,this.depthFrustum=pX(1,e,this.depthFrustum),this.depthFrustumText=`${this.depthFrustum} of ${e}`,this.performance&&this._performanceDisplay.update(),this.primitiveReferenceFrame&&(this._modelMatrixPrimitive.modelMatrix=this._primitive.modelMatrix),this.shaderCacheText=`Cached shaders: ${this._scene.context.shaderCache.numberOfShaders}`};aP.prototype.isDestroyed=function(){return!1};aP.prototype.destroy=function(){return this._eventHandler.destroy(),this._removePostRenderEvent(),this._frustumsSubscription.dispose(),this._frustumPlanesSubscription.dispose(),this._performanceSubscription.dispose(),this._primitiveBoundingSphereSubscription.dispose(),this._primitiveReferenceFrameSubscription.dispose(),this._filterPrimitiveSubscription.dispose(),this._wireframeSubscription.dispose(),this._depthFrustumSubscription.dispose(),this._suspendUpdatesSubscription.dispose(),this._tileCoordinatesSubscription.dispose(),this._tileBoundingSphereSubscription.dispose(),this._filterTileSubscription.dispose(),this._pickPrimitiveActiveSubscription.dispose(),this._pickTileActiveSubscription.dispose(),ue(this)};var Tz=aP;function bz(e,t){e=Dn(e);let n=document.createElement("div"),i=new Tz(t,n);this._viewModel=i,this._container=e;let o=document.createElement("div");this._element=o;let r=document.createElement("div");r.textContent="Cesium Inspector",r.className="cesium-cesiumInspector-button",r.setAttribute("data-bind","click: toggleDropDown"),o.appendChild(r),o.className="cesium-cesiumInspector",o.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : dropDownVisible, "cesium-cesiumInspector-hidden" : !dropDownVisible }'),e.appendChild(this._element);let s=document.createElement("div");this._panel=s,s.className="cesium-cesiumInspector-dropDown",o.appendChild(s);let a=Y0.createSection,c=Y0.createCheckbox,u=a(s,"General","generalVisible","toggleGeneral"),f=c("Show Frustums","frustums"),d=document.createElement("div");d.className="cesium-cesiumInspector-frustumStatistics",d.setAttribute("data-bind","visible: frustums, html: frustumStatisticText"),f.appendChild(d),u.appendChild(f),u.appendChild(c("Show Frustum Planes","frustumPlanes")),u.appendChild(c("Performance Display","performance")),n.className="cesium-cesiumInspector-performanceDisplay",u.appendChild(n);let p=document.createElement("div");p.className="cesium-cesiumInspector-shaderCache",p.setAttribute("data-bind","html: shaderCacheText"),u.appendChild(p);let _=document.createElement("div");u.appendChild(_);let m=document.createElement("span");m.setAttribute("data-bind",'html: "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Frustum:"'),_.appendChild(m);let x=document.createElement("span");x.setAttribute("data-bind","text: depthFrustumText"),_.appendChild(x);let C=document.createElement("input");C.type="button",C.value="-",C.className="cesium-cesiumInspector-pickButton",C.setAttribute("data-bind","click: decrementDepthFrustum"),_.appendChild(C);let A=document.createElement("input");A.type="button",A.value="+",A.className="cesium-cesiumInspector-pickButton",A.setAttribute("data-bind","click: incrementDepthFrustum"),_.appendChild(A);let T=a(s,"Primitives","primitivesVisible","togglePrimitives"),b=document.createElement("div");b.className="cesium-cesiumInspector-pickSection",T.appendChild(b);let S=document.createElement("input");S.type="button",S.value="Pick a primitive",S.className="cesium-cesiumInspector-pickButton",S.setAttribute("data-bind",'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickPrimitiveActive}, click: pickPrimitive');let w=document.createElement("div");w.className="cesium-cesiumInspector-center",w.appendChild(S),b.appendChild(w),b.appendChild(c("Show bounding sphere","primitiveBoundingSphere","hasPickedPrimitive")),b.appendChild(c("Show reference frame","primitiveReferenceFrame","hasPickedPrimitive")),this._primitiveOnly=c("Show only selected","filterPrimitive","hasPickedPrimitive"),b.appendChild(this._primitiveOnly);let D=a(s,"Terrain","terrainVisible","toggleTerrain"),O=document.createElement("div");O.className="cesium-cesiumInspector-pickSection",D.appendChild(O);let I=document.createElement("input");I.type="button",I.value="Pick a tile",I.className="cesium-cesiumInspector-pickButton",I.setAttribute("data-bind",'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickTileActive}, click: pickTile'),w=document.createElement("div"),w.appendChild(I),w.className="cesium-cesiumInspector-center",O.appendChild(w);let L=document.createElement("div");O.appendChild(L);let N=document.createElement("input");N.type="button",N.value="Parent",N.className="cesium-cesiumInspector-pickButton",N.setAttribute("data-bind","click: selectParent");let g=document.createElement("input");g.type="button",g.value="NW",g.className="cesium-cesiumInspector-pickButton",g.setAttribute("data-bind","click: selectNW");let E=document.createElement("input");E.type="button",E.value="NE",E.className="cesium-cesiumInspector-pickButton",E.setAttribute("data-bind","click: selectNE");let v=document.createElement("input");v.type="button",v.value="SW",v.className="cesium-cesiumInspector-pickButton",v.setAttribute("data-bind","click: selectSW");let P=document.createElement("input");P.type="button",P.value="SE",P.className="cesium-cesiumInspector-pickButton",P.setAttribute("data-bind","click: selectSE");let M=document.createElement("div");M.className="cesium-cesiumInspector-tileText",L.className="cesium-cesiumInspector-frustumStatistics",L.appendChild(M),L.setAttribute("data-bind","visible: hasPickedTile"),M.setAttribute("data-bind","html: tileText");let V=document.createElement("div");V.className="cesium-cesiumInspector-relativeText",V.textContent="Select relative:",L.appendChild(V);let U=document.createElement("table"),k=document.createElement("tr"),H=document.createElement("tr"),F=document.createElement("td");F.appendChild(N);let Y=document.createElement("td");Y.appendChild(g);let j=document.createElement("td");j.appendChild(E),k.appendChild(F),k.appendChild(Y),k.appendChild(j);let X=document.createElement("td"),W=document.createElement("td");W.appendChild(v);let $=document.createElement("td");$.appendChild(P),H.appendChild(X),H.appendChild(W),H.appendChild($),U.appendChild(k),U.appendChild(H),L.appendChild(U),O.appendChild(c("Show bounding volume","tileBoundingSphere","hasPickedTile")),O.appendChild(c("Show only selected","filterTile","hasPickedTile")),D.appendChild(c("Wireframe","wireframe")),D.appendChild(c("Suspend LOD update","suspendUpdates")),D.appendChild(c("Show tile coordinates","tileCoordinates")),xe.applyBindings(i,this._element)}Object.defineProperties(bz.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});bz.prototype.isDestroyed=function(){return!1};bz.prototype.destroy=function(){return xe.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),ue(this)};var Ez=bz;function QE(e){return Jt(`Assets/Textures/SkyBox/tycho2t3_80_${e}.jpg`)}function Ryt(e){e._renderLoopRunning=!0;let t=0;function n(i){if(!e.isDestroyed())if(e._useDefaultRenderLoop)try{let o=e._targetFrameRate;if(!l(o))e.resize(),e.render(),requestAnimationFrame(n);else{let r=1e3/o,s=i-t;s>r&&(e.resize(),e.render(),t=i-s%r),requestAnimationFrame(n)}}catch(o){if(e._useDefaultRenderLoop=!1,e._renderLoopRunning=!1,e._showRenderLoopErrors){let r="An error occurred while rendering. Rendering has stopped.";e.showErrorPanel(r,void 0,o)}}else e._renderLoopRunning=!1}requestAnimationFrame(n)}function fAe(e){let t=e._useBrowserRecommendedResolution?1:window.devicePixelRatio;return t*=e._resolutionScale,l(e._scene)&&(e._scene.pixelRatio=t),t}function dAe(e){let t=e._canvas,n=t.clientWidth,i=t.clientHeight,o=fAe(e);e._canvasClientWidth=n,e._canvasClientHeight=i,n*=o,i*=o,t.width=n,t.height=i,e._canRender=n!==0&&i!==0,e._lastDevicePixelRatio=window.devicePixelRatio}function hAe(e){let t=e._canvas,n=t.width,i=t.height;if(n!==0&&i!==0){let o=e._scene.camera.frustum;l(o.aspectRatio)?o.aspectRatio=n/i:(o.top=o.right*(i/n),o.bottom=-o.top)}}function IC(e,t){e=Dn(e),t=y(t,y.EMPTY_OBJECT);let n=document.createElement("div");n.className="cesium-widget",e.appendChild(n);let i=document.createElement("canvas"),o=Et.supportsImageRenderingPixelated();this._supportsImageRenderingPixelated=o,o&&(i.style.imageRendering=Et.imageRenderingValue()),i.oncontextmenu=function(){return!1},i.onselectstart=function(){return!1};function r(){i!==i.ownerDocument.activeElement&&i.ownerDocument.activeElement.blur()}y(t.blurActiveElementOnCanvasFocus,!0)&&(i.addEventListener("mousedown",r),i.addEventListener("pointerdown",r)),n.appendChild(i);let a=document.createElement("div");a.className="cesium-widget-credits";let c=l(t.creditContainer)?Dn(t.creditContainer):n;c.appendChild(a);let u=l(t.creditViewport)?Dn(t.creditViewport):n,f=y(t.showRenderLoopErrors,!0),d=y(t.useBrowserRecommendedResolution,!0);this._element=n,this._container=e,this._canvas=i,this._canvasClientWidth=0,this._canvasClientHeight=0,this._lastDevicePixelRatio=0,this._creditViewport=u,this._creditContainer=c,this._innerCreditContainer=a,this._canRender=!1,this._renderLoopRunning=!1,this._showRenderLoopErrors=f,this._resolutionScale=1,this._useBrowserRecommendedResolution=d,this._forceResize=!1,this._clock=l(t.clock)?t.clock:new Eh,dAe(this);try{let p=new M4({canvas:i,contextOptions:t.contextOptions,creditContainer:a,creditViewport:u,mapProjection:t.mapProjection,orderIndependentTranslucency:t.orderIndependentTranslucency,scene3DOnly:y(t.scene3DOnly,!1),shadows:t.shadows,mapMode2D:t.mapMode2D,requestRenderMode:t.requestRenderMode,maximumRenderTimeChange:t.maximumRenderTimeChange,depthPlaneEllipsoidOffset:t.depthPlaneEllipsoidOffset,msaaSamples:t.msaaSamples});this._scene=p,p.camera.constrainedAxis=h.UNIT_Z,fAe(this),hAe(this);let _=y(p.mapProjection.ellipsoid,re.WGS84),m=t.globe;l(m)||(m=new wU(_)),m!==!1&&(p.globe=m,p.globe.shadows=y(t.terrainShadows,$t.RECEIVE_ONLY));let x=t.skyBox;l(x)||(x=new U4({sources:{positiveX:QE("px"),negativeX:QE("mx"),positiveY:QE("py"),negativeY:QE("my"),positiveZ:QE("pz"),negativeZ:QE("mz")}})),x!==!1&&(p.skyBox=x,p.sun=new W4,p.moon=new BU);let C=t.skyAtmosphere;l(C)||(C=new N4(_)),C!==!1&&(p.skyAtmosphere=C);let A=t.globe===!1?!1:t.imageryProvider;l(A)||(A=N0()),A!==!1&&p.imageryLayers.addImageryProvider(A),l(t.terrainProvider)&&t.globe!==!1&&(p.terrainProvider=t.terrainProvider),this._screenSpaceEventHandler=new Ku(i),l(t.sceneMode)&&(t.sceneMode===te.SCENE2D&&this._scene.morphTo2D(0),t.sceneMode===te.COLUMBUS_VIEW&&this._scene.morphToColumbusView(0)),this._useDefaultRenderLoop=void 0,this.useDefaultRenderLoop=y(t.useDefaultRenderLoop,!0),this._targetFrameRate=void 0,this.targetFrameRate=t.targetFrameRate;let T=this;this._onRenderError=function(b,S){if(T._useDefaultRenderLoop=!1,T._renderLoopRunning=!1,T._showRenderLoopErrors){let w="An error occurred while rendering. Rendering has stopped.";T.showErrorPanel(w,void 0,S)}},p.renderError.addEventListener(this._onRenderError)}catch(p){if(f){let _="Error constructing CesiumWidget.",m='Visit <a href="http://get.webgl.org">http://get.webgl.org</a> to verify that your web browser and hardware support WebGL. Consider trying a different web browser or updating your video drivers. Detailed error information is below:';this.showErrorPanel(_,m,p)}throw p}}Object.defineProperties(IC.prototype,{container:{get:function(){return this._container}},canvas:{get:function(){return this._canvas}},creditContainer:{get:function(){return this._creditContainer}},creditViewport:{get:function(){return this._creditViewport}},scene:{get:function(){return this._scene}},imageryLayers:{get:function(){return this._scene.imageryLayers}},terrainProvider:{get:function(){return this._scene.terrainProvider},set:function(e){this._scene.terrainProvider=e}},camera:{get:function(){return this._scene.camera}},clock:{get:function(){return this._clock}},screenSpaceEventHandler:{get:function(){return this._screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._targetFrameRate},set:function(e){this._targetFrameRate=e}},useDefaultRenderLoop:{get:function(){return this._useDefaultRenderLoop},set:function(e){this._useDefaultRenderLoop!==e&&(this._useDefaultRenderLoop=e,e&&!this._renderLoopRunning&&Ryt(this))}},resolutionScale:{get:function(){return this._resolutionScale},set:function(e){this._resolutionScale!==e&&(this._resolutionScale=e,this._forceResize=!0)}},useBrowserRecommendedResolution:{get:function(){return this._useBrowserRecommendedResolution},set:function(e){this._useBrowserRecommendedResolution!==e&&(this._useBrowserRecommendedResolution=e,this._forceResize=!0)}}});IC.prototype.showErrorPanel=function(e,t,n){let i=this._element,o=document.createElement("div");o.className="cesium-widget-errorPanel";let r=document.createElement("div");r.className="cesium-widget-errorPanel-content",o.appendChild(r);let s=document.createElement("div");s.className="cesium-widget-errorPanel-header",s.appendChild(document.createTextNode(e)),r.appendChild(s);let a=document.createElement("div");a.className="cesium-widget-errorPanel-scroll",r.appendChild(a);function c(){a.style.maxHeight=`${Math.max(Math.round(i.clientHeight*.9-100),30)}px`}c(),l(window.addEventListener)&&window.addEventListener("resize",c,!1);let u=l(t),f=l(n);if(u||f){let _=document.createElement("div");if(_.className="cesium-widget-errorPanel-message",a.appendChild(_),f){let m=Hm(n);u||(typeof n=="string"&&(n=new Error(n)),t=Hm({name:n.name,message:n.message}),m=n.stack),typeof console<"u"&&console.error(`${e}
9761
9761
  ${t}
9762
9762
  ${m}`);let x=document.createElement("div");x.className="cesium-widget-errorPanel-message-details collapsed";let C=document.createElement("span");C.className="cesium-widget-errorPanel-more-details",C.appendChild(document.createTextNode("See more...")),x.appendChild(C),x.onclick=function(A){x.removeChild(C),x.appendChild(document.createTextNode(m)),x.className="cesium-widget-errorPanel-message-details",r.className="cesium-widget-errorPanel-content expanded",x.onclick=void 0},a.appendChild(x)}_.innerHTML=`<p>${t}</p>`}let d=document.createElement("div");d.className="cesium-widget-errorPanel-buttonPanel",r.appendChild(d);let p=document.createElement("button");p.setAttribute("type","button"),p.className="cesium-button",p.appendChild(document.createTextNode("OK")),p.onclick=function(){l(c)&&l(window.removeEventListener)&&window.removeEventListener("resize",c,!1),i.removeChild(o)},d.appendChild(p),i.appendChild(o)};IC.prototype.isDestroyed=function(){return!1};IC.prototype.destroy=function(){l(this._scene)&&(this._scene.renderError.removeEventListener(this._onRenderError),this._scene=this._scene.destroy()),this._container.removeChild(this._element),this._creditContainer.removeChild(this._innerCreditContainer),ue(this)};IC.prototype.resize=function(){let e=this._canvas;!this._forceResize&&this._canvasClientWidth===e.clientWidth&&this._canvasClientHeight===e.clientHeight&&this._lastDevicePixelRatio===window.devicePixelRatio||(this._forceResize=!1,dAe(this),hAe(this),this._scene.requestRender())};IC.prototype.render=function(){if(this._canRender){this._scene.initializeFrame();let e=this._clock.tick();this._scene.render(e)}else this._clock.tick()};var Sz=IC;function wz(e,t){l(t)||(t=document.body),t=Dn(t);let n=this,i=xe.observable(Or.fullscreen),o=xe.observable(Or.enabled),r=t.ownerDocument;this.isFullscreen=void 0,xe.defineProperty(this,"isFullscreen",{get:function(){return i()}}),this.isFullscreenEnabled=void 0,xe.defineProperty(this,"isFullscreenEnabled",{get:function(){return o()},set:function(s){o(s&&Or.enabled)}}),this.tooltip=void 0,xe.defineProperty(this,"tooltip",function(){return this.isFullscreenEnabled?i()?"Exit full screen":"Full screen":"Full screen unavailable"}),this._command=xn(function(){Or.fullscreen?Or.exitFullscreen():Or.requestFullscreen(n._fullscreenElement)},xe.getObservable(this,"isFullscreenEnabled")),this._fullscreenElement=y(Dn(e),r.body),this._callback=function(){i(Or.fullscreen)},r.addEventListener(Or.changeEventName,this._callback)}Object.defineProperties(wz.prototype,{fullscreenElement:{get:function(){return this._fullscreenElement},set:function(e){this._fullscreenElement=e}},command:{get:function(){return this._command}}});wz.prototype.isDestroyed=function(){return!1};wz.prototype.destroy=function(){document.removeEventListener(Or.changeEventName,this._callback),ue(this)};var vz=wz;var Myt="M 83.96875 17.5625 L 83.96875 17.59375 L 76.65625 24.875 L 97.09375 24.96875 L 76.09375 45.96875 L 81.9375 51.8125 L 102.78125 30.9375 L 102.875 51.15625 L 110.15625 43.875 L 110.1875 17.59375 L 83.96875 17.5625 z M 44.125 17.59375 L 17.90625 17.625 L 17.9375 43.90625 L 25.21875 51.1875 L 25.3125 30.96875 L 46.15625 51.8125 L 52 45.96875 L 31 25 L 51.4375 24.90625 L 44.125 17.59375 z M 46.0625 76.03125 L 25.1875 96.875 L 25.09375 76.65625 L 17.8125 83.9375 L 17.8125 110.21875 L 44 110.25 L 51.3125 102.9375 L 30.90625 102.84375 L 51.875 81.875 L 46.0625 76.03125 z M 82 76.15625 L 76.15625 82 L 97.15625 103 L 76.71875 103.0625 L 84.03125 110.375 L 110.25 110.34375 L 110.21875 84.0625 L 102.9375 76.8125 L 102.84375 97 L 82 76.15625 z",Byt="M 104.34375 17.5625 L 83.5 38.4375 L 83.40625 18.21875 L 76.125 25.5 L 76.09375 51.78125 L 102.3125 51.8125 L 102.3125 51.78125 L 109.625 44.5 L 89.1875 44.40625 L 110.1875 23.40625 L 104.34375 17.5625 z M 23.75 17.59375 L 17.90625 23.4375 L 38.90625 44.4375 L 18.5 44.53125 L 25.78125 51.8125 L 52 51.78125 L 51.96875 25.53125 L 44.6875 18.25 L 44.625 38.46875 L 23.75 17.59375 z M 25.6875 76.03125 L 18.375 83.3125 L 38.78125 83.40625 L 17.8125 104.40625 L 23.625 110.25 L 44.5 89.375 L 44.59375 109.59375 L 51.875 102.3125 L 51.875 76.0625 L 25.6875 76.03125 z M 102.375 76.15625 L 76.15625 76.1875 L 76.1875 102.4375 L 83.46875 109.71875 L 83.5625 89.53125 L 104.40625 110.375 L 110.25 104.53125 L 89.25 83.53125 L 109.6875 83.46875 L 102.375 76.15625 z";function Dz(e,t){e=Dn(e);let n=new vz(t,e);n._exitFullScreenPath=Byt,n._enterFullScreenPath=Myt;let i=document.createElement("button");i.type="button",i.className="cesium-button cesium-fullscreenButton",i.setAttribute("data-bind","attr: { title: tooltip },click: command,enable: isFullscreenEnabled,cesiumSvgPath: { path: isFullscreen ? _exitFullScreenPath : _enterFullScreenPath, width: 128, height: 128 }"),e.appendChild(i),xe.applyBindings(n,i),this._container=e,this._viewModel=n,this._element=i}Object.defineProperties(Dz.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Dz.prototype.isDestroyed=function(){return!1};Dz.prototype.destroy=function(){return this._viewModel.destroy(),xe.cleanNode(this._element),this._container.removeChild(this._element),ue(this)};var Pz=Dz;var mAe=1e3;function Im(e){l(e.geocoderServices)?this._geocoderServices=e.geocoderServices:this._geocoderServices=[new lI,new _O({scene:e.scene})],this._viewContainer=e.container,this._scene=e.scene,this._flightDuration=e.flightDuration,this._searchText="",this._isSearchInProgress=!1,this._geocodePromise=void 0,this._complete=new _e,this._suggestions=[],this._selectedSuggestion=void 0,this._showSuggestions=!0,this._handleArrowDown=_Ae,this._handleArrowUp=pAe;let t=this;this._suggestionsVisible=xe.pureComputed(function(){let o=xe.getObservable(t,"_suggestions")().length>0,r=xe.getObservable(t,"_showSuggestions")();return o&&r}),this._searchCommand=xn(function(i){if(i=y(i,Dy.SEARCH),t._focusTextbox=!1,l(t._selectedSuggestion))return t.activateSuggestion(t._selectedSuggestion),!1;t.hideSuggestions(),t.isSearchInProgress?Uyt(t):Vyt(t,t._geocoderServices,i)}),this.deselectSuggestion=function(){t._selectedSuggestion=void 0},this.handleKeyDown=function(i,o){let r=o.key==="ArrowDown"||o.key==="Down"||o.keyCode===40,s=o.key==="ArrowUp"||o.key==="Up"||o.keyCode===38;return(r||s)&&o.preventDefault(),!0},this.handleKeyUp=function(i,o){let r=o.key==="ArrowDown"||o.key==="Down"||o.keyCode===40,s=o.key==="ArrowUp"||o.key==="Up"||o.keyCode===38,a=o.key==="Enter"||o.keyCode===13;return s?pAe(t):r?_Ae(t):a&&t._searchCommand(),!0},this.activateSuggestion=function(i){t.hideSuggestions(),t._searchText=i.displayName;let o=i.destination;yAe(t),t.destinationFound(t,o)},this.hideSuggestions=function(){t._showSuggestions=!1,t._selectedSuggestion=void 0},this.showSuggestions=function(){t._showSuggestions=!0},this.handleMouseover=function(i,o){i!==t._selectedSuggestion&&(t._selectedSuggestion=i)},this.keepExpanded=!1,this.autoComplete=y(e.autocomplete,!0),this.destinationFound=y(e.destinationFound,Im.flyToDestination),this._focusTextbox=!1,xe.track(this,["_searchText","_isSearchInProgress","keepExpanded","_suggestions","_selectedSuggestion","_showSuggestions","_focusTextbox"]);let n=xe.getObservable(this,"_searchText");n.extend({rateLimit:{timeout:500}}),this._suggestionSubscription=n.subscribe(function(){Im._updateSearchSuggestions(t)}),this.isSearchInProgress=void 0,xe.defineProperty(this,"isSearchInProgress",{get:function(){return this._isSearchInProgress}}),this.searchText=void 0,xe.defineProperty(this,"searchText",{get:function(){return this.isSearchInProgress?"Searching...":this._searchText},set:function(i){this._searchText=i}}),this.flightDuration=void 0,xe.defineProperty(this,"flightDuration",{get:function(){return this._flightDuration},set:function(i){this._flightDuration=i}})}Object.defineProperties(Im.prototype,{complete:{get:function(){return this._complete}},scene:{get:function(){return this._scene}},search:{get:function(){return this._searchCommand}},selectedSuggestion:{get:function(){return this._selectedSuggestion}},suggestions:{get:function(){return this._suggestions}}});Im.prototype.destroy=function(){this._suggestionSubscription.dispose()};function pAe(e){if(e._suggestions.length===0)return;let t=e._suggestions.indexOf(e._selectedSuggestion);if(t===-1||t===0){e._selectedSuggestion=void 0;return}let n=t-1;e._selectedSuggestion=e._suggestions[n],Im._adjustSuggestionsScroll(e,n)}function _Ae(e){if(e._suggestions.length===0)return;let t=e._suggestions.length,i=(e._suggestions.indexOf(e._selectedSuggestion)+1)%t;e._selectedSuggestion=e._suggestions[i],Im._adjustSuggestionsScroll(e,i)}function Lyt(e,t){let n=l(t)?t.availability:void 0;return l(n)?dT(t,[e]).then(function(i){return e=i[0],e.height+=mAe,e}):(e.height+=mAe,Promise.resolve(e))}function Nyt(e,t){let n=e._scene,o=n.mapProjection.ellipsoid,r=n.camera,s=n.terrainProvider,a=t,c;return t instanceof de?R.equalsEpsilon(t.south,t.north,R.EPSILON7)&&R.equalsEpsilon(t.east,t.west,R.EPSILON7)?t=de.center(t):c=TE(t,n):t=o.cartesianToCartographic(t),l(c)||(c=Lyt(t,s)),c.then(function(u){a=o.cartographicToCartesian(u)}).finally(function(){r.flyTo({destination:a,complete:function(){e._complete.raiseEvent()},duration:e._flightDuration,endTransform:B.IDENTITY})})}function Fyt(e,t,n,i){return e.then(function(o){return l(o)&&o.state==="fulfilled"&&o.value.length>0?o:t.geocode(n,i).then(function(s){return{state:"fulfilled",value:s}}).catch(function(s){return{state:"rejected",reason:s}})})}function Vyt(e,t,n){let i=e._searchText;if(gAe(i)){e.showSuggestions();return}e._isSearchInProgress=!0;let o=Promise.resolve();for(let r=0;r<t.length;r++)o=Fyt(o,t[r],i,n);e._geocodePromise=o,o.then(function(r){if(o.cancel)return;e._isSearchInProgress=!1;let s=r.value;if(r.state==="fulfilled"&&l(s)&&s.length>0){e._searchText=s[0].displayName,e.destinationFound(e,s[0].destination);return}e._searchText=`${i} (not found)`})}function kyt(e,t){let n=Dn(e._viewContainer),i=n.getElementsByClassName("search-results")[0],r=n.getElementsByTagName("li")[t];if(t===0){i.scrollTop=0;return}let s=r.offsetTop;s+r.clientHeight>i.clientHeight?i.scrollTop=s+r.clientHeight:s<i.scrollTop&&(i.scrollTop=s)}function Uyt(e){e._isSearchInProgress=!1,l(e._geocodePromise)&&(e._geocodePromise.cancel=!0,e._geocodePromise=void 0)}function gAe(e){return/^\s*$/.test(e)}function yAe(e){xe.getObservable(e,"_suggestions").removeAll()}function zyt(e){if(!e.autoComplete)return;let t=e._searchText;if(yAe(e),gAe(t))return;let n=Promise.resolve([]);return e._geocoderServices.forEach(function(i){n=n.then(function(o){return o.length>=5?o:i.geocode(t,Dy.AUTOCOMPLETE).then(function(r){return o=o.concat(r),o})})}),n.then(function(i){let o=e._suggestions;for(let r=0;r<i.length;r++)o.push(i[r])})}Im.flyToDestination=Nyt;Im._updateSearchSuggestions=zyt;Im._adjustSuggestionsScroll=kyt;var Iz=Im;var Hyt="M29.772,26.433l-7.126-7.126c0.96-1.583,1.523-3.435,1.524-5.421C24.169,8.093,19.478,3.401,13.688,3.399C7.897,3.401,3.204,8.093,3.204,13.885c0,5.789,4.693,10.481,10.484,10.481c1.987,0,3.839-0.563,5.422-1.523l7.128,7.127L29.772,26.433zM7.203,13.885c0.006-3.582,2.903-6.478,6.484-6.486c3.579,0.008,6.478,2.904,6.484,6.486c-0.007,3.58-2.905,6.476-6.484,6.484C10.106,20.361,7.209,17.465,7.203,13.885z",Gyt="M24.778,21.419 19.276,15.917 24.777,10.415 21.949,7.585 16.447,13.087 10.945,7.585 8.117,10.415 13.618,15.917 8.116,21.419 10.946,24.248 16.447,18.746 21.948,24.248z";function Oz(e){let t=Dn(e.container),n=new Iz(e);n._startSearchPath=Hyt,n._stopSearchPath=Gyt;let i=document.createElement("form");i.setAttribute("data-bind","submit: search");let o=document.createElement("input");o.type="search",o.className="cesium-geocoder-input",o.setAttribute("placeholder","Enter an address or landmark..."),o.setAttribute("data-bind",'textInput: searchText,disable: isSearchInProgress,event: { keyup: handleKeyUp, keydown: handleKeyDown, mouseover: deselectSuggestion },css: { "cesium-geocoder-input-wide" : keepExpanded || searchText.length > 0 },hasFocus: _focusTextbox'),this._onTextBoxFocus=function(){setTimeout(function(){o.select()},0)},o.addEventListener("focus",this._onTextBoxFocus,!1),i.appendChild(o),this._textBox=o;let r=document.createElement("span");r.className="cesium-geocoder-searchButton",r.setAttribute("data-bind","click: search,cesiumSvgPath: { path: isSearchInProgress ? _stopSearchPath : _startSearchPath, width: 32, height: 32 }"),i.appendChild(r),t.appendChild(i);let s=document.createElement("div");s.className="search-results",s.setAttribute("data-bind","visible: _suggestionsVisible");let a=document.createElement("ul");a.setAttribute("data-bind","foreach: _suggestions");let c=document.createElement("li");a.appendChild(c),c.setAttribute("data-bind","text: $data.displayName, click: $parent.activateSuggestion, event: { mouseover: $parent.handleMouseover}, css: { active: $data === $parent._selectedSuggestion }"),s.appendChild(a),t.appendChild(s),xe.applyBindings(n,i),xe.applyBindings(n,s),this._container=t,this._searchSuggestionsContainer=s,this._viewModel=n,this._form=i,this._onInputBegin=function(u){let f=u.target;typeof u.composedPath=="function"&&(f=u.composedPath()[0]),t.contains(f)||(n._focusTextbox=!1,n.hideSuggestions())},this._onInputEnd=function(u){n._focusTextbox=!0,n.showSuggestions()},Et.supportsPointerEvents()?(document.addEventListener("pointerdown",this._onInputBegin,!0),t.addEventListener("pointerup",this._onInputEnd,!0),t.addEventListener("pointercancel",this._onInputEnd,!0)):(document.addEventListener("mousedown",this._onInputBegin,!0),t.addEventListener("mouseup",this._onInputEnd,!0),document.addEventListener("touchstart",this._onInputBegin,!0),t.addEventListener("touchend",this._onInputEnd,!0),t.addEventListener("touchcancel",this._onInputEnd,!0))}Object.defineProperties(Oz.prototype,{container:{get:function(){return this._container}},searchSuggestionsContainer:{get:function(){return this._searchSuggestionsContainer}},viewModel:{get:function(){return this._viewModel}}});Oz.prototype.isDestroyed=function(){return!1};Oz.prototype.destroy=function(){let e=this._container;return Et.supportsPointerEvents()?(document.removeEventListener("pointerdown",this._onInputBegin,!0),e.removeEventListener("pointerup",this._onInputEnd,!0)):(document.removeEventListener("mousedown",this._onInputBegin,!0),e.removeEventListener("mouseup",this._onInputEnd,!0),document.removeEventListener("touchstart",this._onInputBegin,!0),e.removeEventListener("touchend",this._onInputEnd,!0)),this._viewModel.destroy(),xe.cleanNode(this._form),xe.cleanNode(this._searchSuggestionsContainer),e.removeChild(this._form),e.removeChild(this._searchSuggestionsContainer),this._textBox.removeEventListener("focus",this._onTextBoxFocus,!1),ue(this)};var Rz=Oz;function xAe(e,t){this._scene=e,this._duration=t;let n=this;this._command=xn(function(){n._scene.camera.flyHome(n._duration)}),this.tooltip="View Home",xe.track(this,["tooltip"])}Object.defineProperties(xAe.prototype,{scene:{get:function(){return this._scene}},command:{get:function(){return this._command}},duration:{get:function(){return this._duration},set:function(e){this._duration=e}}});var Mz=xAe;function Bz(e,t,n){e=Dn(e);let i=new Mz(t,n);i._svgPath="M14,4l-10,8.75h20l-4.25-3.7188v-4.6562h-2.812v2.1875l-2.938-2.5625zm-7.0938,9.906v10.094h14.094v-10.094h-14.094zm2.1876,2.313h3.3122v4.25h-3.3122v-4.25zm5.8442,1.281h3.406v6.438h-3.406v-6.438z";let o=document.createElement("button");o.type="button",o.className="cesium-button cesium-toolbar-button cesium-home-button",o.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 28, height: 28 }"),e.appendChild(o),xe.applyBindings(i,o),this._container=e,this._viewModel=i,this._element=o}Object.defineProperties(Bz.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Bz.prototype.isDestroyed=function(){return!1};Bz.prototype.destroy=function(){return xe.cleanNode(this._element),this._container.removeChild(this._element),ue(this)};var Lz=Bz;var Wyt="M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4853444 22.104033 11.423165 24.0625 13.84375 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 8.975298 28.305952 7.03125 25.875 7.03125 L 13.84375 7.03125 z",jyt="M 27.34375 1.65625 L 5.28125 27.9375 L 8.09375 30.3125 L 30.15625 4.03125 L 27.34375 1.65625 z M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4724893 20.232036 9.5676108 20.7379 9.75 21.21875 L 21.65625 7.03125 L 13.84375 7.03125 z M 28.21875 7.71875 L 14.53125 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 9.8371439 29.456025 8.4902779 28.21875 7.71875 z";function _X(){this._cameraClicked=new _e,this._closeClicked=new _e,this.maxHeight=500,this.enableCamera=!1,this.isCameraTracking=!1,this.showInfo=!1,this.titleText="",this.description="",xe.track(this,["showInfo","titleText","description","maxHeight","enableCamera","isCameraTracking"]),this._loadingIndicatorHtml='<div class="cesium-infoBox-loadingContainer"><span class="cesium-infoBox-loading"></span></div>',this.cameraIconPath=void 0,xe.defineProperty(this,"cameraIconPath",{get:function(){return!this.enableCamera||this.isCameraTracking?jyt:Wyt}}),xe.defineProperty(this,"_bodyless",{get:function(){return!l(this.description)||this.description.length===0}})}_X.prototype.maxHeightOffset=function(e){return`${this.maxHeight-e}px`};Object.defineProperties(_X.prototype,{cameraClicked:{get:function(){return this._cameraClicked}},closeClicked:{get:function(){return this._closeClicked}}});var Nz=_X;function Fz(e){e=Dn(e);let t=document.createElement("div");t.className="cesium-infoBox",t.setAttribute("data-bind",'css: { "cesium-infoBox-visible" : showInfo, "cesium-infoBox-bodyless" : _bodyless }'),e.appendChild(t);let n=document.createElement("div");n.className="cesium-infoBox-title",n.setAttribute("data-bind","text: titleText"),t.appendChild(n);let i=document.createElement("button");i.type="button",i.className="cesium-button cesium-infoBox-camera",i.setAttribute("data-bind",'attr: { title: "Focus camera on object" },click: function () { cameraClicked.raiseEvent(this); },enable: enableCamera,cesiumSvgPath: { path: cameraIconPath, width: 32, height: 32 }'),t.appendChild(i);let o=document.createElement("button");o.type="button",o.className="cesium-infoBox-close",o.setAttribute("data-bind","click: function () { closeClicked.raiseEvent(this); }"),o.innerHTML="&times;",t.appendChild(o);let r=document.createElement("iframe");r.className="cesium-infoBox-iframe",r.setAttribute("sandbox","allow-same-origin allow-popups allow-forms"),r.setAttribute("data-bind","style : { maxHeight : maxHeightOffset(40) }"),r.setAttribute("allowfullscreen",!0),t.appendChild(r);let s=new Nz;xe.applyBindings(s,t),this._container=e,this._element=t,this._frame=r,this._viewModel=s,this._descriptionSubscription=void 0;let a=this;r.addEventListener("load",function(){let c=r.contentDocument,u=c.createElement("link");u.href=Jt("Widgets/InfoBox/InfoBoxDescription.css"),u.rel="stylesheet",u.type="text/css";let f=c.createElement("div");f.className="cesium-infoBox-description",c.head.appendChild(u),c.body.appendChild(f),a._descriptionSubscription=Da(s,"description",function(d){r.style.height="5px",f.innerHTML=d;let p=null,_=f.firstElementChild;if(_!==null&&f.childNodes.length===1){let x=window.getComputedStyle(_);if(x!==null){let C=x["background-color"],A=z.fromCssColorString(C);l(A)&&A.alpha!==0&&(p=x["background-color"])}}t.style["background-color"]=p;let m=f.getBoundingClientRect().height;r.style.height=`${m}px`})}),r.setAttribute("src","about:blank")}Object.defineProperties(Fz.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}},frame:{get:function(){return this._frame}}});Fz.prototype.isDestroyed=function(){return!1};Fz.prototype.destroy=function(){let e=this._container;return xe.cleanNode(this._element),e.removeChild(this._element),l(this._descriptionSubscription)&&this._descriptionSubscription.dispose(),ue(this)};var Vz=Fz;function CAe(){this.showInstructions=!1;let e=this;this._command=xn(function(){e.showInstructions=!e.showInstructions}),this._showClick=xn(function(){e._touch=!1}),this._showTouch=xn(function(){e._touch=!0}),this._touch=!1,this.tooltip="Navigation Instructions",xe.track(this,["tooltip","showInstructions","_touch"])}Object.defineProperties(CAe.prototype,{command:{get:function(){return this._command}},showClick:{get:function(){return this._showClick}},showTouch:{get:function(){return this._showTouch}}});var kz=CAe;function Uz(e){let t=Dn(e.container),n=new kz,i=y(e.instructionsInitiallyVisible,!1);n.showInstructions=i,n._svgPath="M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466z M17.328,24.371h-2.707v-2.596h2.707V24.371zM17.328,19.003v0.858h-2.707v-1.057c0-3.19,3.63-3.696,3.63-5.963c0-1.034-0.924-1.826-2.134-1.826c-1.254,0-2.354,0.924-2.354,0.924l-1.541-1.915c0,0,1.519-1.584,4.137-1.584c2.487,0,4.796,1.54,4.796,4.136C21.156,16.208,17.328,16.627,17.328,19.003z";let o=document.createElement("span");o.className="cesium-navigationHelpButton-wrapper",t.appendChild(o);let r=document.createElement("button");r.type="button",r.className="cesium-button cesium-toolbar-button cesium-navigation-help-button",r.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }"),o.appendChild(r);let s=document.createElement("div");s.className="cesium-navigation-help",s.setAttribute("data-bind",'css: { "cesium-navigation-help-visible" : showInstructions}'),o.appendChild(s);let a=document.createElement("button");a.type="button",a.className="cesium-navigation-button cesium-navigation-button-left",a.setAttribute("data-bind",'click: showClick, css: {"cesium-navigation-button-selected": !_touch, "cesium-navigation-button-unselected": _touch}');let c=document.createElement("img");c.src=Jt("Widgets/Images/NavigationHelp/Mouse.svg"),c.className="cesium-navigation-button-icon",c.style.width="25px",c.style.height="25px",a.appendChild(c),a.appendChild(document.createTextNode("Mouse"));let u=document.createElement("button");u.type="button",u.className="cesium-navigation-button cesium-navigation-button-right",u.setAttribute("data-bind",'click: showTouch, css: {"cesium-navigation-button-selected": _touch, "cesium-navigation-button-unselected": !_touch}');let f=document.createElement("img");f.src=Jt("Widgets/Images/NavigationHelp/Touch.svg"),f.className="cesium-navigation-button-icon",f.style.width="25px",f.style.height="25px",u.appendChild(f),u.appendChild(document.createTextNode("Touch")),s.appendChild(a),s.appendChild(u);let d=document.createElement("div");d.className="cesium-click-navigation-help cesium-navigation-help-instructions",d.setAttribute("data-bind",'css: { "cesium-click-navigation-help-visible" : !_touch}'),d.innerHTML=` <table> <tr> <td><img src="${Jt("Widgets/Images/NavigationHelp/MouseLeft.svg")}" width="48" height="48" /></td> <td> <div class="cesium-navigation-help-pan">Pan view</div> <div class="cesium-navigation-help-details">Left click + drag</div> </td> </tr> <tr> <td><img src="${Jt("Widgets/Images/NavigationHelp/MouseRight.svg")}" width="48" height="48" /></td> <td> <div class="cesium-navigation-help-zoom">Zoom view</div> <div class="cesium-navigation-help-details">Right click + drag, or</div> <div class="cesium-navigation-help-details">Mouse wheel scroll</div> </td> </tr> <tr> <td><img src="${Jt("Widgets/Images/NavigationHelp/MouseMiddle.svg")}" width="48" height="48" /></td> <td> <div class="cesium-navigation-help-rotate">Rotate view</div> <div class="cesium-navigation-help-details">Middle click + drag, or</div> <div class="cesium-navigation-help-details">CTRL + Left/Right click + drag</div> </td> </tr> </table>`,s.appendChild(d);let p=document.createElement("div");p.className="cesium-touch-navigation-help cesium-navigation-help-instructions",p.setAttribute("data-bind",'css: { "cesium-touch-navigation-help-visible" : _touch}'),p.innerHTML=` <table> <tr> <td><img src="${Jt("Widgets/Images/NavigationHelp/TouchDrag.svg")}" width="70" height="48" /></td> <td> <div class="cesium-navigation-help-pan">Pan view</div> <div class="cesium-navigation-help-details">One finger drag</div> </td> </tr> <tr> <td><img src="${Jt("Widgets/Images/NavigationHelp/TouchZoom.svg")}" width="70" height="48" /></td> <td> <div class="cesium-navigation-help-zoom">Zoom view</div> <div class="cesium-navigation-help-details">Two finger pinch</div> </td> </tr> <tr> <td><img src="${Jt("Widgets/Images/NavigationHelp/TouchTilt.svg")}" width="70" height="48" /></td> <td> <div class="cesium-navigation-help-rotate">Tilt view</div> <div class="cesium-navigation-help-details">Two finger drag, same direction</div> </td> </tr> <tr> <td><img src="${Jt("Widgets/Images/NavigationHelp/TouchRotate.svg")}" width="70" height="48" /></td> <td> <div class="cesium-navigation-help-tilt">Rotate view</div> <div class="cesium-navigation-help-details">Two finger drag, opposite direction</div> </td> </tr> </table>`,s.appendChild(p),xe.applyBindings(n,o),this._container=t,this._viewModel=n,this._wrapper=o,this._closeInstructions=function(_){o.contains(_.target)||(n.showInstructions=!1)},Et.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeInstructions,!0):(document.addEventListener("mousedown",this._closeInstructions,!0),document.addEventListener("touchstart",this._closeInstructions,!0))}Object.defineProperties(Uz.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Uz.prototype.isDestroyed=function(){return!1};Uz.prototype.destroy=function(){return Et.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeInstructions,!0):(document.removeEventListener("mousedown",this._closeInstructions,!0),document.removeEventListener("touchstart",this._closeInstructions,!0)),xe.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),ue(this)};var zz=Uz;function gX(e){this._scene=e.scene,this.lowFrameRateMessage=y(e.lowFrameRateMessage,"This application appears to be performing poorly on your system. Please try using a different web browser or updating your video drivers."),this.lowFrameRateMessageDismissed=!1,this.showingLowFrameRateMessage=!1,xe.track(this,["lowFrameRateMessage","lowFrameRateMessageDismissed","showingLowFrameRateMessage"]);let t=this;this._dismissMessage=xn(function(){t.showingLowFrameRateMessage=!1,t.lowFrameRateMessageDismissed=!0});let n=$k.fromScene(e.scene);this._unsubscribeLowFrameRate=n.lowFrameRate.addEventListener(function(){t.lowFrameRateMessageDismissed||(t.showingLowFrameRateMessage=!0)}),this._unsubscribeNominalFrameRate=n.nominalFrameRate.addEventListener(function(){t.showingLowFrameRateMessage=!1})}Object.defineProperties(gX.prototype,{scene:{get:function(){return this._scene}},dismissMessage:{get:function(){return this._dismissMessage}}});gX.prototype.destroy=function(){return this._unsubscribeLowFrameRate(),this._unsubscribeNominalFrameRate(),ue(this)};var Hz=gX;function Gz(e){let t=Dn(e.container),n=new Hz(e),i=document.createElement("div");i.className="cesium-performance-watchdog-message-area",i.setAttribute("data-bind","visible: showingLowFrameRateMessage");let o=document.createElement("button");o.setAttribute("type","button"),o.className="cesium-performance-watchdog-message-dismiss",o.innerHTML="&times;",o.setAttribute("data-bind","click: dismissMessage"),i.appendChild(o);let r=document.createElement("div");r.className="cesium-performance-watchdog-message",r.setAttribute("data-bind","html: lowFrameRateMessage"),i.appendChild(r),t.appendChild(i),xe.applyBindings(n,i),this._container=t,this._viewModel=n,this._element=i}Object.defineProperties(Gz.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Gz.prototype.isDestroyed=function(){return!1};Gz.prototype.destroy=function(){return this._viewModel.destroy(),xe.cleanNode(this._element),this._container.removeChild(this._element),ue(this)};var Wz=Gz;function jz(e){this._scene=e,this._orthographic=e.camera.frustum instanceof Qt,this._flightInProgress=!1,this.dropDownVisible=!1,this.tooltipPerspective="Perspective Projection",this.tooltipOrthographic="Orthographic Projection",this.selectedTooltip=void 0,this.sceneMode=e.mode,xe.track(this,["_orthographic","_flightInProgress","sceneMode","dropDownVisible","tooltipPerspective","tooltipOrthographic"]);let t=this;xe.defineProperty(this,"selectedTooltip",function(){return t._orthographic?t.tooltipOrthographic:t.tooltipPerspective}),this._toggleDropDown=xn(function(){t.sceneMode===te.SCENE2D||t._flightInProgress||(t.dropDownVisible=!t.dropDownVisible)}),this._eventHelper=new Gr,this._eventHelper.add(e.morphComplete,function(n,i,o,r){t.sceneMode=o,t._orthographic=o===te.SCENE2D||t._scene.camera.frustum instanceof Qt}),this._eventHelper.add(e.preRender,function(){t._flightInProgress=l(e.camera._currentFlight)}),this._switchToPerspective=xn(function(){t.sceneMode!==te.SCENE2D&&(t._scene.camera.switchToPerspectiveFrustum(),t._orthographic=!1,t.dropDownVisible=!1)}),this._switchToOrthographic=xn(function(){t.sceneMode!==te.SCENE2D&&(t._scene.camera.switchToOrthographicFrustum(),t._orthographic=!0,t.dropDownVisible=!1)}),this._sceneMode=te}Object.defineProperties(jz.prototype,{scene:{get:function(){return this._scene}},toggleDropDown:{get:function(){return this._toggleDropDown}},switchToPerspective:{get:function(){return this._switchToPerspective}},switchToOrthographic:{get:function(){return this._switchToOrthographic}},isOrthographicProjection:{get:function(){return this._orthographic}}});jz.prototype.isDestroyed=function(){return!1};jz.prototype.destroy=function(){this._eventHelper.removeAll(),ue(this)};var qz=jz;var qyt="M 28.15625,10.4375 9.125,13.21875 13.75,43.25 41.75,55.09375 50.8125,37 54.5,11.9375 z m 0.125,3 19.976451,0.394265 L 43.03125,16.875 22.6875,14.28125 z M 50.971746,15.705477 47.90625,36.03125 42.53125,46 44.84375,19.3125 z M 12.625,16.03125 l 29.15625,3.6875 -2.65625,31 L 16.4375,41.125 z",Yyt="m 31.560594,6.5254438 -20.75,12.4687502 0.1875,24.5625 22.28125,11.8125 19.5,-12 0.65625,-0.375 0,-0.75 0.0312,-23.21875 z m 0.0625,3.125 16.65625,9.5000002 -16.125,10.28125 -17.34375,-9.71875 z m 18.96875,11.1875002 0.15625,20.65625 -17.46875,10.59375 0.15625,-20.28125 z m -37.0625,1.25 17.21875,9.625 -0.15625,19.21875 -16.9375,-9 z";function Yz(e,t){e=Dn(e);let n=new qz(t);n._perspectivePath=qyt,n._orthographicPath=Yyt;let i=document.createElement("span");i.className="cesium-projectionPicker-wrapper cesium-toolbar-button",e.appendChild(i);let o=document.createElement("button");o.type="button",o.className="cesium-button cesium-toolbar-button",o.setAttribute("data-bind",'css: { "cesium-projectionPicker-buttonPerspective": !_orthographic, "cesium-projectionPicker-buttonOrthographic": _orthographic, "cesium-button-disabled" : sceneMode === _sceneMode.SCENE2D || _flightInProgress, "cesium-projectionPicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),o.innerHTML='<!-- ko cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64, css: "cesium-projectionPicker-iconPerspective" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64, css: "cesium-projectionPicker-iconOrthographic" } --><!-- /ko -->',i.appendChild(o);let r=document.createElement("button");r.type="button",r.className="cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon",r.setAttribute("data-bind",'css: { "cesium-projectionPicker-visible" : (dropDownVisible && _orthographic), "cesium-projectionPicker-none" : !_orthographic, "cesium-projectionPicker-hidden" : !dropDownVisible },attr: { title: tooltipPerspective },click: switchToPerspective,cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64 }'),i.appendChild(r);let s=document.createElement("button");s.type="button",s.className="cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon",s.setAttribute("data-bind",'css: { "cesium-projectionPicker-visible" : (dropDownVisible && !_orthographic), "cesium-projectionPicker-none" : _orthographic, "cesium-projectionPicker-hidden" : !dropDownVisible},attr: { title: tooltipOrthographic },click: switchToOrthographic,cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64 }'),i.appendChild(s),xe.applyBindings(n,i),this._viewModel=n,this._container=e,this._wrapper=i,this._closeDropDown=function(a){i.contains(a.target)||(n.dropDownVisible=!1)},Et.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(Yz.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Yz.prototype.isDestroyed=function(){return!1};Yz.prototype.destroy=function(){return this._viewModel.destroy(),Et.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),xe.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),ue(this)};var Xz=Yz;function Kz(e,t){this._scene=e;let n=this,i=function(o,r,s,a){n.sceneMode=s,n.dropDownVisible=!1};this._eventHelper=new Gr,this._eventHelper.add(e.morphStart,i),this._duration=y(t,2),this.sceneMode=e.mode,this.dropDownVisible=!1,this.tooltip2D="2D",this.tooltip3D="3D",this.tooltipColumbusView="Columbus View",xe.track(this,["sceneMode","dropDownVisible","tooltip2D","tooltip3D","tooltipColumbusView"]),this.selectedTooltip=void 0,xe.defineProperty(this,"selectedTooltip",function(){let o=n.sceneMode;return o===te.SCENE2D?n.tooltip2D:o===te.SCENE3D?n.tooltip3D:n.tooltipColumbusView}),this._toggleDropDown=xn(function(){n.dropDownVisible=!n.dropDownVisible}),this._morphTo2D=xn(function(){e.morphTo2D(n._duration)}),this._morphTo3D=xn(function(){e.morphTo3D(n._duration)}),this._morphToColumbusView=xn(function(){e.morphToColumbusView(n._duration)}),this._sceneMode=te}Object.defineProperties(Kz.prototype,{scene:{get:function(){return this._scene}},duration:{get:function(){return this._duration},set:function(e){this._duration=e}},toggleDropDown:{get:function(){return this._toggleDropDown}},morphTo2D:{get:function(){return this._morphTo2D}},morphTo3D:{get:function(){return this._morphTo3D}},morphToColumbusView:{get:function(){return this._morphToColumbusView}}});Kz.prototype.isDestroyed=function(){return!1};Kz.prototype.destroy=function(){this._eventHelper.removeAll(),ue(this)};var $z=Kz;var Xyt="m 32.401392,4.9330437 c -7.087603,0 -14.096095,2.884602 -19.10793,7.8946843 -5.0118352,5.010083 -7.9296167,11.987468 -7.9296167,19.072999 0,7.085531 2.9177815,14.097848 7.9296167,19.107931 4.837653,4.835961 11.541408,7.631372 18.374354,7.82482 0.05712,0.01231 0.454119,0.139729 0.454119,0.139729 l 0.03493,-0.104797 c 0.08246,7.84e-4 0.162033,0.03493 0.244525,0.03493 0.08304,0 0.161515,-0.03414 0.244526,-0.03493 l 0.03493,0.104797 c 0,0 0.309474,-0.129487 0.349323,-0.139729 6.867765,-0.168094 13.582903,-2.965206 18.444218,-7.82482 2.558195,-2.5573 4.551081,-5.638134 5.903547,-8.977584 1.297191,-3.202966 2.02607,-6.661489 2.02607,-10.130347 0,-6.237309 -2.366261,-12.31219 -6.322734,-17.116794 -0.0034,-0.02316 0.0049,-0.04488 0,-0.06986 -0.01733,-0.08745 -0.104529,-0.278855 -0.104797,-0.279458 -5.31e-4,-0.0012 -0.522988,-0.628147 -0.523984,-0.62878 -3.47e-4,-2.2e-4 -0.133444,-0.03532 -0.244525,-0.06987 C 51.944299,13.447603 51.751076,13.104317 51.474391,12.827728 46.462556,7.8176457 39.488996,4.9330437 32.401392,4.9330437 z m -2.130866,3.5281554 0.104797,9.6762289 c -4.111695,-0.08361 -7.109829,-0.423664 -9.257041,-0.943171 1.198093,-2.269271 2.524531,-4.124404 3.91241,-5.414496 2.167498,-2.0147811 3.950145,-2.8540169 5.239834,-3.3185619 z m 2.794579,0 c 1.280302,0.4754953 3.022186,1.3285948 5.065173,3.2486979 1.424667,1.338973 2.788862,3.303645 3.982275,5.728886 -2.29082,0.403367 -5.381258,0.621049 -8.942651,0.698645 L 33.065105,8.4611991 z m 5.728886,0.2445256 c 4.004072,1.1230822 7.793098,3.1481363 10.724195,6.0782083 0.03468,0.03466 0.07033,0.06991 0.104797,0.104797 -0.45375,0.313891 -0.923054,0.663002 -1.956205,1.082899 -0.647388,0.263114 -1.906242,0.477396 -2.829511,0.733577 -1.382296,-2.988132 -3.027146,-5.368585 -4.785716,-7.0213781 -0.422866,-0.397432 -0.835818,-0.6453247 -1.25756,-0.9781032 z m -15.33525,0.7685092 c -0.106753,0.09503 -0.207753,0.145402 -0.31439,0.244526 -1.684973,1.5662541 -3.298068,3.8232211 -4.680919,6.5672591 -0.343797,-0.14942 -1.035052,-0.273198 -1.292493,-0.419186 -0.956528,-0.542427 -1.362964,-1.022024 -1.537018,-1.292493 -0.0241,-0.03745 -0.01868,-0.0401 -0.03493,-0.06986 2.250095,-2.163342 4.948824,-3.869984 7.859752,-5.0302421 z m -9.641296,7.0912431 c 0.464973,0.571618 0.937729,1.169056 1.956205,1.746612 0.349907,0.198425 1.107143,0.335404 1.537018,0.523983 -1.20166,3.172984 -1.998037,7.051901 -2.165798,11.772162 C 14.256557,30.361384 12.934823,30.161483 12.280427,29.90959 10.644437,29.279855 9.6888882,28.674891 9.1714586,28.267775 8.6540289,27.860658 8.6474751,27.778724 8.6474751,27.778724 l -0.069864,0.03493 C 9.3100294,23.691285 11.163248,19.798527 13.817445,16.565477 z m 37.552149,0.523984 c 2.548924,3.289983 4.265057,7.202594 4.890513,11.318043 -0.650428,0.410896 -1.756876,1.001936 -3.563088,1.606882 -1.171552,0.392383 -3.163859,0.759153 -4.960377,1.117832 -0.04367,-4.752703 -0.784809,-8.591423 -1.88634,-11.807094 0.917574,-0.263678 2.170552,-0.486495 2.864443,-0.76851 1.274693,-0.518066 2.003942,-1.001558 2.654849,-1.467153 z m -31.439008,2.619917 c 2.487341,0.672766 5.775813,1.137775 10.479669,1.222628 l 0.104797,10.689263 0,0.03493 0,0.733577 c -5.435005,-0.09059 -9.512219,-0.519044 -12.610536,-1.117831 0.106127,-4.776683 0.879334,-8.55791 2.02607,-11.562569 z m 23.264866,0.31439 c 1.073459,3.067541 1.833795,6.821314 1.816476,11.702298 -3.054474,0.423245 -7.062018,0.648559 -11.702298,0.698644 l 0,-0.838373 -0.104796,-10.654331 c 4.082416,-0.0864 7.404468,-0.403886 9.990618,-0.908238 z M 8.2632205,30.922625 c 0.7558676,0.510548 1.5529563,1.013339 3.0041715,1.57195 0.937518,0.360875 2.612202,0.647642 3.91241,0.978102 0.112814,3.85566 0.703989,7.107756 1.606883,9.920754 -1.147172,-0.324262 -2.644553,-0.640648 -3.423359,-0.978102 -1.516688,-0.657177 -2.386627,-1.287332 -2.864443,-1.71168 -0.477816,-0.424347 -0.489051,-0.489051 -0.489051,-0.489051 L 9.8002387,40.319395 C 8.791691,37.621767 8.1584238,34.769583 8.1584238,31.900727 c 0,-0.330153 0.090589,-0.648169 0.1047967,-0.978102 z m 48.2763445,0.419186 c 0.0047,0.188973 0.06986,0.36991 0.06986,0.558916 0,2.938869 -0.620228,5.873558 -1.676747,8.628261 -0.07435,0.07583 -0.06552,0.07411 -0.454119,0.349323 -0.606965,0.429857 -1.631665,1.042044 -3.318562,1.676747 -1.208528,0.454713 -3.204964,0.850894 -5.135038,1.25756 0.84593,-2.765726 1.41808,-6.005357 1.606883,-9.815957 2.232369,-0.413371 4.483758,-0.840201 5.938479,-1.327425 1.410632,-0.472457 2.153108,-0.89469 2.96924,-1.327425 z m -38.530252,2.864443 c 3.208141,0.56697 7.372279,0.898588 12.575603,0.978103 l 0.174662,9.885821 c -4.392517,-0.06139 -8.106722,-0.320566 -10.863925,-0.803441 -1.051954,-2.664695 -1.692909,-6.043794 -1.88634,-10.060483 z m 26.793022,0.31439 c -0.246298,3.923551 -0.877762,7.263679 -1.816476,9.885822 -2.561957,0.361954 -5.766249,0.560708 -9.431703,0.62878 l -0.174661,-9.815957 c 4.491734,-0.04969 8.334769,-0.293032 11.42284,-0.698645 z M 12.035901,44.860585 c 0.09977,0.04523 0.105535,0.09465 0.209594,0.139729 1.337656,0.579602 3.441099,1.058072 5.589157,1.537018 1.545042,3.399208 3.548524,5.969402 5.589157,7.789888 -3.034411,-1.215537 -5.871615,-3.007978 -8.174142,-5.309699 -1.245911,-1.245475 -2.271794,-2.662961 -3.213766,-4.156936 z m 40.69605,0 c -0.941972,1.493975 -1.967855,2.911461 -3.213765,4.156936 -2.74253,2.741571 -6.244106,4.696717 -9.955686,5.868615 0.261347,-0.241079 0.507495,-0.394491 0.768509,-0.663713 1.674841,-1.727516 3.320792,-4.181056 4.645987,-7.265904 2.962447,-0.503021 5.408965,-1.122293 7.161107,-1.781544 0.284034,-0.106865 0.337297,-0.207323 0.593848,-0.31439 z m -31.404076,2.305527 c 2.645807,0.376448 5.701178,0.649995 9.466635,0.698645 l 0.139729,7.789888 c -1.38739,-0.480844 -3.316218,-1.29837 -5.659022,-3.388427 -1.388822,-1.238993 -2.743668,-3.0113 -3.947342,-5.100106 z m 20.365491,0.104797 c -1.04872,2.041937 -2.174337,3.779068 -3.353494,4.995309 -1.853177,1.911459 -3.425515,2.82679 -4.611055,3.353494 l -0.139729,-7.789887 c 3.13091,-0.05714 5.728238,-0.278725 8.104278,-0.558916 z",Kyt="m 2.9825053,17.550598 0,1.368113 0,26.267766 0,1.368113 1.36811,0 54.9981397,0 1.36811,0 0,-1.368113 0,-26.267766 0,-1.368113 -1.36811,0 -54.9981397,0 -1.36811,0 z m 2.73623,2.736226 10.3292497,0 0,10.466063 -10.3292497,0 0,-10.466063 z m 13.0654697,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 10.32926,0 0,10.466063 -10.32926,0 0,-10.466063 z m -41.9326497,13.202288 10.3292497,0 0,10.329252 -10.3292497,0 0,-10.329252 z m 13.0654697,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 10.32926,0 0,10.329252 -10.32926,0 0,-10.329252 z",$yt="m 14.723969,17.675598 -0.340489,0.817175 -11.1680536,26.183638 -0.817175,1.872692 2.076986,0 54.7506996,0 2.07698,0 -0.81717,-1.872692 -11.16805,-26.183638 -0.34049,-0.817175 -0.91933,0 -32.414586,0 -0.919322,0 z m 1.838643,2.723916 6.196908,0 -2.928209,10.418977 -7.729111,0 4.460412,-10.418977 z m 9.02297,0 4.903049,0 0,10.418977 -7.831258,0 2.928209,-10.418977 z m 7.626964,0 5.584031,0 2.62176,10.418977 -8.205791,0 0,-10.418977 z m 8.410081,0 5.51593,0 4.46042,10.418977 -7.38863,0 -2.58772,-10.418977 z m -30.678091,13.142892 8.103649,0 -2.89416,10.282782 -9.6018026,0 4.3923136,-10.282782 z m 10.929711,0 8.614384,0 0,10.282782 -11.508544,0 2.89416,-10.282782 z m 11.338299,0 8.852721,0 2.58772,10.282782 -11.440441,0 0,-10.282782 z m 11.678781,0 7.86531,0 4.39231,10.282782 -9.6699,0 -2.58772,-10.282782 z";function Zz(e,t,n){e=Dn(e);let i=new $z(t,n);i._globePath=Xyt,i._flatMapPath=Kyt,i._columbusViewPath=$yt;let o=document.createElement("span");o.className="cesium-sceneModePicker-wrapper cesium-toolbar-button",e.appendChild(o);let r=document.createElement("button");r.type="button",r.className="cesium-button cesium-toolbar-button",r.setAttribute("data-bind",'css: { "cesium-sceneModePicker-button2D": sceneMode === _sceneMode.SCENE2D, "cesium-sceneModePicker-button3D": sceneMode === _sceneMode.SCENE3D, "cesium-sceneModePicker-buttonColumbusView": sceneMode === _sceneMode.COLUMBUS_VIEW, "cesium-sceneModePicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),r.innerHTML='<!-- ko cesiumSvgPath: { path: _globePath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon3D" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon2D" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-iconColumbusView" } --><!-- /ko -->',o.appendChild(r);let s=document.createElement("button");s.type="button",s.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",s.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE3D)) || (!dropDownVisible && (sceneMode === _sceneMode.SCENE3D)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE3D, "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip3D },click: morphTo3D,cesiumSvgPath: { path: _globePath, width: 64, height: 64 }'),o.appendChild(s);let a=document.createElement("button");a.type="button",a.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",a.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE2D)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE2D, "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip2D },click: morphTo2D,cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64 }'),o.appendChild(a);let c=document.createElement("button");c.type="button",c.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",c.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.COLUMBUS_VIEW)) || (!dropDownVisible && (sceneMode === _sceneMode.COLUMBUS_VIEW)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.COLUMBUS_VIEW, "cesium-sceneModePicker-hidden" : !dropDownVisible},attr: { title: tooltipColumbusView },click: morphToColumbusView,cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64 }'),o.appendChild(c),xe.applyBindings(i,o),this._viewModel=i,this._container=e,this._wrapper=o,this._closeDropDown=function(u){o.contains(u.target)||(i.dropDownVisible=!1)},Et.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(Zz.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Zz.prototype.isDestroyed=function(){return!1};Zz.prototype.destroy=function(){return this._viewModel.destroy(),Et.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),xe.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),ue(this)};var Jz=Zz;var Zyt=new G,Qz="-1000px";function cP(e,t,n){this._scene=e,this._screenPositionX=Qz,this._screenPositionY=Qz,this._tweens=e.tweens,this._container=y(n,document.body),this._selectionIndicatorElement=t,this._scale=1,this.position=void 0,this.showSelection=!1,xe.track(this,["position","_screenPositionX","_screenPositionY","_scale","showSelection"]),this.isVisible=void 0,xe.defineProperty(this,"isVisible",{get:function(){return this.showSelection&&l(this.position)}}),xe.defineProperty(this,"_transform",{get:function(){return`scale(${this._scale})`}}),this.computeScreenSpacePosition=function(i,o){return Qi.wgs84ToWindowCoordinates(e,i,o)}}cP.prototype.update=function(){if(this.showSelection&&l(this.position)){let e=this.computeScreenSpacePosition(this.position,Zyt);if(!l(e))this._screenPositionX=Qz,this._screenPositionY=Qz;else{let t=this._container,n=t.parentNode.clientWidth,i=t.parentNode.clientHeight,o=this._selectionIndicatorElement.clientWidth,r=o*.5;e.x=Math.min(Math.max(e.x,-o),n+o)-r,e.y=Math.min(Math.max(e.y,-o),i+o)-r,this._screenPositionX=`${Math.floor(e.x+.25)}px`,this._screenPositionY=`${Math.floor(e.y+.25)}px`}}};cP.prototype.animateAppear=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:2,stopValue:1,duration:.8,easingFunction:Hr.EXPONENTIAL_OUT})};cP.prototype.animateDepart=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:this._scale,stopValue:1.5,duration:.8,easingFunction:Hr.EXPONENTIAL_OUT})};Object.defineProperties(cP.prototype,{container:{get:function(){return this._container}},selectionIndicatorElement:{get:function(){return this._selectionIndicatorElement}},scene:{get:function(){return this._scene}}});var e8=cP;function t8(e,t){e=Dn(e),this._container=e;let n=document.createElement("div");n.className="cesium-selection-wrapper",n.setAttribute("data-bind",'style: { "top" : _screenPositionY, "left" : _screenPositionX },css: { "cesium-selection-wrapper-visible" : isVisible }'),e.appendChild(n),this._element=n;let i="http://www.w3.org/2000/svg",o="M -34 -34 L -34 -11.25 L -30 -15.25 L -30 -30 L -15.25 -30 L -11.25 -34 L -34 -34 z M 11.25 -34 L 15.25 -30 L 30 -30 L 30 -15.25 L 34 -11.25 L 34 -34 L 11.25 -34 z M -34 11.25 L -34 34 L -11.25 34 L -15.25 30 L -30 30 L -30 15.25 L -34 11.25 z M 34 11.25 L 30 15.25 L 30 30 L 15.25 30 L 11.25 34 L 34 34 L 34 11.25 z",r=document.createElementNS(i,"svg:svg");r.setAttribute("width",160),r.setAttribute("height",160),r.setAttribute("viewBox","0 0 160 160");let s=document.createElementNS(i,"g");s.setAttribute("transform","translate(80,80)"),r.appendChild(s);let a=document.createElementNS(i,"path");a.setAttribute("data-bind","attr: { transform: _transform }"),a.setAttribute("d",o),s.appendChild(a),n.appendChild(r);let c=new e8(t,this._element,this._container);this._viewModel=c,xe.applyBindings(this._viewModel,this._element)}Object.defineProperties(t8.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});t8.prototype.isDestroyed=function(){return!1};t8.prototype.destroy=function(){let e=this._container;return xe.cleanNode(this._element),e.removeChild(this._element),ue(this)};var n8=t8;function OC(e,t,n){this._color=e,this._height=t,this._base=y(n,0)}OC.prototype.getHeight=function(){return this._height};OC.prototype.getBase=function(){return this._base};OC.prototype.getStartTime=function(){return this._start};OC.prototype.getStopTime=function(){return this._stop};OC.prototype.setRange=function(e,t){this._start=e,this._stop=t};OC.prototype.render=function(e){let t="";if(this._start&&this._stop&&this._color){let n=ee.secondsDifference(this._start,e.epochJulian),i=Math.round(e.timeBarWidth*e.getAlpha(n)),o=ee.secondsDifference(this._stop,e.epochJulian),r=Math.round(e.timeBarWidth*e.getAlpha(o))-i;i<0&&(r+=i,i=0),i+r>e.timeBarWidth&&(r=e.timeBarWidth-i),r>0&&(t=`<span class="cesium-timeline-highlight" style="left: ${i.toString()}px; width: ${r.toString()}px; bottom: ${this._base.toString()}px; height: ${this._height}px; background-color: ${this._color};"></span>`)}return t};var i8=OC;function AAe(e,t,n,i){this.interval=e,this.height=t,this.color=n||new z(.5,.5,.5,1),this.backgroundColor=i||new z(0,0,0,0)}AAe.prototype.render=function(e,t){let n=this.interval.start,i=this.interval.stop,o=t.startJulian,r=ee.addSeconds(t.startJulian,t.duration,new ee);if(ee.lessThan(n,o)&&ee.greaterThan(i,r))e.fillStyle=this.color.toCssColorString(),e.fillRect(0,t.y,t.timeBarWidth,this.height);else if(ee.lessThanOrEquals(n,r)&&ee.greaterThanOrEquals(i,o)){let s,a,c;for(s=0;s<t.timeBarWidth;++s){let u=ee.addSeconds(t.startJulian,s/t.timeBarWidth*t.duration,new ee);!l(a)&&ee.greaterThanOrEquals(u,n)?a=s:!l(c)&&ee.greaterThanOrEquals(u,i)&&(c=s)}e.fillStyle=this.backgroundColor.toCssColorString(),e.fillRect(0,t.y,t.timeBarWidth,this.height),l(a)&&(l(c)||(c=t.timeBarWidth),e.fillStyle=this.color.toCssColorString(),e.fillRect(a,t.y,Math.max(c-a,1),this.height))}};var o8=AAe;var yX=1e12,jf={none:0,scrub:1,slide:2,zoom:3,touchOnly:4},qc={none:0,scrub:1,slideZoom:2,singleTap:3,ignore:4},$0=[.001,.002,.005,.01,.02,.05,.1,.25,.5,1,2,5,10,15,30,60,120,300,600,900,1800,3600,7200,14400,21600,43200,86400,172800,345600,604800,1296e3,2592e3,5184e3,7776e3,15552e3,31536e3,63072e3,126144e3,15768e4,31536e4,63072e4,126144e4,15768e5,31536e5,63072e5,126144e5,15768e6,31536e6],Jyt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Yc(e,t){e=Dn(e);let n=e.ownerDocument;this.container=e;let i=n.createElement("div");i.className="cesium-timeline-main",e.appendChild(i),this._topDiv=i,this._endJulian=void 0,this._epochJulian=void 0,this._lastXPos=void 0,this._scrubElement=void 0,this._startJulian=void 0,this._timeBarSecondsSpan=void 0,this._clock=t,this._scrubJulian=t.currentTime,this._mainTicSpan=-1,this._mouseMode=jf.none,this._touchMode=qc.none,this._touchState={centerX:0,spanX:0},this._mouseX=0,this._timelineDrag=0,this._timelineDragLocation=void 0,this._lastHeight=void 0,this._lastWidth=void 0,this._topDiv.innerHTML='<div class="cesium-timeline-bar"></div><div class="cesium-timeline-trackContainer"><canvas class="cesium-timeline-tracks" width="10" height="1"></canvas></div><div class="cesium-timeline-needle"></div><span class="cesium-timeline-ruler"></span>',this._timeBarEle=this._topDiv.childNodes[0],this._trackContainer=this._topDiv.childNodes[1],this._trackListEle=this._topDiv.childNodes[1].childNodes[0],this._needleEle=this._topDiv.childNodes[2],this._rulerEle=this._topDiv.childNodes[3],this._context=this._trackListEle.getContext("2d"),this._trackList=[],this._highlightRanges=[],this.zoomTo(t.startTime,t.stopTime),this._onMouseDown=Qyt(this),this._onMouseUp=ext(this),this._onMouseMove=txt(this),this._onMouseWheel=nxt(this),this._onTouchStart=ixt(this),this._onTouchMove=rxt(this),this._onTouchEnd=oxt(this);let o=this._timeBarEle;n.addEventListener("mouseup",this._onMouseUp,!1),n.addEventListener("mousemove",this._onMouseMove,!1),o.addEventListener("mousedown",this._onMouseDown,!1),o.addEventListener("DOMMouseScroll",this._onMouseWheel,!1),o.addEventListener("mousewheel",this._onMouseWheel,!1),o.addEventListener("touchstart",this._onTouchStart,!1),o.addEventListener("touchmove",this._onTouchMove,!1),o.addEventListener("touchend",this._onTouchEnd,!1),o.addEventListener("touchcancel",this._onTouchEnd,!1),this._topDiv.oncontextmenu=function(){return!1},t.onTick.addEventListener(this.updateFromClock,this),this.updateFromClock()}Yc.prototype.addEventListener=function(e,t,n){this._topDiv.addEventListener(e,t,n)};Yc.prototype.removeEventListener=function(e,t,n){this._topDiv.removeEventListener(e,t,n)};Yc.prototype.isDestroyed=function(){return!1};Yc.prototype.destroy=function(){this._clock.onTick.removeEventListener(this.updateFromClock,this);let e=this.container.ownerDocument;e.removeEventListener("mouseup",this._onMouseUp,!1),e.removeEventListener("mousemove",this._onMouseMove,!1);let t=this._timeBarEle;t.removeEventListener("mousedown",this._onMouseDown,!1),t.removeEventListener("DOMMouseScroll",this._onMouseWheel,!1),t.removeEventListener("mousewheel",this._onMouseWheel,!1),t.removeEventListener("touchstart",this._onTouchStart,!1),t.removeEventListener("touchmove",this._onTouchMove,!1),t.removeEventListener("touchend",this._onTouchEnd,!1),t.removeEventListener("touchcancel",this._onTouchEnd,!1),this.container.removeChild(this._topDiv),ue(this)};Yc.prototype.addHighlightRange=function(e,t,n){let i=new i8(e,t,n);return this._highlightRanges.push(i),this.resize(),i};Yc.prototype.addTrack=function(e,t,n,i){let o=new o8(e,t,n,i);return this._trackList.push(o),this._lastHeight=void 0,this.resize(),o};Yc.prototype.zoomTo=function(e,t){if(this._startJulian=e,this._endJulian=t,this._timeBarSecondsSpan=ee.secondsDifference(t,e),this._clock&&this._clock.clockRange!==zr.UNBOUNDED){let i=this._clock.startTime,o=this._clock.stopTime,r=ee.secondsDifference(o,i),s=ee.secondsDifference(i,this._startJulian),a=ee.secondsDifference(o,this._endJulian);this._timeBarSecondsSpan>=r?(this._timeBarSecondsSpan=r,this._startJulian=this._clock.startTime,this._endJulian=this._clock.stopTime):s>0?(this._endJulian=ee.addSeconds(this._endJulian,s,new ee),this._startJulian=i,this._timeBarSecondsSpan=ee.secondsDifference(this._endJulian,this._startJulian)):a<0&&(this._startJulian=ee.addSeconds(this._startJulian,a,new ee),this._endJulian=o,this._timeBarSecondsSpan=ee.secondsDifference(this._endJulian,this._startJulian))}this._makeTics();let n=document.createEvent("Event");n.initEvent("setzoom",!0,!0),n.startJulian=this._startJulian,n.endJulian=this._endJulian,n.epochJulian=this._epochJulian,n.totalSpan=this._timeBarSecondsSpan,n.mainTicSpan=this._mainTicSpan,this._topDiv.dispatchEvent(n)};Yc.prototype.zoomFrom=function(e){let t=ee.secondsDifference(this._scrubJulian,this._startJulian);e>1||t<0||t>this._timeBarSecondsSpan?t=this._timeBarSecondsSpan*.5:t+=t-this._timeBarSecondsSpan*.5;let n=this._timeBarSecondsSpan-t;this.zoomTo(ee.addSeconds(this._startJulian,t-t*e,new ee),ee.addSeconds(this._endJulian,n*e-n,new ee))};function xX(e){return e<10?`0${e.toString()}`:e.toString()}Yc.prototype.makeLabel=function(e){let t=ee.toGregorianDate(e),n=t.millisecond,i=" UTC";if(n>0&&this._timeBarSecondsSpan<3600){for(i=Math.floor(n).toString();i.length<3;)i=`0${i}`;i=`.${i}`}return`${Jyt[t.month-1]} ${t.day} ${t.year} ${xX(t.hour)}:${xX(t.minute)}:${xX(t.second)}${i}`};Yc.prototype.smallestTicInPixels=7;Yc.prototype._makeTics=function(){let e=this._timeBarEle,t=ee.secondsDifference(this._scrubJulian,this._startJulian),n=Math.round(t*this._topDiv.clientWidth/this._timeBarSecondsSpan),i=n-8,o,r=this;this._needleEle.style.left=`${n.toString()}px`;let s="",a=.01,c=31536e6,u=1e-10,f=0,d=this._timeBarSecondsSpan;d<a?(d=a,this._timeBarSecondsSpan=a,this._endJulian=ee.addSeconds(this._startJulian,a,new ee)):d>c&&(d=c,this._timeBarSecondsSpan=c,this._endJulian=ee.addSeconds(this._startJulian,c,new ee));let p=this._timeBarEle.clientWidth;p<10&&(p=10);let _=this._startJulian,m=Math.min(d/p*1e-5,.4),x,C=ee.toGregorianDate(_);d>31536e4?x=ee.fromDate(new Date(Date.UTC(Math.floor(C.year/100)*100,0))):d>31536e3?x=ee.fromDate(new Date(Date.UTC(Math.floor(C.year/10)*10,0))):d>86400?x=ee.fromDate(new Date(Date.UTC(C.year,0))):x=ee.fromDate(new Date(Date.UTC(C.year,C.month,C.day)));let A=ee.secondsDifference(this._startJulian,ee.addSeconds(x,m,new ee)),T=A+d;this._epochJulian=x;function b(F){return Math.floor(A/F)*F}function S(F,Y){return Math.ceil(F/Y+.5)*Y}function w(F){return(F-A)/d}function D(F,Y){return F-Y*Math.round(F/Y)}this._rulerEle.innerHTML=this.makeLabel(ee.addSeconds(this._endJulian,-a,new ee));let O=this._rulerEle.offsetWidth+20;O<30&&(O=180);let I=f;f-=u;let L={startTime:A,startJulian:_,epochJulian:x,duration:d,timeBarWidth:p,getAlpha:w};this._highlightRanges.forEach(function(F){s+=F.render(L)});let N=0,g=0,E=0,v=O/p;v>1&&(v=1),v*=this._timeBarSecondsSpan;let P=-1,M=-1,V=$0.length,U;for(U=0;U<V;++U){let F=$0[U];if(++P,N=F,F>v&&F>f)break;M<0&&p*(F/this._timeBarSecondsSpan)>=this.smallestTicInPixels&&(M=P)}if(P>0){for(;P>0;)if(--P,Math.abs(D(N,$0[P]))<1e-5){$0[P]>=f&&(g=$0[P]);break}if(M>=0)for(;M<P;){if(Math.abs(D(g,$0[M]))<1e-5&&$0[M]>=f){E=$0[M];break}++M}}f=I,f>u&&E<1e-5&&Math.abs(f-N)>u&&(E=f,f<=N+u&&(g=0));let k=-999999,H;if(p*(E/this._timeBarSecondsSpan)>=3)for(o=b(E);o<=T;o=S(o,E))s+=`<span class="cesium-timeline-ticTiny" style="left: ${Math.round(p*w(o)).toString()}px;"></span>`;if(p*(g/this._timeBarSecondsSpan)>=3)for(o=b(g);o<=T;o=S(o,g))s+=`<span class="cesium-timeline-ticSub" style="left: ${Math.round(p*w(o)).toString()}px;"></span>`;if(p*(N/this._timeBarSecondsSpan)>=2){this._mainTicSpan=N,T+=N,o=b(N);let F=ee.computeTaiMinusUtc(x);for(;o<=T;){let Y=ee.addSeconds(_,o-A,new ee);if(N>2.1){let $=ee.computeTaiMinusUtc(Y);Math.abs($-F)>.1&&(o+=$-F,Y=ee.addSeconds(_,o-A,new ee))}let j=Math.round(p*w(o)),X=this.makeLabel(Y);this._rulerEle.innerHTML=X,H=this._rulerEle.offsetWidth,H<10&&(H=O);let W=j-(H/2-1);W>k?(k=W+H+5,s+=`<span class="cesium-timeline-ticMain" style="left: ${j.toString()}px;"></span><span class="cesium-timeline-ticLabel" style="left: ${W.toString()}px;">${X}</span>`):s+=`<span class="cesium-timeline-ticSub" style="left: ${j.toString()}px;"></span>`,o=S(o,N)}}else this._mainTicSpan=-1;s+=`<span class="cesium-timeline-icon16" style="left:${i}px;bottom:0;background-position: 0 0;"></span>`,e.innerHTML=s,this._scrubElement=e.lastChild,this._context.clearRect(0,0,this._trackListEle.width,this._trackListEle.height),L.y=0,this._trackList.forEach(function(F){F.render(r._context,L),L.y+=F.height})};Yc.prototype.updateFromClock=function(){this._scrubJulian=this._clock.currentTime;let e=this._scrubElement;if(l(this._scrubElement)){let t=ee.secondsDifference(this._scrubJulian,this._startJulian),n=Math.round(t*this._topDiv.clientWidth/this._timeBarSecondsSpan);this._lastXPos!==n&&(this._lastXPos=n,e.style.left=`${n-8}px`,this._needleEle.style.left=`${n}px`)}l(this._timelineDragLocation)&&(this._setTimeBarTime(this._timelineDragLocation,this._timelineDragLocation*this._timeBarSecondsSpan/this._topDiv.clientWidth),this.zoomTo(ee.addSeconds(this._startJulian,this._timelineDrag,new ee),ee.addSeconds(this._endJulian,this._timelineDrag,new ee)))};Yc.prototype._setTimeBarTime=function(e,t){if(e=Math.round(e),this._scrubJulian=ee.addSeconds(this._startJulian,t,new ee),this._scrubElement){let i=e-8;this._scrubElement.style.left=`${i.toString()}px`,this._needleEle.style.left=`${e.toString()}px`}let n=document.createEvent("Event");n.initEvent("settime",!0,!0),n.clientX=e,n.timeSeconds=t,n.timeJulian=this._scrubJulian,n.clock=this._clock,this._topDiv.dispatchEvent(n)};function Qyt(e){return function(t){e._mouseMode!==jf.touchOnly&&(t.button===0?(e._mouseMode=jf.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition="-16px 0"),e._onMouseMove(t)):(e._mouseX=t.clientX,t.button===2?e._mouseMode=jf.zoom:e._mouseMode=jf.slide)),t.preventDefault()}}function ext(e){return function(t){e._mouseMode=jf.none,e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0"),e._timelineDrag=0,e._timelineDragLocation=void 0}}function txt(e){return function(t){let n;if(e._mouseMode===jf.scrub){t.preventDefault();let i=t.clientX-e._topDiv.getBoundingClientRect().left;i<0?(e._timelineDragLocation=0,e._timelineDrag=-.01*e._timeBarSecondsSpan):i>e._topDiv.clientWidth?(e._timelineDragLocation=e._topDiv.clientWidth,e._timelineDrag=.01*e._timeBarSecondsSpan):(e._timelineDragLocation=void 0,e._setTimeBarTime(i,i*e._timeBarSecondsSpan/e._topDiv.clientWidth))}else if(e._mouseMode===jf.slide){if(n=e._mouseX-t.clientX,e._mouseX=t.clientX,n!==0){let i=n*e._timeBarSecondsSpan/e._topDiv.clientWidth;e.zoomTo(ee.addSeconds(e._startJulian,i,new ee),ee.addSeconds(e._endJulian,i,new ee))}}else e._mouseMode===jf.zoom&&(n=e._mouseX-t.clientX,e._mouseX=t.clientX,n!==0&&e.zoomFrom(Math.pow(1.01,n)))}}function nxt(e){return function(t){let n=t.wheelDeltaY||t.wheelDelta||-t.detail;yX=Math.max(Math.min(Math.abs(n),yX),1),n/=yX,e.zoomFrom(Math.pow(1.05,-n))}}function ixt(e){return function(t){let n=t.touches.length,i,o,r=e._topDiv.getBoundingClientRect().left;t.preventDefault(),e._mouseMode=jf.touchOnly,n===1?(i=ee.secondsDifference(e._scrubJulian,e._startJulian),o=Math.round(i*e._topDiv.clientWidth/e._timeBarSecondsSpan+r),Math.abs(t.touches[0].clientX-o)<50?(e._touchMode=qc.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition=n===1?"-16px 0":"0 0")):(e._touchMode=qc.singleTap,e._touchState.centerX=t.touches[0].clientX-r)):n===2?(e._touchMode=qc.slideZoom,e._touchState.centerX=(t.touches[0].clientX+t.touches[1].clientX)*.5-r,e._touchState.spanX=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):e._touchMode=qc.ignore}}function oxt(e){return function(t){let n=t.touches.length,i=e._topDiv.getBoundingClientRect().left;e._touchMode===qc.singleTap?(e._touchMode=qc.scrub,e._onTouchMove(t)):e._touchMode===qc.scrub&&e._onTouchMove(t),e._mouseMode=jf.touchOnly,n!==1?e._touchMode=n>0?qc.ignore:qc.none:e._touchMode===qc.slideZoom&&(e._touchState.centerX=t.touches[0].clientX-i),e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0")}}function rxt(e){return function(t){let n,i,o,r,s,a,c=1,u=e._topDiv.getBoundingClientRect().left;e._touchMode===qc.singleTap&&(e._touchMode=qc.slideZoom),e._mouseMode=jf.touchOnly,e._touchMode===qc.scrub?(t.preventDefault(),t.changedTouches.length===1&&(i=t.changedTouches[0].clientX-u,i>=0&&i<=e._topDiv.clientWidth&&e._setTimeBarTime(i,i*e._timeBarSecondsSpan/e._topDiv.clientWidth))):e._touchMode===qc.slideZoom&&(o=t.touches.length,o===2?(r=(t.touches[0].clientX+t.touches[1].clientX)*.5-u,s=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):o===1&&(r=t.touches[0].clientX-u,s=0),l(r)&&(s>0&&e._touchState.spanX>0?(c=e._touchState.spanX/s,a=ee.addSeconds(e._startJulian,(e._touchState.centerX*e._timeBarSecondsSpan-r*e._timeBarSecondsSpan*c)/e._topDiv.clientWidth,new ee)):(n=e._touchState.centerX-r,a=ee.addSeconds(e._startJulian,n*e._timeBarSecondsSpan/e._topDiv.clientWidth,new ee)),e.zoomTo(a,ee.addSeconds(a,e._timeBarSecondsSpan*c,new ee)),e._touchState.centerX=r,e._touchState.spanX=s))}}Yc.prototype.resize=function(){let e=this.container.clientWidth,t=this.container.clientHeight;if(e===this._lastWidth&&t===this._lastHeight)return;this._trackContainer.style.height=`${t}px`;let n=1;this._trackList.forEach(function(i){n+=i.height}),this._trackListEle.style.height=`${n.toString()}px`,this._trackListEle.width=this._trackListEle.clientWidth,this._trackListEle.height=n,this._makeTics(),this._lastXPos=void 0,this._lastWidth=e,this._lastHeight=t};var r8=Yc;function sxt(e){let t=!1,n=window.screen;return l(n)&&(l(n.lockOrientation)?t=n.lockOrientation(e):l(n.mozLockOrientation)?t=n.mozLockOrientation(e):l(n.msLockOrientation)?t=n.msLockOrientation(e):l(n.orientation&&n.orientation.lock)&&(t=n.orientation.lock(e))),t}function TAe(){let e=window.screen;l(e)&&(l(e.unlockOrientation)?e.unlockOrientation():l(e.mozUnlockOrientation)?e.mozUnlockOrientation():l(e.msUnlockOrientation)?e.msUnlockOrientation():l(e.orientation&&e.orientation.unlock)&&e.orientation.unlock())}function axt(e,t,n,i){i()||(n()?(t.useWebVR=!1,e._locked&&(TAe(),e._locked=!1),e._noSleep.disable(),Or.exitFullscreen(),n(!1)):(Or.fullscreen||Or.requestFullscreen(e._vrElement),e._noSleep.enable(),e._locked||(e._locked=sxt("landscape")),t.useWebVR=!0,n(!0)))}function s8(e,t){let n=this,i=xe.observable(Or.enabled),o=xe.observable(!1);this.isVRMode=void 0,xe.defineProperty(this,"isVRMode",{get:function(){return o()}}),this.isVREnabled=void 0,xe.defineProperty(this,"isVREnabled",{get:function(){return i()},set:function(s){i(s&&Or.enabled)}}),this.tooltip=void 0,xe.defineProperty(this,"tooltip",function(){return i()?o()?"Exit VR mode":"Enter VR mode":"VR mode is unavailable"});let r=xe.observable(!1);this._isOrthographic=void 0,xe.defineProperty(this,"_isOrthographic",{get:function(){return r()}}),this._eventHelper=new Gr,this._eventHelper.add(e.preRender,function(){r(e.camera.frustum instanceof Qt)}),this._locked=!1,this._noSleep=new K1.default,this._command=xn(function(){axt(n,e,o,r)},xe.getObservable(this,"isVREnabled")),this._vrElement=y(Dn(t),document.body),this._callback=function(){!Or.fullscreen&&o()&&(e.useWebVR=!1,n._locked&&(TAe(),n._locked=!1),n._noSleep.disable(),o(!1))},document.addEventListener(Or.changeEventName,this._callback)}Object.defineProperties(s8.prototype,{vrElement:{get:function(){return this._vrElement},set:function(e){this._vrElement=e}},command:{get:function(){return this._command}}});s8.prototype.isDestroyed=function(){return!1};s8.prototype.destroy=function(){this._eventHelper.removeAll(),document.removeEventListener(Or.changeEventName,this._callback),ue(this)};var a8=s8;var cxt="M 5.3125 6.375 C 4.008126 6.375 2.96875 7.4141499 2.96875 8.71875 L 2.96875 19.5 C 2.96875 20.8043 4.008126 21.875 5.3125 21.875 L 13.65625 21.875 C 13.71832 20.0547 14.845166 18.59375 16.21875 18.59375 C 17.592088 18.59375 18.71881 20.0552 18.78125 21.875 L 27.09375 21.875 C 28.398125 21.875 29.4375 20.8043 29.4375 19.5 L 29.4375 8.71875 C 29.4375 7.4141499 28.398125 6.375 27.09375 6.375 L 5.3125 6.375 z M 9.625 10.4375 C 11.55989 10.4375 13.125 12.03385 13.125 13.96875 C 13.125 15.90365 11.55989 17.46875 9.625 17.46875 C 7.69011 17.46875 6.125 15.90365 6.125 13.96875 C 6.125 12.03385 7.69011 10.4375 9.625 10.4375 z M 22.46875 10.4375 C 24.40364 10.4375 25.96875 12.03385 25.96875 13.96875 C 25.96875 15.90365 24.40364 17.46875 22.46875 17.46875 C 20.53386 17.46875 18.96875 15.90365 18.96875 13.96875 C 18.96875 12.03385 20.53386 10.4375 22.46875 10.4375 z",lxt="M 25.770585,2.4552065 C 15.72282,13.962707 10.699956,19.704407 8.1768352,22.580207 c -1.261561,1.4379 -1.902282,2.1427 -2.21875,2.5 -0.141624,0.1599 -0.208984,0.2355 -0.25,0.2813 l 0.6875,0.75 c 10e-5,-10e-5 0.679191,0.727 0.6875,0.7187 0.01662,-0.016 0.02451,-0.024 0.03125,-0.031 0.01348,-0.014 0.04013,-0.038 0.0625,-0.062 0.04474,-0.05 0.120921,-0.1315 0.28125,-0.3126 0.320657,-0.3619 0.956139,-1.0921 2.2187499,-2.5312 2.5252219,-2.8781 7.5454589,-8.6169 17.5937499,-20.1250005 l -1.5,-1.3125 z m -20.5624998,3.9063 c -1.304375,0 -2.34375,1.0391 -2.34375,2.3437 l 0,10.8125005 c 0,1.3043 1.039375,2.375 2.34375,2.375 l 2.25,0 c 1.9518039,-2.2246 7.4710958,-8.5584 13.5624998,-15.5312005 l -15.8124998,0 z m 21.1249998,0 c -1.855467,2.1245 -2.114296,2.4005 -3.59375,4.0936995 1.767282,0.1815 3.15625,1.685301 3.15625,3.500001 0,1.9349 -1.56511,3.5 -3.5,3.5 -1.658043,0 -3.043426,-1.1411 -3.40625,-2.6875 -1.089617,1.2461 -2.647139,2.9988 -3.46875,3.9375 0.191501,-0.062 0.388502,-0.094 0.59375,-0.094 1.373338,0 2.50006,1.4614 2.5625,3.2812 l 8.3125,0 c 1.304375,0 2.34375,-1.0707 2.34375,-2.375 l 0,-10.8125005 c 0,-1.3046 -1.039375,-2.3437 -2.34375,-2.3437 l -0.65625,0 z M 9.5518351,10.423906 c 1.9348899,0 3.4999999,1.596401 3.4999999,3.531301 0,1.9349 -1.56511,3.5 -3.4999999,3.5 -1.9348899,0 -3.4999999,-1.5651 -3.4999999,-3.5 0,-1.9349 1.56511,-3.531301 3.4999999,-3.531301 z m 4.2187499,10.312601 c -0.206517,0.2356 -0.844218,0.9428 -1.03125,1.1562 l 0.8125,0 c 0.01392,-0.4081 0.107026,-0.7968 0.21875,-1.1562 z";function c8(e,t,n){e=Dn(e);let i=new a8(t,n);i._exitVRPath=lxt,i._enterVRPath=cxt;let o=document.createElement("button");o.type="button",o.className="cesium-button cesium-vrButton",o.setAttribute("data-bind",'css: { "cesium-button-disabled" : _isOrthographic }, attr: { title: tooltip },click: command,enable: isVREnabled,cesiumSvgPath: { path: isVRMode ? _exitVRPath : _enterVRPath, width: 32, height: 32 }'),e.appendChild(o),xe.applyBindings(i,o),this._container=e,this._viewModel=i,this._element=o}Object.defineProperties(c8.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});c8.prototype.isDestroyed=function(){return!1};c8.prototype.destroy=function(){return this._viewModel.destroy(),xe.cleanNode(this._element),this._container.removeChild(this._element),ue(this)};var l8=c8;var Z0=new oe;function SAe(e){let t=e.clock;t.currentTime=e.timeJulian,t.shouldAnimate=!1}function uxt(e){let t=e.getPropertyIds(),n="";return t.forEach(function(i){let o=e.getProperty(i);l(o)&&(n+=`<tr><th>${i}</th><td>${o}</td></tr>`)}),n.length>0&&(n=`<table class="cesium-infoBox-defaultTable"><tbody>${n}</tbody></table>`),n}function fxt(e){let t,n=[],i=e.getPropertyIds();for(t=0;t<i.length;t++){let r=i[t];/^name$/i.test(r)?n[0]=e.getProperty(r):/name/i.test(r)?n[1]=e.getProperty(r):/^title$/i.test(r)?n[2]=e.getProperty(r):/^(id|identifier)$/i.test(r)?n[3]=e.getProperty(r):/element/i.test(r)?n[4]=e.getProperty(r):/(id|identifier)$/i.test(r)&&(n[5]=e.getProperty(r))}let o=n.length;for(t=0;t<o;t++){let r=n[t];if(l(r)&&r!=="")return r}return"Unnamed Feature"}function bAe(e,t){let n=e.scene.pick(t.position);if(l(n)){let i=y(n.id,n.primitive.id);if(i instanceof ur)return i;if(n instanceof br)return new ur({name:fxt(n),description:uxt(n),feature:n})}if(l(e.scene.globe))return mxt(e,t.position)}var dxt=new ee;function wAe(e,t,n){if(l(n)){let i=n.clock;if(l(i)&&(i.getValue(t),l(e))){let o=i.startTime,r=i.stopTime;ee.equals(o,r)&&(r=ee.addSeconds(o,R.EPSILON2,dxt)),e.updateFromClock(),e.zoomTo(o,r)}}}var hxt=new h;function mxt(e,t){let n=e.scene,i=n.camera.getPickRay(t),o=n.imageryLayers.pickImageryLayerFeatures(i,n);if(!l(o))return;let r=new ur({id:"Loading...",description:"Loading feature information..."});return o.then(function(s){if(e.selectedEntity!==r)return;if(!l(s)||s.length===0){e.selectedEntity=EAe();return}let a=s[0],c=new ur({id:a.name,description:a.description});if(l(a.position)){let u=e.scene.globe.ellipsoid.cartographicToCartesian(a.position,hxt);c.position=new pl(u)}e.selectedEntity=c},function(){e.selectedEntity===r&&(e.selectedEntity=EAe())}),r}function EAe(){return new ur({id:"None",description:"No features found."})}function pxt(e,t){let n=e._geocoder,i=e._homeButton,o=e._sceneModePicker,r=e._projectionPicker,s=e._baseLayerPicker,a=e._animation,c=e._timeline,u=e._fullscreenButton,f=e._infoBox,d=e._selectionIndicator,p=t?"hidden":"visible";if(l(n)&&(n.container.style.visibility=p),l(i)&&(i.container.style.visibility=p),l(o)&&(o.container.style.visibility=p),l(r)&&(r.container.style.visibility=p),l(s)&&(s.container.style.visibility=p),l(a)&&(a.container.style.visibility=p),l(c)&&(c.container.style.visibility=p),l(u)&&u.viewModel.isFullscreenEnabled&&(u.container.style.visibility=p),l(f)&&(f.container.style.visibility=p),l(d)&&(d.container.style.visibility=p),e._container){let _=t||!l(u)?0:u.container.clientWidth;e._vrButton.container.style.right=`${_}px`,e.forceResize()}}function Ei(e,t){e=Dn(e),t=y(t,y.EMPTY_OBJECT);let n=(!l(t.globe)||t.globe!==!1)&&(!l(t.baseLayerPicker)||t.baseLayerPicker!==!1),i=this,o=document.createElement("div");o.className="cesium-viewer",e.appendChild(o);let r=document.createElement("div");r.className="cesium-viewer-cesiumWidgetContainer",o.appendChild(r);let s=document.createElement("div");s.className="cesium-viewer-bottom",o.appendChild(s);let a=y(t.scene3DOnly,!1),c,u,f=!1;l(t.clockViewModel)?(u=t.clockViewModel,c=u.clock):(c=new Eh,u=new rz(c),f=!0),l(t.shouldAnimate)&&(c.shouldAnimate=t.shouldAnimate);let d=new Sz(r,{imageryProvider:n||l(t.imageryProvider)?!1:void 0,clock:c,skyBox:t.skyBox,skyAtmosphere:t.skyAtmosphere,sceneMode:t.sceneMode,mapProjection:t.mapProjection,globe:t.globe,orderIndependentTranslucency:t.orderIndependentTranslucency,contextOptions:t.contextOptions,useDefaultRenderLoop:t.useDefaultRenderLoop,targetFrameRate:t.targetFrameRate,showRenderLoopErrors:t.showRenderLoopErrors,useBrowserRecommendedResolution:t.useBrowserRecommendedResolution,creditContainer:l(t.creditContainer)?t.creditContainer:s,creditViewport:t.creditViewport,scene3DOnly:a,shadows:t.shadows,terrainShadows:t.terrainShadows,mapMode2D:t.mapMode2D,blurActiveElementOnCanvasFocus:t.blurActiveElementOnCanvasFocus,requestRenderMode:t.requestRenderMode,maximumRenderTimeChange:t.maximumRenderTimeChange,depthPlaneEllipsoidOffset:t.depthPlaneEllipsoidOffset,msaaSamples:t.msaaSamples}),p=t.dataSources,_=!1;l(p)||(p=new $2,_=!0);let m=d.scene,x=new g3({scene:m,dataSourceCollection:p}),C=new Gr;C.add(c.onTick,Ei.prototype._onTick,this),C.add(m.morphStart,Ei.prototype._clearTrackedObject,this);let A;if(!l(t.selectionIndicator)||t.selectionIndicator!==!1){let j=document.createElement("div");j.className="cesium-viewer-selectionIndicatorContainer",o.appendChild(j),A=new n8(j,m)}let T;if(!l(t.infoBox)||t.infoBox!==!1){let j=document.createElement("div");j.className="cesium-viewer-infoBoxContainer",o.appendChild(j),T=new Vz(j);let X=T.viewModel;C.add(X.cameraClicked,Ei.prototype._onInfoBoxCameraClicked,this),C.add(X.closeClicked,Ei.prototype._onInfoBoxClockClicked,this)}let b=document.createElement("div");b.className="cesium-viewer-toolbar",o.appendChild(b);let S;if(!l(t.geocoder)||t.geocoder!==!1){let j=document.createElement("div");j.className="cesium-viewer-geocoderContainer",b.appendChild(j);let X;l(t.geocoder)&&typeof t.geocoder!="boolean"&&(X=Array.isArray(t.geocoder)?t.geocoder:[t.geocoder]),S=new Rz({container:j,geocoderServices:X,scene:m}),C.add(S.viewModel.search.beforeExecute,Ei.prototype._clearObjects,this)}let w;(!l(t.homeButton)||t.homeButton!==!1)&&(w=new Lz(b,m),l(S)&&C.add(w.viewModel.command.afterExecute,function(){let j=S.viewModel;j.searchText="",j.isSearchInProgress&&j.search()}),C.add(w.viewModel.command.beforeExecute,Ei.prototype._clearTrackedObject,this));let D;!a&&(!l(t.sceneModePicker)||t.sceneModePicker!==!1)&&(D=new Jz(b,m));let O;t.projectionPicker&&(O=new Xz(b,m));let I,L;if(n){let j=y(t.imageryProviderViewModels,_z()),X=y(t.terrainProviderViewModels,gz());I=new pz(b,{globe:m.globe,imageryProviderViewModels:j,selectedImageryProviderViewModel:t.selectedImageryProviderViewModel,terrainProviderViewModels:X,selectedTerrainProviderViewModel:t.selectedTerrainProviderViewModel}),L=b.getElementsByClassName("cesium-baseLayerPicker-dropDown")[0]}l(t.imageryProvider)&&t.imageryProvider!==!1&&(n&&(I.viewModel.selectedImagery=void 0),m.imageryLayers.removeAll(),m.imageryLayers.addImageryProvider(t.imageryProvider)),l(t.terrainProvider)&&(n&&(I.viewModel.selectedTerrain=void 0),m.terrainProvider=t.terrainProvider);let N;if(!l(t.navigationHelpButton)||t.navigationHelpButton!==!1){let j=!0;try{if(l(window.localStorage)){let X=window.localStorage.getItem("cesium-hasSeenNavHelp");l(X)&&Boolean(X)?j=!1:window.localStorage.setItem("cesium-hasSeenNavHelp","true")}}catch{}N=new zz({container:b,instructionsInitiallyVisible:y(t.navigationInstructionsInitiallyVisible,j)})}let g;if(!l(t.animation)||t.animation!==!1){let j=document.createElement("div");j.className="cesium-viewer-animationContainer",o.appendChild(j),g=new fz(j,new dz(u))}let E;if(!l(t.timeline)||t.timeline!==!1){let j=document.createElement("div");j.className="cesium-viewer-timelineContainer",o.appendChild(j),E=new r8(j,c),E.addEventListener("settime",SAe,!1),E.zoomTo(c.startTime,c.stopTime)}let v,P,M;(!l(t.fullscreenButton)||t.fullscreenButton!==!1)&&(M=document.createElement("div"),M.className="cesium-viewer-fullscreenContainer",o.appendChild(M),v=new Pz(M,t.fullscreenElement),P=Da(v.viewModel,"isFullscreenEnabled",function(j){M.style.display=j?"block":"none",l(E)&&(E.container.style.right=`${M.clientWidth}px`,E.resize())}));let V,U,k;if(t.vrButton){let j=document.createElement("div");j.className="cesium-viewer-vrContainer",o.appendChild(j),V=new l8(j,m,t.fullScreenElement),U=Da(V.viewModel,"isVREnabled",function(X){j.style.display=X?"block":"none",l(v)&&(j.style.right=`${M.clientWidth}px`),l(E)&&(E.container.style.right=`${j.clientWidth}px`,E.resize())}),k=Da(V.viewModel,"isVRMode",function(X){pxt(i,X)})}this._baseLayerPickerDropDown=L,this._fullscreenSubscription=P,this._vrSubscription=U,this._vrModeSubscription=k,this._dataSourceChangedListeners={},this._automaticallyTrackDataSourceClocks=y(t.automaticallyTrackDataSourceClocks,!0),this._container=e,this._bottomContainer=s,this._element=o,this._cesiumWidget=d,this._selectionIndicator=A,this._infoBox=T,this._dataSourceCollection=p,this._destroyDataSourceCollection=_,this._dataSourceDisplay=x,this._clockViewModel=u,this._destroyClockViewModel=f,this._toolbar=b,this._homeButton=w,this._sceneModePicker=D,this._projectionPicker=O,this._baseLayerPicker=I,this._navigationHelpButton=N,this._animation=g,this._timeline=E,this._fullscreenButton=v,this._vrButton=V,this._geocoder=S,this._eventHelper=C,this._lastWidth=0,this._lastHeight=0,this._allowDataSourcesToSuspendAnimation=!0,this._entityView=void 0,this._enableInfoOrSelection=l(T)||l(A),this._clockTrackedDataSource=void 0,this._trackedEntity=void 0,this._needTrackedEntityUpdate=!1,this._selectedEntity=void 0,this._zoomIsFlight=!1,this._zoomTarget=void 0,this._zoomPromise=void 0,this._zoomOptions=void 0,this._selectedEntityChanged=new _e,this._trackedEntityChanged=new _e,xe.track(this,["_trackedEntity","_selectedEntity","_clockTrackedDataSource"]),C.add(p.dataSourceAdded,Ei.prototype._onDataSourceAdded,this),C.add(p.dataSourceRemoved,Ei.prototype._onDataSourceRemoved,this),C.add(m.postUpdate,Ei.prototype.resize,this),C.add(m.postRender,Ei.prototype._postRender,this);let H=p.length;for(let j=0;j<H;j++)this._dataSourceAdded(p,p.get(j));this._dataSourceAdded(void 0,x.defaultDataSource),C.add(p.dataSourceAdded,Ei.prototype._dataSourceAdded,this),C.add(p.dataSourceRemoved,Ei.prototype._dataSourceRemoved,this);function F(j){let X=bAe(i,j);l(X)?q.getValueOrUndefined(X.position,i.clock.currentTime)?i.trackedEntity=X:i.zoomTo(X):l(i.trackedEntity)&&(i.trackedEntity=void 0)}function Y(j){i.selectedEntity=bAe(i,j)}d.screenSpaceEventHandler.setInputAction(Y,mn.LEFT_CLICK),d.screenSpaceEventHandler.setInputAction(F,mn.LEFT_DOUBLE_CLICK)}Object.defineProperties(Ei.prototype,{container:{get:function(){return this._container}},bottomContainer:{get:function(){return this._bottomContainer}},cesiumWidget:{get:function(){return this._cesiumWidget}},selectionIndicator:{get:function(){return this._selectionIndicator}},infoBox:{get:function(){return this._infoBox}},geocoder:{get:function(){return this._geocoder}},homeButton:{get:function(){return this._homeButton}},sceneModePicker:{get:function(){return this._sceneModePicker}},projectionPicker:{get:function(){return this._projectionPicker}},baseLayerPicker:{get:function(){return this._baseLayerPicker}},navigationHelpButton:{get:function(){return this._navigationHelpButton}},animation:{get:function(){return this._animation}},timeline:{get:function(){return this._timeline}},fullscreenButton:{get:function(){return this._fullscreenButton}},vrButton:{get:function(){return this._vrButton}},dataSourceDisplay:{get:function(){return this._dataSourceDisplay}},entities:{get:function(){return this._dataSourceDisplay.defaultDataSource.entities}},dataSources:{get:function(){return this._dataSourceCollection}},canvas:{get:function(){return this._cesiumWidget.canvas}},scene:{get:function(){return this._cesiumWidget.scene}},shadows:{get:function(){return this.scene.shadowMap.enabled},set:function(e){this.scene.shadowMap.enabled=e}},terrainShadows:{get:function(){return this.scene.globe.shadows},set:function(e){this.scene.globe.shadows=e}},shadowMap:{get:function(){return this.scene.shadowMap}},imageryLayers:{get:function(){return this.scene.imageryLayers}},terrainProvider:{get:function(){return this.scene.terrainProvider},set:function(e){this.scene.terrainProvider=e}},camera:{get:function(){return this.scene.camera}},postProcessStages:{get:function(){return this.scene.postProcessStages}},clock:{get:function(){return this._clockViewModel.clock}},clockViewModel:{get:function(){return this._clockViewModel}},screenSpaceEventHandler:{get:function(){return this._cesiumWidget.screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._cesiumWidget.targetFrameRate},set:function(e){this._cesiumWidget.targetFrameRate=e}},useDefaultRenderLoop:{get:function(){return this._cesiumWidget.useDefaultRenderLoop},set:function(e){this._cesiumWidget.useDefaultRenderLoop=e}},resolutionScale:{get:function(){return this._cesiumWidget.resolutionScale},set:function(e){this._cesiumWidget.resolutionScale=e}},useBrowserRecommendedResolution:{get:function(){return this._cesiumWidget.useBrowserRecommendedResolution},set:function(e){this._cesiumWidget.useBrowserRecommendedResolution=e}},allowDataSourcesToSuspendAnimation:{get:function(){return this._allowDataSourcesToSuspendAnimation},set:function(e){this._allowDataSourcesToSuspendAnimation=e}},trackedEntity:{get:function(){return this._trackedEntity},set:function(e){if(this._trackedEntity!==e){this._trackedEntity=e,u8(this);let t=this.scene,n=t.mode;!l(e)||!l(e.position)?(this._needTrackedEntityUpdate=!1,(n===te.COLUMBUS_VIEW||n===te.SCENE2D)&&(t.screenSpaceCameraController.enableTranslate=!0),(n===te.COLUMBUS_VIEW||n===te.SCENE3D)&&(t.screenSpaceCameraController.enableTilt=!0),this._entityView=void 0,this.camera.lookAtTransform(B.IDENTITY)):this._needTrackedEntityUpdate=!0,this._trackedEntityChanged.raiseEvent(e),this.scene.requestRender()}}},selectedEntity:{get:function(){return this._selectedEntity},set:function(e){if(this._selectedEntity!==e){this._selectedEntity=e;let t=l(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;l(e)?l(t)&&t.animateAppear():l(t)&&t.animateDepart(),this._selectedEntityChanged.raiseEvent(e)}}},selectedEntityChanged:{get:function(){return this._selectedEntityChanged}},trackedEntityChanged:{get:function(){return this._trackedEntityChanged}},clockTrackedDataSource:{get:function(){return this._clockTrackedDataSource},set:function(e){this._clockTrackedDataSource!==e&&(this._clockTrackedDataSource=e,wAe(this._timeline,this.clock,e))}}});Ei.prototype.extend=function(e,t){e(this,t)};Ei.prototype.resize=function(){let e=this._cesiumWidget,t=this._container,n=t.clientWidth,i=t.clientHeight,o=l(this._animation),r=l(this._timeline);if(e.resize(),n===this._lastWidth&&i===this._lastHeight)return;let s=i-125,a=this._baseLayerPickerDropDown;if(l(a)&&(a.style.maxHeight=`${s}px`),l(this._geocoder)){let _=this._geocoder.searchSuggestionsContainer;_.style.maxHeight=`${s}px`}l(this._infoBox)&&(this._infoBox.viewModel.maxHeight=s);let c=this._timeline,u,f=0,d=0,p=0;if(o&&window.getComputedStyle(this._animation.container).visibility!=="hidden"){let _=this._lastWidth;u=this._animation.container,n>900?(f=169,_<=900&&(u.style.width="169px",u.style.height="112px",this._animation.resize())):n>=600?(f=136,(_<600||_>900)&&(u.style.width="136px",u.style.height="90px",this._animation.resize())):(f=106,(_>600||_===0)&&(u.style.width="106px",u.style.height="70px",this._animation.resize())),d=f+5}if(r&&window.getComputedStyle(this._timeline.container).visibility!=="hidden"){let _=this._fullscreenButton,m=this._vrButton,x=c.container,C=x.style;p=x.clientHeight+3,C.left=`${f}px`;let A=0;l(_)&&(A+=_.container.clientWidth),l(m)&&(A+=m.container.clientWidth),C.right=`${A}px`,c.resize()}this._bottomContainer.style.left=`${d}px`,this._bottomContainer.style.bottom=`${p}px`,this._lastWidth=n,this._lastHeight=i};Ei.prototype.forceResize=function(){this._lastWidth=0,this.resize()};Ei.prototype.render=function(){this._cesiumWidget.render()};Ei.prototype.isDestroyed=function(){return!1};Ei.prototype.destroy=function(){let e;this.screenSpaceEventHandler.removeInputAction(mn.LEFT_CLICK),this.screenSpaceEventHandler.removeInputAction(mn.LEFT_DOUBLE_CLICK);let t=this.dataSources,n=t.length;for(e=0;e<n;e++)this._dataSourceRemoved(t,t.get(e));return this._dataSourceRemoved(void 0,this._dataSourceDisplay.defaultDataSource),this._container.removeChild(this._element),this._element.removeChild(this._toolbar),this._eventHelper.removeAll(),l(this._geocoder)&&(this._geocoder=this._geocoder.destroy()),l(this._homeButton)&&(this._homeButton=this._homeButton.destroy()),l(this._sceneModePicker)&&(this._sceneModePicker=this._sceneModePicker.destroy()),l(this._projectionPicker)&&(this._projectionPicker=this._projectionPicker.destroy()),l(this._baseLayerPicker)&&(this._baseLayerPicker=this._baseLayerPicker.destroy()),l(this._animation)&&(this._element.removeChild(this._animation.container),this._animation=this._animation.destroy()),l(this._timeline)&&(this._timeline.removeEventListener("settime",SAe,!1),this._element.removeChild(this._timeline.container),this._timeline=this._timeline.destroy()),l(this._fullscreenButton)&&(this._fullscreenSubscription.dispose(),this._element.removeChild(this._fullscreenButton.container),this._fullscreenButton=this._fullscreenButton.destroy()),l(this._vrButton)&&(this._vrSubscription.dispose(),this._vrModeSubscription.dispose(),this._element.removeChild(this._vrButton.container),this._vrButton=this._vrButton.destroy()),l(this._infoBox)&&(this._element.removeChild(this._infoBox.container),this._infoBox=this._infoBox.destroy()),l(this._selectionIndicator)&&(this._element.removeChild(this._selectionIndicator.container),this._selectionIndicator=this._selectionIndicator.destroy()),this._destroyClockViewModel&&(this._clockViewModel=this._clockViewModel.destroy()),this._dataSourceDisplay=this._dataSourceDisplay.destroy(),this._cesiumWidget=this._cesiumWidget.destroy(),this._destroyDataSourceCollection&&(this._dataSourceCollection=this._dataSourceCollection.destroy()),ue(this)};Ei.prototype._dataSourceAdded=function(e,t){t.entities.collectionChanged.addEventListener(Ei.prototype._onEntityCollectionChanged,this)};Ei.prototype._dataSourceRemoved=function(e,t){let n=t.entities;n.collectionChanged.removeEventListener(Ei.prototype._onEntityCollectionChanged,this),l(this.trackedEntity)&&n.getById(this.trackedEntity.id)===this.trackedEntity&&(this.trackedEntity=void 0),l(this.selectedEntity)&&n.getById(this.selectedEntity.id)===this.selectedEntity&&(this.selectedEntity=void 0)};Ei.prototype._onTick=function(e){let t=e.currentTime,n=this._dataSourceDisplay.update(t);this._allowDataSourcesToSuspendAnimation&&(this._clockViewModel.canAnimate=n);let i=this._entityView;if(l(i)){let f=this._trackedEntity;this._dataSourceDisplay.getBoundingSphere(f,!1,Z0)===lt.DONE&&i.update(t,Z0)}let o,r=!1,s=this.selectedEntity,a=l(s)&&this._enableInfoOrSelection;a&&s.isShowing&&s.isAvailable(t)&&(this._dataSourceDisplay.getBoundingSphere(s,!0,Z0)!==lt.FAILED?o=Z0.center:l(s.position)&&(o=s.position.getValue(t,o)),r=l(o));let c=l(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;l(c)&&(c.position=h.clone(o,c.position),c.showSelection=a&&r,c.update());let u=l(this._infoBox)?this._infoBox.viewModel:void 0;l(u)&&(u.showInfo=a,u.enableCamera=r,u.isCameraTracking=this.trackedEntity===this.selectedEntity,a?(u.titleText=y(s.name,s.id),u.description=q.getValueOrDefault(s.description,t,"")):(u.titleText="",u.description=""))};Ei.prototype._onEntityCollectionChanged=function(e,t,n){let i=n.length;for(let o=0;o<i;o++){let r=n[o];this.trackedEntity===r&&(this.trackedEntity=void 0),this.selectedEntity===r&&(this.selectedEntity=void 0)}};Ei.prototype._onInfoBoxCameraClicked=function(e){if(e.isCameraTracking&&this.trackedEntity===this.selectedEntity)this.trackedEntity=void 0;else{let n=this.selectedEntity.position;l(n)?this.trackedEntity=this.selectedEntity:this.zoomTo(this.selectedEntity)}};Ei.prototype._clearTrackedObject=function(){this.trackedEntity=void 0};Ei.prototype._onInfoBoxClockClicked=function(e){this.selectedEntity=void 0};Ei.prototype._clearObjects=function(){this.trackedEntity=void 0,this.selectedEntity=void 0};Ei.prototype._onDataSourceChanged=function(e){this.clockTrackedDataSource===e&&wAe(this.timeline,this.clock,e)};Ei.prototype._onDataSourceAdded=function(e,t){this._automaticallyTrackDataSourceClocks&&(this.clockTrackedDataSource=t);let n=t.entities.id,i=this._eventHelper.add(t.changedEvent,Ei.prototype._onDataSourceChanged,this);this._dataSourceChangedListeners[n]=i};Ei.prototype._onDataSourceRemoved=function(e,t){let n=this.clockTrackedDataSource===t,i=t.entities.id;if(this._dataSourceChangedListeners[i](),this._dataSourceChangedListeners[i]=void 0,n){let o=e.length;this._automaticallyTrackDataSourceClocks&&o>0?this.clockTrackedDataSource=e.get(o-1):this.clockTrackedDataSource=void 0}};Ei.prototype.zoomTo=function(e,t){return vAe(this,e,{offset:t},!1)};Ei.prototype.flyTo=function(e,t){return vAe(this,e,t,!0)};function vAe(e,t,n,i){u8(e);let o=new Promise(r=>{e._completeZoom=function(s){r(s)}});return e._zoomPromise=o,e._zoomIsFlight=i,e._zoomOptions=n,Promise.resolve(t).then(function(r){if(e._zoomPromise===o){if(r instanceof Vf){r.getViewableRectangle().then(function(s){return TE(s,e.scene)}).then(function(s){e._zoomPromise===o&&(e._zoomTarget=s)});return}if(r instanceof Cf){e._zoomTarget=r;return}if(r instanceof Y1){e._zoomTarget=r;return}if(r.isLoading&&l(r.loadingEvent)){let s=r.loadingEvent.addEventListener(function(){s(),e._zoomPromise===o&&(e._zoomTarget=r.entities.values.slice(0))});return}if(Array.isArray(r)){e._zoomTarget=r.slice(0);return}r=y(r.values,r),l(r.entities)&&(r=r.entities.values),Array.isArray(r)?e._zoomTarget=r.slice(0):e._zoomTarget=[r]}}),e.scene.requestRender(),o}function eS(e){e._zoomPromise=void 0,e._zoomTarget=void 0,e._zoomOptions=void 0}function u8(e){let t=e._zoomPromise;l(t)&&(eS(e),e._completeZoom(!1))}Ei.prototype._postRender=function(){_xt(this),gxt(this)};function _xt(e){let t=e._zoomTarget;if(!l(t)||e.scene.mode===te.MORPHING)return;let n=e.scene,i=n.camera,o=y(e._zoomOptions,{}),r;if(t instanceof Cf)return t.readyPromise.then(function(){let u=t.boundingSphere;l(o.offset)||(o.offset=new ju(0,-.5,u.radius)),r={offset:o.offset,duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){e._completeZoom(!0)},cancel:function(){e._completeZoom(!1)}},e._zoomIsFlight?i.flyToBoundingSphere(t.boundingSphere,r):(i.viewBoundingSphere(u,o.offset),i.lookAtTransform(B.IDENTITY),e._completeZoom(!0)),eS(e)}).catch(()=>{u8(e)});if(t instanceof Y1)return t.readyPromise.then(function(){let u=t.boundingSphere;l(o.offset)||(o.offset=new ju(0,-.5,u.radius)),r={offset:o.offset,duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){e._completeZoom(!0)},cancel:function(){e._completeZoom(!1)}},e._zoomIsFlight?i.flyToBoundingSphere(u,r):(i.viewBoundingSphere(u,o.offset),i.lookAtTransform(B.IDENTITY),e._completeZoom(!0)),eS(e)});if(t instanceof me){r={destination:n.mapProjection.ellipsoid.cartographicToCartesian(t),duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){e._completeZoom(!0)},cancel:function(){e._completeZoom(!1)}},e._zoomIsFlight?i.flyTo(r):(i.setView(r),e._completeZoom(!0)),eS(e);return}let s=t,a=[];for(let u=0,f=s.length;u<f;u++){let d=e._dataSourceDisplay.getBoundingSphere(s[u],!1,Z0);if(d===lt.PENDING)return;d!==lt.FAILED&&a.push(oe.clone(Z0))}if(a.length===0){u8(e);return}e.trackedEntity=void 0;let c=oe.fromBoundingSpheres(a);e._zoomIsFlight?(eS(e),i.flyToBoundingSphere(c,{duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){e._completeZoom(!0)},cancel:function(){e._completeZoom(!1)},offset:o.offset})):(i.viewBoundingSphere(c,o.offset),i.lookAtTransform(B.IDENTITY),eS(e),e._completeZoom(!0))}function gxt(e){if(!e._needTrackedEntityUpdate)return;let t=e._trackedEntity,n=e.clock.currentTime,i=q.getValueOrUndefined(t.position,n);if(!l(i))return;let o=e.scene,r=e._dataSourceDisplay.getBoundingSphere(t,!1,Z0);if(r===lt.PENDING)return;let s=o.mode;(s===te.COLUMBUS_VIEW||s===te.SCENE2D)&&(o.screenSpaceCameraController.enableTranslate=!1),(s===te.COLUMBUS_VIEW||s===te.SCENE3D)&&(o.screenSpaceCameraController.enableTilt=!1);let a=r!==lt.FAILED?Z0:void 0;e._entityView=new C3(t,o,o.mapProjection.ellipsoid),e._entityView.update(n,a),e._needTrackedEntityUpdate=!1}var DAe=Ei;function yxt(e){let t=document.createElement("div");t.className="cesium-viewer-cesium3DTilesInspectorContainer",e.container.appendChild(t);let n=new Az(t,e.scene);Object.defineProperties(e,{cesium3DTilesInspector:{get:function(){return n}}})}var PAe=yxt;function xxt(e){let t=document.createElement("div");t.className="cesium-viewer-cesiumInspectorContainer",e.container.appendChild(t);let n=new Ez(t,e.scene);Object.defineProperties(e,{cesiumInspector:{get:function(){return n}}})}var IAe=xxt;function Cxt(e,t){t=y(t,y.EMPTY_OBJECT);let n=!0,i=y(t.flyToOnDrop,!0),o=new _e,r=y(t.clearOnDrop,!0),s=y(t.dropTarget,e.container),a=y(t.clampToGround,!0),c=t.proxy;s=Dn(s),Object.defineProperties(e,{dropTarget:{get:function(){return s},set:function(f){OAe(s,u),s=f,CX(s,u)}},dropEnabled:{get:function(){return n},set:function(f){f!==n&&(f?CX(s,u):OAe(s,u),n=f)}},dropError:{get:function(){return o}},clearOnDrop:{get:function(){return r},set:function(f){r=f}},flyToOnDrop:{get:function(){return i},set:function(f){i=f}},proxy:{get:function(){return c},set:function(f){c=f}},clampToGround:{get:function(){return a},set:function(f){a=f}}});function u(f){RC(f),r&&(e.entities.removeAll(),e.dataSources.removeAll());let d=f.dataTransfer.files,p=d.length;for(let _=0;_<p;_++){let m=d[_],x=new FileReader;x.onload=Axt(e,m,c,a),x.onerror=Txt(e,m),x.readAsText(m)}}CX(s,u),e.destroy=QO(e,e.destroy,function(){e.dropEnabled=!1}),e._handleDrop=u}function RC(e){e.stopPropagation(),e.preventDefault()}function OAe(e,t){let n=e;l(n)&&(n.removeEventListener("drop",t,!1),n.removeEventListener("dragenter",RC,!1),n.removeEventListener("dragover",RC,!1),n.removeEventListener("dragexit",RC,!1))}function CX(e,t){e.addEventListener("drop",t,!1),e.addEventListener("dragenter",RC,!1),e.addEventListener("dragover",RC,!1),e.addEventListener("dragexit",RC,!1)}function Axt(e,t,n,i){let o=e.scene;return function(r){let s=t.name;try{let a;if(/\.czml$/i.test(s))a=X2.load(JSON.parse(r.target.result),{sourceUri:s});else if(/\.geojson$/i.test(s)||/\.json$/i.test(s)||/\.topojson$/i.test(s))a=hV.load(JSON.parse(r.target.result),{sourceUri:s,clampToGround:i});else if(/\.(kml|kmz)$/i.test(s))a=GV.load(t,{sourceUri:s,proxy:n,camera:o.camera,canvas:o.canvas,clampToGround:i,screenOverlayContainer:e.container});else if(/\.gpx$/i.test(s))a=PV.load(t,{sourceUri:s,proxy:n});else{e.dropError.raiseEvent(e,s,`Unrecognized file: ${s}`);return}l(a)&&e.dataSources.add(a).then(function(c){e.flyToOnDrop&&e.flyTo(c)}).catch(function(c){e.dropError.raiseEvent(e,s,c)})}catch(a){e.dropError.raiseEvent(e,s,a)}}}function Txt(e,t){return function(n){e.dropError.raiseEvent(e,t.name,n.target.error)}}var RAe=Cxt;function bxt(e,t){t=y(t,y.EMPTY_OBJECT);let n=new Wz({scene:e.scene,container:e.bottomContainer,lowFrameRateMessage:t.lowFrameRateMessage});Object.defineProperties(e,{performanceWatchdog:{get:function(){return n}}})}var MAe=bxt;function Ext(e,t,n){let i;try{return i=e(t,n),i}catch(o){return Promise.reject(o)}}function Sxt(e){let t;return function(n){let i=n.data,o=[],r={id:i.id,result:void 0,error:void 0};return Promise.resolve(Ext(e,i.parameters,o)).then(function(s){r.result=s}).catch(function(s){s instanceof Error?r.error={name:s.name,message:s.message,stack:s.stack}:r.error=s}).finally(function(){l(t)||(t=y(self.webkitPostMessage,self.postMessage)),i.canTransferArrayBuffer||(o.length=0);try{t(r,o)}catch(s){r.result=void 0,r.error=`postMessage failed with error: ${Hm(s)}
9763
- with responseMessage: ${JSON.stringify(r)}`,t(r)}})}}var BAe=Sxt;var wxt="1.96.3";return YAe(vxt);})();
9763
+ with responseMessage: ${JSON.stringify(r)}`,t(r)}})}}var BAe=Sxt;var wxt="1.96.5";return YAe(vxt);})();