@arcgis/core 4.29.0 → 4.29.2

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 (257) hide show
  1. package/arcade/treeAnalysis.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/{b43fde3e25d0c3b020b5.js → 039a872509872ce67ba4.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{5243f9ff21e768c620c2.js → 23a5d750d93a7829174f.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{47e6119be4a4a5ed640d.js → 2447a4d5886aeb0ff72a.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{7f45a9e9bdbcffc2d6e0.js → 348bcc57b99a975902a8.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{8c9fb2601488998013ba.js → 3523789a2948a4ab8cc8.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{24649b410b757599a549.js → 48db6e0bbb1a9c043193.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{752082be991f1cc8558f.js → 4984e2b79d862114d6a6.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{8d9736fd15cdb54d9855.js → 5227f9eea6988aadad7f.js} +1 -1
  11. package/assets/esri/core/workers/chunks/60ab18c6a04d4b2f1d4c.js +1 -0
  12. package/assets/esri/core/workers/chunks/647515801d94180b8402.js +1 -0
  13. package/assets/esri/core/workers/chunks/6c3ae96ec90e9ed7dd50.js +1 -0
  14. package/assets/esri/core/workers/chunks/7427d03e693f32a81377.js +1 -0
  15. package/assets/esri/core/workers/chunks/7a8bba91769ee18cc39f.js +1 -0
  16. package/assets/esri/core/workers/chunks/7a98d2e026f63a581b1e.js +1 -0
  17. package/assets/esri/core/workers/chunks/8a9387483b19a5ec5b86.js +1 -0
  18. package/assets/esri/core/workers/chunks/{1a25ba411b89e050fbb7.js → a61f337802ae963d7f65.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{d0c5318d7ef2e923aad0.js → a8ac511280f873960d46.js} +1 -1
  20. package/assets/esri/core/workers/chunks/b125ab84b7761e761734.js +1 -0
  21. package/assets/esri/core/workers/chunks/{b34d6e58b125fe111f91.js → b42a83db83851cb57d44.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{1497dd943df7eede0704.js → b9c55ff1f21db198ce03.js} +1 -1
  23. package/assets/esri/core/workers/chunks/bb3322ddb89c0bd444f0.js +1 -0
  24. package/assets/esri/core/workers/chunks/becfdaeeb07f089d8be7.js +1 -0
  25. package/assets/esri/core/workers/chunks/{b26e39a399963c176d33.js → c527692694688a5b3b07.js} +2 -2
  26. package/assets/esri/core/workers/chunks/{210a93e0b96c5bff44a3.js → c556644bb0cf88770939.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{a5e7b4acae17f88e2208.js → ce93027b6b81428ce9b0.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{b8ece275abac93f3dccf.js → d14f16bfa6c12909929c.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{1594f06a2d7d9439c62e.js → e2147c99cc5839654be1.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{d33ed3a2a0d4b640bd4a.js → e4c7d8c69e4957c9d27c.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{7709248f59520aee6f51.js → eceaa46f622f6fa31128.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{2286db4c83ff1b6fb088.js → ef3e6209e6ac6a56960b.js} +1 -1
  33. package/assets/esri/core/workers/chunks/f59b5ea05caca8a1a398.js +1 -0
  34. package/chunks/Laserlines.glsl.js +3 -3
  35. package/chunks/Precipitation.glsl.js +1 -1
  36. package/chunks/SSAOBlur.glsl.js +2 -2
  37. package/chunks/boundedPlane.js +1 -1
  38. package/chunks/cameraUtilsSpherical.js +1 -1
  39. package/chunks/sphere.js +1 -1
  40. package/chunks/terrainUtilsPlanar.js +1 -1
  41. package/chunks/vec32.js +1 -1
  42. package/core/libs/gl-matrix-2/math/quat.js +1 -1
  43. package/core/libs/gl-matrix-2/math/vec3.js +1 -1
  44. package/core/libs/gl-matrix-2/vec3.js +1 -1
  45. package/geohash/geohashUtils.js +1 -1
  46. package/geometry/support/axisAngleDegrees.js +1 -1
  47. package/geometry/support/coordinateSystem.js +1 -1
  48. package/geometry/support/lineSegment.js +1 -1
  49. package/geometry/support/meshUtils/exporters/gltf/gltf.js +1 -1
  50. package/geometry/support/meshUtils/georeference.js +1 -1
  51. package/geometry/support/meshUtils/merge.js +1 -1
  52. package/geometry/support/meshUtils/rotate.js +1 -1
  53. package/geometry/support/meshUtils/scale.js +1 -1
  54. package/geometry/support/meshUtils/vertexSpaceConversion.js +5 -0
  55. package/geometry/support/meshVertexSpaceUtils.js +1 -1
  56. package/geometry/support/plane.js +1 -1
  57. package/geometry/support/ray.js +1 -1
  58. package/geometry/support/triangle.js +1 -1
  59. package/geometry/support/vector.js +1 -1
  60. package/interfaces.d.ts +20 -14
  61. package/kernel.js +1 -1
  62. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  63. package/layers/LinkChartLayer.js +1 -1
  64. package/layers/VoxelWasmPerSceneView.js +1 -1
  65. package/layers/graphics/data/StreamFeatureManager.js +1 -1
  66. package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
  67. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  68. package/layers/mixins/FeatureReductionLayer.js +1 -1
  69. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  70. package/layers/orientedImagery/transformations/imageToGroundUtils.js +1 -1
  71. package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
  72. package/layers/support/layerUtils.js +1 -1
  73. package/layers/video/VideoCameraSensorModel.js +1 -1
  74. package/layers/voxel/VoxelVolume.js +1 -1
  75. package/layers/voxel/voxelPlaneUtils.js +1 -1
  76. package/libs/linkchartlayout/LinkChartLayout.js +1 -1
  77. package/package.json +1 -1
  78. package/support/revision.js +1 -1
  79. package/symbols/cim/cimAnalyzer.js +1 -1
  80. package/views/2d/arcade/callExpressionWithCursor.js +1 -1
  81. package/views/2d/engine/webgl/collisions/CollisionEngine.js +1 -1
  82. package/views/2d/engine/webgl/shaderGraph/techniques/createTestMeshData.js +1 -1
  83. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterInputEvaluator.js +1 -1
  84. package/views/2d/interactive/editingTools/TransformTool.js +1 -1
  85. package/views/2d/interactive/editingTools/manipulations/ScaleManipulation.js +1 -1
  86. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  87. package/views/2d/layers/features/Processor.js +1 -1
  88. package/views/2d/layers/features/aggregation/GeohashSpatialIndex.js +1 -1
  89. package/views/2d/layers/features/aggregation/GridSpatialIndex.js +1 -1
  90. package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
  91. package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
  92. package/views/2d/layers/features/processor/FeatureUpdateStrategy.js +1 -1
  93. package/views/2d/layers/features/schema/processor/SimpleProcessorSchema.js +1 -1
  94. package/views/2d/layers/features/schema/processor/SubtypeProcessorSchema.js +1 -1
  95. package/views/2d/layers/features/sources/strategies/StreamLoadStrategy.js +1 -1
  96. package/views/2d/layers/features/sources/strategies/chunks/DrillDownTileSourceChunk.js +1 -1
  97. package/views/2d/layers/features/sources/strategies/chunks/FeatureSnapshotSourceChunk.js +1 -1
  98. package/views/2d/layers/features/sources/strategies/chunks/OverrideChunk.js +1 -1
  99. package/views/2d/layers/features/sources/strategies/chunks/PagedTileSourceChunk.js +1 -1
  100. package/views/2d/layers/features/sources/strategies/chunks/StreamSourceChunk.js +1 -1
  101. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  102. package/views/2d/layers/features/support/GraphicsReader.js +1 -1
  103. package/views/2d/layers/features/support/Tile.js +1 -1
  104. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  105. package/views/2d/tiling/TileKey.js +1 -1
  106. package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
  107. package/views/3d/analysis/Dimension/lengthDimensionConstraintUtils.js +1 -1
  108. package/views/3d/analysis/Dimension/lengthDimensionManipulatorUtils.js +1 -1
  109. package/views/3d/analysis/Dimension/lengthDimensionUtils.js +1 -1
  110. package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementController.js +1 -1
  111. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  112. package/views/3d/analysis/LineOfSight/LineOfSightIntersectionResult.js +1 -1
  113. package/views/3d/analysis/Slice/SliceTool.js +1 -1
  114. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  115. package/views/3d/analysis/support/measurementUtils.js +1 -1
  116. package/views/3d/animation/pointToPoint/Camera.js +1 -1
  117. package/views/3d/camera/constraintUtils/common.js +1 -1
  118. package/views/3d/camera/constraintUtils/distance.js +1 -1
  119. package/views/3d/camera/constraintUtils/tilt.js +1 -1
  120. package/views/3d/camera/intersectionUtils.js +1 -1
  121. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  122. package/views/3d/environment/EnvironmentRenderer.js +1 -1
  123. package/views/3d/environment/Fog.js +1 -1
  124. package/views/3d/environment/MarsAtmosphere.js +1 -1
  125. package/views/3d/environment/SceneViewEnvironmentManager.js +1 -1
  126. package/views/3d/interactive/SnappingVisualizer3D.js +1 -1
  127. package/views/3d/interactive/editingTools/dragEventPipeline3D.js +1 -1
  128. package/views/3d/interactive/editingTools/manipulations/MoveZManipulation.js +1 -1
  129. package/views/3d/interactive/editingTools/reshapeGraphic/ReshapeOperation.js +1 -1
  130. package/views/3d/interactive/editingTools/reshapeGraphic/edgeOffsetUtils.js +1 -1
  131. package/views/3d/interactive/editingTools/transformGraphic/ExtentScale.js +1 -1
  132. package/views/3d/interactive/editingTools/transformGraphic/extentUtils.js +1 -1
  133. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  134. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  135. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  136. package/views/3d/interactive/visualElements/support/Segment.js +1 -1
  137. package/views/3d/layers/I3SMeshView3D.js +1 -1
  138. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  139. package/views/3d/layers/PointCloudWorker.js +1 -1
  140. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  141. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  142. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  143. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  144. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  145. package/views/3d/layers/i3s/LoDUtil.js +1 -1
  146. package/views/3d/layers/i3s/PointRenderer.js +1 -1
  147. package/views/3d/layers/support/FeatureTileMeasurements3D.js +1 -1
  148. package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
  149. package/views/3d/layers/support/uvUtils.js +1 -1
  150. package/views/3d/state/Frustum.js +1 -1
  151. package/views/3d/state/NearFarHeuristic.js +1 -1
  152. package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
  153. package/views/3d/state/controllers/RotateController.js +1 -1
  154. package/views/3d/state/controllers/global/PinchAndPanController.js +1 -1
  155. package/views/3d/state/controllers/global/ZoomController.js +1 -1
  156. package/views/3d/state/controllers/global/ZoomStepController.js +1 -1
  157. package/views/3d/state/controllers/local/PinchAndPanController.js +1 -1
  158. package/views/3d/state/controllers/local/ZoomController.js +1 -1
  159. package/views/3d/state/controllers/local/ZoomStepController.js +1 -1
  160. package/views/3d/state/controllers/momentum/ZoomPlanarMomentumController.js +1 -1
  161. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  162. package/views/3d/state/utils/navigationUtils.js +1 -1
  163. package/views/3d/state/utils/viewUtils.js +1 -1
  164. package/views/3d/support/FrustumExtentIntersection.js +1 -1
  165. package/views/3d/support/cameraUtils.js +1 -1
  166. package/views/3d/support/cameraUtilsInternal.js +1 -1
  167. package/views/3d/support/intersectionUtils.js +1 -1
  168. package/views/3d/support/mathUtils.js +1 -1
  169. package/views/3d/support/orientedBoundingBox.js +1 -1
  170. package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
  171. package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
  172. package/views/3d/support/pointsOfInterest/Focus.js +1 -1
  173. package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
  174. package/views/3d/support/sunUtils.js +1 -1
  175. package/views/3d/support/viewpointUtils.js +1 -1
  176. package/views/3d/terrain/OverlayManager.js +1 -1
  177. package/views/3d/terrain/PatchRenderData.js +1 -1
  178. package/views/3d/terrain/SphericalPatch.js +1 -1
  179. package/views/3d/terrain/TerrainRenderer.js +1 -1
  180. package/views/3d/terrain/Tile.js +1 -1
  181. package/views/3d/webgl-engine/collections/Component/DepthRange.js +1 -1
  182. package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
  183. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  184. package/views/3d/webgl-engine/core/util/TwoVectorPosition.js +1 -1
  185. package/views/3d/webgl-engine/effects/RenderNodes.js +1 -1
  186. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  187. package/views/3d/webgl-engine/lib/BoundingInfo.js +1 -1
  188. package/views/3d/webgl-engine/lib/Camera.js +1 -1
  189. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  190. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  191. package/views/3d/webgl-engine/lib/Octree.js +1 -1
  192. package/views/3d/webgl-engine/lib/PathVertex.js +1 -1
  193. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  194. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  195. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  196. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  197. package/views/3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js +1 -1
  198. package/views/3d/webgl-engine/lib/geometryDataUtils.js +1 -1
  199. package/views/3d/webgl-engine/lib/intersectorUtils.js +1 -1
  200. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  201. package/views/3d/webgl-engine/lib/verticalOffsetUtils.js +1 -1
  202. package/views/3d/webgl-engine/lighting/SceneLighting.js +1 -1
  203. package/views/3d/webgl-engine/lighting/SphericalHarmonics.js +1 -1
  204. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  205. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  206. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  207. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  208. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  209. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  210. package/views/3d/webgl-engine/materials/pbrUtils.js +1 -1
  211. package/views/SelectionManager.js +1 -1
  212. package/views/draw/support/createUtils.js +1 -1
  213. package/views/draw/support/surfaceCoordinateSystems.js +1 -1
  214. package/views/interactive/GraphicManipulator.js +1 -1
  215. package/views/interactive/SegmentLabels.js +1 -1
  216. package/views/interactive/coordinateHelper.js +1 -1
  217. package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
  218. package/views/interactive/editGeometry/support/editPlaneUtils.js +1 -1
  219. package/views/interactive/sketch/constraints.js +1 -1
  220. package/views/interactive/snapping/RightAngleSnapper.js +1 -1
  221. package/views/interactive/snapping/candidates/ParallelLineSnappingCandidate.js +1 -1
  222. package/views/interactive/snapping/candidates/RightAngleTriangleSnappingCandidate.js +1 -1
  223. package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +1 -1
  224. package/views/interactive/snapping/featureSources/sceneLayerSource/sceneLayerSnappingUtils.js +1 -1
  225. package/views/interactive/snapping/hints/IntersectionSnappingHint.js +1 -1
  226. package/views/interactive/snapping/hints/LineSnappingHint.js +1 -1
  227. package/views/interactive/snapping/hints/ParallelSnappingHint.js +1 -1
  228. package/views/interactive/snapping/hints/PointSnappingHint.js +1 -1
  229. package/views/interactive/snapping/hints/RightAngleSnappingHint.js +1 -1
  230. package/views/layers/FeatureLayerView.js +1 -1
  231. package/views/navigation/PanSphericalMomentumEstimator.js +1 -1
  232. package/views/support/angularMeasurementUtils.js +1 -1
  233. package/views/support/euclideanAreaMeasurementUtils.js +1 -1
  234. package/views/support/euclideanLengthMeasurementUtils.js +1 -1
  235. package/views/support/geometry3dUtils.js +1 -1
  236. package/widgets/Editor/EditorViewModel.js +1 -1
  237. package/widgets/ElevationProfile/support/geometryUtils.js +1 -1
  238. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  239. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  240. package/widgets/FeatureTable/support/ColumnTemplateBase.js +1 -1
  241. package/widgets/Features/FeaturesViewModel.js +1 -1
  242. package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
  243. package/widgets/PanoramicViewer/utils.js +1 -1
  244. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  245. package/widgets/support/Selector2D/SelectionOperation.js +1 -1
  246. package/widgets/support/Selector2D/selectorUtils.js +1 -1
  247. package/assets/esri/core/workers/chunks/0e83f3718a0b45652b5e.js +0 -1
  248. package/assets/esri/core/workers/chunks/1fa5c8af69a09a3730b3.js +0 -1
  249. package/assets/esri/core/workers/chunks/4736f79b5c94ce103d43.js +0 -1
  250. package/assets/esri/core/workers/chunks/65f7adaaf1f535310c11.js +0 -1
  251. package/assets/esri/core/workers/chunks/79c041b292648c5eaecc.js +0 -1
  252. package/assets/esri/core/workers/chunks/7c4c2c0beddabac672b6.js +0 -1
  253. package/assets/esri/core/workers/chunks/9307d485a9e5f9fa77d1.js +0 -1
  254. package/assets/esri/core/workers/chunks/9a758de08dfa57735879.js +0 -1
  255. package/assets/esri/core/workers/chunks/a4c3da057ec2a07bbbe8.js +0 -1
  256. package/assets/esri/core/workers/chunks/b252270b100351779f1f.js +0 -1
  257. package/assets/esri/core/workers/chunks/dc57aa9f2fc69e654559.js +0 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4232],{4232:(e,t,s)=>{s.r(t),s.d(t,{toBinaryGLTF:()=>j});var n,i=s(28176),r=s(67776);!function(e){e[e.JSON=1313821514]="JSON",e[e.BIN=5130562]="BIN"}(n||(n={}));class _{constructor(e,t){if(!e)throw new Error("GLB requires a JSON gltf chunk");this._length=_.HEADER_SIZE,this._length+=_.CHUNK_HEADER_SIZE;const s=this._textToArrayBuffer(e);if(this._length+=this._alignTo(s.byteLength,4),t&&(this._length+=_.CHUNK_HEADER_SIZE,this._length+=t.byteLength,t.byteLength%4))throw new Error("Expected BIN chunk length to be divisible by 4 at this point");this.buffer=new ArrayBuffer(this._length),this._outView=new DataView(this.buffer),this._writeHeader();const i=this._writeChunk(s,12,n.JSON,32);t&&this._writeChunk(t,i,n.BIN)}_writeHeader(){this._outView.setUint32(0,_.MAGIC,!0),this._outView.setUint32(4,_.VERSION,!0),this._outView.setUint32(8,this._length,!0)}_writeChunk(e,t,s,n=0){const i=this._alignTo(e.byteLength,4);for(this._outView.setUint32(t,i,!0),this._outView.setUint32(t+=4,s,!0),this._writeArrayBuffer(this._outView.buffer,e,t+=4,0,e.byteLength),t+=e.byteLength;t%4;)n&&this._outView.setUint8(t,n),t++;return t}_writeArrayBuffer(e,t,s,n,i){new Uint8Array(e,s,i).set(new Uint8Array(t,n,i),0)}_textToArrayBuffer(e){return(new TextEncoder).encode(e).buffer}_alignTo(e,t){return t*Math.ceil(e/t)}}_.HEADER_SIZE=12,_.CHUNK_HEADER_SIZE=8,_.MAGIC=1179937895,_.VERSION=2;var E,a,o,T,A,R,c,f=s(20744),h=s(66360),u=s(86916),N=s(53648),l=s(24296),S=s(15008),C=s(87104),O=s(41512),I=s(2620),d=s(98472),L=s(62484),M=s(51232),D=s(70492),p=s(54828);!function(e){e[e.External=0]="External",e[e.DataURI=1]="DataURI",e[e.GLB=2]="GLB"}(E||(E={})),function(e){e[e.External=0]="External",e[e.DataURI=1]="DataURI",e[e.GLB=2]="GLB"}(a||(a={})),function(e){e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER"}(o||(o={})),function(e){e.SCALAR="SCALAR",e.VEC2="VEC2",e.VEC3="VEC3",e.VEC4="VEC4",e.MAT2="MAT2",e.MAT3="MAT3",e.MAT4="MAT4"}(T||(T={})),function(e){e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(A||(A={})),function(e){e.OPAQUE="OPAQUE",e.MASK="MASK",e.BLEND="BLEND"}(R||(R={})),function(e){e[e.NoColor=0]="NoColor",e[e.FaceColor=1]="FaceColor",e[e.VertexColor=2]="VertexColor"}(c||(c={}));var m=s(77800);class B{constructor(e,t,s,n,i){this._buffer=e,this._componentType=s,this._dataType=n,this._data=[],this._isFinalized=!1,this._accessorIndex=-1,this._accessorAttribute=null,this._accessorMin=null,this._accessorMax=null,t.bufferViews||(t.bufferViews=[]),this.index=t.bufferViews.length,this._bufferView={buffer:e.index,byteLength:-1,target:i};const r=this._getElementSize();r>=4&&i!==o.ELEMENT_ARRAY_BUFFER&&(this._bufferView.byteStride=r),t.bufferViews.push(this._bufferView),this._numComponentsForDataType=this._calculateNumComponentsForDataType()}push(e){const t=this._data.length;if(this._data.push(e),this._accessorIndex>=0){const s=t%this._numComponentsForDataType,n=this._accessorMin[s];this._accessorMin[s]="number"!=typeof n?e:Math.min(n,e);const i=this._accessorMax[s];this._accessorMax[s]="number"!=typeof i?e:Math.max(i,e)}}get dataSize(){return this._data.length*this._sizeComponentType()}get byteSize(){return function(e,t){return 4*Math.ceil(e/4)}(this.dataSize)}getByteOffset(){if(!this._isFinalized)throw new Error("Cannot get BufferView offset until it is finalized");return this._buffer.getByteOffset(this)}get byteOffset(){if(!this._isFinalized)throw new Error("Cannot get BufferView offset until it is finalized");return this._buffer.getByteOffset(this)}_createTypedArray(e,t){switch(this._componentType){case m.Ck.BYTE:return new Int8Array(e,t);case m.Ck.FLOAT:return new Float32Array(e,t);case m.Ck.SHORT:return new Int16Array(e,t);case m.Ck.UNSIGNED_BYTE:return new Uint8Array(e,t);case m.Ck.UNSIGNED_INT:return new Uint32Array(e,t);case m.Ck.UNSIGNED_SHORT:return new Uint16Array(e,t)}}writeOutToBuffer(e,t){this._createTypedArray(e,t).set(this._data)}writeAsync(e){if(this._asyncWritePromise)throw new Error("Can't write multiple bufferView values asynchronously");return this._asyncWritePromise=e.then((e=>{const t=new Uint8Array(e);for(let e=0;e<t.length;++e)this._data.push(t[e]);delete this._asyncWritePromise})),this._asyncWritePromise}startAccessor(e){if(this._accessorIndex>=0)throw new Error("Accessor was started without ending the previous one");this._accessorIndex=this._data.length,this._accessorAttribute=e;const t=this._numComponentsForDataType;this._accessorMin=new Array(t),this._accessorMax=new Array(t)}endAccessor(){if(this._accessorIndex<0)throw new Error("An accessor was not started, but was attempted to be ended");const e=this._getElementSize(),t=this._numComponentsForDataType,s=(this._data.length-this._accessorIndex)/t;if(s%1)throw new Error("An accessor was ended with missing component values");for(let e=0;e<this._accessorMin.length;++e)"number"!=typeof this._accessorMin[e]&&(this._accessorMin[e]=0),"number"!=typeof this._accessorMax[e]&&(this._accessorMax[e]=0);const n={byteOffset:e*(this._accessorIndex/t),componentType:this._componentType,count:s,type:this._dataType,min:this._accessorMin,max:this._accessorMax,name:this._accessorAttribute};switch(this._accessorAttribute){case"TEXCOORD_0":case"TEXCOORD_1":case"COLOR_0":case"WEIGHTS_0":switch(this._componentType){case m.Ck.UNSIGNED_BYTE:case m.Ck.UNSIGNED_SHORT:n.normalized=!0}}return this._accessorIndex=-1,this._accessorAttribute=null,this._accessorMin=null,this._accessorMax=null,n}get finalized(){return this._finalizedPromise?this._finalizedPromise:this._isFinalized?this._finalizedPromise=Promise.resolve():this._finalizedPromise=new Promise((e=>this._finalizedPromiseResolve=e))}async finalize(){const e=this._bufferView,t=this._buffer.getViewFinalizePromises(this);this._asyncWritePromise&&t.push(this._asyncWritePromise),await Promise.allSettled(t),this._isFinalized=!0,e.byteOffset=this.getByteOffset(),e.byteLength=this.dataSize,this._finalizedPromiseResolve&&this._finalizedPromiseResolve()}_getElementSize(){return this._sizeComponentType()*this._numComponentsForDataType}_sizeComponentType(){switch(this._componentType){case m.Ck.BYTE:case m.Ck.UNSIGNED_BYTE:return 1;case m.Ck.SHORT:case m.Ck.UNSIGNED_SHORT:return 2;case m.Ck.UNSIGNED_INT:case m.Ck.FLOAT:return 4}}_calculateNumComponentsForDataType(){switch(this._dataType){case T.SCALAR:return 1;case T.VEC2:return 2;case T.VEC3:return 3;case T.VEC4:case T.MAT2:return 4;case T.MAT3:return 9;case T.MAT4:return 16}}}class U{constructor(e){this._gltf=e,this._bufferViews=[],this._isFinalized=!1,e.buffers||(e.buffers=[]),this.index=e.buffers.length;const t={byteLength:-1};e.buffers.push(t),this._buffer=t}addBufferView(e,t,s){if(this._finalizePromise)throw new Error("Cannot add buffer view after fiinalizing buffer");const n=new B(this,this._gltf,e,t,s);return this._bufferViews.push(n),n}getByteOffset(e){let t=0;for(const s of this._bufferViews){if(s===e)return t;t+=s.byteSize}throw new Error("Given bufferView was not present in this buffer")}getViewFinalizePromises(e){const t=[];for(const s of this._bufferViews){if(e&&s===e)return t;t.push(s.finalized)}return t}getArrayBuffer(){if(!this._isFinalized)throw new Error("Cannot get ArrayBuffer from Buffer before it is finalized");const e=this._getTotalSize(),t=new ArrayBuffer(e);let s=0;for(const e of this._bufferViews)e.writeOutToBuffer(t,s),s+=e.byteSize;return t}finalize(){if(this._finalizePromise)throw new Error(`Buffer ${this.index} was already finalized`);return this._finalizePromise=Promise.allSettled(this.getViewFinalizePromises()).then((()=>{this._isFinalized=!0;const e=this.getArrayBuffer();this._buffer.byteLength=e.byteLength,this._buffer.uri=e})),this._gltf.extras?.promises.push(this._finalizePromise),this._finalizePromise}_getTotalSize(){let e=0;for(const t of this._bufferViews)e+=t.byteSize;return e}}function P(e,t){null==t.normal&&(t.normal=new Float32Array(t.position.length));const s=e.faces,{position:n,normal:i}=t,r=s.length/3;for(let e=0;e<r;++e){const t=3*s[3*e],r=3*s[3*e+1],_=3*s[3*e+2],E=(0,d.s)(G,n[t],n[t+1],n[t+2]),a=(0,d.s)(g,n[r],n[r+1],n[r+2]),o=(0,d.s)(F,n[_],n[_+1],n[_+2]),T=(0,d.f)(a,a,E),A=(0,d.f)(o,o,E),R=(0,d.b)(T,T,A);i[t]+=R[0],i[t+1]+=R[1],i[t+2]+=R[2],i[r]+=R[0],i[r+1]+=R[1],i[r+2]+=R[2],i[_]+=R[0],i[_+1]+=R[1],i[_+2]+=R[2]}for(let e=0;e<i.length;e+=3)(0,d.s)(w,i[e],i[e+1],i[e+2]),(0,d.n)(w,w),i[e]=w[0],i[e+1]=w[1],i[e+2]=w[2]}const G=(0,L.Su)(),g=(0,L.Su)(),F=(0,L.Su)(),w=(0,L.Su)();async function b(e){const t=y(e);if(null==t)throw new f.c("imageToArrayBuffer","Unsupported image type");const s=await async function(e){if(!(e instanceof HTMLImageElement))return"image/png";const t=e.src;if((0,i.o9)(t)){const e=(0,i.nV)(t);return"image/jpeg"===e?.mediaType?e.mediaType:"image/png"}return/\.png$/i.test(t)?"image/png":/\.(jpg|jpeg)$/i.test(t)?"image/jpeg":"image/png"}(e),n=await new Promise((e=>t.toBlob(e,s)));if(!n)throw new f.c("imageToArrayBuffer","Failed to encode image");return{data:await n.arrayBuffer(),type:s}}function y(e){if(e instanceof HTMLCanvasElement)return e;if(e instanceof HTMLVideoElement)return null;const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const s=t.getContext("2d");return e instanceof HTMLImageElement?s.drawImage(e,0,0,e.width,e.height):e instanceof ImageData&&s.putImageData(e,0,0),t}s(9456);var H=s(5472);const x=()=>h.c.getLogger("gltf");class V{constructor(e,t,s){this.params={},this._materialMap=new Array,this._imageMap=new Map,this._textureMap=new Map,this.gltf={asset:{version:"2.0",copyright:e.copyright,generator:e.generator},extras:{options:t,binChunkBuffer:null,promises:[]}},s&&(this.params=s),this._addScenes(e)}_addScenes(e){this.gltf.scene=e.defaultScene;const t=this.gltf.extras,s=t.options.bufferOutputType===E.GLB||t.options.imageOutputType===a.GLB;s&&(t.binChunkBuffer=new U(this.gltf)),e.forEachScene((e=>{this._addScene(e)})),s&&t.binChunkBuffer.finalize()}_addScene(e){this.gltf.scenes||(this.gltf.scenes=[]);const t={};e.name&&(t.name=e.name),e.forEachNode((e=>{t.nodes||(t.nodes=[]),t.nodes.push(...this._addNodes(e))})),this.gltf.scenes.push(t)}_addNodes(e){this.gltf.nodes||(this.gltf.nodes=[]);const t={};e.name&&(t.name=e.name);const s=e.translation;(0,d.i)(s,L.cX)||(t.translation=(0,L.ct)(s));const n=e.rotation;(0,O.sF)(n,I.IJ)||(t.rotation=(0,I.ct)(n));const i=e.scale;(0,d.i)(i,L.Qw)||(t.scale=(0,L.ct)(i));const r=this.gltf.nodes.length;if(this.gltf.nodes.push(t),e.mesh&&e.mesh.vertexAttributes.position){const s=this._createMeshes(e.mesh),n=[r];if(1===s.length)this._addMesh(t,s[0]);else for(const e of s){const t={};this._addMesh(t,e),n.push(this.gltf.nodes.length),this.gltf.nodes.push(t)}return n}return e.forEachNode((e=>{t.children||(t.children=[]),t.children.push(...this._addNodes(e))})),[r]}_addMesh(e,t){this.gltf.meshes??=[];const s=this.gltf.meshes.length;this.gltf.meshes.push(t),e.mesh=s}_createMeshes(e){const t=this.gltf.extras,s=t.options.bufferOutputType===E.GLB;let n;n=s?t.binChunkBuffer:new U(this.gltf),this.params.origin||(this.params.origin=e.anchor);const{ignoreLocalTransform:i}=this.params,r=i?null:e.transform,{vertexSpace:_,spatialReference:a}=e,A=_.origin,R=e.vertexAttributes;let c=null;if("local"===_.type){const e=(0,l.eg)(a);(0,S.aU)(Y,r?.localMatrix??C.IJ,[e,e,e]),c=(0,p.CE)(R,Y)}else{const e=i?new M.c({origin:A?(0,L.ct)(A):null}):_;c=(0,p.iS)(R,e,r,this.params.origin,{geographic:this.params.geographic,unit:"meters"})}if(null==c)throw new f.c("Error during gltf export.");R.position&&c.position===R.position&&(c.position=R.position.slice()),R.normal&&c.normal===R.normal&&(c.normal=R.normal.slice()),R.tangent&&c.tangent===R.tangent&&(c.tangent=R.tangent.slice()),function(e,t){if(e.components)for(const s of e.components)s.faces&&"smooth"===s.shading&&P(s,t)}(e,c),this._flipYZAxis(c);const h=n.addBufferView(m.Ck.FLOAT,T.VEC3,o.ARRAY_BUFFER);let u,N,O,I;c.normal&&(u=n.addBufferView(m.Ck.FLOAT,T.VEC3,o.ARRAY_BUFFER)),R.uv&&(N=n.addBufferView(m.Ck.FLOAT,T.VEC2,o.ARRAY_BUFFER)),c.tangent&&(O=n.addBufferView(m.Ck.FLOAT,T.VEC4,o.ARRAY_BUFFER)),R.color&&(I=n.addBufferView(m.Ck.UNSIGNED_BYTE,T.VEC4,o.ARRAY_BUFFER)),h.startAccessor("POSITION"),u&&u.startAccessor("NORMAL"),N&&N.startAccessor("TEXCOORD_0"),O&&O.startAccessor("TANGENT"),I&&I.startAccessor("COLOR_0");const d=c.position.length/3,{position:D,normal:B,tangent:G}=c,{color:g,uv:F}=R;for(let e=0;e<d;++e)h.push(D[3*e]),h.push(D[3*e+1]),h.push(D[3*e+2]),u&&null!=B&&(u.push(B[3*e]),u.push(B[3*e+1]),u.push(B[3*e+2])),N&&null!=F&&(N.push(F[2*e]),N.push(F[2*e+1])),O&&null!=G&&(O.push(G[4*e]),O.push(G[4*e+1]),O.push(G[4*e+2]),O.push(G[4*e+3])),I&&null!=g&&(I.push(g[4*e]),I.push(g[4*e+1]),I.push(g[4*e+2]),I.push(g[4*e+3]));const w=h.endAccessor(),b=this._addAccessor(h.index,w);let y,H,x,V,z;if(u){const e=u.endAccessor();y=this._addAccessor(u.index,e)}if(N){const e=N.endAccessor();H=this._addAccessor(N.index,e)}if(O){const e=O.endAccessor();x=this._addAccessor(O.index,e)}if(I){const e=I.endAccessor();V=this._addAccessor(I.index,e)}const X=[];return e.components&&e.components.length>0&&e.components[0].faces?(z=n.addBufferView(m.Ck.UNSIGNED_INT,T.SCALAR,o.ELEMENT_ARRAY_BUFFER),this._addMeshVertexIndexed(z,e.components,X,b,y,H,x,V)):this._addMeshVertexNonIndexed(e.components,X,b,y,H,x,V),h.finalize(),u&&u.finalize(),N&&N.finalize(),O&&O.finalize(),z&&z.finalize(),I&&I.finalize(),s||n.finalize(),X}_flipYZAxis({position:e,normal:t,tangent:s}){this._flipYZBuffer(e,3),this._flipYZBuffer(t,3),this._flipYZBuffer(s,4)}_flipYZBuffer(e,t){if(null!=e)for(let s=1,n=2;s<e.length;s+=t,n+=t){const t=e[s],i=e[n];e[s]=i,e[n]=-t}}_addMaterial(e){if(null===e)return;const t=this._materialMap.indexOf(e);if(-1!==t)return t;this.gltf.materials||(this.gltf.materials=[]);const s={};switch(e.alphaMode){case"mask":s.alphaMode=R.MASK;break;case"auto":case"blend":s.alphaMode=R.BLEND}.5!==e.alphaCutoff&&(s.alphaCutoff=e.alphaCutoff),e.doubleSided&&(s.doubleSided=e.doubleSided),s.pbrMetallicRoughness={};const n=e=>e**2.1,i=e=>{const t=e.toRgba();return t[0]=n(t[0]/255),t[1]=n(t[1]/255),t[2]=n(t[2]/255),t};if(null!=e.color&&(s.pbrMetallicRoughness.baseColorFactor=i(e.color)),null!=e.colorTexture&&(s.pbrMetallicRoughness.baseColorTexture=this._createTextureInfo(e.colorTexture,e.colorTextureTransform)),null!=e.normalTexture&&(s.normalTexture=this._createTextureInfo(e.normalTexture,e.normalTextureTransform)),e instanceof D.c){if(null!=e.emissiveTexture&&(s.emissiveTexture=this._createTextureInfo(e.emissiveTexture,e.emissiveTextureTransform)),null!=e.emissiveColor){const t=i(e.emissiveColor);s.emissiveFactor=[t[0],t[1],t[2]]}null!=e.occlusionTexture&&(s.occlusionTexture=this._createTextureInfo(e.occlusionTexture,e.occlusionTextureTransform)),null!=e.metallicRoughnessTexture&&(s.pbrMetallicRoughness.metallicRoughnessTexture=this._createTextureInfo(e.metallicRoughnessTexture,e.metallicRoughnessTextureTransform)),s.pbrMetallicRoughness.metallicFactor=e.metallic,s.pbrMetallicRoughness.roughnessFactor=e.roughness}else s.pbrMetallicRoughness.metallicFactor=1,s.pbrMetallicRoughness.roughnessFactor=1,x().warnOnce("Meshes exported to GLTF without MeshMaterialMetallicRoughness material will appear different when imported back.");const r=this.gltf.materials.length;return this.gltf.materials.push(s),this._materialMap.push(e),r}_createTextureInfo(e,t){const s={index:this._addTexture(e)};return t?(s.extensions||(s.extensions={}),s.extensions.KHR_texture_transform={scale:t.scale,offset:t.offset,rotation:(0,N.EF)(t.rotation)},s):s}_addTexture(e){const t=this.gltf.textures??[];return this.gltf.textures=t,(0,u.wJ)(this._textureMap,e,(()=>{const s={sampler:this._addSampler(e),source:this._addImage(e)},n=t.length;return t.push(s),n}))}_addImage(e){const t=this._imageMap.get(e);if(null!=t)return t;this.gltf.images||(this.gltf.images=[]);const s={};if(e.url)s.uri=e.url;else{const t=e.data;s.extras=t;for(let e=0;e<this.gltf.images.length;++e)if(t===this.gltf.images[e].extras)return e;const n=this.gltf.extras;switch(n.options.imageOutputType){case a.GLB:{const e=n.binChunkBuffer.addBufferView(m.Ck.UNSIGNED_BYTE,T.SCALAR);if((0,H.e6)(t))null!=t.data&&e.writeOutToBuffer(t.data,0);else{const n=b(t).then((({data:e,type:t})=>(s.mimeType=t,e)));e.writeAsync(n).then((()=>{e.finalize()}))}s.bufferView=e.index;break}case a.DataURI:if((0,H.e6)(t)){x().warnOnce("Image export for basis compressed textures not available.");break}s.uri=function(e){const t=y(e);return null!=t?t.toDataURL():""}(t);break;default:if((0,H.e6)(t)){x().warnOnce("Image export for basis compressed textures not available.");break}n.promises.push(b(t).then((({data:e,type:t})=>{s.uri=e,s.mimeType=t})))}}const n=this.gltf.images.length;return this.gltf.images.push(s),this._imageMap.set(e,n),n}_addSampler(e){this.gltf.samplers||(this.gltf.samplers=[]);let t=m.Qz.REPEAT,s=m.Qz.REPEAT;if("string"==typeof e.wrap)switch(e.wrap){case"clamp":t=m.Qz.CLAMP_TO_EDGE,s=m.Qz.CLAMP_TO_EDGE;break;case"mirror":t=m.Qz.MIRRORED_REPEAT,s=m.Qz.MIRRORED_REPEAT}else{switch(e.wrap.vertical){case"clamp":s=m.Qz.CLAMP_TO_EDGE;break;case"mirror":s=m.Qz.MIRRORED_REPEAT}switch(e.wrap.horizontal){case"clamp":t=m.Qz.CLAMP_TO_EDGE;break;case"mirror":t=m.Qz.MIRRORED_REPEAT}}const n={wrapS:t,wrapT:s};for(let e=0;e<this.gltf.samplers.length;++e)if(JSON.stringify(n)===JSON.stringify(this.gltf.samplers[e]))return e;const i=this.gltf.samplers.length;return this.gltf.samplers.push(n),i}_addAccessor(e,t){this.gltf.accessors||(this.gltf.accessors=[]);const s={bufferView:e,byteOffset:t.byteOffset,componentType:t.componentType,count:t.count,type:t.type,min:t.min,max:t.max,name:t.name};t.normalized&&(s.normalized=!0);const n=this.gltf.accessors.length;return this.gltf.accessors.push(s),n}_addMeshVertexIndexed(e,t,s,n,i,r,_,E){const a=new Map;for(const o of t){e.startAccessor("INDICES");for(let t=0;t<o.faces.length;++t)e.push(o.faces[t]);const t=e.endAccessor(),T={attributes:{POSITION:n},indices:this._addAccessor(e.index,t),material:this._addMaterial(o.material)};i&&"flat"!==o.shading&&(T.attributes.NORMAL=i),r&&(T.attributes.TEXCOORD_0=r),_&&"flat"!==o.shading&&(T.attributes.TANGENT=_),E&&(T.attributes.COLOR_0=E);const A=a.get(o.name);if(A)A.primitives.push(T);else{const e={name:o.name,primitives:[T]};a.set(o.name,e),s.push(e)}}}_addMeshVertexNonIndexed(e,t,s,n,i,r,_){const E={primitives:[]};t.push(E);const a={attributes:{POSITION:s}};n&&(a.attributes.NORMAL=n),i&&(a.attributes.TEXCOORD_0=i),r&&(a.attributes.TANGENT=r),_&&(a.attributes.COLOR_0=_),e&&(a.material=this._addMaterial(e[0].material)),E.primitives.push(a)}}const Y=(0,C.Su)();var z=s(92400);class X{constructor(){this.copyright="",this.defaultScene=0,this.generator="",this._scenes=[]}addScene(e){if(this._scenes.includes(e))throw new Error("Scene already added");this._scenes.push(e)}removeScene(e){(0,z.aE)(this._scenes,e)}forEachScene(e){this._scenes.forEach(e)}}class k{constructor(e){this.mesh=e,this.name="",this.translation=(0,L.Su)(),this.rotation=(0,I.Su)(),this.scale=(0,L.ct)(L.Qw),this._nodes=[]}addNode(e){if(this._nodes.includes(e))throw new Error("Node already added");this._nodes.push(e)}forEachNode(e){this._nodes.forEach(e)}set rotationAngles(e){(0,O.Wu)(this.rotation,e[0],e[1],e[2])}}const v="model.gltf",W="model.glb";async function Q(e,t,s){const n=new V(e,t=t||{},s);let i=n.params;i?i.origin||(i.origin=new r.c({x:-1,y:-1,z:-1})):i={origin:new r.c({x:-1,y:-1,z:-1})};const o=i.origin,T=n.gltf,A=T.extras?.promises??[];let R=1,c=1,f=null;await Promise.allSettled(A);const h={origin:o};delete T.extras;const u="number"==typeof t.jsonSpacing?t.jsonSpacing:4,N=JSON.stringify(T,((e,s)=>{if("extras"!==e){if(s instanceof ArrayBuffer){if(function(e){if(e.byteLength<8)return!1;const t=new Uint8Array(e);return 137===t[0]&&80===t[1]&&78===t[2]&&71===t[3]&&13===t[4]&&10===t[5]&&26===t[6]&&10===t[7]}(s))switch(t.imageOutputType){case a.DataURI:case a.GLB:break;case a.External:default:{const e=`img${c}.png`;return c++,h[e]=s,e}}switch(t.bufferOutputType){case E.DataURI:return function(e){const t=[],s=new Uint8Array(e);for(let e=0;e<s.length;e++)t.push(String.fromCharCode(s[e]));return"data:application/octet-stream;base64,"+btoa(t.join(""))}(s);case E.GLB:if(f)throw new Error("Already encountered an ArrayBuffer, there should only be one in the GLB format.");return void(f=s);case E.External:default:{const e=`data${R}.bin`;return R++,h[e]=s,e}}}return s}}),u);return t.bufferOutputType===E.GLB||t.imageOutputType===a.GLB?h[W]=new _(N,f).buffer:h[v]=N,h}class K{constructor(){this.name="",this._nodes=[]}addNode(e){if(this._nodes.includes(e))throw new Error("Node already added");this._nodes.push(e)}forEachNode(e){this._nodes.forEach(e)}}class Z{constructor(e,t){this._file={type:"model/gltf-binary",data:e},this.origin=t}buffer(){return Promise.resolve(this._file)}download(e){(0,i.ch)(new Blob([this._file.data],{type:this._file.type}),e)}}function j(e,t){const s=new X,n=new K;return s.addScene(n),n.addNode(new k(e)),function(e,t){return Q(e,{bufferOutputType:E.GLB,imageOutputType:a.GLB,jsonSpacing:0},t)}(s,t).then((e=>new Z(e[W],e.origin)))}},5472:(e,t,s)=>{s.d(t,{CA:()=>r,Y1:()=>E,e0:()=>a,e6:()=>_});var n=s(9456),i=s(12260);class r{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding=i.yk.KTX2_ENCODING}}function _(e){return"encoded-mesh-texture"===e?.type}async function E(e){const t=new Blob([e]),s=await t.text();return JSON.parse(s)}async function a(e,t){if(t===i.yk.KTX2_ENCODING)return new r(e);const s=new Blob([e],{type:t}),_=URL.createObjectURL(s),E=new Image;if((0,n.c)("esri-iPhone"))return new Promise(((e,t)=>{const s=()=>{i(),e(E)},n=e=>{i(),t(e)},i=()=>{URL.revokeObjectURL(_),E.removeEventListener("load",s),E.removeEventListener("error",n)};E.addEventListener("load",s),E.addEventListener("error",n),E.src=_}));try{E.src=_,await E.decode()}catch(e){console.warn("Failed decoding HTMLImageElement")}return URL.revokeObjectURL(_),E}},77800:(e,t,s)=>{var n,i,r,_,E,a,o,T,A,R,c,f,h,u,N,l,S,C,O,I,d,L,M;s.d(t,{Ck:()=>T,GE:()=>D,Gs:()=>O,Id:()=>u,K:()=>E,OK:()=>l,QD:()=>R,Qb:()=>S,Qx:()=>L,Qz:()=>f,SC:()=>a,UV:()=>N,Ud:()=>c,Uf:()=>i,YT:()=>_,_m:()=>C,c5:()=>h,et:()=>A,kl:()=>I,sl:()=>n,sr:()=>p,vs:()=>o,w$:()=>r,y4:()=>d}),function(e){e[e.DEPTH_BUFFER_BIT=256]="DEPTH_BUFFER_BIT",e[e.STENCIL_BUFFER_BIT=1024]="STENCIL_BUFFER_BIT",e[e.COLOR_BUFFER_BIT=16384]="COLOR_BUFFER_BIT"}(n||(n={})),function(e){e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(i||(i={})),function(e){e[e.ZERO=0]="ZERO",e[e.ONE=1]="ONE",e[e.SRC_COLOR=768]="SRC_COLOR",e[e.ONE_MINUS_SRC_COLOR=769]="ONE_MINUS_SRC_COLOR",e[e.SRC_ALPHA=770]="SRC_ALPHA",e[e.ONE_MINUS_SRC_ALPHA=771]="ONE_MINUS_SRC_ALPHA",e[e.DST_ALPHA=772]="DST_ALPHA",e[e.ONE_MINUS_DST_ALPHA=773]="ONE_MINUS_DST_ALPHA",e[e.DST_COLOR=774]="DST_COLOR",e[e.ONE_MINUS_DST_COLOR=775]="ONE_MINUS_DST_COLOR",e[e.SRC_ALPHA_SATURATE=776]="SRC_ALPHA_SATURATE",e[e.CONSTANT_COLOR=32769]="CONSTANT_COLOR",e[e.ONE_MINUS_CONSTANT_COLOR=32770]="ONE_MINUS_CONSTANT_COLOR",e[e.CONSTANT_ALPHA=32771]="CONSTANT_ALPHA",e[e.ONE_MINUS_CONSTANT_ALPHA=32772]="ONE_MINUS_CONSTANT_ALPHA"}(r||(r={})),function(e){e[e.ADD=32774]="ADD",e[e.MIN=32775]="MIN",e[e.MAX=32776]="MAX",e[e.SUBTRACT=32778]="SUBTRACT",e[e.REVERSE_SUBTRACT=32779]="REVERSE_SUBTRACT"}(_||(_={})),function(e){e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",e[e.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",e[e.PIXEL_PACK_BUFFER=35051]="PIXEL_PACK_BUFFER",e[e.PIXEL_UNPACK_BUFFER=35052]="PIXEL_UNPACK_BUFFER",e[e.COPY_READ_BUFFER=36662]="COPY_READ_BUFFER",e[e.COPY_WRITE_BUFFER=36663]="COPY_WRITE_BUFFER",e[e.TRANSFORM_FEEDBACK_BUFFER=35982]="TRANSFORM_FEEDBACK_BUFFER"}(E||(E={})),function(e){e[e.FRONT=1028]="FRONT",e[e.BACK=1029]="BACK",e[e.FRONT_AND_BACK=1032]="FRONT_AND_BACK"}(a||(a={})),function(e){e[e.CW=2304]="CW",e[e.CCW=2305]="CCW"}(o||(o={})),function(e){e[e.BYTE=5120]="BYTE",e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.SHORT=5122]="SHORT",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.INT=5124]="INT",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.FLOAT=5126]="FLOAT"}(T||(T={})),function(e){e[e.NEVER=512]="NEVER",e[e.LESS=513]="LESS",e[e.EQUAL=514]="EQUAL",e[e.LEQUAL=515]="LEQUAL",e[e.GREATER=516]="GREATER",e[e.NOTEQUAL=517]="NOTEQUAL",e[e.GEQUAL=518]="GEQUAL",e[e.ALWAYS=519]="ALWAYS"}(A||(A={})),function(e){e[e.ZERO=0]="ZERO",e[e.KEEP=7680]="KEEP",e[e.REPLACE=7681]="REPLACE",e[e.INCR=7682]="INCR",e[e.DECR=7683]="DECR",e[e.INVERT=5386]="INVERT",e[e.INCR_WRAP=34055]="INCR_WRAP",e[e.DECR_WRAP=34056]="DECR_WRAP"}(R||(R={})),function(e){e[e.NEAREST=9728]="NEAREST",e[e.LINEAR=9729]="LINEAR",e[e.NEAREST_MIPMAP_NEAREST=9984]="NEAREST_MIPMAP_NEAREST",e[e.LINEAR_MIPMAP_NEAREST=9985]="LINEAR_MIPMAP_NEAREST",e[e.NEAREST_MIPMAP_LINEAR=9986]="NEAREST_MIPMAP_LINEAR",e[e.LINEAR_MIPMAP_LINEAR=9987]="LINEAR_MIPMAP_LINEAR"}(c||(c={})),function(e){e[e.CLAMP_TO_EDGE=33071]="CLAMP_TO_EDGE",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(f||(f={})),function(e){e[e.TEXTURE_2D=3553]="TEXTURE_2D",e[e.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",e[e.TEXTURE_3D=32879]="TEXTURE_3D",e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",e[e.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY"}(h||(h={})),function(e){e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e[e.DEPTH24_STENCIL8=35056]="DEPTH24_STENCIL8",e[e.ALPHA=6406]="ALPHA",e[e.RGB=6407]="RGB",e[e.RGBA=6408]="RGBA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.RED=6403]="RED",e[e.RG=33319]="RG",e[e.RED_INTEGER=36244]="RED_INTEGER",e[e.RG_INTEGER=33320]="RG_INTEGER",e[e.RGB_INTEGER=36248]="RGB_INTEGER",e[e.RGBA_INTEGER=36249]="RGBA_INTEGER"}(u||(u={})),function(e){e[e.RGBA4=32854]="RGBA4",e[e.R16F=33325]="R16F",e[e.RG16F=33327]="RG16F",e[e.RGB32F=34837]="RGB32F",e[e.RGBA16F=34842]="RGBA16F",e[e.R32F=33326]="R32F",e[e.RG32F=33328]="RG32F",e[e.RGBA32F=34836]="RGBA32F",e[e.R11F_G11F_B10F=35898]="R11F_G11F_B10F",e[e.RGB8=32849]="RGB8",e[e.RGBA8=32856]="RGBA8",e[e.RGB5_A1=32855]="RGB5_A1",e[e.R8=33321]="R8",e[e.RG8=33323]="RG8",e[e.R8I=33329]="R8I",e[e.R8UI=33330]="R8UI",e[e.R16I=33331]="R16I",e[e.R16UI=33332]="R16UI",e[e.R32I=33333]="R32I",e[e.R32UI=33334]="R32UI",e[e.RG8I=33335]="RG8I",e[e.RG8UI=33336]="RG8UI",e[e.RG16I=33337]="RG16I",e[e.RG16UI=33338]="RG16UI",e[e.RG32I=33339]="RG32I",e[e.RG32UI=33340]="RG32UI",e[e.RGB16F=34843]="RGB16F",e[e.RGB9_E5=35901]="RGB9_E5",e[e.SRGB8=35905]="SRGB8",e[e.SRGB8_ALPHA8=35907]="SRGB8_ALPHA8",e[e.RGB565=36194]="RGB565",e[e.RGBA32UI=36208]="RGBA32UI",e[e.RGB32UI=36209]="RGB32UI",e[e.RGBA16UI=36214]="RGBA16UI",e[e.RGB16UI=36215]="RGB16UI",e[e.RGBA8UI=36220]="RGBA8UI",e[e.RGB8UI=36221]="RGB8UI",e[e.RGBA32I=36226]="RGBA32I",e[e.RGB32I=36227]="RGB32I",e[e.RGBA16I=36232]="RGBA16I",e[e.RGB16I=36233]="RGB16I",e[e.RGBA8I=36238]="RGBA8I",e[e.RGB8I=36239]="RGB8I",e[e.R8_SNORM=36756]="R8_SNORM",e[e.RG8_SNORM=36757]="RG8_SNORM",e[e.RGB8_SNORM=36758]="RGB8_SNORM",e[e.RGBA8_SNORM=36759]="RGBA8_SNORM",e[e.RGB10_A2=32857]="RGB10_A2",e[e.RGB10_A2UI=36975]="RGB10_A2UI"}(N||(N={})),function(e){e[e.FLOAT=5126]="FLOAT",e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",e[e.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",e[e.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",e[e.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",e[e.BYTE=5120]="BYTE",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.SHORT=5122]="SHORT",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.INT=5124]="INT",e[e.HALF_FLOAT=5131]="HALF_FLOAT",e[e.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",e[e.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV"}(l||(l={})),function(e){e[e.DEPTH_COMPONENT16=33189]="DEPTH_COMPONENT16",e[e.STENCIL_INDEX8=36168]="STENCIL_INDEX8",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e[e.DEPTH_COMPONENT24=33190]="DEPTH_COMPONENT24",e[e.DEPTH_COMPONENT32F=36012]="DEPTH_COMPONENT32F",e[e.DEPTH24_STENCIL8=35056]="DEPTH24_STENCIL8",e[e.DEPTH32F_STENCIL8=36013]="DEPTH32F_STENCIL8"}(S||(S={})),function(e){e[e.STATIC_DRAW=35044]="STATIC_DRAW",e[e.DYNAMIC_DRAW=35048]="DYNAMIC_DRAW",e[e.STREAM_DRAW=35040]="STREAM_DRAW",e[e.STATIC_READ=35045]="STATIC_READ",e[e.DYNAMIC_READ=35049]="DYNAMIC_READ",e[e.STREAM_READ=35041]="STREAM_READ",e[e.STATIC_COPY=35046]="STATIC_COPY",e[e.DYNAMIC_COPY=35050]="DYNAMIC_COPY",e[e.STREAM_COPY=35042]="STREAM_COPY"}(C||(C={})),function(e){e[e.FRAGMENT_SHADER=35632]="FRAGMENT_SHADER",e[e.VERTEX_SHADER=35633]="VERTEX_SHADER"}(O||(O={})),function(e){e[e.FRAMEBUFFER=36160]="FRAMEBUFFER",e[e.READ_FRAMEBUFFER=36008]="READ_FRAMEBUFFER",e[e.DRAW_FRAMEBUFFER=36009]="DRAW_FRAMEBUFFER"}(I||(I={})),function(e){e[e.Texture=0]="Texture",e[e.BufferObject=1]="BufferObject",e[e.VertexArrayObject=2]="VertexArrayObject",e[e.Shader=3]="Shader",e[e.Program=4]="Program",e[e.FramebufferObject=5]="FramebufferObject",e[e.Renderbuffer=6]="Renderbuffer",e[e.TransformFeedback=7]="TransformFeedback",e[e.Sync=8]="Sync",e[e.UNCOUNTED=9]="UNCOUNTED",e[e.LinesOfCode=9]="LinesOfCode",e[e.Uniform=10]="Uniform",e[e.COUNT=11]="COUNT"}(d||(d={})),function(e){e[e.COLOR_ATTACHMENT0=36064]="COLOR_ATTACHMENT0",e[e.COLOR_ATTACHMENT1=36065]="COLOR_ATTACHMENT1",e[e.COLOR_ATTACHMENT2=36066]="COLOR_ATTACHMENT2",e[e.COLOR_ATTACHMENT3=36067]="COLOR_ATTACHMENT3",e[e.COLOR_ATTACHMENT4=36068]="COLOR_ATTACHMENT4",e[e.COLOR_ATTACHMENT5=36069]="COLOR_ATTACHMENT5",e[e.COLOR_ATTACHMENT6=36070]="COLOR_ATTACHMENT6",e[e.COLOR_ATTACHMENT7=36071]="COLOR_ATTACHMENT7",e[e.COLOR_ATTACHMENT8=36072]="COLOR_ATTACHMENT8",e[e.COLOR_ATTACHMENT9=36073]="COLOR_ATTACHMENT9",e[e.COLOR_ATTACHMENT10=36074]="COLOR_ATTACHMENT10",e[e.COLOR_ATTACHMENT11=36075]="COLOR_ATTACHMENT11",e[e.COLOR_ATTACHMENT12=36076]="COLOR_ATTACHMENT12",e[e.COLOR_ATTACHMENT13=36077]="COLOR_ATTACHMENT13",e[e.COLOR_ATTACHMENT14=36078]="COLOR_ATTACHMENT14",e[e.COLOR_ATTACHMENT15=36079]="COLOR_ATTACHMENT15"}(L||(L={})),function(e){e[e.NONE=0]="NONE",e[e.BACK=1029]="BACK"}(M||(M={}));const D=33306;var p,m,B,U,P,G,g;!function(e){e[e.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",e[e.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",e[e.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",e[e.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",e[e.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",e[e.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",e[e.COMPRESSED_SRGB8_ETC2=37493]="COMPRESSED_SRGB8_ETC2",e[e.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",e[e.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",e[e.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",e[e.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC"}(p||(p={})),function(e){e[e.FLOAT=5126]="FLOAT",e[e.FLOAT_VEC2=35664]="FLOAT_VEC2",e[e.FLOAT_VEC3=35665]="FLOAT_VEC3",e[e.FLOAT_VEC4=35666]="FLOAT_VEC4",e[e.INT=5124]="INT",e[e.INT_VEC2=35667]="INT_VEC2",e[e.INT_VEC3=35668]="INT_VEC3",e[e.INT_VEC4=35669]="INT_VEC4",e[e.BOOL=35670]="BOOL",e[e.BOOL_VEC2=35671]="BOOL_VEC2",e[e.BOOL_VEC3=35672]="BOOL_VEC3",e[e.BOOL_VEC4=35673]="BOOL_VEC4",e[e.FLOAT_MAT2=35674]="FLOAT_MAT2",e[e.FLOAT_MAT3=35675]="FLOAT_MAT3",e[e.FLOAT_MAT4=35676]="FLOAT_MAT4",e[e.SAMPLER_2D=35678]="SAMPLER_2D",e[e.SAMPLER_CUBE=35680]="SAMPLER_CUBE",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.UNSIGNED_INT_VEC2=36294]="UNSIGNED_INT_VEC2",e[e.UNSIGNED_INT_VEC3=36295]="UNSIGNED_INT_VEC3",e[e.UNSIGNED_INT_VEC4=36296]="UNSIGNED_INT_VEC4",e[e.FLOAT_MAT2x3=35685]="FLOAT_MAT2x3",e[e.FLOAT_MAT2x4=35686]="FLOAT_MAT2x4",e[e.FLOAT_MAT3x2=35687]="FLOAT_MAT3x2",e[e.FLOAT_MAT3x4=35688]="FLOAT_MAT3x4",e[e.FLOAT_MAT4x2=35689]="FLOAT_MAT4x2",e[e.FLOAT_MAT4x3=35690]="FLOAT_MAT4x3",e[e.SAMPLER_3D=35679]="SAMPLER_3D",e[e.SAMPLER_2D_SHADOW=35682]="SAMPLER_2D_SHADOW",e[e.SAMPLER_2D_ARRAY=36289]="SAMPLER_2D_ARRAY",e[e.SAMPLER_2D_ARRAY_SHADOW=36292]="SAMPLER_2D_ARRAY_SHADOW",e[e.SAMPLER_CUBE_SHADOW=36293]="SAMPLER_CUBE_SHADOW",e[e.INT_SAMPLER_2D=36298]="INT_SAMPLER_2D",e[e.INT_SAMPLER_3D=36299]="INT_SAMPLER_3D",e[e.INT_SAMPLER_CUBE=36300]="INT_SAMPLER_CUBE",e[e.INT_SAMPLER_2D_ARRAY=36303]="INT_SAMPLER_2D_ARRAY",e[e.UNSIGNED_INT_SAMPLER_2D=36306]="UNSIGNED_INT_SAMPLER_2D",e[e.UNSIGNED_INT_SAMPLER_3D=36307]="UNSIGNED_INT_SAMPLER_3D",e[e.UNSIGNED_INT_SAMPLER_CUBE=36308]="UNSIGNED_INT_SAMPLER_CUBE",e[e.UNSIGNED_INT_SAMPLER_2D_ARRAY=36311]="UNSIGNED_INT_SAMPLER_2D_ARRAY"}(m||(m={})),function(e){e[e.OBJECT_TYPE=37138]="OBJECT_TYPE",e[e.SYNC_CONDITION=37139]="SYNC_CONDITION",e[e.SYNC_STATUS=37140]="SYNC_STATUS",e[e.SYNC_FLAGS=37141]="SYNC_FLAGS"}(B||(B={})),function(e){e[e.UNSIGNALED=37144]="UNSIGNALED",e[e.SIGNALED=37145]="SIGNALED"}(U||(U={})),function(e){e[e.ALREADY_SIGNALED=37146]="ALREADY_SIGNALED",e[e.TIMEOUT_EXPIRED=37147]="TIMEOUT_EXPIRED",e[e.CONDITION_SATISFIED=37148]="CONDITION_SATISFIED",e[e.WAIT_FAILED=37149]="WAIT_FAILED"}(P||(P={})),function(e){e[e.SYNC_GPU_COMMANDS_COMPLETE=37143]="SYNC_GPU_COMMANDS_COMPLETE"}(G||(G={})),function(e){e[e.SYNC_FLUSH_COMMANDS_BIT=1]="SYNC_FLUSH_COMMANDS_BIT"}(g||(g={}))}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4232],{4232:(e,t,s)=>{s.r(t),s.d(t,{toBinaryGLTF:()=>Z});var n,i=s(28176),r=s(67776);!function(e){e[e.JSON=1313821514]="JSON",e[e.BIN=5130562]="BIN"}(n||(n={}));class _{constructor(e,t){if(!e)throw new Error("GLB requires a JSON gltf chunk");this._length=_.HEADER_SIZE,this._length+=_.CHUNK_HEADER_SIZE;const s=this._textToArrayBuffer(e);if(this._length+=this._alignTo(s.byteLength,4),t&&(this._length+=_.CHUNK_HEADER_SIZE,this._length+=t.byteLength,t.byteLength%4))throw new Error("Expected BIN chunk length to be divisible by 4 at this point");this.buffer=new ArrayBuffer(this._length),this._outView=new DataView(this.buffer),this._writeHeader();const i=this._writeChunk(s,12,n.JSON,32);t&&this._writeChunk(t,i,n.BIN)}_writeHeader(){this._outView.setUint32(0,_.MAGIC,!0),this._outView.setUint32(4,_.VERSION,!0),this._outView.setUint32(8,this._length,!0)}_writeChunk(e,t,s,n=0){const i=this._alignTo(e.byteLength,4);for(this._outView.setUint32(t,i,!0),this._outView.setUint32(t+=4,s,!0),this._writeArrayBuffer(this._outView.buffer,e,t+=4,0,e.byteLength),t+=e.byteLength;t%4;)n&&this._outView.setUint8(t,n),t++;return t}_writeArrayBuffer(e,t,s,n,i){new Uint8Array(e,s,i).set(new Uint8Array(t,n,i),0)}_textToArrayBuffer(e){return(new TextEncoder).encode(e).buffer}_alignTo(e,t){return t*Math.ceil(e/t)}}_.HEADER_SIZE=12,_.CHUNK_HEADER_SIZE=8,_.MAGIC=1179937895,_.VERSION=2;var E,a,o,T,A,R,c,f=s(20744),h=s(66360),u=s(86916),N=s(53648),l=s(24296),S=s(15008),C=s(87104),O=s(41512),I=s(2620),d=s(98472),L=s(62484),M=s(51232),D=s(70492),p=s(54828);!function(e){e[e.External=0]="External",e[e.DataURI=1]="DataURI",e[e.GLB=2]="GLB"}(E||(E={})),function(e){e[e.External=0]="External",e[e.DataURI=1]="DataURI",e[e.GLB=2]="GLB"}(a||(a={})),function(e){e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER"}(o||(o={})),function(e){e.SCALAR="SCALAR",e.VEC2="VEC2",e.VEC3="VEC3",e.VEC4="VEC4",e.MAT2="MAT2",e.MAT3="MAT3",e.MAT4="MAT4"}(T||(T={})),function(e){e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(A||(A={})),function(e){e.OPAQUE="OPAQUE",e.MASK="MASK",e.BLEND="BLEND"}(R||(R={})),function(e){e[e.NoColor=0]="NoColor",e[e.FaceColor=1]="FaceColor",e[e.VertexColor=2]="VertexColor"}(c||(c={}));var m=s(77800);class B{constructor(e,t,s,n,i){this._buffer=e,this._componentType=s,this._dataType=n,this._data=[],this._isFinalized=!1,this._accessorIndex=-1,this._accessorAttribute=null,this._accessorMin=null,this._accessorMax=null,t.bufferViews||(t.bufferViews=[]),this.index=t.bufferViews.length,this._bufferView={buffer:e.index,byteLength:-1,target:i};const r=this._getElementSize();r>=4&&i!==o.ELEMENT_ARRAY_BUFFER&&(this._bufferView.byteStride=r),t.bufferViews.push(this._bufferView),this._numComponentsForDataType=this._calculateNumComponentsForDataType()}push(e){const t=this._data.length;if(this._data.push(e),this._accessorIndex>=0){const s=t%this._numComponentsForDataType,n=this._accessorMin[s];this._accessorMin[s]="number"!=typeof n?e:Math.min(n,e);const i=this._accessorMax[s];this._accessorMax[s]="number"!=typeof i?e:Math.max(i,e)}}get dataSize(){return this._data.length*this._sizeComponentType()}get byteSize(){return function(e,t){return 4*Math.ceil(e/4)}(this.dataSize)}getByteOffset(){if(!this._isFinalized)throw new Error("Cannot get BufferView offset until it is finalized");return this._buffer.getByteOffset(this)}get byteOffset(){if(!this._isFinalized)throw new Error("Cannot get BufferView offset until it is finalized");return this._buffer.getByteOffset(this)}_createTypedArray(e,t){switch(this._componentType){case m.Ck.BYTE:return new Int8Array(e,t);case m.Ck.FLOAT:return new Float32Array(e,t);case m.Ck.SHORT:return new Int16Array(e,t);case m.Ck.UNSIGNED_BYTE:return new Uint8Array(e,t);case m.Ck.UNSIGNED_INT:return new Uint32Array(e,t);case m.Ck.UNSIGNED_SHORT:return new Uint16Array(e,t)}}writeOutToBuffer(e,t){this._createTypedArray(e,t).set(this._data)}writeAsync(e){if(this._asyncWritePromise)throw new Error("Can't write multiple bufferView values asynchronously");return this._asyncWritePromise=e.then((e=>{const t=new Uint8Array(e);for(let e=0;e<t.length;++e)this._data.push(t[e]);delete this._asyncWritePromise})),this._asyncWritePromise}startAccessor(e){if(this._accessorIndex>=0)throw new Error("Accessor was started without ending the previous one");this._accessorIndex=this._data.length,this._accessorAttribute=e;const t=this._numComponentsForDataType;this._accessorMin=new Array(t),this._accessorMax=new Array(t)}endAccessor(){if(this._accessorIndex<0)throw new Error("An accessor was not started, but was attempted to be ended");const e=this._getElementSize(),t=this._numComponentsForDataType,s=(this._data.length-this._accessorIndex)/t;if(s%1)throw new Error("An accessor was ended with missing component values");for(let e=0;e<this._accessorMin.length;++e)"number"!=typeof this._accessorMin[e]&&(this._accessorMin[e]=0),"number"!=typeof this._accessorMax[e]&&(this._accessorMax[e]=0);const n={byteOffset:e*(this._accessorIndex/t),componentType:this._componentType,count:s,type:this._dataType,min:this._accessorMin,max:this._accessorMax,name:this._accessorAttribute};switch(this._accessorAttribute){case"TEXCOORD_0":case"TEXCOORD_1":case"COLOR_0":case"WEIGHTS_0":switch(this._componentType){case m.Ck.UNSIGNED_BYTE:case m.Ck.UNSIGNED_SHORT:n.normalized=!0}}return this._accessorIndex=-1,this._accessorAttribute=null,this._accessorMin=null,this._accessorMax=null,n}get finalized(){return this._finalizedPromise?this._finalizedPromise:this._isFinalized?this._finalizedPromise=Promise.resolve():this._finalizedPromise=new Promise((e=>this._finalizedPromiseResolve=e))}async finalize(){const e=this._bufferView,t=this._buffer.getViewFinalizePromises(this);this._asyncWritePromise&&t.push(this._asyncWritePromise),await Promise.allSettled(t),this._isFinalized=!0,e.byteOffset=this.getByteOffset(),e.byteLength=this.dataSize,this._finalizedPromiseResolve&&this._finalizedPromiseResolve()}_getElementSize(){return this._sizeComponentType()*this._numComponentsForDataType}_sizeComponentType(){switch(this._componentType){case m.Ck.BYTE:case m.Ck.UNSIGNED_BYTE:return 1;case m.Ck.SHORT:case m.Ck.UNSIGNED_SHORT:return 2;case m.Ck.UNSIGNED_INT:case m.Ck.FLOAT:return 4}}_calculateNumComponentsForDataType(){switch(this._dataType){case T.SCALAR:return 1;case T.VEC2:return 2;case T.VEC3:return 3;case T.VEC4:case T.MAT2:return 4;case T.MAT3:return 9;case T.MAT4:return 16}}}class U{constructor(e){this._gltf=e,this._bufferViews=[],this._isFinalized=!1,e.buffers||(e.buffers=[]),this.index=e.buffers.length;const t={byteLength:-1};e.buffers.push(t),this._buffer=t}addBufferView(e,t,s){if(this._finalizePromise)throw new Error("Cannot add buffer view after fiinalizing buffer");const n=new B(this,this._gltf,e,t,s);return this._bufferViews.push(n),n}getByteOffset(e){let t=0;for(const s of this._bufferViews){if(s===e)return t;t+=s.byteSize}throw new Error("Given bufferView was not present in this buffer")}getViewFinalizePromises(e){const t=[];for(const s of this._bufferViews){if(e&&s===e)return t;t.push(s.finalized)}return t}getArrayBuffer(){if(!this._isFinalized)throw new Error("Cannot get ArrayBuffer from Buffer before it is finalized");const e=this._getTotalSize(),t=new ArrayBuffer(e);let s=0;for(const e of this._bufferViews)e.writeOutToBuffer(t,s),s+=e.byteSize;return t}finalize(){if(this._finalizePromise)throw new Error(`Buffer ${this.index} was already finalized`);return this._finalizePromise=Promise.allSettled(this.getViewFinalizePromises()).then((()=>{this._isFinalized=!0;const e=this.getArrayBuffer();this._buffer.byteLength=e.byteLength,this._buffer.uri=e})),this._gltf.extras?.promises.push(this._finalizePromise),this._finalizePromise}_getTotalSize(){let e=0;for(const t of this._bufferViews)e+=t.byteSize;return e}}function P(e,t){null==t.normal&&(t.normal=new Float32Array(t.position.length));const s=e.faces,{position:n,normal:i}=t,r=s.length/3;for(let e=0;e<r;++e){const t=3*s[3*e],r=3*s[3*e+1],_=3*s[3*e+2],E=(0,d.s)(G,n[t],n[t+1],n[t+2]),a=(0,d.s)(g,n[r],n[r+1],n[r+2]),o=(0,d.s)(F,n[_],n[_+1],n[_+2]),T=(0,d.f)(a,a,E),A=(0,d.f)(o,o,E),R=(0,d.b)(T,T,A);i[t]+=R[0],i[t+1]+=R[1],i[t+2]+=R[2],i[r]+=R[0],i[r+1]+=R[1],i[r+2]+=R[2],i[_]+=R[0],i[_+1]+=R[1],i[_+2]+=R[2]}for(let e=0;e<i.length;e+=3)(0,d.s)(w,i[e],i[e+1],i[e+2]),(0,d.n)(w,w),i[e]=w[0],i[e+1]=w[1],i[e+2]=w[2]}const G=(0,L.Su)(),g=(0,L.Su)(),F=(0,L.Su)(),w=(0,L.Su)();async function b(e){const t=y(e);if(null==t)throw new f.c("imageToArrayBuffer","Unsupported image type");const s=await async function(e){if(!(e instanceof HTMLImageElement))return"image/png";const t=e.src;if((0,i.o9)(t)){const e=(0,i.nV)(t);return"image/jpeg"===e?.mediaType?e.mediaType:"image/png"}return/\.png$/i.test(t)?"image/png":/\.(jpg|jpeg)$/i.test(t)?"image/jpeg":"image/png"}(e),n=await new Promise((e=>t.toBlob(e,s)));if(!n)throw new f.c("imageToArrayBuffer","Failed to encode image");return{data:await n.arrayBuffer(),type:s}}function y(e){if(e instanceof HTMLCanvasElement)return e;if(e instanceof HTMLVideoElement)return null;const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const s=t.getContext("2d");return e instanceof HTMLImageElement?s.drawImage(e,0,0,e.width,e.height):e instanceof ImageData&&s.putImageData(e,0,0),t}s(9456);var H=s(5472);const x=()=>h.c.getLogger("gltf");class V{constructor(e,t,s){this.params={},this._materialMap=new Array,this._imageMap=new Map,this._textureMap=new Map,this.gltf={asset:{version:"2.0",copyright:e.copyright,generator:e.generator},extras:{options:t,binChunkBuffer:null,promises:[]}},s&&(this.params=s),this._addScenes(e)}_addScenes(e){this.gltf.scene=e.defaultScene;const t=this.gltf.extras,s=t.options.bufferOutputType===E.GLB||t.options.imageOutputType===a.GLB;s&&(t.binChunkBuffer=new U(this.gltf)),e.forEachScene((e=>{this._addScene(e)})),s&&t.binChunkBuffer.finalize()}_addScene(e){this.gltf.scenes||(this.gltf.scenes=[]);const t={};e.name&&(t.name=e.name),e.forEachNode((e=>{t.nodes||(t.nodes=[]),t.nodes.push(...this._addNodes(e))})),this.gltf.scenes.push(t)}_addNodes(e){this.gltf.nodes||(this.gltf.nodes=[]);const t={};e.name&&(t.name=e.name);const s=e.translation;(0,d.j)(s,L.cX)||(t.translation=(0,L.ct)(s));const n=e.rotation;(0,O.sF)(n,I.IJ)||(t.rotation=(0,I.ct)(n));const i=e.scale;(0,d.j)(i,L.Qw)||(t.scale=(0,L.ct)(i));const r=this.gltf.nodes.length;if(this.gltf.nodes.push(t),e.mesh&&e.mesh.vertexAttributes.position){const s=this._createMeshes(e.mesh),n=[r];if(1===s.length)this._addMesh(t,s[0]);else for(const e of s){const t={};this._addMesh(t,e),n.push(this.gltf.nodes.length),this.gltf.nodes.push(t)}return n}return e.forEachNode((e=>{t.children||(t.children=[]),t.children.push(...this._addNodes(e))})),[r]}_addMesh(e,t){this.gltf.meshes??=[];const s=this.gltf.meshes.length;this.gltf.meshes.push(t),e.mesh=s}_createMeshes(e){const t=this.gltf.extras,s=t.options.bufferOutputType===E.GLB;let n;n=s?t.binChunkBuffer:new U(this.gltf),this.params.origin||(this.params.origin=e.anchor);const{ignoreLocalTransform:i}=this.params,r=i?null:e.transform,{vertexSpace:_,spatialReference:a}=e,A=_.origin,R=e.vertexAttributes;let c=null;if("local"===_.type){const e=(0,l.eg)(a);(0,S.aU)(Y,r?.localMatrix??C.IJ,[e,e,e]),c=(0,p.CE)(R,Y)}else{const e=i?new M.c({origin:A?(0,L.ct)(A):null}):_;c=(0,p.iS)(R,e,r,this.params.origin,{geographic:this.params.geographic,unit:"meters"})}if(null==c)throw new f.c("Error during gltf export.");R.position&&c.position===R.position&&(c.position=R.position.slice()),R.normal&&c.normal===R.normal&&(c.normal=R.normal.slice()),R.tangent&&c.tangent===R.tangent&&(c.tangent=R.tangent.slice()),function(e,t){if(e.components)for(const s of e.components)s.faces&&"smooth"===s.shading&&P(s,t)}(e,c),this._flipYZAxis(c);const h=n.addBufferView(m.Ck.FLOAT,T.VEC3,o.ARRAY_BUFFER);let u,N,O,I;c.normal&&(u=n.addBufferView(m.Ck.FLOAT,T.VEC3,o.ARRAY_BUFFER)),R.uv&&(N=n.addBufferView(m.Ck.FLOAT,T.VEC2,o.ARRAY_BUFFER)),c.tangent&&(O=n.addBufferView(m.Ck.FLOAT,T.VEC4,o.ARRAY_BUFFER)),R.color&&(I=n.addBufferView(m.Ck.UNSIGNED_BYTE,T.VEC4,o.ARRAY_BUFFER)),h.startAccessor("POSITION"),u&&u.startAccessor("NORMAL"),N&&N.startAccessor("TEXCOORD_0"),O&&O.startAccessor("TANGENT"),I&&I.startAccessor("COLOR_0");const d=c.position.length/3,{position:D,normal:B,tangent:G}=c,{color:g,uv:F}=R;for(let e=0;e<d;++e)h.push(D[3*e]),h.push(D[3*e+1]),h.push(D[3*e+2]),u&&null!=B&&(u.push(B[3*e]),u.push(B[3*e+1]),u.push(B[3*e+2])),N&&null!=F&&(N.push(F[2*e]),N.push(F[2*e+1])),O&&null!=G&&(O.push(G[4*e]),O.push(G[4*e+1]),O.push(G[4*e+2]),O.push(G[4*e+3])),I&&null!=g&&(I.push(g[4*e]),I.push(g[4*e+1]),I.push(g[4*e+2]),I.push(g[4*e+3]));const w=h.endAccessor(),b=this._addAccessor(h.index,w);let y,H,x,V,z;if(u){const e=u.endAccessor();y=this._addAccessor(u.index,e)}if(N){const e=N.endAccessor();H=this._addAccessor(N.index,e)}if(O){const e=O.endAccessor();x=this._addAccessor(O.index,e)}if(I){const e=I.endAccessor();V=this._addAccessor(I.index,e)}const X=[];return e.components&&e.components.length>0&&e.components[0].faces?(z=n.addBufferView(m.Ck.UNSIGNED_INT,T.SCALAR,o.ELEMENT_ARRAY_BUFFER),this._addMeshVertexIndexed(z,e.components,X,b,y,H,x,V)):this._addMeshVertexNonIndexed(e.components,X,b,y,H,x,V),h.finalize(),u&&u.finalize(),N&&N.finalize(),O&&O.finalize(),z&&z.finalize(),I&&I.finalize(),s||n.finalize(),X}_flipYZAxis({position:e,normal:t,tangent:s}){this._flipYZBuffer(e,3),this._flipYZBuffer(t,3),this._flipYZBuffer(s,4)}_flipYZBuffer(e,t){if(null!=e)for(let s=1,n=2;s<e.length;s+=t,n+=t){const t=e[s],i=e[n];e[s]=i,e[n]=-t}}_addMaterial(e){if(null===e)return;const t=this._materialMap.indexOf(e);if(-1!==t)return t;this.gltf.materials||(this.gltf.materials=[]);const s={};switch(e.alphaMode){case"mask":s.alphaMode=R.MASK;break;case"auto":case"blend":s.alphaMode=R.BLEND}.5!==e.alphaCutoff&&(s.alphaCutoff=e.alphaCutoff),e.doubleSided&&(s.doubleSided=e.doubleSided),s.pbrMetallicRoughness={};const n=e=>e**2.1,i=e=>{const t=e.toRgba();return t[0]=n(t[0]/255),t[1]=n(t[1]/255),t[2]=n(t[2]/255),t};if(null!=e.color&&(s.pbrMetallicRoughness.baseColorFactor=i(e.color)),null!=e.colorTexture&&(s.pbrMetallicRoughness.baseColorTexture=this._createTextureInfo(e.colorTexture,e.colorTextureTransform)),null!=e.normalTexture&&(s.normalTexture=this._createTextureInfo(e.normalTexture,e.normalTextureTransform)),e instanceof D.c){if(null!=e.emissiveTexture&&(s.emissiveTexture=this._createTextureInfo(e.emissiveTexture,e.emissiveTextureTransform)),null!=e.emissiveColor){const t=i(e.emissiveColor);s.emissiveFactor=[t[0],t[1],t[2]]}null!=e.occlusionTexture&&(s.occlusionTexture=this._createTextureInfo(e.occlusionTexture,e.occlusionTextureTransform)),null!=e.metallicRoughnessTexture&&(s.pbrMetallicRoughness.metallicRoughnessTexture=this._createTextureInfo(e.metallicRoughnessTexture,e.metallicRoughnessTextureTransform)),s.pbrMetallicRoughness.metallicFactor=e.metallic,s.pbrMetallicRoughness.roughnessFactor=e.roughness}else s.pbrMetallicRoughness.metallicFactor=1,s.pbrMetallicRoughness.roughnessFactor=1,x().warnOnce("Meshes exported to GLTF without MeshMaterialMetallicRoughness material will appear different when imported back.");const r=this.gltf.materials.length;return this.gltf.materials.push(s),this._materialMap.push(e),r}_createTextureInfo(e,t){const s={index:this._addTexture(e)};return t?(s.extensions||(s.extensions={}),s.extensions.KHR_texture_transform={scale:t.scale,offset:t.offset,rotation:(0,N.EF)(t.rotation)},s):s}_addTexture(e){const t=this.gltf.textures??[];return this.gltf.textures=t,(0,u.wJ)(this._textureMap,e,(()=>{const s={sampler:this._addSampler(e),source:this._addImage(e)},n=t.length;return t.push(s),n}))}_addImage(e){const t=this._imageMap.get(e);if(null!=t)return t;this.gltf.images||(this.gltf.images=[]);const s={};if(e.url)s.uri=e.url;else{const t=e.data;s.extras=t;for(let e=0;e<this.gltf.images.length;++e)if(t===this.gltf.images[e].extras)return e;const n=this.gltf.extras;switch(n.options.imageOutputType){case a.GLB:{const e=n.binChunkBuffer.addBufferView(m.Ck.UNSIGNED_BYTE,T.SCALAR);if((0,H.e6)(t))null!=t.data&&e.writeOutToBuffer(t.data,0);else{const n=b(t).then((({data:e,type:t})=>(s.mimeType=t,e)));e.writeAsync(n).then((()=>{e.finalize()}))}s.bufferView=e.index;break}case a.DataURI:if((0,H.e6)(t)){x().warnOnce("Image export for basis compressed textures not available.");break}s.uri=function(e){const t=y(e);return null!=t?t.toDataURL():""}(t);break;default:if((0,H.e6)(t)){x().warnOnce("Image export for basis compressed textures not available.");break}n.promises.push(b(t).then((({data:e,type:t})=>{s.uri=e,s.mimeType=t})))}}const n=this.gltf.images.length;return this.gltf.images.push(s),this._imageMap.set(e,n),n}_addSampler(e){this.gltf.samplers||(this.gltf.samplers=[]);let t=m.Qz.REPEAT,s=m.Qz.REPEAT;if("string"==typeof e.wrap)switch(e.wrap){case"clamp":t=m.Qz.CLAMP_TO_EDGE,s=m.Qz.CLAMP_TO_EDGE;break;case"mirror":t=m.Qz.MIRRORED_REPEAT,s=m.Qz.MIRRORED_REPEAT}else{switch(e.wrap.vertical){case"clamp":s=m.Qz.CLAMP_TO_EDGE;break;case"mirror":s=m.Qz.MIRRORED_REPEAT}switch(e.wrap.horizontal){case"clamp":t=m.Qz.CLAMP_TO_EDGE;break;case"mirror":t=m.Qz.MIRRORED_REPEAT}}const n={wrapS:t,wrapT:s};for(let e=0;e<this.gltf.samplers.length;++e)if(JSON.stringify(n)===JSON.stringify(this.gltf.samplers[e]))return e;const i=this.gltf.samplers.length;return this.gltf.samplers.push(n),i}_addAccessor(e,t){this.gltf.accessors||(this.gltf.accessors=[]);const s={bufferView:e,byteOffset:t.byteOffset,componentType:t.componentType,count:t.count,type:t.type,min:t.min,max:t.max,name:t.name};t.normalized&&(s.normalized=!0);const n=this.gltf.accessors.length;return this.gltf.accessors.push(s),n}_addMeshVertexIndexed(e,t,s,n,i,r,_,E){const a=new Map;for(const o of t){e.startAccessor("INDICES");for(let t=0;t<o.faces.length;++t)e.push(o.faces[t]);const t=e.endAccessor(),T={attributes:{POSITION:n},indices:this._addAccessor(e.index,t),material:this._addMaterial(o.material)};i&&"flat"!==o.shading&&(T.attributes.NORMAL=i),r&&(T.attributes.TEXCOORD_0=r),_&&"flat"!==o.shading&&(T.attributes.TANGENT=_),E&&(T.attributes.COLOR_0=E);const A=a.get(o.name);if(A)A.primitives.push(T);else{const e={name:o.name,primitives:[T]};a.set(o.name,e),s.push(e)}}}_addMeshVertexNonIndexed(e,t,s,n,i,r,_){const E={primitives:[]};t.push(E);const a={attributes:{POSITION:s}};n&&(a.attributes.NORMAL=n),i&&(a.attributes.TEXCOORD_0=i),r&&(a.attributes.TANGENT=r),_&&(a.attributes.COLOR_0=_),e&&(a.material=this._addMaterial(e[0].material)),E.primitives.push(a)}}const Y=(0,C.Su)();var z=s(92400);class X{constructor(){this.copyright="",this.defaultScene=0,this.generator="",this._scenes=[]}addScene(e){if(this._scenes.includes(e))throw new Error("Scene already added");this._scenes.push(e)}removeScene(e){(0,z.aE)(this._scenes,e)}forEachScene(e){this._scenes.forEach(e)}}class k{constructor(e){this.mesh=e,this.name="",this.translation=(0,L.Su)(),this.rotation=(0,I.Su)(),this.scale=(0,L.ct)(L.Qw),this._nodes=[]}addNode(e){if(this._nodes.includes(e))throw new Error("Node already added");this._nodes.push(e)}forEachNode(e){this._nodes.forEach(e)}set rotationAngles(e){(0,O.Wu)(this.rotation,e[0],e[1],e[2])}}const v="model.gltf",W="model.glb";async function Q(e,t,s){const n=new V(e,t=t||{},s);let i=n.params;i?i.origin||(i.origin=new r.c({x:-1,y:-1,z:-1})):i={origin:new r.c({x:-1,y:-1,z:-1})};const o=i.origin,T=n.gltf,A=T.extras?.promises??[];let R=1,c=1,f=null;await Promise.allSettled(A);const h={origin:o};delete T.extras;const u="number"==typeof t.jsonSpacing?t.jsonSpacing:4,N=JSON.stringify(T,((e,s)=>{if("extras"!==e){if(s instanceof ArrayBuffer){if(function(e){if(e.byteLength<8)return!1;const t=new Uint8Array(e);return 137===t[0]&&80===t[1]&&78===t[2]&&71===t[3]&&13===t[4]&&10===t[5]&&26===t[6]&&10===t[7]}(s))switch(t.imageOutputType){case a.DataURI:case a.GLB:break;case a.External:default:{const e=`img${c}.png`;return c++,h[e]=s,e}}switch(t.bufferOutputType){case E.DataURI:return function(e){const t=[],s=new Uint8Array(e);for(let e=0;e<s.length;e++)t.push(String.fromCharCode(s[e]));return"data:application/octet-stream;base64,"+btoa(t.join(""))}(s);case E.GLB:if(f)throw new Error("Already encountered an ArrayBuffer, there should only be one in the GLB format.");return void(f=s);case E.External:default:{const e=`data${R}.bin`;return R++,h[e]=s,e}}}return s}}),u);return t.bufferOutputType===E.GLB||t.imageOutputType===a.GLB?h[W]=new _(N,f).buffer:h[v]=N,h}class K{constructor(){this.name="",this._nodes=[]}addNode(e){if(this._nodes.includes(e))throw new Error("Node already added");this._nodes.push(e)}forEachNode(e){this._nodes.forEach(e)}}class j{constructor(e,t){this._file={type:"model/gltf-binary",data:e},this.origin=t}buffer(){return Promise.resolve(this._file)}download(e){(0,i.ch)(new Blob([this._file.data],{type:this._file.type}),e)}}function Z(e,t){const s=new X,n=new K;return s.addScene(n),n.addNode(new k(e)),function(e,t){return Q(e,{bufferOutputType:E.GLB,imageOutputType:a.GLB,jsonSpacing:0},t)}(s,t).then((e=>new j(e[W],e.origin)))}},5472:(e,t,s)=>{s.d(t,{CA:()=>r,Y1:()=>E,e0:()=>a,e6:()=>_});var n=s(9456),i=s(12260);class r{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding=i.yk.KTX2_ENCODING}}function _(e){return"encoded-mesh-texture"===e?.type}async function E(e){const t=new Blob([e]),s=await t.text();return JSON.parse(s)}async function a(e,t){if(t===i.yk.KTX2_ENCODING)return new r(e);const s=new Blob([e],{type:t}),_=URL.createObjectURL(s),E=new Image;if((0,n.c)("esri-iPhone"))return new Promise(((e,t)=>{const s=()=>{i(),e(E)},n=e=>{i(),t(e)},i=()=>{URL.revokeObjectURL(_),E.removeEventListener("load",s),E.removeEventListener("error",n)};E.addEventListener("load",s),E.addEventListener("error",n),E.src=_}));try{E.src=_,await E.decode()}catch(e){console.warn("Failed decoding HTMLImageElement")}return URL.revokeObjectURL(_),E}},77800:(e,t,s)=>{var n,i,r,_,E,a,o,T,A,R,c,f,h,u,N,l,S,C,O,I,d,L,M;s.d(t,{Ck:()=>T,GE:()=>D,Gs:()=>O,Id:()=>u,K:()=>E,OK:()=>l,QD:()=>R,Qb:()=>S,Qx:()=>L,Qz:()=>f,SC:()=>a,UV:()=>N,Ud:()=>c,Uf:()=>i,YT:()=>_,_m:()=>C,c5:()=>h,et:()=>A,kl:()=>I,sl:()=>n,sr:()=>p,vs:()=>o,w$:()=>r,y4:()=>d}),function(e){e[e.DEPTH_BUFFER_BIT=256]="DEPTH_BUFFER_BIT",e[e.STENCIL_BUFFER_BIT=1024]="STENCIL_BUFFER_BIT",e[e.COLOR_BUFFER_BIT=16384]="COLOR_BUFFER_BIT"}(n||(n={})),function(e){e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(i||(i={})),function(e){e[e.ZERO=0]="ZERO",e[e.ONE=1]="ONE",e[e.SRC_COLOR=768]="SRC_COLOR",e[e.ONE_MINUS_SRC_COLOR=769]="ONE_MINUS_SRC_COLOR",e[e.SRC_ALPHA=770]="SRC_ALPHA",e[e.ONE_MINUS_SRC_ALPHA=771]="ONE_MINUS_SRC_ALPHA",e[e.DST_ALPHA=772]="DST_ALPHA",e[e.ONE_MINUS_DST_ALPHA=773]="ONE_MINUS_DST_ALPHA",e[e.DST_COLOR=774]="DST_COLOR",e[e.ONE_MINUS_DST_COLOR=775]="ONE_MINUS_DST_COLOR",e[e.SRC_ALPHA_SATURATE=776]="SRC_ALPHA_SATURATE",e[e.CONSTANT_COLOR=32769]="CONSTANT_COLOR",e[e.ONE_MINUS_CONSTANT_COLOR=32770]="ONE_MINUS_CONSTANT_COLOR",e[e.CONSTANT_ALPHA=32771]="CONSTANT_ALPHA",e[e.ONE_MINUS_CONSTANT_ALPHA=32772]="ONE_MINUS_CONSTANT_ALPHA"}(r||(r={})),function(e){e[e.ADD=32774]="ADD",e[e.MIN=32775]="MIN",e[e.MAX=32776]="MAX",e[e.SUBTRACT=32778]="SUBTRACT",e[e.REVERSE_SUBTRACT=32779]="REVERSE_SUBTRACT"}(_||(_={})),function(e){e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",e[e.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",e[e.PIXEL_PACK_BUFFER=35051]="PIXEL_PACK_BUFFER",e[e.PIXEL_UNPACK_BUFFER=35052]="PIXEL_UNPACK_BUFFER",e[e.COPY_READ_BUFFER=36662]="COPY_READ_BUFFER",e[e.COPY_WRITE_BUFFER=36663]="COPY_WRITE_BUFFER",e[e.TRANSFORM_FEEDBACK_BUFFER=35982]="TRANSFORM_FEEDBACK_BUFFER"}(E||(E={})),function(e){e[e.FRONT=1028]="FRONT",e[e.BACK=1029]="BACK",e[e.FRONT_AND_BACK=1032]="FRONT_AND_BACK"}(a||(a={})),function(e){e[e.CW=2304]="CW",e[e.CCW=2305]="CCW"}(o||(o={})),function(e){e[e.BYTE=5120]="BYTE",e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.SHORT=5122]="SHORT",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.INT=5124]="INT",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.FLOAT=5126]="FLOAT"}(T||(T={})),function(e){e[e.NEVER=512]="NEVER",e[e.LESS=513]="LESS",e[e.EQUAL=514]="EQUAL",e[e.LEQUAL=515]="LEQUAL",e[e.GREATER=516]="GREATER",e[e.NOTEQUAL=517]="NOTEQUAL",e[e.GEQUAL=518]="GEQUAL",e[e.ALWAYS=519]="ALWAYS"}(A||(A={})),function(e){e[e.ZERO=0]="ZERO",e[e.KEEP=7680]="KEEP",e[e.REPLACE=7681]="REPLACE",e[e.INCR=7682]="INCR",e[e.DECR=7683]="DECR",e[e.INVERT=5386]="INVERT",e[e.INCR_WRAP=34055]="INCR_WRAP",e[e.DECR_WRAP=34056]="DECR_WRAP"}(R||(R={})),function(e){e[e.NEAREST=9728]="NEAREST",e[e.LINEAR=9729]="LINEAR",e[e.NEAREST_MIPMAP_NEAREST=9984]="NEAREST_MIPMAP_NEAREST",e[e.LINEAR_MIPMAP_NEAREST=9985]="LINEAR_MIPMAP_NEAREST",e[e.NEAREST_MIPMAP_LINEAR=9986]="NEAREST_MIPMAP_LINEAR",e[e.LINEAR_MIPMAP_LINEAR=9987]="LINEAR_MIPMAP_LINEAR"}(c||(c={})),function(e){e[e.CLAMP_TO_EDGE=33071]="CLAMP_TO_EDGE",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(f||(f={})),function(e){e[e.TEXTURE_2D=3553]="TEXTURE_2D",e[e.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",e[e.TEXTURE_3D=32879]="TEXTURE_3D",e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",e[e.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY"}(h||(h={})),function(e){e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e[e.DEPTH24_STENCIL8=35056]="DEPTH24_STENCIL8",e[e.ALPHA=6406]="ALPHA",e[e.RGB=6407]="RGB",e[e.RGBA=6408]="RGBA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.RED=6403]="RED",e[e.RG=33319]="RG",e[e.RED_INTEGER=36244]="RED_INTEGER",e[e.RG_INTEGER=33320]="RG_INTEGER",e[e.RGB_INTEGER=36248]="RGB_INTEGER",e[e.RGBA_INTEGER=36249]="RGBA_INTEGER"}(u||(u={})),function(e){e[e.RGBA4=32854]="RGBA4",e[e.R16F=33325]="R16F",e[e.RG16F=33327]="RG16F",e[e.RGB32F=34837]="RGB32F",e[e.RGBA16F=34842]="RGBA16F",e[e.R32F=33326]="R32F",e[e.RG32F=33328]="RG32F",e[e.RGBA32F=34836]="RGBA32F",e[e.R11F_G11F_B10F=35898]="R11F_G11F_B10F",e[e.RGB8=32849]="RGB8",e[e.RGBA8=32856]="RGBA8",e[e.RGB5_A1=32855]="RGB5_A1",e[e.R8=33321]="R8",e[e.RG8=33323]="RG8",e[e.R8I=33329]="R8I",e[e.R8UI=33330]="R8UI",e[e.R16I=33331]="R16I",e[e.R16UI=33332]="R16UI",e[e.R32I=33333]="R32I",e[e.R32UI=33334]="R32UI",e[e.RG8I=33335]="RG8I",e[e.RG8UI=33336]="RG8UI",e[e.RG16I=33337]="RG16I",e[e.RG16UI=33338]="RG16UI",e[e.RG32I=33339]="RG32I",e[e.RG32UI=33340]="RG32UI",e[e.RGB16F=34843]="RGB16F",e[e.RGB9_E5=35901]="RGB9_E5",e[e.SRGB8=35905]="SRGB8",e[e.SRGB8_ALPHA8=35907]="SRGB8_ALPHA8",e[e.RGB565=36194]="RGB565",e[e.RGBA32UI=36208]="RGBA32UI",e[e.RGB32UI=36209]="RGB32UI",e[e.RGBA16UI=36214]="RGBA16UI",e[e.RGB16UI=36215]="RGB16UI",e[e.RGBA8UI=36220]="RGBA8UI",e[e.RGB8UI=36221]="RGB8UI",e[e.RGBA32I=36226]="RGBA32I",e[e.RGB32I=36227]="RGB32I",e[e.RGBA16I=36232]="RGBA16I",e[e.RGB16I=36233]="RGB16I",e[e.RGBA8I=36238]="RGBA8I",e[e.RGB8I=36239]="RGB8I",e[e.R8_SNORM=36756]="R8_SNORM",e[e.RG8_SNORM=36757]="RG8_SNORM",e[e.RGB8_SNORM=36758]="RGB8_SNORM",e[e.RGBA8_SNORM=36759]="RGBA8_SNORM",e[e.RGB10_A2=32857]="RGB10_A2",e[e.RGB10_A2UI=36975]="RGB10_A2UI"}(N||(N={})),function(e){e[e.FLOAT=5126]="FLOAT",e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",e[e.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",e[e.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",e[e.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",e[e.BYTE=5120]="BYTE",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.SHORT=5122]="SHORT",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.INT=5124]="INT",e[e.HALF_FLOAT=5131]="HALF_FLOAT",e[e.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",e[e.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV"}(l||(l={})),function(e){e[e.DEPTH_COMPONENT16=33189]="DEPTH_COMPONENT16",e[e.STENCIL_INDEX8=36168]="STENCIL_INDEX8",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e[e.DEPTH_COMPONENT24=33190]="DEPTH_COMPONENT24",e[e.DEPTH_COMPONENT32F=36012]="DEPTH_COMPONENT32F",e[e.DEPTH24_STENCIL8=35056]="DEPTH24_STENCIL8",e[e.DEPTH32F_STENCIL8=36013]="DEPTH32F_STENCIL8"}(S||(S={})),function(e){e[e.STATIC_DRAW=35044]="STATIC_DRAW",e[e.DYNAMIC_DRAW=35048]="DYNAMIC_DRAW",e[e.STREAM_DRAW=35040]="STREAM_DRAW",e[e.STATIC_READ=35045]="STATIC_READ",e[e.DYNAMIC_READ=35049]="DYNAMIC_READ",e[e.STREAM_READ=35041]="STREAM_READ",e[e.STATIC_COPY=35046]="STATIC_COPY",e[e.DYNAMIC_COPY=35050]="DYNAMIC_COPY",e[e.STREAM_COPY=35042]="STREAM_COPY"}(C||(C={})),function(e){e[e.FRAGMENT_SHADER=35632]="FRAGMENT_SHADER",e[e.VERTEX_SHADER=35633]="VERTEX_SHADER"}(O||(O={})),function(e){e[e.FRAMEBUFFER=36160]="FRAMEBUFFER",e[e.READ_FRAMEBUFFER=36008]="READ_FRAMEBUFFER",e[e.DRAW_FRAMEBUFFER=36009]="DRAW_FRAMEBUFFER"}(I||(I={})),function(e){e[e.Texture=0]="Texture",e[e.BufferObject=1]="BufferObject",e[e.VertexArrayObject=2]="VertexArrayObject",e[e.Shader=3]="Shader",e[e.Program=4]="Program",e[e.FramebufferObject=5]="FramebufferObject",e[e.Renderbuffer=6]="Renderbuffer",e[e.TransformFeedback=7]="TransformFeedback",e[e.Sync=8]="Sync",e[e.UNCOUNTED=9]="UNCOUNTED",e[e.LinesOfCode=9]="LinesOfCode",e[e.Uniform=10]="Uniform",e[e.COUNT=11]="COUNT"}(d||(d={})),function(e){e[e.COLOR_ATTACHMENT0=36064]="COLOR_ATTACHMENT0",e[e.COLOR_ATTACHMENT1=36065]="COLOR_ATTACHMENT1",e[e.COLOR_ATTACHMENT2=36066]="COLOR_ATTACHMENT2",e[e.COLOR_ATTACHMENT3=36067]="COLOR_ATTACHMENT3",e[e.COLOR_ATTACHMENT4=36068]="COLOR_ATTACHMENT4",e[e.COLOR_ATTACHMENT5=36069]="COLOR_ATTACHMENT5",e[e.COLOR_ATTACHMENT6=36070]="COLOR_ATTACHMENT6",e[e.COLOR_ATTACHMENT7=36071]="COLOR_ATTACHMENT7",e[e.COLOR_ATTACHMENT8=36072]="COLOR_ATTACHMENT8",e[e.COLOR_ATTACHMENT9=36073]="COLOR_ATTACHMENT9",e[e.COLOR_ATTACHMENT10=36074]="COLOR_ATTACHMENT10",e[e.COLOR_ATTACHMENT11=36075]="COLOR_ATTACHMENT11",e[e.COLOR_ATTACHMENT12=36076]="COLOR_ATTACHMENT12",e[e.COLOR_ATTACHMENT13=36077]="COLOR_ATTACHMENT13",e[e.COLOR_ATTACHMENT14=36078]="COLOR_ATTACHMENT14",e[e.COLOR_ATTACHMENT15=36079]="COLOR_ATTACHMENT15"}(L||(L={})),function(e){e[e.NONE=0]="NONE",e[e.BACK=1029]="BACK"}(M||(M={}));const D=33306;var p,m,B,U,P,G,g;!function(e){e[e.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",e[e.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",e[e.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",e[e.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",e[e.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",e[e.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",e[e.COMPRESSED_SRGB8_ETC2=37493]="COMPRESSED_SRGB8_ETC2",e[e.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",e[e.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",e[e.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",e[e.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC"}(p||(p={})),function(e){e[e.FLOAT=5126]="FLOAT",e[e.FLOAT_VEC2=35664]="FLOAT_VEC2",e[e.FLOAT_VEC3=35665]="FLOAT_VEC3",e[e.FLOAT_VEC4=35666]="FLOAT_VEC4",e[e.INT=5124]="INT",e[e.INT_VEC2=35667]="INT_VEC2",e[e.INT_VEC3=35668]="INT_VEC3",e[e.INT_VEC4=35669]="INT_VEC4",e[e.BOOL=35670]="BOOL",e[e.BOOL_VEC2=35671]="BOOL_VEC2",e[e.BOOL_VEC3=35672]="BOOL_VEC3",e[e.BOOL_VEC4=35673]="BOOL_VEC4",e[e.FLOAT_MAT2=35674]="FLOAT_MAT2",e[e.FLOAT_MAT3=35675]="FLOAT_MAT3",e[e.FLOAT_MAT4=35676]="FLOAT_MAT4",e[e.SAMPLER_2D=35678]="SAMPLER_2D",e[e.SAMPLER_CUBE=35680]="SAMPLER_CUBE",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.UNSIGNED_INT_VEC2=36294]="UNSIGNED_INT_VEC2",e[e.UNSIGNED_INT_VEC3=36295]="UNSIGNED_INT_VEC3",e[e.UNSIGNED_INT_VEC4=36296]="UNSIGNED_INT_VEC4",e[e.FLOAT_MAT2x3=35685]="FLOAT_MAT2x3",e[e.FLOAT_MAT2x4=35686]="FLOAT_MAT2x4",e[e.FLOAT_MAT3x2=35687]="FLOAT_MAT3x2",e[e.FLOAT_MAT3x4=35688]="FLOAT_MAT3x4",e[e.FLOAT_MAT4x2=35689]="FLOAT_MAT4x2",e[e.FLOAT_MAT4x3=35690]="FLOAT_MAT4x3",e[e.SAMPLER_3D=35679]="SAMPLER_3D",e[e.SAMPLER_2D_SHADOW=35682]="SAMPLER_2D_SHADOW",e[e.SAMPLER_2D_ARRAY=36289]="SAMPLER_2D_ARRAY",e[e.SAMPLER_2D_ARRAY_SHADOW=36292]="SAMPLER_2D_ARRAY_SHADOW",e[e.SAMPLER_CUBE_SHADOW=36293]="SAMPLER_CUBE_SHADOW",e[e.INT_SAMPLER_2D=36298]="INT_SAMPLER_2D",e[e.INT_SAMPLER_3D=36299]="INT_SAMPLER_3D",e[e.INT_SAMPLER_CUBE=36300]="INT_SAMPLER_CUBE",e[e.INT_SAMPLER_2D_ARRAY=36303]="INT_SAMPLER_2D_ARRAY",e[e.UNSIGNED_INT_SAMPLER_2D=36306]="UNSIGNED_INT_SAMPLER_2D",e[e.UNSIGNED_INT_SAMPLER_3D=36307]="UNSIGNED_INT_SAMPLER_3D",e[e.UNSIGNED_INT_SAMPLER_CUBE=36308]="UNSIGNED_INT_SAMPLER_CUBE",e[e.UNSIGNED_INT_SAMPLER_2D_ARRAY=36311]="UNSIGNED_INT_SAMPLER_2D_ARRAY"}(m||(m={})),function(e){e[e.OBJECT_TYPE=37138]="OBJECT_TYPE",e[e.SYNC_CONDITION=37139]="SYNC_CONDITION",e[e.SYNC_STATUS=37140]="SYNC_STATUS",e[e.SYNC_FLAGS=37141]="SYNC_FLAGS"}(B||(B={})),function(e){e[e.UNSIGNALED=37144]="UNSIGNALED",e[e.SIGNALED=37145]="SIGNALED"}(U||(U={})),function(e){e[e.ALREADY_SIGNALED=37146]="ALREADY_SIGNALED",e[e.TIMEOUT_EXPIRED=37147]="TIMEOUT_EXPIRED",e[e.CONDITION_SATISFIED=37148]="CONDITION_SATISFIED",e[e.WAIT_FAILED=37149]="WAIT_FAILED"}(P||(P={})),function(e){e[e.SYNC_GPU_COMMANDS_COMPLETE=37143]="SYNC_GPU_COMMANDS_COMPLETE"}(G||(G={})),function(e){e[e.SYNC_FLUSH_COMMANDS_BIT=1]="SYNC_FLUSH_COMMANDS_BIT"}(g||(g={}))}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8256],{44728:(e,t,r)=>{r.d(t,{c:()=>d});var i,n,o=r(46988),s=r(53648),l=r(53368);function a(e){return(0,s.qk)((0,l.Wu)(e),0,255)}function u(e,t,r){return e=Number(e),isNaN(e)?r:e<t?t:e>r?r:e}function c(e,t){const r=e.toString(16).padStart(2,"0");return t?r.substring(0,1):r}class p{static blendColors(e,t,r,i=new p){return i.r=Math.round(e.r+(t.r-e.r)*r),i.g=Math.round(e.g+(t.g-e.g)*r),i.b=Math.round(e.b+(t.b-e.b)*r),i.a=e.a+(t.a-e.a)*r,i._sanitize()}static fromRgb(e,t){const r=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(r){const e=r[2].split(/\s*,\s*/),i=r[1];if("rgb"===i&&3===e.length||"rgba"===i&&4===e.length){const r=e[0];if("%"===r.charAt(r.length-1)){const r=e.map((e=>2.56*parseFloat(e)));return 4===e.length&&(r[3]=parseFloat(e[3])),p.fromArray(r,t)}return p.fromArray(e.map((e=>parseFloat(e))),t)}if("hsl"===i&&3===e.length||"hsla"===i&&4===e.length)return p.fromArray((0,o.ec)(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3])),t)}return null}static fromHex(e,t=new p){if("#"!==e[0]||isNaN(Number(`0x${e.substring(1)}`)))return null;switch(e.length){case 4:case 5:{const r=parseInt(e.substring(1,2),16),i=parseInt(e.substring(2,3),16),n=parseInt(e.substring(3,4),16),o=5===e.length?15:parseInt(e.substring(4),16);return p.fromArray([r+16*r,i+16*i,n+16*n,(o+16*o)/255],t)}case 7:case 9:{const r=parseInt(e.substring(1,3),16),i=parseInt(e.substring(3,5),16),n=parseInt(e.substring(5,7),16),o=7===e.length?255:parseInt(e.substring(7),16);return p.fromArray([r,i,n,o/255],t)}default:return null}}static fromArray(e,t=new p){return t._set(Number(e[0]),Number(e[1]),Number(e[2]),Number(e[3])),isNaN(t.a)&&(t.a=1),t._sanitize()}static fromString(e,t){const r=(0,o.kv)(e)?(0,o.SQ)(e):null;return r&&p.fromArray(r,t)||p.fromRgb(e,t)||p.fromHex(e,t)}static fromJSON(e){return null!=e?new p([e[0],e[1],e[2],(e[3]??255)/255]):void 0}static toUnitRGB(e){return null!=e?[e.r/255,e.g/255,e.b/255]:null}static toUnitRGBA(e){return null!=e?[e.r/255,e.g/255,e.b/255,null!=e.a?e.a:1]:null}constructor(e){this.r=255,this.g=255,this.b=255,this.a=1,e&&this.setColor(e)}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(e){return"string"==typeof e?p.fromString(e,this):Array.isArray(e)?p.fromArray(e,this):(this._set(e.r??0,e.g??0,e.b??0,e.a??1),e instanceof p||this._sanitize()),this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(e){const t=e?.capitalize??!1,r=e?.digits??6,i=3===r||4===r,n=4===r||8===r,o=`#${c(this.r,i)}${c(this.g,i)}${c(this.b,i)}${n?c(Math.round(255*this.a),i):""}`;return t?o.toUpperCase():o}toCss(e=!1){const t=this.r+", "+this.g+", "+this.b;return e?`rgba(${t}, ${this.a})`:`rgb(${t})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(e=p.AlphaMode.ALWAYS){const t=a(this.r),r=a(this.g),i=a(this.b);return e===p.AlphaMode.ALWAYS||1!==this.a?[t,r,i,a(255*this.a)]:[t,r,i]}clone(){return new p(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(e){return null!=e&&e.r===this.r&&e.g===this.g&&e.b===this.b&&e.a===this.a}_sanitize(){return this.r=Math.round(u(this.r,0,255)),this.g=Math.round(u(this.g,0,255)),this.b=Math.round(u(this.b,0,255)),this.a=u(this.a,0,1),this}_set(e,t,r,i){this.r=e,this.g=t,this.b=r,this.a=i}}p.prototype.declaredClass="esri.Color",(n=(i=p||(p={})).AlphaMode||(i.AlphaMode={}))[n.ALWAYS=0]="ALWAYS",n[n.UNLESS_OPAQUE=1]="UNLESS_OPAQUE";const d=p},25228:(e,t,r)=>{r.d(t,{c:()=>m});var i,n=r(41948),o=r(40504),s=r(94360),l=r(1580),a=(r(9456),r(66360),r(72052),r(33600)),u=r(12552),c=r(18996),p=r(28484);let d=i=class extends o.am{static get allTime(){return h}static get empty(){return y}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,i=e.start?.getTime()??e.start,n=e.end?.getTime()??e.end;return t===i&&r===n}expandTo(e,t=p.OX){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,s.aU)(r,e,t));let n=this.end;if(n){const r=(0,s.aU)(n,e,t);n=n.getTime()===r.getTime()?r:(0,s.g1)(r,1,e,t)}return new i({start:r,end:n})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,n=e.start?.getTime()??-1/0,o=e.end?.getTime()??1/0;let s,l;if(n>=t&&n<=r?s=n:t>=n&&t<=o&&(s=t),r>=n&&r<=o?l=r:o>=t&&o<=r&&(l=o),null!=s&&null!=l&&!isNaN(s)&&!isNaN(l)){const e=new i;return e.start=s===-1/0?null:new Date(s),e.end=l===1/0?null:new Date(l),e}return i.empty}offset(e,t,r=p.OX){if(this.isEmpty||this.isAllTime)return this.clone();const n=new i,{start:o,end:l}=this;return null!=o&&(n.start=(0,s.g1)(o,e,t,r)),null!=l&&(n.end=(0,s.g1)(l,e,t,r)),n}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return h.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:r})}};(0,n._)([(0,l.qq)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,n._)([(0,a.E)("end")],d.prototype,"readEnd",null),(0,n._)([(0,c.G)("end")],d.prototype,"writeEnd",null),(0,n._)([(0,l.qq)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,n._)([(0,l.qq)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,n._)([(0,l.qq)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,n._)([(0,a.E)("start")],d.prototype,"readStart",null),(0,n._)([(0,c.G)("start")],d.prototype,"writeStart",null),d=i=(0,n._)([(0,u.c)("esri.TimeExtent")],d);const h=new d,y=new d({start:void 0,end:void 0}),m=d},3856:(e,t,r)=>{r.d(t,{m:()=>p,q:()=>c});var i=r(41948),n=r(43780),o=(r(9456),r(62088)),s=(r(66360),r(70680)),l=r(71448),a=r(20916),u=r(12552);const c=e=>{let t=class extends e{clone(){const e=(0,a.m6)(this);(0,s.EN)(e,"unable to clone instance of non-accessor class");const t=e.metadata,r=e.store,i={},n=new Map;for(const e in t){const s=t[e],a=r?.originOf(e),u=s.clonable;if(s.readOnly||!1===u||a!==l.sT.USER&&a!==l.sT.DEFAULTS&&a!==l.sT.WEB_MAP&&a!==l.sT.WEB_SCENE)continue;const c=this[e];let p=null;p="function"==typeof u?u(c):"reference"===u?c:(0,o.gx)(c),null!=c&&null==p||(a===l.sT.DEFAULTS?n.set(e,p):i[e]=p)}const u=new(0,Object.getPrototypeOf(this).constructor)(i);if(n.size){const e=(0,a.m6)(u)?.store;if(e)for(const[t,r]of n)e.set(t,r,l.sT.DEFAULTS)}return u}};return t=(0,i._)([(0,u.c)("esri.core.Clonable")],t),t};let p=class extends(c(n.c)){};p=(0,i._)([(0,u.c)("esri.core.Clonable")],p)},27368:(e,t,r)=>{r.d(t,{sD:()=>s});var i=r(53648);class n{constructor(e,t){this.min=e,this.max=t,this.range=t-e}ndiff(e,t=0){return Math.ceil((e-t)/this.range)*this.range+t}_normalize(e,t,r,i=0,n=!1){return(r-=i)<e?r+=this.ndiff(e-r):r>t&&(r-=this.ndiff(r-t)),n&&r===t&&(r=e),r+i}normalize(e,t=0,r=!1){return this._normalize(this.min,this.max,e,t,r)}clamp(e,t=0){return(0,i.qk)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+this.ndiff(e-t,r)}minimalMonotonic(e,t,r){return this._normalize(e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);const r=(t=this.normalize(t))-e,i=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(i)?r:i}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function o(e){for(const t in e){const r=e[t];r instanceof Function&&(e[t]=r.bind(e))}return e}o(new n(0,2*Math.PI)),o(new n(-Math.PI,Math.PI));const s=o(new n(0,360))},22156:(e,t,r)=>{r.d(t,{MR:()=>s,qm:()=>l});var i=r(41948),n=r(12552);let o=0;const s=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+o++})}};return t=(0,i._)([(0,n.c)("esri.core.Identifiable")],t),t},l=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:o++})}};return t=(0,i._)([(0,n.c)("esri.core.NumericIdentifiable")],t),t};let a=class extends(s(class{})){};a=(0,i._)([(0,n.c)("esri.core.Identifiable")],a)},77380:(e,t,r)=>{r.d(t,{I:()=>m,Y:()=>i});const i={Base64:0,Hex:1,String:2,Raw:3},n=8,o=(1<<n)-1;function s(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function l(e){const t=[];for(let r=0,i=e.length*n;r<i;r+=n)t[r>>5]|=(e.charCodeAt(r/n)&o)<<r%32;return t}function a(e){const t=[];for(let r=0,i=32*e.length;r<i;r+=n)t.push(String.fromCharCode(e[r>>5]>>>r%32&o));return t.join("")}function u(e,t,r,i,n,o){return s(function(e,t){return e<<t|e>>>32-t}(s(s(t,e),s(i,o)),n),r)}function c(e,t,r,i,n,o,s){return u(t&r|~t&i,e,t,n,o,s)}function p(e,t,r,i,n,o,s){return u(t&i|r&~i,e,t,n,o,s)}function d(e,t,r,i,n,o,s){return u(t^r^i,e,t,n,o,s)}function h(e,t,r,i,n,o,s){return u(r^(t|~i),e,t,n,o,s)}function y(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let r=1732584193,i=-271733879,n=-1732584194,o=271733878;for(let t=0;t<e.length;t+=16){const l=r,a=i,u=n,y=o;r=c(r,i,n,o,e[t],7,-680876936),o=c(o,r,i,n,e[t+1],12,-389564586),n=c(n,o,r,i,e[t+2],17,606105819),i=c(i,n,o,r,e[t+3],22,-1044525330),r=c(r,i,n,o,e[t+4],7,-176418897),o=c(o,r,i,n,e[t+5],12,1200080426),n=c(n,o,r,i,e[t+6],17,-1473231341),i=c(i,n,o,r,e[t+7],22,-45705983),r=c(r,i,n,o,e[t+8],7,1770035416),o=c(o,r,i,n,e[t+9],12,-1958414417),n=c(n,o,r,i,e[t+10],17,-42063),i=c(i,n,o,r,e[t+11],22,-1990404162),r=c(r,i,n,o,e[t+12],7,1804603682),o=c(o,r,i,n,e[t+13],12,-40341101),n=c(n,o,r,i,e[t+14],17,-1502002290),i=c(i,n,o,r,e[t+15],22,1236535329),r=p(r,i,n,o,e[t+1],5,-165796510),o=p(o,r,i,n,e[t+6],9,-1069501632),n=p(n,o,r,i,e[t+11],14,643717713),i=p(i,n,o,r,e[t],20,-373897302),r=p(r,i,n,o,e[t+5],5,-701558691),o=p(o,r,i,n,e[t+10],9,38016083),n=p(n,o,r,i,e[t+15],14,-660478335),i=p(i,n,o,r,e[t+4],20,-405537848),r=p(r,i,n,o,e[t+9],5,568446438),o=p(o,r,i,n,e[t+14],9,-1019803690),n=p(n,o,r,i,e[t+3],14,-187363961),i=p(i,n,o,r,e[t+8],20,1163531501),r=p(r,i,n,o,e[t+13],5,-1444681467),o=p(o,r,i,n,e[t+2],9,-51403784),n=p(n,o,r,i,e[t+7],14,1735328473),i=p(i,n,o,r,e[t+12],20,-1926607734),r=d(r,i,n,o,e[t+5],4,-378558),o=d(o,r,i,n,e[t+8],11,-2022574463),n=d(n,o,r,i,e[t+11],16,1839030562),i=d(i,n,o,r,e[t+14],23,-35309556),r=d(r,i,n,o,e[t+1],4,-1530992060),o=d(o,r,i,n,e[t+4],11,1272893353),n=d(n,o,r,i,e[t+7],16,-155497632),i=d(i,n,o,r,e[t+10],23,-1094730640),r=d(r,i,n,o,e[t+13],4,681279174),o=d(o,r,i,n,e[t],11,-358537222),n=d(n,o,r,i,e[t+3],16,-722521979),i=d(i,n,o,r,e[t+6],23,76029189),r=d(r,i,n,o,e[t+9],4,-640364487),o=d(o,r,i,n,e[t+12],11,-421815835),n=d(n,o,r,i,e[t+15],16,530742520),i=d(i,n,o,r,e[t+2],23,-995338651),r=h(r,i,n,o,e[t],6,-198630844),o=h(o,r,i,n,e[t+7],10,1126891415),n=h(n,o,r,i,e[t+14],15,-1416354905),i=h(i,n,o,r,e[t+5],21,-57434055),r=h(r,i,n,o,e[t+12],6,1700485571),o=h(o,r,i,n,e[t+3],10,-1894986606),n=h(n,o,r,i,e[t+10],15,-1051523),i=h(i,n,o,r,e[t+1],21,-2054922799),r=h(r,i,n,o,e[t+8],6,1873313359),o=h(o,r,i,n,e[t+15],10,-30611744),n=h(n,o,r,i,e[t+6],15,-1560198380),i=h(i,n,o,r,e[t+13],21,1309151649),r=h(r,i,n,o,e[t+4],6,-145523070),o=h(o,r,i,n,e[t+11],10,-1120210379),n=h(n,o,r,i,e[t+2],15,718787259),i=h(i,n,o,r,e[t+9],21,-343485551),r=s(r,l),i=s(i,a),n=s(n,u),o=s(o,y)}return[r,i,n,o]}function m(e,t=i.Hex){const r=t||i.Base64,o=y(l(e),e.length*n);switch(r){case i.Raw:return o;case i.Hex:return function(e){const t="0123456789abcdef",r=[];for(let i=0,n=4*e.length;i<n;i++)r.push(t.charAt(e[i>>2]>>i%4*8+4&15)+t.charAt(e[i>>2]>>i%4*8&15));return r.join("")}(o);case i.String:return a(o);case i.Base64:return function(e){const t=[];for(let r=0,i=4*e.length;r<i;r+=3){const i=(e[r>>2]>>r%4*8&255)<<16|(e[r+1>>2]>>(r+1)%4*8&255)<<8|e[r+2>>2]>>(r+2)%4*8&255;for(let n=0;n<4;n++)8*r+6*n>32*e.length?t.push("="):t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(i>>6*(3-n)&63))}return t.join("")}(o)}}},90636:(e,t,r)=>{r.d(t,{O:()=>h});var i=r(20744),n=r(77380),o=r(4644),s=r(28176),l=r(63564),a=r(44296),u=r(71448),c=r(1580),p=r(73960),d=r(91952);function h(e){const t=e?.origins??[void 0];return(r,i)=>{const n=function(e,t,r){if("resource"===e?.type)return function(e,t,r){const i=(0,a.EF)(t,r);return{type:String,read:(e,t,r)=>{const n=(0,d.r)(e,t,r);return i.type===String?n:"function"==typeof i.type?new i.type({url:n}):void 0},write:{writer(t,n,l,a){if(!a?.resources)return"string"==typeof t?void(n[l]=(0,d.t)(t,a)):void(n[l]=t.write({},a));const c=function(e){return null==e?null:"string"==typeof e?e:e.url}(t),h=(0,d.t)(c,{...a,verifyItemRelativeUrls:a?.verifyItemRelativeUrls?{writtenUrls:a.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},d.M.NO),f=i.type!==String&&(!(0,o.w)(this)||a?.origin&&this.originIdOf(r)>(0,u.CQ)(a.origin)),v={object:this,propertyName:r,value:t,targetUrl:h,dest:n,targetPropertyName:l,context:a,params:e};a?.portalItem&&h&&!(0,s.ic)(h)?f&&e?.contentAddressed?y(v):f?function(e){const{context:t,targetUrl:r,params:i,value:n,dest:o,targetPropertyName:l}=e;if(!t.portalItem)return;const a=t.portalItem.resourceFromPath(r),u=g(n,r,t),c=(0,p.e)(u),d=(0,s.wt)(a.path),h=i?.compress??!1;c===d?(t.resources&&m({...e,resource:a,content:u,compress:h,updates:t.resources.toUpdate}),o[l]=r):y(e)}(v):function({context:e,targetUrl:t,dest:r,targetPropertyName:i}){e.portalItem&&e.resources&&(e.resources.toKeep.push({resource:e.portalItem.resourceFromPath(t),compress:!1}),r[i]=t)}(v):a?.portalItem&&(null==h||null!=(0,d.i)(h)||(0,s.ue)(h)||f)?y(v):n[l]=h}}}}(e,t,r);switch(e?.type??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:e,write:t}=d.b;return{read:e,write:t}}}}(e,r,i);for(const e of t){const t=(0,c.aq)(r,e,i);for(const e in n)t[e]=n[e]}}}function y(e){const{targetUrl:t,params:r,value:o,context:a,dest:u,targetPropertyName:c}=e;if(!a.portalItem)return;const h=(0,d.p)(t),y=g(o,t,a);if(r?.contentAddressed&&"json"!==y.type)return void a.messages?.push(new i.c("persistable:contentAddressingUnsupported",`Property "${c}" is trying to serializing a resource with content of type ${y.type} with content addressing. Content addressing is only supported for json resources.`,{content:y}));const f=r?.contentAddressed&&"json"===y.type?(0,n.I)(y.jsonString):h?.filename??(0,l.g1)(),v=(0,s.kn)(r?.prefix??h?.prefix,f),b=`${v}.${(0,p.e)(y)}`;if(r?.contentAddressed&&a.resources&&"json"===y.type){const e=a.resources.toKeep.find((({resource:e})=>e.path===b))??a.resources.toAdd.find((({resource:e})=>e.path===b));if(e)return void(u[c]=e.resource.itemRelativeUrl)}const q=a.portalItem.resourceFromPath(b);(0,s.ue)(t)&&a.resources&&a.resources.pendingOperations.push((0,s.SW)(t).then((e=>{q.path=`${v}.${(0,p.e)({type:"blob",blob:e})}`,u[c]=q.itemRelativeUrl})).catch((()=>{})));const S=r?.compress??!1;a.resources&&m({...e,resource:q,content:y,compress:S,updates:a.resources.toAdd}),u[c]=q.itemRelativeUrl}function m({object:e,propertyName:t,updates:r,resource:i,content:n,compress:o}){r.push({resource:i,content:n,compress:o,finish:r=>{!function(e,t,r){"string"==typeof e[t]?e[t]=r.url:e[t].url=r.url}(e,t,r)}})}function g(e,t,r){return"string"==typeof e?{type:"url",url:t}:{type:"json",jsonString:JSON.stringify(e.toJSON(r))}}},68612:(e,t,r)=>{function i(){return[1,0,0,0,1,0,0,0,1]}function n(e,t,r,i,n,o,s,l,a){return[e,t,r,i,n,o,s,l,a]}r.d(t,{IJ:()=>o,Su:()=>i,WK:()=>n});const o=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:function(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},create:i,createView:function(e,t){return new Float64Array(e,t,9)},fromValues:n},Symbol.toStringTag,{value:"Module"}))},2620:(e,t,r)=>{function i(){return[0,0,0,1]}function n(e){return[e[0],e[1],e[2],e[3]]}r.d(t,{IJ:()=>o,Su:()=>i,ct:()=>n});const o=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:n,create:i,createView:function(e,t){return new Float64Array(e,t,4)},fromValues:function(e,t,r,i){return[e,t,r,i]}},Symbol.toStringTag,{value:"Module"}))},41512:(e,t,r)=>{r.d(t,{C0:()=>c,WO:()=>f,Wu:()=>m,fO:()=>h,iW:()=>p,sF:()=>T,yG:()=>u});var i=r(68612),n=r(2620),o=r(62484),s=r(47364),l=r(98472),a=r(74784);function u(e,t,r){r*=.5;const i=Math.sin(r);return e[0]=i*t[0],e[1]=i*t[1],e[2]=i*t[2],e[3]=Math.cos(r),e}function c(e,t){const r=2*Math.acos(t[3]),i=Math.sin(r/2);return i>(0,s.Au)()?(e[0]=t[0]/i,e[1]=t[1]/i,e[2]=t[2]/i):(e[0]=1,e[1]=0,e[2]=0),r}function p(e,t,r){const i=t[0],n=t[1],o=t[2],s=t[3],l=r[0],a=r[1],u=r[2],c=r[3];return e[0]=i*c+s*l+n*u-o*a,e[1]=n*c+s*a+o*l-i*u,e[2]=o*c+s*u+i*a-n*l,e[3]=s*c-i*l-n*a-o*u,e}function d(e,t,r,i){const n=t[0],o=t[1],l=t[2],a=t[3];let u,c,p,d,h,y=r[0],m=r[1],g=r[2],f=r[3];return c=n*y+o*m+l*g+a*f,c<0&&(c=-c,y=-y,m=-m,g=-g,f=-f),1-c>(0,s.Au)()?(u=Math.acos(c),p=Math.sin(u),d=Math.sin((1-i)*u)/p,h=Math.sin(i*u)/p):(d=1-i,h=i),e[0]=d*n+h*y,e[1]=d*o+h*m,e[2]=d*l+h*g,e[3]=d*a+h*f,e}function h(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function y(e,t){const r=t[0]+t[4]+t[8];let i;if(r>0)i=Math.sqrt(r+1),e[3]=.5*i,i=.5/i,e[0]=(t[5]-t[7])*i,e[1]=(t[6]-t[2])*i,e[2]=(t[1]-t[3])*i;else{let r=0;t[4]>t[0]&&(r=1),t[8]>t[3*r+r]&&(r=2);const n=(r+1)%3,o=(r+2)%3;i=Math.sqrt(t[3*r+r]-t[3*n+n]-t[3*o+o]+1),e[r]=.5*i,i=.5/i,e[3]=(t[3*n+o]-t[3*o+n])*i,e[n]=(t[3*n+r]+t[3*r+n])*i,e[o]=(t[3*o+r]+t[3*r+o])*i}return e}function m(e,t,r,i){const n=.5*Math.PI/180;t*=n,r*=n,i*=n;const o=Math.sin(t),s=Math.cos(t),l=Math.sin(r),a=Math.cos(r),u=Math.sin(i),c=Math.cos(i);return e[0]=o*a*c-s*l*u,e[1]=s*l*c+o*a*u,e[2]=s*a*u-o*l*c,e[3]=s*a*c+o*l*u,e}const g=a.c,f=a.s,v=a.g,b=p,q=a.d,S=a.h,w=a.l,_=a.i,x=_,j=a.j,V=j,I=a.n,T=a.a,A=a.e,N=(0,o.Su)(),M=(0,o.WK)(1,0,0),R=(0,o.WK)(0,1,0),z=(0,n.Su)(),F=(0,n.Su)(),D=(0,i.Su)();Object.freeze(Object.defineProperty({__proto__:null,add:v,calculateW:function(e,t){const r=t[0],i=t[1],n=t[2];return e[0]=r,e[1]=i,e[2]=n,e[3]=Math.sqrt(Math.abs(1-r*r-i*i-n*n)),e},conjugate:h,copy:g,dot:S,equals:A,exactEquals:T,fromEuler:m,fromMat3:y,getAxisAngle:c,identity:function(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e},invert:function(e,t){const r=t[0],i=t[1],n=t[2],o=t[3],s=r*r+i*i+n*n+o*o,l=s?1/s:0;return e[0]=-r*l,e[1]=-i*l,e[2]=-n*l,e[3]=o*l,e},len:x,length:_,lerp:w,mul:b,multiply:p,normalize:I,random:function(e){const t=s.QR,r=t(),i=t(),n=t(),o=Math.sqrt(1-r),l=Math.sqrt(r);return e[0]=o*Math.sin(2*Math.PI*i),e[1]=o*Math.cos(2*Math.PI*i),e[2]=l*Math.sin(2*Math.PI*n),e[3]=l*Math.cos(2*Math.PI*n),e},rotateX:function(e,t,r){r*=.5;const i=t[0],n=t[1],o=t[2],s=t[3],l=Math.sin(r),a=Math.cos(r);return e[0]=i*a+s*l,e[1]=n*a+o*l,e[2]=o*a-n*l,e[3]=s*a-i*l,e},rotateY:function(e,t,r){r*=.5;const i=t[0],n=t[1],o=t[2],s=t[3],l=Math.sin(r),a=Math.cos(r);return e[0]=i*a-o*l,e[1]=n*a+s*l,e[2]=o*a+i*l,e[3]=s*a-n*l,e},rotateZ:function(e,t,r){r*=.5;const i=t[0],n=t[1],o=t[2],s=t[3],l=Math.sin(r),a=Math.cos(r);return e[0]=i*a+n*l,e[1]=n*a-i*l,e[2]=o*a+s*l,e[3]=s*a-o*l,e},rotationTo:function(e,t,r){const i=(0,l.j)(t,r);return i<-.999999?((0,l.b)(N,M,t),(0,l.C)(N)<1e-6&&(0,l.b)(N,R,t),(0,l.n)(N,N),u(e,N,Math.PI),e):i>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):((0,l.b)(N,t,r),e[0]=N[0],e[1]=N[1],e[2]=N[2],e[3]=1+i,I(e,e))},scale:q,set:f,setAxes:function(e,t,r,i){const n=D;return n[0]=r[0],n[3]=r[1],n[6]=r[2],n[1]=i[0],n[4]=i[1],n[7]=i[2],n[2]=-t[0],n[5]=-t[1],n[8]=-t[2],I(e,y(e,n))},setAxisAngle:u,slerp:d,sqlerp:function(e,t,r,i,n,o){return d(z,t,n,o),d(F,r,i,o),d(e,z,F,2*o*(1-o)),e},sqrLen:V,squaredLength:j,str:function(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}},Symbol.toStringTag,{value:"Module"}))},63564:(e,t,r)=>{r.d(t,{Mr:()=>s,cf:()=>o,g1:()=>n});const i="randomUUID"in crypto;function n(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function o(){return`{${n().toUpperCase()}}`}function s(){return`{${n()}}`}},13819:(e,t,r)=>{r.d(t,{c:()=>b});var i,n=r(41948),o=r(92400),s=r(14628),l=r(40504),a=r(24296),u=r(69504),c=r(1580),p=(r(9456),r(66360),r(33600)),d=r(12552),h=r(18996);const y=(0,s.w)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),m=y.jsonValues.slice();(0,o.sH)(m,"orthometric");const g=(0,s.w)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let f=i=class extends l.am{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return y.write(e,t,r)}readHeightModel(e,t,r){return y.read(e)||(r?.messages&&r.messages.push(function(e,t){return new u.c("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return g.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,a.oG)(e)||g.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,a._2)(t);return new i({heightModel:e.heightModel,heightUnit:r??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new i;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new u.c("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,n._)([(0,c.qq)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m,default:"ellipsoidal"}}}})],f.prototype,"heightModel",void 0),(0,n._)([(0,h.G)("web-scene","heightModel")],f.prototype,"writeHeightModel",null),(0,n._)([(0,p.E)(["web-scene","service"],"heightModel")],f.prototype,"readHeightModel",null),(0,n._)([(0,c.qq)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g.jsonValues,write:g.write}}}})],f.prototype,"heightUnit",void 0),(0,n._)([(0,p.E)("web-scene","heightUnit")],f.prototype,"readHeightUnit",null),(0,n._)([(0,p.E)("service","heightUnit")],f.prototype,"readHeightUnitService",null),(0,n._)([(0,c.qq)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],f.prototype,"vertCRS",void 0),(0,n._)([(0,p.E)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],f.prototype,"readVertCRS",null),f=i=(0,n._)([(0,d.c)("esri.geometry.HeightModelInfo")],f);const b=f},81436:(e,t,r)=>{r.d(t,{c:()=>b});var i=r(41948),n=(r(60708),r(2600)),o=r(20744),s=r(77860),l=r(22156),a=r(95800),u=r(66360),c=r(10860),p=r(28176),d=r(1580),h=(r(9456),r(72052),r(12552)),y=r(6220),m=r(95247),g=r(56156);let f=0,v=class extends(s.c.EventedMixin((0,l.MR)(a.c))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new m.c(-180,-90,180,90,g.c.WGS84),this.id=Date.now().toString(16)+"-layer-"+f++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=g.c.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(9232).then(r.bind(r,69232))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await r.e(2259).then(r.bind(r,12259));try{return await i(t)}catch(e){const r=t&&t.portalItem,i=r?.id||"unset",n=r&&r.portal&&r.portal.url||y.default.portalUrl;throw u.c.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+n+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,c.mA)(e)||u.c.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,p.as)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,n.c)(e,{query:{f:"json"},responseType:"json"})).data;throw new o.c("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,d.qq)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,i._)([(0,d.qq)({type:m.c})],v.prototype,"fullExtent",void 0),(0,i._)([(0,d.qq)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,i._)([(0,d.qq)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,i._)([(0,d.qq)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,i._)([(0,d.qq)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,i._)([(0,d.qq)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,i._)([(0,d.qq)({clonable:!1})],v.prototype,"parent",void 0),(0,i._)([(0,d.qq)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,i._)([(0,d.qq)({type:Boolean,readOnly:!0})],v.prototype,"persistenceEnabled",void 0),(0,i._)([(0,d.qq)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,i._)([(0,d.qq)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,i._)([(0,d.qq)({type:g.c})],v.prototype,"spatialReference",void 0),(0,i._)([(0,d.qq)({type:String})],v.prototype,"title",void 0),(0,i._)([(0,d.qq)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,i._)([(0,d.qq)()],v.prototype,"url",void 0),(0,i._)([(0,d.qq)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,i._)([(0,h.c)("esri.layers.Layer")],v);const b=v},59496:(e,t,r)=>{r.r(t),r.d(t,{default:()=>$e});var i=r(41948),n=r(82692),o=r(2952),s=r(20744),l=r(66360),a=r(26496),u=r(10860),c=r(1580),p=r(53368),d=(r(72052),r(9456),r(33600)),h=r(12552),y=r(98472),m=r(62484),g=r(95247),f=r(81436),v=r(38724),b=r(16660),q=r(28584),S=r(66576),w=r(98768),_=r(3116),x=r(87072),j=r(48212),V=r(21488),I=r(600),T=r(3856),A=r(27368),N=r(40504),M=r(90636),R=r(41512),z=r(2620),F=r(47364);const D=(0,m.Su)(),P=(0,z.Su)(),E=(0,z.Su)(),O=(0,z.Su)(),U=(0,m.WK)(0,0,1),L=(0,m.WK)(0,1,0),C=(0,m.WK)(1,0,0);function k(e){(0,y.c)(D,e),(0,y.n)(D,D);const t=Math.atan2(D[1],D[0]),r=(0,R.yG)((0,z.Su)(),U,-t);(0,y.r)(D,D,r);const i=-1*Math.atan2(D[2],D[0]);return[(0,F.Yf)(t)+270,(0,F.Yf)(i)+90]}function B(e,t){return(0,R.yG)(E,U,(0,F.Af)(e-270)),(0,R.yG)(O,L,(0,F.Af)(t-90)),(0,R.iW)(P,E,O),(0,y.c)(D,C),(0,y.r)(D,D,P),(0,y.n)(D,D),[D[0],D[1],D[2]]}var W=r(33392);let $=class extends((0,T.q)(N.am)){constructor(e){super(e),this.enabled=!0,this.label="",this.normal=null,this.point=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=k(this.normal);return A.sD.normalize((0,p.Oe)(e),0,!0)}set orientation(e){const t=B(e,this.tilt);this._set("normal",t),this._set("orientation",e)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=k(this.normal);return A.sD.normalize((0,p.Oe)(t),0,!0)}set tilt(e){const t=B(this.orientation,e);this._set("normal",t),this._set("tilt",e)}};(0,i._)([(0,c.qq)({type:Boolean,json:{write:!0}})],$.prototype,"enabled",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],$.prototype,"label",void 0),(0,i._)([(0,c.qq)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,W.W)((e=>A.sD.normalize((0,p.Oe)(e),0,!0)))],$.prototype,"orientation",null),(0,i._)([(0,c.qq)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,W.W)((e=>A.sD.normalize((0,p.Oe)(e),0,!0)))],$.prototype,"tilt",null),(0,i._)([(0,c.qq)({type:[Number],json:{write:!0}})],$.prototype,"normal",void 0),(0,i._)([(0,c.qq)({type:[Number],json:{write:!0}})],$.prototype,"point",void 0),$=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelSlice")],$);const G=$;var H=r(91952);let J=class extends((0,T.q)(N.am)){constructor(){super(...arguments),this.enabled=!0,this.href=null,this.id=null,this.label="",this.normal=null,this.point=null,this.sizeInPixel=null,this.slices=null,this.timeId=0,this.variableId=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=k(this.normal);return A.sD.normalize((0,p.Oe)(e),0,!0)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=k(this.normal);return A.sD.normalize((0,p.Oe)(t),0,!0)}};(0,i._)([(0,c.qq)({type:Boolean,json:{default:!0,write:!0}})],J.prototype,"enabled",void 0),(0,i._)([(0,c.qq)({type:String,json:{origins:{service:{read:H.r}},write:{enabled:!0,isRequired:!0}}}),(0,M.O)({origins:["web-scene"],type:"resource",prefix:"sections",compress:!0})],J.prototype,"href",void 0),(0,i._)([(0,c.qq)({type:p.Ab,json:{write:{enabled:!0,isRequired:!0}}})],J.prototype,"id",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],J.prototype,"label",void 0),(0,i._)([(0,c.qq)({type:Number,clonable:!1,readOnly:!0,range:{min:0,max:360}})],J.prototype,"orientation",null),(0,i._)([(0,c.qq)({type:Number,clonable:!1,readOnly:!0,range:{min:0,max:360}})],J.prototype,"tilt",null),(0,i._)([(0,c.qq)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],J.prototype,"normal",void 0),(0,i._)([(0,c.qq)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],J.prototype,"point",void 0),(0,i._)([(0,c.qq)({type:[p.Ab],json:{write:{enabled:!0,isRequired:!0}}})],J.prototype,"sizeInPixel",void 0),(0,i._)([(0,c.qq)({type:[G],json:{write:!0}})],J.prototype,"slices",void 0),(0,i._)([(0,c.qq)({type:p.Ab,json:{default:0,write:!0}})],J.prototype,"timeId",void 0),(0,i._)([(0,c.qq)({type:p.Ab,json:{write:{enabled:!0,isRequired:!0}}})],J.prototype,"variableId",void 0),J=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelSection")],J);const K=J;let Y=class extends N.am{constructor(){super(...arguments),this.diffuseFactor=.5,this.specularFactor=.5}};(0,i._)([(0,c.qq)({type:Number,range:{min:0,max:1},json:{default:.5,write:!0}})],Y.prototype,"diffuseFactor",void 0),(0,i._)([(0,c.qq)({type:Number,range:{min:0,max:1},json:{default:.5,write:!0}})],Y.prototype,"specularFactor",void 0),Y=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelSimpleShading")],Y);const Q=Y;let X=class extends N.am{constructor(){super(...arguments),this.continuity=null,this.hasNoData=!1,this.noData=0,this.offset=0,this.scale=1,this.type=null}};(0,i._)([(0,c.qq)({type:["discrete","continuous"],json:{write:!0}})],X.prototype,"continuity",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{write:!0}})],X.prototype,"hasNoData",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:!0}})],X.prototype,"noData",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:!0}})],X.prototype,"offset",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:!0}})],X.prototype,"scale",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],X.prototype,"type",void 0),X=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelFormat")],X);const Z=X;let ee=class extends N.am{constructor(){super(...arguments),this.id=null,this.description="",this.name=null,this.originalFormat=null,this.renderingFormat=null,this.unit="",this.volumeId=0,this.type=null}};(0,i._)([(0,c.qq)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],ee.prototype,"id",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],ee.prototype,"description",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],ee.prototype,"name",void 0),(0,i._)([(0,c.qq)({type:Z,json:{write:!0}})],ee.prototype,"originalFormat",void 0),(0,i._)([(0,c.qq)({type:Z,json:{write:{enabled:!0,isRequired:!0}}})],ee.prototype,"renderingFormat",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],ee.prototype,"unit",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:!0}})],ee.prototype,"volumeId",void 0),(0,i._)([(0,c.qq)({type:["stc-hot-spot-results","stc-cluster-outlier-results","stc-estimated-bin","generic-nearest-interpolated"],json:{write:!0}})],ee.prototype,"type",void 0),ee=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelVariable")],ee);const te=ee;var re=r(62088),ie=r(44728);let ne=class extends((0,T.q)(N.am)){constructor(){super(...arguments),this.color=ie.c.fromArray([0,0,0,0]),this.value=0,this.enabled=!0,this.label="",this.colorLocked=!1}};(0,i._)([(0,c.qq)({type:ie.c,json:{type:[p.Ab],write:{enabled:!0,isRequired:!0}}})],ne.prototype,"color",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],ne.prototype,"value",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{default:!0,write:!0}})],ne.prototype,"enabled",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],ne.prototype,"label",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{default:!1,write:!0}})],ne.prototype,"colorLocked",void 0),ne=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelIsosurface")],ne);const oe=ne;var se=r(30604),le=r(53648);let ae=class extends((0,T.q)(N.am)){constructor(){super(...arguments),this.color=null,this.position=0}};(0,i._)([(0,c.qq)({type:ie.c,json:{type:[p.Ab],write:{enabled:!0,isRequired:!0}}})],ae.prototype,"color",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],ae.prototype,"position",void 0),ae=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelColorStop")],ae);const ue=ae;let ce=class extends((0,T.q)(N.am)){constructor(){super(...arguments),this.opacity=1,this.position=0}};(0,i._)([(0,c.qq)({type:Number,json:{name:"alpha",write:{enabled:!0,isRequired:!0}}})],ce.prototype,"opacity",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],ce.prototype,"position",void 0),ce=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelOpacityStop")],ce);const pe=ce;let de=class extends((0,T.q)(N.am)){constructor(){super(...arguments),this.enabled=!1,this.range=null}};(0,i._)([(0,c.qq)({type:Boolean,json:{default:!1,write:!0}})],de.prototype,"enabled",void 0),(0,i._)([(0,c.qq)({type:[Number],json:{write:!0}})],de.prototype,"range",void 0),de=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelRangeFilter")],de);const he=de;var ye,me;(me=ye||(ye={}))[me.Color=1]="Color",me[me.Alpha=2]="Alpha",me[me.Both=3]="Both";let ge=class extends((0,T.q)(N.am)){constructor(e){super(e),this.interpolation=null,this.stretchRange=null,this.rangeFilter=null,this._colorMapSize=256,this.colorStops=new(o.c.ofType(ue)),this.opacityStops=new(o.c.ofType(pe))}set colorStops(e){this._set("colorStops",(0,se.q)(e,this._get("colorStops"),o.c.ofType(ue)))}set opacityStops(e){this._set("opacityStops",(0,se.q)(e,this._get("opacityStops"),o.c.ofType(pe)))}getPreviousNext(e,t,r){let i=e;for(;--i>0&&t[i].type!==r&&t[i].type!==ye.Both;);let n=e;const o=t.length;for(;++n<o&&t[n].type!==r&&t[n].type!==ye.Both;);return[i,n]}get rasterizedTransferFunction(){const e=[];if(this.colorStops.length<2)return e;const t=[],r=[];for(const t of this.colorStops){if(!t.color)return e;r.push({color:{r:t.color.r,g:t.color.g,b:t.color.b,a:Math.round(255*(1-t.color.a))},position:t.position,type:ye.Color})}if(0===this.opacityStops.length)for(const e of r)t.push({color:e.color,position:e.position});else{for(const e of this.opacityStops){const t=(0,le.qk)(e.position,0,1),i=Math.round(255*(0,le.qk)(1-e.opacity,0,1));let n=!1;for(const e of r)if(e.type===ye.Color&&Math.abs(e.position-t)<1e-5){e.color.a=i,e.type=ye.Both,n=!0;break}n||r.push({color:{r:0,g:0,b:0,a:i},position:e.position,type:ye.Alpha})}r.sort(((e,t)=>e.position<t.position?-1:1));const e=r.length;for(let t=0;t<e;++t){const i=r[t];if(i.type!==ye.Both)if(i.type===ye.Color){const[n,o]=this.getPreviousNext(t,r,ye.Alpha);if(-1!==n&&o!==e){const e=(i.position-r[n].position)/(r[o].position-r[n].position);i.color.a=Math.round((0,le.Cq)(r[n].color.a,r[o].color.a,e))}else i.color.a=-1!==n?r[n].color.a:r[o].color.a}else{const[n,o]=this.getPreviousNext(t,r,ye.Color);if(-1!==n&&o!==e){const e=(i.position-r[n].position)/(r[o].position-r[n].position),t=r[n].color,s=r[o].color;ve.forEach((r=>{i.color[r]=Math.round((0,le.Cq)(t[r],s[r],e))}))}else-1!==n?ve.forEach((e=>{i.color[e]=r[n].color[e]})):ve.forEach((e=>{i.color[e]=r[o].color[e]}))}}for(const e of r)t.push({color:e.color,position:e.position})}t[0].position=0,t[t.length-1].position=1;let i=0,n=1;for(let r=0;r<this._colorMapSize;++r){const o=r/this._colorMapSize;for(;o>t[n].position;)i=n++;const s=(o-t[i].position)/(t[n].position-t[i].position),l=t[i].color,a=t[n].color,u=new ie.c;ve.forEach((e=>{u[e]=Math.round((0,le.Cq)(l[e],a[e],s))})),u.a=(0,le.qk)(1-(0,le.Cq)(l.a,a.a,s)/255,0,1),e.push(u)}return e}getColorForContinuousDataValue(e,t){const r=this.rasterizedTransferFunction;if(this.colorStops.length<2||!Array.isArray(this.stretchRange)||this.stretchRange.length<2||r.length<256)return null;let i=this.stretchRange[0],n=this.stretchRange[1];if(i>n){const e=i;i=n,n=e}e=(0,le.qk)(e,i,n);const o=r[Math.round((e-i)/(n-i)*(this._colorMapSize-1))].clone();return t||(o.a=1),o}};(0,i._)([(0,c.qq)({type:["linear","nearest"],json:{write:!0}})],ge.prototype,"interpolation",void 0),(0,i._)([(0,c.qq)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],ge.prototype,"stretchRange",void 0),(0,i._)([(0,c.qq)({type:o.c.ofType(ue),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.colorStops&&this.colorStops.length>0}}}}})],ge.prototype,"colorStops",null),(0,i._)([(0,c.qq)({type:o.c.ofType(pe),json:{read:{source:"alphaStops"},write:{enabled:!0,target:"alphaStops",overridePolicy(){return{enabled:!!this.opacityStops&&this.opacityStops.length>0}}}}})],ge.prototype,"opacityStops",null),(0,i._)([(0,c.qq)({type:he,json:{write:!0}})],ge.prototype,"rangeFilter",void 0),(0,i._)([(0,c.qq)({type:[ie.c],clonable:!1,json:{read:!1}})],ge.prototype,"rasterizedTransferFunction",null),ge=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelTransferFunctionStyle")],ge);const fe=ge,ve=["r","g","b"];let be=class extends((0,T.q)(N.am)){constructor(){super(...arguments),this.color=ie.c.fromArray([0,0,0,0]),this.value=0,this.enabled=!0,this.label=""}};(0,i._)([(0,c.qq)({type:ie.c,json:{type:[p.Ab],write:{enabled:!0,isRequired:!0}}})],be.prototype,"color",void 0),(0,i._)([(0,c.qq)({type:p.Ab,json:{write:{enabled:!0,isRequired:!0}}})],be.prototype,"value",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{default:!0,write:!0}})],be.prototype,"enabled",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],be.prototype,"label",void 0),be=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelUniqueValue")],be);const qe=be;var Se;let we=Se=class extends N.am{constructor(e){super(e),this.variableId=0,this.label="",this.transferFunction=null,this.uniqueValues=null,this.isosurfaces=null,this.uniqueValues=new(o.c.ofType(qe)),this.isosurfaces=new(o.c.ofType(oe))}clone(){return new Se({variableId:this.variableId,label:this.label,transferFunction:(0,re.ct)(this.transferFunction),uniqueValues:(0,re.ct)(this.uniqueValues),isosurfaces:(0,re.ct)(this.isosurfaces)})}};(0,i._)([(0,c.qq)({type:p.Ab,json:{write:{enabled:!0,isRequired:!0}}})],we.prototype,"variableId",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],we.prototype,"label",void 0),(0,i._)([(0,c.qq)({type:fe,json:{write:{enabled:!0,overridePolicy(){return{enabled:!this.uniqueValues||this.uniqueValues.length<1}}}}})],we.prototype,"transferFunction",void 0),(0,i._)([(0,c.qq)({type:o.c.ofType(qe),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.uniqueValues&&this.uniqueValues.length>0}}}}})],we.prototype,"uniqueValues",void 0),(0,i._)([(0,c.qq)({type:o.c.ofType(oe),json:{write:{enabled:!0,overridePolicy(){const e=!this.uniqueValues||this.uniqueValues.length<1,t=!!this.isosurfaces&&this.isosurfaces.length>0;return{enabled:e&&t}}}}})],we.prototype,"isosurfaces",void 0),we=Se=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelVariableStyle")],we);const _e=we;var xe=r(67776),je=r(56156),Ve=r(60544);let Ie=class extends N.am{constructor(){super(...arguments),this.values=null}};(0,i._)([(0,c.qq)({type:[Number],json:{write:!0}})],Ie.prototype,"values",void 0),Ie=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelIrregularSpacing")],Ie);const Te=Ie;let Ae=class extends N.am{constructor(){super(...arguments),this.scale=1,this.offset=0}};(0,i._)([(0,c.qq)({type:Number,json:{write:!0}})],Ae.prototype,"scale",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:!0}})],Ae.prototype,"offset",void 0),Ae=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelRegularSpacing")],Ae);const Ne=Ae;let Me=class extends N.am{constructor(){super(...arguments),this.irregularSpacing=null,this.isPositiveUp=!0,this.isWrappedDateLine=!1,this.label=null,this.name=null,this.quantity=null,this.regularSpacing=null,this.size=0,this.unit=null}get isRegular(){return(null==this.irregularSpacing||void 0===this.irregularSpacing)&&null!==this.regularSpacing}getRange(){return this.isRegular?[this.regularSpacing.offset,this.regularSpacing.offset+this.regularSpacing.scale*(this.size-1)]:Array.isArray(this.irregularSpacing?.values)&&this.irregularSpacing.values.length>1?[this.irregularSpacing.values[0],this.irregularSpacing.values[this.irregularSpacing.values.length-1]]:[0,0]}};(0,i._)([(0,c.qq)({type:Te,json:{write:!0}})],Me.prototype,"irregularSpacing",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{write:!0}})],Me.prototype,"isPositiveUp",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{write:!0}})],Me.prototype,"isWrappedDateLine",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],Me.prototype,"label",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],Me.prototype,"name",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],Me.prototype,"quantity",void 0),(0,i._)([(0,c.qq)({type:Ne,json:{write:!0}})],Me.prototype,"regularSpacing",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:!0}})],Me.prototype,"size",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],Me.prototype,"unit",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{read:!1}})],Me.prototype,"isRegular",null),Me=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelDimension")],Me);const Re=Me;let ze=class extends N.am{constructor(e){super(e),this.id=0,this.dimensions=null,this.spatialReference=je.c.WGS84}get zDimension(){if(!this.dimensions)return-1;if(!Array.isArray(this.dimensions))return-1;if(4!==this.dimensions.length)return-1;for(let e=2;e<4;++e)if(this.dimensions[e].size>0)return e;return-1}get isValid(){return!(!this.dimensions||!Array.isArray(this.dimensions)||4!==this.dimensions.length||this.dimensions[0].size<1||this.dimensions[1].size<1||-1===this.zDimension||this.dimensions[this.zDimension].size<1)}get originInLayerSpace3D(){if(!this.isValid||"xyt"===this.volumeType)return[0,0,0];const e=this.dimensions[0].getRange(),t=this.dimensions[1].getRange(),r=this.dimensions[2],i=r.isRegular?r.getRange():[0,r.size];return[e[0],t[0],i[0]]}get voxelSizeInLayerSpaceSigned(){if(!this.isValid||"xyt"===this.volumeType)return[0,0,0];const e=this.dimensions[0].getRange(),t=this.dimensions[1].getRange(),r=this.dimensions[2],i=r.isRegular?r.getRange():[0,r.size],n=[this.sizeInVoxels[0],this.sizeInVoxels[1],this.sizeInVoxels[2]];for(let e=0;e<3;++e)n[e]<2?n[e]=1:n[e]-=1;return r.isRegular&&!r.isPositiveUp&&(n[2]*=-1),[(e[1]-e[0])/n[0],(t[1]-t[0])/n[1],(i[1]-i[0])/n[2]]}get volumeType(){if(this.isValid){const e=this.dimensions[2].size>0,t=this.dimensions[3].size>0;if(!e&&t)return"xyt";if(e&&t)return"xyzt"}return"xyz"}get sizeInVoxels(){if(!this.isValid)return[0,0,0];const e=this.zDimension;return[this.dimensions[0].size,this.dimensions[1].size,this.dimensions[e].size]}computeVoxelSpaceLocation(e){if(!this.isValid)return[0,0,0];if("xyt"===this.volumeType)return l.c.getLogger(this).error("computeVoxelSpacePosition cannot be used with XYT volumes."),[0,0,0];if(!(0,Ve.yK)(this.spatialReference,e.spatialReference))return l.c.getLogger(this).error("pos argument should have the same spatial reference as the VoxelLayer."),[0,0,0];const t=(0,m.WK)(e.x,e.y,e.z??0);(0,y.f)(t,t,this.originInLayerSpace3D),(0,y.G)(t,t,this.voxelSizeInLayerSpaceSigned);const r=this.dimensions[this.zDimension];if(!r.isRegular&&Array.isArray(r.irregularSpacing?.values)&&r.irregularSpacing.values.length>1){const i=e.z??0,n=r.irregularSpacing.values,o=r.isPositiveUp?1:-1,s=n.reduce(((e,t)=>Math.abs(o*t-i)<Math.abs(o*e-i)?t:e));for(let e=0;e<n.length;++e)if(n[e]===s){t[2]=e;break}}return[t[0],t[1],t[2]]}computeLayerSpaceLocation(e){if(!this.isValid)return new xe.c({x:0,y:0,spatialReference:this.spatialReference});const t=(0,m.eu)(e);if((0,y.A)(t,t,this.voxelSizeInLayerSpaceSigned),(0,y.g)(t,t,this.originInLayerSpace3D),"xyt"===this.volumeType)return new xe.c({x:t[0],y:t[1],spatialReference:this.spatialReference});const r=this.dimensions[this.zDimension];return r.isRegular||Array.isArray(r.irregularSpacing?.values)&&(e[2]<0?t[2]=r.irregularSpacing.values[0]:e[2]<r.irregularSpacing.values.length?t[2]=r.irregularSpacing.values[e[2]]:t[2]=r.irregularSpacing.values[r.irregularSpacing.values.length-1],r.isPositiveUp||(t[2]*=-1)),new xe.c({x:t[0],y:t[1],z:t[2],spatialReference:this.spatialReference})}};(0,i._)([(0,c.qq)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],ze.prototype,"id",void 0),(0,i._)([(0,c.qq)({type:[Re],json:{write:{enabled:!0,isRequired:!0}}})],ze.prototype,"dimensions",void 0),(0,i._)([(0,c.qq)({type:je.c,json:{read:{enabled:!1}}})],ze.prototype,"spatialReference",void 0),(0,i._)([(0,c.qq)({type:Number,json:{read:!1}})],ze.prototype,"zDimension",null),(0,i._)([(0,c.qq)({type:[Boolean],json:{read:!1}})],ze.prototype,"isValid",null),(0,i._)([(0,c.qq)({type:[Number],json:{read:!1}})],ze.prototype,"originInLayerSpace3D",null),(0,i._)([(0,c.qq)({type:[Number],json:{read:!1}})],ze.prototype,"voxelSizeInLayerSpaceSigned",null),(0,i._)([(0,c.qq)({type:["xyz","xyzt","xyt"],json:{read:{enabled:!1}}})],ze.prototype,"volumeType",null),(0,i._)([(0,c.qq)({type:[Number],json:{read:!1}})],ze.prototype,"sizeInVoxels",null),ze=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelVolume")],ze);const Fe=ze;var De;let Pe=De=class extends N.am{constructor(){super(...arguments),this.apronWidth=1,this.brickSize=[32,32,32],this.maxLodLevel=0,this.nodeSize=[4,4,4]}isValid(){const e=new De;return e.apronWidth===this.apronWidth&&e.maxLodLevel===this.maxLodLevel&&!!this.brickSize&&!!this.nodeSize&&!(!Array.isArray(this.brickSize)||!Array.isArray(this.nodeSize))&&3===this.brickSize.length&&3===this.nodeSize.length&&32===this.brickSize[0]&&32===this.brickSize[1]&&32===this.brickSize[2]&&4===this.nodeSize[0]&&4===this.nodeSize[1]&&4===this.nodeSize[2]}};(0,i._)([(0,c.qq)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],Pe.prototype,"apronWidth",void 0),(0,i._)([(0,c.qq)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],Pe.prototype,"brickSize",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],Pe.prototype,"maxLodLevel",void 0),(0,i._)([(0,c.qq)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],Pe.prototype,"nodeSize",void 0),Pe=De=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelVolumeIndex")],Pe);const Ee=Pe;let Oe=class extends((0,T.q)(N.am)){constructor(e){super(e),this.enabled=!0,this.label="",this.normal=null,this.point=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=k(this.normal);return A.sD.normalize((0,p.Oe)(e),0,!0)}set orientation(e){const t=B(e,this.tilt);this._set("normal",t),this._set("orientation",e)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=k(this.normal);return A.sD.normalize((0,p.Oe)(t),0,!0)}set tilt(e){const t=B(this.orientation,e);this._set("normal",t),this._set("tilt",e)}};(0,i._)([(0,c.qq)({type:Boolean,json:{default:!0,write:!0}})],Oe.prototype,"enabled",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],Oe.prototype,"label",void 0),(0,i._)([(0,c.qq)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,W.W)((e=>A.sD.normalize((0,p.Oe)(e),0,!0)))],Oe.prototype,"orientation",null),(0,i._)([(0,c.qq)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,W.W)((e=>A.sD.normalize((0,p.Oe)(e),0,!0)))],Oe.prototype,"tilt",null),(0,i._)([(0,c.qq)({type:[Number],json:{write:!0}})],Oe.prototype,"normal",void 0),(0,i._)([(0,c.qq)({type:[Number],json:{write:!0}})],Oe.prototype,"point",void 0),Oe=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelDynamicSection")],Oe);const Ue=Oe;var Le;let Ce=Le=class extends N.am{constructor(e){super(e),this.volumeId=0,this.verticalExaggeration=1,this.exaggerationMode="scale-height",this.verticalOffset=0,this.slices=new(o.c.ofType(G)),this.dynamicSections=new(o.c.ofType(Ue))}set slices(e){this._set("slices",(0,se.q)(e,this._get("slices"),o.c.ofType(G)))}set dynamicSections(e){this._set("dynamicSections",(0,se.q)(e,this._get("dynamicSections"),o.c.ofType(Ue)))}clone(){return new Le({volumeId:this.volumeId,verticalExaggeration:this.verticalExaggeration,exaggerationMode:this.exaggerationMode,verticalOffset:this.verticalOffset,slices:(0,re.ct)(this.slices),dynamicSections:(0,re.ct)(this.dynamicSections)})}};(0,i._)([(0,c.qq)({type:p.Ab,json:{write:{enabled:!0,isRequired:!0}}})],Ce.prototype,"volumeId",void 0),(0,i._)([(0,c.qq)({type:Number,json:{default:1,write:!0}})],Ce.prototype,"verticalExaggeration",void 0),(0,i._)([(0,c.qq)({type:["scale-position","scale-height"],json:{default:"scale-height",write:!0}})],Ce.prototype,"exaggerationMode",void 0),(0,i._)([(0,c.qq)({type:Number,json:{default:0,write:!0}})],Ce.prototype,"verticalOffset",void 0),(0,i._)([(0,c.qq)({type:o.c.ofType(G),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.slices&&this.slices.length>0}}}}})],Ce.prototype,"slices",null),(0,i._)([(0,c.qq)({type:o.c.ofType(Ue),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.dynamicSections&&this.dynamicSections.length>0}}}}})],Ce.prototype,"dynamicSections",null),Ce=Le=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelVolumeStyle")],Ce);const ke=Ce;var Be=r(65548);let We=class extends((0,x.G6)((0,b.u)((0,S.Y)((0,w.K)((0,_.I)((0,a.U)((0,q.G)((0,v.C)(f.c))))))))){constructor(e){super(e),this.serviceRoot="",this.operationalLayerType="Voxel",this.legendEnabled=!0,this.title=null,this.sections=null,this.currentVariableId=0,this.volumeStyles=null,this.renderMode="volume",this.variableStyles=null,this.enableSlices=!0,this.enableSections=!0,this.enableDynamicSections=!0,this.enableIsosurfaces=!0,this.shading=new Q,this.opacity=1,this.variables=new o.c,this.volumes=new o.c,this.index=null,this.minScale=0,this.maxScale=0,this.type="voxel",this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.fullExtent=null,this.popupEnabled=!1,this.test=null,this.volumeStyles=new(o.c.ofType(ke)),this.variableStyles=new(o.c.ofType(_e)),this.sections=new(o.c.ofType(K))}normalizeCtorArgs(e){return e?.constantUpscaling&&(this.test={constantUpscaling:!0},delete e.constantUpscaling),e}set url(e){this._set("url",(0,j.oR)(e,l.c.getLogger(this)))}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(u.CE).then((()=>this._fetchService(t))).then((()=>this.serviceRoot=this.url));return this.addResolvingPromise(r),Promise.resolve(this)}read(e,t){super.read(e,t);for(const e of this.volumes)e.spatialReference=this.spatialReference}readVersion(e,t){return super.parseVersionString(e)}validateLayer(e){if(e.layerType&&e.layerType!==this.operationalLayerType)throw new s.c("voxel-layer:layer-type-not-supported","VoxelLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor)||this.version.major<3)throw new s.c("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"3.x"});if(this.version.major>3)throw new s.c("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"3.x"})}readFullExtent(e,t,r){if(null!=e&&"object"==typeof e){const i=g.c.fromJSON(e,r);if(0===i.zmin&&0===i.zmax&&Array.isArray(t.volumes)){const e=Fe.fromJSON(t.volumes[0]);if(e.isValid&&"xyt"!==e.volumeType){const t=e.dimensions[2];if(t.isRegular){let e=t.regularSpacing.offset,r=t.regularSpacing.offset+t.regularSpacing.scale*(t.size-1);if(e>r){const t=e;e=r,r=t}i.zmin=e,i.zmax=r}}}return i}return null}get voxelFields(){const e=[new I.c({name:"Voxel.ServiceValue",alias:"Value",domain:null,editable:!1,length:128,type:"string"}),new I.c({name:"Voxel.ServiceVariableLabel",alias:"Variable",domain:null,editable:!1,length:128,type:"string"}),new I.c({name:"Voxel.Position",alias:"Voxel Position",domain:null,editable:!1,length:128,type:"string"})],t=this.getVolume(null);if(null!=t){if("xyzt"===t.volumeType||"xyt"===t.volumeType){const t=new I.c({name:"Voxel.ServiceLocalTime",alias:"Local Time",domain:null,editable:!1,length:128,type:"string"});e.push(t);const r=new I.c({name:"Voxel.ServiceNativeTime",alias:"Native Time",domain:null,editable:!1,length:128,type:"string"});e.push(r)}if("xyt"!==t.volumeType){const t=new I.c({name:"Voxel.ServiceDepth",alias:"Depth",domain:null,editable:!1,length:128,type:"string"});e.push(t)}}return e}get popupTemplate(){return this.loaded?this.createPopupTemplate():null}get defaultPopupTemplate(){return this.createPopupTemplate()}createPopupTemplate(e){const t=this.voxelFields,r=this.title;return(0,Be.Ap)({fields:t,title:r},e)}getConfiguration(){const e={layerType:this.operationalLayerType,version:this.version.versionString,name:this.title,spatialReference:this.spatialReference,fullExtent:this.fullExtent,volumes:this.volumes.toJSON(),variables:this.variables.toJSON(),index:this.index?.toJSON(),sections:this.getSections(),style:{volumeStyles:this.getVolumeStyles(),currentVariableId:this.currentVariableId,renderMode:this.renderMode,variableStyles:this.getVariableStyles(),enableSections:this.enableSections,enableDynamicSections:this.enableDynamicSections,enableIsosurfaces:this.enableIsosurfaces,enableSlices:this.enableSlices,shading:this.shading}};return e.index&&this.index?.isValid()?JSON.stringify(e):""}getVariableStyle(e){let t=-1;if(t=null!=e?e:this.currentVariableId,!this.variableStyles||-1===t)return null;const r=this.variableStyles.findIndex((e=>e.variableId===t));return r<0?null:this.variableStyles.at(r)}getVariable(e){let t=-1;if(t=null!=e?e:this.currentVariableId,!this.variables||-1===t)return null;const r=this.variables.findIndex((e=>e.id===t));return r<0?null:this.variables.at(r)}getVolume(e){const t=this.getVariable(e);return null!=t?this.volumes.find((({id:e})=>e===t.volumeId)):null}getVolumeStyle(e){const t=this.getVariable(e);return null!=t?this.volumeStyles.find((({volumeId:e})=>e===t.volumeId)):null}getColorForContinuousDataValue(e,t,r){const i=this.getVariable(e);if(null==i||"continuous"!==i.renderingFormat?.continuity)return null;if(!this.variableStyles)return null;const n=this.variableStyles.findIndex((t=>t.variableId===e));if(n<0)return null;const o=this.variableStyles.at(n);return o?.transferFunction?o.transferFunction.getColorForContinuousDataValue(t,r):null}getSections(){const e=[];for(const t of this.sections)e.push(new K({enabled:t.enabled,href:t.href,id:t.id,label:t.label,normal:t.normal,point:t.point,sizeInPixel:t.sizeInPixel,slices:t.slices,timeId:t.timeId,variableId:t.variableId}));return e}getVariableStyles(){const e=[];for(const t of this.variableStyles){const r=this._getVariable(t);if(null!=r){const i=t.clone();i.isosurfaces.length>4&&(i.isosurfaces=i.isosurfaces.slice(0,3),l.c.getLogger(this).error("A maximum of 4 isosurfaces are supported for Voxel Layers."));for(const e of i.isosurfaces)if(!e.colorLocked){const t=this.getColorForContinuousDataValue(i.variableId,e.value,!1);null===t||t.equals(e.color)||(e.color=t)}if("continuous"===r.renderingFormat.continuity)(null===i.transferFunction||i.transferFunction.colorStops.length<2)&&l.c.getLogger(this).error(`VoxelVariableStyle for variable ${r.id} is invalid. At least 2 color stops are required in the transferFunction for continuous Voxel Layer variables.`),null!==i.transferFunction&&(Array.isArray(i.transferFunction.stretchRange)&&2===i.transferFunction.stretchRange.length||(l.c.getLogger(this).error(`VoxelVariableStyle for variable ${r.id} is invalid. The stretchRange of the transferFunction for continuous Voxel Layer variables must be of the form [minimumDataValue, maximumDataValue].`),i.transferFunction.stretchRange=[0,1],i.transferFunction.colorStops.removeAll()));else if("discrete"===r.renderingFormat.continuity)if(0===t.uniqueValues.length)l.c.getLogger(this).error(`VoxelVariableStyle for variable ${r.id} is invalid. Unique values are required for discrete Voxel Layer variables.`);else for(const e of t.uniqueValues)null!==e.label&&void 0!==e.label||null===e.value||void 0===e.value||(e.label=e.value.toString());e.push(i)}else l.c.getLogger(this).error(`VoxelVariable ID=${t.variableId} doesn't exist, VoxelVariableStyle for this VoxelVariable will be ignored.`)}return e}getVolumeStyles(){const e=[];for(const t of this.volumeStyles){const r=this._getVolumeFromVolumeId(t.volumeId);if(null!=r){const i=t.clone();for(const e of i.slices)this._isPlaneValid(e,[0,1,r.zDimension],r.dimensions)||(e.enabled=!1,e.label="invalid");for(const e of i.dynamicSections)this._isPlaneValid(e,[0,1,r.zDimension],r.dimensions)||(e.enabled=!1,e.label="invalid");e.push(i)}else l.c.getLogger(this).error(`VoxelVolume ID=${t.volumeId} doesn't exist, VoxelVolumeStyle for this VoxelVolume will be ignored.`)}return e}_getVariable(e){const t=e.variableId;for(const e of this.variables)if(e.id===t)return e;return null}_getVolumeFromVolumeId(e){for(const t of this.volumes)if(t.id===e)return t;return null}_isPlaneValid(e,t,r){if(!e.point)return!1;if(!Array.isArray(e.point)||3!==e.point.length)return!1;if(!e.normal)return!1;if(!Array.isArray(e.normal)||3!==e.normal.length)return!1;const i=(0,m.WK)(e.normal[0],e.normal[1],e.normal[2]);return(0,y.n)(i,i),!(Math.abs(i[0])+Math.abs(i[1])+Math.abs(i[2])<1e-6||(e.normal[0]=i[0],e.normal[1]=i[1],e.normal[2]=i[2],0))}};(0,i._)([(0,c.qq)({type:["Voxel"]})],We.prototype,"operationalLayerType",void 0),(0,i._)([(0,c.qq)(V.Uj)],We.prototype,"legendEnabled",void 0),(0,i._)([(0,c.qq)({json:{write:!0}})],We.prototype,"title",void 0),(0,i._)([(0,c.qq)(V.qW)],We.prototype,"url",null),(0,i._)([(0,c.qq)({type:o.c.ofType(K),json:{origins:{"web-scene":{name:"layerDefinition.sections",write:!0}}}})],We.prototype,"sections",void 0),(0,i._)([(0,c.qq)({type:p.Ab,json:{origins:{"web-scene":{name:"layerDefinition.style.currentVariableId",write:{enabled:!0,isRequired:!0,ignoreOrigin:!0}},service:{name:"style.currentVariableId"}}}})],We.prototype,"currentVariableId",void 0),(0,i._)([(0,c.qq)({type:o.c.ofType(ke),json:{origins:{"web-scene":{name:"layerDefinition.style.volumeStyles",write:!0},service:{name:"style.volumeStyles"}}}})],We.prototype,"volumeStyles",void 0),(0,i._)([(0,c.qq)({type:["volume","surfaces"],json:{origins:{"web-scene":{name:"layerDefinition.style.renderMode",write:!0},service:{name:"style.renderMode"}}}})],We.prototype,"renderMode",void 0),(0,i._)([(0,c.qq)({type:o.c.ofType(_e),json:{origins:{"web-scene":{name:"layerDefinition.style.variableStyles",write:!0},service:{name:"style.variableStyles"}}}})],We.prototype,"variableStyles",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableSlices",write:!0},service:{name:"style.enableSlices"}}}})],We.prototype,"enableSlices",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableSections",write:!0},service:{name:"style.enableSections"}}}})],We.prototype,"enableSections",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableDynamicSections",write:!0},service:{name:"style.enableDynamicSections"}}}})],We.prototype,"enableDynamicSections",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableIsosurfaces",write:!0},service:{name:"style.enableIsosurfaces"}}}})],We.prototype,"enableIsosurfaces",void 0),(0,i._)([(0,c.qq)({type:Q,json:{origins:{"web-scene":{name:"layerDefinition.style.shading",write:!0},service:{name:"style.shading"}}}})],We.prototype,"shading",void 0),(0,i._)([(0,c.qq)({type:["show","hide"]})],We.prototype,"listMode",void 0),(0,i._)([(0,c.qq)({type:Number,range:{min:0,max:1},nonNullable:!0,json:{read:!1,write:!1,origins:{"web-scene":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],We.prototype,"opacity",void 0),(0,i._)([(0,c.qq)({type:o.c.ofType(te)})],We.prototype,"variables",void 0),(0,i._)([(0,c.qq)({type:o.c.ofType(Fe)})],We.prototype,"volumes",void 0),(0,i._)([(0,c.qq)({type:Ee})],We.prototype,"index",void 0),(0,i._)([(0,c.qq)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:!1,write:!1}}}})],We.prototype,"minScale",void 0),(0,i._)([(0,c.qq)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:!1,write:!1}}}})],We.prototype,"maxScale",void 0),(0,i._)([(0,c.qq)({json:{read:!1},readOnly:!0})],We.prototype,"type",void 0),(0,i._)([(0,c.qq)({readOnly:!0,json:{name:"serviceVersion"}})],We.prototype,"version",void 0),(0,i._)([(0,d.E)("service","version")],We.prototype,"readVersion",null),(0,i._)([(0,c.qq)({type:g.c})],We.prototype,"fullExtent",void 0),(0,i._)([(0,d.E)("service","fullExtent",["fullExtent"])],We.prototype,"readFullExtent",null),(0,i._)([(0,c.qq)({readOnly:!0,clonable:!1,json:{read:!1}})],We.prototype,"voxelFields",null),(0,i._)([(0,c.qq)({type:Boolean,json:{name:"disablePopup",read:{reader:(e,t)=>!t.disablePopup},write:{enabled:!0,ignoreOrigin:!0,writer(e,t,r){t[r]=!e}},origins:{"portal-item":{default:!0},"web-scene":{default:!0}}}})],We.prototype,"popupEnabled",void 0),(0,i._)([(0,c.qq)({type:n.c,json:{read:!1}})],We.prototype,"popupTemplate",null),(0,i._)([(0,c.qq)({readOnly:!0})],We.prototype,"defaultPopupTemplate",null),We=(0,i._)([(0,h.c)("esri.layers.VoxelLayer")],We);const $e=We},28584:(e,t,r)=>{r.d(t,{G:()=>s});var i=r(41948),n=r(1580),o=(r(9456),r(66360),r(72052),r(12552));const s=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,n.qq)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,i._)([(0,o.c)("esri.layers.mixins.CustomParametersMixin")],t),t}},98768:(e,t,r)=>{r.d(t,{K:()=>w});var i=r(41948),n=r(6220),o=r(47620),s=r(2600),l=r(40196),a=r(20744),u=r(66360),c=r(70680),p=r(10860),d=r(28176),h=r(1580),y=(r(9456),r(72052),r(33600)),m=r(12552),g=r(18996),f=r(71068),v=r(54872),b=r(9764),q=r(53039),S=r(46940);const w=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,c.mG)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new b.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await Promise.all([r.e(8828),r.e(4132)]).then(r.bind(r,94132));return(0,p.wp)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,p.mA)(e)||u.c.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,p.CE)(e),!0))))}async setUserPrivileges(e,t){if(!n.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,p.CE)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=e===r.id;if(i&&r.portal.user)return(0,S.CI)(r);let n,s;if(i)n=r.portal.url;else try{n=await(0,f.mK)(this.url,t)}catch(e){(0,p.CE)(e)}if(!n||!(0,d.Cs)(n,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;s=await(o.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.CE)(e)}if(!s)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(i?await r.reload():(r=new b.default({id:e,portal:{url:n}}),await r.load(t)),r.portal.user)return(0,S.CI)(r)}catch(e){(0,p.CE)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.CE)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;const r=_.credential===t?_.user:await this._fetchEditingUser(e);return _.credential=t,_.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=o.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,n=v.c.getDefault();if(n&&n.loaded&&(0,d.k7)(n.restUrl)===(0,d.k7)(i))return n.user;const a=`${i}/community/self`,u=null!=e?e.signal:null,c=await(0,l.aG)((0,s.c)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?q.c.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||v.c.getDefault());return r&&i&&!(0,d.kF)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.c("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,h.qq)({type:b.default})],t.prototype,"portalItem",null),(0,i._)([(0,y.E)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,g.G)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,h.qq)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,h.qq)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,h.qq)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,h.qq)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,m.c)("esri.layers.mixins.PortalLayer")],t),t},_={credential:null,user:null}},3116:(e,t,r)=>{r.d(t,{I:()=>s});var i=r(41948),n=r(1580),o=(r(9456),r(66360),r(72052),r(12552));const s=e=>{let t=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i._)([(0,n.qq)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,i._)([(0,n.qq)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,i._)([(0,n.qq)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,i._)([(0,o.c)("esri.layers.mixins.ScaleRangeLayer")],t),t}},600:(e,t,r)=>{r.d(t,{c:()=>g});var i,n=r(41948),o=r(14628),s=r(40504),l=r(1580),a=r(53368),u=(r(72052),r(9456),r(9968)),c=r(33600),p=r(12552),d=r(89812),h=r(36408);const y=new o.O({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let m=i=class extends s.am{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?y.fromJSON(r.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,n._)([(0,l.qq)({type:String,json:{write:!0}})],m.prototype,"alias",void 0),(0,n._)([(0,l.qq)({type:[String,Number],json:{write:{allowNull:!0}}})],m.prototype,"defaultValue",void 0),(0,n._)([(0,l.qq)()],m.prototype,"description",void 0),(0,n._)([(0,c.E)("description")],m.prototype,"readDescription",null),(0,n._)([(0,l.qq)({types:d.i2,json:{read:{reader:d.h4},write:!0}})],m.prototype,"domain",void 0),(0,n._)([(0,l.qq)({type:Boolean,json:{write:!0}})],m.prototype,"editable",void 0),(0,n._)([(0,l.qq)({type:a.Ab,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],m.prototype,"length",void 0),(0,n._)([(0,l.qq)({type:String,json:{write:!0}})],m.prototype,"name",void 0),(0,n._)([(0,l.qq)({type:Boolean,json:{write:!0}})],m.prototype,"nullable",void 0),(0,n._)([(0,u.G)(h.M)],m.prototype,"type",void 0),(0,n._)([(0,l.qq)()],m.prototype,"valueType",void 0),(0,n._)([(0,c.E)("valueType",["description"])],m.prototype,"readValueType",null),(0,n._)([(0,l.qq)({type:Boolean,json:{read:!1}})],m.prototype,"visible",void 0),m=i=(0,n._)([(0,p.c)("esri.layers.support.Field")],m);const g=m},89812:(e,t,r)=>{r.d(t,{h4:()=>x,i2:()=>_}),r(9456);var i,n=r(41948),o=r(62088),s=r(1580),l=(r(66360),r(9968)),a=r(12552),u=r(40504);r(72052);let c=i=class extends u.am{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,n._)([(0,s.qq)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,n._)([(0,s.qq)({type:[String,Number],json:{write:!0}})],c.prototype,"code",void 0),c=i=(0,n._)([(0,a.c)("esri.layers.support.CodedValue")],c);const p=new(r(14628).O)({inherited:"inherited",codedValue:"coded-value",range:"range"});let d=class extends u.am{constructor(e){super(e),this.name=null,this.type=null}};(0,n._)([(0,s.qq)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,n._)([(0,l.G)(p)],d.prototype,"type",void 0),d=(0,n._)([(0,a.c)("esri.layers.support.Domain")],d);const h=d;var y;let m=y=class extends h{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new y({codedValues:(0,o.ct)(this.codedValues),name:this.name})}};(0,n._)([(0,s.qq)({type:[c],json:{write:!0}})],m.prototype,"codedValues",void 0),(0,n._)([(0,l.G)({codedValue:"coded-value"})],m.prototype,"type",void 0),m=y=(0,n._)([(0,a.c)("esri.layers.support.CodedValueDomain")],m);const g=m;var f;r(20744);let v=f=class extends h{constructor(e){super(e),this.type="inherited"}clone(){return new f}};(0,n._)([(0,l.G)({inherited:"inherited"})],v.prototype,"type",void 0),v=f=(0,n._)([(0,a.c)("esri.layers.support.InheritedDomain")],v);const b=v;var q;let S=q=class extends h{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new q({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,n._)([(0,s.qq)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]}}}})],S.prototype,"maxValue",void 0),(0,n._)([(0,s.qq)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]}}}})],S.prototype,"minValue",void 0),(0,n._)([(0,l.G)({range:"range"})],S.prototype,"type",void 0),S=q=(0,n._)([(0,a.c)("esri.layers.support.RangeDomain")],S);const w=S,_={key:"type",base:h,typeMap:{range:S,"coded-value":g,inherited:b}};function x(e){if(!e?.type)return null;switch(e.type){case"range":return w.fromJSON(e);case"codedValue":return g.fromJSON(e);case"inherited":return b.fromJSON(e)}return null}},36408:(e,t,r)=>{r.d(t,{M:()=>i});const i=new(r(14628).O)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},73960:(e,t,r)=>{r.d(t,{e:()=>n});var i=r(28176);function n(e){return o[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){const t=(0,i.wt)(e);return a[t]||s}(e.url)}(e)]||l}const o={},s="text/plain",l=o[s],a={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in a)o[a[e]]=e},65548:(e,t,r)=>{r.d(t,{Ap:()=>u});var i=r(82692),n=r(564),o=r(3739),s=(r(73312),r(67300),r(18480),r(72944)),l=(r(53568),r(15024),r(63116),r(13428)),a=r(76992);function u({displayField:e,editFieldsInfo:t,fields:r,objectIdField:a,title:u},h){if(!r)return null;const m=function(e,t){const r=t?.visibleFieldNames;return function(e,t){const r=e;return t&&(e=e.filter((e=>!t.includes(e.type)))),e===r&&(e=e.slice()),e.sort(p),e}(e.fields??[],t?.ignoreFieldTypes||y).map((t=>new l.c({fieldName:t.name,isEditable:(0,n.Yn)(t,e),label:t.alias,format:d(t),visible:c(t,{...e,visibleFieldNames:r})})))}({editFieldsInfo:t,fields:r,objectIdField:a},h);if(!m.length)return null;const g=function(e){const t=(0,n.G2)(e),{titleBase:r}=e;return t?`${r}: {${t.trim()}}`:r??""}({titleBase:u,fields:r,displayField:e}),f=[new s.c,new o.c];return new i.c({title:g,content:f,fieldInfos:m})}const c=(e,t)=>t.visibleFieldNames?t.visibleFieldNames.has(e.name):(0,n.iY)(e,t);function p(e,t){return"oid"===e.type?-1:"oid"===t.type?1:h(e)?-1:h(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function d(e){switch(e.type){case"small-integer":case"integer":case"single":return new a.c({digitSeparator:!0,places:0});case"double":return new a.c({digitSeparator:!0,places:2});case"string":return(0,n.Gm)(e.name)?new a.c({digitSeparator:!0,places:0}):null;default:return null}}function h(e){return"name"===(e.name&&e.name.toLowerCase())||"name"===(e.alias&&e.alias.toLowerCase())}const y=["geometry","blob","raster","guid","xml"]}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8256],{44728:(e,t,r)=>{r.d(t,{c:()=>d});var i,n,o=r(46988),s=r(53648),l=r(53368);function a(e){return(0,s.qk)((0,l.Wu)(e),0,255)}function u(e,t,r){return e=Number(e),isNaN(e)?r:e<t?t:e>r?r:e}function c(e,t){const r=e.toString(16).padStart(2,"0");return t?r.substring(0,1):r}class p{static blendColors(e,t,r,i=new p){return i.r=Math.round(e.r+(t.r-e.r)*r),i.g=Math.round(e.g+(t.g-e.g)*r),i.b=Math.round(e.b+(t.b-e.b)*r),i.a=e.a+(t.a-e.a)*r,i._sanitize()}static fromRgb(e,t){const r=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(r){const e=r[2].split(/\s*,\s*/),i=r[1];if("rgb"===i&&3===e.length||"rgba"===i&&4===e.length){const r=e[0];if("%"===r.charAt(r.length-1)){const r=e.map((e=>2.56*parseFloat(e)));return 4===e.length&&(r[3]=parseFloat(e[3])),p.fromArray(r,t)}return p.fromArray(e.map((e=>parseFloat(e))),t)}if("hsl"===i&&3===e.length||"hsla"===i&&4===e.length)return p.fromArray((0,o.ec)(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3])),t)}return null}static fromHex(e,t=new p){if("#"!==e[0]||isNaN(Number(`0x${e.substring(1)}`)))return null;switch(e.length){case 4:case 5:{const r=parseInt(e.substring(1,2),16),i=parseInt(e.substring(2,3),16),n=parseInt(e.substring(3,4),16),o=5===e.length?15:parseInt(e.substring(4),16);return p.fromArray([r+16*r,i+16*i,n+16*n,(o+16*o)/255],t)}case 7:case 9:{const r=parseInt(e.substring(1,3),16),i=parseInt(e.substring(3,5),16),n=parseInt(e.substring(5,7),16),o=7===e.length?255:parseInt(e.substring(7),16);return p.fromArray([r,i,n,o/255],t)}default:return null}}static fromArray(e,t=new p){return t._set(Number(e[0]),Number(e[1]),Number(e[2]),Number(e[3])),isNaN(t.a)&&(t.a=1),t._sanitize()}static fromString(e,t){const r=(0,o.kv)(e)?(0,o.SQ)(e):null;return r&&p.fromArray(r,t)||p.fromRgb(e,t)||p.fromHex(e,t)}static fromJSON(e){return null!=e?new p([e[0],e[1],e[2],(e[3]??255)/255]):void 0}static toUnitRGB(e){return null!=e?[e.r/255,e.g/255,e.b/255]:null}static toUnitRGBA(e){return null!=e?[e.r/255,e.g/255,e.b/255,null!=e.a?e.a:1]:null}constructor(e){this.r=255,this.g=255,this.b=255,this.a=1,e&&this.setColor(e)}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(e){return"string"==typeof e?p.fromString(e,this):Array.isArray(e)?p.fromArray(e,this):(this._set(e.r??0,e.g??0,e.b??0,e.a??1),e instanceof p||this._sanitize()),this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(e){const t=e?.capitalize??!1,r=e?.digits??6,i=3===r||4===r,n=4===r||8===r,o=`#${c(this.r,i)}${c(this.g,i)}${c(this.b,i)}${n?c(Math.round(255*this.a),i):""}`;return t?o.toUpperCase():o}toCss(e=!1){const t=this.r+", "+this.g+", "+this.b;return e?`rgba(${t}, ${this.a})`:`rgb(${t})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(e=p.AlphaMode.ALWAYS){const t=a(this.r),r=a(this.g),i=a(this.b);return e===p.AlphaMode.ALWAYS||1!==this.a?[t,r,i,a(255*this.a)]:[t,r,i]}clone(){return new p(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(e){return null!=e&&e.r===this.r&&e.g===this.g&&e.b===this.b&&e.a===this.a}_sanitize(){return this.r=Math.round(u(this.r,0,255)),this.g=Math.round(u(this.g,0,255)),this.b=Math.round(u(this.b,0,255)),this.a=u(this.a,0,1),this}_set(e,t,r,i){this.r=e,this.g=t,this.b=r,this.a=i}}p.prototype.declaredClass="esri.Color",(n=(i=p||(p={})).AlphaMode||(i.AlphaMode={}))[n.ALWAYS=0]="ALWAYS",n[n.UNLESS_OPAQUE=1]="UNLESS_OPAQUE";const d=p},25228:(e,t,r)=>{r.d(t,{c:()=>m});var i,n=r(41948),o=r(40504),s=r(94360),l=r(1580),a=(r(9456),r(66360),r(72052),r(33600)),u=r(12552),c=r(18996),p=r(28484);let d=i=class extends o.am{static get allTime(){return h}static get empty(){return y}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,i=e.start?.getTime()??e.start,n=e.end?.getTime()??e.end;return t===i&&r===n}expandTo(e,t=p.OX){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,s.aU)(r,e,t));let n=this.end;if(n){const r=(0,s.aU)(n,e,t);n=n.getTime()===r.getTime()?r:(0,s.g1)(r,1,e,t)}return new i({start:r,end:n})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,n=e.start?.getTime()??-1/0,o=e.end?.getTime()??1/0;let s,l;if(n>=t&&n<=r?s=n:t>=n&&t<=o&&(s=t),r>=n&&r<=o?l=r:o>=t&&o<=r&&(l=o),null!=s&&null!=l&&!isNaN(s)&&!isNaN(l)){const e=new i;return e.start=s===-1/0?null:new Date(s),e.end=l===1/0?null:new Date(l),e}return i.empty}offset(e,t,r=p.OX){if(this.isEmpty||this.isAllTime)return this.clone();const n=new i,{start:o,end:l}=this;return null!=o&&(n.start=(0,s.g1)(o,e,t,r)),null!=l&&(n.end=(0,s.g1)(l,e,t,r)),n}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return h.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:r})}};(0,n._)([(0,l.qq)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,n._)([(0,a.E)("end")],d.prototype,"readEnd",null),(0,n._)([(0,c.G)("end")],d.prototype,"writeEnd",null),(0,n._)([(0,l.qq)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,n._)([(0,l.qq)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,n._)([(0,l.qq)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,n._)([(0,a.E)("start")],d.prototype,"readStart",null),(0,n._)([(0,c.G)("start")],d.prototype,"writeStart",null),d=i=(0,n._)([(0,u.c)("esri.TimeExtent")],d);const h=new d,y=new d({start:void 0,end:void 0}),m=d},3856:(e,t,r)=>{r.d(t,{m:()=>p,q:()=>c});var i=r(41948),n=r(43780),o=(r(9456),r(62088)),s=(r(66360),r(70680)),l=r(71448),a=r(20916),u=r(12552);const c=e=>{let t=class extends e{clone(){const e=(0,a.m6)(this);(0,s.EN)(e,"unable to clone instance of non-accessor class");const t=e.metadata,r=e.store,i={},n=new Map;for(const e in t){const s=t[e],a=r?.originOf(e),u=s.clonable;if(s.readOnly||!1===u||a!==l.sT.USER&&a!==l.sT.DEFAULTS&&a!==l.sT.WEB_MAP&&a!==l.sT.WEB_SCENE)continue;const c=this[e];let p=null;p="function"==typeof u?u(c):"reference"===u?c:(0,o.gx)(c),null!=c&&null==p||(a===l.sT.DEFAULTS?n.set(e,p):i[e]=p)}const u=new(0,Object.getPrototypeOf(this).constructor)(i);if(n.size){const e=(0,a.m6)(u)?.store;if(e)for(const[t,r]of n)e.set(t,r,l.sT.DEFAULTS)}return u}};return t=(0,i._)([(0,u.c)("esri.core.Clonable")],t),t};let p=class extends(c(n.c)){};p=(0,i._)([(0,u.c)("esri.core.Clonable")],p)},27368:(e,t,r)=>{r.d(t,{sD:()=>s});var i=r(53648);class n{constructor(e,t){this.min=e,this.max=t,this.range=t-e}ndiff(e,t=0){return Math.ceil((e-t)/this.range)*this.range+t}_normalize(e,t,r,i=0,n=!1){return(r-=i)<e?r+=this.ndiff(e-r):r>t&&(r-=this.ndiff(r-t)),n&&r===t&&(r=e),r+i}normalize(e,t=0,r=!1){return this._normalize(this.min,this.max,e,t,r)}clamp(e,t=0){return(0,i.qk)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+this.ndiff(e-t,r)}minimalMonotonic(e,t,r){return this._normalize(e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);const r=(t=this.normalize(t))-e,i=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(i)?r:i}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function o(e){for(const t in e){const r=e[t];r instanceof Function&&(e[t]=r.bind(e))}return e}o(new n(0,2*Math.PI)),o(new n(-Math.PI,Math.PI));const s=o(new n(0,360))},22156:(e,t,r)=>{r.d(t,{MR:()=>s,qm:()=>l});var i=r(41948),n=r(12552);let o=0;const s=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+o++})}};return t=(0,i._)([(0,n.c)("esri.core.Identifiable")],t),t},l=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:o++})}};return t=(0,i._)([(0,n.c)("esri.core.NumericIdentifiable")],t),t};let a=class extends(s(class{})){};a=(0,i._)([(0,n.c)("esri.core.Identifiable")],a)},77380:(e,t,r)=>{r.d(t,{I:()=>m,Y:()=>i});const i={Base64:0,Hex:1,String:2,Raw:3},n=8,o=(1<<n)-1;function s(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function l(e){const t=[];for(let r=0,i=e.length*n;r<i;r+=n)t[r>>5]|=(e.charCodeAt(r/n)&o)<<r%32;return t}function a(e){const t=[];for(let r=0,i=32*e.length;r<i;r+=n)t.push(String.fromCharCode(e[r>>5]>>>r%32&o));return t.join("")}function u(e,t,r,i,n,o){return s(function(e,t){return e<<t|e>>>32-t}(s(s(t,e),s(i,o)),n),r)}function c(e,t,r,i,n,o,s){return u(t&r|~t&i,e,t,n,o,s)}function p(e,t,r,i,n,o,s){return u(t&i|r&~i,e,t,n,o,s)}function d(e,t,r,i,n,o,s){return u(t^r^i,e,t,n,o,s)}function h(e,t,r,i,n,o,s){return u(r^(t|~i),e,t,n,o,s)}function y(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let r=1732584193,i=-271733879,n=-1732584194,o=271733878;for(let t=0;t<e.length;t+=16){const l=r,a=i,u=n,y=o;r=c(r,i,n,o,e[t],7,-680876936),o=c(o,r,i,n,e[t+1],12,-389564586),n=c(n,o,r,i,e[t+2],17,606105819),i=c(i,n,o,r,e[t+3],22,-1044525330),r=c(r,i,n,o,e[t+4],7,-176418897),o=c(o,r,i,n,e[t+5],12,1200080426),n=c(n,o,r,i,e[t+6],17,-1473231341),i=c(i,n,o,r,e[t+7],22,-45705983),r=c(r,i,n,o,e[t+8],7,1770035416),o=c(o,r,i,n,e[t+9],12,-1958414417),n=c(n,o,r,i,e[t+10],17,-42063),i=c(i,n,o,r,e[t+11],22,-1990404162),r=c(r,i,n,o,e[t+12],7,1804603682),o=c(o,r,i,n,e[t+13],12,-40341101),n=c(n,o,r,i,e[t+14],17,-1502002290),i=c(i,n,o,r,e[t+15],22,1236535329),r=p(r,i,n,o,e[t+1],5,-165796510),o=p(o,r,i,n,e[t+6],9,-1069501632),n=p(n,o,r,i,e[t+11],14,643717713),i=p(i,n,o,r,e[t],20,-373897302),r=p(r,i,n,o,e[t+5],5,-701558691),o=p(o,r,i,n,e[t+10],9,38016083),n=p(n,o,r,i,e[t+15],14,-660478335),i=p(i,n,o,r,e[t+4],20,-405537848),r=p(r,i,n,o,e[t+9],5,568446438),o=p(o,r,i,n,e[t+14],9,-1019803690),n=p(n,o,r,i,e[t+3],14,-187363961),i=p(i,n,o,r,e[t+8],20,1163531501),r=p(r,i,n,o,e[t+13],5,-1444681467),o=p(o,r,i,n,e[t+2],9,-51403784),n=p(n,o,r,i,e[t+7],14,1735328473),i=p(i,n,o,r,e[t+12],20,-1926607734),r=d(r,i,n,o,e[t+5],4,-378558),o=d(o,r,i,n,e[t+8],11,-2022574463),n=d(n,o,r,i,e[t+11],16,1839030562),i=d(i,n,o,r,e[t+14],23,-35309556),r=d(r,i,n,o,e[t+1],4,-1530992060),o=d(o,r,i,n,e[t+4],11,1272893353),n=d(n,o,r,i,e[t+7],16,-155497632),i=d(i,n,o,r,e[t+10],23,-1094730640),r=d(r,i,n,o,e[t+13],4,681279174),o=d(o,r,i,n,e[t],11,-358537222),n=d(n,o,r,i,e[t+3],16,-722521979),i=d(i,n,o,r,e[t+6],23,76029189),r=d(r,i,n,o,e[t+9],4,-640364487),o=d(o,r,i,n,e[t+12],11,-421815835),n=d(n,o,r,i,e[t+15],16,530742520),i=d(i,n,o,r,e[t+2],23,-995338651),r=h(r,i,n,o,e[t],6,-198630844),o=h(o,r,i,n,e[t+7],10,1126891415),n=h(n,o,r,i,e[t+14],15,-1416354905),i=h(i,n,o,r,e[t+5],21,-57434055),r=h(r,i,n,o,e[t+12],6,1700485571),o=h(o,r,i,n,e[t+3],10,-1894986606),n=h(n,o,r,i,e[t+10],15,-1051523),i=h(i,n,o,r,e[t+1],21,-2054922799),r=h(r,i,n,o,e[t+8],6,1873313359),o=h(o,r,i,n,e[t+15],10,-30611744),n=h(n,o,r,i,e[t+6],15,-1560198380),i=h(i,n,o,r,e[t+13],21,1309151649),r=h(r,i,n,o,e[t+4],6,-145523070),o=h(o,r,i,n,e[t+11],10,-1120210379),n=h(n,o,r,i,e[t+2],15,718787259),i=h(i,n,o,r,e[t+9],21,-343485551),r=s(r,l),i=s(i,a),n=s(n,u),o=s(o,y)}return[r,i,n,o]}function m(e,t=i.Hex){const r=t||i.Base64,o=y(l(e),e.length*n);switch(r){case i.Raw:return o;case i.Hex:return function(e){const t="0123456789abcdef",r=[];for(let i=0,n=4*e.length;i<n;i++)r.push(t.charAt(e[i>>2]>>i%4*8+4&15)+t.charAt(e[i>>2]>>i%4*8&15));return r.join("")}(o);case i.String:return a(o);case i.Base64:return function(e){const t=[];for(let r=0,i=4*e.length;r<i;r+=3){const i=(e[r>>2]>>r%4*8&255)<<16|(e[r+1>>2]>>(r+1)%4*8&255)<<8|e[r+2>>2]>>(r+2)%4*8&255;for(let n=0;n<4;n++)8*r+6*n>32*e.length?t.push("="):t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(i>>6*(3-n)&63))}return t.join("")}(o)}}},90636:(e,t,r)=>{r.d(t,{O:()=>h});var i=r(20744),n=r(77380),o=r(4644),s=r(28176),l=r(63564),a=r(44296),u=r(71448),c=r(1580),p=r(73960),d=r(91952);function h(e){const t=e?.origins??[void 0];return(r,i)=>{const n=function(e,t,r){if("resource"===e?.type)return function(e,t,r){const i=(0,a.EF)(t,r);return{type:String,read:(e,t,r)=>{const n=(0,d.r)(e,t,r);return i.type===String?n:"function"==typeof i.type?new i.type({url:n}):void 0},write:{writer(t,n,l,a){if(!a?.resources)return"string"==typeof t?void(n[l]=(0,d.t)(t,a)):void(n[l]=t.write({},a));const c=function(e){return null==e?null:"string"==typeof e?e:e.url}(t),h=(0,d.t)(c,{...a,verifyItemRelativeUrls:a?.verifyItemRelativeUrls?{writtenUrls:a.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},d.M.NO),f=i.type!==String&&(!(0,o.w)(this)||a?.origin&&this.originIdOf(r)>(0,u.CQ)(a.origin)),v={object:this,propertyName:r,value:t,targetUrl:h,dest:n,targetPropertyName:l,context:a,params:e};a?.portalItem&&h&&!(0,s.ic)(h)?f&&e?.contentAddressed?y(v):f?function(e){const{context:t,targetUrl:r,params:i,value:n,dest:o,targetPropertyName:l}=e;if(!t.portalItem)return;const a=t.portalItem.resourceFromPath(r),u=g(n,r,t),c=(0,p.e)(u),d=(0,s.wt)(a.path),h=i?.compress??!1;c===d?(t.resources&&m({...e,resource:a,content:u,compress:h,updates:t.resources.toUpdate}),o[l]=r):y(e)}(v):function({context:e,targetUrl:t,dest:r,targetPropertyName:i}){e.portalItem&&e.resources&&(e.resources.toKeep.push({resource:e.portalItem.resourceFromPath(t),compress:!1}),r[i]=t)}(v):a?.portalItem&&(null==h||null!=(0,d.i)(h)||(0,s.ue)(h)||f)?y(v):n[l]=h}}}}(e,t,r);switch(e?.type??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:e,write:t}=d.b;return{read:e,write:t}}}}(e,r,i);for(const e of t){const t=(0,c.aq)(r,e,i);for(const e in n)t[e]=n[e]}}}function y(e){const{targetUrl:t,params:r,value:o,context:a,dest:u,targetPropertyName:c}=e;if(!a.portalItem)return;const h=(0,d.p)(t),y=g(o,t,a);if(r?.contentAddressed&&"json"!==y.type)return void a.messages?.push(new i.c("persistable:contentAddressingUnsupported",`Property "${c}" is trying to serializing a resource with content of type ${y.type} with content addressing. Content addressing is only supported for json resources.`,{content:y}));const f=r?.contentAddressed&&"json"===y.type?(0,n.I)(y.jsonString):h?.filename??(0,l.g1)(),v=(0,s.kn)(r?.prefix??h?.prefix,f),b=`${v}.${(0,p.e)(y)}`;if(r?.contentAddressed&&a.resources&&"json"===y.type){const e=a.resources.toKeep.find((({resource:e})=>e.path===b))??a.resources.toAdd.find((({resource:e})=>e.path===b));if(e)return void(u[c]=e.resource.itemRelativeUrl)}const q=a.portalItem.resourceFromPath(b);(0,s.ue)(t)&&a.resources&&a.resources.pendingOperations.push((0,s.SW)(t).then((e=>{q.path=`${v}.${(0,p.e)({type:"blob",blob:e})}`,u[c]=q.itemRelativeUrl})).catch((()=>{})));const S=r?.compress??!1;a.resources&&m({...e,resource:q,content:y,compress:S,updates:a.resources.toAdd}),u[c]=q.itemRelativeUrl}function m({object:e,propertyName:t,updates:r,resource:i,content:n,compress:o}){r.push({resource:i,content:n,compress:o,finish:r=>{!function(e,t,r){"string"==typeof e[t]?e[t]=r.url:e[t].url=r.url}(e,t,r)}})}function g(e,t,r){return"string"==typeof e?{type:"url",url:t}:{type:"json",jsonString:JSON.stringify(e.toJSON(r))}}},68612:(e,t,r)=>{function i(){return[1,0,0,0,1,0,0,0,1]}function n(e,t,r,i,n,o,s,l,a){return[e,t,r,i,n,o,s,l,a]}r.d(t,{IJ:()=>o,Su:()=>i,WK:()=>n});const o=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:function(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},create:i,createView:function(e,t){return new Float64Array(e,t,9)},fromValues:n},Symbol.toStringTag,{value:"Module"}))},2620:(e,t,r)=>{function i(){return[0,0,0,1]}function n(e){return[e[0],e[1],e[2],e[3]]}r.d(t,{IJ:()=>o,Su:()=>i,ct:()=>n});const o=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:n,create:i,createView:function(e,t){return new Float64Array(e,t,4)},fromValues:function(e,t,r,i){return[e,t,r,i]}},Symbol.toStringTag,{value:"Module"}))},41512:(e,t,r)=>{r.d(t,{C0:()=>c,WO:()=>f,Wu:()=>m,fO:()=>h,iW:()=>p,sF:()=>T,yG:()=>u});var i=r(68612),n=r(2620),o=r(62484),s=r(47364),l=r(98472),a=r(74784);function u(e,t,r){r*=.5;const i=Math.sin(r);return e[0]=i*t[0],e[1]=i*t[1],e[2]=i*t[2],e[3]=Math.cos(r),e}function c(e,t){const r=2*Math.acos(t[3]),i=Math.sin(r/2);return i>(0,s.Au)()?(e[0]=t[0]/i,e[1]=t[1]/i,e[2]=t[2]/i):(e[0]=1,e[1]=0,e[2]=0),r}function p(e,t,r){const i=t[0],n=t[1],o=t[2],s=t[3],l=r[0],a=r[1],u=r[2],c=r[3];return e[0]=i*c+s*l+n*u-o*a,e[1]=n*c+s*a+o*l-i*u,e[2]=o*c+s*u+i*a-n*l,e[3]=s*c-i*l-n*a-o*u,e}function d(e,t,r,i){const n=t[0],o=t[1],l=t[2],a=t[3];let u,c,p,d,h,y=r[0],m=r[1],g=r[2],f=r[3];return c=n*y+o*m+l*g+a*f,c<0&&(c=-c,y=-y,m=-m,g=-g,f=-f),1-c>(0,s.Au)()?(u=Math.acos(c),p=Math.sin(u),d=Math.sin((1-i)*u)/p,h=Math.sin(i*u)/p):(d=1-i,h=i),e[0]=d*n+h*y,e[1]=d*o+h*m,e[2]=d*l+h*g,e[3]=d*a+h*f,e}function h(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function y(e,t){const r=t[0]+t[4]+t[8];let i;if(r>0)i=Math.sqrt(r+1),e[3]=.5*i,i=.5/i,e[0]=(t[5]-t[7])*i,e[1]=(t[6]-t[2])*i,e[2]=(t[1]-t[3])*i;else{let r=0;t[4]>t[0]&&(r=1),t[8]>t[3*r+r]&&(r=2);const n=(r+1)%3,o=(r+2)%3;i=Math.sqrt(t[3*r+r]-t[3*n+n]-t[3*o+o]+1),e[r]=.5*i,i=.5/i,e[3]=(t[3*n+o]-t[3*o+n])*i,e[n]=(t[3*n+r]+t[3*r+n])*i,e[o]=(t[3*o+r]+t[3*r+o])*i}return e}function m(e,t,r,i){const n=.5*Math.PI/180;t*=n,r*=n,i*=n;const o=Math.sin(t),s=Math.cos(t),l=Math.sin(r),a=Math.cos(r),u=Math.sin(i),c=Math.cos(i);return e[0]=o*a*c-s*l*u,e[1]=s*l*c+o*a*u,e[2]=s*a*u-o*l*c,e[3]=s*a*c+o*l*u,e}const g=a.c,f=a.s,v=a.g,b=p,q=a.d,S=a.h,w=a.l,_=a.i,x=_,j=a.j,V=j,I=a.n,T=a.a,A=a.e,N=(0,o.Su)(),M=(0,o.WK)(1,0,0),R=(0,o.WK)(0,1,0),z=(0,n.Su)(),F=(0,n.Su)(),D=(0,i.Su)();Object.freeze(Object.defineProperty({__proto__:null,add:v,calculateW:function(e,t){const r=t[0],i=t[1],n=t[2];return e[0]=r,e[1]=i,e[2]=n,e[3]=Math.sqrt(Math.abs(1-r*r-i*i-n*n)),e},conjugate:h,copy:g,dot:S,equals:A,exactEquals:T,fromEuler:m,fromMat3:y,getAxisAngle:c,identity:function(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e},invert:function(e,t){const r=t[0],i=t[1],n=t[2],o=t[3],s=r*r+i*i+n*n+o*o,l=s?1/s:0;return e[0]=-r*l,e[1]=-i*l,e[2]=-n*l,e[3]=o*l,e},len:x,length:_,lerp:w,mul:b,multiply:p,normalize:I,random:function(e){const t=s.QR,r=t(),i=t(),n=t(),o=Math.sqrt(1-r),l=Math.sqrt(r);return e[0]=o*Math.sin(2*Math.PI*i),e[1]=o*Math.cos(2*Math.PI*i),e[2]=l*Math.sin(2*Math.PI*n),e[3]=l*Math.cos(2*Math.PI*n),e},rotateX:function(e,t,r){r*=.5;const i=t[0],n=t[1],o=t[2],s=t[3],l=Math.sin(r),a=Math.cos(r);return e[0]=i*a+s*l,e[1]=n*a+o*l,e[2]=o*a-n*l,e[3]=s*a-i*l,e},rotateY:function(e,t,r){r*=.5;const i=t[0],n=t[1],o=t[2],s=t[3],l=Math.sin(r),a=Math.cos(r);return e[0]=i*a-o*l,e[1]=n*a+s*l,e[2]=o*a+i*l,e[3]=s*a-n*l,e},rotateZ:function(e,t,r){r*=.5;const i=t[0],n=t[1],o=t[2],s=t[3],l=Math.sin(r),a=Math.cos(r);return e[0]=i*a+n*l,e[1]=n*a-i*l,e[2]=o*a+s*l,e[3]=s*a-o*l,e},rotationTo:function(e,t,r){const i=(0,l.k)(t,r);return i<-.999999?((0,l.b)(N,M,t),(0,l.D)(N)<1e-6&&(0,l.b)(N,R,t),(0,l.n)(N,N),u(e,N,Math.PI),e):i>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):((0,l.b)(N,t,r),e[0]=N[0],e[1]=N[1],e[2]=N[2],e[3]=1+i,I(e,e))},scale:q,set:f,setAxes:function(e,t,r,i){const n=D;return n[0]=r[0],n[3]=r[1],n[6]=r[2],n[1]=i[0],n[4]=i[1],n[7]=i[2],n[2]=-t[0],n[5]=-t[1],n[8]=-t[2],I(e,y(e,n))},setAxisAngle:u,slerp:d,sqlerp:function(e,t,r,i,n,o){return d(z,t,n,o),d(F,r,i,o),d(e,z,F,2*o*(1-o)),e},sqrLen:V,squaredLength:j,str:function(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}},Symbol.toStringTag,{value:"Module"}))},63564:(e,t,r)=>{r.d(t,{Mr:()=>s,cf:()=>o,g1:()=>n});const i="randomUUID"in crypto;function n(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function o(){return`{${n().toUpperCase()}}`}function s(){return`{${n()}}`}},13819:(e,t,r)=>{r.d(t,{c:()=>b});var i,n=r(41948),o=r(92400),s=r(14628),l=r(40504),a=r(24296),u=r(69504),c=r(1580),p=(r(9456),r(66360),r(33600)),d=r(12552),h=r(18996);const y=(0,s.w)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),m=y.jsonValues.slice();(0,o.sH)(m,"orthometric");const g=(0,s.w)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let f=i=class extends l.am{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return y.write(e,t,r)}readHeightModel(e,t,r){return y.read(e)||(r?.messages&&r.messages.push(function(e,t){return new u.c("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return g.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,a.oG)(e)||g.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,a._2)(t);return new i({heightModel:e.heightModel,heightUnit:r??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new i;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new u.c("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,n._)([(0,c.qq)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m,default:"ellipsoidal"}}}})],f.prototype,"heightModel",void 0),(0,n._)([(0,h.G)("web-scene","heightModel")],f.prototype,"writeHeightModel",null),(0,n._)([(0,p.E)(["web-scene","service"],"heightModel")],f.prototype,"readHeightModel",null),(0,n._)([(0,c.qq)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g.jsonValues,write:g.write}}}})],f.prototype,"heightUnit",void 0),(0,n._)([(0,p.E)("web-scene","heightUnit")],f.prototype,"readHeightUnit",null),(0,n._)([(0,p.E)("service","heightUnit")],f.prototype,"readHeightUnitService",null),(0,n._)([(0,c.qq)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],f.prototype,"vertCRS",void 0),(0,n._)([(0,p.E)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],f.prototype,"readVertCRS",null),f=i=(0,n._)([(0,d.c)("esri.geometry.HeightModelInfo")],f);const b=f},81436:(e,t,r)=>{r.d(t,{c:()=>b});var i=r(41948),n=(r(60708),r(2600)),o=r(20744),s=r(77860),l=r(22156),a=r(95800),u=r(66360),c=r(10860),p=r(28176),d=r(1580),h=(r(9456),r(72052),r(12552)),y=r(6220),m=r(95247),g=r(56156);let f=0,v=class extends(s.c.EventedMixin((0,l.MR)(a.c))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new m.c(-180,-90,180,90,g.c.WGS84),this.id=Date.now().toString(16)+"-layer-"+f++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=g.c.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(9232).then(r.bind(r,69232))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await r.e(2259).then(r.bind(r,12259));try{return await i(t)}catch(e){const r=t&&t.portalItem,i=r?.id||"unset",n=r&&r.portal&&r.portal.url||y.default.portalUrl;throw u.c.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+n+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,c.mA)(e)||u.c.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,p.as)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,n.c)(e,{query:{f:"json"},responseType:"json"})).data;throw new o.c("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,d.qq)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,i._)([(0,d.qq)({type:m.c})],v.prototype,"fullExtent",void 0),(0,i._)([(0,d.qq)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,i._)([(0,d.qq)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,i._)([(0,d.qq)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,i._)([(0,d.qq)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,i._)([(0,d.qq)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,i._)([(0,d.qq)({clonable:!1})],v.prototype,"parent",void 0),(0,i._)([(0,d.qq)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,i._)([(0,d.qq)({type:Boolean,readOnly:!0})],v.prototype,"persistenceEnabled",void 0),(0,i._)([(0,d.qq)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,i._)([(0,d.qq)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,i._)([(0,d.qq)({type:g.c})],v.prototype,"spatialReference",void 0),(0,i._)([(0,d.qq)({type:String})],v.prototype,"title",void 0),(0,i._)([(0,d.qq)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,i._)([(0,d.qq)()],v.prototype,"url",void 0),(0,i._)([(0,d.qq)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,i._)([(0,h.c)("esri.layers.Layer")],v);const b=v},59496:(e,t,r)=>{r.r(t),r.d(t,{default:()=>$e});var i=r(41948),n=r(82692),o=r(2952),s=r(20744),l=r(66360),a=r(26496),u=r(10860),c=r(1580),p=r(53368),d=(r(72052),r(9456),r(33600)),h=r(12552),y=r(98472),m=r(62484),g=r(95247),f=r(81436),v=r(38724),b=r(16660),q=r(28584),S=r(66576),w=r(98768),_=r(3116),x=r(87072),j=r(48212),V=r(21488),I=r(600),T=r(3856),A=r(27368),N=r(40504),M=r(90636),R=r(41512),z=r(2620),F=r(47364);const D=(0,m.Su)(),P=(0,z.Su)(),E=(0,z.Su)(),O=(0,z.Su)(),U=(0,m.WK)(0,0,1),L=(0,m.WK)(0,1,0),C=(0,m.WK)(1,0,0);function k(e){(0,y.c)(D,e),(0,y.n)(D,D);const t=Math.atan2(D[1],D[0]),r=(0,R.yG)((0,z.Su)(),U,-t);(0,y.u)(D,D,r);const i=-1*Math.atan2(D[2],D[0]);return[(0,F.Yf)(t)+270,(0,F.Yf)(i)+90]}function B(e,t){return(0,R.yG)(E,U,(0,F.Af)(e-270)),(0,R.yG)(O,L,(0,F.Af)(t-90)),(0,R.iW)(P,E,O),(0,y.c)(D,C),(0,y.u)(D,D,P),(0,y.n)(D,D),[D[0],D[1],D[2]]}var W=r(33392);let $=class extends((0,T.q)(N.am)){constructor(e){super(e),this.enabled=!0,this.label="",this.normal=null,this.point=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=k(this.normal);return A.sD.normalize((0,p.Oe)(e),0,!0)}set orientation(e){const t=B(e,this.tilt);this._set("normal",t),this._set("orientation",e)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=k(this.normal);return A.sD.normalize((0,p.Oe)(t),0,!0)}set tilt(e){const t=B(this.orientation,e);this._set("normal",t),this._set("tilt",e)}};(0,i._)([(0,c.qq)({type:Boolean,json:{write:!0}})],$.prototype,"enabled",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],$.prototype,"label",void 0),(0,i._)([(0,c.qq)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,W.W)((e=>A.sD.normalize((0,p.Oe)(e),0,!0)))],$.prototype,"orientation",null),(0,i._)([(0,c.qq)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,W.W)((e=>A.sD.normalize((0,p.Oe)(e),0,!0)))],$.prototype,"tilt",null),(0,i._)([(0,c.qq)({type:[Number],json:{write:!0}})],$.prototype,"normal",void 0),(0,i._)([(0,c.qq)({type:[Number],json:{write:!0}})],$.prototype,"point",void 0),$=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelSlice")],$);const H=$;var G=r(91952);let J=class extends((0,T.q)(N.am)){constructor(){super(...arguments),this.enabled=!0,this.href=null,this.id=null,this.label="",this.normal=null,this.point=null,this.sizeInPixel=null,this.slices=null,this.timeId=0,this.variableId=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=k(this.normal);return A.sD.normalize((0,p.Oe)(e),0,!0)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=k(this.normal);return A.sD.normalize((0,p.Oe)(t),0,!0)}};(0,i._)([(0,c.qq)({type:Boolean,json:{default:!0,write:!0}})],J.prototype,"enabled",void 0),(0,i._)([(0,c.qq)({type:String,json:{origins:{service:{read:G.r}},write:{enabled:!0,isRequired:!0}}}),(0,M.O)({origins:["web-scene"],type:"resource",prefix:"sections",compress:!0})],J.prototype,"href",void 0),(0,i._)([(0,c.qq)({type:p.Ab,json:{write:{enabled:!0,isRequired:!0}}})],J.prototype,"id",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],J.prototype,"label",void 0),(0,i._)([(0,c.qq)({type:Number,clonable:!1,readOnly:!0,range:{min:0,max:360}})],J.prototype,"orientation",null),(0,i._)([(0,c.qq)({type:Number,clonable:!1,readOnly:!0,range:{min:0,max:360}})],J.prototype,"tilt",null),(0,i._)([(0,c.qq)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],J.prototype,"normal",void 0),(0,i._)([(0,c.qq)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],J.prototype,"point",void 0),(0,i._)([(0,c.qq)({type:[p.Ab],json:{write:{enabled:!0,isRequired:!0}}})],J.prototype,"sizeInPixel",void 0),(0,i._)([(0,c.qq)({type:[H],json:{write:!0}})],J.prototype,"slices",void 0),(0,i._)([(0,c.qq)({type:p.Ab,json:{default:0,write:!0}})],J.prototype,"timeId",void 0),(0,i._)([(0,c.qq)({type:p.Ab,json:{write:{enabled:!0,isRequired:!0}}})],J.prototype,"variableId",void 0),J=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelSection")],J);const K=J;let Y=class extends N.am{constructor(){super(...arguments),this.diffuseFactor=.5,this.specularFactor=.5}};(0,i._)([(0,c.qq)({type:Number,range:{min:0,max:1},json:{default:.5,write:!0}})],Y.prototype,"diffuseFactor",void 0),(0,i._)([(0,c.qq)({type:Number,range:{min:0,max:1},json:{default:.5,write:!0}})],Y.prototype,"specularFactor",void 0),Y=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelSimpleShading")],Y);const Q=Y;let X=class extends N.am{constructor(){super(...arguments),this.continuity=null,this.hasNoData=!1,this.noData=0,this.offset=0,this.scale=1,this.type=null}};(0,i._)([(0,c.qq)({type:["discrete","continuous"],json:{write:!0}})],X.prototype,"continuity",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{write:!0}})],X.prototype,"hasNoData",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:!0}})],X.prototype,"noData",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:!0}})],X.prototype,"offset",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:!0}})],X.prototype,"scale",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],X.prototype,"type",void 0),X=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelFormat")],X);const Z=X;let ee=class extends N.am{constructor(){super(...arguments),this.id=null,this.description="",this.name=null,this.originalFormat=null,this.renderingFormat=null,this.unit="",this.volumeId=0,this.type=null}};(0,i._)([(0,c.qq)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],ee.prototype,"id",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],ee.prototype,"description",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],ee.prototype,"name",void 0),(0,i._)([(0,c.qq)({type:Z,json:{write:!0}})],ee.prototype,"originalFormat",void 0),(0,i._)([(0,c.qq)({type:Z,json:{write:{enabled:!0,isRequired:!0}}})],ee.prototype,"renderingFormat",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],ee.prototype,"unit",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:!0}})],ee.prototype,"volumeId",void 0),(0,i._)([(0,c.qq)({type:["stc-hot-spot-results","stc-cluster-outlier-results","stc-estimated-bin","generic-nearest-interpolated"],json:{write:!0}})],ee.prototype,"type",void 0),ee=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelVariable")],ee);const te=ee;var re=r(62088),ie=r(44728);let ne=class extends((0,T.q)(N.am)){constructor(){super(...arguments),this.color=ie.c.fromArray([0,0,0,0]),this.value=0,this.enabled=!0,this.label="",this.colorLocked=!1}};(0,i._)([(0,c.qq)({type:ie.c,json:{type:[p.Ab],write:{enabled:!0,isRequired:!0}}})],ne.prototype,"color",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],ne.prototype,"value",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{default:!0,write:!0}})],ne.prototype,"enabled",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],ne.prototype,"label",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{default:!1,write:!0}})],ne.prototype,"colorLocked",void 0),ne=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelIsosurface")],ne);const oe=ne;var se=r(30604),le=r(53648);let ae=class extends((0,T.q)(N.am)){constructor(){super(...arguments),this.color=null,this.position=0}};(0,i._)([(0,c.qq)({type:ie.c,json:{type:[p.Ab],write:{enabled:!0,isRequired:!0}}})],ae.prototype,"color",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],ae.prototype,"position",void 0),ae=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelColorStop")],ae);const ue=ae;let ce=class extends((0,T.q)(N.am)){constructor(){super(...arguments),this.opacity=1,this.position=0}};(0,i._)([(0,c.qq)({type:Number,json:{name:"alpha",write:{enabled:!0,isRequired:!0}}})],ce.prototype,"opacity",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],ce.prototype,"position",void 0),ce=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelOpacityStop")],ce);const pe=ce;let de=class extends((0,T.q)(N.am)){constructor(){super(...arguments),this.enabled=!1,this.range=null}};(0,i._)([(0,c.qq)({type:Boolean,json:{default:!1,write:!0}})],de.prototype,"enabled",void 0),(0,i._)([(0,c.qq)({type:[Number],json:{write:!0}})],de.prototype,"range",void 0),de=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelRangeFilter")],de);const he=de;var ye,me;(me=ye||(ye={}))[me.Color=1]="Color",me[me.Alpha=2]="Alpha",me[me.Both=3]="Both";let ge=class extends((0,T.q)(N.am)){constructor(e){super(e),this.interpolation=null,this.stretchRange=null,this.rangeFilter=null,this._colorMapSize=256,this.colorStops=new(o.c.ofType(ue)),this.opacityStops=new(o.c.ofType(pe))}set colorStops(e){this._set("colorStops",(0,se.q)(e,this._get("colorStops"),o.c.ofType(ue)))}set opacityStops(e){this._set("opacityStops",(0,se.q)(e,this._get("opacityStops"),o.c.ofType(pe)))}getPreviousNext(e,t,r){let i=e;for(;--i>0&&t[i].type!==r&&t[i].type!==ye.Both;);let n=e;const o=t.length;for(;++n<o&&t[n].type!==r&&t[n].type!==ye.Both;);return[i,n]}get rasterizedTransferFunction(){const e=[];if(this.colorStops.length<2)return e;const t=[],r=[];for(const t of this.colorStops){if(!t.color)return e;r.push({color:{r:t.color.r,g:t.color.g,b:t.color.b,a:Math.round(255*(1-t.color.a))},position:t.position,type:ye.Color})}if(0===this.opacityStops.length)for(const e of r)t.push({color:e.color,position:e.position});else{for(const e of this.opacityStops){const t=(0,le.qk)(e.position,0,1),i=Math.round(255*(0,le.qk)(1-e.opacity,0,1));let n=!1;for(const e of r)if(e.type===ye.Color&&Math.abs(e.position-t)<1e-5){e.color.a=i,e.type=ye.Both,n=!0;break}n||r.push({color:{r:0,g:0,b:0,a:i},position:e.position,type:ye.Alpha})}r.sort(((e,t)=>e.position<t.position?-1:1));const e=r.length;for(let t=0;t<e;++t){const i=r[t];if(i.type!==ye.Both)if(i.type===ye.Color){const[n,o]=this.getPreviousNext(t,r,ye.Alpha);if(-1!==n&&o!==e){const e=(i.position-r[n].position)/(r[o].position-r[n].position);i.color.a=Math.round((0,le.Cq)(r[n].color.a,r[o].color.a,e))}else i.color.a=-1!==n?r[n].color.a:r[o].color.a}else{const[n,o]=this.getPreviousNext(t,r,ye.Color);if(-1!==n&&o!==e){const e=(i.position-r[n].position)/(r[o].position-r[n].position),t=r[n].color,s=r[o].color;ve.forEach((r=>{i.color[r]=Math.round((0,le.Cq)(t[r],s[r],e))}))}else-1!==n?ve.forEach((e=>{i.color[e]=r[n].color[e]})):ve.forEach((e=>{i.color[e]=r[o].color[e]}))}}for(const e of r)t.push({color:e.color,position:e.position})}t[0].position=0,t[t.length-1].position=1;let i=0,n=1;for(let r=0;r<this._colorMapSize;++r){const o=r/this._colorMapSize;for(;o>t[n].position;)i=n++;const s=(o-t[i].position)/(t[n].position-t[i].position),l=t[i].color,a=t[n].color,u=new ie.c;ve.forEach((e=>{u[e]=Math.round((0,le.Cq)(l[e],a[e],s))})),u.a=(0,le.qk)(1-(0,le.Cq)(l.a,a.a,s)/255,0,1),e.push(u)}return e}getColorForContinuousDataValue(e,t){const r=this.rasterizedTransferFunction;if(this.colorStops.length<2||!Array.isArray(this.stretchRange)||this.stretchRange.length<2||r.length<256)return null;let i=this.stretchRange[0],n=this.stretchRange[1];if(i>n){const e=i;i=n,n=e}e=(0,le.qk)(e,i,n);const o=r[Math.round((e-i)/(n-i)*(this._colorMapSize-1))].clone();return t||(o.a=1),o}};(0,i._)([(0,c.qq)({type:["linear","nearest"],json:{write:!0}})],ge.prototype,"interpolation",void 0),(0,i._)([(0,c.qq)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],ge.prototype,"stretchRange",void 0),(0,i._)([(0,c.qq)({type:o.c.ofType(ue),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.colorStops&&this.colorStops.length>0}}}}})],ge.prototype,"colorStops",null),(0,i._)([(0,c.qq)({type:o.c.ofType(pe),json:{read:{source:"alphaStops"},write:{enabled:!0,target:"alphaStops",overridePolicy(){return{enabled:!!this.opacityStops&&this.opacityStops.length>0}}}}})],ge.prototype,"opacityStops",null),(0,i._)([(0,c.qq)({type:he,json:{write:!0}})],ge.prototype,"rangeFilter",void 0),(0,i._)([(0,c.qq)({type:[ie.c],clonable:!1,json:{read:!1}})],ge.prototype,"rasterizedTransferFunction",null),ge=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelTransferFunctionStyle")],ge);const fe=ge,ve=["r","g","b"];let be=class extends((0,T.q)(N.am)){constructor(){super(...arguments),this.color=ie.c.fromArray([0,0,0,0]),this.value=0,this.enabled=!0,this.label=""}};(0,i._)([(0,c.qq)({type:ie.c,json:{type:[p.Ab],write:{enabled:!0,isRequired:!0}}})],be.prototype,"color",void 0),(0,i._)([(0,c.qq)({type:p.Ab,json:{write:{enabled:!0,isRequired:!0}}})],be.prototype,"value",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{default:!0,write:!0}})],be.prototype,"enabled",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],be.prototype,"label",void 0),be=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelUniqueValue")],be);const qe=be;var Se;let we=Se=class extends N.am{constructor(e){super(e),this.variableId=0,this.label="",this.transferFunction=null,this.uniqueValues=null,this.isosurfaces=null,this.uniqueValues=new(o.c.ofType(qe)),this.isosurfaces=new(o.c.ofType(oe))}clone(){return new Se({variableId:this.variableId,label:this.label,transferFunction:(0,re.ct)(this.transferFunction),uniqueValues:(0,re.ct)(this.uniqueValues),isosurfaces:(0,re.ct)(this.isosurfaces)})}};(0,i._)([(0,c.qq)({type:p.Ab,json:{write:{enabled:!0,isRequired:!0}}})],we.prototype,"variableId",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],we.prototype,"label",void 0),(0,i._)([(0,c.qq)({type:fe,json:{write:{enabled:!0,overridePolicy(){return{enabled:!this.uniqueValues||this.uniqueValues.length<1}}}}})],we.prototype,"transferFunction",void 0),(0,i._)([(0,c.qq)({type:o.c.ofType(qe),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.uniqueValues&&this.uniqueValues.length>0}}}}})],we.prototype,"uniqueValues",void 0),(0,i._)([(0,c.qq)({type:o.c.ofType(oe),json:{write:{enabled:!0,overridePolicy(){const e=!this.uniqueValues||this.uniqueValues.length<1,t=!!this.isosurfaces&&this.isosurfaces.length>0;return{enabled:e&&t}}}}})],we.prototype,"isosurfaces",void 0),we=Se=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelVariableStyle")],we);const _e=we;var xe=r(67776),je=r(56156),Ve=r(60544);let Ie=class extends N.am{constructor(){super(...arguments),this.values=null}};(0,i._)([(0,c.qq)({type:[Number],json:{write:!0}})],Ie.prototype,"values",void 0),Ie=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelIrregularSpacing")],Ie);const Te=Ie;let Ae=class extends N.am{constructor(){super(...arguments),this.scale=1,this.offset=0}};(0,i._)([(0,c.qq)({type:Number,json:{write:!0}})],Ae.prototype,"scale",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:!0}})],Ae.prototype,"offset",void 0),Ae=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelRegularSpacing")],Ae);const Ne=Ae;let Me=class extends N.am{constructor(){super(...arguments),this.irregularSpacing=null,this.isPositiveUp=!0,this.isWrappedDateLine=!1,this.label=null,this.name=null,this.quantity=null,this.regularSpacing=null,this.size=0,this.unit=null}get isRegular(){return(null==this.irregularSpacing||void 0===this.irregularSpacing)&&null!==this.regularSpacing}getRange(){return this.isRegular?[this.regularSpacing.offset,this.regularSpacing.offset+this.regularSpacing.scale*(this.size-1)]:Array.isArray(this.irregularSpacing?.values)&&this.irregularSpacing.values.length>1?[this.irregularSpacing.values[0],this.irregularSpacing.values[this.irregularSpacing.values.length-1]]:[0,0]}};(0,i._)([(0,c.qq)({type:Te,json:{write:!0}})],Me.prototype,"irregularSpacing",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{write:!0}})],Me.prototype,"isPositiveUp",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{write:!0}})],Me.prototype,"isWrappedDateLine",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],Me.prototype,"label",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],Me.prototype,"name",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],Me.prototype,"quantity",void 0),(0,i._)([(0,c.qq)({type:Ne,json:{write:!0}})],Me.prototype,"regularSpacing",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:!0}})],Me.prototype,"size",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],Me.prototype,"unit",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{read:!1}})],Me.prototype,"isRegular",null),Me=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelDimension")],Me);const Re=Me;let ze=class extends N.am{constructor(e){super(e),this.id=0,this.dimensions=null,this.spatialReference=je.c.WGS84}get zDimension(){if(!this.dimensions)return-1;if(!Array.isArray(this.dimensions))return-1;if(4!==this.dimensions.length)return-1;for(let e=2;e<4;++e)if(this.dimensions[e].size>0)return e;return-1}get isValid(){return!(!this.dimensions||!Array.isArray(this.dimensions)||4!==this.dimensions.length||this.dimensions[0].size<1||this.dimensions[1].size<1||-1===this.zDimension||this.dimensions[this.zDimension].size<1)}get originInLayerSpace3D(){if(!this.isValid||"xyt"===this.volumeType)return[0,0,0];const e=this.dimensions[0].getRange(),t=this.dimensions[1].getRange(),r=this.dimensions[2],i=r.isRegular?r.getRange():[0,r.size];return[e[0],t[0],i[0]]}get voxelSizeInLayerSpaceSigned(){if(!this.isValid||"xyt"===this.volumeType)return[0,0,0];const e=this.dimensions[0].getRange(),t=this.dimensions[1].getRange(),r=this.dimensions[2],i=r.isRegular?r.getRange():[0,r.size],n=[this.sizeInVoxels[0],this.sizeInVoxels[1],this.sizeInVoxels[2]];for(let e=0;e<3;++e)n[e]<2?n[e]=1:n[e]-=1;return r.isRegular&&!r.isPositiveUp&&(n[2]*=-1),[(e[1]-e[0])/n[0],(t[1]-t[0])/n[1],(i[1]-i[0])/n[2]]}get volumeType(){if(this.isValid){const e=this.dimensions[2].size>0,t=this.dimensions[3].size>0;if(!e&&t)return"xyt";if(e&&t)return"xyzt"}return"xyz"}get sizeInVoxels(){if(!this.isValid)return[0,0,0];const e=this.zDimension;return[this.dimensions[0].size,this.dimensions[1].size,this.dimensions[e].size]}computeVoxelSpaceLocation(e){if(!this.isValid)return[0,0,0];if("xyt"===this.volumeType)return l.c.getLogger(this).error("computeVoxelSpacePosition cannot be used with XYT volumes."),[0,0,0];if(!(0,Ve.yK)(this.spatialReference,e.spatialReference))return l.c.getLogger(this).error("pos argument should have the same spatial reference as the VoxelLayer."),[0,0,0];const t=(0,m.WK)(e.x,e.y,e.z??0);(0,y.f)(t,t,this.originInLayerSpace3D),(0,y.H)(t,t,this.voxelSizeInLayerSpaceSigned);const r=this.dimensions[this.zDimension];if(!r.isRegular&&Array.isArray(r.irregularSpacing?.values)&&r.irregularSpacing.values.length>1){const i=e.z??0,n=r.irregularSpacing.values,o=r.isPositiveUp?1:-1,s=n.reduce(((e,t)=>Math.abs(o*t-i)<Math.abs(o*e-i)?t:e));for(let e=0;e<n.length;++e)if(n[e]===s){t[2]=e;break}}return[t[0],t[1],t[2]]}computeLayerSpaceLocation(e){if(!this.isValid)return new xe.c({x:0,y:0,spatialReference:this.spatialReference});const t=(0,m.eu)(e);if((0,y.B)(t,t,this.voxelSizeInLayerSpaceSigned),(0,y.g)(t,t,this.originInLayerSpace3D),"xyt"===this.volumeType)return new xe.c({x:t[0],y:t[1],spatialReference:this.spatialReference});const r=this.dimensions[this.zDimension];return r.isRegular||Array.isArray(r.irregularSpacing?.values)&&(e[2]<0?t[2]=r.irregularSpacing.values[0]:e[2]<r.irregularSpacing.values.length?t[2]=r.irregularSpacing.values[e[2]]:t[2]=r.irregularSpacing.values[r.irregularSpacing.values.length-1],r.isPositiveUp||(t[2]*=-1)),new xe.c({x:t[0],y:t[1],z:t[2],spatialReference:this.spatialReference})}};(0,i._)([(0,c.qq)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],ze.prototype,"id",void 0),(0,i._)([(0,c.qq)({type:[Re],json:{write:{enabled:!0,isRequired:!0}}})],ze.prototype,"dimensions",void 0),(0,i._)([(0,c.qq)({type:je.c,json:{read:{enabled:!1}}})],ze.prototype,"spatialReference",void 0),(0,i._)([(0,c.qq)({type:Number,json:{read:!1}})],ze.prototype,"zDimension",null),(0,i._)([(0,c.qq)({type:[Boolean],json:{read:!1}})],ze.prototype,"isValid",null),(0,i._)([(0,c.qq)({type:[Number],json:{read:!1}})],ze.prototype,"originInLayerSpace3D",null),(0,i._)([(0,c.qq)({type:[Number],json:{read:!1}})],ze.prototype,"voxelSizeInLayerSpaceSigned",null),(0,i._)([(0,c.qq)({type:["xyz","xyzt","xyt"],json:{read:{enabled:!1}}})],ze.prototype,"volumeType",null),(0,i._)([(0,c.qq)({type:[Number],json:{read:!1}})],ze.prototype,"sizeInVoxels",null),ze=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelVolume")],ze);const Fe=ze;var De;let Pe=De=class extends N.am{constructor(){super(...arguments),this.apronWidth=1,this.brickSize=[32,32,32],this.maxLodLevel=0,this.nodeSize=[4,4,4]}isValid(){const e=new De;return e.apronWidth===this.apronWidth&&e.maxLodLevel===this.maxLodLevel&&!!this.brickSize&&!!this.nodeSize&&!(!Array.isArray(this.brickSize)||!Array.isArray(this.nodeSize))&&3===this.brickSize.length&&3===this.nodeSize.length&&32===this.brickSize[0]&&32===this.brickSize[1]&&32===this.brickSize[2]&&4===this.nodeSize[0]&&4===this.nodeSize[1]&&4===this.nodeSize[2]}};(0,i._)([(0,c.qq)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],Pe.prototype,"apronWidth",void 0),(0,i._)([(0,c.qq)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],Pe.prototype,"brickSize",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],Pe.prototype,"maxLodLevel",void 0),(0,i._)([(0,c.qq)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],Pe.prototype,"nodeSize",void 0),Pe=De=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelVolumeIndex")],Pe);const Ee=Pe;let Oe=class extends((0,T.q)(N.am)){constructor(e){super(e),this.enabled=!0,this.label="",this.normal=null,this.point=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=k(this.normal);return A.sD.normalize((0,p.Oe)(e),0,!0)}set orientation(e){const t=B(e,this.tilt);this._set("normal",t),this._set("orientation",e)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=k(this.normal);return A.sD.normalize((0,p.Oe)(t),0,!0)}set tilt(e){const t=B(this.orientation,e);this._set("normal",t),this._set("tilt",e)}};(0,i._)([(0,c.qq)({type:Boolean,json:{default:!0,write:!0}})],Oe.prototype,"enabled",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],Oe.prototype,"label",void 0),(0,i._)([(0,c.qq)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,W.W)((e=>A.sD.normalize((0,p.Oe)(e),0,!0)))],Oe.prototype,"orientation",null),(0,i._)([(0,c.qq)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,W.W)((e=>A.sD.normalize((0,p.Oe)(e),0,!0)))],Oe.prototype,"tilt",null),(0,i._)([(0,c.qq)({type:[Number],json:{write:!0}})],Oe.prototype,"normal",void 0),(0,i._)([(0,c.qq)({type:[Number],json:{write:!0}})],Oe.prototype,"point",void 0),Oe=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelDynamicSection")],Oe);const Ue=Oe;var Le;let Ce=Le=class extends N.am{constructor(e){super(e),this.volumeId=0,this.verticalExaggeration=1,this.exaggerationMode="scale-height",this.verticalOffset=0,this.slices=new(o.c.ofType(H)),this.dynamicSections=new(o.c.ofType(Ue))}set slices(e){this._set("slices",(0,se.q)(e,this._get("slices"),o.c.ofType(H)))}set dynamicSections(e){this._set("dynamicSections",(0,se.q)(e,this._get("dynamicSections"),o.c.ofType(Ue)))}clone(){return new Le({volumeId:this.volumeId,verticalExaggeration:this.verticalExaggeration,exaggerationMode:this.exaggerationMode,verticalOffset:this.verticalOffset,slices:(0,re.ct)(this.slices),dynamicSections:(0,re.ct)(this.dynamicSections)})}};(0,i._)([(0,c.qq)({type:p.Ab,json:{write:{enabled:!0,isRequired:!0}}})],Ce.prototype,"volumeId",void 0),(0,i._)([(0,c.qq)({type:Number,json:{default:1,write:!0}})],Ce.prototype,"verticalExaggeration",void 0),(0,i._)([(0,c.qq)({type:["scale-position","scale-height"],json:{default:"scale-height",write:!0}})],Ce.prototype,"exaggerationMode",void 0),(0,i._)([(0,c.qq)({type:Number,json:{default:0,write:!0}})],Ce.prototype,"verticalOffset",void 0),(0,i._)([(0,c.qq)({type:o.c.ofType(H),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.slices&&this.slices.length>0}}}}})],Ce.prototype,"slices",null),(0,i._)([(0,c.qq)({type:o.c.ofType(Ue),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.dynamicSections&&this.dynamicSections.length>0}}}}})],Ce.prototype,"dynamicSections",null),Ce=Le=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelVolumeStyle")],Ce);const ke=Ce;var Be=r(65548);let We=class extends((0,x.G6)((0,b.u)((0,S.Y)((0,w.K)((0,_.I)((0,a.U)((0,q.G)((0,v.C)(f.c))))))))){constructor(e){super(e),this.serviceRoot="",this.operationalLayerType="Voxel",this.legendEnabled=!0,this.title=null,this.sections=null,this.currentVariableId=0,this.volumeStyles=null,this.renderMode="volume",this.variableStyles=null,this.enableSlices=!0,this.enableSections=!0,this.enableDynamicSections=!0,this.enableIsosurfaces=!0,this.shading=new Q,this.opacity=1,this.variables=new o.c,this.volumes=new o.c,this.index=null,this.minScale=0,this.maxScale=0,this.type="voxel",this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.fullExtent=null,this.popupEnabled=!1,this.test=null,this.volumeStyles=new(o.c.ofType(ke)),this.variableStyles=new(o.c.ofType(_e)),this.sections=new(o.c.ofType(K))}normalizeCtorArgs(e){return e?.constantUpscaling&&(this.test={constantUpscaling:!0},delete e.constantUpscaling),e}set url(e){this._set("url",(0,j.oR)(e,l.c.getLogger(this)))}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(u.CE).then((()=>this._fetchService(t))).then((()=>this.serviceRoot=this.url));return this.addResolvingPromise(r),Promise.resolve(this)}read(e,t){super.read(e,t);for(const e of this.volumes)e.spatialReference=this.spatialReference}readVersion(e,t){return super.parseVersionString(e)}validateLayer(e){if(e.layerType&&e.layerType!==this.operationalLayerType)throw new s.c("voxel-layer:layer-type-not-supported","VoxelLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor)||this.version.major<3)throw new s.c("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"3.x"});if(this.version.major>3)throw new s.c("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"3.x"})}readFullExtent(e,t,r){if(null!=e&&"object"==typeof e){const i=g.c.fromJSON(e,r);if(0===i.zmin&&0===i.zmax&&Array.isArray(t.volumes)){const e=Fe.fromJSON(t.volumes[0]);if(e.isValid&&"xyt"!==e.volumeType){const t=e.dimensions[2];if(t.isRegular){let e=t.regularSpacing.offset,r=t.regularSpacing.offset+t.regularSpacing.scale*(t.size-1);if(e>r){const t=e;e=r,r=t}i.zmin=e,i.zmax=r}}}return i}return null}get voxelFields(){const e=[new I.c({name:"Voxel.ServiceValue",alias:"Value",domain:null,editable:!1,length:128,type:"string"}),new I.c({name:"Voxel.ServiceVariableLabel",alias:"Variable",domain:null,editable:!1,length:128,type:"string"}),new I.c({name:"Voxel.Position",alias:"Voxel Position",domain:null,editable:!1,length:128,type:"string"})],t=this.getVolume(null);if(null!=t){if("xyzt"===t.volumeType||"xyt"===t.volumeType){const t=new I.c({name:"Voxel.ServiceLocalTime",alias:"Local Time",domain:null,editable:!1,length:128,type:"string"});e.push(t);const r=new I.c({name:"Voxel.ServiceNativeTime",alias:"Native Time",domain:null,editable:!1,length:128,type:"string"});e.push(r)}if("xyt"!==t.volumeType){const t=new I.c({name:"Voxel.ServiceDepth",alias:"Depth",domain:null,editable:!1,length:128,type:"string"});e.push(t)}}return e}get popupTemplate(){return this.loaded?this.createPopupTemplate():null}get defaultPopupTemplate(){return this.createPopupTemplate()}createPopupTemplate(e){const t=this.voxelFields,r=this.title;return(0,Be.Ap)({fields:t,title:r},e)}getConfiguration(){const e={layerType:this.operationalLayerType,version:this.version.versionString,name:this.title,spatialReference:this.spatialReference,fullExtent:this.fullExtent,volumes:this.volumes.toJSON(),variables:this.variables.toJSON(),index:this.index?.toJSON(),sections:this.getSections(),style:{volumeStyles:this.getVolumeStyles(),currentVariableId:this.currentVariableId,renderMode:this.renderMode,variableStyles:this.getVariableStyles(),enableSections:this.enableSections,enableDynamicSections:this.enableDynamicSections,enableIsosurfaces:this.enableIsosurfaces,enableSlices:this.enableSlices,shading:this.shading}};return e.index&&this.index?.isValid()?JSON.stringify(e):""}getVariableStyle(e){let t=-1;if(t=null!=e?e:this.currentVariableId,!this.variableStyles||-1===t)return null;const r=this.variableStyles.findIndex((e=>e.variableId===t));return r<0?null:this.variableStyles.at(r)}getVariable(e){let t=-1;if(t=null!=e?e:this.currentVariableId,!this.variables||-1===t)return null;const r=this.variables.findIndex((e=>e.id===t));return r<0?null:this.variables.at(r)}getVolume(e){const t=this.getVariable(e);return null!=t?this.volumes.find((({id:e})=>e===t.volumeId)):null}getVolumeStyle(e){const t=this.getVariable(e);return null!=t?this.volumeStyles.find((({volumeId:e})=>e===t.volumeId)):null}getColorForContinuousDataValue(e,t,r){const i=this.getVariable(e);if(null==i||"continuous"!==i.renderingFormat?.continuity)return null;if(!this.variableStyles)return null;const n=this.variableStyles.findIndex((t=>t.variableId===e));if(n<0)return null;const o=this.variableStyles.at(n);return o?.transferFunction?o.transferFunction.getColorForContinuousDataValue(t,r):null}getSections(){const e=[];for(const t of this.sections)e.push(new K({enabled:t.enabled,href:t.href,id:t.id,label:t.label,normal:t.normal,point:t.point,sizeInPixel:t.sizeInPixel,slices:t.slices,timeId:t.timeId,variableId:t.variableId}));return e}getVariableStyles(){const e=[];for(const t of this.variableStyles){const r=this._getVariable(t);if(null!=r){const i=t.clone();i.isosurfaces.length>4&&(i.isosurfaces=i.isosurfaces.slice(0,3),l.c.getLogger(this).error("A maximum of 4 isosurfaces are supported for Voxel Layers."));for(const e of i.isosurfaces)if(!e.colorLocked){const t=this.getColorForContinuousDataValue(i.variableId,e.value,!1);null===t||t.equals(e.color)||(e.color=t)}if("continuous"===r.renderingFormat.continuity)(null===i.transferFunction||i.transferFunction.colorStops.length<2)&&l.c.getLogger(this).error(`VoxelVariableStyle for variable ${r.id} is invalid. At least 2 color stops are required in the transferFunction for continuous Voxel Layer variables.`),null!==i.transferFunction&&(Array.isArray(i.transferFunction.stretchRange)&&2===i.transferFunction.stretchRange.length||(l.c.getLogger(this).error(`VoxelVariableStyle for variable ${r.id} is invalid. The stretchRange of the transferFunction for continuous Voxel Layer variables must be of the form [minimumDataValue, maximumDataValue].`),i.transferFunction.stretchRange=[0,1],i.transferFunction.colorStops.removeAll()));else if("discrete"===r.renderingFormat.continuity)if(0===t.uniqueValues.length)l.c.getLogger(this).error(`VoxelVariableStyle for variable ${r.id} is invalid. Unique values are required for discrete Voxel Layer variables.`);else for(const e of t.uniqueValues)null!==e.label&&void 0!==e.label||null===e.value||void 0===e.value||(e.label=e.value.toString());e.push(i)}else l.c.getLogger(this).error(`VoxelVariable ID=${t.variableId} doesn't exist, VoxelVariableStyle for this VoxelVariable will be ignored.`)}return e}getVolumeStyles(){const e=[];for(const t of this.volumeStyles){const r=this._getVolumeFromVolumeId(t.volumeId);if(null!=r){const i=t.clone();for(const e of i.slices)this._isPlaneValid(e,[0,1,r.zDimension],r.dimensions)||(e.enabled=!1,e.label="invalid");for(const e of i.dynamicSections)this._isPlaneValid(e,[0,1,r.zDimension],r.dimensions)||(e.enabled=!1,e.label="invalid");e.push(i)}else l.c.getLogger(this).error(`VoxelVolume ID=${t.volumeId} doesn't exist, VoxelVolumeStyle for this VoxelVolume will be ignored.`)}return e}_getVariable(e){const t=e.variableId;for(const e of this.variables)if(e.id===t)return e;return null}_getVolumeFromVolumeId(e){for(const t of this.volumes)if(t.id===e)return t;return null}_isPlaneValid(e,t,r){if(!e.point)return!1;if(!Array.isArray(e.point)||3!==e.point.length)return!1;if(!e.normal)return!1;if(!Array.isArray(e.normal)||3!==e.normal.length)return!1;const i=(0,m.WK)(e.normal[0],e.normal[1],e.normal[2]);return(0,y.n)(i,i),!(Math.abs(i[0])+Math.abs(i[1])+Math.abs(i[2])<1e-6||(e.normal[0]=i[0],e.normal[1]=i[1],e.normal[2]=i[2],0))}};(0,i._)([(0,c.qq)({type:["Voxel"]})],We.prototype,"operationalLayerType",void 0),(0,i._)([(0,c.qq)(V.Uj)],We.prototype,"legendEnabled",void 0),(0,i._)([(0,c.qq)({json:{write:!0}})],We.prototype,"title",void 0),(0,i._)([(0,c.qq)(V.qW)],We.prototype,"url",null),(0,i._)([(0,c.qq)({type:o.c.ofType(K),json:{origins:{"web-scene":{name:"layerDefinition.sections",write:!0}}}})],We.prototype,"sections",void 0),(0,i._)([(0,c.qq)({type:p.Ab,json:{origins:{"web-scene":{name:"layerDefinition.style.currentVariableId",write:{enabled:!0,isRequired:!0,ignoreOrigin:!0}},service:{name:"style.currentVariableId"}}}})],We.prototype,"currentVariableId",void 0),(0,i._)([(0,c.qq)({type:o.c.ofType(ke),json:{origins:{"web-scene":{name:"layerDefinition.style.volumeStyles",write:!0},service:{name:"style.volumeStyles"}}}})],We.prototype,"volumeStyles",void 0),(0,i._)([(0,c.qq)({type:["volume","surfaces"],json:{origins:{"web-scene":{name:"layerDefinition.style.renderMode",write:!0},service:{name:"style.renderMode"}}}})],We.prototype,"renderMode",void 0),(0,i._)([(0,c.qq)({type:o.c.ofType(_e),json:{origins:{"web-scene":{name:"layerDefinition.style.variableStyles",write:!0},service:{name:"style.variableStyles"}}}})],We.prototype,"variableStyles",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableSlices",write:!0},service:{name:"style.enableSlices"}}}})],We.prototype,"enableSlices",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableSections",write:!0},service:{name:"style.enableSections"}}}})],We.prototype,"enableSections",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableDynamicSections",write:!0},service:{name:"style.enableDynamicSections"}}}})],We.prototype,"enableDynamicSections",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableIsosurfaces",write:!0},service:{name:"style.enableIsosurfaces"}}}})],We.prototype,"enableIsosurfaces",void 0),(0,i._)([(0,c.qq)({type:Q,json:{origins:{"web-scene":{name:"layerDefinition.style.shading",write:!0},service:{name:"style.shading"}}}})],We.prototype,"shading",void 0),(0,i._)([(0,c.qq)({type:["show","hide"]})],We.prototype,"listMode",void 0),(0,i._)([(0,c.qq)({type:Number,range:{min:0,max:1},nonNullable:!0,json:{read:!1,write:!1,origins:{"web-scene":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],We.prototype,"opacity",void 0),(0,i._)([(0,c.qq)({type:o.c.ofType(te)})],We.prototype,"variables",void 0),(0,i._)([(0,c.qq)({type:o.c.ofType(Fe)})],We.prototype,"volumes",void 0),(0,i._)([(0,c.qq)({type:Ee})],We.prototype,"index",void 0),(0,i._)([(0,c.qq)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:!1,write:!1}}}})],We.prototype,"minScale",void 0),(0,i._)([(0,c.qq)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:!1,write:!1}}}})],We.prototype,"maxScale",void 0),(0,i._)([(0,c.qq)({json:{read:!1},readOnly:!0})],We.prototype,"type",void 0),(0,i._)([(0,c.qq)({readOnly:!0,json:{name:"serviceVersion"}})],We.prototype,"version",void 0),(0,i._)([(0,d.E)("service","version")],We.prototype,"readVersion",null),(0,i._)([(0,c.qq)({type:g.c})],We.prototype,"fullExtent",void 0),(0,i._)([(0,d.E)("service","fullExtent",["fullExtent"])],We.prototype,"readFullExtent",null),(0,i._)([(0,c.qq)({readOnly:!0,clonable:!1,json:{read:!1}})],We.prototype,"voxelFields",null),(0,i._)([(0,c.qq)({type:Boolean,json:{name:"disablePopup",read:{reader:(e,t)=>!t.disablePopup},write:{enabled:!0,ignoreOrigin:!0,writer(e,t,r){t[r]=!e}},origins:{"portal-item":{default:!0},"web-scene":{default:!0}}}})],We.prototype,"popupEnabled",void 0),(0,i._)([(0,c.qq)({type:n.c,json:{read:!1}})],We.prototype,"popupTemplate",null),(0,i._)([(0,c.qq)({readOnly:!0})],We.prototype,"defaultPopupTemplate",null),We=(0,i._)([(0,h.c)("esri.layers.VoxelLayer")],We);const $e=We},28584:(e,t,r)=>{r.d(t,{G:()=>s});var i=r(41948),n=r(1580),o=(r(9456),r(66360),r(72052),r(12552));const s=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,n.qq)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,i._)([(0,o.c)("esri.layers.mixins.CustomParametersMixin")],t),t}},98768:(e,t,r)=>{r.d(t,{K:()=>w});var i=r(41948),n=r(6220),o=r(47620),s=r(2600),l=r(40196),a=r(20744),u=r(66360),c=r(70680),p=r(10860),d=r(28176),h=r(1580),y=(r(9456),r(72052),r(33600)),m=r(12552),g=r(18996),f=r(71068),v=r(54872),b=r(9764),q=r(53039),S=r(46940);const w=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,c.mG)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new b.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await Promise.all([r.e(8828),r.e(4132)]).then(r.bind(r,94132));return(0,p.wp)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,p.mA)(e)||u.c.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,p.CE)(e),!0))))}async setUserPrivileges(e,t){if(!n.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,p.CE)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=e===r.id;if(i&&r.portal.user)return(0,S.CI)(r);let n,s;if(i)n=r.portal.url;else try{n=await(0,f.mK)(this.url,t)}catch(e){(0,p.CE)(e)}if(!n||!(0,d.Cs)(n,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;s=await(o.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.CE)(e)}if(!s)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(i?await r.reload():(r=new b.default({id:e,portal:{url:n}}),await r.load(t)),r.portal.user)return(0,S.CI)(r)}catch(e){(0,p.CE)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.CE)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;const r=_.credential===t?_.user:await this._fetchEditingUser(e);return _.credential=t,_.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=o.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,n=v.c.getDefault();if(n&&n.loaded&&(0,d.k7)(n.restUrl)===(0,d.k7)(i))return n.user;const a=`${i}/community/self`,u=null!=e?e.signal:null,c=await(0,l.aG)((0,s.c)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?q.c.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||v.c.getDefault());return r&&i&&!(0,d.kF)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.c("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,h.qq)({type:b.default})],t.prototype,"portalItem",null),(0,i._)([(0,y.E)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,g.G)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,h.qq)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,h.qq)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,h.qq)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,h.qq)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,m.c)("esri.layers.mixins.PortalLayer")],t),t},_={credential:null,user:null}},3116:(e,t,r)=>{r.d(t,{I:()=>s});var i=r(41948),n=r(1580),o=(r(9456),r(66360),r(72052),r(12552));const s=e=>{let t=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i._)([(0,n.qq)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,i._)([(0,n.qq)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,i._)([(0,n.qq)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,i._)([(0,o.c)("esri.layers.mixins.ScaleRangeLayer")],t),t}},600:(e,t,r)=>{r.d(t,{c:()=>g});var i,n=r(41948),o=r(14628),s=r(40504),l=r(1580),a=r(53368),u=(r(72052),r(9456),r(9968)),c=r(33600),p=r(12552),d=r(89812),h=r(36408);const y=new o.O({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let m=i=class extends s.am{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?y.fromJSON(r.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,n._)([(0,l.qq)({type:String,json:{write:!0}})],m.prototype,"alias",void 0),(0,n._)([(0,l.qq)({type:[String,Number],json:{write:{allowNull:!0}}})],m.prototype,"defaultValue",void 0),(0,n._)([(0,l.qq)()],m.prototype,"description",void 0),(0,n._)([(0,c.E)("description")],m.prototype,"readDescription",null),(0,n._)([(0,l.qq)({types:d.i2,json:{read:{reader:d.h4},write:!0}})],m.prototype,"domain",void 0),(0,n._)([(0,l.qq)({type:Boolean,json:{write:!0}})],m.prototype,"editable",void 0),(0,n._)([(0,l.qq)({type:a.Ab,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],m.prototype,"length",void 0),(0,n._)([(0,l.qq)({type:String,json:{write:!0}})],m.prototype,"name",void 0),(0,n._)([(0,l.qq)({type:Boolean,json:{write:!0}})],m.prototype,"nullable",void 0),(0,n._)([(0,u.G)(h.M)],m.prototype,"type",void 0),(0,n._)([(0,l.qq)()],m.prototype,"valueType",void 0),(0,n._)([(0,c.E)("valueType",["description"])],m.prototype,"readValueType",null),(0,n._)([(0,l.qq)({type:Boolean,json:{read:!1}})],m.prototype,"visible",void 0),m=i=(0,n._)([(0,p.c)("esri.layers.support.Field")],m);const g=m},89812:(e,t,r)=>{r.d(t,{h4:()=>x,i2:()=>_}),r(9456);var i,n=r(41948),o=r(62088),s=r(1580),l=(r(66360),r(9968)),a=r(12552),u=r(40504);r(72052);let c=i=class extends u.am{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,n._)([(0,s.qq)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,n._)([(0,s.qq)({type:[String,Number],json:{write:!0}})],c.prototype,"code",void 0),c=i=(0,n._)([(0,a.c)("esri.layers.support.CodedValue")],c);const p=new(r(14628).O)({inherited:"inherited",codedValue:"coded-value",range:"range"});let d=class extends u.am{constructor(e){super(e),this.name=null,this.type=null}};(0,n._)([(0,s.qq)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,n._)([(0,l.G)(p)],d.prototype,"type",void 0),d=(0,n._)([(0,a.c)("esri.layers.support.Domain")],d);const h=d;var y;let m=y=class extends h{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new y({codedValues:(0,o.ct)(this.codedValues),name:this.name})}};(0,n._)([(0,s.qq)({type:[c],json:{write:!0}})],m.prototype,"codedValues",void 0),(0,n._)([(0,l.G)({codedValue:"coded-value"})],m.prototype,"type",void 0),m=y=(0,n._)([(0,a.c)("esri.layers.support.CodedValueDomain")],m);const g=m;var f;r(20744);let v=f=class extends h{constructor(e){super(e),this.type="inherited"}clone(){return new f}};(0,n._)([(0,l.G)({inherited:"inherited"})],v.prototype,"type",void 0),v=f=(0,n._)([(0,a.c)("esri.layers.support.InheritedDomain")],v);const b=v;var q;let S=q=class extends h{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new q({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,n._)([(0,s.qq)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]}}}})],S.prototype,"maxValue",void 0),(0,n._)([(0,s.qq)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]}}}})],S.prototype,"minValue",void 0),(0,n._)([(0,l.G)({range:"range"})],S.prototype,"type",void 0),S=q=(0,n._)([(0,a.c)("esri.layers.support.RangeDomain")],S);const w=S,_={key:"type",base:h,typeMap:{range:S,"coded-value":g,inherited:b}};function x(e){if(!e?.type)return null;switch(e.type){case"range":return w.fromJSON(e);case"codedValue":return g.fromJSON(e);case"inherited":return b.fromJSON(e)}return null}},36408:(e,t,r)=>{r.d(t,{M:()=>i});const i=new(r(14628).O)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},73960:(e,t,r)=>{r.d(t,{e:()=>n});var i=r(28176);function n(e){return o[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){const t=(0,i.wt)(e);return a[t]||s}(e.url)}(e)]||l}const o={},s="text/plain",l=o[s],a={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in a)o[a[e]]=e},65548:(e,t,r)=>{r.d(t,{Ap:()=>u});var i=r(82692),n=r(564),o=r(3739),s=(r(73312),r(67300),r(18480),r(72944)),l=(r(53568),r(15024),r(63116),r(13428)),a=r(76992);function u({displayField:e,editFieldsInfo:t,fields:r,objectIdField:a,title:u},h){if(!r)return null;const m=function(e,t){const r=t?.visibleFieldNames;return function(e,t){const r=e;return t&&(e=e.filter((e=>!t.includes(e.type)))),e===r&&(e=e.slice()),e.sort(p),e}(e.fields??[],t?.ignoreFieldTypes||y).map((t=>new l.c({fieldName:t.name,isEditable:(0,n.Yn)(t,e),label:t.alias,format:d(t),visible:c(t,{...e,visibleFieldNames:r})})))}({editFieldsInfo:t,fields:r,objectIdField:a},h);if(!m.length)return null;const g=function(e){const t=(0,n.G2)(e),{titleBase:r}=e;return t?`${r}: {${t.trim()}}`:r??""}({titleBase:u,fields:r,displayField:e}),f=[new s.c,new o.c];return new i.c({title:g,content:f,fieldInfos:m})}const c=(e,t)=>t.visibleFieldNames?t.visibleFieldNames.has(e.name):(0,n.iY)(e,t);function p(e,t){return"oid"===e.type?-1:"oid"===t.type?1:h(e)?-1:h(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function d(e){switch(e.type){case"small-integer":case"integer":case"single":return new a.c({digitSeparator:!0,places:0});case"double":return new a.c({digitSeparator:!0,places:2});case"string":return(0,n.Gm)(e.name)?new a.c({digitSeparator:!0,places:0}):null;default:return null}}function h(e){return"name"===(e.name&&e.name.toLowerCase())||"name"===(e.alias&&e.alias.toLowerCase())}const y=["geometry","blob","raster","guid","xml"]}}]);