@arcgis/core 5.1.0-next.53 → 5.1.0-next.54

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 (348) hide show
  1. package/applications/Components/SketchTooltipControls.d.ts +3 -2
  2. package/applications/Components/SketchTooltipControls.js +1 -1
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/097c037705ab485372ee.js +1 -0
  5. package/assets/esri/core/workers/chunks/0ab19ad980fda1cf402a.js +1 -0
  6. package/assets/esri/core/workers/chunks/0b79630ad435a7734104.js +1 -0
  7. package/assets/esri/core/workers/chunks/0f4759efc0982fb0ea03.js +1 -0
  8. package/assets/esri/core/workers/chunks/{f4d31d96681b649ddc95.js → 0ff12fe9e358100668d9.js} +1 -1
  9. package/assets/esri/core/workers/chunks/11fed97adc9bca0f95e9.js +1 -0
  10. package/assets/esri/core/workers/chunks/123e15c9e068a053d54e.js +1 -0
  11. package/assets/esri/core/workers/chunks/1613123918e9b0f7cfdb.js +1 -0
  12. package/assets/esri/core/workers/chunks/16a46688df5fad5cf8d5.js +1 -0
  13. package/assets/esri/core/workers/chunks/16ed8c0af8bb8b400163.js +1 -0
  14. package/assets/esri/core/workers/chunks/16f5cd740321a3539bf1.js +1 -0
  15. package/assets/esri/core/workers/chunks/173d94e162b210dee0a2.js +1 -0
  16. package/assets/esri/core/workers/chunks/1a198c9e17f7a058669e.js +1 -0
  17. package/assets/esri/core/workers/chunks/1fdd736c4932655ff1d9.js +1 -0
  18. package/assets/esri/core/workers/chunks/2304f7b8173cf86dd805.js +1 -0
  19. package/assets/esri/core/workers/chunks/2327b368673a974dee8b.js +1 -0
  20. package/assets/esri/core/workers/chunks/23eb204d3cb818adea32.js +1 -0
  21. package/assets/esri/core/workers/chunks/{eedeff8b344ff699b0b9.js → 2714ec856c2b3223425b.js} +1 -1
  22. package/assets/esri/core/workers/chunks/34acecd7a314fed12335.js +1 -0
  23. package/assets/esri/core/workers/chunks/{cdeb6aec578a1c07d663.js → 3cb0f020f9bfc6653c5d.js} +1 -1
  24. package/assets/esri/core/workers/chunks/42e084704dea6e4135b6.js +1 -0
  25. package/assets/esri/core/workers/chunks/{5b3bb636e3bec625e515.js → 4301cb9670fa7c907460.js} +1 -1
  26. package/assets/esri/core/workers/chunks/48eca6f51112ba80bd3b.js +1 -0
  27. package/assets/esri/core/workers/chunks/4c38af9ae023fde2b5cd.js +1 -0
  28. package/assets/esri/core/workers/chunks/4c8c69d081ed37bf5bc5.js +1 -0
  29. package/assets/esri/core/workers/chunks/4e7bb224bde9e5039263.js +1 -0
  30. package/assets/esri/core/workers/chunks/4f847a426973bd350c11.js +1 -0
  31. package/assets/esri/core/workers/chunks/52c90975cf22add7ee2b.js +1 -0
  32. package/assets/esri/core/workers/chunks/55214e1d9f3d98fa7ed9.js +1 -0
  33. package/assets/esri/core/workers/chunks/57dc80942e51dedd8335.js +1 -0
  34. package/assets/esri/core/workers/chunks/59289867cce97da74e39.js +1 -0
  35. package/assets/esri/core/workers/chunks/5a9620cb66c8e64e4668.js +1 -0
  36. package/assets/esri/core/workers/chunks/5d202f60891fcae7174d.js +1 -0
  37. package/assets/esri/core/workers/chunks/{f7fb121169b7e5a5adbc.js → 6666ef3fd6ce877a4509.js} +1 -1
  38. package/assets/esri/core/workers/chunks/69644b8a6ce340ca1159.js +1 -0
  39. package/assets/esri/core/workers/chunks/6ab8ed12d162d79a8c55.js +1 -0
  40. package/assets/esri/core/workers/chunks/796d27d1bbb2eed53cbd.js +1 -0
  41. package/assets/esri/core/workers/chunks/7ef1c1f765b6d423e474.js +1 -0
  42. package/assets/esri/core/workers/chunks/8569ae372fc64641b6b1.js +1 -0
  43. package/assets/esri/core/workers/chunks/929b26999321519824b9.js +1 -0
  44. package/assets/esri/core/workers/chunks/932a0b39d85a76377d52.js +1 -0
  45. package/assets/esri/core/workers/chunks/94f80c46ccf5e19038b8.js +1 -0
  46. package/assets/esri/core/workers/chunks/979c2f52b6d6e1e8241b.js +1 -0
  47. package/assets/esri/core/workers/chunks/{617328964d480d4a3a45.js → 9806cc96414065ae0afe.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{987dc23fdc0a8c7150b9.js → a5bf2718c02a0e645013.js} +1 -1
  49. package/assets/esri/core/workers/chunks/a7b315a660f0f4e1d197.js +1 -0
  50. package/assets/esri/core/workers/chunks/a8e111a5cfd6151d5dbb.js +1 -0
  51. package/assets/esri/core/workers/chunks/aed45f7e7eee154a21b8.js +1 -0
  52. package/assets/esri/core/workers/chunks/b39b4db86a1049f0b901.js +1 -0
  53. package/assets/esri/core/workers/chunks/{c6a0e770c1a89d3b5913.js → b43889ed9737c27e89f1.js} +1 -1
  54. package/assets/esri/core/workers/chunks/b59f03c64e4965d87291.js +1 -0
  55. package/assets/esri/core/workers/chunks/bad82ce3f84f7efb7ab7.js +1 -0
  56. package/assets/esri/core/workers/chunks/bae1d6dd2376dff271e8.js +1 -0
  57. package/assets/esri/core/workers/chunks/bb047157f09471ecea53.js +1 -0
  58. package/assets/esri/core/workers/chunks/bbb9659f79511c2c4690.js +1 -0
  59. package/assets/esri/core/workers/chunks/bc3b22dc08c147b8d425.js +1 -0
  60. package/assets/esri/core/workers/chunks/be60a6e210186ff09ae2.js +1 -0
  61. package/assets/esri/core/workers/chunks/c03190faca955bffc8c1.js +1 -0
  62. package/assets/esri/core/workers/chunks/c1ad062ccc1817cbee4c.js +1 -0
  63. package/assets/esri/core/workers/chunks/c86b15f6a18880f921cd.js +1 -0
  64. package/assets/esri/core/workers/chunks/c93454e37ae0f124bcb0.js +1 -0
  65. package/assets/esri/core/workers/chunks/cd14b6157862f33ab116.js +1 -0
  66. package/assets/esri/core/workers/chunks/ce59ec4f0cfbdf780bcb.js +1 -0
  67. package/assets/esri/core/workers/chunks/{3c9e1ec94bbcbf494916.js → d1aa1d51662f4a01e793.js} +1 -1
  68. package/assets/esri/core/workers/chunks/d31e68e73527c88b8276.js +1 -0
  69. package/assets/esri/core/workers/chunks/{15a45e26964c2eb381a6.js → d4961d307651431328a8.js} +1 -1
  70. package/assets/esri/core/workers/chunks/{81b830f0d620587966ca.js → d53c6fc10425adc2c0cf.js} +1 -1
  71. package/assets/esri/core/workers/chunks/d69cdee402ba4fc3735f.js +1 -0
  72. package/assets/esri/core/workers/chunks/d6f1ed8d8f76a32bc81d.js +1 -0
  73. package/assets/esri/core/workers/chunks/d7456829e404874a9e2f.js +1 -0
  74. package/assets/esri/core/workers/chunks/d9444dd0d40aa8332b28.js +1 -0
  75. package/assets/esri/core/workers/chunks/da0a61f73d45ea9e71fc.js +1 -0
  76. package/assets/esri/core/workers/chunks/{9ae90a4b281d4103e8bb.js → dc07dc1cd30edc0c4193.js} +1 -1
  77. package/assets/esri/core/workers/chunks/{fdf8fe0f50a9ae548c16.js → ddc7956d80498518551e.js} +1 -1
  78. package/assets/esri/core/workers/chunks/{29c91b5c9ddcea85f39a.js → e23fc5853e2f4016936b.js} +1 -1
  79. package/assets/esri/core/workers/chunks/e2d1d9929ed7744785a1.js +1 -0
  80. package/assets/esri/core/workers/chunks/e543bb228f3f9d937d43.js +1 -0
  81. package/assets/esri/core/workers/chunks/ec21311584e4fb13e510.js +1 -0
  82. package/assets/esri/core/workers/chunks/f3f26f6116ab9126c2e7.js +1 -0
  83. package/assets/esri/core/workers/chunks/f4472e3486fdc33abb9a.js +1 -0
  84. package/assets/esri/core/workers/chunks/f80f04657762666b9165.js +1 -0
  85. package/assets/esri/core/workers/chunks/f8ee1a99580a7da42cde.js +1 -0
  86. package/assets/esri/core/workers/chunks/fcda652fb5262696d59c.js +1 -0
  87. package/assets/esri/core/workers/chunks/fe92f54e45fd21ccd75f.js +1 -0
  88. package/assets/esri/core/workers/chunks/ff0cb1eec14d34214f12.js +1 -0
  89. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
  90. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
  91. package/chunks/OITBlend.glsl.js +2 -2
  92. package/chunks/ShadowHighlight.glsl.js +1 -1
  93. package/chunks/Viewshed.glsl.js +2 -2
  94. package/chunks/arcgis-knowledge-client-core-simd.js +1 -1
  95. package/chunks/arcgis-knowledge-client-core.js +1 -1
  96. package/config.js +1 -1
  97. package/core/libs/gl-matrix-2/math/vec3.js +1 -1
  98. package/geometry/SpatialReference.js +1 -1
  99. package/geometry/operators/support/apiConverter.js +1 -1
  100. package/geometry/support/aaBoundingBox.js +1 -1
  101. package/geometry/support/geometryUtils.js +1 -1
  102. package/kernel.js +1 -1
  103. package/package.json +1 -1
  104. package/rest/knowledgeGraph/wasmInterface/knowledgeWasmAccess.js +1 -1
  105. package/support/revision.js +1 -1
  106. package/support/tests/serviceMockDependencies.js +1 -1
  107. package/views/2d/engine/flow/FlowContainer.js +1 -1
  108. package/views/2d/engine/flow/FlowStrategy.js +1 -1
  109. package/views/2d/engine/flow/FlowView2D.js +1 -1
  110. package/views/2d/engine/flow/dataUtils.js +1 -1
  111. package/views/2d/engine/flow/particleConstants.js +2 -0
  112. package/views/2d/engine/flow/styles/Imagery.js +1 -1
  113. package/views/2d/engine/flow/styles/Particles.js +1 -1
  114. package/views/2d/engine/flow/styles/Stack.js +1 -1
  115. package/views/2d/engine/flow/styles/Streamlines.js +1 -1
  116. package/views/2d/engine/flow/utils.js +1 -1
  117. package/views/2d/engine/imagery/RasterVFContainer.js +1 -1
  118. package/views/2d/engine/webgl/Painter.js +1 -1
  119. package/views/2d/engine/webgl/Profiler.js +1 -1
  120. package/views/2d/engine/webgl/WGLContainer.js +1 -1
  121. package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
  122. package/views/2d/engine/webgl/shaderGraph/techniques/TechniqueRegistry.js +1 -1
  123. package/views/2d/engine/webgl/shaderGraph/techniques/TestTechnique.js +1 -1
  124. package/views/2d/engine/webgl/shaderGraph/techniques/TextureStatisticsTechnique.js +1 -1
  125. package/views/2d/engine/webgl/shaderGraph/techniques/fill/FillTechnique.js +1 -1
  126. package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillTechnique.js +1 -1
  127. package/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillTechnique.js +1 -1
  128. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternFillTechnique.js +1 -1
  129. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillTechnique.js +1 -1
  130. package/views/2d/engine/webgl/shaderGraph/techniques/flow/FlowTechnique.js +2 -0
  131. package/views/2d/engine/webgl/shaderGraph/techniques/grid/GridTechnique.js +1 -1
  132. package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapTechnique.js +1 -1
  133. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  134. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelTechnique.js +1 -1
  135. package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeTechnique.js +1 -1
  136. package/views/2d/engine/webgl/shaderGraph/techniques/line/LineTechnique.js +1 -1
  137. package/views/2d/engine/webgl/shaderGraph/techniques/line/TexturedLineTechnique.js +1 -1
  138. package/views/2d/engine/webgl/shaderGraph/techniques/magnifier/MagnifierTechnique.js +1 -1
  139. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerTechnique.js +1 -1
  140. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterRegistry.js +1 -1
  141. package/views/2d/engine/webgl/shaderGraph/techniques/opacity/OpacityTechnique.js +1 -1
  142. package/views/2d/engine/webgl/shaderGraph/techniques/overlay/OverlayTechnique.js +1 -1
  143. package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartTechnique.js +1 -1
  144. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowImageryShader.js +2 -0
  145. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowParticlesShader.js +2 -0
  146. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowStreamlinesShader.js +2 -0
  147. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowUtils.js +2 -0
  148. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextTechnique.js +1 -1
  149. package/views/2d/engine/webgl/shaderGraph/techniques/tile/TileDebugInfoTechnique.js +1 -1
  150. package/views/2d/engine/webgl/shaderGraph/techniques/tile/TileStencilTechnique.js +1 -1
  151. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueBackground.js +1 -1
  152. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueCircle.js +1 -1
  153. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueFill.js +1 -1
  154. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueLine.js +1 -1
  155. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueSymbol.js +1 -1
  156. package/views/2d/engine/webgl/shaderGraph/techniques/videoScreenRenderer/VideoScreenTechnique.js +1 -1
  157. package/views/2d/engine/webgl/shaderGraph/typed/TypedShaderProgram.js +1 -1
  158. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  159. package/views/2d/interactive/editingTools/draw/DrawGraphicTool2D.js +1 -1
  160. package/views/2d/layers/features/FeatureContainer.js +1 -1
  161. package/views/2d/layers/features/RenderState.js +1 -1
  162. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  163. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  164. package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
  165. package/views/3d/layers/support/Tiles3DBVH.js +1 -1
  166. package/views/3d/layers/support/Tiles3DMeshIntersectionHandler.js +1 -1
  167. package/views/3d/support/gaussianSplatting/GaussianSplatIntersectionHandler.js +1 -1
  168. package/views/3d/support/orientedBoundingBox.js +1 -1
  169. package/views/3d/terrain/TerrainRenderer.js +1 -1
  170. package/views/3d/webgl-engine/collections/Component/ComponentObjectElevationAgnosticBVH.js +1 -1
  171. package/views/3d/webgl-engine/collections/Component/ComponentObjectFixedBVH.js +1 -1
  172. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  173. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
  174. package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceReflections.glsl.js +1 -1
  175. package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterColor.glsl.js +1 -1
  176. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  177. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  178. package/views/3d/webgl-engine/lib/GLMaterial.js +1 -1
  179. package/views/3d/webgl-engine/lib/GLMaterialLoader.js +2 -0
  180. package/views/3d/webgl-engine/lib/GLMaterialParameters.js +1 -1
  181. package/views/3d/webgl-engine/lib/GLMaterialRepository.js +1 -1
  182. package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
  183. package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
  184. package/views/3d/webgl-engine/lib/RenderContext.js +1 -1
  185. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  186. package/views/3d/webgl-engine/lib/ReprojectionUniforms.js +2 -0
  187. package/views/3d/webgl-engine/lib/ScreenSpaceReflectionsUniforms.js +2 -0
  188. package/views/3d/webgl-engine/lib/TriangleIntersectionData.js +1 -1
  189. package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
  190. package/views/3d/webgl-engine/lib/lodRendering/LodComponentData.js +1 -1
  191. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  192. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  193. package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
  194. package/views/3d/webgl-engine/materials/PolygonOffset.js +1 -1
  195. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  196. package/views/3d/webgl-engine/materials/TriangleMaterial.js +1 -1
  197. package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
  198. package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
  199. package/views/3d/webgl-engine/materials/renderers/VaoRenderer.js +1 -1
  200. package/views/3d/webgl-engine/shaders/CheckerBoardTechnique.js +1 -1
  201. package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
  202. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  203. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  204. package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
  205. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  206. package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechnique.js +1 -1
  207. package/views/3d/webgl-engine/shaders/Viewshed.glsl.js +1 -1
  208. package/views/draw/DrawTool.js +1 -1
  209. package/views/draw/plugins/ShapePlugin.js +1 -1
  210. package/views/draw/support/managers/GlobalStateManager.js +1 -1
  211. package/views/draw/support/types.d.ts +9 -0
  212. package/views/interactive/SegmentLabels.js +1 -1
  213. package/views/webgl/AllocationTracer.js +1 -1
  214. package/views/webgl/RenderingContext.js +1 -1
  215. package/widgets/Editor/components/Settings.js +1 -1
  216. package/widgets/Features/FeaturesViewModel.js +1 -1
  217. package/widgets/Features.js +1 -1
  218. package/widgets/Search/SearchViewModel.js +1 -1
  219. package/widgets/Search/support/layerSearchUtils.js +1 -1
  220. package/widgets/Search/support/locatorUtils.js +1 -1
  221. package/widgets/Sketch.js +1 -1
  222. package/widgets/support/SketchTooltipControls.js +1 -1
  223. package/assets/esri/core/workers/chunks/001492854799c35b53bb.js +0 -1
  224. package/assets/esri/core/workers/chunks/004f991251f09b36fb09.js +0 -1
  225. package/assets/esri/core/workers/chunks/01dd849a2d335e9f3e16.js +0 -1
  226. package/assets/esri/core/workers/chunks/027d733a99f50cadcf22.js +0 -1
  227. package/assets/esri/core/workers/chunks/03d85a706669aaf24d49.js +0 -1
  228. package/assets/esri/core/workers/chunks/0450133e81bce4b48b84.js +0 -1
  229. package/assets/esri/core/workers/chunks/085778ecd39f46324a6b.js +0 -1
  230. package/assets/esri/core/workers/chunks/08dce0019b52042b01fa.js +0 -1
  231. package/assets/esri/core/workers/chunks/0d8294982853308225da.js +0 -1
  232. package/assets/esri/core/workers/chunks/156aecac067213642aae.js +0 -1
  233. package/assets/esri/core/workers/chunks/184e9147f7a2f0ae5915.js +0 -1
  234. package/assets/esri/core/workers/chunks/19f59a2a97c33ff92650.js +0 -1
  235. package/assets/esri/core/workers/chunks/2b7d020367cb4ebb3c3d.js +0 -1
  236. package/assets/esri/core/workers/chunks/3104b10770903c265626.js +0 -1
  237. package/assets/esri/core/workers/chunks/33f00633131581e06328.js +0 -1
  238. package/assets/esri/core/workers/chunks/365ad1ffd496ed86637b.js +0 -1
  239. package/assets/esri/core/workers/chunks/3874362bf7d43adc41bb.js +0 -1
  240. package/assets/esri/core/workers/chunks/38dc1c4b8721efd4a165.js +0 -1
  241. package/assets/esri/core/workers/chunks/3e9700445518b8f9ae1b.js +0 -1
  242. package/assets/esri/core/workers/chunks/42f3fdad1728433b3510.js +0 -1
  243. package/assets/esri/core/workers/chunks/436941ec88439667022e.js +0 -1
  244. package/assets/esri/core/workers/chunks/4812482f28f7205b0938.js +0 -1
  245. package/assets/esri/core/workers/chunks/5317cbef0aac29761575.js +0 -1
  246. package/assets/esri/core/workers/chunks/54a9e17d6c0fef6a9146.js +0 -1
  247. package/assets/esri/core/workers/chunks/55985c9c48b8e1d1c634.js +0 -1
  248. package/assets/esri/core/workers/chunks/5e5b358e603b13b4d7d7.js +0 -1
  249. package/assets/esri/core/workers/chunks/63b9e4a7dad358605c38.js +0 -1
  250. package/assets/esri/core/workers/chunks/662932d2effd2b384b9e.js +0 -1
  251. package/assets/esri/core/workers/chunks/66d4cbb35d0c290150bf.js +0 -1
  252. package/assets/esri/core/workers/chunks/677d3674cb2c0c05fb7e.js +0 -1
  253. package/assets/esri/core/workers/chunks/6f58ec80abebb7bfbbb0.js +0 -1
  254. package/assets/esri/core/workers/chunks/7100c9038739121c2c4b.js +0 -1
  255. package/assets/esri/core/workers/chunks/794f604d4267e374f7dd.js +0 -1
  256. package/assets/esri/core/workers/chunks/7ae8f73c8e2afae98ecb.js +0 -1
  257. package/assets/esri/core/workers/chunks/7d4af7e2cb2f234e12eb.js +0 -1
  258. package/assets/esri/core/workers/chunks/807b12ace0099300b9b9.js +0 -1
  259. package/assets/esri/core/workers/chunks/816a4b03f2ea49238a6c.js +0 -1
  260. package/assets/esri/core/workers/chunks/842b442cc012d0797333.js +0 -1
  261. package/assets/esri/core/workers/chunks/8903ff28896bd6f34b0d.js +0 -1
  262. package/assets/esri/core/workers/chunks/89e9bc8789b100316136.js +0 -1
  263. package/assets/esri/core/workers/chunks/8afe32d3db9669f972bc.js +0 -1
  264. package/assets/esri/core/workers/chunks/91fd28f50477d16e294e.js +0 -1
  265. package/assets/esri/core/workers/chunks/953f671bdeb2ca9b9f37.js +0 -1
  266. package/assets/esri/core/workers/chunks/98011b93acf3d5f0b5a2.js +0 -1
  267. package/assets/esri/core/workers/chunks/9c7fd5db0813bdc38582.js +0 -1
  268. package/assets/esri/core/workers/chunks/a2fee1611319665e6aed.js +0 -1
  269. package/assets/esri/core/workers/chunks/a644e30f65347ce846ed.js +0 -1
  270. package/assets/esri/core/workers/chunks/a64daa4945923a178fe5.js +0 -1
  271. package/assets/esri/core/workers/chunks/a84d67c1a1008bca2075.js +0 -1
  272. package/assets/esri/core/workers/chunks/a85575a8d1da09280cd7.js +0 -1
  273. package/assets/esri/core/workers/chunks/ac4f7309a249132c22da.js +0 -1
  274. package/assets/esri/core/workers/chunks/aeb1900cfdd0e51cc5f8.js +0 -1
  275. package/assets/esri/core/workers/chunks/ba62f3aa811430787863.js +0 -1
  276. package/assets/esri/core/workers/chunks/c03d0091a6f385b9ce8d.js +0 -1
  277. package/assets/esri/core/workers/chunks/c20aaca8085ce897bd12.js +0 -1
  278. package/assets/esri/core/workers/chunks/c3e711dc608eedda2d14.js +0 -1
  279. package/assets/esri/core/workers/chunks/c4a9006cc6d2938570e0.js +0 -1
  280. package/assets/esri/core/workers/chunks/c692ea68509bddbf7b42.js +0 -1
  281. package/assets/esri/core/workers/chunks/cb8c17daec7055bf99cc.js +0 -1
  282. package/assets/esri/core/workers/chunks/d7439d357f68160844cb.js +0 -1
  283. package/assets/esri/core/workers/chunks/dd319d5fe89b275e93cf.js +0 -1
  284. package/assets/esri/core/workers/chunks/df3e79b56c37156e7895.js +0 -1
  285. package/assets/esri/core/workers/chunks/df8b80b17e371c9be4e6.js +0 -1
  286. package/assets/esri/core/workers/chunks/e77198f8ab47441423c5.js +0 -1
  287. package/assets/esri/core/workers/chunks/e786da40a1c87bed64ca.js +0 -1
  288. package/assets/esri/core/workers/chunks/e8aafef6342c50340a27.js +0 -1
  289. package/assets/esri/core/workers/chunks/ec00348d74e29f48613a.js +0 -1
  290. package/assets/esri/core/workers/chunks/f4201e7dcae224d0caf0.js +0 -1
  291. package/assets/esri/core/workers/chunks/f7cc05fbfc97b4d36eba.js +0 -1
  292. package/assets/esri/core/workers/chunks/f9d369a4683f88ee9d76.js +0 -1
  293. package/assets/esri/core/workers/chunks/fc534c94d55331578195.js +0 -1
  294. package/assets/esri/themes/base/colors/css/brand_colors.css +0 -76
  295. package/assets/esri/themes/base/colors/css/calcite_core_colors.css +0 -169
  296. package/assets/esri/themes/base/colors/css/calcite_core_colors_dark.css +0 -169
  297. package/assets/esri/themes/base/colors/css/calcite_gray_colors.css +0 -43
  298. package/assets/esri/themes/base/colors/css/calcite_gray_colors_dark.css +0 -43
  299. package/assets/esri/themes/base/colors/css/calcite_highlight_colors.css +0 -43
  300. package/assets/esri/themes/base/colors/css/calcite_highlight_colors_dark.css +0 -43
  301. package/assets/esri/themes/base/colors/css/calcite_vibrant_colors.css +0 -67
  302. package/assets/esri/themes/base/colors/css/calcite_vibrant_colors_dark.css +0 -67
  303. package/assets/esri/themes/base/colors/css/complete.css +0 -610
  304. package/assets/esri/themes/base/colors/css/scss/brand_colors.scss +0 -128
  305. package/assets/esri/themes/base/colors/css/scss/calcite_core_colors.scss +0 -289
  306. package/assets/esri/themes/base/colors/css/scss/calcite_core_colors_dark.scss +0 -285
  307. package/assets/esri/themes/base/colors/css/scss/calcite_gray_colors.scss +0 -96
  308. package/assets/esri/themes/base/colors/css/scss/calcite_gray_colors_dark.scss +0 -91
  309. package/assets/esri/themes/base/colors/css/scss/calcite_highlight_colors.scss +0 -69
  310. package/assets/esri/themes/base/colors/css/scss/calcite_highlight_colors_dark.scss +0 -65
  311. package/assets/esri/themes/base/colors/css/scss/calcite_vibrant_colors.scss +0 -128
  312. package/assets/esri/themes/base/colors/css/scss/calcite_vibrant_colors_dark.scss +0 -124
  313. package/assets/esri/themes/base/colors/css/scss/complete.scss +0 -11
  314. package/assets/esri/themes/base/colors/patterns_json/brand_colors.css +0 -366
  315. package/assets/esri/themes/base/colors/patterns_json/calcite_core_colors.css +0 -687
  316. package/assets/esri/themes/base/colors/patterns_json/calcite_core_colors_dark.css +0 -673
  317. package/assets/esri/themes/base/colors/patterns_json/calcite_gray_colors.css +0 -177
  318. package/assets/esri/themes/base/colors/patterns_json/calcite_gray_colors_dark.css +0 -169
  319. package/assets/esri/themes/base/colors/patterns_json/calcite_highlight_colors.css +0 -178
  320. package/assets/esri/themes/base/colors/patterns_json/calcite_highlight_colors_dark.css +0 -169
  321. package/assets/esri/themes/base/colors/patterns_json/calcite_vibrant_colors.css +0 -273
  322. package/assets/esri/themes/base/colors/patterns_json/calcite_vibrant_colors_dark.css +0 -265
  323. package/assets/esri/themes/base/colors/patterns_json/complete.css +0 -2847
  324. package/assets/esri/themes/base/colors/patterns_json/scss/brand_colors.scss +0 -464
  325. package/assets/esri/themes/base/colors/patterns_json/scss/calcite_core_colors.scss +0 -967
  326. package/assets/esri/themes/base/colors/patterns_json/scss/calcite_core_colors_dark.scss +0 -964
  327. package/assets/esri/themes/base/colors/patterns_json/scss/calcite_gray_colors.scss +0 -265
  328. package/assets/esri/themes/base/colors/patterns_json/scss/calcite_gray_colors_dark.scss +0 -263
  329. package/assets/esri/themes/base/colors/patterns_json/scss/calcite_highlight_colors.scss +0 -237
  330. package/assets/esri/themes/base/colors/patterns_json/scss/calcite_highlight_colors_dark.scss +0 -235
  331. package/assets/esri/themes/base/colors/patterns_json/scss/calcite_vibrant_colors.scss +0 -376
  332. package/assets/esri/themes/base/colors/patterns_json/scss/calcite_vibrant_colors_dark.scss +0 -347
  333. package/assets/esri/themes/base/colors/patterns_json/scss/complete.scss +0 -12
  334. package/assets/esri/themes/base/icons/readme/download.png +0 -0
  335. package/assets/esri/themes/base/icons/readme/import-icons.png +0 -0
  336. package/assets/esri/themes/base/icons/readme/import.png +0 -0
  337. package/assets/esri/themes/base/icons/readme/load.png +0 -0
  338. package/assets/esri/themes/base/icons/selection.json +0 -1
  339. package/assets/esri/themes/base/icons/style.css +0 -774
  340. package/views/2d/engine/brushes.js +0 -2
  341. package/views/2d/engine/flow/BrushFlow.js +0 -2
  342. package/views/2d/engine/rasterBrushes.js +0 -2
  343. package/views/2d/engine/webgl/brushes/BrushClip.js +0 -2
  344. package/views/2d/engine/webgl/brushes/WGLBrush.js +0 -2
  345. package/views/2d/engine/webgl/painter/RenderPass.js +0 -2
  346. package/views/2d/engine/webgl/shaders/BackgroundPrograms.js +0 -2
  347. package/views/2d/engine/webgl/shaders/TileInfoPrograms.js +0 -2
  348. package/views/3d/webgl-engine/lib/GLMaterials.js +0 -2
@@ -230,7 +230,7 @@ return fallOffFunction(vv, vn, 0.1);
230
230
  vec2 uvOffset = uv + rf * blurSize;
231
231
  blurFunction(uvOffset, rf, center_d, sharpness, w_total, b);
232
232
  }
233
- fragBlur = b / w_total;`),e}const d=Object.freeze(Object.defineProperty({__proto__:null,build:h},Symbol.toStringTag,{value:"Module"}))},43609(e,t,r){r.d(t,{a:()=>o,f:()=>s,n:()=>n});var i=r(34275);function n(e,t){o(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function o(e,t,r=2,n=r){const o=t.length/2;let s=0,a=0;if(!(0,i.iu)(t)||(0,i.dk)(t)){for(let i=0;i<o;++i)e[s]=t[a],e[s+1]=t[a+1],s+=r,a+=n;return}const c=(0,i.a3)(t);if((0,i.JI)(t))for(let i=0;i<o;++i)e[s]=Math.max(t[a]/c,-1),e[s+1]=Math.max(t[a+1]/c,-1),s+=r,a+=n;else for(let i=0;i<o;++i)e[s]=t[a]/c,e[s+1]=t[a+1]/c,s+=r,a+=n}function s(e,t,r,i){const n=e.typedBuffer,o=e.typedBufferStride,s=i?.count??e.count;let a=(i?.dstIndex??0)*o;for(let e=0;e<s;++e)n[a]=t,n[a+1]=r,a+=o}Object.freeze(Object.defineProperty({__proto__:null,fill:s,normalizeIntegerBuffer:o,normalizeIntegerBufferView:n},Symbol.toStringTag,{value:"Module"}))},73354(e,t,r){r.d(t,{a:()=>d,b:()=>c,c:()=>a,d:()=>o,e:()=>f,f:()=>h,l:()=>u,n:()=>m,t:()=>s});var i=r(40876),n=(r(44208),r(72727));function o(e,t,r){s(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function s(e,t,r,i=3,o=i){const s=(0,n.k)(e.length,i,3),a=(0,n.k)(t.length,o,3),c=Math.min(s,a),l=r[0],u=r[1],h=r[2],d=r[4],f=r[5],m=r[6],p=r[8],g=r[9],v=r[10],_=r[12],x=r[13],y=r[14];let w=0,b=0;for(let r=0;r<c;r++){const r=t[w],n=t[w+1],s=t[w+2];e[b]=l*r+d*n+p*s+_,e[b+1]=u*r+f*n+g*s+x,e[b+2]=h*r+m*n+v*s+y,w+=o,b+=i}return e}function a(e,t,r){c(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function c(e,t,r,i=3,o=i){const s=(0,n.k)(e.length,i,3),a=(0,n.k)(t.length,o,3),c=Math.min(s,a),l=r[0],u=r[1],h=r[2],d=r[3],f=r[4],m=r[5],p=r[6],g=r[7],v=r[8];let _=0,x=0;for(let r=0;r<c;r++){const r=t[_],n=t[_+1],s=t[_+2];e[x]=l*r+d*n+p*s,e[x+1]=u*r+f*n+g*s,e[x+2]=h*r+m*n+v*s,_+=o,x+=i}}function l(e,t,r,i=3,n=i){const o=Math.min(e.length/i,t.length/n);let s=0,a=0;for(let c=0;c<o;c++)e[a]=r*t[s],e[a+1]=r*t[s+1],e[a+2]=r*t[s+2],s+=n,a+=i;return e}function u(e,t,r,i){h(e.typedBuffer,t.typedBuffer,r,i,e.typedBufferStride,t.typedBufferStride)}function h(e,t,r,n,o=3,s=o){const a=Math.min(e.length/o,t.length/s);let c=0,l=0;const u=1/i.Tf;for(let i=0;i<a;i++)e[l]=n*(r*t[c])**u,e[l+1]=n*(r*t[c+1])**u,e[l+2]=n*(r*t[c+2])**u,c+=s,l+=o}function d(e,t,r,i=3,o=i){const s=(0,n.k)(e.length,i,3),a=(0,n.k)(t.length,o,3),c=Math.min(s,a);let l=0,u=0;for(let n=0;n<c;n++)e[u]=t[l]+r[0],e[u+1]=t[l+1]+r[1],e[u+2]=t[l+2]+r[2],l+=o,u+=i;return e}function f(e,t){m(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function m(e,t,r=3,i=r){const n=Math.min(e.length/r,t.length/i);let o=0,s=0;for(let a=0;a<n;a++){const n=t[o],a=t[o+1],c=t[o+2],l=n*n+a*a+c*c;if(l>0){const t=1/Math.sqrt(l);e[s]=t*n,e[s+1]=t*a,e[s+2]=t*c}o+=i,s+=r}}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:h,linearToSRGBView:u,normalize:m,normalizeView:f,scale:l,scaleView:function(e,t,r){l(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,r){const i=Math.min(e.count,t.count),n=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,a=t.typedBufferStride;let c=0,l=0;for(let e=0;e<i;e++)n[l]=s[c]>>r,n[l+1]=s[c+1]>>r,n[l+2]=s[c+2]>>r,c+=a,l+=o},transformMat3:c,transformMat3View:a,transformMat4:s,transformMat4View:o,translate:d},Symbol.toStringTag,{value:"Module"}))},69052(e,t,r){r.d(t,{hr:()=>n,ie:()=>c,uC:()=>a});var i=r(34727);class n{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return o(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,i.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+s(this.range,e-t,r)}minimalMonotonic(e,t,r){return o(this.range,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,t,r,i,n=0,o=!1){return(i-=n)<t?i+=s(e,t-i):i>r&&(i-=s(e,i-r)),o&&i===r&&(i=t),i+n}function s(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const a=new n(0,2*Math.PI),c=(new n(-Math.PI,Math.PI),new n(0,360))},4341(e,t,r){r.d(t,{I:()=>n});var i=r(26390);class n{constructor(e){this._allocator=e,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,i.d)(()=>this._reset()),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const e=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*o);this._items.length=Math.min(e,this._items.length),this._itemsPtr=0}_grow(){for(let e=0;e<Math.max(8,Math.min(this._items.length,o));e++)this._items.push(this._allocator())}}const o=1024},46140(e,t,r){r.d(t,{A:()=>n});var i=r(49186);class n{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new n(this.major,this.minor,this._context)}static parse(e,t=""){const[r,o]=e.split("."),s=/^\s*\d+\s*$/;if(!r?.match||!s.test(r))throw new i.A((t&&t+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e});if(!o?.match||!s.test(o))throw new i.A((t&&t+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e});const a=parseInt(r,10),c=parseInt(o,10);return new n(a,c,t)}}},61473(e,t,r){function i(e){return e=e||globalThis.location.hostname,l.some(t=>null!=e?.match(t))}function n(e,t){return e?(t=t||globalThis.location.hostname)?null!=t.match(o)||null!=t.match(a)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(s)||null!=t.match(c)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e:null}r.d(t,{EM:()=>n,b5:()=>i});const o=/^devext\.arcgis\.com$/,s=/^qaext\.arcgis\.com$/,a=/^[\w-]*\.mapsdevext\.arcgis\.com$/,c=/^[\w-]*\.mapsqa\.arcgis\.com$/,l=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local\.esri\.com$/,o,s,/^jsapps\.esri\.com$/,a,c]},88340(e,t,r){function i(){return new Float32Array(2)}function n(e,t){const r=new Float32Array(2);return r[0]=e,r[1]=t,r}function o(){return i()}function s(){return n(1,1)}function a(){return n(1,0)}function c(){return n(0,1)}r.d(t,{Un:()=>u,fA:()=>n,uY:()=>l,vt:()=>i});const l=o(),u=s(),h=a(),d=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:u,UNIT_X:h,UNIT_Y:d,ZEROS:l,clone:function(e){const t=new Float32Array(2);return t[0]=e[0],t[1]=e[1],t},create:i,fromValues:n,ones:s,unitX:a,unitY:c,zeros:o},Symbol.toStringTag,{value:"Module"}))},69397(e,t,r){r.d(t,{Qf:()=>c,Qh:()=>s,RS:()=>n,Ul:()=>f,i5:()=>d,lM:()=>o,qK:()=>u});var i=r(34275);const n=16;function o(e){if(!e)return 0;let t=u;for(const r in e)e.hasOwnProperty(r)&&(t+=a(e[r],!1));return t}function s(e){if(!e)return 0;if("number"==typeof e[0])return c(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return l(e,8);let r=h;for(let i=0;i<t;i++)r+=a(e[i]);return r}(e);let t=u;for(const r in e)e.hasOwnProperty(r)&&(t+=a(e[r]));return t}function a(e,t=!0){switch(typeof e){case"object":return t?s(e):u;case"string":return function(e){return 32+e.length}(e);case"number":return n;case"boolean":return 4;default:return 8}}function c(...e){return e.reduce((e,t)=>e+(t?(0,i.iu)(t)?t.byteLength+d:Array.isArray(t)?l(t,n):0:0),0)}function l(e,t){return h+e.length*t}const u=32,h=16,d=145,f=64},65806(e,t,r){r.d(t,{g:()=>s});var i=r(51850),n=r(91218),o=r(9762);function s(e,t,r,i){if((0,n.canProjectWithoutEngine)(e.spatialReference,r))return a[0]=e.x,a[1]=e.y,a[2]=e.z??0,(0,o.projectBuffer)(a,e.spatialReference,0,t,r,0);const s=(0,n.tryProject)(e,r,i);return!!s&&(t[0]=s.x,t[1]=s.y,t[2]=s.z??0,!0)}const a=(0,i.vt)()},27993(e,t,r){r.d(t,{F:()=>a});var i=r(91218),n=r(16930),o=r(9762),s=r(65806);function a(e,t,r,n){return!(null==t||null==n||e.length<2)&&((0,i.canProjectWithoutEngine)(t,n)?(0,o.projectBuffer)(e,t,0,r,n,0,1):(c.x=e[0],c.y=e[1],c.z=e[2],c.spatialReference=t,(0,s.g)(c,r,n)))}const c={x:0,y:0,z:0,hasZ:!0,hasM:!1,spatialReference:n.A.WGS84,type:"point"}},97146(e,t,r){r.d(t,{Dg:()=>o,my:()=>s,tM:()=>u,uW:()=>n});var i=r(34275);function n(e){return o(e,!0)}function o(e,t){if(Array.isArray(e)){if(e.length<i.y9)return e}else if(e.length<i.y9)return Array.from(e);let r=!0,n=!0;return e.some((e,t)=>(r=r&&0===e,n=n&&e===t,!r&&!n)),r?function(e){if(1===e)return c;if(e<i.y9)return new Array(e).fill(0);if(e>d.length){const t=Math.max(2*d.length,e);d=new Uint8Array(t)}return new Uint8Array(d.buffer,0,e)}(e.length):n?u(e.length):(0,i.iu)(e)&&e.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?e:function(e,t){for(const r of e){if(r>=65536)return(0,i.iu)(e)?e:new Uint32Array(e);r>=256&&(t=!1)}return t?new Uint8Array(e):new Uint16Array(e)}(e,!t)}function s(e){return e<=i.y9?new Array(e):e<=65536?new Uint16Array(e):new Uint32Array(e)}let a=h(131072);const c=[0],l=(()=>{const e=new Uint16Array(65536);for(let t=0;t<e.length;++t)e[t]=t;return e})();function u(e){return 1===e?c:e<i.y9?Array.from(new Uint16Array(l.buffer,0,e)):e<l.length?new Uint16Array(l.buffer,0,e):(e>a.length&&(a=h(Math.max(2*a.length,e))),new Uint32Array(a.buffer,0,e))}function h(e){const t=new Uint32Array(e);for(let e=0;e<t.length;e++)t[e]=e;return t}let d=new Uint8Array(65536)},72727(e,t,r){function i(e,t,r){if(t<=0)return 0;const i=e-r;return i<0?0:Math.floor(i/t)+1}r.d(t,{k:()=>i}),r(53966)},90239(e,t,r){function i(e){switch(e){case"u8":case"i8":return 1;case"u16":case"i16":case"f16":return 2;case"u32":case"i32":case"f32":return 4;case"f64":return 8}}r.d(t,{GJ:()=>i})},82919(e,t,r){r.d(t,{DV:()=>v,C:()=>p,vt:()=>f,Qy:()=>m,ui:()=>g,ST:()=>y,bU:()=>w,pw:()=>x,m7:()=>_,c8:()=>T});var i=r(4341),n=r(58083),o=r(35522),s=r(51850),a=r(78955),c=r(91829),l=r(71351);function u(e){return e?{ray:(0,l.vt)(e.ray),c0:e.c0,c1:e.c1}:{ray:(0,l.vt)(),c0:0,c1:Number.MAX_VALUE}}new i.I(()=>u());var h=r(27921),d=r(32114);function f(e){return e?[(0,h.vt)(e[0]),(0,h.vt)(e[1]),(0,h.vt)(e[2]),(0,h.vt)(e[3]),(0,h.vt)(e[4]),(0,h.vt)(e[5])]:[(0,h.vt)(),(0,h.vt)(),(0,h.vt)(),(0,h.vt)(),(0,h.vt)(),(0,h.vt)()]}function m(){return[(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)()]}function p(e,t){for(let r=0;r<M;r++)(0,h.C)(e[r],t[r]);return e}function g(e,t,r,i=A){const s=(0,n.lw)(d.Rc.get(),t,e);(0,n.B8)(s,s);for(let e=0;e<S;++e){const t=(0,a.Z0)(d.Km.get(),C[e],s);(0,o.hZ)(i[e],t[0]/t[3],t[1]/t[3],t[2]/t[3])}v(r,i)}function v(e,t){(0,h.Cr)(t[4],t[0],t[3],e[0]),(0,h.Cr)(t[1],t[5],t[6],e[1]),(0,h.Cr)(t[4],t[5],t[1],e[2]),(0,h.Cr)(t[3],t[2],t[6],e[3]),(0,h.Cr)(t[0],t[1],t[2],e[4]),(0,h.Cr)(t[5],t[4],t[7],e[5])}function _(e,t){for(let r=0;r<M;r++){const i=e[r];if(i[0]*t.center[0]+i[1]*t.center[1]+i[2]*t.center[2]+i[3]>=t.radius)return!1}return!0}function x(e,t){return b(e,function(e,t=u()){return(0,l.C)(e,t.ray),t.c0=0,t.c1=Number.MAX_VALUE,t}(t,E.get()))}function y(e,t,r){return b(e,function(e,t,r=u()){const i=(0,o.Bw)(e.vector);return(0,l.fA)(e.origin,t,r.ray),r.c0=0,r.c1=i,r}(t,r,E.get()))}function w(e,t){for(let r=0;r<M;r++)if((0,h.mN)(e[r],t)>0)return!1;return!0}function b(e,t){for(let r=0;r<M;r++)if(!(0,h.$Q)(e[r],t))return!1;return!0}const T={bottom:[5,1,0,4],near:[0,1,2,3],far:[5,4,7,6],right:[1,5,6,2],left:[4,0,3,7],top:[7,3,2,6]},M=6,S=8,C=[(0,c.fA)(-1,-1,-1,1),(0,c.fA)(1,-1,-1,1),(0,c.fA)(1,1,-1,1),(0,c.fA)(-1,1,-1,1),(0,c.fA)(-1,-1,1,1),(0,c.fA)(1,-1,1,1),(0,c.fA)(1,1,1,1),(0,c.fA)(-1,1,1,1)],E=new i.I(u),A=m()},11964(e,t,r){r.d(t,{Cr:()=>u,LV:()=>l,_I:()=>h,vt:()=>c});var i=r(34727),n=r(4341),o=r(35522),s=r(51850),a=r(32114);function c(e){return e?{origin:(0,s.o8)(e.origin),vector:(0,s.o8)(e.vector)}:{origin:(0,s.vt)(),vector:(0,s.vt)()}}function l(e,t){const r=d.get();return r.origin=e,r.vector=t,r}function u(e,t,r=c()){return(0,o.C)(r.origin,e),(0,o.Re)(r.vector,t,e),r}function h(e,t,r){return function(e,t,r,n,s){const{vector:c,origin:l}=e,u=(0,o.Re)(a.rq.get(),t,l),h=(0,o.Om)(c,u)/(0,o.m3)(c);return(0,o.hs)(s,c,(0,i.qE)(h,0,1)),(0,o.WQ)(s,s,e.origin)}(e,t,0,0,r)}(0,s.vt)(),(0,s.vt)();const d=new n.I(()=>c())},17136(e,t,r){r.d(t,{Y_:()=>A,O7:()=>C,el:()=>S});var i=r(92602),n=r(69052),o=r(49186),s=r(53966),a=r(39829),c=r(82799),l=r(16930),u=r(80754),h=r(21325),d=r(28735),f=r(11254),m=r(60408),p=r(65864),g=r(2272),v=r(84952),_=r(92300);const x=()=>s.A.getLogger("esri.geometry.support.normalizeUtils");function y(e){return"polygon"===e[0].type}function w(e){return"polyline"===e[0].type}function b(e,t,r){if(t){const t=function(e,t){if(!(e instanceof c.A||e instanceof a.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw x().error(e),new o.A("internal:geometry",e)}const r=(0,u.r8)(e),i=[];for(const e of r){const r=[];i.push(r),r.push([e[0][0],e[0][1]]);for(let i=0;i<e.length-1;i++){const n=e[i][0],o=e[i][1],s=e[i+1][0],a=e[i+1][1],c=Math.sqrt((s-n)*(s-n)+(a-o)*(a-o)),l=(a-o)/c,u=(s-n)/c,h=c/t;if(h>1){for(let e=1;e<=h-1;e++){const i=e*t,s=u*i+n,a=l*i+o;r.push([s,a])}const e=(c+Math.floor(h-1)*t)/2,i=u*e+n,s=l*e+o;r.push([i,s])}r.push([s,a])}}return function(e){return"polygon"===e.type}(e)?new a.A({rings:i,spatialReference:e.spatialReference}):new c.A({paths:i,spatialReference:e.spatialReference})}(e,1e6);e=(0,d.ci)(t,!0)}return r&&(e=(0,u.kS)(e,r)),e}function T(e,t,r){if(Array.isArray(e)){const i=e[0];if(i>t){const r=(0,u.kd)(i,t);e[0]=i+r*(-2*t)}else if(i<r){const t=(0,u.kd)(i,r);e[0]=i+t*(-2*r)}}else{const i=e.x;if(i>t){const r=(0,u.kd)(i,t);e=e.clone().offset(r*(-2*t),0)}else if(i<r){const t=(0,u.kd)(i,r);e=e.clone().offset(t*(-2*r),0)}}return e}function M(e,t){let r=-1;for(let i=0;i<t.cutIndexes.length;i++){const n=t.cutIndexes[i],o=t.geometries[i],s=(0,u.r8)(o);for(let e=0;e<s.length;e++){const t=s[e];t.some(r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const i=t[e][0];r=i>r?i:r}r=Number(r.toFixed(9));const i=-360*(0,u.kd)(r,180);for(let r=0;r<t.length;r++){const t=o.getPoint(e,r);o.setPoint(e,r,t.clone().offset(i,0))}return!0}})}if(n===r){if(y(e))for(const t of(0,u.r8)(o))e[n]=e[n].addRing(t);else if(w(e))for(const t of(0,u.r8)(o))e[n]=e[n].addPath(t)}else r=n,e[n]=o}return e}async function S(e,t,r){if(!Array.isArray(e))return S([e],t);t&&"string"!=typeof t&&x().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??i.A.geometryServiceUrl;let o,s,l,y,w,C,E,A,R=0;const I=[],O=[];for(const t of e)if(null!=t)if(o||(o=t.spatialReference,s=(0,h.Vp)(o),l=o.isWebMercator,C=l?102100:4326,y=u.j7[C].maxX,w=u.j7[C].minX,E=u.j7[C].plus180Line,A=u.j7[C].minus180Line),s)if("mesh"===t.type)O.push(t);else if("point"===t.type)O.push(T(t.clone(),y,w));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>T(e,y,w)),O.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,s);O.push(e.rings?new a.A(e):e)}else if(t.extent){const e=t.extent,r=(0,u.kd)(e.xmin,w)*(2*y);let i=0===r?t.clone():(0,u.kS)(t.clone(),r);e.offset(r,0);let{xmin:n,xmax:o}=e;n=Number(n.toFixed(9)),o=Number(o.toFixed(9)),e.intersects(E)&&o!==y?(R=o>R?o:R,i=b(i,l),I.push(i),O.push("cut")):e.intersects(A)&&n!==w?(R=o*(2*y)>R?o*(2*y):R,i=b(i,l,360),I.push(i),O.push("cut")):O.push(i)}else O.push(t.clone());else O.push(t);else O.push(t);let F=(0,u.kd)(R,y),N=-90;const D=F,P=new c.A;for(;F>0;){const e=360*F-180;P.addPath([[e,N],[e,-1*N]]),N*=-1,F--}if(I.length>0&&D>0){const t=M(I,await async function(e,t,r,i){const n=(0,g.Dl)(e),o=t[0].spatialReference,s={...i,responseType:"json",query:{...n.query,f:"json",sr:(0,h.YX)(o),target:JSON.stringify({geometryType:(0,m.$B)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},a=await(0,f.A)(n.path+"/cut",s),{cutIndexes:c,geometries:l=[]}=a.data;return{cutIndexes:c,geometries:l.map(e=>{const t=(0,p.rS)(e);return t.spatialReference=o,t})}}(n,I,P,r)),i=[],o=[];for(let r=0;r<O.length;r++){const n=O[r];if("cut"!==n)o.push(n);else{const n=t.shift(),s=e[r];null!=s&&"polygon"===s.type&&s.rings&&s.rings.length>1&&n.rings.length>=s.rings.length?(i.push(n),o.push("simplify")):o.push(l?(0,d.Gh)(n):n)}}if(!i.length)return o;const s=await async function(e,t,r){const i="string"==typeof e?(0,v.An)(e):e,n=t[0].spatialReference,o=(0,m.$B)(t[0]),s={...r,query:{...i.query,f:"json",sr:(0,h.YX)(n),geometries:JSON.stringify((0,_.X)(t))}},{data:a}=await(0,f.A)(i.path+"/simplify",s);return(0,_.V)(a.geometries,o,n)}(n,i,r),a=[];for(let e=0;e<o.length;e++){const t=o[e];"simplify"!==t?a.push(t):a.push(l?(0,d.Gh)(s.shift()):s.shift())}return a}const B=[];for(let e=0;e<O.length;e++){const t=O[e];if("cut"!==t)B.push(t);else{const e=I.shift();B.push(!0===l?(0,d.Gh)(e):e)}}return B}function C(e,t,r){const i=(0,h.Vp)(r);if(null==i)return e;const[n,o]=i.valid,s=2*o;let a=0,c=0;t>o?a=Math.ceil(Math.abs(t-o)/s):t<n&&(a=-Math.ceil(Math.abs(t-n)/s)),e>o?c=Math.ceil(Math.abs(e-o)/s):e<n&&(c=-Math.ceil(Math.abs(e-n)/s));let l=e+(a-c)*s;const u=l-t;return u>o?l-=s:u<n&&(l+=s),l}function E(e){const t=(0,h.Vp)(e);if(null==t)return null;const[r,i]=t.valid;return new n.hr(r,i)}const A=E(l.A.WGS84);E(l.A.WebMercator)},80754(e,t,r){r.d(t,{j7:()=>s,kS:()=>c,kd:()=>a,r8:()=>l});var i=r(82799),n=r(16930),o=r(60408);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function c(e,t){const r=l(e);for(const e of r)for(const r of e)r[0]+=t;return e}function l(e){return(0,o.Bi)(e)?e.rings:e.paths}},71351(e,t,r){r.d(t,{C:()=>u,Cr:()=>h,LV:()=>l,fA:()=>d,oC:()=>f,vt:()=>a}),r(4576);var i=r(4341),n=(r(77690),r(29242)),o=r(35522),s=r(51850);function a(e){return e?c((0,s.o8)(e.origin),(0,s.o8)(e.direction)):c((0,s.vt)(),(0,s.vt)())}function c(e,t){return{origin:e,direction:t}}function l(e,t){const r=m.get();return r.origin=e,r.direction=t,r}function u(e,t=a()){return d(e.origin,e.direction,t)}function h(e,t,r=a()){return(0,o.C)(r.origin,e),(0,o.Re)(r.direction,t,e),r}function d(e,t,r=a()){return(0,o.C)(r.origin,e),(0,o.C)(r.direction,t),r}function f(e,t,r){const i=(0,o.Om)(e.direction,(0,o.Re)(r,t,e.origin));return(0,o.WQ)(r,e.origin,(0,o.hs)(r,e.direction,i)),r}r(32114);const m=new i.I(()=>a());(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,n.vt)()},94008(e,t,r){r.d(t,{iy:()=>f}),r(44208),r(53966);var i=r(34727),n=r(34304),o=r(58083),s=r(35522),a=r(51850),c=r(91829),l=r(34275);var u=r(71351),h=r(44280),d=r(32114);class f{constructor(e=0,t=0,r=0,i=0){this.radius=i,"number"==typeof e?this._center=(0,a.fA)(e,t,r):function(e){return t=e,(0,l.vZ)(t)&&t.length>=3||function(e){return((0,l.aI)(e)||Array.isArray(e))&&e.length>=3}(e);var t}(e)||function(e){return(t=e)instanceof Float32Array&&t.length>=4||function(e){return Array.isArray(e)&&e.length>=4}(e);var t}(e)?(this._center=(0,a.ci)(e),this.radius=4===e.length?e[3]:t):(this._center=(0,a.o8)(e.center),this.radius=e.radius)}get isValid(){return this.radius>=0}invalidate(){this.radius=-1}get center(){return this._center}set center(e){(0,s.C)(this.center,e)}exactEquals(e){return(0,s.aI)(this._center,e.center)&&this.radius===e.radius}copyFrom(e){return e!==this&&((0,s.C)(this._center,e.center),this.radius=e.radius),this}clone(){return new f(this.center,this.radius)}toVec4(){return(0,c.fA)(this.center[0],this.center[1],this.center[2],this.radius)}contains(e){return(0,s.hG)(this.center,e)<=this.radius**2}intersectRay(e,t){if(null==e)return!1;if(!this._intersect(e,m))return!1;let{t0:r,t1:i}=m;if((r<0||i<r&&i>0)&&(r=i),r<0)return!1;if(t){const{origin:i,direction:n}=e;t[0]=i[0]+n[0]*r,t[1]=i[1]+n[1]*r,t[2]=i[2]+n[2]*r}return!0}intersectLine(e,t){const r=(0,u.Cr)(e,t);if(!this._intersect(r,m))return[];const{origin:i,direction:o}=r,{t0:c,t1:l}=m,h=e=>{const t=(0,a.vt)();return(0,s.Ln)(t,i,o,e),this.projectPoint(t,t)};return Math.abs(c-l)<(0,n.FD)()?[h(c)]:[h(c),h(l)]}_intersect(e,t){const{origin:r,direction:i}=e,n=p;n[0]=r[0]-this.center[0],n[1]=r[1]-this.center[1],n[2]=r[2]-this.center[2];const o=i[0]*i[0]+i[1]*i[1]+i[2]*i[2];if(0===o)return!1;const s=2*(i[0]*n[0]+i[1]*n[1]+i[2]*n[2]),a=s*s-4*o*(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]-this.radius**2);if(a<0)return!1;const c=Math.sqrt(a);return t.t0=(-s-c)/(2*o),t.t1=(-s+c)/(2*o),!0}projectPoint(e,t){const r=(0,s.Re)(d.rq.get(),e,this.center),i=(0,s.hs)(d.rq.get(),r,this.radius/(0,s.Bw)(r));return(0,s.WQ)(t,i,this.center)}closestPointOnSilhouette(e,t){const r=d.rq.get(),i=d.Rc.get();(0,s.$A)(r,e.origin,e.direction),(0,s.$A)(t,r,e.origin),(0,s.hs)(t,t,1/(0,s.Bw)(t)*this.radius);const n=this._angleToSilhouette(e.origin),a=(0,h.g7)(e.origin,t);return(0,o.$0)(i,a+n,r),(0,s.Z0)(t,t,i),t}frustumCoverage(e,t,r){const i=this.radius,n=i*i,o=e+.5*Math.PI,s=t*t+n-2*Math.cos(o)*t*i,a=Math.sqrt(s),c=s-n;if(c<=0)return.5;const l=Math.sqrt(c),u=Math.acos(l/a)-Math.asin(i/(a/Math.sin(o)));return Math.min(1,(u+.5*r)/r)}_angleToSilhouette(e){const t=(0,s.Re)(d.rq.get(),e,this.center),r=(0,s.Bw)(t),n=this.radius,o=n+Math.abs(n-r);return(0,i.XM)(n/o)}union(e){const t=(0,s.Io)(this._center,e.center),r=this.radius,i=e.radius;return t+i<r?this:t+r<i?(this.copyFrom(e),this):((0,s.Cc)(this._center,this._center,e.center,(t+i-r)/(2*t)),this.radius=(t+r+i)/2,this)}toJSON(){return{center:this.center,radius:this.radius}}signedDistanceToPlane(e){const{center:t,radius:r}=this,i=e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3];return i<0?Math.min(i+r,0):Math.max(i-r,0)}}new f;const m={t0:0,t1:0},p=(0,a.vt)();(0,a.vt)(),(0,a.vt)()},38969(e,t,r){r.d(t,{i:()=>n});var i=r(37955);function n(e,t){return new Promise((r,n)=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?r():(t((0,i.Oo)(e,"canplay",r)),t((0,i.Oo)(e,"error",n)))})}},92300(e,t,r){r.d(t,{V:()=>s,X:()=>o});var i=r(60408),n=r(65864);function o(e){return{geometryType:(0,i.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function s(e,t,r){const i=(0,n.xD)(t);return e.map(e=>{const t=i.fromJSON(e);return t.spatialReference=r,t})}},21015(e,t,r){r.d(t,{R:()=>c});var i=r(11254),n=r(60999),o=r(49186),s=r(17676),a=r(84952);class c{constructor(e=e=>e){this._resolveURI=e}async loadJSON(e,t){return this._load("json",e,t)}async loadBinary(e,t){return(0,a.DB)(e)?((0,s.Te)(t),(0,a.lJ)(e)):this._load("array-buffer",e,t)}async loadImage(e,t){return this._load("image",e,t)}async _load(e,t,r){t=this._resolveURI(t);const a=await(0,n.Ke)((0,i.A)(t,{responseType:e,...r}));if(a.ok)return a.value.data;throw(0,s.QP)(a.error),new o.A("gltf-loader-request-error",`Request for resource failed: ${a.error}`)}}},84498(e,t,r){r.d(t,{x:()=>s});var i=r(34275),n=r(97146),o=r(63907);function s(e,t){switch(t){case o.WR.TRIANGLES:return function(e){return"number"==typeof e?(0,n.tM)(e):(0,i.mg)(e)?new Uint16Array(e):e}(e);case o.WR.TRIANGLE_STRIP:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return[];const r=t-2,i=(0,n.my)(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(i[e++]=t,i[e++]=t+1,i[e++]=t+2):(i[e++]=t+1,i[e++]=t,i[e++]=t+2)}else{let t=0;for(let n=0;n<r;n+=1)n%2==0?(i[t++]=e[n],i[t++]=e[n+1],i[t++]=e[n+2]):(i[t++]=e[n+1],i[t++]=e[n],i[t++]=e[n+2])}return i}(e);case o.WR.TRIANGLE_FAN:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array(0);const r=t-2,i=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)i[e++]=0,i[e++]=t+1,i[e++]=t+2;return i}const n=e[0];let o=e[1],s=0;for(let t=0;t<r;++t){const r=e[t+2];i[s++]=n,i[s++]=o,i[s++]=r,o=r}return i}(e)}}},51530(e,t,r){r.d(t,{KB:()=>s,Xi:()=>n,pn:()=>a,x3:()=>o});var i=r(44208);class n{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding="image/ktx2"}}function o(e){return"encoded-mesh-texture"===e?.type}async function s(e){const t=new Blob([e]),r=await t.text();return JSON.parse(r)}async function a(e,t){if("image/ktx2"===t)return new n(e);const r=new Blob([e],{type:t});let o=URL.createObjectURL(r);switch(t){case"image/jpeg":o+="#.jpg";break;case"image/png":o+="#.png"}const s=new Image;if((0,i.A)("esri-iPhone"))return new Promise((e,t)=>{const r=()=>{n(),e(s)},i=e=>{n(),t(e)},n=()=>{URL.revokeObjectURL(o),s.removeEventListener("load",r),s.removeEventListener("error",i)};s.addEventListener("load",r),s.addEventListener("error",i),s.src=o});try{s.src=o,await s.decode()}catch(e){console.warn("Failed decoding HTMLImageElement")}return URL.revokeObjectURL(o),s}},91202(e,t,r){r.d(t,{fetch:()=>Mr});var i=r(40876),n=r(61473),o=r(34727),s=r(77690),a=r(29242),c=r(58083),l=r(9093),u=r(48163),h=r(35522),d=r(51850),f=r(70328),m=r(34275);function p(e,t=!1){return e<=m.y9?t?new Array(e).fill(0):new Array(e):new Float32Array(e)}var g=r(13030),v=r(73354),_=r(50867),x=r(43609),y=r(21015),w=r(84498),b=r(51530),T=r(88340);function M(e){if(null==e)return null;const t=null!=e.offset?e.offset:T.uY,r=null!=e.rotation?e.rotation:0,i=null!=e.scale?e.scale:T.Un,n=(0,a.fA)(1,0,0,0,1,0,t[0],t[1],1),o=(0,a.fA)(Math.cos(r),-Math.sin(r),0,Math.sin(r),Math.cos(r),0,0,0,1),c=(0,a.fA)(i[0],0,0,0,i[1],0,0,0,1),l=(0,a.vt)();return(0,s.lw)(l,o,c),(0,s.lw)(l,n,l),l}class S{constructor(){this.geometries=new Array,this.materials=new Array,this.textures=new Array}}class C{constructor(e,t,r){this.name=e,this.lodThreshold=t,this.pivotOffset=r,this.stageResources=new S,this.numberOfVertices=0}}var E=r(11254),A=r(60999),R=r(49186),I=r(53966),O=r(69397);class F{constructor(){this._outer=new Map}clear(){this._outer.clear()}get empty(){return 0===this._outer.size}get outerSize(){return this._outer.size}get size(){let e=0;for(const t of this._outer.values())e+=t.size;return e}get(e,t){return this._outer.get(e)?.get(t)}getInner(e){return this._outer.get(e)}set(e,t,r){const i=this._outer.get(e);i?i.set(t,r):this._outer.set(e,new Map([[t,r]]))}delete(e,t){const r=this._outer.get(e);r&&(r.delete(t),0===r.size&&this._outer.delete(e))}pop(e,t){const r=this.get(e,t);return this.delete(e,t),r}*outerMap(){for(const e of this._outer)yield e}*values(){for(const e of this._outer.values())yield*e.values()}*[Symbol.iterator](){for(const[e,t]of this._outer)for(const[r,i]of t)yield[e,r,i]}forEach(e){this._outer.forEach((t,r)=>e(t,r))}forAll(e){this._outer.forEach((t,r)=>t.forEach((t,i)=>e(t,r,i)))}copy(){const e=new F;return this.forAll((t,r,i)=>e.set(r,i,t)),e}}var N=r(17676),D=r(46140),P=r(97146);async function B(e,t){return(await(0,E.A)(e,{responseType:"image",...t})).data}var H=r(46610),L=r(20498);function z(e){if(e.length<m.y9)return Array.from(e);if(Array.isArray(e))return Float64Array.from(e);if(!("BYTES_PER_ELEMENT"in e))return Array.from(e);switch(e.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(e);case 2:return(0,m.LW)(e)?(0,L.pX)().from(e):(0,m.jq)(e)?Uint16Array.from(e):Int16Array.from(e);case 4:return Float32Array.from(e);default:return Float64Array.from(e)}}var U=r(15142),G=r(620);class V{get center(){return(0,d.fA)(this._data[0],this._data[1],this._data[2])}get radius(){return this._data[3]}get bbMin(){return(0,d.fA)(this._data[4],this._data[5],this._data[6])}get bbMax(){return(0,d.fA)(this._data[7],this._data[8],this._data[9])}constructor(e,t,r){this.primitiveIndices=e,this._numIndexPerPrimitive=t,this.position=r,this._data=[.1,0,0,0,0,0,0,0,0,0],this._children=void 0,(0,G.vA)(e.length>=1),(0,G.vA)(3===r.size||4===r.size);const{data:i,size:n,indices:o}=r;(0,G.vA)(o.length%this._numIndexPerPrimitive===0),(0,G.vA)(o.length>=e.length*this._numIndexPerPrimitive);const s=e.length;let a=n*o[this._numIndexPerPrimitive*e[0]];j.clear(),j.push(a);const c=(0,d.fA)(i[a],i[a+1],i[a+2]),l=(0,d.o8)(c);for(let t=0;t<s;++t){const r=this._numIndexPerPrimitive*e[t];for(let e=0;e<this._numIndexPerPrimitive;++e){a=n*o[r+e],j.push(a);let t=i[a];c[0]=Math.min(t,c[0]),l[0]=Math.max(t,l[0]),t=i[a+1],c[1]=Math.min(t,c[1]),l[1]=Math.max(t,l[1]),t=i[a+2],c[2]=Math.min(t,c[2]),l[2]=Math.max(t,l[2])}}for(let e=0;e<3;++e)this._data[4+e]=c[e],this._data[7+e]=l[e];const u=(0,h.Cc)((0,d.vt)(),this.bbMin,this.bbMax,.5);let f=.5*Math.max(Math.max(l[0]-c[0],l[1]-c[1]),l[2]-c[2]),m=f*f;for(let e=0;e<j.length;++e){a=j.at(e);const t=i[a]-u[0],r=i[a+1]-u[1],n=i[a+2]-u[2],o=t*t+r*r+n*n;if(o<=m)continue;const s=Math.sqrt(o),c=.5*(s-f);f+=c,m=f*f;const l=c/s;u[0]+=t*l,u[1]+=r*l,u[2]+=n*l}this._data[3]=f;for(let e=0;e<3;++e)this._data[0+e]=u[e];j.clear()}getChildren(){if(this._children||(0,h.hG)(this.bbMin,this.bbMax)<=1)return this._children;const e=(0,h.Cc)((0,d.vt)(),this.bbMin,this.bbMax,.5),t=this.primitiveIndices.length,r=new Uint8Array(t),i=new Array(8);for(let e=0;e<8;++e)i[e]=0;const{data:n,size:o,indices:s}=this.position;for(let a=0;a<t;++a){let t=0;const c=this._numIndexPerPrimitive*this.primitiveIndices[a];let l=o*s[c],u=n[l],h=n[l+1],d=n[l+2];for(let e=1;e<this._numIndexPerPrimitive;++e){l=o*s[c+e];const t=n[l],r=n[l+1],i=n[l+2];t<u&&(u=t),r<h&&(h=r),i<d&&(d=i)}u<e[0]&&(t|=1),h<e[1]&&(t|=2),d<e[2]&&(t|=4),r[a]=t,++i[t]}let a=0;for(let e=0;e<8;++e)i[e]>0&&++a;if(a<2)return;const c=new Array(8);for(let e=0;e<8;++e)c[e]=i[e]>0?new Uint32Array(i[e]):void 0;for(let e=0;e<8;++e)i[e]=0;for(let e=0;e<t;++e){const t=r[e];c[t][i[t]++]=this.primitiveIndices[e]}this._children=new Array;for(let e=0;e<8;++e)void 0!==c[e]&&this._children.push(new V(c[e],this._numIndexPerPrimitive,this.position));return this._children}static prune(){j.prune()}}const j=new U.A({deallocator:null});var k=r(24326);class W{constructor(e){this.id=(0,k.c)(),this._attributes=new Map;for(const[t,r]of e)this._attributes.set(t,{...r,indices:(0,P.Dg)(r.indices)})}get attributes(){return this._attributes}}var $=r(4341),Z=r(11964);function q(e,t,r){return(0,h.Re)(Y,t,e),(0,h.Re)(X,r,e),.5*(0,h.Bw)((0,h.$A)(Y,Y,X))}r(32114),new $.I(Z.vt),new $.I(()=>{return e?{p0:(0,d.o8)(e.p0),p1:(0,d.o8)(e.p1),p2:(0,d.o8)(e.p2)}:{p0:(0,d.vt)(),p1:(0,d.vt)(),p2:(0,d.vt)()};var e});const Y=(0,d.vt)(),X=(0,d.vt)(),J=(0,d.vt)(),K=(0,d.vt)(),Q=(0,d.vt)(),ee=(0,d.vt)();class te{constructor(){this.uid=(0,k.c)()}}class re extends te{constructor(e){super(),this.highlightName=e,this.channel=0}}var ie=r(94656);class ne extends W{constructor(e,t,r=null,i=0,n=null,o=-1,s,a){super(t),this.material=e,this.mapPositions=r,this.type=i,this.olidColor=n,this.edgeIndicesLength=o,this.baseGeometry=s,this.drawIndices=a,this._vertexPositionIndicesCache=void 0,this._highlights=null,this._highlightOptionsCounts=null,this.visible=!0,this._boundingInfo=null,(0,G.vA)((e?.useIndexing??!1)===(null!=a),"Material index requirement and Geometry must match");const c=this.positionAttribute;null!=c&&this.edgeIndicesLength<0&&(this.edgeIndicesLength=c.indices.length)}instantiate(e={}){const t=new ne(e.material||this.material,[],this.mapPositions,this.type,this.olidColor,this.edgeIndicesLength,this.baseGeometry,this.drawIndices);return this._attributes.forEach((e,r)=>{e.exclusive=!1,t._attributes.set(r,e)}),t._boundingInfo=this._boundingInfo,t.transformation=e.transformation||this.transformation,t}getMutableAttribute(e){let t=this._attributes.get(e);return t&&!t.exclusive&&(t={...t,exclusive:!0,data:z(t.data)},this._attributes.set(e,t)),t}setAttributeData(e,t){const r=this._attributes.get(e);r?this._attributes.set(e,{...r,exclusive:!0,data:t}):(0,ie.en)()&&console.warn(`Setting undefined attribute ${e} data`)}get primitivePositionIndices(){if(void 0!==this._vertexPositionIndicesCache)return this._vertexPositionIndicesCache;const{drawIndices:e}=this,t=this.positionAttribute;if(null!=e&&null!=t){const r=new Array;for(const i of e)r.push(t.indices[i]);this._vertexPositionIndicesCache=r}else this._vertexPositionIndicesCache=t?.indices??null;return this._vertexPositionIndicesCache}get positionAttribute(){return this.attributes.get("position")??this.baseGeometry?.attributes.get("position")}get indexCount(){const e=this.drawIndices??this.positionAttribute?.indices;return e?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return this._boundingInfo??=this._calculateBoundingInfo(),this._boundingInfo}computeAttachmentOrigin(e){return!!(0===this.type?this._computeAttachmentOriginTriangles(e):2===this.type?this._computeAttachmentOriginLines(e):this._computeAttachmentOriginPoints(e))&&(null!=this._transformation&&(0,h.Z0)(e,e,this._transformation),!0)}_computeAttachmentOriginTriangles(e){return function(e,t,r=t?.indices){if(!t||!r)return!1;const{size:i,data:n}=t;(0,h.hZ)(e,0,0,0),(0,h.hZ)(ee,0,0,0);let o=0,s=0;for(let t=0;t<r.length-2;t+=3){const a=r[t]*i,c=r[t+1]*i,l=r[t+2]*i;(0,h.hZ)(J,n[a],n[a+1],n[a+2]),(0,h.hZ)(K,n[c],n[c+1],n[c+2]),(0,h.hZ)(Q,n[l],n[l+1],n[l+2]);const u=q(J,K,Q);u?((0,h.WQ)(J,J,K),(0,h.WQ)(J,J,Q),(0,h.hs)(J,J,1/3*u),(0,h.WQ)(e,e,J),o+=u):((0,h.WQ)(ee,ee,J),(0,h.WQ)(ee,ee,K),(0,h.WQ)(ee,ee,Q),s+=3)}return!(0===s&&0===o||(0!==o?((0,h.hs)(e,e,1/o),0):0===s||((0,h.hs)(e,ee,1/s),0)))}(e,this.positionAttribute,this.primitivePositionIndices)}_computeAttachmentOriginLines(e){const t=this.positionAttribute,r=this.primitivePositionIndices;return function(e,t,r,i=t?.indices){if(!t||!i)return!1;(0,h.hZ)(e,0,0,0),(0,h.hZ)(ee,0,0,0);let n=0,o=0;const{size:s,data:a}=t,c=i.length-1,l=c+(r?2:0);for(let t=0;t<l;t+=2){const r=t<c?t+1:0,l=i[t<c?t:c]*s,u=i[r]*s;J[0]=a[l],J[1]=a[l+1],J[2]=a[l+2],K[0]=a[u],K[1]=a[u+1],K[2]=a[u+2],(0,h.hs)(J,(0,h.WQ)(J,J,K),.5);const d=(0,h.xg)(J,K);d>0?((0,h.WQ)(e,e,(0,h.hs)(J,J,d)),n+=d):0===n&&((0,h.WQ)(ee,ee,J),o++)}return 0!==n?((0,h.hs)(e,e,1/n),!0):0!==o&&((0,h.hs)(e,ee,1/o),!0)}(e,t,function(e,t){return!(!("isClosed"in e)||!e.isClosed)&&t.indices.length>2}(this.material.parameters,t),r)}_computeAttachmentOriginPoints(e){return function(e,t,r=t?.indices){if(!t||!r)return!1;const{size:i,data:n}=t;(0,h.hZ)(e,0,0,0);let o=-1,s=0;for(let t=0;t<r.length;t++){const a=r[t]*i;o!==a&&(e[0]+=n[a],e[1]+=n[a+1],e[2]+=n[a+2],s++),o=a}return s>1&&(0,h.hs)(e,e,1/s),s>0}(e,this.positionAttribute,this.primitivePositionIndices)}invalidateBoundingInfo(){this._boundingInfo=null,this._vertexPositionIndicesCache=void 0}_calculateBoundingInfo(){const e=this.positionAttribute,t=this.primitivePositionIndices;if(!e||!t||0===t.length)return null;const r=t===e.indices?e:new H.n(e.data,t,e.size,!1,e.stride),i=0===this.type?3:1;(0,G.vA)(t.length%i===0,"Indexing error: "+t.length+" not divisible by "+i);const n=(0,P.tM)(t.length/i);return new V(n,i,r)}get transformation(){return this._transformation??l.zK}set transformation(e){this._transformation=e&&e!==l.zK?(0,l.o8)(e):null}get highlights(){return this._highlights||oe}get hasHighlights(){return(this._highlightOptionsCounts?.size??0)>0}foreachHighlightOptions(e){this._highlightOptionsCounts?.forEach((t,r)=>e(r))}allocateIdAndHighlight(e){const t=new re(e);return this.addHighlight(t)}addHighlight(e){this._ensureHighlights().add(e);const{highlightName:t}=e,r=(this._highlightOptionsCounts?.get(t)??0)+1;return this._ensureHighlightOptionsCounts().set(t,r),e}_ensureHighlights(){let e=this._highlights;return e||(e=new Set,this._highlights=e),e}_ensureHighlightOptionsCounts(){let e=this._highlightOptionsCounts;return e||(e=new Map,this._highlightOptionsCounts=e),e}removeHighlight(e){if(this._highlights?.delete(e)){const{highlightName:t}=e,r=this._highlightOptionsCounts?.get(t)??0;r<=1?this._highlightOptionsCounts?.delete(t):this._ensureHighlightOptionsCounts().set(t,r-1)}}}const oe=new Set;var se=r(65529),ae=r(97768),ce=r(84952),le=r(38969),ue=r(95117),he=r(2741);let de;var fe=r(63907),me=r(76284),pe=r(42293);let ge=null,ve=null;async function _e(){return null==ve&&(de??=(async()=>{const e=await r.e(9321).then(r.bind(r,49321)),t=await e.default({locateFile:e=>(0,he.s)(`esri/libs/basisu/${e}`)});return t.initializeBasis(),t})(),ve=de,ge=await ve),ve}function xe(e,t,r,i,n){const o=(0,pe.MW)(t?fe.CQ.COMPRESSED_RGBA8_ETC2_EAC:fe.CQ.COMPRESSED_RGB8_ETC2),s=n&&e>1?(4**e-1)/(3*4**(e-1)):1;return Math.ceil(r*i*o*s)}function ye(e){return e.getNumImages()>=1&&!e.isUASTC()}function we(e){return e.getFaces()>=1&&(e.isETC1S()||e.isUASTC())}function be(e,t,r,i,n,o,s,a){const{compressedTextureETC:c,compressedTextureS3TC:l}=e.capabilities,[u,h]=c?i?[1,fe.CQ.COMPRESSED_RGBA8_ETC2_EAC]:[0,fe.CQ.COMPRESSED_RGB8_ETC2]:l?i?[3,fe.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT]:[2,fe.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT]:[13,6408],d=t.hasMipmap?r:Math.min(1,r),f=[];for(let e=0;e<d;e++)f.push(new Uint8Array(s(e,u))),a(e,u,f[e]);return t.internalFormat=h,t.hasMipmap=f.length>1,t.samplingMode=t.hasMipmap?9987:9729,t.width=n,t.height=o,new me.A(e,t,{type:"compressed",levels:f})}const Te=()=>I.A.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");function Me(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const Se=Me("DXT1"),Ce=Me("DXT3"),Ee=Me("DXT5");function Ae(e,t){return t=16*Math.floor(t/16),Math.min(16*Math.round(e/16),t)}function Re(e,t){const[r,i]=function({width:e,height:t},{maxPreferredTexturePixels:r,maxTextureSize:i}){const n=Math.max(e,t),o=e*t;if(n<=i&&o<=r)return[e,t];const s=Math.min(Math.sqrt(r/o),i/n);return[Ae(Math.round(e*s),i),Ae(Math.round(t*s),i)]}(e,t);return e.width===r&&e.height===i?e:Ie(e,r,i)}function Ie(e,t,r){if(e instanceof ImageData)return Ie(function(e){const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const r=t.getContext("2d");if(null==r)throw new R.A("texture:context-failed","Failed to create 2d context from HTMLCanvasElement");return r.putImageData(e,0,0),t}(e),t,r);const i=document.createElement("canvas");return i.width=t,i.height=r,i.getContext("2d").drawImage(e,0,0,i.width,i.height),i}var Oe=r(67171);class Fe{constructor(e,t){this._data=e,this.id=(0,k.c)(),this.events=new se.bk,this._parameters={...De,...t},this._startPreload(e)}dispose(){this.unload(),this._data=this.update=void 0}_startPreload(e){e instanceof HTMLVideoElement?(this.update=t=>this._update(e,t),this._startPreloadVideoElement(e)):e instanceof HTMLImageElement&&this._startPreloadImageElement(e)}_startPreloadVideoElement(e){if(!((0,ce.w8)(e.src)||"auto"===e.preload&&e.crossOrigin)&&(e.preload="auto",e.crossOrigin="anonymous",e.src=e.src,e.paused&&e.autoplay)){const t=[];(0,le.i)(e,e=>t.push(e)).then(()=>{e.play()}).finally(()=>t.forEach(e=>e.remove()))}}_startPreloadImageElement(e){(0,ce.DB)(e.src)||(0,ce.w8)(e.src)||e.crossOrigin||(e.crossOrigin="anonymous",e.src=e.src)}_createDescriptor(e){const t=new Oe.R;return t.wrapMode=this._parameters.wrap??10497,t.flipped=!this._parameters.noUnpackFlip,t.samplingMode=this._parameters.mipmap?9987:9729,t.hasMipmap=!!this._parameters.mipmap,t.preMultiplyAlpha=!!this._parameters.preMultiplyAlpha,t.maxAnisotropy=this._parameters.maxAnisotropy??(this._parameters.mipmap?e.parameters.maxMaxAnisotropy:1),t.dataType=this._parameters.dataType??t.dataType,t.pixelFormat=this._parameters.pixelFormat??t.pixelFormat,t.internalFormat=this._parameters.internalFormat??t.internalFormat,t}get texture(){return this._texture??this._emptyTexture}get loaded(){return null!=this._texture}get usedMemory(){return this._texture?.usedMemory||function(e,t){if(null==e)return 0;if((0,m.mw)(e)||(0,m.mg)(e))return"image/ktx2"===t.encoding?function(e,t){if(null==ge)return e.byteLength;const r=new ge.KTX2File(new Uint8Array(e)),i=we(r)?xe(r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):"image/x.basis"===t.encoding?function(e,t){if(null==ge)return e.byteLength;const r=new ge.BasisFile(new Uint8Array(e)),i=ye(r)?xe(r.getNumLevels(0),r.getHasAlpha(),r.getImageWidth(0,0),r.getImageHeight(0,0),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):e.byteLength;const{width:r,height:i}=e instanceof Image||e instanceof ImageData||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement?Ne(e):t,n=t.pixelFormat??6408,o=(0,pe.wH)(n);return(t.mipmap?4/3:1)*r*i*o||0}(this._data,this._parameters)}load(e){if(this._loadingPromise)return this._loadingPromise;if(this._texture)return this._texture;const t=this._data;return null==t?(this._texture=new me.A(e,this._createDescriptor(e),null),this._texture):(this._emptyTexture=e.emptyTexture,this._parameters.reloadable||(this._data=void 0),"string"==typeof t?this._loadFromURL(e,t):t instanceof Image?this._loadFromImageElement(e,t):t instanceof HTMLVideoElement?this._loadFromVideoElement(e,t):t instanceof ImageData||t instanceof HTMLCanvasElement?this._loadFromImage(e,t):(0,m.mg)(t)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(e,t):(0,m.mw)(t)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(e,new Uint8Array(t)):((0,m.mw)(t)||(0,m.mg)(t))&&"image/ktx2"===this._parameters.encoding?this._loadFromKTX2(e,t):((0,m.mw)(t)||(0,m.mg)(t))&&"image/x.basis"===this._parameters.encoding?this._loadFromBasis(e,t):(0,m.mw)(t)?this._loadFromPixelData(e,new Uint8Array(t)):(0,m.iu)(t)?this._loadFromPixelData(e,t):null)}_update(e,t){return null==this._texture||e.readyState<HTMLMediaElement.HAVE_CURRENT_DATA||t===e.currentTime?t:(this._texture.setData(e),this._texture.descriptor.hasMipmap&&this._texture.generateMipmap(),this._parameters.updateCallback&&this._parameters.updateCallback(),e.currentTime)}_loadFromDDSData(e,t){return this._texture=function(e,t,r){const i=function(e,t){const r=new Int32Array(e.buffer,e.byteOffset,31);if(542327876!==r[0])return Te().error("Invalid magic number in DDS header"),null;if(!(4&r[20]))return Te().error("Unsupported format, must contain a FourCC code"),null;const i=r[21];let n,o;switch(i){case Se:n=8,o=fe.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case Ce:n=16,o=fe.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case Ee:n=16,o=fe.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return Te().error("Unsupported FourCC code:",function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}(i)),null}let s=1,a=r[4],c=r[3];(3&a||3&c)&&(Te().warn("Rounding up compressed texture size to nearest multiple of 4."),a=a+3&-4,c=c+3&-4);const l=a,u=c;let h,d;131072&r[2]&&!1!==t&&(s=Math.max(1,r[7]));let f=e.byteOffset+r[1]+4;const m=[];for(let t=0;t<s;++t)d=(a+3>>2)*(c+3>>2)*n,h=new Uint8Array(e.buffer,f,d),m.push(h),f+=d,a=Math.max(1,a>>1),c=Math.max(1,c>>1);return{textureData:{type:"compressed",levels:m},internalFormat:o,width:l,height:u}}(r,t.hasMipmap??!1);if(null==i)throw new Error("DDS texture data is null");const{textureData:n,internalFormat:o,width:s,height:a}=i;return t.samplingMode=n.levels.length>1?9987:9729,t.hasMipmap=n.levels.length>1,t.internalFormat=o,t.width=s,t.height=a,new me.A(e,t,n)}(e,this._createDescriptor(e),t),this._emptyTexture=null,this._texture}_loadFromKTX2(e,t){return this._loadAsync(()=>async function(e,t,r){null==ge&&(ge=await _e());const i=new ge.KTX2File(new Uint8Array(r));if(!we(i))return null;i.startTranscoding();const n=be(e,t,i.getLevels(),i.getHasAlpha(),i.getWidth(),i.getHeight(),(e,t)=>i.getImageTranscodedSizeInBytes(e,0,0,t),(e,t,r)=>i.transcodeImage(r,e,0,0,t,0,-1,-1));return i.close(),i.delete(),n}(e,this._createDescriptor(e),t).then(e=>(this._texture=e,e)))}_loadFromBasis(e,t){return this._loadAsync(()=>async function(e,t,r){null==ge&&(ge=await _e());const i=new ge.BasisFile(new Uint8Array(r));if(!ye(i))return null;i.startTranscoding();const n=be(e,t,i.getNumLevels(0),i.getHasAlpha(),i.getImageWidth(0,0),i.getImageHeight(0,0),(e,t)=>i.getImageTranscodedSizeInBytes(0,e,t),(e,t,r)=>i.transcodeImage(r,0,e,t,0,0));return i.close(),i.delete(),n}(e,this._createDescriptor(e),t).then(e=>(this._texture=e,e)))}_loadFromPixelData(e,t){(0,G.vA)(this._parameters.width>0&&this._parameters.height>0);const r=this._createDescriptor(e);return 6407!==r.pixelFormat&&6408!==r.pixelFormat||(r.compress=this._parameters.compressionOptions),r.width=this._parameters.width??0,r.height=this._parameters.height??0,this._texture=new me.A(e,r,t),this._texture}_loadFromURL(e,t){return this._loadAsync(async r=>{const i=await B(t,{signal:r});return(0,N.Te)(r),this._loadFromImage(e,i)})}_loadFromImageElement(e,t){return t.complete?this._loadFromImage(e,t):this._loadAsync(async r=>{const i=await(0,ue.y)(t,t.src,!1,r);return(0,N.Te)(r),this._loadFromImage(e,i)})}_loadFromVideoElement(e,t){return t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?this._loadFromImage(e,t):this._loadFromVideoElementAsync(e,t)}_loadFromVideoElementAsync(e,t){return this._loadAsync(r=>new Promise((i,n)=>{const o=()=>{t.removeEventListener("loadeddata",s),t.removeEventListener("error",a),(0,ae.xt)(c)},s=()=>{t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA&&(o(),i(this._loadFromImage(e,t)))},a=e=>{o(),n(e||new R.A("texture:load-error","Failed to load video"))};t.addEventListener("loadeddata",s),t.addEventListener("error",a);const c=(0,N.u7)(r,()=>a((0,N.NK)()))}))}_loadFromImage(e,t){let r=t;r instanceof HTMLVideoElement||(r=Re(r,e.parameters));const i=Ne(r);this._parameters.width=i.width,this._parameters.height=i.height;const n=this._createDescriptor(e);return n.width=i.width,n.height=i.height,n.compress=this._parameters.compressionOptions,this._texture=new me.A(e,n,r),this._emptyTexture=null,this.events.emit("loaded"),this._texture}_loadAsync(e){const t=new AbortController;this._loadingController=t;const r=e(t.signal);this._loadingPromise=r;const i=()=>{this._loadingController===t&&(this._loadingController=null),this._loadingPromise===r&&(this._loadingPromise=null),this._emptyTexture=null};return r.then(i,i),r}unload(){if(this._texture=(0,ae.WD)(this._texture),this._emptyTexture=null,null!=this._loadingController){const e=this._loadingController;this._loadingController=null,this._loadingPromise=null,e.abort()}this.events.emit("unloaded")}get parameters(){return this._parameters}}function Ne(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e}const De={wrap:{s:10497,t:10497},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1};var Pe=r(49255);class Be{constructor(e){this._material=e.material,this._techniques=e.techniques,this._output=e.output}dispose(){}get _stippleTextures(){return this._techniques.context?.stippleTextures}get _markerTextures(){return this._techniques.context?.markerTextures}getTechnique(e,t){return this._techniques.get(e,this._material.getConfiguration(t))}ensureResources(e){return 2}}var He=r(65786);class Le extends Be{constructor(e){super(e),this._numLoading=0,this._disposed=!1,this._textures=e.textures,this.updateTexture(e.textureId),this._acquire(e.normalTextureId,e=>this._textureNormal=e),this._acquire(e.emissiveTextureId,e=>this._textureEmissive=e),this._acquire(e.occlusionTextureId,e=>this._textureOcclusion=e),this._acquire(e.metallicRoughnessTextureId,e=>this._textureMetallicRoughness=e)}dispose(){super.dispose(),this._texture=(0,ae.Gz)(this._texture),this._textureNormal=(0,ae.Gz)(this._textureNormal),this._textureEmissive=(0,ae.Gz)(this._textureEmissive),this._textureOcclusion=(0,ae.Gz)(this._textureOcclusion),this._textureMetallicRoughness=(0,ae.Gz)(this._textureMetallicRoughness),this._disposed=!0}ensureResources(e){return 0===this._numLoading?2:1}get textureBindParameters(){return new Ue(this._texture?.texture??null,this._textureNormal?.texture??null,this._textureEmissive?.texture??null,this._textureOcclusion?.texture??null,this._textureMetallicRoughness?.texture??null)}updateTexture(e){null!=this._texture&&e===this._texture.id||(this._texture=(0,ae.Gz)(this._texture),this._acquire(e,e=>this._texture=e))}_acquire(e,t){if(null==e)return void t(null);const r=this._textures.acquire(e);if((0,N.$X)(r))return++this._numLoading,void r.then(e=>{if(this._disposed)return(0,ae.Gz)(e),void t(null);t(e)}).finally(()=>--this._numLoading);t(r)}}class ze extends He.Y{constructor(e=null){super(),this.textureEmissive=e}}class Ue extends ze{constructor(e,t,r,i,n,o,s){super(r),this.texture=e,this.textureNormal=t,this.textureOcclusion=i,this.textureMetallicRoughness=n,this.scale=o,this.normalTextureTransformMatrix=s}}var Ge=r(19245);class Ve{constructor(e,t){this.id=(0,k.c)(),this.supportsEdges=!1,this._renderPriority=0,this._parameters=new t,(0,Ge.MB)(this._parameters,e),this.validateParameters(this._parameters)}get useIndexing(){return this.parameters.useIndexing??!1}get parameters(){return this._parameters}update(e){return!1}setParameters(e,t=!0){(0,Ge.MB)(this._parameters,e)&&(this.validateParameters(this._parameters),t&&this._parametersChanged())}validateParameters(e){}shouldRender(e){return this.visible&&this.isVisibleForOutput(e.output)&&(!this.parameters.isDecoration||e.bind.decorations)&&0!==(this.parameters.renderOccluded&e.renderOccludedMask)}isVisibleForOutput(e){return!0}get renderPriority(){return this._renderPriority}set renderPriority(e){e!==this._renderPriority&&(this._renderPriority=e,this._parametersChanged())}_parametersChanged(){this.repository?.materialChanged(this)}get renderOccludedFlags(){return this.visible?this.parameters.renderOccluded:0}get testsTransparentRenderOrder(){return this.parameters.testsTransparentRenderOrder}get hasEmissions(){return!1}getConfiguration(e){return this.updateConfiguration(e),this._configuration}updateConfiguration(e){this._configuration.output=e.output,this._configuration.hasEmission=e.hasEmission&&(0,Pe._o)(e.output),this._configuration.hasHighlightMixTexture=10===e.output&&null!=e.highlightMixTexture,this._configuration.useFloatBlend=e.useFloatBlend.value}}He.Y;class je{constructor(e=0,t=!1,r=!0){this.tolerance=e,this.isVerticalRay=t,this.normalRequired=r}}const ke=(0,f.vt)();function We(e,t,r,i,n,o){if(!e.visible)return;const s=(0,h.jb)(nt,i,r),a=(e,t,r)=>o(e,r,t),{tolerance:c}=t,l=new je(c,!1,t.options.normalRequired);if(e.boundingInfo)(0,G.vA)(0===e.type),Ze(e.boundingInfo,r,s,c,n,l,a);else{const t=e.positionAttribute,i=e.primitivePositionIndices;!function(e,t,r,i,n,o,s,a,c,l){const u=t,d=ot,f=Math.abs(u[0]),m=Math.abs(u[1]),p=Math.abs(u[2]),g=f>=m?f>=p?0:2:m>=p?1:2,v=g,_=u[v]<0?2:1,x=(g+_)%3,y=(g+(3-_))%3,w=u[x]/u[v],b=u[y]/u[v],T=1/u[v],M=Ye,S=Xe,C=Je,{normalRequired:E}=c;for(let t=r;t<i;++t){const r=3*t,i=s*n[r];(0,h.hZ)(d[0],o[i+0],o[i+1],o[i+2]);const c=s*n[r+1];(0,h.hZ)(d[1],o[c+0],o[c+1],o[c+2]);const u=s*n[r+2];(0,h.hZ)(d[2],o[u+0],o[u+1],o[u+2]),a&&((0,h.C)(d[0],a.applyToVertex(d[0][0],d[0][1],d[0][2],t)),(0,h.C)(d[1],a.applyToVertex(d[1][0],d[1][1],d[1][2],t)),(0,h.C)(d[2],a.applyToVertex(d[2][0],d[2][1],d[2][2],t))),(0,h.jb)(M,d[0],e),(0,h.jb)(S,d[1],e),(0,h.jb)(C,d[2],e);const f=M[x]-w*M[v],m=M[y]-b*M[v],p=S[x]-w*S[v],g=S[y]-b*S[v],_=C[x]-w*C[v],A=C[y]-b*C[v],R=_*g-A*p,I=f*A-m*_,O=p*m-g*f;if((R<0||I<0||O<0)&&(R>0||I>0||O>0))continue;const F=R+I+O;if(0===F)continue;const N=R*(T*M[v])+I*(T*S[v])+O*(T*C[v]);if(N*Math.sign(F)<0)continue;const D=N/F;D>=0&&l(D,t,E?Qe(d):null)}}(r,s,0,i.length/3,i,t.data,t.stride,n,l,a)}}const $e=(0,d.vt)();function Ze(e,t,r,i,n,o,s){if(null==e)return;const a=function(e,t){return(0,h.hZ)(t,1/e[0],1/e[1],1/e[2])}(r,$e);if((0,f.Ne)(ke,e.bbMin),(0,f.vI)(ke,e.bbMax),null!=n&&n.applyToAabb(ke),function(e,t,r,i){return function(e,t,r,i){const n=(e[0]-i-t[0])*r[0],o=(e[3]+i-t[0])*r[0];let s=Math.min(n,o),a=Math.max(n,o);const c=(e[1]-i-t[1])*r[1],l=(e[4]+i-t[1])*r[1];if(a=Math.min(a,Math.max(c,l)),a<0)return!1;if(s=Math.max(s,Math.min(c,l)),s>a)return!1;const u=(e[2]-i-t[2])*r[2],h=(e[5]+i-t[2])*r[2];return a=Math.min(a,Math.max(u,h)),!(a<0)&&(s=Math.max(s,Math.min(u,h)),!(s>a)&&s<1/0)}(e,t,r,i)}(ke,t,a,i)){const{primitiveIndices:a,position:c}=e,l=a?a.length:c.indices.length/3;if(l>rt){const a=e.getChildren();if(void 0!==a){for(const e of a)Ze(e,t,r,i,n,o,s);return}}!function(e,t,r,i,n,o,s,a,c,l,u){const h=e[0],d=e[1],f=e[2],m=t[0],p=t[1],g=t[2],{normalRequired:v}=l;for(let e=0;e<i;++e){const t=a[e],r=3*t,i=s*n[r];let l=o[i],_=o[i+1],x=o[i+2];const y=s*n[r+1];let w=o[y],b=o[y+1],T=o[y+2];const M=s*n[r+2];let S=o[M],C=o[M+1],E=o[M+2];null!=c&&([l,_,x]=c.applyToVertex(l,_,x,e),[w,b,T]=c.applyToVertex(w,b,T,e),[S,C,E]=c.applyToVertex(S,C,E,e));const A=w-l,R=b-_,I=T-x,O=S-l,F=C-_,N=E-x,D=p*N-F*g,P=g*O-N*m,B=m*F-O*p,H=A*D+R*P+I*B;if(Math.abs(H)<=it)continue;const L=h-l,z=d-_,U=f-x,G=L*D+z*P+U*B;if(H>0){if(G<0||G>H)continue}else if(G>0||G<H)continue;const V=z*I-R*U,j=U*A-I*L,k=L*R-A*z,W=m*V+p*j+g*k;if(H>0){if(W<0||G+W>H)continue}else if(W>0||G+W<H)continue;const $=(O*V+F*j+N*k)/H;$>=0&&u($,t,v?Ke(A,R,I,O,F,N,qe):null)}}(t,r,0,l,c.indices,c.data,c.stride,a,n,o,s)}}const qe=(0,d.vt)();const Ye=(0,d.vt)(),Xe=(0,d.vt)(),Je=(0,d.vt)();function Ke(e,t,r,i,n,o,s){return(0,h.hZ)(et,e,t,r),(0,h.hZ)(tt,i,n,o),(0,h.$A)(s,et,tt),(0,h.S8)(s,s),s}function Qe(e){return(0,h.jb)(et,e[1],e[0]),(0,h.jb)(tt,e[2],e[0]),(0,h.$A)(qe,et,tt),(0,h.S8)(qe,qe),qe}const et=(0,d.vt)(),tt=(0,d.vt)(),rt=1e3,it=1e-7,nt=(0,d.vt)(),ot=[(0,d.vt)(),(0,d.vt)(),(0,d.vt)()];var st=r(16396);function at(e,t,r){const{data:i,indices:n}=e,o=t.typedBuffer,s=t.typedBufferStride,a=n.length;r*=s;for(let e=0;e<a;++e){const t=2*n[e];o[r]=i[t],o[r+1]=i[t+1],r+=s}}function ct(e,t,r,i=1){const{data:n,indices:o}=e,s=t.typedBuffer,a=t.typedBufferStride,c=o.length;if(r*=a,1===i)for(let e=0;e<c;++e){const t=3*o[e];s[r]=n[t],s[r+1]=n[t+1],s[r+2]=n[t+2],r+=a}else for(let e=0;e<c;++e){const t=3*o[e];for(let e=0;e<i;++e)s[r]=n[t],s[r+1]=n[t+1],s[r+2]=n[t+2],r+=a}}function lt(e,t,r,i=1){const{data:n,indices:o}=e,s=t.typedBuffer,a=t.typedBufferStride,c=o.length;if(r*=a,1===i)for(let e=0;e<c;++e){const t=4*o[e];s[r]=n[t],s[r+1]=n[t+1],s[r+2]=n[t+2],s[r+3]=n[t+3],r+=a}else for(let e=0;e<c;++e){const t=4*o[e];for(let e=0;e<i;++e)s[r]=n[t],s[r+1]=n[t+1],s[r+2]=n[t+2],s[r+3]=n[t+3],r+=a}}function ut(e,t,r,i,n=1){const o=t.typedBuffer,s=t.typedBufferStride;if(i*=s,1===n)for(let t=0;t<r;++t)o[i]=e[0],o[i+1]=e[1],o[i+2]=e[2],o[i+3]=e[3],i+=s;else for(let t=0;t<r;++t)for(let t=0;t<n;++t)o[i]=e[0],o[i+1]=e[1],o[i+2]=e[2],o[i+3]=e[3],i+=s}function ht(e,t,r,i,n,o){switch(e){case"position":{(0,G.vA)(3===t.size);const i=n.getField(e,g.xs);(0,G.vA)(!!i,`No buffer view for ${e}`),function(e,t,r,i,n=1){if(!t)return void ct(e,r,i,n);const{data:o,indices:s}=e,a=r.typedBuffer,l=r.typedBufferStride,u=s.length,h=t[0],d=t[1],f=t[2],m=t[4],p=t[5],g=t[6],v=t[8],_=t[9],x=t[10],y=t[12],w=t[13],b=t[14];i*=l;let T=0,M=0,S=0;const C=(0,c.tZ)(t)?e=>{T=o[e]+y,M=o[e+1]+w,S=o[e+2]+b}:e=>{const t=o[e],r=o[e+1],i=o[e+2];T=h*t+m*r+v*i+y,M=d*t+p*r+_*i+w,S=f*t+g*r+x*i+b};if(1===n)for(let e=0;e<u;++e)C(3*s[e]),a[i]=T,a[i+1]=M,a[i+2]=S,i+=l;else for(let e=0;e<u;++e){C(3*s[e]);for(let e=0;e<n;++e)a[i]=T,a[i+1]=M,a[i+2]=S,i+=l}}(t,r,i,o);break}case"normal":{(0,G.vA)(3===t.size);const r=n.getField(e,g.xs);(0,G.vA)(!!r,`No buffer view for ${e}`),function(e,t,r,i,n=1){if(!t)return void ct(e,r,i,n);const{data:o,indices:s}=e,a=t,l=r.typedBuffer,u=r.typedBufferStride,h=s.length,d=a[0],f=a[1],m=a[2],p=a[4],g=a[5],v=a[6],_=a[8],x=a[9],y=a[10],w=!(0,c.ut)(a),b=1e-6,T=1-b;i*=u;let M=0,S=0,C=0;const E=(0,c.tZ)(a)?e=>{M=o[e],S=o[e+1],C=o[e+2]}:e=>{const t=o[e],r=o[e+1],i=o[e+2];M=d*t+p*r+_*i,S=f*t+g*r+x*i,C=m*t+v*r+y*i};if(1===n)if(w)for(let e=0;e<h;++e){E(3*s[e]);const t=M*M+S*S+C*C;if(t<T&&t>b){const e=1/Math.sqrt(t);l[i]=M*e,l[i+1]=S*e,l[i+2]=C*e}else l[i]=M,l[i+1]=S,l[i+2]=C;i+=u}else for(let e=0;e<h;++e)E(3*s[e]),l[i]=M,l[i+1]=S,l[i+2]=C,i+=u;else for(let e=0;e<h;++e){if(E(3*s[e]),w){const e=M*M+S*S+C*C;if(e<T&&e>b){const t=1/Math.sqrt(e);M*=t,S*=t,C*=t}}for(let e=0;e<n;++e)l[i]=M,l[i+1]=S,l[i+2]=C,i+=u}}(t,i,r,o);break}case"normalCompressed":case"profileRight":case"profileUp":{(0,G.vA)(2===t.size);const r=n.getField(e,g.mJ);(0,G.vA)(!!r,`No buffer view for ${e}`),at(t,r,o);break}case"uv0":{(0,G.vA)(2===t.size);const r=n.getField(e,g.ZD)??n.getField(e,g.gH);(0,G.vA)(!!r,`No buffer view for ${e}`),at(t,r,o);break}case"uvi":{(0,G.vA)(2===t.size);const r=n.getField(e,g.mJ);(0,G.vA)(!!r,`No buffer view for ${e}`),at(t,r,o);break}case"color":case"symbolColor":{const r=n.getField(e,g.XP);(0,G.vA)(!!r,`No buffer view for ${e}`),(0,G.vA)(3===t.size||4===t.size),function(e,t,r,i,n=1){const{data:o,indices:s}=e,a=r.typedBuffer,c=r.typedBufferStride,l=s.length;if(i*=c,t===o.length&&4===t){a[i]=o[0],a[i+1]=o[1],a[i+2]=o[2],a[i+3]=o[3];const e=new Uint32Array(r.typedBuffer.buffer,r.start),t=c/4,s=e[i/=4];i+=t;const u=l*n;for(let r=1;r<u;++r)e[i]=s,i+=t;return}if(1!==n)if(4!==t)for(let e=0;e<l;++e){const t=3*s[e];for(let e=0;e<n;++e)a[i]=o[t],a[i+1]=o[t+1],a[i+2]=o[t+2],a[i+3]=255,i+=c}else for(let e=0;e<l;++e){const t=4*s[e];for(let e=0;e<n;++e)a[i]=o[t],a[i+1]=o[t+1],a[i+2]=o[t+2],a[i+3]=o[t+3],i+=c}else{if(4===t){for(let e=0;e<l;++e){const t=4*s[e];a[i]=o[t],a[i+1]=o[t+1],a[i+2]=o[t+2],a[i+3]=o[t+3],i+=c}return}for(let e=0;e<l;++e){const t=3*s[e];a[i]=o[t],a[i+1]=o[t+1],a[i+2]=o[t+2],a[i+3]=255,i+=c}}}(t,t.size,r,o);break}case"colorFeatureAttribute":case"opacityFeatureAttribute":case"sizeFeatureAttribute":{const r=n.getField(e,g.Y$)??n.getField(e,g.Y$);(0,G.vA)(!!r,`No buffer view for ${e}`),(0,G.vA)(1===t.size),function(e,t,r){const{data:i,indices:n}=e,o=t.typedBuffer,s=t.typedBufferStride,a=n.length,c=i[0];r*=s;for(let e=0;e<a;++e)o[r]=c,r+=s}(t,r,o);break}case"tangent":{(0,G.vA)(4===t.size);const i=n.getField(e,g.Eq);(0,G.vA)(!!i,`No buffer view for ${e}`),function(e,t,r,i,n=1){if(!t)return void lt(e,r,i,n);const{data:o,indices:s}=e,a=t,l=r.typedBuffer,u=r.typedBufferStride,h=s.length,d=a[0],f=a[1],m=a[2],p=a[4],g=a[5],v=a[6],_=a[8],x=a[9],y=a[10],w=!(0,c.ut)(a),b=1e-6,T=1-b;if(i*=u,1===n)for(let e=0;e<h;++e){const t=4*s[e],r=o[t],n=o[t+1],a=o[t+2],c=o[t+3];let h=d*r+p*n+_*a,M=f*r+g*n+x*a,S=m*r+v*n+y*a;if(w){const e=h*h+M*M+S*S;if(e<T&&e>b){const t=1/Math.sqrt(e);h*=t,M*=t,S*=t}}l[i]=h,l[i+1]=M,l[i+2]=S,l[i+3]=c,i+=u}else for(let e=0;e<h;++e){const t=4*s[e],r=o[t],a=o[t+1],c=o[t+2],h=o[t+3];let M=d*r+p*a+_*c,S=f*r+g*a+x*c,C=m*r+v*a+y*c;if(w){const e=M*M+S*S+C*C;if(e<T&&e>b){const t=1/Math.sqrt(e);M*=t,S*=t,C*=t}}for(let e=0;e<n;++e)l[i]=M,l[i+1]=S,l[i+2]=C,l[i+3]=h,i+=u}}(t,r,i,o);break}case"profileVertexAndNormal":{(0,G.vA)(4===t.size);const r=n.getField(e,g.jz)??n.getField(e,g.Eq);(0,G.vA)(!!r,`No buffer view for ${e}`),lt(t,r,o);break}case"profileAuxData":{(0,G.vA)(3===t.size);const r=n.getField(e,g.EC)??n.getField(e,g.xs);(0,G.vA)(!!r,`No buffer view for ${e}`),ct(t,r,o);break}}}(0,d.vt)();class dt{constructor(e){this.layout=e}elementCount(e){return e.get("position").indices.length}write(e,t,r,i,n,o){return function(e,t,r,i,n,o,s){let a={numItems:0,numVerticesPerItem:0};for(const c of r.fields.keys()){const r=e.get(c),l=r?.indices;if(r&&l)"position"===c&&(a={numItems:1,numVerticesPerItem:l.length}),ht(c,r,i,n,o,s);else if("olidColor"===c&&null!=t){const r=e.get("position")?.indices;if(r){const e=r.length;ut(t,o.getField(c,g.XP),e,s)}}}return a}(r,i,this.layout,e,t,n,o)}}var ft=r(5482),mt=r(91429),pt=r(91829),gt=r(4431),vt=r(1843),_t=r(72824),xt=r(13840),yt=r(42958),wt=r(16943),bt=r(90644);const Tt=(0,bt.p3)(1,0,1,771);function Mt(e,t=!1){switch(e){case 0:return t?bt.RC:bt.T8;case 1:return Tt;default:return null}}function St(e){if(e.draped)return null;switch(e.output){case 0:case 2:default:return e.writeDepth?bt.Uy:null;case 1:return null}}function Ct(e,t=513){return{func:(0,Pe.Sp)(e)?515:t}}const Et={mask:255},At={function:{func:519,ref:2,mask:2},operation:{fail:7680,zFail:7680,zPass:0}},Rt={function:{func:519,ref:2,mask:2},operation:{fail:7680,zFail:7680,zPass:7681}};var It=r(4576);r(66289);var Ot=r(69622),Ft=r(32728);class Nt{constructor(e){this.localTransform=e.localTransform,this.globalTransform=e.globalTransform,this.modelOrigin=e.modelOrigin,this.model=e.instanceModel,this.modelNormal=e.instanceModelNormal,this.modelScaleFactors=e.modelScaleFactors,this.boundingSphere=e.boundingSphere,this.featureAttribute=e.getField("instanceFeatureAttribute",g.Eq),this.color=e.getField("instanceColor",g.XP),this.olidColor=e.getField("instanceOlidColor",g.XP),this.state=e.getField("state",g.SL),this.lodLevel=e.getField("lodLevel",g.SL)}}let Dt=class extends Ot.A{constructor(e,t){super(e),this.events=new se.bk,this._capacity=0,this._size=0,this._next=0,this._highlightOptionsMap=new Map,this._highlightOptionsMapPrev=new Map,this._layout=function(e){return Bt(Pt.clone(),e).u8("state").u8("lodLevel")}(t),this._capacity=Gt,this._buffer=this._layout.createBuffer(this._capacity),this._view=new Nt(this._buffer)}get capacity(){return this._capacity}get size(){return this._size}get view(){return this._view}addInstance(){this._size+1>this._capacity&&this._grow();const e=this._findSlot();return this._view.state.set(e,1),this._size++,this.events.emit("instances-changed"),e}removeInstance(e){const t=this._view.state;(0,G.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),this._getStateFlag(e,18)?this._setStateFlags(e,32):this.freeInstance(e),this.events.emit("instances-changed")}freeInstance(e){const t=this._view.state;(0,G.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),t.set(e,0),this._size--}setLocalTransform(e,t,r=!0){this._view.localTransform.setMat(e,t),r&&this.updateModelTransform(e)}getLocalTransform(e,t){this._view.localTransform.getMat(e,t)}setGlobalTransform(e,t,r=!0){this._view.globalTransform.setMat(e,t),r&&this.updateModelTransform(e)}getGlobalTransform(e,t){this._view.globalTransform.getMat(e,t)}updateModelTransform(e){const t=this._view,r=Ht,i=Lt;t.localTransform.getMat(e,zt),t.globalTransform.getMat(e,Ut);const n=(0,c.lw)(Ut,Ut,zt);(0,h.hZ)(r,n[12],n[13],n[14]),t.modelOrigin.setVec(e,r),(0,s.z0)(i,n),t.model.setMat(e,i);const o=(0,Ft.wp)(Ht,n);o.sort(),t.modelScaleFactors.set(e,0,o[1]),t.modelScaleFactors.set(e,1,o[2]),(0,s.B8)(i,i),(0,s.mg)(i,i),t.modelNormal.setMat(e,i),this._setStateFlags(e,64),this.events.emit("instance-transform-changed",{index:e})}getModelTransform(e,t){const r=this._view;r.model.getMat(e,Lt),r.modelOrigin.getVec(e,Ht),t[0]=Lt[0],t[1]=Lt[1],t[2]=Lt[2],t[3]=0,t[4]=Lt[3],t[5]=Lt[4],t[6]=Lt[5],t[7]=0,t[8]=Lt[6],t[9]=Lt[7],t[10]=Lt[8],t[11]=0,t[12]=Ht[0],t[13]=Ht[1],t[14]=Ht[2],t[15]=1}applyShaderTransformation(e,t){null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedModelTransform(e,t){return this.getModelTransform(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t),t}getCombinedLocalTransform(e,t){this._view.localTransform.getMat(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedMaxScaleFactor(e){let t=this._view.modelScaleFactors.get(e,1);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(Ht,this,e),t*=Math.max(Ht[0],Ht[1],Ht[2])),t}getCombinedMedianScaleFactor(e){let t=this._view.modelScaleFactors.get(e,0);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(Ht,this,e),t*=function(e,t,r){return Math.max(Math.min(e,t),Math.min(Math.max(e,t),r))}(Ht[0],Ht[1],Ht[2])),t}getModel(e,t){this._view.model.getMat(e,t)}setFeatureAttribute(e,t){this._view.featureAttribute?.setVec(e,t)}getFeatureAttribute(e,t){this._view.featureAttribute?.getVec(e,t)}setColor(e,t){this._view.color?.setVec(e,t)}setObjectAndLayerIdColor(e,t){this._view.olidColor?.setVec(e,t)}setVisible(e,t){t!==this.getVisible(e)&&(this._setStateFlag(e,4,t),this.events.emit("instance-visibility-changed",{index:e}))}getVisible(e){return this._getStateFlag(e,4)}setHighlight(e,t){const{_highlightOptionsMap:r}=this,i=r.get(e);t?t!==i&&(r.set(e,t),this._setStateFlag(e,8,!0),this.events.emit("instance-highlight-changed")):i&&(r.delete(e),this._setStateFlag(e,8,!1),this.events.emit("instance-highlight-changed"))}get highlightOptionsMap(){return this._highlightOptionsMap}getHighlightStateFlag(e){return this._getStateFlag(e,8)}geHighlightOptionsPrev(e){const t=this._highlightOptionsMapPrev.get(e)??null;return this._highlightOptionsMapPrev.delete(e),t}getHighlightName(e){const t=this.highlightOptionsMap.get(e)??null;return t?this._highlightOptionsMapPrev.set(e,t):this._highlightOptionsMapPrev.delete(e),t}getState(e){return this._view.state.get(e)}getLodLevel(e){return this._view.lodLevel.get(e)}countFlags(e){let t=0;for(let r=0;r<this._capacity;++r)this.getState(r)&e&&++t;return t}_setStateFlags(e,t){const r=this._view.state;t=r.get(e)|t,r.set(e,t)}_clearStateFlags(e,t){const r=this._view.state;t=r.get(e)&~t,r.set(e,t)}_setStateFlag(e,t,r){r?this._setStateFlags(e,t):this._clearStateFlags(e,t)}_getStateFlag(e,t){return!!(this._view.state.get(e)&t)}_grow(){this._capacity=Math.max(Gt,Math.floor(this._capacity*It.Ji)),this._buffer=this._layout.createBuffer(this._capacity).copyFrom(this._buffer),this._view=new Nt(this._buffer)}_findSlot(){const e=this._view.state;let t=this._next;for(;1&e.get(t);)t=t+1===this._capacity?0:t+1;return this._next=t+1===this._capacity?0:t+1,t}};(0,ft.Cg)([(0,mt.MZ)({constructOnly:!0})],Dt.prototype,"shaderTransformation",void 0),(0,ft.Cg)([(0,mt.MZ)()],Dt.prototype,"_size",void 0),(0,ft.Cg)([(0,mt.MZ)({readOnly:!0})],Dt.prototype,"size",null),Dt=(0,ft.Cg)([(0,mt.$K)("esri.views.3d.webgl-engine.lib.lodRendering.InstanceData")],Dt);const Pt=(0,vt.BP)().mat4f64("localTransform").mat4f64("globalTransform").vec4f64("boundingSphere").vec3f64("modelOrigin").mat3f("instanceModel").mat3f("instanceModelNormal").vec2f("modelScaleFactors");function Bt(e,t){return t.instancedFeatureAttribute&&e.vec4f("instanceFeatureAttribute"),t.instancedColor&&e.vec4u8("instanceColor"),(0,wt.E)()&&e.vec4u8("instanceOlidColor"),e}const Ht=(0,d.vt)(),Lt=(0,a.vt)(),zt=(0,l.vt)(),Ut=(0,l.vt)(),Gt=64,Vt=(0,vt.BP)().vec3f("instanceModelOriginHi").vec3f("instanceModelOriginLo").mat3f("instanceModel").mat3f("instanceModelNormal");var jt=r(74810);const kt={factor:-1,units:-2},Wt=new Array;function $t({output:e,enableOITOffset:t,polygonOffset:r}){return(0,Pe.Sp)(e)?t?kt:null:Wt[r]}Wt[0]=null,Wt[1]={factor:1,units:1},Wt[2]={factor:-5,units:-5},Wt[3]={factor:0,units:-4},Wt[4]={factor:1,units:2};var Zt=r(28491),qt=r(49788);class Yt extends _t.Zo{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=jt.mb,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=2,this.instanced=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.instanceColorEncodesAlphaIgnore=!1,this.emissiveStrengthFromSymbol=0,this.emissiveStrengthKHR=1,this.emissiveSource=1,this.emissiveBaseColor=d.uY,this.instancedDoublePrecision=!1,this.normalType=0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=(0,d.CN)(.2,.2,.2),this.diffuse=(0,d.CN)(.8,.8,.8),this.externalColor=(0,pt.fA)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,d.vt)(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.modelTransformation=null,this.drivenOpacity=!1,this.writeDepth=!0,this.customDepthTest=0,this.textureAlphaMode=0,this.textureAlphaCutoff=qt.Q,this.textureAlphaPremultiplied=!1,this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}_t.gy;let Xt=class extends yt.w{constructor(e,t){let i=(0,gt.U)(Qt(t));t.instanced&&t.instancedDoublePrecision&&(i=i.concat((0,gt.U)(function(e){return Bt(Vt.clone(),e)}(t)))),super(e,t,i),this.shader=new xt.r(Zt.D,()=>r.e(5141).then(r.bind(r,5141))),this.ignoreUnused=!0}_makePipeline(e,t){const{output:r,transparent:i,cullFace:n,customDepthTest:o,hasOccludees:s}=e;return(0,bt.Ey)({blending:i?Mt(r):null,culling:Kt(e)?(0,bt.Xt)(n):null,depthTest:Ct(r,Jt(o)),depthWrite:St(e),colorWrite:bt.kn,stencilWrite:s?Et:null,stencilTest:s?t?Rt:At:null,polygonOffset:$t(e)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e,t){return t?this._occludeePipelineState:super.getPipeline(e)}};function Jt(e){switch(e){case 1:return 515;case 0:case 3:return 513;case 2:return 516}}function Kt(e){return 0!==e.cullFace||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}function Qt(e){const t=(0,vt.BP)().vec3f("position");return 1===e.normalType?t.vec2i16("normalCompressed",{glNormalized:!0}):t.vec3f("normal"),e.hasVertexTangents&&t.vec4f("tangent"),e.hasTextures&&t.vec2f16("uv0"),e.hasVertexColors&&t.vec4u8("color",{glNormalized:!0}),e.hasSymbolColors&&t.vec4u8("symbolColor"),!e.instanced&&(0,wt.E)()&&t.vec4u8("olidColor"),t}Xt=(0,ft.Cg)([(0,mt.$K)("esri.views.3d.webgl-engine.shaders.DefaultMaterialTechnique")],Xt);var er=r(51976),tr=r(68317);class rr extends tr.Hz{constructor(){super(...arguments),this.hasHighlightMixTexture=!1,this.bindType=1,this.instanced=!1,this.writeDepth=!0,this.oitPremultipliedAlpha=!1}}(0,ft.Cg)([(0,er.W)()],rr.prototype,"hasHighlightMixTexture",void 0);class ir extends rr{constructor(){super(...arguments),this.polygonOffset=0,this.transparent=!1,this.enableOITOffset=!0}}(0,ft.Cg)([(0,er.W)({count:5})],ir.prototype,"polygonOffset",void 0),(0,ft.Cg)([(0,er.W)()],ir.prototype,"transparent",void 0),(0,ft.Cg)([(0,er.W)()],ir.prototype,"enableOITOffset",void 0);class nr extends ir{constructor(e){super(),this.spherical=e,this.alphaDiscardMode=1,this.doubleSidedMode=0,this.pbrMode=0,this.cullFace=0,this.normalType=0,this.customDepthTest=0,this.emissionSource=0,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.instanced=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.textureAlphaPremultiplied=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.writeDepth=!0,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0,this.draped=!1}get textureCoordinateType(){return this.hasTextures?1:0}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}get hasVVInstancing(){return this.instanced}get discardInvisibleFragments(){return this.transparent}}(0,ft.Cg)([(0,er.W)({count:4})],nr.prototype,"alphaDiscardMode",void 0),(0,ft.Cg)([(0,er.W)({count:3})],nr.prototype,"doubleSidedMode",void 0),(0,ft.Cg)([(0,er.W)({count:7})],nr.prototype,"pbrMode",void 0),(0,ft.Cg)([(0,er.W)({count:3})],nr.prototype,"cullFace",void 0),(0,ft.Cg)([(0,er.W)({count:3})],nr.prototype,"normalType",void 0),(0,ft.Cg)([(0,er.W)({count:3})],nr.prototype,"customDepthTest",void 0),(0,ft.Cg)([(0,er.W)({count:8})],nr.prototype,"emissionSource",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"hasVertexColors",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"hasSymbolColors",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"hasVerticalOffset",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"hasColorTexture",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"hasMetallicRoughnessTexture",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"hasOcclusionTexture",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"hasNormalTexture",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"hasScreenSizePerspective",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"hasVertexTangents",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"hasOccludees",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"instanced",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"instancedDoublePrecision",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"hasModelTransformation",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"offsetBackfaces",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"hasVVSize",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"hasVVColor",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"receiveShadows",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"receiveAmbientOcclusion",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"textureAlphaPremultiplied",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"instancedFeatureAttribute",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"instancedColor",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"writeDepth",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"terrainDepthTest",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"cullAboveTerrain",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"snowCover",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"hasColorTextureTransform",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"hasEmissionTextureTransform",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"hasNormalTextureTransform",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"hasOcclusionTextureTransform",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"hasMetallicRoughnessTextureTransform",void 0);var or=r(57323);let sr=class extends Xt{constructor(){super(...arguments),this.shader=new xt.r(or.R,()=>r.e(2314).then(r.bind(r,39933)))}};sr=(0,ft.Cg)([(0,mt.$K)("esri.views.3d.webgl-engine.shaders.RealisticTreeTechnique")],sr);class ar extends Ve{constructor(e,t){super(e,lr),this.materialType="default",this.supportsEdges=!0,this.intersectDraped=void 0,this.produces=new Map([[2,e=>((0,Pe.iq)(e)||(0,Pe.yT)(e))&&!this.transparent],[4,e=>((0,Pe.iq)(e)||(0,Pe.yT)(e))&&this.transparent&&this.parameters.writeDepth],[9,e=>((0,Pe.iq)(e)||(0,Pe.yT)(e))&&this.transparent&&!this.parameters.writeDepth]]),this._layout=Qt(this.parameters),this._configuration=new nr(t.spherical)}isVisibleForOutput(e){return 5!==e&&7!==e&&6!==e||this.parameters.castShadows}get visible(){const{layerOpacity:e,colorMixMode:t,opacity:r,externalColor:i}=this.parameters;return e*("replace"===t?1:r)*("ignore"===t||isNaN(i[3])?1:i[3])>=qt.Q}get _hasEmissiveBase(){return!!this.parameters.emissiveTextureId||!(0,h.t2)(this.parameters.emissiveBaseColor,d.uY)}get hasEmissions(){return this.parameters.emissiveStrength>0&&(0===this.parameters.emissiveSource&&this._hasEmissiveBase||1===this.parameters.emissiveSource)}updateConfiguration(e){super.updateConfiguration(e);const{parameters:t,_configuration:r}=this;r.hasNormalTexture=t.hasNormalTexture,r.hasColorTexture=t.hasColorTexture,r.hasMetallicRoughnessTexture=t.hasMetallicRoughnessTexture,r.hasOcclusionTexture=t.hasOcclusionTexture;const{treeRendering:i,doubleSided:n,doubleSidedType:o}=t;r.hasVertexTangents=!i&&t.hasVertexTangents,r.instanced=t.instanced,r.instancedDoublePrecision=t.instancedDoublePrecision,r.hasVVColor=!!t.vvColor,r.hasVVSize=!!t.vvSize,r.hasVerticalOffset=null!=t.verticalOffset,r.hasScreenSizePerspective=null!=t.screenSizePerspective,r.hasSlicePlane=t.hasSlicePlane,r.alphaDiscardMode=t.textureAlphaMode,r.normalType=i?0:t.normalType,r.transparent=this.transparent,r.enableOITOffset=e.enableOITOffset,r.writeDepth=t.writeDepth,r.customDepthTest=t.customDepthTest??0,r.hasOccludees=e.hasOccludees,r.cullFace=t.hasSlicePlane?0:t.cullFace,r.cullAboveTerrain=e.cullAboveTerrain,r.hasModelTransformation=!i&&null!=t.modelTransformation,r.hasVertexColors=t.hasVertexColors,r.hasSymbolColors=t.hasSymbolColors,r.doubleSidedMode=i?2:n&&"normal"===o?1:n&&"winding-order"===o?2:0,r.instancedFeatureAttribute=t.instancedFeatureAttribute,r.instancedColor=t.instancedColor,(0,Pe._o)(e.output)?(r.terrainDepthTest=e.terrainDepthTest,r.receiveShadows=t.receiveShadows,r.receiveAmbientOcclusion=t.receiveAmbientOcclusion&&null!=e.ssao):(r.terrainDepthTest=!1,r.receiveShadows=r.receiveAmbientOcclusion=!1),r.textureAlphaPremultiplied=!!t.textureAlphaPremultiplied,r.pbrMode=t.usePBR?t.isSchematic?2:1:0,r.emissionSource=t.emissionSource,r.offsetBackfaces=!(!this.transparent||!t.offsetTransparentBackfaces),r.snowCover=e.snowCover>0,r.hasColorTextureTransform=!!t.colorTextureTransformMatrix,r.hasNormalTextureTransform=!!t.normalTextureTransformMatrix,r.hasEmissionTextureTransform=!!t.emissiveTextureTransformMatrix,r.hasOcclusionTextureTransform=!!t.occlusionTextureTransformMatrix,r.hasMetallicRoughnessTextureTransform=!!t.metallicRoughnessTextureTransformMatrix}intersect(e,t,r,i,n,o){if(null!=this.parameters.verticalOffset){const e=r.camera;(0,h.hZ)(pr,t[12],t[13],t[14]);let o=null;switch(r.viewingMode){case 1:o=(0,h.S8)(fr,pr);break;case 2:o=(0,h.C)(fr,dr)}const s=(0,h.Re)(gr,pr,e.eye),a=(0,h.Bw)(s),c=(0,h.hs)(s,s,1/a);let l=null;this.parameters.screenSizePerspective&&(l=(0,h.Om)(o,c));const u=(0,Ge.kE)(e,a,this.parameters.verticalOffset,l??0,this.parameters.screenSizePerspective,null);(0,h.hs)(o,o,u),(0,h.ei)(mr,o,r.transform.inverseRotation),i=(0,h.Re)(ur,i,mr),n=(0,h.Re)(hr,n,mr)}We(e,r,i,n,(0,st.ou)(r.verticalOffset),o)}createGLMaterial(e){return new cr(e)}createBufferWriter(){return new dt(this._layout)}get transparent(){return function(e){const{drivenOpacity:t,opacity:r,externalColor:i,layerOpacity:n,texture:o,textureId:s,textureAlphaMode:a,colorMixMode:c}=e,l=i[3];return t||r<1&&"replace"!==c||l<1&&"ignore"!==c||n<1||(null!=o||null!=s)&&1!==a&&2!==a&&"replace"!==c}(this.parameters)}}class cr extends Le{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});const t=this._material.parameters;this.updateTexture(t.textureId);const r=e.camera.viewInverseTransposeMatrix;return(0,h.hZ)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?sr:Xt,e)}}class lr extends Yt{constructor(){super(...arguments),this.treeRendering=!1,this.useIndexing=!1,this.hasVertexTangents=!1}get hasNormalTexture(){return!this.treeRendering&&!!this.normalTextureId}get hasColorTexture(){return!!this.textureId}get hasMetallicRoughnessTexture(){return!this.treeRendering&&!!this.metallicRoughnessTextureId}get hasOcclusionTexture(){return!this.treeRendering&&!!this.occlusionTextureId}get emissiveStrength(){return this.emissiveStrengthFromSymbol*this.emissiveStrengthKHR}get emissionSource(){return this.treeRendering?0:null!=this.emissiveTextureId&&0===this.emissiveSource?3:0===this.emissiveSource?2:1}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}}const ur=(0,d.vt)(),hr=(0,d.vt)(),dr=(0,d.fA)(0,0,1),fr=(0,d.vt)(),mr=(0,d.vt)(),pr=(0,d.vt)(),gr=(0,d.vt)(),vr=()=>I.A.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");class _r{constructor(e,t,r){this.resource=e,this.textures=t,this.usedMemory=r}}function xr(e){const t=e.params,r=t.topology;let i=!0;switch(t.vertexAttributes||(vr().warn("Geometry must specify vertex attributes"),i=!1),t.topology){case"PerAttributeArray":break;case"Indexed":case null:case void 0:{const e=t.faces;if(e){if(t.vertexAttributes)for(const r in t.vertexAttributes){const t=e[r];t?.values?(null!=t.valueType&&"UInt32"!==t.valueType&&(vr().warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),i=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&(vr().warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),i=!1)):(vr().warn(`Indexed geometry does not specify face indices for '${r}' attribute`),i=!1)}}else vr().warn("Indexed geometries must specify faces"),i=!1;break}default:vr().warn(`Unsupported topology '${r}'`),i=!1}e.params.material||(vr().warn("Geometry requires material"),i=!1);const n=e.params.vertexAttributes;for(const e in n)n[e].values||(vr().warn("Geometries with externally defined attributes are not yet supported"),i=!1);return i}function yr(e){const t=(0,f.Ie)();return e.forEach(e=>{const r=e.boundingInfo;null!=r&&((0,f.iT)(t,r.bbMin),(0,f.iT)(t,r.bbMax))}),t}function wr(e){switch(e){case"mask":return 2;case"maskAndTransparency":return 3;case"none":return 1;default:return 0}}function br(e){const t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const Tr=new D.A(1,2,"wosr");async function Mr(e,t){const a=function(e){const t=e.match(/(.*\.(gltf|glb))(\?lod=([0-9]+))?$/);return t?{fileType:"gltf",url:t[1],specifiedLodIndex:null!=t[4]?Number(t[4]):null}:e.match(/(.*\.(json|json\.gz))$/)?{fileType:"wosr",url:e,specifiedLodIndex:null}:{fileType:"unknown",url:e,specifiedLodIndex:null}}((0,n.EM)(e));if("wosr"===a.fileType){const e=await(t.cache?t.cache.loadWOSR(a.url,t):async function(e,t){const r=await async function(e,t){const r=await(0,A.Ke)((0,E.A)(e,t));if(r.ok)return r.value.data;(0,N.QP)(r.error),function(e){throw new R.A("",`Request for object resource failed: ${e}`)}(r.error)}(e,t),i=await async function(e,t){const r=new Array;for(const i in e){const n=e[i],o=n.images[0].data;if(!o){vr().warn("Externally referenced texture data is not yet supported");continue}const s=n.encoding+";base64,"+o,a="/textureDefinitions/"+i,c="rgba"===n.channels?n.alphaChannelUsage||"transparency":"none",l={noUnpackFlip:!0,wrap:{s:10497,t:10497},preMultiplyAlpha:1!==wr(c)},u=t?.disableTextures?Promise.resolve(null):B(s,t);r.push(u.then(e=>({refId:a,image:e,parameters:l,alphaChannelUsage:c})))}const i=await Promise.all(r),n={};for(const e of i)n[e.refId]=e;return n}(r.textureDefinitions??{},t);let n=0;for(const e in i)if(i.hasOwnProperty(e)){const t=i[e];n+=t?.image?t.image.width*t.image.height*4:0}return new _r(r,i,n+(0,O.Qh)(r))}(a.url,t)),{engineResources:r,referenceBoundingBox:i}=function(e,t){const r=new Array,i=new Array,n=new Array,o=new F,s=e.resource,a=D.A.parse(s.version||"1.0","wosr");Tr.validate(a);const c=s.model.name,l=s.model.geometries,u=s.materialDefinitions??{},h=e.textures;let f=0;const m=new Map;for(let e=0;e<l.length;e++){const s=l[e];if(!xr(s))continue;const a=br(s),c=s.params.vertexAttributes,p=[],g=e=>{if("PerAttributeArray"===s.params.topology)return null;const t=s.params.faces;for(const r in t)if(r===e)return t[r].values;return null},v=c.position,_=v.values.length/v.valuesPerElement;for(const e in c){const t=c[e],r=t.values,i=g(e)??(0,P.tM)(_);p.push([e,new H.n(r,i,t.valuesPerElement,!0)])}const x=a.texture,y=h&&h[x];if(y&&!m.has(x)){const{image:e,parameters:t}=y,r=new Fe(e,t);i.push(r),m.set(x,r)}const w=m.get(x),b=w?w.id:void 0,T=a.material;let M=o.get(T,x);if(null==M){const e=u[T.slice(T.lastIndexOf("/")+1)].params;1===e.transparency&&(e.transparency=0);const r=y?wr(y.alphaChannelUsage):void 0,i={ambient:(0,d.ci)(e.diffuse),diffuse:(0,d.ci)(e.diffuse),opacity:1-(e.transparency||0),textureAlphaMode:r,textureAlphaCutoff:.33,textureId:b,doubleSided:!0,cullFace:0,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:y?.parameters.preMultiplyAlpha??!1};t?.materialParameters&&Object.assign(i,t.materialParameters),M=new ar(i,t),o.set(T,x,M)}n.push(M);const S=new ne(M,p);f+=p.find(e=>"position"===e[0])?.[1]?.indices.length??0,r.push(S)}return{engineResources:[{name:c,stageResources:{textures:i,materials:n,geometries:r},pivotOffset:s.model.pivotOffset,numberOfVertices:f,lodThreshold:null}],referenceBoundingBox:yr(r)}}(e,t);return{lods:r,referenceBoundingBox:i,isEsriSymbolResource:!1,isWosr:!0}}let m;if(t.cache)m=await t.cache.loadGLTF(a.url,t,!!t.usePBR,!!t.useEmissive);else{const{loadGLTF:e}=await r.e(1698).then(r.bind(r,51698));m=await e(new y.R,a.url,t,t.usePBR,t.useEmissive)}const{engineResources:T,referenceBoundingBox:S}=function(e,t,r){const n=e.model,a=e.meta,m=n.meta?.ESRI_proxyEllipsoid,y=a.isEsriSymbolResource&&null!=m&&"EsriRealisticTreesStyle"===a.ESRI_webstyle;y&&!e.customMeta.esriTreeRendering&&(e.customMeta.esriTreeRendering=!0,function(e,t){for(let r=0;r<e.model.lods.length;++r){const n=e.model.lods[r];for(const o of n.parts){const n=o.attributes.normal;if(null==n)return;const s=o.attributes.position,a=s.count,u=(0,d.vt)(),f=(0,d.vt)(),m=(0,d.vt)(),p=new Float32Array(4*a),v=new Float32Array(3*a),_=(0,c.B8)((0,l.vt)(),o.transform);let x=0,y=0;for(let c=0;c<a;c++){s.getVec(c,f),n.getVec(c,u),(0,h.Z0)(f,f,o.transform),(0,h.Re)(m,f,t.center),(0,h.Qr)(m,m,t.radius);const a=m[2],l=(0,h.Bw)(m),d=Math.min(.45+.55*l*l,1)**i.Tf;(0,h.Qr)(m,m,t.radius),null!==_&&(0,h.Z0)(m,m,_),(0,h.S8)(m,m),r+1!==e.model.lods.length&&e.model.lods.length>1&&(0,h.Cc)(m,m,u,a>-1?.2:Math.min(-4*a-3.8,1)),v[x]=m[0],v[x+1]=m[1],v[x+2]=m[2],x+=3,p[y]=d,p[y+1]=d,p[y+2]=d,p[y+3]=1,y+=4}o.attributes.normal=new g.xs(v.buffer),o.attributes.color=new g.Eq(p.buffer)}}}(e,m));const T=!!t.usePBR,S=a.isEsriSymbolResource?{usePBR:T,isSchematic:!1,treeRendering:y,mrrFactors:jt.SY}:{usePBR:T,isSchematic:!1,treeRendering:!1,mrrFactors:jt.mb},E={...t.materialParameters,treeRendering:y},A=new Array,R=new Map,I=new Map,O=n.lods.length,F=(0,f.Ie)();return n.lods.forEach((e,a)=>{const c=!0===t.skipHighLods&&(O>1&&0===a||O>3&&1===a)||!1===t.skipHighLods&&null!=r&&a!==r;if(c&&0!==a)return;const l=new C(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach(e=>{const r=c?new ar({},t):function(e,t,r,n,o,s,a,c,l){const h=e.materials.get(t.material);if(null==h)return null;const{normal:d,color:f,texCoord0:m,tangent:p}=t.attributes,g=t.material+(d?"_normal":"")+(f?"_color":"")+(m?"_texCoord0":"")+(p?"_tangent":""),v=null!=t.attributes.texCoord0,_=null!=t.attributes.normal,x=function(e){switch(e){case"BLEND":return 0;case"MASK":return 2;case"OPAQUE":case null:case void 0:return 1}}(h.alphaMode);if(!s.has(g)){if(v){const t=(t,r=!1,i=!1)=>{if(null!=t&&!a.has(t)){const n=e.textures.get(t);if(n){const e=n.data,o=r&&!(0,b.x3)(e)?c.compressionOptions:void 0;a.set(t,new Fe((0,b.x3)(e)?e.data:e,{...n.parameters,preMultiplyAlpha:!(0,b.x3)(e)&&i,encoding:(0,b.x3)(e)?e.encoding:void 0,compressionOptions:o}))}}},r=1!==x&&!l;t(h.colorTexture,r,1!==x),t(h.normalTexture),t(h.occlusionTexture,!0),t(h.emissiveTexture),t(h.metallicRoughnessTexture,!0)}const r=(0,i.xV)(h.color[0]),d=(0,i.xV)(h.color[1]),f=(0,i.xV)(h.color[2]),m=null!=h.colorTexture&&v?a.get(h.colorTexture):null,p=(0,jt.Jr)(h),y=null!=h.normalTextureTransform?.scale?h.normalTextureTransform?.scale:u.Un;s.set(g,new ar({...n,customDepthTest:1,textureAlphaMode:x,textureAlphaCutoff:h.alphaCutoff,diffuse:[r,d,f],ambient:[r,d,f],opacity:"OPAQUE"===h.alphaMode?1:h.opacity,doubleSided:h.doubleSided,doubleSidedType:"winding-order",cullFace:h.doubleSided?0:2,hasVertexColors:!!t.attributes.color,hasVertexTangents:!!t.attributes.tangent,normalType:_?0:2,castShadows:!0,receiveShadows:h.receiveShadows,receiveAmbientOcclusion:h.receiveAmbientOcclusion,textureId:null!=m?m.id:void 0,colorMixMode:h.colorMixMode,normalTextureId:null!=h.normalTexture&&v?a.get(h.normalTexture).id:void 0,textureAlphaPremultiplied:null!=m&&!!m.parameters.preMultiplyAlpha,occlusionTextureId:null!=h.occlusionTexture&&v?a.get(h.occlusionTexture).id:void 0,emissiveTextureId:null!=h.emissiveTexture&&v?a.get(h.emissiveTexture).id:void 0,metallicRoughnessTextureId:null!=h.metallicRoughnessTexture&&v?a.get(h.metallicRoughnessTexture).id:void 0,emissiveBaseColor:[h.emissiveFactor[0],h.emissiveFactor[1],h.emissiveFactor[2]],emissiveStrengthKHR:null!=h.emissiveStrengthKHR?h.emissiveStrengthKHR:1,emissiveStrengthFromSymbol:null!=o.emissiveStrengthFromSymbol?o.emissiveStrengthFromSymbol:void 0,mrrFactors:p?jt.Bt:[h.metallicFactor,h.roughnessFactor,n.mrrFactors[2]],isSchematic:p,colorTextureTransformMatrix:M(h.colorTextureTransform),normalTextureTransformMatrix:M(h.normalTextureTransform),scale:[y[0],y[1]],occlusionTextureTransformMatrix:M(h.occlusionTextureTransform),emissiveTextureTransformMatrix:M(h.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:M(h.metallicRoughnessTextureTransform),...o},c))}const y=s.get(g);if(r.stageResources.materials.push(y),v){const e=e=>{null!=e&&r.stageResources.textures.push(a.get(e))};e(h.colorTexture),e(h.normalTexture),e(h.occlusionTexture),e(h.emissiveTexture),e(h.metallicRoughnessTexture)}return y}(n,e,l,S,E,R,I,t,y),{geometry:h,vertexCount:d}=function(e,t){const r=e.attributes.position.count,i=(0,w.x)(e.indices||r,e.primitiveType),n=p(3*r),{typedBuffer:a,typedBufferStride:c}=e.attributes.position;(0,v.t)(n,a,e.transform,3,c);const l=[["position",new H.n(n,i,3,!0)]];if(null!=e.attributes.normal){const t=p(3*r),{typedBuffer:n,typedBufferStride:a}=e.attributes.normal;(0,s.Ge)(Sr,e.transform),(0,v.b)(t,n,Sr,3,a),(0,o.or)(Sr)&&(0,v.n)(t,t),l.push(["normal",new H.n(t,i,3,!0)])}if(null!=e.attributes.tangent){const t=p(4*r),{typedBuffer:n,typedBufferStride:a}=e.attributes.tangent;(0,s.z0)(Sr,e.transform),(0,_.t)(t,n,Sr,4,a),(0,o.or)(Sr)&&(0,v.n)(t,t,4),l.push(["tangent",new H.n(t,i,4,!0)])}if(null!=e.attributes.texCoord0){const t=p(2*r),{typedBuffer:n,typedBufferStride:o}=e.attributes.texCoord0;(0,x.a)(t,n,2,o),l.push(["uv0",new H.n(t,i,2,!0)])}const u=e.attributes.color;if(null!=u){const t=new Uint8Array(4*r);4===u.elementCount?u instanceof g.Eq?(0,_.b)(t,u,1,255):(u instanceof g.XP||u instanceof g.Uz)&&(0,_.b)(t,u,1/255,255):(t.fill(255),u instanceof g.xs?(0,v.f)(t,u.typedBuffer,1,255,4,u.typedBufferStride):(e.attributes.color instanceof g.eI||e.attributes.color instanceof g.nS)&&(0,v.f)(t,u.typedBuffer,1/255,255,4,e.attributes.color.typedBufferStride)),l.push(["color",new H.n(t,i,4,!0)])}return{geometry:new ne(t,l),vertexCount:r}}(e,r??new ar({},t)),m=h.boundingInfo;null!=m&&0===a&&((0,f.iT)(F,m.bbMin),(0,f.iT)(F,m.bbMax)),null!=r&&(l.stageResources.geometries.push(h),l.numberOfVertices+=d)}),c||A.push(l)}),{engineResources:A,referenceBoundingBox:F}}(m,t,a.specifiedLodIndex);return{lods:T,referenceBoundingBox:S,isEsriSymbolResource:m.meta.isEsriSymbolResource,isWosr:!1}}const Sr=(0,a.vt)()},1843(e,t,r){r.d(t,{BP:()=>h,l5:()=>d});var i=r(20498),n=r(13030),o=r(90239),s=r(4431),a=r(620),c=r(85079);class l{constructor(e,t,r=0){this.layout=e,this.byteOffset=r,this.buffer="number"==typeof t?new ArrayBuffer(t*e.stride):t;for(const t of e.fields.keys()){const i=e.fields.get(t);this[t]=new i.constructor(this.buffer,r+i.offset,this.stride)}}get stride(){return this.layout.stride}get count(){return this.byteLength/this.stride}get byteLength(){return this.buffer.byteLength-this.byteOffset}getField(e,t){const r=this[e];return r&&r.elementCount===t.ElementCount&&r.elementType===t.ElementType?r:null}slice(e,t){return new l(this.layout,this.buffer.slice(e*this.stride,t*this.stride))}copyFrom(e,t=0,r=0,i=e.count){const n=this.stride;if(n%4==0){const o=new Uint32Array(e.buffer,t*n,i*n/4);new Uint32Array(this.buffer,r*n,i*n/4).set(o)}else{const o=new Uint8Array(e.buffer,t*n,i*n);new Uint8Array(this.buffer,r*n,i*n).set(o)}return this}get usedMemory(){return this.byteLength}dispose(){}}class u{constructor(e){this._stride=0,this._fields=new Map,e&&(this._stride=e.stride,e.fields.forEach(e=>this._fields.set(e[0],{...e[1],constructor:p(e[1].constructor)})))}freeze(){return this}get locations(){return(0,c.Xk)((0,s.U)(this))}vec2f16(e,t){return this._appendField(e,i.SX?n.ZD:n.gH,t),this}vec2f(e,t){return this._appendField(e,n.gH,t),this}vec2f64(e,t){return this._appendField(e,n.si,t),this}vec3f16(e,t){return this._appendField(e,i.SX?n.EC:n.xs,t),this}vec3f(e,t){return this._appendField(e,n.xs,t),this}vec3f64(e,t){return this._appendField(e,n.Xm,t),this}vec4f16(e,t){return this._appendField(e,i.SX?n.jz:n.Eq,t),this}vec4f(e,t){return this._appendField(e,n.Eq,t),this}vec4f64(e,t){return this._appendField(e,n.Aj,t),this}mat3f(e,t){return this._appendField(e,n.jZ,t),this}mat3f64(e,t){return this._appendField(e,n.j0,t),this}mat4f(e,t){return this._appendField(e,n.Sx,t),this}mat4f64(e,t){return this._appendField(e,n.E$,t),this}vec4u8(e,t){return this._appendField(e,n.XP,t),this}f16(e,t){return this._appendField(e,i.SX?n.XW:n.Y$,t),this}f32(e,t){return this._appendField(e,n.Y$,t),this}f64(e,t){return this._appendField(e,n.qB,t),this}u8(e,t){return this._appendField(e,n.SL,t),this}u16(e,t){return this._appendField(e,n.h,t),this}i8(e,t){return this._appendField(e,n.bf,t),this}vec2i8(e,t){return this._appendField(e,n.D6,t),this}vec2i16(e,t){return this._appendField(e,n.mJ,t),this}vec2u8(e,t){return this._appendField(e,n.LC,t),this}vec2u16(e,t){return this._appendField(e,n.Yi,t),this}vec4u16(e,t){return this._appendField(e,n.Uz,t),this}vec4i16(e,t){return this._appendField(e,n.E7,t),this}u32(e,t){return this._appendField(e,n.P,t),this}_appendField(e,t,r){this._fields.has(e)&&(0,a.vA)(!1,`${e} already added to vertex buffer layout`);const i=t.ElementCount*(0,o.GJ)(t.ElementType),n=this._stride;this._fields.set(e,{constructor:t,size:i,offset:n,optional:r}),this._alignFields()}_alignFields(){let e=0,t=1;this._fields.forEach(r=>{const i=(0,o.GJ)(r.constructor.ElementType);e=Math.floor((e+i-1)/i)*i,r.offset=e,e+=r.size,t=Math.max(t,i)}),e=Math.floor((e+t-1)/t)*t,this._stride=e}createBuffer(e){return new l(this,e)}createView(e,t){return new l(this,e,t)}clone(){const e=new u;return e._stride=this._stride,e._fields=new Map,this._fields.forEach((t,r)=>e._fields.set(r,t)),e.BufferType=this.BufferType,e}get stride(){return this._stride}get fields(){return this._fields}}function h(){return new u}class d{constructor(e){this.fields=new Array,e.fields.forEach((e,t)=>{const r={...e,constructor:m(e.constructor)};this.fields.push([t,r])}),this.stride=e.stride}}const f=[n.Y$,n.gH,n.xs,n.Eq,n.jZ,n.Sx,n.qB,n.si,n.Xm,n.Aj,n.j0,n.E$,n.SL,n.LC,n.eI,n.XP,n.h,n.Yi,n.nS,n.Uz,n.P,n.An,n.H$,n.ml,n.bf,n.D6,n.m8,n.TX,n.Qt,n.mJ,n.Vp,n.E7,n.My,n.UL,n.zD,n.Y4];function m(e){return`${e.ElementType}_${e.ElementCount}`}function p(e){return g.get(e)}const g=new Map;f.forEach(e=>g.set(m(e),e))},4431(e,t,r){r.d(t,{U:()=>o});var i=r(63907),n=r(74038);function o(e,t=0){const r=e.stride;return Array.from(e.fields.keys()).map(o=>{const s=e.fields.get(o),a=s.constructor.ElementCount,c=function(e){switch(e){case"u8":return i.pe.UNSIGNED_BYTE;case"u16":return i.pe.UNSIGNED_SHORT;case"u32":return i.pe.UNSIGNED_INT;case"i8":return i.pe.BYTE;case"i16":return i.pe.SHORT;case"i32":return i.pe.INT;case"f16":return i.pe.HALF_FLOAT;case"f32":return i.pe.FLOAT;default:throw new Error("BufferType not supported in WebGL")}}(s.constructor.ElementType),l=s.offset,u=s.optional?.glNormalized??!1,h=s.optional?.integer??!1;return new n._(o,a,c,l,r,u,t,h)})}},26857(e,t,r){r.d(t,{b:()=>a});var i=r(5482),n=r(69622),o=r(91429);let s=class extends n.A{constructor(){super(...arguments),this.SCENEVIEW_HITTEST_RETURN_INTERSECTOR=!1,this.DECONFLICTOR_SHOW_VISIBLE=!1,this.DECONFLICTOR_SHOW_INVISIBLE=!1,this.DECONFLICTOR_SHOW_GRID=!1,this.LABELS_SHOW_BORDER=!1,this.TEXT_SHOW_BASELINE=!1,this.TEXT_SHOW_BORDER=!1,this.OVERLAY_DRAW_DEBUG_TEXTURE=!1,this.OVERLAY_SHOW_CENTER=!1,this.SHOW_POI=!1,this.OCCLUSION_QUERY_DEBUG_PIXEL=!1,this.ENABLE_OPTIMIZATIONS=!0,this.TESTS_DISABLE_FAST_UPDATES=!1,this.DRAW_MESH_GEOMETRY_NORMALS=!1,this.FEATURE_TILE_FETCH_SHOW_TILES=!1,this.FEATURE_TILE_TREE_SHOW_TILES=!1,this.TERRAIN_TILE_TREE_SHOW_TILES=!1,this.I3S_TREE_SHOW_TILES=!1,this.I3S_SHOW_MODIFICATIONS=!1,this.LOD_INSTANCE_RENDERER_DISABLE_UPDATES=!1,this.LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL=!1,this.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES=!1,this.LINE_WIREFRAMES=!1,this.FLOW_GLOBAL_SCALE_THRESHOLD=null}};(0,i.Cg)([(0,o.MZ)()],s.prototype,"SCENEVIEW_HITTEST_RETURN_INTERSECTOR",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"DECONFLICTOR_SHOW_VISIBLE",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"DECONFLICTOR_SHOW_INVISIBLE",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"DECONFLICTOR_SHOW_GRID",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"LABELS_SHOW_BORDER",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"TEXT_SHOW_BASELINE",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"TEXT_SHOW_BORDER",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"OVERLAY_DRAW_DEBUG_TEXTURE",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"OVERLAY_SHOW_CENTER",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"SHOW_POI",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"OCCLUSION_QUERY_DEBUG_PIXEL",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"ENABLE_OPTIMIZATIONS",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"TESTS_DISABLE_FAST_UPDATES",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"DRAW_MESH_GEOMETRY_NORMALS",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"FEATURE_TILE_FETCH_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"FEATURE_TILE_TREE_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"TERRAIN_TILE_TREE_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"I3S_TREE_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"I3S_SHOW_MODIFICATIONS",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"LOD_INSTANCE_RENDERER_DISABLE_UPDATES",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"LINE_WIREFRAMES",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"FLOW_GLOBAL_SCALE_THRESHOLD",void 0),s=(0,i.Cg)([(0,o.$K)("esri.views.3d.support.debugFlags")],s);const a=new s},46686(e,t,r){r.d(t,{o:()=>n});var i=r(31821);function n(e,t){t&&e.varyings.add("linearDepth","float",{invariant:!0}),e.vertex.code.add(i.H`
233
+ fragBlur = b / w_total;`),e}const d=Object.freeze(Object.defineProperty({__proto__:null,build:h},Symbol.toStringTag,{value:"Module"}))},43609(e,t,r){r.d(t,{a:()=>o,f:()=>s,n:()=>n});var i=r(34275);function n(e,t){o(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function o(e,t,r=2,n=r){const o=t.length/2;let s=0,a=0;if(!(0,i.iu)(t)||(0,i.dk)(t)){for(let i=0;i<o;++i)e[s]=t[a],e[s+1]=t[a+1],s+=r,a+=n;return}const c=(0,i.a3)(t);if((0,i.JI)(t))for(let i=0;i<o;++i)e[s]=Math.max(t[a]/c,-1),e[s+1]=Math.max(t[a+1]/c,-1),s+=r,a+=n;else for(let i=0;i<o;++i)e[s]=t[a]/c,e[s+1]=t[a+1]/c,s+=r,a+=n}function s(e,t,r,i){const n=e.typedBuffer,o=e.typedBufferStride,s=i?.count??e.count;let a=(i?.dstIndex??0)*o;for(let e=0;e<s;++e)n[a]=t,n[a+1]=r,a+=o}Object.freeze(Object.defineProperty({__proto__:null,fill:s,normalizeIntegerBuffer:o,normalizeIntegerBufferView:n},Symbol.toStringTag,{value:"Module"}))},73354(e,t,r){r.d(t,{a:()=>d,b:()=>c,c:()=>a,d:()=>o,e:()=>f,f:()=>h,l:()=>u,n:()=>m,t:()=>s});var i=r(40876),n=(r(44208),r(72727));function o(e,t,r){s(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function s(e,t,r,i=3,o=i){const s=(0,n.k)(e.length,i,3),a=(0,n.k)(t.length,o,3),c=Math.min(s,a),l=r[0],u=r[1],h=r[2],d=r[4],f=r[5],m=r[6],p=r[8],g=r[9],v=r[10],_=r[12],x=r[13],y=r[14];let w=0,b=0;for(let r=0;r<c;r++){const r=t[w],n=t[w+1],s=t[w+2];e[b]=l*r+d*n+p*s+_,e[b+1]=u*r+f*n+g*s+x,e[b+2]=h*r+m*n+v*s+y,w+=o,b+=i}return e}function a(e,t,r){c(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function c(e,t,r,i=3,o=i){const s=(0,n.k)(e.length,i,3),a=(0,n.k)(t.length,o,3),c=Math.min(s,a),l=r[0],u=r[1],h=r[2],d=r[3],f=r[4],m=r[5],p=r[6],g=r[7],v=r[8];let _=0,x=0;for(let r=0;r<c;r++){const r=t[_],n=t[_+1],s=t[_+2];e[x]=l*r+d*n+p*s,e[x+1]=u*r+f*n+g*s,e[x+2]=h*r+m*n+v*s,_+=o,x+=i}}function l(e,t,r,i=3,n=i){const o=Math.min(e.length/i,t.length/n);let s=0,a=0;for(let c=0;c<o;c++)e[a]=r*t[s],e[a+1]=r*t[s+1],e[a+2]=r*t[s+2],s+=n,a+=i;return e}function u(e,t,r,i){h(e.typedBuffer,t.typedBuffer,r,i,e.typedBufferStride,t.typedBufferStride)}function h(e,t,r,n,o=3,s=o){const a=Math.min(e.length/o,t.length/s);let c=0,l=0;const u=1/i.Tf;for(let i=0;i<a;i++)e[l]=n*(r*t[c])**u,e[l+1]=n*(r*t[c+1])**u,e[l+2]=n*(r*t[c+2])**u,c+=s,l+=o}function d(e,t,r,i=3,o=i){const s=(0,n.k)(e.length,i,3),a=(0,n.k)(t.length,o,3),c=Math.min(s,a);let l=0,u=0;for(let n=0;n<c;n++)e[u]=t[l]+r[0],e[u+1]=t[l+1]+r[1],e[u+2]=t[l+2]+r[2],l+=o,u+=i;return e}function f(e,t){m(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function m(e,t,r=3,i=r){const n=Math.min(e.length/r,t.length/i);let o=0,s=0;for(let a=0;a<n;a++){const n=t[o],a=t[o+1],c=t[o+2],l=n*n+a*a+c*c;if(l>0){const t=1/Math.sqrt(l);e[s]=t*n,e[s+1]=t*a,e[s+2]=t*c}o+=i,s+=r}}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:h,linearToSRGBView:u,normalize:m,normalizeView:f,scale:l,scaleView:function(e,t,r){l(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,r){const i=Math.min(e.count,t.count),n=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,a=t.typedBufferStride;let c=0,l=0;for(let e=0;e<i;e++)n[l]=s[c]>>r,n[l+1]=s[c+1]>>r,n[l+2]=s[c+2]>>r,c+=a,l+=o},transformMat3:c,transformMat3View:a,transformMat4:s,transformMat4View:o,translate:d},Symbol.toStringTag,{value:"Module"}))},69052(e,t,r){r.d(t,{hr:()=>n,ie:()=>c,uC:()=>a});var i=r(34727);class n{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return o(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,i.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+s(this.range,e-t,r)}minimalMonotonic(e,t,r){return o(this.range,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,t,r,i,n=0,o=!1){return(i-=n)<t?i+=s(e,t-i):i>r&&(i-=s(e,i-r)),o&&i===r&&(i=t),i+n}function s(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const a=new n(0,2*Math.PI),c=(new n(-Math.PI,Math.PI),new n(0,360))},4341(e,t,r){r.d(t,{I:()=>n});var i=r(26390);class n{constructor(e){this._allocator=e,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,i.d)(()=>this._reset()),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const e=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*o);this._items.length=Math.min(e,this._items.length),this._itemsPtr=0}_grow(){for(let e=0;e<Math.max(8,Math.min(this._items.length,o));e++)this._items.push(this._allocator())}}const o=1024},46140(e,t,r){r.d(t,{A:()=>n});var i=r(49186);class n{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new n(this.major,this.minor,this._context)}static parse(e,t=""){const[r,o]=e.split("."),s=/^\s*\d+\s*$/;if(!r?.match||!s.test(r))throw new i.A((t&&t+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e});if(!o?.match||!s.test(o))throw new i.A((t&&t+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e});const a=parseInt(r,10),c=parseInt(o,10);return new n(a,c,t)}}},61473(e,t,r){function i(e){return e=e||globalThis.location.hostname,l.some(t=>null!=e?.match(t))}function n(e,t){return e?(t=t||globalThis.location.hostname)?null!=t.match(o)||null!=t.match(a)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(s)||null!=t.match(c)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e:null}r.d(t,{EM:()=>n,b5:()=>i});const o=/^devext\.arcgis\.com$/,s=/^qaext\.arcgis\.com$/,a=/^[\w-]*\.mapsdevext\.arcgis\.com$/,c=/^[\w-]*\.mapsqa\.arcgis\.com$/,l=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local\.esri\.com$/,o,s,/^jsapps\.esri\.com$/,a,c]},88340(e,t,r){function i(){return new Float32Array(2)}function n(e,t){const r=new Float32Array(2);return r[0]=e,r[1]=t,r}function o(){return i()}function s(){return n(1,1)}function a(){return n(1,0)}function c(){return n(0,1)}r.d(t,{Un:()=>u,fA:()=>n,uY:()=>l,vt:()=>i});const l=o(),u=s(),h=a(),d=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:u,UNIT_X:h,UNIT_Y:d,ZEROS:l,clone:function(e){const t=new Float32Array(2);return t[0]=e[0],t[1]=e[1],t},create:i,fromValues:n,ones:s,unitX:a,unitY:c,zeros:o},Symbol.toStringTag,{value:"Module"}))},69397(e,t,r){r.d(t,{Qf:()=>c,Qh:()=>s,RS:()=>n,Ul:()=>f,i5:()=>d,lM:()=>o,qK:()=>u});var i=r(34275);const n=16;function o(e){if(!e)return 0;let t=u;for(const r in e)e.hasOwnProperty(r)&&(t+=a(e[r],!1));return t}function s(e){if(!e)return 0;if("number"==typeof e[0])return c(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return l(e,8);let r=h;for(let i=0;i<t;i++)r+=a(e[i]);return r}(e);let t=u;for(const r in e)e.hasOwnProperty(r)&&(t+=a(e[r]));return t}function a(e,t=!0){switch(typeof e){case"object":return t?s(e):u;case"string":return function(e){return 32+e.length}(e);case"number":return n;case"boolean":return 4;default:return 8}}function c(...e){return e.reduce((e,t)=>e+(t?(0,i.iu)(t)?t.byteLength+d:Array.isArray(t)?l(t,n):0:0),0)}function l(e,t){return h+e.length*t}const u=32,h=16,d=145,f=64},65806(e,t,r){r.d(t,{g:()=>s});var i=r(51850),n=r(91218),o=r(9762);function s(e,t,r,i){if((0,n.canProjectWithoutEngine)(e.spatialReference,r))return a[0]=e.x,a[1]=e.y,a[2]=e.z??0,(0,o.projectBuffer)(a,e.spatialReference,0,t,r,0);const s=(0,n.tryProject)(e,r,i);return!!s&&(t[0]=s.x,t[1]=s.y,t[2]=s.z??0,!0)}const a=(0,i.vt)()},27993(e,t,r){r.d(t,{F:()=>a});var i=r(91218),n=r(16930),o=r(9762),s=r(65806);function a(e,t,r,n){return!(null==t||null==n||e.length<2)&&((0,i.canProjectWithoutEngine)(t,n)?(0,o.projectBuffer)(e,t,0,r,n,0,1):(c.x=e[0],c.y=e[1],c.z=e[2],c.spatialReference=t,(0,s.g)(c,r,n)))}const c={x:0,y:0,z:0,hasZ:!0,hasM:!1,spatialReference:n.A.WGS84,type:"point"}},97146(e,t,r){r.d(t,{Dg:()=>o,my:()=>s,tM:()=>u,uW:()=>n});var i=r(34275);function n(e){return o(e,!0)}function o(e,t){if(Array.isArray(e)){if(e.length<i.y9)return e}else if(e.length<i.y9)return Array.from(e);let r=!0,n=!0;return e.some((e,t)=>(r=r&&0===e,n=n&&e===t,!r&&!n)),r?function(e){if(1===e)return c;if(e<i.y9)return new Array(e).fill(0);if(e>d.length){const t=Math.max(2*d.length,e);d=new Uint8Array(t)}return new Uint8Array(d.buffer,0,e)}(e.length):n?u(e.length):(0,i.iu)(e)&&e.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?e:function(e,t){for(const r of e){if(r>=65536)return(0,i.iu)(e)?e:new Uint32Array(e);r>=256&&(t=!1)}return t?new Uint8Array(e):new Uint16Array(e)}(e,!t)}function s(e){return e<=i.y9?new Array(e):e<=65536?new Uint16Array(e):new Uint32Array(e)}let a=h(131072);const c=[0],l=(()=>{const e=new Uint16Array(65536);for(let t=0;t<e.length;++t)e[t]=t;return e})();function u(e){return 1===e?c:e<i.y9?Array.from(new Uint16Array(l.buffer,0,e)):e<l.length?new Uint16Array(l.buffer,0,e):(e>a.length&&(a=h(Math.max(2*a.length,e))),new Uint32Array(a.buffer,0,e))}function h(e){const t=new Uint32Array(e);for(let e=0;e<t.length;e++)t[e]=e;return t}let d=new Uint8Array(65536)},72727(e,t,r){function i(e,t,r){if(t<=0)return 0;const i=e-r;return i<0?0:Math.floor(i/t)+1}r.d(t,{k:()=>i}),r(53966)},90239(e,t,r){function i(e){switch(e){case"u8":case"i8":return 1;case"u16":case"i16":case"f16":return 2;case"u32":case"i32":case"f32":return 4;case"f64":return 8}}r.d(t,{GJ:()=>i})},82919(e,t,r){r.d(t,{DV:()=>v,C:()=>p,vt:()=>f,Qy:()=>m,ui:()=>g,ST:()=>y,bU:()=>w,pw:()=>x,m7:()=>_,c8:()=>T});var i=r(4341),n=r(58083),o=r(35522),s=r(51850),a=r(78955),c=r(91829),l=r(71351);function u(e){return e?{ray:(0,l.vt)(e.ray),c0:e.c0,c1:e.c1}:{ray:(0,l.vt)(),c0:0,c1:Number.MAX_VALUE}}new i.I(()=>u());var h=r(27921),d=r(32114);function f(e){return e?[(0,h.vt)(e[0]),(0,h.vt)(e[1]),(0,h.vt)(e[2]),(0,h.vt)(e[3]),(0,h.vt)(e[4]),(0,h.vt)(e[5])]:[(0,h.vt)(),(0,h.vt)(),(0,h.vt)(),(0,h.vt)(),(0,h.vt)(),(0,h.vt)()]}function m(){return[(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)()]}function p(e,t){for(let r=0;r<M;r++)(0,h.C)(e[r],t[r]);return e}function g(e,t,r,i=A){const s=(0,n.lw)(d.Rc.get(),t,e);(0,n.B8)(s,s);for(let e=0;e<S;++e){const t=(0,a.Z0)(d.Km.get(),C[e],s);(0,o.hZ)(i[e],t[0]/t[3],t[1]/t[3],t[2]/t[3])}v(r,i)}function v(e,t){(0,h.Cr)(t[4],t[0],t[3],e[0]),(0,h.Cr)(t[1],t[5],t[6],e[1]),(0,h.Cr)(t[4],t[5],t[1],e[2]),(0,h.Cr)(t[3],t[2],t[6],e[3]),(0,h.Cr)(t[0],t[1],t[2],e[4]),(0,h.Cr)(t[5],t[4],t[7],e[5])}function _(e,t){for(let r=0;r<M;r++){const i=e[r];if(i[0]*t.center[0]+i[1]*t.center[1]+i[2]*t.center[2]+i[3]>=t.radius)return!1}return!0}function x(e,t){return b(e,function(e,t=u()){return(0,l.C)(e,t.ray),t.c0=0,t.c1=Number.MAX_VALUE,t}(t,E.get()))}function y(e,t,r){return b(e,function(e,t,r=u()){const i=(0,o.Bw)(e.vector);return(0,l.fA)(e.origin,t,r.ray),r.c0=0,r.c1=i,r}(t,r,E.get()))}function w(e,t){for(let r=0;r<M;r++)if((0,h.mN)(e[r],t)>0)return!1;return!0}function b(e,t){for(let r=0;r<M;r++)if(!(0,h.$Q)(e[r],t))return!1;return!0}const T={bottom:[5,1,0,4],near:[0,1,2,3],far:[5,4,7,6],right:[1,5,6,2],left:[4,0,3,7],top:[7,3,2,6]},M=6,S=8,C=[(0,c.fA)(-1,-1,-1,1),(0,c.fA)(1,-1,-1,1),(0,c.fA)(1,1,-1,1),(0,c.fA)(-1,1,-1,1),(0,c.fA)(-1,-1,1,1),(0,c.fA)(1,-1,1,1),(0,c.fA)(1,1,1,1),(0,c.fA)(-1,1,1,1)],E=new i.I(u),A=m()},11964(e,t,r){r.d(t,{Cr:()=>u,LV:()=>l,_I:()=>h,vt:()=>c});var i=r(34727),n=r(4341),o=r(35522),s=r(51850),a=r(32114);function c(e){return e?{origin:(0,s.o8)(e.origin),vector:(0,s.o8)(e.vector)}:{origin:(0,s.vt)(),vector:(0,s.vt)()}}function l(e,t){const r=d.get();return r.origin=e,r.vector=t,r}function u(e,t,r=c()){return(0,o.C)(r.origin,e),(0,o.Re)(r.vector,t,e),r}function h(e,t,r){return function(e,t,r,n,s){const{vector:c,origin:l}=e,u=(0,o.Re)(a.rq.get(),t,l),h=(0,o.Om)(c,u)/(0,o.m3)(c);return(0,o.hs)(s,c,(0,i.qE)(h,0,1)),(0,o.WQ)(s,s,e.origin)}(e,t,0,0,r)}(0,s.vt)(),(0,s.vt)();const d=new n.I(()=>c())},17136(e,t,r){r.d(t,{Y_:()=>A,O7:()=>C,el:()=>S});var i=r(92602),n=r(69052),o=r(49186),s=r(53966),a=r(39829),c=r(82799),l=r(16930),u=r(80754),h=r(21325),d=r(28735),f=r(11254),m=r(60408),p=r(65864),g=r(2272),v=r(84952),_=r(92300);const x=()=>s.A.getLogger("esri.geometry.support.normalizeUtils");function y(e){return"polygon"===e[0].type}function w(e){return"polyline"===e[0].type}function b(e,t,r){if(t){const t=function(e,t){if(!(e instanceof c.A||e instanceof a.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw x().error(e),new o.A("internal:geometry",e)}const r=(0,u.r8)(e),i=[];for(const e of r){const r=[];i.push(r),r.push([e[0][0],e[0][1]]);for(let i=0;i<e.length-1;i++){const n=e[i][0],o=e[i][1],s=e[i+1][0],a=e[i+1][1],c=Math.sqrt((s-n)*(s-n)+(a-o)*(a-o)),l=(a-o)/c,u=(s-n)/c,h=c/t;if(h>1){for(let e=1;e<=h-1;e++){const i=e*t,s=u*i+n,a=l*i+o;r.push([s,a])}const e=(c+Math.floor(h-1)*t)/2,i=u*e+n,s=l*e+o;r.push([i,s])}r.push([s,a])}}return function(e){return"polygon"===e.type}(e)?new a.A({rings:i,spatialReference:e.spatialReference}):new c.A({paths:i,spatialReference:e.spatialReference})}(e,1e6);e=(0,d.ci)(t,!0)}return r&&(e=(0,u.kS)(e,r)),e}function T(e,t,r){if(Array.isArray(e)){const i=e[0];if(i>t){const r=(0,u.kd)(i,t);e[0]=i+r*(-2*t)}else if(i<r){const t=(0,u.kd)(i,r);e[0]=i+t*(-2*r)}}else{const i=e.x;if(i>t){const r=(0,u.kd)(i,t);e=e.clone().offset(r*(-2*t),0)}else if(i<r){const t=(0,u.kd)(i,r);e=e.clone().offset(t*(-2*r),0)}}return e}function M(e,t){let r=-1;for(let i=0;i<t.cutIndexes.length;i++){const n=t.cutIndexes[i],o=t.geometries[i],s=(0,u.r8)(o);for(let e=0;e<s.length;e++){const t=s[e];t.some(r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const i=t[e][0];r=i>r?i:r}r=Number(r.toFixed(9));const i=-360*(0,u.kd)(r,180);for(let r=0;r<t.length;r++){const t=o.getPoint(e,r);o.setPoint(e,r,t.clone().offset(i,0))}return!0}})}if(n===r){if(y(e))for(const t of(0,u.r8)(o))e[n]=e[n].addRing(t);else if(w(e))for(const t of(0,u.r8)(o))e[n]=e[n].addPath(t)}else r=n,e[n]=o}return e}async function S(e,t,r){if(!Array.isArray(e))return S([e],t);t&&"string"!=typeof t&&x().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??i.A.geometryServiceUrl;let o,s,l,y,w,C,E,A,R=0;const I=[],O=[];for(const t of e)if(null!=t)if(o||(o=t.spatialReference,s=(0,h.Vp)(o),l=o.isWebMercator,C=l?102100:4326,y=u.j7[C].maxX,w=u.j7[C].minX,E=u.j7[C].plus180Line,A=u.j7[C].minus180Line),s)if("mesh"===t.type)O.push(t);else if("point"===t.type)O.push(T(t.clone(),y,w));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>T(e,y,w)),O.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,s);O.push(e.rings?new a.A(e):e)}else if(t.extent){const e=t.extent,r=(0,u.kd)(e.xmin,w)*(2*y);let i=0===r?t.clone():(0,u.kS)(t.clone(),r);e.offset(r,0);let{xmin:n,xmax:o}=e;n=Number(n.toFixed(9)),o=Number(o.toFixed(9)),e.intersects(E)&&o!==y?(R=o>R?o:R,i=b(i,l),I.push(i),O.push("cut")):e.intersects(A)&&n!==w?(R=o*(2*y)>R?o*(2*y):R,i=b(i,l,360),I.push(i),O.push("cut")):O.push(i)}else O.push(t.clone());else O.push(t);else O.push(t);let F=(0,u.kd)(R,y),N=-90;const D=F,P=new c.A;for(;F>0;){const e=360*F-180;P.addPath([[e,N],[e,-1*N]]),N*=-1,F--}if(I.length>0&&D>0){const t=M(I,await async function(e,t,r,i){const n=(0,g.Dl)(e),o=t[0].spatialReference,s={...i,responseType:"json",query:{...n.query,f:"json",sr:(0,h.YX)(o),target:JSON.stringify({geometryType:(0,m.$B)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},a=await(0,f.A)(n.path+"/cut",s),{cutIndexes:c,geometries:l=[]}=a.data;return{cutIndexes:c,geometries:l.map(e=>{const t=(0,p.rS)(e);return t.spatialReference=o,t})}}(n,I,P,r)),i=[],o=[];for(let r=0;r<O.length;r++){const n=O[r];if("cut"!==n)o.push(n);else{const n=t.shift(),s=e[r];null!=s&&"polygon"===s.type&&s.rings&&s.rings.length>1&&n.rings.length>=s.rings.length?(i.push(n),o.push("simplify")):o.push(l?(0,d.Gh)(n):n)}}if(!i.length)return o;const s=await async function(e,t,r){const i="string"==typeof e?(0,v.An)(e):e,n=t[0].spatialReference,o=(0,m.$B)(t[0]),s={...r,query:{...i.query,f:"json",sr:(0,h.YX)(n),geometries:JSON.stringify((0,_.X)(t))}},{data:a}=await(0,f.A)(i.path+"/simplify",s);return(0,_.V)(a.geometries,o,n)}(n,i,r),a=[];for(let e=0;e<o.length;e++){const t=o[e];"simplify"!==t?a.push(t):a.push(l?(0,d.Gh)(s.shift()):s.shift())}return a}const B=[];for(let e=0;e<O.length;e++){const t=O[e];if("cut"!==t)B.push(t);else{const e=I.shift();B.push(!0===l?(0,d.Gh)(e):e)}}return B}function C(e,t,r){const i=(0,h.Vp)(r);if(null==i)return e;const[n,o]=i.valid,s=2*o;let a=0,c=0;t>o?a=Math.ceil(Math.abs(t-o)/s):t<n&&(a=-Math.ceil(Math.abs(t-n)/s)),e>o?c=Math.ceil(Math.abs(e-o)/s):e<n&&(c=-Math.ceil(Math.abs(e-n)/s));let l=e+(a-c)*s;const u=l-t;return u>o?l-=s:u<n&&(l+=s),l}function E(e){const t=(0,h.Vp)(e);if(null==t)return null;const[r,i]=t.valid;return new n.hr(r,i)}const A=E(l.A.WGS84);E(l.A.WebMercator)},80754(e,t,r){r.d(t,{j7:()=>s,kS:()=>c,kd:()=>a,r8:()=>l});var i=r(82799),n=r(16930),o=r(60408);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function c(e,t){const r=l(e);for(const e of r)for(const r of e)r[0]+=t;return e}function l(e){return(0,o.Bi)(e)?e.rings:e.paths}},71351(e,t,r){r.d(t,{C:()=>u,Cr:()=>h,LV:()=>l,fA:()=>d,oC:()=>f,vt:()=>a}),r(4576);var i=r(4341),n=(r(77690),r(29242)),o=r(35522),s=r(51850);function a(e){return e?c((0,s.o8)(e.origin),(0,s.o8)(e.direction)):c((0,s.vt)(),(0,s.vt)())}function c(e,t){return{origin:e,direction:t}}function l(e,t){const r=m.get();return r.origin=e,r.direction=t,r}function u(e,t=a()){return d(e.origin,e.direction,t)}function h(e,t,r=a()){return(0,o.C)(r.origin,e),(0,o.Re)(r.direction,t,e),r}function d(e,t,r=a()){return(0,o.C)(r.origin,e),(0,o.C)(r.direction,t),r}function f(e,t,r){const i=(0,o.Om)(e.direction,(0,o.Re)(r,t,e.origin));return(0,o.WQ)(r,e.origin,(0,o.hs)(r,e.direction,i)),r}r(32114);const m=new i.I(()=>a());(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,n.vt)()},94008(e,t,r){r.d(t,{iy:()=>f}),r(44208),r(53966);var i=r(34727),n=r(34304),o=r(58083),s=r(35522),a=r(51850),c=r(91829),l=r(34275);var u=r(71351),h=r(44280),d=r(32114);class f{constructor(e=0,t=0,r=0,i=0){this.radius=i,"number"==typeof e?this._center=(0,a.fA)(e,t,r):function(e){return t=e,(0,l.vZ)(t)&&t.length>=3||function(e){return((0,l.aI)(e)||Array.isArray(e))&&e.length>=3}(e);var t}(e)||function(e){return(t=e)instanceof Float32Array&&t.length>=4||function(e){return Array.isArray(e)&&e.length>=4}(e);var t}(e)?(this._center=(0,a.ci)(e),this.radius=4===e.length?e[3]:t):(this._center=(0,a.o8)(e.center),this.radius=e.radius)}get isValid(){return this.radius>=0}invalidate(){this.radius=-1}get center(){return this._center}set center(e){(0,s.C)(this.center,e)}exactEquals(e){return(0,s.aI)(this._center,e.center)&&this.radius===e.radius}copyFrom(e){return e!==this&&((0,s.C)(this._center,e.center),this.radius=e.radius),this}clone(){return new f(this.center,this.radius)}toVec4(){return(0,c.fA)(this.center[0],this.center[1],this.center[2],this.radius)}contains(e){return(0,s.hG)(this.center,e)<=this.radius**2}intersectRay(e,t){if(null==e)return!1;if(!this._intersect(e,m))return!1;let{t0:r,t1:i}=m;if((r<0||i<r&&i>0)&&(r=i),r<0)return!1;if(t){const{origin:i,direction:n}=e;t[0]=i[0]+n[0]*r,t[1]=i[1]+n[1]*r,t[2]=i[2]+n[2]*r}return!0}intersectLine(e,t){const r=(0,u.Cr)(e,t);if(!this._intersect(r,m))return[];const{origin:i,direction:o}=r,{t0:c,t1:l}=m,h=e=>{const t=(0,a.vt)();return(0,s.Ln)(t,i,o,e),this.projectPoint(t,t)};return Math.abs(c-l)<(0,n.FD)()?[h(c)]:[h(c),h(l)]}_intersect(e,t){const{origin:r,direction:i}=e,n=p;n[0]=r[0]-this.center[0],n[1]=r[1]-this.center[1],n[2]=r[2]-this.center[2];const o=i[0]*i[0]+i[1]*i[1]+i[2]*i[2];if(0===o)return!1;const s=2*(i[0]*n[0]+i[1]*n[1]+i[2]*n[2]),a=s*s-4*o*(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]-this.radius**2);if(a<0)return!1;const c=Math.sqrt(a);return t.t0=(-s-c)/(2*o),t.t1=(-s+c)/(2*o),!0}projectPoint(e,t){const r=(0,s.Re)(d.rq.get(),e,this.center),i=(0,s.hs)(d.rq.get(),r,this.radius/(0,s.Bw)(r));return(0,s.WQ)(t,i,this.center)}closestPointOnSilhouette(e,t){const r=d.rq.get(),i=d.Rc.get();(0,s.$A)(r,e.origin,e.direction),(0,s.$A)(t,r,e.origin),(0,s.hs)(t,t,1/(0,s.Bw)(t)*this.radius);const n=this._angleToSilhouette(e.origin),a=(0,h.g7)(e.origin,t);return(0,o.$0)(i,a+n,r),(0,s.Z0)(t,t,i),t}frustumCoverage(e,t,r){const i=this.radius,n=i*i,o=e+.5*Math.PI,s=t*t+n-2*Math.cos(o)*t*i,a=Math.sqrt(s),c=s-n;if(c<=0)return.5;const l=Math.sqrt(c),u=Math.acos(l/a)-Math.asin(i/(a/Math.sin(o)));return Math.min(1,(u+.5*r)/r)}_angleToSilhouette(e){const t=(0,s.Re)(d.rq.get(),e,this.center),r=(0,s.Bw)(t),n=this.radius,o=n+Math.abs(n-r);return(0,i.XM)(n/o)}union(e){const t=(0,s.Io)(this._center,e.center),r=this.radius,i=e.radius;return t+i<r?this:t+r<i?(this.copyFrom(e),this):((0,s.Cc)(this._center,this._center,e.center,(t+i-r)/(2*t)),this.radius=(t+r+i)/2,this)}toJSON(){return{center:this.center,radius:this.radius}}signedDistanceToPlane(e){const{center:t,radius:r}=this,i=e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3];return i<0?Math.min(i+r,0):Math.max(i-r,0)}}new f;const m={t0:0,t1:0},p=(0,a.vt)();(0,a.vt)(),(0,a.vt)()},38969(e,t,r){r.d(t,{i:()=>n});var i=r(37955);function n(e,t){return new Promise((r,n)=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?r():(t((0,i.Oo)(e,"canplay",r)),t((0,i.Oo)(e,"error",n)))})}},92300(e,t,r){r.d(t,{V:()=>s,X:()=>o});var i=r(60408),n=r(65864);function o(e){return{geometryType:(0,i.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function s(e,t,r){const i=(0,n.xD)(t);return e.map(e=>{const t=i.fromJSON(e);return t.spatialReference=r,t})}},21015(e,t,r){r.d(t,{R:()=>c});var i=r(11254),n=r(60999),o=r(49186),s=r(17676),a=r(84952);class c{constructor(e=e=>e){this._resolveURI=e}async loadJSON(e,t){return this._load("json",e,t)}async loadBinary(e,t){return(0,a.DB)(e)?((0,s.Te)(t),(0,a.lJ)(e)):this._load("array-buffer",e,t)}async loadImage(e,t){return this._load("image",e,t)}async _load(e,t,r){t=this._resolveURI(t);const a=await(0,n.Ke)((0,i.A)(t,{responseType:e,...r}));if(a.ok)return a.value.data;throw(0,s.QP)(a.error),new o.A("gltf-loader-request-error",`Request for resource failed: ${a.error}`)}}},84498(e,t,r){r.d(t,{x:()=>s});var i=r(34275),n=r(97146),o=r(63907);function s(e,t){switch(t){case o.WR.TRIANGLES:return function(e){return"number"==typeof e?(0,n.tM)(e):(0,i.mg)(e)?new Uint16Array(e):e}(e);case o.WR.TRIANGLE_STRIP:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return[];const r=t-2,i=(0,n.my)(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(i[e++]=t,i[e++]=t+1,i[e++]=t+2):(i[e++]=t+1,i[e++]=t,i[e++]=t+2)}else{let t=0;for(let n=0;n<r;n+=1)n%2==0?(i[t++]=e[n],i[t++]=e[n+1],i[t++]=e[n+2]):(i[t++]=e[n+1],i[t++]=e[n],i[t++]=e[n+2])}return i}(e);case o.WR.TRIANGLE_FAN:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array(0);const r=t-2,i=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)i[e++]=0,i[e++]=t+1,i[e++]=t+2;return i}const n=e[0];let o=e[1],s=0;for(let t=0;t<r;++t){const r=e[t+2];i[s++]=n,i[s++]=o,i[s++]=r,o=r}return i}(e)}}},51530(e,t,r){r.d(t,{KB:()=>s,Xi:()=>n,pn:()=>a,x3:()=>o});var i=r(44208);class n{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding="image/ktx2"}}function o(e){return"encoded-mesh-texture"===e?.type}async function s(e){const t=new Blob([e]),r=await t.text();return JSON.parse(r)}async function a(e,t){if("image/ktx2"===t)return new n(e);const r=new Blob([e],{type:t});let o=URL.createObjectURL(r);switch(t){case"image/jpeg":o+="#.jpg";break;case"image/png":o+="#.png"}const s=new Image;if((0,i.A)("esri-iPhone"))return new Promise((e,t)=>{const r=()=>{n(),e(s)},i=e=>{n(),t(e)},n=()=>{URL.revokeObjectURL(o),s.removeEventListener("load",r),s.removeEventListener("error",i)};s.addEventListener("load",r),s.addEventListener("error",i),s.src=o});try{s.src=o,await s.decode()}catch(e){console.warn("Failed decoding HTMLImageElement")}return URL.revokeObjectURL(o),s}},91202(e,t,r){r.d(t,{fetch:()=>Er});var i=r(40876),n=r(61473),o=r(34727),s=r(77690),a=r(29242),c=r(58083),l=r(9093),u=r(48163),h=r(35522),d=r(51850),f=r(70328),m=r(34275);function p(e,t=!1){return e<=m.y9?t?new Array(e).fill(0):new Array(e):new Float32Array(e)}var g=r(13030),v=r(73354),_=r(50867),x=r(43609),y=r(21015),w=r(84498),b=r(51530),T=r(88340);function M(e){if(null==e)return null;const t=null!=e.offset?e.offset:T.uY,r=null!=e.rotation?e.rotation:0,i=null!=e.scale?e.scale:T.Un,n=(0,a.fA)(1,0,0,0,1,0,t[0],t[1],1),o=(0,a.fA)(Math.cos(r),-Math.sin(r),0,Math.sin(r),Math.cos(r),0,0,0,1),c=(0,a.fA)(i[0],0,0,0,i[1],0,0,0,1),l=(0,a.vt)();return(0,s.lw)(l,o,c),(0,s.lw)(l,n,l),l}class S{constructor(){this.geometries=new Array,this.materials=new Array,this.textures=new Array}}class C{constructor(e,t,r){this.name=e,this.lodThreshold=t,this.pivotOffset=r,this.stageResources=new S,this.numberOfVertices=0}}var E=r(11254),A=r(60999),R=r(49186),I=r(53966),O=r(69397);class F{constructor(){this._outer=new Map}clear(){this._outer.clear()}get empty(){return 0===this._outer.size}get outerSize(){return this._outer.size}get size(){let e=0;for(const t of this._outer.values())e+=t.size;return e}get(e,t){return this._outer.get(e)?.get(t)}getInner(e){return this._outer.get(e)}set(e,t,r){const i=this._outer.get(e);i?i.set(t,r):this._outer.set(e,new Map([[t,r]]))}delete(e,t){const r=this._outer.get(e);r&&(r.delete(t),0===r.size&&this._outer.delete(e))}pop(e,t){const r=this.get(e,t);return this.delete(e,t),r}*outerMap(){for(const e of this._outer)yield e}*values(){for(const e of this._outer.values())yield*e.values()}*[Symbol.iterator](){for(const[e,t]of this._outer)for(const[r,i]of t)yield[e,r,i]}forEach(e){this._outer.forEach((t,r)=>e(t,r))}forAll(e){this._outer.forEach((t,r)=>t.forEach((t,i)=>e(t,r,i)))}copy(){const e=new F;return this.forAll((t,r,i)=>e.set(r,i,t)),e}}var N=r(17676),D=r(46140),P=r(97146);async function B(e,t){return(await(0,E.A)(e,{responseType:"image",...t})).data}var H=r(46610),L=r(20498);function z(e){if(e.length<m.y9)return Array.from(e);if(Array.isArray(e))return Float64Array.from(e);if(!("BYTES_PER_ELEMENT"in e))return Array.from(e);switch(e.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(e);case 2:return(0,m.LW)(e)?(0,L.pX)().from(e):(0,m.jq)(e)?Uint16Array.from(e):Int16Array.from(e);case 4:return Float32Array.from(e);default:return Float64Array.from(e)}}var U=r(15142),G=r(620);class V{get center(){return(0,d.fA)(this._data[0],this._data[1],this._data[2])}get radius(){return this._data[3]}get bbMin(){return(0,d.fA)(this._data[4],this._data[5],this._data[6])}get bbMax(){return(0,d.fA)(this._data[7],this._data[8],this._data[9])}constructor(e,t,r){this.primitiveIndices=e,this._numIndexPerPrimitive=t,this.position=r,this._data=[.1,0,0,0,0,0,0,0,0,0],this._children=void 0,(0,G.vA)(e.length>=1),(0,G.vA)(3===r.size||4===r.size);const{data:i,size:n,indices:o}=r;(0,G.vA)(o.length%this._numIndexPerPrimitive===0),(0,G.vA)(o.length>=e.length*this._numIndexPerPrimitive);const s=e.length;let a=n*o[this._numIndexPerPrimitive*e[0]];j.clear(),j.push(a);const c=(0,d.fA)(i[a],i[a+1],i[a+2]),l=(0,d.o8)(c);for(let t=0;t<s;++t){const r=this._numIndexPerPrimitive*e[t];for(let e=0;e<this._numIndexPerPrimitive;++e){a=n*o[r+e],j.push(a);let t=i[a];c[0]=Math.min(t,c[0]),l[0]=Math.max(t,l[0]),t=i[a+1],c[1]=Math.min(t,c[1]),l[1]=Math.max(t,l[1]),t=i[a+2],c[2]=Math.min(t,c[2]),l[2]=Math.max(t,l[2])}}for(let e=0;e<3;++e)this._data[4+e]=c[e],this._data[7+e]=l[e];const u=(0,h.Cc)((0,d.vt)(),this.bbMin,this.bbMax,.5);let f=.5*Math.max(Math.max(l[0]-c[0],l[1]-c[1]),l[2]-c[2]),m=f*f;for(let e=0;e<j.length;++e){a=j.at(e);const t=i[a]-u[0],r=i[a+1]-u[1],n=i[a+2]-u[2],o=t*t+r*r+n*n;if(o<=m)continue;const s=Math.sqrt(o),c=.5*(s-f);f+=c,m=f*f;const l=c/s;u[0]+=t*l,u[1]+=r*l,u[2]+=n*l}this._data[3]=f;for(let e=0;e<3;++e)this._data[0+e]=u[e];j.clear()}getChildren(){if(this._children||(0,h.hG)(this.bbMin,this.bbMax)<=1)return this._children;const e=(0,h.Cc)((0,d.vt)(),this.bbMin,this.bbMax,.5),t=this.primitiveIndices.length,r=new Uint8Array(t),i=new Array(8);for(let e=0;e<8;++e)i[e]=0;const{data:n,size:o,indices:s}=this.position;for(let a=0;a<t;++a){let t=0;const c=this._numIndexPerPrimitive*this.primitiveIndices[a];let l=o*s[c],u=n[l],h=n[l+1],d=n[l+2];for(let e=1;e<this._numIndexPerPrimitive;++e){l=o*s[c+e];const t=n[l],r=n[l+1],i=n[l+2];t<u&&(u=t),r<h&&(h=r),i<d&&(d=i)}u<e[0]&&(t|=1),h<e[1]&&(t|=2),d<e[2]&&(t|=4),r[a]=t,++i[t]}let a=0;for(let e=0;e<8;++e)i[e]>0&&++a;if(a<2)return;const c=new Array(8);for(let e=0;e<8;++e)c[e]=i[e]>0?new Uint32Array(i[e]):void 0;for(let e=0;e<8;++e)i[e]=0;for(let e=0;e<t;++e){const t=r[e];c[t][i[t]++]=this.primitiveIndices[e]}this._children=new Array;for(let e=0;e<8;++e)void 0!==c[e]&&this._children.push(new V(c[e],this._numIndexPerPrimitive,this.position));return this._children}static prune(){j.prune()}}const j=new U.A({deallocator:null});var k=r(24326);class W{constructor(e){this.id=(0,k.c)(),this._attributes=new Map;for(const[t,r]of e)this._attributes.set(t,{...r,indices:(0,P.Dg)(r.indices)})}get attributes(){return this._attributes}}var $=r(4341),Z=r(11964);function q(e,t,r){return(0,h.Re)(Y,t,e),(0,h.Re)(X,r,e),.5*(0,h.Bw)((0,h.$A)(Y,Y,X))}r(32114),new $.I(Z.vt),new $.I(()=>{return e?{p0:(0,d.o8)(e.p0),p1:(0,d.o8)(e.p1),p2:(0,d.o8)(e.p2)}:{p0:(0,d.vt)(),p1:(0,d.vt)(),p2:(0,d.vt)()};var e});const Y=(0,d.vt)(),X=(0,d.vt)(),J=(0,d.vt)(),K=(0,d.vt)(),Q=(0,d.vt)(),ee=(0,d.vt)();class te{constructor(){this.uid=(0,k.c)()}}class re extends te{constructor(e){super(),this.highlightName=e,this.channel=0}}var ie=r(94656);class ne extends W{constructor(e,t,r=null,i=0,n=null,o=-1,s,a){super(t),this.material=e,this.mapPositions=r,this.type=i,this.olidColor=n,this.edgeIndicesLength=o,this.baseGeometry=s,this.drawIndices=a,this._vertexPositionIndicesCache=void 0,this._highlights=null,this._highlightOptionsCounts=null,this.visible=!0,this._boundingInfo=null,(0,G.vA)((e?.useIndexing??!1)===(null!=a),"Material index requirement and Geometry must match");const c=this.positionAttribute;null!=c&&this.edgeIndicesLength<0&&(this.edgeIndicesLength=c.indices.length)}instantiate(e={}){const t=new ne(e.material||this.material,[],this.mapPositions,this.type,this.olidColor,this.edgeIndicesLength,this.baseGeometry,this.drawIndices);return this._attributes.forEach((e,r)=>{e.exclusive=!1,t._attributes.set(r,e)}),t._boundingInfo=this._boundingInfo,t.transformation=e.transformation||this.transformation,t}getMutableAttribute(e){let t=this._attributes.get(e);return t&&!t.exclusive&&(t={...t,exclusive:!0,data:z(t.data)},this._attributes.set(e,t)),t}setAttributeData(e,t){const r=this._attributes.get(e);r?this._attributes.set(e,{...r,exclusive:!0,data:t}):(0,ie.en)()&&console.warn(`Setting undefined attribute ${e} data`)}get primitivePositionIndices(){if(void 0!==this._vertexPositionIndicesCache)return this._vertexPositionIndicesCache;const{drawIndices:e}=this,t=this.positionAttribute;if(null!=e&&null!=t){const r=new Array;for(const i of e)r.push(t.indices[i]);this._vertexPositionIndicesCache=r}else this._vertexPositionIndicesCache=t?.indices??null;return this._vertexPositionIndicesCache}get positionAttribute(){return this.attributes.get("position")??this.baseGeometry?.attributes.get("position")}get indexCount(){const e=this.drawIndices??this.positionAttribute?.indices;return e?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return this._boundingInfo??=this._calculateBoundingInfo(),this._boundingInfo}computeAttachmentOrigin(e){return!!(0===this.type?this._computeAttachmentOriginTriangles(e):2===this.type?this._computeAttachmentOriginLines(e):this._computeAttachmentOriginPoints(e))&&(null!=this._transformation&&(0,h.Z0)(e,e,this._transformation),!0)}_computeAttachmentOriginTriangles(e){return function(e,t,r=t?.indices){if(!t||!r)return!1;const{size:i,data:n}=t;(0,h.hZ)(e,0,0,0),(0,h.hZ)(ee,0,0,0);let o=0,s=0;for(let t=0;t<r.length-2;t+=3){const a=r[t]*i,c=r[t+1]*i,l=r[t+2]*i;(0,h.hZ)(J,n[a],n[a+1],n[a+2]),(0,h.hZ)(K,n[c],n[c+1],n[c+2]),(0,h.hZ)(Q,n[l],n[l+1],n[l+2]);const u=q(J,K,Q);u?((0,h.WQ)(J,J,K),(0,h.WQ)(J,J,Q),(0,h.hs)(J,J,1/3*u),(0,h.WQ)(e,e,J),o+=u):((0,h.WQ)(ee,ee,J),(0,h.WQ)(ee,ee,K),(0,h.WQ)(ee,ee,Q),s+=3)}return!(0===s&&0===o||(0!==o?((0,h.hs)(e,e,1/o),0):0===s||((0,h.hs)(e,ee,1/s),0)))}(e,this.positionAttribute,this.primitivePositionIndices)}_computeAttachmentOriginLines(e){const t=this.positionAttribute,r=this.primitivePositionIndices;return function(e,t,r,i=t?.indices){if(!t||!i)return!1;(0,h.hZ)(e,0,0,0),(0,h.hZ)(ee,0,0,0);let n=0,o=0;const{size:s,data:a}=t,c=i.length-1,l=c+(r?2:0);for(let t=0;t<l;t+=2){const r=t<c?t+1:0,l=i[t<c?t:c]*s,u=i[r]*s;J[0]=a[l],J[1]=a[l+1],J[2]=a[l+2],K[0]=a[u],K[1]=a[u+1],K[2]=a[u+2],(0,h.hs)(J,(0,h.WQ)(J,J,K),.5);const d=(0,h.xg)(J,K);d>0?((0,h.WQ)(e,e,(0,h.hs)(J,J,d)),n+=d):0===n&&((0,h.WQ)(ee,ee,J),o++)}return 0!==n?((0,h.hs)(e,e,1/n),!0):0!==o&&((0,h.hs)(e,ee,1/o),!0)}(e,t,function(e,t){return!(!("isClosed"in e)||!e.isClosed)&&t.indices.length>2}(this.material.parameters,t),r)}_computeAttachmentOriginPoints(e){return function(e,t,r=t?.indices){if(!t||!r)return!1;const{size:i,data:n}=t;(0,h.hZ)(e,0,0,0);let o=-1,s=0;for(let t=0;t<r.length;t++){const a=r[t]*i;o!==a&&(e[0]+=n[a],e[1]+=n[a+1],e[2]+=n[a+2],s++),o=a}return s>1&&(0,h.hs)(e,e,1/s),s>0}(e,this.positionAttribute,this.primitivePositionIndices)}invalidateBoundingInfo(){this._boundingInfo=null,this._vertexPositionIndicesCache=void 0}_calculateBoundingInfo(){const e=this.positionAttribute,t=this.primitivePositionIndices;if(!e||!t||0===t.length)return null;const r=t===e.indices?e:new H.n(e.data,t,e.size,!1,e.stride),i=0===this.type?3:1;(0,G.vA)(t.length%i===0,"Indexing error: "+t.length+" not divisible by "+i);const n=(0,P.tM)(t.length/i);return new V(n,i,r)}get transformation(){return this._transformation??l.zK}set transformation(e){this._transformation=e&&e!==l.zK?(0,l.o8)(e):null}get highlights(){return this._highlights||oe}get hasHighlights(){return(this._highlightOptionsCounts?.size??0)>0}foreachHighlightOptions(e){this._highlightOptionsCounts?.forEach((t,r)=>e(r))}allocateIdAndHighlight(e){const t=new re(e);return this.addHighlight(t)}addHighlight(e){this._ensureHighlights().add(e);const{highlightName:t}=e,r=(this._highlightOptionsCounts?.get(t)??0)+1;return this._ensureHighlightOptionsCounts().set(t,r),e}_ensureHighlights(){let e=this._highlights;return e||(e=new Set,this._highlights=e),e}_ensureHighlightOptionsCounts(){let e=this._highlightOptionsCounts;return e||(e=new Map,this._highlightOptionsCounts=e),e}removeHighlight(e){if(this._highlights?.delete(e)){const{highlightName:t}=e,r=this._highlightOptionsCounts?.get(t)??0;r<=1?this._highlightOptionsCounts?.delete(t):this._ensureHighlightOptionsCounts().set(t,r-1)}}}const oe=new Set;var se=r(65529),ae=r(97768),ce=r(84952),le=r(38969),ue=r(95117),he=r(2741);let de;var fe=r(63907),me=r(76284),pe=r(42293);let ge=null,ve=null;async function _e(){return null==ve&&(de??=(async()=>{const e=await r.e(9321).then(r.bind(r,49321)),t=await e.default({locateFile:e=>(0,he.s)(`esri/libs/basisu/${e}`)});return t.initializeBasis(),t})(),ve=de,ge=await ve),ve}function xe(e,t,r,i,n){const o=(0,pe.MW)(t?fe.CQ.COMPRESSED_RGBA8_ETC2_EAC:fe.CQ.COMPRESSED_RGB8_ETC2),s=n&&e>1?(4**e-1)/(3*4**(e-1)):1;return Math.ceil(r*i*o*s)}function ye(e){return e.getNumImages()>=1&&!e.isUASTC()}function we(e){return e.getFaces()>=1&&(e.isETC1S()||e.isUASTC())}function be(e,t,r,i,n,o,s,a){const{compressedTextureETC:c,compressedTextureS3TC:l}=e.capabilities,[u,h]=c?i?[1,fe.CQ.COMPRESSED_RGBA8_ETC2_EAC]:[0,fe.CQ.COMPRESSED_RGB8_ETC2]:l?i?[3,fe.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT]:[2,fe.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT]:[13,6408],d=t.hasMipmap?r:Math.min(1,r),f=[];for(let e=0;e<d;e++)f.push(new Uint8Array(s(e,u))),a(e,u,f[e]);return t.internalFormat=h,t.hasMipmap=f.length>1,t.samplingMode=t.hasMipmap?9987:9729,t.width=n,t.height=o,new me.A(e,t,{type:"compressed",levels:f})}const Te=()=>I.A.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");function Me(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const Se=Me("DXT1"),Ce=Me("DXT3"),Ee=Me("DXT5");function Ae(e,t){return t=16*Math.floor(t/16),Math.min(16*Math.round(e/16),t)}function Re(e,t){const[r,i]=function({width:e,height:t},{maxPreferredTexturePixels:r,maxTextureSize:i}){const n=Math.max(e,t),o=e*t;if(n<=i&&o<=r)return[e,t];const s=Math.min(Math.sqrt(r/o),i/n);return[Ae(Math.round(e*s),i),Ae(Math.round(t*s),i)]}(e,t);return e.width===r&&e.height===i?e:Ie(e,r,i)}function Ie(e,t,r){if(e instanceof ImageData)return Ie(function(e){const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const r=t.getContext("2d");if(null==r)throw new R.A("texture:context-failed","Failed to create 2d context from HTMLCanvasElement");return r.putImageData(e,0,0),t}(e),t,r);const i=document.createElement("canvas");return i.width=t,i.height=r,i.getContext("2d").drawImage(e,0,0,i.width,i.height),i}var Oe=r(67171);class Fe{constructor(e,t){this._data=e,this.id=(0,k.c)(),this.events=new se.bk,this._parameters={...De,...t},this._startPreload(e)}dispose(){this.unload(),this._data=this.update=void 0}_startPreload(e){e instanceof HTMLVideoElement?(this.update=t=>this._update(e,t),this._startPreloadVideoElement(e)):e instanceof HTMLImageElement&&this._startPreloadImageElement(e)}_startPreloadVideoElement(e){if(!((0,ce.w8)(e.src)||"auto"===e.preload&&e.crossOrigin)&&(e.preload="auto",e.crossOrigin="anonymous",e.src=e.src,e.paused&&e.autoplay)){const t=[];(0,le.i)(e,e=>t.push(e)).then(()=>{e.play()}).finally(()=>t.forEach(e=>e.remove()))}}_startPreloadImageElement(e){(0,ce.DB)(e.src)||(0,ce.w8)(e.src)||e.crossOrigin||(e.crossOrigin="anonymous",e.src=e.src)}_createDescriptor(e){const t=new Oe.R;return t.wrapMode=this._parameters.wrap??10497,t.flipped=!this._parameters.noUnpackFlip,t.samplingMode=this._parameters.mipmap?9987:9729,t.hasMipmap=!!this._parameters.mipmap,t.preMultiplyAlpha=!!this._parameters.preMultiplyAlpha,t.maxAnisotropy=this._parameters.maxAnisotropy??(this._parameters.mipmap?e.parameters.maxMaxAnisotropy:1),t.dataType=this._parameters.dataType??t.dataType,t.pixelFormat=this._parameters.pixelFormat??t.pixelFormat,t.internalFormat=this._parameters.internalFormat??t.internalFormat,t}get texture(){return this._texture??this._emptyTexture}get loaded(){return null!=this._texture}get usedMemory(){return this._texture?.usedMemory||function(e,t){if(null==e)return 0;if((0,m.mw)(e)||(0,m.mg)(e))return"image/ktx2"===t.encoding?function(e,t){if(null==ge)return e.byteLength;const r=new ge.KTX2File(new Uint8Array(e)),i=we(r)?xe(r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):"image/x.basis"===t.encoding?function(e,t){if(null==ge)return e.byteLength;const r=new ge.BasisFile(new Uint8Array(e)),i=ye(r)?xe(r.getNumLevels(0),r.getHasAlpha(),r.getImageWidth(0,0),r.getImageHeight(0,0),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):e.byteLength;const{width:r,height:i}=e instanceof Image||e instanceof ImageData||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement?Ne(e):t,n=t.pixelFormat??6408,o=(0,pe.wH)(n);return(t.mipmap?4/3:1)*r*i*o||0}(this._data,this._parameters)}load(e){if(this._loadingPromise)return this._loadingPromise;if(this._texture)return this._texture;const t=this._data;return null==t?(this._texture=new me.A(e,this._createDescriptor(e),null),this._texture):(this._emptyTexture=e.emptyTexture,this._parameters.reloadable||(this._data=void 0),"string"==typeof t?this._loadFromURL(e,t):t instanceof Image?this._loadFromImageElement(e,t):t instanceof HTMLVideoElement?this._loadFromVideoElement(e,t):t instanceof ImageData||t instanceof HTMLCanvasElement?this._loadFromImage(e,t):(0,m.mg)(t)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(e,t):(0,m.mw)(t)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(e,new Uint8Array(t)):((0,m.mw)(t)||(0,m.mg)(t))&&"image/ktx2"===this._parameters.encoding?this._loadFromKTX2(e,t):((0,m.mw)(t)||(0,m.mg)(t))&&"image/x.basis"===this._parameters.encoding?this._loadFromBasis(e,t):(0,m.mw)(t)?this._loadFromPixelData(e,new Uint8Array(t)):(0,m.iu)(t)?this._loadFromPixelData(e,t):null)}_update(e,t){return null==this._texture||e.readyState<HTMLMediaElement.HAVE_CURRENT_DATA||t===e.currentTime?t:(this._texture.setData(e),this._texture.descriptor.hasMipmap&&this._texture.generateMipmap(),this._parameters.updateCallback&&this._parameters.updateCallback(),e.currentTime)}_loadFromDDSData(e,t){return this._texture=function(e,t,r){const i=function(e,t){const r=new Int32Array(e.buffer,e.byteOffset,31);if(542327876!==r[0])return Te().error("Invalid magic number in DDS header"),null;if(!(4&r[20]))return Te().error("Unsupported format, must contain a FourCC code"),null;const i=r[21];let n,o;switch(i){case Se:n=8,o=fe.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case Ce:n=16,o=fe.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case Ee:n=16,o=fe.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return Te().error("Unsupported FourCC code:",function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}(i)),null}let s=1,a=r[4],c=r[3];(3&a||3&c)&&(Te().warn("Rounding up compressed texture size to nearest multiple of 4."),a=a+3&-4,c=c+3&-4);const l=a,u=c;let h,d;131072&r[2]&&!1!==t&&(s=Math.max(1,r[7]));let f=e.byteOffset+r[1]+4;const m=[];for(let t=0;t<s;++t)d=(a+3>>2)*(c+3>>2)*n,h=new Uint8Array(e.buffer,f,d),m.push(h),f+=d,a=Math.max(1,a>>1),c=Math.max(1,c>>1);return{textureData:{type:"compressed",levels:m},internalFormat:o,width:l,height:u}}(r,t.hasMipmap??!1);if(null==i)throw new Error("DDS texture data is null");const{textureData:n,internalFormat:o,width:s,height:a}=i;return t.samplingMode=n.levels.length>1?9987:9729,t.hasMipmap=n.levels.length>1,t.internalFormat=o,t.width=s,t.height=a,new me.A(e,t,n)}(e,this._createDescriptor(e),t),this._emptyTexture=null,this._texture}_loadFromKTX2(e,t){return this._loadAsync(()=>async function(e,t,r){null==ge&&(ge=await _e());const i=new ge.KTX2File(new Uint8Array(r));if(!we(i))return null;i.startTranscoding();const n=be(e,t,i.getLevels(),i.getHasAlpha(),i.getWidth(),i.getHeight(),(e,t)=>i.getImageTranscodedSizeInBytes(e,0,0,t),(e,t,r)=>i.transcodeImage(r,e,0,0,t,0,-1,-1));return i.close(),i.delete(),n}(e,this._createDescriptor(e),t).then(e=>(this._texture=e,e)))}_loadFromBasis(e,t){return this._loadAsync(()=>async function(e,t,r){null==ge&&(ge=await _e());const i=new ge.BasisFile(new Uint8Array(r));if(!ye(i))return null;i.startTranscoding();const n=be(e,t,i.getNumLevels(0),i.getHasAlpha(),i.getImageWidth(0,0),i.getImageHeight(0,0),(e,t)=>i.getImageTranscodedSizeInBytes(0,e,t),(e,t,r)=>i.transcodeImage(r,0,e,t,0,0));return i.close(),i.delete(),n}(e,this._createDescriptor(e),t).then(e=>(this._texture=e,e)))}_loadFromPixelData(e,t){(0,G.vA)(this._parameters.width>0&&this._parameters.height>0);const r=this._createDescriptor(e);return 6407!==r.pixelFormat&&6408!==r.pixelFormat||(r.compress=this._parameters.compressionOptions),r.width=this._parameters.width??0,r.height=this._parameters.height??0,this._texture=new me.A(e,r,t),this._texture}_loadFromURL(e,t){return this._loadAsync(async r=>{const i=await B(t,{signal:r});return(0,N.Te)(r),this._loadFromImage(e,i)})}_loadFromImageElement(e,t){return t.complete?this._loadFromImage(e,t):this._loadAsync(async r=>{const i=await(0,ue.y)(t,t.src,!1,r);return(0,N.Te)(r),this._loadFromImage(e,i)})}_loadFromVideoElement(e,t){return t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?this._loadFromImage(e,t):this._loadFromVideoElementAsync(e,t)}_loadFromVideoElementAsync(e,t){return this._loadAsync(r=>new Promise((i,n)=>{const o=()=>{t.removeEventListener("loadeddata",s),t.removeEventListener("error",a),(0,ae.xt)(c)},s=()=>{t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA&&(o(),i(this._loadFromImage(e,t)))},a=e=>{o(),n(e||new R.A("texture:load-error","Failed to load video"))};t.addEventListener("loadeddata",s),t.addEventListener("error",a);const c=(0,N.u7)(r,()=>a((0,N.NK)()))}))}_loadFromImage(e,t){let r=t;r instanceof HTMLVideoElement||(r=Re(r,e.parameters));const i=Ne(r);this._parameters.width=i.width,this._parameters.height=i.height;const n=this._createDescriptor(e);return n.width=i.width,n.height=i.height,n.compress=this._parameters.compressionOptions,this._texture=new me.A(e,n,r),this._emptyTexture=null,this.events.emit("loaded"),this._texture}_loadAsync(e){const t=new AbortController;this._loadingController=t;const r=e(t.signal);this._loadingPromise=r;const i=()=>{this._loadingController===t&&(this._loadingController=null),this._loadingPromise===r&&(this._loadingPromise=null),this._emptyTexture=null};return r.then(i,i),r}unload(){if(this._texture=(0,ae.WD)(this._texture),this._emptyTexture=null,null!=this._loadingController){const e=this._loadingController;this._loadingController=null,this._loadingPromise=null,e.abort()}this.events.emit("unloaded")}get parameters(){return this._parameters}}function Ne(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e}const De={wrap:{s:10497,t:10497},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1};var Pe=r(49255);class Be{constructor(e){this._material=e.material,this._techniques=e.techniques}dispose(){}get _stippleTextures(){return this._techniques.context?.stippleTextures}get _markerTextures(){return this._techniques.context?.markerTextures}getTechnique(e,t){return this._techniques.get(e,this._material.getConfiguration(t))}ensureResources(e){return 2}}var He=r(65786);class Le extends Be{constructor(e){super(e),this._numLoading=0,this._disposed=!1,this._textures=e.textures,this.updateTexture(e.textureId),this._acquire(e.normalTextureId,e=>this._textureNormal=e),this._acquire(e.emissiveTextureId,e=>this._textureEmissive=e),this._acquire(e.occlusionTextureId,e=>this._textureOcclusion=e),this._acquire(e.metallicRoughnessTextureId,e=>this._textureMetallicRoughness=e)}dispose(){super.dispose(),this._texture=(0,ae.Gz)(this._texture),this._textureNormal=(0,ae.Gz)(this._textureNormal),this._textureEmissive=(0,ae.Gz)(this._textureEmissive),this._textureOcclusion=(0,ae.Gz)(this._textureOcclusion),this._textureMetallicRoughness=(0,ae.Gz)(this._textureMetallicRoughness),this._disposed=!0}ensureResources(e){return 0===this._numLoading?2:1}get textureBindParameters(){return new Ue(this._texture?.texture??null,this._textureNormal?.texture??null,this._textureEmissive?.texture??null,this._textureOcclusion?.texture??null,this._textureMetallicRoughness?.texture??null)}updateTexture(e){null!=this._texture&&e===this._texture.id||(this._texture=(0,ae.Gz)(this._texture),this._acquire(e,e=>this._texture=e))}_acquire(e,t){if(null==e)return void t(null);const r=this._textures.acquire(e);if((0,N.$X)(r))return++this._numLoading,void r.then(e=>{if(this._disposed)return(0,ae.Gz)(e),void t(null);t(e)}).finally(()=>--this._numLoading);t(r)}}class ze extends He.Y{constructor(e=null){super(),this.textureEmissive=e}}class Ue extends ze{constructor(e,t,r,i,n,o,s){super(r),this.texture=e,this.textureNormal=t,this.textureOcclusion=i,this.textureMetallicRoughness=n,this.scale=o,this.normalTextureTransformMatrix=s}}var Ge=r(19245);class Ve{constructor(e,t){this.id=(0,k.c)(),this.supportsEdges=!1,this._renderPriority=0,this._parameters=new t,(0,Ge.MB)(this._parameters,e),this.validateParameters(this._parameters)}get useIndexing(){return this.parameters.useIndexing??!1}get parameters(){return this._parameters}update(e){return!1}setParameters(e,t=!0){(0,Ge.MB)(this._parameters,e)&&(this.validateParameters(this._parameters),t&&this._parametersChanged())}validateParameters(e){}shouldRender(e){return this.visible&&this.isVisibleForOutput(e.output)&&(!this.parameters.isDecoration||e.bind.decorations)&&0!==(this.parameters.renderOccluded&e.renderOccludedMask)}isVisibleForOutput(e){return!0}get renderPriority(){return this._renderPriority}set renderPriority(e){e!==this._renderPriority&&(this._renderPriority=e,this._parametersChanged())}_parametersChanged(){this.repository?.materialChanged(this)}get renderOccludedFlags(){return this.visible?this.parameters.renderOccluded:0}get testsTransparentRenderOrder(){return this.parameters.testsTransparentRenderOrder}get hasEmissions(){return!1}getConfiguration(e){return this.updateConfiguration(e),this._configuration}updateConfiguration(e){this._configuration.output=e.output,this._configuration.hasEmission=e.hasEmission&&(0,Pe._o)(e.output),this._configuration.hasHighlightMixTexture=10===e.output&&null!=e.highlightMixTexture,this._configuration.useFloatBlend=e.useFloatBlend.value}}He.Y;class je{constructor(e=0,t=!1,r=!0){this.tolerance=e,this.isVerticalRay=t,this.normalRequired=r}}const ke=(0,f.vt)();function We(e,t,r,i,n,o){if(!e.visible)return;const s=(0,h.jb)(nt,i,r),{tolerance:a}=t,c=new je(a,!1,t.options.normalRequired);if(e.boundingInfo)(0,G.vA)(0===e.type),Ze(e.boundingInfo,r,s,a,n,c,o);else{const t=e.positionAttribute,i=e.primitivePositionIndices;!function(e,t,r,i,n,o,s,a,c,l){const u=t,d=ot,f=Math.abs(u[0]),m=Math.abs(u[1]),p=Math.abs(u[2]),g=f>=m?f>=p?0:2:m>=p?1:2,v=g,_=u[v]<0?2:1,x=(g+_)%3,y=(g+(3-_))%3,w=u[x]/u[v],b=u[y]/u[v],T=1/u[v],M=Ye,S=Xe,C=Je,{normalRequired:E}=c;for(let t=r;t<i;++t){const r=3*t,i=s*n[r];(0,h.hZ)(d[0],o[i+0],o[i+1],o[i+2]);const c=s*n[r+1];(0,h.hZ)(d[1],o[c+0],o[c+1],o[c+2]);const u=s*n[r+2];(0,h.hZ)(d[2],o[u+0],o[u+1],o[u+2]),a&&((0,h.C)(d[0],a.applyToVertex(d[0][0],d[0][1],d[0][2],t)),(0,h.C)(d[1],a.applyToVertex(d[1][0],d[1][1],d[1][2],t)),(0,h.C)(d[2],a.applyToVertex(d[2][0],d[2][1],d[2][2],t))),(0,h.jb)(M,d[0],e),(0,h.jb)(S,d[1],e),(0,h.jb)(C,d[2],e);const f=M[x]-w*M[v],m=M[y]-b*M[v],p=S[x]-w*S[v],g=S[y]-b*S[v],_=C[x]-w*C[v],A=C[y]-b*C[v],R=_*g-A*p,I=f*A-m*_,O=p*m-g*f;if((R<0||I<0||O<0)&&(R>0||I>0||O>0))continue;const F=R+I+O;if(0===F)continue;const N=R*(T*M[v])+I*(T*S[v])+O*(T*C[v]);if(N*Math.sign(F)<0)continue;const D=N/F;D>=0&&l(D,E?Qe(d):null,t)}}(r,s,0,i.length/3,i,t.data,t.stride,n,c,o)}}const $e=(0,d.vt)();function Ze(e,t,r,i,n,o,s){if(null==e)return;const a=function(e,t){return(0,h.hZ)(t,1/e[0],1/e[1],1/e[2])}(r,$e);if((0,f.Ne)(ke,e.bbMin),(0,f.vI)(ke,e.bbMax),null!=n&&n.applyToAabb(ke),function(e,t,r,i){return function(e,t,r,i){const n=(e[0]-i-t[0])*r[0],o=(e[3]+i-t[0])*r[0];let s=Math.min(n,o),a=Math.max(n,o);const c=(e[1]-i-t[1])*r[1],l=(e[4]+i-t[1])*r[1];if(a=Math.min(a,Math.max(c,l)),a<0)return!1;if(s=Math.max(s,Math.min(c,l)),s>a)return!1;const u=(e[2]-i-t[2])*r[2],h=(e[5]+i-t[2])*r[2];return a=Math.min(a,Math.max(u,h)),!(a<0)&&(s=Math.max(s,Math.min(u,h)),!(s>a)&&s<1/0)}(e,t,r,i)}(ke,t,a,i)){const{primitiveIndices:a,position:c}=e,l=a?a.length:c.indices.length/3;if(l>rt){const a=e.getChildren();if(void 0!==a){for(const e of a)Ze(e,t,r,i,n,o,s);return}}!function(e,t,r,i,n,o,s,a,c,l,u){const h=e[0],d=e[1],f=e[2],m=t[0],p=t[1],g=t[2],{normalRequired:v}=l;for(let e=0;e<i;++e){const t=a[e],r=3*t,i=s*n[r];let l=o[i],_=o[i+1],x=o[i+2];const y=s*n[r+1];let w=o[y],b=o[y+1],T=o[y+2];const M=s*n[r+2];let S=o[M],C=o[M+1],E=o[M+2];null!=c&&([l,_,x]=c.applyToVertex(l,_,x,e),[w,b,T]=c.applyToVertex(w,b,T,e),[S,C,E]=c.applyToVertex(S,C,E,e));const A=w-l,R=b-_,I=T-x,O=S-l,F=C-_,N=E-x,D=p*N-F*g,P=g*O-N*m,B=m*F-O*p,H=A*D+R*P+I*B;if(Math.abs(H)<=it)continue;const L=h-l,z=d-_,U=f-x,G=L*D+z*P+U*B;if(H>0){if(G<0||G>H)continue}else if(G>0||G<H)continue;const V=z*I-R*U,j=U*A-I*L,k=L*R-A*z,W=m*V+p*j+g*k;if(H>0){if(W<0||G+W>H)continue}else if(W>0||G+W<H)continue;const $=(O*V+F*j+N*k)/H;$>=0&&u($,v?Ke(A,R,I,O,F,N,qe):null,t)}}(t,r,0,l,c.indices,c.data,c.stride,a,n,o,s)}}const qe=(0,d.vt)();const Ye=(0,d.vt)(),Xe=(0,d.vt)(),Je=(0,d.vt)();function Ke(e,t,r,i,n,o,s){return(0,h.hZ)(et,e,t,r),(0,h.hZ)(tt,i,n,o),(0,h.$A)(s,et,tt),(0,h.S8)(s,s),s}function Qe(e){return(0,h.jb)(et,e[1],e[0]),(0,h.jb)(tt,e[2],e[0]),(0,h.$A)(qe,et,tt),(0,h.S8)(qe,qe),qe}const et=(0,d.vt)(),tt=(0,d.vt)(),rt=1e3,it=1e-7,nt=(0,d.vt)(),ot=[(0,d.vt)(),(0,d.vt)(),(0,d.vt)()];var st=r(16396);function at(e,t,r){const{data:i,indices:n}=e,o=t.typedBuffer,s=t.typedBufferStride,a=n.length;r*=s;for(let e=0;e<a;++e){const t=2*n[e];o[r]=i[t],o[r+1]=i[t+1],r+=s}}function ct(e,t,r,i=1){const{data:n,indices:o}=e,s=t.typedBuffer,a=t.typedBufferStride,c=o.length;if(r*=a,1===i)for(let e=0;e<c;++e){const t=3*o[e];s[r]=n[t],s[r+1]=n[t+1],s[r+2]=n[t+2],r+=a}else for(let e=0;e<c;++e){const t=3*o[e];for(let e=0;e<i;++e)s[r]=n[t],s[r+1]=n[t+1],s[r+2]=n[t+2],r+=a}}function lt(e,t,r,i=1){const{data:n,indices:o}=e,s=t.typedBuffer,a=t.typedBufferStride,c=o.length;if(r*=a,1===i)for(let e=0;e<c;++e){const t=4*o[e];s[r]=n[t],s[r+1]=n[t+1],s[r+2]=n[t+2],s[r+3]=n[t+3],r+=a}else for(let e=0;e<c;++e){const t=4*o[e];for(let e=0;e<i;++e)s[r]=n[t],s[r+1]=n[t+1],s[r+2]=n[t+2],s[r+3]=n[t+3],r+=a}}function ut(e,t,r,i,n=1){const o=t.typedBuffer,s=t.typedBufferStride;if(i*=s,1===n)for(let t=0;t<r;++t)o[i]=e[0],o[i+1]=e[1],o[i+2]=e[2],o[i+3]=e[3],i+=s;else for(let t=0;t<r;++t)for(let t=0;t<n;++t)o[i]=e[0],o[i+1]=e[1],o[i+2]=e[2],o[i+3]=e[3],i+=s}function ht(e,t,r,i,n,o){switch(e){case"position":{(0,G.vA)(3===t.size);const i=n.getField(e,g.xs);(0,G.vA)(!!i,`No buffer view for ${e}`),function(e,t,r,i,n=1){if(!t)return void ct(e,r,i,n);const{data:o,indices:s}=e,a=r.typedBuffer,l=r.typedBufferStride,u=s.length,h=t[0],d=t[1],f=t[2],m=t[4],p=t[5],g=t[6],v=t[8],_=t[9],x=t[10],y=t[12],w=t[13],b=t[14];i*=l;let T=0,M=0,S=0;const C=(0,c.tZ)(t)?e=>{T=o[e]+y,M=o[e+1]+w,S=o[e+2]+b}:e=>{const t=o[e],r=o[e+1],i=o[e+2];T=h*t+m*r+v*i+y,M=d*t+p*r+_*i+w,S=f*t+g*r+x*i+b};if(1===n)for(let e=0;e<u;++e)C(3*s[e]),a[i]=T,a[i+1]=M,a[i+2]=S,i+=l;else for(let e=0;e<u;++e){C(3*s[e]);for(let e=0;e<n;++e)a[i]=T,a[i+1]=M,a[i+2]=S,i+=l}}(t,r,i,o);break}case"normal":{(0,G.vA)(3===t.size);const r=n.getField(e,g.xs);(0,G.vA)(!!r,`No buffer view for ${e}`),function(e,t,r,i,n=1){if(!t)return void ct(e,r,i,n);const{data:o,indices:s}=e,a=t,l=r.typedBuffer,u=r.typedBufferStride,h=s.length,d=a[0],f=a[1],m=a[2],p=a[4],g=a[5],v=a[6],_=a[8],x=a[9],y=a[10],w=!(0,c.ut)(a),b=1e-6,T=1-b;i*=u;let M=0,S=0,C=0;const E=(0,c.tZ)(a)?e=>{M=o[e],S=o[e+1],C=o[e+2]}:e=>{const t=o[e],r=o[e+1],i=o[e+2];M=d*t+p*r+_*i,S=f*t+g*r+x*i,C=m*t+v*r+y*i};if(1===n)if(w)for(let e=0;e<h;++e){E(3*s[e]);const t=M*M+S*S+C*C;if(t<T&&t>b){const e=1/Math.sqrt(t);l[i]=M*e,l[i+1]=S*e,l[i+2]=C*e}else l[i]=M,l[i+1]=S,l[i+2]=C;i+=u}else for(let e=0;e<h;++e)E(3*s[e]),l[i]=M,l[i+1]=S,l[i+2]=C,i+=u;else for(let e=0;e<h;++e){if(E(3*s[e]),w){const e=M*M+S*S+C*C;if(e<T&&e>b){const t=1/Math.sqrt(e);M*=t,S*=t,C*=t}}for(let e=0;e<n;++e)l[i]=M,l[i+1]=S,l[i+2]=C,i+=u}}(t,i,r,o);break}case"normalCompressed":case"profileRight":case"profileUp":{(0,G.vA)(2===t.size);const r=n.getField(e,g.mJ);(0,G.vA)(!!r,`No buffer view for ${e}`),at(t,r,o);break}case"uv0":{(0,G.vA)(2===t.size);const r=n.getField(e,g.ZD)??n.getField(e,g.gH);(0,G.vA)(!!r,`No buffer view for ${e}`),at(t,r,o);break}case"uvi":{(0,G.vA)(2===t.size);const r=n.getField(e,g.mJ);(0,G.vA)(!!r,`No buffer view for ${e}`),at(t,r,o);break}case"color":case"symbolColor":{const r=n.getField(e,g.XP);(0,G.vA)(!!r,`No buffer view for ${e}`),(0,G.vA)(3===t.size||4===t.size),function(e,t,r,i,n=1){const{data:o,indices:s}=e,a=r.typedBuffer,c=r.typedBufferStride,l=s.length;if(i*=c,t===o.length&&4===t){a[i]=o[0],a[i+1]=o[1],a[i+2]=o[2],a[i+3]=o[3];const e=new Uint32Array(r.typedBuffer.buffer,r.start),t=c/4,s=e[i/=4];i+=t;const u=l*n;for(let r=1;r<u;++r)e[i]=s,i+=t;return}if(1!==n)if(4!==t)for(let e=0;e<l;++e){const t=3*s[e];for(let e=0;e<n;++e)a[i]=o[t],a[i+1]=o[t+1],a[i+2]=o[t+2],a[i+3]=255,i+=c}else for(let e=0;e<l;++e){const t=4*s[e];for(let e=0;e<n;++e)a[i]=o[t],a[i+1]=o[t+1],a[i+2]=o[t+2],a[i+3]=o[t+3],i+=c}else{if(4===t){for(let e=0;e<l;++e){const t=4*s[e];a[i]=o[t],a[i+1]=o[t+1],a[i+2]=o[t+2],a[i+3]=o[t+3],i+=c}return}for(let e=0;e<l;++e){const t=3*s[e];a[i]=o[t],a[i+1]=o[t+1],a[i+2]=o[t+2],a[i+3]=255,i+=c}}}(t,t.size,r,o);break}case"colorFeatureAttribute":case"opacityFeatureAttribute":case"sizeFeatureAttribute":{const r=n.getField(e,g.Y$)??n.getField(e,g.Y$);(0,G.vA)(!!r,`No buffer view for ${e}`),(0,G.vA)(1===t.size),function(e,t,r){const{data:i,indices:n}=e,o=t.typedBuffer,s=t.typedBufferStride,a=n.length,c=i[0];r*=s;for(let e=0;e<a;++e)o[r]=c,r+=s}(t,r,o);break}case"tangent":{(0,G.vA)(4===t.size);const i=n.getField(e,g.Eq);(0,G.vA)(!!i,`No buffer view for ${e}`),function(e,t,r,i,n=1){if(!t)return void lt(e,r,i,n);const{data:o,indices:s}=e,a=t,l=r.typedBuffer,u=r.typedBufferStride,h=s.length,d=a[0],f=a[1],m=a[2],p=a[4],g=a[5],v=a[6],_=a[8],x=a[9],y=a[10],w=!(0,c.ut)(a),b=1e-6,T=1-b;if(i*=u,1===n)for(let e=0;e<h;++e){const t=4*s[e],r=o[t],n=o[t+1],a=o[t+2],c=o[t+3];let h=d*r+p*n+_*a,M=f*r+g*n+x*a,S=m*r+v*n+y*a;if(w){const e=h*h+M*M+S*S;if(e<T&&e>b){const t=1/Math.sqrt(e);h*=t,M*=t,S*=t}}l[i]=h,l[i+1]=M,l[i+2]=S,l[i+3]=c,i+=u}else for(let e=0;e<h;++e){const t=4*s[e],r=o[t],a=o[t+1],c=o[t+2],h=o[t+3];let M=d*r+p*a+_*c,S=f*r+g*a+x*c,C=m*r+v*a+y*c;if(w){const e=M*M+S*S+C*C;if(e<T&&e>b){const t=1/Math.sqrt(e);M*=t,S*=t,C*=t}}for(let e=0;e<n;++e)l[i]=M,l[i+1]=S,l[i+2]=C,l[i+3]=h,i+=u}}(t,r,i,o);break}case"profileVertexAndNormal":{(0,G.vA)(4===t.size);const r=n.getField(e,g.jz)??n.getField(e,g.Eq);(0,G.vA)(!!r,`No buffer view for ${e}`),lt(t,r,o);break}case"profileAuxData":{(0,G.vA)(3===t.size);const r=n.getField(e,g.EC)??n.getField(e,g.xs);(0,G.vA)(!!r,`No buffer view for ${e}`),ct(t,r,o);break}}}(0,d.vt)();class dt{constructor(e){this.layout=e}elementCount(e){return e.get("position").indices.length}write(e,t,r,i,n,o){return function(e,t,r,i,n,o,s){let a={numItems:0,numVerticesPerItem:0};for(const c of r.fields.keys()){const r=e.get(c),l=r?.indices;if(r&&l)"position"===c&&(a={numItems:1,numVerticesPerItem:l.length}),ht(c,r,i,n,o,s);else if("olidColor"===c&&null!=t){const r=e.get("position")?.indices;if(r){const e=r.length;ut(t,o.getField(c,g.XP),e,s)}}}return a}(r,i,this.layout,e,t,n,o)}}const ft={factor:1,units:1},mt={factor:-1,units:-2},pt=new Array;pt[0]=null,pt[1]=ft,pt[2]={factor:-5,units:-5},pt[3]={factor:0,units:-4},pt[4]={factor:1,units:2};const gt=pt.map(e=>function(e,t){return t?{factor:e.factor+t.factor,units:e.units+t.units}:e}(mt,e));function vt({output:e,enableOITOffset:t,polygonOffset:r}){return(0,Pe.Sp)(e)&&t?gt[r]:pt[r]}pt[1]=ft;const _t=(0,d.vt)();var xt=r(5482),yt=r(91429),wt=r(91829),bt=r(4431),Tt=r(1843),Mt=r(72824),St=r(13840),Ct=r(42958),Et=r(16943),At=r(90644);const Rt=(0,At.p3)(1,0,1,771);function It(e,t=!1){switch(e){case 0:return t?At.RC:At.T8;case 1:return Rt;default:return null}}function Ot(e){if(e.draped)return null;switch(e.output){case 0:case 2:default:return e.writeDepth?At.Uy:null;case 1:return null}}function Ft(e,t=513){return{func:(0,Pe.Sp)(e)?515:t}}const Nt={mask:255},Dt={function:{func:519,ref:2,mask:2},operation:{fail:7680,zFail:7680,zPass:0}},Pt={function:{func:519,ref:2,mask:2},operation:{fail:7680,zFail:7680,zPass:7681}};var Bt=r(4576);r(66289);var Ht=r(69622),Lt=r(32728);class zt{constructor(e){this.localTransform=e.localTransform,this.globalTransform=e.globalTransform,this.modelOrigin=e.modelOrigin,this.model=e.instanceModel,this.modelNormal=e.instanceModelNormal,this.modelScaleFactors=e.modelScaleFactors,this.boundingSphere=e.boundingSphere,this.featureAttribute=e.getField("instanceFeatureAttribute",g.Eq),this.color=e.getField("instanceColor",g.XP),this.olidColor=e.getField("instanceOlidColor",g.XP),this.state=e.getField("state",g.SL),this.lodLevel=e.getField("lodLevel",g.SL)}}let Ut=class extends Ht.A{constructor(e,t){super(e),this.events=new se.bk,this._capacity=0,this._size=0,this._next=0,this._highlightOptionsMap=new Map,this._highlightOptionsMapPrev=new Map,this._layout=function(e){return Vt(Gt.clone(),e).u8("state").u8("lodLevel")}(t),this._capacity=Zt,this._buffer=this._layout.createBuffer(this._capacity),this._view=new zt(this._buffer)}get capacity(){return this._capacity}get size(){return this._size}get view(){return this._view}addInstance(){this._size+1>this._capacity&&this._grow();const e=this._findSlot();return this._view.state.set(e,1),this._size++,this.events.emit("instances-changed"),e}removeInstance(e){const t=this._view.state;(0,G.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),this._getStateFlag(e,18)?this._setStateFlags(e,32):this.freeInstance(e),this.events.emit("instances-changed")}freeInstance(e){const t=this._view.state;(0,G.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),t.set(e,0),this._size--}setLocalTransform(e,t,r=!0){this._view.localTransform.setMat(e,t),r&&this.updateModelTransform(e)}getLocalTransform(e,t){this._view.localTransform.getMat(e,t)}setGlobalTransform(e,t,r=!0){this._view.globalTransform.setMat(e,t),r&&this.updateModelTransform(e)}getGlobalTransform(e,t){this._view.globalTransform.getMat(e,t)}updateModelTransform(e){const t=this._view,r=jt,i=kt;t.localTransform.getMat(e,Wt),t.globalTransform.getMat(e,$t);const n=(0,c.lw)($t,$t,Wt);(0,h.hZ)(r,n[12],n[13],n[14]),t.modelOrigin.setVec(e,r),(0,s.z0)(i,n),t.model.setMat(e,i);const o=(0,Lt.wp)(jt,n);o.sort(),t.modelScaleFactors.set(e,0,o[1]),t.modelScaleFactors.set(e,1,o[2]),(0,s.B8)(i,i),(0,s.mg)(i,i),t.modelNormal.setMat(e,i),this._setStateFlags(e,64),this.events.emit("instance-transform-changed",{index:e})}getModelTransform(e,t){const r=this._view;r.model.getMat(e,kt),r.modelOrigin.getVec(e,jt),t[0]=kt[0],t[1]=kt[1],t[2]=kt[2],t[3]=0,t[4]=kt[3],t[5]=kt[4],t[6]=kt[5],t[7]=0,t[8]=kt[6],t[9]=kt[7],t[10]=kt[8],t[11]=0,t[12]=jt[0],t[13]=jt[1],t[14]=jt[2],t[15]=1}applyShaderTransformation(e,t){null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedModelTransform(e,t){return this.getModelTransform(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t),t}getCombinedLocalTransform(e,t){this._view.localTransform.getMat(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedMaxScaleFactor(e){let t=this._view.modelScaleFactors.get(e,1);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(jt,this,e),t*=Math.max(jt[0],jt[1],jt[2])),t}getCombinedMedianScaleFactor(e){let t=this._view.modelScaleFactors.get(e,0);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(jt,this,e),t*=function(e,t,r){return Math.max(Math.min(e,t),Math.min(Math.max(e,t),r))}(jt[0],jt[1],jt[2])),t}getModel(e,t){this._view.model.getMat(e,t)}setFeatureAttribute(e,t){this._view.featureAttribute?.setVec(e,t)}getFeatureAttribute(e,t){this._view.featureAttribute?.getVec(e,t)}setColor(e,t){this._view.color?.setVec(e,t)}setObjectAndLayerIdColor(e,t){this._view.olidColor?.setVec(e,t)}setVisible(e,t){t!==this.getVisible(e)&&(this._setStateFlag(e,4,t),this.events.emit("instance-visibility-changed",{index:e}))}getVisible(e){return this._getStateFlag(e,4)}setHighlight(e,t){const{_highlightOptionsMap:r}=this,i=r.get(e);t?t!==i&&(r.set(e,t),this._setStateFlag(e,8,!0),this.events.emit("instance-highlight-changed")):i&&(r.delete(e),this._setStateFlag(e,8,!1),this.events.emit("instance-highlight-changed"))}get highlightOptionsMap(){return this._highlightOptionsMap}getHighlightStateFlag(e){return this._getStateFlag(e,8)}geHighlightOptionsPrev(e){const t=this._highlightOptionsMapPrev.get(e)??null;return this._highlightOptionsMapPrev.delete(e),t}getHighlightName(e){const t=this.highlightOptionsMap.get(e)??null;return t?this._highlightOptionsMapPrev.set(e,t):this._highlightOptionsMapPrev.delete(e),t}getState(e){return this._view.state.get(e)}getLodLevel(e){return this._view.lodLevel.get(e)}countFlags(e){let t=0;for(let r=0;r<this._capacity;++r)this.getState(r)&e&&++t;return t}_setStateFlags(e,t){const r=this._view.state;t=r.get(e)|t,r.set(e,t)}_clearStateFlags(e,t){const r=this._view.state;t=r.get(e)&~t,r.set(e,t)}_setStateFlag(e,t,r){r?this._setStateFlags(e,t):this._clearStateFlags(e,t)}_getStateFlag(e,t){return!!(this._view.state.get(e)&t)}_grow(){this._capacity=Math.max(Zt,Math.floor(this._capacity*Bt.Ji)),this._buffer=this._layout.createBuffer(this._capacity).copyFrom(this._buffer),this._view=new zt(this._buffer)}_findSlot(){const e=this._view.state;let t=this._next;for(;1&e.get(t);)t=t+1===this._capacity?0:t+1;return this._next=t+1===this._capacity?0:t+1,t}};(0,xt.Cg)([(0,yt.MZ)({constructOnly:!0})],Ut.prototype,"shaderTransformation",void 0),(0,xt.Cg)([(0,yt.MZ)()],Ut.prototype,"_size",void 0),(0,xt.Cg)([(0,yt.MZ)({readOnly:!0})],Ut.prototype,"size",null),Ut=(0,xt.Cg)([(0,yt.$K)("esri.views.3d.webgl-engine.lib.lodRendering.InstanceData")],Ut);const Gt=(0,Tt.BP)().mat4f64("localTransform").mat4f64("globalTransform").vec4f64("boundingSphere").vec3f64("modelOrigin").mat3f("instanceModel").mat3f("instanceModelNormal").vec2f("modelScaleFactors");function Vt(e,t){return t.instancedFeatureAttribute&&e.vec4f("instanceFeatureAttribute"),t.instancedColor&&e.vec4u8("instanceColor"),(0,Et.E)()&&e.vec4u8("instanceOlidColor"),e}const jt=(0,d.vt)(),kt=(0,a.vt)(),Wt=(0,l.vt)(),$t=(0,l.vt)(),Zt=64,qt=(0,Tt.BP)().vec3f("instanceModelOriginHi").vec3f("instanceModelOriginLo").mat3f("instanceModel").mat3f("instanceModelNormal");var Yt=r(74810),Xt=r(28491),Jt=r(49788);class Kt extends Mt.Zo{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=Yt.mb,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=2,this.instanced=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.instanceColorEncodesAlphaIgnore=!1,this.emissiveStrengthFromSymbol=0,this.emissiveStrengthKHR=1,this.emissiveSource=1,this.emissiveBaseColor=d.uY,this.instancedDoublePrecision=!1,this.normalType=0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=(0,d.CN)(.2,.2,.2),this.diffuse=(0,d.CN)(.8,.8,.8),this.externalColor=(0,wt.fA)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,d.vt)(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.modelTransformation=null,this.drivenOpacity=!1,this.writeDepth=!0,this.customDepthTest=0,this.textureAlphaMode=0,this.textureAlphaCutoff=Jt.Q,this.textureAlphaPremultiplied=!1,this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}Mt.gy;let Qt=class extends Ct.w{constructor(e,t){let i=(0,bt.U)(rr(t));t.instanced&&t.instancedDoublePrecision&&(i=i.concat((0,bt.U)(function(e){return Vt(qt.clone(),e)}(t)))),super(e,t,i),this.shader=new St.r(Xt.D,()=>r.e(5141).then(r.bind(r,5141))),this.ignoreUnused=!0}_makePipeline(e,t){const{output:r,transparent:i,cullFace:n,customDepthTest:o,hasOccludees:s}=e;return(0,At.Ey)({blending:i?It(r):null,culling:tr(e)?(0,At.Xt)(n):null,depthTest:Ft(r,er(o)),depthWrite:Ot(e),colorWrite:At.kn,stencilWrite:s?Nt:null,stencilTest:s?t?Pt:Dt:null,polygonOffset:vt(e)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e,t){return t?this._occludeePipelineState:super.getPipeline(e)}};function er(e){switch(e){case 1:return 515;case 0:case 3:return 513;case 2:return 516}}function tr(e){return 0!==e.cullFace||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}function rr(e){const t=(0,Tt.BP)().vec3f("position");return 1===e.normalType?t.vec2i16("normalCompressed",{glNormalized:!0}):t.vec3f("normal"),e.hasVertexTangents&&t.vec4f("tangent"),e.hasTextures&&t.vec2f16("uv0"),e.hasVertexColors&&t.vec4u8("color",{glNormalized:!0}),e.hasSymbolColors&&t.vec4u8("symbolColor"),!e.instanced&&(0,Et.E)()&&t.vec4u8("olidColor"),t}Qt=(0,xt.Cg)([(0,yt.$K)("esri.views.3d.webgl-engine.shaders.DefaultMaterialTechnique")],Qt);var ir=r(51976),nr=r(68317);class or extends nr.Hz{constructor(){super(...arguments),this.hasHighlightMixTexture=!1,this.bindType=1,this.instanced=!1,this.writeDepth=!0,this.oitPremultipliedAlpha=!1}}(0,xt.Cg)([(0,ir.W)()],or.prototype,"hasHighlightMixTexture",void 0);class sr extends or{constructor(){super(...arguments),this.polygonOffset=0,this.transparent=!1,this.enableOITOffset=!0}}(0,xt.Cg)([(0,ir.W)({count:5})],sr.prototype,"polygonOffset",void 0),(0,xt.Cg)([(0,ir.W)()],sr.prototype,"transparent",void 0),(0,xt.Cg)([(0,ir.W)()],sr.prototype,"enableOITOffset",void 0);class ar extends sr{constructor(e){super(),this.spherical=e,this.alphaDiscardMode=1,this.doubleSidedMode=0,this.pbrMode=0,this.cullFace=0,this.normalType=0,this.customDepthTest=0,this.emissionSource=0,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.instanced=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.textureAlphaPremultiplied=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.writeDepth=!0,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0,this.draped=!1}get textureCoordinateType(){return this.hasTextures?1:0}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}get hasVVInstancing(){return this.instanced}get discardInvisibleFragments(){return this.transparent}}(0,xt.Cg)([(0,ir.W)({count:4})],ar.prototype,"alphaDiscardMode",void 0),(0,xt.Cg)([(0,ir.W)({count:3})],ar.prototype,"doubleSidedMode",void 0),(0,xt.Cg)([(0,ir.W)({count:7})],ar.prototype,"pbrMode",void 0),(0,xt.Cg)([(0,ir.W)({count:3})],ar.prototype,"cullFace",void 0),(0,xt.Cg)([(0,ir.W)({count:3})],ar.prototype,"normalType",void 0),(0,xt.Cg)([(0,ir.W)({count:3})],ar.prototype,"customDepthTest",void 0),(0,xt.Cg)([(0,ir.W)({count:8})],ar.prototype,"emissionSource",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"hasVertexColors",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"hasSymbolColors",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"hasVerticalOffset",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"hasColorTexture",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"hasMetallicRoughnessTexture",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"hasOcclusionTexture",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"hasNormalTexture",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"hasScreenSizePerspective",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"hasVertexTangents",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"hasOccludees",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"instanced",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"instancedDoublePrecision",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"hasModelTransformation",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"offsetBackfaces",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"hasVVSize",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"hasVVColor",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"receiveShadows",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"receiveAmbientOcclusion",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"textureAlphaPremultiplied",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"instancedFeatureAttribute",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"instancedColor",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"writeDepth",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"terrainDepthTest",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"cullAboveTerrain",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"snowCover",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"hasColorTextureTransform",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"hasEmissionTextureTransform",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"hasNormalTextureTransform",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"hasOcclusionTextureTransform",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"hasMetallicRoughnessTextureTransform",void 0);var cr=r(57323);let lr=class extends Qt{constructor(){super(...arguments),this.shader=new St.r(cr.R,()=>r.e(2314).then(r.bind(r,39933)))}};lr=(0,xt.Cg)([(0,yt.$K)("esri.views.3d.webgl-engine.shaders.RealisticTreeTechnique")],lr);class ur extends Ve{constructor(e,t){super(e,dr),this.materialType="default",this.supportsEdges=!0,this.intersectDraped=void 0,this.produces=new Map([[2,e=>((0,Pe.iq)(e)||(0,Pe.yT)(e))&&!this.transparent],[4,e=>((0,Pe.iq)(e)||(0,Pe.yT)(e))&&this.transparent&&this.parameters.writeDepth],[9,e=>((0,Pe.iq)(e)||(0,Pe.yT)(e))&&this.transparent&&!this.parameters.writeDepth]]),this._layout=rr(this.parameters),this._configuration=new ar(t.spherical)}isVisibleForOutput(e){return 5!==e&&7!==e&&6!==e||this.parameters.castShadows}get visible(){const{layerOpacity:e,colorMixMode:t,opacity:r,externalColor:i}=this.parameters;return e*("replace"===t?1:r)*("ignore"===t||isNaN(i[3])?1:i[3])>=Jt.Q}get _hasEmissiveBase(){return!!this.parameters.emissiveTextureId||!(0,h.t2)(this.parameters.emissiveBaseColor,d.uY)}get hasEmissions(){return this.parameters.emissiveStrength>0&&(0===this.parameters.emissiveSource&&this._hasEmissiveBase||1===this.parameters.emissiveSource)}updateConfiguration(e){super.updateConfiguration(e);const{parameters:t,_configuration:r}=this;r.hasNormalTexture=t.hasNormalTexture,r.hasColorTexture=t.hasColorTexture,r.hasMetallicRoughnessTexture=t.hasMetallicRoughnessTexture,r.hasOcclusionTexture=t.hasOcclusionTexture;const{treeRendering:i,doubleSided:n,doubleSidedType:o}=t;r.hasVertexTangents=!i&&t.hasVertexTangents,r.instanced=t.instanced,r.instancedDoublePrecision=t.instancedDoublePrecision,r.hasVVColor=!!t.vvColor,r.hasVVSize=!!t.vvSize,r.hasVerticalOffset=null!=t.verticalOffset,r.hasScreenSizePerspective=null!=t.screenSizePerspective,r.hasSlicePlane=t.hasSlicePlane,r.alphaDiscardMode=t.textureAlphaMode,r.normalType=i?0:t.normalType,r.transparent=this.transparent,r.enableOITOffset=e.enableOITOffset,r.writeDepth=t.writeDepth,r.customDepthTest=t.customDepthTest??0,r.hasOccludees=e.hasOccludees,r.cullFace=t.hasSlicePlane?0:t.cullFace,r.cullAboveTerrain=e.cullAboveTerrain,r.hasModelTransformation=!i&&null!=t.modelTransformation,r.hasVertexColors=t.hasVertexColors,r.hasSymbolColors=t.hasSymbolColors,r.doubleSidedMode=i?2:n&&"normal"===o?1:n&&"winding-order"===o?2:0,r.instancedFeatureAttribute=t.instancedFeatureAttribute,r.instancedColor=t.instancedColor,(0,Pe._o)(e.output)?(r.terrainDepthTest=e.terrainDepthTest,r.receiveShadows=t.receiveShadows,r.receiveAmbientOcclusion=t.receiveAmbientOcclusion&&null!=e.ssao):(r.terrainDepthTest=!1,r.receiveShadows=r.receiveAmbientOcclusion=!1),r.textureAlphaPremultiplied=!!t.textureAlphaPremultiplied,r.pbrMode=t.usePBR?t.isSchematic?2:1:0,r.emissionSource=t.emissionSource,r.offsetBackfaces=!(!this.transparent||!t.offsetTransparentBackfaces),r.snowCover=e.snowCover>0,r.hasColorTextureTransform=!!t.colorTextureTransformMatrix,r.hasNormalTextureTransform=!!t.normalTextureTransformMatrix,r.hasEmissionTextureTransform=!!t.emissiveTextureTransformMatrix,r.hasOcclusionTextureTransform=!!t.occlusionTextureTransformMatrix,r.hasMetallicRoughnessTextureTransform=!!t.metallicRoughnessTextureTransformMatrix}intersect(e,t,r,i,n,o){if(null!=this.parameters.verticalOffset){const e=r.camera;(0,h.hZ)(_r,t[12],t[13],t[14]);let o=null;switch(r.viewingMode){case 1:o=(0,h.S8)(gr,_r);break;case 2:o=(0,h.C)(gr,pr)}const s=(0,h.Re)(xr,_r,e.eye),a=(0,h.Bw)(s),c=(0,h.hs)(s,s,1/a);let l=null;this.parameters.screenSizePerspective&&(l=(0,h.Om)(o,c));const u=(0,Ge.kE)(e,a,this.parameters.verticalOffset,l??0,this.parameters.screenSizePerspective,null);(0,h.hs)(o,o,u),(0,h.ei)(vr,o,r.transform.inverseRotation),i=(0,h.Re)(fr,i,vr),n=(0,h.Re)(mr,n,vr)}o=function(e,t,r,i){const n=vt(t);if(!n)return e;const o=5e-6*n.units,s=(0,h.S8)(_t,(0,h.jb)(_t,i,r));return(t,r,i)=>{const a=(r?1-Math.abs((0,h.Om)(s,r)):0)*n.factor*5e-5+o;return e(t+a,r,i)}}(o,this._configuration,i,n),We(e,r,i,n,(0,st.ou)(r.verticalOffset),o)}createGLMaterial(e){return new hr(e)}createBufferWriter(){return new dt(this._layout)}get transparent(){return function(e){const{drivenOpacity:t,opacity:r,externalColor:i,layerOpacity:n,texture:o,textureId:s,textureAlphaMode:a,colorMixMode:c}=e,l=i[3];return t||r<1&&"replace"!==c||l<1&&"ignore"!==c||n<1||(null!=o||null!=s)&&1!==a&&2!==a&&"replace"!==c}(this.parameters)}}class hr extends Le{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});const t=this._material.parameters;this.updateTexture(t.textureId);const r=e.camera.viewInverseTransposeMatrix;return(0,h.hZ)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?lr:Qt,e)}}class dr extends Kt{constructor(){super(...arguments),this.treeRendering=!1,this.useIndexing=!1,this.hasVertexTangents=!1}get hasNormalTexture(){return!this.treeRendering&&!!this.normalTextureId}get hasColorTexture(){return!!this.textureId}get hasMetallicRoughnessTexture(){return!this.treeRendering&&!!this.metallicRoughnessTextureId}get hasOcclusionTexture(){return!this.treeRendering&&!!this.occlusionTextureId}get emissiveStrength(){return this.emissiveStrengthFromSymbol*this.emissiveStrengthKHR}get emissionSource(){return this.treeRendering?0:null!=this.emissiveTextureId&&0===this.emissiveSource?3:0===this.emissiveSource?2:1}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}}const fr=(0,d.vt)(),mr=(0,d.vt)(),pr=(0,d.fA)(0,0,1),gr=(0,d.vt)(),vr=(0,d.vt)(),_r=(0,d.vt)(),xr=(0,d.vt)(),yr=()=>I.A.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");class wr{constructor(e,t,r){this.resource=e,this.textures=t,this.usedMemory=r}}function br(e){const t=e.params,r=t.topology;let i=!0;switch(t.vertexAttributes||(yr().warn("Geometry must specify vertex attributes"),i=!1),t.topology){case"PerAttributeArray":break;case"Indexed":case null:case void 0:{const e=t.faces;if(e){if(t.vertexAttributes)for(const r in t.vertexAttributes){const t=e[r];t?.values?(null!=t.valueType&&"UInt32"!==t.valueType&&(yr().warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),i=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&(yr().warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),i=!1)):(yr().warn(`Indexed geometry does not specify face indices for '${r}' attribute`),i=!1)}}else yr().warn("Indexed geometries must specify faces"),i=!1;break}default:yr().warn(`Unsupported topology '${r}'`),i=!1}e.params.material||(yr().warn("Geometry requires material"),i=!1);const n=e.params.vertexAttributes;for(const e in n)n[e].values||(yr().warn("Geometries with externally defined attributes are not yet supported"),i=!1);return i}function Tr(e){const t=(0,f.Ie)();return e.forEach(e=>{const r=e.boundingInfo;null!=r&&((0,f.iT)(t,r.bbMin),(0,f.iT)(t,r.bbMax))}),t}function Mr(e){switch(e){case"mask":return 2;case"maskAndTransparency":return 3;case"none":return 1;default:return 0}}function Sr(e){const t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const Cr=new D.A(1,2,"wosr");async function Er(e,t){const a=function(e){const t=e.match(/(.*\.(gltf|glb))(\?lod=([0-9]+))?$/);return t?{fileType:"gltf",url:t[1],specifiedLodIndex:null!=t[4]?Number(t[4]):null}:e.match(/(.*\.(json|json\.gz))$/)?{fileType:"wosr",url:e,specifiedLodIndex:null}:{fileType:"unknown",url:e,specifiedLodIndex:null}}((0,n.EM)(e));if("wosr"===a.fileType){const e=await(t.cache?t.cache.loadWOSR(a.url,t):async function(e,t){const r=await async function(e,t){const r=await(0,A.Ke)((0,E.A)(e,t));if(r.ok)return r.value.data;(0,N.QP)(r.error),function(e){throw new R.A("",`Request for object resource failed: ${e}`)}(r.error)}(e,t),i=await async function(e,t){const r=new Array;for(const i in e){const n=e[i],o=n.images[0].data;if(!o){yr().warn("Externally referenced texture data is not yet supported");continue}const s=n.encoding+";base64,"+o,a="/textureDefinitions/"+i,c="rgba"===n.channels?n.alphaChannelUsage||"transparency":"none",l={noUnpackFlip:!0,wrap:{s:10497,t:10497},preMultiplyAlpha:1!==Mr(c)},u=t?.disableTextures?Promise.resolve(null):B(s,t);r.push(u.then(e=>({refId:a,image:e,parameters:l,alphaChannelUsage:c})))}const i=await Promise.all(r),n={};for(const e of i)n[e.refId]=e;return n}(r.textureDefinitions??{},t);let n=0;for(const e in i)if(i.hasOwnProperty(e)){const t=i[e];n+=t?.image?t.image.width*t.image.height*4:0}return new wr(r,i,n+(0,O.Qh)(r))}(a.url,t)),{engineResources:r,referenceBoundingBox:i}=function(e,t){const r=new Array,i=new Array,n=new Array,o=new F,s=e.resource,a=D.A.parse(s.version||"1.0","wosr");Cr.validate(a);const c=s.model.name,l=s.model.geometries,u=s.materialDefinitions??{},h=e.textures;let f=0;const m=new Map;for(let e=0;e<l.length;e++){const s=l[e];if(!br(s))continue;const a=Sr(s),c=s.params.vertexAttributes,p=[],g=e=>{if("PerAttributeArray"===s.params.topology)return null;const t=s.params.faces;for(const r in t)if(r===e)return t[r].values;return null},v=c.position,_=v.values.length/v.valuesPerElement;for(const e in c){const t=c[e],r=t.values,i=g(e)??(0,P.tM)(_);p.push([e,new H.n(r,i,t.valuesPerElement,!0)])}const x=a.texture,y=h&&h[x];if(y&&!m.has(x)){const{image:e,parameters:t}=y,r=new Fe(e,t);i.push(r),m.set(x,r)}const w=m.get(x),b=w?w.id:void 0,T=a.material;let M=o.get(T,x);if(null==M){const e=u[T.slice(T.lastIndexOf("/")+1)].params;1===e.transparency&&(e.transparency=0);const r=y?Mr(y.alphaChannelUsage):void 0,i={ambient:(0,d.ci)(e.diffuse),diffuse:(0,d.ci)(e.diffuse),opacity:1-(e.transparency||0),textureAlphaMode:r,textureAlphaCutoff:.33,textureId:b,doubleSided:!0,cullFace:0,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:y?.parameters.preMultiplyAlpha??!1};t?.materialParameters&&Object.assign(i,t.materialParameters),M=new ur(i,t),o.set(T,x,M)}n.push(M);const S=new ne(M,p);f+=p.find(e=>"position"===e[0])?.[1]?.indices.length??0,r.push(S)}return{engineResources:[{name:c,stageResources:{textures:i,materials:n,geometries:r},pivotOffset:s.model.pivotOffset,numberOfVertices:f,lodThreshold:null}],referenceBoundingBox:Tr(r)}}(e,t);return{lods:r,referenceBoundingBox:i,isEsriSymbolResource:!1,isWosr:!0}}let m;if(t.cache)m=await t.cache.loadGLTF(a.url,t,!!t.usePBR,!!t.useEmissive);else{const{loadGLTF:e}=await r.e(1698).then(r.bind(r,51698));m=await e(new y.R,a.url,t,t.usePBR,t.useEmissive)}const{engineResources:T,referenceBoundingBox:S}=function(e,t,r){const n=e.model,a=e.meta,m=n.meta?.ESRI_proxyEllipsoid,y=a.isEsriSymbolResource&&null!=m&&"EsriRealisticTreesStyle"===a.ESRI_webstyle;y&&!e.customMeta.esriTreeRendering&&(e.customMeta.esriTreeRendering=!0,function(e,t){for(let r=0;r<e.model.lods.length;++r){const n=e.model.lods[r];for(const o of n.parts){const n=o.attributes.normal;if(null==n)return;const s=o.attributes.position,a=s.count,u=(0,d.vt)(),f=(0,d.vt)(),m=(0,d.vt)(),p=new Float32Array(4*a),v=new Float32Array(3*a),_=(0,c.B8)((0,l.vt)(),o.transform);let x=0,y=0;for(let c=0;c<a;c++){s.getVec(c,f),n.getVec(c,u),(0,h.Z0)(f,f,o.transform),(0,h.Re)(m,f,t.center),(0,h.Qr)(m,m,t.radius);const a=m[2],l=(0,h.Bw)(m),d=Math.min(.45+.55*l*l,1)**i.Tf;(0,h.Qr)(m,m,t.radius),null!==_&&(0,h.Z0)(m,m,_),(0,h.S8)(m,m),r+1!==e.model.lods.length&&e.model.lods.length>1&&(0,h.Cc)(m,m,u,a>-1?.2:Math.min(-4*a-3.8,1)),v[x]=m[0],v[x+1]=m[1],v[x+2]=m[2],x+=3,p[y]=d,p[y+1]=d,p[y+2]=d,p[y+3]=1,y+=4}o.attributes.normal=new g.xs(v.buffer),o.attributes.color=new g.Eq(p.buffer)}}}(e,m));const T=!!t.usePBR,S=a.isEsriSymbolResource?{usePBR:T,isSchematic:!1,treeRendering:y,mrrFactors:Yt.SY}:{usePBR:T,isSchematic:!1,treeRendering:!1,mrrFactors:Yt.mb},E={...t.materialParameters,treeRendering:y},A=new Array,R=new Map,I=new Map,O=n.lods.length,F=(0,f.Ie)();return n.lods.forEach((e,a)=>{const c=!0===t.skipHighLods&&(O>1&&0===a||O>3&&1===a)||!1===t.skipHighLods&&null!=r&&a!==r;if(c&&0!==a)return;const l=new C(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach(e=>{const r=c?new ur({},t):function(e,t,r,n,o,s,a,c,l){const h=e.materials.get(t.material);if(null==h)return null;const{normal:d,color:f,texCoord0:m,tangent:p}=t.attributes,g=t.material+(d?"_normal":"")+(f?"_color":"")+(m?"_texCoord0":"")+(p?"_tangent":""),v=null!=t.attributes.texCoord0,_=null!=t.attributes.normal,x=function(e){switch(e){case"BLEND":return 0;case"MASK":return 2;case"OPAQUE":case null:case void 0:return 1}}(h.alphaMode);if(!s.has(g)){if(v){const t=(t,r=!1,i=!1)=>{if(null!=t&&!a.has(t)){const n=e.textures.get(t);if(n){const e=n.data,o=r&&!(0,b.x3)(e)?c.compressionOptions:void 0;a.set(t,new Fe((0,b.x3)(e)?e.data:e,{...n.parameters,preMultiplyAlpha:!(0,b.x3)(e)&&i,encoding:(0,b.x3)(e)?e.encoding:void 0,compressionOptions:o}))}}},r=1!==x&&!l;t(h.colorTexture,r,1!==x),t(h.normalTexture),t(h.occlusionTexture,!0),t(h.emissiveTexture),t(h.metallicRoughnessTexture,!0)}const r=(0,i.xV)(h.color[0]),d=(0,i.xV)(h.color[1]),f=(0,i.xV)(h.color[2]),m=null!=h.colorTexture&&v?a.get(h.colorTexture):null,p=(0,Yt.Jr)(h),y=null!=h.normalTextureTransform?.scale?h.normalTextureTransform?.scale:u.Un;s.set(g,new ur({...n,customDepthTest:1,textureAlphaMode:x,textureAlphaCutoff:h.alphaCutoff,diffuse:[r,d,f],ambient:[r,d,f],opacity:"OPAQUE"===h.alphaMode?1:h.opacity,doubleSided:h.doubleSided,doubleSidedType:"winding-order",cullFace:h.doubleSided?0:2,hasVertexColors:!!t.attributes.color,hasVertexTangents:!!t.attributes.tangent,normalType:_?0:2,castShadows:!0,receiveShadows:h.receiveShadows,receiveAmbientOcclusion:h.receiveAmbientOcclusion,textureId:null!=m?m.id:void 0,colorMixMode:h.colorMixMode,normalTextureId:null!=h.normalTexture&&v?a.get(h.normalTexture).id:void 0,textureAlphaPremultiplied:null!=m&&!!m.parameters.preMultiplyAlpha,occlusionTextureId:null!=h.occlusionTexture&&v?a.get(h.occlusionTexture).id:void 0,emissiveTextureId:null!=h.emissiveTexture&&v?a.get(h.emissiveTexture).id:void 0,metallicRoughnessTextureId:null!=h.metallicRoughnessTexture&&v?a.get(h.metallicRoughnessTexture).id:void 0,emissiveBaseColor:[h.emissiveFactor[0],h.emissiveFactor[1],h.emissiveFactor[2]],emissiveStrengthKHR:null!=h.emissiveStrengthKHR?h.emissiveStrengthKHR:1,emissiveStrengthFromSymbol:null!=o.emissiveStrengthFromSymbol?o.emissiveStrengthFromSymbol:void 0,mrrFactors:p?Yt.Bt:[h.metallicFactor,h.roughnessFactor,n.mrrFactors[2]],isSchematic:p,colorTextureTransformMatrix:M(h.colorTextureTransform),normalTextureTransformMatrix:M(h.normalTextureTransform),scale:[y[0],y[1]],occlusionTextureTransformMatrix:M(h.occlusionTextureTransform),emissiveTextureTransformMatrix:M(h.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:M(h.metallicRoughnessTextureTransform),...o},c))}const y=s.get(g);if(r.stageResources.materials.push(y),v){const e=e=>{null!=e&&r.stageResources.textures.push(a.get(e))};e(h.colorTexture),e(h.normalTexture),e(h.occlusionTexture),e(h.emissiveTexture),e(h.metallicRoughnessTexture)}return y}(n,e,l,S,E,R,I,t,y),{geometry:h,vertexCount:d}=function(e,t){const r=e.attributes.position.count,i=(0,w.x)(e.indices||r,e.primitiveType),n=p(3*r),{typedBuffer:a,typedBufferStride:c}=e.attributes.position;(0,v.t)(n,a,e.transform,3,c);const l=[["position",new H.n(n,i,3,!0)]];if(null!=e.attributes.normal){const t=p(3*r),{typedBuffer:n,typedBufferStride:a}=e.attributes.normal;(0,s.Ge)(Ar,e.transform),(0,v.b)(t,n,Ar,3,a),(0,o.or)(Ar)&&(0,v.n)(t,t),l.push(["normal",new H.n(t,i,3,!0)])}if(null!=e.attributes.tangent){const t=p(4*r),{typedBuffer:n,typedBufferStride:a}=e.attributes.tangent;(0,s.z0)(Ar,e.transform),(0,_.t)(t,n,Ar,4,a),(0,o.or)(Ar)&&(0,v.n)(t,t,4),l.push(["tangent",new H.n(t,i,4,!0)])}if(null!=e.attributes.texCoord0){const t=p(2*r),{typedBuffer:n,typedBufferStride:o}=e.attributes.texCoord0;(0,x.a)(t,n,2,o),l.push(["uv0",new H.n(t,i,2,!0)])}const u=e.attributes.color;if(null!=u){const t=new Uint8Array(4*r);4===u.elementCount?u instanceof g.Eq?(0,_.b)(t,u,1,255):(u instanceof g.XP||u instanceof g.Uz)&&(0,_.b)(t,u,1/255,255):(t.fill(255),u instanceof g.xs?(0,v.f)(t,u.typedBuffer,1,255,4,u.typedBufferStride):(e.attributes.color instanceof g.eI||e.attributes.color instanceof g.nS)&&(0,v.f)(t,u.typedBuffer,1/255,255,4,e.attributes.color.typedBufferStride)),l.push(["color",new H.n(t,i,4,!0)])}return{geometry:new ne(t,l),vertexCount:r}}(e,r??new ur({},t)),m=h.boundingInfo;null!=m&&0===a&&((0,f.iT)(F,m.bbMin),(0,f.iT)(F,m.bbMax)),null!=r&&(l.stageResources.geometries.push(h),l.numberOfVertices+=d)}),c||A.push(l)}),{engineResources:A,referenceBoundingBox:F}}(m,t,a.specifiedLodIndex);return{lods:T,referenceBoundingBox:S,isEsriSymbolResource:m.meta.isEsriSymbolResource,isWosr:!1}}const Ar=(0,a.vt)()},1843(e,t,r){r.d(t,{BP:()=>h,l5:()=>d});var i=r(20498),n=r(13030),o=r(90239),s=r(4431),a=r(620),c=r(85079);class l{constructor(e,t,r=0){this.layout=e,this.byteOffset=r,this.buffer="number"==typeof t?new ArrayBuffer(t*e.stride):t;for(const t of e.fields.keys()){const i=e.fields.get(t);this[t]=new i.constructor(this.buffer,r+i.offset,this.stride)}}get stride(){return this.layout.stride}get count(){return this.byteLength/this.stride}get byteLength(){return this.buffer.byteLength-this.byteOffset}getField(e,t){const r=this[e];return r&&r.elementCount===t.ElementCount&&r.elementType===t.ElementType?r:null}slice(e,t){return new l(this.layout,this.buffer.slice(e*this.stride,t*this.stride))}copyFrom(e,t=0,r=0,i=e.count){const n=this.stride;if(n%4==0){const o=new Uint32Array(e.buffer,t*n,i*n/4);new Uint32Array(this.buffer,r*n,i*n/4).set(o)}else{const o=new Uint8Array(e.buffer,t*n,i*n);new Uint8Array(this.buffer,r*n,i*n).set(o)}return this}get usedMemory(){return this.byteLength}dispose(){}}class u{constructor(e){this._stride=0,this._fields=new Map,e&&(this._stride=e.stride,e.fields.forEach(e=>this._fields.set(e[0],{...e[1],constructor:p(e[1].constructor)})))}freeze(){return this}get locations(){return(0,c.Xk)((0,s.U)(this))}vec2f16(e,t){return this._appendField(e,i.SX?n.ZD:n.gH,t),this}vec2f(e,t){return this._appendField(e,n.gH,t),this}vec2f64(e,t){return this._appendField(e,n.si,t),this}vec3f16(e,t){return this._appendField(e,i.SX?n.EC:n.xs,t),this}vec3f(e,t){return this._appendField(e,n.xs,t),this}vec3f64(e,t){return this._appendField(e,n.Xm,t),this}vec4f16(e,t){return this._appendField(e,i.SX?n.jz:n.Eq,t),this}vec4f(e,t){return this._appendField(e,n.Eq,t),this}vec4f64(e,t){return this._appendField(e,n.Aj,t),this}mat3f(e,t){return this._appendField(e,n.jZ,t),this}mat3f64(e,t){return this._appendField(e,n.j0,t),this}mat4f(e,t){return this._appendField(e,n.Sx,t),this}mat4f64(e,t){return this._appendField(e,n.E$,t),this}vec4u8(e,t){return this._appendField(e,n.XP,t),this}f16(e,t){return this._appendField(e,i.SX?n.XW:n.Y$,t),this}f32(e,t){return this._appendField(e,n.Y$,t),this}f64(e,t){return this._appendField(e,n.qB,t),this}u8(e,t){return this._appendField(e,n.SL,t),this}u16(e,t){return this._appendField(e,n.h,t),this}i8(e,t){return this._appendField(e,n.bf,t),this}vec2i8(e,t){return this._appendField(e,n.D6,t),this}vec2i16(e,t){return this._appendField(e,n.mJ,t),this}vec2u8(e,t){return this._appendField(e,n.LC,t),this}vec2u16(e,t){return this._appendField(e,n.Yi,t),this}vec4u16(e,t){return this._appendField(e,n.Uz,t),this}vec4i16(e,t){return this._appendField(e,n.E7,t),this}u32(e,t){return this._appendField(e,n.P,t),this}_appendField(e,t,r){this._fields.has(e)&&(0,a.vA)(!1,`${e} already added to vertex buffer layout`);const i=t.ElementCount*(0,o.GJ)(t.ElementType),n=this._stride;this._fields.set(e,{constructor:t,size:i,offset:n,optional:r}),this._alignFields()}_alignFields(){let e=0,t=1;this._fields.forEach(r=>{const i=(0,o.GJ)(r.constructor.ElementType);e=Math.floor((e+i-1)/i)*i,r.offset=e,e+=r.size,t=Math.max(t,i)}),e=Math.floor((e+t-1)/t)*t,this._stride=e}createBuffer(e){return new l(this,e)}createView(e,t){return new l(this,e,t)}clone(){const e=new u;return e._stride=this._stride,e._fields=new Map,this._fields.forEach((t,r)=>e._fields.set(r,t)),e.BufferType=this.BufferType,e}get stride(){return this._stride}get fields(){return this._fields}}function h(){return new u}class d{constructor(e){this.fields=new Array,e.fields.forEach((e,t)=>{const r={...e,constructor:m(e.constructor)};this.fields.push([t,r])}),this.stride=e.stride}}const f=[n.Y$,n.gH,n.xs,n.Eq,n.jZ,n.Sx,n.qB,n.si,n.Xm,n.Aj,n.j0,n.E$,n.SL,n.LC,n.eI,n.XP,n.h,n.Yi,n.nS,n.Uz,n.P,n.An,n.H$,n.ml,n.bf,n.D6,n.m8,n.TX,n.Qt,n.mJ,n.Vp,n.E7,n.My,n.UL,n.zD,n.Y4];function m(e){return`${e.ElementType}_${e.ElementCount}`}function p(e){return g.get(e)}const g=new Map;f.forEach(e=>g.set(m(e),e))},4431(e,t,r){r.d(t,{U:()=>o});var i=r(63907),n=r(74038);function o(e,t=0){const r=e.stride;return Array.from(e.fields.keys()).map(o=>{const s=e.fields.get(o),a=s.constructor.ElementCount,c=function(e){switch(e){case"u8":return i.pe.UNSIGNED_BYTE;case"u16":return i.pe.UNSIGNED_SHORT;case"u32":return i.pe.UNSIGNED_INT;case"i8":return i.pe.BYTE;case"i16":return i.pe.SHORT;case"i32":return i.pe.INT;case"f16":return i.pe.HALF_FLOAT;case"f32":return i.pe.FLOAT;default:throw new Error("BufferType not supported in WebGL")}}(s.constructor.ElementType),l=s.offset,u=s.optional?.glNormalized??!1,h=s.optional?.integer??!1;return new n._(o,a,c,l,r,u,t,h)})}},26857(e,t,r){r.d(t,{b:()=>a});var i=r(5482),n=r(69622),o=r(91429);let s=class extends n.A{constructor(){super(...arguments),this.SCENEVIEW_HITTEST_RETURN_INTERSECTOR=!1,this.DECONFLICTOR_SHOW_VISIBLE=!1,this.DECONFLICTOR_SHOW_INVISIBLE=!1,this.DECONFLICTOR_SHOW_GRID=!1,this.LABELS_SHOW_BORDER=!1,this.TEXT_SHOW_BASELINE=!1,this.TEXT_SHOW_BORDER=!1,this.OVERLAY_DRAW_DEBUG_TEXTURE=!1,this.OVERLAY_SHOW_CENTER=!1,this.SHOW_POI=!1,this.OCCLUSION_QUERY_DEBUG_PIXEL=!1,this.ENABLE_OPTIMIZATIONS=!0,this.TESTS_DISABLE_FAST_UPDATES=!1,this.DRAW_MESH_GEOMETRY_NORMALS=!1,this.FEATURE_TILE_FETCH_SHOW_TILES=!1,this.FEATURE_TILE_TREE_SHOW_TILES=!1,this.TERRAIN_TILE_TREE_SHOW_TILES=!1,this.I3S_TREE_SHOW_TILES=!1,this.I3S_SHOW_MODIFICATIONS=!1,this.LOD_INSTANCE_RENDERER_DISABLE_UPDATES=!1,this.LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL=!1,this.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES=!1,this.LINE_WIREFRAMES=!1,this.FLOW_GLOBAL_SCALE_THRESHOLD=null}};(0,i.Cg)([(0,o.MZ)()],s.prototype,"SCENEVIEW_HITTEST_RETURN_INTERSECTOR",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"DECONFLICTOR_SHOW_VISIBLE",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"DECONFLICTOR_SHOW_INVISIBLE",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"DECONFLICTOR_SHOW_GRID",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"LABELS_SHOW_BORDER",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"TEXT_SHOW_BASELINE",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"TEXT_SHOW_BORDER",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"OVERLAY_DRAW_DEBUG_TEXTURE",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"OVERLAY_SHOW_CENTER",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"SHOW_POI",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"OCCLUSION_QUERY_DEBUG_PIXEL",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"ENABLE_OPTIMIZATIONS",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"TESTS_DISABLE_FAST_UPDATES",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"DRAW_MESH_GEOMETRY_NORMALS",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"FEATURE_TILE_FETCH_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"FEATURE_TILE_TREE_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"TERRAIN_TILE_TREE_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"I3S_TREE_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"I3S_SHOW_MODIFICATIONS",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"LOD_INSTANCE_RENDERER_DISABLE_UPDATES",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"LINE_WIREFRAMES",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"FLOW_GLOBAL_SCALE_THRESHOLD",void 0),s=(0,i.Cg)([(0,o.$K)("esri.views.3d.support.debugFlags")],s);const a=new s},46686(e,t,r){r.d(t,{o:()=>n});var i=r(31821);function n(e,t){t&&e.varyings.add("linearDepth","float",{invariant:!0}),e.vertex.code.add(i.H`
234
234
  void forwardLinearDepth(float _linearDepth) { ${(0,i.If)(t,"linearDepth = _linearDepth;")} }
235
235
  `)}},33120(e,t,r){r.d(t,{i$:()=>s,xJ:()=>o}),r(46686),r(62308);var i=r(77108),n=r(31821);function o(e){e.vertex.uniforms.add(new i.E("nearFar",e=>e.camera.nearFar))}function s(e){e.vertex.code.add(n.H`float calculateLinearDepth(vec2 nearFar,float z) {
236
236
  return (-z - nearFar[0]) / (nearFar[1] - nearFar[0]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5611,6061,6708,7992,9397],{61691(t,e,n){n.d(e,{G:()=>r});class r{*[Symbol.iterator](){let t=this.next();for(;t;)yield t,t=this.next()}}},76061(t,e,n){n.d(e,{S:()=>s});var r=n(61691);class s extends r.G{constructor(t){super(),this.m_iGeom=-1,this.m_aGeoms=t?t.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const t=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,t}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},9093(t,e,n){function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function s(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}n.d(e,{o8:()=>s,vt:()=>r,zK:()=>i});const i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:s,create:r,fromValues:function(t,e,n,r,s,i,o,a,u,h,c,f,l,m,g,x){return[t,e,n,r,s,i,o,a,u,h,c,f,l,m,g,x]}},Symbol.toStringTag,{value:"Module"}))},51850(t,e,n){function r(){return[0,0,0]}function s(t){return[t[0],t[1],t[2]]}function i(t,e,n){return[t,e,n]}function o(t,e,n){return[t,e,n]}function a(t,e=[0,0,0]){const n=Math.min(3,t.length);for(let r=0;r<n;++r)e[r]=t[r];return e}function u(){return i(1,1,1)}function h(){return i(1,0,0)}function c(){return i(0,1,0)}function f(){return i(0,0,1)}n.d(e,{CN:()=>o,Cb:()=>d,Cw:()=>g,JP:()=>x,Un:()=>m,ci:()=>a,fA:()=>i,o8:()=>s,uY:()=>l,vt:()=>r});const l=[0,0,0],m=u(),g=h(),x=c(),d=f();Object.freeze(Object.defineProperty({__proto__:null,ONES:m,UNIT_X:g,UNIT_Y:x,UNIT_Z:d,ZEROS:l,clone:s,create:r,freeze:o,fromArray:a,fromValues:i,ones:u,unitX:h,unitY:c,unitZ:f,zeros:function(){return[0,0,0]}},Symbol.toStringTag,{value:"Module"}))},35522(t,e,n){n.d(e,{$A:()=>I,Bw:()=>i,C:()=>o,Cc:()=>A,DI:()=>E,Il:()=>k,Io:()=>M,Ln:()=>p,Om:()=>_,Qr:()=>f,Re:()=>h,S8:()=>b,T9:()=>x,WQ:()=>u,Z0:()=>O,_S:()=>m,aI:()=>N,ei:()=>S,fw:()=>w,gL:()=>P,hG:()=>v,hZ:()=>a,hs:()=>d,jb:()=>V,jk:()=>g,lo:()=>L,lw:()=>c,m3:()=>y,oW:()=>R,t2:()=>Y,tn:()=>l,uE:()=>B,xg:()=>X,ze:()=>C});var r=n(51850),s=n(34304);function i(t){const e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)}function o(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function a(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function u(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function h(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function c(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function f(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function l(t,e){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t}function m(t,e){return t[0]=Math.sign(e[0]),t[1]=Math.sign(e[1]),t[2]=Math.sign(e[2]),t}function g(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}function x(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t}function d(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function p(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t}function M(t,e){const n=e[0]-t[0],r=e[1]-t[1],s=e[2]-t[2];return Math.sqrt(n*n+r*r+s*s)}function v(t,e){const n=e[0]-t[0],r=e[1]-t[1],s=e[2]-t[2];return n*n+r*r+s*s}function y(t){const e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function C(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function E(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function b(t,e){const n=e[0],r=e[1],s=e[2];let i=n*n+r*r+s*s;return i>0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i),t}function _(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function I(t,e,n){const r=e[0],s=e[1],i=e[2],o=n[0],a=n[1],u=n[2];return t[0]=s*u-i*a,t[1]=i*o-r*u,t[2]=r*a-s*o,t}function A(t,e,n,r){const s=e[0],i=e[1],o=e[2];return t[0]=s+r*(n[0]-s),t[1]=i+r*(n[1]-i),t[2]=o+r*(n[2]-o),t}function O(t,e,n){const r=e[0],s=e[1],i=e[2];return t[0]=n[0]*r+n[4]*s+n[8]*i+n[12],t[1]=n[1]*r+n[5]*s+n[9]*i+n[13],t[2]=n[2]*r+n[6]*s+n[10]*i+n[14],t}function S(t,e,n){const r=e[0],s=e[1],i=e[2];return t[0]=r*n[0]+s*n[3]+i*n[6],t[1]=r*n[1]+s*n[4]+i*n[7],t[2]=r*n[2]+s*n[5]+i*n[8],t}function P(t,e,n){return w(t,e,n[0],n[1],n[2],n[3])}function w(t,e,n,r,s,i){const o=e[0],a=e[1],u=e[2],h=r*u-s*a,c=s*o-n*u,f=n*a-r*o,l=r*f-s*c,m=s*h-n*f,g=n*c-r*h,x=2*i;return t[0]=o+h*x+2*l,t[1]=a+c*x+2*m,t[2]=u+f*x+2*g,t}const Z=(0,r.vt)(),F=(0,r.vt)();function Y(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function N(t,e){if(t===e)return!0;const n=t[0],r=t[1],i=t[2],o=e[0],a=e[1],u=e[2],h=(0,s.FD)();return Math.abs(n-o)<=h*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=h*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-u)<=h*Math.max(1,Math.abs(i),Math.abs(u))}function R(t,e,n){const r=n[0]-e[0],s=n[1]-e[1],i=n[2]-e[2];let o=r*r+s*s+i*i;return o>0?(o=1/Math.sqrt(o),t[0]=r*o,t[1]=s*o,t[2]=i*o,t):(t[0]=0,t[1]=0,t[2]=0,t)}const V=h,T=c,z=f,X=M,L=v,k=i,B=y;Object.freeze(Object.defineProperty({__proto__:null,abs:l,add:u,angle:function(t,e){b(Z,t),b(F,e);const n=_(Z,F);return n>1?0:n<-1?Math.PI:Math.acos(n)},bezier:function(t,e,n,r,s,i){const o=1-i,a=o*o,u=i*i,h=a*o,c=3*i*a,f=3*u*o,l=u*i;return t[0]=e[0]*h+n[0]*c+r[0]*f+s[0]*l,t[1]=e[1]*h+n[1]*c+r[1]*f+s[1]*l,t[2]=e[2]*h+n[2]*c+r[2]*f+s[2]*l,t},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},clamp:function(t,e=0,n=1){return t[0]=Math.min(Math.max(t[0],e),n),t[1]=Math.min(Math.max(t[1],e),n),t[2]=Math.min(Math.max(t[2],e),n),t},copy:o,cross:I,crossAndNormalize:function(t,e,n){const r=e[0],s=e[1],i=e[2],o=n[0],a=n[1],u=n[2],h=s*u-i*a,c=i*o-r*u,f=r*a-s*o,l=Math.sqrt(h*h+c*c+f*f);return t[0]=h/l,t[1]=c/l,t[2]=f/l,t},direction:R,dist:X,distance:M,div:z,divide:f,dot:_,equals:N,exactEquals:Y,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},hermite:function(t,e,n,r,s,i){const o=i*i,a=o*(2*i-3)+1,u=o*(i-2)+i,h=o*(i-1),c=o*(3-2*i);return t[0]=e[0]*a+n[0]*u+r[0]*h+s[0]*c,t[1]=e[1]*a+n[1]*u+r[1]*h+s[1]*c,t[2]=e[2]*a+n[2]*u+r[2]*h+s[2]*c,t},inverse:E,len:k,length:i,lerp:A,max:x,min:g,mul:T,multiply:c,negate:C,normalize:b,random:function(t,e=1){const n=s.Ov,r=2*n()*Math.PI,i=2*n()-1,o=Math.sqrt(1-i*i)*e;return t[0]=Math.cos(r)*o,t[1]=Math.sin(r)*o,t[2]=i*e,t},rotateX:function(t,e,n,r){const s=[],i=[];return s[0]=e[0]-n[0],s[1]=e[1]-n[1],s[2]=e[2]-n[2],i[0]=s[0],i[1]=s[1]*Math.cos(r)-s[2]*Math.sin(r),i[2]=s[1]*Math.sin(r)+s[2]*Math.cos(r),t[0]=i[0]+n[0],t[1]=i[1]+n[1],t[2]=i[2]+n[2],t},rotateY:function(t,e,n,r){const s=[],i=[];return s[0]=e[0]-n[0],s[1]=e[1]-n[1],s[2]=e[2]-n[2],i[0]=s[2]*Math.sin(r)+s[0]*Math.cos(r),i[1]=s[1],i[2]=s[2]*Math.cos(r)-s[0]*Math.sin(r),t[0]=i[0]+n[0],t[1]=i[1]+n[1],t[2]=i[2]+n[2],t},rotateZ:function(t,e,n,r){const s=[],i=[];return s[0]=e[0]-n[0],s[1]=e[1]-n[1],s[2]=e[2]-n[2],i[0]=s[0]*Math.cos(r)-s[1]*Math.sin(r),i[1]=s[0]*Math.sin(r)+s[1]*Math.cos(r),i[2]=s[2],t[0]=i[0]+n[0],t[1]=i[1]+n[1],t[2]=i[2]+n[2],t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:d,scaleAndAdd:p,set:a,sign:m,sqrDist:L,sqrLen:B,squaredDistance:v,squaredLength:y,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:V,subtract:h,transformMat3:S,transformMat4:O,transformQuat:P,transformQuatValues:w},Symbol.toStringTag,{value:"Module"}))},69397(t,e,n){n.d(e,{Qf:()=>u,Qh:()=>o,RS:()=>s,Ul:()=>m,i5:()=>l,lM:()=>i,qK:()=>c});var r=n(34275);const s=16;function i(t){if(!t)return 0;let e=c;for(const n in t)t.hasOwnProperty(n)&&(e+=a(t[n],!1));return e}function o(t){if(!t)return 0;if("number"==typeof t[0])return u(t);if(Array.isArray(t))return function(t){const e=t.length;if(0===e||"number"==typeof t[0])return h(t,8);let n=f;for(let r=0;r<e;r++)n+=a(t[r]);return n}(t);let e=c;for(const n in t)t.hasOwnProperty(n)&&(e+=a(t[n]));return e}function a(t,e=!0){switch(typeof t){case"object":return e?o(t):c;case"string":return function(t){return 32+t.length}(t);case"number":return s;case"boolean":return 4;default:return 8}}function u(...t){return t.reduce((t,e)=>t+(e?(0,r.iu)(e)?e.byteLength+l:Array.isArray(e)?h(e,s):0:0),0)}function h(t,e){return f+t.length*e}const c=32,f=16,l=145,m=64},87992(t,e,n){n.d(e,{JR:()=>I,ME:()=>E,MY:()=>A,NO:()=>C,Nh:()=>_,V2:()=>Z,_s:()=>F,e6:()=>N,gh:()=>b,tr:()=>V,uX:()=>d});var r=n(5482),s=n(69397),i=n(16930),o=(n(70328),n(19419)),a=n(60408),u=n(21325),h=n(513),c=n(50954),f=n(79567),l=n(52006),m=n(49663),g=n(46068),x=n(92722);class d{constructor({type:t,spatialReference:e,vertexCount:n,vertexXY:r,vertexZ:s,vertexM:i,partCount:o,partOffsets:a,partFlags:u,segmentFlags:h,segmentIndices:c,segmentParams:f,segmentCountArc:l,segmentCountBezier:m}){this.segmentCountArc=0,this.segmentCountBezier=0,this.type=t,this.spatialReference=e,this.vertexCount=n,this.vertexXY=r,this.vertexZ=s,this.vertexM=i,this.partCount=o,this.partOffsets=a,this.partFlags=u,this.segmentFlags=h,this.segmentIndices=c,this.segmentParams=f,this.segmentCountArc=l,this.segmentCountBezier=m}get segmentParamCount(){return 10*this.segmentCountArc+4*this.segmentCountBezier}get segmentCountLine(){const{segmentCount:t,segmentCountArc:e,segmentCountBezier:n}=this;return t&&t-e-n}get segmentCount(){return"polyline"===this.type?this.vertexCount-this.partCount:"polygon"===this.type?this.vertexCount:0}get hasZ(){return null!=this.vertexZ}get hasM(){return null!=this.vertexM}hasCurves(){return null!=this.segmentFlags}isMultipart(){return"polyline"===this.type||"polygon"===this.type}get usedMemory(){function t(t){return t?s.Ul+t.byteLength:0}return t(this.vertexXY)+t(this.vertexZ)+t(this.vertexM)+t(this.partOffsets)+t(this.partFlags)+t(this.segmentFlags)+t(this.segmentIndices)+t(this.segmentParams)}clone(){const{type:t,vertexCount:e,partCount:n,hasZ:r,hasM:s,segmentCountArc:i,segmentCountBezier:o}=this,a=Z(t,e,n,r,s,this.hasCurves(),i,o);a.spatialReference=this.spatialReference;const{vertexXY:u,vertexZ:h,vertexM:c}=this;if(a.vertexXY.set(u.subarray(0,2*e),0),a.vertexZ?.set(h.subarray(0,e),0),a.vertexM?.set(c.subarray(0,e),0),this.isMultipart()){const{partOffsets:t,partFlags:e}=this;a.partFlags.set(e.subarray(0,n+1)),a.partOffsets.set(t.subarray(0,n+1))}if(this.hasCurves()){const{segmentFlags:t,segmentIndices:n,segmentParams:r,segmentParamCount:s}=this;a.segmentFlags.set(t.subarray(0,e),0),a.segmentIndices.set(n.subarray(0,e),0),a.segmentParams.set(r.subarray(0,s),0)}return a}equals(t){return this.equalsWithinTolerance(t,0)}equalsWithinTolerance(t,e){if(null==t)return!1;if(this===t)return!0;if(!(0,u.aI)(this.spatialReference,t.spatialReference))return!1;if(this.vertexCount!==t.vertexCount||this.partCount!==t.partCount)return!1;if(this.hasZ!==t.hasZ||this.hasM!==t.hasM)return!1;if(this.hasCurves()!==t.hasCurves()||this.segmentCountArc!==t.segmentCountArc||this.segmentCountBezier!==t.segmentCountBezier)return!1;const n=0===e?(t,e)=>t!==e||isNaN(t)!==isNaN(e):(t,n)=>Math.abs(t-n)>e||isNaN(t)!==isNaN(n);for(let e=0;e<this.vertexCount;++e)if(n(this.vertexXY[2*e],t.vertexXY[2*e])||n(this.vertexXY[2*e+1],t.vertexXY[2*e+1]))return!1;if(this.hasZ)for(let e=0;e<this.vertexCount;++e)if(n(this.vertexZ[e],t.vertexZ[e]))return!1;if(this.hasM)for(let e=0;e<this.vertexCount;++e)if(n(this.vertexM[e],t.vertexM[e]))return!1;for(let e=0;e<this.partCount;++e)if(this.partFlags[e]!==t.partFlags[e]||this.partOffsets[e]!==t.partOffsets[e])return!1;if(this.hasCurves()){for(let e=0;e<this.vertexCount;++e)if(this.segmentFlags[e]!==t.segmentFlags[e]||this.segmentIndices[e]!==t.segmentIndices[e])return!1;for(let e=0;e<this.segmentParamCount;++e)if(n(this.segmentParams[e],t.segmentParams[e]))return!1}return!0}get parts(){return this.isMultipart()?new p(this):[][Symbol.iterator]()}}class p{constructor(t){this.geometry=t,this.value=new M(t)}get done(){return this.value.index>=this.geometry.partCount}next(){return++this.value.index,this}[Symbol.iterator](){return this}}class M{constructor(t){this.geometry=t,this.index=-1,this._readVertex=P(t),this._segments=new v(this)}get segments(){return this._segments.reset(),this._segments}get startVertex(){return this._readVertex(this.geometry.partOffsets[this.index])}get vertexCount(){const t=this.geometry.partOffsets;return t[this.index+1]-t[this.index]}}class v{constructor(t){this._part=t,this._partStart=0,this._partEnd=0,this._isPolygon="polygon"===t.geometry.type,this.value=new y(t.geometry)}get done(){return this.value.indexOfStartVertex>this._partEnd}next(){++this.value.indexOfStartVertex;const t=this.value.indexOfStartVertex>=this._partEnd;return this.value.indexOfEndVertex=t&&this._isPolygon?this._partStart:this.value.indexOfStartVertex+1,this}[Symbol.iterator](){return this}reset(){const{index:t}=this._part,e=this._part.geometry.partOffsets;this._partStart=e[t],this._partEnd=e[t+1]-(this._isPolygon?1:2),this.value.indexOfStartVertex=this._partStart-1}}class y{constructor(t){this.geometry=t,this.indexOfStartVertex=-1,this.indexOfEndVertex=-1,this._readVertex=P(t)}get xStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex]}get yStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex+1]}get zStart(){return this.geometry.vertexZ[this.indexOfStartVertex]}get mStart(){return this.geometry.vertexM[this.indexOfStartVertex]}get xEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex]}get yEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex+1]}get zEnd(){return this.geometry.vertexZ[this.indexOfEndVertex]}get mEnd(){return this.geometry.vertexM[this.indexOfEndVertex]}get start(){return this._readVertex(this.indexOfStartVertex)}get end(){return this._readVertex(this.indexOfEndVertex)}get curve(){const t=this.geometry.segmentFlags?.[this.indexOfStartVertex]??1;if(1===t)return this.end;const e=this.geometry.segmentParams;let n=this.geometry.segmentIndices[this.indexOfStartVertex];if(2===t){const t=e[n++],r=e[n++],s=e[n++],i=e[n++];return{b:[this.end,[t,r],[s,i]]}}const r=e[n++],s=e[n++],i=e[n++],o=e[n++],a=e[n++],u=e[n++];n++,n++;const h=e[n++],c=e[n++];if(!Boolean(4&r)&&1===i)return{c:[this.end,[h,c]]};const f=2&r?0:1,l=1&r?0:1;return{a:[this.end,[a,u],f,l,o,s,i]}}}function C(t,e){const n={stack:[],error:void 0,hasError:!1};try{return e??=(0,o.Ie)(),(0,r.mS)(n,new O(t,["vertexZ","vertexM","spatialReference"]),!1),(0,o.bx)(e,function(t){let e;const{vertexCount:n,vertexXY:s,vertexZ:i,vertexM:a}=t,u=S(t);if(t.hasCurves()){const n={stack:[],error:void 0,hasError:!1};try{(0,r.mS)(n,new O(t,["vertexZ","vertexM"]),!1);const s=(0,o.Ie)();for(const e of t.parts){let t=e.startVertex;for(const{curve:n}of e.segments)(0,f.e)(s,t,n),t=(0,l.yP)(n)}const[i,a,h,c]=s;e={xmin:i,ymin:a,xmax:h,ymax:c,spatialReference:u}}catch(t){n.error=t,n.hasError=!0}finally{(0,r.hk)(n)}}else{let t,r,i,o;t=r=1/0,i=o=-1/0;for(let e=0;e<n;++e){const n=s[2*e],a=s[2*e+1];t=Math.min(t,n),i=Math.max(i,n),r=Math.min(r,a),o=Math.max(o,a)}e={xmin:t,ymin:r,xmax:i,ymax:o,spatialReference:u}}if(i){let t=1/0,n=-1/0;for(const e of i)t=Math.min(t,e),n=Math.max(n,e);e.zmin=t,e.zmax=n}if(a){let t=1/0,n=-1/0;for(const e of a)t=Math.min(t,e),n=Math.max(n,e);e.mmin=t,e.mmax=n}return e}(t)),e}catch(t){n.error=t,n.hasError=!0}finally{(0,r.hk)(n)}}function E(t){let e,n,r;if((0,a.fT)(t)){r="point";const{x:s,y:i,z:o,m:a}=t,u=[s,i];null!=o&&u.push(o),null!=a&&u.push(a),n=[[u]],e=1}else(0,a.U9)(t)?(r="multipoint",n=[t.points],e=t.points.length):(0,a.Rg)(t)?(r="polyline",n=t.curvePaths??t.paths,e=n.reduce((t,e)=>t+e.length,0)):(r="polygon",n=t.curveRings??t.rings,e=n.reduce((t,e)=>(0===e.length||(t+=e.length,w(e[0],(0,l.yP)(e.at(-1)))&&--t),t),0));const s=Z(r,e,r.includes("point")?0:n.length,(0,a.Pv)(t),(0,a.W0)(t),(0,l.Ed)(t)),{hasZ:i,hasM:o,vertexXY:u,vertexZ:h,vertexM:c}=s;function f(t){u[2*g]=t[0],u[2*g+1]=t[1],i&&(h[g]=t[2]),o&&(c[g]=t[m]),++g}s.spatialReference=t.spatialReference??void 0;const m=s.hasZ?3:2;let g=0;if(!s.isMultipart()){if(!i&&!o){for(const[t,e]of n[0])u[2*g]=t,u[2*g+1]=e,++g;return s}for(const t of n[0])f(t);return s}const x="polygon"===r,{partOffsets:d}=s;let p=0;if(!s.hasCurves()){for(const t of n){if(d[p++]=g,0===t.length)continue;let e=t.length;if(x&&w(t[0],t.at(-1))&&--e,i||o)for(let n=0;n<e;++n)f(t[n]);else for(let n=0;n<e;++n){const[e,r]=t[n];u[2*g]=e,u[2*g+1]=r,++g}}return d[p]=g,s}function M(t){const e=v+t;if(e<=(s.segmentParams?.length??0))return;let n=e*T;n=20*Math.ceil(n/20);const r=s.segmentParams;s.segmentParams=new Float64Array(n),null!=r&&s.segmentParams.set(r)}let v=0;for(const t of n){if(s.partOffsets[p++]=g,0===t.length)continue;const e=t[0];let n=e;for(let e=1;e<t.length;++e){const r=t[e];f(n);const i=g-1;(0,l.wY)(r)?(M(10),++s.segmentCountArc,v=F(n,r,s,i,v),n=r.a[0]):(0,l.DA)(r)?(M(10),++s.segmentCountArc,v=Y(n,r,s,i,v),n=r.a[0]):(0,l.aO)(r)?(M(10),++s.segmentCountArc,v=N(n,r,s,i,v),n=r.c[0]):(0,l.n1)(r)?(M(4),++s.segmentCountBezier,v=V(0,r,s,i,v),n=r.b[0]):n=r}x&&w(e,n)||f(n)}return s.partOffsets[p]=g,s}function b(t){const e=P(t),{vertexCount:n,partCount:r,hasZ:s,hasM:i}=t,o=S(t);if("point"===t.type){const[e,n]=t.vertexXY,r=t.vertexZ?.[0],s=t.vertexM?.[0];return{x:e,y:n,z:r,m:s,spatialReference:o}}let a=0;if("multipoint"===t.type){const t=[];for(;a<n;)t.push(e(a++));return{points:t,spatialReference:o,hasZ:s,hasM:i}}const u="polygon"===t.type;if(!t.hasCurves()){const n=new Array;for(let s=0;s<r;++s){const r=t.partOffsets[s+1],i=new Array;for(;a<r;)i.push(e(a++));u&&i.length>0&&i.push(i[0]),n.push(i)}return u?{rings:n,hasZ:s,hasM:i,spatialReference:o}:{paths:n,hasZ:s,hasM:i,spatialReference:o}}const h=new Array;for(const{segments:e,startVertex:n}of t.parts){const t=[n];for(const{curve:n}of e)t.push(n);h.push(t)}return u?{rings:[],curveRings:h,hasZ:s,hasM:i,spatialReference:o}:{paths:[],curvePaths:h,hasZ:s,hasM:i,spatialReference:o}}function _(t,{lengths:e,coords:n,hasZ:r,hasM:s},i){const o=t.includes("point")?0:e.length,a="polygon"===t,u="point"===t?1:e.reduce((t,e)=>t+e,0)-(a?o:0);r??=!1,s??=!1;const h=Z(t,u,o,r,s,!1,0,0);if(h.spatialReference=i??void 0,!h.isMultipart()){for(let t=0,e=0;t<u;++t)h.vertexXY[2*t]=n[e++],h.vertexXY[2*t+1]=n[e++],r&&(h.vertexZ[t]=n[e++]),s&&(h.vertexM[t]=n[e++]);return h}const c=2+Number(r)+Number(s);let f=0,l=0;h.partOffsets[0]=0;for(const t of e){const e=h.partOffsets[l],i=e+t-Number(a);h.partOffsets[++l]=i;for(let t=e;t<i;++t)h.vertexXY[2*t]=n[f++],h.vertexXY[2*t+1]=n[f++],r&&(h.vertexZ[t]=n[f++]),s&&(h.vertexM[t]=n[f++]);a&&(f+=c)}return h}function I({type:t,vertexCount:e,vertexXY:n,vertexZ:r,vertexM:s,partCount:i,partOffsets:o,hasZ:a,hasM:u}){const h=new x.A([],[],a,u);i=Math.max(i,1);const c="polygon"===t;let f=0;for(let t=0;t<i;++t){const i=o?.[t+1]??e,l=h.coords.length;for(let t=f;t<i;++t)h.coords.push(n[2*t],n[2*t+1]),a&&h.coords.push(r[t]),u&&h.coords.push(s[t]);if(c){const t=f;h.coords.push(n[2*t],n[2*t+1]),a&&h.coords.push(r[t]),u&&h.coords.push(s[t])}h.lengths.push((h.coords.length-l)/h.stride),f=i}return"point"===t&&(h.lengths.length=0),h}function A(t,e){return"getSpatialReference"in t&&(e=function(t){if(null==t)return;const e=t.getText()||void 0,n=t.isCustomWkid()?0:t.getOldID();if(n<=0)return{wkt:e};let r=t.getLatestID();(r<=0||r===n)&&(r=void 0);const s=t.getVCS();if(null==s)return{wkid:n,latestWkid:r,wkt:e};const i=s.isCustomWkid()?0:s.getOldID();if(i<=0)return{wkt:e};let o=t.getLatestVerticalID();return(o<=0||o===i)&&(o=void 0),{wkid:n,wkt:e,latestWkid:r,vcsWkid:i,latestVcsWkid:o}}(t.getSpatialReference()),t=t.getGeometry()),new d({...t.toFlatGeometry(),spatialReference:e})}class O{constructor(t,e){this.target=t,this.keys=e,this.oldValues=e.map(e=>t[e]);for(const n of e)t[n]=void 0}[Symbol.dispose](){this.keys.map((t,e)=>{this.target[t]=this.oldValues[e]})}}function S({spatialReference:t}){return t instanceof i.A?t.toJSON():t}function P({vertexXY:t,vertexZ:e,vertexM:n}){return e?n?r=>[t[2*r],t[2*r+1],e[r],n[r]]:n=>[t[2*n],t[2*n+1],e[n]]:n?e=>[t[2*e],t[2*e+1],n[e]]:e=>[t[2*e],t[2*e+1]]}function w(t,e){return t.every((t,n)=>t===e[n])}function Z(t,e,n,r,s,i,o,a){o??=0,a??=0;const u=new d({type:t,vertexCount:e,vertexXY:null,vertexZ:void 0,vertexM:void 0,partCount:n,partOffsets:void 0,partFlags:void 0,segmentFlags:void 0,segmentIndices:void 0,segmentParams:void 0,segmentCountArc:o,segmentCountBezier:a});let h=2*Float64Array.BYTES_PER_ELEMENT*e;r&&(h+=Float64Array.BYTES_PER_ELEMENT*e),s&&(h+=Float64Array.BYTES_PER_ELEMENT*e),u.isMultipart()&&(h+=(n+1)*Int32Array.BYTES_PER_ELEMENT,h+=(n+1)*Int8Array.BYTES_PER_ELEMENT),i&&(h+=e*Int8Array.BYTES_PER_ELEMENT,h+=e*Int32Array.BYTES_PER_ELEMENT,h+=u.segmentParamCount*Float64Array.BYTES_PER_ELEMENT);const c=new ArrayBuffer(h);let f=0;return u.vertexXY=new Float64Array(c,f,2*e),f+=u.vertexXY.byteLength,r&&(u.vertexZ=new Float64Array(c,f,e),f+=u.vertexZ.byteLength),s&&(u.vertexM=new Float64Array(c,f,e),f+=u.vertexM.byteLength),i&&(u.segmentParams=new Float64Array(c,f,u.segmentParamCount),f+=u.segmentParams.byteLength,u.segmentIndices=new Int32Array(c,f,e),u.segmentIndices.fill(z),f+=u.segmentIndices.byteLength),u.isMultipart()&&(u.partOffsets=new Int32Array(c,f,n+1),f+=u.partOffsets.byteLength,u.partFlags=new Int8Array(c,f,n+1),f+=u.partFlags.byteLength,"polygon"===u.type&&u.partFlags.subarray(0,n).fill(1)),i&&(u.segmentFlags=new Int8Array(c,f,e),u.segmentFlags.fill(1),f+=u.segmentFlags.byteLength),u}function F(t,e,{segmentFlags:n,segmentIndices:r,segmentParams:s},i,o){n[i]=4,r[i]=o;const[a,[u,h],c,f,l,m,x]=e.a;let d=4;f||(d|=1),c||(d|=2);const p=(0,g.SW)(t,e),[M,v]=(0,g.Uk)(p,.5);return s[o++]=d,s[o++]=m,s[o++]=x,s[o++]=l,s[o++]=u,s[o++]=h,s[o++]=p.u2-p.u1,s[o++]=p.u1,s[o++]=M,s[o++]=v,o}function Y(t,e,{segmentFlags:n,segmentIndices:r,segmentParams:s},i,o){n[i]=4,r[i]=o;const a=(0,m.i)(t,e);return R(a,4,...(0,h.mq)(a,.5),s,o)}function N(t,e,{segmentFlags:n,segmentIndices:r,segmentParams:s},i,o){return n[i]=4,r[i]=o,R((0,c.pM)(t,e),0,...e.c[1],s,o)}function R(t,e,n,r,s,i){const{cx:o,cy:a,thetaStart:u,thetaEnd:h,radius:c}=t;return u>h||(e|=1),Math.abs(h-u)<=Math.PI||(e|=2),s[i++]=e,s[i++]=c,s[i++]=1,s[i++]=0,s[i++]=o,s[i++]=a,s[i++]=h-u,s[i++]=u,s[i++]=n,s[i++]=r,i}function V(t,{b:[e,[n,r],[s,i]]},{segmentFlags:o,segmentIndices:a,segmentParams:u},h,c){return o[h]=2,a[h]=c,u[c++]=n,u[c++]=r,u[c++]=s,u[c++]=i,c}const T=1.61803,z=-1},28298(t,e,n){n.d(e,{fz:()=>u,g7:()=>o,zo:()=>a});var r=n(76061),s=(n(55537),n(83661),n(88885),n(79187),n(15756));n(95213);const i=new s.p;function o(t,e,n){return i.execute(t,e,n,null)}function a(t,e){return i.executeMany(new r.S(t),e,null).next()}function u(){return i.supportsCurves()}},56339(t,e,n){n.d(e,{executeMany:()=>i});var r=n(28298),s=n(83299);function i(t){const[e,n]=(0,s.fromGeometries)(t);return(0,s.toGeometry)((0,r.zo)(e,n),n)}},4197(t,e,n){n.d(e,{Vj:()=>h,cj:()=>u,jh:()=>i,l5:()=>a,xm:()=>o});var r=n(34275),s=n(9093);function i(t){return t<=r.y9?new Array(t).fill(0):new Float64Array(t)}function o(t){return((0,r.iu)(t)?t.byteLength/8:t.length)<=r.y9?Array.from(t):new Float64Array(t)}function a(t,e,n){return Array.isArray(t)?t.slice(e,e+n):t.subarray(e,e+n)}function u(t){return[...t]}function h(t){const e=(0,s.vt)();for(let n=0;n<16;++n)e[n]=t[n];return e}},70328(t,e,n){n.d(e,{BI:()=>v,DC:()=>f,Ej:()=>m,Ie:()=>p,Jt:()=>M,Ne:()=>g,RF:()=>c,aI:()=>C,fA:()=>o,gE:()=>u,hZ:()=>d,iT:()=>l,is:()=>y,qv:()=>E,vI:()=>x,vY:()=>a,v_:()=>b,vt:()=>i,w1:()=>h}),n(35522);var r=n(5443),s=(n(19419),n(4197));function i(t=b){return[t[0],t[1],t[2],t[3],t[4],t[5]]}function o(t,e,n,r,s,o,a=i()){return a[0]=t,a[1]=e,a[2]=n,a[3]=r,a[4]=s,a[5]=o,a}function a(t,e=i()){return function(t,e,n,r=i()){return d(r,E),function(t,e,n=0,r=e.length/3){let s=t[0],i=t[1],o=t[2],a=t[3],u=t[4],h=t[5];for(let t=0;t<r;t++)s=Math.min(s,e[n+3*t]),i=Math.min(i,e[n+3*t+1]),o=Math.min(o,e[n+3*t+2]),a=Math.max(a,e[n+3*t]),u=Math.max(u,e[n+3*t+1]),h=Math.max(h,e[n+3*t+2]);t[0]=s,t[1]=i,t[2]=o,t[3]=a,t[4]=u,t[5]=h}(r,t,e,n),r}(t,0,t.length/3,e)}function u(t,e=(0,s.jh)(24)){const[n,r,i,o,a,u]=t;return e[0]=n,e[1]=r,e[2]=i,e[3]=n,e[4]=r,e[5]=u,e[6]=n,e[7]=a,e[8]=i,e[9]=n,e[10]=a,e[11]=u,e[12]=o,e[13]=r,e[14]=i,e[15]=o,e[16]=r,e[17]=u,e[18]=o,e[19]=a,e[20]=i,e[21]=o,e[22]=a,e[23]=u,e}function h(t,e){const n=isFinite(t[2])||isFinite(t[5]);return new r.A(n?{xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],zmin:t[2],zmax:t[5],spatialReference:e}:{xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],spatialReference:e})}function c(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.min(t[2],e[2]),t[3]=Math.max(t[3],e[3]),t[4]=Math.max(t[4],e[4]),t[5]=Math.max(t[5],e[5])}function f(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[3]=Math.max(t[3],e[2]),t[4]=Math.max(t[4],e[3])}function l(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.min(t[2],e[2]),t[3]=Math.max(t[3],e[0]),t[4]=Math.max(t[4],e[1]),t[5]=Math.max(t[5],e[2])}function m(t,e=[0,0,0]){return e[0]=function(t){return t[0]>=t[3]?0:t[3]-t[0]}(t),e[1]=function(t){return t[1]>=t[4]?0:t[4]-t[1]}(t),e[2]=function(t){return t[2]>=t[5]?0:t[5]-t[2]}(t),e}function g(t,e,n=t){return n[0]=e[0],n[1]=e[1],n[2]=e[2],n!==t&&(n[3]=t[3],n[4]=t[4],n[5]=t[5]),n}function x(t,e,n=t){return n[3]=e[0],n[4]=e[1],n[5]=e[2],n!==t&&(n[0]=t[0],n[1]=t[1],n[2]=t[2]),t}function d(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function p(t){return t?d(t,E):i(E)}function M(t,e){return t[0]=e[0],t[1]=e[1],t[2]=Number.NEGATIVE_INFINITY,t[3]=e[2],t[4]=e[3],t[5]=Number.POSITIVE_INFINITY,t}function v(t,e,n,r,s){return t[0]=e,t[1]=n,t[2]=Number.NEGATIVE_INFINITY,t[3]=r,t[4]=s,t[5]=Number.POSITIVE_INFINITY,t}function y(t){return 6===t.length}function C(t,e,n){if(null==t||null==e)return t===e;if(!y(t)||!y(e))return!1;if(n){for(let r=0;r<t.length;r++)if(!n(t[r],e[r]))return!1}else for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}const E=[1/0,1/0,1/0,-1/0,-1/0,-1/0],b=[0,0,0,0,0,0];i()},92722(t,e,n){n.d(e,{A:()=>s});var r=n(69397);class s{constructor(t=[],e=[],n=!1,r=!1){this.lengths=t??[],this.coords=e??[],this.hasZ=n,this.hasM=r}static fromJSON({lengths:t,coords:e,hasZ:n,hasM:r}){return new s(t,e,n||!1,r||!1)}static fromRect([t,e,n,r]){const i=n-t,o=r-e;return new s([5],[t,e,i,0,0,o,-i,0,0,-o])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((t,e)=>t+e,0)}get usedMemory(){return 64+(0,r.Qf)(this.lengths,this.coords)}get stride(){return 2+(this.hasZ?1:0)+(this.hasM?1:0)}area(){if(this.isPoint)return 0;let t=0,e=0;for(const n of this.lengths){if(n<3)continue;const{stride:r}=this;let s=this.coords[r*e],i=this.coords[r*e+1];for(let o=1;o<n;o+=1){const n=r*(e+o),a=this.coords[n],u=this.coords[n+1];t+=-.5*(a-s)*(u+i),s=a,i=u}e+=n}return t}forEachVertex(t){let e=0;if(this.isPoint)return t(this.coords[0],this.coords[1]);const{stride:n}=this;for(const r of this.lengths){for(let s=0;s<r;s++){const r=n*(e+s);t(this.coords[r],this.coords[r+1])}e+=r}}deltaDecode(){const t=this.clone(),{coords:e,lengths:n}=t;let r=0;const{stride:s}=this;for(const t of n){for(let n=1;n<t;n++){const t=s*(r+n);e[t]+=e[t-s],e[t+1]+=e[t+1-s]}r+=t}return t}clone(t){if(this.isPoint)return new s([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);const e=Array.from(this.lengths),{stride:n,size:r}=this,i=this.coords.slice(0,r*n);return t?(t.set(i),new s(e,t)):new s(e,Array.from(i),this.hasZ,this.hasM)}justXY(){const{stride:t,size:e}=this;if(2===t)return this;const n=new Array(e*t);for(let e=0,r=0;e<n.length;e+=t)n[r++]=this.coords[e],n[r++]=this.coords[e+1];return new s(this.lengths,n,!1,!1)}}}}]);